wgts-report 0.1.7 → 0.1.8
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.
- package/dist/assets/wgts-report.css +1 -1
- package/dist/assets/wgts-report.js +55 -55
- package/dist/index.html +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
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={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("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
|
|
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={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("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
|
|
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={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("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
|
|
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={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("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
|
|
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}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,15 +38,15 @@ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("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
|
|
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(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+
|
|
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
44
|
`),B=S.split(`
|
|
45
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{
|
|
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
47
|
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var Me=Object.prototype.hasOwnProperty,Ve=n.unstable_scheduleCallback,Fe=n.unstable_cancelCallback,Ct=n.unstable_shouldYield,st=n.unstable_requestPaint,et=n.unstable_now,Yn=n.unstable_getCurrentPriorityLevel,Dl=n.unstable_ImmediatePriority,ja=n.unstable_UserBlockingPriority,Ea=n.unstable_NormalPriority,Jr=n.unstable_LowPriority,Mi=n.unstable_IdlePriority,Wr=n.log,fe=n.unstable_setDisableYieldValue,Pe=null,nt=null;function bn(e){if(typeof Wr=="function"&&fe(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Pe,e)}catch{}}var Xt=Math.clz32?Math.clz32:In,ec=Math.log,Ri=Math.LN2;function In(e){return e>>>=0,e===0?32:31-(ec(e)/Ri|0)|0}var Na=256,_a=262144,Ma=4194304;function dl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ra(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var o=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=a&134217727;return S!==0?(a=S&~c,a!==0?o=dl(a):(g&=S,g!==0?o=dl(g):l||(l=S&~e,l!==0&&(o=dl(l))))):(S=a&~c,S!==0?o=dl(S):g!==0?o=dl(g):l||(l=a&~e,l!==0&&(o=dl(l)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:o}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dm(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-Xt(l),o=1<<a;t|=e[a],l&=~o}return t}function yx(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hm(){var e=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),e}function tc(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ti(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xx(e,t,l,a,o,c){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var S=e.entanglements,_=e.expirationTimes,B=e.hiddenUpdates;for(l=g&~l;0<l;){var Q=31-Xt(l),K=1<<Q;S[Q]=0,_[Q]=-1;var U=B[Q];if(U!==null)for(B[Q]=null,Q=0;Q<U.length;Q++){var q=U[Q];q!==null&&(q.lane&=-536870913)}l&=~K}a!==0&&mm(e,a,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function mm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function gm(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Xt(l),o=1<<a;o&t|e[a]&t&&(e[a]|=t),l&=~o}}function pm(e,t){var l=t&-t;return l=(l&42)!==0?1:nc(l),(l&(e.suspendedLanes|t))!==0?0:l}function nc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function lc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vm(){var e=me.p;return e!==0?e:(e=window.event,e===void 0?32:jv(e.type))}function ym(e,t){var l=me.p;try{return me.p=e,t()}finally{me.p=l}}var hl=Math.random().toString(36).slice(2),Ot="__reactFiber$"+hl,an="__reactProps$"+hl,ms="__reactContainer$"+hl,xm="__reactEvents$"+hl,Sx="__reactListeners$"+hl,bx="__reactHandles$"+hl,Sm="__reactResources$"+hl,Ai="__reactMarker$"+hl,eo="__reactLoad$"+hl;function to(e){delete e[Ot],delete e[an],delete e[Sx],delete e[bx]}function Ta(e){var t;if(t=e[Ot])return t;for(var l=e.parentNode;l;){if(t=l[ms]||l[Ot]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=av(e);e!==null;){if(l=e[Ot])return l;e=av(e)}return t}e=l,l=e.parentNode}return null}function gs(e){if(e=e[Ot]||e[ms]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ps(e){var t=e[Sm];return t||(t=e[Sm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Ai]=!0}function bm(e){e[eo]=void 0}var wm=new Set,Cm={};function Aa(e,t){vs(e,t),vs(e+"Capture",t)}function vs(e,t){for(Cm[e]=t,e=0;e<t.length;e++)wm.add(t[e])}var wx=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jm={},Em={};function Cx(e){return Me.call(Em,e)?!0:Me.call(jm,e)?!1:wx.test(e)?Em[e]=!0:(jm[e]=!0,!1)}var Be=!1;function Nm(){var e=Be;return Be=!1,e}function no(e,t,l){if(Cx(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function lo(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function ml(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,a)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _m(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jx(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){l=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ac(e){if(!e._valueTracker){var t=_m(e)?"checked":"value";e._valueTracker=jx(e,t,""+e[t])}}function Mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=_m(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var Ex=/[\n"\\]/g;function wn(e){return e.replace(Ex,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sc(e,t,l,a,o,c,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?g==="number"&&e.value==t?ic(e,dn(e.value)):ic(e,dn(t)):l!=null?ic(e,dn(l)):a!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+dn(S):e.removeAttribute("name")}function Rm(e,t,l,a,o,c,g,S){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){ac(e);return}l=l!=null?""+dn(l):"",t=t!=null?""+dn(t):l,S||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=S?e.checked:!!a,e.defaultChecked=!!a,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ac(e)}function ic(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ys(e,t,l,a){if(e=e.options,t){t={};for(var o=0;o<l.length;o++)t["$"+l[o]]=!0;for(l=0;l<e.length;l++)o=t.hasOwnProperty("$"+e[l].value),e[l].selected!==o&&(e[l].selected=o),o&&a&&(e[l].defaultSelected=!0)}else{for(l=""+dn(l),t=null,o=0;o<e.length;o++){if(e[o].value===l){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Tm(e,t,l){if(t!=null&&(t=""+dn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+dn(l):""}function Am(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(be(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=dn(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ac(e)}function xs(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Nx=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Om(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Nx.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function zm(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Be=!0);for(var o in t)a=t[o],t.hasOwnProperty(o)&&l[o]!==a&&(Om(e,o,a),Be=!0)}else for(var c in t)t.hasOwnProperty(c)&&Om(e,c,t[c])}function rc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _x=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Mx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ao(e){return Mx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var oc=null;function uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ss=null,bs=null;function Dm(e){var t=gs(e);if(t&&(e=t.stateNode)){var l=e[an]||null;e:switch(e=t.stateNode,t.type){case"input":if(sc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var o=a[an]||null;if(!o)throw Error(r(90));sc(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Mm(a)}break e;case"textarea":Tm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ys(e,!!l.multiple,t,!1)}}}var cc=!1;function Hm(e,t,l){if(cc)return e(t,l);cc=!0;try{var a=e(t);return a}finally{if(cc=!1,(Ss!==null||bs!==null)&&(su(),Ss&&(t=Ss,e=bs,bs=Ss=null,Dm(t),e)))for(t=0;t<e.length;t++)Dm(e[t])}}function zi(e,t){var l=e.stateNode;if(l===null)return null;var a=l[an]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var gl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=!1;if(gl)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){fc=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{fc=!1}var Ll=null,dc=null,so=null;function Lm(){if(so)return so;var e,t=dc,l=t.length,a,o="value"in Ll?Ll.value:Ll.textContent,c=o.length;for(e=0;e<l&&t[e]===o[e];e++);var g=l-e;for(a=1;a<=g&&t[l-a]===o[c-a];a++);return so=o.slice(e,1<a?1-a:void 0)}function io(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ro(){return!0}function Um(){return!1}function Kt(e){function t(l,a,o,c,g){this._reactName=l,this._targetInst=o,this.type=a,this.nativeEvent=c,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(c):c[S]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ro:Um,this.isPropagationStopped=Um,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ro)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ro)},persist:function(){},isPersistent:ro}),t}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Kt(Ul),Hi=z({},Ul,{view:0,detail:0}),Rx=Kt(Hi),hc,mc,Li,uo=z({},Hi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Li&&(Li&&e.type==="mousemove"?(hc=e.screenX-Li.screenX,mc=e.screenY-Li.screenY):mc=hc=0,Li=e),hc)},movementY:function(e){return"movementY"in e?e.movementY:mc}}),Vm=Kt(uo),Tx=z({},uo,{dataTransfer:0}),Ax=Kt(Tx),Ox=z({},Hi,{relatedTarget:0}),gc=Kt(Ox),zx=z({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=Kt(zx),Hx=z({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lx=Kt(Hx),Ux=z({},Ul,{data:0}),$m=Kt(Ux),Vx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$x={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fx[e])?!!t[e]:!1}function pc(){return Bx}var kx=z({},Hi,{key:function(e){if(e.key){var t=Vx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=io(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$x[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?io(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?io(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gx=Kt(kx),qx=z({},uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fm=Kt(qx),Qx=z({},Ul,{submitter:0}),Yx=Kt(Qx),Ix=z({},Hi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),Xx=Kt(Ix),Kx=z({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zx=Kt(Kx),Px=z({},uo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Jx=Kt(Px),Wx=z({},Ul,{newState:0,oldState:0,source:0}),eS=Kt(Wx),tS=[9,13,27,32],vc=gl&&"CompositionEvent"in window,Ui=null;gl&&"documentMode"in document&&(Ui=document.documentMode);var nS=gl&&"TextEvent"in window&&!Ui,Bm=gl&&(!vc||Ui&&8<Ui&&11>=Ui),km=" ",Gm=!1;function qm(e,t){switch(e){case"keyup":return tS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function lS(e,t){switch(e){case"compositionend":return Qm(t);case"keypress":return t.which!==32?null:(Gm=!0,km);case"textInput":return e=t.data,e===km&&Gm?null:e;default:return null}}function aS(e,t){if(ws)return e==="compositionend"||!vc&&qm(e,t)?(e=Lm(),so=dc=Ll=null,ws=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bm&&t.locale!=="ko"?null:t.data;default:return null}}var sS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ym(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sS[e.type]:t==="textarea"}function Im(e,t,l,a){Ss?bs?bs.push(a):bs=[a]:Ss=a,t=fu(t,"onChange"),0<t.length&&(l=new oo("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Vi=null,$i=null;function iS(e){D0(e,0)}function co(e){var t=Oi(e);if(Mm(t))return e}function Xm(e,t){if(e==="change")return t}var Km=!1;if(gl){var yc;if(gl){var xc="oninput"in document;if(!xc){var Zm=document.createElement("div");Zm.setAttribute("oninput","return;"),xc=typeof Zm.oninput=="function"}yc=xc}else yc=!1;Km=yc&&(!document.documentMode||9<document.documentMode)}function Pm(){Vi&&(Vi.detachEvent("onpropertychange",Jm),$i=Vi=null)}function Jm(e){if(e.propertyName==="value"&&co($i)){var t=[];Im(t,$i,e,uc(e)),Hm(iS,t)}}function rS(e,t,l){e==="focusin"?(Pm(),Vi=t,$i=l,Vi.attachEvent("onpropertychange",Jm)):e==="focusout"&&Pm()}function oS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return co($i)}function uS(e,t){if(e==="click")return co(t)}function cS(e,t){if(e==="input"||e==="change")return co(t)}function fS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:fS;function Fi(e,t){if(hn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var o=l[a];if(!Me.call(t,o)||!hn(e[o],t[o]))return!1}return!0}function Sc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eg(e,t){var l=Wm(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wm(l)}}function tg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ng(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sc(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Sc(e.document)}return t}function bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var dS=gl&&"documentMode"in document&&11>=document.documentMode,Cs=null,wc=null,Bi=null,Cc=!1;function lg(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cc||Cs==null||Cs!==Sc(a)||(a=Cs,"selectionStart"in a&&bc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Bi&&Fi(Bi,a)||(Bi=a,a=fu(wc,"onSelect"),0<a.length&&(t=new oo("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Cs)))}function Oa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var js={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},jc={},ag={};gl&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function za(e){if(jc[e])return jc[e];if(!js[e])return e;var t=js[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ag)return jc[e]=t[l];return e}var sg=za("animationend"),ig=za("animationiteration"),rg=za("animationstart"),hS=za("transitionrun"),mS=za("transitionstart"),gS=za("transitioncancel"),og=za("transitionend"),ug=new Map,Ec="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ec.push("scrollEnd");function Dn(e,t){ug.set(e,t),Aa(t,[e])}var pS=0;function pl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Vn.identifierPrefix;var l=pS++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function cg(e){if(e==null||typeof e=="string")return e;var t=null,l=qs;if(l!==null)for(var a=0;a<l.length;a++){var o=e[l[a]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t??e.default}function vl(e,t){return e=cg(e),t=cg(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var fo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Cn=[],Es=0,Nc=0;function ho(){for(var e=Es,t=Nc=Es=0;t<e;){var l=Cn[t];Cn[t++]=null;var a=Cn[t];Cn[t++]=null;var o=Cn[t];Cn[t++]=null;var c=Cn[t];if(Cn[t++]=null,a!==null&&o!==null){var g=a.pending;g===null?o.next=o:(o.next=g.next,g.next=o),a.pending=o}c!==0&&fg(l,o,c)}}function mo(e,t,l,a){Cn[Es++]=e,Cn[Es++]=t,Cn[Es++]=l,Cn[Es++]=a,Nc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function _c(e,t,l,a){return mo(e,t,l,a),go(e)}function Da(e,t){return mo(e,null,null,t),go(e)}function fg(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var o=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Xt(l),e=c.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=l|536870912),c):null}function go(e){if(50<ur)throw ur=0,au=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ns={};function vS(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,l,a){return new vS(e,t,l,a)}function Mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yl(e,t){var l=e.alternate;return l===null?(l=sn(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function dg(e,t){e.flags&=1206910978;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,l,a,o,c){var g=0;if(a=e,typeof a=="function")Mc(a)&&(g=1);else if(typeof a=="string")g=Qb(e,l,pt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case $e:return e=sn(31,l,t,o),e.elementType=$e,e.lanes=c,e;case ne:return Ha(l.children,o,c,t);case ie:g=8,o|=24;break;case Ce:return e=sn(12,l,t,o|2),e.elementType=Ce,e.lanes=c,e;case J:return e=sn(13,l,t,o),e.elementType=J,e.lanes=c,e;case ue:return e=sn(19,l,t,o),e.elementType=ue,e.lanes=c,e;case Ie:case A:return e=o|32,e=sn(30,l,t,e),e.elementType=A,e.lanes=c,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case ee:g=10;break e;case X:g=9;break e;case P:g=11;break e;case Ee:g=14;break e;case je:g=16,a=null;break e}g=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=sn(g,l,t,o),t.elementType=e,t.type=a,t.lanes=c,t}function Ha(e,t,l,a){return e=sn(7,e,a,t),e.lanes=l,e}function Rc(e,t,l){return e=sn(6,e,null,t),e.lanes=l,e}function hg(e){var t=sn(18,null,null,0);return t.stateNode=e,t}function Tc(e,t,l){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mg=new WeakMap;function jn(e,t){if(typeof e=="object"&&e!==null){var l=mg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:le(t)},mg.set(e,t),t)}return{value:e,source:t,stack:le(t)}}var _s=[],Ms=0,vo=null,ki=0,En=[],Nn=0,Vl=null,Kn=1,Zn="";function xl(e,t){_s[Ms++]=ki,_s[Ms++]=vo,vo=e,ki=t}function gg(e,t,l){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Vl=e;var a=Kn;e=Zn;var o=32-Xt(a)-1;a&=~(1<<o),l+=1;var c=32-Xt(t)+o;if(30<c){var g=o-o%5;c=(a&(1<<g)-1).toString(32),a>>=g,o-=g,Kn=1<<32-Xt(t)+o|l<<o|a,Zn=c+e}else Kn=1<<c|l<<o|a,Zn=e}function yo(e){e.return!==null&&(xl(e,1),gg(e,1,0))}function Ac(e){for(;e===vo;)vo=_s[--Ms],_s[Ms]=null,ki=_s[--Ms],_s[Ms]=null;for(;e===Vl;)Vl=En[--Nn],En[Nn]=null,Zn=En[--Nn],En[Nn]=null,Kn=En[--Nn],En[Nn]=null}function pg(e,t){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Kn=t.id,Zn=t.overflow,Vl=e}var Mt=null,lt=null,Re=!1,$l=null,_n=!1,Oc=Error(r(519));function Fl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(jn(t,e)),Oc}function vg(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Ot]=e,t[an]=a,l){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(l=0;l<fr.length;l++)Ae(fr[l],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Rm(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Am(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||V0(t.textContent,l)?(a.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),a.onScroll!=null&&Ae("scroll",t),a.onScrollEnd!=null&&Ae("scrollend",t),a.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||Fl(e,!0)}function xo(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Mt=Mt.return}}function Rs(e){if(e!==Mt)return!1;if(!Re)return xo(e),Re=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ud(e.type,e.memoizedProps)),l=!l),l&<&&Fl(e),xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else t===27?(t=lt,na(e.type)?(e=yd,yd=null,lt=e):lt=t):lt=Mt?Rn(e.stateNode.nextSibling):null;return!0}function La(){lt=Mt=null,Re=!1}function zc(){var e=$l;return e!==null&&(un===null?un=e:un.push.apply(un,e),$l=null),e}function Gi(e){$l===null?$l=[e]:$l.push(e)}var Dc=Nt(null),Ua=null,Sl=null;function Bl(e,t,l){Ge(Dc,t._currentValue),t._currentValue=l}function bl(e){e._currentValue=Dc.current,ot(Dc)}function So(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Hc(e,t,l,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var g=o.child;c=c.firstContext;e:for(;c!==null;){var S=c;c=o;for(var _=0;_<t.length;_++)if(S.context===t[_]){c.lanes|=l,S=c.alternate,S!==null&&(S.lanes|=l),So(c.return,l,e),a||(g=null);break e}c=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=l,c=g.alternate,c!==null&&(c.lanes|=l),So(g,l,e),g=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=l,g=o.alternate,g!==null&&(g.lanes|=l),So(o.return,l,e),g=o.child,g=g!==null?g.sibling:null):g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Va(e,t,l,a){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var S=o.type;hn(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===nn.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ei):e=[ei])}o=o.return}return e!==null&&Hc(t,e,l,a),t.flags|=262144,e!==null}function bo(e){for(e=e.firstContext;e!==null;){if(!hn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Ua=e,Sl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return yg(Ua,e)}function wo(e,t){return Ua===null&&$a(e),yg(e,t)}function yg(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Sl===null){if(e===null)throw Error(r(308));Sl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sl=Sl.next=t;return l}var yS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},xS=n.unstable_scheduleCallback,SS=n.unstable_NormalPriority,yt={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lc(){return{controller:new yS,data:new Map,refCount:0}}function qi(e){e.refCount--,e.refCount===0&&xS(SS,function(){e.controller.abort()})}function xg(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];l.indexOf(a)===-1&&l.push(a)}}}var Qi=null;function bS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Yi=null,Uc=0,Fa=0,Ts=null;function wS(e,t){if(Yi===null){var l=Yi=[];Uc=0,Fa=ed(),Ts={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Uc++,t.then(Sg,Sg),t}function Sg(){if(--Uc===0&&(Qi=null,Yi!==null)){Ts!==null&&(Ts.status="fulfilled");var e=Yi;Yi=null,Fa=0,Ts=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function CS(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(o){l.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<l.length;o++)(0,l[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<l.length;o++)(0,l[o])(void 0)}),a}var bg=re.S;re.S=function(e,t){if(h0=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&wS(e,t),Qi!==null)for(var l=Xs;l!==null;)xg(l,Qi),l=l.next;if(l=e.types,l!==null){for(var a=Xs;a!==null;)xg(a,l),a=a.next;if(Fa!==0){a=Qi,a===null&&(a=Qi=[]);for(var o=0;o<l.length;o++){var c=l[o];a.indexOf(c)===-1&&a.push(c)}}}bg!==null&&bg(e,t)};var Ba=Nt(null);function Vc(){var e=Ba.current;return e!==null?e:tt.pooledCache}function Co(e,t){t===null?Ge(Ba,Ba.current):Ge(Ba,t.pool)}function wg(){var e=Vc();return e===null?null:{parent:yt._currentValue,pool:e}}var As=Error(r(460)),$c=Error(r(474)),jo=Error(r(542)),Eo={then:function(){}};function Cg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Xn,Xn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e}throw Ga=t,As}}function ka(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ga=l,As):l}}var Ga=null;function Eg(){if(Ga===null)throw Error(r(459));var e=Ga;return Ga=null,e}function Ng(e){if(e===As||e===jo)throw Error(r(483))}var Os=null,Ii=0;function No(e){var t=Ii;return Ii+=1,Os===null&&(Os=[]),jg(Os,e,t)}function kl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===Y?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _g(e){function t($,O){if(e){var G=$.deletions;G===null?($.deletions=[O],$.flags|=16):G.push(O)}}function l($,O){if(!e)return null;for(;O!==null;)t($,O),O=O.sibling;return null}function a($){for(var O=new Map;$!==null;)$.key===null?O.set($.index,$):O.set($.key,$),$=$.sibling;return O}function o($,O){return $=yl($,O),$.index=0,$.sibling=null,$}function c($,O,G){return $.index=G,e?(G=$.alternate,G!==null?(G=G.index,G<O?($.flags|=2,O):G):($.flags|=134217730,O)):($.flags|=1048576,O)}function g($){return e&&$.alternate===null&&($.flags|=134217730),$}function S($,O,G,I){return O===null||O.tag!==6?(O=Rc(G,$.mode,I),O.return=$,O):(O=o(O,G),O.return=$,O)}function _($,O,G,I){var ce=G.type;return ce===ne?($=Q($,O,G.props.children,I,G.key),kl($,G),$):O!==null&&(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type)?(O=o(O,G.props),kl(O,G),O.return=$,O):(O=po(G.type,G.key,G.props,null,$.mode,I),kl(O,G),O.return=$,O)}function B($,O,G,I){return O===null||O.tag!==4||O.stateNode.containerInfo!==G.containerInfo||O.stateNode.implementation!==G.implementation?(O=Tc(G,$.mode,I),O.return=$,O):(O=o(O,G.children||[]),O.return=$,O)}function Q($,O,G,I,ce){return O===null||O.tag!==7?(O=Ha(G,$.mode,I,ce),O.return=$,O):(O=o(O,G),O.return=$,O)}function K($,O,G){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Rc(""+O,$.mode,G),O.return=$,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case te:return G=po(O.type,O.key,O.props,null,$.mode,G),kl(G,O),G.return=$,G;case k:return O=Tc(O,$.mode,G),O.return=$,O;case je:return O=ka(O),K($,O,G)}if(be(O)||se(O))return O=Ha(O,$.mode,G,null),O.return=$,O;if(typeof O.then=="function")return K($,No(O),G);if(O.$$typeof===ee)return K($,wo($,O),G);_o($,O)}return null}function U($,O,G,I){var ce=O!==null?O.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return ce!==null?null:S($,O,""+G,I);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case te:return G.key===ce?_($,O,G,I):null;case k:return G.key===ce?B($,O,G,I):null;case je:return G=ka(G),U($,O,G,I)}if(be(G)||se(G))return ce!==null?null:Q($,O,G,I,null);if(typeof G.then=="function")return U($,O,No(G),I);if(G.$$typeof===ee)return U($,O,wo($,G),I);_o($,G)}return null}function q($,O,G,I,ce){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return $=$.get(G)||null,S(O,$,""+I,ce);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case te:return $=$.get(I.key===null?G:I.key)||null,_(O,$,I,ce);case k:return $=$.get(I.key===null?G:I.key)||null,B(O,$,I,ce);case je:return I=ka(I),q($,O,G,I,ce)}if(be(I)||se(I))return $=$.get(G)||null,Q(O,$,I,ce,null);if(typeof I.then=="function")return q($,O,G,No(I),ce);if(I.$$typeof===ee)return q($,O,G,wo(O,I),ce);_o(O,I)}return null}function ae($,O,G,I){for(var ce=null,ze=null,ge=O,ve=O=0,bt=null;ge!==null&&ve<G.length;ve++){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var Le=U($,ge,G[ve],I);if(Le===null){ge===null&&(ge=bt);break}e&&ge&&Le.alternate===null&&t($,ge),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le,ge=bt}if(ve===G.length)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;ve<G.length;ve++)ge=K($,G[ve],I),ge!==null&&(O=c(ge,O,ve),ze===null?ce=ge:ze.sibling=ge,ze=ge);return Re&&xl($,ve),ce}for(ge=a(ge);ve<G.length;ve++)bt=q(ge,$,ve,G[ve],I),bt!==null&&(e&&(Le=bt.alternate,Le!==null&&ge.delete(Le.key===null?ve:Le.key)),O=c(bt,O,ve),ze===null?ce=bt:ze.sibling=bt,ze=bt);return e&&ge.forEach(function(ra){return t($,ra)}),Re&&xl($,ve),ce}function de($,O,G,I){if(G==null)throw Error(r(151));for(var ce=null,ze=null,ge=O,ve=O=0,bt=null,Le=G.next();ge!==null&&!Le.done;ve++,Le=G.next()){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var ra=U($,ge,Le.value,I);if(ra===null){ge===null&&(ge=bt);break}e&&ge&&ra.alternate===null&&t($,ge),O=c(ra,O,ve),ze===null?ce=ra:ze.sibling=ra,ze=ra,ge=bt}if(Le.done)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;!Le.done;ve++,Le=G.next())Le=K($,Le.value,I),Le!==null&&(O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return Re&&xl($,ve),ce}for(ge=a(ge);!Le.done;ve++,Le=G.next())Le=q(ge,$,ve,Le.value,I),Le!==null&&(e&&(bt=Le.alternate,bt!==null&&ge.delete(bt.key===null?ve:bt.key)),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return e&&ge.forEach(function(l2){return t($,l2)}),Re&&xl($,ve),ce}function _e($,O,G,I){if(typeof G=="object"&&G!==null&&G.type===ne&&G.key===null&&G.props.ref===void 0&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case te:e:{for(var ce=G.key;O!==null;){if(O.key===ce){if(ce=G.type,ce===ne){if(O.tag===7){l($,O.sibling),I=o(O,G.props.children),kl(I,G),I.return=$,$=I;break e}}else if(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type){l($,O.sibling),I=o(O,G.props),kl(I,G),I.return=$,$=I;break e}l($,O);break}else t($,O);O=O.sibling}G.type===ne?(I=Ha(G.props.children,$.mode,I,G.key),kl(I,G),I.return=$,$=I):(I=po(G.type,G.key,G.props,null,$.mode,I),kl(I,G),I.return=$,$=I)}return g($);case k:e:{for(ce=G.key;O!==null;){if(O.key===ce)if(O.tag===4&&O.stateNode.containerInfo===G.containerInfo&&O.stateNode.implementation===G.implementation){l($,O.sibling),I=o(O,G.children||[]),I.return=$,$=I;break e}else{l($,O);break}else t($,O);O=O.sibling}I=Tc(G,$.mode,I),I.return=$,$=I}return g($);case je:return G=ka(G),_e($,O,G,I)}if(be(G))return ae($,O,G,I);if(se(G)){if(ce=se(G),typeof ce!="function")throw Error(r(150));return G=ce.call(G),de($,O,G,I)}if(typeof G.then=="function")return _e($,O,No(G),I);if(G.$$typeof===ee)return _e($,O,wo($,G),I);_o($,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,O!==null&&O.tag===6?(l($,O.sibling),I=o(O,G),I.return=$,$=I):(l($,O),I=Rc(G,$.mode,I),I.return=$,$=I),g($)):l($,O)}return function($,O,G,I){try{Ii=0;var ce=_e($,O,G,I);return Os=null,ce}catch(ge){if(ge===As||ge===jo)throw ge;var ze=sn(29,ge,null,$.mode);return ze.lanes=I,ze.return=$,ze}finally{}}}var qa=_g(!0),Mg=_g(!1),Gl=!1;function Fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ql(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ql(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(qe&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=go(e),fg(e,null,l),t}return mo(e,a,t,l),go(e)}function Xi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}function kc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var o=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?o=c=g:c=c.next=g,l=l.next}while(l!==null);c===null?o=c=t:c=c.next=t}else o=c=t;l={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Gc=!1;function Ki(){if(Gc){var e=Ts;if(e!==null)throw e}}function Zi(e,t,l,a){Gc=!1;var o=e.updateQueue;Gl=!1;var c=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var _=S,B=_.next;_.next=null,g===null?c=B:g.next=B,g=_;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,S=Q.lastBaseUpdate,S!==g&&(S===null?Q.firstBaseUpdate=B:S.next=B,Q.lastBaseUpdate=_))}if(c!==null){var K=o.baseState;g=0,Q=B=_=null,S=c;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(Oe&U)===U:(a&U)===U){U!==0&&U===Fa&&(Gc=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=e,de=S;U=t;var _e=l;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){K=ae.call(_e,K,U);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,U=typeof ae=="function"?ae.call(_e,K,U):ae,U==null)break e;K=z({},K,U);break e;case 2:Gl=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(B=Q=q,_=K):Q=Q.next=q,g|=U;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;q=S,S=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);Q===null&&(_=K),o.baseState=_,o.firstBaseUpdate=B,o.lastBaseUpdate=Q,c===null&&(o.shared.lanes=0),Jl|=g,e.lanes=g,e.memoizedState=K}}function Rg(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Tg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Rg(l[e],t)}var Yl=Nt(null),Mo=Nt(0);function Ag(e,t){e=Nl,Ge(Mo,e),Ge(Yl,t),Nl=e|t.baseLanes}function qc(){Ge(Mo,Nl),Ge(Yl,Yl.current)}function Qc(){Nl=Mo.current,ot(Yl),ot(Mo)}var Dt=Nt(null),qt=null;function Il(e){var t=e.alternate;Ge(Ht,Ht.current&1),Ge(Dt,e),qt===null&&(t===null||Yl.current!==null||t.memoizedState!==null)&&(qt=e)}function Yc(e){Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)}function Og(e){e.tag===22?(Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)):Xl()}function Xl(){Ge(Ht,Ht.current),Ge(Dt,Dt.current)}function mn(e){ot(Dt),qt===e&&(qt=null),ot(Ht)}var Ht=Nt(0);function Pi(e,t){Ge(Dt,Dt.current),Ge(Ht,t)}function Ic(e){ot(Ht),ot(Dt),qt===e&&(qt=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||pd(l)||vd(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wl=0,Ne=null,Je=null,xt=null,To=!1,zs=!1,Qa=!1,Ao=0,Ji=0,Ds=null,jS=0;function mt(){throw Error(r(321))}function Xc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!hn(e[l],t[l]))return!1;return!0}function Kc(e,t,l,a,o,c){return wl=c,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?gp:pp,Qa=!1,c=l(a,o),Qa=!1,zs&&(c=Dg(t,l,a,o)),zg(e),c}function zg(e){re.H=Vo;var t=Je!==null&&Je.next!==null;if(wl=0,xt=Je=Ne=null,To=!1,Ji=0,Ds=null,t)throw Error(r(300));e===null||St||(e=e.dependencies,e!==null&&bo(e)&&(St=!0))}function Dg(e,t,l,a){Ne=e;var o=0;do{if(zs&&(Ds=null),Ji=0,zs=!1,25<=o)throw Error(r(301));if(o+=1,xt=Je=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}re.H=OS,c=t(l,a)}while(zs);return c}function ES(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?Wi(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Zc(){var e=Ao!==0;return Ao=0,e}function Pc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Jc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}wl=0,xt=Je=Ne=null,zs=!1,Ji=Ao=0,Ds=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Ne.memoizedState=xt=e:xt=xt.next=e,xt}function vt(){if(Je===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=xt===null?Ne.memoizedState:xt.next;if(t!==null)xt=t,Je=e;else{if(e===null)throw Ne.alternate===null?Error(r(467)):Error(r(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},xt===null?Ne.memoizedState=xt=e:xt=xt.next=e}return xt}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wi(e){var t=Ji;return Ji+=1,Ds===null&&(Ds=[]),e=jg(Ds,e,t),t=Ne,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?gp:pp),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wi(e);if(e.$$typeof===V)return;if(e.$$typeof===ee)return zt(e)}throw Error(r(438,String(e)))}function Wc(e){var t=null,l=Ne.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=Ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Oo(),Ne.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=We;return t.index++,l}function Cl(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=vt();return ef(t,Je,e)}function ef(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var o=e.baseQueue,c=a.pending;if(c!==null){if(o!==null){var g=o.next;o.next=c.next,c.next=g}t.baseQueue=o=c,a.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var S=g=null,_=null,B=t,Q=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Oe&K)===K:(wl&K)===K){var U=B.revertLane;if(U===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Fa&&(Q=!0);else if((wl&U)===U){B=B.next,U===Fa&&(Q=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=K,g=c):_=_.next=K,Ne.lanes|=U,Jl|=U;K=B.action,Qa&&l(c,K),c=B.hasEagerState?B.eagerState:l(c,K)}else U={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=U,g=c):_=_.next=U,Ne.lanes|=K,Jl|=K;B=B.next}while(B!==null&&B!==t);if(_===null?g=c:_.next=S,!hn(c,e.memoizedState)&&(St=!0,Q&&(l=Ts,l!==null)))throw l;e.memoizedState=c,e.baseState=g,e.baseQueue=_,a.lastRenderedState=c}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function tf(e){var t=vt(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,o=l.pending,c=t.memoizedState;if(o!==null){l.pending=null;var g=o=o.next;do c=e(c,g.action),g=g.next;while(g!==o);hn(c,t.memoizedState)||(St=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Hg(e,t,l){var a=Ne,o=vt(),c=Re;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var g=!hn((Je||o).memoizedState,l);if(g&&(o.memoizedState=l,St=!0),o=o.queue,af(Vg.bind(null,a,o,e),[e]),e=o.getSnapshot!==t||g||xt!==null&&(xt.memoizedState.tag&1)!==0,Hs(e?9:8,{destroy:void 0},Ug.bind(null,a,o,l,t),null),e){if(a.flags|=2048,tt===null)throw Error(r(349));c||(wl&127)!==0||Lg(a,t,l)}return l}function Lg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ne.updateQueue,t===null?(t=Oo(),Ne.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ug(e,t,l,a){t.value=l,t.getSnapshot=a,$g(t)&&Fg(e)}function Vg(e,t,l){return l(function(){$g(t)&&Fg(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!hn(e,l)}catch{return!0}}function Fg(e){var t=Da(e,2);t!==null&&cn(t,e,2)}function nf(e){var t=Zt();if(typeof e=="function"){var l=e;if(e=l(),Qa){bn(!0);try{l()}finally{bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:e},t}function Bg(e,t,l,a){return e.baseState=l,ef(e,Je,typeof a=="function"?a:Cl)}function NS(e,t,l,a,o){if(Uo(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){c.listeners.push(g)}};re.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,kg(t,c)):(c.next=l.next,t.pending=l.next=c)}}function kg(e,t){var l=t.action,a=t.payload,o=e.state;if(t.isTransition){var c=re.T,g={};g.types=c!==null?c.types:null,re.T=g;try{var S=l(o,a),_=re.S;_!==null&&_(g,S),Gg(e,t,S)}catch(B){lf(e,t,B)}finally{c!==null&&g.types!==null&&(c.types=g.types),re.T=c}}else try{c=l(o,a),Gg(e,t,c)}catch(B){lf(e,t,B)}}function Gg(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){qg(e,t,a)},function(a){return lf(e,t,a)}):qg(e,t,l)}function qg(e,t,l){t.status="fulfilled",t.value=l,Qg(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,kg(e,l)))}function lf(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Qg(t),t=t.next;while(t!==a)}e.action=null}function Qg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yg(e,t){return t}function Ig(e,t){if(Re){var l=tt.formState;if(l!==null){e:{var a=Ne;if(Re){if(lt){t:{for(var o=lt,c=_n;o.nodeType!==8;){if(!c){o=null;break t}if(o=Rn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){lt=Rn(o.nextSibling),a=o.data==="F!";break e}}Fl(a)}a=!1}a&&(t=l[0])}}return l=Zt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yg,lastRenderedState:t},l.queue=a,l=dp.bind(null,Ne,a),a.dispatch=l,a=nf(!1),c=cf.bind(null,Ne,!1,a.queue),a=Zt(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,l=NS.bind(null,Ne,o,c,l),o.dispatch=l,a.memoizedState=e,[t,l,!1]}function Xg(e){var t=vt();return Kg(t,Je,e)}function Kg(e,t,l){if(t=ef(e,t,Yg)[0],e=Do(Cl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Wi(t)}catch(g){throw g===As?jo:g}else a=t;t=vt();var o=t.queue,c=o.dispatch;return l!==t.memoizedState&&(Ne.flags|=2048,Hs(9,{destroy:void 0},_S.bind(null,o,l),null)),[a,c,e]}function _S(e,t){e.action=t}function Zg(e){var t=vt(),l=Je;if(l!==null)return Kg(t,l,e);vt(),t=t.memoizedState,l=vt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Hs(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Oo(),Ne.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Pg(){return vt().memoizedState}function Ho(e,t,l,a){var o=Zt();Ne.flags|=e,o.memoizedState=Hs(1|t,{destroy:void 0},l,a===void 0?null:a)}function Lo(e,t,l,a){var o=vt();a=a===void 0?null:a;var c=o.memoizedState.inst;Je!==null&&a!==null&&Xc(a,Je.memoizedState.deps)?o.memoizedState=Hs(t,c,l,a):(Ne.flags|=e,o.memoizedState=Hs(1|t,c,l,a))}function Jg(e,t){Ho(8390656,8,e,t)}function af(e,t){Lo(2048,8,e,t)}function MS(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Oo(),Ne.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Wg(e){var t=vt().memoizedState;return MS({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ep(e,t){return Lo(4,2,e,t)}function tp(e,t){return Lo(4,4,e,t)}function np(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lp(e,t,l){l=l!=null?l.concat([e]):null,Lo(4,4,np.bind(null,t,e),l)}function sf(){}function ap(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Xc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function sp(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Xc(t,a[1]))return a[0];if(a=e(),Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a}function rf(e,t,l){return l===void 0||(wl&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=g0(),Ne.lanes|=e,Jl|=e,l)}function ip(e,t,l,a){return hn(l,t)?l:Yl.current!==null?(e=rf(e,l,a),hn(e,t)||(St=!0),e):(wl&106)===0||(wl&1073741824)!==0&&(Oe&261930)===0?(St=!0,e.memoizedState=l):(e=g0(),Ne.lanes|=e,Jl|=e,t)}function rp(e,t,l,a,o){var c=me.p;me.p=c!==0&&8>c?c:8;var g=re.T,S={};S.types=g!==null?g.types:null,re.T=S,cf(e,!1,t,l);try{var _=o(),B=re.S;if(B!==null&&B(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=CS(_,a);er(e,t,Q,yn(e))}else er(e,t,a,yn(e))}catch(K){er(e,t,{then:function(){},status:"rejected",reason:K},yn())}finally{me.p=c,g!==null&&S.types!==null&&(g.types=S.types),re.T=g}}function RS(){}function of(e,t,l,a){if(e.tag!==5)throw Error(r(476));var o=op(e).queue;rp(e,o,t,rt,l===null?RS:function(){return up(e),l(a)})}function op(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:rt,baseState:rt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:rt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function up(e){var t=op(e);t.next===null&&(t=e.alternate.memoizedState),er(e,t.next.queue,{},yn())}function uf(){return zt(ei)}function cp(){return vt().memoizedState}function fp(){return vt().memoizedState}function TS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=yn();e=ql(l);var a=Ql(t,e,l);a!==null&&(cn(a,t,l),Xi(a,t,l)),t={cache:Lc()},e.payload=t;return}t=t.return}}function AS(e,t,l){var a=yn();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Uo(e)?hp(t,l):(l=_c(e,t,l,a),l!==null&&(cn(l,e,a),mp(l,t,a)))}function dp(e,t,l){var a=yn();er(e,t,l,a)}function er(e,t,l,a){var o={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Uo(e))hp(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,S=c(g,l);if(o.hasEagerState=!0,o.eagerState=S,hn(S,g))return mo(e,t,o,0),tt===null&&ho(),!1}catch{}finally{}if(l=_c(e,t,o,a),l!==null)return cn(l,e,a),mp(l,t,a),!0}return!1}function cf(e,t,l,a){if(a={lane:2,revertLane:ed(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Uo(e)){if(t)throw Error(r(479))}else t=_c(e,l,a,2),t!==null&&cn(t,e,2)}function Uo(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function hp(e,t){zs=To=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function mp(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}var Vo={readContext:zt,use:zo,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt,useEffectEvent:mt},gp={readContext:zt,use:zo,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Jg,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ho(4194308,4,np.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){Ho(4,2,e,t)},useMemo:function(e,t){var l=Zt();t=t===void 0?null:t;var a=e();if(Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Zt();if(l!==void 0){var o=l(t);if(Qa){bn(!0);try{l(t)}finally{bn(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=AS.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=nf(e);var t=e.queue,l=dp.bind(null,Ne,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:sf,useDeferredValue:function(e,t){var l=Zt();return rf(l,e,t)},useTransition:function(){var e=nf(!1);return e=rp.bind(null,Ne,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=Ne,o=Zt();if(Re){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),tt===null)throw Error(r(349));(Oe&127)!==0||Lg(a,t,l)}o.memoizedState=l;var c={value:l,getSnapshot:t};return o.queue=c,Jg(Vg.bind(null,a,c,e),[e]),a.flags|=2048,Hs(9,{destroy:void 0},Ug.bind(null,a,c,l,t),null),l},useId:function(){var e=Zt(),t=tt.identifierPrefix;if(Re){var l=Zn,a=Kn;l=(a&~(1<<32-Xt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ao++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=jS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uf,useFormState:Ig,useActionState:Ig,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=cf.bind(null,Ne,!0,l),l.dispatch=t,[e,t]},useMemoCache:Wc,useCacheRefresh:function(){return Zt().memoizedState=TS.bind(null,Ne)},useEffectEvent:function(e){var t=Zt(),l={impl:e};return t.memoizedState=l,function(){if((qe&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},pp={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:Do,useRef:Pg,useState:function(){return Do(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=Do(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Xg,useActionState:Xg,useOptimistic:function(e,t){var l=vt();return Bg(l,Je,e,t)},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg},OS={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:tf,useRef:Pg,useState:function(){return tf(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return Je===null?rf(l,e,t):ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=tf(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Zg,useActionState:Zg,useOptimistic:function(e,t){var l=vt();return Je!==null?Bg(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg};function ff(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:z({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var df={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.tag=1,o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=yn(),a=ql(l);a.tag=2,t!=null&&(a.callback=t),t=Ql(e,a,l),t!==null&&(cn(t,e,l),Xi(t,e,l))}};function vp(e,t,l,a,o,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,g):t.prototype&&t.prototype.isPureReactComponent?!Fi(l,a)||!Fi(o,c):!0}function yp(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&df.enqueueReplaceState(t,t.state,null)}function Ya(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=z({},l));for(var o in e)l[o]===void 0&&(l[o]=e[o])}return l}function xp(e){fo(e)}function Sp(e){console.error(e)}function bp(e){fo(e)}function $o(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function wp(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function hf(e,t,l){return l=ql(l),l.tag=3,l.payload={element:null},l.callback=function(){$o(e,t)},l}function Cp(e){return e=ql(e),e.tag=3,e}function jp(e,t,l,a){var o=l.type.getDerivedStateFromError;if(typeof o=="function"){var c=a.value;e.payload=function(){return o(c)},e.callback=function(){wp(t,l,a)}}var g=l.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){wp(t,l,a),typeof o!="function"&&(Wl===null?Wl=new Set([this]):Wl.add(this));var S=a.stack;this.componentDidCatch(a.value,{componentStack:S!==null?S:""})})}function zS(e,t,l,a,o){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Va(t,l,o,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return qt===null?iu():l.alternate===null&>===0&&(gt=3),l.flags&=-257,l.flags|=65536,l.lanes=o,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Pf(e,a,o)),!1;case 22:return l.flags|=65536,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Pf(e,a,o)),!1}throw Error(r(435,l.tag))}return Pf(e,a,o),iu(),!1}if(Re)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==Oc&&(e=Error(r(422),{cause:a}),Gi(jn(e,l)))):(a!==Oc&&(t=Error(r(423),{cause:a}),Gi(jn(t,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=jn(a,l),o=hf(e.stateNode,a,o),kc(e,o),gt!==4&&(gt=2)),!1;var c=Error(r(520),{cause:a});if(c=jn(c,l),or===null?or=[c]:or.push(c),gt!==4&&(gt=2),t===null)return!0;a=jn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=hf(l.stateNode,a,e),kc(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Wl===null||!Wl.has(c))))return l.flags|=65536,o&=-o,l.lanes|=o,o=Cp(o),jp(o,e,l,a),kc(l,o),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var mf=Error(r(461)),St=!1;function jt(e,t,l,a){t.child=e===null?Mg(t,null,l,a):qa(t,e.child,l,a)}function Ep(e,t,l,a,o){l=l.render;var c=t.ref;if("ref"in a){var g={};for(var S in a)S!=="ref"&&(g[S]=a[S])}else g=a;return $a(t),a=Kc(e,t,l,g,c,o),S=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&S&&yo(t),t.flags|=1,jt(e,t,a,o),t.child)}function Np(e,t,l,a,o){if(e===null){var c=l.type;return typeof c=="function"&&!Mc(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,_p(e,t,c,a,o)):(e=po(l.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!wf(e,o)){var g=c.memoizedProps;if(l=l.compare,l=l!==null?l:Fi,l(g,a)&&e.ref===t.ref)return jl(e,t,o)}return t.flags|=1,e=yl(c,a),e.ref=t.ref,e.return=t,t.child=e}function _p(e,t,l,a,o){if(e!==null){var c=e.memoizedProps;if(Fi(c,a)&&e.ref===t.ref)if(St=!1,t.pendingProps=a=c,wf(e,o))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,jl(e,t,o)}return gf(e,t,l,a,o)}function Mp(e,t,l,a){var o=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~c}else a=0,t.child=null;return Rp(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Co(t,c!==null?c.cachePool:null),c!==null?Ag(t,c):qc(),Og(t);else return a=t.lanes=536870912,Rp(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Co(t,c.cachePool),Ag(t,c),Xl(),t.memoizedState=null):(e!==null&&Co(t,null),qc(),Xl());return jt(e,t,o,l),t.child}function tr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rp(e,t,l,a,o){var c=Vc();return c=c===null?null:{parent:yt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Co(t,null),qc(),Og(t),e!==null&&Va(e,t,a,!0),t.childLanes=o,null}function Fo(e,t){return t=Bo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tp(e,t,l){return qa(t,e.child,null,l),e=Fo(t,t.pendingProps),e.flags|=2,mn(t),t.memoizedState=null,e}function DS(e,t,l){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Re){if(a.mode==="hidden")return e=Fo(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},tr(null,e);if(Yc(t),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return t.lanes=536870912,null}return Fo(t,a)}var c=e.memoizedState;if(c!==null){var g=c.dehydrated;if(Yc(t),o)if(t.flags&256)t.flags&=-257,t=Tp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(St||Va(e,t,l,!1),o=(l&e.childLanes)!==0,St||o){if(Yl.current===null){if(a=tt,a!==null&&(g=pm(a,l),g!==0&&g!==c.retryLane))throw c.retryLane=g,Da(e,g),cn(a,e,g),mf;iu()}t=Tp(e,t,l)}else e=c.treeContext,lt=Rn(g.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=Fo(t,a),t.flags|=134221824;return t}return e=yl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ls(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function gf(e,t,l,a,o){return $a(t),l=Kc(e,t,l,a,void 0,o),a=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,o),t.child)}function Ap(e,t,l,a,o,c){return $a(t),t.updateQueue=null,l=Dg(t,a,l,o),zg(e),a=Zc(),e!==null&&!St?(Pc(e,t,c),jl(e,t,c)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,c),t.child)}function Op(e,t,l,a,o){if($a(t),t.stateNode===null){var c=Ns,g=l.contextType;typeof g=="object"&&g!==null&&(c=zt(g)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=df,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Fc(t),g=l.contextType,c.context=typeof g=="object"&&g!==null?zt(g):Ns,c.state=t.memoizedState,g=l.getDerivedStateFromProps,typeof g=="function"&&(ff(t,l,g,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&df.enqueueReplaceState(c,c.state,null),Zi(t,a,c,o),Ki(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var S=t.memoizedProps,_=Ya(l,S);c.props=_;var B=c.context,Q=l.contextType;g=Ns,typeof Q=="object"&&Q!==null&&(g=zt(Q));var K=l.getDerivedStateFromProps;Q=typeof K=="function"||typeof c.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(S||B!==g)&&yp(t,c,a,g),Gl=!1;var U=t.memoizedState;c.state=U,Zi(t,a,c,o),Ki(),B=t.memoizedState,S||U!==B||Gl?(typeof K=="function"&&(ff(t,l,K,a),B=t.memoizedState),(_=Gl||vp(t,l,_,a,U,B,g))?(Q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=B),c.props=a,c.state=B,c.context=g,a=_):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Bc(e,t),g=t.memoizedProps,Q=Ya(l,g),c.props=Q,K=t.pendingProps,U=c.context,B=l.contextType,_=Ns,typeof B=="object"&&B!==null&&(_=zt(B)),S=l.getDerivedStateFromProps,(B=typeof S=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==K||U!==_)&&yp(t,c,a,_),Gl=!1,U=t.memoizedState,c.state=U,Zi(t,a,c,o),Ki();var q=t.memoizedState;g!==K||U!==q||Gl||e!==null&&e.dependencies!==null&&bo(e.dependencies)?(typeof S=="function"&&(ff(t,l,S,a),q=t.memoizedState),(Q=Gl||vp(t,l,Q,a,U,q,_)||e!==null&&e.dependencies!==null&&bo(e.dependencies))?(B||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,q,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,q,_)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=q),c.props=a,c.state=q,c.context=_,a=Q):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Ls(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=qa(t,e.child,null,o),t.child=qa(t,null,l,o)):jt(e,t,l,o),t.memoizedState=c.state,e=t.child):e=jl(e,t,o),e}function zp(e,t,l,a){return La(),t.flags|=256,jt(e,t,l,a),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vf(e){return{baseLanes:e,cachePool:wg()}}function yf(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=vn),e}function Dp(e,t,l){var a=t.pendingProps,o=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Ht.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(o?Il(t):Xl(),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return vd(e)?t.lanes=32:t.lanes=536870912,null}return c=a.children,a=a.fallback,o?(Xl(),o=t.mode,c=Bo({mode:"hidden",children:c},o),a=Ha(a,o,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=vf(l),a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(null,a)):(Il(t),xf(t,c))}var S=e.memoizedState;if(S!==null){var _=S.dehydrated;if(_!==null)return HS(e,t,c,g,a,_,S,l)}return o?(Xl(),o=a.fallback,c=t.mode,S=e.child,_=S.sibling,a=yl(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&1206910976,_!==null?o=yl(_,o):(o=Ha(o,c,l,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,tr(null,a),a=t.child,o=e.child.memoizedState,o===null?o=vf(l):(c=o.cachePool,c!==null?(S=yt._currentValue,c=c.parent!==S?{parent:S,pool:S}:c):c=wg(),o={baseLanes:o.baseLanes|l,cachePool:c}),a.memoizedState=o,a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(e.child,a)):(Il(t),l=e.child,e=l.sibling,l=yl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=l,t.memoizedState=null,l)}function xf(e,t){return t=Bo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bo(e,t){return e=sn(22,e,null,t),e.lanes=0,e}function ko(e,t,l){return qa(t,e.child,null,l),e=xf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HS(e,t,l,a,o,c,g,S){if(l)return t.flags&256?(Il(t),t.flags&=-257,ko(e,t,S)):t.memoizedState!==null?(Xl(),t.child=e.child,t.flags|=128,null):(Xl(),c=o.fallback,g=t.mode,o=Bo({mode:"visible",children:o.children},g),c=Ha(c,g,S,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,qa(t,e.child,null,S),o=t.child,o.memoizedState=vf(S),o.childLanes=yf(e,a,S),t.memoizedState=pf,tr(null,o));if(Il(t),vd(c)){if(a=c.nextSibling&&c.nextSibling.dataset,a)var _=a.dgst;return a=_,a!==""&&(o=Error(r(419)),o.stack="",o.digest=a,Gi({value:o,source:null,stack:null})),ko(e,t,S)}if(St||Va(e,t,S,!1),a=(S&e.childLanes)!==0,St||a){if(Yl.current!==null)return ko(e,t,S);if(a=tt,a!==null&&(o=pm(a,S),o!==0&&o!==g.retryLane))throw g.retryLane=o,Da(e,o),cn(a,e,o),mf;return pd(c)||iu(),ko(e,t,S)}return pd(c)?(t.flags|=192,t.child=e.child,null):(e=g.treeContext,lt=Rn(c.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=xf(t,o.children),t.flags|=134221824,t)}function Hp(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),So(e.return,t,l)}function Lp(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ro(l)===null&&(t=e),e=e.sibling}return t}function Go(e,t,l,a,o,c){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:o,treeForkCount:c}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=l,g.tailMode=o,g.treeForkCount=c)}function Sf(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function bf(e,t,l){var a=t.pendingProps,o=a.revealOrder,c=a.tail;a=a.children;var g=Ht.current;if(t.flags&128)return Pi(t,g),null;var S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,Pi(t,g),o==="backwards"&&e!==null?(Sf(e),jt(e,t,a,l),Sf(e)):jt(e,t,a,l),a=Re?ki:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hp(e,l,t);else if(e.tag===19)Hp(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"backwards":l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null,Sf(t)),Go(t,!0,o,null,c,a);break;case"unstable_legacy-backwards":for(l=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ro(e)===null){t.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}Go(t,!0,l,null,c,a);break;case"together":Go(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null),Go(t,!1,o,l,c,a)}return t.child}function Up(e,t,l){var a=t.pendingProps;return Bl(t,t.type,a.value),jt(e,t,a.children,l),t.child}function jl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Va(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=yl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=yl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function wf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bo(e)))}function LS(e,t,l){switch(t.tag){case 3:qn(t,t.stateNode.containerInfo),Bl(t,yt,e.memoizedState.cache),La();break;case 27:case 5:fl(t);break;case 4:qn(t,t.stateNode.containerInfo);break;case 10:Bl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Il(t),t.flags|=128,null;a=Va(e,t,l,!1);var o=t.child.childLanes;return a||(l&o)!==0?Dp(e,t,l):(Il(t),e=jl(e,t,l),e!==null?e.sibling:null)}Il(t);break;case 19:if(t.flags&128)return bf(e,t,l);if(o=(e.flags&128)!==0,a=(l&t.childLanes)!==0,a||(Va(e,t,l,!1),a=(l&t.childLanes)!==0),o){if(a)return bf(e,t,l);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Pi(t,Ht.current),a)break;return null;case 22:return t.lanes=0,Mp(e,t,l,t.pendingProps);case 24:Bl(t,yt,e.memoizedState.cache)}return jl(e,t,l)}function Vp(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!wf(e,l)&&(t.flags&128)===0)return St=!1,LS(e,t,l);St=(e.flags&131072)!==0}else St=!1,Re&&(t.flags&1048576)!==0&&gg(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")Mc(e)?(a=Ya(e,a),t.tag=1,t=Op(null,t,e,a,l)):(t.tag=0,t=gf(null,t,e,a,l));else{if(e!=null){var o=e.$$typeof;if(o===P){t.tag=11,t=Ep(null,t,e,a,l);break e}else if(o===Ee){t.tag=14,t=Np(null,t,e,a,l);break e}else if(o===ee){t.tag=10,t.type=e,t=Up(null,t,l);break e}}throw t=ye(e)||e,Error(r(306,t,""))}}return t;case 0:return gf(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,o=Ya(a,t.pendingProps),Op(e,t,a,o,l);case 3:e:{if(qn(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;o=c.element,Bc(e,t),Zi(t,a,null,l);var g=t.memoizedState;if(a=g.cache,Bl(t,yt,a),a!==c.cache&&Hc(t,[yt],l,!0),Ki(),a=g.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=zp(e,t,a,l);break e}else if(a!==o){o=jn(Error(r(424)),t),Gi(o),t=zp(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(lt=Rn(e.firstChild),Mt=t,Re=!0,$l=null,_n=!0,l=Mg(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(La(),a===o){t=jl(e,t,l);break e}jt(e,t,a,l)}t=t.child}return t;case 26:return Ls(e,t),e===null?(l=uv(t.type,null,t.pendingProps,null))?t.memoizedState=l:Re||(t.stateNode=k0(t.type,t.pendingProps,At.current,t)):t.memoizedState=uv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fl(t),e===null&&Re&&(a=t.stateNode=sv(t.type,t.pendingProps,At.current),Mt=t,_n=!0,o=lt,na(t.type)?(yd=o,lt=Rn(a.firstChild)):lt=o),jt(e,t,t.pendingProps.children,l),Ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((o=a=lt)&&(a=Tb(a,t.type,t.pendingProps,_n),a!==null?(t.stateNode=a,Mt=t,lt=Rn(a.firstChild),_n=!1,o=!0):o=!1),o||Fl(t)),fl(t),o=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,a=c.children,ud(o,c)?a=null:g!==null&&ud(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Kc(e,t,ES,null,null,l),ei._currentValue=o),Ls(e,t),jt(e,t,a,l),t.child;case 6:return e===null&&Re&&((e=l=lt)&&(l=Ab(l,t.pendingProps,_n),l!==null?(t.stateNode=l,Mt=t,lt=null,e=!0):e=!1),e||Fl(t)),null;case 13:return Dp(e,t,l);case 4:return qn(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=qa(t,null,a,l):jt(e,t,a,l),t.child;case 11:return Ep(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,Ls(e,t),jt(e,t,a,l),t.child;case 8:return jt(e,t,t.pendingProps.children,l),t.child;case 12:return jt(e,t,t.pendingProps.children,l),t.child;case 10:return Up(e,t,l);case 9:return o=t.type._context,a=t.pendingProps.children,$a(t),o=zt(o),a=a(o),t.flags|=1,jt(e,t,a,l),t.child;case 14:return Np(e,t,t.type,t.pendingProps,l);case 15:return _p(e,t,t.type,t.pendingProps,l);case 19:return bf(e,t,l);case 31:return DS(e,t,l);case 22:return Mp(e,t,l,t.pendingProps);case 24:return $a(t),a=zt(yt),e===null?(o=Vc(),o===null&&(o=tt,c=Lc(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=l),o=c),t.memoizedState={parent:a,cache:o},Fc(t),Bl(t,yt,o)):((e.lanes&l)!==0&&(Bc(e,t),Zi(t,null,null,l),Ki()),o=e.memoizedState,c=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Bl(t,yt,a)):(a=c.cache,Bl(t,yt,a),a!==o.cache&&Hc(t,[yt],l,!0))),jt(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Re&&yo(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Ls(e,t),jt(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function El(e){e.flags|=4}function Cf(e,t,l,a,o){var c;if((c=(e.mode&32)!==0)&&(c=l===null?hv(t,a):hv(t,a)&&(a.src!==l.src||a.srcSet!==l.srcSet)),c){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(x0())e.flags|=8192;else throw Ga=Eo,$c}else e.flags&=-16777217}function $p(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!mv(t))if(x0())e.flags|=8192;else throw Ga=Eo,$c}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hm():536870912,e.lanes|=t,Bs|=t)}function nr(e,t){if(!Re)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags&1206910976,a|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function US(e,t,l){var a=t.pendingProps;switch(Ac(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),bl(yt),ut(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Rs(t)?El(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zc())),at(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(El(t),c!==null?(at(t),$p(t,c)):(at(t),Cf(t,o,null,a,l))):c?c!==e.memoizedState?(El(t),at(t),$p(t,c)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&El(t),at(t),Cf(t,o,e,a,l)),null;case 27:if(It(t),l=At.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}e=pt.current,Rs(t)?vg(t):(e=sv(o,a,l),t.stateNode=e,El(t))}return at(t),t.subtreeFlags&=-33554433,null;case 5:if(It(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}if(c=pt.current,Rs(t))vg(t);else{var g=hr(At.current);switch(c){case 1:c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=g.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?g.createElement("select",{is:a.is}):g.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?g.createElement(o,{is:a.is}):g.createElement(o)}}c[Ot]=t,c[an]=a;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)c.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=c;e:switch(Ut(c,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&El(t)}}return at(t),t.subtreeFlags&=-33554433,Cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=At.current,Rs(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,o=Mt,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||V0(e.nodeValue,l)),e||Fl(t,!0)}else e=hr(e).createTextNode(a),e[Ot]=t,t.stateNode=e}return at(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Rs(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else l=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(mn(t),t):(mn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return at(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Rs(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),o=!1}else o=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(mn(t),t):(mn(t),null)}return mn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),qo(t,t.updateQueue),at(t),null);case 4:return ut(),e===null&&ad(t.stateNode.containerInfo),t.flags|=67108864,at(t),null;case 10:return bl(t.type),at(t),null;case 19:if(Ic(t),a=t.memoizedState,a===null)return at(t),null;if(o=(t.flags&128)!==0,c=a.rendering,c===null)if(o)nr(a,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ro(e),c!==null){for(t.flags|=128,nr(a,!1),e=c.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)dg(l,e),l=l.sibling;return Pi(t,Ht.current&1|2),Re&&xl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&et()>nu&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304)}else{if(!o)if(e=Ro(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),nr(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!c.alternate&&!Re)return at(t),null}else 2*et()-a.renderingStartTime>nu&&l!==536870912&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=et(),e.sibling=null,c=Ht.current,c=o?c&1|2:c&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||Re?Pi(t,c):(l=c,Ge(Dt,t),Ge(Ht,l),qt===null&&(qt=t)),Re&&xl(t,a.treeForkCount),e}return at(t),null;case 22:case 23:return mn(t),Qc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),l=t.updateQueue,l!==null&&qo(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&ot(Ba),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),bl(yt),at(t),null;case 25:return null;case 30:return t.flags|=33554432,at(t),null}throw Error(r(156,t.tag))}function VS(e,t){switch(Ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bl(yt),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return It(t),null;case 31:if(t.memoizedState!==null){if(mn(t),t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ic(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ut(),null;case 10:return bl(t.type),null;case 22:case 23:return mn(t),Qc(),e!==null&&ot(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return bl(yt),null;case 25:return null;default:return null}}function Fp(e,t){switch(Ac(t),t.tag){case 3:bl(yt),ut();break;case 26:case 27:case 5:It(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&mn(t);break;case 13:mn(t);break;case 19:Ic(t);break;case 10:bl(t.type);break;case 22:case 23:mn(t),Qc(),e!==null&&ot(Ba);break;case 24:bl(yt)}}function lr(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var o=a.next;l=o;do{if((l.tag&e)===e){a=void 0;var c=l.create,g=l.inst;a=c(),g.destroy=a}l=l.next}while(l!==o)}}catch(S){Ke(t,t.return,S)}}function Kl(e,t,l){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var c=o.next;a=c;do{if((a.tag&e)===e){var g=a.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var _=l,B=S;try{B()}catch(Q){Ke(o,_,Q)}}}a=a.next}while(a!==c)}}catch(Q){Ke(t,t.return,Q)}}function Bp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Tg(t,l)}catch(a){Ke(e,e.return,a)}}}function kp(e,t,l){l.props=Ya(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ke(e,t,a)}}function Pn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var o=e.stateNode,c=pl(e.memoizedProps,o);(o.ref===null||o.ref.name!==c)&&(o.ref=K0(c)),a=o.ref;break;case 7:if(e.stateNode===null){var g=new xn(e);v(e.child,!1,Mb,g,void 0,void 0),e.stateNode=g}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(S){Ke(e,t,S)}}function Lt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(o){Ke(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){Ke(e,t,o)}else l.current=null}function Qo(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)tv(e.stateNode,t[l])}function Gp(e){for(var t=e.return;t!==null&&(Ef(t)&&tv(e.stateNode,t.stateNode),!jf(t));)t=t.return}function ar(e){for(var t=e.return;t!==null&&(Ef(t)&&Rb(e.stateNode,t.stateNode),!jf(t));)t=t.return}function jf(e){return e.tag===5||e.tag===3||e.tag===27}function Ef(e){return e&&e.tag===7&&e.stateNode!==null}function Nf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(o){Ke(e,e.return,o)}}function _f(e,t,l){try{var a=e.stateNode;cb(a,e.type,l,t),a[an]=t}catch(o){Ke(e,e.return,o)}}function qp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&na(e.type)||e.tag===4}function Mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&na(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rf(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(o),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Xn)),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Rf(e,t,l,a),e=e.sibling;e!==null;)Rf(e,t,l,a),e=e.sibling}function Yo(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?l.insertBefore(o,t):l.appendChild(o),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Yo(e,t,l,a),e=e.sibling;e!==null;)Yo(e,t,l,a),e=e.sibling}function Qp(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ut(t,a,l),t[Ot]=e,t[an]=l}catch(c){Ke(e,e.return,c)}}var Io=!1,gn=null;function Yp(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Io=!0)}var Jn=null;function Ip(){var e=Jn;return Jn=null,e}var rn=0;function Us(e,t,l,a,o){return rn=0,Xp(e.child,t,l,a,o)}function Xp(e,t,l,a,o){for(var c=!1;e!==null;){if(e.tag===5){var g=e.stateNode;if(a!==null){var S=dd(g);a.push(S),S.view&&(c=!0)}else c||dd(g).view&&(c=!0);Io=!0,I0(g,rn===0?t:t+"_"+rn,l),rn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Xp(e.child,t,l,a,o)&&(c=!0));e=e.sibling}return c}function Wn(e,t){for(;e!==null;)e.tag===5?X0(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Wn(e.child,t)),e=e.sibling}function Xo(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xo(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var l=t.name;t=vl(t.default,t.share),t!=="none"&&(Us(e,l,t,null,!1)||Wn(e.child,!1))}e=e.sibling}}function Tf(e,t){if(e.tag===30){var l=e.stateNode,a=e.memoizedProps,o=pl(a,l),c=vl(a.default,l.paired?a.share:a.enter);c!=="none"?Us(e,o,c,null,!1)?(Xo(e),l.paired||t||Qs(e,a.onEnter)):Wn(e.child,!1):Xo(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Tf(e,t),e=e.sibling;else Xo(e)}function Af(e){if(gn!==null&&gn.size!==0){var t=gn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,a=l.name;if(a!=null&&a!=="auto"){var o=t.get(a);if(o!==void 0){var c=vl(l.default,l.share);if(c!=="none"&&(Us(e,a,c,null,!1)?(c=e.stateNode,o.paired=c,c.paired=o,Qs(e,l.onShare)):Wn(e.child,!1)),t.delete(a),t.size===0)break}}}Af(e)}e=e.sibling}}}function Of(e){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode),a=gn!==null?gn.get(l):void 0,o=vl(t.default,a!==void 0?t.share:t.exit);o!=="none"&&(Us(e,l,o,null,!1)?a!==void 0?(o=e.stateNode,a.paired=o,o.paired=a,gn.delete(l),Qs(e,t.onShare)):Qs(e,t.onExit):Wn(e.child,!1)),gn!==null&&Af(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Of(e),e=e.sibling;else gn!==null&&Af(e)}function Kp(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode);t=vl(t.default,t.update),e.flags&=-5,t!=="none"&&Us(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Kp(e);e=e.sibling}}function zf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wn(e.child,!1))}zf(e)}e=e.sibling}}function Ko(e){if(e.tag===30)e.stateNode.paired=null,Wn(e.child,!1),zf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ko(e),e=e.sibling;else zf(e)}function Zp(e){for(e=e.child;e!==null;)e.tag===30?Wn(e.child,!1):(e.subtreeFlags&33554432)!==0&&Zp(e),e=e.sibling}function Df(e,t,l,a,o,c,g){for(var S=!1;t!==null;){if(t.tag===5){var _=t.stateNode;if(c!==null&&rn<c.length){var B=c[rn],Q=dd(_);(B.view||Q.view)&&(S=!0);var K;if(K=(e.flags&4)===0)if(Q.clip)K=!0;else{K=B.rect;var U=Q.rect;K=K.y!==U.y||K.x!==U.x||K.height!==U.height||K.width!==U.width}K&&(e.flags|=4),Q.abs?Q=!B.abs:(B=B.rect,Q=Q.rect,Q=B.height!==Q.height||B.width!==Q.width),Q&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&I0(_,rn===0?l:l+"_"+rn,o),S&&(e.flags&4)!==0||(Jn===null&&(Jn=[]),Jn.push(_,rn===0?a:a+"_"+rn,t.memoizedProps)),rn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&g?e.flags|=t.flags&32:Df(e,t.child,l,a,o,c,g)&&(S=!0));t=t.sibling}return S}function Pp(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,a=e.stateNode,o=pl(l,a),c=vl(l.default,l.update),g;g=e.memoizedState,e.memoizedState=null,a=e;var S=e.child;rn=0,o=Df(a,S,o,o,c,g,!1),(e.flags&4)!==0&&o&&Qs(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Pp(e);e=e.sibling}}var Rt=!1,Ye=!1,el=!1,Hf=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,Tt=null,tl=!1,sr=!1,Zo=!1,Lf=!1;function $S(e,t,l){if(e=e.containerInfo,rd=ti,e=ng(e),bc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var c=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var S=0,_=-1,B=-1,Q=0,K=0,U=e,q=null;t:for(;;){for(var ae;U!==a||c!==0&&U.nodeType!==3||(_=S+c),U!==g||o!==0&&U.nodeType!==3||(B=S+o),U.nodeType===3&&(S+=U.nodeValue.length),(ae=U.firstChild)!==null;)q=U,U=ae;for(;;){if(U===e)break t;if(q===a&&++Q===c&&(_=S),q===g&&++K===o&&(B=S),(ae=U.nextSibling)!==null)break;U=q,q=U.parentNode}U=ae}a=_===-1||B===-1?null:{start:_,end:B}}else a=null}a=a||{start:0,end:0}}else a=null;for(od={focusedElem:e,selectionRange:a},ti=!1,l=(l&335544064)===l,Tt=t,t=l?9270:1024;Tt!==null;){if(e=Tt,l&&(a=e.deletions,a!==null))for(c=0;c<a.length;c++)l&&Of(a[c]);if(e.alternate===null&&(e.flags&2)!==0)l&&Yp(e),Po(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&Of(a),Po(l);continue}else if(a!==null&&a.memoizedState!==null){l&&Yp(e),Po(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Tt=a):(l&&Kp(e),Po(l))}}gn=null}function Po(e){for(;Tt!==null;){var t=Tt,l=e,a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&a!==null){l=void 0,o=a.memoizedProps,a=a.memoizedState;var c=t.stateNode;try{var g=Ya(t.type,o);l=c.getSnapshotBeforeUpdate(g,a),c.__reactInternalSnapshotBeforeUpdate=l}catch(S){Ke(t,t.return,S)}}break;case 3:if((o&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)gd(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":gd(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&a!==null&&(l=pl(a.memoizedProps,a.stateNode),o=t.memoizedProps,o=vl(o.default,o.update),o!=="none"&&Us(a,l,o,a.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(r(163))}if(a=t.sibling,a!==null){a.return=t.return,Tt=a;break}Tt=t.return}}function Wp(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:nl(e,l),a&4&&lr(5,l);break;case 1:if(nl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(g){Ke(l,l.return,g)}else{var o=Ya(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ke(l,l.return,g)}}a&64&&Bp(l),a&512&&Pn(l,l.return);break;case 3:if(nl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Tg(e,t)}catch(g){Ke(l,l.return,g)}}break;case 27:t===null&&a&4&&Qp(l);case 26:case 5:nl(e,l),t===null&&a&4&&Nf(l),a&512&&Pn(l,l.return);break;case 12:nl(e,l);break;case 31:nl(e,l),a&4&&l0(e,l);break;case 13:nl(e,l),a&4&&a0(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=PS.bind(null,l),Ob(e,l))));break;case 22:if(a=l.memoizedState!==null||Rt,!a){var c=t!==null&&t.memoizedState!==null||Ye;t=Rt,o=Ye,Rt=a,(Ye=c)&&!o?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),Un(e,l,a)):nl(e,l),Rt=t,Ye=o}break;case 30:nl(e,l),a&512&&Pn(l,l.return);break;case 7:a&512&&Pn(l,l.return);default:nl(e,l)}}function Uf(e,t){for(e=e.child;e!==null;)e0(e,t),e=e.sibling}function e0(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var a=l.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var o=e.stateNode,c=e.memoizedProps.style,g=c!=null&&c.hasOwnProperty("display")?c.display:null;o.style.display=g==null||typeof g=="boolean"?"":(""+g).trim()}}catch(_){Ke(e,e.return,_)}Vf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Be=!0}catch(_){Ke(e,e.return,_)}break;case 18:try{var S=e.stateNode;t?Y0(S,!0):Y0(e.stateNode,!1)}catch(_){Ke(e,e.return,_)}break;case 22:case 23:e.memoizedState===null&&Uf(e,t);break;default:Uf(e,t)}}function Vf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:e0(l,a);break e;case 22:l.memoizedState===null&&Vf(l,a);break e;default:Vf(l,a)}}e=e.sibling}}function t0(e){var t=e.alternate;t!==null&&(e.alternate=null,t0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&to(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,on=!1;function Hn(e,t,l){for(l=l.child;l!==null;)n0(e,t,l),l=l.sibling}function n0(e,t,l){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Pe,l)}catch{}switch(l.tag){case 26:Ye||Lt(l,t),Hn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ye&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ye||Lt(l,t),ar(l);var a=ct,o=on;na(l.type)&&(ct=l.stateNode,on=!1),Hn(e,t,l),iv(l.stateNode,l.type,l.memoizedProps),ct=a,on=o;break;case 5:Ye||Lt(l,t),ar(l);case 6:if(l.tag===6&&ar(l),a=ct,o=on,ct=null,Hn(e,t,l),ct=a,on=o,ct!==null)if(on)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}else try{ct.removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}break;case 18:ct!==null&&(on?(e=ct,Q0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ni(e)):Q0(ct,l.stateNode));break;case 4:a=ct,o=on,ct=l.stateNode.containerInfo,on=!0,Hn(e,t,l),ct=a,on=o;break;case 0:case 11:case 14:case 15:Kl(2,l,t),Ye||Kl(4,l,t),Hn(e,t,l);break;case 1:Ye||(Lt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&kp(l,t,a)),Hn(e,t,l);break;case 21:Hn(e,t,l);break;case 22:Ye=(a=Ye)||l.memoizedState!==null,Hn(e,t,l),Ye=a;break;case 30:Lt(l,t),Hn(e,t,l);break;case 7:Ye||Lt(l,t),Hn(e,t,l);break;default:Hn(e,t,l)}}function l0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ni(e)}catch(l){Ke(t,t.return,l)}}}function a0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ni(e)}catch(l){Ke(t,t.return,l)}}function FS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jp),t;default:throw Error(r(435,e.tag))}}function Jo(e,t){var l=FS(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var o=JS.bind(null,e,a);a.then(o,o)}})}function Pt(e,t,l){var a=t.deletions;if(a!==null)for(var o=0;o<a.length;o++){var c=a[o],g=e,S=t,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(na(_.type)){ct=_.stateNode,on=!1;break e}break;case 5:ct=_.stateNode,on=!1;break e;case 3:case 4:ct=_.stateNode.containerInfo,on=!0;break e}_=_.return}if(ct===null)throw Error(r(160));n0(g,S,c),ct=null,on=!1,g=c.alternate,g!==null&&(g.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)s0(t,e,l),t=t.sibling}var Ln=null;function s0(e,t,l){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var c=0;c<a.length;c++){var g=a[c];g.ref.impl=g.nextImpl}Pt(t,e,l),Jt(e),o&4&&(Kl(3,e,e.return),lr(3,e),Kl(5,e,e.return));break;case 1:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&64&&Rt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(c=Ln,Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&4)if(o=a!==null?a.memoizedState:null,l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null)if(Rt)e.stateNode=k0(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,o=c.ownerDocument||c;t:switch(t){case"title":a=o.getElementsByTagName("title")[0],(!a||a[Ai]||a[Ot]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=o.createElement(t),o.head.insertBefore(a,o.querySelector("head > title"))),Ut(a,t,l),a[Ot]=e,_t(a),t=a;break e;case"link":if(c=dv("link","href",o).get(t+(l.href||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&a.getAttribute("rel")===(l.rel==null?null:l.rel)&&a.getAttribute("title")===(l.title==null?null:l.title)&&a.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;case"meta":if(c=dv("meta","content",o).get(t+(l.content||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("content")===(l.content==null?null:""+l.content)&&a.getAttribute("name")===(l.name==null?null:l.name)&&a.getAttribute("property")===(l.property==null?null:l.property)&&a.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&a.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;default:throw Error(r(468,t))}a[Ot]=e,_t(a),t=a}e.stateNode=t}else Rt||wd(c,e.type,e.stateNode);else e.stateNode=fv(c,l,e.memoizedProps);else o!==l?(o===null?(t=a.stateNode,t===null||Ye||t.parentNode.removeChild(t)):o.count--,l===null?Rt||wd(c,e.type,e.stateNode):fv(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_f(e,e.memoizedProps,a.memoizedProps);break;case 27:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),a!==null&&o&4&&_f(e,e.memoizedProps,a.memoizedProps);break;case 5:if(c=el,el=!1,Pt(t,e,l),el=c,Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),e.flags&32){t=e.stateNode;try{xs(t,""),Be=!0}catch(Q){Ke(e,e.return,Q)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,_f(e,t,a!==null?a.memoizedProps:t)),o&1024&&(Hf=!0);break;case 6:if(Pt(t,e,l),Jt(e),o&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Be=!0}catch(Q){Ke(e,e.return,Q)}}break;case 3:if(Be=!1,hu=null,c=Ln,Ln=mr(t.containerInfo),Pt(t,e,l),Ln=c,Jt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ni(t.containerInfo)}catch(Q){Ke(e,e.return,Q)}Hf&&(Hf=!1,i0(e)),Be=!1;break;case 4:o=el,el=Rt,a=Nm(),c=Ln,Ln=mr(e.stateNode.containerInfo),Pt(t,e,l),Jt(e),Ln=c,Be&&sr&&(Zo=!0),Be=a,el=o;break;case 12:Pt(t,e,l),Jt(e);break;case 31:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 13:Pt(t,e,l),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(tu=et()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 22:c=e.memoizedState!==null,g=a!==null&&a.memoizedState!==null;var S=Rt,_=Ye,B=el;Rt=S||c,el=B||c,Ye=_||g,Pt(t,e,l),Ye=_,el=B,Rt=S,Jt(e),o&8192&&(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,!c||a===null||g||Rt||Ye||(t=g||Ye,l=Rt,a=Ye,Rt=c||Rt,Ye=t,Zl(e,2),Rt=l,Ye=a),!c&&el||Uf(e,c)),o&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Jo(e,l))));break;case 19:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 30:o&512&&(Ye||a===null||Lt(a,a.return)),o=Nm(),c=sr,g=(l&335544064)===l,S=e.memoizedProps,sr=g&&vl(S.default,S.update)!=="none",Pt(t,e,l),Jt(e),g&&a!==null&&Be&&(e.flags|=4),sr=c,Be=o;break;case 21:break;case 7:o&512&&(Ye||a===null||Lt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Pt(t,e,l),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(qp(a)){l=a;break}a=a.return}a=null;for(var o=e.return;o!==null;){if(Ef(o)){var c=o.stateNode;a===null?a=[c]:a.push(c)}if(jf(o))break;o=o.return}var g=a;if(l==null)throw Error(r(160));switch(l.tag){case 27:var S=l.stateNode,_=Mf(e);Yo(e,_,S,g);break;case 5:var B=l.stateNode;l.flags&32&&(xs(B,""),l.flags&=-33);var Q=Mf(e);Yo(e,Q,B,g);break;case 3:case 4:var K=l.stateNode.containerInfo,U=Mf(e);Rf(e,U,K,g);break;default:throw Error(r(161))}}catch(q){Ke(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;i0(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ti=!0,t.reset(),ti=!1),e=e.sibling}}function Vs(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)r0(t,e),t=t.sibling;else Pp(t)}function r0(e,t){var l=e.alternate;if(l===null)Tf(e,!1);else switch(e.tag){case 3:if(Lf=tl=!1,Ip(),Vs(t,e),!tl&&!Zo){if(e=Jn,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var o=e[a+1];X0(l,e[a+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Lf=!0}Jn=null;break;case 5:Vs(t,e);break;case 4:a=tl,tl=!1,Vs(t,e),tl&&(Zo=!0),tl=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?Tf(e,!1):Vs(t,e));break;case 30:a=tl,o=Ip(),tl=!1,Vs(t,e),tl&&(e.flags|=4);var c=e.memoizedProps,g=e.stateNode;t=pl(c,g),g=pl(l.memoizedProps,g);var S=vl(c.default,c.update);S==="none"?t=!1:(c=l.memoizedState,l.memoizedState=null,l=e.child,rn=0,t=Df(e,l,t,g,S,c,!0),rn!==(c===null?0:c.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Qs(e,e.memoizedProps.onUpdate),Jn=o):o!==null&&(o.push.apply(o,Jn),Jn=o),tl=(e.flags&32)!==0?!0:a;break;default:Vs(t,e)}}function nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wp(e,t.alternate,t),t=t.sibling}function Zl(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:Kl(4,l,l.return),Zl(l,a);break;case 1:Lt(l,l.return);var o=l.stateNode;typeof o.componentWillUnmount=="function"&&kp(l,l.return,o),Zl(l,a);break;case 27:(a&2)!==0&&iv(l.stateNode,l.type,l.memoizedProps);case 5:Lt(l,l.return),l.tag!==5&&l.tag!==27||ar(l),Zl(l,a);break;case 6:ar(l);break;case 26:Lt(l,l.return),o=l.stateNode,l.memoizedState!==null||o===null||Ye||o.parentNode.removeChild(o),Zl(l,a);break;case 22:l.memoizedState===null&&Zl(l,a);break;case 30:Lt(l,l.return),Zl(l,a);break;case 7:Lt(l,l.return);default:Zl(l,a)}e=e.sibling}}function Un(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var a=t.alternate,o=e,c=t,g=c.flags,S=(l&1)!==0;switch(c.tag){case 0:case 11:case 15:Un(o,c,l),lr(4,c);break;case 1:if(Un(o,c,l),a=c,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(Q){Ke(a,a.return,Q)}if(a=c,o=a.updateQueue,o!==null){var _=a.stateNode;try{var B=o.shared.hiddenCallbacks;if(B!==null)for(o.shared.hiddenCallbacks=null,o=0;o<B.length;o++)Rg(B[o],_)}catch(Q){Ke(a,a.return,Q)}}S&&g&64&&Bp(c),Pn(c,c.return);break;case 27:(l&2)!==0&&Qp(c);case 5:c.tag!==5&&c.tag!==27||Gp(c),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 6:Gp(c);break;case 26:_=c.stateNode,c.memoizedState!==null||_===null||Rt||wd(mr(_.ownerDocument),c.type,_),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 12:Un(o,c,l);break;case 31:Un(o,c,l),S&&g&4&&l0(o,c);break;case 13:Un(o,c,l),S&&g&4&&a0(o,c);break;case 22:c.memoizedState===null&&Un(o,c,l),Pn(c,c.return);break;case 30:Un(o,c,l),Pn(c,c.return);break;case 7:Pn(c,c.return);default:Un(o,c,l)}t=t.sibling}}function $f(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&qi(l))}function Ff(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&qi(e))}function Mn(e,t,l,a){var o=(l&335544064)===l;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)o0(e,t,l,a),t=t.sibling;else o&&Zp(t)}function o0(e,t,l,a){var o=(l&335544064)===l;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ko(t);var c=t.flags;switch(t.tag){case 0:case 11:case 15:Mn(e,t,l,a),c&2048&&lr(9,t);break;case 1:Mn(e,t,l,a);break;case 3:Mn(e,t,l,a),o&&Lf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),c&2048&&(c=null,t.alternate!==null&&(c=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==c&&(t.refCount++,c!=null&&qi(c)));break;case 12:if(c&2048){Mn(e,t,l,a),c=t.stateNode;try{var g=t.memoizedProps,S=g.id,_=g.onPostCommit;typeof _=="function"&&_(S,t.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(B){Ke(t,t.return,B)}}else Mn(e,t,l,a);break;case 31:Mn(e,t,l,a);break;case 13:Mn(e,t,l,a);break;case 23:break;case 22:g=t.stateNode,S=t.alternate,t.memoizedState!==null?(o&&S!==null&&S.memoizedState===null&&Ko(S),g._visibility&2?Mn(e,t,l,a):ir(e,t)):(o&&S!==null&&S.memoizedState!==null&&Ko(t),g._visibility&2?Mn(e,t,l,a):(g._visibility|=2,$s(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),c&2048&&$f(S,t);break;case 24:Mn(e,t,l,a),c&2048&&Ff(t.alternate,t);break;case 30:o&&(c=t.alternate,c!==null&&(Wn(c.child,!0),Wn(t.child,!0))),Mn(e,t,l,a);break;default:Mn(e,t,l,a)}}function $s(e,t,l,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,g=t,S=l,_=a,B=g.flags;switch(g.tag){case 0:case 11:case 15:$s(c,g,S,_,o),lr(8,g);break;case 23:break;case 22:var Q=g.stateNode;g.memoizedState!==null?Q._visibility&2?$s(c,g,S,_,o):ir(c,g):(Q._visibility|=2,$s(c,g,S,_,o)),o&&B&2048&&$f(g.alternate,g);break;case 24:$s(c,g,S,_,o),o&&B&2048&&Ff(g.alternate,g);break;default:$s(c,g,S,_,o)}t=t.sibling}}function ir(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,o=a.flags;switch(a.tag){case 22:ir(l,a),o&2048&&$f(a.alternate,a);break;case 24:ir(l,a),o&2048&&Ff(a.alternate,a);break;default:ir(l,a)}t=t.sibling}}var Ia=8192;function Xa(e,t,l){if(e.subtreeFlags&Ia)for(e=e.child;e!==null;)u0(e,t,l),e=e.sibling}function u0(e,t,l){switch(e.tag){case 26:Xa(e,t,l),e.flags&Ia&&(e.memoizedState!==null?Yb(l,Ln,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&pv(l,e)));break;case 5:Xa(e,t,l),e.flags&Ia&&(e=e.stateNode,(t&335544128)===t&&pv(l,e));break;case 3:case 4:var a=Ln;Ln=mr(e.stateNode.containerInfo),Xa(e,t,l),Ln=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ia,Ia=16777216,Xa(e,t,l),Ia=a):Xa(e,t,l));break;case 30:if((e.flags&Ia)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var o=e.stateNode;o.paired=null,gn===null&&(gn=new Map),gn.set(a,o)}Xa(e,t,l);break;default:Xa(e,t,l)}}function c0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)f0(e),e=e.sibling}function f0(e){switch(e.tag){case 0:case 11:case 15:rr(e),e.flags&2048&&Kl(9,e,e.return);break;case 3:rr(e);break;case 12:rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wo(e)):rr(e);break;default:rr(e)}}function Wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kl(8,t,t.return),Wo(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Wo(t));break;default:Wo(t)}e=e.sibling}}function d0(e,t){for(;Tt!==null;){var l=Tt;switch(l.tag){case 0:case 11:case 15:Kl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:qi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Tt=a;else e:for(l=e;Tt!==null;){a=Tt;var o=a.sibling,c=a.return;if(t0(a),a===l){Tt=null;break e}if(o!==null){o.return=c,Tt=o;break e}Tt=c}}}var BS={getCacheForType:function(e){var t=zt(yt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return zt(yt).controller.signal}},kS=typeof WeakMap=="function"?WeakMap:Map,qe=0,tt=null,Te=null,Oe=0,Xe=0,pn=null,Pl=!1,Fs=!1,Bf=!1,Nl=0,gt=0,Jl=0,Ka=0,eu=0,vn=0,Bs=0,or=null,un=null,kf=!1,tu=0,h0=0,nu=1/0,lu=null,Wl=null,dt=0,Vn=null,Za=null,ll=0,Gf=0,qf=null,m0=null,ks=null,Gs=null,qs=null,ur=0,au=null;function yn(){return(qe&2)!==0&&Oe!==0?Oe&-Oe:re.T!==null?ed():vm()}function g0(){if(vn===0)if((Oe&536870912)===0||Re){var e=_a;_a<<=1,(_a&3932160)===0&&(_a=262144),vn=e}else vn=536870912;return e=Dt.current,e!==null&&(e.flags|=32),vn}function Qs(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=K0(pl(e.memoizedProps,l))),Gs===null&&(Gs=[]),Gs.push(t.bind(null,a))}}function cn(e,t,l){(e===tt&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),ea(e,Oe,vn,!1)),Ti(e,l),((qe&2)===0||e!==tt)&&(e===tt&&((qe&2)===0&&(Ka|=l),gt===4&&ea(e,Oe,vn,!1)),al(e))}function p0(e,t,l){if((qe&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Hl(e,t),o=a?QS(e,t):Yf(e,t,!0),c=a;do{if(o===0){Fs&&!a&&ea(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!GS(l)){o=Yf(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=or;var _=S.current.memoizedState.isDehydrated;if(_&&(Ys(S,g).flags|=256),g=Yf(S,g,!1),g!==2&&g!==6){if(Bf&&!_){S.errorRecoveryDisabledLanes|=c,Ka|=c,o=4;break e}c=un,un=o,c!==null&&(un===null?un=c:un.push.apply(un,c))}o=g}if(c=!1,o!==2)continue}}if(o===1){Ys(e,0),ea(e,t,0,!0);break}e:{switch(a=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ea(a,t,vn,!Pl);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=tu+300-et(),10<o)){if(ea(a,t,vn,!Pl),Ra(a,0,!0)!==0)break e;ll=t,a.timeoutHandle=fd(v0.bind(null,a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,"Throttled",-0,0),o);break e}v0(a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,null,-0,0)}}break}while(!0);al(e)}function v0(e,t,l,a,o,c,g,S,_,B,Q,K,U,q){e.timeoutHandle=-1;var ae=t.subtreeFlags,de=(c&335544064)===c;if(K=null,(de||ae&8192||(ae&16785408)===16785408)&&(K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},gn=null,u0(t,c,K),de&&(ae=K,de=e.containerInfo,de=(de.nodeType===9?de:de.ownerDocument).__reactViewTransition,de!=null&&(ae.count++,ae.waitingForViewTransition=!0,ae=vr.bind(ae),de.finished.then(ae,ae))),ae=(c&62914560)===c?tu-et():(c&4194048)===c?h0-et():0,ae=Ib(K,ae),ae!==null)){ll=c,e.cancelPendingCommit=ae(E0.bind(null,e,t,c,l,a,o,g,S,_,B,Q,K,null,U,q)),ea(e,c,g,!B);return}E0(e,t,c,l,a,o,g,S,_,B,Q,K)}function GS(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var o=l[a],c=o.getSnapshot;o=o.value;try{if(!hn(c(),o))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ea(e,t,l,a){t=dm(e,t),t&=~eu,t&=~Ka,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var c=31-Xt(o),g=1<<c;a[c]=-1,o&=~g}l!==0&&mm(e,l,t)}function su(){return(qe&6)===0?(cr(0),!1):!0}function Qf(){if(Te!==null){if(Xe===0)var e=Te.return;else e=Te,Sl=Ua=null,Jc(e),Os=null,Ii=0,e=Te;for(;e!==null;)Fp(e.alternate,e),e=e.return;Te=null}}function Ys(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,hb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ll=0,Qf(),tt=e,Te=l=yl(e.current,null),Oe=t,Xe=0,pn=null,Pl=!1,Fs=Hl(e,t),Bf=!1,Bs=vn=eu=Ka=Jl=gt=0,un=or=null,kf=!1,Nl=dm(e,t),ho(),l}function y0(e,t){Ne=null,re.H=Vo,t===As||t===jo?(t=Eg(),Xe=3):t===$c?(t=Eg(),Xe=4):Xe=t===mf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pn=t,Te===null&&(gt=1,$o(e,jn(t,e.current)))}function x0(){var e=Dt.current;return e===null?!0:(Oe&4194048)===Oe?qt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===qt:!1}function S0(){var e=re.H;return re.H=Vo,e===null?Vo:e}function b0(){var e=re.A;return re.A=BS,e}function iu(){gt=4,Pl||(Oe&4194048)!==Oe&&Dt.current!==null||(Fs=!0),(Jl&134217727)===0&&(Ka&134217727)===0||tt===null||ea(tt,Oe,vn,!1)}function Yf(e,t,l){var a=qe;qe|=2;var o=S0(),c=b0();(tt!==e||Oe!==t)&&(lu=null,Ys(e,t)),t=!1;var g=gt;e:do try{if(Xe!==0&&Te!==null){var S=Te,_=pn;switch(Xe){case 8:Qf(),g=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var B=Xe;if(Xe=0,pn=null,Is(e,S,_,B),l&&Fs){g=0;break e}break;default:B=Xe,Xe=0,pn=null,Is(e,S,_,B)}}qS(),g=gt;break}catch(Q){y0(e,Q)}while(!0);return t&&e.shellSuspendCounter++,Sl=Ua=null,qe=a,re.H=o,re.A=c,Te===null&&(tt=null,Oe=0,ho()),g}function qS(){for(;Te!==null;)w0(Te)}function QS(e,t){var l=qe;qe|=2;var a=S0(),o=b0();tt!==e||Oe!==t?(lu=null,nu=et()+500,Ys(e,t)):Fs=Hl(e,t);e:do try{if(Xe!==0&&Te!==null){t=Te;var c=pn;t:switch(Xe){case 1:Xe=0,pn=null,Is(e,t,c,1);break;case 2:case 9:if(Cg(c)){Xe=0,pn=null,C0(t);break}t=function(){Xe!==2&&Xe!==9||tt!==e||(Xe=7),al(e)},c.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Cg(c)?(Xe=0,pn=null,C0(t)):(Xe=0,pn=null,Is(e,t,c,7));break;case 5:var g=null;switch(Te.tag){case 26:g=Te.memoizedState;case 5:case 27:var S=Te;if(g?mv(g):S.stateNode.complete){Xe=0,pn=null;var _=S.sibling;if(_!==null)Te=_;else{var B=S.return;B!==null?(Te=B,ru(B)):Te=null}break t}}Xe=0,pn=null,Is(e,t,c,5);break;case 6:Xe=0,pn=null,Is(e,t,c,6);break;case 8:Qf(),gt=6;break e;default:throw Error(r(462))}}YS();break}catch(Q){y0(e,Q)}while(!0);return Sl=Ua=null,re.H=a,re.A=o,qe=l,Te!==null?0:(tt=null,Oe=0,ho(),gt)}function YS(){for(;Te!==null&&!Ct();)w0(Te)}function w0(e){var t=Vp(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function C0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ap(l,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Ap(l,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:Jc(t);var a=t;a===Mt&&(Re?(xo(a),a.tag===5&&a.stateNode!=null&&(lt=a.stateNode)):(xo(a),Re=!0));default:Fp(l,t),t=Te=dg(t,Nl),t=Vp(l,t,Nl)}e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function Is(e,t,l,a){Sl=Ua=null,Jc(t),Os=null,Ii=0;var o=t.return;try{if(zS(e,o,t,l,Oe)){gt=1,$o(e,jn(l,e.current)),Te=null;return}}catch(c){if(o!==null)throw Te=o,c;gt=1,$o(e,jn(l,e.current)),Te=null;return}t.flags&32768?(Re||a===1?e=!0:Fs||(Oe&536870912)!==0?e=!1:(Pl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),j0(t,e)):ru(t)}function ru(e){var t=e;do{if((t.flags&32768)!==0){j0(t,Pl);return}e=t.return;var l=US(t.alternate,t,Nl);if(l!==null){Te=l;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);gt===0&&(gt=5)}function j0(e,t){do{var l=VS(e.alternate,e);if(l!==null){l.flags&=32767,Te=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=l}while(e!==null);gt=6,Te=null}function E0(e,t,l,a,o,c,g,S,_,B,Q,K){e.cancelPendingCommit=null;do ou();while(dt!==0);if((qe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===tt&&(Te=tt=null,Oe=0),Za=t,Vn=e,ll=l,qf=o,m0=a,IS(e,t,l,g,S,_,K)}}function IS(e,t,l,a,o,c,g){var S=t.lanes|t.childLanes;if(Gf=S,S|=Nc,xx(e,l,S,a,o,c),Gs=null,(l&335544064)===l?(qs=bS(e),a=10262):(qs=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,WS(Ea,function(){return Zf(),null})):(e.callbackNode=null,e.callbackPriority=0),Io=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null,o=me.p,me.p=2,c=qe,qe|=4;try{$S(e,t,l)}finally{qe=c,me.p=o,re.T=a}}dt=1,Io?ks=xb(g,e.containerInfo,qs,If,Xf,KS,Kf,Zf,XS):(If(),Xf(),Kf())}function XS(e){if(dt!==0){var t=Vn.onRecoverableError;t(e,{componentStack:null})}}function KS(){dt===3&&(dt=0,r0(Za,Vn),dt=4)}function If(){if(dt===1){dt=0;var e=Vn,t=Za,l=ll,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null;var o=me.p;me.p=2;var c=qe;qe|=4;try{sr=Zo=!1,s0(t,e,l),l=od;var g=ng(e.containerInfo),S=l.focusedElem,_=l.selectionRange;if(g!==S&&S&&S.ownerDocument&&tg(S.ownerDocument.documentElement,S)){if(_!==null&&bc(S)){var B=_.start,Q=_.end;if(Q===void 0&&(Q=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Q,S.value.length);else{var K=S.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var q=U.getSelection(),ae=S.textContent.length,de=Math.min(_.start,ae),_e=_.end===void 0?de:Math.min(_.end,ae);!q.extend&&de>_e&&(g=_e,_e=de,de=g);var $=eg(S,de),O=eg(S,_e);if($&&O&&(q.rangeCount!==1||q.anchorNode!==$.node||q.anchorOffset!==$.offset||q.focusNode!==O.node||q.focusOffset!==O.offset)){var G=K.createRange();G.setStart($.node,$.offset),q.removeAllRanges(),de>_e?(q.addRange(G),q.extend(O.node,O.offset)):(G.setEnd(O.node,O.offset),q.addRange(G))}}}}for(K=[],q=S;q=q.parentNode;)q.nodeType===1&&K.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var I=K[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}ti=!!rd,od=rd=null}finally{qe=c,me.p=o,re.T=a}}e.current=t,dt=2}}function Xf(){if(dt===2){dt=0;var e=Vn,t=Za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=re.T,re.T=null;var a=me.p;me.p=2;var o=qe;qe|=4;try{Wp(e,t.alternate,t)}finally{qe=o,me.p=a,re.T=l}}dt=3}}function Kf(){if(dt===4||dt===3){dt=0;var e=ks;ks=null,st();var t=Vn,l=Za,a=ll,o=m0,c=(a&335544064)===a?10262:10256;if((l.subtreeFlags&c)!==0||(l.flags&c)!==0?dt=5:(dt=0,Za=Vn=null,N0(t,t.pendingLanes)),c=t.pendingLanes,c===0&&(Wl=null),lc(a),l=l.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Pe,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=re.T,c=me.p,me.p=2,re.T=null;try{for(var g=t.onRecoverableError,S=0;S<o.length;S++){var _=o[S];g(_.value,{componentStack:_.stack})}}finally{re.T=l,me.p=c}}if(o=Gs,g=qs,qs=null,o!==null&&(Gs=null,g===null&&(g=[]),e!==null))for(_=0;_<o.length;_++)l=(0,o[_])(g),l!==void 0&&e.finished.finally(l);(ll&3)!==0&&ou(),al(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===au?ur++:(ur=0,au=t):(ur=0,au=null),cr(0)}}function N0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,qi(t)))}function ou(){return ks!==null&&(ks.skipTransition(),ks=null),If(),Xf(),Kf(),Zf()}function Zf(){if(dt!==5)return!1;var e=Vn,t=Gf;Gf=0;var l=lc(ll),a=re.T,o=me.p;try{me.p=32>l?32:l,re.T=null,l=qf,qf=null;var c=Vn,g=ll;if(dt=0,Za=Vn=null,ll=0,(qe&6)!==0)throw Error(r(331));var S=qe;if(qe|=4,f0(c.current),o0(c,c.current,g,l),qe=S,cr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Pe,c)}catch{}return!0}finally{me.p=o,re.T=a,N0(e,t)}}function _0(e,t,l){t=jn(l,t),t=hf(e.stateNode,t,2),e=Ql(e,t,2),e!==null&&(Ti(e,2),al(e))}function Ke(e,t,l){if(e.tag===3)_0(e,e,l);else for(;t!==null;){if(t.tag===3){_0(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Wl===null||!Wl.has(a))){e=jn(l,e),l=Cp(2),a=Ql(t,l,2),a!==null&&(jp(l,a,t,e),Ti(a,2),al(a));break}}t=t.return}}function Pf(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new kS;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(l)||(Bf=!0,o.add(l),e=ZS.bind(null,e,t,l),t.then(e,e))}function ZS(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Oe&l)===l&&((gt===4||gt===3&&(Oe&62914560)===Oe&&300>et()-tu)&&(qe&2)===0?Ys(e,0):eu|=l,Bs===Oe&&(Bs=0)),al(e)}function M0(e,t){t===0&&(t=hm()),e=Da(e,t),e!==null&&(Ti(e,t),al(e))}function PS(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),M0(e,l)}function JS(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),M0(e,l)}function WS(e,t){return Ve(e,t)}var Xs=null,Ks=null,Jf=!1,uu=!1,Wf=!1,ta=0;function al(e){e!==Ks&&e.next===null&&(Ks===null?Xs=Ks=e:Ks=Ks.next=e),uu=!0,Jf||(Jf=!0,tb())}function cr(e,t){if(!Wf&&uu){Wf=!0;do for(var l=!1,a=Xs;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var c=0;else{var g=a.suspendedLanes,S=a.pingedLanes;c=(1<<31-Xt(42|e)+1)-1,c&=o&~(g&~S),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,O0(a,c))}else c=Oe,c=Ra(a,a===tt?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Hl(a,c)||(l=!0,O0(a,c));a=a.next}while(l);Wf=!1}}function eb(){R0()}function R0(){uu=Jf=!1;var e=0;ta!==0&&db()&&(e=ta);for(var t=et(),l=null,a=Xs;a!==null;){var o=a.next,c=T0(a,t);c===0?(a.next=null,l===null?Xs=o:l.next=o,o===null&&(Ks=l)):(l=a,(e!==0||(c&3)!==0)&&(uu=!0)),a=o}dt!==0&&dt!==5||cr(e),ta!==0&&(ta=0)}function T0(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-Xt(c),S=1<<g,_=o[g];_===-1?((S&l)===0||(S&a)!==0)&&(o[g]=yx(S,t)):_<=t&&(e.expiredLanes|=S),c&=~S}if(t=tt,l=Oe,l=Ra(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Fe(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Hl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Fe(a),lc(l)){case 2:case 8:l=ja;break;case 32:l=Ea;break;case 268435456:l=Mi;break;default:l=Ea}return a=A0.bind(null,e),l=Ve(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Fe(a),e.callbackPriority=2,e.callbackNode=null,2}function A0(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ou()&&e.callbackNode!==l)return null;var a=Oe;return a=Ra(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(p0(e,a,t),T0(e,et()),e.callbackNode!=null&&e.callbackNode===l?A0.bind(null,e):null)}function O0(e,t){if(ou())return null;p0(e,t,!0)}function tb(){mb(function(){(qe&6)!==0?Ve(Dl,eb):R0()})}function ed(){if(ta===0){var e=Fa;e===0&&(e=Na,Na<<=1,(Na&261888)===0&&(Na=256)),ta=e}return ta}function z0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ao(e)}function nb(e,t,l,a,o){if(t==="submit"&&l&&l.stateNode===o){var c=z0((o[an]||null).action),g=a.submitter;g&&(t=(t=g[an]||null)?z0(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var S=new oo("action","action",null,a,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ta!==0){var _=new FormData(o,g);of(l,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(S.preventDefault(),_=new FormData(o,g),of(l,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var td=0;td<Ec.length;td++){var nd=Ec[td],lb=nd.toLowerCase(),ab=nd[0].toUpperCase()+nd.slice(1);Dn(lb,"on"+ab)}Dn(sg,"onAnimationEnd"),Dn(ig,"onAnimationIteration"),Dn(rg,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(hS,"onTransitionRun"),Dn(mS,"onTransitionStart"),Dn(gS,"onTransitionCancel"),Dn(og,"onTransitionEnd"),vs("onMouseEnter",["mouseout","mouseover"]),vs("onMouseLeave",["mouseout","mouseover"]),vs("onPointerEnter",["pointerout","pointerover"]),vs("onPointerLeave",["pointerout","pointerover"]),Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),sb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function D0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],o=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var g=a.length-1;0<=g;g--){var S=a[g],_=S.instance,B=S.currentTarget;if(S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}else for(g=0;g<a.length;g++){if(S=a[g],_=S.instance,B=S.currentTarget,S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}}}}function Ae(e,t){var l=t[xm];l===void 0&&(l=t[xm]=new Set);var a=e+"__bubble";l.has(a)||(H0(t,e,2,!1),l.add(a))}function ld(e,t,l){var a=0;t&&(a|=4),H0(l,e,a,t)}var cu="_reactListening"+Math.random().toString(36).slice(2);function ad(e){if(!e[cu]){e[cu]=!0,wm.forEach(function(l){l!=="selectionchange"&&(sb.has(l)||ld(l,!1,e),ld(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cu]||(t[cu]=!0,ld("selectionchange",!1,t))}}function H0(e,t,l,a){switch(jv(t)){case 2:var o=Pb;break;case 8:o=Jb;break;default:o=jd}l=o.bind(null,t,l,e),o=void 0,!fc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,l,{capture:!0,passive:o}):e.addEventListener(t,l,!0):o!==void 0?e.addEventListener(t,l,{passive:o}):e.addEventListener(t,l,!1)}function sd(e,t,l,a,o){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var g=a.tag;if(g===3||g===4){var S=a.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=a.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=Ta(S),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){a=c=g;continue e}S=S.parentNode}}a=a.return}Hm(function(){var B=c,Q=uc(l),K=[];e:{var U=ug.get(e);if(U!==void 0){var q=oo,ae=e;switch(e){case"keypress":if(io(l)===0)break e;case"keydown":case"keyup":q=Gx;break;case"focusin":ae="focus",q=gc;break;case"focusout":ae="blur",q=gc;break;case"beforeblur":case"afterblur":q=gc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Ax;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Xx;break;case sg:case ig:case rg:q=Dx;break;case og:q=Zx;break;case"scroll":case"scrollend":q=Rx;break;case"wheel":q=Jx;break;case"copy":case"cut":case"paste":q=Lx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Fm;break;case"submit":q=Yx;break;case"toggle":case"beforetoggle":q=eS}var de=(t&4)!==0,_e=!de&&(e==="scroll"||e==="scrollend"),$=de?U!==null?U+"Capture":null:U;de=[];for(var O=B,G;O!==null;){var I=O;if(G=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||G===null||$===null||(I=zi(O,$),I!=null&&de.push(dr(O,I,G))),_e)break;O=O.return}0<de.length&&(U=new q(U,ae,null,l,Q),K.push({event:U,listeners:de}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",q&&l!==oc&&(ae=l.relatedTarget||l.fromElement)&&(Ta(ae)||ae[ms]))break e;(U||q)&&(ae=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,U?(q=l.relatedTarget||l.toElement,U=B,q=q?Ta(q):null,q!==null&&(_e=d(q),de=q.tag,q!==_e||de!==5&&de!==27&&de!==6)&&(q=null)):(U=null,q=B),U!==q&&(de=Vm,I="onMouseLeave",$="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(de=Fm,I="onPointerLeave",$="onPointerEnter",O="pointer"),_e=U==null?ae:Oi(U),G=q==null?ae:Oi(q),ae=new de(I,O+"leave",U,l,Q),ae.target=_e,ae.relatedTarget=G,I=null,Ta(Q)===B&&(de=new de($,O+"enter",q,l,Q),de.target=G,de.relatedTarget=_e,I=de),_e=I,de=U&&q?D(U,q,ib):null,U!==null&&L0(K,ae,U,de,!1),q!==null&&_e!==null&&L0(K,_e,q,de,!0)))}e:{if(U=B?Oi(B):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var ce=Xm;else if(Ym(U))if(Km)ce=cS;else{ce=oS;var ze=rS}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&rc(B.elementType)&&(ce=Xm):ce=uS;if(ce&&(ce=ce(e,B))){Im(K,ce,l,Q);break e}ze&&ze(e,U,B)}switch(ze=B?Oi(B):window,e){case"focusin":(Ym(ze)||ze.contentEditable==="true")&&(Cs=ze,wc=B,Bi=null);break;case"focusout":Bi=wc=Cs=null;break;case"mousedown":Cc=!0;break;case"contextmenu":case"mouseup":case"dragend":Cc=!1,lg(K,l,Q);break;case"selectionchange":if(dS)break;case"keydown":case"keyup":lg(K,l,Q)}var ge;if(vc)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else ws?qm(e,l)&&(ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(Bm&&l.locale!=="ko"&&(ws||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&ws&&(ge=Lm()):(Ll=Q,dc="value"in Ll?Ll.value:Ll.textContent,ws=!0)),ze=fu(B,ve),0<ze.length&&(ve=new $m(ve,e,null,l,Q),K.push({event:ve,listeners:ze}),ge?ve.data=ge:(ge=Qm(l),ge!==null&&(ve.data=ge)))),(ge=nS?lS(e,l):aS(e,l))&&(ve=fu(B,"onBeforeInput"),0<ve.length&&(ze=new $m("onBeforeInput","beforeinput",null,l,Q),K.push({event:ze,listeners:ve}),ze.data=ge)),nb(K,e,B,l,Q)}D0(K,t)})}function dr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function fu(e,t){for(var l=t+"Capture",a=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=zi(e,l),o!=null&&a.unshift(dr(e,o,c)),o=zi(e,t),o!=null&&a.push(dr(e,o,c))),e.tag===3)return a;e=e.return}return[]}function ib(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function L0(e,t,l,a,o){for(var c=t._reactName,g=[];l!==null&&l!==a;){var S=l,_=S.alternate,B=S.stateNode;if(S=S.tag,_!==null&&_===a)break;S!==5&&S!==26&&S!==27||B===null||(_=B,o?(B=zi(l,c),B!=null&&g.unshift(dr(l,B,_))):o||(B=zi(l,c),B!=null&&g.push(dr(l,B,_)))),l=l.return}g.length!==0&&e.push({event:t,listeners:g})}var rb=/\r\n?/g,ob=/\u0000|\uFFFD/g;function U0(e){return(typeof e=="string"?e:""+e).replace(rb,`
|
|
49
|
-
`).replace(ob,"")}function V0(e,t){return t=U0(t),U0(e)===t}function Ze(e,t,l,a,o,c){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||xs(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&xs(e,""+a);else return;break;case"className":lo(e,"class",a);break;case"tabIndex":lo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":lo(e,l,a);break;case"style":zm(e,a,c);return;case"data":if(t!=="object"){lo(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(l==="formAction"?(t!=="input"&&Ze(e,t,"name",o.name,o,null),Ze(e,t,"formEncType",o.formEncType,o,null),Ze(e,t,"formMethod",o.formMethod,o,null),Ze(e,t,"formTarget",o.formTarget,o,null)):(Ze(e,t,"encType",o.encType,o,null),Ze(e,t,"method",o.method,o,null),Ze(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Xn);return;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=ao(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),no(e,"popover",a);break;case"xlinkActuate":ml(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ml(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ml(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ml(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ml(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ml(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ml(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ml(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ml(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":no(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=_x.get(l)||l,no(e,l,a);else return}Be=!0}function id(e,t,l,a,o,c){switch(l){case"style":zm(e,a,c);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof a=="string")xs(e,a);else if(typeof a=="number"||typeof a=="bigint")xs(e,""+a);else return;break;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"onClick":a!=null&&(e.onclick=Xn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Cm.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(o=l.endsWith("Capture"),c=l.slice(2,o?l.length-7:void 0),t=e[an]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(c,t,o),typeof a=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(c,a,o);break e}Be=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):no(e,l,a)}return}Be=!0}function Ut(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var a=!1,o=!1,c;for(c in l)if(l.hasOwnProperty(c)){var g=l[c];if(g!=null)switch(c){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,c,g,l,null)}}o&&Ze(e,t,"srcSet",l.srcSet,l,null),a&&Ze(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var S=c=g=o=null,_=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var Q=l[a];if(Q!=null)switch(a){case"name":o=Q;break;case"type":g=Q;break;case"checked":_=Q;break;case"defaultChecked":B=Q;break;case"value":c=Q;break;case"defaultValue":S=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,t));break;default:Ze(e,t,a,Q,l,null)}}Rm(e,c,S,_,B,g,o,!1);return;case"select":Ae("invalid",e),a=g=c=null;for(o in l)if(l.hasOwnProperty(o)&&(S=l[o],S!=null))switch(o){case"value":c=S;break;case"defaultValue":g=S;break;case"multiple":a=S;default:Ze(e,t,o,S,l,null)}t=c,l=g,e.multiple=!!a,t!=null?ys(e,!!a,t,!1):l!=null&&ys(e,!!a,l,!0);return;case"textarea":Ae("invalid",e),c=o=a=null;for(g in l)if(l.hasOwnProperty(g)&&(S=l[g],S!=null))switch(g){case"value":a=S;break;case"defaultValue":o=S;break;case"children":c=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Ze(e,t,g,S,l,null)}Am(e,a,o,c);return;case"option":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ze(e,t,_,a,l,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(a=0;a<fr.length;a++)Ae(fr[a],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in l)if(l.hasOwnProperty(B)&&(a=l[B],a!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,B,a,l,null)}return;default:if(rc(t)){for(Q in l)l.hasOwnProperty(Q)&&(a=l[Q],a!==void 0&&id(e,t,Q,a,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(a=l[S],a!=null&&Ze(e,t,S,a,l,null))}var ub={};function cb(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,g=null,S=null,_=null,B=null,Q=null;for(q in l){var K=l[q];if(l.hasOwnProperty(q)&&K!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":_=K;default:a.hasOwnProperty(q)||Ze(e,t,q,null,a,K)}}for(var U in a){var q=a[U];if(K=l[U],a.hasOwnProperty(U)&&(q!=null||K!=null))switch(U){case"type":q!==K&&(Be=!0),c=q;break;case"name":q!==K&&(Be=!0),o=q;break;case"checked":q!==K&&(Be=!0),B=q;break;case"defaultChecked":q!==K&&(Be=!0),Q=q;break;case"value":q!==K&&(Be=!0),g=q;break;case"defaultValue":q!==K&&(Be=!0),S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:q!==K&&Ze(e,t,U,q,a,K)}}sc(e,g,S,_,B,Q,c,o);return;case"select":q=g=S=U=null;for(c in l)if(_=l[c],l.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":q=_;default:a.hasOwnProperty(c)||Ze(e,t,c,null,a,_)}for(o in a)if(c=a[o],_=l[o],a.hasOwnProperty(o)&&(c!=null||_!=null))switch(o){case"value":c!==_&&(Be=!0),U=c;break;case"defaultValue":c!==_&&(Be=!0),S=c;break;case"multiple":c!==_&&(Be=!0),g=c;default:c!==_&&Ze(e,t,o,c,a,_)}t=S,l=g,a=q,U!=null?ys(e,!!l,U,!1):!!a!=!!l&&(t!=null?ys(e,!!l,t,!0):ys(e,!!l,l?[]:"",!1));return;case"textarea":q=U=null;for(S in l)if(o=l[S],l.hasOwnProperty(S)&&o!=null&&!a.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ze(e,t,S,null,a,o)}for(g in a)if(o=a[g],c=l[g],a.hasOwnProperty(g)&&(o!=null||c!=null))switch(g){case"value":o!==c&&(Be=!0),U=o;break;case"defaultValue":o!==c&&(Be=!0),q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Ze(e,t,g,o,a,c)}Tm(e,U,q);return;case"option":for(var ae in l)if(U=l[ae],l.hasOwnProperty(ae)&&U!=null&&!a.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Ze(e,t,ae,null,a,U)}for(_ in a)if(U=a[_],q=l[_],a.hasOwnProperty(_)&&U!==q&&(U!=null||q!=null))switch(_){case"selected":U!==q&&(Be=!0),e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ze(e,t,_,U,a,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var de in l)U=l[de],l.hasOwnProperty(de)&&U!=null&&!a.hasOwnProperty(de)&&Ze(e,t,de,null,a,U);for(B in a)if(U=a[B],q=l[B],a.hasOwnProperty(B)&&U!==q&&(U!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ze(e,t,B,U,a,q)}return;default:if(rc(t)){for(var _e in l)U=l[_e],l.hasOwnProperty(_e)&&U!==void 0&&!a.hasOwnProperty(_e)&&id(e,t,_e,void 0,a,U);for(Q in a)U=a[Q],q=l[Q],!a.hasOwnProperty(Q)||U===q||U===void 0&&q===void 0||id(e,t,Q,U,a,q);return}}for(var $ in l)U=l[$],l.hasOwnProperty($)&&U!=null&&!a.hasOwnProperty($)&&Ze(e,t,$,null,a,U);for(K in a)U=a[K],q=l[K],!a.hasOwnProperty(K)||U===q||U==null&&q==null||Ze(e,t,K,U,a,q)}function $0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var o=l[a],c=o.transferSize,g=o.initiatorType,S=o.duration;if(c&&S&&$0(g)){for(g=0,S=o.responseEnd,a+=1;a<l.length;a++){var _=l[a],B=_.startTime;if(B>S)break;var Q=_.transferSize,K=_.initiatorType;Q&&$0(K)&&(_=_.responseEnd,g+=Q*(_<S?1:(S-B)/(_-B)))}if(--a,t+=8*(c+g)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var rd=null,od=null;function hr(e){return e.nodeType===9?e:e.ownerDocument}function F0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function B0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function k0(e,t,l,a){return l=hr(l).createElement(e),l[Ot]=a,l[an]=t,Ut(l,e,t),_t(l),l}function ud(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cd=null;function db(){var e=window.event;return e&&e.type==="popstate"?e===cd?!1:(cd=e,!0):(cd=null,!1)}var fd=typeof setTimeout=="function"?setTimeout:void 0,hb=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,q0=typeof requestAnimationFrame=="function"?requestAnimationFrame:fd,mb=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(e){return G0.resolve(null).then(e).catch(gb)}:fd;function gb(e){setTimeout(function(){throw e})}function na(e){return e==="head"}function Q0(e,t){var l=t,a=0;do{var o=l.nextSibling;if(e.removeChild(l),o&&o.nodeType===8)if(l=o.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(o),ni(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")xd(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,xd(l);for(var c=l.firstChild;c;){var g=c.nextSibling,S=c.nodeName;c[Ai]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=g}}else l==="body"&&xd(e.ownerDocument.body);l=o}while(l);ni(t)}function Y0(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function I0(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var o=a=0;o<t.length;o++){var c=t[o];0<c.width&&0<c.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function X0(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function pb(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function dd(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return pb(t,l,e)}function vb(e){return e.documentElement.clientHeight}function yb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function xb(e,t,l,a,o,c,g,S,_){var B=t.nodeType===9?t:t.ownerDocument;try{var Q=B.startViewTransition({update:function(){var U=B.defaultView,q=U.navigation&&U.navigation.transition,ae=B.fonts.status;a();var de=[];if(ae==="loaded"&&(vb(B),B.fonts.status==="loading"&&de.push(B.fonts.ready)),ae=de.length,e!==null)for(var _e=e.suspenseyImages,$=0,O=0;O<_e.length;O++){var G=_e[O];if(!G.complete){var I=G.getBoundingClientRect();if(0<I.bottom&&0<I.right&&I.top<U.innerHeight&&I.left<U.innerWidth){if($+=gv(G),$>mu){de.length=ae;break}G=new Promise(yb.bind(G)),de.push(G)}}}if(0<de.length)return U=Promise.race([Promise.all(de),new Promise(function(ce){return setTimeout(ce,500)})]).then(o,o),(q?Promise.allSettled([q.finished,U]):U).then(c,c);if(o(),q)return q.finished.then(c,c);c()},types:l});B.__reactViewTransition=Q;var K=[];return Q.ready.then(function(){for(var U=B.documentElement.getAnimations({subtree:!0}),q=0;q<U.length;q++){var ae=U[q],de=ae.effect,_e=de.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){K.push(ae),ae=de.getKeyframes();for(var $=_e=void 0,O=!0,G=0;G<ae.length;G++){var I=ae[G],ce=I.width;if(_e===void 0)_e=ce;else if(_e!==ce){O=!1;break}if(ce=I.height,$===void 0)$=ce;else if($!==ce){O=!1;break}delete I.width,delete I.height,I.transform==="none"&&delete I.transform}O&&_e!==void 0&&$!==void 0&&(de.setKeyframes(ae),O=getComputedStyle(de.target,de.pseudoElement),O.width!==_e||O.height!==$)&&(O=ae[0],O.width=_e,O.height=$,O=ae[ae.length-1],O.width=_e,O.height=$,de.setKeyframes(ae))}}g()},function(U){B.__reactViewTransition===Q&&(B.__reactViewTransition=null);try{if(typeof U=="object"&&U!==null)switch(U.name){case"InvalidStateError":(U.message==="View transition was skipped because document visibility state is hidden."||U.message==="Skipping view transition because document visibility state has become hidden."||U.message==="Skipping view transition because viewport size changed."||U.message==="Transition was aborted because of invalid state")&&(U=null)}U!==null&&_(U)}finally{a(),o(),g()}}),Q.finished.finally(function(){for(var U=0;U<K.length;U++)K[U].cancel();B.__reactViewTransition===Q&&(B.__reactViewTransition=null),S()}),Q}catch{return a(),o(),g(),null}}function Pa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Pa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:z({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),a=[],o=0;o<l.length;o++){var c=l[o].effect;c!==null&&c.target===e&&c.pseudoElement===t&&a.push(l[o])}return a},Pa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function K0(e){return{name:e,group:new Pa("group",e),imagePair:new Pa("image-pair",e),old:new Pa("old",e),new:new Pa("new",e)}}function xn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}xn.prototype.addEventListener=function(e,t,l){var a=null,o=null;if(!(l!=null&&typeof l!="boolean"&&(a=l.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var c=this._eventListeners;if(P0(c,e,t,l)===-1){var g=this,S=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(S=function(_){g.removeEventListener(e,t,l),typeof t=="function"?t.call(this,_):t.handleEvent(_)}),a!==null&&(o=g.removeEventListener.bind(g,e,t,l),a.addEventListener("abort",o,{once:!0}),o=a.removeEventListener.bind(a,"abort",o)),a=Zs(l),c.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:S,cleanup:o}),v(this._fragmentFiber.child,!1,Sb,e,S,a)}this._eventListeners=c}};function Sb(e,t,l,a){return M(e).addEventListener(t,l,a),!1}xn.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=P0(a,e,t,l),t!==-1)){var o=a[t];l=o.attachedListener;var c=o.cleanup;o=Zs(o.optionsOrUseCapture),v(this._fragmentFiber.child,!1,bb,e,l,o),a.splice(t,1),c!==null&&c()}};function bb(e,t,l,a){return M(e).removeEventListener(t,l,a),!1}function Zs(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Z0(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function P0(e,t,l,a){if(e.length===0)return-1;a=Z0(a);for(var o=0;o<e.length;o++){var c=e[o];if(c.type===t&&c.listener===l&&Z0(c.optionsOrUseCapture)===a)return o}return-1}xn.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=M(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var o=0;o<l.length;o++){var c=l[o];a.addEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),l)for(o=0;o<l.length;o++)c=l[o],a.removeEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},xn.prototype.focus=function(e){v(this._fragmentFiber.child,!0,J0,e,void 0,void 0)};function J0(e,t){return e.tag===6?!1:(e=M(e),zb(e,t))}xn.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,hd,t,void 0,void 0);for(var l=t.length-1;0<=l&&!J0(t[l],e);l--);};function hd(e,t){return t.push(e),!1}xn.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=M(e),e=hr(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,wb,e,void 0,void 0))};function wb(e,t){return e.tag===6?!1:(e=M(e),e===t||e.contains(t)?(t.blur(),!0):!1)}xn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Cb,e,void 0,void 0)};function Cb(e,t){return e.tag===6||(e=M(e),t.observe(e)),!1}xn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,jb,e,void 0,void 0);for(var l=t=0;l<$n.length;l++){var a=$n[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):$n[t++]=a}$n.length=t}};function jb(e,t){return e.tag===6||(e=M(e),t.unobserve(e)),!1}var $n=[],md=!1;function Eb(e,t,l){$n.push({fragmentInstance:e,observer:t,instance:l}),md||(md=!0,Db(function(){md=!1;var a=$n;$n=[];for(var o=0;o<a.length;o++){var c=a[o];c.observer.unobserve(c.instance)}}))}xn.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Nb,e,void 0,void 0),e};function Nb(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=M(e),t.push.apply(t,e.getClientRects());return!1}xn.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:M(t).getRootNode(e)},xn.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,hd,l,void 0,void 0);var a=M(t);if(l.length===0){if(l=a,w(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var o=a=l.compareDocumentPosition(e);return l===e?o=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=C(t)[1],l===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=M(l).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=M(l[0]),o=M(l[l.length-1]);var c=w(this._fragmentFiber)?t.parentElement:a;if(c==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=c.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,c=c.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var g=t.compareDocumentPosition(e),S=o.compareDocumentPosition(e),_=g&Node.DOCUMENT_POSITION_CONTAINED_BY||S&Node.DOCUMENT_POSITION_CONTAINED_BY;return S=a&&c&&g&Node.DOCUMENT_POSITION_FOLLOWING&&S&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||c&&o===e||_||S?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!c&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:g,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||_b(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function _b(e,t,l,a,o){var c=Ta(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!c)e:{for(;c!==null;){if(c.tag===7&&(c===t||c.alternate===t)){l=!0;break e}c=c.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(c===null)return c=o.ownerDocument,o===c||o===c.documentElement||o===c.body;e:{for(c=t,t=b(t);c!==null;){if(!(c.tag!==5&&c.tag!==3&&c.tag!==27||c!==t&&c.alternate!==t)){c=!0;break e}c=c.return}c=!1}return c}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!c)&&!(t=c===l)&&(t=D(l,c,H),t===null?t=!1:(v(t,!0,F,c,l),c=R,R=null,t=c!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!c)&&!(t=c===a)&&(t=D(a,c,H),t===null?t=!1:(v(t,!0,T,c,a),c=R,j=R=null,t=c!==null)),t):!1}function W0(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}xn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];v(this._fragmentFiber.child,!1,hd,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=C(this._fragmentFiber);if(a=l?a[1]||a[0]||b(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=M(a),W0(e,l);return}if(a=M(a),a.nodeType!==9){if(a.nodeType===11){l="host"in a?a.host:null,l!==null&&l.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=l?t.length-1:0;a!==(l?-1:t.length);){var o=t[a];o.tag===6?(o=M(o),W0(o,l)):M(o).scrollIntoView(e),a+=l?-1:1}};function Mb(e,t){return e=M(e),ev(e,t),!1}function ev(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function tv(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.addEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){for(var g=0,S=0;S<$n.length;S++){var _=$n[S];(_.fragmentInstance!==t||_.observer!==c||_.instance!==e)&&($n[g++]=_)}$n.length=g,c.observe(e)}),ev(e,t))}function Rb(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.removeEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){typeof c.rootMargin=="string"?Eb(t,c,e):c.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function gd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":gd(l),to(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Tb(e,t,l,a){for(;e.nodeType===1;){var o=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ai])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Rn(e.nextSibling),e===null)break}return null}function Ab(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Rn(e.nextSibling),e===null))return null;return e}function nv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Rn(e.nextSibling),e===null))return null;return e}function pd(e){return e.data==="$?"||e.data==="$~"}function vd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ob(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Rn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var yd=null;function lv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Rn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function av(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function zb(e,t){function l(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return a}function Db(e){q0(function(){q0(function(t){return e(t)})})}function sv(e,t,l){switch(t=hr(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function iv(e,t,l){for(var a in l){var o=l[a];l.hasOwnProperty(a)&&o!=null&&Ze(e,t,a,null,ub,o)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Xn&&(e.onclick=null),to(e)}function xd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);to(e)}var Tn=new Map,rv=new Set;function mr(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var _l=me.d;me.d={f:Hb,r:Lb,D:Ub,C:Vb,L:$b,m:Fb,X:kb,S:Bb,M:Gb};function Hb(){var e=_l.f(),t=su();return e||t}function Lb(e){var t=gs(e);t!==null&&t.tag===5&&t.type==="form"?up(t):_l.r(e)}var Ps=typeof document>"u"?null:document;function ov(e,t,l){var a=Ps;if(a&&typeof t=="string"&&t){var o=wn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),rv.has(o)||(rv.add(o),e={rel:e,crossOrigin:l,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),Ut(t,"link",e),_t(t),a.head.appendChild(t)))}}function Ub(e){_l.D(e),ov("dns-prefetch",e,null)}function Vb(e,t){_l.C(e,t),ov("preconnect",e,t)}function $b(e,t,l){_l.L(e,t,l);var a=Ps;if(a&&e&&t){var o='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+wn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+wn(l.imageSizes)+'"]')):o+='[href="'+wn(e)+'"]';var c=o;switch(t){case"style":c=Js(e);break;case"script":c=Ws(e)}if(!(Tn.has(c)||(e=z({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Tn.set(c,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(gr(c))||t==="script"&&a.querySelector(pr(c))))){var g=a.createElement("link");Ut(g,"link",e),t==="style"&&(g[eo]=!0,g.onload=g.onerror=function(){bm(g)}),_t(g),a.head.appendChild(g)}}}function Fb(e,t){_l.m(e,t);var l=Ps;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+wn(a)+'"][href="'+wn(e)+'"]',c=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ws(e)}if(!Tn.has(c)&&(e=z({rel:"modulepreload",href:e},t),Tn.set(c,e),l.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pr(c)))return}a=l.createElement("link"),Ut(a,"link",e),_t(a),l.head.appendChild(a)}}}function Bb(e,t,l){_l.S(e,t,l);var a=Ps;if(a&&e){var o=ps(a).hoistableStyles,c=Js(e);t=t||"default";var g=o.get(c);if(!g){var S={loading:0,preload:null};if(g=a.querySelector(gr(c)))S.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Tn.get(c))&&Sd(e,l);var _=g=a.createElement("link");_t(_),Ut(_,"link",e),_._p=new Promise(function(B,Q){_.onload=B,_.onerror=Q}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,du(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(c,g)}}}function kb(e,t){_l.X(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function Gb(e,t){_l.M(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0,type:"module"},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function uv(e,t,l,a){var o=(o=At.current)?mr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Js(l.href),t=ps(o).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Js(l.href);var c=ps(o).hoistableStyles,g=c.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=o.querySelector(gr(e)))?c._p||(g.instance=c,g.state.loading=5):(c=Tn.get(e),c||(c={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Tn.set(e,c)),qb(o,e,c,g.state))),t&&a===null)throw Error(r(528,""));return g}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ws(l),t=ps(o).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Js(e){return'href="'+wn(e)+'"'}function gr(e){return'link[rel="stylesheet"]['+e+"]"}function cv(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function qb(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[eo]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[eo]=!0,t.onload=t.onerror=bm.bind(null,t),Ut(t,"link",l),_t(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Ws(e){return'[src="'+wn(e)+'"]'}function pr(e){return"script[async]"+e}function fv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+wn(l.href)+'"]');if(a)return t.instance=a,_t(a),a;var o=z({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),_t(a),Ut(a,"style",o),du(a,l.precedence,e),t.instance=a;case"stylesheet":o=Js(l.href);var c=e.querySelector(gr(o));if(c)return t.state.loading|=4,t.instance=c,_t(c),c;a=cv(l),(o=Tn.get(o))&&Sd(a,o),c=(e.ownerDocument||e).createElement("link"),_t(c);var g=c;return g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),t.state.loading|=4,du(c,l.precedence,e),t.instance=c;case"script":return c=Ws(l.src),(o=e.querySelector(pr(c)))?(t.instance=o,_t(o),o):(a=l,(o=Tn.get(c))&&(a=z({},l),bd(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),_t(o),Ut(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,du(a,l.precedence,e));return t.instance}function du(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,c=o,g=0;g<a.length;g++){var S=a[g];if(S.dataset.precedence===t)c=S;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Sd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hu=null;function dv(e,t,l){if(hu===null){var a=new Map,o=hu=new Map;o.set(l,a)}else o=hu,a=o.get(l),a||(a=new Map,o.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),o=0;o<l.length;o++){var c=l[o];if(!(c[Ai]||c[Ot]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var S=a.get(g);S?S.push(c):a.set(g,[c])}}return a}function wd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Qb(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function mv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function pv(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=gv(t),e.suspenseyImages.push(t)),e=Xb.bind(e),t.decode().then(e,e))}function Yb(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=Js(a.href),c=t.querySelector(gr(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,_t(c);return}c=t.ownerDocument||t,a=cv(a),(o=Tn.get(o))&&Sd(a,o),c=c.createElement("link"),_t(c);var g=c;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=vr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var mu=0;function Ib(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&mu===0&&(mu=62500*fb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>mu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function vv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)pu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function vr(){this.count--,vv(this)}function Xb(){this.imgCount--,vv(this)}var gu=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gu=new Map,t.forEach(Kb,e),gu=null,vr.call(e))}function Kb(e,t){if(!(t.state.loading&4)){var l=gu.get(e);if(l)var a=l.get(null);else{l=new Map,gu.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var g=o[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(l.set(g.dataset.precedence,g),a=g)}a&&l.set(null,a)}o=t.instance,g=o.getAttribute("data-precedence"),c=l.get(g)||a,c===a&&l.set(null,o),l.set(g,o),this.count++,a=vr.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ei={$$typeof:ee,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function Zb(e,t,l,a,o,c,g,S,_){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=tc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tc(0),this.hiddenUpdates=tc(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.transitionTypes=null,this.incompleteTransitions=new Map}function yv(e,t,l,a,o,c,g,S,_,B,Q,K){return e=new Zb(e,t,l,g,_,B,Q,K,S),t=1,c===!0&&(t|=24),c=sn(3,null,null,t),e.current=c,c.stateNode=e,t=Lc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},Fc(c),e}function xv(e){return e?(e=Ns,e):Ns}function Sv(e,t,l,a,o,c){o=xv(o),a.context===null?a.context=o:a.pendingContext=o,a=ql(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=Ql(e,a,t),l!==null&&(cn(l,e,t),Xi(l,e,t))}function bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Cd(e,t){bv(e,t),(e=e.alternate)&&bv(e,t)}function wv(e){if(e.tag===13||e.tag===31){var t=Da(e,67108864);t!==null&&cn(t,e,67108864),Cd(e,67108864)}}function Cv(e){if(e.tag===13||e.tag===31){var t=yn();t=nc(t);var l=Da(e,t);l!==null&&cn(l,e,t),Cd(e,t)}}var ti=!0;function Pb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=2,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function Jb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=8,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function jd(e,t,l,a){if(ti){var o=Ed(a);if(o===null)sd(e,t,a,vu,l),Ev(e,a);else if(e2(o,e,t,l,a))a.stopPropagation();else if(Ev(e,a),t&4&&-1<Wb.indexOf(e)){for(;o!==null;){var c=gs(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=dl(c.pendingLanes);if(g!==0){var S=c;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var _=1<<31-Xt(g);S.entanglements[1]|=_,g&=~_}al(c),(qe&6)===0&&(nu=et()+500,cr(0))}}break;case 31:case 13:S=Da(c,2),S!==null&&cn(S,c,2),su(),Cd(c,2)}if(c=Ed(a),c===null&&sd(e,t,a,vu,l),c===o)break;o=c}o!==null&&a.stopPropagation()}else sd(e,t,a,null,l)}}function Ed(e){return e=uc(e),Nd(e)}var vu=null;function Nd(e){if(vu=null,e=Ta(e),e!==null){var t=d(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=m(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vu=e,null}function jv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Yn()){case Dl:return 2;case ja:return 8;case Ea:case Jr:return 32;case Mi:return 268435456;default:return 32}default:return 32}}var _d=!1,la=null,aa=null,sa=null,yr=new Map,xr=new Map,ia=[],Wb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ev(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":sa=null;break;case"pointerover":case"pointerout":yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xr.delete(t.pointerId)}}function Sr(e,t,l,a,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[o]},t!==null&&(t=gs(t),t!==null&&wv(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function e2(e,t,l,a,o){switch(t){case"focusin":return la=Sr(la,e,t,l,a,o),!0;case"dragenter":return aa=Sr(aa,e,t,l,a,o),!0;case"mouseover":return sa=Sr(sa,e,t,l,a,o),!0;case"pointerover":var c=o.pointerId;return yr.set(c,Sr(yr.get(c)||null,e,t,l,a,o)),!0;case"gotpointercapture":return c=o.pointerId,xr.set(c,Sr(xr.get(c)||null,e,t,l,a,o)),!0}return!1}function Nv(e){var t=Ta(e.target);if(t!==null){var l=d(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Ed(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);oc=a,l.target.dispatchEvent(a),oc=null}else return t=gs(l),t!==null&&wv(t),e.blockedOn=l,!1;t.shift()}return!0}function _v(e,t,l){yu(e)&&l.delete(t)}function t2(){_d=!1,la!==null&&yu(la)&&(la=null),aa!==null&&yu(aa)&&(aa=null),sa!==null&&yu(sa)&&(sa=null),yr.forEach(_v),xr.forEach(_v)}function xu(e,t){e.blockedOn===t&&(e.blockedOn=null,_d||(_d=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,t2)))}var Su=null;function Mv(e){Su!==e&&(Su=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Su===e&&(Su=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Nd(a||l)===null)continue;break}var c=gs(l);c!==null&&(e.splice(t,3),t-=3,of(c,{pending:!0,data:o,method:l.method,action:a},a,o))}}))}function ni(e){function t(_){return xu(_,e)}la!==null&&xu(la,e),aa!==null&&xu(aa,e),sa!==null&&xu(sa,e),yr.forEach(t),xr.forEach(t);for(var l=0;l<ia.length;l++){var a=ia[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ia.length&&(l=ia[0],l.blockedOn===null);)Nv(l),l.blockedOn===null&&ia.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var o=l[a],c=l[a+1],g=o[an]||null;if(typeof c=="function")g||Mv(l);else if(g){var S=null;if(c&&c.hasAttribute("formAction")){if(o=c,g=c[an]||null)S=g.formAction;else if(Nd(o)!==null)continue}else S=g.action;typeof S=="function"?l[a+1]=S:(l.splice(a,3),a-=3),Mv(l)}}}function Rv(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Md(e){this._internalRoot=e}bu.prototype.render=Md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=yn();Sv(l,a,e,t,null,null)},bu.prototype.unmount=Md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sv(e.current,2,null,e,null,null),su(),t[ms]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=vm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ia.length&&t!==0&&t<ia[l].priority;l++);ia.splice(l,0,e),l===0&&Nv(e)}};var Tv=s.version;if(Tv!=="19.3.1")throw Error(r(527,Tv,"19.3.1"));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=y(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var n2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{Pe=wu.inject(n2),nt=wu}catch{}}return wr.createRoot=function(e,t){if(!u(e))throw Error(r(299));var l=!1,a="",o=xp,c=Sp,g=bp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=yv(e,1,!1,null,null,l,a,null,o,c,g,Rv),e[ms]=t.current,ad(e),new Md(t)},wr.hydrateRoot=function(e,t,l){if(!u(e))throw Error(r(299));var a=!1,o="",c=xp,g=Sp,S=bp,_=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(o=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(g=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.formState!==void 0&&(_=l.formState)),t=yv(e,1,!0,t,l??null,a,o,_,c,g,S,Rv),t.context=xv(null),l=t.current,a=yn(),a=nc(a),o=ql(a),o.callback=null,Ql(l,o,a),l=a,t.current.lanes=l,Ti(t,l),al(t),e[ms]=t.current,ad(e),new bu(t)},wr.version="19.3.1",wr}var Bv;function g2(){if(Bv)return Od.exports;Bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Od.exports=m2(),Od.exports}var p2=g2();const Xy=E.createContext(void 0),Ky=n=>{const s=E.useContext(Xy);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},v2=({client:n,children:s})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Xy.Provider,{value:n,children:s})),y2={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)};var fa,Yh,Uy,x2=(Uy=class{constructor(){pe(this,fa,y2);pe(this,Yh,!1)}setTimeoutProvider(n){oe(this,fa,n)}setTimeout(n,s){return L(this,fa).setTimeout(n,s)}clearTimeout(n){L(this,fa).clearTimeout(n)}setInterval(n,s){return L(this,fa).setInterval(n,s)}clearInterval(n){L(this,fa).clearInterval(n)}},fa=new WeakMap,Yh=new WeakMap,Uy);const ts=new x2;function S2(n){setTimeout(n,0)}const b2=typeof window>"u"||"Deno"in globalThis;function fn(){}function w2(n,s){return typeof n=="function"?n(s):n}function Zy(n){return typeof n=="number"&&n>=0&&n!==1/0}function Py(n,s){return Math.max(n+(s||0)-Date.now(),0)}function ft(n,s){return typeof n=="function"?n(s):n}function kv(n,s){const{type:i="all",exact:r,fetchStatus:u,predicate:d,queryKey:h,stale:m}=n;if(h){if(r){if(s.queryHash!==Xh(h,s.options))return!1}else if(!ji(s.queryKey,h))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof m=="boolean"&&s.isStale()!==m||u&&u!==s.state.fetchStatus||d&&!d(s))}function Gv(n,s){const{exact:i,status:r,predicate:u,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){if(Ur(s.options.mutationKey)!==Ur(d))return!1}else if(!ji(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||u&&!u(s))}function Xh(n,s){return((s==null?void 0:s.queryKeyHashFn)||Ur)(n)}function Ur(n){return JSON.stringify(n,(s,i)=>hh(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function ji(n,s){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(Array.isArray(n)&&Array.isArray(s)){if(s.length>n.length)return!1;for(let r=0;r<s.length;r++)if(!ji(n[r],s[r]))return!1;return!0}const i=Object.keys(s);for(const r of i)if(!ji(n[r],s[r]))return!1;return!0}return!1}const C2=Object.prototype.hasOwnProperty;function Jy(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=qv(n)&&qv(s);if(!r&&!(hh(n)&&hh(s)))return s;const u=(r?n:Object.keys(n)).length,d=r?s:Object.keys(s),h=d.length,m=r?new Array(h):{};let p=0;for(let y=0;y<h;y++){const x=r?y:d[y],v=n[x],b=s[x];if(v===b){m[x]=v,(r?y<u:C2.call(n,x))&&p++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){m[x]=b;continue}const w=Jy(v,b,i+1);m[x]=w,w===v&&p++}return u===h&&p===u?n:m}function Ld(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const i in n)if(n[i]!==s[i])return!1;return!0}function qv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function hh(n){if(!Qv(n))return!1;const s=Object.getPrototypeOf(n),i=s==null?void 0:s.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const r=i.prototype;return!(!Qv(r)||!r.hasOwnProperty("isPrototypeOf")||s!==Object.prototype)}function Qv(n){return Object.prototype.toString.call(n)==="[object Object]"}function j2(n){return new Promise(s=>{ts.setTimeout(s,n)})}function mh(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?Jy(n,s):s}function Wy(n){return n}function E2(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function N2(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}const Kh=Symbol();function e1(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===Kh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function t1(n,s){return typeof n=="function"?n(...s):!!n}function _2(n,s,i){let r=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=s()),r||(r=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}let M2=()=>b2;const Zh=()=>M2();var Ir=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ns,da,fi,Vy,R2=(Vy=class extends Ir{constructor(){super();pe(this,ns);pe(this,da);pe(this,fi);oe(this,fi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){L(this,da)||this.setEventListener(L(this,fi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,da))==null||s.call(this),oe(this,da,void 0))}setEventListener(s){var i;oe(this,fi,s),(i=L(this,da))==null||i.call(this),oe(this,da,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){L(this,ns)!==s&&(oe(this,ns,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof L(this,ns)=="boolean"?L(this,ns):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},ns=new WeakMap,da=new WeakMap,fi=new WeakMap,Vy);const Ph=new R2,T2=S2;function A2(){let n=[],s=0,i=m=>{m()},r=m=>{m()},u=T2;const d=m=>{s?n.push(m):u(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&u(()=>{r(()=>{m.forEach(p=>{i(p)})})})};return{batch:m=>{let p;s++;try{p=m()}finally{s--,s||h()}return p},batchCalls:m=>(...p)=>{d(()=>{m(...p)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{u=m}}}const $t=A2();var di,ha,hi,$y,O2=($y=class extends Ir{constructor(){super();pe(this,di,!0);pe(this,ha);pe(this,hi);oe(this,hi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,ha)||this.setEventListener(L(this,hi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,ha))==null||s.call(this),oe(this,ha,void 0))}setEventListener(s){var i;oe(this,hi,s),(i=L(this,ha))==null||i.call(this),oe(this,ha,s(this.setOnline.bind(this)))}setOnline(s){L(this,di)!==s&&(oe(this,di,s),this.listeners.forEach(i=>{i(s)}))}isOnline(){return L(this,di)}},di=new WeakMap,ha=new WeakMap,hi=new WeakMap,$y);const Ou=new O2;function z2(n){return Math.min(1e3*2**n,3e4)}function n1(n){return(n??"online")==="online"?Ou.isOnline():!0}var gh=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function l1(n){let s=!1,i=0,r,u="pending",d,h;const m=new Promise((j,F)=>{d=j,h=F});m.catch(fn);const p=()=>u!=="pending",y=j=>{var F;if(!p()){const T=new gh(j);N(T),(F=n.onCancel)==null||F.call(n,T)}},x=()=>{s=!0},v=()=>{s=!1},b=()=>Ph.isFocused()&&(n.networkMode==="always"||Ou.isOnline())&&n.canRun(),w=()=>n1(n.networkMode)&&n.canRun(),C=j=>{p()||(r==null||r(),u="resolved",d(j))},N=j=>{p()||(r==null||r(),u="rejected",h(j))},M=j=>new Promise(F=>{var T;r=H=>{(p()||j())&&F(H)},(T=n.onPause)==null||T.call(n)}).then(()=>{var F;r=void 0,p()||(F=n.onContinue)==null||F.call(n)}),R=()=>{if(p())return;let j;const F=i===0?n.initialPromise:void 0;try{j=F??n.fn()}catch(T){j=Promise.reject(T)}Promise.resolve(j).then(C).catch(T=>{var te;if(p())return;const H=n.retry??(Zh()?0:3),D=n.retryDelay??z2,z=typeof D=="function"?D(i,T):D,Y=H===!0||typeof H=="number"&&i<H||typeof H=="function"&&H(i,T);if(s||!Y){N(T);return}i++,(te=n.onFail)==null||te.call(n,i,T),j2(z).then(()=>b()?void 0:M(b)).then(()=>{s?N(T):R()})})};return{promise:m,status:()=>u,cancel:y,continue:()=>(r==null||r(),m),cancelRetry:x,continueRetry:v,canStart:w,start:()=>(w()?R():M(w).then(R),m)}}var ls,Fy,a1=(Fy=class{constructor(){pe(this,ls)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zy(this.gcTime)&&oe(this,ls,ts.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Zh()?1/0:3e5))}clearGcTimeout(){L(this,ls)!==void 0&&(ts.clearTimeout(L(this,ls)),oe(this,ls,void 0))}},ls=new WeakMap,Fy);function D2(n){return{onFetch:(s,i)=>{var x,v,b,w,C;const r=s.options,u=(b=(v=(x=s.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:b.direction,d=((w=s.state.data)==null?void 0:w.pages)||[],h=((C=s.state.data)==null?void 0:C.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let N=!1;const M=F=>{_2(F,()=>s.signal,()=>N=!0)},R=e1(s.options,s.fetchOptions),j=async(F,T,H)=>{if(N)return Promise.reject(s.signal.reason);if(T==null&&F.pages.length)return Promise.resolve(F);const z=(()=>{const ne={client:s.client,queryKey:s.queryKey,pageParam:T,direction:H?"backward":"forward",meta:s.options.meta};return M(ne),ne})(),Y=await R(z),{maxPages:te}=s.options,k=H?N2:E2;return{pages:k(F.pages,Y,te),pageParams:k(F.pageParams,T,te)}};if(u&&d.length){const F=u==="backward",T=F?s1:ph,H={pages:d,pageParams:h};m=await j(H,T(r,H),F)}else{const F=n??d.length;do{const T=p===0?h[0]===void 0?r.initialPageParam:h[0]:ph(r,m);if(p>0&&T==null)break;m=await j(m,T),p++}while(p<F)}return m};s.options.persister?s.fetchFn=()=>{var N,M;return(M=(N=s.options).persister)==null?void 0:M.call(N,y,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=y}}}function ph(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function s1(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}function H2(n,s){return s?ph(n,s)!=null:!1}function L2(n,s){return!s||!n.getPreviousPageParam?!1:s1(n,s)!=null}var mi,as,gi,An,ss,Et,kr,is,Fn,Rl,By,U2=(By=class extends a1{constructor(s){super();pe(this,Fn);pe(this,mi);pe(this,as);pe(this,gi);pe(this,An);pe(this,ss);pe(this,Et);pe(this,kr);pe(this,is);oe(this,is,!1),oe(this,kr,s.defaultOptions),this.setOptions(s.options),this.observers=[],oe(this,ss,s.client),oe(this,An,L(this,ss).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,oe(this,as,Iv(this.options)),this.state=s.state??L(this,as),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,mi)}get promise(){var s;return(s=L(this,Et))==null?void 0:s.promise}setOptions(s){if(this.options={...L(this,kr),...s},s!=null&&s._type&&oe(this,mi,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Iv(this.options);i.data!==void 0&&(this.setState(Yv(i.data,i.dataUpdatedAt)),oe(this,as,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,An).remove(this)}setData(s,i){const r=mh(this.state.data,s,this.options);return De(this,Fn,Rl).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){De(this,Fn,Rl).call(this,{type:"setState",state:s})}cancel(s){var r,u;const i=(r=L(this,Et))==null?void 0:r.promise;return(u=L(this,Et))==null||u.cancel(s),i?i.then(fn).catch(fn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,as)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>ft(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>ft(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Py(this.state.dataUpdatedAt,s)}onFocus(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}onOnline(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),L(this,An).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){const i=this.observers.indexOf(s);i!==-1&&(this.observers.splice(i,1),this.observers.length||(L(this,Et)&&(L(this,is)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,Et).cancel({revert:!0}):L(this,Et).cancelRetry()),this.scheduleGc()),L(this,An).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Fn,Rl).call(this,{type:"invalidate"})}async fetch(s,i){var y,x,v,b,w,C,N,M,R,j,F,T;if(this.state.fetchStatus!=="idle"&&((y=L(this,Et))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(L(this,Et))return L(this,Et).continueRetry(),L(this,Et).promise}if(s&&this.setOptions(s),!this.options.queryFn){const H=this.observers.find(D=>D.options.queryFn);H&&this.setOptions(H.options)}const r=new AbortController,u=H=>{Object.defineProperty(H,"signal",{enumerable:!0,get:()=>(oe(this,is,!0),r.signal)})},d=()=>{const H=e1(this.options,i),z=(()=>{const Y={client:L(this,ss),queryKey:this.queryKey,meta:this.meta};return u(Y),Y})();return oe(this,is,!1),this.options.persister?this.options.persister(H,z,this):H(z)},m=(()=>{const H={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:L(this,ss),state:this.state,fetchFn:d};return u(H),H})();(x=L(this,mi)==="infinite"?D2(this.options.pages):this.options.behavior)==null||x.onFetch(m,this),oe(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&De(this,Fn,Rl).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta});const p=oe(this,Et,l1({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:H=>{H instanceof gh&&H.revert&&this.setState({...L(this,gi),fetchStatus:"idle"}),r.abort()},onFail:(H,D)=>{De(this,Fn,Rl).call(this,{type:"failed",failureCount:H,error:D})},onPause:()=>{De(this,Fn,Rl).call(this,{type:"pause"})},onContinue:()=>{De(this,Fn,Rl).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const H=await p.start();if(H===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(H),(C=(w=L(this,An).config).onSuccess)==null||C.call(w,H,this),(M=(N=L(this,An).config).onSettled)==null||M.call(N,H,this.state.error,this),H}catch(H){if(H instanceof gh){if(H.silent)return L(this,Et).promise;if(H.revert){if(this.state.data===void 0)throw H;return this.state.data}}throw De(this,Fn,Rl).call(this,{type:"error",error:H}),(j=(R=L(this,An).config).onError)==null||j.call(R,H,this),(T=(F=L(this,An).config).onSettled)==null||T.call(F,this.state.data,H,this),H}finally{L(this,Et)===p&&oe(this,Et,void 0),this.scheduleGc()}}},mi=new WeakMap,as=new WeakMap,gi=new WeakMap,An=new WeakMap,ss=new WeakMap,Et=new WeakMap,kr=new WeakMap,is=new WeakMap,Fn=new WeakSet,Rl=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...i1(r.data,this.options),fetchMeta:s.meta??null};case"success":const u={...r,...Yv(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return oe(this,gi,s.manual?u:void 0),u;case"error":const d=s.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=i(this.state),$t.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),L(this,An).notify({query:this,type:"updated",action:s})})},By);function i1(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n1(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Yv(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Iv(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var en,He,Gr,tn,rs,pi,Al,qr,vi,yi,os,us,ma,xi,Qe,Ar,vh,yh,xh,Sh,bh,wh,Ch,jh,ky,r1=(ky=class extends Ir{constructor(s,i){super();pe(this,Qe);pe(this,en);pe(this,He);pe(this,Gr);pe(this,tn);pe(this,rs);pe(this,pi);pe(this,Al);pe(this,qr);pe(this,vi);pe(this,yi);pe(this,os);pe(this,us);pe(this,ma);pe(this,xi,new Set);this.options=i,oe(this,en,s),oe(this,Al,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,He).addObserver(this),Xv(L(this,He),this.options)?De(this,Qe,Ar).call(this):this.updateResult(),De(this,Qe,bh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Eh(L(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Eh(L(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Qe,wh).call(this),De(this,Qe,Ch).call(this),L(this,He).removeObserver(this)}setOptions(s){const i=this.options,r=L(this,He);if(this.options=L(this,en).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ft(this.options.enabled,L(this,He))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Qe,jh).call(this),L(this,He).setOptions(this.options),i._defaulted&&!Ld(this.options,i)&&L(this,en).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,He),observer:this});const u=this.hasListeners();u&&Kv(L(this,He),r,this.options,i)&&De(this,Qe,Ar).call(this),this.updateResult(),u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||ft(this.options.staleTime,L(this,He))!==ft(i.staleTime,L(this,He)))&&De(this,Qe,yh).call(this);const d=De(this,Qe,xh).call(this);u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||d!==L(this,ma))&&De(this,Qe,Sh).call(this,d)}getOptimisticResult(s){const i=L(this,en).getQueryCache().build(L(this,en),s),r=this.createResult(i,s);return Ld(this.getCurrentResult(),r)||(oe(this,tn,r),oe(this,pi,this.options),oe(this,rs,L(this,He).state)),r}getCurrentResult(){return L(this,tn)}trackResult(s,i){return new Proxy(s,{get:(r,u)=>(this.trackProp(u),i==null||i(u),Reflect.get(r,u))})}trackProp(s){L(this,xi).add(s)}getCurrentQuery(){return L(this,He)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=L(this,en).defaultQueryOptions(s),r=L(this,en).getQueryCache().build(L(this,en),i);let u=()=>{},d;const h=new Promise(m=>{d=m,u=L(this,en).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===r.queryHash&&r.state.data!==void 0&&(u(),m(this.createResult(r,i)))})});return Promise.race([r.fetch(i).then(()=>{const m=this.createResult(r,i);return d==null||d(m),m}).finally(()=>{u()}),h])}fetch(s){return De(this,Qe,Ar).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,tn)))}createResult(s,i){var D;const r=L(this,He),u=this.options,d=L(this,tn),h=L(this,rs),m=L(this,pi),p=s!==r?s.state:L(this,Gr),{state:y}=s;let x={...y},v=!1,b;if(i._optimisticResults){const z=this.hasListeners(),Y=!z&&Xv(s,i),te=z&&Kv(s,r,i,u);(Y||te)&&(x={...x,...i1(y.data,s.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:C,status:N}=x;b=x.data;let M=!1;if(i.placeholderData!==void 0&&b===void 0&&N==="pending"){let z;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(z=d.data,M=!0):z=typeof i.placeholderData=="function"?i.placeholderData((D=L(this,yi))==null?void 0:D.state.data,L(this,yi)):i.placeholderData,z!==void 0&&(N="success",b=mh(d==null?void 0:d.data,z,i),v=!0)}if(i.select&&b!==void 0&&!M)if(d&&b===(h==null?void 0:h.data)&&i.select===L(this,qr))b=L(this,vi);else try{oe(this,qr,i.select),b=i.select(b),b=mh(d==null?void 0:d.data,b,i),oe(this,vi,b),oe(this,Al,null)}catch(z){oe(this,Al,z)}else b===void 0&&oe(this,Al,null);L(this,Al)&&(w=L(this,Al),b=L(this,vi),C=Date.now(),N="error",v=!1);const R=x.fetchStatus==="fetching",j=N==="pending",F=N==="error",T=j&&R,H=b!==void 0;return{status:N,fetchStatus:x.fetchStatus,isPending:j,isSuccess:N==="success",isError:F,isInitialLoading:T,isLoading:T,data:b,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:C,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:x.dataUpdateCount>p.dataUpdateCount||x.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!j,isLoadingError:F&&!H,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:F&&H,isStale:Jh(s,i),refetch:this.refetch,isEnabled:ft(i.enabled,s)!==!1}}updateResult(){const s=L(this,tn),i=this.createResult(L(this,He),this.options);if(oe(this,rs,L(this,He).state),oe(this,pi,this.options),L(this,rs).data!==void 0&&oe(this,yi,L(this,He)),Ld(i,s))return;oe(this,tn,i);const u=(()=>{if(!s)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!L(this,xi).size)return!0;const m=new Set(h??L(this,xi));return this.options.throwOnError&&m.add("error"),Object.keys(L(this,tn)).some(p=>{const y=p;return L(this,tn)[y]!==s[y]&&m.has(y)})})();$t.batch(()=>{u&&this.listeners.forEach(d=>{d(L(this,tn))}),L(this,en).getQueryCache().notify({query:L(this,He),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Qe,bh).call(this)}},en=new WeakMap,He=new WeakMap,Gr=new WeakMap,tn=new WeakMap,rs=new WeakMap,pi=new WeakMap,Al=new WeakMap,qr=new WeakMap,vi=new WeakMap,yi=new WeakMap,os=new WeakMap,us=new WeakMap,ma=new WeakMap,xi=new WeakMap,Qe=new WeakSet,Ar=function(s){De(this,Qe,jh).call(this);let i=L(this,He).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(fn)),i},vh=function(s){return!Zh()&&ft(this.options.enabled,L(this,He))!==!1&&Zy(s)},yh=function(){De(this,Qe,wh).call(this);const s=ft(this.options.staleTime,L(this,He));if(L(this,tn).isStale||!De(this,Qe,vh).call(this,s))return;const i=Py(L(this,tn).dataUpdatedAt,s)+1;oe(this,os,ts.setTimeout(()=>{L(this,tn).isStale||this.updateResult()},i))},xh=function(){return ft(this.options.refetchInterval,L(this,He))??!1},Sh=function(s){De(this,Qe,Ch).call(this),oe(this,ma,s),!(L(this,ma)===0||!De(this,Qe,vh).call(this,L(this,ma)))&&oe(this,us,ts.setInterval(()=>{(this.options.refetchIntervalInBackground||Ph.isFocused())&&De(this,Qe,Ar).call(this)},L(this,ma)))},bh=function(){De(this,Qe,yh).call(this),De(this,Qe,Sh).call(this,De(this,Qe,xh).call(this))},wh=function(){L(this,os)!==void 0&&(ts.clearTimeout(L(this,os)),oe(this,os,void 0))},Ch=function(){L(this,us)!==void 0&&(ts.clearInterval(L(this,us)),oe(this,us,void 0))},jh=function(){const s=L(this,en).getQueryCache().build(L(this,en),this.options);if(s===L(this,He))return;const i=L(this,He);oe(this,He,s),oe(this,Gr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},ky);function V2(n,s){return ft(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&ft(s.retryOnMount,n)===!1)}function Xv(n,s){return V2(n,s)||n.state.data!==void 0&&Eh(n,s,s.refetchOnMount)}function Eh(n,s,i){if(ft(s.enabled,n)!==!1&&ft(s.staleTime,n)!=="static"){const r=ft(i,n);return r==="always"||r!==!1&&Jh(n,s)}return!1}function Kv(n,s,i,r){return(n!==s||ft(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Jh(n,i)}function Jh(n,s){return ft(s.enabled,n)!==!1&&n.isStaleByTime(ft(s.staleTime,n))}var $2=class extends r1{constructor(n,s){super(n,s)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,s){var w,C;const{state:i}=n,r=super.createResult(n,s),{isFetching:u,isRefetching:d,isError:h,isRefetchError:m}=r,p=(C=(w=i.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:C.direction,y=h&&p==="forward",x=u&&p==="forward",v=h&&p==="backward",b=u&&p==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:H2(s,i.data),hasPreviousPage:L2(s,i.data),isFetchNextPageError:y,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:b,isRefetchError:m&&!y&&!v,isRefetching:d&&!x&&!b}}},Qr,sl,Yt,cs,il,oa,Gy,F2=(Gy=class extends a1{constructor(s){super();pe(this,il);pe(this,Qr);pe(this,sl);pe(this,Yt);pe(this,cs);oe(this,Qr,s.client),this.mutationId=s.mutationId,oe(this,Yt,s.mutationCache),oe(this,sl,[]),this.state=s.state||B2(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){L(this,sl).includes(s)||(L(this,sl).push(s),this.clearGcTimeout(),L(this,Yt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){oe(this,sl,L(this,sl).filter(i=>i!==s)),this.scheduleGc(),L(this,Yt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){L(this,sl).length||(this.state.status==="pending"?this.scheduleGc():L(this,Yt).remove(this))}continue(){var s;return((s=L(this,cs))==null?void 0:s.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(s){var m,p,y,x,v,b,w,C,N,M,R,j,F,T,H,D,z,Y;const i=()=>{De(this,il,oa).call(this,{type:"continue"})},r={client:L(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey},u=oe(this,cs,l1({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(te,k)=>{De(this,il,oa).call(this,{type:"failed",failureCount:te,error:k})},onPause:()=>{De(this,il,oa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Yt).canRun(this)})),d=this.state.status==="pending",h=!u.canStart();try{if(d)i();else{De(this,il,oa).call(this,{type:"pending",variables:s,isPaused:h}),L(this,Yt).config.onMutate&&await L(this,Yt).config.onMutate(s,this,r);const k=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,s,r));k!==this.state.context&&De(this,il,oa).call(this,{type:"pending",context:k,variables:s,isPaused:h})}const te=await u.start();return await((x=(y=L(this,Yt).config).onSuccess)==null?void 0:x.call(y,te,s,this.state.context,this,r)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,te,s,this.state.context,r)),await((C=(w=L(this,Yt).config).onSettled)==null?void 0:C.call(w,te,null,this.state.variables,this.state.context,this,r)),await((M=(N=this.options).onSettled)==null?void 0:M.call(N,te,null,s,this.state.context,r)),De(this,il,oa).call(this,{type:"success",data:te}),te}catch(te){try{await((j=(R=L(this,Yt).config).onError)==null?void 0:j.call(R,te,s,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((T=(F=this.options).onError)==null?void 0:T.call(F,te,s,this.state.context,r))}catch(k){Promise.reject(k)}try{await((D=(H=L(this,Yt).config).onSettled)==null?void 0:D.call(H,void 0,te,this.state.variables,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((Y=(z=this.options).onSettled)==null?void 0:Y.call(z,void 0,te,s,this.state.context,r))}catch(k){Promise.reject(k)}throw De(this,il,oa).call(this,{type:"error",error:te}),te}finally{L(this,cs)===u&&oe(this,cs,void 0),L(this,Yt).runNext(this)}}},Qr=new WeakMap,sl=new WeakMap,Yt=new WeakMap,cs=new WeakMap,il=new WeakSet,oa=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),$t.batch(()=>{L(this,sl).forEach(r=>{r.onMutationUpdate(s)}),L(this,Yt).notify({mutation:this,type:"updated",action:s})})},Gy);function B2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ga,Bn,Yr,qy,k2=(qy=class extends Ir{constructor(s={}){super();pe(this,ga);pe(this,Bn);pe(this,Yr);this.config=s,oe(this,ga,new Set),oe(this,Bn,new Map),oe(this,Yr,0)}build(s,i,r){const u=new F2({client:s,mutationCache:this,mutationId:++Cu(this,Yr)._,options:s.defaultMutationOptions(i),state:r});return this.add(u),u}add(s){L(this,ga).add(s);const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);r?r.push(s):L(this,Bn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(L(this,ga).delete(s)){const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);if(r)if(r.length>1){const u=r.indexOf(s);u!==-1&&r.splice(u,1)}else r[0]===s&&L(this,Bn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){var r;const i=ju(s);if(typeof i=="string"){const u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d.state.status==="pending");return!u||u===s}else return!0}runNext(s){var r,u;const i=ju(s);return typeof i=="string"?((u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d!==s&&d.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){$t.batch(()=>{const s=this.getAll();L(this,ga).clear(),L(this,Bn).clear(),s.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(L(this,ga))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Gv(i,r))}findAll(s={}){return this.getAll().filter(i=>Gv(s,i))}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return $t.batch(()=>Promise.all(s.map(i=>i.continue().catch(fn))))}},ga=new WeakMap,Bn=new WeakMap,Yr=new WeakMap,qy);function ju(n){var s;return(s=n.options.scope)==null?void 0:s.id}var rl,Qy,G2=(Qy=class extends Ir{constructor(s={}){super();pe(this,rl);this.config=s,oe(this,rl,new Map)}build(s,i,r){const u=i.queryKey,d=i.queryHash??Xh(u,i);let h=this.get(d);return h||(h=new U2({client:s,queryKey:u,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(u)}),this.add(h)),h}add(s){L(this,rl).has(s.queryHash)||(L(this,rl).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){L(this,rl).get(s.queryHash)===s&&(s.destroy(),L(this,rl).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){$t.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return L(this,rl).get(s)}getAll(){return[...L(this,rl).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>kv(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>kv(s,r)):i}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},rl=new WeakMap,Qy),ht,pa,va,Si,bi,ya,wi,Ci,Yy,q2=(Yy=class{constructor(n={}){pe(this,ht);pe(this,pa);pe(this,va);pe(this,Si);pe(this,bi);pe(this,ya);pe(this,wi);pe(this,Ci);oe(this,ht,n.queryCache||new G2),oe(this,pa,n.mutationCache||new k2),oe(this,va,n.defaultOptions||{}),oe(this,Si,new Map),oe(this,bi,new Map),oe(this,ya,0)}mount(){Cu(this,ya)._++,L(this,ya)===1&&(oe(this,wi,Ph.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onFocus())})),oe(this,Ci,Ou.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onOnline())})))}unmount(){var n,s;Cu(this,ya)._--,L(this,ya)===0&&((n=L(this,wi))==null||n.call(this),oe(this,wi,void 0),(s=L(this,Ci))==null||s.call(this),oe(this,Ci,void 0))}isFetching(n){return L(this,ht).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return L(this,pa).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=L(this,ht).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ft(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return L(this,ht).findAll(n).map(({queryKey:s,state:i})=>[s,i.data])}setQueryData(n,s,i){var h;const r=this.defaultQueryOptions({queryKey:n}),u=(h=L(this,ht).get(r.queryHash))==null?void 0:h.state.data,d=w2(s,u);if(d!==void 0)return L(this,ht).build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,s,i){return $t.batch(()=>L(this,ht).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=L(this,ht);$t.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=L(this,ht);return $t.batch(()=>{const r=i.findAll(n),u=new Set(r);return r.forEach(d=>{d.reset()}),this.refetchQueries({type:"active",predicate:d=>u.has(d)},s)})}cancelQueries(n,s={}){const i={revert:!0,...s},r=$t.batch(()=>L(this,ht).findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(fn).catch(fn)}invalidateQueries(n,s={}){return $t.batch(()=>(L(this,ht).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=$t.batch(()=>L(this,ht).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,i);return i.throwOnError||(d=d.catch(fn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(fn)}async query(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s),r=i.isStaleByTime(ft(s.staleTime,i))?await i.fetch(s):i.state.data,u=s.select;return u?u(r):r}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s);return i.isStaleByTime(ft(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(fn).catch(fn)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(fn).catch(fn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Ou.isOnline()?L(this,pa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ht)}getMutationCache(){return L(this,pa)}getDefaultOptions(){return L(this,va)}setDefaultOptions(n){oe(this,va,n)}setQueryDefaults(n,s){L(this,Si).set(Ur(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...L(this,Si).values()],i={};return s.forEach(r=>{ji(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){L(this,bi).set(Ur(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...L(this,bi).values()],i={};return s.forEach(r=>{ji(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...L(this,va).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=Xh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Kh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...L(this,va).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){L(this,ht).clear(),L(this,pa).clear()}},ht=new WeakMap,pa=new WeakMap,va=new WeakMap,Si=new WeakMap,bi=new WeakMap,ya=new WeakMap,wi=new WeakMap,Ci=new WeakMap,Yy);const o1=E.createContext(!1),Q2=()=>E.useContext(o1);o1.Provider;function Y2(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const I2=E.createContext(Y2()),X2=()=>E.useContext(I2),K2=(n,s,i)=>{const r=(i==null?void 0:i.state.status)==="error"&&typeof n.throwOnError=="function"?t1(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||r)&&(s.isReset()||(n.retryOnMount=!1))},Z2=n=>{E.useEffect(()=>{n.clearReset()},[n])},P2=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:u})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||t1(i,[n.error,r])),J2=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},W2=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,ew=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function u1(n,s,i){const r=Q2(),u=X2(),d=Ky(),h=d.defaultQueryOptions(n),m=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,J2(h),K2(h,u,m),Z2(u);const[y]=E.useState(()=>new s(d,h)),x=y.getOptimisticResult(h),v=!r&&p;if(E.useSyncExternalStore(E.useCallback(b=>{const w=v?y.subscribe($t.batchCalls(b)):fn;return y.updateResult(),w},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),E.useEffect(()=>{y.setOptions(h)},[h,y]),W2(h,x))throw ew(h,y,u);if(P2({result:x,errorResetBoundary:u,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;return h.notifyOnChangeProps?x:y.trackResult(x)}function Ol(n,s){return u1(n,r1)}function tw(n,s){return u1(n,$2)}var Wh=Iy();/**
|
|
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&<&&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&>===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();/**
|
|
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
|
|
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);/**
|
|
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
|
|
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}/**
|
|
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
|
|
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";/**
|
|
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
|
|
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();/**
|
|
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
|
|
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"};/**
|
|
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
|
|
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]]));/**
|
|
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
|
|
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};/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
106
|
+
*/const Fu=Ve("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
|
|
111
|
+
*/const hj=Ve("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
|
|
116
|
+
*/const Ux=Ve("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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
131
|
+
*/const Vx=Ve("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
|
|
136
|
+
*/const $x=Ve("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
|
|
141
|
+
*/const dm=Ve("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
|
|
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"}]]);/**
|
|
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
|
|
151
|
+
*/const vj=Ve("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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
226
|
+
*/const Bu=Ve("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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
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"}]]);/**
|
|
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
|
|
261
|
+
*/const Ju=Ve("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 CC=Ue("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function jC(n){if(n.value===null)return n.text??"";switch(n.key){case"coverage":return`${Math.round(n.value)}×`;case"tmb":return n.value<.01?n.value.toPrecision(2):n.value.toFixed(2);default:return n.value.toFixed(2)}}function EC(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const NC=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function O1(n){if(!n)return"";const s=new Date(n);return Number.isNaN(s.getTime())?"":NC.format(s)}function lm(n,s){return n.startsWith(`${s}_`)?n.slice(s.length+1):n}function Oh(n){return n==null?"–":n.toFixed(2)}const sy={missense_variant:"Missense",stop_gained:"Nonsense",stop_lost:"Stop lost",start_lost:"Start lost",frameshift_variant:"Frameshift",inframe_deletion:"In-frame deletion",inframe_insertion:"In-frame insertion",splice_acceptor_variant:"Splice acceptor",splice_donor_variant:"Splice donor",splice_region_variant:"Splice region",synonymous_variant:"Synonymous",intron_variant:"Intronic",upstream_gene_variant:"Upstream",downstream_gene_variant:"Downstream","5_prime_UTR_variant":"5′ UTR","3_prime_UTR_variant":"3′ UTR"};function _C(n,s){const i=(n??s??"").split("&")[0];if(!i)return"–";if(sy[i])return sy[i];const r=i.replace(/_/g," ");return r.charAt(0).toUpperCase()+r.slice(1)}function Fr(n,s){return`chr${n}:${s.toLocaleString("en-US")}`}const On=[["1",249250621],["2",243199373],["3",198022430],["4",191154276],["5",180915260],["6",171115067],["7",159138663],["8",146364022],["9",141213431],["10",135534747],["11",135006516],["12",133851895],["13",115169878],["14",107349540],["15",102531392],["16",90354753],["17",81195210],["18",78077248],["19",59128983],["20",63025520],["21",48129895],["22",51304566],["X",155270560]],zh=.0025,MC=On.reduce((n,[,s])=>n+s,0),RC=1-zh*On.length,Yu=(()=>{const n={};let s=zh/2;for(const[i,r]of On){const u=r/MC*RC;n[i]=[s,s+u],s+=u+zh}return n})(),iy=Object.fromEntries(On);function Hu(n,s){const i=n.replace(/^chr/,""),r=Yu[i];if(!r)return null;const u=Math.min(Math.max(s,0),iy[i]);return r[0]+u/iy[i]*(r[1]-r[0])}function ry(n,s,i,r){const u=r*2*Math.PI-Math.PI/2;return[n+i*Math.cos(u),s+i*Math.sin(u)]}function Vd(n,s,i,r,u){const[d,h]=ry(n,s,i,r),[m,p]=ry(n,s,i,u),y=u-r>.5?1:0;return`M${d.toFixed(2)},${h.toFixed(2)} A${i},${i} 0 ${y} 1 ${m.toFixed(2)},${p.toFixed(2)}`}function Dh(n,s="start"){let i=null;for(const d of On){const[h,m]=d,[p,y]=Yu[h];if(n<p&&s==="end"&&i)return{chrom:i[0],pos:i[1]};if(n<=y)return{chrom:h,pos:Math.round(Math.max(0,(n-p)/(y-p))*m)};i=d}const[r,u]=On[On.length-1];return{chrom:r,pos:u}}function Or(n,s){const i=s>=1e6?0:s>=1e5?1:2;return`${(n/1e6).toFixed(i)} Mb`}const TC={hero:{box:220,ring:78,ringW:10,gain:93,gainW:7,amp:94,ampW:13,loss:63,lossW:7,drv:50,drvW:9},switcher:{box:48,ring:16,ringW:4.5,gain:21,gainW:3,amp:21,ampW:4.5,loss:11,lossW:3,drv:0,drvW:0},mini:{box:20,ring:7,ringW:2.6,gain:7,gainW:2.6,amp:7,ampW:2.6,loss:7,lossW:2.6,drv:0,drvW:0}},oy=.004,uy=.003;function AC(n,s,i){const r=Hu(n,s),u=Hu(n,i);return r===null||u===null?null:u-r<oy?[r,r+oy]:[r,u]}function $d(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function OC(n,s,i){return n===1?`one ${s}`:`${n} ${i}`}function z1(n){const i=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([h,m,p])=>{const y=n.events.filter(C=>C.kind===h);if(y.length===0)return[];const x=[...new Set(y.map(C=>C.chrom))],v=x.length>6?[...x.slice(0,6),`${x.length-6} more`]:x,b=x.length===1?`chromosome ${x[0]}`:`chromosomes ${$d(v)}`,w=h==="amp"&&y.length===1&&y[0].total_cn!==null?` (${Math.round(y[0].total_cn)} copies)`:"";return[`${OC(y.length,m,p)} on ${b}${w}`]}),r=i.length?$d(i):`no copy-number changes against ${n.baseline} copies`,u=[...new Set(n.drivers.map(h=>h.gene).filter(h=>!!h))].sort(),d=u.length?`Drivers in ${$d(u)}.`:"No drivers.";return`${r.charAt(0).toUpperCase()}${r.slice(1)}. ${d}`}function am({fingerprint:n,size:s,title:i,subtitle:r,className:u}){const d=TC[s],h=d.box/2,m=(n==null?void 0:n.events)??[],p=(n==null?void 0:n.drivers)??[],y=n?`Genome fingerprint: ${z1(n)}`:"No copy-number data";return f.jsxs("svg",{viewBox:`0 0 ${d.box} ${d.box}`,role:s==="mini"?void 0:"img","aria-label":s==="mini"?void 0:y,"aria-hidden":s==="mini"?!0:void 0,className:u,children:[f.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(Yu).map(([x,[v,b]])=>f.jsx("path",{className:"r-neu",strokeWidth:d.ringW,d:Vd(h,h,d.ring,v,b)},x)),m.map((x,v)=>{const b=AC(x.chrom,x.start,x.end);if(!b)return null;const w=x.kind==="loss"?d.loss:x.kind==="amp"?d.amp:d.gain,C=x.kind==="loss"?d.lossW:x.kind==="amp"?d.ampW:d.gainW;return f.jsx("path",{className:`r-${x.kind}`,strokeWidth:C,d:Vd(h,h,w,b[0],b[1])},`${x.chrom}-${x.start}-${v}`)}),d.drvW>0&&p.map((x,v)=>{const b=Hu(x.chrom,x.pos);return b===null?null:f.jsx("path",{className:"r-drv",strokeWidth:d.drvW,d:Vd(h,h,d.drv,b-uy/2,b+uy/2)},`${x.gene}-${x.pos}-${v}`)})]}),s==="hero"&&i&&f.jsxs(f.Fragment,{children:[f.jsx("text",{className:"t-ink",x:h,y:h-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:i}),r&&f.jsx("text",{className:"t-faint",x:h,y:h+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:r})]})]})}const zC={"DNA|WG":{label:"WGS",icon:qu},"RNA|WT":{label:"RNA",icon:aC}};function cy({children:n}){return f.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n})}function DC({sex:n}){const s=n==null?void 0:n.toUpperCase();return s==="MALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),f.jsx("path",{d:"M7.6 8.2c.5-2.9 2.4-4.7 4.6-4.7 2.6 0 4.4 1.7 4.4 4.3-2.2.1-4.2-.6-5.6-2.1"}),f.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),f.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):s==="FEMALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),f.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),f.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):f.jsx(SC,{size:16,"aria-hidden":!0})}const D1="wgts-patient-root";function HC(n,s){const i=n.getBoundingClientRect(),r=n.closest(".topbar"),u=r==null?void 0:r.parentElement,d=r&&u?u.getBoundingClientRect().top-r.getBoundingClientRect().top:0;return{x:i.left-s.left+i.width/2,y:i.top+d-s.top+i.height/2}}const H1=8;function Fd(n,s,i,r){const u=i>=n.x?1:-1,d=Math.min(H1,Math.abs(i-n.x)/2,(s-n.y-14)/2);return[`M${n.x},${n.y+14}`,`V${s-d}`,`Q${n.x},${s} ${n.x+u*d},${s}`,`H${i-u*d}`,`Q${i},${s} ${i},${s+d}`,`V${r}`].join(" ")}function LC(n,s,i){const r=i.x>s.x?1:-1,u=Math.min(H1,Math.abs(i.x-s.x)/2,(s.top-n)/2);return[`M${s.x},${s.top}`,`V${n+u}`,`Q${s.x},${n} ${s.x+r*u},${n}`,`H${i.x-r*u}`,`Q${i.x},${n} ${i.x},${n+u}`,`V${i.top}`].join(" ")}function UC(n,s,i){const r=s.left+s.width/2,u=i.left+i.width/2,d=n-7,m=(n-25-.25*d)/.75;return`M${r},${d} C${r},${m} ${u},${m} ${u},${d}`}function VC(n,s){var r,u;const i=n.samples.find(d=>d.id===s);for(const d of(i==null?void 0:i.experiments)??[]){const h=(r=n.experiments[d])==null?void 0:r.normal,m=h?(u=n.experiments[h])==null?void 0:u.sample:void 0;if(m&&m!==s)return m}return null}function $C({data:n,sampleId:s,fingerprint:i,onSample:r}){const u=E.useRef(null),[d,h]=E.useState(null),[m,p]=E.useState(!1);E.useEffect(()=>{if(!d||m)return;const R=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(R)},[d,m]);const y=new Set(n.failures.map(R=>R.sample)),x=E.useRef(s),[v,b]=E.useState(null);E.useEffect(()=>{if(x.current===s)return;const R=x.current;x.current=s,b(j=>({from:R,to:s,n:((j==null?void 0:j.n)??0)+1}))},[s]);const w=VC(n,s);E.useLayoutEffect(()=>{const R=u.current;if(!R)return;const j=()=>{const T=R.getBoundingClientRect(),H=document.getElementById(D1);if(!H)return;const D=Array.from(R.querySelectorAll("[data-sample]")).map(te=>{const k=te.getBoundingClientRect();return{id:te.dataset.sample,x:k.left-T.left+22,left:k.left-T.left,width:k.width,top:k.top-T.top,bottom:k.bottom-T.top}}),z=HC(H,T),Y=Math.min(...D.map(te=>te.top));h({root:z,trunk:Y-12,tabs:D})};if(j(),typeof ResizeObserver>"u")return;const F=new ResizeObserver(j);return F.observe(R),()=>F.disconnect()},[n,s]);const C=d==null?void 0:d.tabs.find(R=>R.id===s),N=w?d==null?void 0:d.tabs.find(R=>R.id===w):void 0,M=v?d==null?void 0:d.tabs.find(R=>R.id===v.from):void 0;return f.jsxs("div",{ref:u,className:"ltabs",children:[d&&f.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[d.tabs.map(R=>f.jsx("path",{d:Fd(d.root,d.trunk,R.x,R.top)},R.id)),C&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),M&&v&&v.to===C.id&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:LC(d.trunk,M,C)},`bead-${v.n}`)]}),C&&N&&f.jsxs("g",{className:"ltabs-match",children:[f.jsx("path",{d:UC(d.trunk,C,N)}),f.jsx("text",{x:(C.left+C.width/2+N.left+N.width/2)/2,y:d.trunk-27,children:"matched normal"})]})]}),C&&f.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:C.width,height:C.bottom-C.top,transform:`translate(${C.left}px, ${C.top}px)`}}),f.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(R=>{const j=R.id===s,F=i==null?void 0:i.samples.find(H=>H.sample===R.id),T=R.experiments.map(H=>({id:H,...n.experiments[H]})).filter(H=>H.technique);return f.jsxs("button",{type:"button",role:"tab","data-sample":R.id,"aria-selected":j,className:"ltab",onClick:()=>r(R.id),children:[f.jsxs("span",{className:"ltab-name",children:[R.category==="TUMOR"?f.jsx(am,{fingerprint:F,size:"mini",className:"h-[18px] w-[18px] flex-none"}):f.jsx(T1,{size:15,"aria-hidden":!0,className:"flex-none"}),lm(R.id,n.individual.id)," ",R.category==="TUMOR"?"tumour":"normal",y.has(R.id)&&f.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),f.jsxs("span",{className:"ltab-exps",children:[T.length===0&&f.jsx("span",{children:"No experiments"}),T.map(H=>{const D=zC[H.technique],z=(D==null?void 0:D.icon)??qu;return f.jsxs("span",{title:H.id,children:[f.jsx(z,{size:12,"aria-hidden":!0}),(D==null?void 0:D.label)??H.technique]},H.id)})]})]},R.id)})})]})}function FC({data:n,sampleId:s,fingerprint:i,onSample:r}){return f.jsx("div",{className:"ctabs",role:"tablist","aria-label":"Samples",children:n.samples.map(u=>{const d=i==null?void 0:i.samples.find(h=>h.sample===u.id);return f.jsxs("button",{type:"button",role:"tab","aria-selected":u.id===s,className:"ctab",onClick:()=>r(u.id),children:[u.category==="TUMOR"?f.jsx(am,{fingerprint:d,size:"mini",className:"h-[16px] w-[16px] flex-none"}):f.jsx(T1,{size:14,"aria-hidden":!0,className:"flex-none"}),lm(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Dr(n){let s=n;const i=new Set;return{get:()=>s,set:r=>{Object.is(r,s)||(s=r,i.forEach(u=>u()))},subscribe:r=>(i.add(r),()=>i.delete(r))}}function Iu(n){return E.useSyncExternalStore(n.subscribe,n.get,n.get)}const sm=Dr(!1),Br=()=>sm.set(!0),Eu=()=>sm.set(!1),BC=Dr(!0);function L1({individualId:n,subtitle:s,patientIcon:i,report:r,compact:u,headerInView:d=BC}){const h=!Iu(d),[m,p]=E.useState(!1),[y,x]=E.useState(!1);E.useEffect(()=>{const b=()=>x(window.scrollY>4);return b(),window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]);async function v(){try{await navigator.clipboard.writeText(window.location.href),p(!0),window.setTimeout(()=>p(!1),1600)}catch{window.prompt("Copy this link",window.location.href)}}return f.jsxs("div",{className:"topbar flex flex-wrap items-center justify-between gap-x-4 gap-y-3 px-8 pt-3 pb-2","data-scrolled":y,children:[f.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[f.jsx("button",{type:"button",className:"crumb",onClick:Br,title:"Browse projects and patients",children:"Patients"}),n&&f.jsxs(f.Fragment,{children:[f.jsx(nm,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),i&&f.jsx("span",{id:D1,className:"ltabs-icon",children:i}),f.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:n}),s&&f.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:s})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,f.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:v,children:f.jsx(dC,{size:16,"aria-hidden":!0})}),f.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:m?"Link copied":""})]}),u&&f.jsx("div",{className:"topbar-compact","data-open":h,inert:!h,"aria-hidden":!h,children:f.jsx("div",{children:u})})]})}function kC(){const n=tm(),[s,i]=E.useState("");return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx("aside",{className:"side","aria-label":"Navigation",children:f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})})]})}),f.jsxs("div",{className:"page",children:[f.jsx(L1,{}),f.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[f.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),f.jsx("p",{className:"m-0 max-w-[60ch] text-[14.5px]",style:{color:"var(--ink-2)"},children:"Browse the projects that have a dashboard and pick a patient, or enter an individual's system id to see its WGTS report as live charts and tables."}),f.jsx("div",{children:f.jsxs("button",{type:"button",className:"sc-btn sc-b1 gap-2",onClick:Br,children:[f.jsx(uC,{size:16,"aria-hidden":!0}),"Browse projects and patients"]})}),f.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:r=>{r.preventDefault(),s.trim()&&n(`/${s.trim()}`)},children:[f.jsxs("div",{className:"field w-[340px] max-w-full",children:[f.jsx(Du,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),f.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),f.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:s,onChange:r=>i(r.target.value)})]}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!s.trim(),children:"Open"})]})]})]})]})}class Xu extends Error{}class U1 extends Error{}function GC(){try{return localStorage.getItem(Th)}catch{return null}}function V1(n){try{n?localStorage.setItem(Th,n):localStorage.removeItem(Th)}catch{}}function $1(){const n=GC();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function Ca(n,s={}){const i=new URLSearchParams;for(const[d,h]of Object.entries(s))h&&i.set(d,h);const r=i.toString(),u=await fetch(`${Gn.apiHost}/wgts/api/${n}${r?`?${r}`:""}`,{headers:$1()});if(u.status===401)throw new Xu;if(u.status===403){const d=await u.json().catch(()=>({}));throw new U1(d.detail??"You may not see this patient's results.")}if(!u.ok)throw new Error(`The dashboard API answered ${u.status}.`);return await u.json()}async function qC(n){if(!(await fetch(`${Gn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");V1(n)}async function QC(n,s){const i=await fetch(`${Gn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:n,password:s})});if(!i.ok)throw new Error("Isabl did not accept that username and password.");const r=await i.json();V1(r.key)}async function F1(n){const s=await fetch(`${Gn.apiHost}/wgts/api/${n}`,{headers:$1()});if(s.status===401)throw new Xu;if(!s.ok)throw new Error(`The dashboard API answered ${s.status}.`);return await s.json()}const YC=()=>F1("projects/"),IC=n=>F1(`projects/${n}/individuals/`);function Hh(n){const s=n.toUpperCase();return s.startsWith("BATTENBERG")||s.startsWith("CNV_")?"cn":s.startsWith("ANNOT_SNVS")||s.startsWith("ANNOT_INDELS")||s.startsWith("FFPERASE")?"mut":s.startsWith("MSISENSOR")?"msi":"other"}function Ei(n){return`fam-${Hh(n)}`}function B1(n){return n.pk?`${n.app} #${n.pk}`:n.app}function Ft(n){return`${n.app}#${n.pk??""}`}const k1={drivers:"gene",coding:"position",all:"position"},XC=100;function fy(){return{scope:"drivers",sort:k1.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function G1(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function KC(n){const s={scope:n.scope,sort:n.sort,q:n.q.trim()||void 0,effects:n.effects.join(",")||void 0,flags:n.flags.join(",")||void 0,ffpe:n.ffpe?"all":void 0};return n.range&&(s[`${n.range.measure}_min`]=String(n.range.low),s[`${n.range.measure}_max`]=String(n.range.high)),s}const q1={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},Q1={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function ZC(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const Y1=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function PC(n){return Y1.test(n.trim())}function JC(n,s,i){return`chr${n}:${s.toLocaleString("en-US")}-${i.toLocaleString("en-US")}`}const WC={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function ej(n){var d;if(!n)return null;const s=n.split(";"),i=(d=n.match(/SOM=(\d+)/))==null?void 0:d[1],r=WC[s[0]];return!i&&!r?n:[i?`${Number(i).toLocaleString("en-US")} somatic ${i==="1"?"sample":"samples"}`:"",r].filter(Boolean).join(", ")}function tj(n){const s=n==null?void 0:n.match(/^(\d+)\/(\d+)$/);return s?`${s[1]} of ${s[2]} ${s[2]==="1"?"copy":"copies"}`:n}function nj(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const ul=(n,s)=>!(s instanceof Xu)&&n<2;function lj(n,s){return Ol({queryKey:["individual",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/`,{version:s}),retry:ul})}function aj(n,s,i){return Ol({queryKey:["metrics",n,s,i??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:s,version:i}),enabled:!!s,retry:ul})}function sj(n,s){return Ol({queryKey:["fingerprint",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:s}),retry:ul})}const Kr=(n,s)=>`individuals/${encodeURIComponent(n)}/${s}/`;function ij(n,s,i){return Ol({queryKey:["cn",n,s,i??null],queryFn:()=>Ca(Kr(n,"cn"),{sample:s,version:i}),enabled:!!s,retry:ul})}function rj(n,s,i,r,u){return Ol({queryKey:["ccf",n,s,i,r,u??null],queryFn:()=>Ca(Kr(n,"ccf"),{sample:s,measure:i,version:u,ffpe:r?"all":void 0}),enabled:!!s,retry:ul})}function oj(n,s,i){return Ol({queryKey:["signatures",n,s,i??null],queryFn:()=>Ca(Kr(n,"signatures"),{sample:s,version:i}),enabled:!!s,retry:ul})}function uj(n,s,i){return Ol({queryKey:["svs",n,s,i??null],queryFn:()=>Ca(Kr(n,"svs"),{sample:s,version:i}),enabled:!!s,retry:ul})}function cj(n,s,i,r){return tw({queryKey:["variants",n,s,i,r??null],queryFn:({pageParam:u})=>Ca(Kr(n,"variants"),{sample:s,version:r,...KC(i),page:String(u),page_size:String(XC)}),initialPageParam:1,getNextPageParam:(u,d,h)=>u.status!=="ok"||!u.data?void 0:d.reduce((p,y)=>p+(y.status==="ok"&&y.data?y.data.rows.length:0),0)<u.data.total?h+1:void 0,enabled:!!s,placeholderData:Wy,retry:ul})}function fj(){return Ol({queryKey:["picker","projects"],queryFn:YC,staleTime:6e4,retry:ul})}function dj(n){return Ol({queryKey:["picker","patients",n],queryFn:()=>IC(n),staleTime:6e4,placeholderData:Wy,retry:ul})}const ci=6,hj=16,I1=7,Lu=6;function Bd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${Lu} V${n-s}`}function kd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${n-s} Q${ci},${n} ${ci+s},${n} H${hj}`}function mj(n,s){return`M${ci},${n} V${s}`}function gj(n,s,i,r){const[u,d]=E.useState(null),[h,m]=E.useState([]),[p,y]=E.useState(!1),[x,v]=E.useState(null),[b,w]=E.useState(280),C=n.map(D=>`${D.key}:${D.available}`).join();E.useLayoutEffect(()=>{if(!u)return;const D=()=>{const Y=Array.from(u.querySelectorAll(i));m(n.flatMap((te,k)=>{const ne=Y[k];if(!ne)return[];const ie=ne.offsetTop,Ce=ne.offsetHeight;return[{key:te.key,cy:ie+Ce/2,top:ie,height:Ce,available:te.available}]}))};if(D(),typeof ResizeObserver>"u")return;const z=new ResizeObserver(D);return z.observe(u),()=>z.disconnect()},[u,C,i,r]);const N=h.find(D=>D.key===s&&D.available),M=N?{top:N.top,height:N.height}:null;E.useEffect(()=>{if(!N||p)return;const D=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(D)},[N,p]);const[R,j]=E.useState(s);E.useEffect(()=>{if(R===s)return;const D=R;j(s),D&&s&&v(z=>({from:D,to:s,n:((z==null?void 0:z.n)??0)+1}))},[s,R]);const F=x?h.find(D=>D.key===x.from):void 0,[T,H]=E.useState(null);return E.useLayoutEffect(()=>{if(N&&T!==null&&T!==N.cy){const D=Math.abs(N.cy-T)/38;w(Math.round(Math.min(620,240+80*D)))}H(N?N.cy:null)},[N==null?void 0:N.key,N==null?void 0:N.cy]),{setBox:d,tree:h,on:N,light:M,glides:p,hop:x,leaving:F,duration:b}}function pj({tree:n,on:s,light:i,glides:r,hop:u,leaving:d}){return f.jsxs(f.Fragment,{children:[n.length>0&&f.jsxs("svg",{className:"ltabs-links side-tree","aria-hidden":!0,children:[f.jsx("circle",{cx:ci,cy:Lu,r:"2.5",className:"side-root"}),f.jsx("path",{d:Bd(n[n.length-1].cy)}),n.map(h=>f.jsx("path",{d:kd(h.cy),"data-off":h.available?void 0:"true"},h.key)),s&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}})]}),n.map(h=>f.jsxs("g",{className:"side-stub","data-active":h.key===(s==null?void 0:s.key)||void 0,children:[f.jsx("path",{className:"ltabs-haze",d:kd(h.cy)}),f.jsx("path",{className:"ltabs-on",d:kd(h.cy)})]},h.key)),s&&d&&u&&u.to===s.key&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:mj(d.cy,s.cy)},`bead-${u.n}`)]}),f.jsx("span",{className:"side-light","aria-hidden":!0,"data-on":i?"true":void 0,"data-glides":r||void 0,style:i?{transform:`translateY(${i.top}px)`,height:i.height}:void 0})]})}const Gd=[{key:"overview",label:"Overview",icon:fC},{key:"copyNumber",label:"Copy number",icon:nC},{key:"mutations",label:"Mutations",icon:mC},{key:"structuralVariants",label:"Structural variants",icon:xC},{key:"signatures",label:"Signatures and HRD",icon:sC},{key:"rna",label:"RNA",icon:wC,soon:!0},{key:"germline",label:"Germline",icon:yC,soon:!0},{key:"quality",label:"Quality",icon:rC,soon:!0}],dy="wgts-side-collapsed";function vj(){const[n,s]=E.useState(()=>{try{return localStorage.getItem(dy)==="1"}catch{return!1}});return[n,r=>{s(r);try{localStorage.setItem(dy,r?"1":"0")}catch{}}]}function yj({analyses:n,onPage:s,sampleLabel:i,picked:r,onPick:u,sections:d,activeStore:h,onSection:m}){const p=Iu(h),[y,x]=vj(),{setBox:v,...b}=gj(Gd.map(({key:z})=>({key:z,available:d.has(z)})),p,".sc-nav",y),[w,C]=E.useState(!1),[N,M]=E.useState(!1),R=["cn","mut","msi","other"],j=(z,Y)=>R.indexOf(Hh(z.app))-R.indexOf(Hh(Y.app))||z.app.localeCompare(Y.app),F=N||r!==null;E.useEffect(()=>{const z=Y=>{Y.key.toLowerCase()==="k"&&(Y.metaKey||Y.ctrlKey)&&(Y.preventDefault(),Br())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const T=n.filter(z=>z.role==="input"),H=T.filter(z=>s.has(Ft(z))).sort(j),D=[...T.filter(z=>!s.has(Ft(z))).sort(j),...n.filter(z=>z.role==="cohort")];return f.jsxs("aside",{className:"side","aria-label":"Patient navigation","data-collapsed":y||void 0,children:[f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients (Ctrl or ⌘ K)",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})}),f.jsx("button",{type:"button",className:"side-toggle","aria-label":y?"Expand the menu":"Collapse the menu","aria-expanded":!y,title:y?"Expand the menu":"Collapse the menu",onClick:()=>x(!y),children:y?f.jsx(vC,{size:17,"aria-hidden":!0}):f.jsx(pC,{size:17,"aria-hidden":!0})})]}),f.jsxs("nav",{ref:v,"aria-label":"Patient sections",className:"side-nav",style:{"--duration":`${b.duration}ms`},children:[f.jsx(pj,{...b}),Gd.map(({key:z,label:Y,icon:te,soon:k},ne)=>{const ie=d.has(z);return f.jsxs("div",{className:"contents",children:[k&&!Gd[ne-1].soon&&f.jsx("span",{className:"side-group",children:"Coming soon"}),f.jsxs("button",{type:"button",className:"sc-nav","aria-current":ie&&p===z?"location":void 0,"aria-label":Y,disabled:!ie,title:y?Y:ie?void 0:"Not available for this sample yet",onClick:()=>m(z),children:[f.jsx(te,{size:17,strokeWidth:1.7,"aria-hidden":!0}),f.jsx("span",{className:"side-text",children:Y})]})]},z)})]}),f.jsx("div",{className:"flex-auto"}),f.jsxs("section",{"aria-label":"Analyses on this page",className:"side-sources",children:[f.jsxs("button",{type:"button",className:"side-fold","aria-expanded":F,onClick:()=>M(z=>!z),children:["Analyses on this page",f.jsx("span",{className:"side-count",children:H.length}),f.jsx(M1,{size:14,"aria-hidden":!0,"data-open":F})]}),F&&H.length===0&&f.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",i||"this sample","."]}),F&&H.map(z=>{const Y=Ft(z),te=z.state==="failed",k=z.modules.filter(ne=>ne.status==="failed");return f.jsxs("button",{type:"button",className:`tb-src${te?" fail":""}`,"aria-pressed":r===Y,title:te?k.map(ne=>`${ne.label} failed`).join("; "):"Show what it feeds",onClick:()=>u(r===Y?null:Y),children:[te?f.jsx(A1,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"truncate",children:[z.app," ",z.version??""]}),te&&f.jsx("span",{className:"sr-only",children:", failed"}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Y)}),F&&D.length>0&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"tb-src","aria-expanded":w,onClick:()=>C(z=>!z),children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),w?"Hide":"Show"," ",D.length," more for ",i||"this sample"]}),w&&D.map(z=>f.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"truncate",children:z.role==="cohort"?`${z.app}${z.project?`, project ${z.project}`:""}`:`${z.app} ${z.version??""}`}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Ft(z)))]}),F&&f.jsx("span",{className:"px-3 pt-2 text-xs leading-normal",style:{color:"var(--menu-muted)"},children:"Pick one to see what it feeds."})]})]})}function es({envelope:n}){const s=n.status==="error",i=s?iC:oC;return f.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[f.jsx(i,{size:18,"aria-hidden":!0,style:{color:s?"var(--warn-ink)":"var(--chev)",flex:"none"}}),f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:s?"This panel could not be read":"Nothing to show here"}),n.warnings.map(r=>f.jsx("span",{children:r},r))]})]})}const Lh={summary:{title:"Genome fingerprint and summary",intro:"A one-glance portrait of the selected tumour: its copy-number changes and driver mutations drawn as a ring, a sentence describing them, and the headline measurements of the sample.",sections:[{heading:"The fingerprint ring",paragraphs:["The ring is the whole genome. Chromosome 1 starts at the top and the ring runs clockwise through chromosome 22 to X, each chromosome's arc in proportion to its length (GRCh37).","Copy-number changes are called against the tumour's baseline, its ploidy rounded to whole copies. Very short changes are drawn at a minimum length so they stay visible."],terms:[["Gains (outer track, orange)","Regions with at least one copy more than the baseline."],["Amplifications (outer track, darker and thicker)","Regions with three or more copies above the baseline."],["Losses (inner track, blue)","Regions with at least one copy fewer than the baseline."],["Drivers (black ticks)","Where the tumour's likely driver mutations sit (see the Mutations card for how they are flagged)."]]},{heading:"The sentence",paragraphs:["Written from the same data as the ring: how many amplifications, gains and losses there are and on which chromosomes, and which genes carry driver mutations."]},{heading:"The measurements",paragraphs:["Each tile shows a value, a small picture of where it sits on its scale when it has a natural one, and the analysis it came from. A tile with no value says why: the analysis was not run, it failed, or it does not apply to this kind of report (tumour-only reports have no matched normal)."],terms:[["Purity","The estimated fraction of cells in the sample that are tumour cells, from 0 to 1. The ring fills to the value."],["Ploidy","The tumour's average number of copies across the genome. The scale runs from 1 to 6 copies; the tall tick marks 2, a diploid genome."],["Coverage","The median sequencing depth of the tumour across the genome, in reads (×)."],["TMB per Mb","Tumour mutational burden: somatic SNVs and indels per megabase of genome. The report computes it from the counts of the SNV and indel calls. The scale is logarithmic, 0.01 to 100."],["MSI score","The MSIsensor score: the percentage of microsatellite sites that look unstable in the tumour."],["FGA","Fraction of the genome altered: the share of the genome whose copy number differs from the baseline, from 0 to 1. It is read from the project-wide Battenberg tables."]]},{heading:"Linking back to the analyses",paragraphs:[`Every value names its analysis, with version and Isabl id. Picking an analysis in the side menu's "Analyses on this page" highlights the tiles and cards it feeds.`]}]},copyNumber:{title:"Copy number",intro:"How many copies of each part of the genome the tumour carries, segment by segment, from chromosome 1 to X.",sections:[{heading:"What is drawn",paragraphs:['Each horizontal stroke is one segment: a stretch of the genome with a constant copy number. Its height is the number of copies, from 0 up to 8; anything higher is drawn at the top and the axis reads "8+". A gain or amplification rises as a column from the baseline to its stroke, and a loss falls to it, so the changes read as a landscape. Alternating grey bands mark the chromosomes, named in a strip along the bottom.',`The line across the plot is the baseline: the tumour's ploidy rounded to whole copies (labelled, for example, "2 copies"). Segments are coloured by how they compare with it.`],terms:[["Grey","Neutral: the same number of copies as the baseline."],["Orange","Gain: at least one copy more than the baseline."],["Dark orange","Amplification: three or more copies above the baseline."],["Blue","Loss: at least one copy fewer than the baseline."]]},{heading:"Total or allele-specific",paragraphs:["Total shows all copies together. Allele-specific, when the analysis provides it, splits each segment into its major allele (the more common parental copy, dark) and minor allele (light). Where the two are equal they are drawn slightly apart so both stay visible. A minor allele of 0 means one parent's copy is lost there (loss of heterozygosity)."]},{heading:"Driver genes",paragraphs:["A label along the top names each gene with likely driver mutations, one per gene, joined by a line to a dot on the segment the gene sits on, so its copy number can be read off at once. Hover one for its protein changes and the copies there."]},{heading:"Reading and moving around",terms:[["Hover a segment","Its call, copies (major + minor), coordinates and, when available, log2 ratio. A readout at the foot of the plot gives the pointer's place on the genome."],["Click a segment","Lists the mutations inside it in the Mutations card."],["Click a driver","Finds that gene in the Mutations card."],["Pinch, or Ctrl and scroll","Zooms around the pointer. Plain scrolling always scrolls the page."],["Drag","Pans a zoomed view."],["Arrow keys, plus and minus, 0","With the plot focused: pan, zoom in and out, and show the whole genome."],["Double-click a chromosome, or click its name","Glides to fill the view with it; the strip then counts megabases."],["The overview","The whole genome in miniature under the strip. Its window shows where the plot is: drag the window to move, its ends to resize, or click elsewhere to centre it there. The button by the title returns to the whole genome."],["Hover a mutation in the table","Marks it here, with a ring on the segment it sits on and its copy number."]]},{heading:"Tumour-only reports",paragraphs:["Without a matched normal there is no ploidy estimate, so segments come from CNVkit and are called against two copies. Allele-specific copy numbers are not available."]}]},mutations:{title:"Mutations",intro:"The tumour's somatic SNVs and indels that passed the callers' filters: how they are distributed across cancer cells, and a searchable, filterable table of every call.",sections:[{heading:"Which mutations",terms:[["Drivers","Likely drivers flagged by the report: coding mutations that match OncoKB or COSMIC driver annotations (the exact protein change, or a damaging consequence in a known cancer gene), plus known hotspots the callers missed and the report recovered from the tumour's reads."],["Coding","Mutations whose effect changes a protein, by the report's list of coding effects."],["All","Every PASS SNV and indel."]],paragraphs:["The counts beside each choice follow the search and filters, so they always say what you would see."]},{heading:"FFPE samples",paragraphs:["Formalin-fixed (FFPE) tissue damages DNA in ways that look like mutations, mostly C>T changes at low allele fractions. For an FFPE sample, FFPERASE scores each SNV and indel for how likely it is to be such an artifact, and the report counts only the calls scored at or below its threshold (quoted beside the table). Its SNV, indel and coding totals and the TMB leave the rest out.",`The report marks each call it leaves out, and the dashboard follows that mark: the Coding and All counts, the table and the curve leave those calls out, and the card's subtitle says so. Drivers are all listed, as in the report, and any the filter would remove carry an "FFPE filtered" tag. "Show filtered calls", under FFPE filter beside the table, brings the removed calls back, tagged the same way.`]},{heading:"Cancer cell fraction and variant allele fraction",paragraphs:["The curve across the top is a smoothed histogram of every PASS mutation; driver mutations sit on it as labelled dots, and the diamond on the axis is the median. Switch between the two measures:"],terms:[["CCF",'Cancer cell fraction: the estimated share of cancer cells carrying the mutation, corrected for purity and copy number. Around 1 (the "clonal" mark) means nearly every cancer cell has it, which suggests it arose early; clearly below 1 means a subclone. Estimates can land somewhat above 1. Shown from 0 to 2.'],["VAF","Variant allele fraction: the share of sequencing reads at the position that carry the mutation, from 0 to 1. Raw, not corrected for purity or copy number. Tumour-only reports open on VAF, since CCF needs a matched normal."]]},{heading:"Filtering by the curve",paragraphs:["Drag across the curve to keep only mutations in that CCF or VAF range: the curve stays lit inside the range and fades outside it, and the range is read out at its foot. Drag the edges to resize it, or its body to move it. The range appears with the other filters and can be removed there, or by clicking the curve."]},{heading:"The table",terms:[["Gene and position","The gene, and the mutation's chromosome and position (GRCh37)."],["Change","The protein change, with the cDNA change beneath."],["Effect","What the mutation does to the gene, from the VEP consequence (or the report's effect). Truncating effects are in bold."],["VAF and CCF bars","The value with a bar for quick comparison; the CCF bar's tick marks 1, clonal."],["Driver","Flagged as a likely driver (shown when the table is not already limited to drivers)."],["Hotspot","The exact protein change is a known recurrent cancer hotspot."],["In DMP","The same mutation was also found by the patient's clinical MSK-IMPACT (DMP) sequencing."],["FFPE filtered","FFPE samples only: the report's FFPE artifact filter leaves this call out of its counts (see FFPE samples)."]]},{heading:"Opening a row",terms:[["Variant","SNV or indel, with the reference and alternate bases."],["Reads","Reads supporting the mutation out of all reads at the position. Only hotspots the report recovered from the tumour's reads have them; the callers' tables give no single count."],["Normal VAF","The mutation's allele fraction in the matched normal; near 0 for a somatic mutation."],["Mutant copies","How many copies of that part of the genome carry the mutation, out of all copies there."],["Consequence","The full VEP consequence."],["COSMIC","How many samples in COSMIC carry it, and how closely they match (exact change, same position, codon or gene)."],["Expression","The gene's expression in the tumour's RNA, in transcripts per million, when RNA was sequenced."],["Gene role","Whether the gene is a known oncogene or tumour suppressor gene (TSG)."],["Show on copy number","Zooms the Copy number card to the mutation's chromosome and marks it."]]},{heading:"Searching and filtering",paragraphs:["Search takes a gene, a protein or cDNA change, a COSMIC term, or a locus such as chr12:25,398,284 or a range such as chr8:1-50,000,000. Press / anywhere on the page to jump to it. Each filter's count is how many rows you would get by ticking it, given everything else."],terms:[["Missense","One amino acid replaced by another."],["Truncating","Stop gained or lost, start lost, or a frameshift."],["Splice","Changes a splice site or splice region."],["In-frame","Inserts or deletes amino acids without shifting the reading frame."],["Synonymous","Changes the DNA but not the amino acid."],["Other","Everything else, such as intronic, UTR or upstream changes."]]}]},structuralVariants:{title:"Structural variants",intro:"The tumour's rearrangements as the report shows them: those with a breakpoint in an oncogene or tumour suppressor, those that take in a whole gene, and how all of them group into rearrangement signatures.",sections:[{heading:"Which rearrangements",paragraphs:["The report works from the high-confidence structural variants of ANNOT_SVS, which keeps calls made by two or more callers (SvABA, BRASS and GRIDSS) and annotates the genes they touch with AnnotSV. The count beside the title is how many of these the report counts, its rearrangements total.",`The tables keep the rearrangements whose genes include an oncogene or tumour suppressor, by the report's gene lists. It also searches the callers' raw calls for known rearrangements the high-confidence set can miss, such as CIC fusions, and adds them; a rescued event that is not a two-caller PASS says so in its callers, as in "gridss (CIC rescued)".`]},{heading:"The two tables",terms:[["Rearranged oncogenes and tumour suppressors",'One row per rearrangement and gene it hits, with the gene and breakpoint on each side. A gene near a breakpoint rather than in it is named as the report names it, such as "TERT +/- 100Kb".'],["Whole-gene rearrangements","Rearrangements that take in a whole oncogene or tumour suppressor, from start to end: a deletion of the whole gene, for example."],["Role","Whether the row's genes include an oncogene, a tumour suppressor or both, as the report colours its rows. Click a role above the tables to show only its rows."],["Left and right","Each breakpoint's gene, position (GRCh37) and where it falls in the gene, as AnnotSV writes it (intron5, exon2-exon5). Breakpoints are ordered by chromosome, then position."],["Callers and support","The callers that made the call, and the most reads any of them gives in support."],["Pileups","Supporting reads over all reads at each breakpoint in the tumour's alignments, left then right."],["Expression","For tumours with RNA: whether each gene's expression is high or low against each expression cohort (p63 is cohort project 63): at or above its 90th percentile, at or below its 10th, or neither (None). N/A means the cohort has no value for the gene."]],paragraphs:["Open a row to see both breakpoints, show them on the copy-number card, or copy their IGV loci."]},{heading:"Rearrangement signatures",paragraphs:["WGSPOST groups the tumour's rearrangements the way rearrangement signatures are described: clustered (rearrangements that sit unusually close together, as in chromothripsis) or dispersed, then by class and, except for translocations, by size from under 1 kb to over 1 Mb. Each bar is how many rearrangements fall in a group, grouped under its class; lighter bars are the clustered ones, in the shaded zone. A group with none shows a short stub on the baseline. Hover a bar for its name and its share of all rearrangements, or a class in the key to light its bars.","WGSPOST counts from its own copy of the calls, so its total can differ slightly from the report's rearrangements count."],terms:[["Deletion","A stretch of the genome lost between two breakpoints."],["Tandem duplication","A stretch copied next to itself."],["Inversion","A stretch turned around in place."],["Translocation","A join between two chromosomes."]]}]},signaturesHrd:{title:"Signatures and HRD",intro:"Which mutational processes left their mark on the tumour, set against tumours of the same disease, and whether it shows homologous recombination deficiency (HRD), as the report shows them.",sections:[{heading:"Mutational signatures",paragraphs:["WGSPOST fits known COSMIC substitution signatures to the tumour's somatic SNVs and estimates how many mutations each one accounts for. The left column is this tumour: each band is a signature's share of its mutations, the largest first.","The right column is the average of tumours of the same disease in the cohort (n is how many), each tumour's shares averaged and scaled to the cohort's average mutation count. A ribbon joins each signature's two bands, widening or narrowing with its share, so a signature can be followed from the tumour to its cohort; a label on the ribbon says how many percentage points the tumour leads or trails the cohort by, where the difference is at least 5. Hover a band, a ribbon or a row of the table for the numbers.","Seven signatures get colours of their own (eight when there are no more than eight); any beyond that are drawn together as Other. A tumour without a cohort to compare shows its own shares as one column."],terms:[["Signature","A pattern of substitutions, by the base change and its neighbours, that a mutational process leaves (SBS1, SBS5)."],["Aetiology","The process the report links a signature to, when it names one."]]},{heading:"HRD scores",paragraphs:["Two classifiers estimate whether the tumour has lost homologous recombination repair, as BRCA1 or BRCA2 loss does: HRDetect, from the substitution, indel and rearrangement patterns below, and CHORD, from its own set of mutation features. The report rates each HIGH at or above its threshold and LOW below it; the line on each gauge is the threshold."]},{heading:"HRDetect features",paragraphs:["The six features HRDetect weighs, for every tumour in the cohort and this one, each scaled from 0 (the cohort's lowest) to 1 (its highest). Each row is one feature: the pin is this tumour, the dots beneath are the cohort's samples, the shaded band is the middle half of the cohort and the line in it the median. With eight or more cohort samples a smoothed outline of how the samples are spread is drawn above the dots; with fewer it is left out, because it would suggest more than the data says. The words at the right say how many of the other cohort samples the tumour is above. Hover a row for the unscaled value. For FFPE samples the tumour's values come from its FFPE-filtered analysis."],terms:[["Del. MH","The share of deletions with microhomology at their ends, a sign of repair by end joining."],["SBS3 and SBS8","Substitution signatures 3 and 8."],["RS3 and RS5","Rearrangement signatures 3 (small tandem duplications) and 5 (deletions)."],["HRD index","Loss of heterozygosity, telomeric allelic imbalance and large-scale state transitions, combined."]]}]}},xj={summary:{BATTENBERG:"Tumour purity and ploidy, and the copy-number segments the ring's gains and losses are called from.","BATTENBERG cohort":"Project-wide Battenberg tables, which hold the FGA value and the cohort it is compared with.",CNV_UNMATCHED:"Copy-number segments of a tumour-only report (CNVkit), which the ring's gains and losses are called from.",MOSDEPTH:"The median sequencing coverage.",MSISENSOR:"The MSI score.",MSISENSOR_UNMATCHED:"The MSI score of a tumour-only report.",ANNOT_SNVS:"Somatic SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS:"Somatic indel calls: their count goes into TMB, and driver indels are marked on the ring.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls: their count goes into TMB, and driver indels are marked on the ring.",WGSPOST:"Cancer cell fractions of the mutations, read together with the driver calls marked on the ring."},copyNumber:{BATTENBERG:"Every segment drawn: total copies, major and minor allele copies, and the ploidy the baseline is rounded from.","BATTENBERG cohort":"Project-wide Battenberg tables the report reads alongside this run; they hold the FGA, and are not drawn here.",CNV_UNMATCHED:"The segments of a tumour-only report (CNVkit), drawn against two copies."},mutations:{ANNOT_SNVS:"The tumour's PASS somatic SNVs and their annotation: gene, protein and cDNA change, effect, VAF, read counts, normal VAF and COSMIC.",ANNOT_INDELS:"The tumour's PASS somatic indels and their annotation, as for SNVs.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls and their annotation.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls and their annotation.",WGSPOST:"Each mutation's cancer cell fraction (CCF) and how many copies carry it.",BATTENBERG:"Ploidy, which fills in the copy count where WGSPOST has none, and purity, which gives a CCF to hotspots recovered from the tumour's reads.",FFPERASE_SNVS:"FFPE samples: each SNV's artifact score. Calls scoring above the report's threshold are left out of the counts.",FFPERASE_INDELS:"FFPE samples: each indel's artifact score. Calls scoring above the report's threshold are left out of the counts."},structuralVariants:{ANNOT_SVS:"The high-confidence structural variants and their AnnotSV gene annotation: the rearrangements the report counts and the rows of its tables.",ANNOT_SVS_UNMATCHED:"Tumour-only structural variants and their annotation, kept when rare in the population.",SVABA:"Raw SvABA calls, searched for known rearrangements the high-confidence set missed (rescued events).",GRIDSS:"Raw GRIDSS calls, searched for rescued events like SvABA's.",SVABA_UNMATCHED:"Raw tumour-only SvABA calls, searched for rescued events.",GRIDSS_UNMATCHED:"Raw tumour-only GRIDSS calls, searched for rescued events.",WGSPOST:"The rearrangement-signature counts.",WGSPOST_UNMATCHED:"The rearrangement-signature counts of a tumour-only report."},signaturesHrd:{WGSPOST:"The tumour's signature contributions, its HRDetect and CHORD scores, and its HRDetect features.",WGSPOST_FFPE:"For an FFPE sample, the same from the FFPE-filtered calls.","WGSPOST cohort":"The cohort's signature contributions and HRDetect features, which the tumour is compared with."}};function Sj(n,s){const i=s.role==="cohort"||s.app.endsWith("Project Application"),r=s.app.replace(/ Project Application$/,""),u=xj[n];return(i?u[`${r} cohort`]:u[r])??(i?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function bj({topic:n,lineage:s,subject:i,onClose:r}){const u=Lh[n],d=E.useId(),h=E.useRef(null),m=s.filter(T=>T.role!=="cohort"&&!T.app.endsWith("Project Application")),p=s.filter(T=>!m.includes(T)),y=E.useRef(r);y.current=r,E.useEffect(()=>{var Y;const T=document.activeElement;(Y=h.current)==null||Y.focus();const H=document.documentElement,D=H.style.overflow;H.style.overflow="hidden";const z=te=>{te.key==="Escape"&&y.current()};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z),H.style.overflow=D,T==null||T.focus()}},[]);const x=[...u.sections.map(T=>T.heading),"Sources"],v=x.map((T,H)=>`${d}-s${H}`),[b,w]=E.useState(0),C=E.useRef(null),N=E.useRef(!1),M=E.useRef(null),R=E.useRef(0);E.useEffect(()=>{const T=C.current;if(!T)return;const H=24,D=()=>{const te=T.getBoundingClientRect().top,k=Math.max(0,T.scrollHeight-T.clientHeight),ne=v.map(ee=>{const P=document.getElementById(ee);return P?P.getBoundingClientRect().top-te:1/0}),ie=Math.max(0,...ne.map(ee=>Number.isFinite(ee)?ee+T.scrollTop-k-H:0)),Ce=H+(k>0?ie*Math.min(1,T.scrollTop/k):0);let X=0;ne.forEach((ee,P)=>{ee<=Ce&&(X=P)}),w(X)},z=()=>{if(N.current){M.current===null?(window.clearTimeout(R.current),R.current=window.setTimeout(()=>M.current=T.scrollTop,160)):Math.abs(T.scrollTop-M.current)>4&&(N.current=!1,M.current=null,D());return}D()},Y=()=>{N.current&&M.current===null&&(window.clearTimeout(R.current),N.current=!1,D())};return D(),T.addEventListener("scroll",z,{passive:!0}),T.addEventListener("wheel",Y,{passive:!0}),T.addEventListener("touchstart",Y,{passive:!0}),()=>{window.clearTimeout(R.current),T.removeEventListener("scroll",z),T.removeEventListener("wheel",Y),T.removeEventListener("touchstart",Y)}},[]);const j=T=>{var D;const H=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;N.current=!0,M.current=null,w(T),window.clearTimeout(R.current),R.current=window.setTimeout(()=>{var z;return M.current=((z=C.current)==null?void 0:z.scrollTop)??0},160),(D=document.getElementById(v[T]))==null||D.scrollIntoView({behavior:H?"auto":"smooth",block:"start"})},F=T=>f.jsxs("li",{className:"info-source",children:[f.jsx("span",{className:`tb-dot ${Ei(T.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"info-source-text",children:[T.pk?f.jsxs("a",{className:"info-source-name info-source-link",href:j1(T.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),f.jsxs("span",{className:"mono info-source-pk",children:["#",T.pk]}),f.jsx(lC,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):f.jsxs("span",{className:"info-source-name",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),T.project?f.jsxs("span",{className:"info-source-pk",children:["project ",T.project]}):null]}),f.jsx("span",{className:"info-source-role",children:Sj(n,T)})]})]},Ft(T));return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:T=>T.target===T.currentTarget&&r(),children:f.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":d,children:[f.jsx("button",{ref:h,type:"button",className:"info-close","aria-label":"Close",onClick:r,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[f.jsx("span",{className:"info-kicker",children:i??"About"}),f.jsx("h2",{id:d,children:u.title}),f.jsx("ol",{children:x.map((T,H)=>f.jsx("li",{children:f.jsx("button",{type:"button","aria-current":H===b?"true":void 0,onClick:()=>j(H),children:T})},T))})]}),f.jsxs("div",{ref:C,className:"info-main",children:[f.jsx("p",{className:"info-intro",children:u.intro}),u.sections.map((T,H)=>{var D;return f.jsxs("section",{id:v[H],className:"info-section",children:[f.jsx("h3",{children:T.heading}),(D=T.paragraphs)==null?void 0:D.map(z=>f.jsx("p",{children:z},z)),T.terms&&f.jsx("dl",{children:T.terms.map(([z,Y])=>f.jsxs("div",{children:[f.jsx("dt",{children:z}),f.jsx("dd",{children:Y})]},z))})]},T.heading)}),f.jsxs("section",{id:v[v.length-1],className:"info-section","aria-label":"Sources",children:[f.jsx("h3",{children:"Sources"}),f.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),s.length===0&&f.jsx("p",{children:"No analyses recorded for this card."}),f.jsx("ul",{className:"info-sources",children:m.map(F)}),p.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("h4",{children:"Cohort runs"}),f.jsx("ul",{className:"info-sources",children:p.map(F)})]})]})]})]})}),document.body)}function hy(n){return n.split(" ").map(s=>/^[A-Z0-9]{2,}$/.test(s)?s:s.toLowerCase()).join(" ")}function X1({topic:n,lineage:s,subject:i}){const[r,u]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${hy(Lh[n].title)}`,title:`About ${hy(Lh[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:f.jsx(cC,{size:15,"aria-hidden":!0})}),r&&f.jsx(bj,{topic:n,lineage:s,subject:i,onClose:()=>u(!1)})]})}function wj({lineage:n,children:s}){const[i,r]=E.useState(!1),u=n.filter(h=>h.role!=="cohort"),d=n.filter(h=>h.role==="cohort");return f.jsxs("div",{className:"sc-cf",children:[s,s&&f.jsx("span",{className:"flex-auto"}),n.length>0&&f.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),u.map(h=>h.pk?f.jsxs("a",{className:"sc-src sc-src-link",href:j1(h.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""," #",h.pk]},Ft(h)):f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""]},Ft(h))),d.length>0&&f.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":i,onClick:()=>r(h=>!h),children:[i?"Hide":"+"," ",d.length," cohort ",d.length===1?"run":"runs"]}),i&&d.map(h=>f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),h.app,h.project?`, project ${h.project}`:""," ",h.pk?`#${h.pk}`:""]},Ft(h)))]})}function K1(...n){const s=new Map;for(const i of n.flat())i&&!s.has(Ft(i))&&s.set(Ft(i),i);return[...s.values()]}const Ku=E.forwardRef(function({title:s,subtitle:i,controls:r,lineage:u,picked:d,footer:h,className:m="",info:p,expandable:y,children:x},v){const b=!!d&&u.some(N=>Ft(N)===d),[w,C]=Cj();return f.jsxs(f.Fragment,{children:[w&&f.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>C(!1)}),f.jsxs("section",{ref:v,className:`sc-card flex flex-col ${m}`,"data-picked":b,"data-full":w||void 0,"aria-label":s,children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-5 pb-4",children:[f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsx("h2",{className:"m-0 text-[19px] font-semibold tracking-tight",children:s}),i&&f.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:i})]}),(r||p||y)&&f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,y&&f.jsx("button",{type:"button",className:"sc-ib","aria-label":w?"Exit full screen":`Expand ${s.toLowerCase()} to full screen`,title:w?"Exit full screen (Esc)":"Expand to full screen","aria-pressed":w,onClick:()=>C(!w),children:w?f.jsx(gC,{size:16,"aria-hidden":!0}):f.jsx(hC,{size:16,"aria-hidden":!0})}),p&&f.jsx(X1,{topic:p,lineage:u,subject:typeof i=="string"?i:void 0})]})]}),f.jsx("div",{className:"min-w-0 flex-auto",children:x}),(u.length>0||h)&&f.jsx(wj,{lineage:u,children:h})]})]})});function Cj(){const[n,s]=E.useState(!1);return E.useEffect(()=>{if(!n)return;const i=document.documentElement,r=i.style.overflow;i.style.overflow="hidden";const u=d=>{var h,m;d.key==="Escape"&&((m=(h=d.target)==null?void 0:h.closest)!=null&&m.call(h,"input, textarea, select")||document.querySelector(".info-backdrop")||s(!1))};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),i.style.overflow=r}},[n]),[n,s]}function Zr({label:n,envelope:s,loading:i,skeletonHeight:r=160,children:u}){return f.jsxs(f.Fragment,{children:[i&&!s&&f.jsx("div",{className:"px-5 py-3",children:f.jsx("div",{className:"skeleton",style:{height:r},"aria-label":`Loading ${n}`})}),s&&s.status!=="ok"&&f.jsx("div",{className:"px-5 py-4",children:f.jsx(es,{envelope:s})}),(s==null?void 0:s.status)==="ok"&&s.data!==null&&u(s.data),(s==null?void 0:s.status)==="ok"&&s.warnings.length>0&&f.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")})]})}function jj({title:n,subtitle:s,controls:i,envelope:r,loading:u,picked:d,skeletonHeight:h=160,footer:m,className:p="",info:y,children:x}){return f.jsx(Ku,{title:n,subtitle:s,controls:i,lineage:(r==null?void 0:r.lineage)??[],picked:d,footer:m,className:p,info:y,children:f.jsx(Zr,{label:n,envelope:r,loading:u,skeletonHeight:h,children:x})})}function Ej(n,s){const[i,r]=E.useState(null),[u,d]=E.useState(!1);return E.useLayoutEffect(()=>{const h=n.current;if(!h)return;const m=()=>{const y=h.querySelector('[aria-pressed="true"]');r(y?{x:y.offsetLeft,y:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}:null)};if(m(),typeof ResizeObserver>"u")return;const p=new ResizeObserver(m);p.observe(h);for(const y of Array.from(h.children))p.observe(y);return()=>p.disconnect()},[n,s]),E.useEffect(()=>{if(i&&!u){const h=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(h)}},[i,u]),{thumb:i,moving:u}}function Zu({label:n,options:s,value:i,onChange:r,className:u=""}){const d=E.useRef(null),{thumb:h,moving:m}=Ej(d,i);return f.jsxs("div",{ref:d,className:`sc-track ${u}`,role:"group","aria-label":n,children:[h&&f.jsx("span",{className:"sc-thumb","data-moving":m,"aria-hidden":!0,style:{width:h.width,height:h.height,transform:`translate(${h.x}px, ${h.y}px)`}}),s.map(p=>f.jsx("button",{type:"button",className:"sc-seg","aria-pressed":p.value===i,disabled:p.disabled,title:p.title,onClick:()=>r(p.value),children:p.label},p.value))]})}function Nj(n){var i;const s=[];return n.mode==="unmatched"&&s.push("Tumour only"),n.individual.germline_consent&&s.push("Germline consented"),(i=n.individual.dmp_id)!=null&&i.startsWith("P-")&&s.push("DMP linked"),s}function _j({data:n,onVersion:s}){const i=n.report,[r,u]=E.useState(!1),d=E.useRef(null);E.useEffect(()=>{if(!r)return;const m=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)},p=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",p)}},[r]);const h=Nj(n);return f.jsxs("div",{ref:d,className:"report-menu",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2","aria-expanded":r,"aria-haspopup":"dialog",onClick:()=>u(m=>!m),children:["Report ",i.version,f.jsx(M1,{size:14,"aria-hidden":!0})]}),r&&f.jsxs("div",{className:"report-pop",role:"dialog","aria-label":"Report",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),f.jsx(Zu,{label:"Report version",value:i.version,onChange:m=>{s(m),u(!1)},options:n.versions.map(m=>({value:m.version,label:m.version}))})]}),f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["WGTS_REPORT ",i.analysis?`run #${i.analysis}`:"run indexed by hand",i.built?`, built ${O1(i.built)}`:""]}),h.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(m=>f.jsx("span",{className:"sc-chip",children:m},m))})]})]})}const Uh=["purity","ploidy","coverage","tmb","msi","fga"];function Mj({value:n}){const i=2*Math.PI*13,r=Math.min(Math.max(n,0),1);return f.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${r*i} ${i}`,transform:"rotate(-90 17 17)"})]})}function my({value:n,min:s,max:i,ticks:r,reference:u}){const d=h=>4+(Math.min(Math.max(h,s),i)-s)/(i-s)*64;return f.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[f.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),r.map(h=>f.jsx("line",{x1:d(h),x2:d(h),y1:h===u?5:9,y2:"15",className:"kpi-tick",strokeWidth:h===u?1.5:1},h)),f.jsx("circle",{cx:d(n),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function Rj({metric:n}){const s=n.value;if(s===null)return null;switch(n.key){case"purity":case"fga":return f.jsx(Mj,{value:s});case"ploidy":return f.jsx(my,{value:s,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return f.jsx(my,{value:Math.log10(Math.max(s,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const Tj={purity:"Share of tumour cells, 0 to 1",fga:"Share of the genome altered, 0 to 1",ploidy:"On a scale of 1 to 6 copies; the tall tick marks 2",tmb:"On a log scale from 0.01 to 100 mutations per Mb"};function Aj({metric:n,picked:s}){const i=n.value===null&&!n.text,r=!!s&&n.sources.some(u=>Ft(u)===s);return f.jsxs("div",{className:"kpi","data-picked":r,title:Tj[n.key],children:[f.jsxs("span",{className:"kpi-top",children:[f.jsx("span",{className:"kpi-label",children:n.label}),f.jsx(Rj,{metric:n})]}),f.jsx("span",{className:"kpi-value","data-empty":i,children:i?EC(n):jC(n)}),n.sources.length>0?f.jsx("span",{className:"flex flex-col gap-0.5",children:n.sources.map(u=>f.jsxs("span",{className:"kpi-src",children:[f.jsx("span",{className:`tb-dot ${Ei(u.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"min-w-0",children:B1(u)})]},Ft(u)))}):f.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function Oj({sampleLabel:n,fingerprint:s,metrics:i,picked:r,lineage:u=[]}){var h;const d=(((h=i==null?void 0:i.data)==null?void 0:h.metrics)??[]).filter(m=>Uh.includes(m.key));return f.jsxs("section",{className:"sc-card relative flex flex-wrap items-center gap-x-8 gap-y-5 px-6 py-5","aria-label":`Genome fingerprint and summary of ${n}`,children:[f.jsx("span",{className:"absolute top-3 right-3",children:f.jsx(X1,{topic:"summary",lineage:u,subject:n})}),f.jsx(am,{fingerprint:s,size:"hero",title:n.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[f.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",n]}),f.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:s?z1(s):"No copy-number data for this sample."}),f.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),f.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),f.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[i===void 0&&Uh.map(m=>f.jsx("div",{className:"kpi","aria-hidden":!0,children:f.jsx("div",{className:"skeleton h-[70px]"})},m)),i&&i.status!=="ok"&&f.jsx("div",{className:"col-span-full",children:f.jsx(es,{envelope:i})}),d.map(m=>f.jsx(Aj,{metric:m,picked:r},m.key))]})]})}function zj({sampleLabel:n,failures:s,analyses:i}){return s.length===0?null:f.jsx("div",{className:"flex flex-col gap-2.5",children:s.map(r=>{const u=i.filter(d=>d.modules.some(h=>h.etl===r.etl&&h.status==="failed"));return f.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[f.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-[10px]",style:{background:"var(--warn-soft)",color:"var(--warn-ink)"},children:f.jsx(A1,{size:18,"aria-hidden":!0})}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[f.jsxs("span",{className:"text-[14.5px] font-semibold",children:[r.label," failed for ",n]}),f.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:r.message.split(`
|
|
267
|
-
`)[0]}),u.length>0&&f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",u.map(B1).join(", ")]})]})]},`${r.etl}-${r.node}`)})})}function Dj({onSignedIn:n}){const[s,i]=E.useState("password"),[r,u]=E.useState(""),[d,h]=E.useState(""),[m,p]=E.useState(""),[y,x]=E.useState(null),[v,b]=E.useState(!1),w=s==="password"?!!r&&!!d:!!m.trim();return f.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async C=>{C.preventDefault(),b(!0),x(null);try{s==="password"?await QC(r,d):await qC(m.trim()),n()}catch(N){x(N.message)}finally{b(!1)}},children:[f.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),s==="password"?f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",f.jsx("span",{className:"field",children:f.jsx("input",{id:"username",autoComplete:"username",value:r,onChange:C=>u(C.target.value)})})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",f.jsx("span",{className:"field",children:f.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:d,onChange:C=>h(C.target.value)})})]})]}):f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",f.jsx("span",{className:"field",children:f.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:m,onChange:C=>p(C.target.value)})}),f.jsx("span",{className:"text-xs font-normal",style:{color:"var(--muted)"},children:"The token the Isabl CLI uses. Admins find it under Auth Token in Django admin."})]}),y&&f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:y}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:v||!w,children:v?"Signing in":"Sign in"}),f.jsx("button",{type:"button",className:"self-start border-0 bg-transparent p-0 text-[13px] font-semibold",style:{color:"var(--link)",cursor:"pointer"},onClick:()=>{i(s==="password"?"token":"password"),x(null)},children:s==="password"?"Use an API token instead":"Use a username and password instead"})]})}const it=1e3,Vh=.35,Hj=8,Uu=.1;function Au(n,s){return(Hu(n,s)??0)*it}function ol(n){const[s,i]=Yu[n.replace(/^chr/,"")];return[s*it,i*it]}function qd(n,s,i){const[r,u]=n,d=Math.min(it,Math.max(Vh,(u-r)*i)),h=Math.min(Math.max(s-(s-r)/(u-r)*d,0),it-d);return[h,h+d]}function Nu(n,s){const i=n[1]-n[0],r=Math.min(Math.max(n[0]+s,0),it-i);return[r,r+i]}function Lj(n,s,i){const r=Math.min(Math.max(i,0),it);return s===0?[Math.min(r,n[1]-Vh),n[1]]:[n[0],Math.max(r,n[0]+Vh)]}function Uj(n,s,i){const r=(n[0]+n[1])/2+((s[0]+s[1])/2-(n[0]+n[1])/2)*i,[u,d]=[n[1]-n[0],s[1]-s[0]],h=Math.exp(Math.log(u)+(Math.log(d)-Math.log(u))*i),m=Math.min(Math.max(r-h/2,0),it-h);return[m,m+h]}function gy(n){return n[1]-n[0]<it-.5}function Vj(n){for(const[s]of On){const[i,r]=ol(s);if(n>=i&&n<=r)return s}return null}function $j(n,s){const i=n.segments.flatMap(u=>s==="total"?[u.total_cn]:[u.major_cn,u.minor_cn]),r=Math.max(...i.map(u=>u??0));return Math.min(Hj,Math.max(n.baseline+2,Math.ceil(r)))}function Fj(n){const s=10**Math.floor(Math.log10(n)),i=n/s;return(i<1.5?1:i<3.5?2:i<7.5?5:10)*s}function Bj(n,s,i=5){const r=On.filter(([b])=>{const[w,C]=ol(b);return C>n&&w<s});if(r.length!==1)return r.map(([b])=>{const[w,C]=ol(b);return{value:(w+C)/2,label:b}});const[u,d]=r[0],[h,m]=ol(u),p=(Math.max(n,h)-h)/(m-h)*d,y=(Math.min(s,m)-h)/(m-h)*d,x=Fj(Math.max(y-p,1)/i),v=[];for(let b=Math.ceil(p/x)*x;b<=y;b+=x)v.push({value:h+b/d*(m-h),label:Or(b,x)});return v}function kj(n,s){if(n<=.5&&s>=it-.5)return null;const i=Dh(n/it,"start"),r=Dh(s/it,"end");if(i.chrom===r.chrom){const u=(r.pos-i.pos)/10;return`chr${i.chrom}: ${Or(i.pos,u).replace(" Mb","")}–${Or(r.pos,u)}`}return`chr${i.chrom}:${Or(i.pos,1e6)} – chr${r.chrom}:${Or(r.pos,1e6)}`}function Gj(n){const{chrom:s,pos:i}=Dh(Math.min(Math.max(n,0),it)/it,"start");return`chr${s} · ${(i/1e6).toFixed(1)} Mb`}const Pu=n=>n.call??"neutral",qj={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},Z1={neutral:"var(--chev)",gain:"var(--gain)",amp:"var(--gain-strong)",loss:"var(--loss)"};function Qj(n){return{call:qj[Pu(n)],copies:n.total_cn===null?"? copies":`${n.total_cn} ${n.total_cn===1?"copy":"copies"}`,alleles:n.major_cn!==null&&n.minor_cn!==null?`${n.major_cn} + ${n.minor_cn}`:"",span:`chr${n.chrom}:${n.start.toLocaleString("en-US")}–${n.end.toLocaleString("en-US")}`,log2:n.log2!==null?n.log2.toFixed(2):""}}function Yj(n){const s=new Map;for(const i of n){const r=i.gene??"?",u=s.get(r)??{gene:r,x:Au(i.chrom,i.pos),chrom:i.chrom,pos:i.pos,changes:"",list:[]};i.protein_change&&u.list.push(i.protein_change),s.set(r,u)}return[...s.values()].map(({list:i,...r})=>({...r,changes:i.join(", ")})).sort((i,r)=>i.x-r.x)}function Qd(n,s,i){const r=s.replace(/^chr/,"");return n.segments.find(u=>u.chrom===r&&u.start<=i&&i<=u.end)}function Yd(n,s){return n?s==="total"?n.total_cn:n.major_cn:null}function Ij(n){const s=n.length;if(s===0)return"";const i=m=>m.toFixed(2);if(s===1)return`M${i(n[0][0])},${i(n[0][1])}`;const r=n.slice(1).map((m,p)=>m[0]-n[p][0]),u=n.slice(1).map((m,p)=>r[p]===0?0:(m[1]-n[p][1])/r[p]),d=n.map((m,p)=>p===0?u[0]:p===s-1?u[s-2]:u[p-1]*u[p]<=0?0:(u[p-1]+u[p])/2);for(let m=0;m<s-1;m++){if(u[m]===0){d[m]=0,d[m+1]=0;continue}const p=d[m]/u[m],y=d[m+1]/u[m],x=Math.hypot(p,y);x>3&&(d[m]=3*p*u[m]/x,d[m+1]=3*y*u[m]/x)}let h=`M${i(n[0][0])},${i(n[0][1])}`;for(let m=0;m<s-1;m++){const[p,y]=n[m],[x,v]=n[m+1];h+=` C${i(p+r[m]/3)},${i(y+d[m]*r[m]/3)} ${i(x-r[m]/3)},${i(v-d[m+1]*r[m]/3)} ${i(x)},${i(v)}`}return h}function $h(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u].left-n[d].left).forEach(u=>{let d=i.findIndex(h=>h+s<=n[u].left);d===-1&&(d=i.push(0)-1),i[d]=n[u].left+n[u].width,r[u]=d}),r}function Xj(n,s=4){const i=Math.max(n,1)/s,r=10**Math.floor(Math.log10(i)),u=i/r,d=Math.max(1,(u<=1?1:u<=2?2:u<=5?5:10)*r),h=[];for(let m=0;m<Math.max(n,1)+d&&(h.push(m),!(m>=n&&h.length>1));m+=d);return h}const Kj=n=>1-(1-n)**3;function Sa(n,s,i=500){return n.length*s*(i>=600?.6:.56)}function Ni({x:n,y:s,width:i,above:r=!1,children:u}){const d=n>i-320,h=r?Math.min(Math.max(n,110),i-110):n,m=r?"translate(-50%, calc(-100% - 6px))":`translate(${d?"calc(-100% - 14px)":"14px"}, -50%)`;return f.jsx("div",{className:"ctip",style:{left:h,top:s,transform:m},role:"presentation",children:u})}function Fh(n,s,i){const r=n.clientX;let u=!1;const d=m=>{const p=m.clientX-r;Math.abs(p)>3&&(u=!0),s(p,m)},h=()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),i==null||i(u)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",h),window.addEventListener("pointercancel",h)}function Pr(n=640){const s=E.useRef(null),[i,r]=E.useState(n);return E.useLayoutEffect(()=>{const u=s.current;if(!u)return;const d=()=>r(Math.round(u.clientWidth)||n);if(d(),typeof ResizeObserver>"u")return;const h=new ResizeObserver(d);return h.observe(u),()=>h.disconnect()},[n]),[s,i]}const py=36,Zj=14,zr=232,vy=22,oi=28,yy=19,Pj=480,Jj=E.memo(function({segments:s,spans:i,mode:r,shown:u,geo:d,hover:h,grad:m,onHover:p,onClick:y}){const x=u[1]-u[0],v=C=>d.plotL+(C-u[0])/x*d.plotW,b=C=>d.plotTop+(1-Math.min(Math.max(C,0),d.top)/d.top)*zr,w=b(d.baseline);return f.jsx("g",{children:s.map((C,N)=>{const[M,R]=i[N];if(R<u[0]-1||M>u[1]+1)return null;const j=Pu(C),F=v(M),T=Math.max(v(R)-F,j==="neutral"?2:7),H=h===N;if(r==="total"){if(C.total_cn===null)return null;const Y=b(C.total_cn);return f.jsxs("g",{className:"cn-seg","data-call":j,"data-on":H||void 0,children:[j!=="neutral"&&f.jsx("rect",{x:F,y:Math.min(Y,w),width:T,height:Math.abs(Y-w),fill:`url(#${m[j]})`,className:"cn-col"}),f.jsx("line",{x1:F,x2:F+T,y1:Y,y2:Y,style:{stroke:Z1[j]},className:"cn-line"}),f.jsx("rect",{x:F-2,y:Math.min(Y,w)-9,width:T+4,height:Math.abs(Y-w)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:Y}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)}if(C.major_cn===null||C.minor_cn===null)return null;const D=b(C.major_cn+Uu),z=b(C.minor_cn-Uu);return f.jsxs("g",{className:"cn-seg","data-on":H||void 0,children:[f.jsx("line",{x1:F,x2:F+T,y1:z,y2:z,className:"cn-line cn-minor"}),f.jsx("line",{x1:F,x2:F+T,y1:D,y2:D,className:"cn-line cn-major"}),f.jsx("rect",{x:F-2,y:Math.min(D,z)-9,width:T+4,height:Math.abs(D-z)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:D}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)})})}),Wj=E.memo(function({segments:s,spans:i,mode:r,top:u,baseline:d,plotL:h,plotW:m,y0:p}){const y=x=>p+3+(1-Math.min(x,u)/u)*(oi-6);return f.jsxs("g",{pointerEvents:"none",children:[On.map(([x],v)=>{const[b,w]=ol(x);return v%2===0?f.jsx("rect",{x:h+b/it*m,y:p,width:(w-b)/it*m,height:oi,className:"cn-mini-band"},x):null}),f.jsx("line",{x1:h,x2:h+m,y1:y(d),y2:y(d),className:"cn-mini-base"}),s.map((x,v)=>{const b=r==="total"?x.total_cn:x.major_cn;if(b===null)return null;const w=Pu(x),C=h+i[v][0]/it*m,N=Math.max((i[v][1]-i[v][0])/it*m,w==="neutral"?1:2);return f.jsx("line",{x1:C,x2:C+N,y1:y(b),y2:y(b),className:"cn-mini-line",style:{stroke:r==="total"?Z1[w]:"var(--ink-2)"}},v)})]})});function eE({data:n,mode:s,drivers:i,focus:r,locate:u,view:d,onView:h,onSegment:m,onGene:p}){const[y,x]=Pr(900),v=E.useRef(null),b=E.useId(),w={gain:`${b}-gain`,amp:`${b}-amp`,loss:`${b}-loss`},[C,N]=E.useState(d.window),M=E.useRef(C);M.current=C,E.useLayoutEffect(()=>{const Z=d.window,le=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!d.smooth||le){N(Z);return}const Me=M.current,Ve=performance.now();let Fe=0;const Ct=st=>{const et=Math.min(1,(st-Ve)/Pj);N(Uj(Me,Z,Kj(et))),et<1&&(Fe=requestAnimationFrame(Ct))};return Fe=requestAnimationFrame(Ct),()=>cancelAnimationFrame(Fe)},[d]);const[R,j]=E.useState(null),[F,T]=E.useState(null),[H,D]=E.useState(null),[z,Y]=E.useState(!1),te=E.useRef(!1),k=E.useMemo(()=>$j(n,s),[n,s]),ne=E.useMemo(()=>n.segments.some(Z=>Math.max(Z.total_cn??0,Z.major_cn??0)>k),[n,k]),ie=E.useMemo(()=>n.segments.map(Z=>[Au(Z.chrom,Z.start),Au(Z.chrom,Z.end)]),[n]),Ce=E.useMemo(()=>Yj(i),[i]),X=py,ee=Math.max(x-py-Zj,200),P=C[1]-C[0],J=Z=>X+(Z-C[0])/P*ee,ue=Z=>C[0]+(Z-X)/ee*P,Ee=Z=>Sa(Z,11.5,600)+14,je=E.useMemo(()=>{const Z=Ce.map(le=>({left:X+le.x/it*ee-Ee(le.gene)/2,width:Ee(le.gene)}));return Ce.length?Math.max(...$h(Z,4))+1:0},[Ce,X,ee]),Ie=(je?je*yy+8:4)+4,We=Ie+zr,A=We+10,V=A+vy+12,W=V+oi+6,se={plotL:X,plotW:ee,plotTop:Ie,top:k,baseline:n.baseline},he=Z=>Ie+(1-Math.min(Math.max(Z,0),k)/k)*zr,ye=Ce.map((Z,le)=>({m:Z,index:le,x:J(Z.x)})).filter(({x:Z})=>Z>=X-4&&Z<=X+ee+4),be=$h(ye.map(({m:Z,x:le})=>({left:le-Ee(Z.gene)/2,width:Ee(Z.gene)})),4),re=(Z,le)=>Z>=X&&Z<=X+ee&&le>=Ie&&le<=We,me=Z=>{const le=v.current.getBoundingClientRect();return[Z.clientX-le.left,Z.clientY-le.top]},rt=E.useCallback(Z=>h({window:Z,smooth:!1}),[h]),Bt=E.useCallback(Z=>h({window:Z,smooth:!0}),[h]),zn=E.useRef({shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt});zn.current={shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt},E.useEffect(()=>{const Z=y.current;if(!Z)return;const le=Me=>{if(!Me.ctrlKey||!v.current)return;const Ve=v.current.getBoundingClientRect(),Fe=Me.clientX-Ve.left,Ct=Me.clientY-Ve.top,st=zn.current;if(Fe<st.plotL||Fe>st.plotL+st.plotW||Ct<st.plotTop||Ct>st.plotBottom)return;Me.preventDefault();const et=st.shown[0]+(Fe-st.plotL)/st.plotW*(st.shown[1]-st.shown[0]),Yn=Math.max(-50,Math.min(50,Me.deltaY));st.move(qd(st.shown,et,Math.exp(Yn*.01)))};return Z.addEventListener("wheel",le,{passive:!1}),()=>Z.removeEventListener("wheel",le)},[y]),E.useEffect(()=>{u&&/^(\d+|X)$/.test(u.chrom.replace(/^chr/,""))&&Bt(ol(u.chrom))},[u,Bt]);const Nt=Z=>{if(Z.button!==0)return;const[le,Me]=me(Z);if(!re(le,Me)||!gy(C))return;Z.preventDefault();const Ve=C;Y(!0),Fh(Z,Fe=>rt(Nu(Ve,-(Fe/ee)*(Ve[1]-Ve[0]))),Fe=>{Y(!1),Fe&&(te.current=!0,setTimeout(()=>te.current=!1,0))})},ot=Z=>{const[le,Me]=me(Z);D(re(le,Me)?le:null)},Ge=Z=>{const[le,Me]=me(Z);if(!re(le,Me))return;const Ve=Vj(ue(le));Ve&&Bt(ol(Ve))},pt=Z=>{const le=(C[0]+C[1])/2;if(Z.key==="ArrowLeft"||Z.key==="ArrowRight")Z.preventDefault(),rt(Nu(C,(Z.key==="ArrowLeft"?-.15:.15)*P));else if(Z.key==="+"||Z.key==="=")Bt(qd(C,le,.6));else if(Z.key==="-")Bt(qd(C,le,1/.6));else if(Z.key==="0"||Z.key==="Home")Bt([0,it]);else return;Z.key!=="ArrowLeft"&&Z.key!=="ArrowRight"&&Z.preventDefault()},cl=E.useCallback(Z=>{te.current||m(Z)},[m]),At=On.map(([Z],le)=>{const[Me,Ve]=ol(Z);return{chrom:Z,i:le,x0:J(Me),x1:J(Ve)}}).filter(({x0:Z,x1:le})=>le>X&&Z<X+ee),nn=At.length===1?At[0]:null,qn=nn?Bj(C[0],C[1],Math.max(2,Math.round(ee/120))):[],ut=(()=>{if(!r)return null;const Z=Au(r.chrom,r.pos);if(Z<C[0]||Z>C[1])return null;const le=Qd(n,r.chrom,r.pos),Me=Yd(le,s),Ve=s==="allele"&&Me!==null?Uu:0;return{x:J(Z),y:he((Me??n.baseline)+Ve),copies:(le==null?void 0:le.total_cn)??null}})(),fl=R?n.segments[R.index]:null,It=fl?Qj(fl):null,kt=F!==null?Ce[F]:null,zl=Z=>X+Z/it*ee,Gt={x0:zl(C[0]),x1:zl(C[1])},Qn=gy(C),ln=(Z,le)=>{Z.stopPropagation(),Z.preventDefault();const Me=C;Y(!0),Fh(Z,Ve=>{const Fe=Ve/ee*it;rt(le==="move"?Nu(Me,Fe):Lj(Me,le,Me[le]+Fe))},()=>Y(!1))};return f.jsxs("div",{ref:y,className:"cn","data-dragging":z||void 0,"data-zoomed":Qn||void 0,tabIndex:0,role:"group","aria-label":`Copy number of ${n.sample} across the genome, against ${n.baseline} copies.`,"aria-keyshortcuts":"ArrowLeft ArrowRight + - 0",onKeyDown:pt,children:[f.jsxs("svg",{ref:v,width:x,height:W,"aria-hidden":!0,onPointerDown:Nt,onPointerMove:ot,onPointerLeave:()=>D(null),onDoubleClick:Ge,children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:w.gain,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain)"},stopOpacity:.46}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain)"},stopOpacity:.04})]}),f.jsxs("linearGradient",{id:w.amp,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain-strong)"},stopOpacity:.62}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain-strong)"},stopOpacity:.05})]}),f.jsxs("linearGradient",{id:w.loss,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--loss)"},stopOpacity:.04}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--loss)"},stopOpacity:.46})]}),f.jsx("clipPath",{id:`${b}-plot`,children:f.jsx("rect",{x:X-4,y:Ie-2,width:ee+8,height:zr+4})})]}),f.jsx("g",{clipPath:`url(#${b}-plot)`,children:On.map(([Z],le)=>{const[Me,Ve]=ol(Z),Fe=J(Me),Ct=J(Ve);return le%2===0&&Ct>X&&Fe<X+ee?f.jsx("rect",{x:Fe,y:Ie,width:Ct-Fe,height:zr,className:"cn-band"},Z):null})}),Array.from({length:k+1},(Z,le)=>f.jsxs("g",{children:[f.jsx("line",{x1:X,x2:X+ee,y1:he(le),y2:he(le),className:"cn-grid"}),f.jsx("text",{x:X-10,y:he(le)+4,textAnchor:"end",className:"cn-tick",children:le===k&&ne?`${le}+`:le})]},le)),f.jsx("line",{x1:X,x2:X+ee,y1:he(n.baseline),y2:he(n.baseline),className:"cn-baseline"}),f.jsxs("text",{x:X+8,y:he(n.baseline)-7,className:"cn-baseline-label",children:[n.baseline," copies"]}),f.jsx("g",{className:"cn-reveal",children:f.jsx("g",{clipPath:`url(#${b}-plot)`,children:f.jsx(Jj,{segments:n.segments,spans:ie,mode:s,shown:C,geo:se,hover:R?R.index:null,grad:w,onHover:j,onClick:cl})})}),H!==null&&!z&&!R&&F===null&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:H,x2:H,y1:Ie,y2:We,className:"cn-guide"}),f.jsxs("g",{transform:`translate(${Math.min(Math.max(H,X+52),X+ee-52)} ${We-24})`,children:[f.jsx("rect",{x:-50,width:100,height:18,rx:9,className:"cn-readout"}),f.jsx("text",{y:12.5,textAnchor:"middle",className:"cn-readout-text",children:Gj(ue(H))})]})]}),ye.map(({m:Z,x:le,index:Me},Ve)=>{const Fe=Qd(n,Z.chrom,Z.pos),Ct=Yd(Fe,s),st=he((Ct??n.baseline)+(s==="allele"&&Ct!==null?Uu:0)),et=Ee(Z.gene),Yn=4+be[Ve]*yy,Dl=F===Me;return f.jsxs("g",{className:"cn-driver","data-on":Dl||void 0,onPointerDown:ja=>ja.stopPropagation(),onMouseEnter:()=>T(Me),onMouseLeave:()=>T(null),onClick:()=>p(Z.gene),children:[f.jsx("line",{x1:le,x2:le,y1:Yn+16,y2:st,className:"cn-leader"}),f.jsx("rect",{x:le-et/2,y:Yn,width:et,height:16,rx:8,className:"cn-chip"}),f.jsx("text",{x:le,y:Yn+11.5,textAnchor:"middle",className:"cn-gene",children:Z.gene}),f.jsx("circle",{cx:le,cy:st,r:Dl?6.5:5,className:"cn-dot"})]},Z.gene)}),ut&&r&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:ut.x,x2:ut.x,y1:Ie,y2:We,className:"cn-focus-line"}),f.jsx("circle",{cx:ut.x,cy:ut.y,r:6.5,className:"cn-focus-dot"}),(()=>{const Z=`${r.gene??"?"}${ut.copies!==null?` ${ut.copies} copies`:""}`,le=Sa(Z,11.5,600)+14,Me=ut.x+12+le>X+ee;return f.jsxs("g",{transform:`translate(${Me?ut.x-12-le:ut.x+12} ${ut.y-12})`,children:[f.jsx("rect",{width:le,height:22,rx:7,className:"cn-focus-chip"}),f.jsx("text",{x:7,y:15,className:"cn-focus-text",children:Z})]})})()]}),f.jsxs("g",{className:"cn-strip",children:[At.map(({chrom:Z,i:le,x0:Me,x1:Ve})=>{const Fe=Math.max(Me,X),Ct=Math.min(Ve,X+ee),st=Ct-Fe,et=nn?`chr${Z}`:Z;return f.jsxs("g",{className:"cn-pill",onClick:()=>Bt(ol(Z)),role:"presentation",children:[f.jsx("title",{children:`Zoom to chromosome ${Z}`}),f.jsx("rect",{x:Fe+.5,y:A,width:Math.max(st-1,1),height:vy,rx:7,"data-odd":le%2?"":void 0}),st>=Sa(et,11,600)+3&&f.jsx("text",{x:nn?Fe+10:(Fe+Ct)/2,y:A+15,textAnchor:nn?"start":"middle",children:et})]},Z)}),nn&&qn.map(Z=>{const le=J(Z.value);return le>Math.max(nn.x0,X)+70&&le<X+ee-20?f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:le,x2:le,y1:A+3,y2:A+9,className:"cn-mb-tick"}),f.jsx("text",{x:le,y:A+18,textAnchor:"middle",className:"cn-mb",children:Z.label})]},Z.value):null})]}),f.jsx(Wj,{segments:n.segments,spans:ie,mode:s,top:k,baseline:n.baseline,plotL:X,plotW:ee,y0:V}),f.jsx("rect",{x:X,y:V,width:ee,height:oi,fill:"transparent",className:"cn-mini-track",onPointerDown:Z=>{const[le]=me(Z),Me=C[1]-C[0],Ve=(le-X)/ee*it;Bt(Nu([Ve-Me/2,Ve+Me/2],0))}}),Qn&&f.jsxs("g",{className:"cn-mini-window",children:[f.jsx("rect",{x:Gt.x0,y:V-1,width:Math.max(Gt.x1-Gt.x0,4),height:oi+2,rx:6,onPointerDown:Z=>ln(Z,"move"),className:"cn-mini-win"}),[0,1].map(Z=>f.jsx("rect",{x:(Z===0?Gt.x0:Gt.x1)-4,y:V+oi/2-9,width:8,height:18,rx:4,className:"cn-mini-handle",onPointerDown:le=>ln(le,Z)},Z))]})]}),It&&R&&f.jsxs(Ni,{x:R.x+0,y:R.y+0,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"cn-call-dot","data-call":Pu(fl),"aria-hidden":!0}),It.call,f.jsx("span",{className:"ctip-sub",children:It.copies})]}),It.alleles&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Alleles"}),f.jsx("b",{children:It.alleles})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Region"}),f.jsx("b",{className:"mono",children:It.span})]}),It.log2&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"log2 ratio"}),f.jsx("b",{children:It.log2})]}),f.jsx("span",{className:"ctip-note",children:"Click to list the mutations in this segment"})]}),kt&&F!==null&&f.jsxs(Ni,{x:J(kt.x),y:Ie+10,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:kt.gene}),kt.changes&&f.jsx("span",{className:"ctip-sub",children:kt.changes})]}),(()=>{const Z=Yd(Qd(n,kt.chrom,kt.pos),s);return Z!==null?f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Copy number here"}),f.jsx("b",{children:Z})]}):null})(),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function Cr({color:n,label:s}){return f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:n}}),s]})}function tE({envelope:n,loading:s,picked:i,sampleLabel:r,drivers:u,focus:d,locate:h,onSegment:m,onGene:p}){var M;const[y,x]=E.useState("total"),[v,b]=E.useState({window:[0,it],smooth:!1}),w=((M=n==null?void 0:n.data)==null?void 0:M.allele_specific)??!1,C=kj(...v.window),N=E.useCallback(()=>b({window:[0,it],smooth:!0}),[]);return f.jsx(jj,{title:"Copy number",subtitle:`Copy number across the genome, ${r}`,info:"copyNumber",envelope:n,loading:s,picked:i,skeletonHeight:250,controls:f.jsxs(f.Fragment,{children:[C&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:C}),f.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:N,children:f.jsx(CC,{size:15,"aria-hidden":!0})})]}),f.jsx(Zu,{label:"Copy number view",value:w?y:"total",onChange:x,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!w}]})]}),footer:f.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[y==="total"||!w?f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--gain)",label:"Gain"}),f.jsx(Cr,{color:"var(--gain-strong)",label:"Amplification"}),f.jsx(Cr,{color:"var(--loss)",label:"Loss"})]}):f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--ink-2)",label:"Major allele"}),f.jsx(Cr,{color:"var(--chev)",label:"Minor allele"})]}),f.jsx("span",{style:{color:"var(--faint)"},children:"Pinch or Ctrl-scroll to zoom, drag to pan, or move the window in the overview. Double-click a chromosome, or click its name, to fill the view."})]}),children:R=>f.jsx(eE,{data:R,mode:w?y:"total",drivers:u,focus:d,locate:h,view:v,onView:b,onSegment:m,onGene:p})})}function nE(n){const[s,i]=n.range;return[[s,0],...n.bins.map(r=>[(r.x0+r.x1)/2,r.n]),[i,0]]}function Id(n,s){for(let i=1;i<n.length;i++){const[r,u]=n[i-1],[d,h]=n[i];if(s<=d)return d===r?h:u+(s-r)/(d-r)*(h-u)}return n[n.length-1][1]}function lE(n){return n==="ccf"?"CCF":"VAF"}function Ml(n,s){return Math.min(Math.max(s,n.range[0]),n.range[1])}function aE(n){const s=n.measure==="ccf"?.25:.1,i=[];for(let r=n.range[0];r<=n.range[1]+1e-9;r+=s)i.push(Math.round(r*100)/100);return i}function sE(n,s){return n.measure==="ccf"?s===1?"1.0":s.toFixed(2).replace(/0$/,""):s.toFixed(1)}const Ja=14,iE=22,jr=118,rE=40,li=19,xy=n=>Math.round(n*100)/100;function oE({data:n,range:s,focus:i,onRange:r,onGene:u}){const[d,h]=Pr(),m=E.useId(),p=E.useRef(null),[y,x]=E.useState(null),[v,b]=E.useState(null),[w,C]=n.range,N=h-iE,M=V=>Ja+(V-w)/(C-w)*(N-Ja),R=V=>w+(V-Ja)/(N-Ja)*(C-w),j=E.useMemo(()=>nE(n),[n]),F=Math.max(1,...j.map(V=>V[1])),T=V=>V*li+8+jr,H=(V,W)=>T(V)-W/(F*1.1)*jr,D=E.useMemo(()=>[...n.drivers].sort((V,W)=>V.value-W.value),[n.drivers]),z=D.map(V=>({left:M(Ml(n,V.value))-Sa(V.gene??"?",11.5,600)/2-6,width:Sa(V.gene??"?",11.5,600)+12})),Y=$h(z,4),te=D.length?Math.max(...Y)+1:0,k=T(te),ne=k+rE,ie=j.map(([V,W])=>[M(V),H(te,W)]),Ce=Ij(ie),X=`${Ce} L${M(C).toFixed(2)},${k} L${M(w).toFixed(2)},${k} Z`,ee=V=>V.kind==="new"?[Math.min(V.from,V.to),Math.max(V.from,V.to)]:V.kind==="edge"?[Math.min(V.fixed,V.to),Math.max(V.fixed,V.to)]:V.range,P=y?ee(y):s,J=V=>{const W=p.current.getBoundingClientRect();return R(Math.min(Math.max(V-W.left,Ja),N))},ue=(V,W,se)=>{V.preventDefault(),V.stopPropagation();let he=W(J(V.clientX));x(he),Fh(V,(ye,be)=>{he=se(he,J(be.clientX)),x(he)},()=>{const[ye,be]=ee(he);if(x(null),M(be)-M(ye)<4)return r(null);r([xy(Ml(n,ye)),xy(Ml(n,be))])})},Ee=(V,W)=>V.kind==="move"?V:{...V,to:W},je=(V,W)=>{if(V.kind!=="move")return V;const se=V.range[1]-V.range[0],he=Math.min(Math.max(V.range[0]+(W-V.grab),w),C-se);return{...V,grab:W,range:[he,he+se]}},$e=P?[M(Ml(n,P[0])),M(Ml(n,P[1]))]:null,Ie=lE(n.measure),We=i?n.measure==="ccf"?i.ccf:i.vaf:null,A=v!==null?D[v]:null;return f.jsxs("div",{ref:d,className:"dens","data-brushing":y?"":void 0,children:[f.jsxs("svg",{ref:p,width:h,height:ne,role:"img","aria-label":`${Ie} of ${n.total} variants in ${n.sample}${n.drivers.length?`, with ${n.drivers.map(V=>`${V.gene} at ${V.value.toFixed(2)}`).join(", ")}`:""}.`,onPointerDown:V=>{V.button===0&&ue(V,W=>({kind:"new",from:W,to:W}),Ee)},children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:`${m}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.42}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.03})]}),f.jsx("clipPath",{id:`${m}-spot`,children:$e&&f.jsx("rect",{x:$e[0],y:0,width:Math.max($e[1]-$e[0],0),height:ne})})]}),aE(n).map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:M(V),x2:M(V),y1:te*li+8,y2:k,className:"dens-grid","data-clonal":n.measure==="ccf"&&V===1?"":void 0}),f.jsx("text",{x:M(V),y:k+18,textAnchor:"middle",className:"dens-tick",children:sE(n,V)})]},V)),n.measure==="ccf"&&w<=1&&C>=1&&f.jsx("text",{x:M(1),y:k+31,textAnchor:"middle",className:"dens-clonal",children:"clonal"}),f.jsxs("g",{className:"dens-curve","data-dim":$e?"":void 0,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]}),$e&&f.jsx("g",{className:"dens-curve dens-lit",children:f.jsxs("g",{clipPath:`url(#${m}-spot)`,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]})}),f.jsx("line",{x1:Ja,x2:N,y1:k,y2:k,className:"dens-axis"}),n.median!==null&&f.jsx("path",{d:`M${M(n.median)},${k+1} l4.5,-6 l-4.5,-6 l-4.5,6 z`,className:"dens-median",children:f.jsx("title",{children:`Median ${n.median.toFixed(2)}`})}),D.map((V,W)=>{const se=Ml(n,V.value),he=M(se),ye=H(te,Id(j,se)),be=V.gene??"?",re=Sa(be,11.5,600)+12,me=8+Y[W]*li,rt=v===W;return f.jsxs("g",{className:"dens-driver","data-on":rt||void 0,onPointerDown:Bt=>Bt.stopPropagation(),onMouseEnter:()=>b(W),onMouseLeave:()=>b(null),onClick:()=>V.gene&&u(V.gene),children:[f.jsx("line",{x1:he,x2:he,y1:me+15,y2:ye,className:"dens-leader"}),f.jsx("rect",{x:he-re/2,y:me,width:re,height:16,rx:8,className:"dens-chip"}),f.jsx("text",{x:he,y:me+11.5,textAnchor:"middle",className:"dens-gene",children:be}),f.jsx("circle",{cx:he,cy:ye,r:rt?7:5.5,className:"dens-dot"})]},`${be}-${W}`)}),We!=null&&f.jsx("g",{className:"dens-focus",pointerEvents:"none",children:(()=>{const V=Ml(n,We),W=M(V),se=H(te,Id(j,V)),he=`${(i==null?void 0:i.gene)??"?"} ${We.toFixed(2)}`,ye=Sa(he,11,600)+14,be=W+12+ye>h;return f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:W,x2:W,y1:se,y2:k,className:"dens-focus-line"}),f.jsx("circle",{cx:W,cy:se,r:6.5,className:"dens-focus-dot"}),f.jsxs("g",{transform:`translate(${be?W-12-ye:W+12} ${se-11})`,children:[f.jsx("rect",{width:ye,height:22,rx:7,className:"dens-focus-chip"}),f.jsx("text",{x:7,y:15,className:"dens-focus-text",children:he})]})]})})()}),P&&$e&&f.jsxs("g",{className:"dens-brush",children:[f.jsx("rect",{x:$e[0],y:te*li+4,width:Math.max($e[1]-$e[0],0),height:jr+8,className:"dens-sel",onPointerDown:V=>ue(V,W=>({kind:"move",grab:W,range:P}),je)}),[0,1].map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:$e[V],x2:$e[V],y1:te*li+4,y2:k,className:"dens-sel-edge"}),f.jsx("rect",{x:$e[V]-5,y:te*li+4,width:10,height:jr+8,className:"dens-edge",onPointerDown:W=>ue(W,()=>({kind:"edge",fixed:P[1-V],to:P[V]}),Ee)}),f.jsx("rect",{x:$e[V]-3,y:k-jr/2-10,width:6,height:20,rx:3,className:"dens-grip",pointerEvents:"none"})]},V)),f.jsxs("g",{transform:`translate(${Math.min(Math.max(($e[0]+$e[1])/2,Ja+48),N-48)} ${k-30})`,pointerEvents:"none",children:[f.jsx("rect",{x:-48,y:0,width:96,height:20,rx:10,className:"dens-readout"}),f.jsxs("text",{y:14,textAnchor:"middle",className:"dens-readout-text",children:[P[0].toFixed(2)," – ",P[1].toFixed(2)]})]})]})]}),A&&v!==null&&f.jsxs(Ni,{x:M(Ml(n,A.value)),y:H(te,Id(j,Ml(n,A.value)))-22,width:h,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:A.gene??"?"}),A.protein_change&&f.jsxs("span",{className:"ctip-sub",children:[" ",A.protein_change]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:Ie}),f.jsx("b",{children:A.value.toFixed(2)})]}),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function uE({envelope:n,loading:s,measure:i,onMeasure:r,range:u,focus:d,onRange:h,onGene:m}){const p=i==="ccf"?"Cancer cell fraction":"Variant allele fraction",y=(n==null?void 0:n.status)==="ok"?n.data:null;return f.jsxs("div",{className:"strip",children:[f.jsxs("div",{className:"strip-head",children:[f.jsx("span",{className:"text-[13px] font-semibold",children:p}),y&&f.jsxs("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:[y.median!==null?`Median ${y.median.toFixed(2)}. `:"","Drag across the plot to filter the table."]}),f.jsx("span",{className:"flex-auto"}),f.jsx(Zu,{label:"Measure",value:i,onChange:r,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),f.jsx(Zr,{label:p,envelope:n,loading:s,skeletonHeight:180,children:x=>f.jsx(oE,{data:x,range:u,focus:d,onRange:h,onGene:m})})]})}const cE=Object.keys(q1),fE=Object.keys(Q1);function Sy(n,s){return n.includes(s)?n.filter(i=>i!==s):[...n,s]}function Xd({label:n,count:s,active:i,onClick:r}){return f.jsxs("button",{type:"button",className:"facet","aria-pressed":i,"data-empty":!i&&s===0,onClick:r,children:[f.jsx("span",{className:"facet-check","aria-hidden":!0,children:i&&f.jsx(_1,{size:11,strokeWidth:3})}),f.jsx("span",{className:"truncate",children:n}),f.jsx("span",{className:"facet-n",children:s===void 0?"":s.toLocaleString("en-US")})]})}function dE({table:n,data:s,onChange:i}){const r=s==null?void 0:s.facets.effects,u=s==null?void 0:s.facets.flags,d=n.range;return f.jsxs("aside",{className:"facets","aria-label":"Filters",children:[f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[f.jsx("span",{className:"facet-title",children:"Effect"}),cE.map(h=>f.jsx(Xd,{label:q1[h],count:r==null?void 0:r[h],active:n.effects.includes(h),onClick:()=>i({effects:Sy(n.effects,h)})},h))]}),f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[f.jsx("span",{className:"facet-title",children:"Flags"}),fE.map(h=>f.jsx(Xd,{label:Q1[h],count:u==null?void 0:u[h],active:n.flags.includes(h),onClick:()=>i({flags:Sy(n.flags,h)})},h))]}),(s==null?void 0:s.ffpe)&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[f.jsx("span",{className:"facet-title",children:"FFPE filter"}),f.jsx(Xd,{label:"Show filtered calls",count:s.ffpe.removed,active:n.ffpe,onClick:()=>i({ffpe:!n.ffpe})}),f.jsx("span",{className:"facet-note",children:s.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${s.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),d&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[f.jsxs("span",{className:"facet-title",children:[d.measure==="ccf"?"CCF":"VAF"," range"]}),f.jsxs("span",{className:"facet-range",children:[f.jsxs("span",{className:"mono",children:[d.low.toFixed(2)," – ",d.high.toFixed(2)]}),f.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>i({range:null}),children:f.jsx(Qu,{size:13,"aria-hidden":!0})})]})]}),G1(n)>0&&f.jsx("button",{type:"button",className:"facet-clear",onClick:()=>i({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}/**
|
|
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"})]})}/**
|
|
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
|
|
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`,`
|
|
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 Se(n,s,i,r){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[s]},key:!1,onChange:r}}function gE(n,s,i,r){const u=()=>{var h;return(h=d.getValue())!=null?h:n.options.renderFallbackValue},d={id:`${s.id}_${i.id}`,row:s,column:i,getValue:()=>s.getValue(r),renderValue:u,getContext:xe(()=>[n,i,s,d],(h,m,p,y)=>({table:h,column:m,row:p,cell:y,getValue:y.getValue,renderValue:y.renderValue}),Se(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,i,s,n)},{}),d}function pE(n,s,i,r){var u,d;const m={...n._getDefaultColumnDef(),...s},p=m.accessorKey;let y=(u=(d=m.id)!=null?d:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?u:typeof m.header=="string"?m.header:void 0,x;if(m.accessorFn?x=m.accessorFn:p&&(p.includes(".")?x=b=>{let w=b;for(const N of p.split(".")){var C;w=(C=w)==null?void 0:C[N]}return w}:x=b=>b[m.accessorKey]),!y)throw new Error;let v={id:`${String(y)}`,accessorFn:x,parent:r,depth:i,columnDef:m,columns:[],getFlatColumns:xe(()=>[!0],()=>{var b;return[v,...(b=v.columns)==null?void 0:b.flatMap(w=>w.getFlatColumns())]},Se(n.options,"debugColumns")),getLeafColumns:xe(()=>[n._getOrderColumnsFn()],b=>{var w;if((w=v.columns)!=null&&w.length){let C=v.columns.flatMap(N=>N.getLeafColumns());return b(C)}return[v]},Se(n.options,"debugColumns"))};for(const b of n._features)b.createColumn==null||b.createColumn(v,n);return v}const Qt="debugHeaders";function by(n,s,i){var r;let d={id:(r=i.id)!=null?r:s.id,column:s,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const h=[],m=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(m),h.push(p)};return m(d),h},getContext:()=>({table:n,header:d,column:s})};return n._features.forEach(h=>{h.createHeader==null||h.createHeader(d,n)}),d}const vE={createTable:n=>{n.getHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>{var d,h;const m=(d=r==null?void 0:r.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?d:[],p=(h=u==null?void 0:u.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?h:[],y=i.filter(v=>!(r!=null&&r.includes(v.id))&&!(u!=null&&u.includes(v.id)));return _u(s,[...m,...y,...p],n)},Se(n.options,Qt)),n.getCenterHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>(i=i.filter(d=>!(r!=null&&r.includes(d.id))&&!(u!=null&&u.includes(d.id))),_u(s,i,n,"center")),Se(n.options,Qt)),n.getLeftHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"left")},Se(n.options,Qt)),n.getRightHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"right")},Se(n.options,Qt)),n.getFooterGroups=xe(()=>[n.getHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getLeftFooterGroups=xe(()=>[n.getLeftHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getCenterFooterGroups=xe(()=>[n.getCenterHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getRightFooterGroups=xe(()=>[n.getRightHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getFlatHeaders=xe(()=>[n.getHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getLeftFlatHeaders=xe(()=>[n.getLeftHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterFlatHeaders=xe(()=>[n.getCenterHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getRightFlatHeaders=xe(()=>[n.getRightHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterLeafHeaders=xe(()=>[n.getCenterFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeftLeafHeaders=xe(()=>[n.getLeftFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getRightLeafHeaders=xe(()=>[n.getRightFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeafHeaders=xe(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(s,i,r)=>{var u,d,h,m,p,y;return[...(u=(d=s[0])==null?void 0:d.headers)!=null?u:[],...(h=(m=i[0])==null?void 0:m.headers)!=null?h:[],...(p=(y=r[0])==null?void 0:y.headers)!=null?p:[]].map(x=>x.getLeafHeaders()).flat()},Se(n.options,Qt))}};function _u(n,s,i,r){var u,d;let h=0;const m=function(b,w){w===void 0&&(w=1),h=Math.max(h,w),b.filter(C=>C.getIsVisible()).forEach(C=>{var N;(N=C.columns)!=null&&N.length&&m(C.columns,w+1)},0)};m(n);let p=[];const y=(b,w)=>{const C={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},N=[];b.forEach(M=>{const R=[...N].reverse()[0],j=M.column.depth===C.depth;let F,T=!1;if(j&&M.column.parent?F=M.column.parent:(F=M.column,T=!0),R&&(R==null?void 0:R.column)===F)R.subHeaders.push(M);else{const H=by(i,F,{id:[r,w,F.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${N.filter(D=>D.column===F).length}`:void 0,depth:w,index:N.length});H.subHeaders.push(M),N.push(H)}C.headers.push(M),M.headerGroup=C}),p.push(C),w>0&&y(N,w-1)},x=s.map((b,w)=>by(i,b,{depth:h,index:w}));y(x,h-1),p.reverse();const v=b=>b.filter(C=>C.column.getIsVisible()).map(C=>{let N=0,M=0,R=[0];C.subHeaders&&C.subHeaders.length?(R=[],v(C.subHeaders).forEach(F=>{let{colSpan:T,rowSpan:H}=F;N+=T,R.push(H)})):N=1;const j=Math.min(...R);return M=M+j,C.colSpan=N,C.rowSpan=M,{colSpan:N,rowSpan:M}});return v((u=(d=p[0])==null?void 0:d.headers)!=null?u:[]),p}const yE=(n,s,i,r,u,d,h)=>{let m={id:s,index:r,original:i,depth:u,parentId:h,_valuesCache:{},_uniqueValuesCache:{},getValue:p=>{if(m._valuesCache.hasOwnProperty(p))return m._valuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return m._valuesCache[p]=y.accessorFn(m.original,r),m._valuesCache[p]},getUniqueValues:p=>{if(m._uniqueValuesCache.hasOwnProperty(p))return m._uniqueValuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return y.columnDef.getUniqueValues?(m._uniqueValuesCache[p]=y.columnDef.getUniqueValues(m.original,r),m._uniqueValuesCache[p]):(m._uniqueValuesCache[p]=[m.getValue(p)],m._uniqueValuesCache[p])},renderValue:p=>{var y;return(y=m.getValue(p))!=null?y:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>mE(m.subRows,p=>p.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let p=[],y=m;for(;;){const x=y.getParentRow();if(!x)break;p.push(x),y=x}return p.reverse()},getAllCells:xe(()=>[n.getAllLeafColumns()],p=>p.map(y=>gE(n,m,y,y.id)),Se(n.options,"debugRows")),_getAllCellsByColumnId:xe(()=>[m.getAllCells()],p=>p.reduce((y,x)=>(y[x.column.id]=x,y),{}),Se(n.options,"debugRows"))};for(let p=0;p<n._features.length;p++){const y=n._features[p];y==null||y.createRow==null||y.createRow(m,n)}return m},xE={createColumn:(n,s)=>{n._getFacetedRowModel=s.options.getFacetedRowModel&&s.options.getFacetedRowModel(s,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():s.getPreFilteredRowModel(),n._getFacetedUniqueValues=s.options.getFacetedUniqueValues&&s.options.getFacetedUniqueValues(s,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=s.options.getFacetedMinMaxValues&&s.options.getFacetedMinMaxValues(s,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},P1=(n,s,i)=>{var r,u;const d=i==null||(r=i.toString())==null?void 0:r.toLowerCase();return!!(!((u=n.getValue(s))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(d))};P1.autoRemove=n=>kn(n);const J1=(n,s,i)=>{var r;return!!(!((r=n.getValue(s))==null||(r=r.toString())==null)&&r.includes(i))};J1.autoRemove=n=>kn(n);const W1=(n,s,i)=>{var r;return((r=n.getValue(s))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(i==null?void 0:i.toLowerCase())};W1.autoRemove=n=>kn(n);const ex=(n,s,i)=>{var r;return(r=n.getValue(s))==null?void 0:r.includes(i)};ex.autoRemove=n=>kn(n);const tx=(n,s,i)=>!i.some(r=>{var u;return!((u=n.getValue(s))!=null&&u.includes(r))});tx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const nx=(n,s,i)=>i.some(r=>{var u;return(u=n.getValue(s))==null?void 0:u.includes(r)});nx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const lx=(n,s,i)=>n.getValue(s)===i;lx.autoRemove=n=>kn(n);const ax=(n,s,i)=>n.getValue(s)==i;ax.autoRemove=n=>kn(n);const im=(n,s,i)=>{let[r,u]=i;const d=n.getValue(s);return d>=r&&d<=u};im.resolveFilterValue=n=>{let[s,i]=n,r=typeof s!="number"?parseFloat(s):s,u=typeof i!="number"?parseFloat(i):i,d=s===null||Number.isNaN(r)?-1/0:r,h=i===null||Number.isNaN(u)?1/0:u;if(d>h){const m=d;d=h,h=m}return[d,h]};im.autoRemove=n=>kn(n)||kn(n[0])&&kn(n[1]);const Tl={includesString:P1,includesStringSensitive:J1,equalsString:W1,arrIncludes:ex,arrIncludesAll:tx,arrIncludesSome:nx,equals:lx,weakEquals:ax,inNumberRange:im};function kn(n){return n==null||n===""}const SE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:Sn("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,s)=>{n.getAutoFilterFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);return typeof r=="string"?Tl.includesString:typeof r=="number"?Tl.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Tl.equals:Array.isArray(r)?Tl.arrIncludes:Tl.weakEquals},n.getFilterFn=()=>{var i,r;return Ju(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(i=(r=s.options.filterFns)==null?void 0:r[n.columnDef.filterFn])!=null?i:Tl[n.columnDef.filterFn]},n.getCanFilter=()=>{var i,r,u;return((i=n.columnDef.enableColumnFilter)!=null?i:!0)&&((r=s.options.enableColumnFilters)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var i;return(i=s.getState().columnFilters)==null||(i=i.find(r=>r.id===n.id))==null?void 0:i.value},n.getFilterIndex=()=>{var i,r;return(i=(r=s.getState().columnFilters)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.setFilterValue=i=>{s.setColumnFilters(r=>{const u=n.getFilterFn(),d=r==null?void 0:r.find(x=>x.id===n.id),h=ba(i,d?d.value:void 0);if(wy(u,h,n)){var m;return(m=r==null?void 0:r.filter(x=>x.id!==n.id))!=null?m:[]}const p={id:n.id,value:h};if(d){var y;return(y=r==null?void 0:r.map(x=>x.id===n.id?p:x))!=null?y:[]}return r!=null&&r.length?[...r,p]:[p]})}},createRow:(n,s)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=s=>{const i=n.getAllLeafColumns(),r=u=>{var d;return(d=ba(s,u))==null?void 0:d.filter(h=>{const m=i.find(p=>p.id===h.id);if(m){const p=m.getFilterFn();if(wy(p,h.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(r)},n.resetColumnFilters=s=>{var i,r;n.setColumnFilters(s?[]:(i=(r=n.initialState)==null?void 0:r.columnFilters)!=null?i:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function wy(n,s,i){return(n&&n.autoRemove?n.autoRemove(s,i):!1)||typeof s>"u"||typeof s=="string"&&!s}const bE=(n,s,i)=>i.reduce((r,u)=>{const d=u.getValue(n);return r+(typeof d=="number"?d:0)},0),wE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r>d||r===void 0&&d>=d)&&(r=d)}),r},CE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r<d||r===void 0&&d>=d)&&(r=d)}),r},jE=(n,s,i)=>{let r,u;return i.forEach(d=>{const h=d.getValue(n);h!=null&&(r===void 0?h>=h&&(r=u=h):(r>h&&(r=h),u<h&&(u=h)))}),[r,u]},EE=(n,s)=>{let i=0,r=0;if(s.forEach(u=>{let d=u.getValue(n);d!=null&&(d=+d)>=d&&(++i,r+=d)}),i)return r/i},NE=(n,s)=>{if(!s.length)return;const i=s.map(d=>d.getValue(n));if(!hE(i))return;if(i.length===1)return i[0];const r=Math.floor(i.length/2),u=i.sort((d,h)=>d-h);return i.length%2!==0?u[r]:(u[r-1]+u[r])/2},_E=(n,s)=>Array.from(new Set(s.map(i=>i.getValue(n))).values()),ME=(n,s)=>new Set(s.map(i=>i.getValue(n))).size,RE=(n,s)=>s.length,Kd={sum:bE,min:wE,max:CE,extent:jE,mean:EE,median:NE,unique:_E,uniqueCount:ME,count:RE},TE={getDefaultColumnDef:()=>({aggregatedCell:n=>{var s,i;return(s=(i=n.getValue())==null||i.toString==null?void 0:i.toString())!=null?s:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:Sn("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,s)=>{n.toggleGrouping=()=>{s.setGrouping(i=>i!=null&&i.includes(n.id)?i.filter(r=>r!==n.id):[...i??[],n.id])},n.getCanGroup=()=>{var i,r;return((i=n.columnDef.enableGrouping)!=null?i:!0)&&((r=s.options.enableGrouping)!=null?r:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.includes(n.id)},n.getGroupedIndex=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const i=n.getCanGroup();return()=>{i&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);if(typeof r=="number")return Kd.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Kd.extent},n.getAggregationFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(i=(r=s.options.aggregationFns)==null?void 0:r[n.columnDef.aggregationFn])!=null?i:Kd[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=s=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(s),n.resetGrouping=s=>{var i,r;n.setGrouping(s?[]:(i=(r=n.initialState)==null?void 0:r.grouping)!=null?i:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,s)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=i=>{if(n._groupingValuesCache.hasOwnProperty(i))return n._groupingValuesCache[i];const r=s.getColumn(i);return r!=null&&r.columnDef.getGroupingValue?(n._groupingValuesCache[i]=r.columnDef.getGroupingValue(n.original),n._groupingValuesCache[i]):n.getValue(i)},n._groupingValuesCache={}},createCell:(n,s,i,r)=>{n.getIsGrouped=()=>s.getIsGrouped()&&s.id===i.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&s.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=i.subRows)!=null&&u.length)}}};function AE(n,s,i){if(!(s!=null&&s.length)||!i)return n;const r=n.filter(d=>!s.includes(d.id));return i==="remove"?r:[...s.map(d=>n.find(h=>h.id===d)).filter(Boolean),...r]}const OE={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:Sn("columnOrder",n)}),createColumn:(n,s)=>{n.getIndex=xe(i=>[Hr(s,i)],i=>i.findIndex(r=>r.id===n.id),Se(s.options,"debugColumns")),n.getIsFirstColumn=i=>{var r;return((r=Hr(s,i)[0])==null?void 0:r.id)===n.id},n.getIsLastColumn=i=>{var r;const u=Hr(s,i);return((r=u[u.length-1])==null?void 0:r.id)===n.id}},createTable:n=>{n.setColumnOrder=s=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(s),n.resetColumnOrder=s=>{var i;n.setColumnOrder(s?[]:(i=n.initialState.columnOrder)!=null?i:[])},n._getOrderColumnsFn=xe(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(s,i,r)=>u=>{let d=[];if(!(s!=null&&s.length))d=u;else{const h=[...s],m=[...u];for(;m.length&&h.length;){const p=h.shift(),y=m.findIndex(x=>x.id===p);y>-1&&d.push(m.splice(y,1)[0])}d=[...d,...m]}return AE(d,i,r)},Se(n.options,"debugTable"))}},Zd=()=>({left:[],right:[]}),zE={getInitialState:n=>({columnPinning:Zd(),...n}),getDefaultOptions:n=>({onColumnPinningChange:Sn("columnPinning",n)}),createColumn:(n,s)=>{n.pin=i=>{const r=n.getLeafColumns().map(u=>u.id).filter(Boolean);s.setColumnPinning(u=>{var d,h;if(i==="right"){var m,p;return{left:((m=u==null?void 0:u.left)!=null?m:[]).filter(v=>!(r!=null&&r.includes(v))),right:[...((p=u==null?void 0:u.right)!=null?p:[]).filter(v=>!(r!=null&&r.includes(v))),...r]}}if(i==="left"){var y,x;return{left:[...((y=u==null?void 0:u.left)!=null?y:[]).filter(v=>!(r!=null&&r.includes(v))),...r],right:((x=u==null?void 0:u.right)!=null?x:[]).filter(v=>!(r!=null&&r.includes(v)))}}return{left:((d=u==null?void 0:u.left)!=null?d:[]).filter(v=>!(r!=null&&r.includes(v))),right:((h=u==null?void 0:u.right)!=null?h:[]).filter(v=>!(r!=null&&r.includes(v)))}})},n.getCanPin=()=>n.getLeafColumns().some(r=>{var u,d,h;return((u=r.columnDef.enablePinning)!=null?u:!0)&&((d=(h=s.options.enableColumnPinning)!=null?h:s.options.enablePinning)!=null?d:!0)}),n.getIsPinned=()=>{const i=n.getLeafColumns().map(m=>m.id),{left:r,right:u}=s.getState().columnPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"left":h?"right":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();return u?(i=(r=s.getState().columnPinning)==null||(r=r[u])==null?void 0:r.indexOf(n.id))!=null?i:-1:0}},createRow:(n,s)=>{n.getCenterVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left,s.getState().columnPinning.right],(i,r,u)=>{const d=[...r??[],...u??[]];return i.filter(h=>!d.includes(h.column.id))},Se(s.options,"debugRows")),n.getLeftVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"left"})),Se(s.options,"debugRows")),n.getRightVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.right],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"right"})),Se(s.options,"debugRows"))},createTable:n=>{n.setColumnPinning=s=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(s),n.resetColumnPinning=s=>{var i,r;return n.setColumnPinning(s?Zd():(i=(r=n.initialState)==null?void 0:r.columnPinning)!=null?i:Zd())},n.getIsSomeColumnsPinned=s=>{var i;const r=n.getState().columnPinning;if(!s){var u,d;return!!((u=r.left)!=null&&u.length||(d=r.right)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n.getLeftLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getRightLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getCenterLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r)=>{const u=[...i??[],...r??[]];return s.filter(d=>!u.includes(d.id))},Se(n.options,"debugColumns"))}};function DE(n){return n||(typeof document<"u"?document:null)}const Mu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Pd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),HE={getDefaultColumnDef:()=>Mu,getInitialState:n=>({columnSizing:{},columnSizingInfo:Pd(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Sn("columnSizing",n),onColumnSizingInfoChange:Sn("columnSizingInfo",n)}),createColumn:(n,s)=>{n.getSize=()=>{var i,r,u;const d=s.getState().columnSizing[n.id];return Math.min(Math.max((i=n.columnDef.minSize)!=null?i:Mu.minSize,(r=d??n.columnDef.size)!=null?r:Mu.size),(u=n.columnDef.maxSize)!=null?u:Mu.maxSize)},n.getStart=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(0,n.getIndex(i)).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.getAfter=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(n.getIndex(i)+1).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.resetSize=()=>{s.setColumnSizing(i=>{let{[n.id]:r,...u}=i;return u})},n.getCanResize=()=>{var i,r;return((i=n.columnDef.enableResizing)!=null?i:!0)&&((r=s.options.enableColumnResizing)!=null?r:!0)},n.getIsResizing=()=>s.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,s)=>{n.getSize=()=>{let i=0;const r=u=>{if(u.subHeaders.length)u.subHeaders.forEach(r);else{var d;i+=(d=u.column.getSize())!=null?d:0}};return r(n),i},n.getStart=()=>{if(n.index>0){const i=n.headerGroup.headers[n.index-1];return i.getStart()+i.getSize()}return 0},n.getResizeHandler=i=>{const r=s.getColumn(n.column.id),u=r==null?void 0:r.getCanResize();return d=>{if(!r||!u||(d.persist==null||d.persist(),Jd(d)&&d.touches&&d.touches.length>1))return;const h=n.getSize(),m=n?n.getLeafHeaders().map(R=>[R.column.id,R.column.getSize()]):[[r.id,r.getSize()]],p=Jd(d)?Math.round(d.touches[0].clientX):d.clientX,y={},x=(R,j)=>{typeof j=="number"&&(s.setColumnSizingInfo(F=>{var T,H;const D=s.options.columnResizeDirection==="rtl"?-1:1,z=(j-((T=F==null?void 0:F.startOffset)!=null?T:0))*D,Y=Math.max(z/((H=F==null?void 0:F.startSize)!=null?H:0),-.999999);return F.columnSizingStart.forEach(te=>{let[k,ne]=te;y[k]=Math.round(Math.max(ne+ne*Y,0)*100)/100}),{...F,deltaOffset:z,deltaPercentage:Y}}),(s.options.columnResizeMode==="onChange"||R==="end")&&s.setColumnSizing(F=>({...F,...y})))},v=R=>x("move",R),b=R=>{x("end",R),s.setColumnSizingInfo(j=>({...j,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=DE(i),C={moveHandler:R=>v(R.clientX),upHandler:R=>{w==null||w.removeEventListener("mousemove",C.moveHandler),w==null||w.removeEventListener("mouseup",C.upHandler),b(R.clientX)}},N={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),v(R.touches[0].clientX),!1),upHandler:R=>{var j;w==null||w.removeEventListener("touchmove",N.moveHandler),w==null||w.removeEventListener("touchend",N.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),b((j=R.touches[0])==null?void 0:j.clientX)}},M=LE()?{passive:!1}:!1;Jd(d)?(w==null||w.addEventListener("touchmove",N.moveHandler,M),w==null||w.addEventListener("touchend",N.upHandler,M)):(w==null||w.addEventListener("mousemove",C.moveHandler,M),w==null||w.addEventListener("mouseup",C.upHandler,M)),s.setColumnSizingInfo(R=>({...R,startOffset:p,startSize:h,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:r.id}))}}},createTable:n=>{n.setColumnSizing=s=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(s),n.setColumnSizingInfo=s=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(s),n.resetColumnSizing=s=>{var i;n.setColumnSizing(s?{}:(i=n.initialState.columnSizing)!=null?i:{})},n.resetHeaderSizeInfo=s=>{var i;n.setColumnSizingInfo(s?Pd():(i=n.initialState.columnSizingInfo)!=null?i:Pd())},n.getTotalSize=()=>{var s,i;return(s=(i=n.getHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getLeftTotalSize=()=>{var s,i;return(s=(i=n.getLeftHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getCenterTotalSize=()=>{var s,i;return(s=(i=n.getCenterHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getRightTotalSize=()=>{var s,i;return(s=(i=n.getRightHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0}}};let Ru=null;function LE(){if(typeof Ru=="boolean")return Ru;let n=!1;try{const s={get passive(){return n=!0,!1}},i=()=>{};window.addEventListener("test",i,s),window.removeEventListener("test",i)}catch{n=!1}return Ru=n,Ru}function Jd(n){return n.type==="touchstart"}const UE={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:Sn("columnVisibility",n)}),createColumn:(n,s)=>{n.toggleVisibility=i=>{n.getCanHide()&&s.setColumnVisibility(r=>({...r,[n.id]:i??!n.getIsVisible()}))},n.getIsVisible=()=>{var i,r;const u=n.columns;return(i=u.length?u.some(d=>d.getIsVisible()):(r=s.getState().columnVisibility)==null?void 0:r[n.id])!=null?i:!0},n.getCanHide=()=>{var i,r;return((i=n.columnDef.enableHiding)!=null?i:!0)&&((r=s.options.enableHiding)!=null?r:!0)},n.getToggleVisibilityHandler=()=>i=>{n.toggleVisibility==null||n.toggleVisibility(i.target.checked)}},createRow:(n,s)=>{n._getAllVisibleCells=xe(()=>[n.getAllCells(),s.getState().columnVisibility],i=>i.filter(r=>r.column.getIsVisible()),Se(s.options,"debugRows")),n.getVisibleCells=xe(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(i,r,u)=>[...i,...r,...u],Se(s.options,"debugRows"))},createTable:n=>{const s=(i,r)=>xe(()=>[r(),r().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),Se(n.options,"debugColumns"));n.getVisibleFlatColumns=s("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=s("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=s("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=s("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=s("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=i=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(i),n.resetColumnVisibility=i=>{var r;n.setColumnVisibility(i?{}:(r=n.initialState.columnVisibility)!=null?r:{})},n.toggleAllColumnsVisible=i=>{var r;i=(r=i)!=null?r:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((u,d)=>({...u,[d.id]:i||!(d.getCanHide!=null&&d.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(i=>!(i.getIsVisible!=null&&i.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(i=>i.getIsVisible==null?void 0:i.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>i=>{var r;n.toggleAllColumnsVisible((r=i.target)==null?void 0:r.checked)}}};function Hr(n,s){return s?s==="center"?n.getCenterVisibleLeafColumns():s==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const VE={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},$E={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:Sn("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:s=>{var i;const r=(i=n.getCoreRowModel().flatRows[0])==null||(i=i._getAllCellsByColumnId()[s.id])==null?void 0:i.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(n,s)=>{n.getCanGlobalFilter=()=>{var i,r,u,d;return((i=n.columnDef.enableGlobalFilter)!=null?i:!0)&&((r=s.options.enableGlobalFilter)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&((d=s.options.getColumnCanGlobalFilter==null?void 0:s.options.getColumnCanGlobalFilter(n))!=null?d:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>Tl.includesString,n.getGlobalFilterFn=()=>{var s,i;const{globalFilterFn:r}=n.options;return Ju(r)?r:r==="auto"?n.getGlobalAutoFilterFn():(s=(i=n.options.filterFns)==null?void 0:i[r])!=null?s:Tl[r]},n.setGlobalFilter=s=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(s)},n.resetGlobalFilter=s=>{n.setGlobalFilter(s?void 0:n.initialState.globalFilter)}}},FE={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:Sn("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let s=!1,i=!1;n._autoResetExpanded=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?r:!n.options.manualExpanding){if(i)return;i=!0,n._queue(()=>{n.resetExpanded(),i=!1})}},n.setExpanded=r=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(r),n.toggleAllRowsExpanded=r=>{r??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=r=>{var u,d;n.setExpanded(r?{}:(u=(d=n.initialState)==null?void 0:d.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const r=n.getState().expanded;return r===!0||Object.values(r).some(Boolean)},n.getIsAllRowsExpanded=()=>{const r=n.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let r=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(d=>{const h=d.split(".");r=Math.max(r,h.length)}),r},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,s)=>{n.toggleExpanded=i=>{s.setExpanded(r=>{var u;const d=r===!0?!0:!!(r!=null&&r[n.id]);let h={};if(r===!0?Object.keys(s.getRowModel().rowsById).forEach(m=>{h[m]=!0}):h=r,i=(u=i)!=null?u:!d,!d&&i)return{...h,[n.id]:!0};if(d&&!i){const{[n.id]:m,...p}=h;return p}return r})},n.getIsExpanded=()=>{var i;const r=s.getState().expanded;return!!((i=s.options.getIsRowExpanded==null?void 0:s.options.getIsRowExpanded(n))!=null?i:r===!0||r!=null&&r[n.id])},n.getCanExpand=()=>{var i,r,u;return(i=s.options.getRowCanExpand==null?void 0:s.options.getRowCanExpand(n))!=null?i:((r=s.options.enableExpanding)!=null?r:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let i=!0,r=n;for(;i&&r.parentId;)r=s.getRow(r.parentId,!0),i=r.getIsExpanded();return i},n.getToggleExpandedHandler=()=>{const i=n.getCanExpand();return()=>{i&&n.toggleExpanded()}}}},Bh=0,kh=10,Wd=()=>({pageIndex:Bh,pageSize:kh}),BE={getInitialState:n=>({...n,pagination:{...Wd(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:Sn("pagination",n)}),createTable:n=>{let s=!1,i=!1;n._autoResetPageIndex=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?r:!n.options.manualPagination){if(i)return;i=!0,n._queue(()=>{n.resetPageIndex(),i=!1})}},n.setPagination=r=>{const u=d=>ba(r,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=r=>{var u;n.setPagination(r?Wd():(u=n.initialState.pagination)!=null?u:Wd())},n.setPageIndex=r=>{n.setPagination(u=>{let d=ba(r,u.pageIndex);const h=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return d=Math.max(0,Math.min(d,h)),{...u,pageIndex:d}})},n.resetPageIndex=r=>{var u,d;n.setPageIndex(r?Bh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?u:Bh)},n.resetPageSize=r=>{var u,d;n.setPageSize(r?kh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?u:kh)},n.setPageSize=r=>{n.setPagination(u=>{const d=Math.max(1,ba(r,u.pageSize)),h=u.pageSize*u.pageIndex,m=Math.floor(h/d);return{...u,pageIndex:m,pageSize:d}})},n.setPageCount=r=>n.setPagination(u=>{var d;let h=ba(r,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...u,pageCount:h}}),n.getPageOptions=xe(()=>[n.getPageCount()],r=>{let u=[];return r&&r>0&&(u=[...new Array(r)].fill(null).map((d,h)=>h)),u},Se(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:r}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:r<u-1},n.previousPage=()=>n.setPageIndex(r=>r-1),n.nextPage=()=>n.setPageIndex(r=>r+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var r;return(r=n.options.pageCount)!=null?r:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var r;return(r=n.options.rowCount)!=null?r:n.getPrePaginationRowModel().rows.length}}},eh=()=>({top:[],bottom:[]}),kE={getInitialState:n=>({rowPinning:eh(),...n}),getDefaultOptions:n=>({onRowPinningChange:Sn("rowPinning",n)}),createRow:(n,s)=>{n.pin=(i,r,u)=>{const d=r?n.getLeafRows().map(p=>{let{id:y}=p;return y}):[],h=u?n.getParentRows().map(p=>{let{id:y}=p;return y}):[],m=new Set([...h,n.id,...d]);s.setRowPinning(p=>{var y,x;if(i==="bottom"){var v,b;return{top:((v=p==null?void 0:p.top)!=null?v:[]).filter(N=>!(m!=null&&m.has(N))),bottom:[...((b=p==null?void 0:p.bottom)!=null?b:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)]}}if(i==="top"){var w,C;return{top:[...((w=p==null?void 0:p.top)!=null?w:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)],bottom:((C=p==null?void 0:p.bottom)!=null?C:[]).filter(N=>!(m!=null&&m.has(N)))}}return{top:((y=p==null?void 0:p.top)!=null?y:[]).filter(N=>!(m!=null&&m.has(N))),bottom:((x=p==null?void 0:p.bottom)!=null?x:[]).filter(N=>!(m!=null&&m.has(N)))}})},n.getCanPin=()=>{var i;const{enableRowPinning:r,enablePinning:u}=s.options;return typeof r=="function"?r(n):(i=r??u)!=null?i:!0},n.getIsPinned=()=>{const i=[n.id],{top:r,bottom:u}=s.getState().rowPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"top":h?"bottom":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();if(!u)return-1;const d=(i=u==="top"?s.getTopRows():s.getBottomRows())==null?void 0:i.map(h=>{let{id:m}=h;return m});return(r=d==null?void 0:d.indexOf(n.id))!=null?r:-1}},createTable:n=>{n.setRowPinning=s=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(s),n.resetRowPinning=s=>{var i,r;return n.setRowPinning(s?eh():(i=(r=n.initialState)==null?void 0:r.rowPinning)!=null?i:eh())},n.getIsSomeRowsPinned=s=>{var i;const r=n.getState().rowPinning;if(!s){var u,d;return!!((u=r.top)!=null&&u.length||(d=r.bottom)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n._getPinnedRows=(s,i,r)=>{var u;return((u=n.options.keepPinnedRows)==null||u?(i??[]).map(h=>{const m=n.getRow(h,!0);return m.getIsAllParentsExpanded()?m:null}):(i??[]).map(h=>s.find(m=>m.id===h))).filter(Boolean).map(h=>({...h,position:r}))},n.getTopRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(s,i)=>n._getPinnedRows(s,i,"top"),Se(n.options,"debugRows")),n.getBottomRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(s,i)=>n._getPinnedRows(s,i,"bottom"),Se(n.options,"debugRows")),n.getCenterRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(s,i,r)=>{const u=new Set([...i??[],...r??[]]);return s.filter(d=>!u.has(d.id))},Se(n.options,"debugRows"))}},GE={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:Sn("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=s=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(s),n.resetRowSelection=s=>{var i;return n.setRowSelection(s?{}:(i=n.initialState.rowSelection)!=null?i:{})},n.toggleAllRowsSelected=s=>{n.setRowSelection(i=>{s=typeof s<"u"?s:!n.getIsAllRowsSelected();const r={...i},u=n.getPreGroupedRowModel().flatRows;return s?u.forEach(d=>{d.getCanSelect()&&(r[d.id]=!0)}):u.forEach(d=>{delete r[d.id]}),r})},n.toggleAllPageRowsSelected=s=>n.setRowSelection(i=>{const r=typeof s<"u"?s:!n.getIsAllPageRowsSelected(),u={...i};return n.getRowModel().rows.forEach(d=>{Gh(u,d.id,r,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getCoreRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getFilteredSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getGroupedSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getSortedRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const s=n.getFilteredRowModel().flatRows,{rowSelection:i}=n.getState();let r=!!(s.length&&Object.keys(i).length);return r&&s.some(u=>u.getCanSelect()&&!i[u.id])&&(r=!1),r},n.getIsAllPageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:i}=n.getState();let r=!!s.length;return r&&s.some(u=>!i[u.id])&&(r=!1),r},n.getIsSomeRowsSelected=()=>{var s;const i=Object.keys((s=n.getState().rowSelection)!=null?s:{}).length;return i>0&&i<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:s.filter(i=>i.getCanSelect()).some(i=>i.getIsSelected()||i.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>s=>{n.toggleAllRowsSelected(s.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>s=>{n.toggleAllPageRowsSelected(s.target.checked)}},createRow:(n,s)=>{n.toggleSelected=(i,r)=>{const u=n.getIsSelected();s.setRowSelection(d=>{var h;if(i=typeof i<"u"?i:!u,n.getCanSelect()&&u===i)return d;const m={...d};return Gh(m,n.id,i,(h=r==null?void 0:r.selectChildren)!=null?h:!0,s),m})},n.getIsSelected=()=>{const{rowSelection:i}=s.getState();return rm(n,i)},n.getIsSomeSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="all"},n.getCanSelect=()=>{var i;return typeof s.options.enableRowSelection=="function"?s.options.enableRowSelection(n):(i=s.options.enableRowSelection)!=null?i:!0},n.getCanSelectSubRows=()=>{var i;return typeof s.options.enableSubRowSelection=="function"?s.options.enableSubRowSelection(n):(i=s.options.enableSubRowSelection)!=null?i:!0},n.getCanMultiSelect=()=>{var i;return typeof s.options.enableMultiRowSelection=="function"?s.options.enableMultiRowSelection(n):(i=s.options.enableMultiRowSelection)!=null?i:!0},n.getToggleSelectedHandler=()=>{const i=n.getCanSelect();return r=>{var u;i&&n.toggleSelected((u=r.target)==null?void 0:u.checked)}}}},Gh=(n,s,i,r,u)=>{var d;const h=u.getRow(s,!0);i?(h.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),h.getCanSelect()&&(n[s]=!0)):delete n[s],r&&(d=h.subRows)!=null&&d.length&&h.getCanSelectSubRows()&&h.subRows.forEach(m=>Gh(n,m.id,i,r,u))};function th(n,s){const i=n.getState().rowSelection,r=[],u={},d=function(h,m){return h.map(p=>{var y;const x=rm(p,i);if(x&&(r.push(p),u[p.id]=p),(y=p.subRows)!=null&&y.length&&(p={...p,subRows:d(p.subRows)}),x)return p}).filter(Boolean)};return{rows:d(s.rows),flatRows:r,rowsById:u}}function rm(n,s){var i;return(i=s[n.id])!=null?i:!1}function qh(n,s,i){var r;if(!((r=n.subRows)!=null&&r.length))return!1;let u=!0,d=!1;return n.subRows.forEach(h=>{if(!(d&&!u)&&(h.getCanSelect()&&(rm(h,s)?d=!0:u=!1),h.subRows&&h.subRows.length)){const m=qh(h,s);m==="all"?d=!0:(m==="some"&&(d=!0),u=!1)}}),u?"all":d?"some":!1}const Qh=/([0-9]+)/gm,qE=(n,s,i)=>sx(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),QE=(n,s,i)=>sx(wa(n.getValue(i)),wa(s.getValue(i))),YE=(n,s,i)=>om(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),IE=(n,s,i)=>om(wa(n.getValue(i)),wa(s.getValue(i))),XE=(n,s,i)=>{const r=n.getValue(i),u=s.getValue(i);return r>u?1:r<u?-1:0},KE=(n,s,i)=>om(n.getValue(i),s.getValue(i));function om(n,s){return n===s?0:n>s?1:-1}function wa(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function sx(n,s){const i=n.split(Qh).filter(Boolean),r=s.split(Qh).filter(Boolean);for(;i.length&&r.length;){const u=i.shift(),d=r.shift(),h=parseInt(u,10),m=parseInt(d,10),p=[h,m].sort();if(isNaN(p[0])){if(u>d)return 1;if(d>u)return-1;continue}if(isNaN(p[1]))return isNaN(h)?-1:1;if(h>m)return 1;if(m>h)return-1}return i.length-r.length}const Er={alphanumeric:qE,alphanumericCaseSensitive:QE,text:YE,textCaseSensitive:IE,datetime:XE,basic:KE},ZE={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:Sn("sorting",n),isMultiSortEvent:s=>s.shiftKey}),createColumn:(n,s)=>{n.getAutoSortingFn=()=>{const i=s.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const u of i){const d=u==null?void 0:u.getValue(n.id);if(Object.prototype.toString.call(d)==="[object Date]")return Er.datetime;if(typeof d=="string"&&(r=!0,d.split(Qh).length>1))return Er.alphanumeric}return r?Er.text:Er.basic},n.getAutoSortDir=()=>{const i=s.getFilteredRowModel().flatRows[0];return typeof(i==null?void 0:i.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(i=(r=s.options.sortingFns)==null?void 0:r[n.columnDef.sortingFn])!=null?i:Er[n.columnDef.sortingFn]},n.toggleSorting=(i,r)=>{const u=n.getNextSortingOrder(),d=typeof i<"u"&&i!==null;s.setSorting(h=>{const m=h==null?void 0:h.find(w=>w.id===n.id),p=h==null?void 0:h.findIndex(w=>w.id===n.id);let y=[],x,v=d?i:u==="desc";if(h!=null&&h.length&&n.getCanMultiSort()&&r?m?x="toggle":x="add":h!=null&&h.length&&p!==h.length-1?x="replace":m?x="toggle":x="replace",x==="toggle"&&(d||u||(x="remove")),x==="add"){var b;y=[...h,{id:n.id,desc:v}],y.splice(0,y.length-((b=s.options.maxMultiSortColCount)!=null?b:Number.MAX_SAFE_INTEGER))}else x==="toggle"?y=h.map(w=>w.id===n.id?{...w,desc:v}:w):x==="remove"?y=h.filter(w=>w.id!==n.id):y=[{id:n.id,desc:v}];return y})},n.getFirstSortDir=()=>{var i,r;return((i=(r=n.columnDef.sortDescFirst)!=null?r:s.options.sortDescFirst)!=null?i:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=i=>{var r,u;const d=n.getFirstSortDir(),h=n.getIsSorted();return h?h!==d&&((r=s.options.enableSortingRemoval)==null||r)&&(!(i&&(u=s.options.enableMultiRemove)!=null)||u)?!1:h==="desc"?"asc":"desc":d},n.getCanSort=()=>{var i,r;return((i=n.columnDef.enableSorting)!=null?i:!0)&&((r=s.options.enableSorting)!=null?r:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var i,r;return(i=(r=n.columnDef.enableMultiSort)!=null?r:s.options.enableMultiSort)!=null?i:!!n.accessorFn},n.getIsSorted=()=>{var i;const r=(i=s.getState().sorting)==null?void 0:i.find(u=>u.id===n.id);return r?r.desc?"desc":"asc":!1},n.getSortIndex=()=>{var i,r;return(i=(r=s.getState().sorting)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.clearSorting=()=>{s.setSorting(i=>i!=null&&i.length?i.filter(r=>r.id!==n.id):[])},n.getToggleSortingHandler=()=>{const i=n.getCanSort();return r=>{i&&(r.persist==null||r.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?s.options.isMultiSortEvent==null?void 0:s.options.isMultiSortEvent(r):!1))}}},createTable:n=>{n.setSorting=s=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(s),n.resetSorting=s=>{var i,r;n.setSorting(s?[]:(i=(r=n.initialState)==null?void 0:r.sorting)!=null?i:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},PE=[vE,UE,OE,zE,xE,SE,VE,$E,ZE,TE,FE,BE,kE,GE,HE];function JE(n){var s,i;const r=[...PE,...(s=n._features)!=null?s:[]];let u={_features:r};const d=u._features.reduce((b,w)=>Object.assign(b,w.getDefaultOptions==null?void 0:w.getDefaultOptions(u)),{}),h=b=>u.options.mergeOptions?u.options.mergeOptions(d,b):{...d,...b};let p={...{},...(i=n.initialState)!=null?i:{}};u._features.forEach(b=>{var w;p=(w=b.getInitialState==null?void 0:b.getInitialState(p))!=null?w:p});const y=[];let x=!1;const v={_features:r,options:{...d,...n},initialState:p,_queue:b=>{y.push(b),x||(x=!0,Promise.resolve().then(()=>{for(;y.length;)y.shift()();x=!1}).catch(w=>setTimeout(()=>{throw w})))},reset:()=>{u.setState(u.initialState)},setOptions:b=>{const w=ba(b,u.options);u.options=h(w)},getState:()=>u.options.state,setState:b=>{u.options.onStateChange==null||u.options.onStateChange(b)},_getRowId:(b,w,C)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(b,w,C))!=null?N:`${C?[C.id,w].join("."):w}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(b,w)=>{let C=(w?u.getPrePaginationRowModel():u.getRowModel()).rowsById[b];if(!C&&(C=u.getCoreRowModel().rowsById[b],!C))throw new Error;return C},_getDefaultColumnDef:xe(()=>[u.options.defaultColumn],b=>{var w;return b=(w=b)!=null?w:{},{header:C=>{const N=C.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:C=>{var N,M;return(N=(M=C.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((C,N)=>Object.assign(C,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...b}},Se(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:xe(()=>[u._getColumnDefs()],b=>{const w=function(C,N,M){return M===void 0&&(M=0),C.map(R=>{const j=pE(u,R,M,N),F=R;return j.columns=F.columns?w(F.columns,j,M+1):[],j})};return w(b)},Se(n,"debugColumns")),getAllFlatColumns:xe(()=>[u.getAllColumns()],b=>b.flatMap(w=>w.getFlatColumns()),Se(n,"debugColumns")),_getAllFlatColumnsById:xe(()=>[u.getAllFlatColumns()],b=>b.reduce((w,C)=>(w[C.id]=C,w),{}),Se(n,"debugColumns")),getAllLeafColumns:xe(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(b,w)=>{let C=b.flatMap(N=>N.getLeafColumns());return w(C)},Se(n,"debugColumns")),getColumn:b=>u._getAllFlatColumnsById()[b]};Object.assign(u,v);for(let b=0;b<u._features.length;b++){const w=u._features[b];w==null||w.createTable==null||w.createTable(u)}return u}function ix(){return n=>xe(()=>[n.options.data],s=>{const i={rows:[],flatRows:[],rowsById:{}},r=function(u,d,h){d===void 0&&(d=0);const m=[];for(let y=0;y<u.length;y++){const x=yE(n,n._getRowId(u[y],y,h),u[y],y,d,void 0,h==null?void 0:h.id);if(i.flatRows.push(x),i.rowsById[x.id]=x,m.push(x),n.options.getSubRows){var p;x.originalSubRows=n.options.getSubRows(u[y],y),(p=x.originalSubRows)!=null&&p.length&&(x.subRows=r(x.originalSubRows,d+1,x))}}return m};return i.rows=r(s),i},Se(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function rx(){return n=>xe(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(s,i,r)=>!i.rows.length||s!==!0&&!Object.keys(s??{}).length||!r?i:WE(i),Se(n.options,"debugTable"))}function WE(n){const s=[],i=r=>{var u;s.push(r),(u=r.subRows)!=null&&u.length&&r.getIsExpanded()&&r.subRows.forEach(i)};return n.rows.forEach(i),{rows:s,flatRows:n.flatRows,rowsById:n.rowsById}}function eN(){return n=>xe(()=>[n.getState().sorting,n.getPreSortedRowModel()],(s,i)=>{if(!i.rows.length||!(s!=null&&s.length))return i;const r=n.getState().sorting,u=[],d=r.filter(p=>{var y;return(y=n.getColumn(p.id))==null?void 0:y.getCanSort()}),h={};d.forEach(p=>{const y=n.getColumn(p.id);y&&(h[p.id]={sortUndefined:y.columnDef.sortUndefined,invertSorting:y.columnDef.invertSorting,sortingFn:y.getSortingFn()})});const m=p=>{const y=p.map(x=>({...x}));return y.sort((x,v)=>{for(let w=0;w<d.length;w+=1){var b;const C=d[w],N=h[C.id],M=N.sortUndefined,R=(b=C==null?void 0:C.desc)!=null?b:!1;let j=0;if(M){const F=x.getValue(C.id),T=v.getValue(C.id),H=F===void 0,D=T===void 0;if(H||D){if(M==="first")return H?-1:1;if(M==="last")return H?1:-1;j=H&&D?0:H?M:-M}}if(j===0&&(j=N.sortingFn(x,v,C.id)),j!==0)return R&&(j*=-1),N.invertSorting&&(j*=-1),j}return x.index-v.index}),y.forEach(x=>{var v;u.push(x),(v=x.subRows)!=null&&v.length&&(x.subRows=m(x.subRows))}),y};return{rows:m(i.rows),flatRows:u,rowsById:i.rowsById}},Se(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
|
|
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()))}/**
|
|
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 Vu(n,s){return n?tN(n)?E.createElement(n,s):n:null}function tN(n){return nN(n)||typeof n=="function"||lN(n)}function nN(n){return typeof n=="function"&&(()=>{const s=Object.getPrototypeOf(n);return s.prototype&&s.prototype.isReactComponent})()}function lN(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function ox(n){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[i]=E.useState(()=>({current:JE(s)})),[r,u]=E.useState(()=>i.current.initialState);return i.current.setOptions(d=>({...d,...n,state:{...r,...n.state},onStateChange:h=>{u(h),n.onStateChange==null||n.onStateChange(h)}})),i.current}function $u({value:n,onChange:s,label:i="Search mutations",placeholder:r="Search gene, change or locus",shortcut:u=!0,delay:d=250}){const[h,m]=E.useState(n),p=E.useRef(null),y=E.useRef(s);y.current=s,E.useEffect(()=>m(n),[n]),E.useEffect(()=>{if(h===n)return;const v=window.setTimeout(()=>y.current(h),d);return()=>window.clearTimeout(v)},[h,n,d]),E.useEffect(()=>{if(!u)return;const v=b=>{var w,C,N;b.key!=="/"||b.metaKey||b.ctrlKey||b.altKey||(C=(w=b.target)==null?void 0:w.closest)!=null&&C.call(w,"input, textarea, select, [contenteditable]")||(b.preventDefault(),(N=p.current)==null||N.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[u]);const x=()=>{m(""),s("")};return f.jsxs("div",{className:"tsearch",children:[f.jsx(Du,{size:15,"aria-hidden":!0}),f.jsx("input",{ref:p,type:"search","aria-label":i,placeholder:r,value:h,onChange:v=>{m(v.target.value),d===0&&s(v.target.value)},onKeyDown:v=>{v.key==="Escape"&&x(),v.key==="Enter"&&s(h)}}),h?f.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:x,children:f.jsx(Qu,{size:14,"aria-hidden":!0})}):u?f.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}const nh=n=>n.toLocaleString("en-US");function Wu({shown:n,total:s,noun:i,loaded:r=!1,note:u}){const h=n>=s?`${nh(s)} ${s===1?i[0]:i[1]}`:`${nh(n)} of ${nh(s)} ${i[1]}${r?" loaded":""}`;return f.jsxs("div",{className:"vt-foot",role:"status",children:[u?f.jsx("span",{className:"vt-foot-note",children:u}):null,f.jsx("span",{className:"vt-foot-count",children:h})]})}function aN(n){return typeof n=="object"?n.key:n}function sN(n,s){const i=n.length;return new Proxy(n,{get(r,u,d){if(typeof u=="string"){const h=u.charCodeAt(0);if(h>=48&&h<=57){const m=+u;if(Number.isInteger(m)&&m>=0&&m<i){let p=r[m];if(typeof p!="object"){const y=s[m*2];p=r[m]={index:m,key:p,start:y,size:s[m*2+1],end:y+s[m*2+1],lane:0}}return p}}if(u==="length")return i}return Reflect.get(r,u,d)}})}function ai(n,s,i){let r=i.initialDeps??[],u,d=!0;function h(){const m=n();return(m.length!==r.length||m.some((y,x)=>r[x]!==y))&&(r=m,u=s(...m),i!=null&&i.onChange&&!(d&&i.skipInitialOnChange)&&i.onChange(u),d=!1),u}return h.updateDeps=m=>{r=m},h}function Cy(n,s){if(n===void 0)throw new Error("Unexpected undefined");return n}const jy=(n,s)=>Math.abs(n-s)<1.01,iN=(n,s,i)=>{let r;return Object.assign(function(...u){n.clearTimeout(r),r=n.setTimeout(()=>s.apply(this,u),i)},{cancel:()=>{n.clearTimeout(r)}})};let Nr;const lh=()=>{if(Nr!==void 0)return Nr;if(typeof navigator>"u")return Nr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Nr=!0;const n=navigator.maxTouchPoints;return Nr=navigator.platform==="MacIntel"&&n!==void 0&&n>0},Ey=n=>{const{offsetWidth:s,offsetHeight:i}=n;return{width:s,height:i}},rN=n=>n,oN=n=>{const s=Math.max(n.startIndex-n.overscan,0),r=Math.min(n.endIndex+n.overscan,n.count-1)-s+1,u=new Array(r);for(let d=0;d<r;d++)u[d]=s+d;return u},uN=(n,s)=>{const i=n.scrollElement;if(!i)return;const r=n.targetWindow;if(!r)return;const u=h=>{const{width:m,height:p}=h;s({width:Math.round(m),height:Math.round(p)})};if(u(Ey(i)),!r.ResizeObserver)return()=>{};const d=new r.ResizeObserver(h=>{const m=()=>{const p=h[0];if(p!=null&&p.borderBoxSize){const y=p.borderBoxSize[0];if(y){u({width:y.inlineSize,height:y.blockSize});return}}u(Ey(i))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(m):m()});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},Fu={passive:!0},cN=typeof window>"u"?!0:"onscrollend"in window,fN=(n,s,i)=>{const r=n.scrollElement;if(!r)return;const u=n.targetWindow;if(!u)return;const d=n.options.useScrollendEvent&&cN;let h=0;const m=d?null:iN(u,()=>s(i(r),!1),n.options.isScrollingResetDelay),p=v=>()=>{h=i(r),m==null||m(),s(h,v)},y=p(!0),x=p(!1);return r.addEventListener("scroll",y,Fu),d&&r.addEventListener("scrollend",x,Fu),()=>{r.removeEventListener("scroll",y),d&&r.removeEventListener("scrollend",x),m==null||m.cancel()}},dN=(n,s)=>fN(n,s,i=>{const{horizontal:r,isRtl:u}=n.options;return r?i.scrollLeft*(u&&-1||1):i.scrollTop}),hN=(n,s,i)=>{if(i.options.useCachedMeasurements){const r=i.indexFromElement(n),u=i.options.getItemKey(r);return i.itemSizeCache.get(u)??i.options.estimateSize(r)}if(s!=null&&s.borderBoxSize){const r=s.borderBoxSize[0];if(r)return Math.round(r[i.options.horizontal?"inlineSize":"blockSize"])}if(!s){const r=i.indexFromElement(n),u=i.options.getItemKey(r),d=i.itemSizeCache.get(u);if(d!==void 0)return d}return n[i.options.horizontal?"offsetWidth":"offsetHeight"]},mN=(n,{adjustments:s=0,behavior:i},r)=>{var u,d;(d=(u=r.scrollElement)==null?void 0:u.scrollTo)==null||d.call(u,{[r.options.horizontal?"left":"top"]:n+s,behavior:i})},gN=mN;function pN(n,s,i,r){if(s===0)return!1;const u=r(0),d=new Set;let h=0;for(;h<n;){const p=i(h);if(p===u)break;d.add(p),h++}const m=n-h;if(m===0||m>=s)return!1;for(let p=0;p<m;p++)if(r(p)!==i(h+p))return!1;for(let p=m;p<s;p++)if(d.has(r(p)))return!1;return!0}class vN{constructor(s){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var i,r,u;return((u=(r=(i=this.targetWindow)==null?void 0:i.performance)==null?void 0:r.now)==null?void 0:u.call(r))??Date.now()},this.observer=(()=>{let i=null;const r=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(u=>{u.forEach(d=>{const h=()=>{const m=d.target,p=this.indexFromElement(m);if(!m.isConnected){this.observer.unobserve(m);for(const[y,x]of this.elementsCache)if(x===m){this.elementsCache.delete(y);break}return}this.isIndexInRange(p)&&this.shouldMeasureDuringScroll(p)&&this.resizeItem(p,this.options.measureElement(m,d,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()})}));return{disconnect:()=>{var u;(u=r())==null||u.disconnect(),i=null},observe:u=>{var d;return(d=r())==null?void 0:d.observe(u,{box:"border-box"})},unobserve:u=>{var d;return(d=r())==null?void 0:d.unobserve(u)}}})(),this.range=null,this.setOptions=i=>{var r;const u={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rN,rangeExtractor:oN,onChange:()=>{},measureElement:hN,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const v in i){const b=i[v];b!==void 0&&(u[v]=b)}const d=this.options;let h=null,m=null,p=!1;if(d!==void 0&&d.enabled&&u.enabled&&u.anchorTo==="end"&&this.scrollElement!==null){const v=d.count,b=u.count,w=this.getMeasurements(),C=((r=this._singleLaneMeasurements)==null?void 0:r.items)??w,N=T=>aN(C[T]),M=v>0?N(0):null,R=v>0?N(v-1):null;if(b!==v||v>0&&b>0&&(u.getItemKey(0)!==M||u.getItemKey(b-1)!==R)){p=!0;const T=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;T&&(h=[T.key,this.getScrollOffset()-T.start]);const H=u.followOnAppend===!0?"auto":u.followOnAppend||null;H&&b>0&&this.isAtEnd(d.scrollEndThreshold)&&(v===0||u.getItemKey(b-1)!==R)&&(b>v||pN(v,b,N,u.getItemKey))&&(m=H)}}this.options=u,p&&(this.pendingMin=0,this.itemSizeCacheVersion++);let y=!1,x=0;if(h&&this.scrollOffset!==null){const[v,b]=h,w=this.getMeasurements(),{count:C,getItemKey:N}=this.options;let M=0;for(;M<C&&N(M)!==v;)M++;if(M<C){const R=w[M];if(R){const j=Math.max(0,R.start+b);!m&&j!==this.scrollOffset&&(x=j-this.scrollOffset,this.scrollOffset=j,y=!0)}}}(y||m)&&(this.pendingScrollAnchor=[y?h[0]:null,y?h[1]:0,m,x])},this.notify=i=>{var r,u;(u=(r=this.options).onChange)==null||u.call(r,this,i)},this.maybeNotify=ai(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),i=>{this.notify(i)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i,r;const u=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==u){if(this.cleanup(),!u){this.maybeNotify();return}if(this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this.elementsCache.forEach(h=>{this.observer.observe(h)}),this.unsubs.push(this.options.observeElementRect(this,h=>{this.scrollRect=h,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(h,m)=>{if(m&&this._intendedScrollOffset===null&&h===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(h-this._intendedScrollOffset)<1.5&&(h=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(h-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const p=this.getScrollOffset();this.scrollDirection=m?p===h?this.scrollDirection:p<h?"forward":"backward":null,this.scrollOffset=h,this.isScrolling=m,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const h=this.scrollElement,m=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},p=()=>{this._iosTouching=!1,!(!lh()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};h.addEventListener("touchstart",m,Fu),h.addEventListener("touchend",p,Fu),this.unsubs.push(()=>{h.removeEventListener("touchstart",m),h.removeEventListener("touchend",p),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const d=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,d&&this.scrollElement&&this.options.enabled){const[h,m,p,y]=d;h!==null&&!p&&(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):((r=this.scrollState)==null?void 0:r.behavior)==="smooth"&&!jy(this.getScrollOffset()-y,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),p&&this.scrollToEnd({behavior:p})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:i,maxAtWrite:r}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>r+.5&&(this._clampedAdjustment=i>u+.5?{target:i,maxAtWrite:u}:null,this._scrollToOffset(i,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const i=this.getScrollOffset(),r=this.getMaxScrollOffset();if(i<0||i>r)return;if(this._iosDeferredAdjustment<0&&i>=r-1){this._iosDeferredAdjustment=0;return}const u=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(i,{adjustments:this.scrollAdjustments+=u,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=ai(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(i,r,u,d,h,m,p,y)=>(this.prevLanes!==void 0&&this.prevLanes!==m&&(this.lanesChangedFlag=!0),this.prevLanes=m,this.pendingMin=null,{count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y}),{key:!1}),this.isIndexInRange=i=>i>=0&&i<this.options.count,this.getMeasurements=ai(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y},x)=>{var v;const b=this.itemSizeCache;if(!h)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>i)for(const j of this.laneAssignments.keys())j>=i&&this.laneAssignments.delete(j);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(j=>{this.itemSizeCache.set(j.key,j.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===i&&(this.lanesSettling=!1),m===1){const j=i*2;let F=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!F||F.length<j){const z=new Float64Array(j);F&&w>0&&z.set(F.subarray(0,w*2)),F=z}const T=w===0?new Array(i):this._singleLaneMeasurements.items.slice();let H;if(w===0)H=r+u;else{const z=w-1;H=F[z*2]+F[z*2+1]+y}for(let z=w;z<i;z++){const Y=d(z);T[z]=Y;const te=b.get(Y),k=typeof te=="number"?te:this.options.estimateSize(z);F[z*2]=H,F[z*2+1]=k,H+=k+y}this._singleLaneMeasurements={flat:F,items:T};const D=sN(T,F);return this.measurementsCache=D,D}const C=this.measurementsCache.slice(0,w),N=new Array(m).fill(void 0),M=new Float64Array(m);let R=0;for(let j=0;j<w;j++){const F=C[j];F&&(N[F.lane]===void 0&&R++,N[F.lane]=j,M[F.lane]=F.end)}for(let j=w;j<i;j++){const F=d(j),T=this.laneAssignments.get(j);let H,D;const z=p==="estimate"||b.has(F);if(T!==void 0&&this.options.lanes>1){H=T;const ne=N[H],ie=ne!==void 0?C[ne]:void 0;D=ie?ie.end+y:r+u}else if(R===m){let ne=0,ie=M[0],Ce=N[0];for(let X=1;X<m;X++){const ee=M[X];(ee<ie||ee===ie&&N[X]<Ce)&&(ne=X,ie=ee,Ce=N[X])}H=ne,D=ie+y,z&&this.laneAssignments.set(j,H)}else H=j%this.options.lanes,D=r+u,z&&this.laneAssignments.set(j,H);const Y=b.get(F),te=typeof Y=="number"?Y:this.options.estimateSize(j),k=D+te;C[j]={index:j,start:D,size:te,end:k,key:F,lane:H},N[H]===void 0&&R++,N[H]=j,M[H]=k}return this.measurementsCache=C,C},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ai(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,r,u,d)=>i.length===0||r===0?(this.range=null,null):(this.range=xN(i,r,u,d,d===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ai(()=>{let i=null,r=null;const u=this.calculateRange();return u&&(i=u.startIndex,r=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i,r]},(i,r,u,d,h)=>d===null||h===null?[]:i({startIndex:d,endIndex:h,overscan:r,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i=>{const r=this.options.indexAttribute,u=i.getAttribute(r);return u?parseInt(u,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=i=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(u!==void 0&&this.range){const d=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),h=Math.max(0,u-d),m=Math.min(this.options.count-1,u+d);return i>=h&&i<=m}return!0},this.measureElement=i=>{if(!i){this.elementsCache.forEach((h,m)=>{h.isConnected||(this.observer.unobserve(h),this.elementsCache.delete(m))});return}const r=this.indexFromElement(i);if(!this.isIndexInRange(r))return;const u=this.options.getItemKey(r),d=this.elementsCache.get(u);d!==i&&(d&&this.observer.unobserve(d),this.observer.observe(i),this.elementsCache.set(u,i)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(i,void 0,this))},this.resizeItem=(i,r)=>{var u,d,h;if(!this.isIndexInRange(i))return;let m,p,y;const x=(u=this._singleLaneMeasurements)==null?void 0:u.flat;if(this.options.lanes===1&&x!=null)y=this.options.getItemKey(i),p=x[i*2],m=x[i*2+1];else{const w=this.measurementsCache[i];if(!w)return;y=w.key,p=w.start,m=w.size}const v=this.itemSizeCache.get(y)??m,b=r-v;if(b!==0){const w=this.options.anchorTo==="end"&&((d=this.scrollState)==null?void 0:d.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,C=w?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,R=!this.itemSizeCache.has(y)?p<N:p+v<=N&&this.scrollDirection!=="backward",j=((h=this.scrollState)==null?void 0:h.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[i]??{index:i,key:y,start:p,size:m,end:p+m,lane:0},b,this):R);(this.pendingMin===null||i<this.pendingMin)&&(this.pendingMin=i),this.itemSizeCache.set(y,r),this.itemSizeCacheVersion++;let F=!1;w?F=this.applyScrollAdjustment(this.getTotalSize()-C):j&&(F=this.applyScrollAdjustment(b)),this.notify(F),this._retryClampedAdjustment()}},this.getVirtualItems=ai(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i,r)=>{const u=[];for(let d=0,h=i.length;d<h;d++){const m=i[d],p=r[m];u.push(p)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{var r;const u=this.getMeasurements();if(u.length===0)return;const d=(r=this._singleLaneMeasurements)==null?void 0:r.flat,h=this.options.lanes===1&&d!=null,m=ux(0,u.length-1,h?p=>d[p*2]:p=>Cy(u[p]).start,i);return Cy(u[m])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const i=this.scrollElement.document.documentElement;return this.options.horizontal?i.scrollWidth-this.scrollElement.innerWidth:i.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(i=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=i,this.getOffsetForAlignment=(i,r,u=0)=>{if(!this.scrollElement)return 0;const d=this.getSize(),h=this.getScrollOffset();r==="auto"&&(r=i>=h+d?"end":"start"),r==="center"?i+=(u-d)/2:r==="end"&&(i-=d);const m=this.getMaxScrollOffset();return Math.max(Math.min(m,i),0)},this.getOffsetForIndex=(i,r="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const u=this.getSize(),d=this.getScrollOffset(),h=this.measurementsCache[i];if(!h)return;if(r==="auto")if(h.end>=d+u-this.options.scrollPaddingEnd)r="end";else if(h.start<=d+this.options.scrollPaddingStart)r="start";else return[d,r];if(r==="end"&&i===this.options.count-1)return[this.getMaxScrollOffset(),r];const m=r==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,r,h.size),r]},this.scrollToOffset=(i,{align:r="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const d=this.getOffsetForAlignment(i,r),h=this.now();this.scrollState={index:null,align:r,behavior:u,startedAt:h,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(i,{align:r="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,i=Math.max(0,Math.min(i,this.options.count-1));const d=this.getOffsetForIndex(i,r);if(!d)return;const[h,m]=d,p=this.now();this.scrollState={index:i,align:m,behavior:u,startedAt:p,lastTargetOffset:h,stableFrames:0},this._scrollToOffset(h,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(i,{behavior:r="auto"}={})=>{const u=this.getScrollOffset()+i,d=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:i="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:i});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:i})},this.getTotalSize=()=>{var i,r;const u=this.getMeasurements();let d;if(u.length===0)d=this.options.paddingStart;else if(this.options.lanes===1){const h=u.length-1,m=(i=this._singleLaneMeasurements)==null?void 0:i.flat;m!=null?d=m[h*2]+m[h*2+1]:d=((r=u[h])==null?void 0:r.end)??0}else{const h=Array(this.options.lanes).fill(null);let m=u.length-1;for(;m>=0&&h.some(p=>p===null);){const p=u[m];h[p.lane]===null&&(h[p.lane]=p.end),m--}d=Math.max(...h.filter(p=>p!==null))}return Math.max(d-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const i=[];if(this.itemSizeCache.size===0)return i;const r=this.getMeasurements();for(const u of r)u&&this.itemSizeCache.has(u.key)&&i.push({index:u.index,key:u.key,start:u.start,size:u.size,end:u.end,lane:u.lane});return i},this._scrollToOffset=(i,{adjustments:r,behavior:u})=>{this._intendedScrollOffset=i+(r??0),this.options.scrollToFn(i,{behavior:u,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(s)}applyScrollAdjustment(s,i){if(s===0)return!1;if(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=s,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+s,u=this.scrollElement,d=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=d!==null&&r>d+.5?{target:r,maxAtWrite:d}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:i}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=r?r[0]:this.scrollState.lastTargetOffset,d=1,h=u!==this.scrollState.lastTargetOffset;if(!h&&jy(u,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=d){this.getScrollOffset()!==u&&this._scrollToOffset(u,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,h){const m=this.getSize()||600,p=Math.abs(u-this.getScrollOffset()),y=this.scrollState.behavior==="smooth"&&p>m;this.scrollState.lastTargetOffset=u,y||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:y?"smooth":"auto"})}this.scheduleScrollReconcile()}}const ux=(n,s,i,r)=>{for(;n<=s;){const u=(n+s)/2|0,d=i(u);if(d<r)n=u+1;else if(d>r)s=u-1;else return u}return n>0?n-1:0};function yN(n,s,i){let r=0;for(;r<=s;){const u=(r+s)/2|0,d=n[u*2];if(d<i)r=u+1;else if(d>i)s=u-1;else return u}return r>0?r-1:0}function xN(n,s,i,r,u){const d=n.length-1;if(n.length<=r)return{startIndex:0,endIndex:d};if(r===1&&u!==null){const y=yN(u,d,i);let x=y;const v=i+s;for(;x<d&&u[x*2]+u[x*2+1]<v;)x++;return{startIndex:y,endIndex:x}}let m=ux(0,d,y=>n[y].start,i),p=m;if(r===1)for(;p<d&&n[p].end<i+s;)p++;else if(r>1){const y=Array(r).fill(0);for(;p<d&&y.some(v=>v<i+s);){const v=n[p];y[v.lane]=v.end,p++}const x=Array(r).fill(i+s);for(;m>=0&&x.some(v=>v>=i);){const v=n[m];x[v.lane]=v.start,m--}m=Math.max(0,m-m%r),p=Math.min(d,p+(r-1-p%r))}return{startIndex:m,endIndex:p}}const ah=typeof document<"u"?E.useLayoutEffect:E.useEffect;function SN({useFlushSync:n=!0,directDomUpdates:s=!1,directDomUpdatesMode:i="transform",...r}){const u=E.useReducer(v=>v+1,0)[1],d=E.useRef({enabled:s,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});d.current.enabled=s,d.current.mode=i;const h=E.useRef(!1),m=v=>{const b=d.current;if(!b.enabled||!b.container)return;const w=v.getTotalSize();if(w!==b.lastSize){b.lastSize=w;const C=v.options.horizontal?"width":"height";b.container.style[C]=`${w}px`}},p=v=>{const b=d.current;if(!b.enabled||!b.container)return;m(v);const w=!!v.options.horizontal,C=b.mode==="transform",N=w?"left":"top",M=v.options.scrollMargin,R=v.getVirtualItems();for(const j of R){const F=j.start-M,T=v.elementsCache.get(j.key);T&&b.lastPositions.get(T)!==F&&(b.lastPositions.set(T,F),C?T.style.transform=w?`translate3d(${F}px, 0, 0)`:`translate3d(0, ${F}px, 0)`:T.style[N]=`${F}px`)}},y={...r,onChange:(v,b)=>{var w;const C=d.current;let N=!0;if(C.enabled){p(v);const M=v.range,R=C.prevRange;N=!R||R.isScrolling!==v.isScrolling||R.startIndex!==(M==null?void 0:M.startIndex)||R.endIndex!==(M==null?void 0:M.endIndex),N&&(C.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&b&&!h.current?Wh.flushSync(u):u()),(w=r.onChange)==null||w.call(r,v,b)}},[x]=E.useState(()=>{const v=new vN(y),b=v.measureElement;return v.measureElement=w=>{h.current=!0;try{b(w)}finally{h.current=!1}},Object.assign(v,{containerRef:w=>{const C=d.current;if(C.container=w,C.lastSize=null,w&&C.enabled){const N=v.getTotalSize();C.lastSize=N;const M=v.options.horizontal?"width":"height";w.style[M]=`${N}px`}}})});return x.setOptions(y),ah(()=>x._didMount(),[]),ah(()=>(m(x),x._willUpdate())),ah(()=>{p(x)}),x}function bN(n){return SN({observeElementRect:uN,observeElementOffset:dN,scrollToFn:gN,...n})}const cx=33,si=32,wN=25;function fx({items:n,scrollRef:s,columnCount:i,getKey:r,render:u,onEndReached:d,endThreshold:h=15,rowHeight:m=cx}){var M;const p=bN({count:n.length,getScrollElement:()=>s.current,estimateSize:()=>m,overscan:8,scrollMargin:si,getItemKey:R=>r(n[R],R),initialRect:{width:1e3,height:si+m*10}}),y=!((M=p.scrollRect)!=null&&M.height),x=y?n.slice(0,wN).map((R,j)=>({key:r(R,j),index:j,start:si+j*m,end:si+(j+1)*m})):p.getVirtualItems(),v=x[0],b=x[x.length-1],w=(b==null?void 0:b.index)??-1;E.useEffect(()=>{d&&w>=0&&w>=n.length-h&&d()},[w,n.length,h,d]);const C=!y&&v?v.start-si:0,N=!y&&b?p.getTotalSize()-(b.end-si):0;return f.jsxs(f.Fragment,{children:[C>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:C},children:f.jsx("td",{colSpan:i})})}),x.map(R=>f.jsx("tbody",{"data-index":R.index,ref:y?void 0:p.measureElement,children:u(n[R.index],R.index)},R.key)),N>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:N},children:f.jsx("td",{colSpan:i})})})]})}function ds({text:n,query:s}){const i=s.trim();if(!i||PC(i))return f.jsx(f.Fragment,{children:n});const r=[],u=n.toLowerCase(),d=i.toLowerCase();let h=0;for(let m=u.indexOf(d);m!==-1;m=u.indexOf(d,h))m>h&&r.push(n.slice(h,m)),r.push(f.jsx("mark",{children:n.slice(m,m+i.length)},m)),h=m+i.length;return r.push(n.slice(h)),f.jsx(f.Fragment,{children:r})}function Ny({value:n,max:s,clonal:i}){return n===null?f.jsx("span",{style:{color:"var(--chev)"},children:"–"}):f.jsxs("span",{className:"vbar",children:[f.jsx("span",{className:"vbar-n",children:Oh(n)}),f.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[f.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(n/s,1)*100}%`}}),i&&f.jsx("span",{className:"vbar-tick",style:{left:`${1/s*100}%`}})]})]})}function CN({variant:n,showDriver:s}){return f.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[s&&n.is_driver&&f.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),n.hotspot&&f.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),n.in_dmp&&f.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),n.ffpe_removed&&f.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function jN(n){return`${n.ref}>${n.alt}`}function EN({variant:n,onLocate:s}){const[i,r]=E.useState(!1),u=`chr${n.chrom}:${n.pos}`,d=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${jN(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",Oh(n.normal_vaf)],["Mutant copies",tj(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",ej(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?Oh(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",nj(n)??"–"]];return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:d.map(([h,m])=>f.jsxs("div",{children:[f.jsx("dt",{children:h}),f.jsx("dd",{children:m})]},h))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s(n),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show on copy number"]}),f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(u),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy this locus",u)}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy locus"]})]})]})}function NN({sort:n,current:s,onSort:i}){const r=s.replace(/^-/,"")===n.key,u=s.startsWith("-"),d=r?u?n.key:`-${n.key}`:n.descFirst?`-${n.key}`:n.key;return f.jsxs("button",{type:"button",className:"vt-sort","data-active":r,onClick:()=>i(d),title:`Sort by ${n.label.toLowerCase()}`,children:[n.label,r&&u?f.jsx(zu,{size:12,"aria-hidden":!0}):r?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function _N({data:n,rows:s,hasMore:i,loadingMore:r,onMore:u,table:d,fetching:h,showCcf:m,onTable:p,onHover:y,onLocate:x}){const[v,b]=E.useState({}),w=d.q,C=d.scope!=="drivers",N=E.useMemo(()=>[{id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:D})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":D.getIsExpanded(),"aria-label":`Details of ${D.original.gene??"this mutation"} ${D.original.protein_change??""}`.trim(),onClick:z=>{z.stopPropagation(),D.toggleExpanded()},onFocus:()=>y(D.original),children:f.jsx(nm,{size:14,"aria-hidden":!0})})},{id:"gene",header:"Gene",meta:{className:"pin vt-g",sorts:[{key:"gene",label:"Gene"},{key:"position",label:"Position"}]},cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:D.gene??"–",query:w})}),f.jsx("span",{className:"vt-sub mono",children:Fr(D.chrom,D.pos)})]})},{id:"change",header:"Change",cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-[12.5px] font-medium",children:f.jsx(ds,{text:D.protein_change??"–",query:w})}),D.cdna_change&&f.jsx("span",{className:"vt-sub mono",children:f.jsx(ds,{text:D.cdna_change,query:w})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:D}})=>f.jsx("span",{className:D.effect_class==="truncating"?"font-semibold":void 0,children:_C(D.consequence,D.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.vaf,max:1})},...m?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:D}})=>f.jsx(CN,{variant:D,showDriver:C})}],[w,C,m,y]),M=ox({data:s,columns:N,getRowId:ZC,getCoreRowModel:ix(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:b}),R=d.sort.replace(/^-/,""),j=M.getVisibleLeafColumns().length,F=G1(d)>0,T=E.useRef(null),H=JSON.stringify([d.scope,d.sort,d.q,d.effects,d.flags,d.range,d.ffpe]);return E.useEffect(()=>{T.current&&(T.current.scrollTop=0)},[H]),f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("div",{className:"tbar",children:f.jsx($u,{value:d.q,onChange:D=>p({q:D})})}),f.jsxs("div",{ref:T,className:"vt-scroll vt-viewport",onMouseLeave:()=>y(null),"aria-busy":h,children:[h&&f.jsx("div",{className:"vt-progress","aria-hidden":!0}),f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:M.getHeaderGroups().map(D=>f.jsx("tr",{children:D.headers.map(z=>{var k;const Y=z.column.columnDef.meta,te=(k=Y==null?void 0:Y.sorts)==null?void 0:k.some(ne=>ne.key===R);return f.jsx("th",{className:Y==null?void 0:Y.className,"aria-sort":te?d.sort.startsWith("-")?"descending":"ascending":void 0,children:Y!=null&&Y.sorts?f.jsx("span",{className:"vt-sorts",children:Y.sorts.map(ne=>f.jsx(NN,{sort:ne,current:d.sort,onSort:ie=>p({sort:ie})},ne.key))}):Vu(z.column.columnDef.header,z.getContext())},z.id)})},D.id))}),f.jsx(fx,{items:M.getRowModel().rows,scrollRef:T,columnCount:j,getKey:D=>D.id,onEndReached:i&&!r?u:void 0,render:D=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":D.getIsExpanded(),onClick:()=>D.toggleExpanded(),onMouseEnter:()=>y(D.original),children:D.getVisibleCells().map(z=>{var Y;return f.jsx("td",{className:(Y=z.column.columnDef.meta)==null?void 0:Y.className,children:Vu(z.column.columnDef.cell,z.getContext())},z.id)})}),D.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:j,children:f.jsx(EN,{variant:D.original,onLocate:x})})})]})}),s.length===0&&f.jsx("tbody",{children:f.jsx("tr",{children:f.jsx("td",{colSpan:j,children:f.jsx("div",{className:"vt-empty",children:F?f.jsxs(f.Fragment,{children:["No mutations match these filters.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>p({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${d.scope==="all"?"":`${d.scope} `}mutations in this sample.`})})})})]})]}),n.total>0&&f.jsx(Wu,{shown:s.length,total:n.total,noun:["mutation","mutations"],loaded:!0,note:r?"Loading more…":s.length<n.total?"Scroll the table for more":void 0})]})}const MN=E.forwardRef(function({variants:s,rows:i,hasMore:r,loadingMore:u,onMore:d,variantsLoading:h,variantsFetching:m,density:p,densityLoading:y,picked:x,measure:v,onMeasure:b,table:w,onTable:C,hovered:N,onHover:M,onLocate:R,showCcf:j},F){var k,ne;const T=(s==null?void 0:s.status)==="ok"?s.data??void 0:void 0,H=T==null?void 0:T.counts,D=(p==null?void 0:p.status)==="ok"?(k=p.data)==null?void 0:k.total:void 0,z=(p==null?void 0:p.status)==="ok"?(ne=p.data)==null?void 0:ne.ffpe:null,Y=ie=>ie===void 0?"":ie.toLocaleString("en-US"),te=w.range&&w.range.measure===v?[w.range.low,w.range.high]:null;return f.jsxs(Ku,{ref:F,title:"Mutations",subtitle:D!==void 0?`${Y(D)} PASS SNVs and indels${z&&!z.shown?", after the FFPE filter":""}`:void 0,lineage:K1(p==null?void 0:p.lineage,s==null?void 0:s.lineage),picked:x,className:"mut",info:"mutations",expandable:!0,controls:f.jsx(f.Fragment,{children:f.jsx(Zu,{label:"Which mutations",value:w.scope,onChange:ie=>C({scope:ie,sort:k1[ie]}),options:[{value:"drivers",label:f.jsxs(f.Fragment,{children:["Drivers",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.drivers)})]})},{value:"coding",label:f.jsxs(f.Fragment,{children:["Coding",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.coding)})]})},{value:"all",label:f.jsxs(f.Fragment,{children:["All",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.all)})]})}]})}),children:[f.jsx(uE,{envelope:p,loading:y,measure:v,onMeasure:b,range:te,focus:N,onRange:ie=>{!ie&&!w.range||C({range:ie?{measure:v,low:ie[0],high:ie[1]}:null})},onGene:ie=>C({q:ie})}),T&&s&&s.warnings.length>0&&f.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")}),T?f.jsxs("div",{className:"mut-body",children:[f.jsx(dE,{table:w,data:T,onChange:C}),f.jsx(_N,{data:T,rows:i,hasMore:r,loadingMore:u,onMore:d,table:w,fetching:m,showCcf:j,onTable:C,onHover:M,onLocate:R})]}):f.jsx("div",{className:"mut-rule",children:f.jsx(Zr,{label:"mutations",envelope:s,loading:h,skeletonHeight:240,children:()=>null})})]})}),um={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},dx=["oncogene","tsg","both"],cm={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},RN={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function TN(n){return n?RN[n]??n:""}const AN={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function fm(n){return n?AN[n]??n:"–"}function ON(n){return n==null?"–":n>=1e6?`${(n/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} Mb`:n>=1e3?`${(n/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} kb`:`${n.toLocaleString("en-US")} bp`}function zN(n){return n.some(s=>s.left_expression||s.right_expression||s.expression)}function DN(n){const s={oncogene:0,tsg:0,both:0};for(const i of n)i.role&&(s[i.role]+=1);return s}function HN(n){const s=n.trim().match(Y1);if(!s)return null;const i=Number(s[2].replace(/,/g,"")),r=s[3]?Number(s[3].replace(/,/g,"")):i;return{chrom:s[1].toUpperCase(),start:Math.min(i,r),end:Math.max(i,r)}}function LN(n,s){const i=s.trim().toLowerCase();if(!i)return!0;const r=HN(s);if(r){const u=(d,h)=>(d==null?void 0:d.toUpperCase())===r.chrom&&h!==null&&h>=r.start&&h<=r.end;return u(n.left_chrom,n.left_pos)||u(n.right_chrom,n.right_pos)}return[n.gene,n.left_gene,n.right_gene,n.callers,n.left_loc,n.right_loc,n.sv_type,fm(n.sv_type),n.role?um[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(i))}const Wa={deletion:"var(--sv-del)","tandem-duplication":"var(--sv-dup)",inversion:"var(--sv-inv)",translocation:"var(--sv-tra)"},UN={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."},VN={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function $N(n){return n.size?VN[n.size]??n.size:""}function _y(n){const s=`${n.clustered?"Clustered":"Dispersed"} ${cm[n.sv_class].toLowerCase()}s`;return n.size?`${s}, ${TN(n.size)}`:s}function FN(n){const s=[];return n.forEach((i,r)=>{const u=s[s.length-1];u&&u.clustered===i.clustered&&u.sv_class===i.sv_class?u.end=r:s.push({clustered:i.clustered,sv_class:i.sv_class,start:r,end:r})}),s}function BN(n){const s=new Map;for(const i of n)s.set(i.sv_class,(s.get(i.sv_class)??0)+i.count);return[...s].map(([i,r])=>({sv_class:i,count:r}))}const kN=45;function GN({role:n}){return n?f.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:um[n]}):f.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function qN({rows:n,shown:s,onToggle:i}){const r=DN(n);return f.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:dx.filter(u=>r[u]>0).map(u=>f.jsxs("button",{type:"button",className:`sv-legend-item p-${u==="oncogene"?"onco":u}`,"aria-pressed":s.includes(u),onClick:()=>i(u),children:[um[u],f.jsx("span",{className:"sv-legend-n",children:r[u]})]},u))})}function My({gene:n,chrom:s,pos:i,loc:r,query:u}){return f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"sv-end",children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:n||"–",query:u})}),r&&f.jsx("span",{className:"sv-loc",children:r})]}),f.jsx("span",{className:"vt-sub stack mono",children:s&&i!==null?Fr(s,i):"–"})]})}function hx(n){return n?n.replace(/,\s*/g,", "):"–"}function QN({label:n,sorted:s,onClick:i}){return f.jsxs("button",{type:"button",className:"vt-sort","data-active":!!s,onClick:i,title:`Sort by ${n.toLowerCase()}`,children:[n,s==="desc"?f.jsx(zu,{size:12,"aria-hidden":!0}):s==="asc"?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function YN({row:n,onLocate:s}){const[i,r]=E.useState(!1),u=n.left_chrom&&n.left_pos!==null?{chrom:n.left_chrom,pos:n.left_pos}:null,d=n.right_chrom&&n.right_pos!==null?{chrom:n.right_chrom,pos:n.right_pos}:null,h=[["Type",fm(n.sv_type)],["Left breakpoint",u?`${Fr(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",d?`${Fr(d.chrom,d.pos)}${n.right_loc?`, ${n.right_loc}`:""}`:"–"],["Pileups (left, right)",[n.left_pileup,n.right_pileup].filter(Boolean).join(", ")||"–"],["Orientation",n.orientation??"–"],["Callers",hx(n.callers)]],m=n.gene??n.left_gene,p=n.gene??n.right_gene;return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:h.map(([y,x])=>f.jsxs("div",{children:[f.jsx("dt",{children:y}),f.jsx("dd",{children:x})]},y))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...u,gene:m}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show ",d&&d.chrom===u.chrom?"it":"left breakpoint"," on copy number"]}),d&&d.chrom!==(u==null?void 0:u.chrom)&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...d,gene:p}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),n.igv_locus&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.igv_locus??""),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy these IGV loci",n.igv_locus??"")}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy IGV loci"]})]})]})}function Ry({kind:n,rows:s,total:i=s.length,query:r="",onLocate:u}){const[d,h]=E.useState({}),[m,p]=E.useState([]),y=E.useRef(null),x=zN(s);E.useEffect(()=>{y.current&&(y.current.scrollTop=0)},[r,s.length]);const v=E.useMemo(()=>{const N={id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:j})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":j.getIsExpanded(),"aria-label":`Details of ${j.original.gene??[j.original.left_gene,j.original.right_gene].filter(Boolean).join(" and ")}`,onClick:F=>{F.stopPropagation(),j.toggleExpanded()},children:f.jsx(nm,{size:14,"aria-hidden":!0})})},M=[{id:"type",header:"Type",accessorFn:j=>j.sv_type??"",cell:({row:{original:j}})=>fm(j.sv_type)},{id:"role",header:"Role",accessorFn:j=>j.role?dx.indexOf(j.role):9,cell:({row:{original:j}})=>f.jsx(GN,{role:j.role})},{id:"callers",header:"Callers",accessorFn:j=>j.callers??"",cell:({row:{original:j}})=>f.jsx("span",{className:"text-[12.5px]",children:hx(j.callers)})},{id:"support",header:"Support",accessorFn:j=>j.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:j.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:j}})=>f.jsx("span",{className:"mono text-[12px]",children:[j.left_pileup,j.right_pileup].filter(Boolean).join(" · ")||"–"})}],R=x?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:j}})=>n==="whole_gene"?f.jsx("span",{className:"text-[12.5px]",children:j.expression??"–"}):f.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[f.jsx("span",{children:j.left_expression??"–"}),f.jsx("span",{style:{color:"var(--muted)"},children:j.right_expression??"–"})]})}]:[];return n==="whole_gene"?[N,{id:"gene",header:"Gene",accessorFn:j=>j.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:j.gene??"–",query:r})}),f.jsx("span",{className:"vt-sub mono",children:j.left_chrom&&j.left_pos!==null&&j.right_pos!==null?`${Fr(j.left_chrom,j.left_pos)}–${j.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:j=>j.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:ON(j.length)})},...M,...R]:[N,{id:"left",header:"Left",accessorFn:j=>j.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsx(My,{gene:j.left_gene,chrom:j.left_chrom,pos:j.left_pos,loc:j.left_loc,query:r})},{id:"right",header:"Right",accessorFn:j=>j.right_gene??"",cell:({row:{original:j}})=>f.jsx(My,{gene:j.right_gene,chrom:j.right_chrom,pos:j.right_pos,loc:j.right_loc,query:r})},...M,...R]},[n,x,r]),b=ox({data:s,columns:v,getRowId:N=>`${n}-${N.row}`,getCoreRowModel:ix(),getSortedRowModel:eN(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,state:{expanded:d,sorting:m},onExpandedChange:h,onSortingChange:p}),w=b.getVisibleLeafColumns().length,C=n==="onco"?kN:cx;return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:y,className:"vt-scroll vt-viewport",style:{"--row-h":`${C}px`},children:f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:b.getHeaderGroups().map(N=>f.jsx("tr",{children:N.headers.map(M=>{const R=M.column.columnDef.meta,j=M.column.getIsSorted();return f.jsx("th",{className:R==null?void 0:R.className,"aria-sort":j?j==="desc"?"descending":"ascending":void 0,children:M.column.getCanSort()?f.jsx(QN,{label:String(M.column.columnDef.header),sorted:j,onClick:M.column.getToggleSortingHandler()}):Vu(M.column.columnDef.header,M.getContext())},M.id)})},N.id))}),f.jsx(fx,{items:b.getRowModel().rows,scrollRef:y,columnCount:w,rowHeight:C,getKey:N=>N.id,render:N=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":N.getIsExpanded(),onClick:()=>N.toggleExpanded(),children:N.getVisibleCells().map(M=>{var R;return f.jsx("td",{className:(R=M.column.columnDef.meta)==null?void 0:R.className,children:Vu(M.column.columnDef.cell,M.getContext())},M.id)})}),N.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:w,children:f.jsx(YN,{row:N.original,onLocate:u})})})]})})]})}),f.jsx(Wu,{shown:s.length,total:i,noun:["row","rows"]})]})}const _r=176,sh=34,ih=7,rh=22,Tu=30,IN={deletion:"Del","tandem-duplication":"Dup",inversion:"Inv",translocation:"Tra"};function XN(n,s){return[cm[n],UN[n],IN[n]].find(r=>Sa(r,12)+8<=s)??""}function KN(n,s,i,r,u){const d=Math.min(u,i/2,r);return`M${n},${s+r} V${s+d} Q${n},${s} ${n+d},${s} H${n+i-d} Q${n+i},${s} ${n+i},${s+d} V${s+r} Z`}function ZN({categories:n,total:s,litClass:i}){const[r,u]=Pr(),d=E.useId(),[h,m]=E.useState(null),p=FN(n),y=Math.max(0,...n.map(k=>k.count)),x=Xj(y,3),v=x[x.length-1],b=n.length,w=(p.length-1)*ih,C=n.some(k=>k.clustered)&&n.some(k=>!k.clustered),N=Math.max((u-Tu-6-w-(C?rh-ih:0))/b,4),M=Math.min(26,N*.64),R=[],j=[];let F=Tu;p.forEach((k,ne)=>{ne>0&&(F+=p[ne-1].clustered!==k.clustered?rh:ih);const ie=F;for(let ee=k.start;ee<=k.end;ee++)R[ee]=F+(N-M)/2,F+=N;const Ce=j.find(ee=>ee.clustered===k.clustered&&ee.x1>=ie-rh-1),X=n.slice(k.start,k.end+1).reduce((ee,P)=>ee+P.count,0);Ce?(Ce.x1=F,Ce.count+=X):j.push({clustered:k.clustered,x0:ie,x1:F,count:X})});const T=k=>sh+_r-k/v*_r,H=sh+_r,D=k=>h!==null?k===h:i?n[k].sv_class===i:!0,z=h===null?null:n[h],Y=z&&s?Math.round(z.count/s*100):0,te=H+62;return f.jsxs("div",{ref:r,className:"rs","data-lit":h!==null||i?"":void 0,children:[f.jsxs("svg",{width:u,height:te,role:"img","aria-label":`Rearrangement signatures: ${n.filter(k=>k.count>0).map(k=>`${k.category} ${k.count}`).join(", ")}`,children:[f.jsx("defs",{children:Object.keys(Wa).map(k=>f.jsxs("linearGradient",{id:`${d}-${k}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:Wa[k]}}),f.jsx("stop",{offset:"1",style:{stopColor:Wa[k]},stopOpacity:.72})]},k))}),j.map(k=>f.jsxs("g",{children:[C&&k.clustered&&f.jsx("rect",{x:k.x0-6,y:0,width:k.x1-k.x0+12,height:H+56,rx:14,className:"rs-zone"}),C&&f.jsxs("text",{x:k.x0,y:17,className:"rs-zone-name",children:[k.clustered?"Clustered":"Dispersed",f.jsxs("tspan",{className:"rs-zone-n",children:[" ",k.count.toLocaleString("en-US")]})]})]},k.clustered?"c":"d")),x.map(k=>f.jsxs("g",{children:[f.jsx("line",{x1:Tu-4,x2:u,y1:T(k),y2:T(k),className:k===0?"rs-base":"rs-grid"}),f.jsx("text",{x:Tu-10,y:T(k)+4,textAnchor:"end",className:"rs-tick",children:k.toLocaleString("en-US")})]},k)),n.map((k,ne)=>{const ie=k.count/v*_r,Ce=D(ne);return f.jsxs("g",{className:"rs-bar","data-off":Ce?void 0:"",children:[k.count>0?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:KN(R[ne],T(k.count),M,ie,6),fill:`url(#${d}-${k.sv_class})`,fillOpacity:k.clustered?.5:1}),f.jsx("text",{x:R[ne]+M/2,y:T(k.count)-7,textAnchor:"middle",className:"rs-count",children:k.count.toLocaleString("en-US")})]}):f.jsx("rect",{x:R[ne],y:H-3,width:M,height:3,rx:1.5,style:{fill:Wa[k.sv_class]},fillOpacity:.28}),k.size&&N>=26&&f.jsx("text",{x:R[ne]+M/2,y:H+16,textAnchor:"middle",className:"rs-size",children:$N(k)}),f.jsx("rect",{x:R[ne]-(N-M)/2,y:sh-8,width:N,height:_r+30,fill:"transparent",tabIndex:0,"aria-label":`${_y(k)}: ${k.count}`,onMouseEnter:()=>m(ne),onMouseLeave:()=>m(null),onFocus:()=>m(ne),onBlur:()=>m(null)})]},k.category)}),p.map(k=>{const ne=R[k.start],ie=R[k.end]+M,Ce=XN(k.sv_class,ie-ne+(N-M));return f.jsxs("g",{className:"rs-class","data-off":i&&i!==k.sv_class?"":void 0,children:[f.jsx("line",{x1:ne,x2:ie,y1:H+26,y2:H+26,style:{stroke:Wa[k.sv_class]},className:"rs-bracket"}),f.jsx("text",{x:(ne+ie)/2,y:H+44,textAnchor:"middle",className:"rs-class-name",children:Ce})]},`${k.clustered}-${k.sv_class}`)})]}),z&&h!==null&&f.jsxs(Ni,{x:R[h]+M/2,y:Math.max(T(z.count)-8,40),width:u,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[z.sv_class],opacity:z.clustered?.5:1},"aria-hidden":!0}),_y(z)]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Rearrangements"}),f.jsx("b",{children:z.count.toLocaleString("en-US")})]}),s>0&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Of all of them"}),f.jsxs("b",{children:[Y===0&&z.count>0?"<1":Y,"%"]})]})]})]})}function mx(n,s,i){return`${n.toLocaleString("en-US")} ${n===1?s:i}`}function PN({categories:n,total:s}){const[i,r]=E.useState(null),u=BN(n);return f.jsxs("div",{className:"sv-sigs",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",f.jsx("span",{className:"sv-h-n",children:mx(s,"rearrangement","rearrangements")})]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",onMouseLeave:()=>r(null),children:[u.map(({sv_class:d,count:h})=>f.jsxs("li",{"data-on":i===d||void 0,onMouseEnter:()=>r(d),children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[d]},"aria-hidden":!0}),cm[d],f.jsx("span",{className:"sv-key-n",children:h.toLocaleString("en-US")})]},d)),f.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),f.jsx("div",{className:"sv-sigs-plot",children:f.jsx(ZN,{categories:n,total:s,litClass:i})})]})}function JN({data:n,query:s,onQuery:i,onLocate:r}){const[u,d]=E.useState([]),h=w=>d(C=>C.includes(w)?C.filter(N=>N!==w):[...C,w]),m=w=>w.filter(C=>LN(C,s)),p=w=>u.length?w.filter(C=>C.role&&u.includes(C.role)):w,y=[...n.onco,...n.whole_gene],x=[...m(n.onco),...m(n.whole_gene)],v=p(m(n.onco)),b=p(m(n.whole_gene));return y.length===0?f.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"tbar",children:[x.length>0&&f.jsx(qN,{rows:x,shown:u,onToggle:h}),f.jsx($u,{value:s,onChange:i,label:"Search structural variants",placeholder:"Search gene, caller or locus",shortcut:!1})]}),x.length===0&&f.jsxs("div",{className:"vt-empty sv-empty",children:["No rows match this search.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(""),children:"Clear the search"})]}),v.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[f.jsx("h3",{className:"sv-h",children:"Rearranged oncogenes and tumour suppressors"}),f.jsx(Ry,{kind:"onco",rows:v,total:n.onco.length,query:s,onLocate:r})]}),b.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[f.jsx("h3",{className:"sv-h",children:"Whole-gene rearrangements"}),f.jsx(Ry,{kind:"whole_gene",rows:b,total:n.whole_gene.length,query:s,onLocate:r})]})]})}const WN=E.forwardRef(function({envelope:s,loading:i,picked:r,onLocate:u},d){const h=(s==null?void 0:s.status)==="ok"?s.data:null,[m,p]=E.useState("");return f.jsx(Ku,{ref:d,title:"Structural variants",subtitle:h?mx(h.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"structuralVariants",className:"svs",expandable:!0,children:f.jsx(Zr,{label:"structural variants",envelope:s,loading:i,skeletonHeight:220,children:y=>f.jsxs("div",{className:"sv-body",children:[f.jsx(JN,{data:y,query:m,onQuery:p,onLocate:u}),y.signatures&&f.jsx(PN,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),e_={"del.mh.prop":{short:"Del. MH",long:"Deletions with microhomology (share of deletions)"},SNV3:{short:"SBS3",long:"Substitution signature 3"},SV3:{short:"RS3",long:"Rearrangement signature 3"},SV5:{short:"RS5",long:"Rearrangement signature 5"},hrd:{short:"HRD index",long:"HRD index (loss of heterozygosity, telomeric imbalance, large-scale transitions)"},SNV8:{short:"SBS8",long:"Substitution signature 8"}};function Ty(n,s="short"){var i;return((i=e_[n])==null?void 0:i[s])??n}const oh=8;function t_(n){const s=n.find(u=>u.group==="sample")??n[0],i=[...(s==null?void 0:s.signatures)??[]].sort((u,d)=>(d.proportion??0)-(u.proportion??0)).map(u=>u.signature),r=i.length>oh?oh-1:oh;return{shown:i.slice(0,r),other:i.slice(r)}}function Ay(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}const Oy=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],n_="#a3a3ab";function l_(n){const{shown:s,other:i}=t_(n),r=n.find(p=>p.group==="sample")??n[0],u=n.find(p=>p.group==="cohort")??null,d=(p,y,x)=>p?p.signatures.filter(v=>y.includes(v.signature)).reduce((v,b)=>v+(b[x]??0),0):null,h=(p,y,x)=>{var v,b;return{name:p,members:y,colour:x,share:d(r,y,"proportion")??0,cohortShare:d(u,y,"proportion"),count:d(r,y,"count")??0,cohortCount:d(u,y,"count"),aetiology:y.length===1?((v=r==null?void 0:r.signatures.find(w=>w.signature===p))==null?void 0:v.aetiology)??((b=u==null?void 0:u.signatures.find(w=>w.signature===p))==null?void 0:b.aetiology)??null:`${y.length} smaller signatures`}},m=s.map((p,y)=>h(p,[p],Oy[y%Oy.length]));return i.length&&m.push(h("Other",i,n_)),m}function ua(n){return n.cohortShare===null?null:(n.share-n.cohortShare)*100}function zy(n,s,i){const r=Math.max(s-i*Math.max(n.length-1,0),0),u=n.reduce((h,m)=>h+m,0)||1;let d=0;return n.map(h=>{const m=h/u*r,p={y0:d,y1:d+m};return d+=m+i,p})}function a_(n,s,i,r){const u=(n+i)/2,d=h=>h.toFixed(2);return`M${d(n)},${d(s.y0)} C${d(u)},${d(s.y0)} ${d(u)},${d(r.y0)} ${d(i)},${d(r.y0)} L${d(i)},${d(r.y1)} C${d(u)},${d(r.y1)} ${d(u)},${d(s.y1)} ${d(n)},${d(s.y1)} Z`}function Lr(n,s){const i=(n.length-1)*s,r=Math.floor(i),u=Math.ceil(i);return n[r]+(n[u]-n[r])*(i-r)}function gx(n){var u;const s=n.cohort.filter(d=>d!==null&&Number.isFinite(d)).sort((d,h)=>d-h);if(s.length===0)return null;const i=((u=n.sample)==null?void 0:u.value)??null,r=[...s];if(i!==null){const d=r.indexOf(i);d>=0&&r.splice(d,1)}return{values:s,q1:Lr(s,.25),median:Lr(s,.5),q3:Lr(s,.75),tumour:i,above:i===null?null:r.filter(d=>d<i).length,others:r.length}}function s_(n,s=64){const i=n.length,r=n.reduce((y,x)=>y+x,0)/i,u=Math.sqrt(n.reduce((y,x)=>y+(x-r)**2,0)/Math.max(i-1,1)),d=Math.min(u,(Lr(n,.75)-Lr(n,.25))/1.34)||u||.1,h=Math.max(.9*d*i**-.2,.02),m=Array.from({length:s+1},(y,x)=>{const v=x/s;return{x:v,y:n.reduce((b,w)=>b+Math.exp(-.5*((v-w)/h)**2),0)}}),p=Math.max(...m.map(y=>y.y))||1;return m.map(y=>({x:y.x,y:y.y/p}))}function i_(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u]-n[d]).forEach(u=>{let d=0;for(;i.some(h=>h.level===d&&Math.abs(h.x-n[u])<s);)d+=1;i.push({x:n[u],level:d}),r[u]=d}),r}function uh(n){return n.above===null||n.others===0?"":n.above===n.others?n.others===1?"Above the other sample":"Highest in the cohort":n.above===0?"Lowest in the cohort":`Above ${n.above} of ${n.others} others`}function ui(n,s,i,r){const u=Math.PI*(1-Math.min(Math.max(r,0),1));return{x:n+i*Math.cos(u),y:s-i*Math.sin(u)}}const ca=n=>n==null?"–":n.toFixed(2),r_=8,o_=250,ke={w:232,h:148,cx:116,cy:122,r:92};function ch(n,s){const i=ui(ke.cx,ke.cy,ke.r,n),r=ui(ke.cx,ke.cy,ke.r,s);return`M${i.x.toFixed(2)},${i.y.toFixed(2)} A${ke.r},${ke.r} 0 0 1 ${r.x.toFixed(2)},${r.y.toFixed(2)}`}function u_({score:n}){const s=n.value===null?null:Math.min(Math.max(n.value,0),1),i=n.rating==="HIGH",r=n.threshold,u=r===null?null:[ui(ke.cx,ke.cy,ke.r-14,r),ui(ke.cx,ke.cy,ke.r+14,r),ui(ke.cx,ke.cy,ke.r+27,r)],d=s===null?null:ui(ke.cx,ke.cy,ke.r,s);return f.jsxs("div",{className:"hrd-score","data-high":i||void 0,children:[f.jsxs("div",{className:"hrd-score-head",children:[f.jsx("span",{className:"hrd-name",children:n.name}),n.rating&&f.jsx("span",{className:`sc-pill ${i?"p-warn":"p-neu"}`,children:n.rating})]}),f.jsxs("svg",{width:ke.w,height:ke.h,viewBox:`0 0 ${ke.w} ${ke.h}`,role:"img","aria-label":`${n.name} ${s===null?"has no score":`scores ${ca(n.value)}`}${n.rating?`, rated ${n.rating}`:""}`,className:"hrd-gauge",children:[f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-track"}),r!==null&&f.jsx("path",{d:ch(r,1),pathLength:1,className:"hrd-zone"}),s!==null&&f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-fill",style:{"--v":s}}),u&&f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:u[0].x,y1:u[0].y,x2:u[1].x,y2:u[1].y,className:"hrd-tick"}),f.jsx("text",{x:u[2].x,y:u[2].y+4,textAnchor:"middle",className:"hrd-tick-label",children:r})]}),d&&f.jsx("circle",{cx:d.x,cy:d.y,r:8.5,className:"hrd-end"}),f.jsx("text",{x:ke.cx,y:ke.cy-10,textAnchor:"middle",className:"hrd-num",children:s===null?"–":ca(n.value)}),f.jsx("text",{x:ke.cx-ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"0"}),f.jsx("text",{x:ke.cx+ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"1"})]}),n.threshold!==null&&f.jsxs("span",{className:"hrd-rule",children:["High at ",n.threshold," and above"]})]})}function c_(n){const s=n.filter(i=>i.stats&&i.stats.tumour!==null);return{above:s.filter(i=>i.stats.tumour>i.stats.median).length,of:s.length}}const f_="var(--font)";function d_({features:n}){var F;const[s,i]=Pr(720),[r,u]=E.useState(null),d=n.map(T=>({feature:T,stats:gx(T)})),h=i<640,m=h?0:116,p=h?0:168,y=m+10,x=i-p-14,v=T=>y+T*(x-y),b=h?28:0,w=h?100:70,C=b+38,N=30,M=d.length*w+14,R=M+22,j=r===null?null:d[r];return f.jsxs("div",{ref:s,className:"clouds",onMouseLeave:()=>u(null),children:[f.jsxs("svg",{width:i,height:R,role:"img","aria-label":"HRDetect features against the cohort",style:{fontFamily:f_},children:[[0,.25,.5,.75,1].map(T=>f.jsx("line",{x1:v(T),x2:v(T),y1:0,y2:M,className:"cloud-grid","data-major":T===0||T===1||void 0},T)),d.map(({feature:T,stats:H},D)=>{var Ce;const z=D*w,Y=Ty(T.feature),te=H&&H.values.length<=o_?H.values:[],k=i_(te.map(v),7.5),ne=H&&H.values.length>=r_?s_(H.values):null,ie=H&&H.tumour!==null?v(H.tumour):null;return f.jsxs("g",{transform:`translate(0 ${z})`,className:"cloud-row","data-on":r===D||void 0,onMouseEnter:()=>u(D),children:[f.jsx("rect",{x:0,y:2,width:i,height:w-4,rx:12,className:"cloud-hit"}),H&&f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:v(H.q1),y:b+4,width:Math.max(v(H.q3)-v(H.q1),2),height:w-b-10,rx:8,className:"cloud-iqr"}),f.jsx("line",{x1:v(H.median),x2:v(H.median),y1:b+10,y2:w-14,className:"cloud-median"}),ne&&f.jsxs(f.Fragment,{children:[f.jsx("path",{d:`M${v(0)},${C} ${ne.map(X=>`L${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" ")} L${v(1)},${C} Z`,className:"cloud-area"}),f.jsx("path",{d:ne.map((X,ee)=>`${ee?"L":"M"}${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" "),className:"cloud-line"})]}),te.map((X,ee)=>f.jsx("circle",{cx:v(X),cy:C+11+Math.min(k[ee],2)*7,r:3,className:"cloud-dot"},ee)),ie!==null&&f.jsxs("g",{className:"cloud-pin",transform:`translate(${ie} 0)`,children:[f.jsx("line",{y1:b+8,y2:C,className:"cloud-stem"}),f.jsx("circle",{cy:C,r:8,className:"cloud-pin-dot"})]})]}),f.jsx("text",{x:h?4:6,y:h?18:C-6,className:"cloud-name",children:Y}),!h&&f.jsxs("text",{x:6,y:C+10,className:"cloud-raw",children:["raw ",ca((Ce=T.sample)==null?void 0:Ce.raw)]}),H&&f.jsx("text",{x:i-4,y:h?18:C-6,textAnchor:"end",className:"cloud-rank",children:uh(H)}),!h&&H&&f.jsxs("text",{x:i-4,y:C+10,textAnchor:"end",className:"cloud-raw",children:["of ",H.values.length," in the cohort"]})]},T.feature)}),f.jsxs("g",{transform:`translate(0 ${M})`,className:"cloud-axis",children:[f.jsx("text",{x:v(0),y:12,textAnchor:"start",children:"0 · cohort lowest"}),f.jsx("text",{x:v(.5),y:12,textAnchor:"middle",children:"0.5"}),f.jsx("text",{x:v(1),y:12,textAnchor:"end",children:"cohort highest · 1"})]})]}),j&&r!==null&&j.stats&&f.jsxs(Ni,{x:j.stats.tumour!==null?v(j.stats.tumour):v(j.stats.median),y:r*w+C,width:i,children:[f.jsx("span",{className:"ctip-title",children:Ty(j.feature.feature,"long")}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[ca((F=j.feature.sample)==null?void 0:F.raw)," ",f.jsxs("i",{children:["scaled ",ca(j.stats.tumour)]})]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort median"}),f.jsx("b",{children:ca(j.stats.median)})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Middle half"}),f.jsxs("b",{children:[ca(j.stats.q1),"–",ca(j.stats.q3)]})]}),uh(j.stats)&&f.jsx("span",{className:"ctip-note",children:uh(j.stats)})]})]})}const Mr=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,Rr=n=>Math.round(n).toLocaleString("en-US"),h_=n=>`${n>=0?"+":"−"}${Math.abs(n).toFixed(Math.abs(n)>=10?0:1)}`,Dy=3,ii=26,ri=52;function m_({groups:n,bands:s,lit:i,onLight:r}){const[u,d]=Pr(),h=n.find(D=>D.group==="sample")??n[0],m=n.find(D=>D.group==="cohort")??null,p=m!==null,y=d>=440,x=y?d>=620?118:92:0,v=p?330:230,b=zy(s.map(D=>D.share),v,Dy),w=p?zy(s.map(D=>D.cohortShare??0),v,Dy):[],C=p?x:0,N=d-x-ii,M=C+ii,R=N,j=s.find(D=>D.name===i)??null,F=j?s.indexOf(j):-1,T=F<0?0:ri+((b[F].y0+b[F].y1)/2+(p?(w[F].y0+w[F].y1)/2:(b[F].y0+b[F].y1)/2))/2,H=(D,z,Y,te,k,ne)=>{const ie=D.y1-D.y0;if(!y||ie<17)return null;const Ce=ri+(D.y0+D.y1)/2,X=ie>=36;return f.jsxs("text",{x:k,y:Ce,textAnchor:ne,className:"flow-label",children:[f.jsxs("tspan",{x:k,dy:X?"-0.35em":"0.35em",className:"flow-name",children:[z.name,!X&&f.jsxs("tspan",{className:"flow-share",children:[" ",Mr(Y)]})]}),X&&f.jsxs("tspan",{x:k,dy:"1.35em",className:"flow-share",children:[Mr(Y),te]})]})};return f.jsxs("div",{ref:u,className:"flow","data-lit":i??void 0,children:[f.jsxs("svg",{width:d,height:ri+v+4,role:"img","aria-label":"Signature shares, tumour against cohort",children:[f.jsxs("g",{className:"flow-head",children:[f.jsx("text",{x:0,y:16,className:"flow-col",children:Ay(h)}),f.jsxs("text",{x:0,y:34,className:"flow-sub",children:[Rr(h.total)," mutations"]}),m&&f.jsxs(f.Fragment,{children:[f.jsx("text",{x:d,y:16,textAnchor:"end",className:"flow-col",children:Ay(m)}),f.jsxs("text",{x:d,y:34,textAnchor:"end",className:"flow-sub",children:["about ",Rr(m.total)," each, on average"]})]})]}),p&&f.jsx("g",{className:"flow-ribs",transform:`translate(0 ${ri})`,children:s.map((D,z)=>f.jsx("path",{d:a_(M,b[z],R,w[z]),fill:D.colour,className:"flow-rib","data-on":i===D.name||void 0,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null)},D.name))}),s.map((D,z)=>{const Y=i===D.name||void 0,te=(k,ne)=>k.y1-k.y0>.4&&f.jsx("rect",{x:ne,y:ri+k.y0,width:ii,height:k.y1-k.y0,rx:Math.min(5,(k.y1-k.y0)/2),fill:D.colour,className:"flow-seg","data-on":Y,tabIndex:0,"aria-label":`${D.name}, ${Mr(D.share)} of this tumour`,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null),onFocus:()=>r(D.name),onBlur:()=>r(null)});return f.jsxs("g",{className:"flow-band","data-on":Y,children:[te(b[z],C),p&&te(w[z],N),H(b[z],D,D.share,D.count?` · ${Rr(D.count)}`:"",p?C-10:C+ii+10,p?"end":"start"),p&&H(w[z],D,D.cohortShare??0,"",N+ii+10,"start")]},D.name)}),p&&d>=520&&s.map((D,z)=>{const Y=ua(D),te=b[z],k=w[z];if(Y===null||Math.abs(Y)<5||Math.min(te.y1-te.y0,k.y1-k.y0)<22)return null;const ne=(M+R)/2,ie=ri+(te.y0+te.y1+k.y0+k.y1)/4;return f.jsxs("g",{transform:`translate(${ne} ${ie})`,className:"flow-delta","data-on":i===D.name||void 0,children:[f.jsx("rect",{x:-30,y:-10,width:60,height:20,rx:10}),f.jsxs("text",{y:4,textAnchor:"middle",children:[h_(Y)," pts"]})]},D.name)})]}),j&&f.jsxs(Ni,{x:p?d/2:C+ii+x+20,y:T,width:d,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:j.colour},"aria-hidden":!0}),j.name]}),j.aetiology&&f.jsx("span",{className:"ctip-sub",children:j.aetiology}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[Mr(j.share)," ",f.jsxs("i",{children:[Rr(j.count)," mutations"]})]})]}),j.cohortShare!==null&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort"}),f.jsxs("b",{children:[Mr(j.cohortShare)," ",f.jsx("i",{children:j.cohortCount!==null?`about ${Rr(j.cohortCount)} each`:""})]})]}),ua(j)!==null&&f.jsx("span",{className:"ctip-note",children:Math.abs(ua(j))<1?"About the same as its cohort":`${Math.abs(ua(j)).toFixed(Math.abs(ua(j))>=10?0:1)} points ${ua(j)>0?"above":"below"} its cohort`})]})]})}const Hy=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,px=n=>Math.round(n).toLocaleString("en-US");function g_({points:n,reach:s}){if(n===null)return null;const i=Math.min(Math.abs(n)/s,1)*100;return f.jsx("span",{className:"lead","aria-hidden":!0,children:f.jsx("span",{className:"lead-bar","data-up":n>=0||void 0,style:{width:`${Math.max(i,n===0?0:3)}%`}})})}function p_({groups:n}){const[s,i]=E.useState(null),r=E.useMemo(()=>l_(n),[n]),u=n.find(h=>h.group==="cohort"),d=Math.max(10,...r.map(h=>Math.abs(ua(h)??0)));return f.jsxs("section",{className:"sig-section","aria-label":"Mutational signatures",children:[f.jsx("h3",{className:"sv-h",children:"Mutational signatures"}),f.jsxs("div",{className:"sig-grid",children:[f.jsx(m_,{groups:n,bands:r,lit:s,onLight:i}),f.jsxs("div",{className:"sig-tablebox",children:[f.jsxs("table",{className:"sig-table",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:"Signature"}),f.jsx("th",{className:"n",children:"This tumour"}),u&&f.jsx("th",{className:"n",children:"Cohort"}),u&&f.jsx("th",{className:"lead-h",children:"Against cohort"})]})}),f.jsx("tbody",{children:r.map(h=>{const m=ua(h);return f.jsxs("tr",{"data-lit":s===h.name||void 0,onMouseEnter:()=>i(h.name),onMouseLeave:()=>i(null),children:[f.jsxs("td",{children:[f.jsxs("span",{className:"sig-name",title:h.members.length>1?h.members.join(", "):void 0,children:[f.jsx("span",{className:"sv-swatch",style:{background:h.colour},"aria-hidden":!0}),h.name]}),h.aetiology&&f.jsx("span",{className:"sig-aetiology",children:h.aetiology})]}),f.jsxs("td",{className:"n",children:[f.jsx("span",{className:"mono",children:Hy(h.share)}),f.jsx("span",{className:"sig-count",children:px(h.count)})]}),u&&f.jsx("td",{className:"n mono",children:Hy(h.cohortShare??0)}),u&&f.jsx("td",{children:f.jsxs("span",{className:"lead-cell",children:[f.jsx(g_,{points:m,reach:d}),f.jsx("span",{className:"lead-n mono",children:m===null?"":`${m>=0?"+":"−"}${Math.abs(m).toFixed(0)}`})]})})]},h.name)})})]}),f.jsx(Wu,{shown:r.length,total:r.length,noun:["signature","signatures"]})]})]})]})}function v_({hrd:n}){const s=E.useMemo(()=>c_(n.features.map(i=>({feature:i,stats:gx(i)}))),[n.features]);return f.jsxs("section",{className:"sig-section","aria-label":"Homologous recombination deficiency",children:[f.jsx("h3",{className:"sv-h",children:"Homologous recombination deficiency"}),f.jsxs("div",{className:"hrd-body",children:[n.scores.length>0&&f.jsx("div",{className:"hrd-scores",children:n.scores.map(i=>f.jsx(u_,{score:i},i.name))}),n.features.length>0&&f.jsxs("div",{className:"hrd-chart",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h4",{className:"hrd-sub",children:["HRDetect features against the cohort",n.cohort_n?f.jsxs("span",{className:"sv-h-n",children:["n = ",n.cohort_n]}):null]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-dot","aria-hidden":!0}),"Cohort sample"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-band","aria-hidden":!0}),"Middle half of the cohort"]})]})]}),s.of>0&&f.jsxs("p",{className:"hrd-lede",children:["Above the cohort median on ",f.jsx("b",{children:s.above})," of ",s.of," features"]}),f.jsx(d_,{features:n.features})]})]})]})}const y_=E.forwardRef(function({envelope:s,loading:i,picked:r},u){var m;const d=(s==null?void 0:s.status)==="ok"?s.data:null,h=(m=d==null?void 0:d.signatures)==null?void 0:m.find(p=>p.group==="sample");return f.jsx(Ku,{ref:u,title:"Signatures and HRD",subtitle:h?`${px(h.total)} mutations attributed to signatures`:void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"signaturesHrd",className:"sigs",children:f.jsx(Zr,{label:"signatures and HRD",envelope:s,loading:i,skeletonHeight:300,children:p=>f.jsxs("div",{className:"sig-body",children:[p.signatures?f.jsx(p_,{groups:p.signatures}):f.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),p.hrd&&f.jsx(v_,{hrd:p.hrd})]})})})});function x_(n){var r;const s=n.samples.filter(u=>u.category==="TUMOR");return(r=s.find(u=>Object.values(u.datasets??{}).some(d=>Object.values(d).includes("ok")))??s[0]??n.samples[0])==null?void 0:r.id}const S_=[];function b_(n){const s=E.useRef(!1);return E.useEffect(()=>{let i=0;const r=()=>{s.current=!0,window.clearTimeout(i),i=window.setTimeout(()=>s.current=!1,150)};return window.addEventListener("scroll",r,{passive:!0}),()=>{window.removeEventListener("scroll",r),window.clearTimeout(i)}},[]),E.useCallback(i=>{(i===null||!s.current)&&n(i)},[n])}function w_(n){var i,r;const s=(r=(i=n==null?void 0:n.samples.find(u=>{var d;return(d=u.disease)==null?void 0:d.name}))==null?void 0:i.disease)==null?void 0:r.name;return s?s.charAt(0)+s.slice(1).toLowerCase():void 0}function Tr(n,s){const i=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:i?"auto":"smooth",block:s})}const Ly=160;function C_(n,s){const i=E.useRef(n);i.current=n;const r=E.useRef(null),u=E.useRef(null),d=E.useRef(0),h=E.useRef(()=>{}),m=E.useRef(()=>{});E.useEffect(()=>{let x=0;const v=()=>{var H;if(x=0,r.current)return;const M=i.current.filter(([,D])=>D.current).map(([D,z])=>[D,z.current.getBoundingClientRect().top]),R=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),j=Math.max(0,...M.map(([,D])=>D+window.scrollY-R-Ly)),F=Ly+(R>0?j*Math.min(1,window.scrollY/R):0);let T=((H=M[0])==null?void 0:H[0])??null;for(const[D,z]of M)z<=F&&(T=D);s.set(T)},b=()=>{r.current=null,u.current=null,v()};m.current=()=>{u.current=window.scrollY};const w=()=>{if(r.current){u.current===null?(window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)):Math.abs(window.scrollY-u.current)>4&&b();return}x||(x=requestAnimationFrame(v))},C=()=>{r.current&&u.current===null&&(window.clearTimeout(d.current),b())};return h.current=v,v(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),window.addEventListener("wheel",C,{passive:!0}),window.addEventListener("touchstart",C,{passive:!0}),window.addEventListener("keydown",C),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w),window.removeEventListener("wheel",C),window.removeEventListener("touchstart",C),window.removeEventListener("keydown",C),window.clearTimeout(d.current),x&&cancelAnimationFrame(x)}},[]);const p=E.useRef("");return E.useEffect(()=>{const x=n.filter(([,v])=>v.current).map(([v])=>v).join();x!==p.current&&(p.current=x,h.current())}),x=>{r.current=x,u.current=null,s.set(x),window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)}}function j_({held:n,sampleId:s,...i}){const r=Iu(n);return f.jsx($C,{...i,sampleId:r??s})}function E_(){var Z,le,Me,Ve,Fe,Ct,st,et,Yn,Dl,ja,Ea,Jr,Mi,Wr;const{individual:n=""}=Tw(),[s,i]=Pw(),r=s.get("version")??void 0,[u,d]=E.useState(null),[h,m]=E.useState(null),[p,y]=E.useState(fy),[x,v]=E.useState(null),b=b_(v),[w,C]=E.useState(null),N=E.useRef(null),[M,R]=E.useState(null),j=E.useRef(Dr(!0)).current,F=E.useRef(null),T=E.useRef(null),H=E.useRef(null),D=E.useRef(null),z=E.useRef(Dr(null)).current,Y=C_([["overview",T],["copyNumber",N],["mutations",F],["structuralVariants",H],["signatures",D]],z),te=Ky();E.useEffect(()=>{const fe=M;if(!fe||typeof IntersectionObserver>"u")return;const Pe=new IntersectionObserver(([nt])=>j.set(nt.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return Pe.observe(fe),()=>Pe.disconnect()},[M]);const k=E.useCallback(fe=>y(Pe=>({...Pe,...fe})),[]),ne=E.useCallback(fe=>{k({q:JC(fe.chrom,fe.start,fe.end),scope:"all",sort:"position"}),Tr(F.current,"start")},[k]),ie=E.useCallback(fe=>{k({q:fe}),Tr(F.current,"start")},[k]),Ce=E.useCallback(fe=>{C({chrom:fe.chrom,pos:fe.pos,gene:fe.gene,nonce:Date.now()}),Tr(N.current,"center")},[]),X=E.useCallback(fe=>{C({...fe,nonce:Date.now()}),Tr(N.current,"center")},[]),ee=lj(n,r),P=ee.data,J=(P==null?void 0:P.status)==="ok"?P.data??void 0:void 0,ue=s.get("sample")??(J?x_(J):void 0),Ee=J==null?void 0:J.samples.find(fe=>fe.id===ue),je=(Ee==null?void 0:Ee.category)==="TUMOR"?ue:void 0,$e=h??((J==null?void 0:J.mode)==="unmatched"?"vaf":"ccf"),Ie=aj(n,J?ue:void 0,r),We=sj(n,r),A=ij(n,je,r),V=rj(n,je,$e,p.ffpe,r),W=cj(n,je,p,r),se=(Z=W.data)==null?void 0:Z.pages[0],he=E.useMemo(()=>{var fe;return((fe=W.data)==null?void 0:fe.pages.flatMap(Pe=>Pe.status==="ok"&&Pe.data?Pe.data.rows:[]))??[]},[W.data]),{fetchNextPage:ye}=W,be=E.useCallback(()=>void ye(),[ye]),re=uj(n,je,r),me=oj(n,je,r),rt=(Me=(le=We.data)==null?void 0:le.data)==null?void 0:Me.samples.find(fe=>fe.sample===ue),Bt=E.useMemo(()=>(rt==null?void 0:rt.drivers)??S_,[rt]),zn=E.useMemo(()=>x?{chrom:x.chrom,pos:x.pos,gene:x.gene}:w,[x,w]),Nt=E.useRef(null),ot=E.useRef(Dr(null)).current,Ge=(fe,Pe)=>{var nt;(nt=Nt.current)==null||nt.toggleAttribute("data-gliding",fe),Nt.current&&(Nt.current.style.minHeight=fe&&Pe?`${Pe}px`:"")},pt=E.useRef(null);E.useEffect(()=>()=>{var fe;return(fe=pt.current)==null?void 0:fe.call(pt)},[]);const cl=fe=>{var _a,Ma;if(fe===ue)return;(_a=pt.current)==null||_a.call(pt);const Pe=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches,nt=50;if(Pe||window.scrollY<=nt)return window.scrollTo({top:0,behavior:"auto"}),At("sample",fe);const bn=window.scrollY,Xt=Math.min(520,240+bn*.12),ec=performance.now();Ge(!0,document.documentElement.scrollHeight-(((Ma=Nt.current)==null?void 0:Ma.getBoundingClientRect().top)??0)-bn),ot.set(ue??null),Y("overview"),E.startTransition(()=>At("sample",fe));let Ri=0;function In(){cancelAnimationFrame(Ri),window.removeEventListener("wheel",In),window.removeEventListener("touchstart",In),window.removeEventListener("keydown",In),pt.current=null,ot.set(null),Ge(!1)}const Na=dl=>{const Ra=Math.min(1,(dl-ec)/Xt),Hl=bn*(1-Ra)**3;window.scrollTo({top:Hl,behavior:"instant"}),Hl<=nt&&ot.set(null),Ra<1?Ri=requestAnimationFrame(Na):In()};window.addEventListener("wheel",In,{passive:!0}),window.addEventListener("touchstart",In,{passive:!0}),window.addEventListener("keydown",In),pt.current=In,Ri=requestAnimationFrame(Na)},At=(fe,Pe)=>{const nt=new URLSearchParams(s);nt.set(fe,Pe),i(nt,{replace:!1}),d(null),y(fy()),v(null),C(null)},nn=[ee,Ie,We,A,V,W,re,me].map(fe=>fe.error);if(nn.some(fe=>fe instanceof Xu))return f.jsx("div",{className:`wgts ${Gn.theme}`,children:f.jsx("main",{className:"page",children:f.jsx(Dj,{onSignedIn:()=>te.invalidateQueries()})})});const qn=nn.find(fe=>fe instanceof U1),ut=Ee&&J?lm(Ee.id,J.individual.id):"",fl=new Set(J?je?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),It=fe=>{if(Y(fe),fe==="overview"){const nt=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:nt?"auto":"smooth"});return}const Pe={copyNumber:N,mutations:F,structuralVariants:H,signatures:D}[fe];Tr((Pe==null?void 0:Pe.current)??null,"start")},kt=J&&ue&&J.analyses[ue]||[],zl=(J==null?void 0:J.failures.filter(fe=>fe.sample===ue))??[],Gt=new Set(kt.map(Ft)),Qn=new Set,ln=fe=>fe==null?void 0:fe.forEach(Pe=>Gt.has(Ft(Pe))&&Qn.add(Ft(Pe)));for(const fe of((Fe=(Ve=Ie.data)==null?void 0:Ve.data)==null?void 0:Fe.metrics)??[])Uh.includes(fe.key)&&ln(fe.sources);ln((Ct=We.data)==null?void 0:Ct.lineage),ln((st=A.data)==null?void 0:st.lineage),ln((et=V.data)==null?void 0:et.lineage),ln(se==null?void 0:se.lineage),ln((Yn=re.data)==null?void 0:Yn.lineage),ln((Dl=me.data)==null?void 0:Dl.lineage);for(const fe of kt)fe.state==="failed"&&zl.length>0&&Qn.add(Ft(fe));return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx(yj,{analyses:kt,onPage:Qn,sampleLabel:ut,picked:u,onPick:d,sections:fl,activeStore:z,onSection:It}),f.jsxs("div",{ref:Nt,className:"page",children:[f.jsx(L1,{individualId:n,subtitle:[w_(J),(ja=J==null?void 0:J.individual.sex)==null?void 0:ja.toLowerCase(),(J==null?void 0:J.mode)==="unmatched"?"tumour only":void 0].filter(Boolean).join(", ")||void 0,patientIcon:J?f.jsx(DC,{sex:J.individual.sex}):void 0,report:J?f.jsx(_j,{data:J,onVersion:fe=>At("version",fe)}):void 0,compact:J&&ue?f.jsx(FC,{data:J,sampleId:ue,fingerprint:((Ea=We.data)==null?void 0:Ea.data)??void 0,onSample:cl}):void 0,headerInView:j}),f.jsxs("main",{className:"flex flex-1 flex-col",children:[J&&ue&&f.jsx("div",{className:"px-8 pt-1",children:f.jsx("div",{ref:R,children:f.jsx(j_,{held:ot,data:J,sampleId:ue,fingerprint:((Jr=We.data)==null?void 0:Jr.data)??void 0,onSample:fe=>At("sample",fe)})})}),f.jsxs("div",{className:"sheet",children:[ee.isPending&&f.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[qn.message]}})}),ee.isError&&!qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[ee.error.message]}})}),P&&P.status!=="ok"&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:P})}),(P==null?void 0:P.status)==="ok"&&P.warnings.length>0&&f.jsx("div",{className:"sc-card px-6 py-4",children:f.jsx(es,{envelope:{...P,status:"missing"}})}),J&&ue&&f.jsxs(f.Fragment,{children:[f.jsx(zj,{sampleLabel:ut,failures:zl,analyses:kt}),je?f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:T,className:"page-section",children:f.jsx(Oj,{sampleLabel:`${ut} tumour`,fingerprint:rt,metrics:Ie.data,picked:u,lineage:K1((Mi=Ie.data)==null?void 0:Mi.lineage,(Wr=We.data)==null?void 0:Wr.lineage)})}),f.jsx("div",{ref:N,className:"page-section",children:f.jsx(tE,{envelope:A.data,loading:A.isPending,picked:u,sampleLabel:ut,drivers:Bt,focus:zn,locate:w,onSegment:ne,onGene:ie})}),f.jsx(MN,{ref:F,variants:se,rows:he,hasMore:W.hasNextPage,loadingMore:W.isFetchingNextPage,onMore:be,variantsLoading:W.isPending,variantsFetching:W.isFetching&&W.isPlaceholderData,density:V.data,densityLoading:V.isPending,picked:u,measure:$e,onMeasure:fe=>{m(fe),p.range&&p.range.measure!==fe&&k({range:null})},table:p,onTable:k,hovered:x,onHover:b,onLocate:Ce,showCcf:J.mode!=="unmatched"}),f.jsx(WN,{ref:H,envelope:re.data,loading:re.isPending,picked:u,onLocate:X}),f.jsx(y_,{ref:D,envelope:me.data,loading:me.isPending,picked:u})]}):f.jsx("div",{ref:T,className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${ut} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})]})}const fh=200,vx="wgts-picker-scope";function N_(){try{const n=localStorage.getItem(vx);return n&&/^\d+$/.test(n)?Number(n):"all"}catch{return"all"}}function __(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.individual} ${r.diseases.join(" ")} ${r.report_version}`.toLowerCase();return i.every(d=>u.includes(d))})}function M_(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.title} ${r.short_title??""} ${r.description??""}`.toLowerCase();return i.every(d=>u.includes(d))})}const dh=n=>n.toLocaleString("en-US");function R_(){return Iu(sm)?f.jsx(T_,{}):null}function T_(){var k,ne,ie,Ce;const n=tm(),s=((k=Mw("/:individual"))==null?void 0:k.params.individual)??"",i=E.useId(),r=E.useRef(null),[u,d]=E.useState(N_),[h,m]=E.useState(""),[p,y]=E.useState(""),[x,v]=E.useState(0),b=fj(),w=dj(u);E.useEffect(()=>{const X=document.activeElement,ee=document.documentElement,P=ee.style.overflow;return ee.style.overflow="hidden",requestAnimationFrame(()=>{var J;return(J=document.querySelector(".pick-main .tsearch input"))==null?void 0:J.focus()}),()=>{ee.style.overflow=P,X==null||X.focus()}},[]);const C=X=>{d(X),y(""),v(0);try{localStorage.setItem(vx,String(X))}catch{}requestAnimationFrame(()=>{var ee;return(ee=document.querySelector(".pick-main .tsearch input"))==null?void 0:ee.focus()})},N=((ne=b.data)==null?void 0:ne.results)??[],M=E.useMemo(()=>M_(N,h),[N,h]),R=u==="all"?null:N.find(X=>X.pk===u)??((ie=w.data)==null?void 0:ie.project)??null,j=((Ce=w.data)==null?void 0:Ce.results)??[],F=E.useMemo(()=>__(j,p),[j,p]),T=F.slice(0,fh),H=E.useRef(null),D=X=>{Eu(),X.individual!==s&&n(`/${encodeURIComponent(X.individual)}`)};E.useEffect(()=>{var X,ee,P;(P=(ee=(X=H.current)==null?void 0:X.querySelector(`[data-index="${x}"]`))==null?void 0:ee.scrollIntoView)==null||P.call(ee,{block:"nearest"})},[x]),E.useEffect(()=>v(0),[p]);const z=X=>{const ee=X.target,P=ee instanceof HTMLInputElement&&!!ee.closest(".pick-main");if(X.key==="Escape"){if(ee instanceof HTMLInputElement&&ee.value)return;Eu()}else if(P&&X.key==="ArrowDown")X.preventDefault(),v(J=>Math.min(J+1,T.length-1));else if(P&&X.key==="ArrowUp")X.preventDefault(),v(J=>Math.max(J-1,0));else if(P&&X.key==="Enter"&&T[x])X.preventDefault(),D(T[x]);else if(ee instanceof HTMLInputElement&&ee.closest(".pick-rail")&&X.key==="Enter"){X.preventDefault();const J=M[0];J&&C(J.pk)}},Y=b.isPending,te=b.isError||w.isError;return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:X=>X.target===X.currentTarget&&Eu(),children:f.jsxs("div",{className:"info-dialog pick",role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,onKeyDown:z,children:[f.jsx("button",{ref:r,type:"button",className:"info-close","aria-label":"Close",onClick:Eu,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail pick-rail","aria-label":"Projects",children:[f.jsx("span",{className:"info-kicker",children:"Browse"}),f.jsx("h2",{id:i,children:"Projects"}),f.jsx($u,{value:h,onChange:m,label:"Search projects",placeholder:"Search projects",shortcut:!1,delay:0}),f.jsxs("ol",{children:[f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u==="all"?"true":void 0,onClick:()=>C("all"),children:[f.jsx("span",{className:"pick-name",children:f.jsxs("span",{children:[f.jsx(bC,{size:14,"aria-hidden":!0}),"All patients"]})}),f.jsx("span",{className:"pick-n",children:b.data?dh(b.data.total):""})]})}),M.map(X=>f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u===X.pk?"true":void 0,onClick:()=>C(X.pk),title:X.short_title?`${X.title} (${X.short_title})`:X.title,children:[f.jsx("span",{className:"pick-name",children:X.title}),f.jsx("span",{className:"pick-n",children:dh(X.patients)})]})},X.pk))]}),Y&&f.jsx("p",{className:"pick-note",children:"Loading projects…"}),!Y&&N.length>0&&M.length===0&&f.jsxs("p",{className:"pick-note",children:["No project matches “",h,"”."]}),!Y&&!b.isError&&N.length===0&&f.jsx("p",{className:"pick-note",children:"No project has a dashboard yet. “All patients” lists every one."})]}),f.jsxs("div",{className:"pick-main",children:[f.jsxs("header",{className:"pick-head",children:[f.jsx("span",{className:"info-kicker",children:(R==null?void 0:R.short_title)??(u==="all"?"Every project":"Project")}),f.jsx("h3",{children:(R==null?void 0:R.title)??"All patients"}),(R==null?void 0:R.description)&&f.jsx("p",{children:R.description})]}),f.jsx("div",{className:"tbar",children:f.jsx($u,{value:p,onChange:y,label:"Search patients",placeholder:"Search id or disease",shortcut:!1,delay:0})}),f.jsx("div",{ref:H,className:"pick-list",role:"group","aria-label":"Patients","aria-busy":w.isFetching,children:te?f.jsx("p",{className:"pick-note",children:"The patients could not be loaded. Close this window and try again."}):w.isPending?f.jsx("p",{className:"pick-note",children:"Loading patients…"}):T.length===0?f.jsx("p",{className:"pick-note",children:p?`No patient matches “${p}”.`:"No patients with a dashboard in this project yet."}):T.map((X,ee)=>f.jsxs("button",{type:"button",className:"pick-row","data-index":ee,"data-active":ee===x||void 0,"data-current":X.individual===s||void 0,onMouseEnter:()=>v(ee),onClick:()=>D(X),children:[f.jsx("span",{className:"pick-id mono",children:f.jsx(ds,{text:X.individual,query:p})}),f.jsx("span",{className:"pick-diseases",children:X.diseases.length>0?X.diseases.map(P=>f.jsx("span",{className:"sc-chip",children:f.jsx(ds,{text:P,query:p})},P)):f.jsx("span",{className:"pick-faint",children:"No tumour disease recorded"})}),f.jsx("span",{className:"pick-aside",children:X.individual===s?f.jsxs("span",{className:"pick-here",children:[f.jsx(_1,{size:13,"aria-hidden":!0}),"On this page"]}):f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[dh(X.samples)," ",X.samples===1?"sample":"samples"]}),f.jsxs("span",{className:"pick-faint",children:["report ",X.report_version,X.built?`, ${O1(X.built)}`:""]})]})})]},X.individual))}),w.data&&f.jsx(Wu,{shown:F.length,total:j.length,noun:["patient","patients"],note:F.length>fh?`Showing the first ${fh}; search to narrow`:void 0})]})]})}),document.body)}const A_=new q2({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function O_(){return f.jsx(v2,{client:A_,children:f.jsxs(Zw,{basename:Gn.basePath,children:[f.jsxs(Yw,{children:[f.jsx(_h,{path:"/",element:f.jsx(kC,{})}),f.jsx(_h,{path:"/:individual",element:f.jsx(E_,{})})]}),f.jsx(R_,{})]})})}p2.createRoot(document.getElementById("root")).render(f.jsx(E.StrictMode,{children:f.jsx(O_,{})}));
|
|
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,{})}));
|