@rigour-labs/cli 7.0.0-rc.5 → 7.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -1
- package/dist/commands/hooks-git.js +4 -2
- package/dist/commands/learn-reviews.d.ts +2 -0
- package/dist/commands/learn-reviews.js +22 -3
- package/dist/commands/studio-learning.d.ts +2 -0
- package/dist/commands/studio-learning.js +5 -3
- package/package.json +3 -3
- package/studio-dist/assets/{index-D5EEZJUE.js → index-CmWtilgA.js} +17 -17
- package/studio-dist/index.html +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var jf=Object.defineProperty;var Nf=(o,d,u)=>d in o?jf(o,d,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[d]=u;var Qu=(o,d,u)=>Nf(o,typeof d!="symbol"?d+"":d,u);(function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))h(x);new MutationObserver(x=>{for(const S of x)if(S.type==="childList")for(const w of S.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&h(w)}).observe(document,{childList:!0,subtree:!0});function u(x){const S={};return x.integrity&&(S.integrity=x.integrity),x.referrerPolicy&&(S.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?S.credentials="include":x.crossOrigin==="anonymous"?S.credentials="omit":S.credentials="same-origin",S}function h(x){if(x.ep)return;x.ep=!0;const S=u(x);fetch(x.href,S)}})();function gc(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var $i={exports:{}},Tr={},Ii={exports:{}},
|
|
1
|
+
var jf=Object.defineProperty;var Nf=(o,d,u)=>d in o?jf(o,d,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[d]=u;var Qu=(o,d,u)=>Nf(o,typeof d!="symbol"?d+"":d,u);(function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))h(x);new MutationObserver(x=>{for(const S of x)if(S.type==="childList")for(const w of S.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&h(w)}).observe(document,{childList:!0,subtree:!0});function u(x){const S={};return x.integrity&&(S.integrity=x.integrity),x.referrerPolicy&&(S.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?S.credentials="include":x.crossOrigin==="anonymous"?S.credentials="omit":S.credentials="same-origin",S}function h(x){if(x.ep)return;x.ep=!0;const S=u(x);fetch(x.href,S)}})();function gc(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var $i={exports:{}},Tr={},Ii={exports:{}},b={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var jf=Object.defineProperty;var Nf=(o,d,u)=>d in o?jf(o,d,{enumerable:!0,config
|
|
|
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 Ku;function Sf(){if(Ku)return
|
|
9
|
+
*/var Ku;function Sf(){if(Ku)return b;Ku=1;var o=Symbol.for("react.element"),d=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),w=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),D=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),A=Symbol.iterator;function I(m){return m===null||typeof m!="object"?null:(m=A&&m[A]||m["@@iterator"],typeof m=="function"?m:null)}var F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,q={};function X(m,j,K){this.props=m,this.context=j,this.refs=q,this.updater=K||F}X.prototype.isReactComponent={},X.prototype.setState=function(m,j){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,j,"setState")},X.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function Pe(){}Pe.prototype=X.prototype;function Y(m,j,K){this.props=m,this.context=j,this.refs=q,this.updater=K||F}var ve=Y.prototype=new Pe;ve.constructor=Y,Z(ve,X.prototype),ve.isPureReactComponent=!0;var ce=Array.isArray,Re=Object.prototype.hasOwnProperty,Ee={current:null},De={key:!0,ref:!0,__self:!0,__source:!0};function Ze(m,j,K){var G,ee={},te=null,ie=null;if(j!=null)for(G in j.ref!==void 0&&(ie=j.ref),j.key!==void 0&&(te=""+j.key),j)Re.call(j,G)&&!De.hasOwnProperty(G)&&(ee[G]=j[G]);var se=arguments.length-2;if(se===1)ee.children=K;else if(1<se){for(var de=Array(se),Ye=0;Ye<se;Ye++)de[Ye]=arguments[Ye+2];ee.children=de}if(m&&m.defaultProps)for(G in se=m.defaultProps,se)ee[G]===void 0&&(ee[G]=se[G]);return{$$typeof:o,type:m,key:te,ref:ie,props:ee,_owner:Ee.current}}function Rt(m,j){return{$$typeof:o,type:m.type,key:j,ref:m.ref,props:m.props,_owner:m._owner}}function jt(m){return typeof m=="object"&&m!==null&&m.$$typeof===o}function Jt(m){var j={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(K){return j[K]})}var mt=/\/+/g;function qe(m,j){return typeof m=="object"&&m!==null&&m.key!=null?Jt(""+m.key):j.toString(36)}function it(m,j,K,G,ee){var te=typeof m;(te==="undefined"||te==="boolean")&&(m=null);var ie=!1;if(m===null)ie=!0;else switch(te){case"string":case"number":ie=!0;break;case"object":switch(m.$$typeof){case o:case d:ie=!0}}if(ie)return ie=m,ee=ee(ie),m=G===""?"."+qe(ie,0):G,ce(ee)?(K="",m!=null&&(K=m.replace(mt,"$&/")+"/"),it(ee,j,K,"",function(Ye){return Ye})):ee!=null&&(jt(ee)&&(ee=Rt(ee,K+(!ee.key||ie&&ie.key===ee.key?"":(""+ee.key).replace(mt,"$&/")+"/")+m)),j.push(ee)),1;if(ie=0,G=G===""?".":G+":",ce(m))for(var se=0;se<m.length;se++){te=m[se];var de=G+qe(te,se);ie+=it(te,j,K,de,ee)}else if(de=I(m),typeof de=="function")for(m=de.call(m),se=0;!(te=m.next()).done;)te=te.value,de=G+qe(te,se++),ie+=it(te,j,K,de,ee);else if(te==="object")throw j=String(m),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.");return ie}function gt(m,j,K){if(m==null)return m;var G=[],ee=0;return it(m,G,"","",function(te){return j.call(K,te,ee++)}),G}function Ae(m){if(m._status===-1){var j=m._result;j=j(),j.then(function(K){(m._status===0||m._status===-1)&&(m._status=1,m._result=K)},function(K){(m._status===0||m._status===-1)&&(m._status=2,m._result=K)}),m._status===-1&&(m._status=0,m._result=j)}if(m._status===1)return m._result.default;throw m._result}var me={current:null},z={transition:null},U={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:z,ReactCurrentOwner:Ee};function L(){throw Error("act(...) is not supported in production builds of React.")}return b.Children={map:gt,forEach:function(m,j,K){gt(m,function(){j.apply(this,arguments)},K)},count:function(m){var j=0;return gt(m,function(){j++}),j},toArray:function(m){return gt(m,function(j){return j})||[]},only:function(m){if(!jt(m))throw Error("React.Children.only expected to receive a single React element child.");return m}},b.Component=X,b.Fragment=u,b.Profiler=x,b.PureComponent=Y,b.StrictMode=h,b.Suspense=E,b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,b.act=L,b.cloneElement=function(m,j,K){if(m==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+m+".");var G=Z({},m.props),ee=m.key,te=m.ref,ie=m._owner;if(j!=null){if(j.ref!==void 0&&(te=j.ref,ie=Ee.current),j.key!==void 0&&(ee=""+j.key),m.type&&m.type.defaultProps)var se=m.type.defaultProps;for(de in j)Re.call(j,de)&&!De.hasOwnProperty(de)&&(G[de]=j[de]===void 0&&se!==void 0?se[de]:j[de])}var de=arguments.length-2;if(de===1)G.children=K;else if(1<de){se=Array(de);for(var Ye=0;Ye<de;Ye++)se[Ye]=arguments[Ye+2];G.children=se}return{$$typeof:o,type:m.type,key:ee,ref:te,props:G,_owner:ie}},b.createContext=function(m){return m={$$typeof:w,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},m.Provider={$$typeof:S,_context:m},m.Consumer=m},b.createElement=Ze,b.createFactory=function(m){var j=Ze.bind(null,m);return j.type=m,j},b.createRef=function(){return{current:null}},b.forwardRef=function(m){return{$$typeof:_,render:m}},b.isValidElement=jt,b.lazy=function(m){return{$$typeof:V,_payload:{_status:-1,_result:m},_init:Ae}},b.memo=function(m,j){return{$$typeof:D,type:m,compare:j===void 0?null:j}},b.startTransition=function(m){var j=z.transition;z.transition={};try{m()}finally{z.transition=j}},b.unstable_act=L,b.useCallback=function(m,j){return me.current.useCallback(m,j)},b.useContext=function(m){return me.current.useContext(m)},b.useDebugValue=function(){},b.useDeferredValue=function(m){return me.current.useDeferredValue(m)},b.useEffect=function(m,j){return me.current.useEffect(m,j)},b.useId=function(){return me.current.useId()},b.useImperativeHandle=function(m,j,K){return me.current.useImperativeHandle(m,j,K)},b.useInsertionEffect=function(m,j){return me.current.useInsertionEffect(m,j)},b.useLayoutEffect=function(m,j){return me.current.useLayoutEffect(m,j)},b.useMemo=function(m,j){return me.current.useMemo(m,j)},b.useReducer=function(m,j,K){return me.current.useReducer(m,j,K)},b.useRef=function(m){return me.current.useRef(m)},b.useState=function(m){return me.current.useState(m)},b.useSyncExternalStore=function(m,j,K){return me.current.useSyncExternalStore(m,j,K)},b.useTransition=function(){return me.current.useTransition()},b.version="18.3.1",b}var qu;function bi(){return qu||(qu=1,Ii.exports=Sf()),Ii.exports}/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var jf=Object.defineProperty;var Nf=(o,d,u)=>d in o?jf(o,d,{enumerable:!0,config
|
|
|
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 Yu;function Cf(){if(Yu)return Tr;Yu=1;var o=
|
|
17
|
+
*/var Yu;function Cf(){if(Yu)return Tr;Yu=1;var o=bi(),d=Symbol.for("react.element"),u=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,x=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function w(_,E,D){var V,A={},I=null,F=null;D!==void 0&&(I=""+D),E.key!==void 0&&(I=""+E.key),E.ref!==void 0&&(F=E.ref);for(V in E)h.call(E,V)&&!S.hasOwnProperty(V)&&(A[V]=E[V]);if(_&&_.defaultProps)for(V in E=_.defaultProps,E)A[V]===void 0&&(A[V]=E[V]);return{$$typeof:d,type:_,key:I,ref:F,props:A,_owner:x.current}}return Tr.Fragment=u,Tr.jsx=w,Tr.jsxs=w,Tr}var bu;function Tf(){return bu||(bu=1,$i.exports=Cf()),$i.exports}var l=Tf(),Q=bi();const As=gc(Q);var Fs={},Fi={exports:{}},Qe={},Di={exports:{}},Ai={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var jf=Object.defineProperty;var Nf=(o,d,u)=>d in o?jf(o,d,{enumerable:!0,config
|
|
|
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 Gu;function Ef(){return Gu||(Gu=1,(function(o){function d(z,U){var L=z.length;z.push(U);e:for(;0<L;){var m=L-1>>>1,j=z[m];if(0<x(j,U))z[m]=U,z[L]=j,L=m;else break e}}function u(z){return z.length===0?null:z[0]}function h(z){if(z.length===0)return null;var U=z[0],L=z.pop();if(L!==U){z[0]=L;e:for(var m=0,j=z.length,K=j>>>1;m<K;){var G=2*(m+1)-1,ee=z[G],te=G+1,ie=z[te];if(0>x(ee,L))te<j&&0>x(ie,ee)?(z[m]=ie,z[te]=L,m=te):(z[m]=ee,z[G]=L,m=G);else if(te<j&&0>x(ie,L))z[m]=ie,z[te]=L,m=te;else break e}}return U}function x(z,U){var L=z.sortIndex-U.sortIndex;return L!==0?L:z.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var S=performance;o.unstable_now=function(){return S.now()}}else{var w=Date,_=w.now();o.unstable_now=function(){return w.now()-_}}var E=[],D=[],V=1,A=null,I=3,F=!1,Z=!1,q=!1,X=typeof setTimeout=="function"?setTimeout:null,Pe=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ve(z){for(var U=u(D);U!==null;){if(U.callback===null)h(D);else if(U.startTime<=z)h(D),U.sortIndex=U.expirationTime,d(E,U);else break;U=u(D)}}function ce(z){if(q=!1,ve(z),!Z)if(u(E)!==null)Z=!0,Ae(Re);else{var U=u(D);U!==null&&me(ce,U.startTime-z)}}function Re(z,U){Z=!1,q&&(q=!1,Pe(Ze),Ze=-1),F=!0;var L=I;try{for(ve(U),A=u(E);A!==null&&(!(A.expirationTime>U)||z&&!Jt());){var m=A.callback;if(typeof m=="function"){A.callback=null,I=A.priorityLevel;var j=m(A.expirationTime<=U);U=o.unstable_now(),typeof j=="function"?A.callback=j:A===u(E)&&h(E),ve(U)}else h(E);A=u(E)}if(A!==null)var K=!0;else{var G=u(D);G!==null&&me(ce,G.startTime-U),K=!1}return K}finally{A=null,I=L,F=!1}}var Ee=!1,De=null,Ze=-1,Rt=5,jt=-1;function Jt(){return!(o.unstable_now()-jt<Rt)}function mt(){if(De!==null){var z=o.unstable_now();jt=z;var U=!0;try{U=De(!0,z)}finally{U?qe():(Ee=!1,De=null)}}else Ee=!1}var qe;if(typeof Y=="function")qe=function(){Y(mt)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,gt=it.port2;it.port1.onmessage=mt,qe=function(){gt.postMessage(null)}}else qe=function(){X(mt,0)};function Ae(z){De=z,Ee||(Ee=!0,qe())}function me(z,U){Ze=X(function(){z(o.unstable_now())},U)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(z){z.callback=null},o.unstable_continueExecution=function(){Z||F||(Z=!0,Ae(Re))},o.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Rt=0<z?Math.floor(1e3/z):5},o.unstable_getCurrentPriorityLevel=function(){return I},o.unstable_getFirstCallbackNode=function(){return u(E)},o.unstable_next=function(z){switch(I){case 1:case 2:case 3:var U=3;break;default:U=I}var L=I;I=U;try{return z()}finally{I=L}},o.unstable_pauseExecution=function(){},o.unstable_requestPaint=function(){},o.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var L=I;I=z;try{return U()}finally{I=L}},o.unstable_scheduleCallback=function(z,U,L){var m=o.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?m+L:m):L=m,z){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=L+j,z={id:V++,callback:U,priorityLevel:z,startTime:L,expirationTime:j,sortIndex:-1},L>m?(z.sortIndex=L,d(D,z),u(E)===null&&z===u(D)&&(q?(Pe(Ze),Ze=-1):q=!0,me(ce,L-m))):(z.sortIndex=j,d(E,z),Z||F||(Z=!0,Ae(Re))),z},o.unstable_shouldYield=Jt,o.unstable_wrapCallback=function(z){var U=I;return function(){var L=I;I=U;try{return z.apply(this,arguments)}finally{I=L}}}})(Ai)),Ai}var Xu;function _f(){return Xu||(Xu=1,Di.exports=Ef()),Di.exports}/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,14 +30,14 @@ var jf=Object.defineProperty;var Nf=(o,d,u)=>d in o?jf(o,d,{enumerable:!0,config
|
|
|
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 Ju;function zf(){if(Ju)return Qe;Ju=1;var o=
|
|
34
|
-
`+m+e}var K=!1;function
|
|
33
|
+
*/var Ju;function zf(){if(Ju)return Qe;Ju=1;var o=bi(),d=_f();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h=new Set,x={};function S(e,t){w(e,t),w(e+"Capture",t)}function w(e,t){for(x[e]=t,e=0;e<t.length;e++)h.add(t[e])}var _=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),E=Object.prototype.hasOwnProperty,D=/^[: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]*$/,V={},A={};function I(e){return E.call(A,e)?!0:E.call(V,e)?!1:D.test(e)?A[e]=!0:(V[e]=!0,!1)}function F(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Z(e,t,n,r){if(t===null||typeof t>"u"||F(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function q(e,t,n,r,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var X={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){X[e]=new q(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];X[t]=new q(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){X[e]=new q(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){X[e]=new q(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){X[e]=new q(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){X[e]=new q(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){X[e]=new q(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){X[e]=new q(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){X[e]=new q(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pe=/[\-:]([a-z])/g;function Y(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Pe,Y);X[t]=new q(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Pe,Y);X[t]=new q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pe,Y);X[t]=new q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){X[e]=new q(e,1,!1,e.toLowerCase(),null,!1,!1)}),X.xlinkHref=new q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){X[e]=new q(e,1,!1,e.toLowerCase(),null,!0,!0)});function ve(e,t,n,r){var s=X.hasOwnProperty(t)?X[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Z(t,n,s,r)&&(n=null),r||s===null?I(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ce=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Re=Symbol.for("react.element"),Ee=Symbol.for("react.portal"),De=Symbol.for("react.fragment"),Ze=Symbol.for("react.strict_mode"),Rt=Symbol.for("react.profiler"),jt=Symbol.for("react.provider"),Jt=Symbol.for("react.context"),mt=Symbol.for("react.forward_ref"),qe=Symbol.for("react.suspense"),it=Symbol.for("react.suspense_list"),gt=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),z=Symbol.iterator;function U(e){return e===null||typeof e!="object"?null:(e=z&&e[z]||e["@@iterator"],typeof e=="function"?e:null)}var L=Object.assign,m;function j(e){if(m===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);m=t&&t[1]||""}return`
|
|
34
|
+
`+m+e}var K=!1;function G(e,t){if(!e||K)return"";K=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(y){var r=y}Reflect.construct(e,[],t)}else{try{t.call()}catch(y){r=y}e.call(t.prototype)}else{try{throw Error()}catch(y){r=y}e()}}catch(y){if(y&&r&&typeof y.stack=="string"){for(var s=y.stack.split(`
|
|
35
35
|
`),i=r.stack.split(`
|
|
36
36
|
`),a=s.length-1,c=i.length-1;1<=a&&0<=c&&s[a]!==i[c];)c--;for(;1<=a&&0<=c;a--,c--)if(s[a]!==i[c]){if(a!==1||c!==1)do if(a--,c--,0>c||s[a]!==i[c]){var f=`
|
|
37
|
-
`+s[a].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=a&&0<=c);break}}}finally{K=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function ee(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=X(e.type,!1),e;case 11:return e=X(e.type.render,!1),e;case 1:return e=X(e.type,!0),e;default:return""}}function te(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case De:return"Fragment";case Ee:return"Portal";case Rt:return"Profiler";case Ze:return"StrictMode";case qe:return"Suspense";case it:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jt:return(e.displayName||"Context")+".Consumer";case jt:return(e._context.displayName||"Context")+".Provider";case mt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gt:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case He:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}function ie(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(t);case 8:return t===Ze?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function se(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function de(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ye(e){var t=de(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Er(e){e._valueTracker||(e._valueTracker=Ye(e))}function Xi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=de(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _r(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 Us(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=se(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ji(e,t){t=t.checked,t!=null&&ve(e,"checked",t,!1)}function Bs(e,t){Ji(e,t);var n=se(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vs(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vs(e,t.type,se(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vs(e,t,n){(t!=="number"||_r(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+se(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Qs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(u(91));return L({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eo(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(u(92));if(Wn(n)){if(1<n.length)throw Error(u(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:se(n)}}function to(e,t){var n=se(t.value),r=se(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function no(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ro(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ks(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ro(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var zr,so=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(zr=zr||document.createElement("div"),zr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Un(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Cc=["Webkit","ms","Moz","O"];Object.keys(Bn).forEach(function(e){Cc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bn[t]=Bn[e]})});function lo(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bn.hasOwnProperty(e)&&Bn[e]?(""+t).trim():t+"px"}function io(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=lo(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Tc=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qs(e,t){if(t){if(Tc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function Ys(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Gs=null;function Xs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bs=null,mn=null,gn=null;function oo(e){if(e=dr(e)){if(typeof bs!="function")throw Error(u(280));var t=e.stateNode;t&&(t=Jr(t),bs(e.stateNode,e.type,t))}}function ao(e){mn?gn?gn.push(e):gn=[e]:mn=e}function uo(){if(mn){var e=mn,t=gn;if(gn=mn=null,oo(e),t)for(e=0;e<t.length;e++)oo(t[e])}}function co(e,t){return e(t)}function fo(){}var Js=!1;function po(e,t,n){if(Js)return e(t,n);Js=!0;try{return co(e,t,n)}finally{Js=!1,(mn!==null||gn!==null)&&(fo(),uo())}}function Vn(e,t){var n=e.stateNode;if(n===null)return null;var r=Jr(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Zs=!1;if(_)try{var Qn={};Object.defineProperty(Qn,"passive",{get:function(){Zs=!0}}),window.addEventListener("test",Qn,Qn),window.removeEventListener("test",Qn,Qn)}catch{Zs=!1}function Ec(e,t,n,r,s,i,a,c,f){var y=Array.prototype.slice.call(arguments,3);try{t.apply(n,y)}catch(N){this.onError(N)}}var Kn=!1,Pr=null,Rr=!1,el=null,_c={onError:function(e){Kn=!0,Pr=e}};function zc(e,t,n,r,s,i,a,c,f){Kn=!1,Pr=null,Ec.apply(_c,arguments)}function Pc(e,t,n,r,s,i,a,c,f){if(zc.apply(this,arguments),Kn){if(Kn){var y=Pr;Kn=!1,Pr=null}else throw Error(u(198));Rr||(Rr=!0,el=y)}}function Zt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ho(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 mo(e){if(Zt(e)!==e)throw Error(u(188))}function Rc(e){var t=e.alternate;if(!t){if(t=Zt(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return mo(s),e;if(i===r)return mo(s),t;i=i.sibling}throw Error(u(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,c=s.child;c;){if(c===n){a=!0,n=s,r=i;break}if(c===r){a=!0,r=s,n=i;break}c=c.sibling}if(!a){for(c=i.child;c;){if(c===n){a=!0,n=i,r=s;break}if(c===r){a=!0,r=i,n=s;break}c=c.sibling}if(!a)throw Error(u(189))}}if(n.alternate!==r)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function go(e){return e=Rc(e),e!==null?vo(e):null}function vo(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vo(e);if(t!==null)return t;e=e.sibling}return null}var yo=d.unstable_scheduleCallback,xo=d.unstable_cancelCallback,Lc=d.unstable_shouldYield,Oc=d.unstable_requestPaint,ye=d.unstable_now,Mc=d.unstable_getCurrentPriorityLevel,tl=d.unstable_ImmediatePriority,wo=d.unstable_UserBlockingPriority,Lr=d.unstable_NormalPriority,$c=d.unstable_LowPriority,ko=d.unstable_IdlePriority,Or=null,vt=null;function Ic(e){if(vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Or,e,void 0,(e.current.flags&128)===128)}catch{}}var ot=Math.clz32?Math.clz32:Hc,Fc=Math.log,Dc=Math.LN2;function Hc(e){return e>>>=0,e===0?32:31-(Fc(e)/Dc|0)|0}var Mr=64,$r=4194304;function qn(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ir(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var c=a&~s;c!==0?r=qn(c):(i&=a,i!==0&&(r=qn(i)))}else a=n&~s,a!==0?r=qn(a):i!==0&&(r=qn(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&s)===0&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ot(t),s=1<<n,r|=e[n],t&=~s;return r}function Ac(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-ot(i),c=1<<a,f=s[a];f===-1?((c&n)===0||(c&r)!==0)&&(s[a]=Ac(c,t)):f<=t&&(e.expiredLanes|=c),i&=~c}}function nl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jo(){var e=Mr;return Mr<<=1,(Mr&4194240)===0&&(Mr=64),e}function rl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Yn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function Uc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ot(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function sl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var le=0;function No(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var So,ll,Co,To,Eo,il=!1,Fr=[],Lt=null,Ot=null,Mt=null,Gn=new Map,Xn=new Map,$t=[],Bc="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 submit".split(" ");function _o(e,t){switch(e){case"focusin":case"focusout":Lt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":Mt=null;break;case"pointerover":case"pointerout":Gn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xn.delete(t.pointerId)}}function bn(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=dr(t),t!==null&&ll(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Vc(e,t,n,r,s){switch(t){case"focusin":return Lt=bn(Lt,e,t,n,r,s),!0;case"dragenter":return Ot=bn(Ot,e,t,n,r,s),!0;case"mouseover":return Mt=bn(Mt,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Gn.set(i,bn(Gn.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Xn.set(i,bn(Xn.get(i)||null,e,t,n,r,s)),!0}return!1}function zo(e){var t=en(e.target);if(t!==null){var n=Zt(t);if(n!==null){if(t=n.tag,t===13){if(t=ho(n),t!==null){e.blockedOn=t,Eo(e.priority,function(){Co(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=al(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gs=r,n.target.dispatchEvent(r),Gs=null}else return t=dr(n),t!==null&&ll(t),e.blockedOn=n,!1;t.shift()}return!0}function Po(e,t,n){Dr(e)&&n.delete(t)}function Qc(){il=!1,Lt!==null&&Dr(Lt)&&(Lt=null),Ot!==null&&Dr(Ot)&&(Ot=null),Mt!==null&&Dr(Mt)&&(Mt=null),Gn.forEach(Po),Xn.forEach(Po)}function Jn(e,t){e.blockedOn===t&&(e.blockedOn=null,il||(il=!0,d.unstable_scheduleCallback(d.unstable_NormalPriority,Qc)))}function Zn(e){function t(s){return Jn(s,e)}if(0<Fr.length){Jn(Fr[0],e);for(var n=1;n<Fr.length;n++){var r=Fr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Lt!==null&&Jn(Lt,e),Ot!==null&&Jn(Ot,e),Mt!==null&&Jn(Mt,e),Gn.forEach(t),Xn.forEach(t),n=0;n<$t.length;n++)r=$t[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<$t.length&&(n=$t[0],n.blockedOn===null);)zo(n),n.blockedOn===null&&$t.shift()}var vn=ce.ReactCurrentBatchConfig,Hr=!0;function Kc(e,t,n,r){var s=le,i=vn.transition;vn.transition=null;try{le=1,ol(e,t,n,r)}finally{le=s,vn.transition=i}}function qc(e,t,n,r){var s=le,i=vn.transition;vn.transition=null;try{le=4,ol(e,t,n,r)}finally{le=s,vn.transition=i}}function ol(e,t,n,r){if(Hr){var s=al(e,t,n,r);if(s===null)Cl(e,t,r,Ar,n),_o(e,r);else if(Vc(s,e,t,n,r))r.stopPropagation();else if(_o(e,r),t&4&&-1<Bc.indexOf(e)){for(;s!==null;){var i=dr(s);if(i!==null&&So(i),i=al(e,t,n,r),i===null&&Cl(e,t,r,Ar,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Cl(e,t,r,null,n)}}var Ar=null;function al(e,t,n,r){if(Ar=null,e=Xs(r),e=en(e),e!==null)if(t=Zt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ho(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ar=e,null}function Ro(e){switch(e){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"resize":case"seeked":case"submit":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"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Mc()){case tl:return 1;case wo:return 4;case Lr:case $c:return 16;case ko:return 536870912;default:return 16}default:return 16}}var It=null,ul=null,Wr=null;function Lo(){if(Wr)return Wr;var e,t=ul,n=t.length,r,s="value"in It?It.value:It.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return Wr=s.slice(e,1<r?1-r:void 0)}function Ur(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 Br(){return!0}function Oo(){return!1}function Ge(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Br:Oo,this.isPropagationStopped=Oo,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Br)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Br)},persist:function(){},isPersistent:Br}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=Ge(yn),er=L({},yn,{view:0,detail:0}),Yc=Ge(er),dl,fl,tr,Vr=L({},er,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hl,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!==tr&&(tr&&e.type==="mousemove"?(dl=e.screenX-tr.screenX,fl=e.screenY-tr.screenY):fl=dl=0,tr=e),dl)},movementY:function(e){return"movementY"in e?e.movementY:fl}}),Mo=Ge(Vr),Gc=L({},Vr,{dataTransfer:0}),Xc=Ge(Gc),bc=L({},er,{relatedTarget:0}),pl=Ge(bc),Jc=L({},yn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zc=Ge(Jc),ed=L({},yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),td=Ge(ed),nd=L({},yn,{data:0}),$o=Ge(nd),rd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sd={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"},ld={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function id(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ld[e])?!!t[e]:!1}function hl(){return id}var od=L({},er,{key:function(e){if(e.key){var t=rd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hl,charCode:function(e){return e.type==="keypress"?Ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ad=Ge(od),ud=L({},Vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Io=Ge(ud),cd=L({},er,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hl}),dd=Ge(cd),fd=L({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),pd=Ge(fd),hd=L({},Vr,{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}),md=Ge(hd),gd=[9,13,27,32],ml=_&&"CompositionEvent"in window,nr=null;_&&"documentMode"in document&&(nr=document.documentMode);var vd=_&&"TextEvent"in window&&!nr,Fo=_&&(!ml||nr&&8<nr&&11>=nr),Do=" ",Ho=!1;function Ao(e,t){switch(e){case"keyup":return gd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xn=!1;function yd(e,t){switch(e){case"compositionend":return Wo(t);case"keypress":return t.which!==32?null:(Ho=!0,Do);case"textInput":return e=t.data,e===Do&&Ho?null:e;default:return null}}function xd(e,t){if(xn)return e==="compositionend"||!ml&&Ao(e,t)?(e=Lo(),Wr=ul=It=null,xn=!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 Fo&&t.locale!=="ko"?null:t.data;default:return null}}var wd={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 Uo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wd[e.type]:t==="textarea"}function Bo(e,t,n,r){ao(r),t=Gr(t,"onChange"),0<t.length&&(n=new cl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var rr=null,sr=null;function kd(e){oa(e,0)}function Qr(e){var t=Sn(e);if(Xi(t))return e}function jd(e,t){if(e==="change")return t}var Vo=!1;if(_){var gl;if(_){var vl="oninput"in document;if(!vl){var Qo=document.createElement("div");Qo.setAttribute("oninput","return;"),vl=typeof Qo.oninput=="function"}gl=vl}else gl=!1;Vo=gl&&(!document.documentMode||9<document.documentMode)}function Ko(){rr&&(rr.detachEvent("onpropertychange",qo),sr=rr=null)}function qo(e){if(e.propertyName==="value"&&Qr(sr)){var t=[];Bo(t,sr,e,Xs(e)),po(kd,t)}}function Nd(e,t,n){e==="focusin"?(Ko(),rr=t,sr=n,rr.attachEvent("onpropertychange",qo)):e==="focusout"&&Ko()}function Sd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qr(sr)}function Cd(e,t){if(e==="click")return Qr(t)}function Td(e,t){if(e==="input"||e==="change")return Qr(t)}function Ed(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var at=typeof Object.is=="function"?Object.is:Ed;function lr(e,t){if(at(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!E.call(t,s)||!at(e[s],t[s]))return!1}return!0}function Yo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Go(e,t){var n=Yo(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yo(n)}}function Xo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bo(){for(var e=window,t=_r();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_r(e.document)}return t}function yl(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")}function _d(e){var t=bo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xo(n.ownerDocument.documentElement,n)){if(r!==null&&yl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Go(n,i);var a=Go(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zd=_&&"documentMode"in document&&11>=document.documentMode,wn=null,xl=null,ir=null,wl=!1;function Jo(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wl||wn==null||wn!==_r(r)||(r=wn,"selectionStart"in r&&yl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ir&&lr(ir,r)||(ir=r,r=Gr(xl,"onSelect"),0<r.length&&(t=new cl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wn)))}function Kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kn={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionend:Kr("Transition","TransitionEnd")},kl={},Zo={};_&&(Zo=document.createElement("div").style,"AnimationEvent"in window||(delete kn.animationend.animation,delete kn.animationiteration.animation,delete kn.animationstart.animation),"TransitionEvent"in window||delete kn.transitionend.transition);function qr(e){if(kl[e])return kl[e];if(!kn[e])return e;var t=kn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zo)return kl[e]=t[n];return e}var ea=qr("animationend"),ta=qr("animationiteration"),na=qr("animationstart"),ra=qr("transitionend"),sa=new Map,la="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function Ft(e,t){sa.set(e,t),S(t,[e])}for(var jl=0;jl<la.length;jl++){var Nl=la[jl],Pd=Nl.toLowerCase(),Rd=Nl[0].toUpperCase()+Nl.slice(1);Ft(Pd,"on"+Rd)}Ft(ea,"onAnimationEnd"),Ft(ta,"onAnimationIteration"),Ft(na,"onAnimationStart"),Ft("dblclick","onDoubleClick"),Ft("focusin","onFocus"),Ft("focusout","onBlur"),Ft(ra,"onTransitionEnd"),w("onMouseEnter",["mouseout","mouseover"]),w("onMouseLeave",["mouseout","mouseover"]),w("onPointerEnter",["pointerout","pointerover"]),w("onPointerLeave",["pointerout","pointerover"]),S("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),S("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),S("onBeforeInput",["compositionend","keypress","textInput","paste"]),S("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),S("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),S("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var or="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(" "),Ld=new Set("cancel close invalid load scroll toggle".split(" ").concat(or));function ia(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Pc(r,t,void 0,e),e.currentTarget=null}function oa(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var c=r[a],f=c.instance,y=c.currentTarget;if(c=c.listener,f!==i&&s.isPropagationStopped())break e;ia(s,c,y),i=f}else for(a=0;a<r.length;a++){if(c=r[a],f=c.instance,y=c.currentTarget,c=c.listener,f!==i&&s.isPropagationStopped())break e;ia(s,c,y),i=f}}}if(Rr)throw e=el,Rr=!1,el=null,e}function ae(e,t){var n=t[Rl];n===void 0&&(n=t[Rl]=new Set);var r=e+"__bubble";n.has(r)||(aa(t,e,2,!1),n.add(r))}function Sl(e,t,n){var r=0;t&&(r|=4),aa(n,e,r,t)}var Yr="_reactListening"+Math.random().toString(36).slice(2);function ar(e){if(!e[Yr]){e[Yr]=!0,h.forEach(function(n){n!=="selectionchange"&&(Ld.has(n)||Sl(n,!1,e),Sl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yr]||(t[Yr]=!0,Sl("selectionchange",!1,t))}}function aa(e,t,n,r){switch(Ro(t)){case 1:var s=Kc;break;case 4:s=qc;break;default:s=ol}n=s.bind(null,t,n,e),s=void 0,!Zs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Cl(e,t,n,r,s){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var c=r.stateNode.containerInfo;if(c===s||c.nodeType===8&&c.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var f=a.tag;if((f===3||f===4)&&(f=a.stateNode.containerInfo,f===s||f.nodeType===8&&f.parentNode===s))return;a=a.return}for(;c!==null;){if(a=en(c),a===null)return;if(f=a.tag,f===5||f===6){r=i=a;continue e}c=c.parentNode}}r=r.return}po(function(){var y=i,N=Xs(n),C=[];e:{var k=sa.get(e);if(k!==void 0){var P=cl,O=e;switch(e){case"keypress":if(Ur(n)===0)break e;case"keydown":case"keyup":P=ad;break;case"focusin":O="focus",P=pl;break;case"focusout":O="blur",P=pl;break;case"beforeblur":case"afterblur":P=pl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Mo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Xc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=dd;break;case ea:case ta:case na:P=Zc;break;case ra:P=pd;break;case"scroll":P=Yc;break;case"wheel":P=md;break;case"copy":case"cut":case"paste":P=td;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Io}var M=(t&4)!==0,xe=!M&&e==="scroll",g=M?k!==null?k+"Capture":null:k;M=[];for(var p=y,v;p!==null;){v=p;var T=v.stateNode;if(v.tag===5&&T!==null&&(v=T,g!==null&&(T=Vn(p,g),T!=null&&M.push(ur(p,T,v)))),xe)break;p=p.return}0<M.length&&(k=new P(k,O,null,n,N),C.push({event:k,listeners:M}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",k&&n!==Gs&&(O=n.relatedTarget||n.fromElement)&&(en(O)||O[Nt]))break e;if((P||k)&&(k=N.window===N?N:(k=N.ownerDocument)?k.defaultView||k.parentWindow:window,P?(O=n.relatedTarget||n.toElement,P=y,O=O?en(O):null,O!==null&&(xe=Zt(O),O!==xe||O.tag!==5&&O.tag!==6)&&(O=null)):(P=null,O=y),P!==O)){if(M=Mo,T="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(M=Io,T="onPointerLeave",g="onPointerEnter",p="pointer"),xe=P==null?k:Sn(P),v=O==null?k:Sn(O),k=new M(T,p+"leave",P,n,N),k.target=xe,k.relatedTarget=v,T=null,en(N)===y&&(M=new M(g,p+"enter",O,n,N),M.target=v,M.relatedTarget=xe,T=M),xe=T,P&&O)t:{for(M=P,g=O,p=0,v=M;v;v=jn(v))p++;for(v=0,T=g;T;T=jn(T))v++;for(;0<p-v;)M=jn(M),p--;for(;0<v-p;)g=jn(g),v--;for(;p--;){if(M===g||g!==null&&M===g.alternate)break t;M=jn(M),g=jn(g)}M=null}else M=null;P!==null&&ua(C,k,P,M,!1),O!==null&&xe!==null&&ua(C,xe,O,M,!0)}}e:{if(k=y?Sn(y):window,P=k.nodeName&&k.nodeName.toLowerCase(),P==="select"||P==="input"&&k.type==="file")var $=jd;else if(Uo(k))if(Vo)$=Td;else{$=Sd;var A=Nd}else(P=k.nodeName)&&P.toLowerCase()==="input"&&(k.type==="checkbox"||k.type==="radio")&&($=Cd);if($&&($=$(e,y))){Bo(C,$,n,N);break e}A&&A(e,k,y),e==="focusout"&&(A=k._wrapperState)&&A.controlled&&k.type==="number"&&Vs(k,"number",k.value)}switch(A=y?Sn(y):window,e){case"focusin":(Uo(A)||A.contentEditable==="true")&&(wn=A,xl=y,ir=null);break;case"focusout":ir=xl=wn=null;break;case"mousedown":wl=!0;break;case"contextmenu":case"mouseup":case"dragend":wl=!1,Jo(C,n,N);break;case"selectionchange":if(zd)break;case"keydown":case"keyup":Jo(C,n,N)}var W;if(ml)e:{switch(e){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else xn?Ao(e,n)&&(B="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(B="onCompositionStart");B&&(Fo&&n.locale!=="ko"&&(xn||B!=="onCompositionStart"?B==="onCompositionEnd"&&xn&&(W=Lo()):(It=N,ul="value"in It?It.value:It.textContent,xn=!0)),A=Gr(y,B),0<A.length&&(B=new $o(B,e,null,n,N),C.push({event:B,listeners:A}),W?B.data=W:(W=Wo(n),W!==null&&(B.data=W)))),(W=vd?yd(e,n):xd(e,n))&&(y=Gr(y,"onBeforeInput"),0<y.length&&(N=new $o("onBeforeInput","beforeinput",null,n,N),C.push({event:N,listeners:y}),N.data=W))}oa(C,t)})}function ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gr(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Vn(e,n),i!=null&&r.unshift(ur(e,i,s)),i=Vn(e,t),i!=null&&r.push(ur(e,i,s))),e=e.return}return r}function jn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ua(e,t,n,r,s){for(var i=t._reactName,a=[];n!==null&&n!==r;){var c=n,f=c.alternate,y=c.stateNode;if(f!==null&&f===r)break;c.tag===5&&y!==null&&(c=y,s?(f=Vn(n,i),f!=null&&a.unshift(ur(n,f,c))):s||(f=Vn(n,i),f!=null&&a.push(ur(n,f,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Od=/\r\n?/g,Md=/\u0000|\uFFFD/g;function ca(e){return(typeof e=="string"?e:""+e).replace(Od,`
|
|
38
|
-
`).replace(Md,"")}function Xr(e,t,n){if(t=ca(t),ca(e)!==t&&n)throw Error(u(425))}function br(){}var Tl=null,El=null;function _l(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zl=typeof setTimeout=="function"?setTimeout:void 0,$d=typeof clearTimeout=="function"?clearTimeout:void 0,da=typeof Promise=="function"?Promise:void 0,Id=typeof queueMicrotask=="function"?queueMicrotask:typeof da<"u"?function(e){return da.resolve(null).then(e).catch(Fd)}:zl;function Fd(e){setTimeout(function(){throw e})}function Pl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Zn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Zn(t)}function Dt(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==="$?")break;if(t==="/$")return null}}return e}function fa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nn=Math.random().toString(36).slice(2),yt="__reactFiber$"+Nn,cr="__reactProps$"+Nn,Nt="__reactContainer$"+Nn,Rl="__reactEvents$"+Nn,Dd="__reactListeners$"+Nn,Hd="__reactHandles$"+Nn;function en(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fa(e);e!==null;){if(n=e[yt])return n;e=fa(e)}return t}e=n,n=e.parentNode}return null}function dr(e){return e=e[yt]||e[Nt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(u(33))}function Jr(e){return e[cr]||null}var Ll=[],Cn=-1;function Ht(e){return{current:e}}function ue(e){0>Cn||(e.current=Ll[Cn],Ll[Cn]=null,Cn--)}function oe(e,t){Cn++,Ll[Cn]=e.current,e.current=t}var At={},Le=Ht(At),Ae=Ht(!1),tn=At;function Tn(e,t){var n=e.type.contextTypes;if(!n)return At;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function We(e){return e=e.childContextTypes,e!=null}function Zr(){ue(Ae),ue(Le)}function pa(e,t,n){if(Le.current!==At)throw Error(u(168));oe(Le,t),oe(Ae,n)}function ha(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(u(108,ie(e)||"Unknown",s));return L({},n,r)}function es(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||At,tn=Le.current,oe(Le,e),oe(Ae,Ae.current),!0}function ma(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=ha(e,t,tn),r.__reactInternalMemoizedMergedChildContext=e,ue(Ae),ue(Le),oe(Le,e)):ue(Ae),oe(Ae,n)}var St=null,ts=!1,Ol=!1;function ga(e){St===null?St=[e]:St.push(e)}function Ad(e){ts=!0,ga(e)}function Wt(){if(!Ol&&St!==null){Ol=!0;var e=0,t=le;try{var n=St;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}St=null,ts=!1}catch(s){throw St!==null&&(St=St.slice(e+1)),yo(tl,Wt),s}finally{le=t,Ol=!1}}return null}var En=[],_n=0,ns=null,rs=0,et=[],tt=0,nn=null,Ct=1,Tt="";function rn(e,t){En[_n++]=rs,En[_n++]=ns,ns=e,rs=t}function va(e,t,n){et[tt++]=Ct,et[tt++]=Tt,et[tt++]=nn,nn=e;var r=Ct;e=Tt;var s=32-ot(r)-1;r&=~(1<<s),n+=1;var i=32-ot(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Ct=1<<32-ot(t)+s|n<<s|r,Tt=i+e}else Ct=1<<i|n<<s|r,Tt=e}function Ml(e){e.return!==null&&(rn(e,1),va(e,1,0))}function $l(e){for(;e===ns;)ns=En[--_n],En[_n]=null,rs=En[--_n],En[_n]=null;for(;e===nn;)nn=et[--tt],et[tt]=null,Tt=et[--tt],et[tt]=null,Ct=et[--tt],et[tt]=null}var Xe=null,be=null,fe=!1,ut=null;function ya(e,t){var n=lt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function xa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Xe=e,be=Dt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xe=e,be=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=nn!==null?{id:Ct,overflow:Tt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=lt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xe=e,be=null,!0):!1;default:return!1}}function Il(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fl(e){if(fe){var t=be;if(t){var n=t;if(!xa(e,t)){if(Il(e))throw Error(u(418));t=Dt(n.nextSibling);var r=Xe;t&&xa(e,t)?ya(r,n):(e.flags=e.flags&-4097|2,fe=!1,Xe=e)}}else{if(Il(e))throw Error(u(418));e.flags=e.flags&-4097|2,fe=!1,Xe=e}}}function wa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xe=e}function ss(e){if(e!==Xe)return!1;if(!fe)return wa(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_l(e.type,e.memoizedProps)),t&&(t=be)){if(Il(e))throw ka(),Error(u(418));for(;t;)ya(e,t),t=Dt(t.nextSibling)}if(wa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){be=Dt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}be=null}}else be=Xe?Dt(e.stateNode.nextSibling):null;return!0}function ka(){for(var e=be;e;)e=Dt(e.nextSibling)}function zn(){be=Xe=null,fe=!1}function Dl(e){ut===null?ut=[e]:ut.push(e)}var Wd=ce.ReactCurrentBatchConfig;function fr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(u(309));var r=n.stateNode}if(!r)throw Error(u(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var c=s.refs;a===null?delete c[i]:c[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(u(284));if(!n._owner)throw Error(u(290,e))}return e}function ls(e,t){throw e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ja(e){var t=e._init;return t(e._payload)}function Na(e){function t(g,p){if(e){var v=g.deletions;v===null?(g.deletions=[p],g.flags|=16):v.push(p)}}function n(g,p){if(!e)return null;for(;p!==null;)t(g,p),p=p.sibling;return null}function r(g,p){for(g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function s(g,p){return g=Gt(g,p),g.index=0,g.sibling=null,g}function i(g,p,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<p?(g.flags|=2,p):v):(g.flags|=2,p)):(g.flags|=1048576,p)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function c(g,p,v,T){return p===null||p.tag!==6?(p=zi(v,g.mode,T),p.return=g,p):(p=s(p,v),p.return=g,p)}function f(g,p,v,T){var $=v.type;return $===De?N(g,p,v.props.children,T,v.key):p!==null&&(p.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===He&&ja($)===p.type)?(T=s(p,v.props),T.ref=fr(g,p,v),T.return=g,T):(T=zs(v.type,v.key,v.props,null,g.mode,T),T.ref=fr(g,p,v),T.return=g,T)}function y(g,p,v,T){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=Pi(v,g.mode,T),p.return=g,p):(p=s(p,v.children||[]),p.return=g,p)}function N(g,p,v,T,$){return p===null||p.tag!==7?(p=fn(v,g.mode,T,$),p.return=g,p):(p=s(p,v),p.return=g,p)}function C(g,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=zi(""+p,g.mode,v),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Re:return v=zs(p.type,p.key,p.props,null,g.mode,v),v.ref=fr(g,null,p),v.return=g,v;case Ee:return p=Pi(p,g.mode,v),p.return=g,p;case He:var T=p._init;return C(g,T(p._payload),v)}if(Wn(p)||U(p))return p=fn(p,g.mode,v,null),p.return=g,p;ls(g,p)}return null}function k(g,p,v,T){var $=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return $!==null?null:c(g,p,""+v,T);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Re:return v.key===$?f(g,p,v,T):null;case Ee:return v.key===$?y(g,p,v,T):null;case He:return $=v._init,k(g,p,$(v._payload),T)}if(Wn(v)||U(v))return $!==null?null:N(g,p,v,T,null);ls(g,v)}return null}function P(g,p,v,T,$){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(v)||null,c(p,g,""+T,$);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Re:return g=g.get(T.key===null?v:T.key)||null,f(p,g,T,$);case Ee:return g=g.get(T.key===null?v:T.key)||null,y(p,g,T,$);case He:var A=T._init;return P(g,p,v,A(T._payload),$)}if(Wn(T)||U(T))return g=g.get(v)||null,N(p,g,T,$,null);ls(p,T)}return null}function O(g,p,v,T){for(var $=null,A=null,W=p,B=p=0,Te=null;W!==null&&B<v.length;B++){W.index>B?(Te=W,W=null):Te=W.sibling;var ne=k(g,W,v[B],T);if(ne===null){W===null&&(W=Te);break}e&&W&&ne.alternate===null&&t(g,W),p=i(ne,p,B),A===null?$=ne:A.sibling=ne,A=ne,W=Te}if(B===v.length)return n(g,W),fe&&rn(g,B),$;if(W===null){for(;B<v.length;B++)W=C(g,v[B],T),W!==null&&(p=i(W,p,B),A===null?$=W:A.sibling=W,A=W);return fe&&rn(g,B),$}for(W=r(g,W);B<v.length;B++)Te=P(W,g,B,v[B],T),Te!==null&&(e&&Te.alternate!==null&&W.delete(Te.key===null?B:Te.key),p=i(Te,p,B),A===null?$=Te:A.sibling=Te,A=Te);return e&&W.forEach(function(Xt){return t(g,Xt)}),fe&&rn(g,B),$}function M(g,p,v,T){var $=U(v);if(typeof $!="function")throw Error(u(150));if(v=$.call(v),v==null)throw Error(u(151));for(var A=$=null,W=p,B=p=0,Te=null,ne=v.next();W!==null&&!ne.done;B++,ne=v.next()){W.index>B?(Te=W,W=null):Te=W.sibling;var Xt=k(g,W,ne.value,T);if(Xt===null){W===null&&(W=Te);break}e&&W&&Xt.alternate===null&&t(g,W),p=i(Xt,p,B),A===null?$=Xt:A.sibling=Xt,A=Xt,W=Te}if(ne.done)return n(g,W),fe&&rn(g,B),$;if(W===null){for(;!ne.done;B++,ne=v.next())ne=C(g,ne.value,T),ne!==null&&(p=i(ne,p,B),A===null?$=ne:A.sibling=ne,A=ne);return fe&&rn(g,B),$}for(W=r(g,W);!ne.done;B++,ne=v.next())ne=P(W,g,B,ne.value,T),ne!==null&&(e&&ne.alternate!==null&&W.delete(ne.key===null?B:ne.key),p=i(ne,p,B),A===null?$=ne:A.sibling=ne,A=ne);return e&&W.forEach(function(kf){return t(g,kf)}),fe&&rn(g,B),$}function xe(g,p,v,T){if(typeof v=="object"&&v!==null&&v.type===De&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Re:e:{for(var $=v.key,A=p;A!==null;){if(A.key===$){if($=v.type,$===De){if(A.tag===7){n(g,A.sibling),p=s(A,v.props.children),p.return=g,g=p;break e}}else if(A.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===He&&ja($)===A.type){n(g,A.sibling),p=s(A,v.props),p.ref=fr(g,A,v),p.return=g,g=p;break e}n(g,A);break}else t(g,A);A=A.sibling}v.type===De?(p=fn(v.props.children,g.mode,T,v.key),p.return=g,g=p):(T=zs(v.type,v.key,v.props,null,g.mode,T),T.ref=fr(g,p,v),T.return=g,g=T)}return a(g);case Ee:e:{for(A=v.key;p!==null;){if(p.key===A)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(g,p.sibling),p=s(p,v.children||[]),p.return=g,g=p;break e}else{n(g,p);break}else t(g,p);p=p.sibling}p=Pi(v,g.mode,T),p.return=g,g=p}return a(g);case He:return A=v._init,xe(g,p,A(v._payload),T)}if(Wn(v))return O(g,p,v,T);if(U(v))return M(g,p,v,T);ls(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(g,p.sibling),p=s(p,v),p.return=g,g=p):(n(g,p),p=zi(v,g.mode,T),p.return=g,g=p),a(g)):n(g,p)}return xe}var Pn=Na(!0),Sa=Na(!1),is=Ht(null),os=null,Rn=null,Hl=null;function Al(){Hl=Rn=os=null}function Wl(e){var t=is.current;ue(is),e._currentValue=t}function Ul(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ln(e,t){os=e,Hl=Rn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ue=!0),e.firstContext=null)}function nt(e){var t=e._currentValue;if(Hl!==e)if(e={context:e,memoizedValue:t,next:null},Rn===null){if(os===null)throw Error(u(308));Rn=e,os.dependencies={lanes:0,firstContext:e}}else Rn=Rn.next=e;return t}var sn=null;function Bl(e){sn===null?sn=[e]:sn.push(e)}function Ca(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Bl(t)):(n.next=s.next,s.next=n),t.interleaved=n,Et(e,r)}function Et(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ut=!1;function Vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ta(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(J&2)!==0){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Et(e,n)}return s=r.interleaved,s===null?(t.next=t,Bl(r)):(t.next=s.next,s.next=t),r.interleaved=t,Et(e,n)}function as(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sl(e,n)}}function Ea(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function us(e,t,n,r){var s=e.updateQueue;Ut=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,c=s.shared.pending;if(c!==null){s.shared.pending=null;var f=c,y=f.next;f.next=null,a===null?i=y:a.next=y,a=f;var N=e.alternate;N!==null&&(N=N.updateQueue,c=N.lastBaseUpdate,c!==a&&(c===null?N.firstBaseUpdate=y:c.next=y,N.lastBaseUpdate=f))}if(i!==null){var C=s.baseState;a=0,N=y=f=null,c=i;do{var k=c.lane,P=c.eventTime;if((r&k)===k){N!==null&&(N=N.next={eventTime:P,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var O=e,M=c;switch(k=t,P=n,M.tag){case 1:if(O=M.payload,typeof O=="function"){C=O.call(P,C,k);break e}C=O;break e;case 3:O.flags=O.flags&-65537|128;case 0:if(O=M.payload,k=typeof O=="function"?O.call(P,C,k):O,k==null)break e;C=L({},C,k);break e;case 2:Ut=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,k=s.effects,k===null?s.effects=[c]:k.push(c))}else P={eventTime:P,lane:k,tag:c.tag,payload:c.payload,callback:c.callback,next:null},N===null?(y=N=P,f=C):N=N.next=P,a|=k;if(c=c.next,c===null){if(c=s.shared.pending,c===null)break;k=c,c=k.next,k.next=null,s.lastBaseUpdate=k,s.shared.pending=null}}while(!0);if(N===null&&(f=C),s.baseState=f,s.firstBaseUpdate=y,s.lastBaseUpdate=N,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);an|=a,e.lanes=a,e.memoizedState=C}}function _a(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(u(191,s));s.call(r)}}}var pr={},xt=Ht(pr),hr=Ht(pr),mr=Ht(pr);function ln(e){if(e===pr)throw Error(u(174));return e}function Ql(e,t){switch(oe(mr,t),oe(hr,e),oe(xt,pr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ks(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ks(t,e)}ue(xt),oe(xt,t)}function On(){ue(xt),ue(hr),ue(mr)}function za(e){ln(mr.current);var t=ln(xt.current),n=Ks(t,e.type);t!==n&&(oe(hr,e),oe(xt,n))}function Kl(e){hr.current===e&&(ue(xt),ue(hr))}var pe=Ht(0);function cs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 ql=[];function Yl(){for(var e=0;e<ql.length;e++)ql[e]._workInProgressVersionPrimary=null;ql.length=0}var ds=ce.ReactCurrentDispatcher,Gl=ce.ReactCurrentBatchConfig,on=0,he=null,je=null,Se=null,fs=!1,gr=!1,vr=0,Ud=0;function Oe(){throw Error(u(321))}function Xl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!at(e[n],t[n]))return!1;return!0}function bl(e,t,n,r,s,i){if(on=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=e===null||e.memoizedState===null?Kd:qd,e=n(r,s),gr){i=0;do{if(gr=!1,vr=0,25<=i)throw Error(u(301));i+=1,Se=je=null,t.updateQueue=null,ds.current=Yd,e=n(r,s)}while(gr)}if(ds.current=ms,t=je!==null&&je.next!==null,on=0,Se=je=he=null,fs=!1,t)throw Error(u(300));return e}function Jl(){var e=vr!==0;return vr=0,e}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?he.memoizedState=Se=e:Se=Se.next=e,Se}function rt(){if(je===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=Se===null?he.memoizedState:Se.next;if(t!==null)Se=t,je=e;else{if(e===null)throw Error(u(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Se===null?he.memoizedState=Se=e:Se=Se.next=e}return Se}function yr(e,t){return typeof t=="function"?t(e):t}function Zl(e){var t=rt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=je,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var c=a=null,f=null,y=i;do{var N=y.lane;if((on&N)===N)f!==null&&(f=f.next={lane:0,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null}),r=y.hasEagerState?y.eagerState:e(r,y.action);else{var C={lane:N,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null};f===null?(c=f=C,a=r):f=f.next=C,he.lanes|=N,an|=N}y=y.next}while(y!==null&&y!==i);f===null?a=r:f.next=c,at(r,t.memoizedState)||(Ue=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,he.lanes|=i,an|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ei(e){var t=rt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);at(i,t.memoizedState)||(Ue=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Pa(){}function Ra(e,t){var n=he,r=rt(),s=t(),i=!at(r.memoizedState,s);if(i&&(r.memoizedState=s,Ue=!0),r=r.queue,ti(Ma.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,xr(9,Oa.bind(null,n,r,s,t),void 0,null),Ce===null)throw Error(u(349));(on&30)!==0||La(n,t,s)}return s}function La(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Oa(e,t,n,r){t.value=n,t.getSnapshot=r,$a(t)&&Ia(e)}function Ma(e,t,n){return n(function(){$a(t)&&Ia(e)})}function $a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!at(e,n)}catch{return!0}}function Ia(e){var t=Et(e,1);t!==null&&pt(t,e,1,-1)}function Fa(e){var t=wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yr,lastRenderedState:e},t.queue=e,e=e.dispatch=Qd.bind(null,he,e),[t.memoizedState,e]}function xr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Da(){return rt().memoizedState}function ps(e,t,n,r){var s=wt();he.flags|=e,s.memoizedState=xr(1|t,n,void 0,r===void 0?null:r)}function hs(e,t,n,r){var s=rt();r=r===void 0?null:r;var i=void 0;if(je!==null){var a=je.memoizedState;if(i=a.destroy,r!==null&&Xl(r,a.deps)){s.memoizedState=xr(t,n,i,r);return}}he.flags|=e,s.memoizedState=xr(1|t,n,i,r)}function Ha(e,t){return ps(8390656,8,e,t)}function ti(e,t){return hs(2048,8,e,t)}function Aa(e,t){return hs(4,2,e,t)}function Wa(e,t){return hs(4,4,e,t)}function Ua(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ba(e,t,n){return n=n!=null?n.concat([e]):null,hs(4,4,Ua.bind(null,t,e),n)}function ni(){}function Va(e,t){var n=rt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qa(e,t){var n=rt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ka(e,t,n){return(on&21)===0?(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n):(at(n,t)||(n=jo(),he.lanes|=n,an|=n,e.baseState=!0),t)}function Bd(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Gl.transition;Gl.transition={};try{e(!1),t()}finally{le=n,Gl.transition=r}}function qa(){return rt().memoizedState}function Vd(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e))Ga(t,n);else if(n=Ca(e,t,n,r),n!==null){var s=Fe();pt(n,e,r,s),Xa(n,t,r)}}function Qd(e,t,n){var r=qt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))Ga(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,c=i(a,n);if(s.hasEagerState=!0,s.eagerState=c,at(c,a)){var f=t.interleaved;f===null?(s.next=s,Bl(t)):(s.next=f.next,f.next=s),t.interleaved=s;return}}catch{}finally{}n=Ca(e,t,s,r),n!==null&&(s=Fe(),pt(n,e,r,s),Xa(n,t,r))}}function Ya(e){var t=e.alternate;return e===he||t!==null&&t===he}function Ga(e,t){gr=fs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xa(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sl(e,n)}}var ms={readContext:nt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},Kd={readContext:nt,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:Ha,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ps(4194308,4,Ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var n=wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Vd.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:Fa,useDebugValue:ni,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Bd.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,s=wt();if(fe){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Ce===null)throw Error(u(349));(on&30)!==0||La(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Ha(Ma.bind(null,r,i,e),[e]),r.flags|=2048,xr(9,Oa.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wt(),t=Ce.identifierPrefix;if(fe){var n=Tt,r=Ct;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ud++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},qd={readContext:nt,useCallback:Va,useContext:nt,useEffect:ti,useImperativeHandle:Ba,useInsertionEffect:Aa,useLayoutEffect:Wa,useMemo:Qa,useReducer:Zl,useRef:Da,useState:function(){return Zl(yr)},useDebugValue:ni,useDeferredValue:function(e){var t=rt();return Ka(t,je.memoizedState,e)},useTransition:function(){var e=Zl(yr)[0],t=rt().memoizedState;return[e,t]},useMutableSource:Pa,useSyncExternalStore:Ra,useId:qa,unstable_isNewReconciler:!1},Yd={readContext:nt,useCallback:Va,useContext:nt,useEffect:ti,useImperativeHandle:Ba,useInsertionEffect:Aa,useLayoutEffect:Wa,useMemo:Qa,useReducer:ei,useRef:Da,useState:function(){return ei(yr)},useDebugValue:ni,useDeferredValue:function(e){var t=rt();return je===null?t.memoizedState=e:Ka(t,je.memoizedState,e)},useTransition:function(){var e=ei(yr)[0],t=rt().memoizedState;return[e,t]},useMutableSource:Pa,useSyncExternalStore:Ra,useId:qa,unstable_isNewReconciler:!1};function ct(e,t){if(e&&e.defaultProps){t=L({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ri(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:L({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var gs={isMounted:function(e){return(e=e._reactInternals)?Zt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=qt(e),i=_t(r,s);i.payload=t,n!=null&&(i.callback=n),t=Bt(e,i,s),t!==null&&(pt(t,e,s,r),as(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=qt(e),i=_t(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Bt(e,i,s),t!==null&&(pt(t,e,s,r),as(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=qt(e),s=_t(n,r);s.tag=2,t!=null&&(s.callback=t),t=Bt(e,s,r),t!==null&&(pt(t,e,r,n),as(t,e,r))}};function ba(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!lr(n,r)||!lr(s,i):!0}function Ja(e,t,n){var r=!1,s=At,i=t.contextType;return typeof i=="object"&&i!==null?i=nt(i):(s=We(t)?tn:Le.current,r=t.contextTypes,i=(r=r!=null)?Tn(e,s):At),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=gs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Za(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gs.enqueueReplaceState(t,t.state,null)}function si(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Vl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=nt(i):(i=We(t)?tn:Le.current,s.context=Tn(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ri(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&gs.enqueueReplaceState(s,s.state,null),us(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Mn(e,t){try{var n="",r=t;do n+=ee(r),r=r.return;while(r);var s=n}catch(i){s=`
|
|
37
|
+
`+s[a].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=a&&0<=c);break}}}finally{K=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function ee(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=G(e.type,!1),e;case 11:return e=G(e.type.render,!1),e;case 1:return e=G(e.type,!0),e;default:return""}}function te(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case De:return"Fragment";case Ee:return"Portal";case Rt:return"Profiler";case Ze:return"StrictMode";case qe:return"Suspense";case it:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jt:return(e.displayName||"Context")+".Consumer";case jt:return(e._context.displayName||"Context")+".Provider";case mt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gt:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case Ae:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}function ie(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(t);case 8:return t===Ze?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function se(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function de(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ye(e){var t=de(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Er(e){e._valueTracker||(e._valueTracker=Ye(e))}function Gi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=de(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _r(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 Us(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=se(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ji(e,t){t=t.checked,t!=null&&ve(e,"checked",t,!1)}function Bs(e,t){Ji(e,t);var n=se(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vs(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vs(e,t.type,se(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vs(e,t,n){(t!=="number"||_r(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+se(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Qs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(u(91));return L({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eo(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(u(92));if(Wn(n)){if(1<n.length)throw Error(u(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:se(n)}}function to(e,t){var n=se(t.value),r=se(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function no(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ro(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ks(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ro(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var zr,so=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(zr=zr||document.createElement("div"),zr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Un(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Cc=["Webkit","ms","Moz","O"];Object.keys(Bn).forEach(function(e){Cc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bn[t]=Bn[e]})});function lo(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bn.hasOwnProperty(e)&&Bn[e]?(""+t).trim():t+"px"}function io(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=lo(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Tc=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qs(e,t){if(t){if(Tc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function Ys(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 bs=null;function Gs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xs=null,mn=null,gn=null;function oo(e){if(e=dr(e)){if(typeof Xs!="function")throw Error(u(280));var t=e.stateNode;t&&(t=Jr(t),Xs(e.stateNode,e.type,t))}}function ao(e){mn?gn?gn.push(e):gn=[e]:mn=e}function uo(){if(mn){var e=mn,t=gn;if(gn=mn=null,oo(e),t)for(e=0;e<t.length;e++)oo(t[e])}}function co(e,t){return e(t)}function fo(){}var Js=!1;function po(e,t,n){if(Js)return e(t,n);Js=!0;try{return co(e,t,n)}finally{Js=!1,(mn!==null||gn!==null)&&(fo(),uo())}}function Vn(e,t){var n=e.stateNode;if(n===null)return null;var r=Jr(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Zs=!1;if(_)try{var Qn={};Object.defineProperty(Qn,"passive",{get:function(){Zs=!0}}),window.addEventListener("test",Qn,Qn),window.removeEventListener("test",Qn,Qn)}catch{Zs=!1}function Ec(e,t,n,r,s,i,a,c,f){var y=Array.prototype.slice.call(arguments,3);try{t.apply(n,y)}catch(N){this.onError(N)}}var Kn=!1,Pr=null,Rr=!1,el=null,_c={onError:function(e){Kn=!0,Pr=e}};function zc(e,t,n,r,s,i,a,c,f){Kn=!1,Pr=null,Ec.apply(_c,arguments)}function Pc(e,t,n,r,s,i,a,c,f){if(zc.apply(this,arguments),Kn){if(Kn){var y=Pr;Kn=!1,Pr=null}else throw Error(u(198));Rr||(Rr=!0,el=y)}}function Zt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ho(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 mo(e){if(Zt(e)!==e)throw Error(u(188))}function Rc(e){var t=e.alternate;if(!t){if(t=Zt(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return mo(s),e;if(i===r)return mo(s),t;i=i.sibling}throw Error(u(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,c=s.child;c;){if(c===n){a=!0,n=s,r=i;break}if(c===r){a=!0,r=s,n=i;break}c=c.sibling}if(!a){for(c=i.child;c;){if(c===n){a=!0,n=i,r=s;break}if(c===r){a=!0,r=i,n=s;break}c=c.sibling}if(!a)throw Error(u(189))}}if(n.alternate!==r)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function go(e){return e=Rc(e),e!==null?vo(e):null}function vo(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vo(e);if(t!==null)return t;e=e.sibling}return null}var yo=d.unstable_scheduleCallback,xo=d.unstable_cancelCallback,Lc=d.unstable_shouldYield,Oc=d.unstable_requestPaint,ye=d.unstable_now,Mc=d.unstable_getCurrentPriorityLevel,tl=d.unstable_ImmediatePriority,wo=d.unstable_UserBlockingPriority,Lr=d.unstable_NormalPriority,$c=d.unstable_LowPriority,ko=d.unstable_IdlePriority,Or=null,vt=null;function Ic(e){if(vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Or,e,void 0,(e.current.flags&128)===128)}catch{}}var ot=Math.clz32?Math.clz32:Ac,Fc=Math.log,Dc=Math.LN2;function Ac(e){return e>>>=0,e===0?32:31-(Fc(e)/Dc|0)|0}var Mr=64,$r=4194304;function qn(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ir(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var c=a&~s;c!==0?r=qn(c):(i&=a,i!==0&&(r=qn(i)))}else a=n&~s,a!==0?r=qn(a):i!==0&&(r=qn(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&s)===0&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ot(t),s=1<<n,r|=e[n],t&=~s;return r}function Hc(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-ot(i),c=1<<a,f=s[a];f===-1?((c&n)===0||(c&r)!==0)&&(s[a]=Hc(c,t)):f<=t&&(e.expiredLanes|=c),i&=~c}}function nl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jo(){var e=Mr;return Mr<<=1,(Mr&4194240)===0&&(Mr=64),e}function rl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Yn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function Uc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ot(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function sl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var le=0;function No(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var So,ll,Co,To,Eo,il=!1,Fr=[],Lt=null,Ot=null,Mt=null,bn=new Map,Gn=new Map,$t=[],Bc="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 submit".split(" ");function _o(e,t){switch(e){case"focusin":case"focusout":Lt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":Mt=null;break;case"pointerover":case"pointerout":bn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gn.delete(t.pointerId)}}function Xn(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=dr(t),t!==null&&ll(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Vc(e,t,n,r,s){switch(t){case"focusin":return Lt=Xn(Lt,e,t,n,r,s),!0;case"dragenter":return Ot=Xn(Ot,e,t,n,r,s),!0;case"mouseover":return Mt=Xn(Mt,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return bn.set(i,Xn(bn.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Gn.set(i,Xn(Gn.get(i)||null,e,t,n,r,s)),!0}return!1}function zo(e){var t=en(e.target);if(t!==null){var n=Zt(t);if(n!==null){if(t=n.tag,t===13){if(t=ho(n),t!==null){e.blockedOn=t,Eo(e.priority,function(){Co(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=al(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bs=r,n.target.dispatchEvent(r),bs=null}else return t=dr(n),t!==null&&ll(t),e.blockedOn=n,!1;t.shift()}return!0}function Po(e,t,n){Dr(e)&&n.delete(t)}function Qc(){il=!1,Lt!==null&&Dr(Lt)&&(Lt=null),Ot!==null&&Dr(Ot)&&(Ot=null),Mt!==null&&Dr(Mt)&&(Mt=null),bn.forEach(Po),Gn.forEach(Po)}function Jn(e,t){e.blockedOn===t&&(e.blockedOn=null,il||(il=!0,d.unstable_scheduleCallback(d.unstable_NormalPriority,Qc)))}function Zn(e){function t(s){return Jn(s,e)}if(0<Fr.length){Jn(Fr[0],e);for(var n=1;n<Fr.length;n++){var r=Fr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Lt!==null&&Jn(Lt,e),Ot!==null&&Jn(Ot,e),Mt!==null&&Jn(Mt,e),bn.forEach(t),Gn.forEach(t),n=0;n<$t.length;n++)r=$t[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<$t.length&&(n=$t[0],n.blockedOn===null);)zo(n),n.blockedOn===null&&$t.shift()}var vn=ce.ReactCurrentBatchConfig,Ar=!0;function Kc(e,t,n,r){var s=le,i=vn.transition;vn.transition=null;try{le=1,ol(e,t,n,r)}finally{le=s,vn.transition=i}}function qc(e,t,n,r){var s=le,i=vn.transition;vn.transition=null;try{le=4,ol(e,t,n,r)}finally{le=s,vn.transition=i}}function ol(e,t,n,r){if(Ar){var s=al(e,t,n,r);if(s===null)Cl(e,t,r,Hr,n),_o(e,r);else if(Vc(s,e,t,n,r))r.stopPropagation();else if(_o(e,r),t&4&&-1<Bc.indexOf(e)){for(;s!==null;){var i=dr(s);if(i!==null&&So(i),i=al(e,t,n,r),i===null&&Cl(e,t,r,Hr,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Cl(e,t,r,null,n)}}var Hr=null;function al(e,t,n,r){if(Hr=null,e=Gs(r),e=en(e),e!==null)if(t=Zt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ho(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Hr=e,null}function Ro(e){switch(e){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"resize":case"seeked":case"submit":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"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Mc()){case tl:return 1;case wo:return 4;case Lr:case $c:return 16;case ko:return 536870912;default:return 16}default:return 16}}var It=null,ul=null,Wr=null;function Lo(){if(Wr)return Wr;var e,t=ul,n=t.length,r,s="value"in It?It.value:It.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return Wr=s.slice(e,1<r?1-r:void 0)}function Ur(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 Br(){return!0}function Oo(){return!1}function be(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Br:Oo,this.isPropagationStopped=Oo,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Br)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Br)},persist:function(){},isPersistent:Br}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=be(yn),er=L({},yn,{view:0,detail:0}),Yc=be(er),dl,fl,tr,Vr=L({},er,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hl,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!==tr&&(tr&&e.type==="mousemove"?(dl=e.screenX-tr.screenX,fl=e.screenY-tr.screenY):fl=dl=0,tr=e),dl)},movementY:function(e){return"movementY"in e?e.movementY:fl}}),Mo=be(Vr),bc=L({},Vr,{dataTransfer:0}),Gc=be(bc),Xc=L({},er,{relatedTarget:0}),pl=be(Xc),Jc=L({},yn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zc=be(Jc),ed=L({},yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),td=be(ed),nd=L({},yn,{data:0}),$o=be(nd),rd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sd={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"},ld={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function id(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ld[e])?!!t[e]:!1}function hl(){return id}var od=L({},er,{key:function(e){if(e.key){var t=rd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hl,charCode:function(e){return e.type==="keypress"?Ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ad=be(od),ud=L({},Vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Io=be(ud),cd=L({},er,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hl}),dd=be(cd),fd=L({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),pd=be(fd),hd=L({},Vr,{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}),md=be(hd),gd=[9,13,27,32],ml=_&&"CompositionEvent"in window,nr=null;_&&"documentMode"in document&&(nr=document.documentMode);var vd=_&&"TextEvent"in window&&!nr,Fo=_&&(!ml||nr&&8<nr&&11>=nr),Do=" ",Ao=!1;function Ho(e,t){switch(e){case"keyup":return gd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xn=!1;function yd(e,t){switch(e){case"compositionend":return Wo(t);case"keypress":return t.which!==32?null:(Ao=!0,Do);case"textInput":return e=t.data,e===Do&&Ao?null:e;default:return null}}function xd(e,t){if(xn)return e==="compositionend"||!ml&&Ho(e,t)?(e=Lo(),Wr=ul=It=null,xn=!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 Fo&&t.locale!=="ko"?null:t.data;default:return null}}var wd={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 Uo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wd[e.type]:t==="textarea"}function Bo(e,t,n,r){ao(r),t=br(t,"onChange"),0<t.length&&(n=new cl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var rr=null,sr=null;function kd(e){oa(e,0)}function Qr(e){var t=Sn(e);if(Gi(t))return e}function jd(e,t){if(e==="change")return t}var Vo=!1;if(_){var gl;if(_){var vl="oninput"in document;if(!vl){var Qo=document.createElement("div");Qo.setAttribute("oninput","return;"),vl=typeof Qo.oninput=="function"}gl=vl}else gl=!1;Vo=gl&&(!document.documentMode||9<document.documentMode)}function Ko(){rr&&(rr.detachEvent("onpropertychange",qo),sr=rr=null)}function qo(e){if(e.propertyName==="value"&&Qr(sr)){var t=[];Bo(t,sr,e,Gs(e)),po(kd,t)}}function Nd(e,t,n){e==="focusin"?(Ko(),rr=t,sr=n,rr.attachEvent("onpropertychange",qo)):e==="focusout"&&Ko()}function Sd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qr(sr)}function Cd(e,t){if(e==="click")return Qr(t)}function Td(e,t){if(e==="input"||e==="change")return Qr(t)}function Ed(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var at=typeof Object.is=="function"?Object.is:Ed;function lr(e,t){if(at(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!E.call(t,s)||!at(e[s],t[s]))return!1}return!0}function Yo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bo(e,t){var n=Yo(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yo(n)}}function Go(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Go(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xo(){for(var e=window,t=_r();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_r(e.document)}return t}function yl(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")}function _d(e){var t=Xo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Go(n.ownerDocument.documentElement,n)){if(r!==null&&yl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=bo(n,i);var a=bo(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zd=_&&"documentMode"in document&&11>=document.documentMode,wn=null,xl=null,ir=null,wl=!1;function Jo(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wl||wn==null||wn!==_r(r)||(r=wn,"selectionStart"in r&&yl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ir&&lr(ir,r)||(ir=r,r=br(xl,"onSelect"),0<r.length&&(t=new cl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wn)))}function Kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kn={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionend:Kr("Transition","TransitionEnd")},kl={},Zo={};_&&(Zo=document.createElement("div").style,"AnimationEvent"in window||(delete kn.animationend.animation,delete kn.animationiteration.animation,delete kn.animationstart.animation),"TransitionEvent"in window||delete kn.transitionend.transition);function qr(e){if(kl[e])return kl[e];if(!kn[e])return e;var t=kn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zo)return kl[e]=t[n];return e}var ea=qr("animationend"),ta=qr("animationiteration"),na=qr("animationstart"),ra=qr("transitionend"),sa=new Map,la="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function Ft(e,t){sa.set(e,t),S(t,[e])}for(var jl=0;jl<la.length;jl++){var Nl=la[jl],Pd=Nl.toLowerCase(),Rd=Nl[0].toUpperCase()+Nl.slice(1);Ft(Pd,"on"+Rd)}Ft(ea,"onAnimationEnd"),Ft(ta,"onAnimationIteration"),Ft(na,"onAnimationStart"),Ft("dblclick","onDoubleClick"),Ft("focusin","onFocus"),Ft("focusout","onBlur"),Ft(ra,"onTransitionEnd"),w("onMouseEnter",["mouseout","mouseover"]),w("onMouseLeave",["mouseout","mouseover"]),w("onPointerEnter",["pointerout","pointerover"]),w("onPointerLeave",["pointerout","pointerover"]),S("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),S("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),S("onBeforeInput",["compositionend","keypress","textInput","paste"]),S("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),S("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),S("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var or="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(" "),Ld=new Set("cancel close invalid load scroll toggle".split(" ").concat(or));function ia(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Pc(r,t,void 0,e),e.currentTarget=null}function oa(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var c=r[a],f=c.instance,y=c.currentTarget;if(c=c.listener,f!==i&&s.isPropagationStopped())break e;ia(s,c,y),i=f}else for(a=0;a<r.length;a++){if(c=r[a],f=c.instance,y=c.currentTarget,c=c.listener,f!==i&&s.isPropagationStopped())break e;ia(s,c,y),i=f}}}if(Rr)throw e=el,Rr=!1,el=null,e}function ae(e,t){var n=t[Rl];n===void 0&&(n=t[Rl]=new Set);var r=e+"__bubble";n.has(r)||(aa(t,e,2,!1),n.add(r))}function Sl(e,t,n){var r=0;t&&(r|=4),aa(n,e,r,t)}var Yr="_reactListening"+Math.random().toString(36).slice(2);function ar(e){if(!e[Yr]){e[Yr]=!0,h.forEach(function(n){n!=="selectionchange"&&(Ld.has(n)||Sl(n,!1,e),Sl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yr]||(t[Yr]=!0,Sl("selectionchange",!1,t))}}function aa(e,t,n,r){switch(Ro(t)){case 1:var s=Kc;break;case 4:s=qc;break;default:s=ol}n=s.bind(null,t,n,e),s=void 0,!Zs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Cl(e,t,n,r,s){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var c=r.stateNode.containerInfo;if(c===s||c.nodeType===8&&c.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var f=a.tag;if((f===3||f===4)&&(f=a.stateNode.containerInfo,f===s||f.nodeType===8&&f.parentNode===s))return;a=a.return}for(;c!==null;){if(a=en(c),a===null)return;if(f=a.tag,f===5||f===6){r=i=a;continue e}c=c.parentNode}}r=r.return}po(function(){var y=i,N=Gs(n),C=[];e:{var k=sa.get(e);if(k!==void 0){var P=cl,O=e;switch(e){case"keypress":if(Ur(n)===0)break e;case"keydown":case"keyup":P=ad;break;case"focusin":O="focus",P=pl;break;case"focusout":O="blur",P=pl;break;case"beforeblur":case"afterblur":P=pl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Mo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=Gc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=dd;break;case ea:case ta:case na:P=Zc;break;case ra:P=pd;break;case"scroll":P=Yc;break;case"wheel":P=md;break;case"copy":case"cut":case"paste":P=td;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Io}var M=(t&4)!==0,xe=!M&&e==="scroll",g=M?k!==null?k+"Capture":null:k;M=[];for(var p=y,v;p!==null;){v=p;var T=v.stateNode;if(v.tag===5&&T!==null&&(v=T,g!==null&&(T=Vn(p,g),T!=null&&M.push(ur(p,T,v)))),xe)break;p=p.return}0<M.length&&(k=new P(k,O,null,n,N),C.push({event:k,listeners:M}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",k&&n!==bs&&(O=n.relatedTarget||n.fromElement)&&(en(O)||O[Nt]))break e;if((P||k)&&(k=N.window===N?N:(k=N.ownerDocument)?k.defaultView||k.parentWindow:window,P?(O=n.relatedTarget||n.toElement,P=y,O=O?en(O):null,O!==null&&(xe=Zt(O),O!==xe||O.tag!==5&&O.tag!==6)&&(O=null)):(P=null,O=y),P!==O)){if(M=Mo,T="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(M=Io,T="onPointerLeave",g="onPointerEnter",p="pointer"),xe=P==null?k:Sn(P),v=O==null?k:Sn(O),k=new M(T,p+"leave",P,n,N),k.target=xe,k.relatedTarget=v,T=null,en(N)===y&&(M=new M(g,p+"enter",O,n,N),M.target=v,M.relatedTarget=xe,T=M),xe=T,P&&O)t:{for(M=P,g=O,p=0,v=M;v;v=jn(v))p++;for(v=0,T=g;T;T=jn(T))v++;for(;0<p-v;)M=jn(M),p--;for(;0<v-p;)g=jn(g),v--;for(;p--;){if(M===g||g!==null&&M===g.alternate)break t;M=jn(M),g=jn(g)}M=null}else M=null;P!==null&&ua(C,k,P,M,!1),O!==null&&xe!==null&&ua(C,xe,O,M,!0)}}e:{if(k=y?Sn(y):window,P=k.nodeName&&k.nodeName.toLowerCase(),P==="select"||P==="input"&&k.type==="file")var $=jd;else if(Uo(k))if(Vo)$=Td;else{$=Sd;var H=Nd}else(P=k.nodeName)&&P.toLowerCase()==="input"&&(k.type==="checkbox"||k.type==="radio")&&($=Cd);if($&&($=$(e,y))){Bo(C,$,n,N);break e}H&&H(e,k,y),e==="focusout"&&(H=k._wrapperState)&&H.controlled&&k.type==="number"&&Vs(k,"number",k.value)}switch(H=y?Sn(y):window,e){case"focusin":(Uo(H)||H.contentEditable==="true")&&(wn=H,xl=y,ir=null);break;case"focusout":ir=xl=wn=null;break;case"mousedown":wl=!0;break;case"contextmenu":case"mouseup":case"dragend":wl=!1,Jo(C,n,N);break;case"selectionchange":if(zd)break;case"keydown":case"keyup":Jo(C,n,N)}var W;if(ml)e:{switch(e){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else xn?Ho(e,n)&&(B="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(B="onCompositionStart");B&&(Fo&&n.locale!=="ko"&&(xn||B!=="onCompositionStart"?B==="onCompositionEnd"&&xn&&(W=Lo()):(It=N,ul="value"in It?It.value:It.textContent,xn=!0)),H=br(y,B),0<H.length&&(B=new $o(B,e,null,n,N),C.push({event:B,listeners:H}),W?B.data=W:(W=Wo(n),W!==null&&(B.data=W)))),(W=vd?yd(e,n):xd(e,n))&&(y=br(y,"onBeforeInput"),0<y.length&&(N=new $o("onBeforeInput","beforeinput",null,n,N),C.push({event:N,listeners:y}),N.data=W))}oa(C,t)})}function ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function br(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Vn(e,n),i!=null&&r.unshift(ur(e,i,s)),i=Vn(e,t),i!=null&&r.push(ur(e,i,s))),e=e.return}return r}function jn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ua(e,t,n,r,s){for(var i=t._reactName,a=[];n!==null&&n!==r;){var c=n,f=c.alternate,y=c.stateNode;if(f!==null&&f===r)break;c.tag===5&&y!==null&&(c=y,s?(f=Vn(n,i),f!=null&&a.unshift(ur(n,f,c))):s||(f=Vn(n,i),f!=null&&a.push(ur(n,f,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Od=/\r\n?/g,Md=/\u0000|\uFFFD/g;function ca(e){return(typeof e=="string"?e:""+e).replace(Od,`
|
|
38
|
+
`).replace(Md,"")}function Gr(e,t,n){if(t=ca(t),ca(e)!==t&&n)throw Error(u(425))}function Xr(){}var Tl=null,El=null;function _l(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zl=typeof setTimeout=="function"?setTimeout:void 0,$d=typeof clearTimeout=="function"?clearTimeout:void 0,da=typeof Promise=="function"?Promise:void 0,Id=typeof queueMicrotask=="function"?queueMicrotask:typeof da<"u"?function(e){return da.resolve(null).then(e).catch(Fd)}:zl;function Fd(e){setTimeout(function(){throw e})}function Pl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Zn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Zn(t)}function Dt(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==="$?")break;if(t==="/$")return null}}return e}function fa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nn=Math.random().toString(36).slice(2),yt="__reactFiber$"+Nn,cr="__reactProps$"+Nn,Nt="__reactContainer$"+Nn,Rl="__reactEvents$"+Nn,Dd="__reactListeners$"+Nn,Ad="__reactHandles$"+Nn;function en(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fa(e);e!==null;){if(n=e[yt])return n;e=fa(e)}return t}e=n,n=e.parentNode}return null}function dr(e){return e=e[yt]||e[Nt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(u(33))}function Jr(e){return e[cr]||null}var Ll=[],Cn=-1;function At(e){return{current:e}}function ue(e){0>Cn||(e.current=Ll[Cn],Ll[Cn]=null,Cn--)}function oe(e,t){Cn++,Ll[Cn]=e.current,e.current=t}var Ht={},Le=At(Ht),He=At(!1),tn=Ht;function Tn(e,t){var n=e.type.contextTypes;if(!n)return Ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function We(e){return e=e.childContextTypes,e!=null}function Zr(){ue(He),ue(Le)}function pa(e,t,n){if(Le.current!==Ht)throw Error(u(168));oe(Le,t),oe(He,n)}function ha(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(u(108,ie(e)||"Unknown",s));return L({},n,r)}function es(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,tn=Le.current,oe(Le,e),oe(He,He.current),!0}function ma(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=ha(e,t,tn),r.__reactInternalMemoizedMergedChildContext=e,ue(He),ue(Le),oe(Le,e)):ue(He),oe(He,n)}var St=null,ts=!1,Ol=!1;function ga(e){St===null?St=[e]:St.push(e)}function Hd(e){ts=!0,ga(e)}function Wt(){if(!Ol&&St!==null){Ol=!0;var e=0,t=le;try{var n=St;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}St=null,ts=!1}catch(s){throw St!==null&&(St=St.slice(e+1)),yo(tl,Wt),s}finally{le=t,Ol=!1}}return null}var En=[],_n=0,ns=null,rs=0,et=[],tt=0,nn=null,Ct=1,Tt="";function rn(e,t){En[_n++]=rs,En[_n++]=ns,ns=e,rs=t}function va(e,t,n){et[tt++]=Ct,et[tt++]=Tt,et[tt++]=nn,nn=e;var r=Ct;e=Tt;var s=32-ot(r)-1;r&=~(1<<s),n+=1;var i=32-ot(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Ct=1<<32-ot(t)+s|n<<s|r,Tt=i+e}else Ct=1<<i|n<<s|r,Tt=e}function Ml(e){e.return!==null&&(rn(e,1),va(e,1,0))}function $l(e){for(;e===ns;)ns=En[--_n],En[_n]=null,rs=En[--_n],En[_n]=null;for(;e===nn;)nn=et[--tt],et[tt]=null,Tt=et[--tt],et[tt]=null,Ct=et[--tt],et[tt]=null}var Ge=null,Xe=null,fe=!1,ut=null;function ya(e,t){var n=lt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function xa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ge=e,Xe=Dt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,Xe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=nn!==null?{id:Ct,overflow:Tt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=lt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ge=e,Xe=null,!0):!1;default:return!1}}function Il(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fl(e){if(fe){var t=Xe;if(t){var n=t;if(!xa(e,t)){if(Il(e))throw Error(u(418));t=Dt(n.nextSibling);var r=Ge;t&&xa(e,t)?ya(r,n):(e.flags=e.flags&-4097|2,fe=!1,Ge=e)}}else{if(Il(e))throw Error(u(418));e.flags=e.flags&-4097|2,fe=!1,Ge=e}}}function wa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function ss(e){if(e!==Ge)return!1;if(!fe)return wa(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_l(e.type,e.memoizedProps)),t&&(t=Xe)){if(Il(e))throw ka(),Error(u(418));for(;t;)ya(e,t),t=Dt(t.nextSibling)}if(wa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xe=Dt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xe=null}}else Xe=Ge?Dt(e.stateNode.nextSibling):null;return!0}function ka(){for(var e=Xe;e;)e=Dt(e.nextSibling)}function zn(){Xe=Ge=null,fe=!1}function Dl(e){ut===null?ut=[e]:ut.push(e)}var Wd=ce.ReactCurrentBatchConfig;function fr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(u(309));var r=n.stateNode}if(!r)throw Error(u(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var c=s.refs;a===null?delete c[i]:c[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(u(284));if(!n._owner)throw Error(u(290,e))}return e}function ls(e,t){throw e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ja(e){var t=e._init;return t(e._payload)}function Na(e){function t(g,p){if(e){var v=g.deletions;v===null?(g.deletions=[p],g.flags|=16):v.push(p)}}function n(g,p){if(!e)return null;for(;p!==null;)t(g,p),p=p.sibling;return null}function r(g,p){for(g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function s(g,p){return g=bt(g,p),g.index=0,g.sibling=null,g}function i(g,p,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<p?(g.flags|=2,p):v):(g.flags|=2,p)):(g.flags|=1048576,p)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function c(g,p,v,T){return p===null||p.tag!==6?(p=zi(v,g.mode,T),p.return=g,p):(p=s(p,v),p.return=g,p)}function f(g,p,v,T){var $=v.type;return $===De?N(g,p,v.props.children,T,v.key):p!==null&&(p.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Ae&&ja($)===p.type)?(T=s(p,v.props),T.ref=fr(g,p,v),T.return=g,T):(T=zs(v.type,v.key,v.props,null,g.mode,T),T.ref=fr(g,p,v),T.return=g,T)}function y(g,p,v,T){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=Pi(v,g.mode,T),p.return=g,p):(p=s(p,v.children||[]),p.return=g,p)}function N(g,p,v,T,$){return p===null||p.tag!==7?(p=fn(v,g.mode,T,$),p.return=g,p):(p=s(p,v),p.return=g,p)}function C(g,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=zi(""+p,g.mode,v),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Re:return v=zs(p.type,p.key,p.props,null,g.mode,v),v.ref=fr(g,null,p),v.return=g,v;case Ee:return p=Pi(p,g.mode,v),p.return=g,p;case Ae:var T=p._init;return C(g,T(p._payload),v)}if(Wn(p)||U(p))return p=fn(p,g.mode,v,null),p.return=g,p;ls(g,p)}return null}function k(g,p,v,T){var $=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return $!==null?null:c(g,p,""+v,T);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Re:return v.key===$?f(g,p,v,T):null;case Ee:return v.key===$?y(g,p,v,T):null;case Ae:return $=v._init,k(g,p,$(v._payload),T)}if(Wn(v)||U(v))return $!==null?null:N(g,p,v,T,null);ls(g,v)}return null}function P(g,p,v,T,$){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(v)||null,c(p,g,""+T,$);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Re:return g=g.get(T.key===null?v:T.key)||null,f(p,g,T,$);case Ee:return g=g.get(T.key===null?v:T.key)||null,y(p,g,T,$);case Ae:var H=T._init;return P(g,p,v,H(T._payload),$)}if(Wn(T)||U(T))return g=g.get(v)||null,N(p,g,T,$,null);ls(p,T)}return null}function O(g,p,v,T){for(var $=null,H=null,W=p,B=p=0,Te=null;W!==null&&B<v.length;B++){W.index>B?(Te=W,W=null):Te=W.sibling;var ne=k(g,W,v[B],T);if(ne===null){W===null&&(W=Te);break}e&&W&&ne.alternate===null&&t(g,W),p=i(ne,p,B),H===null?$=ne:H.sibling=ne,H=ne,W=Te}if(B===v.length)return n(g,W),fe&&rn(g,B),$;if(W===null){for(;B<v.length;B++)W=C(g,v[B],T),W!==null&&(p=i(W,p,B),H===null?$=W:H.sibling=W,H=W);return fe&&rn(g,B),$}for(W=r(g,W);B<v.length;B++)Te=P(W,g,B,v[B],T),Te!==null&&(e&&Te.alternate!==null&&W.delete(Te.key===null?B:Te.key),p=i(Te,p,B),H===null?$=Te:H.sibling=Te,H=Te);return e&&W.forEach(function(Gt){return t(g,Gt)}),fe&&rn(g,B),$}function M(g,p,v,T){var $=U(v);if(typeof $!="function")throw Error(u(150));if(v=$.call(v),v==null)throw Error(u(151));for(var H=$=null,W=p,B=p=0,Te=null,ne=v.next();W!==null&&!ne.done;B++,ne=v.next()){W.index>B?(Te=W,W=null):Te=W.sibling;var Gt=k(g,W,ne.value,T);if(Gt===null){W===null&&(W=Te);break}e&&W&&Gt.alternate===null&&t(g,W),p=i(Gt,p,B),H===null?$=Gt:H.sibling=Gt,H=Gt,W=Te}if(ne.done)return n(g,W),fe&&rn(g,B),$;if(W===null){for(;!ne.done;B++,ne=v.next())ne=C(g,ne.value,T),ne!==null&&(p=i(ne,p,B),H===null?$=ne:H.sibling=ne,H=ne);return fe&&rn(g,B),$}for(W=r(g,W);!ne.done;B++,ne=v.next())ne=P(W,g,B,ne.value,T),ne!==null&&(e&&ne.alternate!==null&&W.delete(ne.key===null?B:ne.key),p=i(ne,p,B),H===null?$=ne:H.sibling=ne,H=ne);return e&&W.forEach(function(kf){return t(g,kf)}),fe&&rn(g,B),$}function xe(g,p,v,T){if(typeof v=="object"&&v!==null&&v.type===De&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Re:e:{for(var $=v.key,H=p;H!==null;){if(H.key===$){if($=v.type,$===De){if(H.tag===7){n(g,H.sibling),p=s(H,v.props.children),p.return=g,g=p;break e}}else if(H.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Ae&&ja($)===H.type){n(g,H.sibling),p=s(H,v.props),p.ref=fr(g,H,v),p.return=g,g=p;break e}n(g,H);break}else t(g,H);H=H.sibling}v.type===De?(p=fn(v.props.children,g.mode,T,v.key),p.return=g,g=p):(T=zs(v.type,v.key,v.props,null,g.mode,T),T.ref=fr(g,p,v),T.return=g,g=T)}return a(g);case Ee:e:{for(H=v.key;p!==null;){if(p.key===H)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(g,p.sibling),p=s(p,v.children||[]),p.return=g,g=p;break e}else{n(g,p);break}else t(g,p);p=p.sibling}p=Pi(v,g.mode,T),p.return=g,g=p}return a(g);case Ae:return H=v._init,xe(g,p,H(v._payload),T)}if(Wn(v))return O(g,p,v,T);if(U(v))return M(g,p,v,T);ls(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(g,p.sibling),p=s(p,v),p.return=g,g=p):(n(g,p),p=zi(v,g.mode,T),p.return=g,g=p),a(g)):n(g,p)}return xe}var Pn=Na(!0),Sa=Na(!1),is=At(null),os=null,Rn=null,Al=null;function Hl(){Al=Rn=os=null}function Wl(e){var t=is.current;ue(is),e._currentValue=t}function Ul(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ln(e,t){os=e,Al=Rn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ue=!0),e.firstContext=null)}function nt(e){var t=e._currentValue;if(Al!==e)if(e={context:e,memoizedValue:t,next:null},Rn===null){if(os===null)throw Error(u(308));Rn=e,os.dependencies={lanes:0,firstContext:e}}else Rn=Rn.next=e;return t}var sn=null;function Bl(e){sn===null?sn=[e]:sn.push(e)}function Ca(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Bl(t)):(n.next=s.next,s.next=n),t.interleaved=n,Et(e,r)}function Et(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ut=!1;function Vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ta(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(J&2)!==0){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Et(e,n)}return s=r.interleaved,s===null?(t.next=t,Bl(r)):(t.next=s.next,s.next=t),r.interleaved=t,Et(e,n)}function as(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sl(e,n)}}function Ea(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function us(e,t,n,r){var s=e.updateQueue;Ut=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,c=s.shared.pending;if(c!==null){s.shared.pending=null;var f=c,y=f.next;f.next=null,a===null?i=y:a.next=y,a=f;var N=e.alternate;N!==null&&(N=N.updateQueue,c=N.lastBaseUpdate,c!==a&&(c===null?N.firstBaseUpdate=y:c.next=y,N.lastBaseUpdate=f))}if(i!==null){var C=s.baseState;a=0,N=y=f=null,c=i;do{var k=c.lane,P=c.eventTime;if((r&k)===k){N!==null&&(N=N.next={eventTime:P,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var O=e,M=c;switch(k=t,P=n,M.tag){case 1:if(O=M.payload,typeof O=="function"){C=O.call(P,C,k);break e}C=O;break e;case 3:O.flags=O.flags&-65537|128;case 0:if(O=M.payload,k=typeof O=="function"?O.call(P,C,k):O,k==null)break e;C=L({},C,k);break e;case 2:Ut=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,k=s.effects,k===null?s.effects=[c]:k.push(c))}else P={eventTime:P,lane:k,tag:c.tag,payload:c.payload,callback:c.callback,next:null},N===null?(y=N=P,f=C):N=N.next=P,a|=k;if(c=c.next,c===null){if(c=s.shared.pending,c===null)break;k=c,c=k.next,k.next=null,s.lastBaseUpdate=k,s.shared.pending=null}}while(!0);if(N===null&&(f=C),s.baseState=f,s.firstBaseUpdate=y,s.lastBaseUpdate=N,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);an|=a,e.lanes=a,e.memoizedState=C}}function _a(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(u(191,s));s.call(r)}}}var pr={},xt=At(pr),hr=At(pr),mr=At(pr);function ln(e){if(e===pr)throw Error(u(174));return e}function Ql(e,t){switch(oe(mr,t),oe(hr,e),oe(xt,pr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ks(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ks(t,e)}ue(xt),oe(xt,t)}function On(){ue(xt),ue(hr),ue(mr)}function za(e){ln(mr.current);var t=ln(xt.current),n=Ks(t,e.type);t!==n&&(oe(hr,e),oe(xt,n))}function Kl(e){hr.current===e&&(ue(xt),ue(hr))}var pe=At(0);function cs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 ql=[];function Yl(){for(var e=0;e<ql.length;e++)ql[e]._workInProgressVersionPrimary=null;ql.length=0}var ds=ce.ReactCurrentDispatcher,bl=ce.ReactCurrentBatchConfig,on=0,he=null,je=null,Se=null,fs=!1,gr=!1,vr=0,Ud=0;function Oe(){throw Error(u(321))}function Gl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!at(e[n],t[n]))return!1;return!0}function Xl(e,t,n,r,s,i){if(on=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=e===null||e.memoizedState===null?Kd:qd,e=n(r,s),gr){i=0;do{if(gr=!1,vr=0,25<=i)throw Error(u(301));i+=1,Se=je=null,t.updateQueue=null,ds.current=Yd,e=n(r,s)}while(gr)}if(ds.current=ms,t=je!==null&&je.next!==null,on=0,Se=je=he=null,fs=!1,t)throw Error(u(300));return e}function Jl(){var e=vr!==0;return vr=0,e}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?he.memoizedState=Se=e:Se=Se.next=e,Se}function rt(){if(je===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=Se===null?he.memoizedState:Se.next;if(t!==null)Se=t,je=e;else{if(e===null)throw Error(u(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Se===null?he.memoizedState=Se=e:Se=Se.next=e}return Se}function yr(e,t){return typeof t=="function"?t(e):t}function Zl(e){var t=rt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=je,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var c=a=null,f=null,y=i;do{var N=y.lane;if((on&N)===N)f!==null&&(f=f.next={lane:0,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null}),r=y.hasEagerState?y.eagerState:e(r,y.action);else{var C={lane:N,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null};f===null?(c=f=C,a=r):f=f.next=C,he.lanes|=N,an|=N}y=y.next}while(y!==null&&y!==i);f===null?a=r:f.next=c,at(r,t.memoizedState)||(Ue=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,he.lanes|=i,an|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ei(e){var t=rt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);at(i,t.memoizedState)||(Ue=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Pa(){}function Ra(e,t){var n=he,r=rt(),s=t(),i=!at(r.memoizedState,s);if(i&&(r.memoizedState=s,Ue=!0),r=r.queue,ti(Ma.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,xr(9,Oa.bind(null,n,r,s,t),void 0,null),Ce===null)throw Error(u(349));(on&30)!==0||La(n,t,s)}return s}function La(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Oa(e,t,n,r){t.value=n,t.getSnapshot=r,$a(t)&&Ia(e)}function Ma(e,t,n){return n(function(){$a(t)&&Ia(e)})}function $a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!at(e,n)}catch{return!0}}function Ia(e){var t=Et(e,1);t!==null&&pt(t,e,1,-1)}function Fa(e){var t=wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yr,lastRenderedState:e},t.queue=e,e=e.dispatch=Qd.bind(null,he,e),[t.memoizedState,e]}function xr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Da(){return rt().memoizedState}function ps(e,t,n,r){var s=wt();he.flags|=e,s.memoizedState=xr(1|t,n,void 0,r===void 0?null:r)}function hs(e,t,n,r){var s=rt();r=r===void 0?null:r;var i=void 0;if(je!==null){var a=je.memoizedState;if(i=a.destroy,r!==null&&Gl(r,a.deps)){s.memoizedState=xr(t,n,i,r);return}}he.flags|=e,s.memoizedState=xr(1|t,n,i,r)}function Aa(e,t){return ps(8390656,8,e,t)}function ti(e,t){return hs(2048,8,e,t)}function Ha(e,t){return hs(4,2,e,t)}function Wa(e,t){return hs(4,4,e,t)}function Ua(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ba(e,t,n){return n=n!=null?n.concat([e]):null,hs(4,4,Ua.bind(null,t,e),n)}function ni(){}function Va(e,t){var n=rt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qa(e,t){var n=rt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ka(e,t,n){return(on&21)===0?(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n):(at(n,t)||(n=jo(),he.lanes|=n,an|=n,e.baseState=!0),t)}function Bd(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=bl.transition;bl.transition={};try{e(!1),t()}finally{le=n,bl.transition=r}}function qa(){return rt().memoizedState}function Vd(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e))ba(t,n);else if(n=Ca(e,t,n,r),n!==null){var s=Fe();pt(n,e,r,s),Ga(n,t,r)}}function Qd(e,t,n){var r=qt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))ba(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,c=i(a,n);if(s.hasEagerState=!0,s.eagerState=c,at(c,a)){var f=t.interleaved;f===null?(s.next=s,Bl(t)):(s.next=f.next,f.next=s),t.interleaved=s;return}}catch{}finally{}n=Ca(e,t,s,r),n!==null&&(s=Fe(),pt(n,e,r,s),Ga(n,t,r))}}function Ya(e){var t=e.alternate;return e===he||t!==null&&t===he}function ba(e,t){gr=fs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ga(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sl(e,n)}}var ms={readContext:nt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},Kd={readContext:nt,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:Aa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ps(4194308,4,Ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var n=wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Vd.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:Fa,useDebugValue:ni,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Bd.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,s=wt();if(fe){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Ce===null)throw Error(u(349));(on&30)!==0||La(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Aa(Ma.bind(null,r,i,e),[e]),r.flags|=2048,xr(9,Oa.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wt(),t=Ce.identifierPrefix;if(fe){var n=Tt,r=Ct;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ud++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},qd={readContext:nt,useCallback:Va,useContext:nt,useEffect:ti,useImperativeHandle:Ba,useInsertionEffect:Ha,useLayoutEffect:Wa,useMemo:Qa,useReducer:Zl,useRef:Da,useState:function(){return Zl(yr)},useDebugValue:ni,useDeferredValue:function(e){var t=rt();return Ka(t,je.memoizedState,e)},useTransition:function(){var e=Zl(yr)[0],t=rt().memoizedState;return[e,t]},useMutableSource:Pa,useSyncExternalStore:Ra,useId:qa,unstable_isNewReconciler:!1},Yd={readContext:nt,useCallback:Va,useContext:nt,useEffect:ti,useImperativeHandle:Ba,useInsertionEffect:Ha,useLayoutEffect:Wa,useMemo:Qa,useReducer:ei,useRef:Da,useState:function(){return ei(yr)},useDebugValue:ni,useDeferredValue:function(e){var t=rt();return je===null?t.memoizedState=e:Ka(t,je.memoizedState,e)},useTransition:function(){var e=ei(yr)[0],t=rt().memoizedState;return[e,t]},useMutableSource:Pa,useSyncExternalStore:Ra,useId:qa,unstable_isNewReconciler:!1};function ct(e,t){if(e&&e.defaultProps){t=L({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ri(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:L({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var gs={isMounted:function(e){return(e=e._reactInternals)?Zt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=qt(e),i=_t(r,s);i.payload=t,n!=null&&(i.callback=n),t=Bt(e,i,s),t!==null&&(pt(t,e,s,r),as(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=qt(e),i=_t(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Bt(e,i,s),t!==null&&(pt(t,e,s,r),as(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=qt(e),s=_t(n,r);s.tag=2,t!=null&&(s.callback=t),t=Bt(e,s,r),t!==null&&(pt(t,e,r,n),as(t,e,r))}};function Xa(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!lr(n,r)||!lr(s,i):!0}function Ja(e,t,n){var r=!1,s=Ht,i=t.contextType;return typeof i=="object"&&i!==null?i=nt(i):(s=We(t)?tn:Le.current,r=t.contextTypes,i=(r=r!=null)?Tn(e,s):Ht),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=gs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Za(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gs.enqueueReplaceState(t,t.state,null)}function si(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Vl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=nt(i):(i=We(t)?tn:Le.current,s.context=Tn(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ri(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&gs.enqueueReplaceState(s,s.state,null),us(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Mn(e,t){try{var n="",r=t;do n+=ee(r),r=r.return;while(r);var s=n}catch(i){s=`
|
|
39
39
|
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function li(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ii(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Gd=typeof WeakMap=="function"?WeakMap:Map;function eu(e,t,n){n=_t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ns||(Ns=!0,ki=r),ii(e,t)},n}function tu(e,t,n){n=_t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){ii(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ii(e,t),typeof r!="function"&&(Qt===null?Qt=new Set([this]):Qt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function nu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gd;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=cf.bind(null,e,t,n),t.then(e,e))}function ru(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function su(e,t,n,r,s){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_t(-1,1),t.tag=2,Bt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=s,e)}var Xd=ce.ReactCurrentOwner,Ue=!1;function Ie(e,t,n,r){t.child=e===null?Sa(t,null,n,r):Pn(t,e.child,n,r)}function lu(e,t,n,r,s){n=n.render;var i=t.ref;return Ln(t,s),r=bl(e,t,n,r,i,s),n=Jl(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zt(e,t,s)):(fe&&n&&Ml(t),t.flags|=1,Ie(e,t,r,s),t.child)}function iu(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!_i(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ou(e,t,i,r,s)):(e=zs(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&s)===0){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:lr,n(a,r)&&e.ref===t.ref)return zt(e,t,s)}return t.flags|=1,e=Gt(i,r),e.ref=t.ref,e.return=t,t.child=e}function ou(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(lr(i,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=i,(e.lanes&s)!==0)(e.flags&131072)!==0&&(Ue=!0);else return t.lanes=e.lanes,zt(e,t,s)}return oi(e,t,n,r,s)}function au(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(In,Je),Je|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(In,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,oe(In,Je),Je|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,oe(In,Je),Je|=r;return Ie(e,t,s,n),t.child}function uu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function oi(e,t,n,r,s){var i=We(n)?tn:Le.current;return i=Tn(t,i),Ln(t,s),n=bl(e,t,n,r,i,s),r=Jl(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zt(e,t,s)):(fe&&r&&Ml(t),t.flags|=1,Ie(e,t,n,s),t.child)}function cu(e,t,n,r,s){if(We(n)){var i=!0;es(t)}else i=!1;if(Ln(t,s),t.stateNode===null)ys(e,t),Ja(t,n,r),si(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,c=t.memoizedProps;a.props=c;var f=a.context,y=n.contextType;typeof y=="object"&&y!==null?y=nt(y):(y=We(n)?tn:Le.current,y=Tn(t,y));var N=n.getDerivedStateFromProps,C=typeof N=="function"||typeof a.getSnapshotBeforeUpdate=="function";C||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==r||f!==y)&&Za(t,a,r,y),Ut=!1;var k=t.memoizedState;a.state=k,us(t,r,a,s),f=t.memoizedState,c!==r||k!==f||Ae.current||Ut?(typeof N=="function"&&(ri(t,n,N,r),f=t.memoizedState),(c=Ut||ba(t,n,c,r,k,f,y))?(C||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=y,r=c):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ta(e,t),c=t.memoizedProps,y=t.type===t.elementType?c:ct(t.type,c),a.props=y,C=t.pendingProps,k=a.context,f=n.contextType,typeof f=="object"&&f!==null?f=nt(f):(f=We(n)?tn:Le.current,f=Tn(t,f));var P=n.getDerivedStateFromProps;(N=typeof P=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==C||k!==f)&&Za(t,a,r,f),Ut=!1,k=t.memoizedState,a.state=k,us(t,r,a,s);var O=t.memoizedState;c!==C||k!==O||Ae.current||Ut?(typeof P=="function"&&(ri(t,n,P,r),O=t.memoizedState),(y=Ut||ba(t,n,y,r,k,O,f)||!1)?(N||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,O,f),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,O,f)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=O),a.props=r,a.state=O,a.context=f,r=y):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),r=!1)}return ai(e,t,n,r,i,s)}function ai(e,t,n,r,s,i){uu(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&ma(t,n,!1),zt(e,t,i);r=t.stateNode,Xd.current=t;var c=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Pn(t,e.child,null,i),t.child=Pn(t,null,c,i)):Ie(e,t,c,i),t.memoizedState=r.state,s&&ma(t,n,!0),t.child}function du(e){var t=e.stateNode;t.pendingContext?pa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&pa(e,t.context,!1),Ql(e,t.containerInfo)}function fu(e,t,n,r,s){return zn(),Dl(s),t.flags|=256,Ie(e,t,n,r),t.child}var ui={dehydrated:null,treeContext:null,retryLane:0};function ci(e){return{baseLanes:e,cachePool:null,transitions:null}}function pu(e,t,n){var r=t.pendingProps,s=pe.current,i=!1,a=(t.flags&128)!==0,c;if((c=a)||(c=e!==null&&e.memoizedState===null?!1:(s&2)!==0),c?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),oe(pe,s&1),e===null)return Fl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Ps(a,r,0,null),e=fn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ci(n),t.memoizedState=ui,e):di(t,a));if(s=e.memoizedState,s!==null&&(c=s.dehydrated,c!==null))return bd(e,t,a,r,c,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,c=s.sibling;var f={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=Gt(s,f),r.subtreeFlags=s.subtreeFlags&14680064),c!==null?i=Gt(c,i):(i=fn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ci(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=ui,r}return i=e.child,e=i.sibling,r=Gt(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function di(e,t){return t=Ps({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vs(e,t,n,r){return r!==null&&Dl(r),Pn(t,e.child,null,n),e=di(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bd(e,t,n,r,s,i,a){if(n)return t.flags&256?(t.flags&=-257,r=li(Error(u(422))),vs(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Ps({mode:"visible",children:r.children},s,0,null),i=fn(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Pn(t,e.child,null,a),t.child.memoizedState=ci(a),t.memoizedState=ui,i);if((t.mode&1)===0)return vs(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var c=r.dgst;return r=c,i=Error(u(419)),r=li(i,r,void 0),vs(e,t,a,r)}if(c=(a&e.childLanes)!==0,Ue||c){if(r=Ce,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=(s&(r.suspendedLanes|a))!==0?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Et(e,s),pt(r,e,s,-1))}return Ei(),r=li(Error(u(421))),vs(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=df.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,be=Dt(s.nextSibling),Xe=t,fe=!0,ut=null,e!==null&&(et[tt++]=Ct,et[tt++]=Tt,et[tt++]=nn,Ct=e.id,Tt=e.overflow,nn=t),t=di(t,r.children),t.flags|=4096,t)}function hu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ul(e.return,t,n)}function fi(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function mu(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ie(e,t,r.children,n),r=pe.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hu(e,n,t);else if(e.tag===19)hu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(pe,r),(t.mode&1)===0)t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&cs(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),fi(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&cs(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}fi(t,!0,n,null,i);break;case"together":fi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ys(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),an|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Gt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Jd(e,t,n){switch(t.tag){case 3:du(t),zn();break;case 5:za(t);break;case 1:We(t.type)&&es(t);break;case 4:Ql(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;oe(is,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(pe,pe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?pu(e,t,n):(oe(pe,pe.current&1),e=zt(e,t,n),e!==null?e.sibling:null);oe(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return mu(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,au(e,t,n)}return zt(e,t,n)}var gu,pi,vu,yu;gu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},pi=function(){},vu=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ln(xt.current);var i=null;switch(n){case"input":s=Us(e,s),r=Us(e,r),i=[];break;case"select":s=L({},s,{value:void 0}),r=L({},r,{value:void 0}),i=[];break;case"textarea":s=Qs(e,s),r=Qs(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=br)}qs(n,r);var a;n=null;for(y in s)if(!r.hasOwnProperty(y)&&s.hasOwnProperty(y)&&s[y]!=null)if(y==="style"){var c=s[y];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else y!=="dangerouslySetInnerHTML"&&y!=="children"&&y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(x.hasOwnProperty(y)?i||(i=[]):(i=i||[]).push(y,null));for(y in r){var f=r[y];if(c=s!=null?s[y]:void 0,r.hasOwnProperty(y)&&f!==c&&(f!=null||c!=null))if(y==="style")if(c){for(a in c)!c.hasOwnProperty(a)||f&&f.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in f)f.hasOwnProperty(a)&&c[a]!==f[a]&&(n||(n={}),n[a]=f[a])}else n||(i||(i=[]),i.push(y,n)),n=f;else y==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,c=c?c.__html:void 0,f!=null&&c!==f&&(i=i||[]).push(y,f)):y==="children"?typeof f!="string"&&typeof f!="number"||(i=i||[]).push(y,""+f):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&(x.hasOwnProperty(y)?(f!=null&&y==="onScroll"&&ae("scroll",e),i||c===f||(i=[])):(i=i||[]).push(y,f))}n&&(i=i||[]).push("style",n);var y=i;(t.updateQueue=y)&&(t.flags|=4)}},yu=function(e,t,n,r){n!==r&&(t.flags|=4)};function wr(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zd(e,t,n){var r=t.pendingProps;switch($l(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return We(t.type)&&Zr(),Me(t),null;case 3:return r=t.stateNode,On(),ue(Ae),ue(Le),Yl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ss(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ut!==null&&(Si(ut),ut=null))),pi(e,t),Me(t),null;case 5:Kl(t);var s=ln(mr.current);if(n=t.type,e!==null&&t.stateNode!=null)vu(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(u(166));return Me(t),null}if(e=ln(xt.current),ss(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[yt]=t,r[cr]=i,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(s=0;s<or.length;s++)ae(or[s],r);break;case"source":ae("error",r);break;case"img":case"image":case"link":ae("error",r),ae("load",r);break;case"details":ae("toggle",r);break;case"input":bi(r,i),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ae("invalid",r);break;case"textarea":eo(r,i),ae("invalid",r)}qs(n,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var c=i[a];a==="children"?typeof c=="string"?r.textContent!==c&&(i.suppressHydrationWarning!==!0&&Xr(r.textContent,c,e),s=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(i.suppressHydrationWarning!==!0&&Xr(r.textContent,c,e),s=["children",""+c]):x.hasOwnProperty(a)&&c!=null&&a==="onScroll"&&ae("scroll",r)}switch(n){case"input":Er(r),Zi(r,i,!0);break;case"textarea":Er(r),no(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=br)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ro(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[yt]=t,e[cr]=r,gu(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ys(n,r),n){case"dialog":ae("cancel",e),ae("close",e),s=r;break;case"iframe":case"object":case"embed":ae("load",e),s=r;break;case"video":case"audio":for(s=0;s<or.length;s++)ae(or[s],e);s=r;break;case"source":ae("error",e),s=r;break;case"img":case"image":case"link":ae("error",e),ae("load",e),s=r;break;case"details":ae("toggle",e),s=r;break;case"input":bi(e,r),s=Us(e,r),ae("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=L({},r,{value:void 0}),ae("invalid",e);break;case"textarea":eo(e,r),s=Qs(e,r),ae("invalid",e);break;default:s=r}qs(n,s),c=s;for(i in c)if(c.hasOwnProperty(i)){var f=c[i];i==="style"?io(e,f):i==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&so(e,f)):i==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&Un(e,f):typeof f=="number"&&Un(e,""+f):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(x.hasOwnProperty(i)?f!=null&&i==="onScroll"&&ae("scroll",e):f!=null&&ve(e,i,f,a))}switch(n){case"input":Er(e),Zi(e,r,!1);break;case"textarea":Er(e),no(e);break;case"option":r.value!=null&&e.setAttribute("value",""+se(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?hn(e,!!r.multiple,i,!1):r.defaultValue!=null&&hn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=br)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Me(t),null;case 6:if(e&&t.stateNode!=null)yu(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(n=ln(mr.current),ln(xt.current),ss(t)){if(r=t.stateNode,n=t.memoizedProps,r[yt]=t,(i=r.nodeValue!==n)&&(e=Xe,e!==null))switch(e.tag){case 3:Xr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Xr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yt]=t,t.stateNode=r}return Me(t),null;case 13:if(ue(pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&be!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ka(),zn(),t.flags|=98560,i=!1;else if(i=ss(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[yt]=t}else zn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),i=!1}else ut!==null&&(Si(ut),ut=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(pe.current&1)!==0?Ne===0&&(Ne=3):Ei())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return On(),pi(e,t),e===null&&ar(t.stateNode.containerInfo),Me(t),null;case 10:return Wl(t.type._context),Me(t),null;case 17:return We(t.type)&&Zr(),Me(t),null;case 19:if(ue(pe),i=t.memoizedState,i===null)return Me(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)wr(i,!1);else{if(Ne!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=cs(e),a!==null){for(t.flags|=128,wr(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oe(pe,pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>Fn&&(t.flags|=128,r=!0,wr(i,!1),t.lanes=4194304)}else{if(!r)if(e=cs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!fe)return Me(t),null}else 2*ye()-i.renderingStartTime>Fn&&n!==1073741824&&(t.flags|=128,r=!0,wr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ye(),t.sibling=null,n=pe.current,oe(pe,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return Ti(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Je&1073741824)!==0&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function ef(e,t){switch($l(t),t.tag){case 1:return We(t.type)&&Zr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return On(),ue(Ae),ue(Le),Yl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Kl(t),null;case 13:if(ue(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(pe),null;case 4:return On(),null;case 10:return Wl(t.type._context),null;case 22:case 23:return Ti(),null;case 24:return null;default:return null}}var xs=!1,$e=!1,tf=typeof WeakSet=="function"?WeakSet:Set,R=null;function $n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function hi(e,t,n){try{n()}catch(r){ge(e,t,r)}}var xu=!1;function nf(e,t){if(Tl=Hr,e=bo(),yl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,c=-1,f=-1,y=0,N=0,C=e,k=null;t:for(;;){for(var P;C!==n||s!==0&&C.nodeType!==3||(c=a+s),C!==i||r!==0&&C.nodeType!==3||(f=a+r),C.nodeType===3&&(a+=C.nodeValue.length),(P=C.firstChild)!==null;)k=C,C=P;for(;;){if(C===e)break t;if(k===n&&++y===s&&(c=a),k===i&&++N===r&&(f=a),(P=C.nextSibling)!==null)break;C=k,k=C.parentNode}C=P}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(El={focusedElem:e,selectionRange:n},Hr=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var O=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(O!==null){var M=O.memoizedProps,xe=O.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?M:ct(t.type,M),xe);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(T){ge(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return O=xu,xu=!1,O}function kr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&hi(t,n,i)}s=s.next}while(s!==r)}}function ws(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function mi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wu(e){var t=e.alternate;t!==null&&(e.alternate=null,wu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[cr],delete t[Rl],delete t[Dd],delete t[Hd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ku(e){return e.tag===5||e.tag===3||e.tag===4}function ju(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ku(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.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 gi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=br));else if(r!==4&&(e=e.child,e!==null))for(gi(e,t,n),e=e.sibling;e!==null;)gi(e,t,n),e=e.sibling}function vi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(vi(e,t,n),e=e.sibling;e!==null;)vi(e,t,n),e=e.sibling}var _e=null,dt=!1;function Vt(e,t,n){for(n=n.child;n!==null;)Nu(e,t,n),n=n.sibling}function Nu(e,t,n){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Or,n)}catch{}switch(n.tag){case 5:$e||$n(n,t);case 6:var r=_e,s=dt;_e=null,Vt(e,t,n),_e=r,dt=s,_e!==null&&(dt?(e=_e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_e.removeChild(n.stateNode));break;case 18:_e!==null&&(dt?(e=_e,n=n.stateNode,e.nodeType===8?Pl(e.parentNode,n):e.nodeType===1&&Pl(e,n),Zn(e)):Pl(_e,n.stateNode));break;case 4:r=_e,s=dt,_e=n.stateNode.containerInfo,dt=!0,Vt(e,t,n),_e=r,dt=s;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&hi(n,t,a),s=s.next}while(s!==r)}Vt(e,t,n);break;case 1:if(!$e&&($n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){ge(n,t,c)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,Vt(e,t,n),$e=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function Su(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tf),t.forEach(function(r){var s=ff.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,a=t,c=a;e:for(;c!==null;){switch(c.tag){case 5:_e=c.stateNode,dt=!1;break e;case 3:_e=c.stateNode.containerInfo,dt=!0;break e;case 4:_e=c.stateNode.containerInfo,dt=!0;break e}c=c.return}if(_e===null)throw Error(u(160));Nu(i,a,s),_e=null,dt=!1;var f=s.alternate;f!==null&&(f.return=null),s.return=null}catch(y){ge(s,t,y)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Cu(t,e),t=t.sibling}function Cu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ft(t,e),kt(e),r&4){try{kr(3,e,e.return),ws(3,e)}catch(M){ge(e,e.return,M)}try{kr(5,e,e.return)}catch(M){ge(e,e.return,M)}}break;case 1:ft(t,e),kt(e),r&512&&n!==null&&$n(n,n.return);break;case 5:if(ft(t,e),kt(e),r&512&&n!==null&&$n(n,n.return),e.flags&32){var s=e.stateNode;try{Un(s,"")}catch(M){ge(e,e.return,M)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,c=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{c==="input"&&i.type==="radio"&&i.name!=null&&Ji(s,i),Ys(c,a);var y=Ys(c,i);for(a=0;a<f.length;a+=2){var N=f[a],C=f[a+1];N==="style"?io(s,C):N==="dangerouslySetInnerHTML"?so(s,C):N==="children"?Un(s,C):ve(s,N,C,y)}switch(c){case"input":Bs(s,i);break;case"textarea":to(s,i);break;case"select":var k=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var P=i.value;P!=null?hn(s,!!i.multiple,P,!1):k!==!!i.multiple&&(i.defaultValue!=null?hn(s,!!i.multiple,i.defaultValue,!0):hn(s,!!i.multiple,i.multiple?[]:"",!1))}s[cr]=i}catch(M){ge(e,e.return,M)}}break;case 6:if(ft(t,e),kt(e),r&4){if(e.stateNode===null)throw Error(u(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(M){ge(e,e.return,M)}}break;case 3:if(ft(t,e),kt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zn(t.containerInfo)}catch(M){ge(e,e.return,M)}break;case 4:ft(t,e),kt(e);break;case 13:ft(t,e),kt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(wi=ye())),r&4&&Su(e);break;case 22:if(N=n!==null&&n.memoizedState!==null,e.mode&1?($e=(y=$e)||N,ft(t,e),$e=y):ft(t,e),kt(e),r&8192){if(y=e.memoizedState!==null,(e.stateNode.isHidden=y)&&!N&&(e.mode&1)!==0)for(R=e,N=e.child;N!==null;){for(C=R=N;R!==null;){switch(k=R,P=k.child,k.tag){case 0:case 11:case 14:case 15:kr(4,k,k.return);break;case 1:$n(k,k.return);var O=k.stateNode;if(typeof O.componentWillUnmount=="function"){r=k,n=k.return;try{t=r,O.props=t.memoizedProps,O.state=t.memoizedState,O.componentWillUnmount()}catch(M){ge(r,n,M)}}break;case 5:$n(k,k.return);break;case 22:if(k.memoizedState!==null){_u(C);continue}}P!==null?(P.return=k,R=P):_u(C)}N=N.sibling}e:for(N=null,C=e;;){if(C.tag===5){if(N===null){N=C;try{s=C.stateNode,y?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(c=C.stateNode,f=C.memoizedProps.style,a=f!=null&&f.hasOwnProperty("display")?f.display:null,c.style.display=lo("display",a))}catch(M){ge(e,e.return,M)}}}else if(C.tag===6){if(N===null)try{C.stateNode.nodeValue=y?"":C.memoizedProps}catch(M){ge(e,e.return,M)}}else if((C.tag!==22&&C.tag!==23||C.memoizedState===null||C===e)&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===e)break e;for(;C.sibling===null;){if(C.return===null||C.return===e)break e;N===C&&(N=null),C=C.return}N===C&&(N=null),C.sibling.return=C.return,C=C.sibling}}break;case 19:ft(t,e),kt(e),r&4&&Su(e);break;case 21:break;default:ft(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ku(n)){var r=n;break e}n=n.return}throw Error(u(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Un(s,""),r.flags&=-33);var i=ju(e);vi(e,i,s);break;case 3:case 4:var a=r.stateNode.containerInfo,c=ju(e);gi(e,c,a);break;default:throw Error(u(161))}}catch(f){ge(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rf(e,t,n){R=e,Tu(e)}function Tu(e,t,n){for(var r=(e.mode&1)!==0;R!==null;){var s=R,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||xs;if(!a){var c=s.alternate,f=c!==null&&c.memoizedState!==null||$e;c=xs;var y=$e;if(xs=a,($e=f)&&!y)for(R=s;R!==null;)a=R,f=a.child,a.tag===22&&a.memoizedState!==null?zu(s):f!==null?(f.return=a,R=f):zu(s);for(;i!==null;)R=i,Tu(i),i=i.sibling;R=s,xs=c,$e=y}Eu(e)}else(s.subtreeFlags&8772)!==0&&i!==null?(i.return=s,R=i):Eu(e)}}function Eu(e){for(;R!==null;){var t=R;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:$e||ws(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!$e)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ct(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&_a(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}_a(t,a,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var y=t.alternate;if(y!==null){var N=y.memoizedState;if(N!==null){var C=N.dehydrated;C!==null&&Zn(C)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}$e||t.flags&512&&mi(t)}catch(k){ge(t,t.return,k)}}if(t===e){R=null;break}if(n=t.sibling,n!==null){n.return=t.return,R=n;break}R=t.return}}function _u(e){for(;R!==null;){var t=R;if(t===e){R=null;break}var n=t.sibling;if(n!==null){n.return=t.return,R=n;break}R=t.return}}function zu(e){for(;R!==null;){var t=R;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ws(4,t)}catch(f){ge(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(f){ge(t,s,f)}}var i=t.return;try{mi(t)}catch(f){ge(t,i,f)}break;case 5:var a=t.return;try{mi(t)}catch(f){ge(t,a,f)}}}catch(f){ge(t,t.return,f)}if(t===e){R=null;break}var c=t.sibling;if(c!==null){c.return=t.return,R=c;break}R=t.return}}var sf=Math.ceil,ks=ce.ReactCurrentDispatcher,yi=ce.ReactCurrentOwner,st=ce.ReactCurrentBatchConfig,J=0,Ce=null,ke=null,ze=0,Je=0,In=Ht(0),Ne=0,jr=null,an=0,js=0,xi=0,Nr=null,Be=null,wi=0,Fn=1/0,Pt=null,Ns=!1,ki=null,Qt=null,Ss=!1,Kt=null,Cs=0,Sr=0,ji=null,Ts=-1,Es=0;function Fe(){return(J&6)!==0?ye():Ts!==-1?Ts:Ts=ye()}function qt(e){return(e.mode&1)===0?1:(J&2)!==0&&ze!==0?ze&-ze:Wd.transition!==null?(Es===0&&(Es=jo()),Es):(e=le,e!==0||(e=window.event,e=e===void 0?16:Ro(e.type)),e)}function pt(e,t,n,r){if(50<Sr)throw Sr=0,ji=null,Error(u(185));Yn(e,n,r),((J&2)===0||e!==Ce)&&(e===Ce&&((J&2)===0&&(js|=n),Ne===4&&Yt(e,ze)),Ve(e,r),n===1&&J===0&&(t.mode&1)===0&&(Fn=ye()+500,ts&&Wt()))}function Ve(e,t){var n=e.callbackNode;Wc(e,t);var r=Ir(e,e===Ce?ze:0);if(r===0)n!==null&&xo(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&xo(n),t===1)e.tag===0?Ad(Ru.bind(null,e)):ga(Ru.bind(null,e)),Id(function(){(J&6)===0&&Wt()}),n=null;else{switch(No(r)){case 1:n=tl;break;case 4:n=wo;break;case 16:n=Lr;break;case 536870912:n=ko;break;default:n=Lr}n=Hu(n,Pu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Pu(e,t){if(Ts=-1,Es=0,(J&6)!==0)throw Error(u(327));var n=e.callbackNode;if(Dn()&&e.callbackNode!==n)return null;var r=Ir(e,e===Ce?ze:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=_s(e,r);else{t=r;var s=J;J|=2;var i=Ou();(Ce!==e||ze!==t)&&(Pt=null,Fn=ye()+500,cn(e,t));do try{af();break}catch(c){Lu(e,c)}while(!0);Al(),ks.current=i,J=s,ke!==null?t=0:(Ce=null,ze=0,t=Ne)}if(t!==0){if(t===2&&(s=nl(e),s!==0&&(r=s,t=Ni(e,s))),t===1)throw n=jr,cn(e,0),Yt(e,r),Ve(e,ye()),n;if(t===6)Yt(e,r);else{if(s=e.current.alternate,(r&30)===0&&!lf(s)&&(t=_s(e,r),t===2&&(i=nl(e),i!==0&&(r=i,t=Ni(e,i))),t===1))throw n=jr,cn(e,0),Yt(e,r),Ve(e,ye()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(u(345));case 2:dn(e,Be,Pt);break;case 3:if(Yt(e,r),(r&130023424)===r&&(t=wi+500-ye(),10<t)){if(Ir(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=zl(dn.bind(null,e,Be,Pt),t);break}dn(e,Be,Pt);break;case 4:if(Yt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-ot(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sf(r/1960))-r,10<r){e.timeoutHandle=zl(dn.bind(null,e,Be,Pt),r);break}dn(e,Be,Pt);break;case 5:dn(e,Be,Pt);break;default:throw Error(u(329))}}}return Ve(e,ye()),e.callbackNode===n?Pu.bind(null,e):null}function Ni(e,t){var n=Nr;return e.current.memoizedState.isDehydrated&&(cn(e,t).flags|=256),e=_s(e,t),e!==2&&(t=Be,Be=n,t!==null&&Si(t)),e}function Si(e){Be===null?Be=e:Be.push.apply(Be,e)}function lf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!at(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yt(e,t){for(t&=~xi,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function Ru(e){if((J&6)!==0)throw Error(u(327));Dn();var t=Ir(e,0);if((t&1)===0)return Ve(e,ye()),null;var n=_s(e,t);if(e.tag!==0&&n===2){var r=nl(e);r!==0&&(t=r,n=Ni(e,r))}if(n===1)throw n=jr,cn(e,0),Yt(e,t),Ve(e,ye()),n;if(n===6)throw Error(u(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,dn(e,Be,Pt),Ve(e,ye()),null}function Ci(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(Fn=ye()+500,ts&&Wt())}}function un(e){Kt!==null&&Kt.tag===0&&(J&6)===0&&Dn();var t=J;J|=1;var n=st.transition,r=le;try{if(st.transition=null,le=1,e)return e()}finally{le=r,st.transition=n,J=t,(J&6)===0&&Wt()}}function Ti(){Je=In.current,ue(In)}function cn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,$d(n)),ke!==null)for(n=ke.return;n!==null;){var r=n;switch($l(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zr();break;case 3:On(),ue(Ae),ue(Le),Yl();break;case 5:Kl(r);break;case 4:On();break;case 13:ue(pe);break;case 19:ue(pe);break;case 10:Wl(r.type._context);break;case 22:case 23:Ti()}n=n.return}if(Ce=e,ke=e=Gt(e.current,null),ze=Je=t,Ne=0,jr=null,xi=js=an=0,Be=Nr=null,sn!==null){for(t=0;t<sn.length;t++)if(n=sn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}sn=null}return e}function Lu(e,t){do{var n=ke;try{if(Al(),ds.current=ms,fs){for(var r=he.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}fs=!1}if(on=0,Se=je=he=null,gr=!1,vr=0,yi.current=null,n===null||n.return===null){Ne=1,jr=t,ke=null;break}e:{var i=e,a=n.return,c=n,f=t;if(t=ze,c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var y=f,N=c,C=N.tag;if((N.mode&1)===0&&(C===0||C===11||C===15)){var k=N.alternate;k?(N.updateQueue=k.updateQueue,N.memoizedState=k.memoizedState,N.lanes=k.lanes):(N.updateQueue=null,N.memoizedState=null)}var P=ru(a);if(P!==null){P.flags&=-257,su(P,a,c,i,t),P.mode&1&&nu(i,y,t),t=P,f=y;var O=t.updateQueue;if(O===null){var M=new Set;M.add(f),t.updateQueue=M}else O.add(f);break e}else{if((t&1)===0){nu(i,y,t),Ei();break e}f=Error(u(426))}}else if(fe&&c.mode&1){var xe=ru(a);if(xe!==null){(xe.flags&65536)===0&&(xe.flags|=256),su(xe,a,c,i,t),Dl(Mn(f,c));break e}}i=f=Mn(f,c),Ne!==4&&(Ne=2),Nr===null?Nr=[i]:Nr.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=eu(i,f,t);Ea(i,g);break e;case 1:c=f;var p=i.type,v=i.stateNode;if((i.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Qt===null||!Qt.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var T=tu(i,c,t);Ea(i,T);break e}}i=i.return}while(i!==null)}$u(n)}catch($){t=$,ke===n&&n!==null&&(ke=n=n.return);continue}break}while(!0)}function Ou(){var e=ks.current;return ks.current=ms,e===null?ms:e}function Ei(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ce===null||(an&268435455)===0&&(js&268435455)===0||Yt(Ce,ze)}function _s(e,t){var n=J;J|=2;var r=Ou();(Ce!==e||ze!==t)&&(Pt=null,cn(e,t));do try{of();break}catch(s){Lu(e,s)}while(!0);if(Al(),J=n,ks.current=r,ke!==null)throw Error(u(261));return Ce=null,ze=0,Ne}function of(){for(;ke!==null;)Mu(ke)}function af(){for(;ke!==null&&!Lc();)Mu(ke)}function Mu(e){var t=Du(e.alternate,e,Je);e.memoizedProps=e.pendingProps,t===null?$u(e):ke=t,yi.current=null}function $u(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Zd(n,t,Je),n!==null){ke=n;return}}else{if(n=ef(n,t),n!==null){n.flags&=32767,ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,ke=null;return}}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Ne===0&&(Ne=5)}function dn(e,t,n){var r=le,s=st.transition;try{st.transition=null,le=1,uf(e,t,n,r)}finally{st.transition=s,le=r}return null}function uf(e,t,n,r){do Dn();while(Kt!==null);if((J&6)!==0)throw Error(u(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Uc(e,i),e===Ce&&(ke=Ce=null,ze=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ss||(Ss=!0,Hu(Lr,function(){return Dn(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=st.transition,st.transition=null;var a=le;le=1;var c=J;J|=4,yi.current=null,nf(e,n),Cu(n,e),_d(El),Hr=!!Tl,El=Tl=null,e.current=n,rf(n),Oc(),J=c,le=a,st.transition=i}else e.current=n;if(Ss&&(Ss=!1,Kt=e,Cs=s),i=e.pendingLanes,i===0&&(Qt=null),Ic(n.stateNode),Ve(e,ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ns)throw Ns=!1,e=ki,ki=null,e;return(Cs&1)!==0&&e.tag!==0&&Dn(),i=e.pendingLanes,(i&1)!==0?e===ji?Sr++:(Sr=0,ji=e):Sr=0,Wt(),null}function Dn(){if(Kt!==null){var e=No(Cs),t=st.transition,n=le;try{if(st.transition=null,le=16>e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,Cs=0,(J&6)!==0)throw Error(u(331));var s=J;for(J|=4,R=e.current;R!==null;){var i=R,a=i.child;if((R.flags&16)!==0){var c=i.deletions;if(c!==null){for(var f=0;f<c.length;f++){var y=c[f];for(R=y;R!==null;){var N=R;switch(N.tag){case 0:case 11:case 15:kr(8,N,i)}var C=N.child;if(C!==null)C.return=N,R=C;else for(;R!==null;){N=R;var k=N.sibling,P=N.return;if(wu(N),N===y){R=null;break}if(k!==null){k.return=P,R=k;break}R=P}}}var O=i.alternate;if(O!==null){var M=O.child;if(M!==null){O.child=null;do{var xe=M.sibling;M.sibling=null,M=xe}while(M!==null)}}R=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,R=a;else e:for(;R!==null;){if(i=R,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:kr(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,R=g;break e}R=i.return}}var p=e.current;for(R=p;R!==null;){a=R;var v=a.child;if((a.subtreeFlags&2064)!==0&&v!==null)v.return=a,R=v;else e:for(a=p;R!==null;){if(c=R,(c.flags&2048)!==0)try{switch(c.tag){case 0:case 11:case 15:ws(9,c)}}catch($){ge(c,c.return,$)}if(c===a){R=null;break e}var T=c.sibling;if(T!==null){T.return=c.return,R=T;break e}R=c.return}}if(J=s,Wt(),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Or,e)}catch{}r=!0}return r}finally{le=n,st.transition=t}}return!1}function Iu(e,t,n){t=Mn(n,t),t=eu(e,t,1),e=Bt(e,t,1),t=Fe(),e!==null&&(Yn(e,1,t),Ve(e,t))}function ge(e,t,n){if(e.tag===3)Iu(e,e,n);else for(;t!==null;){if(t.tag===3){Iu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qt===null||!Qt.has(r))){e=Mn(n,e),e=tu(t,e,1),t=Bt(t,e,1),e=Fe(),t!==null&&(Yn(t,1,e),Ve(t,e));break}}t=t.return}}function cf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(ze&n)===n&&(Ne===4||Ne===3&&(ze&130023424)===ze&&500>ye()-wi?cn(e,0):xi|=n),Ve(e,t)}function Fu(e,t){t===0&&((e.mode&1)===0?t=1:(t=$r,$r<<=1,($r&130023424)===0&&($r=4194304)));var n=Fe();e=Et(e,t),e!==null&&(Yn(e,t,n),Ve(e,n))}function df(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fu(e,n)}function ff(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),Fu(e,n)}var Du;Du=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)Ue=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ue=!1,Jd(e,t,n);Ue=(e.flags&131072)!==0}else Ue=!1,fe&&(t.flags&1048576)!==0&&va(t,rs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ys(e,t),e=t.pendingProps;var s=Tn(t,Le.current);Ln(t,n),s=bl(null,t,r,e,s,n);var i=Jl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(r)?(i=!0,es(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Vl(t),s.updater=gs,t.stateNode=s,s._reactInternals=t,si(t,r,e,n),t=ai(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&Ml(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ys(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=hf(r),e=ct(r,e),s){case 0:t=oi(null,t,r,e,n);break e;case 1:t=cu(null,t,r,e,n);break e;case 11:t=lu(null,t,r,e,n);break e;case 14:t=iu(null,t,r,ct(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),oi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),cu(e,t,r,s,n);case 3:e:{if(du(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Ta(e,t),us(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Mn(Error(u(423)),t),t=fu(e,t,r,n,s);break e}else if(r!==s){s=Mn(Error(u(424)),t),t=fu(e,t,r,n,s);break e}else for(be=Dt(t.stateNode.containerInfo.firstChild),Xe=t,fe=!0,ut=null,n=Sa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zn(),r===s){t=zt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return za(t),e===null&&Fl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,_l(r,s)?a=null:i!==null&&_l(r,i)&&(t.flags|=32),uu(e,t),Ie(e,t,a,n),t.child;case 6:return e===null&&Fl(t),null;case 13:return pu(e,t,n);case 4:return Ql(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pn(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),lu(e,t,r,s,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,oe(is,r._currentValue),r._currentValue=a,i!==null)if(at(i.value,a)){if(i.children===s.children&&!Ae.current){t=zt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){a=i.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=_t(-1,n&-n),f.tag=2;var y=i.updateQueue;if(y!==null){y=y.shared;var N=y.pending;N===null?f.next=f:(f.next=N.next,N.next=f),y.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),Ul(i.return,n,t),c.lanes|=n;break}f=f.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(u(341));a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Ul(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ie(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ln(t,n),s=nt(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=ct(r,t.pendingProps),s=ct(r.type,s),iu(e,t,r,s,n);case 15:return ou(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),ys(e,t),t.tag=1,We(r)?(e=!0,es(t)):e=!1,Ln(t,n),Ja(t,r,s),si(t,r,s,n),ai(null,t,r,!0,e,n);case 19:return mu(e,t,n);case 22:return au(e,t,n)}throw Error(u(156,t.tag))};function Hu(e,t){return yo(e,t)}function pf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lt(e,t,n,r){return new pf(e,t,n,r)}function _i(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hf(e){if(typeof e=="function")return _i(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mt)return 11;if(e===gt)return 14}return 2}function Gt(e,t){var n=e.alternate;return n===null?(n=lt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zs(e,t,n,r,s,i){var a=2;if(r=e,typeof e=="function")_i(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case De:return fn(n.children,s,i,t);case Ze:a=8,s|=8;break;case Rt:return e=lt(12,n,t,s|2),e.elementType=Rt,e.lanes=i,e;case qe:return e=lt(13,n,t,s),e.elementType=qe,e.lanes=i,e;case it:return e=lt(19,n,t,s),e.elementType=it,e.lanes=i,e;case me:return Ps(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jt:a=10;break e;case Jt:a=9;break e;case mt:a=11;break e;case gt:a=14;break e;case He:a=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=lt(a,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function fn(e,t,n,r){return e=lt(7,e,r,t),e.lanes=n,e}function Ps(e,t,n,r){return e=lt(22,e,r,t),e.elementType=me,e.lanes=n,e.stateNode={isHidden:!1},e}function zi(e,t,n){return e=lt(6,e,null,t),e.lanes=n,e}function Pi(e,t,n){return t=lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mf(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=rl(0),this.expirationTimes=rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ri(e,t,n,r,s,i,a,c,f){return e=new mf(e,t,n,c,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=lt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vl(i),e}function gf(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ee,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Au(e){if(!e)return At;e=e._reactInternals;e:{if(Zt(e)!==e||e.tag!==1)throw Error(u(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(u(171))}if(e.tag===1){var n=e.type;if(We(n))return ha(e,n,t)}return t}function Wu(e,t,n,r,s,i,a,c,f){return e=Ri(n,r,!0,e,s,i,a,c,f),e.context=Au(null),n=e.current,r=Fe(),s=qt(n),i=_t(r,s),i.callback=t??null,Bt(n,i,s),e.current.lanes=s,Yn(e,s,r),Ve(e,r),e}function Rs(e,t,n,r){var s=t.current,i=Fe(),a=qt(s);return n=Au(n),t.context===null?t.context=n:t.pendingContext=n,t=_t(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Bt(s,t,a),e!==null&&(pt(e,s,a,i),as(e,s,a)),a}function Ls(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Uu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Li(e,t){Uu(e,t),(e=e.alternate)&&Uu(e,t)}function vf(){return null}var Bu=typeof reportError=="function"?reportError:function(e){console.error(e)};function Oi(e){this._internalRoot=e}Os.prototype.render=Oi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));Rs(e,t,null,null)},Os.prototype.unmount=Oi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;un(function(){Rs(null,e,null,null)}),t[Nt]=null}};function Os(e){this._internalRoot=e}Os.prototype.unstable_scheduleHydration=function(e){if(e){var t=To();e={blockedOn:null,target:e,priority:t};for(var n=0;n<$t.length&&t!==0&&t<$t[n].priority;n++);$t.splice(n,0,e),n===0&&zo(e)}};function Mi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ms(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Vu(){}function yf(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var y=Ls(a);i.call(y)}}var a=Wu(t,r,e,0,null,!1,!1,"",Vu);return e._reactRootContainer=a,e[Nt]=a.current,ar(e.nodeType===8?e.parentNode:e),un(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var c=r;r=function(){var y=Ls(f);c.call(y)}}var f=Ri(e,0,!1,null,null,!1,!1,"",Vu);return e._reactRootContainer=f,e[Nt]=f.current,ar(e.nodeType===8?e.parentNode:e),un(function(){Rs(t,f,n,r)}),f}function $s(e,t,n,r,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var c=s;s=function(){var f=Ls(a);c.call(f)}}Rs(t,a,e,s)}else a=yf(n,t,e,s,r);return Ls(a)}So=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=qn(t.pendingLanes);n!==0&&(sl(t,n|1),Ve(t,ye()),(J&6)===0&&(Fn=ye()+500,Wt()))}break;case 13:un(function(){var r=Et(e,1);if(r!==null){var s=Fe();pt(r,e,1,s)}}),Li(e,1)}},ll=function(e){if(e.tag===13){var t=Et(e,134217728);if(t!==null){var n=Fe();pt(t,e,134217728,n)}Li(e,134217728)}},Co=function(e){if(e.tag===13){var t=qt(e),n=Et(e,t);if(n!==null){var r=Fe();pt(n,e,t,r)}Li(e,t)}},To=function(){return le},Eo=function(e,t){var n=le;try{return le=e,t()}finally{le=n}},bs=function(e,t,n){switch(t){case"input":if(Bs(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Jr(r);if(!s)throw Error(u(90));Xi(r),Bs(r,s)}}}break;case"textarea":to(e,n);break;case"select":t=n.value,t!=null&&hn(e,!!n.multiple,t,!1)}},co=Ci,fo=un;var xf={usingClientEntryPoint:!1,Events:[dr,Sn,Jr,ao,uo,Ci]},Cr={findFiberByHostInstance:en,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wf={bundleType:Cr.bundleType,version:Cr.version,rendererPackageName:Cr.rendererPackageName,rendererConfig:Cr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ce.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=go(e),e===null?null:e.stateNode},findFiberByHostInstance:Cr.findFiberByHostInstance||vf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Is.isDisabled&&Is.supportsFiber)try{Or=Is.inject(wf),vt=Is}catch{}}return Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xf,Qe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Mi(t))throw Error(u(200));return gf(e,t,null,n)},Qe.createRoot=function(e,t){if(!Mi(e))throw Error(u(299));var n=!1,r="",s=Bu;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ri(e,1,!1,null,null,n,!1,r,s),e[Nt]=t.current,ar(e.nodeType===8?e.parentNode:e),new Oi(t)},Qe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=go(t),e=e===null?null:e.stateNode,e},Qe.flushSync=function(e){return un(e)},Qe.hydrate=function(e,t,n){if(!Ms(t))throw Error(u(200));return $s(null,e,t,!0,n)},Qe.hydrateRoot=function(e,t,n){if(!Mi(e))throw Error(u(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=Bu;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Wu(t,null,e,1,n??null,s,!1,i,a),e[Nt]=t.current,ar(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Os(t)},Qe.render=function(e,t,n){if(!Ms(t))throw Error(u(200));return $s(null,e,t,!1,n)},Qe.unmountComponentAtNode=function(e){if(!Ms(e))throw Error(u(40));return e._reactRootContainer?(un(function(){$s(null,null,e,!1,function(){e._reactRootContainer=null,e[Nt]=null})}),!0):!1},Qe.unstable_batchedUpdates=Ci,Qe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ms(n))throw Error(u(200));if(e==null||e._reactInternals===void 0)throw Error(u(38));return $s(e,t,n,!1,r)},Qe.version="18.3.1-next-f1338f8080-20240426",Qe}var Zu;function Pf(){if(Zu)return Fi.exports;Zu=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(d){console.error(d)}}return o(),Fi.exports=zf(),Fi.exports}var ec;function Rf(){if(ec)return Fs;ec=1;var o=Pf();return Fs.createRoot=o.createRoot,Fs.hydrateRoot=o.hydrateRoot,Fs}var Lf=Rf();const Of=gc(Lf);/**
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function li(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ii(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var bd=typeof WeakMap=="function"?WeakMap:Map;function eu(e,t,n){n=_t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ns||(Ns=!0,ki=r),ii(e,t)},n}function tu(e,t,n){n=_t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){ii(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ii(e,t),typeof r!="function"&&(Qt===null?Qt=new Set([this]):Qt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function nu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new bd;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=cf.bind(null,e,t,n),t.then(e,e))}function ru(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function su(e,t,n,r,s){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_t(-1,1),t.tag=2,Bt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=s,e)}var Gd=ce.ReactCurrentOwner,Ue=!1;function Ie(e,t,n,r){t.child=e===null?Sa(t,null,n,r):Pn(t,e.child,n,r)}function lu(e,t,n,r,s){n=n.render;var i=t.ref;return Ln(t,s),r=Xl(e,t,n,r,i,s),n=Jl(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zt(e,t,s)):(fe&&n&&Ml(t),t.flags|=1,Ie(e,t,r,s),t.child)}function iu(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!_i(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ou(e,t,i,r,s)):(e=zs(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&s)===0){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:lr,n(a,r)&&e.ref===t.ref)return zt(e,t,s)}return t.flags|=1,e=bt(i,r),e.ref=t.ref,e.return=t,t.child=e}function ou(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(lr(i,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=i,(e.lanes&s)!==0)(e.flags&131072)!==0&&(Ue=!0);else return t.lanes=e.lanes,zt(e,t,s)}return oi(e,t,n,r,s)}function au(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(In,Je),Je|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(In,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,oe(In,Je),Je|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,oe(In,Je),Je|=r;return Ie(e,t,s,n),t.child}function uu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function oi(e,t,n,r,s){var i=We(n)?tn:Le.current;return i=Tn(t,i),Ln(t,s),n=Xl(e,t,n,r,i,s),r=Jl(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zt(e,t,s)):(fe&&r&&Ml(t),t.flags|=1,Ie(e,t,n,s),t.child)}function cu(e,t,n,r,s){if(We(n)){var i=!0;es(t)}else i=!1;if(Ln(t,s),t.stateNode===null)ys(e,t),Ja(t,n,r),si(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,c=t.memoizedProps;a.props=c;var f=a.context,y=n.contextType;typeof y=="object"&&y!==null?y=nt(y):(y=We(n)?tn:Le.current,y=Tn(t,y));var N=n.getDerivedStateFromProps,C=typeof N=="function"||typeof a.getSnapshotBeforeUpdate=="function";C||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==r||f!==y)&&Za(t,a,r,y),Ut=!1;var k=t.memoizedState;a.state=k,us(t,r,a,s),f=t.memoizedState,c!==r||k!==f||He.current||Ut?(typeof N=="function"&&(ri(t,n,N,r),f=t.memoizedState),(c=Ut||Xa(t,n,c,r,k,f,y))?(C||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=y,r=c):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ta(e,t),c=t.memoizedProps,y=t.type===t.elementType?c:ct(t.type,c),a.props=y,C=t.pendingProps,k=a.context,f=n.contextType,typeof f=="object"&&f!==null?f=nt(f):(f=We(n)?tn:Le.current,f=Tn(t,f));var P=n.getDerivedStateFromProps;(N=typeof P=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==C||k!==f)&&Za(t,a,r,f),Ut=!1,k=t.memoizedState,a.state=k,us(t,r,a,s);var O=t.memoizedState;c!==C||k!==O||He.current||Ut?(typeof P=="function"&&(ri(t,n,P,r),O=t.memoizedState),(y=Ut||Xa(t,n,y,r,k,O,f)||!1)?(N||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,O,f),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,O,f)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=O),a.props=r,a.state=O,a.context=f,r=y):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),r=!1)}return ai(e,t,n,r,i,s)}function ai(e,t,n,r,s,i){uu(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&ma(t,n,!1),zt(e,t,i);r=t.stateNode,Gd.current=t;var c=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Pn(t,e.child,null,i),t.child=Pn(t,null,c,i)):Ie(e,t,c,i),t.memoizedState=r.state,s&&ma(t,n,!0),t.child}function du(e){var t=e.stateNode;t.pendingContext?pa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&pa(e,t.context,!1),Ql(e,t.containerInfo)}function fu(e,t,n,r,s){return zn(),Dl(s),t.flags|=256,Ie(e,t,n,r),t.child}var ui={dehydrated:null,treeContext:null,retryLane:0};function ci(e){return{baseLanes:e,cachePool:null,transitions:null}}function pu(e,t,n){var r=t.pendingProps,s=pe.current,i=!1,a=(t.flags&128)!==0,c;if((c=a)||(c=e!==null&&e.memoizedState===null?!1:(s&2)!==0),c?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),oe(pe,s&1),e===null)return Fl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Ps(a,r,0,null),e=fn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ci(n),t.memoizedState=ui,e):di(t,a));if(s=e.memoizedState,s!==null&&(c=s.dehydrated,c!==null))return Xd(e,t,a,r,c,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,c=s.sibling;var f={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=bt(s,f),r.subtreeFlags=s.subtreeFlags&14680064),c!==null?i=bt(c,i):(i=fn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ci(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=ui,r}return i=e.child,e=i.sibling,r=bt(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function di(e,t){return t=Ps({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vs(e,t,n,r){return r!==null&&Dl(r),Pn(t,e.child,null,n),e=di(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xd(e,t,n,r,s,i,a){if(n)return t.flags&256?(t.flags&=-257,r=li(Error(u(422))),vs(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Ps({mode:"visible",children:r.children},s,0,null),i=fn(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Pn(t,e.child,null,a),t.child.memoizedState=ci(a),t.memoizedState=ui,i);if((t.mode&1)===0)return vs(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var c=r.dgst;return r=c,i=Error(u(419)),r=li(i,r,void 0),vs(e,t,a,r)}if(c=(a&e.childLanes)!==0,Ue||c){if(r=Ce,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=(s&(r.suspendedLanes|a))!==0?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Et(e,s),pt(r,e,s,-1))}return Ei(),r=li(Error(u(421))),vs(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=df.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Xe=Dt(s.nextSibling),Ge=t,fe=!0,ut=null,e!==null&&(et[tt++]=Ct,et[tt++]=Tt,et[tt++]=nn,Ct=e.id,Tt=e.overflow,nn=t),t=di(t,r.children),t.flags|=4096,t)}function hu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ul(e.return,t,n)}function fi(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function mu(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ie(e,t,r.children,n),r=pe.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hu(e,n,t);else if(e.tag===19)hu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(pe,r),(t.mode&1)===0)t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&cs(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),fi(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&cs(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}fi(t,!0,n,null,i);break;case"together":fi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ys(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),an|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Jd(e,t,n){switch(t.tag){case 3:du(t),zn();break;case 5:za(t);break;case 1:We(t.type)&&es(t);break;case 4:Ql(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;oe(is,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(pe,pe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?pu(e,t,n):(oe(pe,pe.current&1),e=zt(e,t,n),e!==null?e.sibling:null);oe(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return mu(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),oe(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,au(e,t,n)}return zt(e,t,n)}var gu,pi,vu,yu;gu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},pi=function(){},vu=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ln(xt.current);var i=null;switch(n){case"input":s=Us(e,s),r=Us(e,r),i=[];break;case"select":s=L({},s,{value:void 0}),r=L({},r,{value:void 0}),i=[];break;case"textarea":s=Qs(e,s),r=Qs(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xr)}qs(n,r);var a;n=null;for(y in s)if(!r.hasOwnProperty(y)&&s.hasOwnProperty(y)&&s[y]!=null)if(y==="style"){var c=s[y];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else y!=="dangerouslySetInnerHTML"&&y!=="children"&&y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(x.hasOwnProperty(y)?i||(i=[]):(i=i||[]).push(y,null));for(y in r){var f=r[y];if(c=s!=null?s[y]:void 0,r.hasOwnProperty(y)&&f!==c&&(f!=null||c!=null))if(y==="style")if(c){for(a in c)!c.hasOwnProperty(a)||f&&f.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in f)f.hasOwnProperty(a)&&c[a]!==f[a]&&(n||(n={}),n[a]=f[a])}else n||(i||(i=[]),i.push(y,n)),n=f;else y==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,c=c?c.__html:void 0,f!=null&&c!==f&&(i=i||[]).push(y,f)):y==="children"?typeof f!="string"&&typeof f!="number"||(i=i||[]).push(y,""+f):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&(x.hasOwnProperty(y)?(f!=null&&y==="onScroll"&&ae("scroll",e),i||c===f||(i=[])):(i=i||[]).push(y,f))}n&&(i=i||[]).push("style",n);var y=i;(t.updateQueue=y)&&(t.flags|=4)}},yu=function(e,t,n,r){n!==r&&(t.flags|=4)};function wr(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zd(e,t,n){var r=t.pendingProps;switch($l(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return We(t.type)&&Zr(),Me(t),null;case 3:return r=t.stateNode,On(),ue(He),ue(Le),Yl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ss(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ut!==null&&(Si(ut),ut=null))),pi(e,t),Me(t),null;case 5:Kl(t);var s=ln(mr.current);if(n=t.type,e!==null&&t.stateNode!=null)vu(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(u(166));return Me(t),null}if(e=ln(xt.current),ss(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[yt]=t,r[cr]=i,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(s=0;s<or.length;s++)ae(or[s],r);break;case"source":ae("error",r);break;case"img":case"image":case"link":ae("error",r),ae("load",r);break;case"details":ae("toggle",r);break;case"input":Xi(r,i),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ae("invalid",r);break;case"textarea":eo(r,i),ae("invalid",r)}qs(n,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var c=i[a];a==="children"?typeof c=="string"?r.textContent!==c&&(i.suppressHydrationWarning!==!0&&Gr(r.textContent,c,e),s=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(i.suppressHydrationWarning!==!0&&Gr(r.textContent,c,e),s=["children",""+c]):x.hasOwnProperty(a)&&c!=null&&a==="onScroll"&&ae("scroll",r)}switch(n){case"input":Er(r),Zi(r,i,!0);break;case"textarea":Er(r),no(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Xr)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ro(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[yt]=t,e[cr]=r,gu(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ys(n,r),n){case"dialog":ae("cancel",e),ae("close",e),s=r;break;case"iframe":case"object":case"embed":ae("load",e),s=r;break;case"video":case"audio":for(s=0;s<or.length;s++)ae(or[s],e);s=r;break;case"source":ae("error",e),s=r;break;case"img":case"image":case"link":ae("error",e),ae("load",e),s=r;break;case"details":ae("toggle",e),s=r;break;case"input":Xi(e,r),s=Us(e,r),ae("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=L({},r,{value:void 0}),ae("invalid",e);break;case"textarea":eo(e,r),s=Qs(e,r),ae("invalid",e);break;default:s=r}qs(n,s),c=s;for(i in c)if(c.hasOwnProperty(i)){var f=c[i];i==="style"?io(e,f):i==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&so(e,f)):i==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&Un(e,f):typeof f=="number"&&Un(e,""+f):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(x.hasOwnProperty(i)?f!=null&&i==="onScroll"&&ae("scroll",e):f!=null&&ve(e,i,f,a))}switch(n){case"input":Er(e),Zi(e,r,!1);break;case"textarea":Er(e),no(e);break;case"option":r.value!=null&&e.setAttribute("value",""+se(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?hn(e,!!r.multiple,i,!1):r.defaultValue!=null&&hn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Me(t),null;case 6:if(e&&t.stateNode!=null)yu(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(n=ln(mr.current),ln(xt.current),ss(t)){if(r=t.stateNode,n=t.memoizedProps,r[yt]=t,(i=r.nodeValue!==n)&&(e=Ge,e!==null))switch(e.tag){case 3:Gr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Gr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yt]=t,t.stateNode=r}return Me(t),null;case 13:if(ue(pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&Xe!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ka(),zn(),t.flags|=98560,i=!1;else if(i=ss(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[yt]=t}else zn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Me(t),i=!1}else ut!==null&&(Si(ut),ut=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(pe.current&1)!==0?Ne===0&&(Ne=3):Ei())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return On(),pi(e,t),e===null&&ar(t.stateNode.containerInfo),Me(t),null;case 10:return Wl(t.type._context),Me(t),null;case 17:return We(t.type)&&Zr(),Me(t),null;case 19:if(ue(pe),i=t.memoizedState,i===null)return Me(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)wr(i,!1);else{if(Ne!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=cs(e),a!==null){for(t.flags|=128,wr(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oe(pe,pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>Fn&&(t.flags|=128,r=!0,wr(i,!1),t.lanes=4194304)}else{if(!r)if(e=cs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!fe)return Me(t),null}else 2*ye()-i.renderingStartTime>Fn&&n!==1073741824&&(t.flags|=128,r=!0,wr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ye(),t.sibling=null,n=pe.current,oe(pe,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return Ti(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Je&1073741824)!==0&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function ef(e,t){switch($l(t),t.tag){case 1:return We(t.type)&&Zr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return On(),ue(He),ue(Le),Yl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Kl(t),null;case 13:if(ue(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(pe),null;case 4:return On(),null;case 10:return Wl(t.type._context),null;case 22:case 23:return Ti(),null;case 24:return null;default:return null}}var xs=!1,$e=!1,tf=typeof WeakSet=="function"?WeakSet:Set,R=null;function $n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function hi(e,t,n){try{n()}catch(r){ge(e,t,r)}}var xu=!1;function nf(e,t){if(Tl=Ar,e=Xo(),yl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,c=-1,f=-1,y=0,N=0,C=e,k=null;t:for(;;){for(var P;C!==n||s!==0&&C.nodeType!==3||(c=a+s),C!==i||r!==0&&C.nodeType!==3||(f=a+r),C.nodeType===3&&(a+=C.nodeValue.length),(P=C.firstChild)!==null;)k=C,C=P;for(;;){if(C===e)break t;if(k===n&&++y===s&&(c=a),k===i&&++N===r&&(f=a),(P=C.nextSibling)!==null)break;C=k,k=C.parentNode}C=P}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(El={focusedElem:e,selectionRange:n},Ar=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var O=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(O!==null){var M=O.memoizedProps,xe=O.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?M:ct(t.type,M),xe);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(T){ge(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return O=xu,xu=!1,O}function kr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&hi(t,n,i)}s=s.next}while(s!==r)}}function ws(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function mi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wu(e){var t=e.alternate;t!==null&&(e.alternate=null,wu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[cr],delete t[Rl],delete t[Dd],delete t[Ad])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ku(e){return e.tag===5||e.tag===3||e.tag===4}function ju(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ku(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.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 gi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xr));else if(r!==4&&(e=e.child,e!==null))for(gi(e,t,n),e=e.sibling;e!==null;)gi(e,t,n),e=e.sibling}function vi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(vi(e,t,n),e=e.sibling;e!==null;)vi(e,t,n),e=e.sibling}var _e=null,dt=!1;function Vt(e,t,n){for(n=n.child;n!==null;)Nu(e,t,n),n=n.sibling}function Nu(e,t,n){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Or,n)}catch{}switch(n.tag){case 5:$e||$n(n,t);case 6:var r=_e,s=dt;_e=null,Vt(e,t,n),_e=r,dt=s,_e!==null&&(dt?(e=_e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_e.removeChild(n.stateNode));break;case 18:_e!==null&&(dt?(e=_e,n=n.stateNode,e.nodeType===8?Pl(e.parentNode,n):e.nodeType===1&&Pl(e,n),Zn(e)):Pl(_e,n.stateNode));break;case 4:r=_e,s=dt,_e=n.stateNode.containerInfo,dt=!0,Vt(e,t,n),_e=r,dt=s;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&hi(n,t,a),s=s.next}while(s!==r)}Vt(e,t,n);break;case 1:if(!$e&&($n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){ge(n,t,c)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,Vt(e,t,n),$e=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function Su(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tf),t.forEach(function(r){var s=ff.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,a=t,c=a;e:for(;c!==null;){switch(c.tag){case 5:_e=c.stateNode,dt=!1;break e;case 3:_e=c.stateNode.containerInfo,dt=!0;break e;case 4:_e=c.stateNode.containerInfo,dt=!0;break e}c=c.return}if(_e===null)throw Error(u(160));Nu(i,a,s),_e=null,dt=!1;var f=s.alternate;f!==null&&(f.return=null),s.return=null}catch(y){ge(s,t,y)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Cu(t,e),t=t.sibling}function Cu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ft(t,e),kt(e),r&4){try{kr(3,e,e.return),ws(3,e)}catch(M){ge(e,e.return,M)}try{kr(5,e,e.return)}catch(M){ge(e,e.return,M)}}break;case 1:ft(t,e),kt(e),r&512&&n!==null&&$n(n,n.return);break;case 5:if(ft(t,e),kt(e),r&512&&n!==null&&$n(n,n.return),e.flags&32){var s=e.stateNode;try{Un(s,"")}catch(M){ge(e,e.return,M)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,c=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{c==="input"&&i.type==="radio"&&i.name!=null&&Ji(s,i),Ys(c,a);var y=Ys(c,i);for(a=0;a<f.length;a+=2){var N=f[a],C=f[a+1];N==="style"?io(s,C):N==="dangerouslySetInnerHTML"?so(s,C):N==="children"?Un(s,C):ve(s,N,C,y)}switch(c){case"input":Bs(s,i);break;case"textarea":to(s,i);break;case"select":var k=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var P=i.value;P!=null?hn(s,!!i.multiple,P,!1):k!==!!i.multiple&&(i.defaultValue!=null?hn(s,!!i.multiple,i.defaultValue,!0):hn(s,!!i.multiple,i.multiple?[]:"",!1))}s[cr]=i}catch(M){ge(e,e.return,M)}}break;case 6:if(ft(t,e),kt(e),r&4){if(e.stateNode===null)throw Error(u(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(M){ge(e,e.return,M)}}break;case 3:if(ft(t,e),kt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zn(t.containerInfo)}catch(M){ge(e,e.return,M)}break;case 4:ft(t,e),kt(e);break;case 13:ft(t,e),kt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(wi=ye())),r&4&&Su(e);break;case 22:if(N=n!==null&&n.memoizedState!==null,e.mode&1?($e=(y=$e)||N,ft(t,e),$e=y):ft(t,e),kt(e),r&8192){if(y=e.memoizedState!==null,(e.stateNode.isHidden=y)&&!N&&(e.mode&1)!==0)for(R=e,N=e.child;N!==null;){for(C=R=N;R!==null;){switch(k=R,P=k.child,k.tag){case 0:case 11:case 14:case 15:kr(4,k,k.return);break;case 1:$n(k,k.return);var O=k.stateNode;if(typeof O.componentWillUnmount=="function"){r=k,n=k.return;try{t=r,O.props=t.memoizedProps,O.state=t.memoizedState,O.componentWillUnmount()}catch(M){ge(r,n,M)}}break;case 5:$n(k,k.return);break;case 22:if(k.memoizedState!==null){_u(C);continue}}P!==null?(P.return=k,R=P):_u(C)}N=N.sibling}e:for(N=null,C=e;;){if(C.tag===5){if(N===null){N=C;try{s=C.stateNode,y?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(c=C.stateNode,f=C.memoizedProps.style,a=f!=null&&f.hasOwnProperty("display")?f.display:null,c.style.display=lo("display",a))}catch(M){ge(e,e.return,M)}}}else if(C.tag===6){if(N===null)try{C.stateNode.nodeValue=y?"":C.memoizedProps}catch(M){ge(e,e.return,M)}}else if((C.tag!==22&&C.tag!==23||C.memoizedState===null||C===e)&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===e)break e;for(;C.sibling===null;){if(C.return===null||C.return===e)break e;N===C&&(N=null),C=C.return}N===C&&(N=null),C.sibling.return=C.return,C=C.sibling}}break;case 19:ft(t,e),kt(e),r&4&&Su(e);break;case 21:break;default:ft(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ku(n)){var r=n;break e}n=n.return}throw Error(u(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Un(s,""),r.flags&=-33);var i=ju(e);vi(e,i,s);break;case 3:case 4:var a=r.stateNode.containerInfo,c=ju(e);gi(e,c,a);break;default:throw Error(u(161))}}catch(f){ge(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rf(e,t,n){R=e,Tu(e)}function Tu(e,t,n){for(var r=(e.mode&1)!==0;R!==null;){var s=R,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||xs;if(!a){var c=s.alternate,f=c!==null&&c.memoizedState!==null||$e;c=xs;var y=$e;if(xs=a,($e=f)&&!y)for(R=s;R!==null;)a=R,f=a.child,a.tag===22&&a.memoizedState!==null?zu(s):f!==null?(f.return=a,R=f):zu(s);for(;i!==null;)R=i,Tu(i),i=i.sibling;R=s,xs=c,$e=y}Eu(e)}else(s.subtreeFlags&8772)!==0&&i!==null?(i.return=s,R=i):Eu(e)}}function Eu(e){for(;R!==null;){var t=R;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:$e||ws(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!$e)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ct(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&_a(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}_a(t,a,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var y=t.alternate;if(y!==null){var N=y.memoizedState;if(N!==null){var C=N.dehydrated;C!==null&&Zn(C)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}$e||t.flags&512&&mi(t)}catch(k){ge(t,t.return,k)}}if(t===e){R=null;break}if(n=t.sibling,n!==null){n.return=t.return,R=n;break}R=t.return}}function _u(e){for(;R!==null;){var t=R;if(t===e){R=null;break}var n=t.sibling;if(n!==null){n.return=t.return,R=n;break}R=t.return}}function zu(e){for(;R!==null;){var t=R;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ws(4,t)}catch(f){ge(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(f){ge(t,s,f)}}var i=t.return;try{mi(t)}catch(f){ge(t,i,f)}break;case 5:var a=t.return;try{mi(t)}catch(f){ge(t,a,f)}}}catch(f){ge(t,t.return,f)}if(t===e){R=null;break}var c=t.sibling;if(c!==null){c.return=t.return,R=c;break}R=t.return}}var sf=Math.ceil,ks=ce.ReactCurrentDispatcher,yi=ce.ReactCurrentOwner,st=ce.ReactCurrentBatchConfig,J=0,Ce=null,ke=null,ze=0,Je=0,In=At(0),Ne=0,jr=null,an=0,js=0,xi=0,Nr=null,Be=null,wi=0,Fn=1/0,Pt=null,Ns=!1,ki=null,Qt=null,Ss=!1,Kt=null,Cs=0,Sr=0,ji=null,Ts=-1,Es=0;function Fe(){return(J&6)!==0?ye():Ts!==-1?Ts:Ts=ye()}function qt(e){return(e.mode&1)===0?1:(J&2)!==0&&ze!==0?ze&-ze:Wd.transition!==null?(Es===0&&(Es=jo()),Es):(e=le,e!==0||(e=window.event,e=e===void 0?16:Ro(e.type)),e)}function pt(e,t,n,r){if(50<Sr)throw Sr=0,ji=null,Error(u(185));Yn(e,n,r),((J&2)===0||e!==Ce)&&(e===Ce&&((J&2)===0&&(js|=n),Ne===4&&Yt(e,ze)),Ve(e,r),n===1&&J===0&&(t.mode&1)===0&&(Fn=ye()+500,ts&&Wt()))}function Ve(e,t){var n=e.callbackNode;Wc(e,t);var r=Ir(e,e===Ce?ze:0);if(r===0)n!==null&&xo(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&xo(n),t===1)e.tag===0?Hd(Ru.bind(null,e)):ga(Ru.bind(null,e)),Id(function(){(J&6)===0&&Wt()}),n=null;else{switch(No(r)){case 1:n=tl;break;case 4:n=wo;break;case 16:n=Lr;break;case 536870912:n=ko;break;default:n=Lr}n=Au(n,Pu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Pu(e,t){if(Ts=-1,Es=0,(J&6)!==0)throw Error(u(327));var n=e.callbackNode;if(Dn()&&e.callbackNode!==n)return null;var r=Ir(e,e===Ce?ze:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=_s(e,r);else{t=r;var s=J;J|=2;var i=Ou();(Ce!==e||ze!==t)&&(Pt=null,Fn=ye()+500,cn(e,t));do try{af();break}catch(c){Lu(e,c)}while(!0);Hl(),ks.current=i,J=s,ke!==null?t=0:(Ce=null,ze=0,t=Ne)}if(t!==0){if(t===2&&(s=nl(e),s!==0&&(r=s,t=Ni(e,s))),t===1)throw n=jr,cn(e,0),Yt(e,r),Ve(e,ye()),n;if(t===6)Yt(e,r);else{if(s=e.current.alternate,(r&30)===0&&!lf(s)&&(t=_s(e,r),t===2&&(i=nl(e),i!==0&&(r=i,t=Ni(e,i))),t===1))throw n=jr,cn(e,0),Yt(e,r),Ve(e,ye()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(u(345));case 2:dn(e,Be,Pt);break;case 3:if(Yt(e,r),(r&130023424)===r&&(t=wi+500-ye(),10<t)){if(Ir(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=zl(dn.bind(null,e,Be,Pt),t);break}dn(e,Be,Pt);break;case 4:if(Yt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-ot(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sf(r/1960))-r,10<r){e.timeoutHandle=zl(dn.bind(null,e,Be,Pt),r);break}dn(e,Be,Pt);break;case 5:dn(e,Be,Pt);break;default:throw Error(u(329))}}}return Ve(e,ye()),e.callbackNode===n?Pu.bind(null,e):null}function Ni(e,t){var n=Nr;return e.current.memoizedState.isDehydrated&&(cn(e,t).flags|=256),e=_s(e,t),e!==2&&(t=Be,Be=n,t!==null&&Si(t)),e}function Si(e){Be===null?Be=e:Be.push.apply(Be,e)}function lf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!at(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yt(e,t){for(t&=~xi,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function Ru(e){if((J&6)!==0)throw Error(u(327));Dn();var t=Ir(e,0);if((t&1)===0)return Ve(e,ye()),null;var n=_s(e,t);if(e.tag!==0&&n===2){var r=nl(e);r!==0&&(t=r,n=Ni(e,r))}if(n===1)throw n=jr,cn(e,0),Yt(e,t),Ve(e,ye()),n;if(n===6)throw Error(u(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,dn(e,Be,Pt),Ve(e,ye()),null}function Ci(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(Fn=ye()+500,ts&&Wt())}}function un(e){Kt!==null&&Kt.tag===0&&(J&6)===0&&Dn();var t=J;J|=1;var n=st.transition,r=le;try{if(st.transition=null,le=1,e)return e()}finally{le=r,st.transition=n,J=t,(J&6)===0&&Wt()}}function Ti(){Je=In.current,ue(In)}function cn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,$d(n)),ke!==null)for(n=ke.return;n!==null;){var r=n;switch($l(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zr();break;case 3:On(),ue(He),ue(Le),Yl();break;case 5:Kl(r);break;case 4:On();break;case 13:ue(pe);break;case 19:ue(pe);break;case 10:Wl(r.type._context);break;case 22:case 23:Ti()}n=n.return}if(Ce=e,ke=e=bt(e.current,null),ze=Je=t,Ne=0,jr=null,xi=js=an=0,Be=Nr=null,sn!==null){for(t=0;t<sn.length;t++)if(n=sn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}sn=null}return e}function Lu(e,t){do{var n=ke;try{if(Hl(),ds.current=ms,fs){for(var r=he.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}fs=!1}if(on=0,Se=je=he=null,gr=!1,vr=0,yi.current=null,n===null||n.return===null){Ne=1,jr=t,ke=null;break}e:{var i=e,a=n.return,c=n,f=t;if(t=ze,c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var y=f,N=c,C=N.tag;if((N.mode&1)===0&&(C===0||C===11||C===15)){var k=N.alternate;k?(N.updateQueue=k.updateQueue,N.memoizedState=k.memoizedState,N.lanes=k.lanes):(N.updateQueue=null,N.memoizedState=null)}var P=ru(a);if(P!==null){P.flags&=-257,su(P,a,c,i,t),P.mode&1&&nu(i,y,t),t=P,f=y;var O=t.updateQueue;if(O===null){var M=new Set;M.add(f),t.updateQueue=M}else O.add(f);break e}else{if((t&1)===0){nu(i,y,t),Ei();break e}f=Error(u(426))}}else if(fe&&c.mode&1){var xe=ru(a);if(xe!==null){(xe.flags&65536)===0&&(xe.flags|=256),su(xe,a,c,i,t),Dl(Mn(f,c));break e}}i=f=Mn(f,c),Ne!==4&&(Ne=2),Nr===null?Nr=[i]:Nr.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=eu(i,f,t);Ea(i,g);break e;case 1:c=f;var p=i.type,v=i.stateNode;if((i.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Qt===null||!Qt.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var T=tu(i,c,t);Ea(i,T);break e}}i=i.return}while(i!==null)}$u(n)}catch($){t=$,ke===n&&n!==null&&(ke=n=n.return);continue}break}while(!0)}function Ou(){var e=ks.current;return ks.current=ms,e===null?ms:e}function Ei(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ce===null||(an&268435455)===0&&(js&268435455)===0||Yt(Ce,ze)}function _s(e,t){var n=J;J|=2;var r=Ou();(Ce!==e||ze!==t)&&(Pt=null,cn(e,t));do try{of();break}catch(s){Lu(e,s)}while(!0);if(Hl(),J=n,ks.current=r,ke!==null)throw Error(u(261));return Ce=null,ze=0,Ne}function of(){for(;ke!==null;)Mu(ke)}function af(){for(;ke!==null&&!Lc();)Mu(ke)}function Mu(e){var t=Du(e.alternate,e,Je);e.memoizedProps=e.pendingProps,t===null?$u(e):ke=t,yi.current=null}function $u(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Zd(n,t,Je),n!==null){ke=n;return}}else{if(n=ef(n,t),n!==null){n.flags&=32767,ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,ke=null;return}}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Ne===0&&(Ne=5)}function dn(e,t,n){var r=le,s=st.transition;try{st.transition=null,le=1,uf(e,t,n,r)}finally{st.transition=s,le=r}return null}function uf(e,t,n,r){do Dn();while(Kt!==null);if((J&6)!==0)throw Error(u(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Uc(e,i),e===Ce&&(ke=Ce=null,ze=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ss||(Ss=!0,Au(Lr,function(){return Dn(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=st.transition,st.transition=null;var a=le;le=1;var c=J;J|=4,yi.current=null,nf(e,n),Cu(n,e),_d(El),Ar=!!Tl,El=Tl=null,e.current=n,rf(n),Oc(),J=c,le=a,st.transition=i}else e.current=n;if(Ss&&(Ss=!1,Kt=e,Cs=s),i=e.pendingLanes,i===0&&(Qt=null),Ic(n.stateNode),Ve(e,ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ns)throw Ns=!1,e=ki,ki=null,e;return(Cs&1)!==0&&e.tag!==0&&Dn(),i=e.pendingLanes,(i&1)!==0?e===ji?Sr++:(Sr=0,ji=e):Sr=0,Wt(),null}function Dn(){if(Kt!==null){var e=No(Cs),t=st.transition,n=le;try{if(st.transition=null,le=16>e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,Cs=0,(J&6)!==0)throw Error(u(331));var s=J;for(J|=4,R=e.current;R!==null;){var i=R,a=i.child;if((R.flags&16)!==0){var c=i.deletions;if(c!==null){for(var f=0;f<c.length;f++){var y=c[f];for(R=y;R!==null;){var N=R;switch(N.tag){case 0:case 11:case 15:kr(8,N,i)}var C=N.child;if(C!==null)C.return=N,R=C;else for(;R!==null;){N=R;var k=N.sibling,P=N.return;if(wu(N),N===y){R=null;break}if(k!==null){k.return=P,R=k;break}R=P}}}var O=i.alternate;if(O!==null){var M=O.child;if(M!==null){O.child=null;do{var xe=M.sibling;M.sibling=null,M=xe}while(M!==null)}}R=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,R=a;else e:for(;R!==null;){if(i=R,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:kr(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,R=g;break e}R=i.return}}var p=e.current;for(R=p;R!==null;){a=R;var v=a.child;if((a.subtreeFlags&2064)!==0&&v!==null)v.return=a,R=v;else e:for(a=p;R!==null;){if(c=R,(c.flags&2048)!==0)try{switch(c.tag){case 0:case 11:case 15:ws(9,c)}}catch($){ge(c,c.return,$)}if(c===a){R=null;break e}var T=c.sibling;if(T!==null){T.return=c.return,R=T;break e}R=c.return}}if(J=s,Wt(),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Or,e)}catch{}r=!0}return r}finally{le=n,st.transition=t}}return!1}function Iu(e,t,n){t=Mn(n,t),t=eu(e,t,1),e=Bt(e,t,1),t=Fe(),e!==null&&(Yn(e,1,t),Ve(e,t))}function ge(e,t,n){if(e.tag===3)Iu(e,e,n);else for(;t!==null;){if(t.tag===3){Iu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qt===null||!Qt.has(r))){e=Mn(n,e),e=tu(t,e,1),t=Bt(t,e,1),e=Fe(),t!==null&&(Yn(t,1,e),Ve(t,e));break}}t=t.return}}function cf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(ze&n)===n&&(Ne===4||Ne===3&&(ze&130023424)===ze&&500>ye()-wi?cn(e,0):xi|=n),Ve(e,t)}function Fu(e,t){t===0&&((e.mode&1)===0?t=1:(t=$r,$r<<=1,($r&130023424)===0&&($r=4194304)));var n=Fe();e=Et(e,t),e!==null&&(Yn(e,t,n),Ve(e,n))}function df(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fu(e,n)}function ff(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),Fu(e,n)}var Du;Du=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)Ue=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ue=!1,Jd(e,t,n);Ue=(e.flags&131072)!==0}else Ue=!1,fe&&(t.flags&1048576)!==0&&va(t,rs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ys(e,t),e=t.pendingProps;var s=Tn(t,Le.current);Ln(t,n),s=Xl(null,t,r,e,s,n);var i=Jl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(r)?(i=!0,es(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Vl(t),s.updater=gs,t.stateNode=s,s._reactInternals=t,si(t,r,e,n),t=ai(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&Ml(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ys(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=hf(r),e=ct(r,e),s){case 0:t=oi(null,t,r,e,n);break e;case 1:t=cu(null,t,r,e,n);break e;case 11:t=lu(null,t,r,e,n);break e;case 14:t=iu(null,t,r,ct(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),oi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),cu(e,t,r,s,n);case 3:e:{if(du(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Ta(e,t),us(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Mn(Error(u(423)),t),t=fu(e,t,r,n,s);break e}else if(r!==s){s=Mn(Error(u(424)),t),t=fu(e,t,r,n,s);break e}else for(Xe=Dt(t.stateNode.containerInfo.firstChild),Ge=t,fe=!0,ut=null,n=Sa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zn(),r===s){t=zt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return za(t),e===null&&Fl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,_l(r,s)?a=null:i!==null&&_l(r,i)&&(t.flags|=32),uu(e,t),Ie(e,t,a,n),t.child;case 6:return e===null&&Fl(t),null;case 13:return pu(e,t,n);case 4:return Ql(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pn(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),lu(e,t,r,s,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,oe(is,r._currentValue),r._currentValue=a,i!==null)if(at(i.value,a)){if(i.children===s.children&&!He.current){t=zt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){a=i.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=_t(-1,n&-n),f.tag=2;var y=i.updateQueue;if(y!==null){y=y.shared;var N=y.pending;N===null?f.next=f:(f.next=N.next,N.next=f),y.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),Ul(i.return,n,t),c.lanes|=n;break}f=f.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(u(341));a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Ul(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ie(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ln(t,n),s=nt(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=ct(r,t.pendingProps),s=ct(r.type,s),iu(e,t,r,s,n);case 15:return ou(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ct(r,s),ys(e,t),t.tag=1,We(r)?(e=!0,es(t)):e=!1,Ln(t,n),Ja(t,r,s),si(t,r,s,n),ai(null,t,r,!0,e,n);case 19:return mu(e,t,n);case 22:return au(e,t,n)}throw Error(u(156,t.tag))};function Au(e,t){return yo(e,t)}function pf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lt(e,t,n,r){return new pf(e,t,n,r)}function _i(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hf(e){if(typeof e=="function")return _i(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mt)return 11;if(e===gt)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=lt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zs(e,t,n,r,s,i){var a=2;if(r=e,typeof e=="function")_i(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case De:return fn(n.children,s,i,t);case Ze:a=8,s|=8;break;case Rt:return e=lt(12,n,t,s|2),e.elementType=Rt,e.lanes=i,e;case qe:return e=lt(13,n,t,s),e.elementType=qe,e.lanes=i,e;case it:return e=lt(19,n,t,s),e.elementType=it,e.lanes=i,e;case me:return Ps(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jt:a=10;break e;case Jt:a=9;break e;case mt:a=11;break e;case gt:a=14;break e;case Ae:a=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=lt(a,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function fn(e,t,n,r){return e=lt(7,e,r,t),e.lanes=n,e}function Ps(e,t,n,r){return e=lt(22,e,r,t),e.elementType=me,e.lanes=n,e.stateNode={isHidden:!1},e}function zi(e,t,n){return e=lt(6,e,null,t),e.lanes=n,e}function Pi(e,t,n){return t=lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mf(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=rl(0),this.expirationTimes=rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ri(e,t,n,r,s,i,a,c,f){return e=new mf(e,t,n,c,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=lt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vl(i),e}function gf(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ee,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hu(e){if(!e)return Ht;e=e._reactInternals;e:{if(Zt(e)!==e||e.tag!==1)throw Error(u(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(u(171))}if(e.tag===1){var n=e.type;if(We(n))return ha(e,n,t)}return t}function Wu(e,t,n,r,s,i,a,c,f){return e=Ri(n,r,!0,e,s,i,a,c,f),e.context=Hu(null),n=e.current,r=Fe(),s=qt(n),i=_t(r,s),i.callback=t??null,Bt(n,i,s),e.current.lanes=s,Yn(e,s,r),Ve(e,r),e}function Rs(e,t,n,r){var s=t.current,i=Fe(),a=qt(s);return n=Hu(n),t.context===null?t.context=n:t.pendingContext=n,t=_t(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Bt(s,t,a),e!==null&&(pt(e,s,a,i),as(e,s,a)),a}function Ls(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Uu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Li(e,t){Uu(e,t),(e=e.alternate)&&Uu(e,t)}function vf(){return null}var Bu=typeof reportError=="function"?reportError:function(e){console.error(e)};function Oi(e){this._internalRoot=e}Os.prototype.render=Oi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));Rs(e,t,null,null)},Os.prototype.unmount=Oi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;un(function(){Rs(null,e,null,null)}),t[Nt]=null}};function Os(e){this._internalRoot=e}Os.prototype.unstable_scheduleHydration=function(e){if(e){var t=To();e={blockedOn:null,target:e,priority:t};for(var n=0;n<$t.length&&t!==0&&t<$t[n].priority;n++);$t.splice(n,0,e),n===0&&zo(e)}};function Mi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ms(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Vu(){}function yf(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var y=Ls(a);i.call(y)}}var a=Wu(t,r,e,0,null,!1,!1,"",Vu);return e._reactRootContainer=a,e[Nt]=a.current,ar(e.nodeType===8?e.parentNode:e),un(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var c=r;r=function(){var y=Ls(f);c.call(y)}}var f=Ri(e,0,!1,null,null,!1,!1,"",Vu);return e._reactRootContainer=f,e[Nt]=f.current,ar(e.nodeType===8?e.parentNode:e),un(function(){Rs(t,f,n,r)}),f}function $s(e,t,n,r,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var c=s;s=function(){var f=Ls(a);c.call(f)}}Rs(t,a,e,s)}else a=yf(n,t,e,s,r);return Ls(a)}So=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=qn(t.pendingLanes);n!==0&&(sl(t,n|1),Ve(t,ye()),(J&6)===0&&(Fn=ye()+500,Wt()))}break;case 13:un(function(){var r=Et(e,1);if(r!==null){var s=Fe();pt(r,e,1,s)}}),Li(e,1)}},ll=function(e){if(e.tag===13){var t=Et(e,134217728);if(t!==null){var n=Fe();pt(t,e,134217728,n)}Li(e,134217728)}},Co=function(e){if(e.tag===13){var t=qt(e),n=Et(e,t);if(n!==null){var r=Fe();pt(n,e,t,r)}Li(e,t)}},To=function(){return le},Eo=function(e,t){var n=le;try{return le=e,t()}finally{le=n}},Xs=function(e,t,n){switch(t){case"input":if(Bs(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Jr(r);if(!s)throw Error(u(90));Gi(r),Bs(r,s)}}}break;case"textarea":to(e,n);break;case"select":t=n.value,t!=null&&hn(e,!!n.multiple,t,!1)}},co=Ci,fo=un;var xf={usingClientEntryPoint:!1,Events:[dr,Sn,Jr,ao,uo,Ci]},Cr={findFiberByHostInstance:en,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wf={bundleType:Cr.bundleType,version:Cr.version,rendererPackageName:Cr.rendererPackageName,rendererConfig:Cr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ce.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=go(e),e===null?null:e.stateNode},findFiberByHostInstance:Cr.findFiberByHostInstance||vf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Is.isDisabled&&Is.supportsFiber)try{Or=Is.inject(wf),vt=Is}catch{}}return Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xf,Qe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Mi(t))throw Error(u(200));return gf(e,t,null,n)},Qe.createRoot=function(e,t){if(!Mi(e))throw Error(u(299));var n=!1,r="",s=Bu;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ri(e,1,!1,null,null,n,!1,r,s),e[Nt]=t.current,ar(e.nodeType===8?e.parentNode:e),new Oi(t)},Qe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=go(t),e=e===null?null:e.stateNode,e},Qe.flushSync=function(e){return un(e)},Qe.hydrate=function(e,t,n){if(!Ms(t))throw Error(u(200));return $s(null,e,t,!0,n)},Qe.hydrateRoot=function(e,t,n){if(!Mi(e))throw Error(u(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=Bu;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Wu(t,null,e,1,n??null,s,!1,i,a),e[Nt]=t.current,ar(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Os(t)},Qe.render=function(e,t,n){if(!Ms(t))throw Error(u(200));return $s(null,e,t,!1,n)},Qe.unmountComponentAtNode=function(e){if(!Ms(e))throw Error(u(40));return e._reactRootContainer?(un(function(){$s(null,null,e,!1,function(){e._reactRootContainer=null,e[Nt]=null})}),!0):!1},Qe.unstable_batchedUpdates=Ci,Qe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ms(n))throw Error(u(200));if(e==null||e._reactInternals===void 0)throw Error(u(38));return $s(e,t,n,!1,r)},Qe.version="18.3.1-next-f1338f8080-20240426",Qe}var Zu;function Pf(){if(Zu)return Fi.exports;Zu=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(d){console.error(d)}}return o(),Fi.exports=zf(),Fi.exports}var ec;function Rf(){if(ec)return Fs;ec=1;var o=Pf();return Fs.createRoot=o.createRoot,Fs.hydrateRoot=o.hydrateRoot,Fs}var Lf=Rf();const Of=gc(Lf);/**
|
|
41
41
|
* @license lucide-react v0.441.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
@@ -77,12 +77,12 @@ Error generating stack: `+i.message+`
|
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const
|
|
80
|
+
*/const Af=we("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
81
81
|
* @license lucide-react v0.441.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
85
|
+
*/const Hf=we("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
86
86
|
* @license lucide-react v0.441.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
@@ -102,7 +102,7 @@ Error generating stack: `+i.message+`
|
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
105
|
+
*/const Hs=we("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
106
106
|
* @license lucide-react v0.441.0 - ISC
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
@@ -142,17 +142,17 @@ Error generating stack: `+i.message+`
|
|
|
142
142
|
*
|
|
143
143
|
* This source code is licensed under the ISC license.
|
|
144
144
|
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const
|
|
145
|
+
*/const bf=we("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"}]]);/**
|
|
146
146
|
* @license lucide-react v0.441.0 - ISC
|
|
147
147
|
*
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const
|
|
150
|
+
*/const Gf=we("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
|
|
151
151
|
* @license lucide-react v0.441.0 - ISC
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const
|
|
155
|
+
*/const Xf=we("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
|
|
156
156
|
* @license lucide-react v0.441.0 - ISC
|
|
157
157
|
*
|
|
158
158
|
* This source code is licensed under the ISC license.
|
|
@@ -162,5 +162,5 @@ Error generating stack: `+i.message+`
|
|
|
162
162
|
*
|
|
163
163
|
* This source code is licensed under the ISC license.
|
|
164
164
|
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const xc=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);class Zf extends Hs.Component{constructor(){super(...arguments);Qu(this,"state",{error:null})}static getDerivedStateFromError(u){return{error:u}}componentDidUpdate(u){u.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}render(){return this.state.error?l.jsxs("div",{className:"empty-state glass-card",role:"alert",children:[l.jsx(Gf,{size:48}),l.jsx("h3",{children:"This view could not be displayed"}),l.jsx("p",{children:this.state.error.message||"Studio received data it could not render."}),l.jsxs("button",{className:"refresh-btn",type:"button",onClick:()=>this.setState({error:null}),children:[l.jsx(yc,{size:16})," Retry view"]})]}):this.props.children}}function ep({name:o,branch:d}){return l.jsxs("div",{className:"project-identity",children:[l.jsx(Af,{size:14,className:"folder-icon"}),l.jsx("span",{className:"project-name",children:o}),d&&l.jsx("span",{className:"project-version-pill",title:"Current branch",children:d})]})}const nc="rigour-readonly-note-hidden";function tp(){const[o,d]=Q.useState(()=>{try{return sessionStorage.getItem(nc)==="1"}catch{return!1}});if(o)return null;const u=()=>{try{sessionStorage.setItem(nc,"1")}catch{}d(!0)};return l.jsxs("div",{className:"overview-banner readonly-note",role:"note",children:[l.jsx(As,{size:16}),l.jsxs("span",{children:["Read-only. Open the link ",l.jsx("code",{children:"rigour studio"})," printed in your terminal: it gives this tab edit rights."]}),l.jsx("button",{className:"readonly-note-close",onClick:u,type:"button","aria-label":"Hide this note",children:l.jsx(xc,{size:14})})]})}function Hn({icon:o,label:d,status:u,detail:h}){const x=["ready","active","online","local"].includes(u)?"ready":["warming","idle","missing"].includes(u)?"warming":"degraded";return l.jsxs("div",{className:`health-item ${x}`,children:[l.jsx(o,{size:15,"aria-hidden":"true"}),l.jsxs("span",{children:[l.jsx("strong",{children:d}),l.jsx("small",{children:h})]}),l.jsx("span",{className:"health-state",children:u})]})}function np({data:o,loading:d,stale:u,onRetry:h}){var S,w,_,E,D,V,H,I,F,Z,q,b,Pe,Y,ve,ce,Re;if(d&&!o)return l.jsxs("div",{className:"system-health loading",children:[l.jsx(Yi,{size:16,className:"spinning"})," Checking system health…"]});if(!o||o.error)return l.jsxs("div",{className:"system-health unavailable",role:"alert",children:[l.jsx(tc,{size:16})," Health unavailable",l.jsxs("button",{type:"button",onClick:h,children:[l.jsx(yc,{size:14})," Retry"]})]});const x=Object.values(((S=o.caches)==null?void 0:S.layers)??{}).filter(Ee=>Ee>0).length;return l.jsxs("section",{className:`system-health ${u?"stale":""}`,"aria-label":"System health",children:[l.jsx(Hn,{icon:Hf,label:"Index",status:((w=o.index)==null?void 0:w.status)??"missing",detail:`${((_=o.index)==null?void 0:_.patterns)??0} patterns · ${((E=o.index)==null?void 0:E.files)??0} files`}),l.jsx(Hn,{icon:bf,label:"Graph",status:((D=o.graph)==null?void 0:D.status)??"missing",detail:`${((V=o.graph)==null?void 0:V.nodes)??0} nodes · ${((H=o.graph)==null?void 0:H.edges)??0} edges`}),l.jsx(Hn,{icon:Ff,label:"Semantic",status:((I=o.semantic)==null?void 0:I.status)??"disabled",detail:((F=o.semantic)==null?void 0:F.message)??"Background enrichment"}),l.jsx(Hn,{icon:Qf,label:"Cache",status:((Z=o.caches)==null?void 0:Z.status)??"warming",detail:`${x}/4 layers populated`}),l.jsx(Hn,{icon:Yi,label:"Learning",status:((q=o.learning)==null?void 0:q.status)??"idle",detail:`${((b=o.learning)==null?void 0:b.observations)??0} interactions · ${((Pe=o.learning)==null?void 0:Pe.total)??0} lessons`}),l.jsx(Hn,{icon:tc,label:"Storage",status:((Y=o.storage)==null?void 0:Y.connectivity)??"local",detail:((ve=o.storage)==null?void 0:ve.connectivity)==="offline"?`${((ce=o.storage)==null?void 0:ce.queuedChanges)??0} queued`:((Re=o.storage)==null?void 0:Re.mode)??"local"})]})}const wc="rigour-studio-key",rp="x-rigour-studio-key";function sp(){const o=window.location.hash.match(/(?:^#|&)key=([a-f0-9]+)/);if(o){try{sessionStorage.setItem(wc,o[1])}catch{}window.history.replaceState(null,"",window.location.pathname+window.location.search)}}function Ws(){return kc().length>0}function kc(){try{return sessionStorage.getItem(wc)??""}catch{return""}}function ht(o,d,u,h="application/json"){const x={[rp]:kc()};return u!==void 0&&(x["Content-Type"]=h),fetch(o,{method:d,headers:x,body:u})}const lp=({onHide:o})=>l.jsxs("section",{className:"st-card",style:{marginBottom:28},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between",marginBottom:16},children:[l.jsx("strong",{children:"How Rigour works"}),l.jsx("button",{className:"st-btn",onClick:o,type:"button",children:"Got it"})]}),l.jsxs("div",{className:"st-steps",children:[l.jsxs("div",{className:"st-step",children:[l.jsx("span",{className:"st-num",children:"1"}),l.jsxs("div",{children:["Your agent writes code",l.jsx("div",{className:"st-sub",children:"Claude Code, Cursor, Cline or Windsurf are checked as they edit; any agent at push."})]})]}),l.jsxs("div",{className:"st-step",children:[l.jsx("span",{className:"st-num",children:"2"}),l.jsxs("div",{children:["Rigour checks the change",l.jsx("div",{className:"st-sub",children:"It stops the agent only on problems it can prove."})]})]}),l.jsxs("div",{className:"st-step",children:[l.jsx("span",{className:"st-num",children:"3"}),l.jsxs("div",{children:["Your PR arrives clean",l.jsx("div",{className:"st-sub",children:"A short review catches the rest; with learning on, fixes become lessons."})]})]})]})]}),jc={edit:"while the agent was writing",review:"when the agent checked its work",stop:"before the agent said done",pr:"at the pull request"};function bt(o,d=Date.now()){const u=Math.round((d-Date.parse(o))/6e4);if(!Number.isFinite(u))return"";if(u<60)return`${Math.max(1,u)} min ago`;const h=Math.round(u/60);return h<48?`${h} h ago`:new Date(o).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})}function re(o,d,u=`${d}s`){return`${o} ${o===1?d:u}`}function Ke(o){const[d,u]=Q.useState(null),[h,x]=Q.useState(null),S=Q.useCallback(()=>{fetch(o).then(async w=>w.ok?u(await w.json()):x(`HTTP ${w.status}`)).catch(w=>x(w instanceof Error?w.message:String(w)))},[o]);return Q.useEffect(S,[S]),{data:d,error:h,reload:S}}function pn(o){return o.split(/(`[^`]+`)/g).map((d,u)=>d.startsWith("`")&&d.endsWith("`")&&d.length>2?Hs.createElement("code",{key:u,className:"st-mono st-inline-code"},d.slice(1,-1)):d)}function ip(o){return o.replace(/(['"`])(?:(?!\1).)*\1/g,"…").replace(/\b\d+(?:\.\d+)?\b/g,"N").replace(/\s+/g," ").trim()}function op(o){const d=o.reduce((h,x)=>h+x.needs.length,0);if(d===0)return"Nothing needs you.";const u=`${re(d,"finding needs","findings need")} you`;return d===o.length?`${u}.`:`${u}, of ${re(o.length,"kind")}.`}function ap(o){const d=new Map,u=[...o].sort((h,x)=>Date.parse(x.openedAt)-Date.parse(h.openedAt));for(const h of u){const x=ip(h.title),S=`${h.rule}\0${x}`,w=d.get(S)??{rule:h.rule,pattern:x,needs:[],files:0};w.needs.push(h),d.set(S,w)}for(const h of d.values())h.files=new Set(h.needs.map(x=>x.file)).size;return[...d.values()]}const up=({group:o,onDone:d})=>{const[u,h]=Q.useState(!1);return o.needs.length===1?l.jsx(rc,{need:o.needs[0],onDone:d}):l.jsxs("div",{children:[l.jsxs("button",{className:"st-story",onClick:()=>h(!u),type:"button","aria-expanded":u,children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("span",{className:"st-chip warn",children:"open"}),l.jsxs("span",{className:"st-sub",children:["newest ",bt(o.needs[0].openedAt)]})]}),l.jsxs("div",{style:{fontSize:17,marginTop:10,lineHeight:1.5},children:[o.needs.length," × ",o.pattern,", in ",re(o.files,"file")]}),l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:o.rule})]}),u&&l.jsx("div",{className:"st-stack",style:{marginTop:10},children:o.needs.map(x=>l.jsx(rc,{need:x,onDone:d},`${x.rule}:${x.file}:${x.openedAt}`))})]})},rc=({need:o,onDone:d})=>{const[u,h]=Q.useState("idle"),x=async()=>{const w=window.prompt("Why is this not a bug? Rigour keeps the reason with the dismissal.");if(!(w!=null&&w.trim())||!o.key)return;(await ht("/api/dismiss","POST",JSON.stringify({key:o.key,reason:w}))).ok?d():h("failed")},S=async()=>{try{await navigator.clipboard.writeText(`Rigour found a problem you introduced: ${o.title} in ${o.file}. Fix it, then run rigour review.`),h("copied")}catch{h("failed")}};return l.jsxs("div",{className:"st-need",children:[l.jsxs("div",{className:"st-row",children:[l.jsx("span",{className:"st-chip warn",children:"open"}),l.jsxs("span",{className:"st-sub",children:["found ",o.stage?jc[o.stage]:""," · ",bt(o.openedAt)]})]}),l.jsx("div",{style:{fontSize:17,marginTop:10,lineHeight:1.5},children:o.title}),l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:o.file}),l.jsxs("div",{className:"st-row",style:{marginTop:14,flexWrap:"wrap"},children:[l.jsx("button",{className:"st-btn primary",onClick:S,type:"button",children:u==="copied"?"Copied: paste it to your agent":"Copy for my agent"}),o.key&&l.jsx("button",{className:"st-btn",onClick:x,type:"button",children:"It's fine, not a bug"}),u==="failed"&&l.jsx("span",{className:"st-sub",children:"That didn't work. Open Studio from the link in your terminal and try again."})]})]})},sc="rigour-intro-hidden",cp=({onNavigate:o})=>{const{data:d,error:u,reload:h}=Ke("/api/week"),[x,S]=Q.useState(null),[w,_]=Q.useState(()=>{try{return localStorage.getItem(sc)!=="1"}catch{return!0}});if(u)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load this week: ",u,"."]})});if(!d)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const E=()=>{try{localStorage.setItem(sc,"1")}catch{}_(!1)},D=d.needs,V=ap(D);return l.jsxs("div",{className:"st-page",children:[w&&l.jsx(lp,{onHide:E}),l.jsx("h1",{className:"st-h1",children:op(V)}),l.jsx("p",{className:"st-lead",children:d.stopped.total>0?`${re(d.stopped.total,"problem")} stopped before a pull request this week, ${d.stopped.fixed} fixed so far.`:d.recordingSince?"Nothing was stopped this week.":"Rigour has not recorded any agent work in this repository yet."}),D.length>0&&l.jsx(dp,{onDone:h}),V.length>0&&l.jsx("div",{className:"st-stack",style:{marginTop:18},children:V.map(H=>l.jsx(up,{group:H,onDone:h},`${H.rule}:${H.pattern}`))}),l.jsxs("div",{className:"st-grid",children:[l.jsxs("section",{children:[l.jsx("h2",{style:{margin:"0 0 14px",fontSize:18,fontWeight:600},children:"What Rigour stopped this week"}),d.stories.length===0?l.jsx("div",{className:"st-empty",children:"When an agent fixes something Rigour caught, it appears here with the code change."}):l.jsx("div",{className:"st-stack",children:d.stories.map(H=>l.jsx(fp,{story:H,open:x===H.id,onToggle:()=>S(x===H.id?null:H.id)},H.id))})]}),l.jsxs("aside",{className:"st-side",children:[l.jsxs("div",{className:"st-card",children:[l.jsx("div",{className:"st-big",children:d.stopped.total}),l.jsx("div",{style:{fontSize:14,marginTop:6},children:"stopped before a PR"}),l.jsxs("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:[d.stopped.byStage.edit," while writing · ",d.stopped.byStage.review," on review · ",d.stopped.byStage.stop," before done"]}),l.jsx(pp,{data:d})]}),l.jsxs("div",{className:"st-card",children:[l.jsx("div",{style:{fontSize:15,fontWeight:600},children:"Is it noisy?"}),l.jsx("div",{style:{fontSize:14,marginTop:8,lineHeight:1.6},children:d.raised===0?"Nothing raised this week.":`Rigour raised ${re(d.raised,"problem")} this week. You overruled ${d.overruled}.`}),l.jsx("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:'Say "not a bug" once and Rigour stops raising it.'})]}),l.jsx("button",{className:"st-btn",onClick:()=>o("learns"),type:"button",children:"See how it learns"}),d.recordingSince&&l.jsxs("div",{className:"st-sub",children:["Recording since ",new Date(d.recordingSince).toLocaleDateString()]})]})]})]})},dp=({onDone:o})=>{const[d,u]=Q.useState(null),h=async()=>{const x=await ht("/api/recheck","POST","{}");if(!x.ok)return u("Could not check again.");const{closed:S,fixed:w}=await x.json(),_=[w?`${re(w,"fix")} by the agent recorded`:"",S?`${re(S,"finding")} no longer reported, closed (not counted as fixes)`:""].filter(Boolean).join("; ");u(_?`${_}.`:"Every one is still reported."),o()};return l.jsxs("div",{className:"st-row",style:{marginTop:10,gap:12},children:[l.jsx("button",{className:"st-btn",onClick:h,type:"button",children:"Check these again"}),d&&l.jsx("span",{className:"st-sub",children:d})]})},fp=({story:o,open:d,onToggle:u})=>l.jsxs("div",{children:[l.jsxs("button",{className:"st-story",onClick:u,type:"button","aria-expanded":d,children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("span",{className:"st-chip",children:jc[o.stage]}),l.jsx("span",{className:"st-sub",children:bt(o.at)})]}),l.jsx("div",{style:{fontSize:16,lineHeight:1.55,marginTop:10},children:pn(o.title)}),l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:[l.jsx("span",{className:"st-mono",children:o.file})," · fixed by the agent"]})]}),d&&l.jsxs("div",{className:"st-story-body",children:[o.diff.length>0&&l.jsx("div",{className:"st-code st-mono",children:o.diff.map((h,x)=>l.jsx("span",{className:`st-ln ${h[0]==="+"?"add":h[0]==="-"?"del":""}`,children:h},x))}),o.details&&o.details!==o.title&&l.jsxs("div",{style:{marginTop:o.diff.length?16:0},children:[l.jsx("strong",{style:{fontSize:13},children:o.stage==="review"&&o.rule==="review"?"What the agent fixed":"How Rigour knew"}),l.jsx("div",{className:"st-sub",style:{marginTop:6,lineHeight:1.6},children:pn(o.details)})]})]})]}),pp=({data:o})=>{const[d,u]=Q.useState(!1);if(o.stopped.total===0)return null;const h=`Rigour stopped ${re(o.stopped.total,"problem")} before a pull request this week: ${o.stopped.byStage.edit} while the agent was writing, ${o.stopped.byStage.review} when it checked its work, ${o.stopped.byStage.stop} before it said done. ${o.stopped.fixed} fixed so far. ${o.overruled} of ${o.raised} overruled.`,x=async()=>{try{await navigator.clipboard.writeText(h),u(!0)}catch{}};return l.jsx("button",{className:"st-btn",onClick:x,type:"button",style:{marginTop:14,width:"100%"},children:d?"Copied":"Copy this week"})},hp=o=>new Date(o).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Ai=(o,d)=>o.reduce((u,h)=>u+d(h),0),mp=()=>{var S;const{data:o,error:d}=Ke("/api/progress");if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load progress: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const u=o.weeks.slice(-4),h=o.weeks.slice(0,-4),x=((S=o.weeks[o.weeks.length-1])==null?void 0:S.lessons)??0;return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"How Rigour is shaping this code"}),l.jsxs("p",{className:"st-lead",children:["Last 4 weeks: ",re(Ai(u,w=>w.stopped),"problem")," stopped before a PR",h.length?` (${Ai(h,w=>w.stopped)} in the 4 weeks before)`:"",", ",re(Ai(u,w=>w.repeatsStopped),"repeat mistake")," caught,"," ",re(x,"lesson")," learned so far."]}),l.jsxs("div",{className:"st-stack",style:{marginTop:24},children:[l.jsx(An,{title:"Stopped before a PR",hint:"fixed by the agent after Rigour reported it",weeks:o.weeks,value:w=>w.stopped}),l.jsx(An,{title:"Repeat mistakes stopped",hint:"a mistake Rigour had already learned, caught again before a PR",weeks:o.weeks,value:w=>w.repeatsStopped}),l.jsx(An,{title:"Repeat mistakes that reached a PR",hint:"lower is better",weeks:o.weeks,value:w=>w.repeatsReachedPr,empty:"Shows once branch reviews run on this machine, for example rigour review --base main in a pre-push hook."}),l.jsx(An,{title:"Minutes from report to fix",hint:"median; lower is better",weeks:o.weeks,value:w=>w.minutesToFix}),l.jsx(An,{title:"Overruled",hint:"findings someone marked not a bug",weeks:o.weeks,value:w=>w.overruled}),l.jsx(An,{title:"Lessons learned",hint:"total by the end of each week",weeks:o.weeks,value:w=>w.lessons})]}),l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},children:[l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"Lessons that stopped the most repeats"}),o.topLessons.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:"None yet. A lesson ranks here once the mistake it describes is caught again and stopped."}):l.jsx("ol",{style:{margin:"12px 0 0",paddingLeft:20,lineHeight:1.6},children:o.topLessons.map(w=>l.jsxs("li",{style:{marginBottom:8},children:[pn(w.text),l.jsxs("div",{className:"st-sub",children:[re(w.stoppedInDevelopment??0,"repeat")," stopped · ",w.scope==="team"?"shared with team":w.scope]})]},w.id))})]}),l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"Checks your team acts on"}),o.checks.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:'Each fix and each "not a bug" scores the check that raised it. Scores appear after the first one.'}):l.jsx("div",{className:"st-stack",style:{marginTop:12,gap:8},children:o.checks.map(w=>l.jsxs("div",{className:"st-row",style:{gap:10},children:[l.jsxs("span",{style:{width:44,fontWeight:600},children:[Math.round(w.precision*100),"%"]}),l.jsx("span",{style:{flex:1,fontSize:14},children:w.check}),l.jsxs("span",{className:"st-sub",children:[w.fixed," fixed · ",w.dismissed," overruled"]}),w.muted&&l.jsx("span",{className:"st-chip",children:"quiet"})]},w.check))})]})]})]})},An=({title:o,hint:d,weeks:u,value:h,empty:x})=>{const S=u.map(h),w=S.filter(E=>E!==null),_=Math.max(1,...w);return l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:o}),l.jsx("span",{className:"st-sub",children:d})]}),w.length===0&&x?l.jsx("div",{className:"st-sub",style:{marginTop:10},children:x}):l.jsx("div",{className:"st-bars",style:{height:90,gap:12},children:u.map((E,D)=>l.jsxs("div",{className:"st-bar",children:[l.jsx("div",{style:{fontSize:12},children:S[D]??"—"}),l.jsx("span",{style:{height:`${S[D]===null?2:Math.max(2,S[D]/_*56)}px`,opacity:S[D]===null?.25:1}}),l.jsx("div",{className:"st-sub",style:{fontSize:11},children:hp(E.from)})]},E.from))})]})},gp=()=>{const{data:o,error:d}=Ke("/api/week"),u=Ke("/api/setup").data,h=u==null?void 0:u.checks.some(S=>S.id==="stop"&&S.state!=="missing"&&S.state!=="broken");if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const x=o.stories.filter(S=>S.stage==="stop");return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"What only Rigour caught"}),l.jsx("p",{className:"st-lead",children:"Counted only where Rigour can show it. A bug stopped before a PR never reached your other reviewers, so it is not counted against them."}),l.jsxs("section",{style:{marginTop:28},children:[l.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600},children:"Your agent tried to finish with a bug"}),l.jsx("p",{className:"st-lead",style:{fontSize:14},children:o.agentSaidDone===0&&u&&!h?"The stop hook is not set up in this repository, so Rigour cannot see an agent finish. Run rigour setup.":o.agentSaidDone===0?"This week no agent tried to finish with a problem Rigour could prove.":`This week an agent tried to finish with a problem Rigour proved ${re(o.agentSaidDone,"time")}. Each was fixed before the agent stopped.`}),l.jsx("div",{className:"st-stack",style:{marginTop:14},children:x.map(S=>l.jsxs("div",{className:"st-card st-row",children:[l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:15,lineHeight:1.5},children:S.title}),l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[l.jsx("span",{className:"st-mono",children:S.file})," · ",bt(S.at)]})]}),l.jsx("span",{className:"st-chip ok",children:"fixed"})]},S.id))})]}),l.jsxs("section",{style:{marginTop:32},children:[l.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600},children:"Rigour and your other PR reviewers"}),l.jsxs("div",{className:"st-empty",style:{marginTop:14},children:[o.prCatches===null?"No branch reviews recorded on this machine yet.":`Branch reviews here reported ${re(o.prCatches,"problem")} this week.`," ","Side by side with teammates and review bots (both caught it, only Rigour, only them) needs the PR's review comments; it comes with the PR integration."]})]})]})},vp=()=>l.jsxs("p",{className:"st-lead",children:["Every mistake fixed in development or caught at a PR becomes a lesson. An agent gets the lessons when it asks for a brief (the ",l.jsx("code",{children:"rigour_brief"})," tool, or ",l.jsx("code",{children:"rigour brief"}),"). In Claude Code, ",l.jsx("code",{children:"rigour hooks init --brief"})," hands them over by itself: at a session's first prompt and on each file's first edit."]}),Wi={accepted:"accepted",rejected:"rejected",dismissed:"dismissed",scoped:"set how far it reaches",reworded:"reworded",compiled:"decided its compiled check"},lc=o=>o.slice(0,10),yp=({team:o})=>l.jsxs("div",{style:{marginTop:14},children:[o.overruled&&l.jsxs("div",{children:[l.jsx("span",{className:"st-chip warn",children:"the team decided"})," ",l.jsxs("span",{className:"st-sub",children:["You ",Wi[o.overruled.yours]??o.overruled.yours," it",o.overruled.yoursOnly?` (yours only: ${o.overruled.yoursOnly})`:"","; ",o.overruled.team.name," ",Wi[o.overruled.team.kind]??o.overruled.team.kind," it on ",lc(o.overruled.team.at),", and the team's decision is what agents are told."]})]}),o.decisions.map(d=>l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[d.name," (team) ",Wi[d.kind]??d.kind," it on ",lc(d.at),d.detail?`: ${d.detail}`:""]},`${d.at}-${d.kind}-${d.name}`))]}),xp=({count:o,shown:d,onToggle:u})=>l.jsxs("div",{className:"st-row",style:{marginTop:12,gap:8},children:[l.jsxs("span",{className:"st-sub",children:[o," candidate",o===1?"":"s"," from review bots",d?"":", hidden","."]}),l.jsx("button",{type:"button",className:"st-btn",onClick:u,children:d?"Hide bot points":"Show bot points"})]}),Ui=(o,d=!0)=>d?o===null?"not recorded here":o===1?"1 time":`${o} times`:"—",wp=({lesson:o,onDecide:d,onDecideReview:u,onScope:h})=>l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsx("div",{style:{fontSize:17,lineHeight:1.5,flex:1},children:pn(o.text)}),l.jsx("span",{className:"st-chip",children:o.scope==="team"?"shared with team":o.scope})]}),l.jsxs("div",{className:"st-journey",children:[l.jsxs("div",{style:{background:"var(--bg-surface)"},children:[l.jsx("div",{className:"st-sub",children:"Learned"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:o.learnedFrom})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Agents told"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:Ui(o.told)})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Stopped in development"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:Ui(o.stoppedInDevelopment,o.origin==="development")})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Reached a PR again"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:Ui(o.reachedPr,o.origin==="development")})]})]}),o.team&&l.jsx(yp,{team:o.team}),o.takenBack&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsx("span",{className:"st-chip warn",children:"taken back"})," ",l.jsx("span",{className:"st-sub",children:o.takenBack.detail})]}),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsx("span",{className:"st-sub",children:"Later pull requests a review found repeating it merged and stayed fine. Keep telling agents anyway?"}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote again"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"rejected"),type:"button",children:"Drop"})]})]}),o.reclassified&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsx("span",{className:"st-chip warn",children:"back to candidate"})," ",l.jsx("span",{className:"st-sub",children:o.reclassified.detail})]}),o.reclassified.evidence.map(x=>l.jsx("div",{className:"st-sub",style:{marginTop:4},children:x},x)),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsx("span",{className:"st-sub",children:"A later fix on its lines used to make this a lesson by itself; now a person decides. Keep telling agents?"}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"dismissed"),type:"button",children:"Dismiss"})]})]}),o.suggested&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsx("span",{className:"st-chip",children:"a later fix changed these lines"})," ",l.jsx("span",{className:"st-sub",children:o.suggested.detail})]}),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsxs("span",{className:"st-sub",children:["The pull request (#",o.suggested.pr,") left this point alone, and a later fix changed its lines. If that fix is about this point, the lesson was right."]}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"dismissed"),type:"button",children:"Dismiss"})]})]}),o.reach&&l.jsx(jp,{lesson:o,reach:o.reach,onScope:h}),o.suggestedText&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsxs("span",{className:"st-chip",children:["corrected wording (",o.suggestedText.why,")"]})," ",l.jsx("span",{style:{fontSize:15},children:pn(o.suggestedText.text)})]}),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsx("span",{className:"st-sub",children:"You decided on this lesson as it reads above. A newer version reads its comment better; the lesson changes only if you take it."}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"reworded"),type:"button",children:"Use this wording"})]})]}),o.canDecide&&o.origin==="pr"&&!o.takenBack&&!o.suggested&&!o.reclassified&&l.jsxs("div",{className:"st-row",style:{marginTop:14},children:[l.jsx("span",{className:"st-sub",children:"From review, not confirmed yet. Is this how your team works, so agents get told?"}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"rejected"),type:"button",children:"Drop"})]}),o.canDecide&&o.origin!=="pr"&&!o.takenBack&&!o.suggested&&!o.reclassified&&l.jsxs("div",{className:"st-row",style:{marginTop:14},children:[l.jsx("span",{className:"st-sub",children:o.scope==="team"?"Shared by a teammate. Give it to everyone's agents?":"Seen once. Keep it so your agents get told?"}),l.jsx("button",{className:"st-btn primary",onClick:()=>d(o.id,o.scope==="team"?"promoted":"validated"),type:"button",children:o.scope==="team"?"Share with team":"Keep"}),l.jsx("button",{className:"st-btn",onClick:()=>d(o.id,"rejected"),type:"button",children:"Drop"})]})]}),kp={file:"its file",folder:"its folder",repo:"team standard"},jp=({lesson:o,reach:d,onScope:u})=>{const h=[["repo","Make team standard"],["folder","Folder only"],["file","This file only"]].filter(([x])=>x!==d.scope&&(d.hasFile||x==="repo"));return l.jsxs("div",{className:"st-row",style:{marginTop:12,flexWrap:"wrap",gap:8},children:[l.jsxs("span",{className:"st-chip",children:["reaches: ",d.hasFile||d.scope==="repo"?kp[d.scope]:"changes it is about"]}),h.map(([x,S])=>l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,x),type:"button",children:S},x))]})},Np=({model:{share:o,costPerPr:d}})=>l.jsxs("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:["The model reviewer: ",o.model," of ",o.model+o.checks," findings at first review on ",o.prs," pull request",o.prs===1?"":"s",o.rate===null?"":` (${Math.round(o.rate*100)}%)`,", the rest from the free checks."," ","It cost $",d.totalUsd.toFixed(2)," over ",d.prs," pull request",d.prs===1?"":"s",d.medianUsd===null?"":`, $${d.medianUsd.toFixed(2)} each at the median`,".",d.prsEarlierBasis?` ${d.prsEarlierBasis} more reviewed before every run was counted, left out.`:""]}),ic=o=>`${o.count} of ${o.of}${o.rate===null?"":` (${Math.round(o.rate*100)}%)`}`,Sp=({numbers:o})=>l.jsxs("section",{className:"st-card",style:{margin:"0 0 24px"},children:[l.jsx("strong",{children:"After the merge"}),l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[o.records.merged," merged pull requests read on this machine; ",o.records.settled," settled, ",o.records.unsettled," with the window still open."]}),l.jsxs("div",{className:"st-journey",style:{marginTop:10},children:[l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"CI regressed on the merge"}),l.jsxs("div",{style:{fontSize:14,marginTop:4},children:[ic(o.settled.ciRegressed),o.settled.ciUnknown?`, ${o.settled.ciUnknown} with no CI to read`:""]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Reverted"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:ic(o.settled.reverted)})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Reviewed by Rigour"}),l.jsxs("div",{style:{fontSize:14,marginTop:4},children:[o.settled.reviewed.prs," pull requests, ",o.settled.reviewed.fixedLater.count," fixed later"]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Not reviewed"}),l.jsxs("div",{style:{fontSize:14,marginTop:4},children:[o.settled.notReviewed.prs," pull requests, ",o.settled.notReviewed.fixedLater.count," fixed later"]})]})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:["Lessons: ",o.lessons.awaitingDecision," waiting on you, ",o.lessons.promotedFromEvidence," promoted from evidence, ",o.lessons.dismissed," dismissed, ",o.lessons.takenBack," taken back."," ","Teams choose which pull requests get reviewed, so the two groups differ: this is not a comparison."]}),o.model&&l.jsx(Np,{model:o.model})]}),oc=o=>`${o.fired} of ${o.n}${o.rate===null?"":` (${Math.round(o.rate*100)}%)`}`,Cp=({checks:o,onDecide:d,onPropose:u})=>l.jsxs("section",{className:"st-card",style:{margin:"24px 0"},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Lessons compiled into checks"}),l.jsx("button",{className:"st-btn",type:"button",onClick:u,children:"Propose checks"})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.6},children:["A verified lesson that names its file and symbols becomes a check that runs on every review, for free; the model reviewer stops spending prompt on it. A proposed check runs only once you approve it. Who approved it, by git email, is committed with it in ",l.jsx("span",{className:"st-mono",children:".rigour/compiled-checks.json"}),"."]}),o.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10},children:"None yet. Propose checks once a lesson says never, avoid, instead of, always or must about a symbol in backticks."}):l.jsx("div",{className:"st-stack",style:{marginTop:12},children:o.map(h=>l.jsxs("div",{className:"st-need",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("span",{className:`st-chip ${h.suspended?"bad":h.state==="active"?"ok":h.state==="proposed"?"warn":""}`,children:h.suspended?"suspended":h.state}),l.jsx("span",{className:"st-sub st-mono",children:h.files})]}),l.jsx("div",{style:{marginTop:8},children:h.kind==="forbid"?l.jsxs(l.Fragment,{children:["Reports ",l.jsx("code",{children:h.symbol})," on a changed line."]}):l.jsxs(l.Fragment,{children:["Reports ",l.jsx("code",{children:h.symbol})," with no ",l.jsx("code",{children:h.with})," within three lines."]})}),l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[pn(h.message)," · lesson ",h.lessonId,h.by?` · ${h.state==="withdrawn"?"taken back":"approved"} by ${h.by}`:""]}),h.suspended&&l.jsx("div",{className:"st-sub",style:{marginTop:6},children:h.suspended}),h.backtest&&l.jsxs("div",{className:"st-sub",style:{marginTop:6,lineHeight:1.6},children:["On the last ",h.backtest.commits," merged changes to its files: fires on ",oc(h.backtest.repeating)," where a review found the lesson repeating, and on ",oc(h.backtest.other)," others (each a false fire, or a catch the review missed)."]}),l.jsxs("div",{className:"st-row",style:{marginTop:10,gap:8},children:[h.state!=="active"&&l.jsx("button",{className:"st-btn",type:"button",onClick:()=>d(h.id,"active"),children:"Approve"}),h.state==="active"&&l.jsx("button",{className:"st-btn",type:"button",onClick:()=>d(h.id,"withdrawn"),children:"Take back"})]})]},h.id))})]}),Tp=()=>{const{data:o,error:d,reload:u}=Ke("/api/learning"),[h,x]=Hs.useState(!1);if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load lessons: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const S=async(F,Z)=>{(await ht("/api/lessons","POST",JSON.stringify({id:F,state:Z}))).ok&&u()},w=async(F,Z)=>{(await ht("/api/review-lessons","POST",JSON.stringify({id:F,decision:Z}))).ok&&u()},_=async(F,Z)=>{const q=await ht("/api/review-lessons","POST",JSON.stringify({id:F,decision:"scope",to:Z}));q.ok?u():window.alert((await q.json().catch(()=>({}))).error??"Could not record the decision.")},E=async(F,Z)=>{const q=await ht("/api/compiled-checks","POST",JSON.stringify({id:F,state:Z}));q.ok?u():window.alert((await q.json().catch(()=>({}))).error??"Could not record the decision.")},D=async()=>{(await ht("/api/compiled-checks","POST",JSON.stringify({propose:!0}))).ok&&u()},V=o.lessons.filter(F=>F.fromBots).length,H=h?o.lessons:o.lessons.filter(F=>!F.fromBots),I=Math.max(1,...o.weeks.map(F=>Math.max(F.stoppedInDevelopment,F.reachedPr??0)));return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"How Rigour learns your codebase"}),l.jsx(vp,{}),l.jsxs("section",{className:"st-card",style:{margin:"24px 0"},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Repeat mistakes, by week"}),l.jsx("span",{className:"st-sub",children:"a mistake Rigour had already learned"})]}),l.jsx("div",{className:"st-bars",children:o.weeks.map(F=>l.jsxs("div",{className:"st-bar",children:[l.jsxs("div",{style:{fontSize:13},children:[F.stoppedInDevelopment," stopped",F.reachedPr===null?"":` · ${F.reachedPr} reached a PR`]}),l.jsx("span",{style:{height:`${Math.max(4,F.stoppedInDevelopment/I*80)}px`}}),l.jsxs("div",{className:"st-sub",children:["from ",new Date(F.from).toLocaleDateString(void 0,{month:"short",day:"numeric"})]})]},F.from))}),!o.prRecorded&&l.jsxs("div",{className:"st-sub",style:{marginTop:14},children:["Repeats that reached a PR show once branch reviews run on this machine (",l.jsx("span",{className:"st-mono",children:"rigour review --base main"}),", for example in a pre-push hook). Reviews in CI stay in CI."]})]}),o.outcomes&&l.jsx(Sp,{numbers:o.outcomes}),l.jsx(Cp,{checks:o.compiled??[],onDecide:E,onPropose:D}),o.lessons.length===0?l.jsx("div",{className:"st-empty",children:"No lessons yet. They form when an agent fixes something Rigour reported, when a PR comment leads to a fix, or when you tell your agent to remember something."}):l.jsx("div",{className:"st-stack",children:H.map(F=>l.jsx(wp,{lesson:F,onDecide:S,onDecideReview:w,onScope:_},F.id))}),V>0&&l.jsx(xp,{count:V,shown:h,onToggle:()=>x(!h)}),l.jsx(Ep,{})]})},Ep=()=>{var h,x,S;const o=Ke("/api/learned-rules").data??[],d=Object.entries(((h=Ke("/api/memory").data)==null?void 0:h.memories)??{}),u=(S=(x=Ke("/api/index-stats").data)==null?void 0:x.stats)==null?void 0:S.totalPatterns;return l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},children:[l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"Rules learned from fixes"}),l.jsx("div",{className:"st-sub",style:{marginTop:4},children:"Checked on every edit, like a built-in check."}),o.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:"None yet. rigour learn turns an agent's fixes into rules once they hold up."}):l.jsx("ul",{style:{margin:"10px 0 0",paddingLeft:18,lineHeight:1.6,fontSize:14},children:o.map(w=>l.jsxs("li",{children:[w.message,l.jsxs("div",{className:"st-sub",children:[w.requirement," · ",w.appliesTo]})]},w.id))})]}),l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"What your agents were told to remember"}),l.jsx("div",{className:"st-sub",style:{marginTop:4},children:"Facts saved with rigour_remember; agents recall them by meaning."}),d.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:"Nothing saved yet."}):l.jsx("ul",{style:{margin:"10px 0 0",paddingLeft:18,lineHeight:1.6,fontSize:14},children:d.slice(0,12).map(([w,_])=>l.jsxs("li",{children:[l.jsx("strong",{children:w.replace(/_/g," ")}),": ",_.value.length>220?`${_.value.slice(0,220)}…`:_.value]},w))}),d.length>12&&l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:["and ",d.length-12," more"]})]}),typeof u=="number"&&u>0&&l.jsxs("section",{className:"st-card",style:{gridColumn:"1 / -1"},children:[l.jsxs("strong",{children:[u," functions indexed"]}),l.jsx("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.6},children:"Before an agent writes a new helper, Rigour checks whether one already exists and points to it, so the codebase doesn't fill with near-copies."})]})]})},ac=o=>o>=1e3?`${Math.round(o/1e3)}k`:String(o),_p=()=>{const{data:o,error:d}=Ke("/api/context");if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load agent context: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const u=o.week,h=u.scopes+u.recalls+u.lessonsTold+u.reuse.length===0;return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"What Rigour gave your agents"}),l.jsx("p",{className:"st-lead",children:"Before an agent writes, it can ask Rigour where to look, what this team already knows, and whether the thing it is about to write exists. Preventing a mistake is cheaper than catching it."}),h?l.jsx("div",{className:"st-empty",style:{marginTop:24},children:"No agent asked Rigour for context this week. Agents use it through the Rigour tools (rigour_context_scope, rigour_recall, rigour_check_pattern); Setup shows whether they are connected."}):l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},children:[l.jsx(uc,{title:"Where to look",value:u.scopes===0?"Not asked this week":`${re(u.filesReturned,"file")} instead of ${u.filesConsidered}`,detail:u.scopes===0?"Agents can ask for the files a task needs instead of reading broadly.":`${re(u.scopes,"request")}. About ${ac(u.tokensReturned)} tokens returned out of ${ac(u.tokensConsidered)} considered (Rigour's estimate).`}),l.jsx(uc,{title:"What this team knows",value:`${re(u.lessonsTold,"lesson")} told`,detail:`${re(u.recalls,"recall")} of saved facts and lessons. How it learns shows what each lesson stopped.`}),l.jsxs("section",{className:"st-card",style:{gridColumn:"1 / -1"},children:[l.jsx("strong",{children:"Pointed to code that already exists"}),u.reuse.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:"No duplicate was about to be written this week."}):l.jsx("div",{className:"st-stack",style:{marginTop:12},children:u.reuse.map(x=>l.jsxs("div",{className:"st-row",style:{alignItems:"flex-start"},children:[l.jsx("span",{className:`st-chip ${x.action==="BLOCK"?"warn":""}`,children:x.action==="BLOCK"?"reuse":"similar"}),l.jsxs("div",{style:{flex:1,fontSize:14,lineHeight:1.5},children:["About to write ",l.jsx("span",{className:"st-mono",children:x.planned}),"; told to use ",l.jsx("span",{className:"st-mono",children:x.existing})]}),l.jsx("span",{className:"st-sub",children:bt(x.at)})]},`${x.at}-${x.planned}`))})]})]}),l.jsx(zp,{weeks:o.weeks})]})},uc=({title:o,value:d,detail:u})=>l.jsxs("section",{className:"st-card",children:[l.jsx("div",{className:"st-sub",children:o}),l.jsx("div",{style:{fontSize:22,fontWeight:600,marginTop:6,color:"var(--text-primary)"},children:d}),l.jsx("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:u})]}),zp=({weeks:o})=>{const d=o.filter(u=>u.scopes+u.recalls+u.lessonsTold+u.reuse>0).reverse();return l.jsxs("section",{className:"st-card",style:{marginTop:24,padding:0,overflowX:"auto"},children:[l.jsx("div",{style:{padding:"16px 20px 8px"},children:l.jsx("strong",{children:"Last 8 weeks"})}),d.length===0?l.jsx("div",{className:"st-sub",style:{padding:"0 20px 18px"},children:"No context requests in the last 8 weeks."}):l.jsxs("table",{className:"st-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Week of"}),l.jsx("th",{children:"Focused file lists"}),l.jsx("th",{children:"Files given"}),l.jsx("th",{children:"Recalls"}),l.jsx("th",{children:"Lessons told"}),l.jsx("th",{children:"Duplicates avoided"})]})}),l.jsx("tbody",{children:d.map(u=>l.jsxs("tr",{children:[l.jsx("td",{children:new Date(u.from).toLocaleDateString(void 0,{month:"short",day:"numeric"})}),l.jsx("td",{children:u.scopes}),l.jsx("td",{children:u.scopes?`${u.filesReturned} of ${u.filesConsidered}`:"—"}),l.jsx("td",{children:u.recalls}),l.jsx("td",{children:u.lessonsTold}),l.jsx("td",{children:u.reuse})]},u.from))})]})]})},Bi={single:"one judge",cross:"one judge from another vendor",full:"one judge per vendor, findings merged",panel:"a panel: only what a majority confirms blocks"},Pp=o=>o.file?`${o.file}${o.line?`:${o.line}`:""}`:"",Rp=({data:o,canWrite:d,onChange:u})=>{var x,S,w,_;const h=(x=o.status)==null?void 0:x.last;return l.jsxs("section",{style:{marginTop:24},children:[l.jsxs("h2",{style:{margin:"0 0 12px",fontSize:18,fontWeight:600},children:["The reviewer's verdict on ",o.branch]}),((S=o.status)==null?void 0:S.running)&&l.jsxs("div",{className:"st-sub",style:{marginBottom:8},children:["Reviewing ",o.status.running.head.slice(0,9)," now."]}),((w=o.status)==null?void 0:w.attempt)&&l.jsxs("div",{className:"st-card",style:{marginBottom:12},children:[l.jsx("span",{className:"st-chip warn",children:o.status.attempt.outcome==="skipped"?"skipped":"could not run"})," ",l.jsxs("span",{className:"st-sub",children:["The last review, of ",o.status.attempt.head.slice(0,9)," ",bt(o.status.attempt.at),": ",o.status.attempt.reason]})]}),h?l.jsxs("div",{className:"st-stack",children:[l.jsx("div",{className:"st-card st-row",style:{justifyContent:"space-between"},children:l.jsxs("span",{children:[l.jsx("span",{className:`st-chip ${h.open.length?"bad":"ok"}`,children:h.open.length?`${re(h.open.length,"finding")} to fix`:"nothing to fix"})," ",l.jsxs("span",{className:"st-sub",children:[h.ran?`${Bi[h.ran.ran]??h.ran.ran}, `:"",h.mode==="delta"?"new commits":"the whole branch"," at ",h.head.slice(0,9),", ",bt(h.at)]})]})}),h.ran&&(h.ran.degraded||h.ran.escalation||h.ran.asked!==h.ran.ran)&&l.jsxs("div",{className:"st-sub",children:["Asked for ",Bi[h.ran.asked]??h.ran.asked," (",h.ran.source,"); ran ",Bi[h.ran.ran]??h.ran.ran,". ",[h.ran.degraded,h.ran.escalation].filter(Boolean).join("; ")]}),h.open.map(E=>l.jsx(cc,{item:E,canWrite:d&&o.effective.dismissals,onChange:u},E.id)),h.disputed.length>0&&l.jsx("div",{className:"st-sub",style:{marginTop:8},children:"No majority, so these never block:"}),h.disputed.map(E=>l.jsx(cc,{item:E,disputed:!0,canWrite:!1,onChange:u},E.id))]}):!((_=o.status)!=null&&_.attempt)&&l.jsxs("div",{className:"st-empty",children:["No verdict yet. Run ",l.jsx("span",{className:"st-mono",children:"rigour review --reviewer"}),", or push with the reviewer on."]})]})},cc=({item:o,disputed:d,canWrite:u,onChange:h})=>{const[x,S]=Q.useState(""),[w,_]=Q.useState(!1),[E,D]=Q.useState(null),V=async()=>{const H=await ht("/api/reviewer/dismiss","POST",JSON.stringify({id:o.id,reason:x}));H.ok?h():D((await H.json().catch(()=>({}))).error??`HTTP ${H.status}`)};return l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between",gap:12},children:[l.jsx("strong",{style:{fontSize:14},children:o.issue}),l.jsx("span",{className:"st-mono st-sub",children:Pp(o)})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:[d?l.jsx("span",{className:"st-chip warn",children:"disputed"}):l.jsx("span",{className:"st-chip",children:o.class}),o.reviewer&&l.jsxs(l.Fragment,{children:[" found by ",o.reviewer.split("+").join(" and ")]})]}),o.consequence&&l.jsxs("div",{style:{marginTop:8,fontSize:14},children:["What goes wrong: ",o.consequence]}),o.evidence&&l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:o.evidence}),u&&o.kind!=="prior"&&(w?l.jsxs("div",{className:"st-row",style:{marginTop:10,gap:8},children:[l.jsx("input",{"aria-label":"Why it is not a bug",value:x,onChange:H=>S(H.target.value),placeholder:"Why it is not a bug",style:{flex:1,minHeight:36,padding:"0 10px",borderRadius:8,border:"1px solid var(--text-dim)",background:"var(--bg-card)",color:"var(--text-primary)"}}),l.jsx("button",{className:"st-btn",disabled:x.trim().length<5,onClick:V,children:"Dismiss"})]}):l.jsx("button",{className:"st-btn",style:{marginTop:10},onClick:()=>_(!0),children:"Not a bug"})),E&&l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:[l.jsx("span",{className:"st-chip bad",children:"not dismissed"})," ",E]})]})},Ds=({label:o,value:d,options:u,disabled:h,withTeam:x,onChange:S})=>{const w=x?[{value:null,label:"Team"},...u]:u,_=d===void 0?null:d;return l.jsx("div",{className:"st-seg",role:"radiogroup","aria-label":o,children:w.map(E=>{const D=JSON.stringify(E.value)===JSON.stringify(_);return l.jsx("button",{type:"button",role:"radio","aria-checked":D,className:D?"on":"",disabled:h,onClick:()=>!D&&S(E.value),children:E.label},E.label)})})},Lp={flag:"this run",env:"environment",user:"yours",team:"team"};function Op(o,d){return o.key==="mode"?d.source.mode:o.key==="panel"?d.source.panel:o.key==="escalate"&&(d.required.panel||d.required.mode)?"team":o.user&&o.user.value!==void 0?"user":"team"}const Vi=[{value:!0,label:"on"},{value:!1,label:"off"}],dc=[{value:"single",label:"one judge"},{value:"cross",label:"one, another vendor"},{value:"full",label:"one per vendor"}],Mp=({data:o,canWrite:d,saving:u,onSave:h,onSaveTeam:x})=>{const[S,w]=Q.useState(!1),_=o.effective,E=o.team,D=_.required.panel||_.required.mode,V=[{key:"enabled",label:"Review at push",help:"Ask the reviewer when you push a branch that has an open pull request.",effective:_.enabled?"on":"off",user:{value:o.user.enabled,options:Vi},team:{value:E.enabled??!1,options:Vi}},{key:"mode",label:"Mode",help:"One judge; one from a vendor that did not write the code; or one judge per vendor (up to Judges), findings merged.",effective:_.mode,user:{value:o.user.mode,options:dc},team:{value:E.mode??"single",options:dc},locked:_.required.mode?"your team requires at least this":void 0},{key:"mode_required",label:"Required for everyone",help:"No person or run may review with fewer judges than the team's, in CI or anywhere.",effective:_.required.mode?"yes":"no",team:{value:E.mode_required??!1,options:[{value:!0,label:"yes"},{value:!1,label:"no"}]}},{key:"panel",label:"Panel",help:"Judges cross-examine what only one of them found; only what a majority confirms blocks. Required: no one may turn it off.",effective:_.panel?"on":"off",user:{value:o.user.panel,options:Vi},team:{value:E.panel??"off",options:[{value:"off",label:"off"},{value:"on",label:"on"},{value:"required",label:"required"}]},locked:_.required.panel?"your team requires the panel":void 0},{key:"dismissals",label:"Dismissals",help:'Whether people may mark a reviewer finding "not a bug". Off: a wrong finding is fixed by improving the reviewer, a right one by fixing the code.',effective:_.dismissals?"allowed":"off",team:{value:E.dismissals??!1,options:[{value:!0,label:"allowed"},{value:!1,label:"off"}]}},{key:"judges",label:"Judges",help:"How many judges a full or panel review uses, each from a different vendor. Three give a real majority.",effective:String(_.judges),user:{value:o.user.judges,options:[{value:2,label:"2"},{value:3,label:"3"}]},team:{value:E.judges??2,options:[{value:2,label:"2"},{value:3,label:"3"}]}},{key:"escalate",label:"When to add judges",help:"Always, or only for a risky change or one a person has reviewed. The backtest shows whether that loses anything.",effective:_.escalate,user:{value:o.user.escalate,options:[{value:"always",label:"always"},{value:"risk",label:"when risky"}]},team:{value:E.escalate??"always",options:[{value:"always",label:"always"},{value:"risk",label:"when risky"}]},locked:D?"your team requires every review to be full":void 0}],H=d&&(o.teamFile||S);return l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"st-sub",style:{margin:"0 0 12px",lineHeight:1.6},children:[l.jsx("strong",{children:"Yours"})," applies to your own runs, in every repository on this machine, and wins over the team's except where the team set a floor. ",l.jsx("strong",{children:"Team"})," is"," ",o.teamFile?l.jsxs(l.Fragment,{children:["in ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),": a change here edits the file, and you commit it"]}):l.jsxs(l.Fragment,{children:["Rigour's defaults: this repository has no ",l.jsx("span",{className:"st-mono",children:"rigour.yml"})]}),".",!d&&" Open Studio from the link the terminal printed to change settings here."]}),d&&!o.teamFile&&!S&&l.jsxs("div",{className:"st-card st-row",style:{justifyContent:"space-between",marginBottom:12},children:[l.jsxs("span",{className:"st-sub",children:["Setting team defaults creates a ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),": from then on this repository uses the team setup."]}),l.jsx("button",{className:"st-btn",onClick:()=>w(!0),children:"Set team defaults"})]}),l.jsx("div",{className:"st-stack",children:V.map(I=>l.jsxs("div",{className:"st-card st-setting",children:[l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:15},children:I.label}),l.jsx("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.5},children:I.help})]}),l.jsxs("div",{className:"st-setting-controls",children:[l.jsx("span",{className:"st-sub",children:"Runs"}),l.jsxs("span",{children:[l.jsx("span",{className:"st-mono",children:I.effective})," ",l.jsxs("span",{className:"st-sub",children:["· ",Lp[Op(I,_)]]}),I.locked&&l.jsxs("span",{title:I.locked,"aria-label":I.locked,children:[" ",l.jsx(As,{size:12})]})]}),l.jsx("span",{className:"st-sub",children:"Yours"}),I.user?l.jsx(Ds,{label:`Your ${I.label}`,withTeam:!0,disabled:!d||u!==null,value:I.user.value,options:I.user.options,onChange:F=>h({[I.key]:F})}):l.jsx("span",{className:"st-sub",children:"set by the team only"}),l.jsx("span",{className:"st-sub",children:"Team"}),l.jsx(Ds,{label:`Team ${I.label}`,disabled:!H||u!==null,value:I.team.value,options:I.team.options,onChange:F=>x({[I.key]:F},!o.teamFile)})]})]},I.key))}),l.jsx($p,{data:o}),_.refused.length>0&&l.jsx("div",{className:"st-stack",style:{marginTop:12},children:_.refused.map(I=>l.jsxs("div",{className:"st-sub",children:[l.jsx("span",{className:"st-chip warn",children:"not applied"})," ",I]},I))})]})},Nc=({diff:o})=>l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{style:{fontSize:14},children:"rigour.yml changed"}),l.jsx("span",{className:"st-sub",children:"Commit it so the change reaches your team."})]}),l.jsx("pre",{className:"st-code",style:{marginTop:8},children:o.split(`
|
|
166
|
-
`).map((d,u)=>l.jsx("div",{className:`st-ln ${d.startsWith("+")?"add":d.startsWith("-")?"del":""}`,children:d},u))})]}),$p=({data:o})=>{var x;const d=((x=o.status)==null?void 0:x.today)??{runs:0,usd:0},{max_runs_per_day:u,max_usd_per_day:h}=o.effective;return l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsx("div",{style:{fontSize:15},children:"Today in this repository"}),l.jsxs("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.6},children:[re(d.runs,"agent run"),u!==void 0?` of ${u} allowed`:"",d.usd||h!==void 0?`, $${d.usd.toFixed(2)} reported${h!==void 0?` of $${h.toFixed(2)}`:""}`:"","."," ",u===void 0&&h===void 0?l.jsxs(l.Fragment,{children:["No daily cap: set ",l.jsx("span",{className:"st-mono",children:"max_runs_per_day"})," or ",l.jsx("span",{className:"st-mono",children:"max_usd_per_day"})," in ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),"."]}):"Past a cap, reviews are skipped until tomorrow (or cannot run, where your team requires the reviewer)."]})]})},Ip=({data:o})=>{const d=new Set(o.available.filter(h=>h.installed&&o.effective.reviewers.includes(h.name)).map(h=>h.vendor)).size,u=o.effective.required.panel||o.effective.required.mode;return l.jsxs("section",{style:{marginTop:20},children:[l.jsx("h3",{style:{margin:"0 0 6px",fontSize:15,fontWeight:600},children:"Agent CLIs on this machine"}),l.jsxs("p",{className:"st-sub",style:{margin:"0 0 12px"},children:["The reviewer uses their own logins: no API key. ",d>=3?"Enough vendors for three judges.":d===2?"Enough for two judges; a third vendor, listed in the reviewers, allows three.":u?"Your team requires two judges from different vendors: with one, the review cannot run until another is installed.":"Two judges need two vendors; with one, the review runs with one judge and says so."]}),l.jsx("div",{className:"st-row",style:{flexWrap:"wrap",gap:8},children:o.available.map(h=>l.jsxs("span",{className:`st-chip ${h.installed?"ok":""}`,children:[h.binary,h.installed?` ${h.version??""}`:": not installed"]},h.name))})]})};function Sc(){return Ke("/api/reviewer")}const Fp=()=>{const{data:o,error:d,reload:u}=Sc();return d?l.jsxs("div",{className:"st-empty",children:["Couldn't load the reviewer's verdict: ",d,"."]}):o?l.jsx(Rp,{data:o,canWrite:Ws(),onChange:u}):l.jsx("div",{className:"st-sub",children:"Loading…"})},Dp=()=>{const{data:o,error:d,reload:u}=Sc(),[h,x]=Q.useState(null),[S,w]=Q.useState(null),[_,E]=Q.useState(null);if(d)return l.jsxs("div",{className:"st-empty",children:["Couldn't load the reviewer's settings: ",d,"."]});if(!o)return l.jsx("div",{className:"st-sub",children:"Loading…"});const D=async(V,H,I)=>{x(I),w(null);const F=await ht(V,"POST",JSON.stringify(H)),Z=await F.json().catch(()=>({}));F.ok?V.endsWith("/team")&&E(Z.diff??null):w(Z.error??`HTTP ${F.status}`),x(null),u()};return l.jsxs("section",{style:{marginTop:32},children:[l.jsx("h2",{style:{margin:"0 0 6px",fontSize:18,fontWeight:600},children:"The reviewer"}),l.jsx("p",{className:"st-sub",style:{margin:"0 0 12px",lineHeight:1.6},children:"A second opinion from other AI models, before a person reviews. Off until your team or you turn it on. With two or three judges from different vendors, a finding blocks only when most of them agree and it names what goes wrong."}),l.jsx(Mp,{data:o,canWrite:Ws(),saving:h,onSave:V=>D("/api/reviewer/settings",V,Object.keys(V)[0]),onSaveTeam:(V,H)=>D("/api/reviewer/team",{patch:V,create:H},`team:${Object.keys(V)[0]}`)}),S&&l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsx("span",{className:"st-chip bad",children:"not saved"})," ",l.jsx("span",{className:"st-sub",children:S})]}),_&&l.jsx(Nc,{diff:_}),l.jsx(Ip,{data:o})]})},Hp=o=>o==="agent"?"your agent":o==="human"?"you":o.replace(/^byok:/,""),Ap=()=>{const{data:o,error:d}=Ke("/api/pre-pr-review");return d?l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load reviews: ",d,"."]})}):o?l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"Review before the PR"}),l.jsx("p",{className:"st-lead",children:"What still stands between this branch and a person's review: the reviewer's verdict, then the risky functions your agent checked."}),l.jsx(Fp,{}),l.jsx("h2",{style:{margin:"32px 0 6px",fontSize:18,fontWeight:600},children:"Risky functions your agent checks"}),l.jsxs("p",{className:"st-sub",style:{margin:0,lineHeight:1.6},children:["Rigour picks the riskiest changed functions and asks specific questions about them. Your agent answers with its own model, or you do.",o.reviewed.total>0&&` So far: ${re(o.reviewed.total,"function")} reviewed, ${o.reviewed.fixed} fixed, ${o.reviewed.noIssue} with no issue.`]}),l.jsxs("section",{style:{marginTop:24},children:[l.jsx("h3",{style:{margin:"0 0 12px",fontSize:15,fontWeight:600},children:"Waiting"}),o.pending.length===0?l.jsx("div",{className:"st-empty",children:"No risky function in the current changes is waiting."}):l.jsx("div",{className:"st-stack",children:o.pending.map(u=>l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{className:"st-mono",style:{fontSize:14},children:u.function}),l.jsxs("span",{className:"st-mono st-sub",children:[u.file,":",u.start]})]}),l.jsx("ul",{style:{margin:"10px 0 0",paddingLeft:18,lineHeight:1.6,fontSize:14},children:u.questions.map(h=>l.jsx("li",{children:h},h))})]},`${u.file}:${u.function}`))})]}),l.jsxs("section",{style:{marginTop:28},children:[l.jsx("h3",{style:{margin:"0 0 12px",fontSize:15,fontWeight:600},children:"Checked"}),o.recent.length===0?l.jsx("div",{className:"st-empty",children:"Nothing reviewed yet. Agents review through rigour_review; you can run rigour review-task."}):l.jsx("div",{className:"st-stack",children:o.recent.map(u=>l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsxs("span",{children:[l.jsx("span",{className:`st-chip ${u.verdict==="fixed"?"ok":""}`,children:u.verdict==="fixed"?"fixed":u.verdict==="no_issue"?"no issue":u.verdict})," ",l.jsx("strong",{className:"st-mono",style:{fontSize:14,marginLeft:8},children:u.function})]}),l.jsxs("span",{className:"st-sub",children:[Hp(u.reviewer)," · ",bt(u.at)]})]}),l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:u.file}),u.note&&l.jsx("div",{style:{marginTop:10,fontSize:14,lineHeight:1.6},children:u.note})]},`${u.file}:${u.function}:${u.at}`))})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:24},children:["Model reviews with your own key: ",o.spend.runs===0?"none run here":`${re(o.spend.runs,"run")}, ${Wp(o.spend)}${o.lastModel?`, last with ${o.lastModel}`:""}`,"."]})]}):l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})})};function Wp(o){return o.runs-o.unpricedRuns===0?"cost not reported by the provider":`$${o.costUsd.toFixed(2)} observed${o.unpricedRuns?` (${o.unpricedRuns} without a reported cost)`:""}`}const fc={stopped:{label:"blocked",cls:"warn"},reported:{label:"reported",cls:"warn"},fixed:{label:"fixed",cls:"ok"},checked:{label:"checked",cls:""},reviewed:{label:"reviewed",cls:""},taught:{label:"told",cls:""},pr:{label:"PR",cls:"warn"}},Qi=o=>new Date(o).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),Up=o=>new Date(o).toLocaleDateString(void 0,{weekday:"long",month:"short",day:"numeric"}),Bp=()=>{const{data:o,error:d}=Ke("/api/activity");return d?l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load activity: ",d,"."]})}):o?l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"Activity"}),l.jsx("p",{className:"st-lead",children:"Each block is one stretch of agent work. What Rigour blocked, reported or got fixed is listed; routine checks fold away."}),o.sessions.length===0?l.jsx("div",{className:"st-empty",style:{marginTop:24},children:"Nothing yet. Activity appears as agents edit code, ask for reviews and finish their work."}):l.jsx("div",{className:"st-stack",style:{marginTop:24,gap:16},children:o.sessions.map(u=>l.jsx(Vp,{session:u},u.start))})]}):l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})})},Vp=({session:o})=>{const[d,u]=Q.useState(!1),h=o.counts,x=h.fixed+h.reviewedFixed,S=[x&&`${re(x,"problem")} fixed`,h.stopped&&`${re(h.stopped,"edit")} blocked`,h.reported&&`${re(h.reported,"edit")} reported on`,h.pr&&`${re(h.pr,"branch review")} with findings`,h.reviewed&&`${re(h.reviewed,"risky function")} reviewed${h.reviewed-h.reviewedFixed?` (${h.reviewed-h.reviewedFixed} fine)`:""}`,h.checked&&`${re(h.checked,"edit")} checked clean`,h.taught&&`lessons given ${re(h.taught,"time")}`].filter(Boolean).join(" · ");return l.jsxs("section",{className:"st-card",style:{padding:0},children:[l.jsxs("div",{style:{padding:"16px 20px",borderBottom:o.highlights.length||d?"1px solid var(--border-dim)":0},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsxs("strong",{children:[Up(o.start),", ",Qi(o.start),o.start!==o.end?`–${Qi(o.end)}`:""]}),o.rest.length>0&&l.jsx("button",{className:"st-btn",onClick:()=>u(!d),type:"button",style:{minHeight:32},children:d?"Hide routine":`Show ${re(o.rest.length,"routine item")}`})]}),l.jsx("div",{className:"st-sub",style:{marginTop:6},children:S})]}),[...o.highlights,...d?o.rest:[]].map((w,_)=>l.jsxs("div",{className:"st-row",style:{padding:"12px 20px",borderTop:_?"1px solid var(--border-dim)":0,alignItems:"flex-start"},children:[l.jsx("span",{className:`st-chip ${w.kind==="reviewed"&&w.text.startsWith("Fixed ")?"ok":fc[w.kind].cls}`,style:{minWidth:70,textAlign:"center"},children:w.kind==="reviewed"&&w.text.startsWith("Fixed ")?"fixed":fc[w.kind].label}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsx("div",{style:{fontSize:14,lineHeight:1.5},children:pn(w.text)}),w.detail&&l.jsx("div",{className:"st-sub",style:{marginTop:3,lineHeight:1.5},children:w.detail})]}),l.jsx("span",{className:"st-sub",style:{whiteSpace:"nowrap"},children:Qi(w.at)})]},`${w.at}-${_}`))]})},Qp={flag:"this run",env:"environment",user:"yours",team:"team"},Kp=({text:o,data:d,canWrite:u,saving:h,problem:x,diff:S,onSave:w})=>{const _=d.effective,E=_.required?`your team requires the ${o.name}`:void 0;return l.jsxs("section",{style:{marginTop:32},children:[l.jsx("h2",{style:{margin:"0 0 6px",fontSize:18,fontWeight:600},children:o.title}),l.jsxs("p",{className:"st-sub",style:{margin:"0 0 12px",lineHeight:1.6},children:[o.lead,!u&&" Open Studio from the link the terminal printed to change it here."]}),l.jsxs("div",{className:"st-card st-setting",children:[l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:15},children:o.row}),l.jsx("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.5},children:o.rowHelp})]}),l.jsxs("div",{className:"st-setting-controls",children:[l.jsx("span",{className:"st-sub",children:"Runs"}),l.jsxs("span",{children:[l.jsx("span",{className:"st-mono",children:_.enabled?"on":"off"})," ",l.jsxs("span",{className:"st-sub",children:["· ",Qp[_.source]]}),E&&l.jsxs("span",{title:E,"aria-label":E,children:[" ",l.jsx(As,{size:12})]})]}),l.jsx("span",{className:"st-sub",children:"Yours"}),l.jsx(Ds,{label:`Your ${o.name}`,withTeam:!0,disabled:!u||h,value:d.user??void 0,options:[{value:!0,label:"on"},{value:!1,label:"off"}],onChange:D=>w({user:D})}),l.jsx("span",{className:"st-sub",children:"Team"}),l.jsx(Ds,{label:`Team ${o.name}`,disabled:!u||h,value:d.team,options:[{value:"off",label:"off"},{value:"on",label:"on"},{value:"required",label:"required"}],onChange:D=>w({team:D,create:!d.teamFile})})]})]}),!d.teamFile&&u&&l.jsxs("div",{className:"st-sub",style:{marginTop:8},children:["This repository has no ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),": setting the team's value creates one, and from then on it uses the team setup."]}),_.refused.length>0&&l.jsx("div",{className:"st-stack",style:{marginTop:12},children:_.refused.map(D=>l.jsxs("div",{className:"st-sub",children:[l.jsx("span",{className:"st-chip warn",children:"not applied"})," ",D]},D))}),x&&l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsx("span",{className:"st-chip bad",children:"not saved"})," ",l.jsx("span",{className:"st-sub",children:x})]}),S&&l.jsx(Nc,{diff:S})]})},pc={goal:{title:"The goal check",lead:l.jsxs(l.Fragment,{children:["Checks a change against what its pull request says it is for: files outside its ",l.jsx("span",{className:"st-mono",children:"Scope"})," or inside ",l.jsx("span",{className:"st-mono",children:"Out of scope"}),", and"," ",l.jsx("span",{className:"st-mono",children:"Done when"})," items naming a file it never touched, block. No model; a description without these sections is never checked."]}),row:"Check the goal",rowHelp:l.jsxs(l.Fragment,{children:["Required: no person, environment variable or flag may turn it off. ",l.jsx("span",{className:"st-mono",children:"--goal"})," and ",l.jsx("span",{className:"st-mono",children:"--no-goal"})," choose for one run."]}),name:"goal check"},outcomes:{title:"The outcome loop",lead:l.jsxs(l.Fragment,{children:["What happened after each pull request merged: CI on its merge commit, later commits and fixes on its files, a revert. Read with"," ",l.jsx("span",{className:"st-mono",children:"rigour outcomes"}),", one GitHub call per merged pull request until its window closes, then never again."]}),row:"Read outcomes",rowHelp:l.jsxs(l.Fragment,{children:["Required: no person, environment variable or flag may turn it off. ",l.jsx("span",{className:"st-mono",children:"--outcomes"})," and ",l.jsx("span",{className:"st-mono",children:"--no-outcomes"})," choose for one run."]}),name:"outcome loop"},orchestrator:{title:"The review orchestrator",lead:l.jsxs(l.Fragment,{children:["Experimental. Triage, without a model, picks which parts of a review each change needs (earlier human points, correctness, production cost, what the change leaves behind, rules, lessons and the goal), and the judge does only those, in one pass: the same runs as one judge. A change over the judge's limit is split only with what the router has already saved over its last 20 reviews, so on average it never costs more than one judge. A change with nothing for a model to review gets no run. Under required, every part returns or there is no verdict. The daily caps (",l.jsx("span",{className:"st-mono",children:"max_runs_per_day"}),", ",l.jsx("span",{className:"st-mono",children:"max_usd_per_day"}),") count every pass. What blocks is unchanged."]}),row:"Use the orchestrator",rowHelp:l.jsxs(l.Fragment,{children:["Required: no person, environment variable or flag may turn it off. ",l.jsx("span",{className:"st-mono",children:"--orchestrator"})," and ",l.jsx("span",{className:"st-mono",children:"--no-orchestrator"})," choose for one run."]}),name:"review orchestrator"}},Ki=({name:o})=>{const d=`/api/switches/${o}`,{data:u,error:h,reload:x}=Ke(d),[S,w]=Q.useState(!1),[_,E]=Q.useState(null),[D,V]=Q.useState(null);if(h)return l.jsxs("div",{className:"st-empty",children:["Couldn't load the ",pc[o].name,": ",h,"."]});if(!u)return l.jsx("div",{className:"st-sub",children:"Loading…"});const H=async I=>{w(!0),E(null);const F=await ht(d,"POST",JSON.stringify(I)),Z=await F.json().catch(()=>({}));F.ok?"team"in I&&V(Z.diff??null):E(Z.error??`HTTP ${F.status}`),w(!1),x()};return l.jsx(Kp,{text:pc[o],data:u,canWrite:Ws(),saving:S,problem:_,diff:D,onSave:H})},qp={working:"ok","set up":"",broken:"bad",missing:"warn"},Yp=()=>{const{data:o,error:d}=Ke("/api/setup");return d?l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't check setup: ",d,"."]})}):o?l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"Setup"}),l.jsxs("p",{className:"st-lead",children:["What runs in this repository, and whether Rigour saw it work this week. The same checks run with ",l.jsx("span",{className:"st-mono",children:"rigour doctor"}),"."]}),l.jsx("div",{className:"st-stack",style:{marginTop:24},children:o.checks.map(u=>l.jsxs("div",{className:"st-card st-row",children:[l.jsx("span",{className:`st-chip ${qp[u.state]}`,style:{minWidth:72,textAlign:"center"},children:u.state}),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:15},children:u.name}),l.jsx("div",{className:"st-sub",style:{marginTop:4},children:u.detail})]}),u.fix&&u.state!=="working"&&l.jsx("span",{className:"st-mono st-sub",children:u.fix})]},u.id))}),l.jsx(Ki,{name:"goal"}),l.jsx(Ki,{name:"outcomes"}),l.jsx(Ki,{name:"orchestrator"}),l.jsx(Dp,{}),l.jsx("h2",{style:{margin:"32px 0 6px",fontSize:18,fontWeight:600},children:"Who double-checks risky code"}),l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))",marginTop:12},children:[l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Your agent's own model"}),l.jsx("span",{children:"Free"})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:["Your agent calls ",l.jsx("span",{className:"st-mono",children:"rigour_review"})," and answers Rigour's questions with the model you already pay for. No key."]})]}),l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Your own API key"}),l.jsx("span",{children:"Pay per use"})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:["For code written without an agent, and for PR reviews. ",l.jsx("span",{className:"st-mono",children:"rigour settings set-key"}),"; keys are never shown here."]})]})]})]}):l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Checking…"})})},hc=60,Gp=({request:o,onClose:d})=>{const[u,h]=Q.useState(hc),[x,S]=Q.useState(null);Q.useEffect(()=>{const _=o.timestamp?Date.parse(o.timestamp):Date.now(),E=()=>h(Math.max(0,hc-Math.floor((Date.now()-_)/1e3)));E();const D=window.setInterval(E,1e3);return()=>window.clearInterval(D)},[o.timestamp]);const w=async _=>{const E=await ht("/api/arbitrate","POST",JSON.stringify({requestId:o.requestId||o.id,decision:_}));E.ok?d():S(E.status===403?"Studio was opened without the link from your terminal, or the request expired.":`That didn't go through (HTTP ${E.status}).`)};return l.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Approve a command",style:{position:"fixed",inset:0,background:"rgba(15, 17, 22, 0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50},children:l.jsxs("div",{className:"st-card",style:{width:"min(560px, calc(100vw - 32px))",padding:24},children:[l.jsx("strong",{style:{fontSize:18},children:"Your agent wants to run a command"}),l.jsx("pre",{className:"st-code st-mono",style:{padding:"12px 14px",marginTop:14,whiteSpace:"pre-wrap"},children:o.command}),o.firewallDecision&&o.firewallDecision!=="allow"&&l.jsxs("div",{className:"st-sub",style:{marginTop:10},children:["Rigour's pre-check: ",o.firewallDecision,o.firewallReason?`: ${o.firewallReason}`:""]}),l.jsx("div",{className:"st-sub",style:{marginTop:10},children:u>0?`Denied automatically in ${u}s if nobody answers.`:"Time ran out: the request was denied."}),x&&l.jsx("div",{className:"st-sub",style:{marginTop:10,color:"var(--status-error)"},children:x}),l.jsxs("div",{className:"st-row",style:{marginTop:18,justifyContent:"flex-end"},children:[l.jsx("button",{className:"st-btn",onClick:d,type:"button",children:"Close"}),l.jsx("button",{className:"st-btn",onClick:()=>w("reject"),type:"button",disabled:u===0,children:"Deny"}),l.jsx("button",{className:"st-btn primary",onClick:()=>w("approve"),type:"button",disabled:u===0,children:"Allow"})]})]})})},mc="rigour-theme-v2",qi=[{id:"week",label:"This week",icon:Uf,page:o=>l.jsx(cp,{onNavigate:o})},{id:"progress",label:"Progress",icon:Yf,page:()=>l.jsx(mp,{})},{id:"only",label:"Only Rigour",icon:Xf,page:()=>l.jsx(gp,{})},{id:"learns",label:"How it learns",icon:Wf,page:()=>l.jsx(Tp,{})},{id:"context",label:"Agent context",icon:Df,page:()=>l.jsx(_p,{})},{id:"reviews",label:"Review",icon:Bf,page:()=>l.jsx(Ap,{})},{id:"activity",label:"Activity",icon:Yi,page:()=>l.jsx(Bp,{})},{id:"setup",label:"Setup",icon:Jf,page:()=>l.jsx(Yp,{})}],Xp=6e4;function bp(){const[o,d]=Q.useState(()=>{try{return localStorage.getItem(mc)||"light"}catch{return"light"}}),[u,h]=Q.useState("week"),[x,S]=Q.useState(null),[w,_]=Q.useState("connecting"),[E,D]=Q.useState(null),[V,H]=Q.useState(null),[I,F]=Q.useState(!0),[Z,q]=Q.useState(!1),b=Q.useCallback(async()=>{F(!0);try{const Y=await fetch("/api/health"),ve=await Y.json();H(Y.ok?ve:{error:ve.error||`HTTP ${Y.status}`})}catch(Y){H({error:Y instanceof Error?Y.message:String(Y)})}finally{F(!1)}},[]);Q.useEffect(()=>{const Y=new EventSource("/api/events");return Y.onopen=()=>_("live"),Y.onerror=()=>_("offline"),Y.onmessage=ve=>{try{const ce=JSON.parse(ve.data),Re=!ce.timestamp||Date.now()-Date.parse(ce.timestamp)<Xp;ce.type==="interception_requested"&&Re&&D(ce)}catch{}},fetch("/api/info").then(ve=>ve.json()).then(S).catch(()=>S(null)),()=>Y.close()},[]),Q.useEffect(()=>{document.documentElement.setAttribute("data-theme",o);try{localStorage.setItem(mc,o)}catch{}},[o]);const Pe=qi.find(Y=>Y.id===u)??qi[0];return l.jsxs("div",{className:"studio",children:[l.jsxs("aside",{className:"sidebar glass-shell",children:[l.jsxs("div",{className:"brand",children:[l.jsx("div",{className:"logo-icon",children:l.jsx(Kf,{size:18})}),l.jsx("span",{children:"Rigour"}),(x==null?void 0:x.studioVersion)&&l.jsxs("div",{className:"version-pill",children:["v",x.studioVersion]})]}),l.jsx("nav",{children:qi.map(Y=>l.jsxs("button",{className:`nav-item ${Y.id===Pe.id?"active":""}`,onClick:()=>h(Y.id),type:"button",children:[l.jsx(Y.icon,{size:18}),l.jsx("span",{children:Y.label})]},Y.id))}),x&&l.jsx("div",{className:"sidebar-footer",children:l.jsxs("div",{className:"trust-indicator",title:x.teamSync?"Lessons your team promotes are shared through your team store":"Nothing leaves this machine",children:[l.jsx(As,{size:14}),l.jsx("span",{children:x.teamSync?"Synced with your team":"Stored on this machine"})]})})]}),l.jsxs("main",{className:"main-content",children:[l.jsxs("header",{className:"glass-shell",children:[l.jsx("div",{className:"header-left",children:x&&l.jsx(ep,{name:x.projectName,branch:x.branch})}),l.jsxs("div",{className:"header-right",children:[l.jsx("button",{type:"button",className:"connection-status",onClick:()=>{q(Y=>!Y),b()},"aria-expanded":Z,title:"Studio receives Rigour's events live",children:l.jsxs("div",{className:`status-indicator ${w}`,children:[l.jsx("div",{className:"pulse-emitter"}),l.jsx("span",{children:w==="live"?"Live":w==="offline"?"Offline":"Connecting"})]})}),l.jsx("button",{className:"theme-toggle",onClick:()=>d(Y=>Y==="dark"?"light":"dark"),"aria-label":"Toggle theme",type:"button",children:o==="dark"?l.jsx(qf,{size:18}):l.jsx(Vf,{size:18})})]})]}),Z&&l.jsxs("div",{className:"health-popover",children:[l.jsxs("div",{className:"health-popover-title",children:[l.jsx("strong",{children:"Rigour system health"}),l.jsx("button",{type:"button",onClick:()=>q(!1),"aria-label":"Close health",children:l.jsx(xc,{size:15})})]}),l.jsx(np,{data:V,loading:I,stale:!1,onRetry:b})]}),l.jsxs("div",{className:"view-container",children:[!Ws()&&l.jsx(tp,{}),l.jsx(Zf,{resetKey:Pe.id,children:l.jsx("div",{className:"full-view",children:Pe.page(h)})})]})]}),E&&l.jsx(Gp,{request:E,onClose:()=>D(null)})]})}sp();Of.createRoot(document.getElementById("root")).render(l.jsx(Hs.StrictMode,{children:l.jsx(bp,{})}));
|
|
165
|
+
*/const xc=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);class Zf extends As.Component{constructor(){super(...arguments);Qu(this,"state",{error:null})}static getDerivedStateFromError(u){return{error:u}}componentDidUpdate(u){u.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}render(){return this.state.error?l.jsxs("div",{className:"empty-state glass-card",role:"alert",children:[l.jsx(bf,{size:48}),l.jsx("h3",{children:"This view could not be displayed"}),l.jsx("p",{children:this.state.error.message||"Studio received data it could not render."}),l.jsxs("button",{className:"refresh-btn",type:"button",onClick:()=>this.setState({error:null}),children:[l.jsx(yc,{size:16})," Retry view"]})]}):this.props.children}}function ep({name:o,branch:d}){return l.jsxs("div",{className:"project-identity",children:[l.jsx(Hf,{size:14,className:"folder-icon"}),l.jsx("span",{className:"project-name",children:o}),d&&l.jsx("span",{className:"project-version-pill",title:"Current branch",children:d})]})}const nc="rigour-readonly-note-hidden";function tp(){const[o,d]=Q.useState(()=>{try{return sessionStorage.getItem(nc)==="1"}catch{return!1}});if(o)return null;const u=()=>{try{sessionStorage.setItem(nc,"1")}catch{}d(!0)};return l.jsxs("div",{className:"overview-banner readonly-note",role:"note",children:[l.jsx(Hs,{size:16}),l.jsxs("span",{children:["Read-only. Open the link ",l.jsx("code",{children:"rigour studio"})," printed in your terminal: it gives this tab edit rights."]}),l.jsx("button",{className:"readonly-note-close",onClick:u,type:"button","aria-label":"Hide this note",children:l.jsx(xc,{size:14})})]})}function An({icon:o,label:d,status:u,detail:h}){const x=["ready","active","online","local"].includes(u)?"ready":["warming","idle","missing"].includes(u)?"warming":"degraded";return l.jsxs("div",{className:`health-item ${x}`,children:[l.jsx(o,{size:15,"aria-hidden":"true"}),l.jsxs("span",{children:[l.jsx("strong",{children:d}),l.jsx("small",{children:h})]}),l.jsx("span",{className:"health-state",children:u})]})}function np({data:o,loading:d,stale:u,onRetry:h}){var S,w,_,E,D,V,A,I,F,Z,q,X,Pe,Y,ve,ce,Re;if(d&&!o)return l.jsxs("div",{className:"system-health loading",children:[l.jsx(Yi,{size:16,className:"spinning"})," Checking system health…"]});if(!o||o.error)return l.jsxs("div",{className:"system-health unavailable",role:"alert",children:[l.jsx(tc,{size:16})," Health unavailable",l.jsxs("button",{type:"button",onClick:h,children:[l.jsx(yc,{size:14})," Retry"]})]});const x=Object.values(((S=o.caches)==null?void 0:S.layers)??{}).filter(Ee=>Ee>0).length;return l.jsxs("section",{className:`system-health ${u?"stale":""}`,"aria-label":"System health",children:[l.jsx(An,{icon:Af,label:"Index",status:((w=o.index)==null?void 0:w.status)??"missing",detail:`${((_=o.index)==null?void 0:_.patterns)??0} patterns · ${((E=o.index)==null?void 0:E.files)??0} files`}),l.jsx(An,{icon:Xf,label:"Graph",status:((D=o.graph)==null?void 0:D.status)??"missing",detail:`${((V=o.graph)==null?void 0:V.nodes)??0} nodes · ${((A=o.graph)==null?void 0:A.edges)??0} edges`}),l.jsx(An,{icon:Ff,label:"Semantic",status:((I=o.semantic)==null?void 0:I.status)??"disabled",detail:((F=o.semantic)==null?void 0:F.message)??"Background enrichment"}),l.jsx(An,{icon:Qf,label:"Cache",status:((Z=o.caches)==null?void 0:Z.status)??"warming",detail:`${x}/4 layers populated`}),l.jsx(An,{icon:Yi,label:"Learning",status:((q=o.learning)==null?void 0:q.status)??"idle",detail:`${((X=o.learning)==null?void 0:X.observations)??0} interactions · ${((Pe=o.learning)==null?void 0:Pe.total)??0} lessons`}),l.jsx(An,{icon:tc,label:"Storage",status:((Y=o.storage)==null?void 0:Y.connectivity)??"local",detail:((ve=o.storage)==null?void 0:ve.connectivity)==="offline"?`${((ce=o.storage)==null?void 0:ce.queuedChanges)??0} queued`:((Re=o.storage)==null?void 0:Re.mode)??"local"})]})}const wc="rigour-studio-key",rp="x-rigour-studio-key";function sp(){const o=window.location.hash.match(/(?:^#|&)key=([a-f0-9]+)/);if(o){try{sessionStorage.setItem(wc,o[1])}catch{}window.history.replaceState(null,"",window.location.pathname+window.location.search)}}function Ws(){return kc().length>0}function kc(){try{return sessionStorage.getItem(wc)??""}catch{return""}}function ht(o,d,u,h="application/json"){const x={[rp]:kc()};return u!==void 0&&(x["Content-Type"]=h),fetch(o,{method:d,headers:x,body:u})}const lp=({onHide:o})=>l.jsxs("section",{className:"st-card",style:{marginBottom:28},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between",marginBottom:16},children:[l.jsx("strong",{children:"How Rigour works"}),l.jsx("button",{className:"st-btn",onClick:o,type:"button",children:"Got it"})]}),l.jsxs("div",{className:"st-steps",children:[l.jsxs("div",{className:"st-step",children:[l.jsx("span",{className:"st-num",children:"1"}),l.jsxs("div",{children:["Your agent writes code",l.jsx("div",{className:"st-sub",children:"Claude Code, Cursor, Cline or Windsurf are checked as they edit; any agent at push."})]})]}),l.jsxs("div",{className:"st-step",children:[l.jsx("span",{className:"st-num",children:"2"}),l.jsxs("div",{children:["Rigour checks the change",l.jsx("div",{className:"st-sub",children:"It stops the agent only on problems it can prove."})]})]}),l.jsxs("div",{className:"st-step",children:[l.jsx("span",{className:"st-num",children:"3"}),l.jsxs("div",{children:["Your PR arrives clean",l.jsx("div",{className:"st-sub",children:"A short review catches the rest; with learning on, fixes become lessons."})]})]})]})]}),jc={edit:"while the agent was writing",review:"when the agent checked its work",stop:"before the agent said done",pr:"at the pull request"};function Xt(o,d=Date.now()){const u=Math.round((d-Date.parse(o))/6e4);if(!Number.isFinite(u))return"";if(u<60)return`${Math.max(1,u)} min ago`;const h=Math.round(u/60);return h<48?`${h} h ago`:new Date(o).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})}function re(o,d,u=`${d}s`){return`${o} ${o===1?d:u}`}function Ke(o){const[d,u]=Q.useState(null),[h,x]=Q.useState(null),S=Q.useCallback(()=>{fetch(o).then(async w=>w.ok?u(await w.json()):x(`HTTP ${w.status}`)).catch(w=>x(w instanceof Error?w.message:String(w)))},[o]);return Q.useEffect(S,[S]),{data:d,error:h,reload:S}}function pn(o){return o.split(/(`[^`]+`)/g).map((d,u)=>d.startsWith("`")&&d.endsWith("`")&&d.length>2?As.createElement("code",{key:u,className:"st-mono st-inline-code"},d.slice(1,-1)):d)}function ip(o){return o.replace(/(['"`])(?:(?!\1).)*\1/g,"…").replace(/\b\d+(?:\.\d+)?\b/g,"N").replace(/\s+/g," ").trim()}function op(o){const d=o.reduce((h,x)=>h+x.needs.length,0);if(d===0)return"Nothing needs you.";const u=`${re(d,"finding needs","findings need")} you`;return d===o.length?`${u}.`:`${u}, of ${re(o.length,"kind")}.`}function ap(o){const d=new Map,u=[...o].sort((h,x)=>Date.parse(x.openedAt)-Date.parse(h.openedAt));for(const h of u){const x=ip(h.title),S=`${h.rule}\0${x}`,w=d.get(S)??{rule:h.rule,pattern:x,needs:[],files:0};w.needs.push(h),d.set(S,w)}for(const h of d.values())h.files=new Set(h.needs.map(x=>x.file)).size;return[...d.values()]}const up=({group:o,onDone:d})=>{const[u,h]=Q.useState(!1);return o.needs.length===1?l.jsx(rc,{need:o.needs[0],onDone:d}):l.jsxs("div",{children:[l.jsxs("button",{className:"st-story",onClick:()=>h(!u),type:"button","aria-expanded":u,children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("span",{className:"st-chip warn",children:"open"}),l.jsxs("span",{className:"st-sub",children:["newest ",Xt(o.needs[0].openedAt)]})]}),l.jsxs("div",{style:{fontSize:17,marginTop:10,lineHeight:1.5},children:[o.needs.length," × ",o.pattern,", in ",re(o.files,"file")]}),l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:o.rule})]}),u&&l.jsx("div",{className:"st-stack",style:{marginTop:10},children:o.needs.map(x=>l.jsx(rc,{need:x,onDone:d},`${x.rule}:${x.file}:${x.openedAt}`))})]})},rc=({need:o,onDone:d})=>{const[u,h]=Q.useState("idle"),x=async()=>{const w=window.prompt("Why is this not a bug? Rigour keeps the reason with the dismissal.");if(!(w!=null&&w.trim())||!o.key)return;(await ht("/api/dismiss","POST",JSON.stringify({key:o.key,reason:w}))).ok?d():h("failed")},S=async()=>{try{await navigator.clipboard.writeText(`Rigour found a problem you introduced: ${o.title} in ${o.file}. Fix it, then run rigour review.`),h("copied")}catch{h("failed")}};return l.jsxs("div",{className:"st-need",children:[l.jsxs("div",{className:"st-row",children:[l.jsx("span",{className:"st-chip warn",children:"open"}),l.jsxs("span",{className:"st-sub",children:["found ",o.stage?jc[o.stage]:""," · ",Xt(o.openedAt)]})]}),l.jsx("div",{style:{fontSize:17,marginTop:10,lineHeight:1.5},children:o.title}),l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:o.file}),l.jsxs("div",{className:"st-row",style:{marginTop:14,flexWrap:"wrap"},children:[l.jsx("button",{className:"st-btn primary",onClick:S,type:"button",children:u==="copied"?"Copied: paste it to your agent":"Copy for my agent"}),o.key&&l.jsx("button",{className:"st-btn",onClick:x,type:"button",children:"It's fine, not a bug"}),u==="failed"&&l.jsx("span",{className:"st-sub",children:"That didn't work. Open Studio from the link in your terminal and try again."})]})]})},sc="rigour-intro-hidden",cp=({onNavigate:o})=>{const{data:d,error:u,reload:h}=Ke("/api/week"),[x,S]=Q.useState(null),[w,_]=Q.useState(()=>{try{return localStorage.getItem(sc)!=="1"}catch{return!0}});if(u)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load this week: ",u,"."]})});if(!d)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const E=()=>{try{localStorage.setItem(sc,"1")}catch{}_(!1)},D=d.needs,V=ap(D);return l.jsxs("div",{className:"st-page",children:[w&&l.jsx(lp,{onHide:E}),l.jsx("h1",{className:"st-h1",children:op(V)}),l.jsx("p",{className:"st-lead",children:d.stopped.total>0?`${re(d.stopped.total,"problem")} stopped before a pull request this week, ${d.stopped.fixed} fixed so far.`:d.recordingSince?"Nothing was stopped this week.":"Rigour has not recorded any agent work in this repository yet."}),D.length>0&&l.jsx(dp,{onDone:h}),V.length>0&&l.jsx("div",{className:"st-stack",style:{marginTop:18},children:V.map(A=>l.jsx(up,{group:A,onDone:h},`${A.rule}:${A.pattern}`))}),l.jsxs("div",{className:"st-grid",children:[l.jsxs("section",{children:[l.jsx("h2",{style:{margin:"0 0 14px",fontSize:18,fontWeight:600},children:"What Rigour stopped this week"}),d.stories.length===0?l.jsx("div",{className:"st-empty",children:"When an agent fixes something Rigour caught, it appears here with the code change."}):l.jsx("div",{className:"st-stack",children:d.stories.map(A=>l.jsx(fp,{story:A,open:x===A.id,onToggle:()=>S(x===A.id?null:A.id)},A.id))})]}),l.jsxs("aside",{className:"st-side",children:[l.jsxs("div",{className:"st-card",children:[l.jsx("div",{className:"st-big",children:d.stopped.total}),l.jsx("div",{style:{fontSize:14,marginTop:6},children:"stopped before a PR"}),l.jsxs("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:[d.stopped.byStage.edit," while writing · ",d.stopped.byStage.review," on review · ",d.stopped.byStage.stop," before done"]}),l.jsx(pp,{data:d})]}),l.jsxs("div",{className:"st-card",children:[l.jsx("div",{style:{fontSize:15,fontWeight:600},children:"Is it noisy?"}),l.jsx("div",{style:{fontSize:14,marginTop:8,lineHeight:1.6},children:d.raised===0?"Nothing raised this week.":`Rigour raised ${re(d.raised,"problem")} this week. You overruled ${d.overruled}.`}),l.jsx("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:'Say "not a bug" once and Rigour stops raising it.'})]}),l.jsx("button",{className:"st-btn",onClick:()=>o("learns"),type:"button",children:"See how it learns"}),d.recordingSince&&l.jsxs("div",{className:"st-sub",children:["Recording since ",new Date(d.recordingSince).toLocaleDateString()]})]})]})]})},dp=({onDone:o})=>{const[d,u]=Q.useState(null),h=async()=>{const x=await ht("/api/recheck","POST","{}");if(!x.ok)return u("Could not check again.");const{closed:S,fixed:w}=await x.json(),_=[w?`${re(w,"fix")} by the agent recorded`:"",S?`${re(S,"finding")} no longer reported, closed (not counted as fixes)`:""].filter(Boolean).join("; ");u(_?`${_}.`:"Every one is still reported."),o()};return l.jsxs("div",{className:"st-row",style:{marginTop:10,gap:12},children:[l.jsx("button",{className:"st-btn",onClick:h,type:"button",children:"Check these again"}),d&&l.jsx("span",{className:"st-sub",children:d})]})},fp=({story:o,open:d,onToggle:u})=>l.jsxs("div",{children:[l.jsxs("button",{className:"st-story",onClick:u,type:"button","aria-expanded":d,children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("span",{className:"st-chip",children:jc[o.stage]}),l.jsx("span",{className:"st-sub",children:Xt(o.at)})]}),l.jsx("div",{style:{fontSize:16,lineHeight:1.55,marginTop:10},children:pn(o.title)}),l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:[l.jsx("span",{className:"st-mono",children:o.file})," · fixed by the agent"]})]}),d&&l.jsxs("div",{className:"st-story-body",children:[o.diff.length>0&&l.jsx("div",{className:"st-code st-mono",children:o.diff.map((h,x)=>l.jsx("span",{className:`st-ln ${h[0]==="+"?"add":h[0]==="-"?"del":""}`,children:h},x))}),o.details&&o.details!==o.title&&l.jsxs("div",{style:{marginTop:o.diff.length?16:0},children:[l.jsx("strong",{style:{fontSize:13},children:o.stage==="review"&&o.rule==="review"?"What the agent fixed":"How Rigour knew"}),l.jsx("div",{className:"st-sub",style:{marginTop:6,lineHeight:1.6},children:pn(o.details)})]})]})]}),pp=({data:o})=>{const[d,u]=Q.useState(!1);if(o.stopped.total===0)return null;const h=`Rigour stopped ${re(o.stopped.total,"problem")} before a pull request this week: ${o.stopped.byStage.edit} while the agent was writing, ${o.stopped.byStage.review} when it checked its work, ${o.stopped.byStage.stop} before it said done. ${o.stopped.fixed} fixed so far. ${o.overruled} of ${o.raised} overruled.`,x=async()=>{try{await navigator.clipboard.writeText(h),u(!0)}catch{}};return l.jsx("button",{className:"st-btn",onClick:x,type:"button",style:{marginTop:14,width:"100%"},children:d?"Copied":"Copy this week"})},hp=o=>new Date(o).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Hi=(o,d)=>o.reduce((u,h)=>u+d(h),0),mp=()=>{var S;const{data:o,error:d}=Ke("/api/progress");if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load progress: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const u=o.weeks.slice(-4),h=o.weeks.slice(0,-4),x=((S=o.weeks[o.weeks.length-1])==null?void 0:S.lessons)??0;return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"How Rigour is shaping this code"}),l.jsxs("p",{className:"st-lead",children:["Last 4 weeks: ",re(Hi(u,w=>w.stopped),"problem")," stopped before a PR",h.length?` (${Hi(h,w=>w.stopped)} in the 4 weeks before)`:"",", ",re(Hi(u,w=>w.repeatsStopped),"repeat mistake")," caught,"," ",re(x,"lesson")," learned so far."]}),l.jsxs("div",{className:"st-stack",style:{marginTop:24},children:[l.jsx(Hn,{title:"Stopped before a PR",hint:"fixed by the agent after Rigour reported it",weeks:o.weeks,value:w=>w.stopped}),l.jsx(Hn,{title:"Repeat mistakes stopped",hint:"a mistake Rigour had already learned, caught again before a PR",weeks:o.weeks,value:w=>w.repeatsStopped}),l.jsx(Hn,{title:"Repeat mistakes that reached a PR",hint:"lower is better",weeks:o.weeks,value:w=>w.repeatsReachedPr,empty:"Shows once branch reviews run on this machine, for example rigour review --base main in a pre-push hook."}),l.jsx(Hn,{title:"Minutes from report to fix",hint:"median; lower is better",weeks:o.weeks,value:w=>w.minutesToFix}),l.jsx(Hn,{title:"Overruled",hint:"findings someone marked not a bug",weeks:o.weeks,value:w=>w.overruled}),l.jsx(Hn,{title:"Lessons learned",hint:"total by the end of each week",weeks:o.weeks,value:w=>w.lessons})]}),l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},children:[l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"Lessons that stopped the most repeats"}),o.topLessons.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:"None yet. A lesson ranks here once the mistake it describes is caught again and stopped."}):l.jsx("ol",{style:{margin:"12px 0 0",paddingLeft:20,lineHeight:1.6},children:o.topLessons.map(w=>l.jsxs("li",{style:{marginBottom:8},children:[pn(w.text),l.jsxs("div",{className:"st-sub",children:[re(w.stoppedInDevelopment??0,"repeat")," stopped · ",w.scope==="team"?"shared with team":w.scope]})]},w.id))})]}),l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"Checks your team acts on"}),o.checks.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:'Each fix and each "not a bug" scores the check that raised it. Scores appear after the first one.'}):l.jsx("div",{className:"st-stack",style:{marginTop:12,gap:8},children:o.checks.map(w=>l.jsxs("div",{className:"st-row",style:{gap:10},children:[l.jsxs("span",{style:{width:44,fontWeight:600},children:[Math.round(w.precision*100),"%"]}),l.jsx("span",{style:{flex:1,fontSize:14},children:w.check}),l.jsxs("span",{className:"st-sub",children:[w.fixed," fixed · ",w.dismissed," overruled"]}),w.muted&&l.jsx("span",{className:"st-chip",children:"quiet"})]},w.check))})]})]})]})},Hn=({title:o,hint:d,weeks:u,value:h,empty:x})=>{const S=u.map(h),w=S.filter(E=>E!==null),_=Math.max(1,...w);return l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:o}),l.jsx("span",{className:"st-sub",children:d})]}),w.length===0&&x?l.jsx("div",{className:"st-sub",style:{marginTop:10},children:x}):l.jsx("div",{className:"st-bars",style:{height:90,gap:12},children:u.map((E,D)=>l.jsxs("div",{className:"st-bar",children:[l.jsx("div",{style:{fontSize:12},children:S[D]??"—"}),l.jsx("span",{style:{height:`${S[D]===null?2:Math.max(2,S[D]/_*56)}px`,opacity:S[D]===null?.25:1}}),l.jsx("div",{className:"st-sub",style:{fontSize:11},children:hp(E.from)})]},E.from))})]})},gp=()=>{const{data:o,error:d}=Ke("/api/week"),u=Ke("/api/setup").data,h=u==null?void 0:u.checks.some(S=>S.id==="stop"&&S.state!=="missing"&&S.state!=="broken");if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const x=o.stories.filter(S=>S.stage==="stop");return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"What only Rigour caught"}),l.jsx("p",{className:"st-lead",children:"Counted only where Rigour can show it. A bug stopped before a PR never reached your other reviewers, so it is not counted against them."}),l.jsxs("section",{style:{marginTop:28},children:[l.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600},children:"Your agent tried to finish with a bug"}),l.jsx("p",{className:"st-lead",style:{fontSize:14},children:o.agentSaidDone===0&&u&&!h?"The stop hook is not set up in this repository, so Rigour cannot see an agent finish. Run rigour setup.":o.agentSaidDone===0?"This week no agent tried to finish with a problem Rigour could prove.":`This week an agent tried to finish with a problem Rigour proved ${re(o.agentSaidDone,"time")}. Each was fixed before the agent stopped.`}),l.jsx("div",{className:"st-stack",style:{marginTop:14},children:x.map(S=>l.jsxs("div",{className:"st-card st-row",children:[l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:15,lineHeight:1.5},children:S.title}),l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[l.jsx("span",{className:"st-mono",children:S.file})," · ",Xt(S.at)]})]}),l.jsx("span",{className:"st-chip ok",children:"fixed"})]},S.id))})]}),l.jsxs("section",{style:{marginTop:32},children:[l.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600},children:"Rigour and your other PR reviewers"}),l.jsxs("div",{className:"st-empty",style:{marginTop:14},children:[o.prCatches===null?"No branch reviews recorded on this machine yet.":`Branch reviews here reported ${re(o.prCatches,"problem")} this week.`," ","Side by side with teammates and review bots (both caught it, only Rigour, only them) needs the PR's review comments; it comes with the PR integration."]})]})]})},vp=()=>l.jsxs("p",{className:"st-lead",children:["Every mistake fixed in development or caught at a PR becomes a lesson. An agent gets the lessons when it asks for a brief (the ",l.jsx("code",{children:"rigour_brief"})," tool, or ",l.jsx("code",{children:"rigour brief"}),"). In Claude Code, ",l.jsx("code",{children:"rigour hooks init --brief"})," hands them over by itself: at a session's first prompt and on each file's first edit."]}),yp={verified:"Promoted: agents are told it.",rejected:"Dropped: agents are told the team decided against it.",dropped:"Not a rule: never told to agents."},Wi={accepted:"accepted",rejected:"rejected",dismissed:"dismissed",scoped:"set how far it reaches",reworded:"reworded",compiled:"decided its compiled check","not-a-rule":"judged not a rule","took-back":"took back the decision on"},lc=o=>o.slice(0,10),xp=({team:o})=>l.jsxs("div",{style:{marginTop:14},children:[o.overruled&&l.jsxs("div",{children:[l.jsx("span",{className:"st-chip warn",children:"the team decided"})," ",l.jsxs("span",{className:"st-sub",children:["You ",Wi[o.overruled.yours]??o.overruled.yours," it",o.overruled.yoursOnly?` (yours only: ${o.overruled.yoursOnly})`:"","; ",o.overruled.team.name," ",Wi[o.overruled.team.kind]??o.overruled.team.kind," it on ",lc(o.overruled.team.at),", and the team's decision is what agents are told."]})]}),o.decisions.map(d=>l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[d.name," (team) ",Wi[d.kind]??d.kind," it on ",lc(d.at),d.detail?`: ${d.detail}`:""]},`${d.at}-${d.kind}-${d.name}`))]}),wp=({count:o,shown:d,onToggle:u})=>l.jsxs("div",{className:"st-row",style:{marginTop:12,gap:8},children:[l.jsxs("span",{className:"st-sub",children:[o," candidate",o===1?"":"s"," from review bots",d?"":", hidden","."]}),l.jsx("button",{type:"button",className:"st-btn",onClick:u,children:d?"Hide bot points":"Show bot points"})]}),Ui=(o,d=!0)=>d?o===null?"not recorded here":o===1?"1 time":`${o} times`:"—",kp=({lesson:o,onDecide:d,onDecideReview:u,onScope:h})=>l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsx("div",{style:{fontSize:17,lineHeight:1.5,flex:1},children:pn(o.text)}),l.jsx("span",{className:"st-chip",children:o.scope==="team"?"shared with team":o.scope})]}),l.jsxs("div",{className:"st-journey",children:[l.jsxs("div",{style:{background:"var(--bg-surface)"},children:[l.jsx("div",{className:"st-sub",children:"Learned"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:o.learnedFrom})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Agents told"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:Ui(o.told)})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Stopped in development"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:Ui(o.stoppedInDevelopment,o.origin==="development")})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Reached a PR again"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:Ui(o.reachedPr,o.origin==="development")})]})]}),o.team&&l.jsx(xp,{team:o.team}),o.takenBack&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsx("span",{className:"st-chip warn",children:"taken back"})," ",l.jsx("span",{className:"st-sub",children:o.takenBack.detail})]}),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsx("span",{className:"st-sub",children:"Later pull requests a review found repeating it merged and stayed fine. Keep telling agents anyway?"}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote again"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"rejected"),type:"button",children:"Drop"})]})]}),o.reclassified&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsx("span",{className:"st-chip warn",children:"back to candidate"})," ",l.jsx("span",{className:"st-sub",children:o.reclassified.detail})]}),o.reclassified.evidence.map(x=>l.jsx("div",{className:"st-sub",style:{marginTop:4},children:x},x)),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsx("span",{className:"st-sub",children:"A later fix on its lines used to make this a lesson by itself; now a person decides. Keep telling agents?"}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"dismissed"),type:"button",children:"Dismiss"})]})]}),o.suggested&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsx("span",{className:"st-chip",children:"a later fix changed these lines"})," ",l.jsx("span",{className:"st-sub",children:o.suggested.detail})]}),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsxs("span",{className:"st-sub",children:["The pull request (#",o.suggested.pr,") left this point alone, and a later fix changed its lines. If that fix is about this point, the lesson was right."]}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"dismissed"),type:"button",children:"Dismiss"})]})]}),o.reach&&l.jsx(Np,{lesson:o,reach:o.reach,onScope:h}),o.suggestedText&&l.jsxs("div",{style:{marginTop:14},children:[l.jsxs("div",{children:[l.jsxs("span",{className:"st-chip",children:["corrected wording (",o.suggestedText.why,")"]})," ",l.jsx("span",{style:{fontSize:15},children:pn(o.suggestedText.text)})]}),l.jsxs("div",{className:"st-row",style:{marginTop:10},children:[l.jsx("span",{className:"st-sub",children:"You decided on this lesson as it reads above. A newer version reads its comment better; the lesson changes only if you take it."}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"reworded"),type:"button",children:"Use this wording"})]})]}),o.canDecide&&o.origin==="pr"&&!o.takenBack&&!o.suggested&&!o.reclassified&&l.jsxs("div",{className:"st-row",style:{marginTop:14},children:[l.jsx("span",{className:"st-sub",children:"From review, not confirmed yet. Is this how your team works, so agents get told? A one-off task for that pull request is not a rule; Drop tells agents the team decided against it."}),l.jsx("button",{className:"st-btn primary",onClick:()=>u==null?void 0:u(o.id,"accepted"),type:"button",children:"Promote"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"not-a-rule"),type:"button",children:"Not a rule"}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"rejected"),type:"button",title:"Agents are told the team decided against this",children:"Drop"})]}),o.canTakeBack&&l.jsxs("div",{className:"st-row",style:{marginTop:14},children:[l.jsxs("span",{className:"st-sub",children:[yp[o.state]??"Decided."," Changed your mind? Taking it back makes it a candidate again; the decision stays in its history."]}),l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,"took-back"),type:"button",children:"Take back"})]}),o.canDecide&&o.origin!=="pr"&&!o.takenBack&&!o.suggested&&!o.reclassified&&l.jsxs("div",{className:"st-row",style:{marginTop:14},children:[l.jsx("span",{className:"st-sub",children:o.scope==="team"?"Shared by a teammate. Give it to everyone's agents?":"Seen once. Keep it so your agents get told?"}),l.jsx("button",{className:"st-btn primary",onClick:()=>d(o.id,o.scope==="team"?"promoted":"validated"),type:"button",children:o.scope==="team"?"Share with team":"Keep"}),l.jsx("button",{className:"st-btn",onClick:()=>d(o.id,"rejected"),type:"button",children:"Drop"})]})]}),jp={file:"its file",folder:"its folder",repo:"team standard"},Np=({lesson:o,reach:d,onScope:u})=>{const h=[["repo","Make team standard"],["folder","Folder only"],["file","This file only"]].filter(([x])=>x!==d.scope&&(d.hasFile||x==="repo"));return l.jsxs("div",{className:"st-row",style:{marginTop:12,flexWrap:"wrap",gap:8},children:[l.jsxs("span",{className:"st-chip",children:["reaches: ",d.hasFile||d.scope==="repo"?jp[d.scope]:"changes it is about"]}),h.map(([x,S])=>l.jsx("button",{className:"st-btn",onClick:()=>u==null?void 0:u(o.id,x),type:"button",children:S},x))]})},Sp=({model:{share:o,costPerPr:d}})=>l.jsxs("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:["The model reviewer: ",o.model," of ",o.model+o.checks," findings at first review on ",o.prs," pull request",o.prs===1?"":"s",o.rate===null?"":` (${Math.round(o.rate*100)}%)`,", the rest from the free checks."," ","It cost $",d.totalUsd.toFixed(2)," over ",d.prs," pull request",d.prs===1?"":"s",d.medianUsd===null?"":`, $${d.medianUsd.toFixed(2)} each at the median`,".",d.prsEarlierBasis?` ${d.prsEarlierBasis} more reviewed before every run was counted, left out.`:""]}),ic=o=>`${o.count} of ${o.of}${o.rate===null?"":` (${Math.round(o.rate*100)}%)`}`,Cp=({numbers:o})=>l.jsxs("section",{className:"st-card",style:{margin:"0 0 24px"},children:[l.jsx("strong",{children:"After the merge"}),l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[o.records.merged," merged pull requests read on this machine; ",o.records.settled," settled, ",o.records.unsettled," with the window still open."]}),l.jsxs("div",{className:"st-journey",style:{marginTop:10},children:[l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"CI regressed on the merge"}),l.jsxs("div",{style:{fontSize:14,marginTop:4},children:[ic(o.settled.ciRegressed),o.settled.ciUnknown?`, ${o.settled.ciUnknown} with no CI to read`:""]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Reverted"}),l.jsx("div",{style:{fontSize:14,marginTop:4},children:ic(o.settled.reverted)})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Reviewed by Rigour"}),l.jsxs("div",{style:{fontSize:14,marginTop:4},children:[o.settled.reviewed.prs," pull requests, ",o.settled.reviewed.fixedLater.count," fixed later"]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"st-sub",children:"Not reviewed"}),l.jsxs("div",{style:{fontSize:14,marginTop:4},children:[o.settled.notReviewed.prs," pull requests, ",o.settled.notReviewed.fixedLater.count," fixed later"]})]})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:["Lessons: ",o.lessons.awaitingDecision," waiting on you, ",o.lessons.promotedFromEvidence," promoted from evidence, ",o.lessons.dismissed," dismissed, ",o.lessons.takenBack," taken back."," ","Teams choose which pull requests get reviewed, so the two groups differ: this is not a comparison."]}),o.model&&l.jsx(Sp,{model:o.model})]}),oc=o=>`${o.fired} of ${o.n}${o.rate===null?"":` (${Math.round(o.rate*100)}%)`}`,Tp=({checks:o,onDecide:d,onPropose:u})=>l.jsxs("section",{className:"st-card",style:{margin:"24px 0"},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Lessons compiled into checks"}),l.jsx("button",{className:"st-btn",type:"button",onClick:u,children:"Propose checks"})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.6},children:["A verified lesson that names its file and symbols becomes a check that runs on every review, for free; the model reviewer stops spending prompt on it. A proposed check runs only once you approve it. Who approved it, by git email, is committed with it in ",l.jsx("span",{className:"st-mono",children:".rigour/compiled-checks.json"}),"."]}),o.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10},children:"None yet. Propose checks once a lesson says never, avoid, instead of, always or must about a symbol in backticks."}):l.jsx("div",{className:"st-stack",style:{marginTop:12},children:o.map(h=>l.jsxs("div",{className:"st-need",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("span",{className:`st-chip ${h.suspended?"bad":h.state==="active"?"ok":h.state==="proposed"?"warn":""}`,children:h.suspended?"suspended":h.state}),l.jsx("span",{className:"st-sub st-mono",children:h.files})]}),l.jsx("div",{style:{marginTop:8},children:h.kind==="forbid"?l.jsxs(l.Fragment,{children:["Reports ",l.jsx("code",{children:h.symbol})," on a changed line."]}):l.jsxs(l.Fragment,{children:["Reports ",l.jsx("code",{children:h.symbol})," with no ",l.jsx("code",{children:h.with})," within three lines."]})}),l.jsxs("div",{className:"st-sub",style:{marginTop:4},children:[pn(h.message)," · lesson ",h.lessonId,h.by?` · ${h.state==="withdrawn"?"taken back":"approved"} by ${h.by}`:""]}),h.suspended&&l.jsx("div",{className:"st-sub",style:{marginTop:6},children:h.suspended}),h.backtest&&l.jsxs("div",{className:"st-sub",style:{marginTop:6,lineHeight:1.6},children:["On the last ",h.backtest.commits," merged changes to its files: fires on ",oc(h.backtest.repeating)," where a review found the lesson repeating, and on ",oc(h.backtest.other)," others (each a false fire, or a catch the review missed)."]}),l.jsxs("div",{className:"st-row",style:{marginTop:10,gap:8},children:[h.state!=="active"&&l.jsx("button",{className:"st-btn",type:"button",onClick:()=>d(h.id,"active"),children:"Approve"}),h.state==="active"&&l.jsx("button",{className:"st-btn",type:"button",onClick:()=>d(h.id,"withdrawn"),children:"Take back"})]})]},h.id))})]}),Ep=()=>{const{data:o,error:d,reload:u}=Ke("/api/learning"),[h,x]=As.useState(!1);if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load lessons: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const S=async(F,Z)=>{(await ht("/api/lessons","POST",JSON.stringify({id:F,state:Z}))).ok&&u()},w=async(F,Z)=>{(await ht("/api/review-lessons","POST",JSON.stringify({id:F,decision:Z}))).ok&&u()},_=async(F,Z)=>{const q=await ht("/api/review-lessons","POST",JSON.stringify({id:F,decision:"scope",to:Z}));q.ok?u():window.alert((await q.json().catch(()=>({}))).error??"Could not record the decision.")},E=async(F,Z)=>{const q=await ht("/api/compiled-checks","POST",JSON.stringify({id:F,state:Z}));q.ok?u():window.alert((await q.json().catch(()=>({}))).error??"Could not record the decision.")},D=async()=>{(await ht("/api/compiled-checks","POST",JSON.stringify({propose:!0}))).ok&&u()},V=o.lessons.filter(F=>F.fromBots).length,A=h?o.lessons:o.lessons.filter(F=>!F.fromBots),I=Math.max(1,...o.weeks.map(F=>Math.max(F.stoppedInDevelopment,F.reachedPr??0)));return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"How Rigour learns your codebase"}),l.jsx(vp,{}),l.jsxs("section",{className:"st-card",style:{margin:"24px 0"},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Repeat mistakes, by week"}),l.jsx("span",{className:"st-sub",children:"a mistake Rigour had already learned"})]}),l.jsx("div",{className:"st-bars",children:o.weeks.map(F=>l.jsxs("div",{className:"st-bar",children:[l.jsxs("div",{style:{fontSize:13},children:[F.stoppedInDevelopment," stopped",F.reachedPr===null?"":` · ${F.reachedPr} reached a PR`]}),l.jsx("span",{style:{height:`${Math.max(4,F.stoppedInDevelopment/I*80)}px`}}),l.jsxs("div",{className:"st-sub",children:["from ",new Date(F.from).toLocaleDateString(void 0,{month:"short",day:"numeric"})]})]},F.from))}),!o.prRecorded&&l.jsxs("div",{className:"st-sub",style:{marginTop:14},children:["Repeats that reached a PR show once branch reviews run on this machine (",l.jsx("span",{className:"st-mono",children:"rigour review --base main"}),", for example in a pre-push hook). Reviews in CI stay in CI."]})]}),o.outcomes&&l.jsx(Cp,{numbers:o.outcomes}),l.jsx(Tp,{checks:o.compiled??[],onDecide:E,onPropose:D}),o.lessons.length===0?l.jsx("div",{className:"st-empty",children:"No lessons yet. They form when an agent fixes something Rigour reported, when a PR comment leads to a fix, or when you tell your agent to remember something."}):l.jsx("div",{className:"st-stack",children:A.map(F=>l.jsx(kp,{lesson:F,onDecide:S,onDecideReview:w,onScope:_},F.id))}),V>0&&l.jsx(wp,{count:V,shown:h,onToggle:()=>x(!h)}),l.jsx(_p,{})]})},_p=()=>{var h,x,S;const o=Ke("/api/learned-rules").data??[],d=Object.entries(((h=Ke("/api/memory").data)==null?void 0:h.memories)??{}),u=(S=(x=Ke("/api/index-stats").data)==null?void 0:x.stats)==null?void 0:S.totalPatterns;return l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},children:[l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"Rules learned from fixes"}),l.jsx("div",{className:"st-sub",style:{marginTop:4},children:"Checked on every edit, like a built-in check."}),o.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:"None yet. rigour learn turns an agent's fixes into rules once they hold up."}):l.jsx("ul",{style:{margin:"10px 0 0",paddingLeft:18,lineHeight:1.6,fontSize:14},children:o.map(w=>l.jsxs("li",{children:[w.message,l.jsxs("div",{className:"st-sub",children:[w.requirement," · ",w.appliesTo]})]},w.id))})]}),l.jsxs("section",{className:"st-card",children:[l.jsx("strong",{children:"What your agents were told to remember"}),l.jsx("div",{className:"st-sub",style:{marginTop:4},children:"Facts saved with rigour_remember; agents recall them by meaning."}),d.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:10,lineHeight:1.6},children:"Nothing saved yet."}):l.jsx("ul",{style:{margin:"10px 0 0",paddingLeft:18,lineHeight:1.6,fontSize:14},children:d.slice(0,12).map(([w,_])=>l.jsxs("li",{children:[l.jsx("strong",{children:w.replace(/_/g," ")}),": ",_.value.length>220?`${_.value.slice(0,220)}…`:_.value]},w))}),d.length>12&&l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:["and ",d.length-12," more"]})]}),typeof u=="number"&&u>0&&l.jsxs("section",{className:"st-card",style:{gridColumn:"1 / -1"},children:[l.jsxs("strong",{children:[u," functions indexed"]}),l.jsx("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.6},children:"Before an agent writes a new helper, Rigour checks whether one already exists and points to it, so the codebase doesn't fill with near-copies."})]})]})},ac=o=>o>=1e3?`${Math.round(o/1e3)}k`:String(o),zp=()=>{const{data:o,error:d}=Ke("/api/context");if(d)return l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load agent context: ",d,"."]})});if(!o)return l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})});const u=o.week,h=u.scopes+u.recalls+u.lessonsTold+u.reuse.length===0;return l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"What Rigour gave your agents"}),l.jsx("p",{className:"st-lead",children:"Before an agent writes, it can ask Rigour where to look, what this team already knows, and whether the thing it is about to write exists. Preventing a mistake is cheaper than catching it."}),h?l.jsx("div",{className:"st-empty",style:{marginTop:24},children:"No agent asked Rigour for context this week. Agents use it through the Rigour tools (rigour_context_scope, rigour_recall, rigour_check_pattern); Setup shows whether they are connected."}):l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},children:[l.jsx(uc,{title:"Where to look",value:u.scopes===0?"Not asked this week":`${re(u.filesReturned,"file")} instead of ${u.filesConsidered}`,detail:u.scopes===0?"Agents can ask for the files a task needs instead of reading broadly.":`${re(u.scopes,"request")}. About ${ac(u.tokensReturned)} tokens returned out of ${ac(u.tokensConsidered)} considered (Rigour's estimate).`}),l.jsx(uc,{title:"What this team knows",value:`${re(u.lessonsTold,"lesson")} told`,detail:`${re(u.recalls,"recall")} of saved facts and lessons. How it learns shows what each lesson stopped.`}),l.jsxs("section",{className:"st-card",style:{gridColumn:"1 / -1"},children:[l.jsx("strong",{children:"Pointed to code that already exists"}),u.reuse.length===0?l.jsx("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:"No duplicate was about to be written this week."}):l.jsx("div",{className:"st-stack",style:{marginTop:12},children:u.reuse.map(x=>l.jsxs("div",{className:"st-row",style:{alignItems:"flex-start"},children:[l.jsx("span",{className:`st-chip ${x.action==="BLOCK"?"warn":""}`,children:x.action==="BLOCK"?"reuse":"similar"}),l.jsxs("div",{style:{flex:1,fontSize:14,lineHeight:1.5},children:["About to write ",l.jsx("span",{className:"st-mono",children:x.planned}),"; told to use ",l.jsx("span",{className:"st-mono",children:x.existing})]}),l.jsx("span",{className:"st-sub",children:Xt(x.at)})]},`${x.at}-${x.planned}`))})]})]}),l.jsx(Pp,{weeks:o.weeks})]})},uc=({title:o,value:d,detail:u})=>l.jsxs("section",{className:"st-card",children:[l.jsx("div",{className:"st-sub",children:o}),l.jsx("div",{style:{fontSize:22,fontWeight:600,marginTop:6,color:"var(--text-primary)"},children:d}),l.jsx("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:u})]}),Pp=({weeks:o})=>{const d=o.filter(u=>u.scopes+u.recalls+u.lessonsTold+u.reuse>0).reverse();return l.jsxs("section",{className:"st-card",style:{marginTop:24,padding:0,overflowX:"auto"},children:[l.jsx("div",{style:{padding:"16px 20px 8px"},children:l.jsx("strong",{children:"Last 8 weeks"})}),d.length===0?l.jsx("div",{className:"st-sub",style:{padding:"0 20px 18px"},children:"No context requests in the last 8 weeks."}):l.jsxs("table",{className:"st-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Week of"}),l.jsx("th",{children:"Focused file lists"}),l.jsx("th",{children:"Files given"}),l.jsx("th",{children:"Recalls"}),l.jsx("th",{children:"Lessons told"}),l.jsx("th",{children:"Duplicates avoided"})]})}),l.jsx("tbody",{children:d.map(u=>l.jsxs("tr",{children:[l.jsx("td",{children:new Date(u.from).toLocaleDateString(void 0,{month:"short",day:"numeric"})}),l.jsx("td",{children:u.scopes}),l.jsx("td",{children:u.scopes?`${u.filesReturned} of ${u.filesConsidered}`:"—"}),l.jsx("td",{children:u.recalls}),l.jsx("td",{children:u.lessonsTold}),l.jsx("td",{children:u.reuse})]},u.from))})]})]})},Bi={single:"one judge",cross:"one judge from another vendor",full:"one judge per vendor, findings merged",panel:"a panel: only what a majority confirms blocks"},Rp=o=>o.file?`${o.file}${o.line?`:${o.line}`:""}`:"",Lp=({data:o,canWrite:d,onChange:u})=>{var x,S,w,_;const h=(x=o.status)==null?void 0:x.last;return l.jsxs("section",{style:{marginTop:24},children:[l.jsxs("h2",{style:{margin:"0 0 12px",fontSize:18,fontWeight:600},children:["The reviewer's verdict on ",o.branch]}),((S=o.status)==null?void 0:S.running)&&l.jsxs("div",{className:"st-sub",style:{marginBottom:8},children:["Reviewing ",o.status.running.head.slice(0,9)," now."]}),((w=o.status)==null?void 0:w.attempt)&&l.jsxs("div",{className:"st-card",style:{marginBottom:12},children:[l.jsx("span",{className:"st-chip warn",children:o.status.attempt.outcome==="skipped"?"skipped":"could not run"})," ",l.jsxs("span",{className:"st-sub",children:["The last review, of ",o.status.attempt.head.slice(0,9)," ",Xt(o.status.attempt.at),": ",o.status.attempt.reason]})]}),h?l.jsxs("div",{className:"st-stack",children:[l.jsx("div",{className:"st-card st-row",style:{justifyContent:"space-between"},children:l.jsxs("span",{children:[l.jsx("span",{className:`st-chip ${h.open.length?"bad":"ok"}`,children:h.open.length?`${re(h.open.length,"finding")} to fix`:"nothing to fix"})," ",l.jsxs("span",{className:"st-sub",children:[h.ran?`${Bi[h.ran.ran]??h.ran.ran}, `:"",h.mode==="delta"?"new commits":"the whole branch"," at ",h.head.slice(0,9),", ",Xt(h.at)]})]})}),h.ran&&(h.ran.degraded||h.ran.escalation||h.ran.asked!==h.ran.ran)&&l.jsxs("div",{className:"st-sub",children:["Asked for ",Bi[h.ran.asked]??h.ran.asked," (",h.ran.source,"); ran ",Bi[h.ran.ran]??h.ran.ran,". ",[h.ran.degraded,h.ran.escalation].filter(Boolean).join("; ")]}),h.open.map(E=>l.jsx(cc,{item:E,canWrite:d&&o.effective.dismissals,onChange:u},E.id)),h.disputed.length>0&&l.jsx("div",{className:"st-sub",style:{marginTop:8},children:"No majority, so these never block:"}),h.disputed.map(E=>l.jsx(cc,{item:E,disputed:!0,canWrite:!1,onChange:u},E.id))]}):!((_=o.status)!=null&&_.attempt)&&l.jsxs("div",{className:"st-empty",children:["No verdict yet. Run ",l.jsx("span",{className:"st-mono",children:"rigour review --reviewer"}),", or push with the reviewer on."]})]})},cc=({item:o,disputed:d,canWrite:u,onChange:h})=>{const[x,S]=Q.useState(""),[w,_]=Q.useState(!1),[E,D]=Q.useState(null),V=async()=>{const A=await ht("/api/reviewer/dismiss","POST",JSON.stringify({id:o.id,reason:x}));A.ok?h():D((await A.json().catch(()=>({}))).error??`HTTP ${A.status}`)};return l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between",gap:12},children:[l.jsx("strong",{style:{fontSize:14},children:o.issue}),l.jsx("span",{className:"st-mono st-sub",children:Rp(o)})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:[d?l.jsx("span",{className:"st-chip warn",children:"disputed"}):l.jsx("span",{className:"st-chip",children:o.class}),o.reviewer&&l.jsxs(l.Fragment,{children:[" found by ",o.reviewer.split("+").join(" and ")]})]}),o.consequence&&l.jsxs("div",{style:{marginTop:8,fontSize:14},children:["What goes wrong: ",o.consequence]}),o.evidence&&l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:o.evidence}),u&&o.kind!=="prior"&&(w?l.jsxs("div",{className:"st-row",style:{marginTop:10,gap:8},children:[l.jsx("input",{"aria-label":"Why it is not a bug",value:x,onChange:A=>S(A.target.value),placeholder:"Why it is not a bug",style:{flex:1,minHeight:36,padding:"0 10px",borderRadius:8,border:"1px solid var(--text-dim)",background:"var(--bg-card)",color:"var(--text-primary)"}}),l.jsx("button",{className:"st-btn",disabled:x.trim().length<5,onClick:V,children:"Dismiss"})]}):l.jsx("button",{className:"st-btn",style:{marginTop:10},onClick:()=>_(!0),children:"Not a bug"})),E&&l.jsxs("div",{className:"st-sub",style:{marginTop:6},children:[l.jsx("span",{className:"st-chip bad",children:"not dismissed"})," ",E]})]})},Ds=({label:o,value:d,options:u,disabled:h,withTeam:x,onChange:S})=>{const w=x?[{value:null,label:"Team"},...u]:u,_=d===void 0?null:d;return l.jsx("div",{className:"st-seg",role:"radiogroup","aria-label":o,children:w.map(E=>{const D=JSON.stringify(E.value)===JSON.stringify(_);return l.jsx("button",{type:"button",role:"radio","aria-checked":D,className:D?"on":"",disabled:h,onClick:()=>!D&&S(E.value),children:E.label},E.label)})})},Op={flag:"this run",env:"environment",user:"yours",team:"team"};function Mp(o,d){return o.key==="mode"?d.source.mode:o.key==="panel"?d.source.panel:o.key==="escalate"&&(d.required.panel||d.required.mode)?"team":o.user&&o.user.value!==void 0?"user":"team"}const Vi=[{value:!0,label:"on"},{value:!1,label:"off"}],dc=[{value:"single",label:"one judge"},{value:"cross",label:"one, another vendor"},{value:"full",label:"one per vendor"}],$p=({data:o,canWrite:d,saving:u,onSave:h,onSaveTeam:x})=>{const[S,w]=Q.useState(!1),_=o.effective,E=o.team,D=_.required.panel||_.required.mode,V=[{key:"enabled",label:"Review at push",help:"Ask the reviewer when you push a branch that has an open pull request.",effective:_.enabled?"on":"off",user:{value:o.user.enabled,options:Vi},team:{value:E.enabled??!1,options:Vi}},{key:"mode",label:"Mode",help:"One judge; one from a vendor that did not write the code; or one judge per vendor (up to Judges), findings merged.",effective:_.mode,user:{value:o.user.mode,options:dc},team:{value:E.mode??"single",options:dc},locked:_.required.mode?"your team requires at least this":void 0},{key:"mode_required",label:"Required for everyone",help:"No person or run may review with fewer judges than the team's, in CI or anywhere.",effective:_.required.mode?"yes":"no",team:{value:E.mode_required??!1,options:[{value:!0,label:"yes"},{value:!1,label:"no"}]}},{key:"panel",label:"Panel",help:"Judges cross-examine what only one of them found; only what a majority confirms blocks. Required: no one may turn it off.",effective:_.panel?"on":"off",user:{value:o.user.panel,options:Vi},team:{value:E.panel??"off",options:[{value:"off",label:"off"},{value:"on",label:"on"},{value:"required",label:"required"}]},locked:_.required.panel?"your team requires the panel":void 0},{key:"dismissals",label:"Dismissals",help:'Whether people may mark a reviewer finding "not a bug". Off: a wrong finding is fixed by improving the reviewer, a right one by fixing the code.',effective:_.dismissals?"allowed":"off",team:{value:E.dismissals??!1,options:[{value:!0,label:"allowed"},{value:!1,label:"off"}]}},{key:"judges",label:"Judges",help:"How many judges a full or panel review uses, each from a different vendor. Three give a real majority.",effective:String(_.judges),user:{value:o.user.judges,options:[{value:2,label:"2"},{value:3,label:"3"}]},team:{value:E.judges??2,options:[{value:2,label:"2"},{value:3,label:"3"}]}},{key:"escalate",label:"When to add judges",help:"Always, or only for a risky change or one a person has reviewed. The backtest shows whether that loses anything.",effective:_.escalate,user:{value:o.user.escalate,options:[{value:"always",label:"always"},{value:"risk",label:"when risky"}]},team:{value:E.escalate??"always",options:[{value:"always",label:"always"},{value:"risk",label:"when risky"}]},locked:D?"your team requires every review to be full":void 0}],A=d&&(o.teamFile||S);return l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"st-sub",style:{margin:"0 0 12px",lineHeight:1.6},children:[l.jsx("strong",{children:"Yours"})," applies to your own runs, in every repository on this machine, and wins over the team's except where the team set a floor. ",l.jsx("strong",{children:"Team"})," is"," ",o.teamFile?l.jsxs(l.Fragment,{children:["in ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),": a change here edits the file, and you commit it"]}):l.jsxs(l.Fragment,{children:["Rigour's defaults: this repository has no ",l.jsx("span",{className:"st-mono",children:"rigour.yml"})]}),".",!d&&" Open Studio from the link the terminal printed to change settings here."]}),d&&!o.teamFile&&!S&&l.jsxs("div",{className:"st-card st-row",style:{justifyContent:"space-between",marginBottom:12},children:[l.jsxs("span",{className:"st-sub",children:["Setting team defaults creates a ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),": from then on this repository uses the team setup."]}),l.jsx("button",{className:"st-btn",onClick:()=>w(!0),children:"Set team defaults"})]}),l.jsx("div",{className:"st-stack",children:V.map(I=>l.jsxs("div",{className:"st-card st-setting",children:[l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:15},children:I.label}),l.jsx("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.5},children:I.help})]}),l.jsxs("div",{className:"st-setting-controls",children:[l.jsx("span",{className:"st-sub",children:"Runs"}),l.jsxs("span",{children:[l.jsx("span",{className:"st-mono",children:I.effective})," ",l.jsxs("span",{className:"st-sub",children:["· ",Op[Mp(I,_)]]}),I.locked&&l.jsxs("span",{title:I.locked,"aria-label":I.locked,children:[" ",l.jsx(Hs,{size:12})]})]}),l.jsx("span",{className:"st-sub",children:"Yours"}),I.user?l.jsx(Ds,{label:`Your ${I.label}`,withTeam:!0,disabled:!d||u!==null,value:I.user.value,options:I.user.options,onChange:F=>h({[I.key]:F})}):l.jsx("span",{className:"st-sub",children:"set by the team only"}),l.jsx("span",{className:"st-sub",children:"Team"}),l.jsx(Ds,{label:`Team ${I.label}`,disabled:!A||u!==null,value:I.team.value,options:I.team.options,onChange:F=>x({[I.key]:F},!o.teamFile)})]})]},I.key))}),l.jsx(Ip,{data:o}),_.refused.length>0&&l.jsx("div",{className:"st-stack",style:{marginTop:12},children:_.refused.map(I=>l.jsxs("div",{className:"st-sub",children:[l.jsx("span",{className:"st-chip warn",children:"not applied"})," ",I]},I))})]})},Nc=({diff:o})=>l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{style:{fontSize:14},children:"rigour.yml changed"}),l.jsx("span",{className:"st-sub",children:"Commit it so the change reaches your team."})]}),l.jsx("pre",{className:"st-code",style:{marginTop:8},children:o.split(`
|
|
166
|
+
`).map((d,u)=>l.jsx("div",{className:`st-ln ${d.startsWith("+")?"add":d.startsWith("-")?"del":""}`,children:d},u))})]}),Ip=({data:o})=>{var x;const d=((x=o.status)==null?void 0:x.today)??{runs:0,usd:0},{max_runs_per_day:u,max_usd_per_day:h}=o.effective;return l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsx("div",{style:{fontSize:15},children:"Today in this repository"}),l.jsxs("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.6},children:[re(d.runs,"agent run"),u!==void 0?` of ${u} allowed`:"",d.usd||h!==void 0?`, $${d.usd.toFixed(2)} reported${h!==void 0?` of $${h.toFixed(2)}`:""}`:"","."," ",u===void 0&&h===void 0?l.jsxs(l.Fragment,{children:["No daily cap: set ",l.jsx("span",{className:"st-mono",children:"max_runs_per_day"})," or ",l.jsx("span",{className:"st-mono",children:"max_usd_per_day"})," in ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),"."]}):"Past a cap, reviews are skipped until tomorrow (or cannot run, where your team requires the reviewer)."]})]})},Fp=({data:o})=>{const d=new Set(o.available.filter(h=>h.installed&&o.effective.reviewers.includes(h.name)).map(h=>h.vendor)).size,u=o.effective.required.panel||o.effective.required.mode;return l.jsxs("section",{style:{marginTop:20},children:[l.jsx("h3",{style:{margin:"0 0 6px",fontSize:15,fontWeight:600},children:"Agent CLIs on this machine"}),l.jsxs("p",{className:"st-sub",style:{margin:"0 0 12px"},children:["The reviewer uses their own logins: no API key. ",d>=3?"Enough vendors for three judges.":d===2?"Enough for two judges; a third vendor, listed in the reviewers, allows three.":u?"Your team requires two judges from different vendors: with one, the review cannot run until another is installed.":"Two judges need two vendors; with one, the review runs with one judge and says so."]}),l.jsx("div",{className:"st-row",style:{flexWrap:"wrap",gap:8},children:o.available.map(h=>l.jsxs("span",{className:`st-chip ${h.installed?"ok":""}`,children:[h.binary,h.installed?` ${h.version??""}`:": not installed"]},h.name))})]})};function Sc(){return Ke("/api/reviewer")}const Dp=()=>{const{data:o,error:d,reload:u}=Sc();return d?l.jsxs("div",{className:"st-empty",children:["Couldn't load the reviewer's verdict: ",d,"."]}):o?l.jsx(Lp,{data:o,canWrite:Ws(),onChange:u}):l.jsx("div",{className:"st-sub",children:"Loading…"})},Ap=()=>{const{data:o,error:d,reload:u}=Sc(),[h,x]=Q.useState(null),[S,w]=Q.useState(null),[_,E]=Q.useState(null);if(d)return l.jsxs("div",{className:"st-empty",children:["Couldn't load the reviewer's settings: ",d,"."]});if(!o)return l.jsx("div",{className:"st-sub",children:"Loading…"});const D=async(V,A,I)=>{x(I),w(null);const F=await ht(V,"POST",JSON.stringify(A)),Z=await F.json().catch(()=>({}));F.ok?V.endsWith("/team")&&E(Z.diff??null):w(Z.error??`HTTP ${F.status}`),x(null),u()};return l.jsxs("section",{style:{marginTop:32},children:[l.jsx("h2",{style:{margin:"0 0 6px",fontSize:18,fontWeight:600},children:"The reviewer"}),l.jsx("p",{className:"st-sub",style:{margin:"0 0 12px",lineHeight:1.6},children:"A second opinion from other AI models, before a person reviews. Off until your team or you turn it on. With two or three judges from different vendors, a finding blocks only when most of them agree and it names what goes wrong."}),l.jsx($p,{data:o,canWrite:Ws(),saving:h,onSave:V=>D("/api/reviewer/settings",V,Object.keys(V)[0]),onSaveTeam:(V,A)=>D("/api/reviewer/team",{patch:V,create:A},`team:${Object.keys(V)[0]}`)}),S&&l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsx("span",{className:"st-chip bad",children:"not saved"})," ",l.jsx("span",{className:"st-sub",children:S})]}),_&&l.jsx(Nc,{diff:_}),l.jsx(Fp,{data:o})]})},Hp=o=>o==="agent"?"your agent":o==="human"?"you":o.replace(/^byok:/,""),Wp=()=>{const{data:o,error:d}=Ke("/api/pre-pr-review");return d?l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load reviews: ",d,"."]})}):o?l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"Review before the PR"}),l.jsx("p",{className:"st-lead",children:"What still stands between this branch and a person's review: the reviewer's verdict, then the risky functions your agent checked."}),l.jsx(Dp,{}),l.jsx("h2",{style:{margin:"32px 0 6px",fontSize:18,fontWeight:600},children:"Risky functions your agent checks"}),l.jsxs("p",{className:"st-sub",style:{margin:0,lineHeight:1.6},children:["Rigour picks the riskiest changed functions and asks specific questions about them. Your agent answers with its own model, or you do.",o.reviewed.total>0&&` So far: ${re(o.reviewed.total,"function")} reviewed, ${o.reviewed.fixed} fixed, ${o.reviewed.noIssue} with no issue.`]}),l.jsxs("section",{style:{marginTop:24},children:[l.jsx("h3",{style:{margin:"0 0 12px",fontSize:15,fontWeight:600},children:"Waiting"}),o.pending.length===0?l.jsx("div",{className:"st-empty",children:"No risky function in the current changes is waiting."}):l.jsx("div",{className:"st-stack",children:o.pending.map(u=>l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{className:"st-mono",style:{fontSize:14},children:u.function}),l.jsxs("span",{className:"st-mono st-sub",children:[u.file,":",u.start]})]}),l.jsx("ul",{style:{margin:"10px 0 0",paddingLeft:18,lineHeight:1.6,fontSize:14},children:u.questions.map(h=>l.jsx("li",{children:h},h))})]},`${u.file}:${u.function}`))})]}),l.jsxs("section",{style:{marginTop:28},children:[l.jsx("h3",{style:{margin:"0 0 12px",fontSize:15,fontWeight:600},children:"Checked"}),o.recent.length===0?l.jsx("div",{className:"st-empty",children:"Nothing reviewed yet. Agents review through rigour_review; you can run rigour review-task."}):l.jsx("div",{className:"st-stack",children:o.recent.map(u=>l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsxs("span",{children:[l.jsx("span",{className:`st-chip ${u.verdict==="fixed"?"ok":""}`,children:u.verdict==="fixed"?"fixed":u.verdict==="no_issue"?"no issue":u.verdict})," ",l.jsx("strong",{className:"st-mono",style:{fontSize:14,marginLeft:8},children:u.function})]}),l.jsxs("span",{className:"st-sub",children:[Hp(u.reviewer)," · ",Xt(u.at)]})]}),l.jsx("div",{className:"st-mono st-sub",style:{marginTop:6},children:u.file}),u.note&&l.jsx("div",{style:{marginTop:10,fontSize:14,lineHeight:1.6},children:u.note})]},`${u.file}:${u.function}:${u.at}`))})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:24},children:["Model reviews with your own key: ",o.spend.runs===0?"none run here":`${re(o.spend.runs,"run")}, ${Up(o.spend)}${o.lastModel?`, last with ${o.lastModel}`:""}`,"."]})]}):l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})})};function Up(o){return o.runs-o.unpricedRuns===0?"cost not reported by the provider":`$${o.costUsd.toFixed(2)} observed${o.unpricedRuns?` (${o.unpricedRuns} without a reported cost)`:""}`}const fc={stopped:{label:"blocked",cls:"warn"},reported:{label:"reported",cls:"warn"},fixed:{label:"fixed",cls:"ok"},checked:{label:"checked",cls:""},reviewed:{label:"reviewed",cls:""},taught:{label:"told",cls:""},pr:{label:"PR",cls:"warn"}},Qi=o=>new Date(o).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),Bp=o=>new Date(o).toLocaleDateString(void 0,{weekday:"long",month:"short",day:"numeric"}),Vp=()=>{const{data:o,error:d}=Ke("/api/activity");return d?l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't load activity: ",d,"."]})}):o?l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"Activity"}),l.jsx("p",{className:"st-lead",children:"Each block is one stretch of agent work. What Rigour blocked, reported or got fixed is listed; routine checks fold away."}),o.sessions.length===0?l.jsx("div",{className:"st-empty",style:{marginTop:24},children:"Nothing yet. Activity appears as agents edit code, ask for reviews and finish their work."}):l.jsx("div",{className:"st-stack",style:{marginTop:24,gap:16},children:o.sessions.map(u=>l.jsx(Qp,{session:u},u.start))})]}):l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Loading…"})})},Qp=({session:o})=>{const[d,u]=Q.useState(!1),h=o.counts,x=h.fixed+h.reviewedFixed,S=[x&&`${re(x,"problem")} fixed`,h.stopped&&`${re(h.stopped,"edit")} blocked`,h.reported&&`${re(h.reported,"edit")} reported on`,h.pr&&`${re(h.pr,"branch review")} with findings`,h.reviewed&&`${re(h.reviewed,"risky function")} reviewed${h.reviewed-h.reviewedFixed?` (${h.reviewed-h.reviewedFixed} fine)`:""}`,h.checked&&`${re(h.checked,"edit")} checked clean`,h.taught&&`lessons given ${re(h.taught,"time")}`].filter(Boolean).join(" · ");return l.jsxs("section",{className:"st-card",style:{padding:0},children:[l.jsxs("div",{style:{padding:"16px 20px",borderBottom:o.highlights.length||d?"1px solid var(--border-dim)":0},children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsxs("strong",{children:[Bp(o.start),", ",Qi(o.start),o.start!==o.end?`–${Qi(o.end)}`:""]}),o.rest.length>0&&l.jsx("button",{className:"st-btn",onClick:()=>u(!d),type:"button",style:{minHeight:32},children:d?"Hide routine":`Show ${re(o.rest.length,"routine item")}`})]}),l.jsx("div",{className:"st-sub",style:{marginTop:6},children:S})]}),[...o.highlights,...d?o.rest:[]].map((w,_)=>l.jsxs("div",{className:"st-row",style:{padding:"12px 20px",borderTop:_?"1px solid var(--border-dim)":0,alignItems:"flex-start"},children:[l.jsx("span",{className:`st-chip ${w.kind==="reviewed"&&w.text.startsWith("Fixed ")?"ok":fc[w.kind].cls}`,style:{minWidth:70,textAlign:"center"},children:w.kind==="reviewed"&&w.text.startsWith("Fixed ")?"fixed":fc[w.kind].label}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsx("div",{style:{fontSize:14,lineHeight:1.5},children:pn(w.text)}),w.detail&&l.jsx("div",{className:"st-sub",style:{marginTop:3,lineHeight:1.5},children:w.detail})]}),l.jsx("span",{className:"st-sub",style:{whiteSpace:"nowrap"},children:Qi(w.at)})]},`${w.at}-${_}`))]})},Kp={flag:"this run",env:"environment",user:"yours",team:"team"},qp=({text:o,data:d,canWrite:u,saving:h,problem:x,diff:S,onSave:w})=>{const _=d.effective,E=_.required?`your team requires the ${o.name}`:void 0;return l.jsxs("section",{style:{marginTop:32},children:[l.jsx("h2",{style:{margin:"0 0 6px",fontSize:18,fontWeight:600},children:o.title}),l.jsxs("p",{className:"st-sub",style:{margin:"0 0 12px",lineHeight:1.6},children:[o.lead,!u&&" Open Studio from the link the terminal printed to change it here."]}),l.jsxs("div",{className:"st-card st-setting",children:[l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:15},children:o.row}),l.jsx("div",{className:"st-sub",style:{marginTop:4,lineHeight:1.5},children:o.rowHelp})]}),l.jsxs("div",{className:"st-setting-controls",children:[l.jsx("span",{className:"st-sub",children:"Runs"}),l.jsxs("span",{children:[l.jsx("span",{className:"st-mono",children:_.enabled?"on":"off"})," ",l.jsxs("span",{className:"st-sub",children:["· ",Kp[_.source]]}),E&&l.jsxs("span",{title:E,"aria-label":E,children:[" ",l.jsx(Hs,{size:12})]})]}),l.jsx("span",{className:"st-sub",children:"Yours"}),l.jsx(Ds,{label:`Your ${o.name}`,withTeam:!0,disabled:!u||h,value:d.user??void 0,options:[{value:!0,label:"on"},{value:!1,label:"off"}],onChange:D=>w({user:D})}),l.jsx("span",{className:"st-sub",children:"Team"}),l.jsx(Ds,{label:`Team ${o.name}`,disabled:!u||h,value:d.team,options:[{value:"off",label:"off"},{value:"on",label:"on"},{value:"required",label:"required"}],onChange:D=>w({team:D,create:!d.teamFile})})]})]}),!d.teamFile&&u&&l.jsxs("div",{className:"st-sub",style:{marginTop:8},children:["This repository has no ",l.jsx("span",{className:"st-mono",children:"rigour.yml"}),": setting the team's value creates one, and from then on it uses the team setup."]}),_.refused.length>0&&l.jsx("div",{className:"st-stack",style:{marginTop:12},children:_.refused.map(D=>l.jsxs("div",{className:"st-sub",children:[l.jsx("span",{className:"st-chip warn",children:"not applied"})," ",D]},D))}),x&&l.jsxs("div",{className:"st-card",style:{marginTop:12},children:[l.jsx("span",{className:"st-chip bad",children:"not saved"})," ",l.jsx("span",{className:"st-sub",children:x})]}),S&&l.jsx(Nc,{diff:S})]})},pc={goal:{title:"The goal check",lead:l.jsxs(l.Fragment,{children:["Checks a change against what its pull request says it is for: files outside its ",l.jsx("span",{className:"st-mono",children:"Scope"})," or inside ",l.jsx("span",{className:"st-mono",children:"Out of scope"}),", and"," ",l.jsx("span",{className:"st-mono",children:"Done when"})," items naming a file it never touched, block. No model; a description without these sections is never checked."]}),row:"Check the goal",rowHelp:l.jsxs(l.Fragment,{children:["Required: no person, environment variable or flag may turn it off. ",l.jsx("span",{className:"st-mono",children:"--goal"})," and ",l.jsx("span",{className:"st-mono",children:"--no-goal"})," choose for one run."]}),name:"goal check"},outcomes:{title:"The outcome loop",lead:l.jsxs(l.Fragment,{children:["What happened after each pull request merged: CI on its merge commit, later commits and fixes on its files, a revert. Read with"," ",l.jsx("span",{className:"st-mono",children:"rigour outcomes"}),", one GitHub call per merged pull request until its window closes, then never again."]}),row:"Read outcomes",rowHelp:l.jsxs(l.Fragment,{children:["Required: no person, environment variable or flag may turn it off. ",l.jsx("span",{className:"st-mono",children:"--outcomes"})," and ",l.jsx("span",{className:"st-mono",children:"--no-outcomes"})," choose for one run."]}),name:"outcome loop"},orchestrator:{title:"The review orchestrator",lead:l.jsxs(l.Fragment,{children:["Experimental. Triage, without a model, picks which parts of a review each change needs (earlier human points, correctness, production cost, what the change leaves behind, rules, lessons and the goal), and the judge does only those, in one pass: the same runs as one judge. A change over the judge's limit is split only with what the router has already saved over its last 20 reviews, so on average it never costs more than one judge. A change with nothing for a model to review gets no run. Under required, every part returns or there is no verdict. The daily caps (",l.jsx("span",{className:"st-mono",children:"max_runs_per_day"}),", ",l.jsx("span",{className:"st-mono",children:"max_usd_per_day"}),") count every pass. What blocks is unchanged."]}),row:"Use the orchestrator",rowHelp:l.jsxs(l.Fragment,{children:["Required: no person, environment variable or flag may turn it off. ",l.jsx("span",{className:"st-mono",children:"--orchestrator"})," and ",l.jsx("span",{className:"st-mono",children:"--no-orchestrator"})," choose for one run."]}),name:"review orchestrator"}},Ki=({name:o})=>{const d=`/api/switches/${o}`,{data:u,error:h,reload:x}=Ke(d),[S,w]=Q.useState(!1),[_,E]=Q.useState(null),[D,V]=Q.useState(null);if(h)return l.jsxs("div",{className:"st-empty",children:["Couldn't load the ",pc[o].name,": ",h,"."]});if(!u)return l.jsx("div",{className:"st-sub",children:"Loading…"});const A=async I=>{w(!0),E(null);const F=await ht(d,"POST",JSON.stringify(I)),Z=await F.json().catch(()=>({}));F.ok?"team"in I&&V(Z.diff??null):E(Z.error??`HTTP ${F.status}`),w(!1),x()};return l.jsx(qp,{text:pc[o],data:u,canWrite:Ws(),saving:S,problem:_,diff:D,onSave:A})},Yp={working:"ok","set up":"",broken:"bad",missing:"warn"},bp=()=>{const{data:o,error:d}=Ke("/api/setup");return d?l.jsx("div",{className:"st-page",children:l.jsxs("div",{className:"st-empty",children:["Couldn't check setup: ",d,"."]})}):o?l.jsxs("div",{className:"st-page",children:[l.jsx("h1",{className:"st-h1",children:"Setup"}),l.jsxs("p",{className:"st-lead",children:["What runs in this repository, and whether Rigour saw it work this week. The same checks run with ",l.jsx("span",{className:"st-mono",children:"rigour doctor"}),"."]}),l.jsx("div",{className:"st-stack",style:{marginTop:24},children:o.checks.map(u=>l.jsxs("div",{className:"st-card st-row",children:[l.jsx("span",{className:`st-chip ${Yp[u.state]}`,style:{minWidth:72,textAlign:"center"},children:u.state}),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:15},children:u.name}),l.jsx("div",{className:"st-sub",style:{marginTop:4},children:u.detail})]}),u.fix&&u.state!=="working"&&l.jsx("span",{className:"st-mono st-sub",children:u.fix})]},u.id))}),l.jsx(Ki,{name:"goal"}),l.jsx(Ki,{name:"outcomes"}),l.jsx(Ki,{name:"orchestrator"}),l.jsx(Ap,{}),l.jsx("h2",{style:{margin:"32px 0 6px",fontSize:18,fontWeight:600},children:"Who double-checks risky code"}),l.jsxs("div",{className:"st-grid",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))",marginTop:12},children:[l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Your agent's own model"}),l.jsx("span",{children:"Free"})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:["Your agent calls ",l.jsx("span",{className:"st-mono",children:"rigour_review"})," and answers Rigour's questions with the model you already pay for. No key."]})]}),l.jsxs("div",{className:"st-card",children:[l.jsxs("div",{className:"st-row",style:{justifyContent:"space-between"},children:[l.jsx("strong",{children:"Your own API key"}),l.jsx("span",{children:"Pay per use"})]}),l.jsxs("div",{className:"st-sub",style:{marginTop:8,lineHeight:1.6},children:["For code written without an agent, and for PR reviews. ",l.jsx("span",{className:"st-mono",children:"rigour settings set-key"}),"; keys are never shown here."]})]})]})]}):l.jsx("div",{className:"st-page",children:l.jsx("div",{className:"st-sub",children:"Checking…"})})},hc=60,Gp=({request:o,onClose:d})=>{const[u,h]=Q.useState(hc),[x,S]=Q.useState(null);Q.useEffect(()=>{const _=o.timestamp?Date.parse(o.timestamp):Date.now(),E=()=>h(Math.max(0,hc-Math.floor((Date.now()-_)/1e3)));E();const D=window.setInterval(E,1e3);return()=>window.clearInterval(D)},[o.timestamp]);const w=async _=>{const E=await ht("/api/arbitrate","POST",JSON.stringify({requestId:o.requestId||o.id,decision:_}));E.ok?d():S(E.status===403?"Studio was opened without the link from your terminal, or the request expired.":`That didn't go through (HTTP ${E.status}).`)};return l.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Approve a command",style:{position:"fixed",inset:0,background:"rgba(15, 17, 22, 0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50},children:l.jsxs("div",{className:"st-card",style:{width:"min(560px, calc(100vw - 32px))",padding:24},children:[l.jsx("strong",{style:{fontSize:18},children:"Your agent wants to run a command"}),l.jsx("pre",{className:"st-code st-mono",style:{padding:"12px 14px",marginTop:14,whiteSpace:"pre-wrap"},children:o.command}),o.firewallDecision&&o.firewallDecision!=="allow"&&l.jsxs("div",{className:"st-sub",style:{marginTop:10},children:["Rigour's pre-check: ",o.firewallDecision,o.firewallReason?`: ${o.firewallReason}`:""]}),l.jsx("div",{className:"st-sub",style:{marginTop:10},children:u>0?`Denied automatically in ${u}s if nobody answers.`:"Time ran out: the request was denied."}),x&&l.jsx("div",{className:"st-sub",style:{marginTop:10,color:"var(--status-error)"},children:x}),l.jsxs("div",{className:"st-row",style:{marginTop:18,justifyContent:"flex-end"},children:[l.jsx("button",{className:"st-btn",onClick:d,type:"button",children:"Close"}),l.jsx("button",{className:"st-btn",onClick:()=>w("reject"),type:"button",disabled:u===0,children:"Deny"}),l.jsx("button",{className:"st-btn primary",onClick:()=>w("approve"),type:"button",disabled:u===0,children:"Allow"})]})]})})},mc="rigour-theme-v2",qi=[{id:"week",label:"This week",icon:Uf,page:o=>l.jsx(cp,{onNavigate:o})},{id:"progress",label:"Progress",icon:Yf,page:()=>l.jsx(mp,{})},{id:"only",label:"Only Rigour",icon:Gf,page:()=>l.jsx(gp,{})},{id:"learns",label:"How it learns",icon:Wf,page:()=>l.jsx(Ep,{})},{id:"context",label:"Agent context",icon:Df,page:()=>l.jsx(zp,{})},{id:"reviews",label:"Review",icon:Bf,page:()=>l.jsx(Wp,{})},{id:"activity",label:"Activity",icon:Yi,page:()=>l.jsx(Vp,{})},{id:"setup",label:"Setup",icon:Jf,page:()=>l.jsx(bp,{})}],Xp=6e4;function Jp(){const[o,d]=Q.useState(()=>{try{return localStorage.getItem(mc)||"light"}catch{return"light"}}),[u,h]=Q.useState("week"),[x,S]=Q.useState(null),[w,_]=Q.useState("connecting"),[E,D]=Q.useState(null),[V,A]=Q.useState(null),[I,F]=Q.useState(!0),[Z,q]=Q.useState(!1),X=Q.useCallback(async()=>{F(!0);try{const Y=await fetch("/api/health"),ve=await Y.json();A(Y.ok?ve:{error:ve.error||`HTTP ${Y.status}`})}catch(Y){A({error:Y instanceof Error?Y.message:String(Y)})}finally{F(!1)}},[]);Q.useEffect(()=>{const Y=new EventSource("/api/events");return Y.onopen=()=>_("live"),Y.onerror=()=>_("offline"),Y.onmessage=ve=>{try{const ce=JSON.parse(ve.data),Re=!ce.timestamp||Date.now()-Date.parse(ce.timestamp)<Xp;ce.type==="interception_requested"&&Re&&D(ce)}catch{}},fetch("/api/info").then(ve=>ve.json()).then(S).catch(()=>S(null)),()=>Y.close()},[]),Q.useEffect(()=>{document.documentElement.setAttribute("data-theme",o);try{localStorage.setItem(mc,o)}catch{}},[o]);const Pe=qi.find(Y=>Y.id===u)??qi[0];return l.jsxs("div",{className:"studio",children:[l.jsxs("aside",{className:"sidebar glass-shell",children:[l.jsxs("div",{className:"brand",children:[l.jsx("div",{className:"logo-icon",children:l.jsx(Kf,{size:18})}),l.jsx("span",{children:"Rigour"}),(x==null?void 0:x.studioVersion)&&l.jsxs("div",{className:"version-pill",children:["v",x.studioVersion]})]}),l.jsx("nav",{children:qi.map(Y=>l.jsxs("button",{className:`nav-item ${Y.id===Pe.id?"active":""}`,onClick:()=>h(Y.id),type:"button",children:[l.jsx(Y.icon,{size:18}),l.jsx("span",{children:Y.label})]},Y.id))}),x&&l.jsx("div",{className:"sidebar-footer",children:l.jsxs("div",{className:"trust-indicator",title:x.teamSync?"Lessons your team promotes are shared through your team store":"Nothing leaves this machine",children:[l.jsx(Hs,{size:14}),l.jsx("span",{children:x.teamSync?"Synced with your team":"Stored on this machine"})]})})]}),l.jsxs("main",{className:"main-content",children:[l.jsxs("header",{className:"glass-shell",children:[l.jsx("div",{className:"header-left",children:x&&l.jsx(ep,{name:x.projectName,branch:x.branch})}),l.jsxs("div",{className:"header-right",children:[l.jsx("button",{type:"button",className:"connection-status",onClick:()=>{q(Y=>!Y),X()},"aria-expanded":Z,title:"Studio receives Rigour's events live",children:l.jsxs("div",{className:`status-indicator ${w}`,children:[l.jsx("div",{className:"pulse-emitter"}),l.jsx("span",{children:w==="live"?"Live":w==="offline"?"Offline":"Connecting"})]})}),l.jsx("button",{className:"theme-toggle",onClick:()=>d(Y=>Y==="dark"?"light":"dark"),"aria-label":"Toggle theme",type:"button",children:o==="dark"?l.jsx(qf,{size:18}):l.jsx(Vf,{size:18})})]})]}),Z&&l.jsxs("div",{className:"health-popover",children:[l.jsxs("div",{className:"health-popover-title",children:[l.jsx("strong",{children:"Rigour system health"}),l.jsx("button",{type:"button",onClick:()=>q(!1),"aria-label":"Close health",children:l.jsx(xc,{size:15})})]}),l.jsx(np,{data:V,loading:I,stale:!1,onRetry:X})]}),l.jsxs("div",{className:"view-container",children:[!Ws()&&l.jsx(tp,{}),l.jsx(Zf,{resetKey:Pe.id,children:l.jsx("div",{className:"full-view",children:Pe.page(h)})})]})]}),E&&l.jsx(Gp,{request:E,onClose:()=>D(null)})]})}sp();Of.createRoot(document.getElementById("root")).render(l.jsx(As.StrictMode,{children:l.jsx(Jp,{})}));
|