@rigour-labs/cli 6.0.0 → 6.1.0-beta.2
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 +2 -0
- package/dist/commands/hooks.js +22 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/studio-contracts.d.ts +20 -0
- package/dist/commands/studio-contracts.js +78 -0
- package/dist/commands/studio-contracts.test.d.ts +1 -0
- package/dist/commands/studio-contracts.test.js +33 -0
- package/dist/commands/studio.js +194 -24
- package/dist/commands/team.d.ts +2 -0
- package/dist/commands/team.js +78 -0
- package/package.json +4 -3
- package/studio-dist/assets/KnowledgeGraph-CWGbolsD.js +430 -0
- package/studio-dist/assets/KnowledgeGraph-DEqMBSbC.css +1 -0
- package/studio-dist/assets/index-DR7ehi_i.js +398 -0
- package/studio-dist/assets/index-PA_eqVds.css +1 -0
- package/studio-dist/index.html +2 -2
- package/studio-dist/assets/index-DzNTOo-7.js +0 -372
- package/studio-dist/assets/index-jC3k12bf.css +0 -1
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/KnowledgeGraph-CWGbolsD.js","assets/KnowledgeGraph-DEqMBSbC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Qg=Object.defineProperty;var Yg=(e,t,n)=>t in e?Qg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zu=(e,t,n)=>Yg(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function Xg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ih={exports:{}},Eo={},$h={exports:{}},H={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var qr=Symbol.for("react.element"),Zg=Symbol.for("react.portal"),Jg=Symbol.for("react.fragment"),ey=Symbol.for("react.strict_mode"),ty=Symbol.for("react.profiler"),ny=Symbol.for("react.provider"),sy=Symbol.for("react.context"),ry=Symbol.for("react.forward_ref"),iy=Symbol.for("react.suspense"),oy=Symbol.for("react.memo"),ay=Symbol.for("react.lazy"),Ju=Symbol.iterator;function ly(e){return e===null||typeof e!="object"?null:(e=Ju&&e[Ju]||e["@@iterator"],typeof e=="function"?e:null)}var Bh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Uh=Object.assign,Hh={};function bs(e,t,n){this.props=e,this.context=t,this.refs=Hh,this.updater=n||Bh}bs.prototype.isReactComponent={};bs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};bs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wh(){}Wh.prototype=bs.prototype;function ic(e,t,n){this.props=e,this.context=t,this.refs=Hh,this.updater=n||Bh}var oc=ic.prototype=new Wh;oc.constructor=ic;Uh(oc,bs.prototype);oc.isPureReactComponent=!0;var ed=Array.isArray,Kh=Object.prototype.hasOwnProperty,ac={current:null},Gh={key:!0,ref:!0,__self:!0,__source:!0};function qh(e,t,n){var s,r={},o=null,a=null;if(t!=null)for(s in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Kh.call(t,s)&&!Gh.hasOwnProperty(s)&&(r[s]=t[s]);var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];r.children=c}if(e&&e.defaultProps)for(s in l=e.defaultProps,l)r[s]===void 0&&(r[s]=l[s]);return{$$typeof:qr,type:e,key:o,ref:a,props:r,_owner:ac.current}}function cy(e,t){return{$$typeof:qr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function lc(e){return typeof e=="object"&&e!==null&&e.$$typeof===qr}function uy(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var td=/\/+/g;function ta(e,t){return typeof e=="object"&&e!==null&&e.key!=null?uy(""+e.key):t.toString(36)}function Ri(e,t,n,s,r){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case qr:case Zg:a=!0}}if(a)return a=e,r=r(a),e=s===""?"."+ta(a,0):s,ed(r)?(n="",e!=null&&(n=e.replace(td,"$&/")+"/"),Ri(r,t,n,"",function(u){return u})):r!=null&&(lc(r)&&(r=cy(r,n+(!r.key||a&&a.key===r.key?"":(""+r.key).replace(td,"$&/")+"/")+e)),t.push(r)),1;if(a=0,s=s===""?".":s+":",ed(e))for(var l=0;l<e.length;l++){o=e[l];var c=s+ta(o,l);a+=Ri(o,t,n,c,r)}else if(c=ly(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=s+ta(o,l++),a+=Ri(o,t,n,c,r);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function oi(e,t,n){if(e==null)return e;var s=[],r=0;return Ri(e,s,"","",function(o){return t.call(n,o,r++)}),s}function dy(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Fe={current:null},Di={transition:null},fy={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:Di,ReactCurrentOwner:ac};function Qh(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:oi,forEach:function(e,t,n){oi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oi(e,function(){t++}),t},toArray:function(e){return oi(e,function(t){return t})||[]},only:function(e){if(!lc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=bs;H.Fragment=Jg;H.Profiler=ty;H.PureComponent=ic;H.StrictMode=ey;H.Suspense=iy;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fy;H.act=Qh;H.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=Uh({},e.props),r=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=ac.current),t.key!==void 0&&(r=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Kh.call(t,c)&&!Gh.hasOwnProperty(c)&&(s[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)s.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];s.children=l}return{$$typeof:qr,type:e.type,key:r,ref:o,props:s,_owner:a}};H.createContext=function(e){return e={$$typeof:sy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ny,_context:e},e.Consumer=e};H.createElement=qh;H.createFactory=function(e){var t=qh.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:ry,render:e}};H.isValidElement=lc;H.lazy=function(e){return{$$typeof:ay,_payload:{_status:-1,_result:e},_init:dy}};H.memo=function(e,t){return{$$typeof:oy,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=Di.transition;Di.transition={};try{e()}finally{Di.transition=t}};H.unstable_act=Qh;H.useCallback=function(e,t){return Fe.current.useCallback(e,t)};H.useContext=function(e){return Fe.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return Fe.current.useDeferredValue(e)};H.useEffect=function(e,t){return Fe.current.useEffect(e,t)};H.useId=function(){return Fe.current.useId()};H.useImperativeHandle=function(e,t,n){return Fe.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return Fe.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return Fe.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return Fe.current.useMemo(e,t)};H.useReducer=function(e,t,n){return Fe.current.useReducer(e,t,n)};H.useRef=function(e){return Fe.current.useRef(e)};H.useState=function(e){return Fe.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return Fe.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return Fe.current.useTransition()};H.version="18.3.1";$h.exports=H;var w=$h.exports;const oe=Xg(w);/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var hy=w,py=Symbol.for("react.element"),my=Symbol.for("react.fragment"),vy=Object.prototype.hasOwnProperty,gy=hy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yy={key:!0,ref:!0,__self:!0,__source:!0};function Yh(e,t,n){var s,r={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(s in t)vy.call(t,s)&&!yy.hasOwnProperty(s)&&(r[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)r[s]===void 0&&(r[s]=t[s]);return{$$typeof:py,type:e,key:o,ref:a,props:r,_owner:gy.current}}Eo.Fragment=my;Eo.jsx=Yh;Eo.jsxs=Yh;Ih.exports=Eo;var i=Ih.exports,Ka={},Xh={exports:{}},st={},Zh={exports:{}},Jh={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/(function(e){function t(M,_){var b=M.length;M.push(_);e:for(;0<b;){var V=b-1>>>1,I=M[V];if(0<r(I,_))M[V]=_,M[b]=I,b=V;else break e}}function n(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var _=M[0],b=M.pop();if(b!==_){M[0]=b;e:for(var V=0,I=M.length,ue=I>>>1;V<ue;){var je=2*(V+1)-1,be=M[je],re=je+1,qe=M[re];if(0>r(be,b))re<I&&0>r(qe,be)?(M[V]=qe,M[re]=b,V=re):(M[V]=be,M[je]=b,V=je);else if(re<I&&0>r(qe,b))M[V]=qe,M[re]=b,V=re;else break e}}return _}function r(M,_){var b=M.sortIndex-_.sortIndex;return b!==0?b:M.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,y=!1,g=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(M){for(var _=n(u);_!==null;){if(_.callback===null)s(u);else if(_.startTime<=M)s(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=n(u)}}function j(M){if(k=!1,v(M),!g)if(n(c)!==null)g=!0,U(x);else{var _=n(u);_!==null&&W(j,_.startTime-M)}}function x(M,_){g=!1,k&&(k=!1,m(T),T=-1),y=!0;var b=h;try{for(v(_),f=n(c);f!==null&&(!(f.expirationTime>_)||M&&!$());){var V=f.callback;if(typeof V=="function"){f.callback=null,h=f.priorityLevel;var I=V(f.expirationTime<=_);_=e.unstable_now(),typeof I=="function"?f.callback=I:f===n(c)&&s(c),v(_)}else s(c);f=n(c)}if(f!==null)var ue=!0;else{var je=n(u);je!==null&&W(j,je.startTime-_),ue=!1}return ue}finally{f=null,h=b,y=!1}}var S=!1,C=null,T=-1,R=5,P=-1;function $(){return!(e.unstable_now()-P<R)}function O(){if(C!==null){var M=e.unstable_now();P=M;var _=!0;try{_=C(!0,M)}finally{_?Q():(S=!1,C=null)}}else S=!1}var Q;if(typeof p=="function")Q=function(){p(O)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,z=ge.port2;ge.port1.onmessage=O,Q=function(){z.postMessage(null)}}else Q=function(){N(O,0)};function U(M){C=M,S||(S=!0,Q())}function W(M,_){T=N(function(){M(e.unstable_now())},_)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){g||y||(g=!0,U(x))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var _=3;break;default:_=h}var b=h;h=_;try{return M()}finally{h=b}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,_){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var b=h;h=M;try{return _()}finally{h=b}},e.unstable_scheduleCallback=function(M,_,b){var V=e.unstable_now();switch(typeof b=="object"&&b!==null?(b=b.delay,b=typeof b=="number"&&0<b?V+b:V):b=V,M){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=b+I,M={id:d++,callback:_,priorityLevel:M,startTime:b,expirationTime:I,sortIndex:-1},b>V?(M.sortIndex=b,t(u,M),n(c)===null&&M===n(u)&&(k?(m(T),T=-1):k=!0,W(j,b-V))):(M.sortIndex=I,t(c,M),g||y||(g=!0,U(x))),M},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(M){var _=h;return function(){var b=h;h=_;try{return M.apply(this,arguments)}finally{h=b}}}})(Jh);Zh.exports=Jh;var xy=Zh.exports;/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var jy=w,tt=xy;function E(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 ep=new Set,Nr={};function Bn(e,t){ks(e,t),ks(e+"Capture",t)}function ks(e,t){for(Nr[e]=t,e=0;e<t.length;e++)ep.add(t[e])}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ga=Object.prototype.hasOwnProperty,wy=/^[: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]*$/,nd={},sd={};function ky(e){return Ga.call(sd,e)?!0:Ga.call(nd,e)?!1:wy.test(e)?sd[e]=!0:(nd[e]=!0,!1)}function Sy(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ny(e,t,n,s){if(t===null||typeof t>"u"||Sy(e,t,n,s))return!0;if(s)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 Ie(e,t,n,s,r,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Ie(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Ie(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){Ee[e]=new Ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var cc=/[\-:]([a-z])/g;function uc(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(cc,uc);Ee[t]=new Ie(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(cc,uc);Ee[t]=new Ie(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(cc,uc);Ee[t]=new Ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Ie(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function dc(e,t,n,s){var r=Ee.hasOwnProperty(t)?Ee[t]:null;(r!==null?r.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ny(t,n,r,s)&&(n=null),s||r===null?ky(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=n===null?r.type===3?!1:"":n:(t=r.attributeName,s=r.attributeNamespace,n===null?e.removeAttribute(t):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,s?e.setAttributeNS(s,t,n):e.setAttribute(t,n))))}var Wt=jy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ai=Symbol.for("react.element"),Qn=Symbol.for("react.portal"),Yn=Symbol.for("react.fragment"),fc=Symbol.for("react.strict_mode"),qa=Symbol.for("react.profiler"),tp=Symbol.for("react.provider"),np=Symbol.for("react.context"),hc=Symbol.for("react.forward_ref"),Qa=Symbol.for("react.suspense"),Ya=Symbol.for("react.suspense_list"),pc=Symbol.for("react.memo"),Qt=Symbol.for("react.lazy"),sp=Symbol.for("react.offscreen"),rd=Symbol.iterator;function Ks(e){return e===null||typeof e!="object"?null:(e=rd&&e[rd]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Object.assign,na;function nr(e){if(na===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);na=t&&t[1]||""}return`
|
|
35
|
+
`+na+e}var sa=!1;function ra(e,t){if(!e||sa)return"";sa=!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(u){var s=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){s=u}e.call(t.prototype)}else{try{throw Error()}catch(u){s=u}e()}}catch(u){if(u&&s&&typeof u.stack=="string"){for(var r=u.stack.split(`
|
|
36
|
+
`),o=s.stack.split(`
|
|
37
|
+
`),a=r.length-1,l=o.length-1;1<=a&&0<=l&&r[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(r[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||r[a]!==o[l]){var c=`
|
|
38
|
+
`+r[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{sa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nr(e):""}function Cy(e){switch(e.tag){case 5:return nr(e.type);case 16:return nr("Lazy");case 13:return nr("Suspense");case 19:return nr("SuspenseList");case 0:case 2:case 15:return e=ra(e.type,!1),e;case 11:return e=ra(e.type.render,!1),e;case 1:return e=ra(e.type,!0),e;default:return""}}function Xa(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 Yn:return"Fragment";case Qn:return"Portal";case qa:return"Profiler";case fc:return"StrictMode";case Qa:return"Suspense";case Ya:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case np:return(e.displayName||"Context")+".Consumer";case tp:return(e._context.displayName||"Context")+".Provider";case hc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pc:return t=e.displayName||null,t!==null?t:Xa(e.type)||"Memo";case Qt:t=e._payload,e=e._init;try{return Xa(e(t))}catch{}}return null}function Ty(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 Xa(t);case 8:return t===fc?"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 pn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Py(e){var t=rp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(a){s=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return s},setValue:function(a){s=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function li(e){e._valueTracker||(e._valueTracker=Py(e))}function ip(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=rp(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}function Gi(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 Za(e,t){var n=t.checked;return ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function id(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=pn(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function op(e,t){t=t.checked,t!=null&&dc(e,"checked",t,!1)}function Ja(e,t){op(e,t);var n=pn(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?el(e,t.type,n):t.hasOwnProperty("defaultValue")&&el(e,t.type,pn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function od(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="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 el(e,t,n){(t!=="number"||Gi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sr=Array.isArray;function ps(e,t,n,s){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&s&&(e[n].defaultSelected=!0)}else{for(n=""+pn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function tl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ad(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(sr(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:pn(n)}}function ap(e,t){var n=pn(t.value),s=pn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),s!=null&&(e.defaultValue=""+s)}function ld(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function lp(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 nl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?lp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ci,cp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,s,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,s,r)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ci=ci||document.createElement("div"),ci.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ci.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ur={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},Ey=["Webkit","ms","Moz","O"];Object.keys(ur).forEach(function(e){Ey.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ur[t]=ur[e]})});function up(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ur.hasOwnProperty(e)&&ur[e]?(""+t).trim():t+"px"}function dp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,r=up(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,r):e[n]=r}}var My=ce({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 sl(e,t){if(t){if(My[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function rl(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 il=null;function mc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,ms=null,vs=null;function cd(e){if(e=Xr(e)){if(typeof ol!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Lo(t),ol(e.stateNode,e.type,t))}}function fp(e){ms?vs?vs.push(e):vs=[e]:ms=e}function hp(){if(ms){var e=ms,t=vs;if(vs=ms=null,cd(e),t)for(e=0;e<t.length;e++)cd(t[e])}}function pp(e,t){return e(t)}function mp(){}var ia=!1;function vp(e,t,n){if(ia)return e(t,n);ia=!0;try{return pp(e,t,n)}finally{ia=!1,(ms!==null||vs!==null)&&(mp(),hp())}}function Tr(e,t){var n=e.stateNode;if(n===null)return null;var s=Lo(n);if(s===null)return null;n=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var al=!1;if(It)try{var Gs={};Object.defineProperty(Gs,"passive",{get:function(){al=!0}}),window.addEventListener("test",Gs,Gs),window.removeEventListener("test",Gs,Gs)}catch{al=!1}function Ay(e,t,n,s,r,o,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var dr=!1,qi=null,Qi=!1,ll=null,Ry={onError:function(e){dr=!0,qi=e}};function Dy(e,t,n,s,r,o,a,l,c){dr=!1,qi=null,Ay.apply(Ry,arguments)}function Ly(e,t,n,s,r,o,a,l,c){if(Dy.apply(this,arguments),dr){if(dr){var u=qi;dr=!1,qi=null}else throw Error(E(198));Qi||(Qi=!0,ll=u)}}function Un(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function gp(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 ud(e){if(Un(e)!==e)throw Error(E(188))}function _y(e){var t=e.alternate;if(!t){if(t=Un(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,s=t;;){var r=n.return;if(r===null)break;var o=r.alternate;if(o===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===n)return ud(r),e;if(o===s)return ud(r),t;o=o.sibling}throw Error(E(188))}if(n.return!==s.return)n=r,s=o;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,s=o;break}if(l===s){a=!0,s=r,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,s=r;break}if(l===s){a=!0,s=o,n=r;break}l=l.sibling}if(!a)throw Error(E(189))}}if(n.alternate!==s)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function yp(e){return e=_y(e),e!==null?xp(e):null}function xp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xp(e);if(t!==null)return t;e=e.sibling}return null}var jp=tt.unstable_scheduleCallback,dd=tt.unstable_cancelCallback,zy=tt.unstable_shouldYield,by=tt.unstable_requestPaint,me=tt.unstable_now,Vy=tt.unstable_getCurrentPriorityLevel,vc=tt.unstable_ImmediatePriority,wp=tt.unstable_UserBlockingPriority,Yi=tt.unstable_NormalPriority,Oy=tt.unstable_LowPriority,kp=tt.unstable_IdlePriority,Mo=null,Et=null;function Fy(e){if(Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(Mo,e,void 0,(e.current.flags&128)===128)}catch{}}var wt=Math.clz32?Math.clz32:By,Iy=Math.log,$y=Math.LN2;function By(e){return e>>>=0,e===0?32:31-(Iy(e)/$y|0)|0}var ui=64,di=4194304;function rr(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 Xi(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,r=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~r;l!==0?s=rr(l):(o&=a,o!==0&&(s=rr(o)))}else a=n&~r,a!==0?s=rr(a):o!==0&&(s=rr(o));if(s===0)return 0;if(t!==0&&t!==s&&!(t&r)&&(r=s&-s,o=t&-t,r>=o||r===16&&(o&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)n=31-wt(t),r=1<<n,s|=e[n],t&=~r;return s}function Uy(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 Hy(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-wt(o),l=1<<a,c=r[a];c===-1?(!(l&n)||l&s)&&(r[a]=Uy(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function cl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Sp(){var e=ui;return ui<<=1,!(ui&4194240)&&(ui=64),e}function oa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function Wy(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 s=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-wt(n),o=1<<r;t[r]=0,s[r]=-1,e[r]=-1,n&=~o}}function gc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-wt(n),r=1<<s;r&t|e[s]&t&&(e[s]|=t),n&=~r}}var q=0;function Np(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Cp,yc,Tp,Pp,Ep,ul=!1,fi=[],sn=null,rn=null,on=null,Pr=new Map,Er=new Map,Xt=[],Ky="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 fd(e,t){switch(e){case"focusin":case"focusout":sn=null;break;case"dragenter":case"dragleave":rn=null;break;case"mouseover":case"mouseout":on=null;break;case"pointerover":case"pointerout":Pr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Er.delete(t.pointerId)}}function qs(e,t,n,s,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Xr(t),t!==null&&yc(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Gy(e,t,n,s,r){switch(t){case"focusin":return sn=qs(sn,e,t,n,s,r),!0;case"dragenter":return rn=qs(rn,e,t,n,s,r),!0;case"mouseover":return on=qs(on,e,t,n,s,r),!0;case"pointerover":var o=r.pointerId;return Pr.set(o,qs(Pr.get(o)||null,e,t,n,s,r)),!0;case"gotpointercapture":return o=r.pointerId,Er.set(o,qs(Er.get(o)||null,e,t,n,s,r)),!0}return!1}function Mp(e){var t=Mn(e.target);if(t!==null){var n=Un(t);if(n!==null){if(t=n.tag,t===13){if(t=gp(n),t!==null){e.blockedOn=t,Ep(e.priority,function(){Tp(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 Li(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);il=s,n.target.dispatchEvent(s),il=null}else return t=Xr(n),t!==null&&yc(t),e.blockedOn=n,!1;t.shift()}return!0}function hd(e,t,n){Li(e)&&n.delete(t)}function qy(){ul=!1,sn!==null&&Li(sn)&&(sn=null),rn!==null&&Li(rn)&&(rn=null),on!==null&&Li(on)&&(on=null),Pr.forEach(hd),Er.forEach(hd)}function Qs(e,t){e.blockedOn===t&&(e.blockedOn=null,ul||(ul=!0,tt.unstable_scheduleCallback(tt.unstable_NormalPriority,qy)))}function Mr(e){function t(r){return Qs(r,e)}if(0<fi.length){Qs(fi[0],e);for(var n=1;n<fi.length;n++){var s=fi[n];s.blockedOn===e&&(s.blockedOn=null)}}for(sn!==null&&Qs(sn,e),rn!==null&&Qs(rn,e),on!==null&&Qs(on,e),Pr.forEach(t),Er.forEach(t),n=0;n<Xt.length;n++)s=Xt[n],s.blockedOn===e&&(s.blockedOn=null);for(;0<Xt.length&&(n=Xt[0],n.blockedOn===null);)Mp(n),n.blockedOn===null&&Xt.shift()}var gs=Wt.ReactCurrentBatchConfig,Zi=!0;function Qy(e,t,n,s){var r=q,o=gs.transition;gs.transition=null;try{q=1,xc(e,t,n,s)}finally{q=r,gs.transition=o}}function Yy(e,t,n,s){var r=q,o=gs.transition;gs.transition=null;try{q=4,xc(e,t,n,s)}finally{q=r,gs.transition=o}}function xc(e,t,n,s){if(Zi){var r=dl(e,t,n,s);if(r===null)va(e,t,s,Ji,n),fd(e,s);else if(Gy(r,e,t,n,s))s.stopPropagation();else if(fd(e,s),t&4&&-1<Ky.indexOf(e)){for(;r!==null;){var o=Xr(r);if(o!==null&&Cp(o),o=dl(e,t,n,s),o===null&&va(e,t,s,Ji,n),o===r)break;r=o}r!==null&&s.stopPropagation()}else va(e,t,s,null,n)}}var Ji=null;function dl(e,t,n,s){if(Ji=null,e=mc(s),e=Mn(e),e!==null)if(t=Un(e),t===null)e=null;else if(n=t.tag,n===13){if(e=gp(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 Ji=e,null}function Ap(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(Vy()){case vc:return 1;case wp:return 4;case Yi:case Oy:return 16;case kp:return 536870912;default:return 16}default:return 16}}var Jt=null,jc=null,_i=null;function Rp(){if(_i)return _i;var e,t=jc,n=t.length,s,r="value"in Jt?Jt.value:Jt.textContent,o=r.length;for(e=0;e<n&&t[e]===r[e];e++);var a=n-e;for(s=1;s<=a&&t[n-s]===r[o-s];s++);return _i=r.slice(e,1<s?1-s:void 0)}function zi(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 hi(){return!0}function pd(){return!1}function rt(e){function t(n,s,r,o,a){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?hi:pd,this.isPropagationStopped=pd,this}return ce(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=hi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hi)},persist:function(){},isPersistent:hi}),t}var Vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wc=rt(Vs),Yr=ce({},Vs,{view:0,detail:0}),Xy=rt(Yr),aa,la,Ys,Ao=ce({},Yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kc,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!==Ys&&(Ys&&e.type==="mousemove"?(aa=e.screenX-Ys.screenX,la=e.screenY-Ys.screenY):la=aa=0,Ys=e),aa)},movementY:function(e){return"movementY"in e?e.movementY:la}}),md=rt(Ao),Zy=ce({},Ao,{dataTransfer:0}),Jy=rt(Zy),ex=ce({},Yr,{relatedTarget:0}),ca=rt(ex),tx=ce({},Vs,{animationName:0,elapsedTime:0,pseudoElement:0}),nx=rt(tx),sx=ce({},Vs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rx=rt(sx),ix=ce({},Vs,{data:0}),vd=rt(ix),ox={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ax={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"},lx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lx[e])?!!t[e]:!1}function kc(){return cx}var ux=ce({},Yr,{key:function(e){if(e.key){var t=ox[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ax[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kc,charCode:function(e){return e.type==="keypress"?zi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dx=rt(ux),fx=ce({},Ao,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gd=rt(fx),hx=ce({},Yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kc}),px=rt(hx),mx=ce({},Vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),vx=rt(mx),gx=ce({},Ao,{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}),yx=rt(gx),xx=[9,13,27,32],Sc=It&&"CompositionEvent"in window,fr=null;It&&"documentMode"in document&&(fr=document.documentMode);var jx=It&&"TextEvent"in window&&!fr,Dp=It&&(!Sc||fr&&8<fr&&11>=fr),yd=" ",xd=!1;function Lp(e,t){switch(e){case"keyup":return xx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _p(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function wx(e,t){switch(e){case"compositionend":return _p(t);case"keypress":return t.which!==32?null:(xd=!0,yd);case"textInput":return e=t.data,e===yd&&xd?null:e;default:return null}}function kx(e,t){if(Xn)return e==="compositionend"||!Sc&&Lp(e,t)?(e=Rp(),_i=jc=Jt=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 Dp&&t.locale!=="ko"?null:t.data;default:return null}}var Sx={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 jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Sx[e.type]:t==="textarea"}function zp(e,t,n,s){fp(s),t=eo(t,"onChange"),0<t.length&&(n=new wc("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var hr=null,Ar=null;function Nx(e){Kp(e,0)}function Ro(e){var t=es(e);if(ip(t))return e}function Cx(e,t){if(e==="change")return t}var bp=!1;if(It){var ua;if(It){var da="oninput"in document;if(!da){var wd=document.createElement("div");wd.setAttribute("oninput","return;"),da=typeof wd.oninput=="function"}ua=da}else ua=!1;bp=ua&&(!document.documentMode||9<document.documentMode)}function kd(){hr&&(hr.detachEvent("onpropertychange",Vp),Ar=hr=null)}function Vp(e){if(e.propertyName==="value"&&Ro(Ar)){var t=[];zp(t,Ar,e,mc(e)),vp(Nx,t)}}function Tx(e,t,n){e==="focusin"?(kd(),hr=t,Ar=n,hr.attachEvent("onpropertychange",Vp)):e==="focusout"&&kd()}function Px(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ro(Ar)}function Ex(e,t){if(e==="click")return Ro(t)}function Mx(e,t){if(e==="input"||e==="change")return Ro(t)}function Ax(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var St=typeof Object.is=="function"?Object.is:Ax;function Rr(e,t){if(St(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!Ga.call(t,r)||!St(e[r],t[r]))return!1}return!0}function Sd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nd(e,t){var n=Sd(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sd(n)}}function Op(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Op(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fp(){for(var e=window,t=Gi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gi(e.document)}return t}function Nc(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 Rx(e){var t=Fp(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Op(n.ownerDocument.documentElement,n)){if(s!==null&&Nc(n)){if(t=s.start,e=s.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 r=n.textContent.length,o=Math.min(s.start,r);s=s.end===void 0?o:Math.min(s.end,r),!e.extend&&o>s&&(r=s,s=o,o=r),r=Nd(n,o);var a=Nd(n,s);r&&a&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),o>s?(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 Dx=It&&"documentMode"in document&&11>=document.documentMode,Zn=null,fl=null,pr=null,hl=!1;function Cd(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hl||Zn==null||Zn!==Gi(s)||(s=Zn,"selectionStart"in s&&Nc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),pr&&Rr(pr,s)||(pr=s,s=eo(fl,"onSelect"),0<s.length&&(t=new wc("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=Zn)))}function pi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Jn={animationend:pi("Animation","AnimationEnd"),animationiteration:pi("Animation","AnimationIteration"),animationstart:pi("Animation","AnimationStart"),transitionend:pi("Transition","TransitionEnd")},fa={},Ip={};It&&(Ip=document.createElement("div").style,"AnimationEvent"in window||(delete Jn.animationend.animation,delete Jn.animationiteration.animation,delete Jn.animationstart.animation),"TransitionEvent"in window||delete Jn.transitionend.transition);function Do(e){if(fa[e])return fa[e];if(!Jn[e])return e;var t=Jn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ip)return fa[e]=t[n];return e}var $p=Do("animationend"),Bp=Do("animationiteration"),Up=Do("animationstart"),Hp=Do("transitionend"),Wp=new Map,Td="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 xn(e,t){Wp.set(e,t),Bn(t,[e])}for(var ha=0;ha<Td.length;ha++){var pa=Td[ha],Lx=pa.toLowerCase(),_x=pa[0].toUpperCase()+pa.slice(1);xn(Lx,"on"+_x)}xn($p,"onAnimationEnd");xn(Bp,"onAnimationIteration");xn(Up,"onAnimationStart");xn("dblclick","onDoubleClick");xn("focusin","onFocus");xn("focusout","onBlur");xn(Hp,"onTransitionEnd");ks("onMouseEnter",["mouseout","mouseover"]);ks("onMouseLeave",["mouseout","mouseover"]);ks("onPointerEnter",["pointerout","pointerover"]);ks("onPointerLeave",["pointerout","pointerover"]);Bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ir="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(" "),zx=new Set("cancel close invalid load scroll toggle".split(" ").concat(ir));function Pd(e,t,n){var s=e.type||"unknown-event";e.currentTarget=n,Ly(s,t,void 0,e),e.currentTarget=null}function Kp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],r=s.event;s=s.listeners;e:{var o=void 0;if(t)for(var a=s.length-1;0<=a;a--){var l=s[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&r.isPropagationStopped())break e;Pd(r,l,u),o=c}else for(a=0;a<s.length;a++){if(l=s[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&r.isPropagationStopped())break e;Pd(r,l,u),o=c}}}if(Qi)throw e=ll,Qi=!1,ll=null,e}function ee(e,t){var n=t[yl];n===void 0&&(n=t[yl]=new Set);var s=e+"__bubble";n.has(s)||(Gp(t,e,2,!1),n.add(s))}function ma(e,t,n){var s=0;t&&(s|=4),Gp(n,e,s,t)}var mi="_reactListening"+Math.random().toString(36).slice(2);function Dr(e){if(!e[mi]){e[mi]=!0,ep.forEach(function(n){n!=="selectionchange"&&(zx.has(n)||ma(n,!1,e),ma(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mi]||(t[mi]=!0,ma("selectionchange",!1,t))}}function Gp(e,t,n,s){switch(Ap(t)){case 1:var r=Qy;break;case 4:r=Yy;break;default:r=xc}n=r.bind(null,t,n,e),r=void 0,!al||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function va(e,t,n,s,r){var o=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var a=s.tag;if(a===3||a===4){var l=s.stateNode.containerInfo;if(l===r||l.nodeType===8&&l.parentNode===r)break;if(a===4)for(a=s.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===r||c.nodeType===8&&c.parentNode===r))return;a=a.return}for(;l!==null;){if(a=Mn(l),a===null)return;if(c=a.tag,c===5||c===6){s=o=a;continue e}l=l.parentNode}}s=s.return}vp(function(){var u=o,d=mc(n),f=[];e:{var h=Wp.get(e);if(h!==void 0){var y=wc,g=e;switch(e){case"keypress":if(zi(n)===0)break e;case"keydown":case"keyup":y=dx;break;case"focusin":g="focus",y=ca;break;case"focusout":g="blur",y=ca;break;case"beforeblur":case"afterblur":y=ca;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":y=md;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Jy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=px;break;case $p:case Bp:case Up:y=nx;break;case Hp:y=vx;break;case"scroll":y=Xy;break;case"wheel":y=yx;break;case"copy":case"cut":case"paste":y=rx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=gd}var k=(t&4)!==0,N=!k&&e==="scroll",m=k?h!==null?h+"Capture":null:h;k=[];for(var p=u,v;p!==null;){v=p;var j=v.stateNode;if(v.tag===5&&j!==null&&(v=j,m!==null&&(j=Tr(p,m),j!=null&&k.push(Lr(p,j,v)))),N)break;p=p.return}0<k.length&&(h=new y(h,g,null,n,d),f.push({event:h,listeners:k}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",h&&n!==il&&(g=n.relatedTarget||n.fromElement)&&(Mn(g)||g[$t]))break e;if((y||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,y?(g=n.relatedTarget||n.toElement,y=u,g=g?Mn(g):null,g!==null&&(N=Un(g),g!==N||g.tag!==5&&g.tag!==6)&&(g=null)):(y=null,g=u),y!==g)){if(k=md,j="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(k=gd,j="onPointerLeave",m="onPointerEnter",p="pointer"),N=y==null?h:es(y),v=g==null?h:es(g),h=new k(j,p+"leave",y,n,d),h.target=N,h.relatedTarget=v,j=null,Mn(d)===u&&(k=new k(m,p+"enter",g,n,d),k.target=v,k.relatedTarget=N,j=k),N=j,y&&g)t:{for(k=y,m=g,p=0,v=k;v;v=Gn(v))p++;for(v=0,j=m;j;j=Gn(j))v++;for(;0<p-v;)k=Gn(k),p--;for(;0<v-p;)m=Gn(m),v--;for(;p--;){if(k===m||m!==null&&k===m.alternate)break t;k=Gn(k),m=Gn(m)}k=null}else k=null;y!==null&&Ed(f,h,y,k,!1),g!==null&&N!==null&&Ed(f,N,g,k,!0)}}e:{if(h=u?es(u):window,y=h.nodeName&&h.nodeName.toLowerCase(),y==="select"||y==="input"&&h.type==="file")var x=Cx;else if(jd(h))if(bp)x=Mx;else{x=Px;var S=Tx}else(y=h.nodeName)&&y.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(x=Ex);if(x&&(x=x(e,u))){zp(f,x,n,d);break e}S&&S(e,h,u),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&el(h,"number",h.value)}switch(S=u?es(u):window,e){case"focusin":(jd(S)||S.contentEditable==="true")&&(Zn=S,fl=u,pr=null);break;case"focusout":pr=fl=Zn=null;break;case"mousedown":hl=!0;break;case"contextmenu":case"mouseup":case"dragend":hl=!1,Cd(f,n,d);break;case"selectionchange":if(Dx)break;case"keydown":case"keyup":Cd(f,n,d)}var C;if(Sc)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Xn?Lp(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Dp&&n.locale!=="ko"&&(Xn||T!=="onCompositionStart"?T==="onCompositionEnd"&&Xn&&(C=Rp()):(Jt=d,jc="value"in Jt?Jt.value:Jt.textContent,Xn=!0)),S=eo(u,T),0<S.length&&(T=new vd(T,e,null,n,d),f.push({event:T,listeners:S}),C?T.data=C:(C=_p(n),C!==null&&(T.data=C)))),(C=jx?wx(e,n):kx(e,n))&&(u=eo(u,"onBeforeInput"),0<u.length&&(d=new vd("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=C))}Kp(f,t)})}function Lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function eo(e,t){for(var n=t+"Capture",s=[];e!==null;){var r=e,o=r.stateNode;r.tag===5&&o!==null&&(r=o,o=Tr(e,n),o!=null&&s.unshift(Lr(e,o,r)),o=Tr(e,t),o!=null&&s.push(Lr(e,o,r))),e=e.return}return s}function Gn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ed(e,t,n,s,r){for(var o=t._reactName,a=[];n!==null&&n!==s;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===s)break;l.tag===5&&u!==null&&(l=u,r?(c=Tr(n,o),c!=null&&a.unshift(Lr(n,c,l))):r||(c=Tr(n,o),c!=null&&a.push(Lr(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var bx=/\r\n?/g,Vx=/\u0000|\uFFFD/g;function Md(e){return(typeof e=="string"?e:""+e).replace(bx,`
|
|
39
|
+
`).replace(Vx,"")}function vi(e,t,n){if(t=Md(t),Md(e)!==t&&n)throw Error(E(425))}function to(){}var pl=null,ml=null;function vl(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 gl=typeof setTimeout=="function"?setTimeout:void 0,Ox=typeof clearTimeout=="function"?clearTimeout:void 0,Ad=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof Ad<"u"?function(e){return Ad.resolve(null).then(e).catch(Ix)}:gl;function Ix(e){setTimeout(function(){throw e})}function ga(e,t){var n=t,s=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(s===0){e.removeChild(r),Mr(t);return}s--}else n!=="$"&&n!=="$?"&&n!=="$!"||s++;n=r}while(n);Mr(t)}function an(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 Rd(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 Os=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Os,_r="__reactProps$"+Os,$t="__reactContainer$"+Os,yl="__reactEvents$"+Os,$x="__reactListeners$"+Os,Bx="__reactHandles$"+Os;function Mn(e){var t=e[Tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$t]||n[Tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Rd(e);e!==null;){if(n=e[Tt])return n;e=Rd(e)}return t}e=n,n=e.parentNode}return null}function Xr(e){return e=e[Tt]||e[$t],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function Lo(e){return e[_r]||null}var xl=[],ts=-1;function jn(e){return{current:e}}function te(e){0>ts||(e.current=xl[ts],xl[ts]=null,ts--)}function Z(e,t){ts++,xl[ts]=e.current,e.current=t}var mn={},ze=jn(mn),He=jn(!1),bn=mn;function Ss(e,t){var n=e.type.contextTypes;if(!n)return mn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=t[o];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function We(e){return e=e.childContextTypes,e!=null}function no(){te(He),te(ze)}function Dd(e,t,n){if(ze.current!==mn)throw Error(E(168));Z(ze,t),Z(He,n)}function qp(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var r in s)if(!(r in t))throw Error(E(108,Ty(e)||"Unknown",r));return ce({},n,s)}function so(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mn,bn=ze.current,Z(ze,e),Z(He,He.current),!0}function Ld(e,t,n){var s=e.stateNode;if(!s)throw Error(E(169));n?(e=qp(e,t,bn),s.__reactInternalMemoizedMergedChildContext=e,te(He),te(ze),Z(ze,e)):te(He),Z(He,n)}var _t=null,_o=!1,ya=!1;function Qp(e){_t===null?_t=[e]:_t.push(e)}function Ux(e){_o=!0,Qp(e)}function wn(){if(!ya&&_t!==null){ya=!0;var e=0,t=q;try{var n=_t;for(q=1;e<n.length;e++){var s=n[e];do s=s(!0);while(s!==null)}_t=null,_o=!1}catch(r){throw _t!==null&&(_t=_t.slice(e+1)),jp(vc,wn),r}finally{q=t,ya=!1}}return null}var ns=[],ss=0,ro=null,io=0,lt=[],ct=0,Vn=null,zt=1,bt="";function Cn(e,t){ns[ss++]=io,ns[ss++]=ro,ro=e,io=t}function Yp(e,t,n){lt[ct++]=zt,lt[ct++]=bt,lt[ct++]=Vn,Vn=e;var s=zt;e=bt;var r=32-wt(s)-1;s&=~(1<<r),n+=1;var o=32-wt(t)+r;if(30<o){var a=r-r%5;o=(s&(1<<a)-1).toString(32),s>>=a,r-=a,zt=1<<32-wt(t)+r|n<<r|s,bt=o+e}else zt=1<<o|n<<r|s,bt=e}function Cc(e){e.return!==null&&(Cn(e,1),Yp(e,1,0))}function Tc(e){for(;e===ro;)ro=ns[--ss],ns[ss]=null,io=ns[--ss],ns[ss]=null;for(;e===Vn;)Vn=lt[--ct],lt[ct]=null,bt=lt[--ct],lt[ct]=null,zt=lt[--ct],lt[ct]=null}var Je=null,Xe=null,se=!1,jt=null;function Xp(e,t){var n=ut(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 _d(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,Je=e,Xe=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Je=e,Xe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vn!==null?{id:zt,overflow:bt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ut(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Je=e,Xe=null,!0):!1;default:return!1}}function jl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function wl(e){if(se){var t=Xe;if(t){var n=t;if(!_d(e,t)){if(jl(e))throw Error(E(418));t=an(n.nextSibling);var s=Je;t&&_d(e,t)?Xp(s,n):(e.flags=e.flags&-4097|2,se=!1,Je=e)}}else{if(jl(e))throw Error(E(418));e.flags=e.flags&-4097|2,se=!1,Je=e}}}function zd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Je=e}function gi(e){if(e!==Je)return!1;if(!se)return zd(e),se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vl(e.type,e.memoizedProps)),t&&(t=Xe)){if(jl(e))throw Zp(),Error(E(418));for(;t;)Xp(e,t),t=an(t.nextSibling)}if(zd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xe=an(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xe=null}}else Xe=Je?an(e.stateNode.nextSibling):null;return!0}function Zp(){for(var e=Xe;e;)e=an(e.nextSibling)}function Ns(){Xe=Je=null,se=!1}function Pc(e){jt===null?jt=[e]:jt.push(e)}var Hx=Wt.ReactCurrentBatchConfig;function Xs(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(E(309));var s=n.stateNode}if(!s)throw Error(E(147,e));var r=s,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=r.refs;a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function yi(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bd(e){var t=e._init;return t(e._payload)}function Jp(e){function t(m,p){if(e){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function n(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function s(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function r(m,p){return m=dn(m,p),m.index=0,m.sibling=null,m}function o(m,p,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,p,v,j){return p===null||p.tag!==6?(p=Ca(v,m.mode,j),p.return=m,p):(p=r(p,v),p.return=m,p)}function c(m,p,v,j){var x=v.type;return x===Yn?d(m,p,v.props.children,j,v.key):p!==null&&(p.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Qt&&bd(x)===p.type)?(j=r(p,v.props),j.ref=Xs(m,p,v),j.return=m,j):(j=Bi(v.type,v.key,v.props,null,m.mode,j),j.ref=Xs(m,p,v),j.return=m,j)}function u(m,p,v,j){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=Ta(v,m.mode,j),p.return=m,p):(p=r(p,v.children||[]),p.return=m,p)}function d(m,p,v,j,x){return p===null||p.tag!==7?(p=_n(v,m.mode,j,x),p.return=m,p):(p=r(p,v),p.return=m,p)}function f(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Ca(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ai:return v=Bi(p.type,p.key,p.props,null,m.mode,v),v.ref=Xs(m,null,p),v.return=m,v;case Qn:return p=Ta(p,m.mode,v),p.return=m,p;case Qt:var j=p._init;return f(m,j(p._payload),v)}if(sr(p)||Ks(p))return p=_n(p,m.mode,v,null),p.return=m,p;yi(m,p)}return null}function h(m,p,v,j){var x=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return x!==null?null:l(m,p,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ai:return v.key===x?c(m,p,v,j):null;case Qn:return v.key===x?u(m,p,v,j):null;case Qt:return x=v._init,h(m,p,x(v._payload),j)}if(sr(v)||Ks(v))return x!==null?null:d(m,p,v,j,null);yi(m,v)}return null}function y(m,p,v,j,x){if(typeof j=="string"&&j!==""||typeof j=="number")return m=m.get(v)||null,l(p,m,""+j,x);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case ai:return m=m.get(j.key===null?v:j.key)||null,c(p,m,j,x);case Qn:return m=m.get(j.key===null?v:j.key)||null,u(p,m,j,x);case Qt:var S=j._init;return y(m,p,v,S(j._payload),x)}if(sr(j)||Ks(j))return m=m.get(v)||null,d(p,m,j,x,null);yi(p,j)}return null}function g(m,p,v,j){for(var x=null,S=null,C=p,T=p=0,R=null;C!==null&&T<v.length;T++){C.index>T?(R=C,C=null):R=C.sibling;var P=h(m,C,v[T],j);if(P===null){C===null&&(C=R);break}e&&C&&P.alternate===null&&t(m,C),p=o(P,p,T),S===null?x=P:S.sibling=P,S=P,C=R}if(T===v.length)return n(m,C),se&&Cn(m,T),x;if(C===null){for(;T<v.length;T++)C=f(m,v[T],j),C!==null&&(p=o(C,p,T),S===null?x=C:S.sibling=C,S=C);return se&&Cn(m,T),x}for(C=s(m,C);T<v.length;T++)R=y(C,m,T,v[T],j),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?T:R.key),p=o(R,p,T),S===null?x=R:S.sibling=R,S=R);return e&&C.forEach(function($){return t(m,$)}),se&&Cn(m,T),x}function k(m,p,v,j){var x=Ks(v);if(typeof x!="function")throw Error(E(150));if(v=x.call(v),v==null)throw Error(E(151));for(var S=x=null,C=p,T=p=0,R=null,P=v.next();C!==null&&!P.done;T++,P=v.next()){C.index>T?(R=C,C=null):R=C.sibling;var $=h(m,C,P.value,j);if($===null){C===null&&(C=R);break}e&&C&&$.alternate===null&&t(m,C),p=o($,p,T),S===null?x=$:S.sibling=$,S=$,C=R}if(P.done)return n(m,C),se&&Cn(m,T),x;if(C===null){for(;!P.done;T++,P=v.next())P=f(m,P.value,j),P!==null&&(p=o(P,p,T),S===null?x=P:S.sibling=P,S=P);return se&&Cn(m,T),x}for(C=s(m,C);!P.done;T++,P=v.next())P=y(C,m,T,P.value,j),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?T:P.key),p=o(P,p,T),S===null?x=P:S.sibling=P,S=P);return e&&C.forEach(function(O){return t(m,O)}),se&&Cn(m,T),x}function N(m,p,v,j){if(typeof v=="object"&&v!==null&&v.type===Yn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ai:e:{for(var x=v.key,S=p;S!==null;){if(S.key===x){if(x=v.type,x===Yn){if(S.tag===7){n(m,S.sibling),p=r(S,v.props.children),p.return=m,m=p;break e}}else if(S.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Qt&&bd(x)===S.type){n(m,S.sibling),p=r(S,v.props),p.ref=Xs(m,S,v),p.return=m,m=p;break e}n(m,S);break}else t(m,S);S=S.sibling}v.type===Yn?(p=_n(v.props.children,m.mode,j,v.key),p.return=m,m=p):(j=Bi(v.type,v.key,v.props,null,m.mode,j),j.ref=Xs(m,p,v),j.return=m,m=j)}return a(m);case Qn:e:{for(S=v.key;p!==null;){if(p.key===S)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=r(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Ta(v,m.mode,j),p.return=m,m=p}return a(m);case Qt:return S=v._init,N(m,p,S(v._payload),j)}if(sr(v))return g(m,p,v,j);if(Ks(v))return k(m,p,v,j);yi(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=r(p,v),p.return=m,m=p):(n(m,p),p=Ca(v,m.mode,j),p.return=m,m=p),a(m)):n(m,p)}return N}var Cs=Jp(!0),em=Jp(!1),oo=jn(null),ao=null,rs=null,Ec=null;function Mc(){Ec=rs=ao=null}function Ac(e){var t=oo.current;te(oo),e._currentValue=t}function kl(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function ys(e,t){ao=e,Ec=rs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ue=!0),e.firstContext=null)}function ht(e){var t=e._currentValue;if(Ec!==e)if(e={context:e,memoizedValue:t,next:null},rs===null){if(ao===null)throw Error(E(308));rs=e,ao.dependencies={lanes:0,firstContext:e}}else rs=rs.next=e;return t}var An=null;function Rc(e){An===null?An=[e]:An.push(e)}function tm(e,t,n,s){var r=t.interleaved;return r===null?(n.next=n,Rc(t)):(n.next=r.next,r.next=n),t.interleaved=n,Bt(e,s)}function Bt(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 Yt=!1;function Dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nm(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 Vt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ln(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,G&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,Bt(e,n)}return r=s.interleaved,r===null?(t.next=t,Rc(s)):(t.next=r.next,r.next=t),s.interleaved=t,Bt(e,n)}function bi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,gc(e,n)}}function Vd(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,o=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};o===null?r=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?r=o=t:o=o.next=t}else r=o=t;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function lo(e,t,n,s){var r=e.updateQueue;Yt=!1;var o=r.firstBaseUpdate,a=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?o=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=r.baseState;a=0,d=u=c=null,l=o;do{var h=l.lane,y=l.eventTime;if((s&h)===h){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,k=l;switch(h=t,y=n,k.tag){case 1:if(g=k.payload,typeof g=="function"){f=g.call(y,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=k.payload,h=typeof g=="function"?g.call(y,f,h):g,h==null)break e;f=ce({},f,h);break e;case 2:Yt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=r.effects,h===null?r.effects=[l]:h.push(l))}else y={eventTime:y,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,a|=h;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;h=l,l=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);if(d===null&&(c=f),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,t=r.shared.interleaved,t!==null){r=t;do a|=r.lane,r=r.next;while(r!==t)}else o===null&&(r.shared.lanes=0);Fn|=a,e.lanes=a,e.memoizedState=f}}function Od(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],r=s.callback;if(r!==null){if(s.callback=null,s=n,typeof r!="function")throw Error(E(191,r));r.call(s)}}}var Zr={},Mt=jn(Zr),zr=jn(Zr),br=jn(Zr);function Rn(e){if(e===Zr)throw Error(E(174));return e}function Lc(e,t){switch(Z(br,t),Z(zr,e),Z(Mt,Zr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:nl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=nl(t,e)}te(Mt),Z(Mt,t)}function Ts(){te(Mt),te(zr),te(br)}function sm(e){Rn(br.current);var t=Rn(Mt.current),n=nl(t,e.type);t!==n&&(Z(zr,e),Z(Mt,n))}function _c(e){zr.current===e&&(te(Mt),te(zr))}var ie=jn(0);function co(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)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 xa=[];function zc(){for(var e=0;e<xa.length;e++)xa[e]._workInProgressVersionPrimary=null;xa.length=0}var Vi=Wt.ReactCurrentDispatcher,ja=Wt.ReactCurrentBatchConfig,On=0,le=null,ye=null,ke=null,uo=!1,mr=!1,Vr=0,Wx=0;function Ae(){throw Error(E(321))}function bc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!St(e[n],t[n]))return!1;return!0}function Vc(e,t,n,s,r,o){if(On=o,le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Vi.current=e===null||e.memoizedState===null?Qx:Yx,e=n(s,r),mr){o=0;do{if(mr=!1,Vr=0,25<=o)throw Error(E(301));o+=1,ke=ye=null,t.updateQueue=null,Vi.current=Xx,e=n(s,r)}while(mr)}if(Vi.current=fo,t=ye!==null&&ye.next!==null,On=0,ke=ye=le=null,uo=!1,t)throw Error(E(300));return e}function Oc(){var e=Vr!==0;return Vr=0,e}function Ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ke===null?le.memoizedState=ke=e:ke=ke.next=e,ke}function pt(){if(ye===null){var e=le.alternate;e=e!==null?e.memoizedState:null}else e=ye.next;var t=ke===null?le.memoizedState:ke.next;if(t!==null)ke=t,ye=e;else{if(e===null)throw Error(E(310));ye=e,e={memoizedState:ye.memoizedState,baseState:ye.baseState,baseQueue:ye.baseQueue,queue:ye.queue,next:null},ke===null?le.memoizedState=ke=e:ke=ke.next=e}return ke}function Or(e,t){return typeof t=="function"?t(e):t}function wa(e){var t=pt(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var s=ye,r=s.baseQueue,o=n.pending;if(o!==null){if(r!==null){var a=r.next;r.next=o.next,o.next=a}s.baseQueue=r=o,n.pending=null}if(r!==null){o=r.next,s=s.baseState;var l=a=null,c=null,u=o;do{var d=u.lane;if((On&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),s=u.hasEagerState?u.eagerState:e(s,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,a=s):c=c.next=f,le.lanes|=d,Fn|=d}u=u.next}while(u!==null&&u!==o);c===null?a=s:c.next=l,St(s,t.memoizedState)||(Ue=!0),t.memoizedState=s,t.baseState=a,t.baseQueue=c,n.lastRenderedState=s}if(e=n.interleaved,e!==null){r=e;do o=r.lane,le.lanes|=o,Fn|=o,r=r.next;while(r!==e)}else r===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ka(e){var t=pt(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var s=n.dispatch,r=n.pending,o=t.memoizedState;if(r!==null){n.pending=null;var a=r=r.next;do o=e(o,a.action),a=a.next;while(a!==r);St(o,t.memoizedState)||(Ue=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,s]}function rm(){}function im(e,t){var n=le,s=pt(),r=t(),o=!St(s.memoizedState,r);if(o&&(s.memoizedState=r,Ue=!0),s=s.queue,Fc(lm.bind(null,n,s,e),[e]),s.getSnapshot!==t||o||ke!==null&&ke.memoizedState.tag&1){if(n.flags|=2048,Fr(9,am.bind(null,n,s,r,t),void 0,null),Se===null)throw Error(E(349));On&30||om(n,t,r)}return r}function om(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function am(e,t,n,s){t.value=n,t.getSnapshot=s,cm(t)&&um(e)}function lm(e,t,n){return n(function(){cm(t)&&um(e)})}function cm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!St(e,n)}catch{return!0}}function um(e){var t=Bt(e,1);t!==null&&kt(t,e,1,-1)}function Fd(e){var t=Ct();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:e},t.queue=e,e=e.dispatch=qx.bind(null,le,e),[t.memoizedState,e]}function Fr(e,t,n,s){return e={tag:e,create:t,destroy:n,deps:s,next:null},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e)),e}function dm(){return pt().memoizedState}function Oi(e,t,n,s){var r=Ct();le.flags|=e,r.memoizedState=Fr(1|t,n,void 0,s===void 0?null:s)}function zo(e,t,n,s){var r=pt();s=s===void 0?null:s;var o=void 0;if(ye!==null){var a=ye.memoizedState;if(o=a.destroy,s!==null&&bc(s,a.deps)){r.memoizedState=Fr(t,n,o,s);return}}le.flags|=e,r.memoizedState=Fr(1|t,n,o,s)}function Id(e,t){return Oi(8390656,8,e,t)}function Fc(e,t){return zo(2048,8,e,t)}function fm(e,t){return zo(4,2,e,t)}function hm(e,t){return zo(4,4,e,t)}function pm(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 mm(e,t,n){return n=n!=null?n.concat([e]):null,zo(4,4,pm.bind(null,t,e),n)}function Ic(){}function vm(e,t){var n=pt();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&bc(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function gm(e,t){var n=pt();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&bc(t,s[1])?s[0]:(e=e(),n.memoizedState=[e,t],e)}function ym(e,t,n){return On&21?(St(n,t)||(n=Sp(),le.lanes|=n,Fn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n)}function Kx(e,t){var n=q;q=n!==0&&4>n?n:4,e(!0);var s=ja.transition;ja.transition={};try{e(!1),t()}finally{q=n,ja.transition=s}}function xm(){return pt().memoizedState}function Gx(e,t,n){var s=un(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},jm(e))wm(t,n);else if(n=tm(e,t,n,s),n!==null){var r=Oe();kt(n,e,s,r),km(n,t,s)}}function qx(e,t,n){var s=un(e),r={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(jm(e))wm(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(r.hasEagerState=!0,r.eagerState=l,St(l,a)){var c=t.interleaved;c===null?(r.next=r,Rc(t)):(r.next=c.next,c.next=r),t.interleaved=r;return}}catch{}finally{}n=tm(e,t,r,s),n!==null&&(r=Oe(),kt(n,e,s,r),km(n,t,s))}}function jm(e){var t=e.alternate;return e===le||t!==null&&t===le}function wm(e,t){mr=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function km(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,gc(e,n)}}var fo={readContext:ht,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},Qx={readContext:ht,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:Id,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Oi(4194308,4,pm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Oi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Oi(4,2,e,t)},useMemo:function(e,t){var n=Ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var s=Ct();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=Gx.bind(null,le,e),[s.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:Fd,useDebugValue:Ic,useDeferredValue:function(e){return Ct().memoizedState=e},useTransition:function(){var e=Fd(!1),t=e[0];return e=Kx.bind(null,e[1]),Ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var s=le,r=Ct();if(se){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),Se===null)throw Error(E(349));On&30||om(s,t,n)}r.memoizedState=n;var o={value:n,getSnapshot:t};return r.queue=o,Id(lm.bind(null,s,o,e),[e]),s.flags|=2048,Fr(9,am.bind(null,s,o,n,t),void 0,null),n},useId:function(){var e=Ct(),t=Se.identifierPrefix;if(se){var n=bt,s=zt;n=(s&~(1<<32-wt(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Wx++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Yx={readContext:ht,useCallback:vm,useContext:ht,useEffect:Fc,useImperativeHandle:mm,useInsertionEffect:fm,useLayoutEffect:hm,useMemo:gm,useReducer:wa,useRef:dm,useState:function(){return wa(Or)},useDebugValue:Ic,useDeferredValue:function(e){var t=pt();return ym(t,ye.memoizedState,e)},useTransition:function(){var e=wa(Or)[0],t=pt().memoizedState;return[e,t]},useMutableSource:rm,useSyncExternalStore:im,useId:xm,unstable_isNewReconciler:!1},Xx={readContext:ht,useCallback:vm,useContext:ht,useEffect:Fc,useImperativeHandle:mm,useInsertionEffect:fm,useLayoutEffect:hm,useMemo:gm,useReducer:ka,useRef:dm,useState:function(){return ka(Or)},useDebugValue:Ic,useDeferredValue:function(e){var t=pt();return ye===null?t.memoizedState=e:ym(t,ye.memoizedState,e)},useTransition:function(){var e=ka(Or)[0],t=pt().memoizedState;return[e,t]},useMutableSource:rm,useSyncExternalStore:im,useId:xm,unstable_isNewReconciler:!1};function yt(e,t){if(e&&e.defaultProps){t=ce({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Sl(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bo={isMounted:function(e){return(e=e._reactInternals)?Un(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Oe(),r=un(e),o=Vt(s,r);o.payload=t,n!=null&&(o.callback=n),t=ln(e,o,r),t!==null&&(kt(t,e,r,s),bi(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Oe(),r=un(e),o=Vt(s,r);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ln(e,o,r),t!==null&&(kt(t,e,r,s),bi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Oe(),s=un(e),r=Vt(n,s);r.tag=2,t!=null&&(r.callback=t),t=ln(e,r,s),t!==null&&(kt(t,e,s,n),bi(t,e,s))}};function $d(e,t,n,s,r,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,o,a):t.prototype&&t.prototype.isPureReactComponent?!Rr(n,s)||!Rr(r,o):!0}function Sm(e,t,n){var s=!1,r=mn,o=t.contextType;return typeof o=="object"&&o!==null?o=ht(o):(r=We(t)?bn:ze.current,s=t.contextTypes,o=(s=s!=null)?Ss(e,r):mn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bo,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function Bd(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&bo.enqueueReplaceState(t,t.state,null)}function Nl(e,t,n,s){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},Dc(e);var o=t.contextType;typeof o=="object"&&o!==null?r.context=ht(o):(o=We(t)?bn:ze.current,r.context=Ss(e,o)),r.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Sl(e,t,o,n),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&bo.enqueueReplaceState(r,r.state,null),lo(e,n,r,s),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308)}function Ps(e,t){try{var n="",s=t;do n+=Cy(s),s=s.return;while(s);var r=n}catch(o){r=`
|
|
40
|
+
Error generating stack: `+o.message+`
|
|
41
|
+
`+o.stack}return{value:e,source:t,stack:r,digest:null}}function Sa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Cl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zx=typeof WeakMap=="function"?WeakMap:Map;function Nm(e,t,n){n=Vt(-1,n),n.tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){po||(po=!0,zl=s),Cl(e,t)},n}function Cm(e,t,n){n=Vt(-1,n),n.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var r=t.value;n.payload=function(){return s(r)},n.callback=function(){Cl(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Cl(e,t),typeof s!="function"&&(cn===null?cn=new Set([this]):cn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Ud(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new Zx;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(n)||(r.add(n),e=f0.bind(null,e,t,n),t.then(e,e))}function Hd(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 Wd(e,t,n,s,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Vt(-1,1),t.tag=2,ln(n,t,1))),n.lanes|=1),e)}var Jx=Wt.ReactCurrentOwner,Ue=!1;function Ve(e,t,n,s){t.child=e===null?em(t,null,n,s):Cs(t,e.child,n,s)}function Kd(e,t,n,s,r){n=n.render;var o=t.ref;return ys(t,r),s=Vc(e,t,n,s,o,r),n=Oc(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Ut(e,t,r)):(se&&n&&Cc(t),t.flags|=1,Ve(e,t,s,r),t.child)}function Gd(e,t,n,s,r){if(e===null){var o=n.type;return typeof o=="function"&&!qc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Tm(e,t,o,s,r)):(e=Bi(n.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&r)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Rr,n(a,s)&&e.ref===t.ref)return Ut(e,t,r)}return t.flags|=1,e=dn(o,s),e.ref=t.ref,e.return=t,t.child=e}function Tm(e,t,n,s,r){if(e!==null){var o=e.memoizedProps;if(Rr(o,s)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=s=o,(e.lanes&r)!==0)e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,Ut(e,t,r)}return Tl(e,t,n,s,r)}function Pm(e,t,n){var s=t.pendingProps,r=s.children,o=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Z(os,Qe),Qe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Z(os,Qe),Qe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=o!==null?o.baseLanes:n,Z(os,Qe),Qe|=s}else o!==null?(s=o.baseLanes|n,t.memoizedState=null):s=n,Z(os,Qe),Qe|=s;return Ve(e,t,r,n),t.child}function Em(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tl(e,t,n,s,r){var o=We(n)?bn:ze.current;return o=Ss(t,o),ys(t,r),n=Vc(e,t,n,s,o,r),s=Oc(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Ut(e,t,r)):(se&&s&&Cc(t),t.flags|=1,Ve(e,t,n,r),t.child)}function qd(e,t,n,s,r){if(We(n)){var o=!0;so(t)}else o=!1;if(ys(t,r),t.stateNode===null)Fi(e,t),Sm(t,n,s),Nl(t,n,s,r),s=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=ht(u):(u=We(n)?bn:ze.current,u=Ss(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==s||c!==u)&&Bd(t,a,s,u),Yt=!1;var h=t.memoizedState;a.state=h,lo(t,s,a,r),c=t.memoizedState,l!==s||h!==c||He.current||Yt?(typeof d=="function"&&(Sl(t,n,d,s),c=t.memoizedState),(l=Yt||$d(t,n,l,s,h,c,u))?(f||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=s,t.memoizedState=c),a.props=s,a.state=c,a.context=u,s=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{a=t.stateNode,nm(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:yt(t.type,l),a.props=u,f=t.pendingProps,h=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=ht(c):(c=We(n)?bn:ze.current,c=Ss(t,c));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||h!==c)&&Bd(t,a,s,c),Yt=!1,h=t.memoizedState,a.state=h,lo(t,s,a,r);var g=t.memoizedState;l!==f||h!==g||He.current||Yt?(typeof y=="function"&&(Sl(t,n,y,s),g=t.memoizedState),(u=Yt||$d(t,n,u,s,h,g,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(s,g,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(s,g,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=g),a.props=s,a.state=g,a.context=c,s=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),s=!1)}return Pl(e,t,n,s,o,r)}function Pl(e,t,n,s,r,o){Em(e,t);var a=(t.flags&128)!==0;if(!s&&!a)return r&&Ld(t,n,!1),Ut(e,t,o);s=t.stateNode,Jx.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&a?(t.child=Cs(t,e.child,null,o),t.child=Cs(t,null,l,o)):Ve(e,t,l,o),t.memoizedState=s.state,r&&Ld(t,n,!0),t.child}function Mm(e){var t=e.stateNode;t.pendingContext?Dd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Dd(e,t.context,!1),Lc(e,t.containerInfo)}function Qd(e,t,n,s,r){return Ns(),Pc(r),t.flags|=256,Ve(e,t,n,s),t.child}var El={dehydrated:null,treeContext:null,retryLane:0};function Ml(e){return{baseLanes:e,cachePool:null,transitions:null}}function Am(e,t,n){var s=t.pendingProps,r=ie.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(r&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),Z(ie,r&1),e===null)return wl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=s.children,e=s.fallback,o?(s=t.mode,o=t.child,a={mode:"hidden",children:a},!(s&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Fo(a,s,0,null),e=_n(e,s,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ml(n),t.memoizedState=El,e):$c(t,a));if(r=e.memoizedState,r!==null&&(l=r.dehydrated,l!==null))return e0(e,t,a,s,l,r,n);if(o){o=s.fallback,a=t.mode,r=e.child,l=r.sibling;var c={mode:"hidden",children:s.children};return!(a&1)&&t.child!==r?(s=t.child,s.childLanes=0,s.pendingProps=c,t.deletions=null):(s=dn(r,c),s.subtreeFlags=r.subtreeFlags&14680064),l!==null?o=dn(l,o):(o=_n(o,a,n,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,s=o,o=t.child,a=e.child.memoizedState,a=a===null?Ml(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=El,s}return o=e.child,e=o.sibling,s=dn(o,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=n),s.return=t,s.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}function $c(e,t){return t=Fo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xi(e,t,n,s){return s!==null&&Pc(s),Cs(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function e0(e,t,n,s,r,o,a){if(n)return t.flags&256?(t.flags&=-257,s=Sa(Error(E(422))),xi(e,t,a,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=s.fallback,r=t.mode,s=Fo({mode:"visible",children:s.children},r,0,null),o=_n(o,r,a,null),o.flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,t.mode&1&&Cs(t,e.child,null,a),t.child.memoizedState=Ml(a),t.memoizedState=El,o);if(!(t.mode&1))return xi(e,t,a,null);if(r.data==="$!"){if(s=r.nextSibling&&r.nextSibling.dataset,s)var l=s.dgst;return s=l,o=Error(E(419)),s=Sa(o,s,void 0),xi(e,t,a,s)}if(l=(a&e.childLanes)!==0,Ue||l){if(s=Se,s!==null){switch(a&-a){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(s.suspendedLanes|a)?0:r,r!==0&&r!==o.retryLane&&(o.retryLane=r,Bt(e,r),kt(s,e,r,-1))}return Gc(),s=Sa(Error(E(421))),xi(e,t,a,s)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=h0.bind(null,e),r._reactRetry=t,null):(e=o.treeContext,Xe=an(r.nextSibling),Je=t,se=!0,jt=null,e!==null&&(lt[ct++]=zt,lt[ct++]=bt,lt[ct++]=Vn,zt=e.id,bt=e.overflow,Vn=t),t=$c(t,s.children),t.flags|=4096,t)}function Yd(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),kl(e.return,t,n)}function Na(e,t,n,s,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=n,o.tailMode=r)}function Rm(e,t,n){var s=t.pendingProps,r=s.revealOrder,o=s.tail;if(Ve(e,t,s.children,n),s=ie.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yd(e,n,t);else if(e.tag===19)Yd(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}s&=1}if(Z(ie,s),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&co(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Na(t,!1,r,n,o);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&co(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Na(t,!0,n,null,o);break;case"together":Na(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function t0(e,t,n){switch(t.tag){case 3:Mm(t),Ns();break;case 5:sm(t);break;case 1:We(t.type)&&so(t);break;case 4:Lc(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,r=t.memoizedProps.value;Z(oo,s._currentValue),s._currentValue=r;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(Z(ie,ie.current&1),t.flags|=128,null):n&t.child.childLanes?Am(e,t,n):(Z(ie,ie.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);Z(ie,ie.current&1);break;case 19:if(s=(n&t.childLanes)!==0,e.flags&128){if(s)return Rm(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Z(ie,ie.current),s)break;return null;case 22:case 23:return t.lanes=0,Pm(e,t,n)}return Ut(e,t,n)}var Dm,Al,Lm,_m;Dm=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}};Al=function(){};Lm=function(e,t,n,s){var r=e.memoizedProps;if(r!==s){e=t.stateNode,Rn(Mt.current);var o=null;switch(n){case"input":r=Za(e,r),s=Za(e,s),o=[];break;case"select":r=ce({},r,{value:void 0}),s=ce({},s,{value:void 0}),o=[];break;case"textarea":r=tl(e,r),s=tl(e,s),o=[];break;default:typeof r.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=to)}sl(n,s);var a;n=null;for(u in r)if(!s.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var l=r[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Nr.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in s){var c=s[u];if(l=r!=null?r[u]:void 0,s.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Nr.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ee("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};_m=function(e,t,n,s){n!==s&&(t.flags|=4)};function Zs(e,t){if(!se)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 s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&14680064,s|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function n0(e,t,n){var s=t.pendingProps;switch(Tc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return We(t.type)&&no(),Re(t),null;case 3:return s=t.stateNode,Ts(),te(He),te(ze),zc(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(gi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,jt!==null&&(Ol(jt),jt=null))),Al(e,t),Re(t),null;case 5:_c(t);var r=Rn(br.current);if(n=t.type,e!==null&&t.stateNode!=null)Lm(e,t,n,s,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(E(166));return Re(t),null}if(e=Rn(Mt.current),gi(t)){s=t.stateNode,n=t.type;var o=t.memoizedProps;switch(s[Tt]=t,s[_r]=o,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",s),ee("close",s);break;case"iframe":case"object":case"embed":ee("load",s);break;case"video":case"audio":for(r=0;r<ir.length;r++)ee(ir[r],s);break;case"source":ee("error",s);break;case"img":case"image":case"link":ee("error",s),ee("load",s);break;case"details":ee("toggle",s);break;case"input":id(s,o),ee("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!o.multiple},ee("invalid",s);break;case"textarea":ad(s,o),ee("invalid",s)}sl(n,o),r=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?s.textContent!==l&&(o.suppressHydrationWarning!==!0&&vi(s.textContent,l,e),r=["children",l]):typeof l=="number"&&s.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&vi(s.textContent,l,e),r=["children",""+l]):Nr.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&ee("scroll",s)}switch(n){case"input":li(s),od(s,o,!0);break;case"textarea":li(s),ld(s);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(s.onclick=to)}s=r,t.updateQueue=s,s!==null&&(t.flags|=4)}else{a=r.nodeType===9?r:r.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=lp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=a.createElement(n,{is:s.is}):(e=a.createElement(n),n==="select"&&(a=e,s.multiple?a.multiple=!0:s.size&&(a.size=s.size))):e=a.createElementNS(e,n),e[Tt]=t,e[_r]=s,Dm(e,t,!1,!1),t.stateNode=e;e:{switch(a=rl(n,s),n){case"dialog":ee("cancel",e),ee("close",e),r=s;break;case"iframe":case"object":case"embed":ee("load",e),r=s;break;case"video":case"audio":for(r=0;r<ir.length;r++)ee(ir[r],e);r=s;break;case"source":ee("error",e),r=s;break;case"img":case"image":case"link":ee("error",e),ee("load",e),r=s;break;case"details":ee("toggle",e),r=s;break;case"input":id(e,s),r=Za(e,s),ee("invalid",e);break;case"option":r=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},r=ce({},s,{value:void 0}),ee("invalid",e);break;case"textarea":ad(e,s),r=tl(e,s),ee("invalid",e);break;default:r=s}sl(n,r),l=r;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?dp(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&cp(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Cr(e,c):typeof c=="number"&&Cr(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Nr.hasOwnProperty(o)?c!=null&&o==="onScroll"&&ee("scroll",e):c!=null&&dc(e,o,c,a))}switch(n){case"input":li(e),od(e,s,!1);break;case"textarea":li(e),ld(e);break;case"option":s.value!=null&&e.setAttribute("value",""+pn(s.value));break;case"select":e.multiple=!!s.multiple,o=s.value,o!=null?ps(e,!!s.multiple,o,!1):s.defaultValue!=null&&ps(e,!!s.multiple,s.defaultValue,!0);break;default:typeof r.onClick=="function"&&(e.onclick=to)}switch(n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Re(t),null;case 6:if(e&&t.stateNode!=null)_m(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(E(166));if(n=Rn(br.current),Rn(Mt.current),gi(t)){if(s=t.stateNode,n=t.memoizedProps,s[Tt]=t,(o=s.nodeValue!==n)&&(e=Je,e!==null))switch(e.tag){case 3:vi(s.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vi(s.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else s=(n.nodeType===9?n:n.ownerDocument).createTextNode(s),s[Tt]=t,t.stateNode=s}return Re(t),null;case 13:if(te(ie),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(se&&Xe!==null&&t.mode&1&&!(t.flags&128))Zp(),Ns(),t.flags|=98560,o=!1;else if(o=gi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(E(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(E(317));o[Tt]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),o=!1}else jt!==null&&(Ol(jt),jt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,t.mode&1&&(e===null||ie.current&1?xe===0&&(xe=3):Gc())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return Ts(),Al(e,t),e===null&&Dr(t.stateNode.containerInfo),Re(t),null;case 10:return Ac(t.type._context),Re(t),null;case 17:return We(t.type)&&no(),Re(t),null;case 19:if(te(ie),o=t.memoizedState,o===null)return Re(t),null;if(s=(t.flags&128)!==0,a=o.rendering,a===null)if(s)Zs(o,!1);else{if(xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=co(e),a!==null){for(t.flags|=128,Zs(o,!1),s=a.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=n,n=t.child;n!==null;)o=n,e=s,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Z(ie,ie.current&1|2),t.child}e=e.sibling}o.tail!==null&&me()>Es&&(t.flags|=128,s=!0,Zs(o,!1),t.lanes=4194304)}else{if(!s)if(e=co(a),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!se)return Re(t),null}else 2*me()-o.renderingStartTime>Es&&n!==1073741824&&(t.flags|=128,s=!0,Zs(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=me(),t.sibling=null,n=ie.current,Z(ie,s?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return Kc(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?Qe&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function s0(e,t){switch(Tc(t),t.tag){case 1:return We(t.type)&&no(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ts(),te(He),te(ze),zc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _c(t),null;case 13:if(te(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ie),null;case 4:return Ts(),null;case 10:return Ac(t.type._context),null;case 22:case 23:return Kc(),null;case 24:return null;default:return null}}var ji=!1,Le=!1,r0=typeof WeakSet=="function"?WeakSet:Set,D=null;function is(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){he(e,t,s)}else n.current=null}function Rl(e,t,n){try{n()}catch(s){he(e,t,s)}}var Xd=!1;function i0(e,t){if(pl=Zi,e=Fp(),Nc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var r=s.anchorOffset,o=s.focusNode;s=s.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var y;f!==n||r!==0&&f.nodeType!==3||(l=a+r),f!==o||s!==0&&f.nodeType!==3||(c=a+s),f.nodeType===3&&(a+=f.nodeValue.length),(y=f.firstChild)!==null;)h=f,f=y;for(;;){if(f===e)break t;if(h===n&&++u===r&&(l=a),h===o&&++d===s&&(c=a),(y=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=y}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ml={focusedElem:e,selectionRange:n},Zi=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var k=g.memoizedProps,N=g.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?k:yt(t.type,k),N);m.__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(E(163))}}catch(j){he(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return g=Xd,Xd=!1,g}function vr(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var r=s=s.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,o!==void 0&&Rl(t,n,o)}r=r.next}while(r!==s)}}function Vo(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 s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}function Dl(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 zm(e){var t=e.alternate;t!==null&&(e.alternate=null,zm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tt],delete t[_r],delete t[yl],delete t[$x],delete t[Bx])),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 bm(e){return e.tag===5||e.tag===3||e.tag===4}function Zd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bm(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 Ll(e,t,n){var s=e.tag;if(s===5||s===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=to));else if(s!==4&&(e=e.child,e!==null))for(Ll(e,t,n),e=e.sibling;e!==null;)Ll(e,t,n),e=e.sibling}function _l(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(_l(e,t,n),e=e.sibling;e!==null;)_l(e,t,n),e=e.sibling}var Ce=null,xt=!1;function Kt(e,t,n){for(n=n.child;n!==null;)Vm(e,t,n),n=n.sibling}function Vm(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(Mo,n)}catch{}switch(n.tag){case 5:Le||is(n,t);case 6:var s=Ce,r=xt;Ce=null,Kt(e,t,n),Ce=s,xt=r,Ce!==null&&(xt?(e=Ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ce.removeChild(n.stateNode));break;case 18:Ce!==null&&(xt?(e=Ce,n=n.stateNode,e.nodeType===8?ga(e.parentNode,n):e.nodeType===1&&ga(e,n),Mr(e)):ga(Ce,n.stateNode));break;case 4:s=Ce,r=xt,Ce=n.stateNode.containerInfo,xt=!0,Kt(e,t,n),Ce=s,xt=r;break;case 0:case 11:case 14:case 15:if(!Le&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){r=s=s.next;do{var o=r,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Rl(n,t,a),r=r.next}while(r!==s)}Kt(e,t,n);break;case 1:if(!Le&&(is(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(l){he(n,t,l)}Kt(e,t,n);break;case 21:Kt(e,t,n);break;case 22:n.mode&1?(Le=(s=Le)||n.memoizedState!==null,Kt(e,t,n),Le=s):Kt(e,t,n);break;default:Kt(e,t,n)}}function Jd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new r0),t.forEach(function(s){var r=p0.bind(null,e,s);n.has(s)||(n.add(s),s.then(r,r))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:Ce=l.stateNode,xt=!1;break e;case 3:Ce=l.stateNode.containerInfo,xt=!0;break e;case 4:Ce=l.stateNode.containerInfo,xt=!0;break e}l=l.return}if(Ce===null)throw Error(E(160));Vm(o,a,r),Ce=null,xt=!1;var c=r.alternate;c!==null&&(c.return=null),r.return=null}catch(u){he(r,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Om(t,e),t=t.sibling}function Om(e,t){var n=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vt(t,e),Nt(e),s&4){try{vr(3,e,e.return),Vo(3,e)}catch(k){he(e,e.return,k)}try{vr(5,e,e.return)}catch(k){he(e,e.return,k)}}break;case 1:vt(t,e),Nt(e),s&512&&n!==null&&is(n,n.return);break;case 5:if(vt(t,e),Nt(e),s&512&&n!==null&&is(n,n.return),e.flags&32){var r=e.stateNode;try{Cr(r,"")}catch(k){he(e,e.return,k)}}if(s&4&&(r=e.stateNode,r!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&op(r,o),rl(l,a);var u=rl(l,o);for(a=0;a<c.length;a+=2){var d=c[a],f=c[a+1];d==="style"?dp(r,f):d==="dangerouslySetInnerHTML"?cp(r,f):d==="children"?Cr(r,f):dc(r,d,f,u)}switch(l){case"input":Ja(r,o);break;case"textarea":ap(r,o);break;case"select":var h=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?ps(r,!!o.multiple,y,!1):h!==!!o.multiple&&(o.defaultValue!=null?ps(r,!!o.multiple,o.defaultValue,!0):ps(r,!!o.multiple,o.multiple?[]:"",!1))}r[_r]=o}catch(k){he(e,e.return,k)}}break;case 6:if(vt(t,e),Nt(e),s&4){if(e.stateNode===null)throw Error(E(162));r=e.stateNode,o=e.memoizedProps;try{r.nodeValue=o}catch(k){he(e,e.return,k)}}break;case 3:if(vt(t,e),Nt(e),s&4&&n!==null&&n.memoizedState.isDehydrated)try{Mr(t.containerInfo)}catch(k){he(e,e.return,k)}break;case 4:vt(t,e),Nt(e);break;case 13:vt(t,e),Nt(e),r=e.child,r.flags&8192&&(o=r.memoizedState!==null,r.stateNode.isHidden=o,!o||r.alternate!==null&&r.alternate.memoizedState!==null||(Hc=me())),s&4&&Jd(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Le=(u=Le)||d,vt(t,e),Le=u):vt(t,e),Nt(e),s&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(D=e,d=e.child;d!==null;){for(f=D=d;D!==null;){switch(h=D,y=h.child,h.tag){case 0:case 11:case 14:case 15:vr(4,h,h.return);break;case 1:is(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){s=h,n=h.return;try{t=s,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(k){he(s,n,k)}}break;case 5:is(h,h.return);break;case 22:if(h.memoizedState!==null){tf(f);continue}}y!==null?(y.return=h,D=y):tf(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{r=f.stateNode,u?(o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=up("display",a))}catch(k){he(e,e.return,k)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(k){he(e,e.return,k)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:vt(t,e),Nt(e),s&4&&Jd(e);break;case 21:break;default:vt(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(bm(n)){var s=n;break e}n=n.return}throw Error(E(160))}switch(s.tag){case 5:var r=s.stateNode;s.flags&32&&(Cr(r,""),s.flags&=-33);var o=Zd(e);_l(e,o,r);break;case 3:case 4:var a=s.stateNode.containerInfo,l=Zd(e);Ll(e,l,a);break;default:throw Error(E(161))}}catch(c){he(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function o0(e,t,n){D=e,Fm(e)}function Fm(e,t,n){for(var s=(e.mode&1)!==0;D!==null;){var r=D,o=r.child;if(r.tag===22&&s){var a=r.memoizedState!==null||ji;if(!a){var l=r.alternate,c=l!==null&&l.memoizedState!==null||Le;l=ji;var u=Le;if(ji=a,(Le=c)&&!u)for(D=r;D!==null;)a=D,c=a.child,a.tag===22&&a.memoizedState!==null?nf(r):c!==null?(c.return=a,D=c):nf(r);for(;o!==null;)D=o,Fm(o),o=o.sibling;D=r,ji=l,Le=u}ef(e)}else r.subtreeFlags&8772&&o!==null?(o.return=r,D=o):ef(e)}}function ef(e){for(;D!==null;){var t=D;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Le||Vo(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!Le)if(n===null)s.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:yt(t.type,n.memoizedProps);s.componentDidUpdate(r,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Od(t,o,s);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}Od(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Mr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}Le||t.flags&512&&Dl(t)}catch(h){he(t,t.return,h)}}if(t===e){D=null;break}if(n=t.sibling,n!==null){n.return=t.return,D=n;break}D=t.return}}function tf(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var n=t.sibling;if(n!==null){n.return=t.return,D=n;break}D=t.return}}function nf(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vo(4,t)}catch(c){he(t,n,c)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var r=t.return;try{s.componentDidMount()}catch(c){he(t,r,c)}}var o=t.return;try{Dl(t)}catch(c){he(t,o,c)}break;case 5:var a=t.return;try{Dl(t)}catch(c){he(t,a,c)}}}catch(c){he(t,t.return,c)}if(t===e){D=null;break}var l=t.sibling;if(l!==null){l.return=t.return,D=l;break}D=t.return}}var a0=Math.ceil,ho=Wt.ReactCurrentDispatcher,Bc=Wt.ReactCurrentOwner,dt=Wt.ReactCurrentBatchConfig,G=0,Se=null,ve=null,Pe=0,Qe=0,os=jn(0),xe=0,Ir=null,Fn=0,Oo=0,Uc=0,gr=null,Be=null,Hc=0,Es=1/0,Lt=null,po=!1,zl=null,cn=null,wi=!1,en=null,mo=0,yr=0,bl=null,Ii=-1,$i=0;function Oe(){return G&6?me():Ii!==-1?Ii:Ii=me()}function un(e){return e.mode&1?G&2&&Pe!==0?Pe&-Pe:Hx.transition!==null?($i===0&&($i=Sp()),$i):(e=q,e!==0||(e=window.event,e=e===void 0?16:Ap(e.type)),e):1}function kt(e,t,n,s){if(50<yr)throw yr=0,bl=null,Error(E(185));Qr(e,n,s),(!(G&2)||e!==Se)&&(e===Se&&(!(G&2)&&(Oo|=n),xe===4&&Zt(e,Pe)),Ke(e,s),n===1&&G===0&&!(t.mode&1)&&(Es=me()+500,_o&&wn()))}function Ke(e,t){var n=e.callbackNode;Hy(e,t);var s=Xi(e,e===Se?Pe:0);if(s===0)n!==null&&dd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(n!=null&&dd(n),t===1)e.tag===0?Ux(sf.bind(null,e)):Qp(sf.bind(null,e)),Fx(function(){!(G&6)&&wn()}),n=null;else{switch(Np(s)){case 1:n=vc;break;case 4:n=wp;break;case 16:n=Yi;break;case 536870912:n=kp;break;default:n=Yi}n=Gm(n,Im.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Im(e,t){if(Ii=-1,$i=0,G&6)throw Error(E(327));var n=e.callbackNode;if(xs()&&e.callbackNode!==n)return null;var s=Xi(e,e===Se?Pe:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=vo(e,s);else{t=s;var r=G;G|=2;var o=Bm();(Se!==e||Pe!==t)&&(Lt=null,Es=me()+500,Ln(e,t));do try{u0();break}catch(l){$m(e,l)}while(!0);Mc(),ho.current=o,G=r,ve!==null?t=0:(Se=null,Pe=0,t=xe)}if(t!==0){if(t===2&&(r=cl(e),r!==0&&(s=r,t=Vl(e,r))),t===1)throw n=Ir,Ln(e,0),Zt(e,s),Ke(e,me()),n;if(t===6)Zt(e,s);else{if(r=e.current.alternate,!(s&30)&&!l0(r)&&(t=vo(e,s),t===2&&(o=cl(e),o!==0&&(s=o,t=Vl(e,o))),t===1))throw n=Ir,Ln(e,0),Zt(e,s),Ke(e,me()),n;switch(e.finishedWork=r,e.finishedLanes=s,t){case 0:case 1:throw Error(E(345));case 2:Tn(e,Be,Lt);break;case 3:if(Zt(e,s),(s&130023424)===s&&(t=Hc+500-me(),10<t)){if(Xi(e,0)!==0)break;if(r=e.suspendedLanes,(r&s)!==s){Oe(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=gl(Tn.bind(null,e,Be,Lt),t);break}Tn(e,Be,Lt);break;case 4:if(Zt(e,s),(s&4194240)===s)break;for(t=e.eventTimes,r=-1;0<s;){var a=31-wt(s);o=1<<a,a=t[a],a>r&&(r=a),s&=~o}if(s=r,s=me()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*a0(s/1960))-s,10<s){e.timeoutHandle=gl(Tn.bind(null,e,Be,Lt),s);break}Tn(e,Be,Lt);break;case 5:Tn(e,Be,Lt);break;default:throw Error(E(329))}}}return Ke(e,me()),e.callbackNode===n?Im.bind(null,e):null}function Vl(e,t){var n=gr;return e.current.memoizedState.isDehydrated&&(Ln(e,t).flags|=256),e=vo(e,t),e!==2&&(t=Be,Be=n,t!==null&&Ol(t)),e}function Ol(e){Be===null?Be=e:Be.push.apply(Be,e)}function l0(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var s=0;s<n.length;s++){var r=n[s],o=r.getSnapshot;r=r.value;try{if(!St(o(),r))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 Zt(e,t){for(t&=~Uc,t&=~Oo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),s=1<<n;e[n]=-1,t&=~s}}function sf(e){if(G&6)throw Error(E(327));xs();var t=Xi(e,0);if(!(t&1))return Ke(e,me()),null;var n=vo(e,t);if(e.tag!==0&&n===2){var s=cl(e);s!==0&&(t=s,n=Vl(e,s))}if(n===1)throw n=Ir,Ln(e,0),Zt(e,t),Ke(e,me()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tn(e,Be,Lt),Ke(e,me()),null}function Wc(e,t){var n=G;G|=1;try{return e(t)}finally{G=n,G===0&&(Es=me()+500,_o&&wn())}}function In(e){en!==null&&en.tag===0&&!(G&6)&&xs();var t=G;G|=1;var n=dt.transition,s=q;try{if(dt.transition=null,q=1,e)return e()}finally{q=s,dt.transition=n,G=t,!(G&6)&&wn()}}function Kc(){Qe=os.current,te(os)}function Ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ox(n)),ve!==null)for(n=ve.return;n!==null;){var s=n;switch(Tc(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&no();break;case 3:Ts(),te(He),te(ze),zc();break;case 5:_c(s);break;case 4:Ts();break;case 13:te(ie);break;case 19:te(ie);break;case 10:Ac(s.type._context);break;case 22:case 23:Kc()}n=n.return}if(Se=e,ve=e=dn(e.current,null),Pe=Qe=t,xe=0,Ir=null,Uc=Oo=Fn=0,Be=gr=null,An!==null){for(t=0;t<An.length;t++)if(n=An[t],s=n.interleaved,s!==null){n.interleaved=null;var r=s.next,o=n.pending;if(o!==null){var a=o.next;o.next=r,s.next=a}n.pending=s}An=null}return e}function $m(e,t){do{var n=ve;try{if(Mc(),Vi.current=fo,uo){for(var s=le.memoizedState;s!==null;){var r=s.queue;r!==null&&(r.pending=null),s=s.next}uo=!1}if(On=0,ke=ye=le=null,mr=!1,Vr=0,Bc.current=null,n===null||n.return===null){xe=1,Ir=t,ve=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=Pe,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=Hd(a);if(y!==null){y.flags&=-257,Wd(y,a,l,o,t),y.mode&1&&Ud(o,u,t),t=y,c=u;var g=t.updateQueue;if(g===null){var k=new Set;k.add(c),t.updateQueue=k}else g.add(c);break e}else{if(!(t&1)){Ud(o,u,t),Gc();break e}c=Error(E(426))}}else if(se&&l.mode&1){var N=Hd(a);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Wd(N,a,l,o,t),Pc(Ps(c,l));break e}}o=c=Ps(c,l),xe!==4&&(xe=2),gr===null?gr=[o]:gr.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var m=Nm(o,c,t);Vd(o,m);break e;case 1:l=c;var p=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(cn===null||!cn.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var j=Cm(o,l,t);Vd(o,j);break e}}o=o.return}while(o!==null)}Hm(n)}catch(x){t=x,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(!0)}function Bm(){var e=ho.current;return ho.current=fo,e===null?fo:e}function Gc(){(xe===0||xe===3||xe===2)&&(xe=4),Se===null||!(Fn&268435455)&&!(Oo&268435455)||Zt(Se,Pe)}function vo(e,t){var n=G;G|=2;var s=Bm();(Se!==e||Pe!==t)&&(Lt=null,Ln(e,t));do try{c0();break}catch(r){$m(e,r)}while(!0);if(Mc(),G=n,ho.current=s,ve!==null)throw Error(E(261));return Se=null,Pe=0,xe}function c0(){for(;ve!==null;)Um(ve)}function u0(){for(;ve!==null&&!zy();)Um(ve)}function Um(e){var t=Km(e.alternate,e,Qe);e.memoizedProps=e.pendingProps,t===null?Hm(e):ve=t,Bc.current=null}function Hm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=s0(n,t),n!==null){n.flags&=32767,ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{xe=6,ve=null;return}}else if(n=n0(n,t,Qe),n!==null){ve=n;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);xe===0&&(xe=5)}function Tn(e,t,n){var s=q,r=dt.transition;try{dt.transition=null,q=1,d0(e,t,n,s)}finally{dt.transition=r,q=s}return null}function d0(e,t,n,s){do xs();while(en!==null);if(G&6)throw Error(E(327));n=e.finishedWork;var r=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Wy(e,o),e===Se&&(ve=Se=null,Pe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wi||(wi=!0,Gm(Yi,function(){return xs(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=dt.transition,dt.transition=null;var a=q;q=1;var l=G;G|=4,Bc.current=null,i0(e,n),Om(n,e),Rx(ml),Zi=!!pl,ml=pl=null,e.current=n,o0(n),by(),G=l,q=a,dt.transition=o}else e.current=n;if(wi&&(wi=!1,en=e,mo=r),o=e.pendingLanes,o===0&&(cn=null),Fy(n.stateNode),Ke(e,me()),t!==null)for(s=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],s(r.value,{componentStack:r.stack,digest:r.digest});if(po)throw po=!1,e=zl,zl=null,e;return mo&1&&e.tag!==0&&xs(),o=e.pendingLanes,o&1?e===bl?yr++:(yr=0,bl=e):yr=0,wn(),null}function xs(){if(en!==null){var e=Np(mo),t=dt.transition,n=q;try{if(dt.transition=null,q=16>e?16:e,en===null)var s=!1;else{if(e=en,en=null,mo=0,G&6)throw Error(E(331));var r=G;for(G|=4,D=e.current;D!==null;){var o=D,a=o.child;if(D.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(D=u;D!==null;){var d=D;switch(d.tag){case 0:case 11:case 15:vr(8,d,o)}var f=d.child;if(f!==null)f.return=d,D=f;else for(;D!==null;){d=D;var h=d.sibling,y=d.return;if(zm(d),d===u){D=null;break}if(h!==null){h.return=y,D=h;break}D=y}}}var g=o.alternate;if(g!==null){var k=g.child;if(k!==null){g.child=null;do{var N=k.sibling;k.sibling=null,k=N}while(k!==null)}}D=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,D=a;else e:for(;D!==null;){if(o=D,o.flags&2048)switch(o.tag){case 0:case 11:case 15:vr(9,o,o.return)}var m=o.sibling;if(m!==null){m.return=o.return,D=m;break e}D=o.return}}var p=e.current;for(D=p;D!==null;){a=D;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,D=v;else e:for(a=p;D!==null;){if(l=D,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Vo(9,l)}}catch(x){he(l,l.return,x)}if(l===a){D=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,D=j;break e}D=l.return}}if(G=r,wn(),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(Mo,e)}catch{}s=!0}return s}finally{q=n,dt.transition=t}}return!1}function rf(e,t,n){t=Ps(n,t),t=Nm(e,t,1),e=ln(e,t,1),t=Oe(),e!==null&&(Qr(e,1,t),Ke(e,t))}function he(e,t,n){if(e.tag===3)rf(e,e,n);else for(;t!==null;){if(t.tag===3){rf(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(cn===null||!cn.has(s))){e=Ps(n,e),e=Cm(t,e,1),t=ln(t,e,1),e=Oe(),t!==null&&(Qr(t,1,e),Ke(t,e));break}}t=t.return}}function f0(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),t=Oe(),e.pingedLanes|=e.suspendedLanes&n,Se===e&&(Pe&n)===n&&(xe===4||xe===3&&(Pe&130023424)===Pe&&500>me()-Hc?Ln(e,0):Uc|=n),Ke(e,t)}function Wm(e,t){t===0&&(e.mode&1?(t=di,di<<=1,!(di&130023424)&&(di=4194304)):t=1);var n=Oe();e=Bt(e,t),e!==null&&(Qr(e,t,n),Ke(e,n))}function h0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wm(e,n)}function p0(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(E(314))}s!==null&&s.delete(t),Wm(e,n)}var Km;Km=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,t0(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,se&&t.flags&1048576&&Yp(t,io,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Fi(e,t),e=t.pendingProps;var r=Ss(t,ze.current);ys(t,n),r=Vc(null,t,s,e,r,n);var o=Oc();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(s)?(o=!0,so(t)):o=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Dc(t),r.updater=bo,t.stateNode=r,r._reactInternals=t,Nl(t,s,e,n),t=Pl(null,t,s,!0,o,n)):(t.tag=0,se&&o&&Cc(t),Ve(null,t,r,n),t=t.child),t;case 16:s=t.elementType;e:{switch(Fi(e,t),e=t.pendingProps,r=s._init,s=r(s._payload),t.type=s,r=t.tag=v0(s),e=yt(s,e),r){case 0:t=Tl(null,t,s,e,n);break e;case 1:t=qd(null,t,s,e,n);break e;case 11:t=Kd(null,t,s,e,n);break e;case 14:t=Gd(null,t,s,yt(s.type,e),n);break e}throw Error(E(306,s,""))}return t;case 0:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:yt(s,r),Tl(e,t,s,r,n);case 1:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:yt(s,r),qd(e,t,s,r,n);case 3:e:{if(Mm(t),e===null)throw Error(E(387));s=t.pendingProps,o=t.memoizedState,r=o.element,nm(e,t),lo(t,s,null,n);var a=t.memoizedState;if(s=a.element,o.isDehydrated)if(o={element:s,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){r=Ps(Error(E(423)),t),t=Qd(e,t,s,n,r);break e}else if(s!==r){r=Ps(Error(E(424)),t),t=Qd(e,t,s,n,r);break e}else for(Xe=an(t.stateNode.containerInfo.firstChild),Je=t,se=!0,jt=null,n=em(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ns(),s===r){t=Ut(e,t,n);break e}Ve(e,t,s,n)}t=t.child}return t;case 5:return sm(t),e===null&&wl(t),s=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,a=r.children,vl(s,r)?a=null:o!==null&&vl(s,o)&&(t.flags|=32),Em(e,t),Ve(e,t,a,n),t.child;case 6:return e===null&&wl(t),null;case 13:return Am(e,t,n);case 4:return Lc(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Cs(t,null,s,n):Ve(e,t,s,n),t.child;case 11:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:yt(s,r),Kd(e,t,s,r,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,r=t.pendingProps,o=t.memoizedProps,a=r.value,Z(oo,s._currentValue),s._currentValue=a,o!==null)if(St(o.value,a)){if(o.children===r.children&&!He.current){t=Ut(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===s){if(o.tag===1){c=Vt(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),kl(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(E(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),kl(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Ve(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,s=t.pendingProps.children,ys(t,n),r=ht(r),s=s(r),t.flags|=1,Ve(e,t,s,n),t.child;case 14:return s=t.type,r=yt(s,t.pendingProps),r=yt(s.type,r),Gd(e,t,s,r,n);case 15:return Tm(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:yt(s,r),Fi(e,t),t.tag=1,We(s)?(e=!0,so(t)):e=!1,ys(t,n),Sm(t,s,r),Nl(t,s,r,n),Pl(null,t,s,!0,e,n);case 19:return Rm(e,t,n);case 22:return Pm(e,t,n)}throw Error(E(156,t.tag))};function Gm(e,t){return jp(e,t)}function m0(e,t,n,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ut(e,t,n,s){return new m0(e,t,n,s)}function qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function v0(e){if(typeof e=="function")return qc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hc)return 11;if(e===pc)return 14}return 2}function dn(e,t){var n=e.alternate;return n===null?(n=ut(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 Bi(e,t,n,s,r,o){var a=2;if(s=e,typeof e=="function")qc(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Yn:return _n(n.children,r,o,t);case fc:a=8,r|=8;break;case qa:return e=ut(12,n,t,r|2),e.elementType=qa,e.lanes=o,e;case Qa:return e=ut(13,n,t,r),e.elementType=Qa,e.lanes=o,e;case Ya:return e=ut(19,n,t,r),e.elementType=Ya,e.lanes=o,e;case sp:return Fo(n,r,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tp:a=10;break e;case np:a=9;break e;case hc:a=11;break e;case pc:a=14;break e;case Qt:a=16,s=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=ut(a,n,t,r),t.elementType=e,t.type=s,t.lanes=o,t}function _n(e,t,n,s){return e=ut(7,e,s,t),e.lanes=n,e}function Fo(e,t,n,s){return e=ut(22,e,s,t),e.elementType=sp,e.lanes=n,e.stateNode={isHidden:!1},e}function Ca(e,t,n){return e=ut(6,e,null,t),e.lanes=n,e}function Ta(e,t,n){return t=ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function g0(e,t,n,s,r){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=oa(0),this.expirationTimes=oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oa(0),this.identifierPrefix=s,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Qc(e,t,n,s,r,o,a,l,c){return e=new g0(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ut(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dc(o),e}function y0(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qn,key:s==null?null:""+s,children:e,containerInfo:t,implementation:n}}function qm(e){if(!e)return mn;e=e._reactInternals;e:{if(Un(e)!==e||e.tag!==1)throw Error(E(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(E(171))}if(e.tag===1){var n=e.type;if(We(n))return qp(e,n,t)}return t}function Qm(e,t,n,s,r,o,a,l,c){return e=Qc(n,s,!0,e,r,o,a,l,c),e.context=qm(null),n=e.current,s=Oe(),r=un(n),o=Vt(s,r),o.callback=t??null,ln(n,o,r),e.current.lanes=r,Qr(e,r,s),Ke(e,s),e}function Io(e,t,n,s){var r=t.current,o=Oe(),a=un(r);return n=qm(n),t.context===null?t.context=n:t.pendingContext=n,t=Vt(o,a),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=ln(r,t,a),e!==null&&(kt(e,r,a,o),bi(e,r,a)),a}function go(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 of(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yc(e,t){of(e,t),(e=e.alternate)&&of(e,t)}function x0(){return null}var Ym=typeof reportError=="function"?reportError:function(e){console.error(e)};function Xc(e){this._internalRoot=e}$o.prototype.render=Xc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));Io(e,t,null,null)};$o.prototype.unmount=Xc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;In(function(){Io(null,e,null,null)}),t[$t]=null}};function $o(e){this._internalRoot=e}$o.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xt.length&&t!==0&&t<Xt[n].priority;n++);Xt.splice(n,0,e),n===0&&Mp(e)}};function Zc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function af(){}function j0(e,t,n,s,r){if(r){if(typeof s=="function"){var o=s;s=function(){var u=go(a);o.call(u)}}var a=Qm(t,s,e,0,null,!1,!1,"",af);return e._reactRootContainer=a,e[$t]=a.current,Dr(e.nodeType===8?e.parentNode:e),In(),a}for(;r=e.lastChild;)e.removeChild(r);if(typeof s=="function"){var l=s;s=function(){var u=go(c);l.call(u)}}var c=Qc(e,0,!1,null,null,!1,!1,"",af);return e._reactRootContainer=c,e[$t]=c.current,Dr(e.nodeType===8?e.parentNode:e),In(function(){Io(t,c,n,s)}),c}function Uo(e,t,n,s,r){var o=n._reactRootContainer;if(o){var a=o;if(typeof r=="function"){var l=r;r=function(){var c=go(a);l.call(c)}}Io(t,a,e,r)}else a=j0(n,t,e,r,s);return go(a)}Cp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=rr(t.pendingLanes);n!==0&&(gc(t,n|1),Ke(t,me()),!(G&6)&&(Es=me()+500,wn()))}break;case 13:In(function(){var s=Bt(e,1);if(s!==null){var r=Oe();kt(s,e,1,r)}}),Yc(e,1)}};yc=function(e){if(e.tag===13){var t=Bt(e,134217728);if(t!==null){var n=Oe();kt(t,e,134217728,n)}Yc(e,134217728)}};Tp=function(e){if(e.tag===13){var t=un(e),n=Bt(e,t);if(n!==null){var s=Oe();kt(n,e,t,s)}Yc(e,t)}};Pp=function(){return q};Ep=function(e,t){var n=q;try{return q=e,t()}finally{q=n}};ol=function(e,t,n){switch(t){case"input":if(Ja(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 s=n[t];if(s!==e&&s.form===e.form){var r=Lo(s);if(!r)throw Error(E(90));ip(s),Ja(s,r)}}}break;case"textarea":ap(e,n);break;case"select":t=n.value,t!=null&&ps(e,!!n.multiple,t,!1)}};pp=Wc;mp=In;var w0={usingClientEntryPoint:!1,Events:[Xr,es,Lo,fp,hp,Wc]},Js={findFiberByHostInstance:Mn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},k0={bundleType:Js.bundleType,version:Js.version,rendererPackageName:Js.rendererPackageName,rendererConfig:Js.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=yp(e),e===null?null:e.stateNode},findFiberByHostInstance:Js.findFiberByHostInstance||x0,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 ki=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ki.isDisabled&&ki.supportsFiber)try{Mo=ki.inject(k0),Et=ki}catch{}}st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=w0;st.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zc(t))throw Error(E(200));return y0(e,t,null,n)};st.createRoot=function(e,t){if(!Zc(e))throw Error(E(299));var n=!1,s="",r=Ym;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Qc(e,1,!1,null,null,n,!1,s,r),e[$t]=t.current,Dr(e.nodeType===8?e.parentNode:e),new Xc(t)};st.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(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=yp(t),e=e===null?null:e.stateNode,e};st.flushSync=function(e){return In(e)};st.hydrate=function(e,t,n){if(!Bo(t))throw Error(E(200));return Uo(null,e,t,!0,n)};st.hydrateRoot=function(e,t,n){if(!Zc(e))throw Error(E(405));var s=n!=null&&n.hydratedSources||null,r=!1,o="",a=Ym;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Qm(t,null,e,1,n??null,r,!1,o,a),e[$t]=t.current,Dr(e),s)for(e=0;e<s.length;e++)n=s[e],r=n._getVersion,r=r(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new $o(t)};st.render=function(e,t,n){if(!Bo(t))throw Error(E(200));return Uo(null,e,t,!1,n)};st.unmountComponentAtNode=function(e){if(!Bo(e))throw Error(E(40));return e._reactRootContainer?(In(function(){Uo(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1};st.unstable_batchedUpdates=Wc;st.unstable_renderSubtreeIntoContainer=function(e,t,n,s){if(!Bo(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return Uo(e,t,n,!1,s)};st.version="18.3.1-next-f1338f8080-20240426";function Xm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xm)}catch(e){console.error(e)}}Xm(),Xh.exports=st;var S0=Xh.exports,lf=S0;Ka.createRoot=lf.createRoot,Ka.hydrateRoot=lf.hydrateRoot;const N0="modulepreload",C0=function(e){return"/"+e},cf={},T0=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=C0(c),c in cf)return;cf[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":N0,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((h,y)=>{f.addEventListener("load",h),f.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};/**
|
|
42
|
+
* @license lucide-react v0.441.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const P0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zm=(...e)=>e.filter((t,n,s)=>!!t&&s.indexOf(t)===n).join(" ");/**
|
|
47
|
+
* @license lucide-react v0.441.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/var E0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
52
|
+
* @license lucide-react v0.441.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const M0=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:o,iconNode:a,...l},c)=>w.createElement("svg",{ref:c,...E0,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Zm("lucide",r),...l},[...a.map(([u,d])=>w.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
|
|
57
|
+
* @license lucide-react v0.441.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const L=(e,t)=>{const n=w.forwardRef(({className:s,...r},o)=>w.createElement(M0,{ref:o,iconNode:t,className:Zm(`lucide-${P0(e)}`,s),...r}));return n.displayName=`${e}`,n};/**
|
|
62
|
+
* @license lucide-react v0.441.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const Ze=L("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
67
|
+
* @license lucide-react v0.441.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Fl=L("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
|
72
|
+
* @license lucide-react v0.441.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const as=L("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
77
|
+
* @license lucide-react v0.441.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Jm=L("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
|
|
82
|
+
* @license lucide-react v0.441.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Ge=L("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
87
|
+
* @license lucide-react v0.441.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const ev=L("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
92
|
+
* @license lucide-react v0.441.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const A0=L("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
97
|
+
* @license lucide-react v0.441.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Ms=L("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
102
|
+
* @license lucide-react v0.441.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const vn=L("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
107
|
+
* @license lucide-react v0.441.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const As=L("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
112
|
+
* @license lucide-react v0.441.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const ft=L("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
117
|
+
* @license lucide-react v0.441.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const tv=L("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
122
|
+
* @license lucide-react v0.441.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const R0=L("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
127
|
+
* @license lucide-react v0.441.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Rs=L("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
132
|
+
* @license lucide-react v0.441.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const Ui=L("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
137
|
+
* @license lucide-react v0.441.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const $n=L("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
142
|
+
* @license lucide-react v0.441.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const D0=L("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
147
|
+
* @license lucide-react v0.441.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const Il=L("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/**
|
|
152
|
+
* @license lucide-react v0.441.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const L0=L("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
157
|
+
* @license lucide-react v0.441.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const _0=L("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
|
|
162
|
+
* @license lucide-react v0.441.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const Hn=L("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"}]]);/**
|
|
167
|
+
* @license lucide-react v0.441.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const z0=L("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
172
|
+
* @license lucide-react v0.441.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const b0=L("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
177
|
+
* @license lucide-react v0.441.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const Pt=L("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
182
|
+
* @license lucide-react v0.441.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const V0=L("FileKey",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["circle",{cx:"10",cy:"16",r:"2",key:"4ckbqe"}],["path",{d:"m16 10-4.5 4.5",key:"7p3ebg"}],["path",{d:"m15 11 1 1",key:"1bsyx3"}]]);/**
|
|
187
|
+
* @license lucide-react v0.441.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const yo=L("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
192
|
+
* @license lucide-react v0.441.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const $r=L("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
|
|
197
|
+
* @license lucide-react v0.441.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const O0=L("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
202
|
+
* @license lucide-react v0.441.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const Ds=L("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"}]]);/**
|
|
207
|
+
* @license lucide-react v0.441.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const F0=L("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
212
|
+
* @license lucide-react v0.441.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const I0=L("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
217
|
+
* @license lucide-react v0.441.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const uf=L("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
222
|
+
* @license lucide-react v0.441.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const $0=L("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
227
|
+
* @license lucide-react v0.441.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const B0=L("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
232
|
+
* @license lucide-react v0.441.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const df=L("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
237
|
+
* @license lucide-react v0.441.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const fn=L("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
242
|
+
* @license lucide-react v0.441.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const U0=L("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
247
|
+
* @license lucide-react v0.441.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const H0=L("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
252
|
+
* @license lucide-react v0.441.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const Jc=L("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"}]]);/**
|
|
257
|
+
* @license lucide-react v0.441.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const W0=L("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
262
|
+
* @license lucide-react v0.441.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const K0=L("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
267
|
+
* @license lucide-react v0.441.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const eu=L("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
272
|
+
* @license lucide-react v0.441.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const G0=L("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
277
|
+
* @license lucide-react v0.441.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const Me=L("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
282
|
+
* @license lucide-react v0.441.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const q0=L("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
|
|
287
|
+
* @license lucide-react v0.441.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const tu=L("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
292
|
+
* @license lucide-react v0.441.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const ff=L("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
297
|
+
* @license lucide-react v0.441.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const $l=L("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
302
|
+
* @license lucide-react v0.441.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const js=L("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
307
|
+
* @license lucide-react v0.441.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const ws=L("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
312
|
+
* @license lucide-react v0.441.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const Q0=L("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
317
|
+
* @license lucide-react v0.441.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const Y0=L("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
322
|
+
* @license lucide-react v0.441.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const X0=L("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
|
|
327
|
+
* @license lucide-react v0.441.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const Bl=L("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
332
|
+
* @license lucide-react v0.441.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const nv=L("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
337
|
+
* @license lucide-react v0.441.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const sv=L("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
|
|
342
|
+
* @license lucide-react v0.441.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const rv=L("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
347
|
+
* @license lucide-react v0.441.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const Ne=L("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"}]]);/**
|
|
352
|
+
* @license lucide-react v0.441.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const Z0=L("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
357
|
+
* @license lucide-react v0.441.0 - ISC
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the ISC license.
|
|
360
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const tn=L("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
362
|
+
* @license lucide-react v0.441.0 - ISC
|
|
363
|
+
*
|
|
364
|
+
* This source code is licensed under the ISC license.
|
|
365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
+
*/const J0=L("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"}]]);/**
|
|
367
|
+
* @license lucide-react v0.441.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/const xo=L("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
372
|
+
* @license lucide-react v0.441.0 - ISC
|
|
373
|
+
*
|
|
374
|
+
* This source code is licensed under the ISC license.
|
|
375
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
+
*/const nn=L("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),nu=w.createContext({});function su(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ho=w.createContext(null),ru=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class e1 extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function t1({children:e,isPresent:t}){const n=w.useId(),s=w.useRef(null),r=w.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=w.useContext(ru);return w.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u}=r.current;if(t||!s.current||!a||!l)return;s.current.dataset.motionPopId=n;const d=document.createElement("style");return o&&(d.nonce=o),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
|
|
377
|
+
[data-motion-pop-id="${n}"] {
|
|
378
|
+
position: absolute !important;
|
|
379
|
+
width: ${a}px !important;
|
|
380
|
+
height: ${l}px !important;
|
|
381
|
+
top: ${c}px !important;
|
|
382
|
+
left: ${u}px !important;
|
|
383
|
+
}
|
|
384
|
+
`),()=>{document.head.removeChild(d)}},[t]),i.jsx(e1,{isPresent:t,childRef:s,sizeRef:r,children:w.cloneElement(e,{ref:s})})}const n1=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:a})=>{const l=su(s1),c=w.useId(),u=w.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;s&&s()},[l,s]),d=w.useMemo(()=>({id:c,initial:t,isPresent:n,custom:r,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),o?[Math.random(),u]:[n,u]);return w.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),w.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),a==="popLayout"&&(e=i.jsx(t1,{isPresent:n,children:e})),i.jsx(Ho.Provider,{value:d,children:e})};function s1(){return new Map}function iv(e=!0){const t=w.useContext(Ho);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=w.useId();w.useEffect(()=>{e&&r(o)},[e]);const a=w.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,a]:[!0]}const Si=e=>e.key||"";function hf(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const iu=typeof window<"u",ov=iu?w.useLayoutEffect:w.useEffect,r1=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:a=!1})=>{const[l,c]=iv(a),u=w.useMemo(()=>hf(e),[e]),d=a&&!l?[]:u.map(Si),f=w.useRef(!0),h=w.useRef(u),y=su(()=>new Map),[g,k]=w.useState(u),[N,m]=w.useState(u);ov(()=>{f.current=!1,h.current=u;for(let j=0;j<N.length;j++){const x=Si(N[j]);d.includes(x)?y.delete(x):y.get(x)!==!0&&y.set(x,!1)}},[N,d.length,d.join("-")]);const p=[];if(u!==g){let j=[...u];for(let x=0;x<N.length;x++){const S=N[x],C=Si(S);d.includes(C)||(j.splice(x,0,S),p.push(S))}o==="wait"&&p.length&&(j=p),m(hf(j)),k(u);return}const{forceRender:v}=w.useContext(nu);return i.jsx(i.Fragment,{children:N.map(j=>{const x=Si(j),S=a&&!l?!1:u===N||d.includes(x),C=()=>{if(y.has(x))y.set(x,!0);else return;let T=!0;y.forEach(R=>{R||(T=!1)}),T&&(v==null||v(),m(h.current),a&&(c==null||c()),s&&s())};return i.jsx(n1,{isPresent:S,initial:!f.current||n?void 0:!1,custom:S?void 0:t,presenceAffectsLayout:r,mode:o,onExitComplete:S?void 0:C,children:j},x)})})},et=e=>e;let av=et;function ou(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ls=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},Ot=e=>e*1e3,Ft=e=>e/1e3,i1={useManualTiming:!1};function o1(e){let t=new Set,n=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const y=f&&s?t:n;return d&&o.add(u),y.has(u)||y.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,s){r=!0;return}s=!0,[t,n]=[n,t],t.forEach(l),t.clear(),s=!1,r&&(r=!1,c.process(u))}};return c}const Ni=["read","resolveKeyframes","update","preRender","render","postRender"],a1=40;function lv(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=Ni.reduce((m,p)=>(m[p]=o1(o),m),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=a,y=()=>{const m=performance.now();n=!1,r.delta=s?1e3/60:Math.max(Math.min(m-r.timestamp,a1),1),r.timestamp=m,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),h.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(y))},g=()=>{n=!0,s=!0,r.isProcessing||e(y)};return{schedule:Ni.reduce((m,p)=>{const v=a[p];return m[p]=(j,x=!1,S=!1)=>(n||g(),v.schedule(j,x,S)),m},{}),cancel:m=>{for(let p=0;p<Ni.length;p++)a[Ni[p]].cancel(m)},state:r,steps:a}}const{schedule:ne,cancel:gn,state:Te,steps:Pa}=lv(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0),cv=w.createContext({strict:!1}),pf={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},_s={};for(const e in pf)_s[e]={isEnabled:t=>pf[e].some(n=>!!t[n])};function l1(e){for(const t in e)_s[t]={..._s[t],...e[t]}}const c1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function jo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||c1.has(e)}let uv=e=>!jo(e);function u1(e){e&&(uv=t=>t.startsWith("on")?!jo(t):e(t))}try{u1(require("@emotion/is-prop-valid").default)}catch{}function d1(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(uv(r)||n===!0&&jo(r)||!t&&!jo(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}function f1(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...s)=>e(...s);return new Proxy(n,{get:(s,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Wo=w.createContext({});function Br(e){return typeof e=="string"||Array.isArray(e)}function Ko(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const au=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lu=["initial",...au];function Go(e){return Ko(e.animate)||lu.some(t=>Br(e[t]))}function dv(e){return!!(Go(e)||e.variants)}function h1(e,t){if(Go(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Br(n)?n:void 0,animate:Br(s)?s:void 0}}return e.inherit!==!1?t:{}}function p1(e){const{initial:t,animate:n}=h1(e,w.useContext(Wo));return w.useMemo(()=>({initial:t,animate:n}),[mf(t),mf(n)])}function mf(e){return Array.isArray(e)?e.join(" "):e}const m1=Symbol.for("motionComponentSymbol");function ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v1(e,t,n){return w.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):ls(n)&&(n.current=s))},[t])}const cu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),g1="framerAppearId",fv="data-"+cu(g1),{schedule:uu}=lv(queueMicrotask,!1),hv=w.createContext({});function y1(e,t,n,s,r){var o,a;const{visualElement:l}=w.useContext(Wo),c=w.useContext(cv),u=w.useContext(Ho),d=w.useContext(ru).reducedMotion,f=w.useRef(null);s=s||c.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,y=w.useContext(hv);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&x1(f.current,n,r,y);const g=w.useRef(!1);w.useInsertionEffect(()=>{h&&g.current&&h.update(n,u)});const k=n[fv],N=w.useRef(!!k&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,k))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,k)));return ov(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),uu.render(h.render),N.current&&h.animationState&&h.animationState.animateChanges())}),w.useEffect(()=>{h&&(!N.current&&h.animationState&&h.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,k)}),N.current=!1))}),h}function x1(e,t,n,s){const{layoutId:r,layout:o,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pv(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||l&&ls(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:c,layoutRoot:u})}function pv(e){if(e)return e.options.allowProjection!==!1?e.projection:pv(e.parent)}function j1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:r}){var o,a;e&&l1(e);function l(u,d){let f;const h={...w.useContext(ru),...u,layoutId:w1(u)},{isStatic:y}=h,g=p1(u),k=s(u,y);if(!y&&iu){k1();const N=S1(h);f=N.MeasureLayout,g.visualElement=y1(r,k,h,t,N.ProjectionNode)}return i.jsxs(Wo.Provider,{value:g,children:[f&&g.visualElement?i.jsx(f,{visualElement:g.visualElement,...h}):null,n(r,u,v1(k,g.visualElement,d),k,y,g.visualElement)]})}l.displayName=`motion.${typeof r=="string"?r:`create(${(a=(o=r.displayName)!==null&&o!==void 0?o:r.name)!==null&&a!==void 0?a:""})`}`;const c=w.forwardRef(l);return c[m1]=r,c}function w1({layoutId:e}){const t=w.useContext(nu).id;return t&&e!==void 0?t+"-"+e:e}function k1(e,t){w.useContext(cv).strict}function S1(e){const{drag:t,layout:n}=_s;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const N1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function du(e){return typeof e!="string"||e.includes("-")?!1:!!(N1.indexOf(e)>-1||/[A-Z]/u.test(e))}function vf(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function fu(e,t,n,s){if(typeof t=="function"){const[r,o]=vf(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=vf(s);t=t(n!==void 0?n:e.custom,r,o)}return t}const Ul=e=>Array.isArray(e),C1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),T1=e=>Ul(e)?e[e.length-1]||0:e,_e=e=>!!(e&&e.getVelocity);function Hi(e){const t=_e(e)?e.get():e;return C1(t)?t.toValue():t}function P1({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},s,r,o){const a={latestValues:E1(s,r,o,e),renderState:t()};return n&&(a.onMount=l=>n({props:s,current:l,...a}),a.onUpdate=l=>n(l)),a}const mv=e=>(t,n)=>{const s=w.useContext(Wo),r=w.useContext(Ho),o=()=>P1(e,t,s,r);return n?o():su(o)};function E1(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Hi(o[h]);let{initial:a,animate:l}=e;const c=Go(e),u=dv(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Ko(f)){const h=Array.isArray(f)?f:[f];for(let y=0;y<h.length;y++){const g=fu(e,h[y]);if(g){const{transitionEnd:k,transition:N,...m}=g;for(const p in m){let v=m[p];if(Array.isArray(v)){const j=d?v.length-1:0;v=v[j]}v!==null&&(r[p]=v)}for(const p in k)r[p]=k[p]}}}return r}const Fs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wn=new Set(Fs),vv=e=>t=>typeof t=="string"&&t.startsWith(e),gv=vv("--"),M1=vv("var(--"),hu=e=>M1(e)?A1.test(e.split("/*")[0].trim()):!1,A1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,yv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ht=(e,t,n)=>n>t?t:n<e?e:n,Is={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ur={...Is,transform:e=>Ht(0,1,e)},Ci={...Is,default:1},Jr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qt=Jr("deg"),At=Jr("%"),F=Jr("px"),R1=Jr("vh"),D1=Jr("vw"),gf={...At,parse:e=>At.parse(e)/100,transform:e=>At.transform(e*100)},L1={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,backgroundPositionX:F,backgroundPositionY:F},_1={rotate:qt,rotateX:qt,rotateY:qt,rotateZ:qt,scale:Ci,scaleX:Ci,scaleY:Ci,scaleZ:Ci,skew:qt,skewX:qt,skewY:qt,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Ur,originX:gf,originY:gf,originZ:F},yf={...Is,transform:Math.round},pu={...L1,..._1,zIndex:yf,size:F,fillOpacity:Ur,strokeOpacity:Ur,numOctaves:yf},z1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},b1=Fs.length;function V1(e,t,n){let s="",r=!0;for(let o=0;o<b1;o++){const a=Fs[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=yv(l,pu[a]);if(!c){r=!1;const d=z1[a]||a;s+=`${d}(${u}) `}n&&(t[a]=u)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function mu(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Wn.has(c)){a=!0;continue}else if(gv(c)){r[c]=u;continue}else{const d=yv(u,pu[c]);c.startsWith("origin")?(l=!0,o[c]=d):s[c]=d}}if(t.transform||(a||n?s.transform=V1(t,e.transform,n):s.transform&&(s.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=o;s.transformOrigin=`${c} ${u} ${d}`}}const O1={offset:"stroke-dashoffset",array:"stroke-dasharray"},F1={offset:"strokeDashoffset",array:"strokeDasharray"};function I1(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?O1:F1;e[o.offset]=F.transform(-s);const a=F.transform(t),l=F.transform(n);e[o.array]=`${a} ${l}`}function xf(e,t,n){return typeof e=="string"?e:F.transform(t+n*e)}function $1(e,t,n){const s=xf(t,e.x,e.width),r=xf(n,e.y,e.height);return`${s} ${r}`}function vu(e,{attrX:t,attrY:n,attrScale:s,originX:r,originY:o,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(mu(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:g}=e;h.transform&&(g&&(y.transform=h.transform),delete h.transform),g&&(r!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=$1(g,r!==void 0?r:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),a!==void 0&&I1(h,a,l,c,!1)}const gu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),xv=()=>({...gu(),attrs:{}}),yu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function jv(e,{style:t,vars:n},s,r){Object.assign(e.style,t,r&&r.getProjectionStyles(s));for(const o in n)e.style.setProperty(o,n[o])}const wv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kv(e,t,n,s){jv(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(wv.has(r)?r:cu(r),t.attrs[r])}const wo={};function B1(e){Object.assign(wo,e)}function Sv(e,{layout:t,layoutId:n}){return Wn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wo[e]||e==="opacity")}function xu(e,t,n){var s;const{style:r}=e,o={};for(const a in r)(_e(r[a])||t.style&&_e(t.style[a])||Sv(a,e)||((s=n==null?void 0:n.getValue(a))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[a]=r[a]);return o}function Nv(e,t,n){const s=xu(e,t,n);for(const r in e)if(_e(e[r])||_e(t[r])){const o=Fs.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}function U1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const jf=["x","y","width","height","cx","cy","r"],H1={useVisualState:mv({scrapeMotionValuesFromProps:Nv,createRenderState:xv,onUpdate:({props:e,prevProps:t,current:n,renderState:s,latestValues:r})=>{if(!n)return;let o=!!e.drag;if(!o){for(const l in r)if(Wn.has(l)){o=!0;break}}if(!o)return;let a=!t;if(t)for(let l=0;l<jf.length;l++){const c=jf[l];e[c]!==t[c]&&(a=!0)}a&&ne.read(()=>{U1(n,s),ne.render(()=>{vu(s,r,yu(n.tagName),e.transformTemplate),kv(n,s)})})}})},W1={useVisualState:mv({scrapeMotionValuesFromProps:xu,createRenderState:gu})};function Cv(e,t,n){for(const s in t)!_e(t[s])&&!Sv(s,n)&&(e[s]=t[s])}function K1({transformTemplate:e},t){return w.useMemo(()=>{const n=gu();return mu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function G1(e,t){const n=e.style||{},s={};return Cv(s,n,e),Object.assign(s,K1(e,t)),s}function q1(e,t){const n={},s=G1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}function Q1(e,t,n,s){const r=w.useMemo(()=>{const o=xv();return vu(o,t,yu(s),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Cv(o,e.style,e),r.style={...o,...r.style}}return r}function Y1(e=!1){return(n,s,r,{latestValues:o},a)=>{const c=(du(n)?Q1:q1)(s,o,a,n),u=d1(s,typeof n=="string",e),d=n!==w.Fragment?{...u,...c,ref:r}:{},{children:f}=s,h=w.useMemo(()=>_e(f)?f.get():f,[f]);return w.createElement(n,{...d,children:h})}}function X1(e,t){return function(s,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...du(s)?H1:W1,preloadedFeatures:e,useRender:Y1(r),createVisualElement:t,Component:s};return j1(a)}}function Tv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}function qo(e,t,n){const s=e.getProps();return fu(s,t,n!==void 0?n:s.custom,e)}const Z1=ou(()=>window.ScrollTimeline!==void 0);class J1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t,n){const s=this.animations.map(r=>{if(Z1()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{s.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ej extends J1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function ju(e,t){return e?e[t]||e.default||e:void 0}const Hl=2e4;function Pv(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Hl;)t+=n,s=e.next(t);return t>=Hl?1/0:t}function wu(e){return typeof e=="function"}function wf(e,t){e.timeline=t,e.onfinish=null}const ku=e=>Array.isArray(e)&&typeof e[0]=="number",tj={linearEasing:void 0};function nj(e,t){const n=ou(e);return()=>{var s;return(s=tj[t])!==null&&s!==void 0?s:n()}}const ko=nj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ev=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=e(Ls(0,r-1,o))+", ";return`linear(${s.substring(0,s.length-2)})`};function Mv(e){return!!(typeof e=="function"&&ko()||!e||typeof e=="string"&&(e in Wl||ko())||ku(e)||Array.isArray(e)&&e.every(Mv))}const or=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Wl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:or([0,.65,.55,1]),circOut:or([.55,0,1,.45]),backIn:or([.31,.01,.66,-.59]),backOut:or([.33,1.53,.69,.99])};function Av(e,t){if(e)return typeof e=="function"&&ko()?Ev(e,t):ku(e)?or(e):Array.isArray(e)?e.map(n=>Av(n,t)||Wl.easeOut):Wl[e]}const gt={x:!1,y:!1};function Rv(){return gt.x||gt.y}function sj(e,t,n){var s;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const o=(s=void 0)!==null&&s!==void 0?s:r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function Dv(e,t){const n=sj(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function kf(e){return t=>{t.pointerType==="touch"||Rv()||e(t)}}function rj(e,t,n={}){const[s,r,o]=Dv(e,n),a=kf(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=kf(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,r)});return s.forEach(l=>{l.addEventListener("pointerenter",a,r)}),o}const Lv=(e,t)=>t?e===t?!0:Lv(e,t.parentElement):!1,Su=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ij=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function oj(e){return ij.has(e.tagName)||e.tabIndex!==-1}const ar=new WeakSet;function Sf(e){return t=>{t.key==="Enter"&&e(t)}}function Ea(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const aj=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Sf(()=>{if(ar.has(n))return;Ea(n,"down");const r=Sf(()=>{Ea(n,"up")}),o=()=>Ea(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Nf(e){return Su(e)&&!Rv()}function lj(e,t,n={}){const[s,r,o]=Dv(e,n),a=l=>{const c=l.currentTarget;if(!Nf(l)||ar.has(c))return;ar.add(c);const u=t(l),d=(y,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Nf(y)||!ar.has(c))&&(ar.delete(c),typeof u=="function"&&u(y,{success:g}))},f=y=>{d(y,n.useGlobalTarget||Lv(c,y.target))},h=y=>{d(y,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(l=>{!oj(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l.addEventListener("focus",u=>aj(u,r),r)}),o}function cj(e){return e==="x"||e==="y"?gt[e]?null:(gt[e]=!0,()=>{gt[e]=!1}):gt.x||gt.y?null:(gt.x=gt.y=!0,()=>{gt.x=gt.y=!1})}const _v=new Set(["width","height","top","left","right","bottom",...Fs]);let Wi;function uj(){Wi=void 0}const Rt={now:()=>(Wi===void 0&&Rt.set(Te.isProcessing||i1.useManualTiming?Te.timestamp:performance.now()),Wi),set:e=>{Wi=e,queueMicrotask(uj)}};function Nu(e,t){e.indexOf(t)===-1&&e.push(t)}function Cu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Tu{constructor(){this.subscriptions=[]}add(t){return Nu(this.subscriptions,t),()=>Cu(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const a=this.subscriptions[o];a&&a(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function zv(e,t){return t?e*(1e3/t):0}const Cf=30,dj=e=>!isNaN(parseFloat(e));class fj{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,r=!0)=>{const o=Rt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Rt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=dj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Tu);const s=this.events[t].add(n);return t==="change"?()=>{s(),ne.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Rt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Cf)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Cf);return zv(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hr(e,t){return new fj(e,t)}function hj(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hr(n))}function pj(e,t){const n=qo(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const a in o){const l=T1(o[a]);hj(e,a,l)}}function mj(e){return!!(_e(e)&&e.add)}function Kl(e,t){const n=e.getValue("willChange");if(mj(n))return n.add(t)}function bv(e){return e.props[fv]}const Vv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,vj=1e-7,gj=12;function yj(e,t,n,s,r){let o,a,l=0;do a=t+(n-t)/2,o=Vv(a,s,r)-e,o>0?n=a:t=a;while(Math.abs(o)>vj&&++l<gj);return a}function ei(e,t,n,s){if(e===t&&n===s)return et;const r=o=>yj(o,0,1,e,n);return o=>o===0||o===1?o:Vv(r(o),t,s)}const Ov=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Fv=e=>t=>1-e(1-t),Iv=ei(.33,1.53,.69,.99),Pu=Fv(Iv),$v=Ov(Pu),Bv=e=>(e*=2)<1?.5*Pu(e):.5*(2-Math.pow(2,-10*(e-1))),Eu=e=>1-Math.sin(Math.acos(e)),Uv=Fv(Eu),Hv=Ov(Eu),Wv=e=>/^0[^.\s]+$/u.test(e);function xj(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Wv(e):!0}const xr=e=>Math.round(e*1e5)/1e5,Mu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jj(e){return e==null}const wj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Au=(e,t)=>n=>!!(typeof n=="string"&&wj.test(n)&&n.startsWith(e)||t&&!jj(n)&&Object.prototype.hasOwnProperty.call(n,t)),Kv=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,a,l]=s.match(Mu);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},kj=e=>Ht(0,255,e),Ma={...Is,transform:e=>Math.round(kj(e))},Dn={test:Au("rgb","red"),parse:Kv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Ma.transform(e)+", "+Ma.transform(t)+", "+Ma.transform(n)+", "+xr(Ur.transform(s))+")"};function Sj(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const Gl={test:Au("#"),parse:Sj,transform:Dn.transform},cs={test:Au("hsl","hue"),parse:Kv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+At.transform(xr(t))+", "+At.transform(xr(n))+", "+xr(Ur.transform(s))+")"},De={test:e=>Dn.test(e)||Gl.test(e)||cs.test(e),parse:e=>Dn.test(e)?Dn.parse(e):cs.test(e)?cs.parse(e):Gl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Dn.transform(e):cs.transform(e)},Nj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Cj(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Mu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Nj))===null||n===void 0?void 0:n.length)||0)>0}const Gv="number",qv="color",Tj="var",Pj="var(",Tf="${}",Ej=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wr(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const l=t.replace(Ej,c=>(De.test(c)?(s.color.push(o),r.push(qv),n.push(De.parse(c))):c.startsWith(Pj)?(s.var.push(o),r.push(Tj),n.push(c)):(s.number.push(o),r.push(Gv),n.push(parseFloat(c))),++o,Tf)).split(Tf);return{values:n,split:l,indexes:s,types:r}}function Qv(e){return Wr(e).values}function Yv(e){const{split:t,types:n}=Wr(e),s=t.length;return r=>{let o="";for(let a=0;a<s;a++)if(o+=t[a],r[a]!==void 0){const l=n[a];l===Gv?o+=xr(r[a]):l===qv?o+=De.transform(r[a]):o+=r[a]}return o}}const Mj=e=>typeof e=="number"?0:e;function Aj(e){const t=Qv(e);return Yv(e)(t.map(Mj))}const yn={test:Cj,parse:Qv,createTransformer:Yv,getAnimatableNone:Aj},Rj=new Set(["brightness","contrast","saturate","opacity"]);function Dj(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Mu)||[];if(!s)return e;const r=n.replace(s,"");let o=Rj.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const Lj=/\b([a-z-]*)\(.*?\)/gu,ql={...yn,getAnimatableNone:e=>{const t=e.match(Lj);return t?t.map(Dj).join(" "):e}},_j={...pu,color:De,backgroundColor:De,outlineColor:De,fill:De,stroke:De,borderColor:De,borderTopColor:De,borderRightColor:De,borderBottomColor:De,borderLeftColor:De,filter:ql,WebkitFilter:ql},Ru=e=>_j[e];function Xv(e,t){let n=Ru(e);return n!==ql&&(n=yn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zj=new Set(["auto","none","0"]);function bj(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!zj.has(o)&&Wr(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Xv(n,r)}const Pf=e=>e===Is||e===F,Ef=(e,t)=>parseFloat(e.split(", ")[t]),Mf=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return Ef(r[1],t);{const o=s.match(/^matrix\((.+)\)$/u);return o?Ef(o[1],e):0}},Vj=new Set(["x","y","z"]),Oj=Fs.filter(e=>!Vj.has(e));function Fj(e){const t=[];return Oj.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const zs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Mf(4,13),y:Mf(5,14)};zs.translateX=zs.x;zs.translateY=zs.y;const zn=new Set;let Ql=!1,Yl=!1;function Zv(){if(Yl){const e=Array.from(zn).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=Fj(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,a])=>{var l;(l=s.getValue(o))===null||l===void 0||l.set(a)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Yl=!1,Ql=!1,zn.forEach(e=>e.complete()),zn.clear()}function Jv(){zn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yl=!0)})}function Ij(){Jv(),Zv()}class Du{constructor(t,n,s,r,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(zn.add(this),Ql||(Ql=!0,ne.read(Jv),ne.resolveKeyframes(Zv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=r==null?void 0:r.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(s&&n){const c=s.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),r&&a===void 0&&r.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),zn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,zn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const eg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$j=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bj(e){const t=$j.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}function tg(e,t,n=1){const[s,r]=Bj(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const a=o.trim();return eg(a)?parseFloat(a):a}return hu(r)?tg(r,t,n+1):r}const ng=e=>t=>t.test(e),Uj={test:e=>e==="auto",parse:e=>e},sg=[Is,F,At,qt,D1,R1,Uj],Af=e=>sg.find(ng(e));class rg extends Du{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),hu(u))){const d=tg(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!_v.has(s)||t.length!==2)return;const[r,o]=t,a=Af(r),l=Af(o);if(a!==l)if(Pf(a)&&Pf(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)xj(t[r])&&s.push(r);s.length&&bj(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=zs[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:s,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,l=r[a];r[a]=zs[s](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Rf=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(yn.test(e)||e==="0")&&!e.startsWith("url("));function Hj(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Wj(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Rf(r,t),l=Rf(o,t);return!a||!l?!1:Hj(e)||(n==="spring"||wu(n))&&s}const Kj=e=>e!==null;function Qo(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Kj),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return!o||s===void 0?r[o]:s}const Gj=40;class ig{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Rt.now(),this.options={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Gj?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Ij(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Rt.now(),this.hasAttemptedResolve=!0;const{name:s,type:r,velocity:o,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!Wj(t,s,r,o))if(a)this.options.duration=0;else{c&&c(Qo(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ae=(e,t,n)=>e+(t-e)*n;function Aa(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qj({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,a=0;if(!t)r=o=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=Aa(c,l,e+1/3),o=Aa(c,l,e),a=Aa(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:s}}function So(e,t){return n=>n>0?t:e}const Ra=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Qj=[Gl,Dn,cs],Yj=e=>Qj.find(t=>t.test(e));function Df(e){const t=Yj(e);if(!t)return!1;let n=t.parse(e);return t===cs&&(n=qj(n)),n}const Lf=(e,t)=>{const n=Df(e),s=Df(t);if(!n||!s)return So(e,t);const r={...n};return o=>(r.red=Ra(n.red,s.red,o),r.green=Ra(n.green,s.green,o),r.blue=Ra(n.blue,s.blue,o),r.alpha=ae(n.alpha,s.alpha,o),Dn.transform(r))},Xj=(e,t)=>n=>t(e(n)),ti=(...e)=>e.reduce(Xj),Xl=new Set(["none","hidden"]);function Zj(e,t){return Xl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Jj(e,t){return n=>ae(e,t,n)}function Lu(e){return typeof e=="number"?Jj:typeof e=="string"?hu(e)?So:De.test(e)?Lf:nw:Array.isArray(e)?og:typeof e=="object"?De.test(e)?Lf:ew:So}function og(e,t){const n=[...e],s=n.length,r=e.map((o,a)=>Lu(o)(o,t[a]));return o=>{for(let a=0;a<s;a++)n[a]=r[a](o);return n}}function ew(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=Lu(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function tw(e,t){var n;const s=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],l=e.indexes[a][r[a]],c=(n=e.values[l])!==null&&n!==void 0?n:0;s[o]=c,r[a]++}return s}const nw=(e,t)=>{const n=yn.createTransformer(t),s=Wr(e),r=Wr(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Xl.has(e)&&!r.values.length||Xl.has(t)&&!s.values.length?Zj(e,t):ti(og(tw(s,r),r.values),n):So(e,t)};function ag(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ae(e,t,n):Lu(e)(e,t)}const sw=5;function lg(e,t,n){const s=Math.max(t-sw,0);return zv(n-e(s),t-s)}const fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Da=.001;function rw({duration:e=fe.duration,bounce:t=fe.bounce,velocity:n=fe.velocity,mass:s=fe.mass}){let r,o,a=1-t;a=Ht(fe.minDamping,fe.maxDamping,a),e=Ht(fe.minDuration,fe.maxDuration,Ft(e)),a<1?(r=u=>{const d=u*a,f=d*e,h=d-n,y=Zl(u,a),g=Math.exp(-f);return Da-h/y*g},o=u=>{const f=u*a*e,h=f*n+n,y=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-f),k=Zl(Math.pow(u,2),a);return(-r(u)+Da>0?-1:1)*((h-y)*g)/k}):(r=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Da+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=ow(r,o,l);if(e=Ot(e),isNaN(c))return{stiffness:fe.stiffness,damping:fe.damping,duration:e};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:a*2*Math.sqrt(s*u),duration:e}}}const iw=12;function ow(e,t,n){let s=n;for(let r=1;r<iw;r++)s=s-e(s)/t(s);return s}function Zl(e,t){return e*Math.sqrt(1-t*t)}const aw=["duration","bounce"],lw=["stiffness","damping","mass"];function _f(e,t){return t.some(n=>e[n]!==void 0)}function cw(e){let t={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...e};if(!_f(e,lw)&&_f(e,aw))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*Ht(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:fe.mass,stiffness:r,damping:o}}else{const n=rw(e);t={...t,...n,mass:fe.mass},t.isResolvedFromDuration=!0}return t}function cg(e=fe.visualDuration,t=fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:y}=cw({...n,velocity:-Ft(n.velocity||0)}),g=h||0,k=u/(2*Math.sqrt(c*d)),N=a-o,m=Ft(Math.sqrt(c/d)),p=Math.abs(N)<5;s||(s=p?fe.restSpeed.granular:fe.restSpeed.default),r||(r=p?fe.restDelta.granular:fe.restDelta.default);let v;if(k<1){const x=Zl(m,k);v=S=>{const C=Math.exp(-k*m*S);return a-C*((g+k*m*N)/x*Math.sin(x*S)+N*Math.cos(x*S))}}else if(k===1)v=x=>a-Math.exp(-m*x)*(N+(g+m*N)*x);else{const x=m*Math.sqrt(k*k-1);v=S=>{const C=Math.exp(-k*m*S),T=Math.min(x*S,300);return a-C*((g+k*m*N)*Math.sinh(T)+x*N*Math.cosh(T))/x}}const j={calculatedDuration:y&&f||null,next:x=>{const S=v(x);if(y)l.done=x>=f;else{let C=0;k<1&&(C=x===0?Ot(g):lg(v,x,S));const T=Math.abs(C)<=s,R=Math.abs(a-S)<=r;l.done=T&&R}return l.value=l.done?a:S,l},toString:()=>{const x=Math.min(Pv(j),Hl),S=Ev(C=>j.next(x*C).value,x,30);return x+"ms "+S}};return j}function zf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},y=T=>l!==void 0&&T<l||c!==void 0&&T>c,g=T=>l===void 0?c:c===void 0||Math.abs(l-T)<Math.abs(c-T)?l:c;let k=n*t;const N=f+k,m=a===void 0?N:a(N);m!==N&&(k=m-f);const p=T=>-k*Math.exp(-T/s),v=T=>m+p(T),j=T=>{const R=p(T),P=v(T);h.done=Math.abs(R)<=u,h.value=h.done?m:P};let x,S;const C=T=>{y(h.value)&&(x=T,S=cg({keyframes:[h.value,g(h.value)],velocity:lg(v,T,h.value),damping:r,stiffness:o,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:T=>{let R=!1;return!S&&x===void 0&&(R=!0,j(T),C(T)),x!==void 0&&T>=x?S.next(T-x):(!R&&j(T),h)}}}const uw=ei(.42,0,1,1),dw=ei(0,0,.58,1),ug=ei(.42,0,.58,1),fw=e=>Array.isArray(e)&&typeof e[0]!="number",hw={linear:et,easeIn:uw,easeInOut:ug,easeOut:dw,circIn:Eu,circInOut:Hv,circOut:Uv,backIn:Pu,backInOut:$v,backOut:Iv,anticipate:Bv},bf=e=>{if(ku(e)){av(e.length===4);const[t,n,s,r]=e;return ei(t,n,s,r)}else if(typeof e=="string")return hw[e];return e};function pw(e,t,n){const s=[],r=n||ag,o=e.length-1;for(let a=0;a<o;a++){let l=r(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||et:t;l=ti(c,l)}s.push(l)}return s}function mw(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(av(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=pw(t,s,r),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=Ls(e[f],e[f+1],d);return l[f](h)};return n?d=>u(Ht(e[0],e[o-1],d)):u}function vw(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=Ls(0,t,s);e.push(ae(n,1,r))}}function gw(e){const t=[0];return vw(t,e.length-1),t}function yw(e,t){return e.map(n=>n*t)}function xw(e,t){return e.map(()=>t||ug).splice(0,e.length-1)}function No({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=fw(s)?s.map(bf):bf(s),o={done:!1,value:t[0]},a=yw(n&&n.length===t.length?n:gw(t),e),l=mw(a,t,{ease:Array.isArray(r)?r:xw(t,r)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const jw=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ne.update(t,!0),stop:()=>gn(t),now:()=>Te.isProcessing?Te.timestamp:Rt.now()}},ww={decay:zf,inertia:zf,tween:No,keyframes:No,spring:cg},kw=e=>e/100;class _u extends ig{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:s,element:r,keyframes:o}=this.options,a=(r==null?void 0:r.KeyframeResolver)||Du,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(o,l,n,s,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=this.options,l=wu(n)?n:ww[n]||No;let c,u;l!==No&&typeof t[0]!="number"&&(c=ti(kw,ag(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});o==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Pv(d));const{calculatedDuration:f}=d,h=f+r,y=h*(s+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:y}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=s;if(this.startTime===null)return o.next(0);const{delay:h,repeat:y,repeatType:g,repeatDelay:k,onUpdate:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-h*(this.speed>=0?1:-1),p=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let v=this.currentTime,j=o;if(y){const T=Math.min(this.currentTime,d)/f;let R=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&R--,R=Math.min(R,y+1),!!(R%2)&&(g==="reverse"?(P=1-P,k&&(P-=k/f)):g==="mirror"&&(j=a)),v=Ht(0,1,P)*f}const x=p?{done:!1,value:c[0]}:j.next(v);l&&(x.value=l(x.value));let{done:S}=x;!p&&u!==null&&(S=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&r!==void 0&&(x.value=Qo(c,this.options,r)),N&&N(x.value),C&&this.finish(),x}get duration(){const{resolved:t}=this;return t?Ft(t.calculatedDuration):0}get time(){return Ft(this.currentTime)}set time(t){t=Ot(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ft(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=jw,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Sw=new Set(["opacity","clipPath","filter","transform"]);function Nw(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=Av(l,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:s,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const Cw=ou(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Co=10,Tw=2e4;function Pw(e){return wu(e.type)||e.type==="spring"||!Mv(e.ease)}function Ew(e,t){const n=new _u({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const r=[];let o=0;for(;!s.done&&o<Tw;)s=n.sample(o),r.push(s.value),o+=Co;return{times:void 0,keyframes:r,duration:o-Co,ease:"linear"}}const dg={anticipate:Bv,backInOut:$v,circInOut:Hv};function Mw(e){return e in dg}class Vf extends ig{constructor(t){super(t);const{name:n,motionValue:s,element:r,keyframes:o}=this.options;this.resolver=new rg(o,(a,l)=>this.onKeyframesResolved(a,l),n,s,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:s=300,times:r,ease:o,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof o=="string"&&ko()&&Mw(o)&&(o=dg[o]),Pw(this.options)){const{onComplete:f,onUpdate:h,motionValue:y,element:g,...k}=this.options,N=Ew(t,k);t=N.keyframes,t.length===1&&(t[1]=t[0]),s=N.duration,r=N.times,o=N.ease,a="keyframes"}const d=Nw(l.owner.current,c,t,{...this.options,duration:s,times:r,ease:o});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(wf(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Qo(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:s,times:r,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ft(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ft(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Ot(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return et;const{animation:s}=n;wf(s,t)}return et}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:r,type:o,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...y}=this.options,g=new _u({...y,keyframes:s,duration:r,type:o,ease:a,times:l,isGenerator:!0}),k=Ot(this.time);u.setWithVelocity(g.sample(k-Co).value,g.sample(k).value,Co)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:r,repeatType:o,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return Cw()&&s&&Sw.has(s)&&!c&&!u&&!r&&o!=="mirror"&&a!==0&&l!=="inertia"}}const Aw={type:"spring",stiffness:500,damping:25,restSpeed:10},Rw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Dw={type:"keyframes",duration:.8},Lw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_w=(e,{keyframes:t})=>t.length>2?Dw:Wn.has(e)?e.startsWith("scale")?Rw(t[1]):Aw:Lw;function zw({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const zu=(e,t,n,s={},r,o)=>a=>{const l=ju(s,e)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u=u-Ot(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:r};zw(l)||(d={...d,..._w(e,d)}),d.duration&&(d.duration=Ot(d.duration)),d.repeatDelay&&(d.repeatDelay=Ot(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const h=Qo(d.keyframes,l);if(h!==void 0)return ne.update(()=>{d.onUpdate(h),d.onComplete()}),new ej([])}return!o&&Vf.supports(d)?new Vf(d):new _u(d)};function bw({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function fg(e,t,{delay:n=0,transitionOverride:s,type:r}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;s&&(a=s);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const f in c){const h=e.getValue(f,(o=e.latestValues[f])!==null&&o!==void 0?o:null),y=c[f];if(y===void 0||d&&bw(d,f))continue;const g={delay:n,...ju(a||{},f)};let k=!1;if(window.MotionHandoffAnimation){const m=bv(e);if(m){const p=window.MotionHandoffAnimation(m,f,ne);p!==null&&(g.startTime=p,k=!0)}}Kl(e,f),h.start(zu(f,h,y,e.shouldReduceMotion&&_v.has(f)?{type:!1}:g,e,k));const N=h.animation;N&&u.push(N)}return l&&Promise.all(u).then(()=>{ne.update(()=>{l&&pj(e,l)})}),u}function Jl(e,t,n={}){var s;const r=qo(e,t,n.type==="exit"?(s=e.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(fg(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=o;return Vw(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function Vw(e,t,n=0,s=0,r=1,o){const a=[],l=(e.variantChildren.size-1)*s,c=r===1?(u=0)=>u*s:(u=0)=>l-u*s;return Array.from(e.variantChildren).sort(Ow).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Jl(u,t,{...o,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Ow(e,t){return e.sortNodePosition(t)}function Fw(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Jl(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Jl(e,t,n);else{const r=typeof t=="function"?qo(e,t,n.custom):t;s=Promise.all(fg(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Iw=lu.length;function hg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Iw;n++){const s=lu[n],r=e.props[s];(Br(r)||r===!1)&&(t[s]=r)}return t}const $w=[...au].reverse(),Bw=au.length;function Uw(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Fw(e,n,s)))}function Hw(e){let t=Uw(e),n=Of(),s=!0;const r=c=>(u,d)=>{var f;const h=qo(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:y,transitionEnd:g,...k}=h;u={...u,...k,...g}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=hg(e.parent)||{},f=[],h=new Set;let y={},g=1/0;for(let N=0;N<Bw;N++){const m=$w[N],p=n[m],v=u[m]!==void 0?u[m]:d[m],j=Br(v),x=m===c?p.isActive:null;x===!1&&(g=N);let S=v===d[m]&&v!==u[m]&&j;if(S&&s&&e.manuallyAnimateOnMount&&(S=!1),p.protectedKeys={...y},!p.isActive&&x===null||!v&&!p.prevProp||Ko(v)||typeof v=="boolean")continue;const C=Ww(p.prevProp,v);let T=C||m===c&&p.isActive&&!S&&j||N>g&&j,R=!1;const P=Array.isArray(v)?v:[v];let $=P.reduce(r(m),{});x===!1&&($={});const{prevResolvedValues:O={}}=p,Q={...O,...$},ge=W=>{T=!0,h.has(W)&&(R=!0,h.delete(W)),p.needsAnimating[W]=!0;const M=e.getValue(W);M&&(M.liveStyle=!1)};for(const W in Q){const M=$[W],_=O[W];if(y.hasOwnProperty(W))continue;let b=!1;Ul(M)&&Ul(_)?b=!Tv(M,_):b=M!==_,b?M!=null?ge(W):h.add(W):M!==void 0&&h.has(W)?ge(W):p.protectedKeys[W]=!0}p.prevProp=v,p.prevResolvedValues=$,p.isActive&&(y={...y,...$}),s&&e.blockInitialAnimation&&(T=!1),T&&(!(S&&C)||R)&&f.push(...P.map(W=>({animation:W,options:{type:m}})))}if(h.size){const N={};h.forEach(m=>{const p=e.getBaseTarget(m),v=e.getValue(m);v&&(v.liveStyle=!0),N[m]=p??null}),f.push({animation:N})}let k=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(k=!1),s=!1,k?t(f):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,u)}),n[c].isActive=u;const f=a(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Of(),s=!0}}}function Ww(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Tv(t,e):!1}function Sn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Of(){return{animate:Sn(!0),whileInView:Sn(),whileHover:Sn(),whileTap:Sn(),whileDrag:Sn(),whileFocus:Sn(),exit:Sn()}}class kn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Kw extends kn{constructor(t){super(t),t.animationState||(t.animationState=Hw(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ko(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Gw=0;class qw extends kn{constructor(){super(...arguments),this.id=Gw++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Qw={animation:{Feature:Kw},exit:{Feature:qw}};function Kr(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function ni(e){return{point:{x:e.pageX,y:e.pageY}}}const Yw=e=>t=>Su(t)&&e(t,ni(t));function jr(e,t,n,s){return Kr(e,t,Yw(n),s)}const Ff=(e,t)=>Math.abs(e-t);function Xw(e,t){const n=Ff(e.x,t.x),s=Ff(e.y,t.y);return Math.sqrt(n**2+s**2)}class pg{constructor(t,n,{transformPagePoint:s,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=_a(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=Xw(f.offset,{x:0,y:0})>=3;if(!h&&!y)return;const{point:g}=f,{timestamp:k}=Te;this.history.push({...g,timestamp:k});const{onStart:N,onMove:m}=this.handlers;h||(N&&N(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=La(h,this.transformPagePoint),ne.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:y,onSessionEnd:g,resumeAnimation:k}=this.handlers;if(this.dragSnapToOrigin&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=_a(f.type==="pointercancel"?this.lastMoveEventInfo:La(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,N),g&&g(f,N)},!Su(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=r||window;const a=ni(t),l=La(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Te;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,_a(l,this.history)),this.removeListeners=ti(jr(this.contextWindow,"pointermove",this.handlePointerMove),jr(this.contextWindow,"pointerup",this.handlePointerUp),jr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),gn(this.updatePoint)}}function La(e,t){return t?{point:t(e.point)}:e}function If(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _a({point:e},t){return{point:e,delta:If(e,mg(t)),offset:If(e,Zw(t)),velocity:Jw(t,.1)}}function Zw(e){return e[0]}function mg(e){return e[e.length-1]}function Jw(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=mg(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>Ot(t)));)n--;if(!s)return{x:0,y:0};const o=Ft(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const a={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const vg=1e-4,ek=1-vg,tk=1+vg,gg=.01,nk=0-gg,sk=0+gg;function nt(e){return e.max-e.min}function rk(e,t,n){return Math.abs(e-t)<=n}function $f(e,t,n,s=.5){e.origin=s,e.originPoint=ae(t.min,t.max,e.origin),e.scale=nt(n)/nt(t),e.translate=ae(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ek&&e.scale<=tk||isNaN(e.scale))&&(e.scale=1),(e.translate>=nk&&e.translate<=sk||isNaN(e.translate))&&(e.translate=0)}function wr(e,t,n,s){$f(e.x,t.x,n.x,s?s.originX:void 0),$f(e.y,t.y,n.y,s?s.originY:void 0)}function Bf(e,t,n){e.min=n.min+t.min,e.max=e.min+nt(t)}function ik(e,t,n){Bf(e.x,t.x,n.x),Bf(e.y,t.y,n.y)}function Uf(e,t,n){e.min=t.min-n.min,e.max=e.min+nt(t)}function kr(e,t,n){Uf(e.x,t.x,n.x),Uf(e.y,t.y,n.y)}function ok(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?ae(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?ae(n,e,s.max):Math.min(e,n)),e}function Hf(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ak(e,{top:t,left:n,bottom:s,right:r}){return{x:Hf(e.x,n,r),y:Hf(e.y,t,s)}}function Wf(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function lk(e,t){return{x:Wf(e.x,t.x),y:Wf(e.y,t.y)}}function ck(e,t){let n=.5;const s=nt(e),r=nt(t);return r>s?n=Ls(t.min,t.max-s,e.min):s>r&&(n=Ls(e.min,e.max-r,t.min)),Ht(0,1,n)}function uk(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ec=.35;function dk(e=ec){return e===!1?e=0:e===!0&&(e=ec),{x:Kf(e,"left","right"),y:Kf(e,"top","bottom")}}function Kf(e,t,n){return{min:Gf(e,t),max:Gf(e,n)}}function Gf(e,t){return typeof e=="number"?e:e[t]||0}const qf=()=>({translate:0,scale:1,origin:0,originPoint:0}),us=()=>({x:qf(),y:qf()}),Qf=()=>({min:0,max:0}),pe=()=>({x:Qf(),y:Qf()});function at(e){return[e("x"),e("y")]}function yg({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function fk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hk(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function za(e){return e===void 0||e===1}function tc({scale:e,scaleX:t,scaleY:n}){return!za(e)||!za(t)||!za(n)}function Pn(e){return tc(e)||xg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xg(e){return Yf(e.x)||Yf(e.y)}function Yf(e){return e&&e!=="0%"}function To(e,t,n){const s=e-n,r=t*s;return n+r}function Xf(e,t,n,s,r){return r!==void 0&&(e=To(e,r,s)),To(e,n,s)+t}function nc(e,t=0,n=1,s,r){e.min=Xf(e.min,t,n,s,r),e.max=Xf(e.max,t,n,s,r)}function jg(e,{x:t,y:n}){nc(e.x,t.translate,t.scale,t.originPoint),nc(e.y,n.translate,n.scale,n.originPoint)}const Zf=.999999999999,Jf=1.0000000000001;function pk(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,a;for(let l=0;l<r;l++){o=n[l],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&fs(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,jg(e,a)),s&&Pn(o.latestValues)&&fs(e,o.latestValues))}t.x<Jf&&t.x>Zf&&(t.x=1),t.y<Jf&&t.y>Zf&&(t.y=1)}function ds(e,t){e.min=e.min+t,e.max=e.max+t}function eh(e,t,n,s,r=.5){const o=ae(e.min,e.max,r);nc(e,t,n,o,s)}function fs(e,t){eh(e.x,t.x,t.scaleX,t.scale,t.originX),eh(e.y,t.y,t.scaleY,t.scale,t.originY)}function wg(e,t){return yg(hk(e.getBoundingClientRect(),t))}function mk(e,t,n){const s=wg(e,n),{scroll:r}=t;return r&&(ds(s.x,r.offset.x),ds(s.y,r.offset.y)),s}const kg=({current:e})=>e?e.ownerDocument.defaultView:null,vk=new WeakMap;class gk{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ni(d).point)},o=(d,f)=>{const{drag:h,dragPropagation:y,onDragStart:g}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=cj(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),at(N=>{let m=this.getAxisMotionValue(N).get()||0;if(At.test(m)){const{projection:p}=this.visualElement;if(p&&p.layout){const v=p.layout.layoutBox[N];v&&(m=nt(v)*(parseFloat(m)/100))}}this.originPoint[N]=m}),g&&ne.postRender(()=>g(d,f)),Kl(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:g,onDrag:k}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:N}=f;if(y&&this.currentDirection===null){this.currentDirection=yk(N),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,N),this.updateAxis("y",f.point,N),this.visualElement.render(),k&&k(d,f)},l=(d,f)=>this.stop(d,f),c=()=>at(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new pg(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:kg(this.visualElement)})}stop(t,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&ne.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Ti(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(a=ok(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:s}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&ls(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=ak(r.layoutBox,n):this.constraints=!1,this.elastic=dk(s),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&at(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=uk(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ls(t))return!1;const s=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=mk(s,r.root,this.visualElement.getTransformPagePoint());let a=lk(r.layout.layoutBox,o);if(n){const l=n(fk(a));this.hasMutatedConstraints=!!l,l&&(a=yg(l))}return a}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=at(d=>{if(!Ti(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const h=r?200:1e6,y=r?40:1e7,g={type:"inertia",velocity:s?t[d]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Kl(this.visualElement,t),s.start(zu(t,s,0,n,this.visualElement,!1))}stopAnimation(){at(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){at(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){at(n=>{const{drag:s}=this.getProps();if(!Ti(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];o.set(t[n]-ae(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ls(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};at(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=ck({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),at(a=>{if(!Ti(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(ae(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;vk.set(this.visualElement,this);const t=this.visualElement.current,n=jr(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();ls(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ne.read(s);const a=Kr(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(at(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=ec,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function Ti(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yk(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class xk extends kn{constructor(t){super(t),this.removeGroupControls=et,this.removeListeners=et,this.controls=new gk(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const th=e=>(t,n)=>{e&&ne.postRender(()=>e(t,n))};class jk extends kn{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(t){this.session=new pg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:th(t),onStart:th(n),onMove:s,onEnd:(o,a)=>{delete this.session,r&&ne.postRender(()=>r(o,a))}}}mount(){this.removePointerDownListener=jr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ki={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function nh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const er={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(F.test(e))e=parseFloat(e);else return e;const n=nh(e,t.target.x),s=nh(e,t.target.y);return`${n}% ${s}%`}},wk={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=yn.parse(e);if(r.length>5)return s;const o=yn.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=ae(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),o(r)}};class kk extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;B1(Sk),o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ki.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,a=s.projection;return a&&(a.isPresent=o,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ne.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),uu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Sg(e){const[t,n]=iv(),s=w.useContext(nu);return i.jsx(kk,{...e,layoutGroup:s,switchLayoutGroup:w.useContext(hv),isPresent:t,safeToRemove:n})}const Sk={borderRadius:{...er,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:er,borderTopRightRadius:er,borderBottomLeftRadius:er,borderBottomRightRadius:er,boxShadow:wk};function Nk(e,t,n){const s=_e(e)?e:Hr(e);return s.start(zu("",s,t,n)),s.animation}function Ck(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Tk=(e,t)=>e.depth-t.depth;class Pk{constructor(){this.children=[],this.isDirty=!1}add(t){Nu(this.children,t),this.isDirty=!0}remove(t){Cu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Tk),this.isDirty=!1,this.children.forEach(t)}}function Ek(e,t){const n=Rt.now(),s=({timestamp:r})=>{const o=r-n;o>=t&&(gn(s),e(o-t))};return ne.read(s,!0),()=>gn(s)}const Ng=["TopLeft","TopRight","BottomLeft","BottomRight"],Mk=Ng.length,sh=e=>typeof e=="string"?parseFloat(e):e,rh=e=>typeof e=="number"||F.test(e);function Ak(e,t,n,s,r,o){r?(e.opacity=ae(0,n.opacity!==void 0?n.opacity:1,Rk(s)),e.opacityExit=ae(t.opacity!==void 0?t.opacity:1,0,Dk(s))):o&&(e.opacity=ae(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let a=0;a<Mk;a++){const l=`border${Ng[a]}Radius`;let c=ih(t,l),u=ih(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||rh(c)===rh(u)?(e[l]=Math.max(ae(sh(c),sh(u),s),0),(At.test(u)||At.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=ae(t.rotate||0,n.rotate||0,s))}function ih(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Rk=Cg(0,.5,Uv),Dk=Cg(.5,.95,et);function Cg(e,t,n){return s=>s<e?0:s>t?1:n(Ls(e,t,s))}function oh(e,t){e.min=t.min,e.max=t.max}function ot(e,t){oh(e.x,t.x),oh(e.y,t.y)}function ah(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function lh(e,t,n,s,r){return e-=t,e=To(e,1/n,s),r!==void 0&&(e=To(e,1/r,s)),e}function Lk(e,t=0,n=1,s=.5,r,o=e,a=e){if(At.test(t)&&(t=parseFloat(t),t=ae(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=ae(o.min,o.max,s);e===o&&(l-=t),e.min=lh(e.min,t,n,l,r),e.max=lh(e.max,t,n,l,r)}function ch(e,t,[n,s,r],o,a){Lk(e,t[n],t[s],t[r],t.scale,o,a)}const _k=["x","scaleX","originX"],zk=["y","scaleY","originY"];function uh(e,t,n,s){ch(e.x,t,_k,n?n.x:void 0,s?s.x:void 0),ch(e.y,t,zk,n?n.y:void 0,s?s.y:void 0)}function dh(e){return e.translate===0&&e.scale===1}function Tg(e){return dh(e.x)&&dh(e.y)}function fh(e,t){return e.min===t.min&&e.max===t.max}function bk(e,t){return fh(e.x,t.x)&&fh(e.y,t.y)}function hh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pg(e,t){return hh(e.x,t.x)&&hh(e.y,t.y)}function ph(e){return nt(e.x)/nt(e.y)}function mh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Vk{constructor(){this.members=[]}add(t){Nu(this.members,t),t.scheduleRender()}remove(t){if(Cu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let s;for(let r=n;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ok(e,t,n){let s="";const r=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||o||a)&&(s=`translate3d(${r}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:y,skewY:g}=n;u&&(s=`perspective(${u}px) ${s}`),d&&(s+=`rotate(${d}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),y&&(s+=`skewX(${y}deg) `),g&&(s+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(s+=`scale(${l}, ${c})`),s||"none"}const En={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},lr=typeof window<"u"&&window.MotionDebug!==void 0,ba=["","X","Y","Z"],Fk={visibility:"hidden"},vh=1e3;let Ik=0;function Va(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Eg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=bv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ne,!(r||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Eg(s)}function Mg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=Ik++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,lr&&(En.totalNodes=En.resolvedTargetDeltas=En.recalculatedProjection=0),this.nodes.forEach(Uk),this.nodes.forEach(qk),this.nodes.forEach(Qk),this.nodes.forEach(Hk),lr&&window.MotionDebug.record(En)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Pk)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Tu),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ck(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Ek(h,250),Ki.hasAnimatedSinceResize&&(Ki.hasAnimatedSinceResize=!1,this.nodes.forEach(yh))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:y,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||d.getDefaultTransition()||eS,{onLayoutAnimationStart:N,onLayoutAnimationComplete:m}=d.getProps(),p=!this.targetLayout||!Pg(this.targetLayout,g)||y,v=!h&&y;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const j={...ju(k,"layout"),onPlay:N,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else h||yh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,gn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Yk),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Eg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(gh);return}this.isUpdating||this.nodes.forEach(Kk),this.isUpdating=!1,this.nodes.forEach(Gk),this.nodes.forEach($k),this.nodes.forEach(Bk),this.clearAllSnapshots();const l=Rt.now();Te.delta=Ht(0,1e3/60,l-Te.timestamp),Te.timestamp=l,Te.isProcessing=!0,Pa.update.process(Te),Pa.preRender.process(Te),Pa.render.process(Te),Te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,uu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Wk),this.sharedNodes.forEach(Xk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ne.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ne.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Tg(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||Pn(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),tS(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:l}=this.options;if(!l)return pe();const c=l.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(nS))){const{scroll:d}=this.root;d&&(ds(c.x,d.offset.x),ds(c.y,d.offset.y))}return c}removeElementScroll(a){var l;const c=pe();if(ot(c,a),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&ot(c,a),ds(c.x,f.offset.x),ds(c.y,f.offset.y))}return c}applyTransform(a,l=!1){const c=pe();ot(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&fs(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Pn(d.latestValues)&&fs(c,d.latestValues)}return Pn(this.latestValues)&&fs(c,this.latestValues),c}removeTransform(a){const l=pe();ot(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Pn(u.latestValues))continue;tc(u.latestValues)&&u.updateSnapshot();const d=pe(),f=u.measurePageBox();ot(d,f),uh(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Pn(this.latestValues)&&uh(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=Te.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pe(),this.relativeTargetOrigin=pe(),kr(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),ot(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=pe(),this.targetWithTransforms=pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ik(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ot(this.target,this.layout.layoutBox),jg(this.target,this.targetDelta)):ot(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pe(),this.relativeTargetOrigin=pe(),kr(this.relativeTargetOrigin,this.target,y.target),ot(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}lr&&En.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||tc(this.parent.latestValues)||xg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Te.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;ot(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,y=this.treeScale.y;pk(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=pe());const{target:g}=l;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ah(this.prevProjectionDelta.x,this.projectionDelta.x),ah(this.prevProjectionDelta.y,this.projectionDelta.y)),wr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==y||!mh(this.projectionDelta.x,this.prevProjectionDelta.x)||!mh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),lr&&En.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=us(),this.projectionDelta=us(),this.projectionDeltaWithTransform=us()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=us();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=pe(),y=c?c.source:void 0,g=this.layout?this.layout.source:void 0,k=y!==g,N=this.getStack(),m=!N||N.members.length<=1,p=!!(k&&!m&&this.options.crossfade===!0&&!this.path.some(Jk));this.animationProgress=0;let v;this.mixTargetDelta=j=>{const x=j/1e3;xh(f.x,a.x,x),xh(f.y,a.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kr(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zk(this.relativeTarget,this.relativeTargetOrigin,h,x),v&&bk(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=pe()),ot(v,this.relativeTarget)),k&&(this.animationValues=d,Ak(d,u,this.latestValues,x,p,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(gn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ne.update(()=>{Ki.hasAnimatedSinceResize=!0,this.currentAnimation=Nk(0,vh,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Ag(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||pe();const f=nt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const h=nt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}ot(l,c),fs(l,d),wr(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Vk),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Va("z",a,u,this.animationValues);for(let d=0;d<ba.length;d++)Va(`rotate${ba[d]}`,a,u,this.animationValues),Va(`skew${ba[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Fk;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Hi(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const k={};return this.options.layoutId&&(k.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,k.pointerEvents=Hi(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Pn(this.latestValues)&&(k.transform=d?d({},""):"none",this.hasProjected=!1),k}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=Ok(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:y,y:g}=this.projectionDelta;u.transformOrigin=`${y.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const k in wo){if(h[k]===void 0)continue;const{correct:N,applyTo:m}=wo[k],p=u.transform==="none"?h[k]:N(h[k],f);if(m){const v=m.length;for(let j=0;j<v;j++)u[m[j]]=p}else u[k]=p}return this.options.layoutId&&(u.pointerEvents=f===this?Hi(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(gh),this.root.sharedNodes.clear()}}}function $k(e){e.updateLayout()}function Bk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?at(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],y=nt(h);h.min=s[f].min,h.max=h.min+y}):Ag(o,n.layoutBox,s)&&at(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],y=nt(s[f]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+y)});const l=us();wr(l,s,n.layoutBox);const c=us();a?wr(c,e.applyTransform(r,!0),n.measuredBox):wr(c,s,n.layoutBox);const u=!Tg(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:y}=f;if(h&&y){const g=pe();kr(g,n.layoutBox,h.layoutBox);const k=pe();kr(k,s,y.layoutBox),Pg(g,k)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=k,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function Uk(e){lr&&En.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Hk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Wk(e){e.clearSnapshot()}function gh(e){e.clearMeasurements()}function Kk(e){e.isLayoutDirty=!1}function Gk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qk(e){e.resolveTargetDelta()}function Qk(e){e.calcProjection()}function Yk(e){e.resetSkewAndRotation()}function Xk(e){e.removeLeadSnapshot()}function xh(e,t,n){e.translate=ae(t.translate,0,n),e.scale=ae(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jh(e,t,n,s){e.min=ae(t.min,n.min,s),e.max=ae(t.max,n.max,s)}function Zk(e,t,n,s){jh(e.x,t.x,n.x,s),jh(e.y,t.y,n.y,s)}function Jk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const eS={duration:.45,ease:[.4,0,.1,1]},wh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),kh=wh("applewebkit/")&&!wh("chrome/")?Math.round:et;function Sh(e){e.min=kh(e.min),e.max=kh(e.max)}function tS(e){Sh(e.x),Sh(e.y)}function Ag(e,t,n){return e==="position"||e==="preserve-aspect"&&!rk(ph(t),ph(n),.2)}function nS(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const sS=Mg({attachResizeListener:(e,t)=>Kr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Oa={current:void 0},Rg=Mg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Oa.current){const e=new sS({});e.mount(window),e.setOptions({layoutScroll:!0}),Oa.current=e}return Oa.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),rS={pan:{Feature:jk},drag:{Feature:xk,ProjectionNode:Rg,MeasureLayout:Sg}};function Nh(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&ne.postRender(()=>o(t,ni(t)))}class iS extends kn{mount(){const{current:t}=this.node;t&&(this.unmount=rj(t,n=>(Nh(this.node,n,"Start"),s=>Nh(this.node,s,"End"))))}unmount(){}}class oS extends kn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ti(Kr(this.node.current,"focus",()=>this.onFocus()),Kr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ch(e,t,n){const{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&ne.postRender(()=>o(t,ni(t)))}class aS extends kn{mount(){const{current:t}=this.node;t&&(this.unmount=lj(t,n=>(Ch(this.node,n,"Start"),(s,{success:r})=>Ch(this.node,s,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sc=new WeakMap,Fa=new WeakMap,lS=e=>{const t=sc.get(e.target);t&&t(e)},cS=e=>{e.forEach(lS)};function uS({root:e,...t}){const n=e||document;Fa.has(n)||Fa.set(n,{});const s=Fa.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(cS,{root:e,...t})),s[r]}function dS(e,t,n){const s=uS(t);return sc.set(e,n),s.observe(e),()=>{sc.delete(e),s.unobserve(e)}}const fS={some:0,all:1};class hS extends kn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:fS[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return dS(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(pS(t,n))&&this.startObserver()}unmount(){}}function pS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const mS={inView:{Feature:hS},tap:{Feature:aS},focus:{Feature:oS},hover:{Feature:iS}},vS={layout:{ProjectionNode:Rg,MeasureLayout:Sg}},rc={current:null},Dg={current:!1};function gS(){if(Dg.current=!0,!!iu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rc.current=e.matches;e.addListener(t),t()}else rc.current=!1}const yS=[...sg,De,yn],xS=e=>yS.find(ng(e)),Th=new WeakMap;function jS(e,t,n){for(const s in t){const r=t[s],o=n[s];if(_e(r))e.addValue(s,r);else if(_e(o))e.addValue(s,Hr(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const a=e.getValue(s);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(s);e.addValue(s,Hr(a!==void 0?a:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Ph=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class wS{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Du,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=Rt.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,ne.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Go(n),this.isVariantNode=dv(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in h){const g=h[y];c[y]!==void 0&&_e(g)&&g.set(c[y],!1)}}mount(t){this.current=t,Th.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Dg.current||gS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:rc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Th.delete(this.current),this.projection&&this.projection.unmount(),gn(this.notifyUpdate),gn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Wn.has(t),r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ne.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in _s){const n=_s[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ph.length;s++){const r=Ph[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,a=t[o];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=jS(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Hr(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(eg(r)||Wv(r))?r=parseFloat(r):!xS(r)&&yn.test(n)&&(r=Xv(t,n)),this.setBaseTarget(t,_e(r)?r.get():r)),_e(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let r;if(typeof s=="string"||typeof s=="object"){const a=fu(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(s&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!_e(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Tu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Lg extends wS{constructor(){super(...arguments),this.KeyframeResolver=rg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_e(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kS(e){return window.getComputedStyle(e)}class SS extends Lg{constructor(){super(...arguments),this.type="html",this.renderInstance=jv}readValueFromInstance(t,n){if(Wn.has(n)){const s=Ru(n);return s&&s.default||0}else{const s=kS(t),r=(gv(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wg(t,n)}build(t,n,s){mu(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return xu(t,n,s)}}class NS extends Lg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Wn.has(n)){const s=Ru(n);return s&&s.default||0}return n=wv.has(n)?n:cu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Nv(t,n,s)}build(t,n,s){vu(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,r){kv(t,n,s,r)}mount(t){this.isSVGTag=yu(t.tagName),super.mount(t)}}const CS=(e,t)=>du(e)?new NS(t):new SS(t,{allowProjection:e!==w.Fragment}),TS=X1({...Qw,...mS,...rS,...vS},CS),we=f1(TS);function Eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n<t;n++)s[n]=e[n];return s}function PS(e){if(Array.isArray(e))return e}function ES(e,t,n){return(t=zS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,r,o,a,l=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(s=o.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}function AS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
385
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,s)}return n}function Ah(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mh(Object(n),!0).forEach(function(s){ES(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mh(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function RS(e,t){if(e==null)return{};var n,s,r=DS(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)n=o[s],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DS(e,t){if(e==null)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;n[s]=e[s]}return n}function LS(e,t){return PS(e)||MS(e,t)||bS(e,t)||AS()}function _S(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zS(e){var t=_S(e,"string");return typeof t=="symbol"?t:t+""}function bS(e,t){if(e){if(typeof e=="string")return Eh(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Eh(e,t):void 0}}function VS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,s)}return n}function Dh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rh(Object(n),!0).forEach(function(s){VS(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rh(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function OS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(s){return t.reduceRight(function(r,o){return o(r)},s)}}function cr(e){return function t(){for(var n=this,s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return t.apply(n,[].concat(r,l))}}}function Po(e){return{}.toString.call(e).includes("Object")}function FS(e){return!Object.keys(e).length}function Gr(e){return typeof e=="function"}function IS(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $S(e,t){return Po(t)||hn("changeType"),Object.keys(t).some(function(n){return!IS(e,n)})&&hn("changeField"),t}function BS(e){Gr(e)||hn("selectorType")}function US(e){Gr(e)||Po(e)||hn("handlerType"),Po(e)&&Object.values(e).some(function(t){return!Gr(t)})&&hn("handlersType")}function HS(e){e||hn("initialIsRequired"),Po(e)||hn("initialType"),FS(e)&&hn("initialContent")}function WS(e,t){throw new Error(e[t]||e.default)}var KS={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},hn=cr(WS)(KS),Pi={changes:$S,selector:BS,handler:US,initial:HS};function GS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Pi.initial(e),Pi.handler(t);var n={current:e},s=cr(YS)(n,t),r=cr(QS)(n),o=cr(Pi.changes)(e),a=cr(qS)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return Pi.selector(u),u(n.current)}function c(u){OS(s,r,o,a)(u)}return[l,c]}function qS(e,t){return Gr(t)?t(e.current):t}function QS(e,t){return e.current=Dh(Dh({},e.current),t),t}function YS(e,t,n){return Gr(t)?t(e.current):Object.keys(n).forEach(function(s){var r;return(r=t[s])===null||r===void 0?void 0:r.call(t,e.current[s])}),n}var XS={create:GS},ZS={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function JS(e){return function t(){for(var n=this,s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return t.apply(n,[].concat(r,l))}}}function e2(e){return{}.toString.call(e).includes("Object")}function t2(e){return e||Lh("configIsRequired"),e2(e)||Lh("configType"),e.urls?(n2(),{paths:{vs:e.urls.monacoBase}}):e}function n2(){console.warn(_g.deprecation)}function s2(e,t){throw new Error(e[t]||e.default)}var _g={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
386
|
+
You are using deprecated way of configuration.
|
|
387
|
+
|
|
388
|
+
Instead of using
|
|
389
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
390
|
+
use
|
|
391
|
+
monaco.config({ paths: { vs: '...' } })
|
|
392
|
+
|
|
393
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
394
|
+
`},Lh=JS(s2)(_g),r2={config:t2},i2=function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return function(r){return n.reduceRight(function(o,a){return a(o)},r)}};function zg(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],zg(e[n],t[n]))}),Ah(Ah({},e),t)}var o2={type:"cancelation",msg:"operation is manually canceled"};function Ia(e){var t=!1,n=new Promise(function(s,r){e.then(function(o){return t?r(o2):s(o)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var a2=["monaco"],l2=XS.create({config:ZS,isInitialized:!1,resolve:null,reject:null,monaco:null}),bg=LS(l2,2),si=bg[0],Yo=bg[1];function c2(e){var t=r2.config(e),n=t.monaco,s=RS(t,a2);Yo(function(r){return{config:zg(r.config,s),monaco:n}})}function u2(){var e=si(function(t){var n=t.monaco,s=t.isInitialized,r=t.resolve;return{monaco:n,isInitialized:s,resolve:r}});if(!e.isInitialized){if(Yo({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Ia($a);if(window.monaco&&window.monaco.editor)return Vg(window.monaco),e.resolve(window.monaco),Ia($a);i2(d2,h2)(p2)}return Ia($a)}function d2(e){return document.body.appendChild(e)}function f2(e){var t=document.createElement("script");return e&&(t.src=e),t}function h2(e){var t=si(function(s){var r=s.config,o=s.reject;return{config:r,reject:o}}),n=f2("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function p2(){var e=si(function(n){var s=n.config,r=n.resolve,o=n.reject;return{config:s,resolve:r,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var s=n.m||n;Vg(s),e.resolve(s)},function(n){e.reject(n)})}function Vg(e){si().monaco||Yo({monaco:e})}function m2(){return si(function(e){var t=e.monaco;return t})}var $a=new Promise(function(e,t){return Yo({resolve:e,reject:t})}),Og={config:c2,init:u2,__getMonacoInstance:m2},v2={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Ba=v2,g2={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},y2=g2;function x2({children:e}){return oe.createElement("div",{style:y2.container},e)}var j2=x2,w2=j2;function k2({width:e,height:t,isEditorReady:n,loading:s,_ref:r,className:o,wrapperProps:a}){return oe.createElement("section",{style:{...Ba.wrapper,width:e,height:t},...a},!n&&oe.createElement(w2,null,s),oe.createElement("div",{ref:r,style:{...Ba.fullWidth,...!n&&Ba.hide},className:o}))}var S2=k2,Fg=w.memo(S2);function N2(e){w.useEffect(e,[])}var Ig=N2;function C2(e,t,n=!0){let s=w.useRef(!0);w.useEffect(s.current||!n?()=>{s.current=!1}:e,t)}var Ye=C2;function Sr(){}function hs(e,t,n,s){return T2(e,s)||P2(e,t,n,s)}function T2(e,t){return e.editor.getModel($g(e,t))}function P2(e,t,n,s){return e.editor.createModel(t,n,s?$g(e,s):void 0)}function $g(e,t){return e.Uri.parse(t)}function E2({original:e,modified:t,language:n,originalLanguage:s,modifiedLanguage:r,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:h="100%",width:y="100%",className:g,wrapperProps:k={},beforeMount:N=Sr,onMount:m=Sr}){let[p,v]=w.useState(!1),[j,x]=w.useState(!0),S=w.useRef(null),C=w.useRef(null),T=w.useRef(null),R=w.useRef(m),P=w.useRef(N),$=w.useRef(!1);Ig(()=>{let z=Og.init();return z.then(U=>(C.current=U)&&x(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>S.current?ge():z.cancel()}),Ye(()=>{if(S.current&&C.current){let z=S.current.getOriginalEditor(),U=hs(C.current,e||"",s||n||"text",o||"");U!==z.getModel()&&z.setModel(U)}},[o],p),Ye(()=>{if(S.current&&C.current){let z=S.current.getModifiedEditor(),U=hs(C.current,t||"",r||n||"text",a||"");U!==z.getModel()&&z.setModel(U)}},[a],p),Ye(()=>{let z=S.current.getModifiedEditor();z.getOption(C.current.editor.EditorOption.readOnly)?z.setValue(t||""):t!==z.getValue()&&(z.executeEdits("",[{range:z.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),z.pushUndoStop())},[t],p),Ye(()=>{var z,U;(U=(z=S.current)==null?void 0:z.getModel())==null||U.original.setValue(e||"")},[e],p),Ye(()=>{let{original:z,modified:U}=S.current.getModel();C.current.editor.setModelLanguage(z,s||n||"text"),C.current.editor.setModelLanguage(U,r||n||"text")},[n,s,r],p),Ye(()=>{var z;(z=C.current)==null||z.editor.setTheme(u)},[u],p),Ye(()=>{var z;(z=S.current)==null||z.updateOptions(f)},[f],p);let O=w.useCallback(()=>{var W;if(!C.current)return;P.current(C.current);let z=hs(C.current,e||"",s||n||"text",o||""),U=hs(C.current,t||"",r||n||"text",a||"");(W=S.current)==null||W.setModel({original:z,modified:U})},[n,t,r,e,s,o,a]),Q=w.useCallback(()=>{var z;!$.current&&T.current&&(S.current=C.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...f}),O(),(z=C.current)==null||z.editor.setTheme(u),v(!0),$.current=!0)},[f,u,O]);w.useEffect(()=>{p&&R.current(S.current,C.current)},[p]),w.useEffect(()=>{!j&&!p&&Q()},[j,p,Q]);function ge(){var U,W,M,_;let z=(U=S.current)==null?void 0:U.getModel();l||((W=z==null?void 0:z.original)==null||W.dispose()),c||((M=z==null?void 0:z.modified)==null||M.dispose()),(_=S.current)==null||_.dispose()}return oe.createElement(Fg,{width:y,height:h,isEditorReady:p,loading:d,_ref:T,className:g,wrapperProps:k})}var M2=E2,A2=w.memo(M2);function R2(e){let t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current}var D2=R2,Ei=new Map;function L2({defaultValue:e,defaultLanguage:t,defaultPath:n,value:s,language:r,path:o,theme:a="light",line:l,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:h=!1,width:y="100%",height:g="100%",className:k,wrapperProps:N={},beforeMount:m=Sr,onMount:p=Sr,onChange:v,onValidate:j=Sr}){let[x,S]=w.useState(!1),[C,T]=w.useState(!0),R=w.useRef(null),P=w.useRef(null),$=w.useRef(null),O=w.useRef(p),Q=w.useRef(m),ge=w.useRef(),z=w.useRef(s),U=D2(o),W=w.useRef(!1),M=w.useRef(!1);Ig(()=>{let V=Og.init();return V.then(I=>(R.current=I)&&T(!1)).catch(I=>(I==null?void 0:I.type)!=="cancelation"&&console.error("Monaco initialization: error:",I)),()=>P.current?b():V.cancel()}),Ye(()=>{var I,ue,je,be;let V=hs(R.current,e||s||"",t||r||"",o||n||"");V!==((I=P.current)==null?void 0:I.getModel())&&(f&&Ei.set(U,(ue=P.current)==null?void 0:ue.saveViewState()),(je=P.current)==null||je.setModel(V),f&&((be=P.current)==null||be.restoreViewState(Ei.get(o))))},[o],x),Ye(()=>{var V;(V=P.current)==null||V.updateOptions(u)},[u],x),Ye(()=>{!P.current||s===void 0||(P.current.getOption(R.current.editor.EditorOption.readOnly)?P.current.setValue(s):s!==P.current.getValue()&&(M.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:s,forceMoveMarkers:!0}]),P.current.pushUndoStop(),M.current=!1))},[s],x),Ye(()=>{var I,ue;let V=(I=P.current)==null?void 0:I.getModel();V&&r&&((ue=R.current)==null||ue.editor.setModelLanguage(V,r))},[r],x),Ye(()=>{var V;l!==void 0&&((V=P.current)==null||V.revealLine(l))},[l],x),Ye(()=>{var V;(V=R.current)==null||V.editor.setTheme(a)},[a],x);let _=w.useCallback(()=>{var V;if(!(!$.current||!R.current)&&!W.current){Q.current(R.current);let I=o||n,ue=hs(R.current,s||e||"",t||r||"",I||"");P.current=(V=R.current)==null?void 0:V.editor.create($.current,{model:ue,automaticLayout:!0,...u},d),f&&P.current.restoreViewState(Ei.get(I)),R.current.editor.setTheme(a),l!==void 0&&P.current.revealLine(l),S(!0),W.current=!0}},[e,t,n,s,r,o,u,d,f,a,l]);w.useEffect(()=>{x&&O.current(P.current,R.current)},[x]),w.useEffect(()=>{!C&&!x&&_()},[C,x,_]),z.current=s,w.useEffect(()=>{var V,I;x&&v&&((V=ge.current)==null||V.dispose(),ge.current=(I=P.current)==null?void 0:I.onDidChangeModelContent(ue=>{M.current||v(P.current.getValue(),ue)}))},[x,v]),w.useEffect(()=>{if(x){let V=R.current.editor.onDidChangeMarkers(I=>{var je;let ue=(je=P.current.getModel())==null?void 0:je.uri;if(ue&&I.find(be=>be.path===ue.path)){let be=R.current.editor.getModelMarkers({resource:ue});j==null||j(be)}});return()=>{V==null||V.dispose()}}return()=>{}},[x,j]);function b(){var V,I;(V=ge.current)==null||V.dispose(),h?f&&Ei.set(o,P.current.saveViewState()):(I=P.current.getModel())==null||I.dispose(),P.current.dispose()}return oe.createElement(Fg,{width:y,height:g,isEditorReady:x,loading:c,_ref:$,className:k,wrapperProps:N})}var _2=L2,z2=w.memo(_2);const b2=e=>{var s;const t=(s=e.split(".").pop())==null?void 0:s.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",py:"python",rb:"ruby",rs:"rust",go:"go",json:"json",yaml:"yaml",yml:"yaml",md:"markdown",css:"css",scss:"scss",html:"html",xml:"xml",sql:"sql",sh:"shell",bash:"shell",zsh:"shell"}[t||""]||"plaintext"},V2=new Set(["txt","log","env"]);function O2(e){var n;const t=((n=e.split(".").pop())==null?void 0:n.toLowerCase())||"";return V2.has(t)}const F2=({filename:e,originalCode:t,modifiedCode:n,onClose:s,theme:r="dark",violations:o=[]})=>{const a=t!==n,l=b2(e),c=r==="dark"?"vs-dark":"light",u=O2(e)&&!a,d=f=>{if(!o.length||!f)return;const h=window.monaco;if(!h)return;const y=o.filter(g=>g.line).map(g=>({range:new h.Range(g.line,1,g.endLine||g.line,1),options:{isWholeLine:!0,className:"violation-line-highlight",glyphMarginClassName:"violation-glyph",glyphMarginHoverMessage:{value:`**[${g.id}] ${g.title}**
|
|
395
|
+
|
|
396
|
+
${g.details}`},overviewRuler:{color:"#f87171",position:h.editor.OverviewRulerLane.Full}}}));f.deltaDecorations([],y)};return i.jsx("div",{className:"diff-viewer-overlay",children:i.jsxs("div",{className:"diff-viewer-window",children:[i.jsxs("div",{className:"diff-viewer-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(Pt,{size:18}),i.jsx("span",{children:e}),a&&i.jsx("span",{className:"diff-badge",children:"Modified"}),o.length>0&&i.jsxs("span",{className:"diff-badge",style:{background:"rgba(248, 113, 113, 0.12)",color:"#f87171",borderColor:"rgba(248, 113, 113, 0.3)"},children:[o.length," violation",o.length!==1?"s":""]})]}),i.jsx("button",{onClick:s,className:"close-btn",children:i.jsx(xo,{size:20})})]}),u?i.jsx("pre",{className:"markdown-viewer",children:n}):i.jsx("div",{className:"diff-editor-container",children:a?i.jsx(A2,{height:"100%",language:l,original:t,modified:n,theme:c,options:{renderSideBySide:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13}}):i.jsx(z2,{height:"100%",language:l,value:n,theme:c,onMount:d,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",glyphMargin:o.length>0}})})]})})},I2=(e,t)=>{const n=[];e.forEach(r=>{const o=r.split("/");let a=n,l="";o.forEach((c,u)=>{l=l?`${l}/${c}`:c;const d=u<o.length-1;let f=a.find(h=>h.name===c);f||(f={name:c,path:l,isDirectory:d,children:[],isViolated:t.some(h=>h===l||h.startsWith(`${l}/`))},a.push(f)),a=f.children})});const s=r=>{r.sort((o,a)=>o.isDirectory&&!a.isDirectory?-1:!o.isDirectory&&a.isDirectory?1:o.name.localeCompare(a.name)),r.forEach(o=>s(o.children))};return s(n),n},Bg=({node:e,level:t,onSelect:n,activeFile:s})=>{const[r,o]=w.useState(t===0),a=s===e.path,l=c=>{c.stopPropagation(),e.isDirectory?o(!r):n(e.path)};return i.jsxs("div",{className:"tree-node-container",children:[i.jsxs("div",{className:`tree-item ${a?"active":""} ${e.isViolated?"violated":""}`,style:{paddingLeft:`${t*12+8}px`},onClick:l,children:[e.isDirectory?i.jsxs(i.Fragment,{children:[r?i.jsx(Ms,{size:14,className:"chevron"}):i.jsx(vn,{size:14,className:"chevron"}),r?i.jsx(O0,{size:14,className:"folder-icon"}):i.jsx(Ds,{size:14,className:"folder-icon"})]}):i.jsx(Pt,{size:14,className:"file-icon"}),i.jsx("span",{className:"node-name",title:e.path,children:e.name}),e.isViolated&&i.jsx(As,{size:12,className:"violation-icon"})]}),e.isDirectory&&r&&i.jsx("div",{className:"tree-children",children:e.children.map(c=>i.jsx(Bg,{node:c,level:t+1,onSelect:n,activeFile:s},c.path))})]})},_h=({files:e,onSelect:t,activeFile:n,violatedFiles:s=[]})=>{const r=w.useMemo(()=>I2(e,s),[e,s]);return i.jsxs("div",{className:"file-tree",children:[i.jsxs("div",{className:"tree-header",children:[i.jsx(Ds,{size:14}),i.jsx("span",{children:"Project Explorer"})]}),i.jsx("div",{className:"tree-list",children:r.length===0?i.jsx("div",{className:"empty-tree-state",children:"No files found"}):r.map(o=>i.jsx(Bg,{node:o,level:0,onSelect:t,activeFile:n},o.path))})]})},Ua=e=>typeof e=="string"?e:JSON.stringify(e,null,2),$2=()=>{const[e,t]=w.useState({memories:{}}),[n,s]=w.useState(null),[r,o]=w.useState(""),[a,l]=w.useState(!0),[c,u]=w.useState(!1),d=async()=>{l(!0);try{const v=await(await fetch("/api/memory")).json();v.memories?t(v):t({memories:v})}catch(p){console.error("Failed to fetch memory:",p)}finally{l(!1)}};w.useEffect(()=>{d()},[]);const f=Object.entries(e.memories||{}),h=f.filter(([p])=>p.toLowerCase().includes(r.toLowerCase())),y=n?e.memories[n]:null,g=p=>{try{return new Date(p).toLocaleString()}catch{return p}},k=()=>{y&&(navigator.clipboard.writeText(Ua(y.value)),u(!0),setTimeout(()=>u(!1),2e3))},N=p=>{const v=Ua(p);if(v.includes("1)")&&v.includes("2)")){const j=v.split(/(\d+\))/);return i.jsx("div",{className:"formatted-content",children:j.map((x,S)=>{if(/^\d+\)$/.test(x))return i.jsx("div",{className:"section-marker",children:x},S);if(x.trim().startsWith("Priority:")){const[C,T]=x.split("Priority:");return i.jsxs(oe.Fragment,{children:[C.trim()&&i.jsx("div",{className:"section-body",children:C.trim()}),i.jsx("div",{className:"priority-box",children:T.trim()})]},S)}return x.trim()?i.jsx("div",{className:"section-body",children:x.trim()},S):null})})}return i.jsx("pre",{children:v})},m=p=>{const v=p.toLowerCase();return v.includes("own")||v.includes("boundary")?"ownership":v.includes("except")||v.includes("allow")?"exception":v.includes("arch")||v.includes("decision")||v.includes("migrat")?"architecture":"stable"};return i.jsxs("div",{className:"memory-bank",children:[i.jsxs("div",{className:"memory-header",children:[i.jsxs("div",{className:"memory-title",children:[i.jsx(Ge,{size:24}),i.jsx("h2",{children:"Memory Bank"}),i.jsxs("span",{className:"memory-count",children:[f.length," entries"]})]}),i.jsxs("div",{className:"memory-actions",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(tu,{size:16}),i.jsx("input",{type:"text",placeholder:"Search memories...",value:r,onChange:p=>o(p.target.value)})]}),i.jsx("button",{className:"refresh-btn",onClick:d,disabled:a,children:i.jsx(Me,{size:16,className:a?"spinning":""})})]})]}),i.jsxs("div",{className:"memory-content",children:[i.jsx("div",{className:"memory-list",children:a?i.jsx("div",{className:"memory-loading",children:"Loading memories..."}):h.length===0?i.jsxs("div",{className:"memory-empty glass-card",children:[i.jsx(Hn,{size:48}),i.jsx("h3",{children:"No Memories Stored"}),i.jsxs("p",{children:["Persist stable, non-derivable facts with ",i.jsx("code",{children:"rigour_remember"})," — architecture decisions, ownership boundaries, approved exceptions. Studio merges project"," ",i.jsx("code",{children:".rigour/memory.json"})," and global ",i.jsx("code",{children:"~/.rigour/memory.json"}),"."]})]}):h.map(([p,v])=>i.jsxs("div",{className:`memory-item glass-card ${n===p?"active":""}`,onClick:()=>s(p),children:[i.jsxs("div",{className:"memory-item-header",children:[i.jsx(df,{size:14}),i.jsx("span",{className:"memory-key",children:p}),i.jsx("span",{className:`memory-cat cat-${m(p)}`,children:m(p)}),i.jsx(vn,{size:14,className:"chevron"})]}),i.jsxs("div",{className:"memory-item-meta",children:[i.jsx($n,{size:12}),i.jsx("span",{children:g(v.timestamp)}),v.source&&i.jsx("span",{className:"meta-chip",children:v.source})]}),i.jsx("div",{className:"memory-item-preview",children:(()=>{const j=Ua(v.value);return j.slice(0,100)+(j.length>100?"...":"")})()})]},p))}),i.jsx("div",{className:"memory-detail",children:y?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"detail-header",children:[i.jsx(df,{size:18}),i.jsx("h3",{children:n})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsxs("div",{className:"meta-left",children:[i.jsx($n,{size:14}),i.jsxs("span",{children:["Stored: ",g(y.timestamp)]})]}),i.jsxs("button",{className:`copy-btn ${c?"copied":""}`,onClick:k,children:[c?i.jsx(A0,{size:14}):i.jsx(L0,{size:14}),i.jsx("span",{children:c?"Copied":"Copy"})]})]}),i.jsx("div",{className:"detail-content",children:N(y.value)})]}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(Ge,{size:48}),i.jsx("p",{children:"Select a memory to view its contents"})]})})]})]})},B2=()=>{var x;const[e,t]=w.useState({patterns:[],stats:{totalPatterns:0,totalFiles:0,byType:{}}}),[n,s]=w.useState(null),[r,o]=w.useState(""),[a,l]=w.useState("all"),[c,u]=w.useState(!0),[d,f]=w.useState(!1),[h,y]=w.useState([]),[g,k]=w.useState(!1),N=async()=>{u(!0);try{const C=await(await fetch("/api/index-stats")).json();t(C)}catch(S){console.error("Failed to fetch pattern index:",S)}finally{u(!1)}};w.useEffect(()=>{N()},[]),w.useEffect(()=>{if(!d||r.length<3){y([]);return}const S=setTimeout(async()=>{k(!0);try{const T=await(await fetch(`/api/index-search?q=${encodeURIComponent(r)}`)).json();y(T)}catch(C){console.error("Semantic search failed:",C)}finally{k(!1)}},500);return()=>clearTimeout(S)},[r,d]);const m=d&&r.length>=3?h:e.patterns||[],p=e.stats||{totalPatterns:0,totalFiles:0,byType:{}},v=d&&r.length>=3?m:m.filter(S=>{const C=S.name.toLowerCase().includes(r.toLowerCase())||S.file.toLowerCase().includes(r.toLowerCase()),T=a==="all"||S.type===a;return C&&T}),j=Object.keys(p.byType||{});return i.jsxs("div",{className:"pattern-index",children:[i.jsxs("div",{className:"pattern-header",children:[i.jsxs("div",{className:"pattern-title",children:[i.jsx(fn,{size:24}),i.jsx("h2",{children:"Pattern Index"}),i.jsxs("span",{className:"pattern-count",children:[p.totalPatterns," patterns"]})]}),i.jsxs("div",{className:"pattern-actions",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(tu,{size:16}),i.jsx("input",{type:"text",placeholder:"Search patterns...",value:r,onChange:S=>o(S.target.value)})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(yo,{size:16}),i.jsxs("select",{value:a,onChange:S=>l(S.target.value),children:[i.jsx("option",{value:"all",children:"All Types"}),j.map(S=>i.jsxs("option",{value:S,children:[S," (",p.byType[S],")"]},S))]})]}),i.jsxs("button",{className:`semantic-toggle ${d?"active":""}`,onClick:()=>f(!d),title:"Semantic Search (v2)",children:[i.jsx(uf,{size:16}),i.jsx("span",{children:"AI Search"})]}),i.jsx("button",{className:"refresh-btn",onClick:N,disabled:c,children:i.jsx(Me,{size:16,className:c?"spinning":""})})]})]}),i.jsxs("div",{className:"pattern-stats",children:[i.jsxs("div",{className:"stat-card",children:[i.jsx(ev,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:p.totalPatterns}),i.jsx("span",{className:"stat-label",children:"Total Patterns"})]})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx(Pt,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:p.totalFiles}),i.jsx("span",{className:"stat-label",children:"Files Indexed"})]})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx(uf,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:j.length}),i.jsx("span",{className:"stat-label",children:"Pattern Types"})]})]}),p.indexDurationMs&&i.jsxs("div",{className:"stat-card",children:[i.jsx($n,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsxs("span",{className:"stat-value",children:[p.indexDurationMs,"ms"]}),i.jsx("span",{className:"stat-label",children:"Index Time"})]})]})]}),i.jsxs("div",{className:"pattern-content",children:[i.jsxs("div",{className:"pattern-list",children:[g&&i.jsxs("div",{className:"searching-indicator",children:[i.jsx(Me,{size:14,className:"spinning"}),i.jsx("span",{children:"AI is analyzing your query..."})]}),c?i.jsx("div",{className:"pattern-loading",children:"Loading patterns..."}):v.length===0?i.jsxs("div",{className:"pattern-empty",children:[i.jsx(fn,{size:48}),i.jsx("h3",{children:"No Patterns Indexed"}),i.jsxs("p",{children:["Run ",i.jsx("code",{children:"rigour index"})," to scan your codebase."]})]}):v.map(S=>i.jsxs("div",{className:`pattern-item ${(n==null?void 0:n.id)===S.id?"active":""}`,onClick:()=>s(S),children:[S.similarity&&i.jsxs("div",{className:"similarity-badge",children:[(S.similarity*100).toFixed(0),"% Match"]}),i.jsxs("div",{className:"pattern-item-header",children:[i.jsx("span",{className:"pattern-type-badge",children:S.type}),i.jsx("span",{className:"pattern-name",children:S.name}),i.jsx(vn,{size:14,className:"chevron"})]}),i.jsxs("div",{className:"pattern-item-file",children:[i.jsx(Pt,{size:12}),i.jsxs("span",{children:[S.file,":",S.line]})]}),S.exported&&i.jsx("span",{className:"exported-badge",children:"exported"})]},S.id))]}),i.jsx("div",{className:"pattern-detail",children:n?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"detail-header",children:[i.jsx("span",{className:"pattern-type-badge large",children:n.type}),i.jsx("h3",{children:n.name})]}),i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Location"}),i.jsxs("code",{children:[n.file,":",n.line,"-",n.endLine]})]}),n.signature&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Signature"}),i.jsx("pre",{children:n.signature})]}),n.description&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Description"}),i.jsx("p",{children:n.description})]}),((x=n.keywords)==null?void 0:x.length)>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Keywords"}),i.jsx("div",{className:"keywords-list",children:n.keywords.map((S,C)=>i.jsx("span",{className:"keyword-tag",children:S},C))})]}),i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Usage"}),i.jsxs("p",{children:["Imported in ",i.jsx("strong",{children:n.usageCount})," files"]})]})]}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(fn,{size:48}),i.jsx("p",{children:"Select a pattern to view details"})]})})]})]})},U2=()=>{var y,g,k,N,m;const[e,t]=w.useState(null),[n,s]=w.useState(""),[r,o]=w.useState(null),[a,l]=w.useState(!0),[c,u]=w.useState("visual"),d=async()=>{l(!0);try{const v=await(await fetch("/api/config")).text();s(v);const j=f(v);t(j)}catch(p){console.error("Failed to fetch config:",p)}try{const p=await fetch("/api/report-stats");if(p.ok){const v=await p.json();o(v)}}catch{}l(!1)},f=p=>{var v;try{const j=p.split(`
|
|
397
|
+
`),x={};let S=null,C=null;for(const T of j){if(T.startsWith("#")||!T.trim())continue;const R=T.search(/\S/),P=T.trim();if(R===0&&P.includes(":")){const[$]=P.split(":");S=$.trim(),C=null;const O=(v=P.split(":")[1])==null?void 0:v.trim();O&&O!=="{}"&&O!=="[]"?x[S]=isNaN(Number(O))?O:Number(O):x[S]={}}else if(R===2&&S&&P.includes(":")){const[$]=P.split(":");C=$.trim();const O=P.split(":").slice(1).join(":").trim();if(O&&O!=="{}"&&O!=="[]"){typeof x[S]!="object"&&(x[S]={});const Q=O==="true"?!0:O==="false"?!1:isNaN(Number(O))?O:Number(O);x[S][C]=Q}else typeof x[S]!="object"&&(x[S]={}),x[S][C]={}}else if(R===4&&S&&C&&P.includes(":")){const[$]=P.split(":"),O=P.split(":").slice(1).join(":").trim();typeof x[S][C]!="object"&&(x[S][C]={});const Q=O==="true"?!0:O==="false"?!1:isNaN(Number(O))?O:Number(O);x[S][C][$.trim()]=Q}}return x}catch{return{}}};w.useEffect(()=>{d()},[]);const h=(e==null?void 0:e.gates)||{};return i.jsxs("div",{className:"quality-gates",children:[i.jsxs("div",{className:"gates-header",children:[i.jsxs("div",{className:"gates-title",children:[i.jsx(ws,{size:24}),i.jsx("h2",{children:"Quality Gates"}),(e==null?void 0:e.preset)&&i.jsx("span",{className:"preset-badge",children:e.preset})]}),i.jsxs("div",{className:"gates-actions",children:[i.jsxs("div",{className:"view-toggle",children:[i.jsxs("button",{className:c==="visual"?"active":"",onClick:()=>u("visual"),children:[i.jsx(fn,{size:16})," Visual"]}),i.jsxs("button",{className:c==="raw"?"active":"",onClick:()=>u("raw"),children:[i.jsx(Pt,{size:16})," YAML"]})]}),i.jsx("button",{className:"refresh-btn",onClick:d,disabled:a,children:i.jsx(Me,{size:16,className:a?"spinning":""})})]})]}),a?i.jsx("div",{className:"gates-loading",children:"Loading configuration..."}):c==="raw"?i.jsx("div",{className:"gates-raw",children:i.jsx("pre",{children:n})}):i.jsxs("div",{className:"gates-content",children:[i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Pt,{size:18}),i.jsx("h3",{children:"Code Quality"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Max File Lines",value:h.max_file_lines,icon:i.jsx(Pt,{size:16})}),i.jsx(J,{label:"Forbid TODOs",value:h.forbid_todos,icon:h.forbid_todos?i.jsx(Rs,{size:16}):i.jsx(ft,{size:16})}),i.jsx(J,{label:"Forbid FIXMEs",value:h.forbid_fixme,icon:h.forbid_fixme?i.jsx(Rs,{size:16}):i.jsx(ft,{size:16})})]})]}),h.ast&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(I0,{size:18}),i.jsx("h3",{children:"AST Limits"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Complexity",value:h.ast.complexity}),i.jsx(J,{label:"Max Methods",value:h.ast.max_methods}),i.jsx(J,{label:"Max Params",value:h.ast.max_params}),i.jsx(J,{label:"Max Nesting",value:h.ast.max_nesting}),i.jsx(J,{label:"Max Function Lines",value:h.ast.max_function_lines}),i.jsx(J,{label:"Max Inheritance",value:h.ast.max_inheritance_depth})]})]}),h.safety&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Jc,{size:18}),i.jsx("h3",{children:"File Guard"})]}),i.jsx("div",{className:"gate-grid",children:i.jsx(J,{label:"Max Files/Cycle",value:h.safety.max_files_changed_per_cycle})}),h.safety.protected_paths&&h.safety.protected_paths.length>0&&i.jsxs("div",{className:"protected-paths",children:[i.jsx("h4",{children:"Protected Paths"}),i.jsx("div",{className:"path-list",children:h.safety.protected_paths.map((p,v)=>i.jsx("span",{className:"path-tag",children:p},v))})]})]}),h.required_files&&h.required_files.length>0&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Ne,{size:18}),i.jsx("h3",{children:"Required Files"})]}),i.jsx("div",{className:"file-list",children:h.required_files.map((p,v)=>i.jsxs("div",{className:"file-item",children:[i.jsx(Pt,{size:14}),i.jsx("span",{children:p})]},v))})]}),h.context&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(nn,{size:18}),i.jsx("h3",{children:"Context Mining"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Enabled",value:h.context.enabled}),i.jsx(J,{label:"Sensitivity",value:h.context.sensitivity}),i.jsx(J,{label:"Mining Depth",value:h.context.mining_depth})]})]}),h.retry_loop_breaker&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx($l,{size:18}),i.jsx("h3",{children:"Retry Loop Breaker"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Enabled",value:h.retry_loop_breaker.enabled}),i.jsx(J,{label:"Max Retries",value:h.retry_loop_breaker.max_retries})]})]}),i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(nn,{size:18}),i.jsx("h3",{children:"AI-Native Gates"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(J,{label:"Duplication Drift",value:((y=h.duplication_drift)==null?void 0:y.enabled)??!0,icon:i.jsx(ft,{size:16})}),i.jsx(J,{label:"Hallucinated Imports",value:((g=h.hallucinated_imports)==null?void 0:g.enabled)??!0,icon:i.jsx(Ne,{size:16})}),i.jsx(J,{label:"Error Handling",value:((k=h.inconsistent_error_handling)==null?void 0:k.enabled)??!0,icon:i.jsx(ws,{size:16})}),i.jsx(J,{label:"Context Artifacts",value:((N=h.context_window_artifacts)==null?void 0:N.enabled)??!0,icon:i.jsx(fn,{size:16})}),i.jsx(J,{label:"Async Safety",value:((m=h.promise_safety)==null?void 0:m.enabled)??!0,icon:i.jsx(nn,{size:16})})]})]}),r&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(ws,{size:18}),i.jsx("h3",{children:"Latest Scores"})]}),i.jsxs("div",{className:"gate-grid",children:[r.score!==void 0&&i.jsx(J,{label:"Overall Score",value:`${r.score}/100`}),r.ai_health_score!==void 0&&i.jsx(J,{label:"AI Health",value:`${r.ai_health_score}/100`,icon:i.jsx(nn,{size:16})}),r.structural_score!==void 0&&i.jsx(J,{label:"Structural",value:`${r.structural_score}/100`,icon:i.jsx(fn,{size:16})})]}),r.severity_breakdown&&i.jsxs("div",{className:"severity-breakdown",children:[i.jsx("h4",{children:"Severity Breakdown"}),i.jsx("div",{className:"gate-grid",children:Object.entries(r.severity_breakdown).filter(([,p])=>p>0).map(([p,v])=>i.jsx(J,{label:p.charAt(0).toUpperCase()+p.slice(1),value:v},p))})]}),r.provenance_breakdown&&i.jsxs("div",{className:"provenance-breakdown",children:[i.jsx("h4",{children:"Provenance Breakdown"}),i.jsx("div",{className:"gate-grid",children:Object.entries(r.provenance_breakdown).filter(([,p])=>p>0).map(([p,v])=>i.jsx(J,{label:p,value:v},p))})]})]})]})]})},J=({label:e,value:t,icon:n})=>{const s=typeof t=="boolean"?t?"Yes":"No":t??"N/A";return i.jsxs("div",{className:"gate-card",children:[n&&i.jsx("div",{className:"gate-icon",children:n}),i.jsxs("div",{className:"gate-info",children:[i.jsx("span",{className:"gate-value",children:s}),i.jsx("span",{className:"gate-label",children:e})]})]})},H2=({logs:e,onClearLogs:t,onSelectLog:n,selectedLog:s})=>{const[r,o]=w.useState(""),[a,l]=w.useState("all"),[c,u]=w.useState("all"),[d,f]=w.useState("all"),h=oe.useMemo(()=>{const m={};return e.forEach(p=>{const v=p.requestId||p.id;m[v]?m[v]={...m[v],...p}:m[v]={...p}}),Object.values(m).sort((p,v)=>new Date(v.timestamp).getTime()-new Date(p.timestamp).getTime())},[e]),y=oe.useMemo(()=>{const m=new Set;return h.forEach(p=>p.tool&&m.add(p.tool)),Array.from(m)},[h]),g=oe.useMemo(()=>h.filter(m=>{var C;const p=!r||((C=m.tool)==null?void 0:C.toLowerCase().includes(r.toLowerCase()))||JSON.stringify(m.arguments||{}).toLowerCase().includes(r.toLowerCase()),v=a==="all"||m.status===a,j=c==="all"||m.tool===c,x=m.decision||m.firewallDecision||(m.type==="firewall_deny"?"deny":void 0);return p&&v&&j&&(d==="all"||x===d)}),[h,r,a,c,d]),k=oe.useMemo(()=>({total:h.length,success:h.filter(m=>m.status==="success").length,error:h.filter(m=>m.status==="error").length,pending:h.filter(m=>!m.status||m.status==="pending").length}),[h]),N=()=>{const m=JSON.stringify(g,null,2),p=new Blob([m],{type:"application/json"}),v=URL.createObjectURL(p),j=document.createElement("a");j.href=v,j.download=`rigour-audit-${new Date().toISOString().split("T")[0]}.json`,j.click()};return i.jsxs("div",{className:"audit-log",children:[i.jsxs("div",{className:"audit-header",children:[i.jsxs("div",{className:"audit-title",children:[i.jsx(Ze,{size:24}),i.jsx("h2",{children:"Audit Trail"}),i.jsxs("span",{className:"log-count",children:[g.length," events"]})]}),i.jsxs("div",{className:"audit-actions",children:[i.jsxs("button",{className:"btn-secondary",onClick:t,children:[i.jsx(nv,{size:16})," Clear"]}),i.jsxs("button",{className:"btn-primary",onClick:N,children:[i.jsx(z0,{size:16})," Export"]})]})]}),i.jsxs("div",{className:"audit-stats",children:[i.jsxs("div",{className:"stat-pill",children:[i.jsx(Ze,{size:14}),i.jsxs("span",{children:[k.total," Total"]})]}),i.jsxs("div",{className:"stat-pill success",children:[i.jsx(ft,{size:14}),i.jsxs("span",{children:[k.success," Success"]})]}),i.jsxs("div",{className:"stat-pill error",children:[i.jsx(Rs,{size:14}),i.jsxs("span",{children:[k.error," Failed"]})]}),i.jsxs("div",{className:"stat-pill pending",children:[i.jsx(Ne,{size:14}),i.jsxs("span",{children:[k.pending," Pending"]})]})]}),i.jsxs("div",{className:"audit-filters",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(tu,{size:16}),i.jsx("input",{type:"text",placeholder:"Search logs...",value:r,onChange:m=>o(m.target.value)})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(yo,{size:16}),i.jsxs("select",{value:a,onChange:m=>l(m.target.value),children:[i.jsx("option",{value:"all",children:"All Status"}),i.jsx("option",{value:"success",children:"Success"}),i.jsx("option",{value:"error",children:"Error"}),i.jsx("option",{value:"pending",children:"Pending"})]})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(Bl,{size:16}),i.jsxs("select",{value:c,onChange:m=>u(m.target.value),children:[i.jsx("option",{value:"all",children:"All Tools"}),y.map(m=>i.jsx("option",{value:m,children:m},m))]})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(yo,{size:16}),i.jsxs("select",{value:d,onChange:m=>f(m.target.value),children:[i.jsx("option",{value:"all",children:"All Decisions"}),i.jsx("option",{value:"allow",children:"allow"}),i.jsx("option",{value:"deny",children:"deny"}),i.jsx("option",{value:"timeout-deny",children:"timeout-deny"}),i.jsx("option",{value:"scope-violation",children:"scope-violation"}),i.jsx("option",{value:"approve",children:"approve"}),i.jsx("option",{value:"reject",children:"reject"})]})]})]}),i.jsxs("div",{className:"audit-content",children:[i.jsx("div",{className:"log-list",children:g.length===0?i.jsxs("div",{className:"empty-state",children:[i.jsx(Bl,{size:48}),i.jsx("h3",{children:"No Interactions Detected"}),i.jsx("p",{children:"Rigour tool calls will appear here in real-time."})]}):g.map(m=>i.jsxs("div",{className:`log-entry ${(s==null?void 0:s.id)===m.id?"active":""} ${m._rigour_report?"has-report":""}`,onClick:()=>n((s==null?void 0:s.id)===m.id?null:m),children:[i.jsxs("div",{className:"log-header",children:[i.jsx("span",{className:`status-dot ${m.status||"pending"}`}),i.jsx("span",{className:"log-tool",children:m.tool}),i.jsxs("span",{className:"log-time",children:[i.jsx($n,{size:12}),new Date(m.timestamp).toLocaleTimeString()]}),m._rigour_report&&i.jsxs("span",{className:"report-badge",children:[i.jsx(b0,{size:12})," Report"]}),m.arbitrated&&i.jsx("span",{className:`arbitrated-badge ${m.decision}`,children:m.decision==="approve"?"Approved":"Rejected"}),i.jsx(vn,{size:14,className:"chevron"})]}),m.requestId&&i.jsxs("div",{className:"log-request-id",children:["ID: ",m.requestId.slice(0,12),"..."]})]},m.id))}),i.jsx("div",{className:"log-detail",children:s?i.jsx(W2,{log:s,onClose:()=>n(null)}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(Pt,{size:48}),i.jsx("p",{children:"Select a log entry to view details"})]})})]})]})},W2=({log:e,onClose:t})=>{var o,a,l,c,u,d,f;const n=!!e._rigour_report||["rigour_checkpoint","rigour_agent_register","rigour_handoff"].includes(e.tool),[s,r]=w.useState(n?"report":"args");return i.jsxs("div",{className:"log-detail-view",children:[i.jsxs("div",{className:"detail-header",children:[i.jsxs("div",{className:"detail-info",children:[i.jsxs("span",{className:`status-badge ${e.status||"pending"}`,children:[e.status==="success"?i.jsx(ft,{size:14}):e.status==="error"?i.jsx(Rs,{size:14}):i.jsx(Ne,{size:14}),e.status||"pending"]}),i.jsx("h3",{children:e.tool})]}),i.jsx("button",{className:"close-btn",onClick:t,children:i.jsx(xo,{size:18})})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsxs("div",{className:"meta-item",children:[i.jsx("span",{className:"meta-label",children:"Timestamp"}),i.jsx("span",{className:"meta-value",children:new Date(e.timestamp).toLocaleString()})]}),e.requestId&&i.jsxs("div",{className:"meta-item",children:[i.jsx("span",{className:"meta-label",children:"Request ID"}),i.jsx("span",{className:"meta-value mono",children:e.requestId})]})]}),n&&i.jsxs("div",{className:"detail-tabs",children:[i.jsx("button",{className:s==="report"?"active":"",onClick:()=>r("report"),children:e._rigour_report?"Verification Report":"Visualized Content"}),i.jsx("button",{className:s==="args"?"active":"",onClick:()=>r("args"),children:"Technical Arguments"})]}),i.jsx("div",{className:"detail-body",children:s==="args"?i.jsxs(i.Fragment,{children:[e.arguments&&i.jsxs("div",{className:"code-section",children:[i.jsx("h4",{children:"Arguments"}),i.jsx("pre",{children:JSON.stringify(e.arguments,null,2)})]}),e.error&&i.jsxs("div",{className:"error-section",children:[i.jsx("h4",{children:"Error"}),i.jsx("div",{className:"error-message",children:e.error})]})]}):i.jsx("div",{className:"verification-view",children:e.tool==="rigour_checkpoint"?i.jsxs("div",{className:"checkpoint-viz",children:[i.jsxs("div",{className:"viz-stats",children:[i.jsxs("div",{className:"viz-stat",children:[i.jsx("span",{className:"label",children:"Progress"}),i.jsxs("span",{className:"value",children:[((o=e.arguments)==null?void 0:o.progressPct)??0,"%"]})]}),i.jsxs("div",{className:"viz-stat",children:[i.jsx("span",{className:"label",children:"Quality"}),i.jsxs("span",{className:"value",style:{color:(((a=e.arguments)==null?void 0:a.qualityScore)??0)>=80?"#34d399":"#f87171"},children:[((l=e.arguments)==null?void 0:l.qualityScore)??0,"%"]})]})]}),i.jsxs("div",{className:"viz-summary",children:[i.jsx("h4",{children:"Summary of Work"}),i.jsx("p",{children:((c=e.arguments)==null?void 0:c.summary)||"No summary provided."})]}),((u=e.arguments)==null?void 0:u.filesChanged)&&e.arguments.filesChanged.length>0&&i.jsxs("div",{className:"viz-files",children:[i.jsx("h4",{children:"Files Changed"}),i.jsx("div",{className:"file-badges",children:e.arguments.filesChanged.map(h=>i.jsx("span",{className:"file-badge",children:h},h))})]})]}):e.tool==="rigour_agent_register"?i.jsxs("div",{className:"agent-viz",children:[i.jsx(Ze,{size:32,className:"viz-icon"}),i.jsx("h3",{children:"Agent Scope Claims"}),i.jsxs("div",{className:"scope-box",children:[i.jsx("h4",{children:"Claimed Scope:"}),i.jsx("div",{className:"scope-list",children:(f=(d=e.arguments)==null?void 0:d.taskScope)==null?void 0:f.map(h=>i.jsx("code",{children:h},h))})]})]}):i.jsxs("div",{className:"code-section",children:[i.jsx("h4",{children:"Rigour Report"}),i.jsx("pre",{children:JSON.stringify(e._rigour_report,null,2)})]})})})]})};function zh(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))?e:new Date().toISOString()}function K2(e){const t=e&&typeof e=="object"?e:{},n=Array.isArray(t.warnings)?t.warnings.filter(l=>typeof l=="string"):[];t.dataQuality==="degraded"&&n.length===0&&n.push("Session contains incomplete legacy data.");const r=(Array.isArray(t.agents)?t.agents:[]).map((l,c)=>{const u=l&&typeof l=="object"?l:{},d=typeof u.agentId=="string"&&u.agentId.trim()?u.agentId:`unknown-agent-${c+1}`,h=new Set(["active","idle","completed"]).has(String(u.status))?u.status:"unknown";return(h==="unknown"||d.startsWith("unknown-agent"))&&n.push(`Agent ${c+1} has incomplete legacy data.`),{agentId:d,taskScope:Array.isArray(u.taskScope)?u.taskScope.filter(y=>typeof y=="string"):[],registeredAt:zh(u.registeredAt),lastCheckpoint:typeof u.lastCheckpoint=="string"&&!Number.isNaN(Date.parse(u.lastCheckpoint))?u.lastCheckpoint:void 0,status:h}}),a=new Set(["active","completed","aborted","inactive"]).has(String(t.status))?t.status:r.length?"unknown":"inactive";return r.length&&a==="unknown"&&n.push("Session status was missing or invalid."),{sessionId:typeof t.sessionId=="string"&&t.sessionId?t.sessionId:"unknown-session",agents:r,status:a,createdAt:zh(t.createdAt),derived:!!t.derived,warnings:n}}function X(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:0}function G2(e,t){return e?t?{guidanceCount:X(e.guidanceCount)+X(t.guidanceCount),knowledgeItems:X(e.knowledgeItems)+X(t.knowledgeItems),candidateTokens:X(e.candidateTokens)+X(t.candidateTokens),returnedTokens:X(e.returnedTokens)+X(t.returnedTokens),avoidedTokens:X(e.avoidedTokens)+X(t.avoidedTokens),candidateFiles:X(e.candidateFiles)+X(t.candidateFiles),returnedFiles:X(e.returnedFiles)+X(t.returnedFiles),excludedFiles:X(e.excludedFiles)+X(t.excludedFiles),cacheHits:X(e.cacheHits)+X(t.cacheHits),recommendations:[...new Set([...e.recommendations??[],...t.recommendations??[]])]}:e:t}function q2(e,t){return!e||!t?!1:e===t?!0:e.startsWith("task:")||t.startsWith("task:")?e===t:((s,r)=>s===r||s.startsWith(`${r}/`)||r.startsWith(`${s}/`))(e,t)}function Ha(e){return e.startsWith("CTP-")?e.replace(/-task$/,""):e.length>28?`${e.slice(0,12)}…${e.slice(-8)}`:e}function Q2({session:e}){const t=K2(e),[n,s]=oe.useState("live"),[r,o]=oe.useState({runs:[],events:[],hasMore:!1}),[a,l]=oe.useState(""),[c,u]=oe.useState(!0),d=oe.useCallback(async g=>{g||u(!0),l("");try{const k=await fetch(`/api/agent-history?limit=500${g?`&before=${g}`:""}`),N=await k.json();if(!k.ok||N.error)throw new Error(N.error||`HTTP ${k.status}`);o(m=>{const p=Array.isArray(N.runs)?N.runs:[];if(!g)return{runs:p,events:Array.isArray(N.events)?N.events:[],hasMore:!!N.hasMore,nextBefore:N.nextBefore};const v=new Map(m.runs.map(j=>[j.id,j]));for(const j of p){const x=v.get(j.id);v.set(j.id,x?{...x,startedAt:Date.parse(j.startedAt)<Date.parse(x.startedAt)?j.startedAt:x.startedAt,eventCount:x.eventCount+j.eventCount,files:[...new Set([...x.files,...j.files])],tools:[...new Set([...x.tools,...j.tools])],impact:G2(x.impact,j.impact)}:j)}return{runs:[...v.values()].sort((j,x)=>Date.parse(x.endedAt)-Date.parse(j.endedAt)),events:[...m.events,...Array.isArray(N.events)?N.events:[]],hasMore:!!N.hasMore,nextBefore:N.nextBefore}})}catch(k){l(k instanceof Error?k.message:String(k))}finally{u(!1)}},[]);oe.useEffect(()=>{d()},[d]);const f=t.derived||t.status==="completed",h=g=>{switch(g){case"active":return i.jsx(Ui,{size:10,fill:"#34d399",stroke:"#34d399"});case"idle":return i.jsx(Ui,{size:10,fill:"#fbbf24",stroke:"#fbbf24"});case"completed":return i.jsx(ft,{size:14,color:"#34d399"});default:return i.jsx(Ui,{size:10})}},y=(g,k)=>f||g.status==="completed"?!1:k.filter(m=>m.agentId!==g.agentId&&m.status!=="completed").some(m=>g.taskScope.some(p=>m.taskScope.some(v=>q2(p,v))));return i.jsxs("div",{className:"agent-teams",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(tn,{size:18}),i.jsx("span",{children:"Agent Team Session"})]}),i.jsx("div",{className:`session-status ${t.status}`,children:t.status.toUpperCase()})]}),i.jsxs("div",{className:"agent-view-tabs",role:"tablist","aria-label":"Agent activity views",children:[["live","runs","timeline"].map(g=>i.jsx("button",{type:"button",role:"tab","aria-selected":n===g,className:n===g?"active":"",onClick:()=>s(g),children:g==="live"?"Live team":g==="runs"?`Run history (${r.runs.length})`:`Event timeline (${r.events.length})`},g)),r.hasMore&&i.jsx("button",{type:"button",className:"history-load",onClick:()=>void d(r.nextBefore),disabled:!r.nextBefore,children:"Load older"})]}),n!=="live"&&c&&i.jsx("div",{className:"agent-history-state",children:"Loading retained agent history…"}),n!=="live"&&a&&i.jsxs("div",{className:"agent-history-state error",role:"alert",children:["History unavailable: ",a,i.jsx("button",{type:"button",onClick:()=>void d(),children:"Retry"})]}),n==="runs"&&!c&&!a&&(r.runs.length?i.jsx("div",{className:"agent-run-list",children:r.runs.map(g=>{var k,N,m,p,v,j,x,S,C,T,R,P,$;return i.jsxs("article",{className:"agent-run-row glass-card",children:[i.jsxs("div",{children:[i.jsx("strong",{children:Ha(g.agentId)}),i.jsx("span",{children:g.taskId||g.id})]}),i.jsx("span",{className:`run-outcome ${g.status}`,children:g.status}),i.jsxs("div",{children:[i.jsx("strong",{children:g.eventCount}),i.jsx("span",{children:"events"})]}),i.jsxs("div",{children:[i.jsx("strong",{children:g.files.length}),i.jsx("span",{children:"files"})]}),i.jsxs("div",{className:"run-time",children:[i.jsx("strong",{children:new Date(g.endedAt).toLocaleString()}),i.jsx("span",{children:g.tools.slice(0,3).join(", ")||"No tool recorded"})]}),X((k=g.impact)==null?void 0:k.guidanceCount)>0&&i.jsxs("details",{className:"impact-receipt",children:[i.jsxs("summary",{children:[i.jsx(H0,{size:14}),i.jsx("strong",{children:"Rigour impact"}),i.jsxs("span",{children:[X((N=g.impact)==null?void 0:N.guidanceCount)," advice · ",X((m=g.impact)==null?void 0:m.avoidedTokens).toLocaleString()," tokens avoided"]})]}),i.jsxs("div",{className:"impact-receipt-body",children:[i.jsx("p",{children:((v=(p=g.impact)==null?void 0:p.recommendations)==null?void 0:v[0])||"Rigour supplied evidence-backed guidance during this run."}),i.jsxs("dl",{children:[i.jsxs("div",{children:[i.jsxs("dt",{children:[i.jsx(Hn,{size:13}),"Knowledge reused"]}),i.jsxs("dd",{children:[X((j=g.impact)==null?void 0:j.knowledgeItems)," items"]})]}),i.jsxs("div",{children:[i.jsxs("dt",{children:[i.jsx(Ds,{size:13}),"Context scope"]}),i.jsxs("dd",{children:[X((x=g.impact)==null?void 0:x.returnedFiles)," selected · ",X((S=g.impact)==null?void 0:S.excludedFiles)," excluded"]})]}),i.jsxs("div",{children:[i.jsxs("dt",{children:[i.jsx(F0,{size:13}),"Token impact"]}),i.jsxs("dd",{children:[X((C=g.impact)==null?void 0:C.avoidedTokens).toLocaleString()," avoided · measured estimate"]})]}),i.jsxs("div",{children:[i.jsxs("dt",{children:[i.jsx(ft,{size:13}),"Cache reuse"]}),i.jsxs("dd",{children:[X((T=g.impact)==null?void 0:T.cacheHits)," hits"]})]})]}),(((P=(R=g.impact)==null?void 0:R.recommendations)==null?void 0:P.length)??0)>1&&i.jsx("ul",{children:($=g.impact)==null?void 0:$.recommendations.slice(1,4).map(O=>i.jsx("li",{children:O},O))})]})]})]},g.id)})}):i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(tn,{size:40}),i.jsx("h3",{children:"No retained runs yet"}),i.jsx("p",{children:"Runs appear as agents emit tool, checkpoint, verification and handoff events."})]})),n==="timeline"&&!c&&!a&&(r.events.length?i.jsx("ol",{className:"agent-event-timeline",children:r.events.map(g=>{var k,N;return i.jsxs("li",{children:[i.jsx("span",{className:`timeline-marker ${g.outcome}`}),i.jsx("time",{children:new Date(g.timestamp).toLocaleString()}),i.jsxs("div",{children:[i.jsxs("strong",{children:[g.tool||g.type,(k=g.guidance)!=null&&k.recommendation?" · Advice issued":""]}),i.jsxs("span",{children:[Ha(g.agentId)," · ",((N=g.guidance)==null?void 0:N.recommendation)||g.summary]})]}),i.jsx("span",{className:`run-outcome ${g.outcome}`,children:g.outcome})]},`${g.id}-${g.timestamp}`)})}):i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(tn,{size:40}),i.jsx("h3",{children:"No historical events"}),i.jsx("p",{children:"Rigour will retain normal agent activity without requiring deep analysis."})]})),n==="live"&&t.agents.length===0&&i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(tn,{size:48}),i.jsx("h3",{children:"No Active Agent Team"}),i.jsx("p",{children:"There is no live team now. Previous activity remains available in Run history and Event timeline."}),i.jsx("div",{className:"hint-box",children:i.jsxs("span",{children:["Register agents with ",i.jsx("code",{children:"rigour_agent_register"}),". Claimed scopes are enforced per bound agent."]})})]}),n==="live"&&t.warnings.length>0&&i.jsxs("div",{className:"overview-banner warn",role:"alert",children:[i.jsx(Ne,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"Some team data is incomplete"}),i.jsx("p",{children:t.warnings.join(" ")})]})]}),n==="live"&&t.agents.length>0&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"session-info",children:[i.jsx("span",{className:"session-id",children:t.sessionId}),i.jsxs("span",{className:"agent-count",children:[t.agents.length," agents"]}),t.derived&&i.jsx("span",{className:"meta-chip",children:"Historical (derived)"})]}),i.jsx("div",{className:"agents-grid",children:t.agents.map(g=>{const k=y(g,t.agents);return i.jsxs("div",{className:`agent-card glass-card ${g.status} ${k?"has-conflict":""}`,children:[i.jsxs("div",{className:"agent-header",children:[i.jsxs("div",{className:"agent-id",children:[h(g.status),i.jsx("span",{title:g.agentId,children:Ha(g.agentId)})]}),k&&i.jsxs("div",{className:"conflict-badge",children:[i.jsx(Ne,{size:12}),i.jsx("span",{children:"Scope Conflict"})]})]}),i.jsxs("div",{className:"task-scope",children:[i.jsx("h4",{children:"Enforced scope"}),i.jsx("ul",{children:g.taskScope.map((N,m)=>i.jsxs("li",{children:[i.jsx(Ds,{size:12}),i.jsx("code",{children:N})]},m))})]}),i.jsxs("div",{className:"agent-meta",children:[i.jsxs("span",{children:["Registered: ",new Date(g.registeredAt).toLocaleTimeString()]}),g.lastCheckpoint&&i.jsxs("span",{children:["Last checkpoint: ",new Date(g.lastCheckpoint).toLocaleTimeString()]})]}),i.jsx("div",{className:"mono dim agent-raw-id",children:g.agentId})]},g.agentId)})})]})]})}function Y2({checkpoints:e}){if(!e||e.length===0)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx($r,{size:48}),i.jsx("h3",{children:"No Checkpoints Yet"}),i.jsxs("p",{children:["Checkpoints compress agent state for verified handoffs. Call ",i.jsx("code",{children:"rigour_checkpoint"})," before",i.jsx("code",{children:" rigour_handoff"}),". Quality below 80% should pause the loop."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Default interval: 15 minutes"})})]});const t=r=>r>=80?"#34d399":r>=60?"#fbbf24":"#f87171",n=r=>{if(r===0)return null;const o=e[r-1].qualityScore,a=e[r].qualityScore;return a>o+5?i.jsx(rv,{size:14,color:"#34d399"}):a<o-5?i.jsx(sv,{size:14,color:"#f87171"}):null},s=e.some((r,o)=>{if(o<2)return!1;const a=e.slice(Math.max(0,o-2),o),l=a.reduce((c,u)=>c+u.qualityScore,0)/a.length;return r.qualityScore<l-10});return i.jsxs("div",{className:"checkpoint-timeline",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx($r,{size:18}),i.jsx("span",{children:"Checkpoint Timeline"})]}),i.jsxs("div",{className:"drift-visualization",children:[i.jsxs("svg",{width:"120",height:"30",viewBox:"0 0 120 30",className:"drift-sparkline",children:[i.jsx("path",{d:`M ${e.map((r,o)=>`${o/(e.length-1||1)*120} ${30-r.qualityScore/100*30}`).join(" L ")}`,fill:"none",stroke:"var(--accent-primary)",strokeWidth:"2",strokeLinecap:"round"}),e.map((r,o)=>i.jsx("circle",{cx:o/(e.length-1||1)*120,cy:30-r.qualityScore/100*30,r:"2",fill:t(r.qualityScore)},o))]}),i.jsx("span",{className:"drift-label",children:"Session Stability"})]}),s&&i.jsxs("div",{className:"drift-alert",children:[i.jsx(Ne,{size:14}),i.jsx("span",{children:"Drift Detected — quality dropped vs recent average"})]})]}),i.jsxs("div",{className:"timeline-container",children:[i.jsx("div",{className:"timeline-line"}),e.map((r,o)=>{var a;return i.jsxs("div",{className:`checkpoint-entry glass-card ${r.warnings.length>0||r.qualityScore<80?"has-warnings":""}`,children:[i.jsxs("div",{className:"checkpoint-marker",children:[i.jsx("div",{className:"marker-dot",style:{backgroundColor:t(r.qualityScore)}}),r.qualityScore<80&&i.jsx("div",{className:"marker-ring warn","aria-hidden":"true"})]}),i.jsxs("div",{className:"checkpoint-content",children:[i.jsxs("div",{className:"checkpoint-header",children:[i.jsx("span",{className:"checkpoint-summary-lead",children:((a=r.summary)==null?void 0:a.slice(0,80))||r.checkpointId}),i.jsx("span",{className:"checkpoint-time",children:new Date(r.timestamp).toLocaleTimeString()})]}),i.jsx("div",{className:"mono dim checkpoint-id",children:r.checkpointId}),r.qualityScore<80&&i.jsxs("div",{className:"warning-item",children:[i.jsx(Ne,{size:12}),i.jsx("span",{children:"Below threshold — pause handoffs until quality recovers"})]}),i.jsxs("div",{className:"checkpoint-stats",children:[i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Progress"}),i.jsx("div",{className:"progress-bar",children:i.jsx("div",{className:"progress-fill",style:{width:`${r.progressPct}%`}})}),i.jsxs("span",{className:"value",children:[r.progressPct,"%"]})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Quality"}),i.jsxs("span",{className:"value score",style:{color:t(r.qualityScore)},children:[r.qualityScore,"%",n(o)]})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Agent"}),i.jsx("span",{className:"value agent-id",children:r.agentId})]})]}),i.jsx("div",{className:"checkpoint-summary",children:i.jsx("p",{children:r.summary})}),r.filesChanged.length>0&&i.jsx("div",{className:"files-changed",children:i.jsxs("span",{className:"count",children:[r.filesChanged.length," files changed"]})}),r.warnings.length>0&&i.jsx("div",{className:"warnings",children:r.warnings.map((l,c)=>i.jsxs("div",{className:"warning-item",children:[i.jsx(Ne,{size:12}),i.jsx("span",{children:l})]},c))})]})]},r.checkpointId)})]})]})}const Ug={critical:"var(--status-error)",high:"#f97316",medium:"var(--status-warning)",low:"var(--accent-primary)",info:"var(--text-dim)"},X2={srp_violation:"Single Responsibility",ocp_violation:"Open/Closed Principle",lsp_violation:"Liskov Substitution",isp_violation:"Interface Segregation",dip_violation:"Dependency Inversion",god_class:"God Class",god_function:"God Function",long_params:"Long Parameters",complex_conditional:"Complex Conditional",empty_catch:"Empty Catch Block",error_inconsistency:"Error Inconsistency",race_condition:"Race Condition",goroutine_leak:"Goroutine Leak",channel_misuse:"Channel Misuse",mutex_scope:"Mutex Scope",isp_violation_interface:"Interface Bloat",missing_test:"Missing Tests",long_file:"Long File",magic_number:"Magic Numbers",resource_leak:"Resource Leak",dry_violation:"DRY Violation",feature_envy:"Feature Envy",dead_code:"Dead Code",naming_convention:"Naming Convention",performance:"Performance"},bh={"SOLID Principles":["srp_violation","ocp_violation","lsp_violation","isp_violation","dip_violation"],"Code Smells":["god_class","god_function","long_params","complex_conditional","long_file","magic_number","dead_code","feature_envy"],"Error Handling":["empty_catch","error_inconsistency"],Concurrency:["race_condition","goroutine_leak","channel_misuse","mutex_scope"],Testing:["missing_test"],Architecture:["isp_violation_interface","dry_violation","naming_convention","resource_leak"],Performance:["performance"]},Z2=()=>{const[e,t]=w.useState(null),[n,s]=w.useState(!0),[r,o]=w.useState(new Set),[a,l]=w.useState(new Set),[c,u]=w.useState("all"),[d,f]=w.useState(!1),h=async()=>{s(!0);try{const[x,S]=await Promise.all([fetch("/api/report-stats"),fetch("/api/deep-findings")]),C=x.ok?await x.json():{},T=S.ok?await S.json():[];t({...C,findings:T})}catch(x){console.error("Failed to fetch deep analysis data:",x)}s(!1)};w.useEffect(()=>{h()},[]);const y=x=>{o(S=>{const C=new Set(S);return C.has(x)?C.delete(x):C.add(x),C})},g=x=>{l(S=>{const C=new Set(S);return C.has(x)?C.delete(x):C.add(x),C})},k=((e==null?void 0:e.findings)||[]).filter(x=>x.provenance==="deep-analysis"),N=k.filter(x=>!(c!=="all"&&x.severity!==c||d&&!x.verified)),m=Object.entries(bh).map(([x,S])=>{const C=N.filter(T=>S.includes(T.category||""));return{group:x,findings:C}}).filter(x=>x.findings.length>0),p=Object.values(bh).flat(),v=N.filter(x=>!p.includes(x.category||"")),j=e==null?void 0:e.deep;return i.jsxs("div",{className:"deep-analysis",children:[i.jsxs("div",{className:"deep-header",children:[i.jsxs("div",{className:"deep-title",children:[i.jsx(Ge,{size:24}),i.jsx("h2",{children:"Deep Analysis"}),(j==null?void 0:j.tier)&&i.jsx("span",{className:"tier-badge",children:j.tier})]}),i.jsx("div",{className:"deep-actions",children:i.jsx("button",{className:"refresh-btn",onClick:h,disabled:n,children:i.jsx(Me,{size:16,className:n?"spinning":""})})})]}),n?i.jsx("div",{className:"deep-loading",children:"Loading deep analysis data..."}):!(j!=null&&j.enabled)&&k.length===0?i.jsxs("div",{className:"deep-empty",children:[i.jsx(Ge,{size:48}),i.jsx("h3",{children:"Deep Analysis Not Yet Run"}),i.jsxs("p",{children:["Run ",i.jsx("code",{children:"rigour check --deep"})," to get LLM-powered code quality analysis with 40+ categories."]}),i.jsxs("div",{className:"empty-features",children:[i.jsxs("div",{className:"feature",children:[i.jsx(ws,{size:16})," SOLID Principles"]}),i.jsxs("div",{className:"feature",children:[i.jsx(fn,{size:16})," Design Patterns"]}),i.jsxs("div",{className:"feature",children:[i.jsx(nn,{size:16})," Concurrency Safety"]}),i.jsxs("div",{className:"feature",children:[i.jsx(X0,{size:16})," Architecture Quality"]})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"deep-stats-banner",children:[i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(j==null?void 0:j.findings_count)??k.length}),i.jsx("span",{className:"stat-label",children:"Findings"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(j==null?void 0:j.findings_verified)??k.filter(x=>x.verified).length}),i.jsx("span",{className:"stat-label",children:"Verified"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(j==null?void 0:j.files_analyzed)??"—"}),i.jsx("span",{className:"stat-label",children:"Files Analyzed"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(j==null?void 0:j.model)||"—"}),i.jsx("span",{className:"stat-label",children:"Model"})]}),(j==null?void 0:j.total_ms)&&i.jsxs("div",{className:"stat-card",children:[i.jsxs("span",{className:"stat-value",children:[(j.total_ms/1e3).toFixed(1),"s"]}),i.jsx("span",{className:"stat-label",children:"Inference"})]})]}),((e==null?void 0:e.score)!==void 0||(e==null?void 0:e.code_quality_score)!==void 0)&&i.jsxs("div",{className:"deep-scores",children:[(e==null?void 0:e.score)!==void 0&&i.jsx(Wa,{label:"Overall",score:e.score}),(e==null?void 0:e.ai_health_score)!==void 0&&i.jsx(Wa,{label:"AI Health",score:e.ai_health_score}),(e==null?void 0:e.structural_score)!==void 0&&i.jsx(Wa,{label:"Structural",score:e.structural_score})]}),i.jsxs("div",{className:"deep-filters",children:[i.jsxs("div",{className:"filter-group",children:[i.jsx(yo,{size:14}),i.jsxs("select",{value:c,onChange:x=>u(x.target.value),className:"filter-select",children:[i.jsx("option",{value:"all",children:"All Severities"}),i.jsx("option",{value:"critical",children:"Critical"}),i.jsx("option",{value:"high",children:"High"}),i.jsx("option",{value:"medium",children:"Medium"}),i.jsx("option",{value:"low",children:"Low"})]})]}),i.jsxs("button",{className:`filter-toggle ${d?"active":""}`,onClick:()=>f(!d),children:[i.jsx(ft,{size:14}),"Verified Only"]}),i.jsxs("span",{className:"filter-count",children:[N.length," finding",N.length!==1?"s":""]})]}),i.jsxs("div",{className:"deep-findings",children:[m.map(({group:x,findings:S})=>i.jsxs("div",{className:"finding-group",children:[i.jsxs("button",{className:"group-header",onClick:()=>y(x),children:[r.has(x)?i.jsx(Ms,{size:16}):i.jsx(vn,{size:16}),i.jsx("span",{className:"group-name",children:x}),i.jsx("span",{className:"group-count",children:S.length}),i.jsx("div",{className:"group-severity-dots",children:["critical","high","medium","low"].map(C=>{const T=S.filter(R=>R.severity===C).length;return T>0?i.jsx("span",{className:"sev-dot",style:{backgroundColor:Ug[C]},title:`${T} ${C}`},C):null})})]}),r.has(x)&&i.jsx("div",{className:"group-findings",children:S.map(C=>i.jsx(Vh,{finding:C,expanded:a.has(C.id),onToggle:()=>g(C.id)},C.id))})]},x)),v.length>0&&i.jsxs("div",{className:"finding-group",children:[i.jsxs("button",{className:"group-header",onClick:()=>y("_other"),children:[r.has("_other")?i.jsx(Ms,{size:16}):i.jsx(vn,{size:16}),i.jsx("span",{className:"group-name",children:"Other Findings"}),i.jsx("span",{className:"group-count",children:v.length})]}),r.has("_other")&&i.jsx("div",{className:"group-findings",children:v.map(x=>i.jsx(Vh,{finding:x,expanded:a.has(x.id),onToggle:()=>g(x.id)},x.id))})]}),N.length===0&&i.jsxs("div",{className:"no-findings",children:[i.jsx(ft,{size:32}),i.jsx("p",{children:"No deep analysis findings match the current filters."})]})]})]})]})},Vh=({finding:e,expanded:t,onToggle:n})=>{const s=Ug[e.severity||"info"],r=X2[e.category||""]||e.category||"Unknown";return i.jsxs("div",{className:`finding-card severity-${e.severity||"info"}`,children:[i.jsxs("button",{className:"finding-header",onClick:n,children:[i.jsxs("div",{className:"finding-left",children:[i.jsx("span",{className:"severity-indicator",style:{backgroundColor:s}}),i.jsx("span",{className:"finding-title",children:e.title})]}),i.jsxs("div",{className:"finding-right",children:[i.jsx("span",{className:"category-tag",children:r}),e.verified&&i.jsxs("span",{className:"verified-badge",title:"AST-verified",children:[i.jsx(ft,{size:12})," Verified"]}),e.confidence!==void 0&&i.jsxs("span",{className:"confidence-badge",title:`Confidence: ${(e.confidence*100).toFixed(0)}%`,children:[(e.confidence*100).toFixed(0),"%"]}),i.jsx("span",{className:"severity-badge",style:{color:s},children:e.severity||"info"}),t?i.jsx(Ms,{size:14}):i.jsx(vn,{size:14})]})]}),t&&i.jsxs("div",{className:"finding-body",children:[i.jsx("p",{className:"finding-details",children:e.details}),e.hint&&i.jsxs("div",{className:"finding-hint",children:[i.jsx(nn,{size:14}),i.jsx("span",{children:e.hint})]}),e.files&&e.files.length>0&&i.jsx("div",{className:"finding-files",children:e.files.map((o,a)=>i.jsxs("span",{className:"file-tag",children:[i.jsx(Pt,{size:12}),o,e.line&&`:${e.line}`,e.endLine&&`-${e.endLine}`]},a))}),i.jsx("div",{className:"finding-meta",children:e.source&&i.jsxs("span",{className:"meta-tag",children:["Source: ",e.source]})})]})]})},Wa=({label:e,score:t})=>{const n=2*Math.PI*36,s=n-t/100*n,r=t>=80?"var(--status-success)":t>=60?"var(--status-warning)":"var(--status-error)";return i.jsxs("div",{className:"score-ring",children:[i.jsxs("svg",{width:"88",height:"88",viewBox:"0 0 88 88",children:[i.jsx("circle",{cx:"44",cy:"44",r:"36",fill:"none",stroke:"var(--border-dim)",strokeWidth:"6"}),i.jsx("circle",{cx:"44",cy:"44",r:"36",fill:"none",stroke:r,strokeWidth:"6",strokeDasharray:n,strokeDashoffset:s,strokeLinecap:"round",transform:"rotate(-90 44 44)",style:{transition:"stroke-dashoffset 0.8s ease"}}),i.jsx("text",{x:"44",y:"42",textAnchor:"middle",fill:"var(--text-main)",fontSize:"18",fontWeight:"700",children:t}),i.jsx("text",{x:"44",y:"56",textAnchor:"middle",fill:"var(--text-dim)",fontSize:"9",children:"/100"})]}),i.jsx("span",{className:"score-label",children:e})]})},Hg={improving:{color:"#34d399",icon:rv,label:"Improving"},stable:{color:"var(--accent-primary)",icon:W0,label:"Stable"},degrading:{color:"#f87171",icon:sv,label:"Degrading"}};function Wg({direction:e,zScore:t}){const n=Hg[e],s=n.icon;return i.jsxs("span",{className:"direction-badge",style:{color:n.color,borderColor:n.color},children:[i.jsx(s,{size:14}),i.jsx("span",{children:n.label}),t!==void 0&&i.jsxs("span",{className:"z-score",children:["Z=",t.toFixed(1)]})]})}function Mi({score:e,label:t,size:n=80}){const s=(n-8)/2,r=2*Math.PI*s,o=e/100*r,a=e>=80?"#34d399":e>=60?"#fbbf24":"#f87171";return i.jsxs("div",{className:"score-ring",style:{width:n,height:n+20},children:[i.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,children:[i.jsx("circle",{cx:n/2,cy:n/2,r:s,fill:"none",stroke:"var(--bg-tertiary)",strokeWidth:"6"}),i.jsx("circle",{cx:n/2,cy:n/2,r:s,fill:"none",stroke:a,strokeWidth:"6",strokeDasharray:`${o} ${r-o}`,strokeDashoffset:r/4,strokeLinecap:"round",style:{transition:"stroke-dasharray 0.8s ease"}}),i.jsx("text",{x:n/2,y:n/2,textAnchor:"middle",dominantBaseline:"central",fill:"var(--text-primary)",fontSize:"16",fontWeight:"bold",children:Math.round(e)})]}),i.jsx("span",{className:"ring-label",children:t})]})}function J2({series:e,direction:t}){if(e.length<2)return null;const n=200,s=50,r=4,o=e.map(g=>g.ewma),a=Math.min(...o)-5,c=Math.max(...o)+5-a||1,u=e.map((g,k)=>{const N=r+k/(e.length-1)*(n-2*r),m=s-r-(g.ewma-a)/c*(s-2*r);return`${N},${m}`}),d=Hg[t].color,f=r,h=r+(e.length-1)/(e.length-1)*(n-2*r),y=`M ${u[0]} L ${u.join(" L ")} L ${h},${s} L ${f},${s} Z`;return i.jsxs("svg",{width:n,height:s,className:"ewma-sparkline",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:`grad-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[i.jsx("stop",{offset:"0%",stopColor:d,stopOpacity:"0.3"}),i.jsx("stop",{offset:"100%",stopColor:d,stopOpacity:"0.02"})]})}),i.jsx("path",{d:y,fill:`url(#grad-${t})`}),i.jsx("polyline",{points:u.join(" "),fill:"none",stroke:d,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("circle",{cx:parseFloat(u[u.length-1].split(",")[0]),cy:parseFloat(u[u.length-1].split(",")[1]),r:"3",fill:d})]})}function Ai({name:e,icon:t,stream:n}){return i.jsxs("div",{className:"stream-card",children:[i.jsxs("div",{className:"stream-header",children:[i.jsxs("div",{className:"stream-name",children:[i.jsx(t,{size:16}),i.jsx("span",{children:e})]}),i.jsx(Wg,{direction:n.direction,zScore:n.zScore})]}),i.jsxs("div",{className:"stream-body",children:[i.jsx(J2,{series:n.series,direction:n.direction}),i.jsxs("div",{className:"stream-stats",children:[i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"stat-label",children:"Current EWMA"}),i.jsx("span",{className:"stat-value",children:n.currentEWMA.toFixed(1)})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"stat-label",children:"Historical Avg"}),i.jsx("span",{className:"stat-value",children:n.historicalAvg.toFixed(1)})]})]})]})]})}function eN({monthly:e}){const[t,n]=w.useState(!0);return e.length===0?null:i.jsxs("div",{className:"monthly-section",children:[i.jsxs("button",{className:"section-toggle",onClick:()=>n(!t),children:[t?i.jsx(Ms,{size:16}):i.jsx(vn,{size:16}),i.jsx(ev,{size:16}),i.jsx("span",{children:"Monthly Breakdown"})]}),t&&i.jsxs("table",{className:"monthly-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Month"}),i.jsx("th",{children:"Score"}),i.jsx("th",{children:"AI Health"}),i.jsx("th",{children:"Structural"}),i.jsx("th",{children:"Scans"}),i.jsx("th",{children:"AI Drift"}),i.jsx("th",{children:"Security"})]})}),i.jsx("tbody",{children:e.slice().reverse().map(s=>{const r=s.avgScore>=80?"#34d399":s.avgScore>=60?"#fbbf24":"#f87171";return i.jsxs("tr",{children:[i.jsx("td",{className:"month-cell",children:s.month}),i.jsx("td",{style:{color:r,fontWeight:600},children:s.avgScore.toFixed(0)}),i.jsx("td",{children:s.avgAiHealth.toFixed(0)}),i.jsx("td",{children:s.avgStructural.toFixed(0)}),i.jsx("td",{className:"dim",children:s.scanCount}),i.jsx("td",{className:"dim",children:s.provenanceBreakdown.aiDrift}),i.jsx("td",{className:"dim",children:s.provenanceBreakdown.security})]},s.month)})})]})]})}function tN(){const[e,t]=w.useState(null),[n,s]=w.useState(!0),[r,o]=w.useState(null),a=async()=>{s(!0),o(null);try{const l=await fetch("/api/drift");if(!l.ok)throw new Error(`HTTP ${l.status}`);const c=await l.json();c&&c.totalScans>0?t(c):t(null)}catch(l){o(l.message)}finally{s(!1)}};return w.useEffect(()=>{a()},[]),n?i.jsxs("div",{className:"empty-state",children:[i.jsx(Me,{size:48,className:"spin"}),i.jsx("h3",{children:"Analyzing Temporal Drift..."}),i.jsx("p",{children:"Reading scan history from SQLite brain."})]}):r?i.jsxs("div",{className:"empty-state",children:[i.jsx(Ne,{size:48}),i.jsx("h3",{children:"Drift Analysis Unavailable"}),i.jsx("p",{children:r}),i.jsx("button",{className:"retry-btn",onClick:a,children:"Retry"})]}):e?i.jsxs("div",{className:"temporal-drift",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(Ze,{size:18}),i.jsx("span",{children:"Temporal Drift Engine"}),i.jsx("span",{className:"badge",children:"v5 EWMA"})]}),i.jsx("button",{className:"refresh-btn",onClick:a,title:"Refresh",children:i.jsx(Me,{size:16})})]}),i.jsxs("div",{className:`drift-banner drift-${e.overallDirection}`,children:[i.jsxs("div",{className:"banner-main",children:[i.jsx(Wg,{direction:e.overallDirection,zScore:e.overallZScore}),i.jsx("span",{className:"banner-repo",children:e.repo}),i.jsxs("span",{className:"banner-meta",children:[e.totalScans," scans over ",e.timeSpanDays," days"]})]}),e.latestScanAnomaly.isAnomaly&&i.jsxs("div",{className:"anomaly-alert",children:[i.jsx(Ne,{size:14}),i.jsx("span",{children:e.latestScanAnomaly.message})]})]}),i.jsxs("div",{className:"score-rings-row",children:[i.jsx(Mi,{score:e.streams.overall.currentEWMA,label:"Overall"}),i.jsx(Mi,{score:e.streams.aiDrift.currentEWMA,label:"AI Health"}),i.jsx(Mi,{score:e.streams.structural.currentEWMA,label:"Structural"}),i.jsx(Mi,{score:e.streams.security.currentEWMA,label:"Security"})]}),i.jsxs("div",{className:"streams-grid",children:[i.jsx(Ai,{name:"AI Drift",icon:Ge,stream:e.streams.aiDrift}),i.jsx(Ai,{name:"Structural",icon:nn,stream:e.streams.structural}),i.jsx(Ai,{name:"Security",icon:ws,stream:e.streams.security}),i.jsx(Ai,{name:"Overall",icon:Ze,stream:e.streams.overall})]}),i.jsx(eN,{monthly:e.monthly}),i.jsxs("div",{className:"narrative-section",children:[i.jsxs("div",{className:"narrative-header",children:[i.jsx($n,{size:16}),i.jsx("span",{children:"Analysis Narrative"})]}),i.jsx("pre",{className:"narrative-text",children:e.narrative})]})]}):i.jsxs("div",{className:"empty-state",children:[i.jsx(Ze,{size:48}),i.jsx("h3",{children:"Not Enough Data"}),i.jsxs("p",{children:["Run at least 3 scans with ",i.jsx("code",{children:"rigour check"})," to see temporal drift analysis."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Drift detection uses EWMA + Z-score anomaly detection across per-provenance streams."})})]})}function nN(){var Dt,bu,Vu,Ou,Fu,Iu,$u,Bu,Uu,Hu,Wu,Ku,Gu,qu,Qu,Yu,Xu;const[e,t]=w.useState(null),[n,s]=w.useState(null),[r,o]=w.useState(null),[a,l]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(null),[h,y]=w.useState("services/task"),[g,k]=w.useState(""),[N,m]=w.useState(null),[p,v]=w.useState(""),[j,x]=w.useState(!1),[S,C]=w.useState(),[T,R]=w.useState("none"),[P,$]=w.useState(0),[O,Q]=w.useState(!1),[ge,z]=w.useState(null),[U,W]=w.useState(!1),[M,_]=w.useState(!0),b=async()=>{_(!0);try{const[K,Y,Kg,Gg,qg,it]=await Promise.all([fetch("/api/context-stats").then(mt=>mt.json()),fetch("/api/task-cost").then(mt=>mt.json()),fetch("/api/cache-stats").then(mt=>mt.json()),fetch("/api/context-scope").then(mt=>mt.json()),fetch("/api/checkpoint-metrics").then(mt=>mt.json()),fetch("/api/cursor-api-key/status").then(mt=>mt.json())]);t(K),s(Y),o(Kg),l(Gg),u(qg),x(!!(it!=null&&it.configured)),C(it==null?void 0:it.hint),R((it==null?void 0:it.source)||"none"),$(Number((it==null?void 0:it.importedCount)??0))}catch(K){console.error("Failed to fetch cost & context telemetry",K)}finally{_(!1)}};w.useEffect(()=>{b()},[]);const V=async()=>{if(h)try{const K=await fetch(`/api/context-explain?target=${encodeURIComponent(h)}`);f(await K.json())}catch(K){console.error("Failed to get context explanation",K)}},I=async()=>{if(g.trim())try{const Y=await(await fetch("/api/import-cursor-usage",{method:"POST",headers:{"Content-Type":"text/plain"},body:g})).json();Y.success?(m(`Imported ${Y.importedCount} observed usage record(s).`),k(""),b()):m(`Import failed: ${Y.error}`)}catch(K){m(`Import failed: ${K.message}`)}},ue=async()=>{if(p.trim()){Q(!0),z(null);try{const Y=await(await fetch("/api/cursor-api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:p.trim()})})).json();Y.success?(x(!0),v(""),C(Y.hint),R(Y.source||"file"),$(Number(Y.importedCount??0)),z(Y.syncError?`Key saved locally. Initial sync failed: ${Y.syncError}`:`Vendor key saved locally. Imported ${Y.importedCount??0} usage event(s).`),b()):z(`Save failed: ${Y.error}`)}catch(K){z(`Save failed: ${K.message}`)}finally{Q(!1)}}},je=async()=>{Q(!0),z(null);try{const Y=await(await fetch("/api/cursor-api-key",{method:"DELETE"})).json();Y.success?(x(!!Y.configured),C(Y.hint),R(Y.source||"none"),z(Y.configured?"Removed file key. Env key still active.":"Removed local vendor key.")):z(`Remove failed: ${Y.error}`)}catch(K){z(`Remove failed: ${K.message}`)}finally{Q(!1)}},be=async()=>{Q(!0),z(null);try{const Y=await(await fetch("/api/cursor-sync",{method:"POST"})).json();Y.success?($(Number(Y.importedCount??0)),z(`Synced ${Y.importedCount??0} new usage event(s).`),b()):z(`Sync failed: ${Y.error||"Unknown error"}`)}catch(K){z(`Sync failed: ${K.message}`)}finally{Q(!1)}},re=K=>K?K>=1e6?`${(K/1e6).toFixed(2)}M`:K>=1e3?`${(K/1e3).toFixed(1)}K`:K.toString():"0",qe=(e==null?void 0:e.candidateTokens)??0,$s=(e==null?void 0:e.returnedTokens)??0,Kn=(e==null?void 0:e.potentialAvoidedTokens)??0,Bs=qe>0?((qe-$s)/qe*100).toFixed(1):"0.0",Us=r!=null&&r.hitRate?Math.round(r.hitRate*100):0,Xo=((Dt=n==null?void 0:n.actual)==null?void 0:Dt.costUsd)??0,Zo=((bu=n==null?void 0:n.estimated)==null?void 0:bu.retrievalAvoidedCostUsd)??((Vu=n==null?void 0:n.estimated)==null?void 0:Vu.estimatedCostAvoidedUsd)??0,Jo=((Ou=n==null?void 0:n.estimated)==null?void 0:Ou.checkpointReplayAvoidedCostUsd)??0,ea=((Fu=n==null?void 0:n.actual)==null?void 0:Fu.inputTokens)??0,ri=((Iu=n==null?void 0:n.actual)==null?void 0:Iu.outputTokens)??0,Hs=ea+ri,ii=(($u=n==null?void 0:n.actual)==null?void 0:$u.source)||"No usage data",Ws=((Bu=n==null?void 0:n.actual)==null?void 0:Bu.classification)??((Uu=n==null?void 0:n.actual)!=null&&Uu.isEstimated?"modelled estimate":"observed"),A=Math.round((((Hu=n==null?void 0:n.actual)==null?void 0:Hu.observedCoverage)??0)*100),B=(Wu=n==null?void 0:n.estimated)!=null&&Wu.retrievalAvoidedCostRangeUsd?`$${n.estimated.retrievalAvoidedCostRangeUsd.min.toFixed(2)}–$${n.estimated.retrievalAvoidedCostRangeUsd.max.toFixed(2)}`:`$${Zo.toFixed(2)}`,de=(Ku=n==null?void 0:n.estimated)!=null&&Ku.checkpointReplayAvoidedCostRangeUsd?`$${n.estimated.checkpointReplayAvoidedCostRangeUsd.min.toFixed(2)}–$${n.estimated.checkpointReplayAvoidedCostRangeUsd.max.toFixed(2)}`:`$${Jo.toFixed(2)}`,$e=((e==null?void 0:e.retrievals)??0)>0||Hs>0||((r==null?void 0:r.exactCacheHits)??0)+((r==null?void 0:r.semanticCacheHits)??0)+((r==null?void 0:r.partialCacheHits)??0)+((r==null?void 0:r.cacheMisses)??0)>0||((c==null?void 0:c.checkpointCount)??0)>0;return i.jsxs("div",{className:"cost-context-view",children:[i.jsxs("div",{className:"cost-header",children:[i.jsxs("div",{children:[i.jsxs("h2",{children:[i.jsx(nn,{size:20,className:"text-amber"}),"Token Savings & Context Efficiency"]}),i.jsx("p",{children:"Rigour-measured avoided context vs optional observed model usage (kept separate on purpose)."})]}),i.jsx("div",{className:"cost-toolbar",children:i.jsxs("button",{type:"button",onClick:b,"aria-label":"Refresh cost and context stats",children:[i.jsx(Me,{size:14,className:M?"spinning":""})," Refresh"]})})]}),!$e&&!M&&i.jsxs("div",{className:"cost-banner",children:[i.jsx(As,{size:18,className:"text-amber"}),i.jsxs("div",{children:[i.jsx("strong",{children:"No telemetry recorded yet"}),i.jsxs("p",{children:["Use Rigour MCP tools (",i.jsx("code",{children:"rigour_context_scope"}),", ",i.jsx("code",{children:"rigour_checkpoint"}),") or import observed usage below."]})]})]}),$e&&i.jsxs("div",{className:"cost-banner",children:[i.jsx(As,{size:18,className:"text-cyan"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Savings categories are reported separately"}),i.jsx("p",{children:"Retrieval, cache reuse, repeated reads, and checkpoint replay may overlap. Rigour does not add them into one total."})]})]}),i.jsxs("div",{className:"cost-kpi-grid",children:[i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Actual model tokens"}),i.jsx("div",{className:"value",children:re(Hs)}),i.jsxs("div",{className:"meta",children:[Ws," · ",ii]})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Potential context avoided"}),i.jsx("div",{className:"value text-amber",children:re(Kn)}),i.jsxs("div",{className:"meta",children:["modelled estimate · reduction ",Bs,"%"]})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Cache hit rate"}),i.jsxs("div",{className:"value text-cyan",children:[Us,"%"]}),i.jsx("div",{className:"meta",children:"measured estimate · static & semantic"})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Observed model spend"}),i.jsxs("div",{className:"value text-emerald",children:["$",Xo.toFixed(2)]}),i.jsxs("div",{className:"meta",children:[Ws," · ",A,"% provider coverage"]})]})]}),i.jsxs("div",{className:"cost-panel-grid",children:[i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(fn,{size:16,className:"text-cyan"})," A. Retrieval efficiency"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Candidates scanned"}),i.jsxs("span",{children:[re(qe)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Context returned"}),i.jsxs("span",{className:"text-cyan",children:[re($s)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Potential avoided"}),i.jsxs("span",{className:"text-amber",children:[re(Kn)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Retrieval scope estimate"}),i.jsx("span",{className:"text-amber",children:B})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Reduction ratio"}),i.jsxs("span",{className:"text-emerald",children:[Bs,"%"]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Hn,{size:16,className:"text-emerald"})," B. Cache efficiency"]}),i.jsxs("div",{className:"cost-hit-grid",children:[i.jsxs("div",{children:["Exact hits",i.jsx("strong",{className:"text-emerald",children:(r==null?void 0:r.exactCacheHits)??0})]}),i.jsxs("div",{children:["Semantic hits",i.jsx("strong",{className:"text-cyan",children:(r==null?void 0:r.semanticCacheHits)??0})]}),i.jsxs("div",{children:["Partial hits",i.jsx("strong",{className:"text-amber",children:(r==null?void 0:r.partialCacheHits)??0})]}),i.jsxs("div",{children:["Misses",i.jsx("strong",{className:"text-rose",children:(r==null?void 0:r.cacheMisses)??0})]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Tokens served from cache"}),i.jsx("span",{className:"text-emerald",children:re((r==null?void 0:r.tokensServedFromCache)??0)})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(js,{size:16,className:"text-purple"})," C. Duplication prevention"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Repeated-read prevention"}),i.jsxs("span",{className:"text-emerald",children:[re((e==null?void 0:e.deduplicatedTokens)??0)," tokens · ",(e==null?void 0:e.repeatedReadsPrevented)??0," reads"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Overlapping scopes resolved"}),i.jsx("span",{className:"text-cyan",children:(a==null?void 0:a.overlappingScopesResolved)??0})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Always-on rule tokens"}),i.jsx("span",{children:re((a==null?void 0:a.alwaysOnRuleTokens)??0)})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Unused tools filtered"}),i.jsx("span",{className:"text-purple",children:(a==null?void 0:a.unusedToolsFiltered)??0})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Il,{size:16,className:"text-amber"})," D. Checkpoint compression"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Raw session state"}),i.jsx("span",{children:re((c==null?void 0:c.rawStateTokens)??0)})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Checkpoint packet size"}),i.jsxs("span",{className:"text-emerald",children:[re((c==null?void 0:c.checkpointTokens)??0),((c==null?void 0:c.compressionRatio)??0)>0?` (${c==null?void 0:c.compressionRatio}×)`:""]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Replay avoided"}),i.jsxs("span",{className:"text-amber",children:[re((c==null?void 0:c.replayTokensAvoided)??0)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Checkpoint replay estimate"}),i.jsx("span",{className:"text-amber",children:de})]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Il,{size:16,className:"text-cyan"})," Estimate provenance"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Classification"}),i.jsx("span",{children:"Modelled estimate"})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Pricing source"}),i.jsx("span",{children:((Gu=n==null?void 0:n.estimated)==null?void 0:Gu.pricingSource)??"Unavailable"})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Effective date"}),i.jsx("span",{children:((qu=n==null?void 0:n.estimated)==null?void 0:qu.pricingEffectiveDate)??"Unavailable"})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Model basis"}),i.jsx("span",{children:((Qu=n==null?void 0:n.estimated)==null?void 0:Qu.pricingBasis)??"Unknown-model fallback"})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Observed models"}),i.jsx("span",{children:((Xu=(Yu=n==null?void 0:n.actual)==null?void 0:Yu.models)==null?void 0:Xu.join(", "))||"Unavailable"})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(R0,{size:16,className:"text-cyan"})," Context explainability"]}),i.jsxs("div",{className:"cost-explain-row",children:[i.jsx("label",{className:"sr-only",htmlFor:"context-explain-target",children:"File, service, or query"}),i.jsx("input",{id:"context-explain-target",type:"text",value:h,onChange:K=>y(K.target.value),placeholder:"File, service, or query (e.g. services/task)"}),i.jsx("button",{type:"button",className:"cost-primary",onClick:V,children:"Explain"})]}),d&&i.jsxs("div",{className:"cost-row",style:{flexDirection:"column",alignItems:"flex-start",gap:6},children:[i.jsxs("div",{children:["Target: ",i.jsx("strong",{children:d.fileOrService})," [",String(d.status||"").toUpperCase(),"]"]}),i.jsxs("div",{children:["Reason: ",d.reason]}),i.jsxs("div",{children:["Cache: ",i.jsx("span",{className:"text-cyan",children:d.cacheStatus})]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Z0,{size:16,className:"text-amber"})," Import observed model usage"]}),i.jsx("p",{className:"cost-panel-help",children:"Vendor-agnostic CSV/JSON import for actual token spend. Does not require any Admin API key."}),i.jsx("label",{className:"sr-only",htmlFor:"observed-usage-import",children:"Observed usage CSV or JSON"}),i.jsx("textarea",{id:"observed-usage-import",rows:4,value:g,onChange:K=>k(K.target.value),placeholder:`Date,Model,Input Tokens,Output Tokens,Cost
|
|
398
|
+
2026-08-05,claude-3-5-sonnet,510000,62000,4.83`,style:{marginBottom:10}}),i.jsxs("div",{className:"cost-actions",children:[i.jsx("button",{type:"button",className:"cost-primary",onClick:I,children:"Import usage data"}),N&&i.jsx("span",{role:"alert",className:N.includes("failed")?"text-rose":"text-emerald",style:{fontSize:"0.78rem"},children:N})]})]}),i.jsxs("div",{className:"cost-panel glass-card vendor-adapters",children:[i.jsxs("button",{type:"button",className:"vendor-adapters-toggle",onClick:()=>W(K=>!K),"aria-expanded":U,children:[i.jsxs("span",{children:[i.jsx(B0,{size:16,className:"text-cyan"})," Vendor adapters"]}),i.jsx(Ms,{size:16,className:U?"rotated":""})]}),U&&i.jsxs("div",{className:"vendor-adapters-body",children:[i.jsx("h4",{children:"Cursor Admin API (optional)"}),i.jsxs("p",{className:"cost-panel-help",children:["Optional verification for teams that already use Cursor Admin API. Rigour does not require this. Prefer ",i.jsx("code",{children:"RIGOUR_CURSOR_API_KEY"})," or ",i.jsx("code",{children:"CURSOR_ADMIN_API_KEY"})," in the environment. File storage stays on this machine only (",i.jsx("code",{children:"~/.rigour/settings.json"}),", mode 600)."]}),i.jsx("p",{className:"cost-panel-help",children:j?`Configured${S?` (${S})`:""} via ${T}.${P>0?` ${P} event(s) imported.`:""}`:"No vendor key configured."}),i.jsxs("div",{className:"cost-actions",style:{marginBottom:8},children:[i.jsx("label",{className:"sr-only",htmlFor:"cursor-vendor-key",children:"Cursor Admin API key"}),i.jsx("input",{id:"cursor-vendor-key",type:"password",autoComplete:"off",value:p,onChange:K=>v(K.target.value),placeholder:"Paste key only if not using env",disabled:O}),i.jsx("button",{type:"button",className:"cost-primary",onClick:ue,disabled:O||!p.trim(),children:O?"Saving…":"Save key"}),i.jsxs("button",{type:"button",onClick:be,disabled:O||!j,"aria-label":"Sync Cursor usage",children:[i.jsx(Me,{size:14,className:O?"spinning":""}),"Sync"]}),i.jsxs("button",{type:"button",onClick:je,disabled:O||T==="env"||!j,"aria-label":"Remove local Cursor API key",title:T==="env"?"Remove env var in your shell":"Remove file key",children:[i.jsx(nv,{size:14}),"Remove"]})]}),ge&&i.jsx("span",{role:"alert",className:ge.includes("failed")?"text-rose":"text-emerald",style:{fontSize:"0.78rem"},children:ge})]})]})]})}function Nn(e){const t=e??0;return t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)}function sN({onNavigate:e}){var y,g,k,N,m,p,v,j,x,S,C,T,R,P,$,O,Q,ge,z,U,W,M;const[t,n]=w.useState(null),[s,r]=w.useState(!0),[o,a]=w.useState(null),l=async()=>{r(!0),a(null);try{const _=await fetch("/api/overview");if(!_.ok)throw new Error(`HTTP ${_.status}`);const b=await _.json();if(b.error)throw new Error(b.error);n(b)}catch(_){a(_.message||"Failed to load overview")}finally{r(!1)}};w.useEffect(()=>{l()},[]);const c=((y=t==null?void 0:t.context)==null?void 0:y.potentialAvoidedTokens)??0,u=Math.round((((g=t==null?void 0:t.cache)==null?void 0:g.hitRate)??0)*100),d=((N=(k=t==null?void 0:t.cost)==null?void 0:k.actual)==null?void 0:N.costUsd)??0,f=((p=(m=t==null?void 0:t.cost)==null?void 0:m.estimated)==null?void 0:p.retrievalAvoidedCostUsd)??0,h=(((v=t==null?void 0:t.context)==null?void 0:v.retrievals)??0)>0||((t==null?void 0:t.checkpointCount)??0)>0||((t==null?void 0:t.memoryCount)??0)>0||(((x=(j=t==null?void 0:t.cost)==null?void 0:j.actual)==null?void 0:x.inputTokens)??0)>0;return i.jsxs("div",{className:"overview-view",children:[i.jsxs("div",{className:"overview-header",children:[i.jsxs("div",{children:[i.jsxs("h2",{children:[i.jsx(U0,{size:22}),"Governance Overview"]}),i.jsx("p",{className:"overview-dek",children:"Local governance signal — measured context avoided, cache hits, checkpoints. Spend is observed; avoided $ is always an estimate."})]}),i.jsxs("button",{className:"refresh-btn",onClick:l,disabled:s,type:"button",children:[i.jsx(Me,{size:16,className:s?"spinning":""}),"Refresh"]})]}),o&&i.jsxs("div",{className:"overview-banner warn",children:[i.jsx(As,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load telemetry"}),i.jsxs("p",{children:[o,". Confirm Studio is serving ",i.jsx("code",{children:"/api/overview"})," on the same port as the UI."]})]})]}),!o&&!s&&!h&&i.jsxs("div",{className:"overview-banner warn",children:[i.jsx(As,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"No agent telemetry yet"}),i.jsxs("p",{children:["Run agents with Rigour MCP (",i.jsx("code",{children:"rigour_recall"}),", ",i.jsx("code",{children:"rigour_context_scope"}),","," ",i.jsx("code",{children:"rigour_checkpoint"}),") or import observed usage under Cost & Context."]})]})]}),i.jsxs("div",{className:"overview-kpi-grid",children:[i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Context avoided"}),i.jsx("span",{className:"kpi-value amber",children:Nn(c)}),i.jsx("span",{className:"kpi-meta",children:"retrieval scope reduction only"})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Cache hit rate"}),i.jsxs("span",{className:"kpi-value cyan",children:[u,"%"]}),i.jsxs("span",{className:"kpi-meta",children:[((S=t==null?void 0:t.cache)==null?void 0:S.exactCacheHits)??0," exact · ",((C=t==null?void 0:t.cache)==null?void 0:C.semanticCacheHits)??0," semantic"]})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("checkpoints"),children:[i.jsx("span",{className:"kpi-label",children:"Checkpoints"}),i.jsx("span",{className:"kpi-value",children:(t==null?void 0:t.checkpointCount)??0}),i.jsx("span",{className:"kpi-meta",children:(T=t==null?void 0:t.checkpointSummary)!=null&&T.compressionRatio?`${t.checkpointSummary.compressionRatio}× avg compression`:"from Brain DB"})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Observed spend"}),i.jsxs("span",{className:"kpi-value",children:["$",d.toFixed(2)]}),i.jsx("span",{className:"kpi-meta",children:(((P=(R=t==null?void 0:t.cost)==null?void 0:R.actual)==null?void 0:P.source)||"no usage source")+` · retrieval estimate $${f.toFixed(2)}`})]})]}),i.jsxs("div",{className:"overview-panels",children:[i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(Ze,{size:16}),i.jsx("h3",{children:"Live signal"})]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Context retrievals"}),i.jsx("dd",{children:(($=t==null?void 0:t.context)==null?void 0:$.retrievals)??0})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Candidate → returned"}),i.jsxs("dd",{children:[Nn((O=t==null?void 0:t.context)==null?void 0:O.candidateTokens)," →"," ",Nn((Q=t==null?void 0:t.context)==null?void 0:Q.returnedTokens)]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Project events"}),i.jsx("dd",{children:((t==null?void 0:t.eventCount)??0).toLocaleString()})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Tokens from cache"}),i.jsx("dd",{children:Nn((ge=t==null?void 0:t.cache)==null?void 0:ge.tokensServedFromCache)})]})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("audit"),children:["Open audit log ",i.jsx(as,{size:14})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(Ge,{size:16}),i.jsx("h3",{children:"How Rigour learns"})]}),i.jsxs("p",{className:"overview-learn-note",children:["Memory = stable facts agents wrote via ",i.jsx("code",{children:"rigour_remember"}),". Patterns = indexed symbols from scans (not a full training log). Enforcement + checkpoints show live governance learning."]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Memories"}),i.jsxs("dd",{children:[(t==null?void 0:t.memoryCount)??0,(z=t==null?void 0:t.memorySources)!=null&&z.length?` (${t.memorySources.join(" + ")})`:""]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Pattern index"}),i.jsxs("dd",{children:[(t==null?void 0:t.patternCount)??0," patterns / ",(t==null?void 0:t.patternFiles)??0," files"]})]})]}),i.jsxs("div",{className:"overview-actions",children:[i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("memory"),children:["Memory bank ",i.jsx(as,{size:14})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("patterns"),children:["Patterns ",i.jsx(as,{size:14})]})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx($r,{size:16}),i.jsx("h3",{children:"Checkpoint compression"})]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Raw session state"}),i.jsx("dd",{children:Nn((U=t==null?void 0:t.checkpointSummary)==null?void 0:U.rawStateTokens)})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Checkpoint packets"}),i.jsx("dd",{children:Nn((W=t==null?void 0:t.checkpointSummary)==null?void 0:W.checkpointTokens)})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Replay avoided"}),i.jsx("dd",{className:"amber",children:Nn((M=t==null?void 0:t.checkpointSummary)==null?void 0:M.replayTokensAvoided)})]})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("checkpoints"),children:["Timeline ",i.jsx(as,{size:14})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(Ds,{size:16}),i.jsx("h3",{children:"Where data lives"})]}),i.jsxs("dl",{className:"overview-dl paths",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Project"}),i.jsx("dd",{title:t==null?void 0:t.projectPath,children:(t==null?void 0:t.projectPath)||"—"})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Brain DB"}),i.jsx("dd",{title:t==null?void 0:t.brainDb,children:(t==null?void 0:t.brainDb)||"~/.rigour/rigour.db"})]})]}),i.jsxs("p",{className:"overview-hint",children:["Studio reads Brain SQLite for cost/cache/checkpoints and merges project + global"," ",i.jsx("code",{children:"memory.json"}),"."]})]})]}),i.jsxs("div",{className:"overview-quick-nav",children:[i.jsxs("button",{type:"button",onClick:()=>e("cost"),children:[i.jsx(Il,{size:16})," Cost & Context"]}),i.jsxs("button",{type:"button",onClick:()=>e("checkpoints"),children:[i.jsx($r,{size:16})," Checkpoints"]}),i.jsxs("button",{type:"button",onClick:()=>e("memory"),children:[i.jsx(Ge,{size:16})," Memory"]}),i.jsxs("button",{type:"button",onClick:()=>e("patterns"),children:[i.jsx(Hn,{size:16})," Patterns"]})]})]})}const rN={register:"agents",scope:"cost",gates:"gates",checkpoint:"checkpoints",handoff:"handoffs",memory:"memory"},iN={register:i.jsx(tn,{size:16}),scope:i.jsx(_0,{size:16}),gates:i.jsx(js,{size:16}),checkpoint:i.jsx($r,{size:16}),handoff:i.jsx(Fl,{size:16}),memory:i.jsx(Ge,{size:16})};function oN(e){switch(e){case"pass":return i.jsx(tv,{size:14,className:"text-emerald"});case"warn":return i.jsx(Ne,{size:14,className:"text-amber"});case"block":return i.jsx(Ne,{size:14,className:"text-rose"});default:return i.jsx(Ui,{size:12,className:"text-dim"})}}function aN({onNavigate:e}){var d;const[t,n]=w.useState(null),[s,r]=w.useState(!0),[o,a]=w.useState(null),l=async()=>{r(!0),a(null);try{const f=await fetch("/api/enforcement");if(!f.ok){let h="";if(f.status===404)try{const y=await fetch("/api/info").then(k=>k.ok?k.json():null);h=` API/UI mismatch — Studio shell is newer than the CLI serving /api (studioVersion=${(y==null?void 0:y.studioVersion)||(y==null?void 0:y.mcpVersion)||"unknown"}). Restart with the local 5.5.0+ CLI: \`node …/rigour-cli/dist/cli.js studio -p <port>\` and open http://127.0.0.1:<port>.`}catch{h=" Restart Studio with a CLI that includes /api/enforcement (5.5.0+)."}throw new Error(`HTTP ${f.status}.${h}`)}n(await f.json())}catch(f){a(f.message||"Failed to load enforcement")}finally{r(!1)}};w.useEffect(()=>{l();const f=setInterval(l,15e3);return()=>clearInterval(f)},[]);const c=(t==null?void 0:t.stages)||[],u=c.map((f,h)=>{if(h===0)return null;const y=c[h-1].count;return y<=0?null:Math.min(100,Math.round(f.count/y*100))});return i.jsxs("div",{className:"enforcement-view",children:[i.jsxs("div",{className:"panel-header enforcement-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(js,{size:18}),i.jsx("span",{children:"Enforcement Loop"})]}),i.jsxs("div",{className:"enforcement-header-meta",children:[(t==null?void 0:t.derived)&&i.jsx("span",{className:"meta-chip",children:"Derived from checkpoints"}),i.jsxs("span",{className:"meta-chip",children:[(t==null?void 0:t.agentCount)??0," agents"]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:l,"aria-label":"Refresh enforcement",children:i.jsx(Me,{size:14,className:s?"spinning":""})})]})]}),i.jsx("p",{className:"enforcement-lead",children:"How Rigour bounds agents: register scope, constrain context, run gates, compress checkpoints, verify handoffs, and store stable memory — for any MCP client."}),o&&i.jsxs("div",{className:"cost-banner",role:"alert",children:[i.jsx(Ne,{size:18,className:"text-rose"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load enforcement"}),i.jsx("p",{children:o})]})]}),s&&!t&&i.jsx("div",{className:"enforcement-skeleton","aria-busy":"true",children:Array.from({length:6}).map((f,h)=>i.jsx("div",{className:"skeleton-card"},h))}),c.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("ol",{className:"enforcement-rail","aria-label":"Enforcement stages",children:c.map((f,h)=>i.jsxs("li",{className:`enforcement-stage status-${f.status}`,children:[h>0&&i.jsx("div",{className:"stage-connector","aria-hidden":"true",children:u[h]!=null&&i.jsxs("span",{className:"conversion",children:[u[h],"%"]})}),i.jsxs("button",{type:"button",className:"stage-card glass-card",onClick:()=>e==null?void 0:e(rN[f.id]||"overview"),children:[i.jsxs("div",{className:"stage-top",children:[i.jsx("span",{className:"stage-icon",children:iN[f.id]}),oN(f.status)]}),i.jsx("div",{className:"stage-label",children:f.label}),i.jsx("div",{className:"stage-count",children:f.count}),i.jsx("div",{className:"stage-detail",children:f.detail})]})]},f.id))}),i.jsx("ul",{className:"enforcement-list-fallback",children:c.map(f=>i.jsxs("li",{children:[i.jsx("strong",{children:f.label}),": ",f.count," — ",f.detail," (",f.status,")"]},`list-${f.id}`))})]}),i.jsxs("div",{className:"enforcement-timeline glass-card",children:[i.jsx("h3",{children:"Recent enforcement events"}),(d=t==null?void 0:t.timeline)!=null&&d.length?i.jsx("ul",{children:t.timeline.slice(0,12).map((f,h)=>i.jsxs("li",{children:[i.jsx("span",{className:`tl-type type-${f.type}`,children:f.type}),i.jsx("span",{className:"tl-summary",children:f.summary}),i.jsxs("span",{className:"tl-meta mono",children:[f.agentId||"—",f.timestamp?` · ${new Date(f.timestamp).toLocaleTimeString()}`:""]})]},`${f.type}-${h}`))}):i.jsx("p",{className:"empty-inline",children:"No gate/checkpoint/handoff events yet. Drive agents through MCP tools."})]})]})}function lN(){const[e,t]=w.useState([]),[n,s]=w.useState(!0),r=async()=>{s(!0);try{const a=await(await fetch("/api/handoffs")).json();t(Array.isArray(a.handoffs)?a.handoffs:[])}catch(o){console.error("Failed to load handoffs",o)}finally{s(!1)}};return w.useEffect(()=>{r()},[]),!n&&e.length===0?i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(Fl,{size:48}),i.jsx("h3",{children:"No Handoffs Yet"}),i.jsxs("p",{children:["Compress state with ",i.jsx("code",{children:"rigour_checkpoint"}),", then transfer with"," ",i.jsx("code",{children:"rigour_handoff"}),". The receiving agent accepts via ",i.jsx("code",{children:"rigour_handoff_accept"}),"."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Verified handoffs carry checkpoint packets — not parent transcripts."})})]}):i.jsxs("div",{className:"handoff-flow",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(Fl,{size:18}),i.jsx("span",{children:"Agent Handoffs"})]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:r,"aria-label":"Refresh handoffs",children:i.jsx(Me,{size:14,className:n?"spinning":""})})]}),i.jsx("div",{className:"handoff-list",children:e.map(o=>{const a=o.status==="accepted"||!!o.acceptedAt;return i.jsxs("article",{className:`handoff-card glass-card ${a?"accepted":"pending"}`,children:[i.jsxs("div",{className:"handoff-status",children:[a?i.jsxs("span",{className:"status-pill pass",children:[i.jsx(tv,{size:12})," Accepted"]}):i.jsxs("span",{className:"status-pill warn",children:[i.jsx($n,{size:12})," Pending"]}),i.jsx("span",{className:"mono dim",children:o.handoffId})]}),i.jsxs("div",{className:"handoff-flow-row",children:[i.jsxs("div",{className:"handoff-agent",children:[i.jsx(tn,{size:14}),i.jsx("code",{children:o.fromAgentId})]}),i.jsx(as,{size:16,className:"text-cyan"}),i.jsxs("div",{className:"handoff-packet",children:[i.jsx(G0,{size:14}),i.jsx("span",{children:o.contextTokens!=null?`${o.contextTokens} tok`:"packet"})]}),i.jsx(as,{size:16,className:"text-cyan"}),i.jsxs("div",{className:"handoff-agent",children:[i.jsx(tn,{size:14}),i.jsx("code",{children:o.toAgentId})]})]}),o.taskDescription&&i.jsx("p",{className:"handoff-task",children:o.taskDescription}),o.filesInScope&&o.filesInScope.length>0&&i.jsxs("div",{className:"handoff-files",children:[o.filesInScope.slice(0,4).map(l=>i.jsx("code",{children:l},l)),o.filesInScope.length>4&&i.jsxs("span",{className:"dim",children:["+",o.filesInScope.length-4," more"]})]})]},o.handoffId)})})]})}function cN({onNavigate:e}){var m,p;const[t,n]=w.useState(null),[s,r]=w.useState(!0),[o,a]=w.useState(null),[l,c]=w.useState([]),[u,d]=w.useState(!1),f=async()=>{r(!0),a(null);try{const[v,j]=await Promise.all([fetch("/api/overview"),fetch("/api/lessons")]);if(!v.ok)throw new Error(`HTTP ${v.status}`);if(n(await v.json()),j.ok){const x=await j.json();c(x.lessons??[]),d(x.teamConfigured===!0)}}catch(v){a(v.message||"Failed to load learning signals")}finally{r(!1)}},h=async(v,j)=>{const x=await fetch("/api/lessons",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:v,state:j})});if(!x.ok)throw new Error(`Lesson update failed: HTTP ${x.status}`);await f()};w.useEffect(()=>{f()},[]);const y=t==null?void 0:t.cache,g=((y==null?void 0:y.exactCacheHits)??0)+((y==null?void 0:y.semanticCacheHits)??0)+((y==null?void 0:y.partialCacheHits)??0),k=(y==null?void 0:y.cacheMisses)??0,N=Math.round(((y==null?void 0:y.hitRate)??0)*100);return i.jsxs("div",{className:"learning-brain",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(Ge,{size:18}),i.jsx("span",{children:"How Rigour Learns"})]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":"Refresh learning",children:i.jsx(Me,{size:14,className:s?"spinning":""})})]}),i.jsx("p",{className:"enforcement-lead",children:"Scans feed the pattern index; agents write stable memory; context scope + cache reuse cut reread cost; checkpoints compress handoffs. This is governance learning — not model fine-tuning."}),o&&i.jsxs("div",{className:"cost-banner",role:"alert",children:[i.jsx(As,{size:18,className:"text-rose"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load learning signals"}),i.jsx("p",{children:o})]})]}),i.jsxs("div",{className:"learning-grid",children:[i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(q0,{size:16,className:"text-cyan"}),i.jsx("h3",{children:"Structural pattern index"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.patternCount)??0}),i.jsxs("p",{className:"dim",children:[(t==null?void 0:t.patternFiles)??0," files indexed automatically. Use ",i.jsx("code",{children:"rigour index"})," for an explicit rebuild after a large refactor."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("patterns"),children:"Open Pattern Index"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(Q0,{size:16,className:"text-amber"}),i.jsx("h3",{children:"Stable memory"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.memoryCount)??0}),i.jsxs("p",{className:"dim",children:["Deliberate facts via ",i.jsx("code",{children:"rigour_remember"}),(m=t==null?void 0:t.memorySources)!=null&&m.length?` · ${t.memorySources.join(" + ")}`:"",". Not a scan log."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("memory"),children:"Open Memory Bank"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(Hn,{size:16,className:"text-emerald"}),i.jsx("h3",{children:"Context cache power"})]}),i.jsxs("div",{className:"learning-kpi text-cyan",children:[N,"%"]}),i.jsxs("p",{className:"dim",children:[g," hits (",(y==null?void 0:y.exactCacheHits)??0," exact · ",(y==null?void 0:y.semanticCacheHits)??0," semantic ·"," ",(y==null?void 0:y.partialCacheHits)??0," partial) / ",k," misses · ",((p=t==null?void 0:t.context)==null?void 0:p.retrievals)??0," ","retrievals"]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("cost"),children:"Open Cost & Context"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(Ge,{size:16,className:"text-purple"}),i.jsx("h3",{children:"Governance trail"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.checkpointCount)??0}),i.jsxs("p",{className:"dim",children:["Checkpoints compressed · ",((t==null?void 0:t.eventCount)??0).toLocaleString()," project events in"," ",i.jsx("code",{children:".rigour/events.jsonl"})," / Brain DB."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("enforcement"),children:"Open Enforcement Loop"})]})]}),i.jsxs("section",{className:"glass-card learning-lessons",children:[i.jsxs("header",{children:[i.jsx(Ge,{size:16,className:"text-purple"}),i.jsx("h3",{children:"Evidence-backed lessons"})]}),i.jsx("p",{className:"dim",children:"Interaction evidence is retained automatically. Only validated or explicitly published lessons can become reusable guidance."}),l.length===0?i.jsx("p",{className:"dim",children:"No interaction evidence recorded yet."}):i.jsx("div",{className:"lesson-list",children:l.slice(0,20).map(v=>{var j;return i.jsxs("article",{className:"lesson-row",children:[i.jsxs("div",{children:[i.jsx("strong",{children:v.subject}),i.jsxs("small",{children:[v.visibility," · ",v.state," · owner ",v.actorId||"local user"," · confidence ",Math.round(v.confidence*100),"%"]}),i.jsxs("small",{children:["Why: ",v.source," evidence · ",String(((j=v.evidence)==null?void 0:j.outcome)??"recorded outcome")]})]}),i.jsxs("div",{className:"lesson-actions",children:[v.state==="candidate"&&i.jsx("button",{type:"button",onClick:()=>void h(v.id,"validated"),children:"Validate"}),!["rejected","superseded"].includes(v.state)&&i.jsx("button",{type:"button",onClick:()=>void h(v.id,"rejected"),children:"Reject"}),v.state==="validated"&&v.visibility==="personal"&&u&&i.jsx("button",{type:"button",onClick:()=>void h(v.id,"promoted"),children:"Publish to team"})]})]},v.id)})}),!u&&l.some(v=>v.state==="validated"&&v.visibility==="personal")&&i.jsx("p",{className:"dim",children:"Configure PostgreSQL team mode in Settings before publishing personal learning to the team."})]})]})}function uN({data:e}){const t=e.mediation;return i.jsxs("div",{className:"audit-stats",children:[i.jsxs("div",{className:"stat-pill",children:[i.jsx(Jm,{size:14})," Fail-closed: ",e.failClosed?"ON":"OFF"]}),i.jsxs("div",{className:"stat-pill",children:["Status: ",(t==null?void 0:t.status)||"unknown"]}),i.jsxs("div",{className:"stat-pill",children:["Typed cmds: ",String((t==null?void 0:t.typedCommands)??"—")]}),i.jsxs("div",{className:"stat-pill",children:["Scope: ",String((t==null?void 0:t.scopeEnforcement)??"—")]}),i.jsxs("div",{className:"stat-pill",children:["Hooks: ",t!=null&&t.hooksInstalled?"installed":"missing"]}),i.jsxs("div",{className:"stat-pill",children:["MCP gateway: ",t!=null&&t.mcpGateway?"ON":"not wired"]}),i.jsxs("div",{className:"stat-pill",children:["Arbitration: ",(t==null?void 0:t.arbitration)||"—"]})]})}function dN({current:e}){var t,n;return i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsxs("h3",{children:[i.jsx($n,{size:16})," Current transaction"]}),!e&&i.jsxs("p",{style:{opacity:.7},children:["No active transaction. Run ",i.jsx("code",{children:"rigour firewall transact"}),"."]}),e&&i.jsxs("div",{children:[i.jsx("code",{children:e.id})," — ",i.jsx("strong",{children:e.status}),i.jsxs("div",{style:{marginTop:8,opacity:.8},children:["Scope: ",((t=e.scope)==null?void 0:t.join(", "))||"—"]}),i.jsxs("div",{style:{opacity:.8},children:["Files: ",((n=e.filesChanged)==null?void 0:n.length)??0,e.budgets?` / max ${e.budgets.maxFiles}`:""]}),e.worktreePath&&i.jsxs("div",{style:{fontSize:12,opacity:.7},children:["Worktree: ",e.worktreePath]})]})]})}function fN({attestation:e,valid:t}){return i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsxs("h3",{children:[i.jsx(V0,{size:16})," Attestation"]}),!e&&i.jsx("p",{style:{opacity:.7},children:"No attestation yet."}),e&&i.jsxs("div",{children:[i.jsxs("div",{children:[t?i.jsx(ft,{size:14,color:"#34d399"}):i.jsx(Jm,{size:14,color:"#f87171"})," ","Signature ",t?"valid":"invalid"," — gates ",e.gateResults.status]}),i.jsxs("div",{style:{fontSize:12,opacity:.75,marginTop:6},children:["policy=",e.policyHash," digest=",e.artifactDigest.slice(0,16),"…"]})]})]})}function Oh({title:e,empty:t,items:n}){return i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsx("h3",{children:e}),n.length===0&&i.jsx("p",{style:{opacity:.7},children:t}),i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:n.map((s,r)=>i.jsxs("li",{style:{padding:"8px 0",borderBottom:"1px solid rgba(127,127,127,0.2)"},children:[i.jsx("strong",{children:s.primary})," — ",s.secondary]},r))})]})}function hN(){const[e,t]=w.useState(null),[n,s]=w.useState(null),[r,o]=w.useState(!0),a=async()=>{o(!0),s(null);try{const u=await fetch("/api/firewall");if(!u.ok)throw new Error(`HTTP ${u.status}`);const d=await u.json();if(d.error)throw new Error(d.error);t(d)}catch(u){s(u.message||"Failed to load firewall status")}finally{o(!1)}};if(w.useEffect(()=>{a();const u=setInterval(a,5e3);return()=>clearInterval(u)},[]),r&&!e)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(Me,{className:"spin"})," Loading firewall…"]});if(n)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(Ne,{})," ",n]});if(!e)return null;const l=(e.decisions||[]).slice(0,30).map(u=>({primary:`${u.decision}${u.ruleId?` (${u.ruleId})`:""}`,secondary:u.reason})),c=(e.recentDenies||[]).slice(0,20).map(u=>({primary:u.decision||u.type||"deny",secondary:u.reason||u.command||"—"}));return i.jsxs("div",{className:"firewall-console",children:[i.jsxs("div",{className:"audit-header",children:[i.jsxs("div",{className:"audit-title",children:[i.jsx(ws,{size:24}),i.jsx("h2",{children:"Agent Transaction Firewall"})]}),i.jsxs("button",{className:"btn-secondary",onClick:a,children:[i.jsx(Me,{size:16})," Refresh"]})]}),i.jsx(uN,{data:e}),i.jsx(dN,{current:e.current}),i.jsx(fN,{attestation:e.attestation,valid:e.attestationValid}),i.jsxs("div",{className:"glass-card",style:{marginTop:16,padding:16},children:[i.jsx("h3",{children:"Adversarial replay"}),e.adversarial?i.jsxs("div",{children:[i.jsx("strong",{children:e.adversarial.passed})," passed / ",i.jsx("strong",{children:e.adversarial.failed})," failed"]}):i.jsxs("p",{style:{opacity:.7},children:["Run ",i.jsx("code",{children:"rigour firewall adversarial"}),"."]})]}),i.jsx(Oh,{title:"Capability / policy decisions",empty:"No broker decisions logged yet.",items:l}),i.jsx(Oh,{title:"Recent denies",empty:"No firewall denies in the event stream.",items:c})]})}class pN extends oe.Component{constructor(){super(...arguments);Zu(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidUpdate(n){n.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}render(){return this.state.error?i.jsxs("div",{className:"empty-state glass-card",role:"alert",children:[i.jsx(Ne,{size:48}),i.jsx("h3",{children:"This view could not be displayed"}),i.jsx("p",{children:this.state.error.message||"Studio received data it could not render."}),i.jsxs("button",{className:"refresh-btn",type:"button",onClick:()=>this.setState({error:null}),children:[i.jsx(Me,{size:16})," Retry view"]})]}):this.props.children}}function qn({icon:e,label:t,status:n,detail:s}){const r=["ready","active","online","local"].includes(n)?"ready":["warming","idle","missing"].includes(n)?"warming":"degraded";return i.jsxs("div",{className:`health-item ${r}`,children:[i.jsx(e,{size:15,"aria-hidden":"true"}),i.jsxs("span",{children:[i.jsx("strong",{children:t}),i.jsx("small",{children:s})]}),i.jsx("span",{className:"health-state",children:n})]})}function mN({data:e,loading:t,stale:n,onRetry:s}){var o,a,l,c,u,d,f,h,y,g,k,N,m,p,v,j,x;if(t&&!e)return i.jsxs("div",{className:"system-health loading",children:[i.jsx(Ze,{size:16,className:"spinning"})," Checking system health…"]});if(!e||e.error)return i.jsxs("div",{className:"system-health unavailable",role:"alert",children:[i.jsx(ff,{size:16})," Health unavailable",i.jsxs("button",{type:"button",onClick:s,children:[i.jsx(Me,{size:14})," Retry"]})]});const r=Object.values(((o=e.caches)==null?void 0:o.layers)??{}).filter(S=>S>0).length;return i.jsxs("section",{className:`system-health ${n?"stale":""}`,"aria-label":"System health",children:[i.jsx(qn,{icon:Hn,label:"Index",status:((a=e.index)==null?void 0:a.status)??"missing",detail:`${((l=e.index)==null?void 0:l.patterns)??0} patterns · ${((c=e.index)==null?void 0:c.files)??0} files`}),i.jsx(qn,{icon:J0,label:"Graph",status:((u=e.graph)==null?void 0:u.status)??"missing",detail:`${((d=e.graph)==null?void 0:d.nodes)??0} nodes · ${((f=e.graph)==null?void 0:f.edges)??0} edges`}),i.jsx(qn,{icon:Ge,label:"Semantic",status:((h=e.semantic)==null?void 0:h.status)??"disabled",detail:((y=e.semantic)==null?void 0:y.message)??"Background enrichment"}),i.jsx(qn,{icon:eu,label:"Cache",status:((g=e.caches)==null?void 0:g.status)??"warming",detail:`${r}/4 layers populated`}),i.jsx(qn,{icon:Ze,label:"Learning",status:((k=e.learning)==null?void 0:k.status)??"idle",detail:`${((N=e.learning)==null?void 0:N.observations)??0} interactions · ${((m=e.learning)==null?void 0:m.total)??0} lessons`}),i.jsx(qn,{icon:ff,label:"Storage",status:((p=e.storage)==null?void 0:p.connectivity)??"local",detail:((v=e.storage)==null?void 0:v.connectivity)==="offline"?`${((j=e.storage)==null?void 0:j.queuedChanges)??0} queued`:((x=e.storage)==null?void 0:x.mode)??"local"})]})}function tr({icon:e,title:t,detail:n,state:s,tone:r="ready"}){return i.jsxs("div",{className:"setting-row",children:[i.jsx(e,{size:18,"aria-hidden":"true"}),i.jsxs("div",{children:[i.jsx("strong",{children:t}),i.jsx("span",{children:n})]}),i.jsx("em",{className:r,children:s})]})}function vN({health:e}){var r,o,a,l,c;const t=((r=e==null?void 0:e.storage)==null?void 0:r.mode)==="team",n=((o=e==null?void 0:e.semantic)==null?void 0:o.status)==="ready",s=((a=e==null?void 0:e.semantic)==null?void 0:a.provider)==="pgvector"&&n;return i.jsxs("section",{className:"studio-settings-view",children:[i.jsxs("header",{className:"page-intro",children:[i.jsx("span",{children:"Configuration"}),i.jsx("h1",{children:"Local-first by default"}),i.jsx("p",{children:"Rigour works from SQLite without signup or cloud infrastructure. PostgreSQL and pgvector add shared team knowledge when you choose them."})]}),i.jsxs("div",{className:"settings-card",children:[i.jsx(tr,{icon:Hn,title:"SQLite intelligence store",detail:"Scans, evidence, cache, checkpoints, patterns and personal lessons",state:"Active"}),i.jsx(tr,{icon:Ge,title:"Local semantic enrichment",detail:"Structural retrieval stays available while the on-device model warms",state:n?"Ready":((l=e==null?void 0:e.semantic)==null?void 0:l.status)||"Warming",tone:n?"ready":"waiting"}),i.jsx(tr,{icon:D0,title:"PostgreSQL team mode",detail:"Shared durability, stable identities, private namespaces and reviewed knowledge",state:t?((c=e==null?void 0:e.storage)==null?void 0:c.connectivity)||"Configured":"Not configured",tone:t?"ready":"waiting"}),i.jsx(tr,{icon:eu,title:"pgvector team recall",detail:"Optional ranking across validated personal and approved team lessons",state:s?"Ready":"Optional",tone:s?"ready":"waiting"}),i.jsx(tr,{icon:Jc,title:"Privacy boundary",detail:"Code leaves this machine only when a cloud deep-analysis provider is explicitly enabled",state:"Local default"})]}),i.jsxs("div",{className:"settings-command",children:[i.jsx("span",{children:"Team diagnostics"}),i.jsx("code",{children:"rigour team doctor"})]})]})}const Fh=oe.lazy(()=>T0(()=>import("./KnowledgeGraph-CWGbolsD.js"),__vite__mapDeps([0,1])).then(e=>({default:e.KnowledgeGraph}))),Gt={initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.28,ease:[.16,1,.3,1]}};function gN(){var ri,Hs,ii,Ws;const[e,t]=w.useState(()=>localStorage.getItem("rigour-theme")||"dark"),[n,s]=w.useState("knowledge"),[r,o]=w.useState([]),[a,l]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(!1),[h,y]=w.useState(null),[g,k]=w.useState([]),[N,m]=w.useState(null),[p,v]=w.useState("connecting"),[j,x]=w.useState(null),[S,C]=w.useState(!0),[T,R]=w.useState(0),[P,$]=w.useState(!1),O=oe.useCallback(async()=>{C(!0);try{const A=await fetch("/api/health"),B=await A.json();if(!A.ok)throw new Error(B.error||`HTTP ${A.status}`);x(B),R(Date.now())}catch(A){x({error:A instanceof Error?A.message:String(A)})}finally{C(!1)}},[]);oe.useEffect(()=>{const A=new EventSource("/api/events");A.onopen=()=>v("live"),A.onerror=()=>v("offline"),A.onmessage=de=>{try{const $e=JSON.parse(de.data);o(Dt=>[$e,...Dt].slice(0,100))}catch($e){console.error("Failed to parse event",$e)}},O();const B=window.setInterval(O,15e3);return fetch("/api/tree").then(de=>de.json()).then(k).catch(de=>console.error("Failed to fetch tree",de)),fetch("/api/info").then(de=>de.json()).then(m).catch(de=>console.error("Failed to fetch info",de)),()=>{A.close(),window.clearInterval(B)}},[O]),w.useEffect(()=>{if(!c||c.type!=="interception_requested"||!d){y(null);return}const A=c.timestamp?Date.parse(c.timestamp):Date.now(),B=()=>{const $e=Math.floor((Date.now()-A)/1e3),Dt=Math.max(0,60-$e);y(Dt)};B();const de=setInterval(B,1e3);return()=>clearInterval(de)},[c,d]),w.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),localStorage.setItem("rigour-theme",e)},[e]);const Q=()=>t(A=>A==="dark"?"light":"dark"),[ge,z]=w.useState(""),[U,W]=w.useState({}),[M,_]=w.useState({}),[b,V]=w.useState(null),[I,ue]=w.useState(null),[je,be]=w.useState("loading"),re=oe.useCallback(async()=>{be("loading");const A=await Promise.allSettled([fetch("/api/config").then(B=>B.ok?B.text():""),fetch("/api/memory").then(B=>B.ok?B.json():Promise.reject(new Error(`Memory HTTP ${B.status}`))),fetch("/api/index-stats").then(B=>B.ok?B.json():Promise.reject(new Error(`Index HTTP ${B.status}`))),fetch("/api/agents").then(B=>B.ok?B.json():Promise.reject(new Error(`Agents HTTP ${B.status}`))),fetch("/api/checkpoints").then(B=>B.ok?B.json():Promise.reject(new Error(`Checkpoints HTTP ${B.status}`)))]);A[0].status==="fulfilled"&&z(A[0].value),A[1].status==="fulfilled"&&W(A[1].value),A[2].status==="fulfilled"&&_(A[2].value),A[3].status==="fulfilled"&&V(A[3].value),A[4].status==="fulfilled"&&ue(A[4].value),be(A.every(B=>B.status==="fulfilled")?"ready":"degraded")},[]);w.useEffect(()=>{re()},[re]);const qe=async A=>{try{const B=A.replace(/\s*\(\d+\s*lines\)$/,""),$e=await(await fetch(`/api/file?path=${encodeURIComponent(B)}`)).text();l({filename:B,original:$e,modified:$e})}catch(B){console.error("Failed to fetch file content",B)}},$s=async A=>{if(c)try{await fetch("/api/arbitrate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestId:c.requestId||c.id,decision:A,token:c.arbitrationToken,timestamp:new Date().toISOString()})}),o(B=>B.map(de=>(de.requestId||de.id)===(c.requestId||c.id)?{...de,status:A==="approve"?"success":"error",arbitrated:!0,decision:A}:de)),f(!1),u(null)}catch(B){console.error("Arbitration failed",B)}},Kn=[{id:"knowledge",label:"Map",icon:eu,tabs:["knowledge"]},{id:"agents",label:"Agents",icon:tn,tabs:["agents","handoffs","checkpoints"]},{id:"enforcement",label:"Review",icon:js,tabs:["enforcement","firewall","gates","audit"]},{id:"learning",label:"Knowledge",icon:Ge,tabs:["learning","lessons","patterns","memory","cost","deep","drift"]},{id:"settings",label:"Settings",icon:$l,tabs:["settings"]}],Bs={agents:[{id:"agents",label:"Agent history"},{id:"handoffs",label:"Handoffs"},{id:"checkpoints",label:"Checkpoints"}],enforcement:[{id:"enforcement",label:"Enforcement"},{id:"firewall",label:"Firewall"},{id:"gates",label:"Quality gates"},{id:"audit",label:"Audit trail"}],learning:[{id:"learning",label:"SME growth"},{id:"lessons",label:"Lessons"},{id:"patterns",label:"Patterns"},{id:"memory",label:"Memory"},{id:"cost",label:"Cost & context"},{id:"deep",label:"Deep analysis"},{id:"drift",label:"Drift"}]},Us=Kn.find(A=>A.tabs.includes(n))??Kn[0],Xo=(N==null?void 0:N.studioVersion)||(N==null?void 0:N.mcpVersion)||"—",Zo=(N==null?void 0:N.projectVersion)||(N==null?void 0:N.version)||"—",Jo=(N==null?void 0:N.projectName)||(N==null?void 0:N.name)||"project",ea=(N==null?void 0:N.projectPath)||(N==null?void 0:N.path)||"";return i.jsxs("div",{className:"studio",children:[i.jsxs("div",{className:"cinema-ambient","aria-hidden":"true",children:[i.jsx("div",{className:"ambient-blob blob-a"}),i.jsx("div",{className:"ambient-blob blob-b"})]}),i.jsxs("aside",{className:"sidebar glass-shell",children:[i.jsxs("div",{className:"brand",children:[i.jsx("div",{className:"logo-icon",children:i.jsx(js,{size:18})}),i.jsx("span",{children:"Rigour Studio"}),i.jsxs("div",{className:"version-pill",children:["v",Xo]})]}),i.jsx("nav",{children:Kn.map(A=>i.jsxs("button",{className:`nav-item ${A.tabs.includes(n)?"active":""}`,onClick:()=>s(A.id),children:[i.jsx(A.icon,{size:18}),i.jsx("span",{children:A.label}),A.tabs.includes(n)&&i.jsx(we.div,{layoutId:"nav-glow",className:"nav-glow"})]},A.id))}),i.jsxs("div",{className:"sidebar-footer",children:[i.jsxs("div",{className:"trust-indicator",children:[i.jsx(Jc,{size:14}),i.jsx("span",{children:"Local Governance"})]}),i.jsx("button",{className:"footer-item",onClick:()=>s("settings"),"aria-label":"Open settings",children:i.jsx($l,{size:18})}),i.jsx("button",{className:"footer-item",children:i.jsx($0,{size:18})})]})]}),i.jsxs("main",{className:"main-content",children:[i.jsxs("header",{className:"glass-shell",children:[i.jsx("div",{className:"header-left",children:N&&i.jsxs("div",{className:"project-identity",children:[i.jsx(Ds,{size:14,className:"folder-icon"}),i.jsx("span",{className:"project-name",children:Jo}),i.jsxs("span",{className:"project-version-pill",children:["v",Zo]}),i.jsx("span",{className:"project-path",children:ea})]})}),i.jsxs("div",{className:"header-right",children:[i.jsx("button",{type:"button",className:"connection-status",onClick:()=>$(A=>!A),"aria-expanded":P,children:i.jsxs("div",{className:`status-indicator ${p}`,children:[i.jsx("div",{className:"pulse-emitter"}),i.jsx("span",{children:p==="live"&&!(j!=null&&j.error)?"CONNECTED":p.toUpperCase()})]})}),i.jsx("button",{className:"theme-toggle",onClick:Q,"aria-label":"Toggle theme",children:e==="dark"?i.jsx(Y0,{size:18}):i.jsx(K0,{size:18})})]})]}),P&&i.jsxs("div",{className:"health-popover",children:[i.jsxs("div",{className:"health-popover-title",children:[i.jsx("strong",{children:"Rigour system health"}),i.jsx("button",{type:"button",onClick:()=>$(!1),"aria-label":"Close health",children:i.jsx(xo,{size:15})})]}),i.jsx(mN,{data:j,loading:S,stale:!!(T&&Date.now()-T>45e3),onRetry:O})]}),i.jsxs("div",{className:"view-container",children:[Bs[Us.id]&&i.jsx("nav",{className:"section-tabs","aria-label":`${Us.label} views`,children:Bs[Us.id].map(A=>i.jsx("button",{type:"button",className:n===A.id?"active":"",onClick:()=>s(A.id),children:A.label},A.id))}),je==="loading"&&i.jsxs("div",{className:"overview-banner",children:[i.jsx(Ze,{size:18,className:"spinning"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Loading workspace data"}),i.jsx("p",{children:"Views will appear as their data becomes available."})]})]}),je==="degraded"&&i.jsxs("div",{className:"overview-banner warn",role:"alert",children:[i.jsx(Ne,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"Some workspace data is unavailable"}),i.jsx("p",{children:"Available views remain usable."})]}),i.jsx("button",{type:"button",className:"refresh-btn",onClick:re,children:"Retry"})]}),i.jsx(pN,{resetKey:n,children:i.jsxs(r1,{mode:"wait",children:[n==="enforcement"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(aN,{onNavigate:s})},"enforcement"),n==="firewall"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(hN,{})},"firewall"),n==="learning"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(w.Suspense,{fallback:i.jsxs("div",{className:"graph-state",children:[i.jsx(Ze,{size:18,className:"spinning"})," Preparing expertise graph…"]}),children:i.jsx(Fh,{mode:"expertise",onNavigate:s})})},"learning"),n==="lessons"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(cN,{onNavigate:s})},"lessons"),n==="overview"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(sN,{onNavigate:s})},"overview"),n==="handoffs"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(lN,{})},"handoffs"),n==="audit"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(H2,{logs:r,onClearLogs:()=>o([]),onSelectLog:A=>{var B,de,$e;if(u(A),A!=null&&A._rigour_report||(A==null?void 0:A.type)==="interception_requested"){if(A!=null&&A._rigour_report){const Dt=($e=(de=(B=A._rigour_report.failures)==null?void 0:B[0])==null?void 0:de.files)==null?void 0:$e[0];Dt?qe(Dt):l(null)}else l(null);f(!0)}else l(null),f(!1)},selectedLog:c})},"audit"),n==="gates"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(U2,{})},"gates"),n==="deep"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(Z2,{})},"deep"),n==="drift"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(tN,{})},"drift"),n==="patterns"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(B2,{})},"patterns"),n==="memory"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx($2,{})},"memory"),n==="agents"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(Q2,{session:b})},"agents"),n==="knowledge"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(w.Suspense,{fallback:i.jsxs("div",{className:"graph-state",children:[i.jsx(Ze,{size:18,className:"spinning"})," Preparing impact map…"]}),children:i.jsx(Fh,{})})},"knowledge"),n==="checkpoints"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(Y2,{checkpoints:(I==null?void 0:I.checkpoints)||[]})},"checkpoints"),n==="cost"&&i.jsx(we.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(nN,{})},"cost"),n==="settings"&&i.jsx(we.div,{...Gt,className:"full-view",children:i.jsx(vN,{health:j})},"settings")]})}),c&&d&&i.jsx("div",{className:"governance-overlay",children:i.jsxs("div",{className:"governance-window",children:[i.jsxs("div",{className:"governance-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(js,{size:20}),i.jsxs("span",{children:["Governance Audit: ",c.tool]})]}),i.jsxs("div",{className:"hitl-actions",children:[c.type==="interception_requested"&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn-approve",onClick:()=>$s("approve"),children:[i.jsx(ft,{size:16})," Approve"]}),i.jsxs("button",{className:"btn-reject",onClick:()=>$s("reject"),children:[i.jsx(Rs,{size:16})," Reject"]}),i.jsx("div",{className:"divider"})]}),i.jsx("button",{onClick:()=>f(!1),className:"close-btn",children:i.jsx(xo,{size:20})})]})]}),i.jsx("div",{className:"governance-body",children:c.type==="interception_requested"?i.jsxs("div",{className:"interception-view",children:[i.jsxs("div",{className:"interception-card",children:[i.jsx(Bl,{size:48}),i.jsx("h4",{children:"Command Intercepted"}),i.jsx("div",{className:"command-box",children:i.jsx("code",{children:c.command})}),i.jsx("p",{children:"An AI agent is requesting to execute this command. Review the project state below before arbitrating."}),i.jsxs("div",{className:"warning-note",children:[i.jsx(Ne,{size:16}),i.jsxs("span",{children:["Fail-closed: auto-DENY in ",h??60,"s if no decision. Silent approve is disabled."]})]}),c.firewallDecision&&c.firewallDecision!=="allow"&&i.jsxs("div",{className:"warning-note",children:[i.jsx(Rs,{size:16}),i.jsxs("span",{children:["Pre-check: ",c.firewallDecision," — ",c.firewallReason]})]})]}),i.jsx(_h,{files:g.map(A=>A.replace(/\s*\(\d+\s*lines\)$/,"")),onSelect:A=>qe(A),activeFile:a==null?void 0:a.filename,violatedFiles:[]})]}):i.jsxs(i.Fragment,{children:[i.jsx(_h,{files:(((Hs=(ri=c._rigour_report)==null?void 0:ri.failures)==null?void 0:Hs.flatMap(A=>A.files||[]))||g).map(A=>A.replace(/\s*\(\d+\s*lines\)$/,"")),onSelect:A=>qe(A),activeFile:a==null?void 0:a.filename,violatedFiles:(((Ws=(ii=c._rigour_report)==null?void 0:ii.failures)==null?void 0:Ws.flatMap(A=>A.files||[]))||[]).map(A=>A.replace(/\s*\(\d+\s*lines\)$/,""))}),i.jsx("div",{className:"diff-view-area",children:a?i.jsx(F2,{filename:a.filename,originalCode:a.original,modifiedCode:a.modified,onClose:()=>l(null),theme:e}):i.jsxs("div",{className:"diff-placeholder",children:[i.jsx(Ze,{size:48}),i.jsx("p",{children:"Select a file to audit the proposed changes"})]})})]})})]})})]})]})]})}Ka.createRoot(document.getElementById("root")).render(i.jsx(oe.StrictMode,{children:i.jsx(gN,{})}));export{Ge as B,Hn as D,I0 as G,eu as N,oe as R,js as S,Ne as T,Q0 as a,tu as b,Me as c,Xg as g,i as j,w as r};
|