@clef-sh/cli 0.1.10 → 0.1.11-beta.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,58 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function Hd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ta={exports:{}},Nl={},Da={exports:{}},H={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var wr=Symbol.for("react.element"),Kd=Symbol.for("react.portal"),Vd=Symbol.for("react.fragment"),Qd=Symbol.for("react.strict_mode"),qd=Symbol.for("react.profiler"),Yd=Symbol.for("react.provider"),Gd=Symbol.for("react.context"),Xd=Symbol.for("react.forward_ref"),Jd=Symbol.for("react.suspense"),Zd=Symbol.for("react.memo"),ec=Symbol.for("react.lazy"),ps=Symbol.iterator;function tc(e){return e===null||typeof e!="object"?null:(e=ps&&e[ps]||e["@@iterator"],typeof e=="function"?e:null)}var Ia={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$a=Object.assign,Na={};function Nn(e,t,n){this.props=e,this.context=t,this.refs=Na,this.updater=n||Ia}Nn.prototype.isReactComponent={};Nn.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")};Nn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ma(){}Ma.prototype=Nn.prototype;function vo(e,t,n){this.props=e,this.context=t,this.refs=Na,this.updater=n||Ia}var ko=vo.prototype=new Ma;ko.constructor=vo;$a(ko,Nn.prototype);ko.isPureReactComponent=!0;var ms=Array.isArray,Pa=Object.prototype.hasOwnProperty,So={current:null},La={key:!0,ref:!0,__self:!0,__source:!0};function ba(e,t,n){var r,l={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Pa.call(t,r)&&!La.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1<u){for(var d=Array(u),p=0;p<u;p++)d[p]=arguments[p+2];l.children=d}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)l[r]===void 0&&(l[r]=u[r]);return{$$typeof:wr,type:e,key:i,ref:a,props:l,_owner:So.current}}function nc(e,t){return{$$typeof:wr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function jo(e){return typeof e=="object"&&e!==null&&e.$$typeof===wr}function rc(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ys=/\/+/g;function Xl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rc(""+e.key):t.toString(36)}function Xr(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case wr:case Kd:a=!0}}if(a)return a=e,l=l(a),e=r===""?"."+Xl(a,0):r,ms(l)?(n="",e!=null&&(n=e.replace(ys,"$&/")+"/"),Xr(l,t,n,"",function(p){return p})):l!=null&&(jo(l)&&(l=nc(l,n+(!l.key||a&&a.key===l.key?"":(""+l.key).replace(ys,"$&/")+"/")+e)),t.push(l)),1;if(a=0,r=r===""?".":r+":",ms(e))for(var u=0;u<e.length;u++){i=e[u];var d=r+Xl(i,u);a+=Xr(i,t,n,d,l)}else if(d=tc(e),typeof d=="function")for(e=d.call(e),u=0;!(i=e.next()).done;)i=i.value,d=r+Xl(i,u++),a+=Xr(i,t,n,d,l);else if(i==="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 Dr(e,t,n){if(e==null)return e;var r=[],l=0;return Xr(e,r,"","",function(i){return t.call(n,i,l++)}),r}function lc(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 Te={current:null},Jr={transition:null},ic={ReactCurrentDispatcher:Te,ReactCurrentBatchConfig:Jr,ReactCurrentOwner:So};function Ba(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Dr,forEach:function(e,t,n){Dr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Dr(e,function(){t++}),t},toArray:function(e){return Dr(e,function(t){return t})||[]},only:function(e){if(!jo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=Nn;H.Fragment=Vd;H.Profiler=qd;H.PureComponent=vo;H.StrictMode=Qd;H.Suspense=Jd;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ic;H.act=Ba;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 r=$a({},e.props),l=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=So.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(d in t)Pa.call(t,d)&&!La.hasOwnProperty(d)&&(r[d]=t[d]===void 0&&u!==void 0?u[d]:t[d])}var d=arguments.length-2;if(d===1)r.children=n;else if(1<d){u=Array(d);for(var p=0;p<d;p++)u[p]=arguments[p+2];r.children=u}return{$$typeof:wr,type:e.type,key:l,ref:i,props:r,_owner:a}};H.createContext=function(e){return e={$$typeof:Gd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Yd,_context:e},e.Consumer=e};H.createElement=ba;H.createFactory=function(e){var t=ba.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:Xd,render:e}};H.isValidElement=jo;H.lazy=function(e){return{$$typeof:ec,_payload:{_status:-1,_result:e},_init:lc}};H.memo=function(e,t){return{$$typeof:Zd,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=Jr.transition;Jr.transition={};try{e()}finally{Jr.transition=t}};H.unstable_act=Ba;H.useCallback=function(e,t){return Te.current.useCallback(e,t)};H.useContext=function(e){return Te.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return Te.current.useDeferredValue(e)};H.useEffect=function(e,t){return Te.current.useEffect(e,t)};H.useId=function(){return Te.current.useId()};H.useImperativeHandle=function(e,t,n){return Te.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return Te.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return Te.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return Te.current.useMemo(e,t)};H.useReducer=function(e,t,n){return Te.current.useReducer(e,t,n)};H.useRef=function(e){return Te.current.useRef(e)};H.useState=function(e){return Te.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return Te.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return Te.current.useTransition()};H.version="18.3.1";Da.exports=H;var v=Da.exports;const Oa=Hd(v);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var oc=v,sc=Symbol.for("react.element"),ac=Symbol.for("react.fragment"),uc=Object.prototype.hasOwnProperty,dc=oc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cc={key:!0,ref:!0,__self:!0,__source:!0};function Aa(e,t,n){var r,l={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)uc.call(t,r)&&!cc.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:sc,type:e,key:i,ref:a,props:l,_owner:dc.current}}Nl.Fragment=ac;Nl.jsx=Aa;Nl.jsxs=Aa;Ta.exports=Nl;var s=Ta.exports,Ei={},Wa={exports:{}},Ue={},Ua={exports:{}},Ha={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t($,b){var A=$.length;$.push(b);e:for(;0<A;){var Z=A-1>>>1,ee=$[Z];if(0<l(ee,b))$[Z]=b,$[A]=ee,A=Z;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var b=$[0],A=$.pop();if(A!==b){$[0]=A;e:for(var Z=0,ee=$.length,be=ee>>>1;Z<be;){var ce=2*(Z+1)-1,wt=$[ce],Ke=ce+1,z=$[Ke];if(0>l(wt,A))Ke<ee&&0>l(z,wt)?($[Z]=z,$[Ke]=A,Z=Ke):($[Z]=wt,$[ce]=A,Z=ce);else if(Ke<ee&&0>l(z,A))$[Z]=z,$[Ke]=A,Z=Ke;else break e}}return b}function l($,b){var A=$.sortIndex-b.sortIndex;return A!==0?A:$.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var d=[],p=[],g=1,x=null,m=3,k=!1,S=!1,C=!1,F=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function c($){for(var b=n(p);b!==null;){if(b.callback===null)r(p);else if(b.startTime<=$)r(p),b.sortIndex=b.expirationTime,t(d,b);else break;b=n(p)}}function h($){if(C=!1,c($),!S)if(n(d)!==null)S=!0,L(w);else{var b=n(p);b!==null&&G(h,b.startTime-$)}}function w($,b){S=!1,C&&(C=!1,y(D),D=-1),k=!0;var A=m;try{for(c(b),x=n(d);x!==null&&(!(x.expirationTime>b)||$&&!J());){var Z=x.callback;if(typeof Z=="function"){x.callback=null,m=x.priorityLevel;var ee=Z(x.expirationTime<=b);b=e.unstable_now(),typeof ee=="function"?x.callback=ee:x===n(d)&&r(d),c(b)}else r(d);x=n(d)}if(x!==null)var be=!0;else{var ce=n(p);ce!==null&&G(h,ce.startTime-b),be=!1}return be}finally{x=null,m=A,k=!1}}var j=!1,_=null,D=-1,O=5,P=-1;function J(){return!(e.unstable_now()-P<O)}function ue(){if(_!==null){var $=e.unstable_now();P=$;var b=!0;try{b=_(!0,$)}finally{b?R():(j=!1,_=null)}}else j=!1}var R;if(typeof f=="function")R=function(){f(ue)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,T=B.port2;B.port1.onmessage=ue,R=function(){T.postMessage(null)}}else R=function(){F(ue,0)};function L($){_=$,j||(j=!0,R())}function G($,b){D=F(function(){$(e.unstable_now())},b)}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($){$.callback=null},e.unstable_continueExecution=function(){S||k||(S=!0,L(w))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function($){switch(m){case 1:case 2:case 3:var b=3;break;default:b=m}var A=m;m=b;try{return $()}finally{m=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,b){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var A=m;m=$;try{return b()}finally{m=A}},e.unstable_scheduleCallback=function($,b,A){var Z=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?Z+A:Z):A=Z,$){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=A+ee,$={id:g++,callback:b,priorityLevel:$,startTime:A,expirationTime:ee,sortIndex:-1},A>Z?($.sortIndex=A,t(p,$),n(d)===null&&$===n(p)&&(C?(y(D),D=-1):C=!0,G(h,A-Z))):($.sortIndex=ee,t(d,$),S||k||(S=!0,L(w))),$},e.unstable_shouldYield=J,e.unstable_wrapCallback=function($){var b=m;return function(){var A=m;m=b;try{return $.apply(this,arguments)}finally{m=A}}}})(Ha);Ua.exports=Ha;var fc=Ua.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var pc=v,We=fc;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 Ka=new Set,ir={};function nn(e,t){Fn(e,t),Fn(e+"Capture",t)}function Fn(e,t){for(ir[e]=t,e=0;e<t.length;e++)Ka.add(t[e])}var xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zi=Object.prototype.hasOwnProperty,mc=/^[: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]*$/,hs={},gs={};function yc(e){return zi.call(gs,e)?!0:zi.call(hs,e)?!1:mc.test(e)?gs[e]=!0:(hs[e]=!0,!1)}function hc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gc(e,t,n,r){if(t===null||typeof t>"u"||hc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,n,r,l,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){je[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];je[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){je[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){je[e]=new De(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){je[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){je[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){je[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){je[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){je[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var wo=/[\-:]([a-z])/g;function Co(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(wo,Co);je[t]=new De(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(wo,Co);je[t]=new De(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(wo,Co);je[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){je[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});je.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){je[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function Eo(e,t,n,r){var l=je.hasOwnProperty(t)?je[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(gc(t,n,l,r)&&(n=null),r||l===null?yc(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var jt=pc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ir=Symbol.for("react.element"),un=Symbol.for("react.portal"),dn=Symbol.for("react.fragment"),zo=Symbol.for("react.strict_mode"),Fi=Symbol.for("react.profiler"),Va=Symbol.for("react.provider"),Qa=Symbol.for("react.context"),Fo=Symbol.for("react.forward_ref"),Ri=Symbol.for("react.suspense"),_i=Symbol.for("react.suspense_list"),Ro=Symbol.for("react.memo"),Et=Symbol.for("react.lazy"),qa=Symbol.for("react.offscreen"),xs=Symbol.iterator;function Ln(e){return e===null||typeof e!="object"?null:(e=xs&&e[xs]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Object.assign,Jl;function Vn(e){if(Jl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jl=t&&t[1]||""}return`
34
- `+Jl+e}var Zl=!1;function ei(e,t){if(!e||Zl)return"";Zl=!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(p){var r=p}Reflect.construct(e,[],t)}else{try{t.call()}catch(p){r=p}e.call(t.prototype)}else{try{throw Error()}catch(p){r=p}e()}}catch(p){if(p&&r&&typeof p.stack=="string"){for(var l=p.stack.split(`
35
- `),i=r.stack.split(`
36
- `),a=l.length-1,u=i.length-1;1<=a&&0<=u&&l[a]!==i[u];)u--;for(;1<=a&&0<=u;a--,u--)if(l[a]!==i[u]){if(a!==1||u!==1)do if(a--,u--,0>u||l[a]!==i[u]){var d=`
37
- `+l[a].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=a&&0<=u);break}}}finally{Zl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vn(e):""}function xc(e){switch(e.tag){case 5:return Vn(e.type);case 16:return Vn("Lazy");case 13:return Vn("Suspense");case 19:return Vn("SuspenseList");case 0:case 2:case 15:return e=ei(e.type,!1),e;case 11:return e=ei(e.type.render,!1),e;case 1:return e=ei(e.type,!0),e;default:return""}}function Ti(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 dn:return"Fragment";case un:return"Portal";case Fi:return"Profiler";case zo:return"StrictMode";case Ri:return"Suspense";case _i:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qa:return(e.displayName||"Context")+".Consumer";case Va:return(e._context.displayName||"Context")+".Provider";case Fo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ro:return t=e.displayName||null,t!==null?t:Ti(e.type)||"Memo";case Et:t=e._payload,e=e._init;try{return Ti(e(t))}catch{}}return null}function vc(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 Ti(t);case 8:return t===zo?"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 Bt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ya(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kc(e){var t=Ya(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $r(e){e._valueTracker||(e._valueTracker=kc(e))}function Ga(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ya(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ul(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 Di(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Bt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xa(e,t){t=t.checked,t!=null&&Eo(e,"checked",t,!1)}function Ii(e,t){Xa(e,t);var n=Bt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$i(e,t.type,n):t.hasOwnProperty("defaultValue")&&$i(e,t.type,Bt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ks(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $i(e,t,n){(t!=="number"||ul(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qn=Array.isArray;function Sn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Bt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Ni(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ss(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(Qn(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Bt(n)}}function Ja(e,t){var n=Bt(t.value),r=Bt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function js(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Za(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 Mi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Za(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Nr,eu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Nr=Nr||document.createElement("div"),Nr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Nr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gn={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},Sc=["Webkit","ms","Moz","O"];Object.keys(Gn).forEach(function(e){Sc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gn[t]=Gn[e]})});function tu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gn.hasOwnProperty(e)&&Gn[e]?(""+t).trim():t+"px"}function nu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=tu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var jc=ae({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 Pi(e,t){if(t){if(jc[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 Li(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 bi=null;function _o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bi=null,jn=null,wn=null;function ws(e){if(e=zr(e)){if(typeof Bi!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Bl(t),Bi(e.stateNode,e.type,t))}}function ru(e){jn?wn?wn.push(e):wn=[e]:jn=e}function lu(){if(jn){var e=jn,t=wn;if(wn=jn=null,ws(e),t)for(e=0;e<t.length;e++)ws(t[e])}}function iu(e,t){return e(t)}function ou(){}var ti=!1;function su(e,t,n){if(ti)return e(t,n);ti=!0;try{return iu(e,t,n)}finally{ti=!1,(jn!==null||wn!==null)&&(ou(),lu())}}function sr(e,t){var n=e.stateNode;if(n===null)return null;var r=Bl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var Oi=!1;if(xt)try{var bn={};Object.defineProperty(bn,"passive",{get:function(){Oi=!0}}),window.addEventListener("test",bn,bn),window.removeEventListener("test",bn,bn)}catch{Oi=!1}function wc(e,t,n,r,l,i,a,u,d){var p=Array.prototype.slice.call(arguments,3);try{t.apply(n,p)}catch(g){this.onError(g)}}var Xn=!1,dl=null,cl=!1,Ai=null,Cc={onError:function(e){Xn=!0,dl=e}};function Ec(e,t,n,r,l,i,a,u,d){Xn=!1,dl=null,wc.apply(Cc,arguments)}function zc(e,t,n,r,l,i,a,u,d){if(Ec.apply(this,arguments),Xn){if(Xn){var p=dl;Xn=!1,dl=null}else throw Error(E(198));cl||(cl=!0,Ai=p)}}function rn(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 au(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 Cs(e){if(rn(e)!==e)throw Error(E(188))}function Fc(e){var t=e.alternate;if(!t){if(t=rn(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return Cs(l),e;if(i===r)return Cs(l),t;i=i.sibling}throw Error(E(188))}if(n.return!==r.return)n=l,r=i;else{for(var a=!1,u=l.child;u;){if(u===n){a=!0,n=l,r=i;break}if(u===r){a=!0,r=l,n=i;break}u=u.sibling}if(!a){for(u=i.child;u;){if(u===n){a=!0,n=i,r=l;break}if(u===r){a=!0,r=i,n=l;break}u=u.sibling}if(!a)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function uu(e){return e=Fc(e),e!==null?du(e):null}function du(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=du(e);if(t!==null)return t;e=e.sibling}return null}var cu=We.unstable_scheduleCallback,Es=We.unstable_cancelCallback,Rc=We.unstable_shouldYield,_c=We.unstable_requestPaint,fe=We.unstable_now,Tc=We.unstable_getCurrentPriorityLevel,To=We.unstable_ImmediatePriority,fu=We.unstable_UserBlockingPriority,fl=We.unstable_NormalPriority,Dc=We.unstable_LowPriority,pu=We.unstable_IdlePriority,Ml=null,dt=null;function Ic(e){if(dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Ml,e,void 0,(e.current.flags&128)===128)}catch{}}var rt=Math.clz32?Math.clz32:Mc,$c=Math.log,Nc=Math.LN2;function Mc(e){return e>>>=0,e===0?32:31-($c(e)/Nc|0)|0}var Mr=64,Pr=4194304;function qn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~l;u!==0?r=qn(u):(i&=a,i!==0&&(r=qn(i)))}else a=n&~l,a!==0?r=qn(a):i!==0&&(r=qn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rt(t),l=1<<n,r|=e[n],t&=~l;return r}function Pc(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 Lc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-rt(i),u=1<<a,d=l[a];d===-1?(!(u&n)||u&r)&&(l[a]=Pc(u,t)):d<=t&&(e.expiredLanes|=u),i&=~u}}function Wi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function mu(){var e=Mr;return Mr<<=1,!(Mr&4194240)&&(Mr=64),e}function ni(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Cr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rt(t),e[t]=n}function bc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-rt(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function Do(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var Y=0;function yu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hu,Io,gu,xu,vu,Ui=!1,Lr=[],Dt=null,It=null,$t=null,ar=new Map,ur=new Map,Ft=[],Bc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zs(e,t){switch(e){case"focusin":case"focusout":Dt=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":$t=null;break;case"pointerover":case"pointerout":ar.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ur.delete(t.pointerId)}}function Bn(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=zr(t),t!==null&&Io(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Oc(e,t,n,r,l){switch(t){case"focusin":return Dt=Bn(Dt,e,t,n,r,l),!0;case"dragenter":return It=Bn(It,e,t,n,r,l),!0;case"mouseover":return $t=Bn($t,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return ar.set(i,Bn(ar.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,ur.set(i,Bn(ur.get(i)||null,e,t,n,r,l)),!0}return!1}function ku(e){var t=Vt(e.target);if(t!==null){var n=rn(t);if(n!==null){if(t=n.tag,t===13){if(t=au(n),t!==null){e.blockedOn=t,vu(e.priority,function(){gu(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 Zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bi=r,n.target.dispatchEvent(r),bi=null}else return t=zr(n),t!==null&&Io(t),e.blockedOn=n,!1;t.shift()}return!0}function Fs(e,t,n){Zr(e)&&n.delete(t)}function Ac(){Ui=!1,Dt!==null&&Zr(Dt)&&(Dt=null),It!==null&&Zr(It)&&(It=null),$t!==null&&Zr($t)&&($t=null),ar.forEach(Fs),ur.forEach(Fs)}function On(e,t){e.blockedOn===t&&(e.blockedOn=null,Ui||(Ui=!0,We.unstable_scheduleCallback(We.unstable_NormalPriority,Ac)))}function dr(e){function t(l){return On(l,e)}if(0<Lr.length){On(Lr[0],e);for(var n=1;n<Lr.length;n++){var r=Lr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Dt!==null&&On(Dt,e),It!==null&&On(It,e),$t!==null&&On($t,e),ar.forEach(t),ur.forEach(t),n=0;n<Ft.length;n++)r=Ft[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ft.length&&(n=Ft[0],n.blockedOn===null);)ku(n),n.blockedOn===null&&Ft.shift()}var Cn=jt.ReactCurrentBatchConfig,ml=!0;function Wc(e,t,n,r){var l=Y,i=Cn.transition;Cn.transition=null;try{Y=1,$o(e,t,n,r)}finally{Y=l,Cn.transition=i}}function Uc(e,t,n,r){var l=Y,i=Cn.transition;Cn.transition=null;try{Y=4,$o(e,t,n,r)}finally{Y=l,Cn.transition=i}}function $o(e,t,n,r){if(ml){var l=Hi(e,t,n,r);if(l===null)fi(e,t,r,yl,n),zs(e,r);else if(Oc(l,e,t,n,r))r.stopPropagation();else if(zs(e,r),t&4&&-1<Bc.indexOf(e)){for(;l!==null;){var i=zr(l);if(i!==null&&hu(i),i=Hi(e,t,n,r),i===null&&fi(e,t,r,yl,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else fi(e,t,r,null,n)}}var yl=null;function Hi(e,t,n,r){if(yl=null,e=_o(r),e=Vt(e),e!==null)if(t=rn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=au(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 yl=e,null}function Su(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(Tc()){case To:return 1;case fu:return 4;case fl:case Dc:return 16;case pu:return 536870912;default:return 16}default:return 16}}var _t=null,No=null,el=null;function ju(){if(el)return el;var e,t=No,n=t.length,r,l="value"in _t?_t.value:_t.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===l[i-r];r++);return el=l.slice(e,1<r?1-r:void 0)}function tl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function br(){return!0}function Rs(){return!1}function He(e){function t(n,r,l,i,a){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?br:Rs,this.isPropagationStopped=Rs,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=br)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=br)},persist:function(){},isPersistent:br}),t}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mo=He(Mn),Er=ae({},Mn,{view:0,detail:0}),Hc=He(Er),ri,li,An,Pl=ae({},Er,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Po,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!==An&&(An&&e.type==="mousemove"?(ri=e.screenX-An.screenX,li=e.screenY-An.screenY):li=ri=0,An=e),ri)},movementY:function(e){return"movementY"in e?e.movementY:li}}),_s=He(Pl),Kc=ae({},Pl,{dataTransfer:0}),Vc=He(Kc),Qc=ae({},Er,{relatedTarget:0}),ii=He(Qc),qc=ae({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0}),Yc=He(qc),Gc=ae({},Mn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xc=He(Gc),Jc=ae({},Mn,{data:0}),Ts=He(Jc),Zc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ef={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"},tf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tf[e])?!!t[e]:!1}function Po(){return nf}var rf=ae({},Er,{key:function(e){if(e.key){var t=Zc[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ef[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Po,charCode:function(e){return e.type==="keypress"?tl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lf=He(rf),of=ae({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ds=He(of),sf=ae({},Er,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Po}),af=He(sf),uf=ae({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0}),df=He(uf),cf=ae({},Pl,{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}),ff=He(cf),pf=[9,13,27,32],Lo=xt&&"CompositionEvent"in window,Jn=null;xt&&"documentMode"in document&&(Jn=document.documentMode);var mf=xt&&"TextEvent"in window&&!Jn,wu=xt&&(!Lo||Jn&&8<Jn&&11>=Jn),Is=" ",$s=!1;function Cu(e,t){switch(e){case"keyup":return pf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cn=!1;function yf(e,t){switch(e){case"compositionend":return Eu(t);case"keypress":return t.which!==32?null:($s=!0,Is);case"textInput":return e=t.data,e===Is&&$s?null:e;default:return null}}function hf(e,t){if(cn)return e==="compositionend"||!Lo&&Cu(e,t)?(e=ju(),el=No=_t=null,cn=!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 wu&&t.locale!=="ko"?null:t.data;default:return null}}var gf={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 Ns(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gf[e.type]:t==="textarea"}function zu(e,t,n,r){ru(r),t=hl(t,"onChange"),0<t.length&&(n=new Mo("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zn=null,cr=null;function xf(e){Lu(e,0)}function Ll(e){var t=mn(e);if(Ga(t))return e}function vf(e,t){if(e==="change")return t}var Fu=!1;if(xt){var oi;if(xt){var si="oninput"in document;if(!si){var Ms=document.createElement("div");Ms.setAttribute("oninput","return;"),si=typeof Ms.oninput=="function"}oi=si}else oi=!1;Fu=oi&&(!document.documentMode||9<document.documentMode)}function Ps(){Zn&&(Zn.detachEvent("onpropertychange",Ru),cr=Zn=null)}function Ru(e){if(e.propertyName==="value"&&Ll(cr)){var t=[];zu(t,cr,e,_o(e)),su(xf,t)}}function kf(e,t,n){e==="focusin"?(Ps(),Zn=t,cr=n,Zn.attachEvent("onpropertychange",Ru)):e==="focusout"&&Ps()}function Sf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ll(cr)}function jf(e,t){if(e==="click")return Ll(t)}function wf(e,t){if(e==="input"||e==="change")return Ll(t)}function Cf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var it=typeof Object.is=="function"?Object.is:Cf;function fr(e,t){if(it(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!zi.call(t,l)||!it(e[l],t[l]))return!1}return!0}function Ls(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bs(e,t){var n=Ls(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ls(n)}}function _u(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_u(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tu(){for(var e=window,t=ul();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ul(e.document)}return t}function bo(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 Ef(e){var t=Tu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_u(n.ownerDocument.documentElement,n)){if(r!==null&&bo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=bs(n,i);var a=bs(n,r);l&&a&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var zf=xt&&"documentMode"in document&&11>=document.documentMode,fn=null,Ki=null,er=null,Vi=!1;function Bs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vi||fn==null||fn!==ul(r)||(r=fn,"selectionStart"in r&&bo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),er&&fr(er,r)||(er=r,r=hl(Ki,"onSelect"),0<r.length&&(t=new Mo("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fn)))}function Br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pn={animationend:Br("Animation","AnimationEnd"),animationiteration:Br("Animation","AnimationIteration"),animationstart:Br("Animation","AnimationStart"),transitionend:Br("Transition","TransitionEnd")},ai={},Du={};xt&&(Du=document.createElement("div").style,"AnimationEvent"in window||(delete pn.animationend.animation,delete pn.animationiteration.animation,delete pn.animationstart.animation),"TransitionEvent"in window||delete pn.transitionend.transition);function bl(e){if(ai[e])return ai[e];if(!pn[e])return e;var t=pn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Du)return ai[e]=t[n];return e}var Iu=bl("animationend"),$u=bl("animationiteration"),Nu=bl("animationstart"),Mu=bl("transitionend"),Pu=new Map,Os="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 At(e,t){Pu.set(e,t),nn(t,[e])}for(var ui=0;ui<Os.length;ui++){var di=Os[ui],Ff=di.toLowerCase(),Rf=di[0].toUpperCase()+di.slice(1);At(Ff,"on"+Rf)}At(Iu,"onAnimationEnd");At($u,"onAnimationIteration");At(Nu,"onAnimationStart");At("dblclick","onDoubleClick");At("focusin","onFocus");At("focusout","onBlur");At(Mu,"onTransitionEnd");Fn("onMouseEnter",["mouseout","mouseover"]);Fn("onMouseLeave",["mouseout","mouseover"]);Fn("onPointerEnter",["pointerout","pointerover"]);Fn("onPointerLeave",["pointerout","pointerover"]);nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));nn("onBeforeInput",["compositionend","keypress","textInput","paste"]);nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yn="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(" "),_f=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yn));function As(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,zc(r,t,void 0,e),e.currentTarget=null}function Lu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],d=u.instance,p=u.currentTarget;if(u=u.listener,d!==i&&l.isPropagationStopped())break e;As(l,u,p),i=d}else for(a=0;a<r.length;a++){if(u=r[a],d=u.instance,p=u.currentTarget,u=u.listener,d!==i&&l.isPropagationStopped())break e;As(l,u,p),i=d}}}if(cl)throw e=Ai,cl=!1,Ai=null,e}function ne(e,t){var n=t[Xi];n===void 0&&(n=t[Xi]=new Set);var r=e+"__bubble";n.has(r)||(bu(t,e,2,!1),n.add(r))}function ci(e,t,n){var r=0;t&&(r|=4),bu(n,e,r,t)}var Or="_reactListening"+Math.random().toString(36).slice(2);function pr(e){if(!e[Or]){e[Or]=!0,Ka.forEach(function(n){n!=="selectionchange"&&(_f.has(n)||ci(n,!1,e),ci(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Or]||(t[Or]=!0,ci("selectionchange",!1,t))}}function bu(e,t,n,r){switch(Su(t)){case 1:var l=Wc;break;case 4:l=Uc;break;default:l=$o}n=l.bind(null,t,n,e),l=void 0,!Oi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function fi(e,t,n,r,l){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var u=r.stateNode.containerInfo;if(u===l||u.nodeType===8&&u.parentNode===l)break;if(a===4)for(a=r.return;a!==null;){var d=a.tag;if((d===3||d===4)&&(d=a.stateNode.containerInfo,d===l||d.nodeType===8&&d.parentNode===l))return;a=a.return}for(;u!==null;){if(a=Vt(u),a===null)return;if(d=a.tag,d===5||d===6){r=i=a;continue e}u=u.parentNode}}r=r.return}su(function(){var p=i,g=_o(n),x=[];e:{var m=Pu.get(e);if(m!==void 0){var k=Mo,S=e;switch(e){case"keypress":if(tl(n)===0)break e;case"keydown":case"keyup":k=lf;break;case"focusin":S="focus",k=ii;break;case"focusout":S="blur",k=ii;break;case"beforeblur":case"afterblur":k=ii;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":k=_s;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Vc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=af;break;case Iu:case $u:case Nu:k=Yc;break;case Mu:k=df;break;case"scroll":k=Hc;break;case"wheel":k=ff;break;case"copy":case"cut":case"paste":k=Xc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Ds}var C=(t&4)!==0,F=!C&&e==="scroll",y=C?m!==null?m+"Capture":null:m;C=[];for(var f=p,c;f!==null;){c=f;var h=c.stateNode;if(c.tag===5&&h!==null&&(c=h,y!==null&&(h=sr(f,y),h!=null&&C.push(mr(f,h,c)))),F)break;f=f.return}0<C.length&&(m=new k(m,S,null,n,g),x.push({event:m,listeners:C}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",m&&n!==bi&&(S=n.relatedTarget||n.fromElement)&&(Vt(S)||S[vt]))break e;if((k||m)&&(m=g.window===g?g:(m=g.ownerDocument)?m.defaultView||m.parentWindow:window,k?(S=n.relatedTarget||n.toElement,k=p,S=S?Vt(S):null,S!==null&&(F=rn(S),S!==F||S.tag!==5&&S.tag!==6)&&(S=null)):(k=null,S=p),k!==S)){if(C=_s,h="onMouseLeave",y="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(C=Ds,h="onPointerLeave",y="onPointerEnter",f="pointer"),F=k==null?m:mn(k),c=S==null?m:mn(S),m=new C(h,f+"leave",k,n,g),m.target=F,m.relatedTarget=c,h=null,Vt(g)===p&&(C=new C(y,f+"enter",S,n,g),C.target=c,C.relatedTarget=F,h=C),F=h,k&&S)t:{for(C=k,y=S,f=0,c=C;c;c=sn(c))f++;for(c=0,h=y;h;h=sn(h))c++;for(;0<f-c;)C=sn(C),f--;for(;0<c-f;)y=sn(y),c--;for(;f--;){if(C===y||y!==null&&C===y.alternate)break t;C=sn(C),y=sn(y)}C=null}else C=null;k!==null&&Ws(x,m,k,C,!1),S!==null&&F!==null&&Ws(x,F,S,C,!0)}}e:{if(m=p?mn(p):window,k=m.nodeName&&m.nodeName.toLowerCase(),k==="select"||k==="input"&&m.type==="file")var w=vf;else if(Ns(m))if(Fu)w=wf;else{w=Sf;var j=kf}else(k=m.nodeName)&&k.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(w=jf);if(w&&(w=w(e,p))){zu(x,w,n,g);break e}j&&j(e,m,p),e==="focusout"&&(j=m._wrapperState)&&j.controlled&&m.type==="number"&&$i(m,"number",m.value)}switch(j=p?mn(p):window,e){case"focusin":(Ns(j)||j.contentEditable==="true")&&(fn=j,Ki=p,er=null);break;case"focusout":er=Ki=fn=null;break;case"mousedown":Vi=!0;break;case"contextmenu":case"mouseup":case"dragend":Vi=!1,Bs(x,n,g);break;case"selectionchange":if(zf)break;case"keydown":case"keyup":Bs(x,n,g)}var _;if(Lo)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else cn?Cu(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(wu&&n.locale!=="ko"&&(cn||D!=="onCompositionStart"?D==="onCompositionEnd"&&cn&&(_=ju()):(_t=g,No="value"in _t?_t.value:_t.textContent,cn=!0)),j=hl(p,D),0<j.length&&(D=new Ts(D,e,null,n,g),x.push({event:D,listeners:j}),_?D.data=_:(_=Eu(n),_!==null&&(D.data=_)))),(_=mf?yf(e,n):hf(e,n))&&(p=hl(p,"onBeforeInput"),0<p.length&&(g=new Ts("onBeforeInput","beforeinput",null,n,g),x.push({event:g,listeners:p}),g.data=_))}Lu(x,t)})}function mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=sr(e,n),i!=null&&r.unshift(mr(e,i,l)),i=sr(e,t),i!=null&&r.push(mr(e,i,l))),e=e.return}return r}function sn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ws(e,t,n,r,l){for(var i=t._reactName,a=[];n!==null&&n!==r;){var u=n,d=u.alternate,p=u.stateNode;if(d!==null&&d===r)break;u.tag===5&&p!==null&&(u=p,l?(d=sr(n,i),d!=null&&a.unshift(mr(n,d,u))):l||(d=sr(n,i),d!=null&&a.push(mr(n,d,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Tf=/\r\n?/g,Df=/\u0000|\uFFFD/g;function Us(e){return(typeof e=="string"?e:""+e).replace(Tf,`
38
- `).replace(Df,"")}function Ar(e,t,n){if(t=Us(t),Us(e)!==t&&n)throw Error(E(425))}function gl(){}var Qi=null,qi=null;function Yi(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 Gi=typeof setTimeout=="function"?setTimeout:void 0,If=typeof clearTimeout=="function"?clearTimeout:void 0,Hs=typeof Promise=="function"?Promise:void 0,$f=typeof queueMicrotask=="function"?queueMicrotask:typeof Hs<"u"?function(e){return Hs.resolve(null).then(e).catch(Nf)}:Gi;function Nf(e){setTimeout(function(){throw e})}function pi(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),dr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);dr(t)}function Nt(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 Ks(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 Pn=Math.random().toString(36).slice(2),ut="__reactFiber$"+Pn,yr="__reactProps$"+Pn,vt="__reactContainer$"+Pn,Xi="__reactEvents$"+Pn,Mf="__reactListeners$"+Pn,Pf="__reactHandles$"+Pn;function Vt(e){var t=e[ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ks(e);e!==null;){if(n=e[ut])return n;e=Ks(e)}return t}e=n,n=e.parentNode}return null}function zr(e){return e=e[ut]||e[vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function Bl(e){return e[yr]||null}var Ji=[],yn=-1;function Wt(e){return{current:e}}function re(e){0>yn||(e.current=Ji[yn],Ji[yn]=null,yn--)}function te(e,t){yn++,Ji[yn]=e.current,e.current=t}var Ot={},Fe=Wt(Ot),Me=Wt(!1),Xt=Ot;function Rn(e,t){var n=e.type.contextTypes;if(!n)return Ot;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Pe(e){return e=e.childContextTypes,e!=null}function xl(){re(Me),re(Fe)}function Vs(e,t,n){if(Fe.current!==Ot)throw Error(E(168));te(Fe,t),te(Me,n)}function Bu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(E(108,vc(e)||"Unknown",l));return ae({},n,r)}function vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ot,Xt=Fe.current,te(Fe,e),te(Me,Me.current),!0}function Qs(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=Bu(e,t,Xt),r.__reactInternalMemoizedMergedChildContext=e,re(Me),re(Fe),te(Fe,e)):re(Me),te(Me,n)}var mt=null,Ol=!1,mi=!1;function Ou(e){mt===null?mt=[e]:mt.push(e)}function Lf(e){Ol=!0,Ou(e)}function Ut(){if(!mi&&mt!==null){mi=!0;var e=0,t=Y;try{var n=mt;for(Y=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}mt=null,Ol=!1}catch(l){throw mt!==null&&(mt=mt.slice(e+1)),cu(To,Ut),l}finally{Y=t,mi=!1}}return null}var hn=[],gn=0,kl=null,Sl=0,Ve=[],Qe=0,Jt=null,yt=1,ht="";function Ht(e,t){hn[gn++]=Sl,hn[gn++]=kl,kl=e,Sl=t}function Au(e,t,n){Ve[Qe++]=yt,Ve[Qe++]=ht,Ve[Qe++]=Jt,Jt=e;var r=yt;e=ht;var l=32-rt(r)-1;r&=~(1<<l),n+=1;var i=32-rt(t)+l;if(30<i){var a=l-l%5;i=(r&(1<<a)-1).toString(32),r>>=a,l-=a,yt=1<<32-rt(t)+l|n<<l|r,ht=i+e}else yt=1<<i|n<<l|r,ht=e}function Bo(e){e.return!==null&&(Ht(e,1),Au(e,1,0))}function Oo(e){for(;e===kl;)kl=hn[--gn],hn[gn]=null,Sl=hn[--gn],hn[gn]=null;for(;e===Jt;)Jt=Ve[--Qe],Ve[Qe]=null,ht=Ve[--Qe],Ve[Qe]=null,yt=Ve[--Qe],Ve[Qe]=null}var Ae=null,Oe=null,ie=!1,nt=null;function Wu(e,t){var n=Ye(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 qs(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,Ae=e,Oe=Nt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ae=e,Oe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Jt!==null?{id:yt,overflow:ht}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ye(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ae=e,Oe=null,!0):!1;default:return!1}}function Zi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function eo(e){if(ie){var t=Oe;if(t){var n=t;if(!qs(e,t)){if(Zi(e))throw Error(E(418));t=Nt(n.nextSibling);var r=Ae;t&&qs(e,t)?Wu(r,n):(e.flags=e.flags&-4097|2,ie=!1,Ae=e)}}else{if(Zi(e))throw Error(E(418));e.flags=e.flags&-4097|2,ie=!1,Ae=e}}}function Ys(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ae=e}function Wr(e){if(e!==Ae)return!1;if(!ie)return Ys(e),ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Yi(e.type,e.memoizedProps)),t&&(t=Oe)){if(Zi(e))throw Uu(),Error(E(418));for(;t;)Wu(e,t),t=Nt(t.nextSibling)}if(Ys(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){Oe=Nt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Oe=null}}else Oe=Ae?Nt(e.stateNode.nextSibling):null;return!0}function Uu(){for(var e=Oe;e;)e=Nt(e.nextSibling)}function _n(){Oe=Ae=null,ie=!1}function Ao(e){nt===null?nt=[e]:nt.push(e)}var bf=jt.ReactCurrentBatchConfig;function Wn(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 r=n.stateNode}if(!r)throw Error(E(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var u=l.refs;a===null?delete u[i]:u[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function Ur(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gs(e){var t=e._init;return t(e._payload)}function Hu(e){function t(y,f){if(e){var c=y.deletions;c===null?(y.deletions=[f],y.flags|=16):c.push(f)}}function n(y,f){if(!e)return null;for(;f!==null;)t(y,f),f=f.sibling;return null}function r(y,f){for(y=new Map;f!==null;)f.key!==null?y.set(f.key,f):y.set(f.index,f),f=f.sibling;return y}function l(y,f){return y=bt(y,f),y.index=0,y.sibling=null,y}function i(y,f,c){return y.index=c,e?(c=y.alternate,c!==null?(c=c.index,c<f?(y.flags|=2,f):c):(y.flags|=2,f)):(y.flags|=1048576,f)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function u(y,f,c,h){return f===null||f.tag!==6?(f=Si(c,y.mode,h),f.return=y,f):(f=l(f,c),f.return=y,f)}function d(y,f,c,h){var w=c.type;return w===dn?g(y,f,c.props.children,h,c.key):f!==null&&(f.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Et&&Gs(w)===f.type)?(h=l(f,c.props),h.ref=Wn(y,f,c),h.return=y,h):(h=al(c.type,c.key,c.props,null,y.mode,h),h.ref=Wn(y,f,c),h.return=y,h)}function p(y,f,c,h){return f===null||f.tag!==4||f.stateNode.containerInfo!==c.containerInfo||f.stateNode.implementation!==c.implementation?(f=ji(c,y.mode,h),f.return=y,f):(f=l(f,c.children||[]),f.return=y,f)}function g(y,f,c,h,w){return f===null||f.tag!==7?(f=Gt(c,y.mode,h,w),f.return=y,f):(f=l(f,c),f.return=y,f)}function x(y,f,c){if(typeof f=="string"&&f!==""||typeof f=="number")return f=Si(""+f,y.mode,c),f.return=y,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Ir:return c=al(f.type,f.key,f.props,null,y.mode,c),c.ref=Wn(y,null,f),c.return=y,c;case un:return f=ji(f,y.mode,c),f.return=y,f;case Et:var h=f._init;return x(y,h(f._payload),c)}if(Qn(f)||Ln(f))return f=Gt(f,y.mode,c,null),f.return=y,f;Ur(y,f)}return null}function m(y,f,c,h){var w=f!==null?f.key:null;if(typeof c=="string"&&c!==""||typeof c=="number")return w!==null?null:u(y,f,""+c,h);if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Ir:return c.key===w?d(y,f,c,h):null;case un:return c.key===w?p(y,f,c,h):null;case Et:return w=c._init,m(y,f,w(c._payload),h)}if(Qn(c)||Ln(c))return w!==null?null:g(y,f,c,h,null);Ur(y,c)}return null}function k(y,f,c,h,w){if(typeof h=="string"&&h!==""||typeof h=="number")return y=y.get(c)||null,u(f,y,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Ir:return y=y.get(h.key===null?c:h.key)||null,d(f,y,h,w);case un:return y=y.get(h.key===null?c:h.key)||null,p(f,y,h,w);case Et:var j=h._init;return k(y,f,c,j(h._payload),w)}if(Qn(h)||Ln(h))return y=y.get(c)||null,g(f,y,h,w,null);Ur(f,h)}return null}function S(y,f,c,h){for(var w=null,j=null,_=f,D=f=0,O=null;_!==null&&D<c.length;D++){_.index>D?(O=_,_=null):O=_.sibling;var P=m(y,_,c[D],h);if(P===null){_===null&&(_=O);break}e&&_&&P.alternate===null&&t(y,_),f=i(P,f,D),j===null?w=P:j.sibling=P,j=P,_=O}if(D===c.length)return n(y,_),ie&&Ht(y,D),w;if(_===null){for(;D<c.length;D++)_=x(y,c[D],h),_!==null&&(f=i(_,f,D),j===null?w=_:j.sibling=_,j=_);return ie&&Ht(y,D),w}for(_=r(y,_);D<c.length;D++)O=k(_,y,D,c[D],h),O!==null&&(e&&O.alternate!==null&&_.delete(O.key===null?D:O.key),f=i(O,f,D),j===null?w=O:j.sibling=O,j=O);return e&&_.forEach(function(J){return t(y,J)}),ie&&Ht(y,D),w}function C(y,f,c,h){var w=Ln(c);if(typeof w!="function")throw Error(E(150));if(c=w.call(c),c==null)throw Error(E(151));for(var j=w=null,_=f,D=f=0,O=null,P=c.next();_!==null&&!P.done;D++,P=c.next()){_.index>D?(O=_,_=null):O=_.sibling;var J=m(y,_,P.value,h);if(J===null){_===null&&(_=O);break}e&&_&&J.alternate===null&&t(y,_),f=i(J,f,D),j===null?w=J:j.sibling=J,j=J,_=O}if(P.done)return n(y,_),ie&&Ht(y,D),w;if(_===null){for(;!P.done;D++,P=c.next())P=x(y,P.value,h),P!==null&&(f=i(P,f,D),j===null?w=P:j.sibling=P,j=P);return ie&&Ht(y,D),w}for(_=r(y,_);!P.done;D++,P=c.next())P=k(_,y,D,P.value,h),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?D:P.key),f=i(P,f,D),j===null?w=P:j.sibling=P,j=P);return e&&_.forEach(function(ue){return t(y,ue)}),ie&&Ht(y,D),w}function F(y,f,c,h){if(typeof c=="object"&&c!==null&&c.type===dn&&c.key===null&&(c=c.props.children),typeof c=="object"&&c!==null){switch(c.$$typeof){case Ir:e:{for(var w=c.key,j=f;j!==null;){if(j.key===w){if(w=c.type,w===dn){if(j.tag===7){n(y,j.sibling),f=l(j,c.props.children),f.return=y,y=f;break e}}else if(j.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Et&&Gs(w)===j.type){n(y,j.sibling),f=l(j,c.props),f.ref=Wn(y,j,c),f.return=y,y=f;break e}n(y,j);break}else t(y,j);j=j.sibling}c.type===dn?(f=Gt(c.props.children,y.mode,h,c.key),f.return=y,y=f):(h=al(c.type,c.key,c.props,null,y.mode,h),h.ref=Wn(y,f,c),h.return=y,y=h)}return a(y);case un:e:{for(j=c.key;f!==null;){if(f.key===j)if(f.tag===4&&f.stateNode.containerInfo===c.containerInfo&&f.stateNode.implementation===c.implementation){n(y,f.sibling),f=l(f,c.children||[]),f.return=y,y=f;break e}else{n(y,f);break}else t(y,f);f=f.sibling}f=ji(c,y.mode,h),f.return=y,y=f}return a(y);case Et:return j=c._init,F(y,f,j(c._payload),h)}if(Qn(c))return S(y,f,c,h);if(Ln(c))return C(y,f,c,h);Ur(y,c)}return typeof c=="string"&&c!==""||typeof c=="number"?(c=""+c,f!==null&&f.tag===6?(n(y,f.sibling),f=l(f,c),f.return=y,y=f):(n(y,f),f=Si(c,y.mode,h),f.return=y,y=f),a(y)):n(y,f)}return F}var Tn=Hu(!0),Ku=Hu(!1),jl=Wt(null),wl=null,xn=null,Wo=null;function Uo(){Wo=xn=wl=null}function Ho(e){var t=jl.current;re(jl),e._currentValue=t}function to(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function En(e,t){wl=e,Wo=xn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ne=!0),e.firstContext=null)}function Xe(e){var t=e._currentValue;if(Wo!==e)if(e={context:e,memoizedValue:t,next:null},xn===null){if(wl===null)throw Error(E(308));xn=e,wl.dependencies={lanes:0,firstContext:e}}else xn=xn.next=e;return t}var Qt=null;function Ko(e){Qt===null?Qt=[e]:Qt.push(e)}function Vu(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ko(t)):(n.next=l.next,l.next=n),t.interleaved=n,kt(e,r)}function kt(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 zt=!1;function Vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qu(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 gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,kt(e,n)}return l=r.interleaved,l===null?(t.next=t,Ko(r)):(t.next=l.next,l.next=t),r.interleaved=t,kt(e,n)}function nl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Do(e,n)}}function Xs(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Cl(e,t,n,r){var l=e.updateQueue;zt=!1;var i=l.firstBaseUpdate,a=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var d=u,p=d.next;d.next=null,a===null?i=p:a.next=p,a=d;var g=e.alternate;g!==null&&(g=g.updateQueue,u=g.lastBaseUpdate,u!==a&&(u===null?g.firstBaseUpdate=p:u.next=p,g.lastBaseUpdate=d))}if(i!==null){var x=l.baseState;a=0,g=p=d=null,u=i;do{var m=u.lane,k=u.eventTime;if((r&m)===m){g!==null&&(g=g.next={eventTime:k,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var S=e,C=u;switch(m=t,k=n,C.tag){case 1:if(S=C.payload,typeof S=="function"){x=S.call(k,x,m);break e}x=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=C.payload,m=typeof S=="function"?S.call(k,x,m):S,m==null)break e;x=ae({},x,m);break e;case 2:zt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[u]:m.push(u))}else k={eventTime:k,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},g===null?(p=g=k,d=x):g=g.next=k,a|=m;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;m=u,u=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(g===null&&(d=x),l.baseState=d,l.firstBaseUpdate=p,l.lastBaseUpdate=g,t=l.shared.interleaved,t!==null){l=t;do a|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);en|=a,e.lanes=a,e.memoizedState=x}}function Js(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(E(191,l));l.call(r)}}}var Fr={},ct=Wt(Fr),hr=Wt(Fr),gr=Wt(Fr);function qt(e){if(e===Fr)throw Error(E(174));return e}function Qo(e,t){switch(te(gr,t),te(hr,e),te(ct,Fr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mi(t,e)}re(ct),te(ct,t)}function Dn(){re(ct),re(hr),re(gr)}function qu(e){qt(gr.current);var t=qt(ct.current),n=Mi(t,e.type);t!==n&&(te(hr,e),te(ct,n))}function qo(e){hr.current===e&&(re(ct),re(hr))}var oe=Wt(0);function El(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 yi=[];function Yo(){for(var e=0;e<yi.length;e++)yi[e]._workInProgressVersionPrimary=null;yi.length=0}var rl=jt.ReactCurrentDispatcher,hi=jt.ReactCurrentBatchConfig,Zt=0,se=null,ye=null,xe=null,zl=!1,tr=!1,xr=0,Bf=0;function we(){throw Error(E(321))}function Go(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!it(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,l,i){if(Zt=i,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,rl.current=e===null||e.memoizedState===null?Uf:Hf,e=n(r,l),tr){i=0;do{if(tr=!1,xr=0,25<=i)throw Error(E(301));i+=1,xe=ye=null,t.updateQueue=null,rl.current=Kf,e=n(r,l)}while(tr)}if(rl.current=Fl,t=ye!==null&&ye.next!==null,Zt=0,xe=ye=se=null,zl=!1,t)throw Error(E(300));return e}function Jo(){var e=xr!==0;return xr=0,e}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xe===null?se.memoizedState=xe=e:xe=xe.next=e,xe}function Je(){if(ye===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=ye.next;var t=xe===null?se.memoizedState:xe.next;if(t!==null)xe=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},xe===null?se.memoizedState=xe=e:xe=xe.next=e}return xe}function vr(e,t){return typeof t=="function"?t(e):t}function gi(e){var t=Je(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=ye,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var a=l.next;l.next=i.next,i.next=a}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var u=a=null,d=null,p=i;do{var g=p.lane;if((Zt&g)===g)d!==null&&(d=d.next={lane:0,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null}),r=p.hasEagerState?p.eagerState:e(r,p.action);else{var x={lane:g,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null};d===null?(u=d=x,a=r):d=d.next=x,se.lanes|=g,en|=g}p=p.next}while(p!==null&&p!==i);d===null?a=r:d.next=u,it(r,t.memoizedState)||(Ne=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=d,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,se.lanes|=i,en|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xi(e){var t=Je(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var a=l=l.next;do i=e(i,a.action),a=a.next;while(a!==l);it(i,t.memoizedState)||(Ne=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Yu(){}function Gu(e,t){var n=se,r=Je(),l=t(),i=!it(r.memoizedState,l);if(i&&(r.memoizedState=l,Ne=!0),r=r.queue,Zo(Zu.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||xe!==null&&xe.memoizedState.tag&1){if(n.flags|=2048,kr(9,Ju.bind(null,n,r,l,t),void 0,null),ve===null)throw Error(E(349));Zt&30||Xu(n,t,l)}return l}function Xu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ju(e,t,n,r){t.value=n,t.getSnapshot=r,ed(t)&&td(e)}function Zu(e,t,n){return n(function(){ed(t)&&td(e)})}function ed(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!it(e,n)}catch{return!0}}function td(e){var t=kt(e,1);t!==null&&lt(t,e,1,-1)}function Zs(e){var t=at();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vr,lastRenderedState:e},t.queue=e,e=e.dispatch=Wf.bind(null,se,e),[t.memoizedState,e]}function kr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function nd(){return Je().memoizedState}function ll(e,t,n,r){var l=at();se.flags|=e,l.memoizedState=kr(1|t,n,void 0,r===void 0?null:r)}function Al(e,t,n,r){var l=Je();r=r===void 0?null:r;var i=void 0;if(ye!==null){var a=ye.memoizedState;if(i=a.destroy,r!==null&&Go(r,a.deps)){l.memoizedState=kr(t,n,i,r);return}}se.flags|=e,l.memoizedState=kr(1|t,n,i,r)}function ea(e,t){return ll(8390656,8,e,t)}function Zo(e,t){return Al(2048,8,e,t)}function rd(e,t){return Al(4,2,e,t)}function ld(e,t){return Al(4,4,e,t)}function id(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 od(e,t,n){return n=n!=null?n.concat([e]):null,Al(4,4,id.bind(null,t,e),n)}function es(){}function sd(e,t){var n=Je();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ad(e,t){var n=Je();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Go(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ud(e,t,n){return Zt&21?(it(n,t)||(n=mu(),se.lanes|=n,en|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ne=!0),e.memoizedState=n)}function Of(e,t){var n=Y;Y=n!==0&&4>n?n:4,e(!0);var r=hi.transition;hi.transition={};try{e(!1),t()}finally{Y=n,hi.transition=r}}function dd(){return Je().memoizedState}function Af(e,t,n){var r=Lt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cd(e))fd(t,n);else if(n=Vu(e,t,n,r),n!==null){var l=_e();lt(n,e,r,l),pd(n,t,r)}}function Wf(e,t,n){var r=Lt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cd(e))fd(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,u=i(a,n);if(l.hasEagerState=!0,l.eagerState=u,it(u,a)){var d=t.interleaved;d===null?(l.next=l,Ko(t)):(l.next=d.next,d.next=l),t.interleaved=l;return}}catch{}finally{}n=Vu(e,t,l,r),n!==null&&(l=_e(),lt(n,e,r,l),pd(n,t,r))}}function cd(e){var t=e.alternate;return e===se||t!==null&&t===se}function fd(e,t){tr=zl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Do(e,n)}}var Fl={readContext:Xe,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useInsertionEffect:we,useLayoutEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useMutableSource:we,useSyncExternalStore:we,useId:we,unstable_isNewReconciler:!1},Uf={readContext:Xe,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,useEffect:ea,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ll(4194308,4,id.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ll(4194308,4,e,t)},useInsertionEffect:function(e,t){return ll(4,2,e,t)},useMemo:function(e,t){var n=at();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=at();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Af.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:Zs,useDebugValue:es,useDeferredValue:function(e){return at().memoizedState=e},useTransition:function(){var e=Zs(!1),t=e[0];return e=Of.bind(null,e[1]),at().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,l=at();if(ie){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),ve===null)throw Error(E(349));Zt&30||Xu(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,ea(Zu.bind(null,r,i,e),[e]),r.flags|=2048,kr(9,Ju.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=at(),t=ve.identifierPrefix;if(ie){var n=ht,r=yt;n=(r&~(1<<32-rt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Bf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hf={readContext:Xe,useCallback:sd,useContext:Xe,useEffect:Zo,useImperativeHandle:od,useInsertionEffect:rd,useLayoutEffect:ld,useMemo:ad,useReducer:gi,useRef:nd,useState:function(){return gi(vr)},useDebugValue:es,useDeferredValue:function(e){var t=Je();return ud(t,ye.memoizedState,e)},useTransition:function(){var e=gi(vr)[0],t=Je().memoizedState;return[e,t]},useMutableSource:Yu,useSyncExternalStore:Gu,useId:dd,unstable_isNewReconciler:!1},Kf={readContext:Xe,useCallback:sd,useContext:Xe,useEffect:Zo,useImperativeHandle:od,useInsertionEffect:rd,useLayoutEffect:ld,useMemo:ad,useReducer:xi,useRef:nd,useState:function(){return xi(vr)},useDebugValue:es,useDeferredValue:function(e){var t=Je();return ye===null?t.memoizedState=e:ud(t,ye.memoizedState,e)},useTransition:function(){var e=xi(vr)[0],t=Je().memoizedState;return[e,t]},useMutableSource:Yu,useSyncExternalStore:Gu,useId:dd,unstable_isNewReconciler:!1};function et(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function no(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wl={isMounted:function(e){return(e=e._reactInternals)?rn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_e(),l=Lt(e),i=gt(r,l);i.payload=t,n!=null&&(i.callback=n),t=Mt(e,i,l),t!==null&&(lt(t,e,l,r),nl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_e(),l=Lt(e),i=gt(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Mt(e,i,l),t!==null&&(lt(t,e,l,r),nl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_e(),r=Lt(e),l=gt(n,r);l.tag=2,t!=null&&(l.callback=t),t=Mt(e,l,r),t!==null&&(lt(t,e,r,n),nl(t,e,r))}};function ta(e,t,n,r,l,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!fr(n,r)||!fr(l,i):!0}function md(e,t,n){var r=!1,l=Ot,i=t.contextType;return typeof i=="object"&&i!==null?i=Xe(i):(l=Pe(t)?Xt:Fe.current,r=t.contextTypes,i=(r=r!=null)?Rn(e,l):Ot),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function na(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Wl.enqueueReplaceState(t,t.state,null)}function ro(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Vo(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=Xe(i):(i=Pe(t)?Xt:Fe.current,l.context=Rn(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(no(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Wl.enqueueReplaceState(l,l.state,null),Cl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function In(e,t){try{var n="",r=t;do n+=xc(r),r=r.return;while(r);var l=n}catch(i){l=`
39
- Error generating stack: `+i.message+`
40
- `+i.stack}return{value:e,source:t,stack:l,digest:null}}function vi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function lo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Vf=typeof WeakMap=="function"?WeakMap:Map;function yd(e,t,n){n=gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_l||(_l=!0,yo=r),lo(e,t)},n}function hd(e,t,n){n=gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){lo(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){lo(e,t),typeof r!="function"&&(Pt===null?Pt=new Set([this]):Pt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function ra(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vf;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=op.bind(null,e,t,n),t.then(e,e))}function la(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 ia(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=gt(-1,1),t.tag=2,Mt(n,t,1))),n.lanes|=1),e)}var Qf=jt.ReactCurrentOwner,Ne=!1;function Re(e,t,n,r){t.child=e===null?Ku(t,null,n,r):Tn(t,e.child,n,r)}function oa(e,t,n,r,l){n=n.render;var i=t.ref;return En(t,l),r=Xo(e,t,n,r,i,l),n=Jo(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,St(e,t,l)):(ie&&n&&Bo(t),t.flags|=1,Re(e,t,r,l),t.child)}function sa(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!as(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,gd(e,t,i,r,l)):(e=al(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:fr,n(a,r)&&e.ref===t.ref)return St(e,t,l)}return t.flags|=1,e=bt(i,r),e.ref=t.ref,e.return=t,t.child=e}function gd(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(fr(i,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,St(e,t,l)}return io(e,t,n,r,l)}function xd(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},te(kn,Be),Be|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,te(kn,Be),Be|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,te(kn,Be),Be|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,te(kn,Be),Be|=r;return Re(e,t,l,n),t.child}function vd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function io(e,t,n,r,l){var i=Pe(n)?Xt:Fe.current;return i=Rn(t,i),En(t,l),n=Xo(e,t,n,r,i,l),r=Jo(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,St(e,t,l)):(ie&&r&&Bo(t),t.flags|=1,Re(e,t,n,l),t.child)}function aa(e,t,n,r,l){if(Pe(n)){var i=!0;vl(t)}else i=!1;if(En(t,l),t.stateNode===null)il(e,t),md(t,n,r),ro(t,n,r,l),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var d=a.context,p=n.contextType;typeof p=="object"&&p!==null?p=Xe(p):(p=Pe(n)?Xt:Fe.current,p=Rn(t,p));var g=n.getDerivedStateFromProps,x=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function";x||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||d!==p)&&na(t,a,r,p),zt=!1;var m=t.memoizedState;a.state=m,Cl(t,r,a,l),d=t.memoizedState,u!==r||m!==d||Me.current||zt?(typeof g=="function"&&(no(t,n,g,r),d=t.memoizedState),(u=zt||ta(t,n,u,r,m,d,p))?(x||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=p,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Qu(e,t),u=t.memoizedProps,p=t.type===t.elementType?u:et(t.type,u),a.props=p,x=t.pendingProps,m=a.context,d=n.contextType,typeof d=="object"&&d!==null?d=Xe(d):(d=Pe(n)?Xt:Fe.current,d=Rn(t,d));var k=n.getDerivedStateFromProps;(g=typeof k=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==x||m!==d)&&na(t,a,r,d),zt=!1,m=t.memoizedState,a.state=m,Cl(t,r,a,l);var S=t.memoizedState;u!==x||m!==S||Me.current||zt?(typeof k=="function"&&(no(t,n,k,r),S=t.memoizedState),(p=zt||ta(t,n,p,r,m,S,d)||!1)?(g||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,S,d),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,S,d)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),a.props=r,a.state=S,a.context=d,r=p):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return oo(e,t,n,r,i,l)}function oo(e,t,n,r,l,i){vd(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return l&&Qs(t,n,!1),St(e,t,i);r=t.stateNode,Qf.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Tn(t,e.child,null,i),t.child=Tn(t,null,u,i)):Re(e,t,u,i),t.memoizedState=r.state,l&&Qs(t,n,!0),t.child}function kd(e){var t=e.stateNode;t.pendingContext?Vs(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Vs(e,t.context,!1),Qo(e,t.containerInfo)}function ua(e,t,n,r,l){return _n(),Ao(l),t.flags|=256,Re(e,t,n,r),t.child}var so={dehydrated:null,treeContext:null,retryLane:0};function ao(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sd(e,t,n){var r=t.pendingProps,l=oe.current,i=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),te(oe,l&1),e===null)return eo(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=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Kl(a,r,0,null),e=Gt(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ao(n),t.memoizedState=so,e):ts(t,a));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return qf(e,t,a,r,u,l,n);if(i){i=r.fallback,a=t.mode,l=e.child,u=l.sibling;var d={mode:"hidden",children:r.children};return!(a&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=d,t.deletions=null):(r=bt(l,d),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?i=bt(u,i):(i=Gt(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ao(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=so,r}return i=e.child,e=i.sibling,r=bt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ts(e,t){return t=Kl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hr(e,t,n,r){return r!==null&&Ao(r),Tn(t,e.child,null,n),e=ts(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qf(e,t,n,r,l,i,a){if(n)return t.flags&256?(t.flags&=-257,r=vi(Error(E(422))),Hr(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=Kl({mode:"visible",children:r.children},l,0,null),i=Gt(i,l,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Tn(t,e.child,null,a),t.child.memoizedState=ao(a),t.memoizedState=so,i);if(!(t.mode&1))return Hr(e,t,a,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(E(419)),r=vi(i,r,void 0),Hr(e,t,a,r)}if(u=(a&e.childLanes)!==0,Ne||u){if(r=ve,r!==null){switch(a&-a){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|a)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,kt(e,l),lt(r,e,l,-1))}return ss(),r=vi(Error(E(421))),Hr(e,t,a,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=sp.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,Oe=Nt(l.nextSibling),Ae=t,ie=!0,nt=null,e!==null&&(Ve[Qe++]=yt,Ve[Qe++]=ht,Ve[Qe++]=Jt,yt=e.id,ht=e.overflow,Jt=t),t=ts(t,r.children),t.flags|=4096,t)}function da(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),to(e.return,t,n)}function ki(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function jd(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(Re(e,t,r.children,n),r=oe.current,r&2)r=r&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&&da(e,n,t);else if(e.tag===19)da(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(te(oe,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&El(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ki(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&El(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ki(t,!0,n,null,i);break;case"together":ki(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function il(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function St(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),en|=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=bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Yf(e,t,n){switch(t.tag){case 3:kd(t),_n();break;case 5:qu(t);break;case 1:Pe(t.type)&&vl(t);break;case 4:Qo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;te(jl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(te(oe,oe.current&1),t.flags|=128,null):n&t.child.childLanes?Sd(e,t,n):(te(oe,oe.current&1),e=St(e,t,n),e!==null?e.sibling:null);te(oe,oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jd(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),te(oe,oe.current),r)break;return null;case 22:case 23:return t.lanes=0,xd(e,t,n)}return St(e,t,n)}var wd,uo,Cd,Ed;wd=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}};uo=function(){};Cd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,qt(ct.current);var i=null;switch(n){case"input":l=Di(e,l),r=Di(e,r),i=[];break;case"select":l=ae({},l,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":l=Ni(e,l),r=Ni(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=gl)}Pi(n,r);var a;n=null;for(p in l)if(!r.hasOwnProperty(p)&&l.hasOwnProperty(p)&&l[p]!=null)if(p==="style"){var u=l[p];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(ir.hasOwnProperty(p)?i||(i=[]):(i=i||[]).push(p,null));for(p in r){var d=r[p];if(u=l!=null?l[p]:void 0,r.hasOwnProperty(p)&&d!==u&&(d!=null||u!=null))if(p==="style")if(u){for(a in u)!u.hasOwnProperty(a)||d&&d.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in d)d.hasOwnProperty(a)&&u[a]!==d[a]&&(n||(n={}),n[a]=d[a])}else n||(i||(i=[]),i.push(p,n)),n=d;else p==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,u=u?u.__html:void 0,d!=null&&u!==d&&(i=i||[]).push(p,d)):p==="children"?typeof d!="string"&&typeof d!="number"||(i=i||[]).push(p,""+d):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(ir.hasOwnProperty(p)?(d!=null&&p==="onScroll"&&ne("scroll",e),i||u===d||(i=[])):(i=i||[]).push(p,d))}n&&(i=i||[]).push("style",n);var p=i;(t.updateQueue=p)&&(t.flags|=4)}};Ed=function(e,t,n,r){n!==r&&(t.flags|=4)};function Un(e,t){if(!ie)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gf(e,t,n){var r=t.pendingProps;switch(Oo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Pe(t.type)&&xl(),Ce(t),null;case 3:return r=t.stateNode,Dn(),re(Me),re(Fe),Yo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Wr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,nt!==null&&(xo(nt),nt=null))),uo(e,t),Ce(t),null;case 5:qo(t);var l=qt(gr.current);if(n=t.type,e!==null&&t.stateNode!=null)Cd(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return Ce(t),null}if(e=qt(ct.current),Wr(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[ut]=t,r[yr]=i,e=(t.mode&1)!==0,n){case"dialog":ne("cancel",r),ne("close",r);break;case"iframe":case"object":case"embed":ne("load",r);break;case"video":case"audio":for(l=0;l<Yn.length;l++)ne(Yn[l],r);break;case"source":ne("error",r);break;case"img":case"image":case"link":ne("error",r),ne("load",r);break;case"details":ne("toggle",r);break;case"input":vs(r,i),ne("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ne("invalid",r);break;case"textarea":Ss(r,i),ne("invalid",r)}Pi(n,i),l=null;for(var a in i)if(i.hasOwnProperty(a)){var u=i[a];a==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&Ar(r.textContent,u,e),l=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&Ar(r.textContent,u,e),l=["children",""+u]):ir.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&ne("scroll",r)}switch(n){case"input":$r(r),ks(r,i,!0);break;case"textarea":$r(r),js(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=gl)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Za(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ut]=t,e[yr]=r,wd(e,t,!1,!1),t.stateNode=e;e:{switch(a=Li(n,r),n){case"dialog":ne("cancel",e),ne("close",e),l=r;break;case"iframe":case"object":case"embed":ne("load",e),l=r;break;case"video":case"audio":for(l=0;l<Yn.length;l++)ne(Yn[l],e);l=r;break;case"source":ne("error",e),l=r;break;case"img":case"image":case"link":ne("error",e),ne("load",e),l=r;break;case"details":ne("toggle",e),l=r;break;case"input":vs(e,r),l=Di(e,r),ne("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=ae({},r,{value:void 0}),ne("invalid",e);break;case"textarea":Ss(e,r),l=Ni(e,r),ne("invalid",e);break;default:l=r}Pi(n,l),u=l;for(i in u)if(u.hasOwnProperty(i)){var d=u[i];i==="style"?nu(e,d):i==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,d!=null&&eu(e,d)):i==="children"?typeof d=="string"?(n!=="textarea"||d!=="")&&or(e,d):typeof d=="number"&&or(e,""+d):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ir.hasOwnProperty(i)?d!=null&&i==="onScroll"&&ne("scroll",e):d!=null&&Eo(e,i,d,a))}switch(n){case"input":$r(e),ks(e,r,!1);break;case"textarea":$r(e),js(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Bt(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Sn(e,!!r.multiple,i,!1):r.defaultValue!=null&&Sn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=gl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ce(t),null;case 6:if(e&&t.stateNode!=null)Ed(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=qt(gr.current),qt(ct.current),Wr(t)){if(r=t.stateNode,n=t.memoizedProps,r[ut]=t,(i=r.nodeValue!==n)&&(e=Ae,e!==null))switch(e.tag){case 3:Ar(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ar(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ut]=t,t.stateNode=r}return Ce(t),null;case 13:if(re(oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ie&&Oe!==null&&t.mode&1&&!(t.flags&128))Uu(),_n(),t.flags|=98560,i=!1;else if(i=Wr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(E(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(E(317));i[ut]=t}else _n(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),i=!1}else nt!==null&&(xo(nt),nt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||oe.current&1?he===0&&(he=3):ss())),t.updateQueue!==null&&(t.flags|=4),Ce(t),null);case 4:return Dn(),uo(e,t),e===null&&pr(t.stateNode.containerInfo),Ce(t),null;case 10:return Ho(t.type._context),Ce(t),null;case 17:return Pe(t.type)&&xl(),Ce(t),null;case 19:if(re(oe),i=t.memoizedState,i===null)return Ce(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Un(i,!1);else{if(he!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=El(e),a!==null){for(t.flags|=128,Un(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return te(oe,oe.current&1|2),t.child}e=e.sibling}i.tail!==null&&fe()>$n&&(t.flags|=128,r=!0,Un(i,!1),t.lanes=4194304)}else{if(!r)if(e=El(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Un(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ie)return Ce(t),null}else 2*fe()-i.renderingStartTime>$n&&n!==1073741824&&(t.flags|=128,r=!0,Un(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=fe(),t.sibling=null,n=oe.current,te(oe,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return os(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Be&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Xf(e,t){switch(Oo(t),t.tag){case 1:return Pe(t.type)&&xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dn(),re(Me),re(Fe),Yo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qo(t),null;case 13:if(re(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));_n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(oe),null;case 4:return Dn(),null;case 10:return Ho(t.type._context),null;case 22:case 23:return os(),null;case 24:return null;default:return null}}var Kr=!1,ze=!1,Jf=typeof WeakSet=="function"?WeakSet:Set,M=null;function vn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(e,t,r)}else n.current=null}function co(e,t,n){try{n()}catch(r){de(e,t,r)}}var ca=!1;function Zf(e,t){if(Qi=ml,e=Tu(),bo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,u=-1,d=-1,p=0,g=0,x=e,m=null;t:for(;;){for(var k;x!==n||l!==0&&x.nodeType!==3||(u=a+l),x!==i||r!==0&&x.nodeType!==3||(d=a+r),x.nodeType===3&&(a+=x.nodeValue.length),(k=x.firstChild)!==null;)m=x,x=k;for(;;){if(x===e)break t;if(m===n&&++p===l&&(u=a),m===i&&++g===r&&(d=a),(k=x.nextSibling)!==null)break;x=m,m=x.parentNode}x=k}n=u===-1||d===-1?null:{start:u,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(qi={focusedElem:e,selectionRange:n},ml=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var C=S.memoizedProps,F=S.memoizedState,y=t.stateNode,f=y.getSnapshotBeforeUpdate(t.elementType===t.type?C:et(t.type,C),F);y.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var c=t.stateNode.containerInfo;c.nodeType===1?c.textContent="":c.nodeType===9&&c.documentElement&&c.removeChild(c.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(h){de(t,t.return,h)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return S=ca,ca=!1,S}function nr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&co(t,n,i)}l=l.next}while(l!==r)}}function Ul(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fo(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 zd(e){var t=e.alternate;t!==null&&(e.alternate=null,zd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[yr],delete t[Xi],delete t[Mf],delete t[Pf])),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 Fd(e){return e.tag===5||e.tag===3||e.tag===4}function fa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(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 po(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gl));else if(r!==4&&(e=e.child,e!==null))for(po(e,t,n),e=e.sibling;e!==null;)po(e,t,n),e=e.sibling}function mo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(mo(e,t,n),e=e.sibling;e!==null;)mo(e,t,n),e=e.sibling}var ke=null,tt=!1;function Ct(e,t,n){for(n=n.child;n!==null;)Rd(e,t,n),n=n.sibling}function Rd(e,t,n){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Ml,n)}catch{}switch(n.tag){case 5:ze||vn(n,t);case 6:var r=ke,l=tt;ke=null,Ct(e,t,n),ke=r,tt=l,ke!==null&&(tt?(e=ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ke.removeChild(n.stateNode));break;case 18:ke!==null&&(tt?(e=ke,n=n.stateNode,e.nodeType===8?pi(e.parentNode,n):e.nodeType===1&&pi(e,n),dr(e)):pi(ke,n.stateNode));break;case 4:r=ke,l=tt,ke=n.stateNode.containerInfo,tt=!0,Ct(e,t,n),ke=r,tt=l;break;case 0:case 11:case 14:case 15:if(!ze&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&co(n,t,a),l=l.next}while(l!==r)}Ct(e,t,n);break;case 1:if(!ze&&(vn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){de(n,t,u)}Ct(e,t,n);break;case 21:Ct(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,Ct(e,t,n),ze=r):Ct(e,t,n);break;default:Ct(e,t,n)}}function pa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jf),t.forEach(function(r){var l=ap.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,a=t,u=a;e:for(;u!==null;){switch(u.tag){case 5:ke=u.stateNode,tt=!1;break e;case 3:ke=u.stateNode.containerInfo,tt=!0;break e;case 4:ke=u.stateNode.containerInfo,tt=!0;break e}u=u.return}if(ke===null)throw Error(E(160));Rd(i,a,l),ke=null,tt=!1;var d=l.alternate;d!==null&&(d.return=null),l.return=null}catch(p){de(l,t,p)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_d(t,e),t=t.sibling}function _d(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ze(t,e),st(e),r&4){try{nr(3,e,e.return),Ul(3,e)}catch(C){de(e,e.return,C)}try{nr(5,e,e.return)}catch(C){de(e,e.return,C)}}break;case 1:Ze(t,e),st(e),r&512&&n!==null&&vn(n,n.return);break;case 5:if(Ze(t,e),st(e),r&512&&n!==null&&vn(n,n.return),e.flags&32){var l=e.stateNode;try{or(l,"")}catch(C){de(e,e.return,C)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,u=e.type,d=e.updateQueue;if(e.updateQueue=null,d!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&Xa(l,i),Li(u,a);var p=Li(u,i);for(a=0;a<d.length;a+=2){var g=d[a],x=d[a+1];g==="style"?nu(l,x):g==="dangerouslySetInnerHTML"?eu(l,x):g==="children"?or(l,x):Eo(l,g,x,p)}switch(u){case"input":Ii(l,i);break;case"textarea":Ja(l,i);break;case"select":var m=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var k=i.value;k!=null?Sn(l,!!i.multiple,k,!1):m!==!!i.multiple&&(i.defaultValue!=null?Sn(l,!!i.multiple,i.defaultValue,!0):Sn(l,!!i.multiple,i.multiple?[]:"",!1))}l[yr]=i}catch(C){de(e,e.return,C)}}break;case 6:if(Ze(t,e),st(e),r&4){if(e.stateNode===null)throw Error(E(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(C){de(e,e.return,C)}}break;case 3:if(Ze(t,e),st(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{dr(t.containerInfo)}catch(C){de(e,e.return,C)}break;case 4:Ze(t,e),st(e);break;case 13:Ze(t,e),st(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(ls=fe())),r&4&&pa(e);break;case 22:if(g=n!==null&&n.memoizedState!==null,e.mode&1?(ze=(p=ze)||g,Ze(t,e),ze=p):Ze(t,e),st(e),r&8192){if(p=e.memoizedState!==null,(e.stateNode.isHidden=p)&&!g&&e.mode&1)for(M=e,g=e.child;g!==null;){for(x=M=g;M!==null;){switch(m=M,k=m.child,m.tag){case 0:case 11:case 14:case 15:nr(4,m,m.return);break;case 1:vn(m,m.return);var S=m.stateNode;if(typeof S.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,S.props=t.memoizedProps,S.state=t.memoizedState,S.componentWillUnmount()}catch(C){de(r,n,C)}}break;case 5:vn(m,m.return);break;case 22:if(m.memoizedState!==null){ya(x);continue}}k!==null?(k.return=m,M=k):ya(x)}g=g.sibling}e:for(g=null,x=e;;){if(x.tag===5){if(g===null){g=x;try{l=x.stateNode,p?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=x.stateNode,d=x.memoizedProps.style,a=d!=null&&d.hasOwnProperty("display")?d.display:null,u.style.display=tu("display",a))}catch(C){de(e,e.return,C)}}}else if(x.tag===6){if(g===null)try{x.stateNode.nodeValue=p?"":x.memoizedProps}catch(C){de(e,e.return,C)}}else if((x.tag!==22&&x.tag!==23||x.memoizedState===null||x===e)&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===e)break e;for(;x.sibling===null;){if(x.return===null||x.return===e)break e;g===x&&(g=null),x=x.return}g===x&&(g=null),x.sibling.return=x.return,x=x.sibling}}break;case 19:Ze(t,e),st(e),r&4&&pa(e);break;case 21:break;default:Ze(t,e),st(e)}}function st(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fd(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(or(l,""),r.flags&=-33);var i=fa(e);mo(e,i,l);break;case 3:case 4:var a=r.stateNode.containerInfo,u=fa(e);po(e,u,a);break;default:throw Error(E(161))}}catch(d){de(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ep(e,t,n){M=e,Td(e)}function Td(e,t,n){for(var r=(e.mode&1)!==0;M!==null;){var l=M,i=l.child;if(l.tag===22&&r){var a=l.memoizedState!==null||Kr;if(!a){var u=l.alternate,d=u!==null&&u.memoizedState!==null||ze;u=Kr;var p=ze;if(Kr=a,(ze=d)&&!p)for(M=l;M!==null;)a=M,d=a.child,a.tag===22&&a.memoizedState!==null?ha(l):d!==null?(d.return=a,M=d):ha(l);for(;i!==null;)M=i,Td(i),i=i.sibling;M=l,Kr=u,ze=p}ma(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,M=i):ma(e)}}function ma(e){for(;M!==null;){var t=M;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ze||Ul(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ze)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:et(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Js(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Js(t,a,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var d=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":d.autoFocus&&n.focus();break;case"img":d.src&&(n.src=d.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var p=t.alternate;if(p!==null){var g=p.memoizedState;if(g!==null){var x=g.dehydrated;x!==null&&dr(x)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}ze||t.flags&512&&fo(t)}catch(m){de(t,t.return,m)}}if(t===e){M=null;break}if(n=t.sibling,n!==null){n.return=t.return,M=n;break}M=t.return}}function ya(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var n=t.sibling;if(n!==null){n.return=t.return,M=n;break}M=t.return}}function ha(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ul(4,t)}catch(d){de(t,n,d)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(d){de(t,l,d)}}var i=t.return;try{fo(t)}catch(d){de(t,i,d)}break;case 5:var a=t.return;try{fo(t)}catch(d){de(t,a,d)}}}catch(d){de(t,t.return,d)}if(t===e){M=null;break}var u=t.sibling;if(u!==null){u.return=t.return,M=u;break}M=t.return}}var tp=Math.ceil,Rl=jt.ReactCurrentDispatcher,ns=jt.ReactCurrentOwner,Ge=jt.ReactCurrentBatchConfig,q=0,ve=null,me=null,Se=0,Be=0,kn=Wt(0),he=0,Sr=null,en=0,Hl=0,rs=0,rr=null,$e=null,ls=0,$n=1/0,pt=null,_l=!1,yo=null,Pt=null,Vr=!1,Tt=null,Tl=0,lr=0,ho=null,ol=-1,sl=0;function _e(){return q&6?fe():ol!==-1?ol:ol=fe()}function Lt(e){return e.mode&1?q&2&&Se!==0?Se&-Se:bf.transition!==null?(sl===0&&(sl=mu()),sl):(e=Y,e!==0||(e=window.event,e=e===void 0?16:Su(e.type)),e):1}function lt(e,t,n,r){if(50<lr)throw lr=0,ho=null,Error(E(185));Cr(e,n,r),(!(q&2)||e!==ve)&&(e===ve&&(!(q&2)&&(Hl|=n),he===4&&Rt(e,Se)),Le(e,r),n===1&&q===0&&!(t.mode&1)&&($n=fe()+500,Ol&&Ut()))}function Le(e,t){var n=e.callbackNode;Lc(e,t);var r=pl(e,e===ve?Se:0);if(r===0)n!==null&&Es(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Es(n),t===1)e.tag===0?Lf(ga.bind(null,e)):Ou(ga.bind(null,e)),$f(function(){!(q&6)&&Ut()}),n=null;else{switch(yu(r)){case 1:n=To;break;case 4:n=fu;break;case 16:n=fl;break;case 536870912:n=pu;break;default:n=fl}n=bd(n,Dd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dd(e,t){if(ol=-1,sl=0,q&6)throw Error(E(327));var n=e.callbackNode;if(zn()&&e.callbackNode!==n)return null;var r=pl(e,e===ve?Se:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Dl(e,r);else{t=r;var l=q;q|=2;var i=$d();(ve!==e||Se!==t)&&(pt=null,$n=fe()+500,Yt(e,t));do try{lp();break}catch(u){Id(e,u)}while(!0);Uo(),Rl.current=i,q=l,me!==null?t=0:(ve=null,Se=0,t=he)}if(t!==0){if(t===2&&(l=Wi(e),l!==0&&(r=l,t=go(e,l))),t===1)throw n=Sr,Yt(e,0),Rt(e,r),Le(e,fe()),n;if(t===6)Rt(e,r);else{if(l=e.current.alternate,!(r&30)&&!np(l)&&(t=Dl(e,r),t===2&&(i=Wi(e),i!==0&&(r=i,t=go(e,i))),t===1))throw n=Sr,Yt(e,0),Rt(e,r),Le(e,fe()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:Kt(e,$e,pt);break;case 3:if(Rt(e,r),(r&130023424)===r&&(t=ls+500-fe(),10<t)){if(pl(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){_e(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Gi(Kt.bind(null,e,$e,pt),t);break}Kt(e,$e,pt);break;case 4:if(Rt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var a=31-rt(r);i=1<<a,a=t[a],a>l&&(l=a),r&=~i}if(r=l,r=fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tp(r/1960))-r,10<r){e.timeoutHandle=Gi(Kt.bind(null,e,$e,pt),r);break}Kt(e,$e,pt);break;case 5:Kt(e,$e,pt);break;default:throw Error(E(329))}}}return Le(e,fe()),e.callbackNode===n?Dd.bind(null,e):null}function go(e,t){var n=rr;return e.current.memoizedState.isDehydrated&&(Yt(e,t).flags|=256),e=Dl(e,t),e!==2&&(t=$e,$e=n,t!==null&&xo(t)),e}function xo(e){$e===null?$e=e:$e.push.apply($e,e)}function np(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!it(i(),l))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 Rt(e,t){for(t&=~rs,t&=~Hl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rt(t),r=1<<n;e[n]=-1,t&=~r}}function ga(e){if(q&6)throw Error(E(327));zn();var t=pl(e,0);if(!(t&1))return Le(e,fe()),null;var n=Dl(e,t);if(e.tag!==0&&n===2){var r=Wi(e);r!==0&&(t=r,n=go(e,r))}if(n===1)throw n=Sr,Yt(e,0),Rt(e,t),Le(e,fe()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Kt(e,$e,pt),Le(e,fe()),null}function is(e,t){var n=q;q|=1;try{return e(t)}finally{q=n,q===0&&($n=fe()+500,Ol&&Ut())}}function tn(e){Tt!==null&&Tt.tag===0&&!(q&6)&&zn();var t=q;q|=1;var n=Ge.transition,r=Y;try{if(Ge.transition=null,Y=1,e)return e()}finally{Y=r,Ge.transition=n,q=t,!(q&6)&&Ut()}}function os(){Be=kn.current,re(kn)}function Yt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,If(n)),me!==null)for(n=me.return;n!==null;){var r=n;switch(Oo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xl();break;case 3:Dn(),re(Me),re(Fe),Yo();break;case 5:qo(r);break;case 4:Dn();break;case 13:re(oe);break;case 19:re(oe);break;case 10:Ho(r.type._context);break;case 22:case 23:os()}n=n.return}if(ve=e,me=e=bt(e.current,null),Se=Be=t,he=0,Sr=null,rs=Hl=en=0,$e=rr=null,Qt!==null){for(t=0;t<Qt.length;t++)if(n=Qt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=l,r.next=a}n.pending=r}Qt=null}return e}function Id(e,t){do{var n=me;try{if(Uo(),rl.current=Fl,zl){for(var r=se.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}zl=!1}if(Zt=0,xe=ye=se=null,tr=!1,xr=0,ns.current=null,n===null||n.return===null){he=1,Sr=t,me=null;break}e:{var i=e,a=n.return,u=n,d=t;if(t=Se,u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){var p=d,g=u,x=g.tag;if(!(g.mode&1)&&(x===0||x===11||x===15)){var m=g.alternate;m?(g.updateQueue=m.updateQueue,g.memoizedState=m.memoizedState,g.lanes=m.lanes):(g.updateQueue=null,g.memoizedState=null)}var k=la(a);if(k!==null){k.flags&=-257,ia(k,a,u,i,t),k.mode&1&&ra(i,p,t),t=k,d=p;var S=t.updateQueue;if(S===null){var C=new Set;C.add(d),t.updateQueue=C}else S.add(d);break e}else{if(!(t&1)){ra(i,p,t),ss();break e}d=Error(E(426))}}else if(ie&&u.mode&1){var F=la(a);if(F!==null){!(F.flags&65536)&&(F.flags|=256),ia(F,a,u,i,t),Ao(In(d,u));break e}}i=d=In(d,u),he!==4&&(he=2),rr===null?rr=[i]:rr.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=yd(i,d,t);Xs(i,y);break e;case 1:u=d;var f=i.type,c=i.stateNode;if(!(i.flags&128)&&(typeof f.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Pt===null||!Pt.has(c)))){i.flags|=65536,t&=-t,i.lanes|=t;var h=hd(i,u,t);Xs(i,h);break e}}i=i.return}while(i!==null)}Md(n)}catch(w){t=w,me===n&&n!==null&&(me=n=n.return);continue}break}while(!0)}function $d(){var e=Rl.current;return Rl.current=Fl,e===null?Fl:e}function ss(){(he===0||he===3||he===2)&&(he=4),ve===null||!(en&268435455)&&!(Hl&268435455)||Rt(ve,Se)}function Dl(e,t){var n=q;q|=2;var r=$d();(ve!==e||Se!==t)&&(pt=null,Yt(e,t));do try{rp();break}catch(l){Id(e,l)}while(!0);if(Uo(),q=n,Rl.current=r,me!==null)throw Error(E(261));return ve=null,Se=0,he}function rp(){for(;me!==null;)Nd(me)}function lp(){for(;me!==null&&!Rc();)Nd(me)}function Nd(e){var t=Ld(e.alternate,e,Be);e.memoizedProps=e.pendingProps,t===null?Md(e):me=t,ns.current=null}function Md(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Xf(n,t),n!==null){n.flags&=32767,me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{he=6,me=null;return}}else if(n=Gf(n,t,Be),n!==null){me=n;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);he===0&&(he=5)}function Kt(e,t,n){var r=Y,l=Ge.transition;try{Ge.transition=null,Y=1,ip(e,t,n,r)}finally{Ge.transition=l,Y=r}return null}function ip(e,t,n,r){do zn();while(Tt!==null);if(q&6)throw Error(E(327));n=e.finishedWork;var l=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 i=n.lanes|n.childLanes;if(bc(e,i),e===ve&&(me=ve=null,Se=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Vr||(Vr=!0,bd(fl,function(){return zn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ge.transition,Ge.transition=null;var a=Y;Y=1;var u=q;q|=4,ns.current=null,Zf(e,n),_d(n,e),Ef(qi),ml=!!Qi,qi=Qi=null,e.current=n,ep(n),_c(),q=u,Y=a,Ge.transition=i}else e.current=n;if(Vr&&(Vr=!1,Tt=e,Tl=l),i=e.pendingLanes,i===0&&(Pt=null),Ic(n.stateNode),Le(e,fe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(_l)throw _l=!1,e=yo,yo=null,e;return Tl&1&&e.tag!==0&&zn(),i=e.pendingLanes,i&1?e===ho?lr++:(lr=0,ho=e):lr=0,Ut(),null}function zn(){if(Tt!==null){var e=yu(Tl),t=Ge.transition,n=Y;try{if(Ge.transition=null,Y=16>e?16:e,Tt===null)var r=!1;else{if(e=Tt,Tt=null,Tl=0,q&6)throw Error(E(331));var l=q;for(q|=4,M=e.current;M!==null;){var i=M,a=i.child;if(M.flags&16){var u=i.deletions;if(u!==null){for(var d=0;d<u.length;d++){var p=u[d];for(M=p;M!==null;){var g=M;switch(g.tag){case 0:case 11:case 15:nr(8,g,i)}var x=g.child;if(x!==null)x.return=g,M=x;else for(;M!==null;){g=M;var m=g.sibling,k=g.return;if(zd(g),g===p){M=null;break}if(m!==null){m.return=k,M=m;break}M=k}}}var S=i.alternate;if(S!==null){var C=S.child;if(C!==null){S.child=null;do{var F=C.sibling;C.sibling=null,C=F}while(C!==null)}}M=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,M=a;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:nr(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,M=y;break e}M=i.return}}var f=e.current;for(M=f;M!==null;){a=M;var c=a.child;if(a.subtreeFlags&2064&&c!==null)c.return=a,M=c;else e:for(a=f;M!==null;){if(u=M,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Ul(9,u)}}catch(w){de(u,u.return,w)}if(u===a){M=null;break e}var h=u.sibling;if(h!==null){h.return=u.return,M=h;break e}M=u.return}}if(q=l,Ut(),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Ml,e)}catch{}r=!0}return r}finally{Y=n,Ge.transition=t}}return!1}function xa(e,t,n){t=In(n,t),t=yd(e,t,1),e=Mt(e,t,1),t=_e(),e!==null&&(Cr(e,1,t),Le(e,t))}function de(e,t,n){if(e.tag===3)xa(e,e,n);else for(;t!==null;){if(t.tag===3){xa(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Pt===null||!Pt.has(r))){e=In(n,e),e=hd(t,e,1),t=Mt(t,e,1),e=_e(),t!==null&&(Cr(t,1,e),Le(t,e));break}}t=t.return}}function op(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_e(),e.pingedLanes|=e.suspendedLanes&n,ve===e&&(Se&n)===n&&(he===4||he===3&&(Se&130023424)===Se&&500>fe()-ls?Yt(e,0):rs|=n),Le(e,t)}function Pd(e,t){t===0&&(e.mode&1?(t=Pr,Pr<<=1,!(Pr&130023424)&&(Pr=4194304)):t=1);var n=_e();e=kt(e,t),e!==null&&(Cr(e,t,n),Le(e,n))}function sp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pd(e,n)}function ap(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),Pd(e,n)}var Ld;Ld=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Yf(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,ie&&t.flags&1048576&&Au(t,Sl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;il(e,t),e=t.pendingProps;var l=Rn(t,Fe.current);En(t,n),l=Xo(null,t,r,e,l,n);var i=Jo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(i=!0,vl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Vo(t),l.updater=Wl,t.stateNode=l,l._reactInternals=t,ro(t,r,e,n),t=oo(null,t,r,!0,i,n)):(t.tag=0,ie&&i&&Bo(t),Re(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(il(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=dp(r),e=et(r,e),l){case 0:t=io(null,t,r,e,n);break e;case 1:t=aa(null,t,r,e,n);break e;case 11:t=oa(null,t,r,e,n);break e;case 14:t=sa(null,t,r,et(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:et(r,l),io(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:et(r,l),aa(e,t,r,l,n);case 3:e:{if(kd(t),e===null)throw Error(E(387));r=t.pendingProps,i=t.memoizedState,l=i.element,Qu(e,t),Cl(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=In(Error(E(423)),t),t=ua(e,t,r,n,l);break e}else if(r!==l){l=In(Error(E(424)),t),t=ua(e,t,r,n,l);break e}else for(Oe=Nt(t.stateNode.containerInfo.firstChild),Ae=t,ie=!0,nt=null,n=Ku(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_n(),r===l){t=St(e,t,n);break e}Re(e,t,r,n)}t=t.child}return t;case 5:return qu(t),e===null&&eo(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,a=l.children,Yi(r,l)?a=null:i!==null&&Yi(r,i)&&(t.flags|=32),vd(e,t),Re(e,t,a,n),t.child;case 6:return e===null&&eo(t),null;case 13:return Sd(e,t,n);case 4:return Qo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tn(t,null,r,n):Re(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:et(r,l),oa(e,t,r,l,n);case 7:return Re(e,t,t.pendingProps,n),t.child;case 8:return Re(e,t,t.pendingProps.children,n),t.child;case 12:return Re(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,a=l.value,te(jl,r._currentValue),r._currentValue=a,i!==null)if(it(i.value,a)){if(i.children===l.children&&!Me.current){t=St(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){a=i.child;for(var d=u.firstContext;d!==null;){if(d.context===r){if(i.tag===1){d=gt(-1,n&-n),d.tag=2;var p=i.updateQueue;if(p!==null){p=p.shared;var g=p.pending;g===null?d.next=d:(d.next=g.next,g.next=d),p.pending=d}}i.lanes|=n,d=i.alternate,d!==null&&(d.lanes|=n),to(i.return,n,t),u.lanes|=n;break}d=d.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(E(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),to(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Re(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,En(t,n),l=Xe(l),r=r(l),t.flags|=1,Re(e,t,r,n),t.child;case 14:return r=t.type,l=et(r,t.pendingProps),l=et(r.type,l),sa(e,t,r,l,n);case 15:return gd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:et(r,l),il(e,t),t.tag=1,Pe(r)?(e=!0,vl(t)):e=!1,En(t,n),md(t,r,l),ro(t,r,l,n),oo(null,t,r,!0,e,n);case 19:return jd(e,t,n);case 22:return xd(e,t,n)}throw Error(E(156,t.tag))};function bd(e,t){return cu(e,t)}function up(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ye(e,t,n,r){return new up(e,t,n,r)}function as(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dp(e){if(typeof e=="function")return as(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fo)return 11;if(e===Ro)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=Ye(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 al(e,t,n,r,l,i){var a=2;if(r=e,typeof e=="function")as(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case dn:return Gt(n.children,l,i,t);case zo:a=8,l|=8;break;case Fi:return e=Ye(12,n,t,l|2),e.elementType=Fi,e.lanes=i,e;case Ri:return e=Ye(13,n,t,l),e.elementType=Ri,e.lanes=i,e;case _i:return e=Ye(19,n,t,l),e.elementType=_i,e.lanes=i,e;case qa:return Kl(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Va:a=10;break e;case Qa:a=9;break e;case Fo:a=11;break e;case Ro:a=14;break e;case Et:a=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Ye(a,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Gt(e,t,n,r){return e=Ye(7,e,r,t),e.lanes=n,e}function Kl(e,t,n,r){return e=Ye(22,e,r,t),e.elementType=qa,e.lanes=n,e.stateNode={isHidden:!1},e}function Si(e,t,n){return e=Ye(6,e,null,t),e.lanes=n,e}function ji(e,t,n){return t=Ye(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cp(e,t,n,r,l){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=ni(0),this.expirationTimes=ni(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ni(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function us(e,t,n,r,l,i,a,u,d){return e=new cp(e,t,n,u,d),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ye(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vo(i),e}function fp(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:un,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Bd(e){if(!e)return Ot;e=e._reactInternals;e:{if(rn(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(Pe(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(Pe(n))return Bu(e,n,t)}return t}function Od(e,t,n,r,l,i,a,u,d){return e=us(n,r,!0,e,l,i,a,u,d),e.context=Bd(null),n=e.current,r=_e(),l=Lt(n),i=gt(r,l),i.callback=t??null,Mt(n,i,l),e.current.lanes=l,Cr(e,l,r),Le(e,r),e}function Vl(e,t,n,r){var l=t.current,i=_e(),a=Lt(l);return n=Bd(n),t.context===null?t.context=n:t.pendingContext=n,t=gt(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Mt(l,t,a),e!==null&&(lt(e,l,a,i),nl(e,l,a)),a}function Il(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 va(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ds(e,t){va(e,t),(e=e.alternate)&&va(e,t)}function pp(){return null}var Ad=typeof reportError=="function"?reportError:function(e){console.error(e)};function cs(e){this._internalRoot=e}Ql.prototype.render=cs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));Vl(e,t,null,null)};Ql.prototype.unmount=cs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tn(function(){Vl(null,e,null,null)}),t[vt]=null}};function Ql(e){this._internalRoot=e}Ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=xu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ft.length&&t!==0&&t<Ft[n].priority;n++);Ft.splice(n,0,e),n===0&&ku(e)}};function fs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ql(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ka(){}function mp(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var p=Il(a);i.call(p)}}var a=Od(t,r,e,0,null,!1,!1,"",ka);return e._reactRootContainer=a,e[vt]=a.current,pr(e.nodeType===8?e.parentNode:e),tn(),a}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var u=r;r=function(){var p=Il(d);u.call(p)}}var d=us(e,0,!1,null,null,!1,!1,"",ka);return e._reactRootContainer=d,e[vt]=d.current,pr(e.nodeType===8?e.parentNode:e),tn(function(){Vl(t,d,n,r)}),d}function Yl(e,t,n,r,l){var i=n._reactRootContainer;if(i){var a=i;if(typeof l=="function"){var u=l;l=function(){var d=Il(a);u.call(d)}}Vl(t,a,e,l)}else a=mp(n,t,e,l,r);return Il(a)}hu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=qn(t.pendingLanes);n!==0&&(Do(t,n|1),Le(t,fe()),!(q&6)&&($n=fe()+500,Ut()))}break;case 13:tn(function(){var r=kt(e,1);if(r!==null){var l=_e();lt(r,e,1,l)}}),ds(e,1)}};Io=function(e){if(e.tag===13){var t=kt(e,134217728);if(t!==null){var n=_e();lt(t,e,134217728,n)}ds(e,134217728)}};gu=function(e){if(e.tag===13){var t=Lt(e),n=kt(e,t);if(n!==null){var r=_e();lt(n,e,t,r)}ds(e,t)}};xu=function(){return Y};vu=function(e,t){var n=Y;try{return Y=e,t()}finally{Y=n}};Bi=function(e,t,n){switch(t){case"input":if(Ii(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Bl(r);if(!l)throw Error(E(90));Ga(r),Ii(r,l)}}}break;case"textarea":Ja(e,n);break;case"select":t=n.value,t!=null&&Sn(e,!!n.multiple,t,!1)}};iu=is;ou=tn;var yp={usingClientEntryPoint:!1,Events:[zr,mn,Bl,ru,lu,is]},Hn={findFiberByHostInstance:Vt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hp={bundleType:Hn.bundleType,version:Hn.version,rendererPackageName:Hn.rendererPackageName,rendererConfig:Hn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:jt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uu(e),e===null?null:e.stateNode},findFiberByHostInstance:Hn.findFiberByHostInstance||pp,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 Qr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qr.isDisabled&&Qr.supportsFiber)try{Ml=Qr.inject(hp),dt=Qr}catch{}}Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yp;Ue.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!fs(t))throw Error(E(200));return fp(e,t,null,n)};Ue.createRoot=function(e,t){if(!fs(e))throw Error(E(299));var n=!1,r="",l=Ad;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=us(e,1,!1,null,null,n,!1,r,l),e[vt]=t.current,pr(e.nodeType===8?e.parentNode:e),new cs(t)};Ue.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=uu(t),e=e===null?null:e.stateNode,e};Ue.flushSync=function(e){return tn(e)};Ue.hydrate=function(e,t,n){if(!ql(t))throw Error(E(200));return Yl(null,e,t,!0,n)};Ue.hydrateRoot=function(e,t,n){if(!fs(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",a=Ad;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Od(t,null,e,1,n??null,l,!1,i,a),e[vt]=t.current,pr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Ql(t)};Ue.render=function(e,t,n){if(!ql(t))throw Error(E(200));return Yl(null,e,t,!1,n)};Ue.unmountComponentAtNode=function(e){if(!ql(e))throw Error(E(40));return e._reactRootContainer?(tn(function(){Yl(null,null,e,!1,function(){e._reactRootContainer=null,e[vt]=null})}),!0):!1};Ue.unstable_batchedUpdates=is;Ue.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ql(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return Yl(e,t,n,!1,r)};Ue.version="18.3.1-next-f1338f8080-20240426";function Wd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wd)}catch(e){console.error(e)}}Wd(),Wa.exports=Ue;var gp=Wa.exports,Sa=gp;Ei.createRoot=Sa.createRoot,Ei.hydrateRoot=Sa.hydrateRoot;const o={bg:"#0A0B0D",surface:"#111318",surfaceHover:"#161A22",border:"#1E2330",borderLight:"#252D3D",accent:"#F0A500",accentDim:"#F0A50022",green:"#22C55E",greenDim:"#22C55E18",red:"#EF4444",redDim:"#EF444418",yellow:"#FBBF24",yellowDim:"#FBBF2418",blue:"#60A5FA",blueDim:"#60A5FA18",purple:"#A78BFA",purpleDim:"#A78BFA18",text:"#E8EAF0",textMuted:"#6B7280",textDim:"#3D4455",mono:"'JetBrains Mono', 'Fira Code', monospace",sans:"'DM Sans', system-ui, sans-serif"},Ud={dev:{color:o.green,bg:o.greenDim,label:"DEV"},staging:{color:o.yellow,bg:o.yellowDim,label:"STG"},production:{color:o.red,bg:o.redDim,label:"PRD"}},xp={error:{color:o.red,bg:o.redDim,icon:"✕",label:"Error"},warning:{color:o.yellow,bg:o.yellowDim,icon:"⚠",label:"Warning"},info:{color:o.blue,bg:o.blueDim,icon:"i",label:"Info"}},ja={matrix:{label:"Matrix",color:o.accent},schema:{label:"Schema",color:o.blue},sops:{label:"SOPS",color:o.purple}},wa="clef_ui_token";let $l=null;function vp(){const t=new URLSearchParams(window.location.search).get("token");if(t){$l=t,sessionStorage.setItem(wa,t);const n=new URL(window.location.href);n.searchParams.delete("token"),window.history.replaceState({},"",n.pathname+n.hash)}else $l=sessionStorage.getItem(wa)}function X(e,t){const n=new Headers(t==null?void 0:t.headers);return $l&&n.set("Authorization",`Bearer ${$l}`),fetch(e,{...t,headers:n})}function kp({activeView:e,setView:t,activeNs:n,setNs:r,manifest:l,matrixStatuses:i,gitStatus:a,lintErrorCount:u,scanIssueCount:d}){var x;const p=a?a.staged.length+a.unstaged.length+a.untracked.length:0,g=(l==null?void 0:l.namespaces)??[];return s.jsxs("div",{style:{width:220,minHeight:"100vh",background:o.surface,borderRight:`1px solid ${o.border}`,display:"flex",flexDirection:"column",flexShrink:0},children:[s.jsxs("div",{style:{padding:"20px 20px 16px",borderBottom:`1px solid ${o.border}`,display:"flex",alignItems:"center",gap:10},children:[s.jsx("div",{style:{width:30,height:30,background:o.accentDim,border:`1px solid ${o.accent}44`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",color:o.accent,fontSize:15},children:"♪"}),s.jsxs("div",{children:[s.jsx("div",{style:{fontFamily:o.sans,fontWeight:700,fontSize:16,color:o.text,letterSpacing:"-0.02em"},children:"clef"}),s.jsx("div",{style:{fontFamily:o.mono,fontSize:9,color:o.textMuted,marginTop:-1},children:"local / main"})]})]}),s.jsxs("div",{style:{padding:"12px 10px",flex:1},children:[s.jsx(ft,{icon:"⊞",label:"Matrix",active:e==="matrix",onClick:()=>t("matrix")}),s.jsx(ft,{icon:"⇄",label:"Diff",active:e==="diff",onClick:()=>t("diff")}),s.jsx(ft,{icon:"✔",label:"Lint",active:e==="lint",onClick:()=>t("lint"),badge:u>0?String(u):void 0,badgeColor:o.red}),s.jsx(ft,{icon:"⌕",label:"Scan",active:e==="scan",onClick:()=>t("scan"),badge:d>0?String(d):void 0,badgeColor:o.yellow}),s.jsx(ft,{icon:"⬆",label:"Import",active:e==="import",onClick:()=>t("import")}),s.jsx(ft,{icon:"♢",label:"Recipients",active:e==="recipients",onClick:()=>t("recipients")}),s.jsx(ft,{icon:"⚙",label:"Service IDs",active:e==="identities",onClick:()=>t("identities"),badge:(x=l==null?void 0:l.service_identities)!=null&&x.length?String(l.service_identities.length):void 0,badgeColor:o.purple}),s.jsx(ft,{icon:"⏱",label:"History",active:e==="history",onClick:()=>t("history")}),s.jsx("div",{style:{marginTop:20,marginBottom:6,padding:"0 8px"},children:s.jsx("span",{style:{fontFamily:o.sans,fontSize:10,fontWeight:600,color:o.textDim,letterSpacing:"0.1em",textTransform:"uppercase"},children:"Namespaces"})}),g.map(m=>{const k=i.some(S=>S.cell.namespace===m.name&&S.issues.length>0);return s.jsx(ft,{icon:s.jsx("span",{style:{fontFamily:o.mono,fontSize:10,color:o.textMuted},children:"//"}),label:m.name,active:e==="editor"&&n===m.name,onClick:()=>{t("editor"),r(m.name)},badge:k?"!":void 0,badgeColor:o.yellow},m.name)})]}),s.jsxs("div",{style:{padding:"12px 16px",borderTop:`1px solid ${o.border}`},children:[s.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,color:o.textMuted},children:s.jsxs("span",{style:{fontFamily:o.mono,fontSize:10},children:[p," uncommitted"]})}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:o.green,marginTop:5},children:[s.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:o.green,boxShadow:`0 0 5px ${o.green}`}}),s.jsxs("span",{style:{fontFamily:o.mono,fontSize:10},children:[(l==null?void 0:l.sops.default_backend)??"age"," key loaded"]})]})]})]})}function ft({icon:e,label:t,active:n,onClick:r,badge:l,badgeColor:i}){return s.jsxs("div",{role:"button",tabIndex:0,"data-testid":`nav-${t.toLowerCase()}`,onClick:r,onKeyDown:a=>{a.key==="Enter"&&r()},style:{display:"flex",alignItems:"center",gap:9,padding:"7px 10px",borderRadius:6,cursor:"pointer",background:n?o.accentDim:"transparent",border:n?`1px solid ${o.accent}22`:"1px solid transparent",marginBottom:2,transition:"all 0.12s",position:"relative"},children:[s.jsx("span",{style:{color:n?o.accent:o.textMuted,display:"flex",alignItems:"center",width:14},children:e}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:13,fontWeight:n?600:400,color:n?o.accent:o.text,flex:1},children:t}),l&&i&&s.jsx("span",{style:{fontFamily:o.mono,fontSize:9,fontWeight:700,color:i,background:`${i}20`,border:`1px solid ${i}44`,borderRadius:3,padding:"1px 5px"},children:l})]})}function Ee({title:e,subtitle:t,actions:n}){return s.jsxs("div",{style:{height:54,borderBottom:`1px solid ${o.border}`,display:"flex",alignItems:"center",padding:"0 24px",gap:16,flexShrink:0},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx("div",{style:{fontFamily:o.sans,fontWeight:600,fontSize:14,color:o.text},children:e}),t&&s.jsx("div",{style:{fontFamily:o.mono,fontSize:10,color:o.textMuted,marginTop:1},children:t})]}),s.jsx("div",{style:{display:"flex",gap:8},children:n})]})}const Sp={primary:{bg:o.accent,color:"#000",border:"none"},ghost:{bg:"transparent",color:o.textMuted,border:`1px solid ${o.border}`},danger:{bg:o.redDim,color:o.red,border:`1px solid ${o.red}44`}};function W({children:e,variant:t="ghost",onClick:n,icon:r,type:l="button",style:i,...a}){const u=Sp[t];return s.jsxs("button",{type:l,onClick:n,...a,style:{display:"flex",alignItems:"center",gap:6,padding:"5px 12px",borderRadius:6,cursor:"pointer",fontFamily:o.sans,fontSize:12,fontWeight:600,background:u.bg,color:u.color,border:u.border,transition:"all 0.12s"},children:[r&&s.jsx("span",{style:{display:"flex"},children:r}),e]})}function qe({env:e,small:t}){const n=Ud[e]??{color:o.textMuted,bg:"transparent",label:e.toUpperCase().slice(0,3)};return s.jsx("span",{style:{fontFamily:o.mono,fontSize:t?"9px":"10px",fontWeight:700,color:n.color,background:n.bg,border:`1px solid ${n.color}33`,borderRadius:"3px",padding:t?"1px 5px":"2px 7px",letterSpacing:"0.08em"},children:n.label})}const jp={ok:o.green,missing_keys:o.red,schema_warn:o.yellow,sops_error:o.red};function wp({status:e}){const t=jp[e]??o.textMuted;return s.jsx("span",{"data-testid":"status-dot",style:{display:"inline-block",width:7,height:7,borderRadius:"50%",background:t,boxShadow:`0 0 6px ${t}88`}})}function Cp(e){if(!e.cell.exists)return"missing_keys";const t=e.issues.some(r=>r.type==="missing_keys"||r.type==="sops_error"),n=e.issues.some(r=>r.type==="schema_warning");return t?"missing_keys":n?"schema_warn":"ok"}function Ep(e){if(!e)return"never";const n=new Date().getTime()-e.getTime(),r=Math.floor(n/(1e3*60*60));if(r<1)return"just now";if(r<24)return`${r}h ago`;const l=Math.floor(r/24);return l<7?`${l}d ago`:`${Math.floor(l/7)}w ago`}function zp({namespaces:e,environments:t,matrixStatuses:n,onNamespaceClick:r}){return s.jsxs("div",{"data-testid":"matrix-table",style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:12,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:`180px ${t.map(()=>"1fr").join(" ")}`,borderBottom:`1px solid ${o.border}`,background:"#0D0F14"},children:[s.jsx("div",{style:{padding:"12px 20px",fontFamily:o.sans,fontSize:11,fontWeight:600,color:o.textMuted,textTransform:"uppercase",letterSpacing:"0.08em"},children:"Namespace"}),t.map(l=>s.jsxs("div",{style:{padding:"12px 20px",display:"flex",alignItems:"center",gap:8,borderLeft:`1px solid ${o.border}`},children:[s.jsx(qe,{env:l.name}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:12,fontWeight:500,color:o.text},children:l.name})]},l.name))]}),e.map((l,i)=>s.jsxs("div",{"data-testid":`matrix-row-${l.name}`,role:"button",tabIndex:0,onClick:()=>r==null?void 0:r(l.name),onKeyDown:a=>{a.key==="Enter"&&(r==null||r(l.name))},style:{display:"grid",gridTemplateColumns:`180px ${t.map(()=>"1fr").join(" ")}`,borderBottom:i<e.length-1?`1px solid ${o.border}`:"none",cursor:r?"pointer":"default",transition:"background 0.1s"},onMouseEnter:a=>{a.currentTarget.style.background=o.surfaceHover},onMouseLeave:a=>{a.currentTarget.style.background="transparent"},children:[s.jsxs("div",{style:{padding:"16px 20px",display:"flex",alignItems:"center",gap:10},children:[s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.textDim},children:"//"}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:13,fontWeight:600,color:o.text},children:l.name})]}),t.map(a=>{const u=n.find(S=>S.cell.namespace===l.name&&S.cell.environment===a.name),d=u?Cp(u):"ok",p=(u==null?void 0:u.keyCount)??0,g=u!=null&&u.lastModified?Ep(u.lastModified instanceof Date?u.lastModified:new Date(u.lastModified)):"never",x=u?u.issues.filter(S=>S.type==="missing_keys").length:0,m=u?u.issues.filter(S=>S.type==="schema_warning").length:0,k=(u==null?void 0:u.pendingCount)??0;return s.jsxs("div",{style:{padding:"14px 20px",borderLeft:`1px solid ${o.border}`,display:"flex",flexDirection:"column",gap:5},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7},children:[s.jsx(wp,{status:d}),s.jsxs("span",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted},children:[p," keys"]}),x>0&&s.jsxs("span",{style:{fontFamily:o.mono,fontSize:10,color:o.red,background:o.redDim,border:`1px solid ${o.red}33`,borderRadius:3,padding:"1px 5px"},children:["-",x," missing"]}),m>0&&s.jsxs("span",{style:{fontFamily:o.mono,fontSize:10,color:o.yellow,background:o.yellowDim,border:`1px solid ${o.yellow}33`,borderRadius:3,padding:"1px 5px"},children:[m," warn"]}),k>0&&s.jsxs("span",{style:{fontFamily:o.mono,fontSize:10,color:o.accent,background:`${o.accent}18`,border:`1px solid ${o.accent}33`,borderRadius:3,padding:"1px 5px"},children:[k," pending"]})]}),s.jsx("div",{style:{fontFamily:o.mono,fontSize:10,color:o.textDim},children:g})]},a.name)})]},l.name))]})}function Fp({setView:e,setNs:t,manifest:n,matrixStatuses:r}){if(!n)return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[s.jsx(Ee,{title:"Secret Matrix",subtitle:"Loading..."}),s.jsx("div",{style:{flex:1,padding:28},children:s.jsx("p",{style:{color:o.textMuted,fontFamily:o.sans,fontSize:13},children:"Loading manifest..."})})]});const l=n.environments,i=n.namespaces,a=r.length===0&&i.length>0,u=r.filter(m=>m.cell.exists&&m.issues.length===0).length,d=r.filter(m=>!m.cell.exists||m.issues.some(k=>k.type==="missing_keys")).length,p=r.filter(m=>m.issues.some(k=>k.type==="schema_warning")).length,g=r.reduce((m,k)=>m+(k.pendingCount??0),0),x=i.length*l.length;return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Secret Matrix",subtitle:`${i.length} namespaces · ${l.length} environments · ${x} files`,actions:s.jsxs(s.Fragment,{children:[s.jsx(W,{onClick:()=>e("lint"),children:"Lint All"}),s.jsx(W,{variant:"primary",children:"+ Namespace"})]})}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:28,position:"relative"},children:[a&&s.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:`${o.bg}dd`,zIndex:10,borderRadius:8},children:s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:10,padding:"24px 36px",textAlign:"center"},children:[s.jsx("div",{style:{fontSize:20,color:o.accent,marginBottom:8},children:"♪"}),s.jsx("div",{style:{fontFamily:o.sans,fontSize:13,color:o.textMuted},children:"Loading..."})]})}),s.jsx("div",{style:{display:"flex",gap:10,marginBottom:28},children:[{label:`${u} healthy`,color:o.green},{label:`${d} missing keys`,color:o.red},{label:`${p} schema warning${p!==1?"s":""}`,color:o.yellow},...g>0?[{label:`${g} pending value${g!==1?"s":""}`,color:o.accent}]:[]].map(m=>s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,fontWeight:500,color:m.color,background:`${m.color}14`,border:`1px solid ${m.color}33`,borderRadius:20,padding:"4px 14px"},children:m.label},m.label))}),s.jsx(zp,{namespaces:i,environments:l,matrixStatuses:r,onNamespaceClick:m=>{t(m),e("editor")}}),s.jsx("div",{style:{marginTop:20,display:"flex",gap:10},children:s.jsx(W,{"data-testid":"diff-environments-btn",onClick:()=>e("diff"),children:"Diff environments"})})]})]})}function Rp({ns:e,manifest:t,onCommit:n}){var Ke;const[r,l]=v.useState(""),[i,a]=v.useState([]),[u,d]=v.useState(!1),[p,g]=v.useState("value"),[x,m]=v.useState(""),[k,S]=v.useState(""),[C,F]=v.useState(null),[y,f]=v.useState(null),[c,h]=v.useState(!1),[w,j]=v.useState(null),[_,D]=v.useState(""),[O,P]=v.useState(!1),[J,ue]=v.useState(""),[R,B]=v.useState([]),T=v.useRef(),L=5*60*1e3;v.useEffect(()=>()=>clearTimeout(T.current),[]);const G=(t==null?void 0:t.environments)??[];v.useEffect(()=>{G.length>0&&!r&&l(G[0].name)},[G,r]);const $=v.useCallback(async()=>{var z,K,Q;if(!(!r||!e)){h(!0),j(null);try{const ge=await X(`/api/namespace/${e}/${r}`);if(!ge.ok){const on=await ge.json();j(on.error||"Failed to load"),a([]);return}const ot=await ge.json(),Gl=new Set(ot.pending??[]),Rr=Object.entries(ot.values).map(([on,I])=>({key:on,value:String(I),type:"string",required:!1,visible:!1,edited:!1,isNew:!1,pending:Gl.has(on)}));a(Rr);const _r=((z=ot.metadata)==null?void 0:z.backend)??"age",ln=((Q=(K=ot.metadata)==null?void 0:K.recipients)==null?void 0:Q.length)??0;ue(`encrypted with ${_r} · ${ln} recipient${ln!==1?"s":""}`)}catch{j("Failed to load namespace data"),a([])}finally{h(!1)}}},[e,r]);v.useEffect(()=>{$()},[$]),v.useEffect(()=>{e&&X(`/api/lint/${e}`).then(z=>z.ok?z.json():{issues:[]}).then(z=>B(z.issues??[])).catch(()=>B([]))},[e]);const b=z=>{a(K=>K.map(Q=>Q.key===z?{...Q,visible:!Q.visible}:Q)),clearTimeout(T.current),T.current=setTimeout(()=>{a(K=>K.map(Q=>({...Q,value:"",visible:!1})))},L)},A=(z,K)=>{a(Q=>Q.map(ge=>ge.key===z?{...ge,value:K,edited:!0}:ge))},Z=async()=>{const z=i.filter(K=>K.edited);for(const K of z)await X(`/api/namespace/${e}/${r}/${K.key}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:K.value})});_&&n(_),P(!1),D(""),await $()},ee=async()=>{if(!x.trim())return;const z=x.trim(),K=p==="random"?{random:!0}:{value:k};try{const Q=await X(`/api/namespace/${e}/${r}/${z}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)});if(!Q.ok){const ot=await Q.json();j(ot.error||"Failed to add key");return}const ge=await Q.json();ge.warning&&j(ge.warning),a(ot=>[...ot,{key:z,value:p==="random"?"":k,type:"string",required:!1,visible:!1,edited:!1,isNew:!0,pending:p==="random"}])}catch{j("Failed to add key")}finally{d(!1),g("value"),m(""),S("")}},be=async z=>{try{const K=await X(`/api/namespace/${e}/${r}/${z}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({random:!0})});if(!K.ok){const Q=await K.json();j(Q.error||"Failed to reset key");return}a(Q=>Q.map(ge=>ge.key===z?{...ge,pending:!0,value:"",edited:!1}:ge))}catch{j("Failed to reset key")}finally{f(null),F(null)}},ce=i.some(z=>z.edited),wt=((Ke=t==null?void 0:t.environments.find(z=>z.name===r))==null?void 0:Ke.protected)===!0;return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:`/${e}`,subtitle:`Namespace · ${i.length} keys`,actions:s.jsxs(s.Fragment,{children:[ce&&!O&&s.jsx(W,{variant:"primary",onClick:()=>P(!0),children:"Commit changes"}),O&&s.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[s.jsx("input",{"data-testid":"commit-message-input",value:_,onChange:z=>D(z.target.value),placeholder:"Commit message...",style:{background:"#0D0F14",border:`1px solid ${o.borderLight}`,borderRadius:5,padding:"5px 10px",fontFamily:o.mono,fontSize:12,color:o.text,outline:"none",width:220}}),s.jsx(W,{variant:"primary",onClick:Z,children:"Save & Commit"}),s.jsx(W,{onClick:()=>P(!1),children:"Cancel"})]}),s.jsx(W,{"data-testid":"add-key-btn",onClick:()=>d(!0),children:"+ Add key"})]})}),s.jsxs("div",{style:{display:"flex",gap:0,borderBottom:`1px solid ${o.border}`,padding:"0 24px",background:"#0D0F14"},children:[G.map(z=>{const K=r===z.name,Q=Ud[z.name]??{color:o.textMuted};return s.jsxs("div",{role:"tab",tabIndex:0,onClick:()=>l(z.name),onKeyDown:ge=>{ge.key==="Enter"&&l(z.name)},style:{padding:"10px 18px",cursor:"pointer",borderBottom:K?`2px solid ${Q.color}`:"2px solid transparent",display:"flex",alignItems:"center",gap:7,marginBottom:-1},children:[s.jsx(qe,{env:z.name,small:!0}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:13,fontWeight:K?600:400,color:K?o.text:o.textMuted},children:z.name})]},z.name)}),s.jsx("div",{style:{flex:1}}),s.jsx("div",{style:{padding:"10px 0",display:"flex",alignItems:"center"},children:s.jsx("span",{style:{fontFamily:o.mono,fontSize:10,color:o.textMuted},children:J})})]}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:24},children:[wt&&s.jsxs("div",{"data-testid":"production-warning",style:{marginBottom:20,padding:"10px 16px",background:o.redDim,border:`1px solid ${o.red}44`,borderRadius:8,display:"flex",alignItems:"center",gap:10},children:[s.jsx("span",{style:{fontSize:14},children:"🔒"}),s.jsxs("span",{style:{fontFamily:o.sans,fontSize:12,color:o.red},children:[s.jsx("strong",{children:"Production environment."})," Changes will require confirmation before committing."]})]}),c&&s.jsx("p",{style:{color:o.textMuted,fontFamily:o.sans},children:"Loading..."}),w&&s.jsx("div",{style:{padding:"12px 16px",background:o.redDim,border:`1px solid ${o.red}44`,borderRadius:8,fontFamily:o.sans,fontSize:12,color:o.red,marginBottom:20},children:w}),!c&&!w&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:10,overflow:"hidden"},children:[s.jsx("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr 90px 36px",background:"#0D0F14",padding:"10px 20px",borderBottom:`1px solid ${o.border}`},children:["Key","Value","Type",""].map(z=>s.jsx("span",{style:{fontFamily:o.sans,fontSize:11,fontWeight:600,color:o.textMuted,textTransform:"uppercase",letterSpacing:"0.07em"},children:z},z||"actions"))}),i.map((z,K)=>s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr 90px 36px",padding:"0 20px",borderBottom:K<i.length-1?`1px solid ${o.border}`:"none",background:z.pending?"#F0A50012":z.edited?`${o.accent}08`:"transparent",borderLeft:z.pending?"3px solid #F0A50088":z.edited?`2px solid ${o.accent}`:"2px solid transparent",alignItems:"center",minHeight:48},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,paddingRight:16},children:[z.required&&s.jsx("span",{style:{color:o.accent,fontSize:14,lineHeight:1},children:"*"}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:12,color:o.text},children:z.key}),z.edited&&s.jsx("span",{"data-testid":"dirty-dot",style:{width:6,height:6,borderRadius:"50%",background:o.accent,flexShrink:0,display:"inline-block"}})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,paddingRight:16},children:[z.pending&&!z.visible?s.jsxs("span",{style:{fontFamily:o.mono,fontSize:11,fontStyle:"italic",color:o.accent},children:["PENDING ","—"," not yet set"]}):z.visible?s.jsx("input",{type:"text","data-testid":`value-input-${z.key}`,value:z.value,onChange:Q=>A(z.key,Q.target.value),autoComplete:"off",placeholder:z.pending?"Enter real value...":void 0,style:{flex:1,background:"#0D0F14",border:`1px solid ${o.borderLight}`,borderRadius:5,padding:"5px 10px",fontFamily:o.mono,fontSize:12,color:o.text,outline:"none"}}):s.jsx("span",{style:{fontFamily:o.mono,fontSize:13,color:o.textMuted,letterSpacing:"0.15em"},children:"•".repeat(Math.min(z.value.length,20))}),z.pending&&!z.visible?s.jsx("button",{"data-testid":`set-value-${z.key}`,onClick:()=>b(z.key),style:{background:`${o.accent}18`,border:`1px solid ${o.accent}55`,borderRadius:5,cursor:"pointer",color:o.accent,padding:"3px 10px",fontFamily:o.sans,fontSize:11,fontWeight:600},children:"Set value"}):s.jsx("button",{"data-testid":`eye-${z.key}`,onClick:()=>b(z.key),"aria-label":z.visible?"Hide value":"Reveal value",style:{background:"none",border:"none",cursor:"pointer",color:z.visible?o.accent:o.textDim,padding:4,display:"flex",alignItems:"center",fontSize:13},children:"👁"})]}),s.jsx("div",{children:z.pending?s.jsx("span",{style:{fontFamily:o.mono,fontSize:10,fontWeight:700,color:o.accent,background:`${o.accent}18`,border:`1px solid ${o.accent}33`,borderRadius:3,padding:"2px 7px"},children:"PENDING"}):s.jsx("span",{style:{fontFamily:o.mono,fontSize:10,color:o.blue,background:o.blueDim,border:`1px solid ${o.blue}33`,borderRadius:3,padding:"2px 7px"},children:z.type})}),s.jsxs("div",{style:{display:"flex",justifyContent:"center",position:"relative"},children:[s.jsx("button",{"data-testid":`overflow-${z.key}`,onClick:()=>F(C===z.key?null:z.key),style:{background:"none",border:"none",cursor:"pointer",color:o.textDim,fontSize:16,padding:4},children:"⋯"}),C===z.key&&s.jsx("div",{"data-testid":`overflow-menu-${z.key}`,style:{position:"absolute",top:"100%",right:0,zIndex:10,background:o.surface,border:`1px solid ${o.border}`,borderRadius:6,padding:4,minWidth:200,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:s.jsx("button",{"data-testid":`reset-random-${z.key}`,onClick:()=>{F(null),f(z.key)},title:"Use this to immediately invalidate a compromised secret while you arrange a replacement.",style:{display:"block",width:"100%",textAlign:"left",background:"none",border:"none",cursor:"pointer",fontFamily:o.sans,fontSize:12,color:o.accent,padding:"6px 10px",borderRadius:4},onMouseEnter:Q=>{Q.currentTarget.style.background=o.surfaceHover},onMouseLeave:Q=>{Q.currentTarget.style.background="none"},children:"Reset to random (pending)"})})]})]},z.key)),u&&s.jsxs("div",{style:{padding:"12px 20px",borderTop:`1px solid ${o.border}`,display:"flex",flexDirection:"column",gap:10},children:[s.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[s.jsx("input",{"data-testid":"new-key-input",placeholder:"KEY_NAME",value:x,onChange:z=>m(z.target.value),style:{flex:"0 0 240px",background:"#0D0F14",border:`1px solid ${o.accent}66`,borderRadius:5,padding:"6px 10px",fontFamily:o.mono,fontSize:12,color:o.text,outline:"none"}}),s.jsxs("div",{style:{display:"flex",gap:4},children:[s.jsx("button",{"data-testid":"mode-set-value",onClick:()=>{g("value"),S("")},style:{fontFamily:o.sans,fontSize:11,fontWeight:600,padding:"4px 12px",borderRadius:12,border:`1px solid ${p==="value"?o.accent:o.border}`,background:p==="value"?`${o.accent}22`:"transparent",color:p==="value"?o.accent:o.textMuted,cursor:"pointer"},children:"Set value"}),s.jsx("button",{"data-testid":"mode-random",onClick:()=>{g("random"),S("")},style:{fontFamily:o.sans,fontSize:11,fontWeight:600,padding:"4px 12px",borderRadius:12,border:`1px solid ${p==="random"?o.accent:o.border}`,background:p==="random"?`${o.accent}22`:"transparent",color:p==="random"?o.accent:o.textMuted,cursor:"pointer"},children:"Random (pending)"})]})]}),s.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[p==="value"?s.jsx("input",{"data-testid":"new-value-input",type:"password",placeholder:"value",value:k,onChange:z=>S(z.target.value),autoComplete:"off",style:{flex:1,background:"#0D0F14",border:`1px solid ${o.border}`,borderRadius:5,padding:"6px 10px",fontFamily:o.mono,fontSize:12,color:o.text,outline:"none"}}):s.jsx("div",{style:{flex:1,fontFamily:o.mono,fontSize:11,fontStyle:"italic",color:o.accent,padding:"6px 10px"},children:"A cryptographically random placeholder will be generated server-side."}),s.jsx(W,{variant:"primary","data-testid":"add-key-submit",onClick:ee,children:p==="random"?"Generate random value":"Add"}),s.jsx(W,{onClick:()=>{d(!1),g("value"),m(""),S("")},children:"Cancel"})]})]})]}),y&&s.jsxs("div",{"data-testid":"confirm-reset-dialog",style:{marginTop:16,padding:"14px 18px",background:`${o.accent}0A`,border:`1px solid ${o.accent}33`,borderRadius:8,fontFamily:o.sans,fontSize:12},children:[s.jsxs("p",{style:{color:o.text,margin:"0 0 10px 0"},children:["Reset ",s.jsx("strong",{style:{fontFamily:o.mono},children:y})," to a random placeholder? The current value will be overwritten."]}),s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsx(W,{variant:"primary","data-testid":"confirm-reset-yes",onClick:()=>be(y),children:"Reset to random"}),s.jsx(W,{"data-testid":"confirm-reset-no",onClick:()=>f(null),children:"Cancel"})]})]}),s.jsxs("div",{style:{marginTop:24},children:[s.jsxs("div",{style:{fontFamily:o.sans,fontSize:11,fontWeight:600,color:o.textMuted,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:10},children:["Schema ","·"," schemas/",e,".yaml"]}),s.jsx("div",{"data-testid":"schema-summary",style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:"12px 16px",fontFamily:o.mono,fontSize:11,color:o.textMuted,lineHeight:1.7},children:(()=>{const z=R.filter(Q=>Q.severity==="error"),K=R.filter(Q=>Q.severity==="warning");return z.length===0&&K.length===0?s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{color:o.green},children:"✓"})," All required keys present  ","·"," ",s.jsx("span",{style:{color:o.green},children:"✓"})," All types valid  ","·"," ",s.jsx("span",{style:{color:o.textDim},children:"0 warnings"})]}):s.jsxs(s.Fragment,{children:[z.length>0&&s.jsxs("span",{style:{color:o.red},children:[z.length," error",z.length!==1?"s":""]}),z.length>0&&K.length>0&&s.jsxs("span",{children:["  ","·","  "]}),K.length>0&&s.jsxs("span",{style:{color:o.yellow},children:[K.length," warning",K.length!==1?"s":""]})]})})()})]})]})]})]})}function jr({text:e}){const[t,n]=v.useState(!1),r=v.useCallback(()=>{var l;(l=navigator.clipboard)==null||l.writeText(e),n(!0),setTimeout(()=>n(!1),1800)},[e]);return s.jsx("button",{"data-testid":"copy-button",onClick:r,style:{background:t?o.greenDim:"none",border:`1px solid ${t?o.green+"55":o.borderLight}`,borderRadius:4,cursor:"pointer",color:t?o.green:o.textDim,fontFamily:o.mono,fontSize:10,padding:"2px 8px",transition:"all 0.15s"},children:t?"copied!":"copy"})}function Ca(e,t){return e.length>t?e.slice(0,t)+"…":e}function _p({manifest:e}){var ue,R,B;const t=(e==null?void 0:e.environments)??[],n=(e==null?void 0:e.namespaces)??[],[r,l]=v.useState(((ue=n[0])==null?void 0:ue.name)??""),[i,a]=v.useState(((R=t[0])==null?void 0:R.name)??""),[u,d]=v.useState(((B=t[t.length-1])==null?void 0:B.name)??""),[p,g]=v.useState(!1),[x,m]=v.useState(!1),[k,S]=v.useState(null),[C,F]=v.useState(!1),[y,f]=v.useState(!1);v.useEffect(()=>{n.length>0&&!r&&l(n[0].name),t.length>0&&!i&&a(t[0].name),t.length>1&&!u&&d(t[t.length-1].name)},[n,t,r,i,u]);const c=v.useCallback(async()=>{if(!(!r||!i||!u||i===u)){F(!0);try{const L=await X(`/api/diff/${r}/${i}/${u}${x?"?showValues=true":""}`);L.ok?S(await L.json()):S(null)}catch{S(null)}finally{F(!1)}}},[r,i,u,x]);v.useEffect(()=>{c()},[c]);const h=(k==null?void 0:k.rows)??[],w=h.filter(T=>p||T.status!=="identical"),j=h.filter(T=>T.status==="changed").length,_=h.filter(T=>T.status==="missing_a").length,D=h.filter(T=>T.status==="missing_b").length,O=h.filter(T=>T.status==="identical").length,P=h.filter(T=>T.status==="missing_a"||T.status==="missing_b"),J={changed:{label:"Changed",color:o.yellow},identical:{label:"Identical",color:o.textMuted},missing_a:{label:`Missing in ${i}`,color:o.red},missing_b:{label:`Missing in ${u}`,color:o.red}};return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Environment Diff",subtitle:"Compare secrets across environments",actions:s.jsxs(W,{variant:"primary","data-testid":"sync-missing-btn",onClick:()=>{f(!0),setTimeout(()=>f(!1),2e3)},children:["Sync missing keys ","→"]})}),y&&s.jsx("div",{"data-testid":"coming-soon-toast",style:{position:"fixed",top:20,right:20,padding:"10px 18px",background:o.surface,border:`1px solid ${o.accent}44`,borderRadius:8,fontFamily:o.sans,fontSize:12,color:o.accent,zIndex:1e3},children:"Coming soon"}),s.jsxs("div",{style:{padding:"14px 24px",background:"#0D0F14",borderBottom:`1px solid ${o.border}`,display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted},children:"Namespace"}),s.jsx("select",{value:r,onChange:T=>l(T.target.value),style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:6,padding:"5px 10px",fontFamily:o.mono,fontSize:12,color:o.text,cursor:"pointer"},children:n.map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted},children:"Compare"}),s.jsx("select",{value:i,onChange:T=>a(T.target.value),style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:6,padding:"5px 10px",fontFamily:o.mono,fontSize:12,color:o.text,cursor:"pointer"},children:t.map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:12,color:o.textDim},children:"→"}),s.jsx("select",{value:u,onChange:T=>d(T.target.value),style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:6,padding:"5px 10px",fontFamily:o.mono,fontSize:12,color:o.text,cursor:"pointer"},children:t.map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))})]}),s.jsx("div",{style:{flex:1}}),s.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[s.jsx("input",{type:"checkbox",checked:x,onChange:T=>m(T.target.checked),"data-testid":"show-values-toggle",style:{accentColor:o.accent}}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted},children:"Show values"})]}),s.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[s.jsx("input",{type:"checkbox",checked:p,onChange:T=>g(T.target.checked),style:{accentColor:o.accent}}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted},children:"Show identical"})]})]}),s.jsx("div",{style:{padding:"10px 24px",display:"flex",gap:10,borderBottom:`1px solid ${o.border}`},children:[{label:`${j} changed`,color:o.yellow},..._>0?[{label:`${_} missing in ${i}`,color:o.red}]:[],...D>0?[{label:`${D} missing in ${u}`,color:o.red}]:[],{label:`${O} identical`,color:o.textMuted}].map(T=>s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:T.color,background:`${T.color}14`,border:`1px solid ${T.color}33`,borderRadius:20,padding:"2px 10px"},children:T.label},T.label))}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:24},children:[C&&s.jsx("p",{style:{color:o.textMuted,fontFamily:o.sans},children:"Loading..."}),!C&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{"data-testid":"diff-table",style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:10,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr 1fr 100px",background:"#0D0F14",padding:"10px 20px",borderBottom:`1px solid ${o.border}`},children:[s.jsx("span",{style:{fontFamily:o.sans,fontSize:11,fontWeight:600,color:o.textMuted,textTransform:"uppercase",letterSpacing:"0.07em"},children:"Key"}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx(qe,{env:i,small:!0}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:11,fontWeight:600,color:o.textMuted,textTransform:"uppercase"},children:i})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx(qe,{env:u,small:!0}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:11,fontWeight:600,color:o.textMuted,textTransform:"uppercase"},children:u})]}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:11,fontWeight:600,color:o.textMuted,textTransform:"uppercase"},children:"Status"})]}),w.map((T,L)=>{const G=J[T.status];return s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr 1fr 100px",padding:"0 20px",minHeight:48,alignItems:"center",borderBottom:L<w.length-1?`1px solid ${o.border}`:"none",background:T.status==="changed"?`${o.yellow}06`:T.status.startsWith("missing")?`${o.red}06`:"transparent"},children:[s.jsx("span",{style:{fontFamily:o.mono,fontSize:12,color:o.text,paddingRight:16},children:T.key}),s.jsx("div",{style:{paddingRight:16},children:T.valueA!==null?s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:T.status==="changed"?o.yellow:o.textMuted,background:T.status==="changed"?o.yellowDim:"transparent",padding:T.status==="changed"?"2px 6px":"0",borderRadius:3},children:Ca(T.valueA,36)}):s.jsxs("span",{style:{fontFamily:o.mono,fontSize:11,color:o.textDim,fontStyle:"italic"},children:["—"," not set ","—"]})}),s.jsx("div",{style:{paddingRight:16},children:T.valueB!==null?s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:T.status==="changed"?o.blue:o.textMuted,background:T.status==="changed"?o.blueDim:"transparent",padding:T.status==="changed"?"2px 6px":"0",borderRadius:3},children:Ca(T.valueB,36)}):s.jsxs("span",{style:{fontFamily:o.mono,fontSize:11,color:o.textDim,fontStyle:"italic"},children:["—"," not set ","—"]})}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:10,fontWeight:600,color:G.color,background:`${G.color}18`,border:`1px solid ${G.color}33`,borderRadius:3,padding:"2px 8px",display:"inline-block"},children:G.label})]},T.key)})]}),P.length>0&&s.jsx("div",{"data-testid":"fix-hint",style:{marginTop:20,padding:"14px 18px",background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,display:"flex",flexDirection:"column",gap:10},children:P.map(T=>{const L=T.status==="missing_a"?i:u,G=`clef set ${r}/${L} ${T.key}`;return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[s.jsx("span",{style:{fontSize:16},children:"💡"}),s.jsxs("span",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted,flex:1},children:[s.jsx("strong",{style:{color:o.text},children:T.key})," is missing in"," ",s.jsx(qe,{env:L,small:!0}),". Run"," ",s.jsx("code",{style:{fontFamily:o.mono,fontSize:11,color:o.accent,background:o.accentDim,padding:"1px 6px",borderRadius:3},children:G})," ","to add it."]}),s.jsx(jr,{text:G})]},T.key)})})]})]})]})}function Tp({setView:e,setNs:t}){const[n,r]=v.useState("all"),[l,i]=v.useState([]),[a,u]=v.useState(null),[d,p]=v.useState(!1),g=v.useCallback(async()=>{p(!0);try{const c=await X("/api/lint");c.ok&&u(await c.json())}catch{}finally{p(!1)}},[]);v.useEffect(()=>{g()},[g]);const x=(a==null?void 0:a.issues)??[],m=(a==null?void 0:a.fileCount)??0,k=x.filter(c=>c.severity==="error"),S=x.filter(c=>c.severity==="warning"),C=x.filter(c=>c.severity==="info"),F=x.map((c,h)=>({...c,_idx:h})).filter(c=>!l.includes(c._idx)).filter(c=>n==="all"||c.severity===n||c.category===n),y=c=>{if(c.file){const h=c.file.split("/"),w=h[h.length-2]??h[0];t(w),e("editor")}},f=F.length===0;return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Lint",subtitle:"clef lint \\u2014 full repo health check",actions:s.jsxs(s.Fragment,{children:[s.jsxs(W,{onClick:g,children:["↻"," Re-run"]}),k.length===0&&s.jsxs(W,{variant:"primary",children:["All clear ","—"," commit"]})]})}),!d&&!f&&s.jsxs("div",{style:{padding:"14px 24px",background:"#0D0F14",borderBottom:`1px solid ${o.border}`,display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[[{key:"all",label:"All issues",count:x.length,color:o.textMuted},{key:"error",label:"Errors",count:k.length,color:o.red},{key:"warning",label:"Warnings",count:S.length,color:o.yellow},{key:"info",label:"Info",count:C.length,color:o.blue}].map(c=>s.jsxs("button",{"data-testid":`filter-${c.key}`,onClick:()=>r(c.key),style:{display:"flex",alignItems:"center",gap:6,padding:"5px 12px",borderRadius:20,cursor:"pointer",fontFamily:o.sans,fontSize:12,fontWeight:n===c.key?600:400,color:n===c.key?c.color:o.textMuted,background:n===c.key?`${c.color}18`:"transparent",border:`1px solid ${n===c.key?`${c.color}55`:o.border}`,transition:"all 0.12s"},children:[s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,fontWeight:700,color:c.color},children:c.count}),c.label]},c.key)),s.jsx("div",{style:{flex:1}}),["matrix","schema","sops"].map(c=>{const h=ja[c];return s.jsx("button",{onClick:()=>r(n===c?"all":c),style:{padding:"4px 10px",borderRadius:4,cursor:"pointer",fontFamily:o.mono,fontSize:10,fontWeight:600,color:n===c?h.color:o.textDim,background:n===c?`${h.color}18`:"transparent",border:`1px solid ${n===c?`${h.color}55`:o.borderLight}`,letterSpacing:"0.06em"},children:h.label},c)})]}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:24},children:[d&&s.jsxs(s.Fragment,{children:[s.jsx("style",{children:`
41
- @keyframes clef-scan-line {
42
- 0% { transform: scaleX(0); opacity: 0; }
43
- 10% { opacity: 1; }
44
- 50% { transform: scaleX(1); opacity: 1; }
45
- 80% { transform: scaleX(1); opacity: 0.3; }
46
- 100% { transform: scaleX(0); opacity: 0; }
47
- }
48
- @keyframes clef-scan-glow {
49
- 0%, 100% { opacity: 0.4; }
50
- 50% { opacity: 1; }
51
- }
52
- `}),s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"48px 24px"},children:s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:10,padding:"28px 40px",textAlign:"center",minWidth:200},children:[s.jsx("div",{style:{marginBottom:16,display:"flex",flexDirection:"column",gap:6},children:[0,.3,.6].map((c,h)=>s.jsx("div",{style:{height:3,borderRadius:2,background:o.accent,transformOrigin:"left",animation:`clef-scan-line 1.8s ease-in-out ${c}s infinite`,opacity:0,width:[120,90,105][h]}},h))}),s.jsx("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted,animation:"clef-scan-glow 1.8s ease-in-out infinite"},children:"Linting..."})]})})]}),!d&&f&&s.jsxs("div",{"data-testid":"all-clear",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:14,padding:"60px 0"},children:[s.jsx("div",{style:{width:56,height:56,borderRadius:"50%",background:o.greenDim,border:`1px solid ${o.green}44`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24},children:"✓"}),s.jsx("div",{style:{fontFamily:o.sans,fontWeight:600,fontSize:16,color:o.green},children:"All clear"}),s.jsxs("div",{style:{fontFamily:o.mono,fontSize:12,color:o.textMuted},children:["No issues found across ",m," files"]})]}),!d&&!f&&["error","warning","info"].map(c=>{const h=F.filter(j=>j.severity===c);if(!h.length)return null;const w=xp[c];return s.jsxs("div",{style:{marginBottom:24},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[s.jsx("div",{style:{width:22,height:22,borderRadius:"50%",background:w.bg,border:`1px solid ${w.color}44`,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:o.mono,fontSize:11,fontWeight:700,color:w.color},children:w.icon}),s.jsxs("span",{style:{fontFamily:o.sans,fontWeight:600,fontSize:13,color:w.color},children:[w.label,"s"]}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:10,color:w.color,background:w.bg,border:`1px solid ${w.color}33`,borderRadius:10,padding:"1px 8px"},children:h.length})]}),s.jsx("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:10,overflow:"hidden"},children:h.map((j,_)=>{var J,ue;const D=ja[j.category]??{label:j.category,color:o.textMuted},O=((J=j.file)==null?void 0:J.split("/"))??[],P=O.length>=2?(ue=O[O.length-1])==null?void 0:ue.replace(".enc.yaml",""):void 0;return s.jsxs("div",{style:{display:"flex",alignItems:"flex-start",borderBottom:_<h.length-1?`1px solid ${o.border}`:"none",borderLeft:`3px solid ${w.color}66`,transition:"background 0.1s",padding:"14px 18px",gap:14},children:[s.jsx("div",{style:{flexShrink:0,paddingTop:2},children:s.jsx("span",{style:{fontFamily:o.mono,fontSize:9,fontWeight:700,color:D.color,background:`${D.color}18`,border:`1px solid ${D.color}33`,borderRadius:3,padding:"2px 6px",letterSpacing:"0.07em",textTransform:"uppercase"},children:D.label})}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4,flexWrap:"wrap"},children:[s.jsx("span",{"data-testid":`file-ref-${j.file}`,role:"link",tabIndex:0,onClick:()=>y(j),onKeyDown:R=>{R.key==="Enter"&&y(j)},style:{fontFamily:o.mono,fontSize:12,fontWeight:600,color:o.accent,cursor:j.file?"pointer":"default",textDecoration:j.file?"underline":"none",textDecorationColor:`${o.accent}55`,textDecorationStyle:"dotted"},children:j.file}),j.key&&s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.textDim},children:"→"}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.text,background:"#1A1F2B",border:`1px solid ${o.borderLight}`,borderRadius:3,padding:"1px 7px"},children:j.key})]}),P&&s.jsx(qe,{env:P,small:!0})]}),s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted,marginBottom:j.fixCommand?10:0},children:j.message}),j.fixCommand&&s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"#0D0F14",border:`1px solid ${o.borderLight}`,borderRadius:6,padding:"6px 10px",width:"fit-content"},children:[s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.green},children:"$"}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.text},children:j.fixCommand}),s.jsx(jr,{text:j.fixCommand})]})]}),s.jsx("button",{onClick:()=>i(R=>[...R,j._idx]),title:"Dismiss","aria-label":"Dismiss issue",style:{background:"none",border:"none",cursor:"pointer",color:o.textDim,fontSize:16,flexShrink:0,padding:"0 4px",lineHeight:1,transition:"color 0.1s"},children:"×"})]},j._idx)})})]},c)}),!d&&!f&&s.jsxs("div",{style:{marginTop:8,padding:"12px 16px",background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,display:"flex",alignItems:"center",gap:12},children:[s.jsx("span",{style:{fontSize:14},children:"💡"}),s.jsxs("span",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted},children:["Fix all errors before committing. Warnings and info items won't block commits but should be reviewed. Run"," ",s.jsx("code",{style:{fontFamily:o.mono,fontSize:11,color:o.accent,background:o.accentDim,padding:"1px 6px",borderRadius:3},children:"clef lint --fix"})," ","to auto-resolve safe issues."]})]})]})]})}function Dp(){const[e,t]=v.useState("idle"),[n,r]=v.useState("all"),[l,i]=v.useState(null),[a,u]=v.useState(null),[d,p]=v.useState([]),[g,x]=v.useState("all");v.useEffect(()=>{X("/api/scan/status").then(c=>c.ok?c.json():null).then(c=>{if(c!=null&&c.lastRun){i(c.lastRun),u(c.lastRunAt);const h=c.lastRun.matches.length>0||c.lastRun.unencryptedMatrixFiles.length>0;t(h?"issues":"clean")}}).catch(()=>{})},[]);const m=v.useCallback(async()=>{t("scanning"),p([]);try{const c=await X("/api/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({severity:n})});if(!c.ok)throw new Error("Scan failed");const h=await c.json();i(h),u(new Date().toISOString());const w=h.matches.length>0||h.unencryptedMatrixFiles.length>0;t(w?"issues":"clean")}catch{t("idle")}},[n]),k=async c=>{try{await X("/api/editor/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:c})})}catch{}},S=c=>{if(!c)return"";const h=Date.now()-new Date(c).getTime();return h<6e4?"just now":`${Math.floor(h/6e4)}m ago`},C=((l==null?void 0:l.matches)??[]).map((c,h)=>({...c,_idx:h})).filter(c=>!d.includes(c._idx)).filter(c=>g==="pattern"?c.matchType==="pattern":g==="entropy"?c.matchType==="entropy":!0),F=d.length,y=((l==null?void 0:l.matches.length)??0)+((l==null?void 0:l.unencryptedMatrixFiles.length)??0),f=l?(l.durationMs/1e3).toFixed(1):"0.0";return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Scan",subtitle:"clef scan — detect plaintext secrets",actions:e==="issues"||e==="clean"?s.jsx(W,{onClick:m,children:"↺ Scan again"}):void 0}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:24},children:[e==="idle"&&s.jsxs("div",{"data-testid":"scan-idle",style:{maxWidth:520,margin:"0 auto",paddingTop:40},children:[s.jsx("div",{style:{fontFamily:o.sans,fontSize:14,color:o.textMuted,marginBottom:24,lineHeight:1.6},children:"Scans your repository for secrets that have escaped the Clef matrix — plaintext values in files that should be encrypted."}),s.jsxs("div",{style:{marginBottom:24},children:[s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,fontWeight:600,color:o.textMuted,marginBottom:10,letterSpacing:"0.05em",textTransform:"uppercase"},children:"Severity"}),["all","high"].map(c=>s.jsxs("label",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,cursor:"pointer",fontFamily:o.sans,fontSize:13,color:n===c?o.text:o.textMuted},children:[s.jsx("input",{type:"radio",name:"severity",value:c,checked:n===c,onChange:()=>r(c),style:{accentColor:o.accent},"data-testid":`severity-${c}`}),c==="all"?"All (patterns + entropy)":"High (patterns only)"]},c))]}),s.jsx(W,{variant:"primary",onClick:m,"data-testid":"scan-button",children:"Scan repository"}),s.jsxs("div",{style:{marginTop:24,padding:"12px 16px",background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,fontFamily:o.sans,fontSize:12,color:o.textMuted},children:["ℹ️ ",s.jsx("code",{style:{fontFamily:o.mono},children:"clef scan"})," runs automatically on every commit via the pre-commit hook."]})]}),e==="scanning"&&s.jsxs("div",{"data-testid":"scan-scanning",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:16,paddingTop:80},children:[s.jsx("div",{style:{width:40,height:40,borderRadius:"50%",border:`3px solid ${o.accent}44`,borderTopColor:o.accent,animation:"spin 0.8s linear infinite"}}),s.jsx("div",{style:{fontFamily:o.sans,fontSize:14,color:o.textMuted},children:"Scanning..."})]}),e==="clean"&&l&&s.jsxs("div",{"data-testid":"scan-clean",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:14,paddingTop:60},children:[s.jsx("div",{style:{width:56,height:56,borderRadius:"50%",background:o.greenDim,border:`1px solid ${o.green}44`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,color:o.green},children:"✓"}),s.jsx("div",{style:{fontFamily:o.sans,fontWeight:600,fontSize:16,color:o.green},children:"No issues found"}),s.jsxs("div",{style:{fontFamily:o.mono,fontSize:12,color:o.textMuted},children:[l.filesScanned," files scanned in ",f,"s"]}),s.jsxs("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textDim},children:["Last run: ",S(a)]})]}),e==="issues"&&l&&s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:20,flexWrap:"wrap"},children:[s.jsxs("span",{style:{fontFamily:o.sans,fontSize:14,color:o.text,fontWeight:600},children:[y," issue",y!==1?"s":""," found in ",l.filesScanned," ","files (",f,"s)"]}),s.jsx("div",{style:{flex:1}}),[{key:"all",label:"All"},{key:"unencrypted",label:"Unencrypted"},{key:"pattern",label:"Pattern"},{key:"entropy",label:"Entropy"}].map(({key:c,label:h})=>s.jsx("button",{"data-testid":`filter-${c}`,onClick:()=>x(c),style:{padding:"4px 10px",borderRadius:4,cursor:"pointer",fontFamily:o.mono,fontSize:11,fontWeight:g===c?600:400,color:g===c?o.accent:o.textMuted,background:g===c?o.accentDim:"transparent",border:`1px solid ${g===c?o.accent+"55":o.borderLight}`},children:h},c))]}),(g==="all"||g==="unencrypted")&&l.unencryptedMatrixFiles.map(c=>s.jsx(Ea,{type:"error",typeLabel:"UNENCRYPTED FILE",file:c,message:"Missing SOPS metadata — file is in plaintext.",fixCommand:`clef encrypt ${c.replace(/\.enc\.(yaml|json)$/,"")}`,onViewFile:()=>k(c)},`unenc-${c}`)),C.map(c=>{var h;return s.jsx(Ea,{type:"warning",typeLabel:c.matchType==="pattern"?(c.patternName??"Pattern match").toUpperCase():`HIGH ENTROPY (${(h=c.entropy)==null?void 0:h.toFixed(1)})`,file:`${c.file}:${c.line}`,message:c.preview,fixCommand:c.matchType==="pattern"?"clef set <namespace>/<env> <KEY>":`clef set <namespace>/<env> ${c.preview.split("=")[0]}`,onViewFile:()=>k(c.file),onDismiss:()=>p(w=>[...w,c._idx])},`match-${c._idx}`)}),F>0&&s.jsxs("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textDim,marginTop:12},children:[F," dismissed"]})]})]})]})}function Ea({type:e,typeLabel:t,file:n,message:r,fixCommand:l,onViewFile:i,onDismiss:a}){const u=e==="error"?o.red:o.yellow;return s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderLeft:`3px solid ${u}66`,borderRadius:8,padding:"14px 18px",marginBottom:12,display:"flex",alignItems:"flex-start",gap:14},children:[s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6,flexWrap:"wrap"},children:[s.jsx("span",{style:{fontFamily:o.mono,fontSize:9,fontWeight:700,color:u,background:`${u}18`,border:`1px solid ${u}33`,borderRadius:3,padding:"2px 6px",letterSpacing:"0.07em"},children:t}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:12,color:o.accent,cursor:i?"pointer":"default"},onClick:i,role:i?"button":void 0,tabIndex:i?0:void 0,onKeyDown:i?d=>{d.key==="Enter"&&i()}:void 0,children:n})]}),s.jsx("div",{style:{fontFamily:o.mono,fontSize:12,color:o.text,marginBottom:10},"data-testid":"match-preview",children:r}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"#0D0F14",border:`1px solid ${o.borderLight}`,borderRadius:6,padding:"6px 10px",width:"fit-content"},children:[s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.green},children:"$"}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.text},children:l}),s.jsx(jr,{text:l})]}),i&&s.jsx("button",{"data-testid":"view-file-button",onClick:i,style:{marginTop:8,background:"none",border:`1px solid ${o.borderLight}`,borderRadius:4,cursor:"pointer",color:o.textMuted,fontFamily:o.sans,fontSize:11,padding:"3px 8px"},children:"View file"})]}),a&&s.jsx("button",{"data-testid":"dismiss-button",onClick:a,title:"Dismiss","aria-label":"Dismiss issue",style:{background:"none",border:"none",cursor:"pointer",color:o.textDim,fontSize:16,flexShrink:0,padding:"0 4px",lineHeight:1},children:"×"})]})}function Ip({manifest:e,setView:t}){const[n,r]=v.useState(1),[l,i]=v.useState(""),[a,u]=v.useState(""),[d,p]=v.useState(""),[g,x]=v.useState("auto"),[m,k]=v.useState(null),[S,C]=v.useState([]),[F,y]=v.useState(null),[f,c]=v.useState(!1),[h,w]=v.useState(null);v.useEffect(()=>{e&&(!l&&e.namespaces.length>0&&i(e.namespaces[0].name),!a&&e.environments.length>0&&u(e.environments[0].name))},[e,l,a]);const j=(e==null?void 0:e.namespaces)??[],_=(e==null?void 0:e.environments)??[],D=async()=>{if(!l||!a||!d.trim()){w("Please select a namespace, environment, and paste content.");return}c(!0),w(null);try{const R=await X("/api/import/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:`${l}/${a}`,content:d,format:g==="auto"?void 0:g,overwriteKeys:S})});if(!R.ok){const T=await R.json();w(T.error??"Preview failed");return}const B=await R.json();k(B),C([]),r(2)}catch(R){w(R instanceof Error?R.message:"Preview failed")}finally{c(!1)}},O=async()=>{if(!m)return;c(!0),w(null);const R=[...m.wouldImport,...m.wouldSkip.filter(B=>S.includes(B.key)).map(B=>B.key)];try{const B=await X("/api/import/apply",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:`${l}/${a}`,content:d,format:g==="auto"?void 0:g,keys:R,overwriteKeys:S})});if(!B.ok){const L=await B.json();w(L.error??"Import failed");return}const T=await B.json();y(T),p(""),r(3)}catch(B){w(B instanceof Error?B.message:"Import failed")}finally{c(!1)}},P=()=>{r(1),p(""),k(null),y(null),C([]),w(null)},J=R=>{C(B=>B.includes(R)?B.filter(T=>T!==R):[...B,R])},ue=((m==null?void 0:m.wouldImport.length)??0)+S.filter(R=>m==null?void 0:m.wouldSkip.some(B=>B.key===R)).length;return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Import",subtitle:"clef import — bulk migrate secrets"}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:620,margin:"0 auto"},children:[s.jsx("div",{style:{display:"flex",alignItems:"center",gap:0,marginBottom:32},children:[1,2,3].map((R,B)=>s.jsxs(Oa.Fragment,{children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("div",{style:{width:24,height:24,borderRadius:"50%",background:n>=R?o.accent:o.surface,border:`1px solid ${n>=R?o.accent:o.border}`,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:o.mono,fontSize:11,fontWeight:700,color:n>=R?"#000":o.textDim},children:R}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:12,color:n>=R?o.text:o.textDim,fontWeight:n===R?600:400},children:R===1?"Source":R===2?"Preview":"Done"})]}),B<2&&s.jsx("div",{style:{flex:1,height:1,background:n>R?o.accent:o.border,margin:"0 12px",minWidth:40}})]},R))}),h&&s.jsx("div",{style:{background:o.redDim,border:`1px solid ${o.red}44`,borderRadius:8,padding:"12px 16px",marginBottom:16,fontFamily:o.sans,fontSize:13,color:o.red},children:h}),n===1&&s.jsxs("div",{children:[s.jsxs("div",{style:{marginBottom:20},children:[s.jsx(wi,{children:"Target"}),s.jsxs("div",{style:{display:"flex",gap:12},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(za,{children:"Namespace"}),s.jsx(Fa,{value:l,onChange:R=>i(R.target.value),children:j.map(R=>s.jsx("option",{value:R.name,children:R.name},R.name))})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(za,{children:"Environment"}),s.jsx(Fa,{value:a,onChange:R=>u(R.target.value),children:_.map(R=>s.jsx("option",{value:R.name,children:R.name},R.name))})]})]})]}),s.jsxs("div",{style:{marginBottom:20},children:[s.jsx(wi,{children:"Format"}),s.jsx("div",{style:{display:"flex",gap:16},children:["auto","dotenv","json","yaml"].map(R=>s.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",fontFamily:o.sans,fontSize:13,color:g===R?o.text:o.textMuted},children:[s.jsx("input",{type:"radio",name:"format",value:R,checked:g===R,onChange:()=>x(R),style:{accentColor:o.accent}}),R==="auto"?"Auto":R]},R))})]}),s.jsxs("div",{style:{marginBottom:8},children:[s.jsx(wi,{children:"Paste secrets"}),s.jsx("textarea",{value:d,onChange:R=>p(R.target.value),placeholder:g==="json"?`{
53
- "DB_HOST": "localhost",
54
- "DB_PORT": "5432"
55
- }`:g==="yaml"?`DB_HOST: localhost
56
- DB_PORT: '5432'`:`DB_HOST=localhost
57
- DB_PORT=5432
58
- # Comments are ignored`,rows:12,style:{width:"100%",background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:14,fontFamily:o.mono,fontSize:12,color:o.text,resize:"vertical",outline:"none",boxSizing:"border-box"}})]}),s.jsx("div",{style:{marginBottom:24,padding:"10px 14px",background:o.surface,border:`1px solid ${o.border}`,borderRadius:6,fontFamily:o.sans,fontSize:11,color:o.textMuted,lineHeight:1.5},children:"Values are sent directly to the local Clef server (127.0.0.1) and encrypted immediately. They are never stored in browser memory beyond this session."}),s.jsx(W,{variant:"primary",onClick:D,disabled:f||!d.trim(),children:f?"Previewing...":"Next: Preview"})]}),n===2&&m&&s.jsxs("div",{children:[s.jsxs("div",{style:{fontFamily:o.sans,fontSize:13,color:o.textMuted,marginBottom:20},children:["Importing to"," ",s.jsxs("span",{style:{color:o.accent,fontWeight:600},children:[l,"/",a]}),". ",m.totalKeys," key",m.totalKeys!==1?"s":""," parsed."]}),m.warnings.length>0&&s.jsx("div",{style:{marginBottom:16},children:m.warnings.map((R,B)=>s.jsxs("div",{style:{fontFamily:o.mono,fontSize:11,color:o.yellow,marginBottom:4},children:["⚠ ",R]},B))}),m.wouldImport.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs(qr,{color:o.green,children:["New keys (",m.wouldImport.length,")"]}),m.wouldImport.map(R=>s.jsx(Ci,{icon:"\\u2192",iconColor:o.green,label:R},R))]}),m.wouldSkip.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs(qr,{color:o.yellow,children:["Already exists (",m.wouldSkip.length,") — toggle to overwrite"]}),m.wouldSkip.map(({key:R,reason:B})=>{const T=S.includes(R);return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"6px 10px",borderRadius:6,marginBottom:4,background:T?o.yellowDim:"transparent",border:`1px solid ${T?o.yellow+"44":o.border}`},children:[s.jsx("input",{type:"checkbox",checked:T,onChange:()=>J(R),style:{accentColor:o.yellow},id:`overwrite-${R}`}),s.jsx("label",{htmlFor:`overwrite-${R}`,style:{fontFamily:o.mono,fontSize:12,color:T?o.yellow:o.textMuted,flex:1,cursor:"pointer"},children:R}),s.jsx("span",{style:{fontFamily:o.sans,fontSize:11,color:o.textDim},children:B})]},R)})]}),m.wouldImport.length===0&&m.wouldSkip.length===0&&s.jsx("div",{style:{fontFamily:o.sans,fontSize:13,color:o.textMuted,padding:"24px 0",textAlign:"center"},children:"No importable keys found."}),s.jsxs("div",{style:{display:"flex",gap:10,marginTop:24},children:[s.jsx(W,{variant:"ghost",onClick:()=>r(1),children:"Back"}),s.jsx(W,{variant:"primary",onClick:O,disabled:f||ue===0,children:f?"Importing...":`Import ${ue} key${ue!==1?"s":""}`})]})]}),n===3&&F&&s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",paddingTop:20,paddingBottom:32},children:[s.jsx("div",{style:{width:56,height:56,borderRadius:"50%",background:F.failed.length>0?o.redDim:o.greenDim,border:`1px solid ${F.failed.length>0?o.red+"44":o.green+"44"}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,color:F.failed.length>0?o.red:o.green,marginBottom:16},children:F.failed.length>0?"⚠":"✓"}),s.jsx("div",{style:{fontFamily:o.sans,fontWeight:600,fontSize:16,color:F.failed.length>0?o.yellow:o.green,marginBottom:8},children:F.failed.length>0?"Import completed with errors":"Import complete"}),s.jsxs("div",{style:{fontFamily:o.mono,fontSize:12,color:o.textMuted},children:[F.imported.length," imported, ",F.skipped.length," skipped,"," ",F.failed.length," failed"]})]}),F.imported.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs(qr,{color:o.green,children:["Imported (",F.imported.length,")"]}),F.imported.map(R=>s.jsx(Ci,{icon:"\\u2713",iconColor:o.green,label:R},R))]}),F.failed.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs(qr,{color:o.red,children:["Failed (",F.failed.length,")"]}),F.failed.map(({key:R,error:B})=>s.jsx(Ci,{icon:"\\u2717",iconColor:o.red,label:R,note:B},R))]}),s.jsxs("div",{style:{display:"flex",gap:10,marginTop:24},children:[s.jsx(W,{variant:"primary",onClick:()=>t("matrix"),children:"View in Matrix"}),s.jsx(W,{variant:"ghost",onClick:P,children:"Import more"})]})]})]})})]})}function wi({children:e}){return s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,fontWeight:600,color:o.textMuted,marginBottom:8,letterSpacing:"0.05em",textTransform:"uppercase"},children:e})}function za({children:e}){return s.jsx("div",{style:{fontFamily:o.sans,fontSize:11,color:o.textDim,marginBottom:4},children:e})}function Fa({value:e,onChange:t,children:n}){return s.jsx("select",{value:e,onChange:t,style:{width:"100%",background:o.surface,border:`1px solid ${o.border}`,borderRadius:6,padding:"7px 10px",fontFamily:o.sans,fontSize:13,color:o.text,outline:"none",cursor:"pointer"},children:n})}function qr({children:e,color:t}){return s.jsx("div",{style:{fontFamily:o.sans,fontSize:11,fontWeight:600,color:t,letterSpacing:"0.06em",textTransform:"uppercase",marginBottom:8},children:e})}function Ci({icon:e,iconColor:t,label:n,note:r}){return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"5px 10px",borderRadius:6,marginBottom:3},children:[s.jsx("span",{style:{color:t,fontFamily:o.mono,fontSize:13},children:e}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:12,color:o.text,flex:1},children:n}),r&&s.jsx("span",{style:{fontFamily:o.sans,fontSize:11,color:o.textDim},children:r})]})}function $p({manifest:e,setView:t}){const[n,r]=v.useState([]),[l,i]=v.useState(0),[a,u]=v.useState(!1),[d,p]=v.useState(""),[g,x]=v.useState(""),[m,k]=v.useState(null),[S,C]=v.useState(!1),[F,y]=v.useState(null),[f,c]=v.useState(null),[h,w]=v.useState(0),[j,_]=v.useState(!1),[D,O]=v.useState(null),P=v.useRef(null),J=v.useCallback(async()=>{try{const L=await X("/api/recipients");if(L.ok){const G=await L.json();r(G.recipients),i(G.totalFiles)}}catch{}},[]);v.useEffect(()=>{J()},[J]),v.useEffect(()=>{if(!d.trim()){k(null);return}return P.current&&clearTimeout(P.current),P.current=setTimeout(async()=>{try{const L=await X(`/api/recipients/validate?key=${encodeURIComponent(d.trim())}`);if(L.ok){const G=await L.json();k(G)}}catch{}},300),()=>{P.current&&clearTimeout(P.current)}},[d]);const ue=async()=>{if(m!=null&&m.valid){C(!0),y(null);try{const L=await X("/api/recipients/add",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:d.trim(),label:g.trim()||void 0})});if(!L.ok){const $=await L.json();y($.error??"Failed to add recipient");return}const G=await L.json();r(G.recipients),u(!1),p(""),x(""),k(null)}catch(L){y(L instanceof Error?L.message:"Failed to add recipient")}finally{C(!1)}}},R=L=>{c(L),w(1),_(!1)},B=()=>{c(null),w(0),_(!1)},T=async()=>{if(f){C(!0),y(null);try{const L=await X("/api/recipients/remove",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:f.key})});if(!L.ok){const b=await L.json();y(b.error??"Failed to remove recipient");return}const G=await L.json();r(G.recipients);const $=f.label??f.preview;O({name:$,targets:G.rotationReminder??[]}),B()}catch(L){y(L instanceof Error?L.message:"Failed to remove recipient")}finally{C(!1)}}};return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Recipients",subtitle:"clef recipients -- manage age encryption keys",actions:!a&&h===0?s.jsx(W,{variant:"primary",onClick:()=>u(!0),children:"+ Add recipient"}):void 0}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:620,margin:"0 auto"},children:[F&&s.jsx("div",{style:{background:o.redDim,border:`1px solid ${o.red}44`,borderRadius:8,padding:"12px 16px",marginBottom:16,fontFamily:o.sans,fontSize:13,color:o.red},children:F}),D&&s.jsxs("div",{"data-testid":"rotation-banner",style:{background:o.yellowDim,border:`1px solid ${o.yellow}44`,borderRadius:8,padding:"14px 18px",marginBottom:20},children:[s.jsx("div",{style:{fontFamily:o.sans,fontSize:13,fontWeight:600,color:o.yellow,marginBottom:8},children:"Rotation reminder"}),s.jsxs("div",{style:{fontFamily:o.sans,fontSize:13,color:o.text,marginBottom:10,lineHeight:1.5},children:[s.jsx("strong",{children:D.name})," has been removed and files re-encrypted. However, the removed key may still decrypt old versions of these files from git history. Rotate secret values in the following targets to complete revocation:"]}),D.targets.length>0&&s.jsx("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted,marginBottom:12,paddingLeft:12},children:D.targets.map(L=>s.jsx("div",{style:{marginBottom:2},children:L},L))}),s.jsxs("div",{style:{display:"flex",gap:10},children:[s.jsx(W,{variant:"primary",onClick:()=>t("matrix"),children:"Go to Matrix to rotate"}),s.jsx(W,{variant:"ghost",onClick:()=>O(null),children:"Dismiss"})]})]}),a&&s.jsxs("div",{"data-testid":"add-form",style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:10,padding:20,marginBottom:24},children:[s.jsx("div",{style:{fontFamily:o.sans,fontSize:14,fontWeight:600,color:o.text,marginBottom:16},children:"Add recipient"}),s.jsxs("div",{style:{marginBottom:14},children:[s.jsx(Ra,{children:"Age public key"}),s.jsx("input",{type:"text",value:d,onChange:L=>p(L.target.value),placeholder:"age1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq","data-testid":"add-key-input",style:{width:"100%",background:o.bg,border:`1px solid ${m?m.valid?o.green+"66":o.red+"66":o.border}`,borderRadius:6,padding:"8px 12px",fontFamily:o.mono,fontSize:12,color:o.text,outline:"none",boxSizing:"border-box"}}),m&&!m.valid&&s.jsx("div",{style:{fontFamily:o.sans,fontSize:11,color:o.red,marginTop:4},children:m.error}),(m==null?void 0:m.valid)&&s.jsx("div",{style:{fontFamily:o.sans,fontSize:11,color:o.green,marginTop:4},children:"Valid age public key"})]}),s.jsxs("div",{style:{marginBottom:14},children:[s.jsx(Ra,{children:"Label (optional)"}),s.jsx("input",{type:"text",value:g,onChange:L=>x(L.target.value),placeholder:"e.g. alice@example.com","data-testid":"add-label-input",style:{width:"100%",background:o.bg,border:`1px solid ${o.border}`,borderRadius:6,padding:"8px 12px",fontFamily:o.sans,fontSize:13,color:o.text,outline:"none",boxSizing:"border-box"}})]}),s.jsxs("div",{style:{marginBottom:16,padding:"10px 14px",background:o.yellowDim,border:`1px solid ${o.yellow}44`,borderRadius:6,fontFamily:o.sans,fontSize:12,color:o.yellow,lineHeight:1.5},children:["Adding a recipient will re-encrypt ",l," file",l!==1?"s":"",". This may take a moment."]}),s.jsxs("div",{style:{display:"flex",gap:10},children:[s.jsx(W,{variant:"ghost",onClick:()=>{u(!1),p(""),x(""),k(null),y(null)},children:"Cancel"}),s.jsx(W,{variant:"primary",onClick:ue,disabled:S||!(m!=null&&m.valid),children:S?"Re-encrypting...":"Add and re-encrypt"})]})]}),h===1&&f&&s.jsxs("div",{"data-testid":"remove-dialog",style:{background:o.surface,border:`1px solid ${o.red}44`,borderRadius:10,padding:20,marginBottom:24},children:[s.jsx("div",{style:{fontFamily:o.sans,fontSize:14,fontWeight:600,color:o.red,marginBottom:12},children:"Remove recipient"}),s.jsxs("div",{style:{fontFamily:o.sans,fontSize:13,color:o.text,lineHeight:1.6,marginBottom:16},children:["You are about to remove"," ",s.jsx("strong",{style:{color:o.accent},children:f.label??f.preview})," ","(",f.preview,"). All ",l," encrypted file",l!==1?"s":""," will be re-encrypted without this key."]}),s.jsxs("div",{style:{background:o.redDim,border:`1px solid ${o.red}44`,borderRadius:6,padding:"12px 14px",marginBottom:16,fontFamily:o.sans,fontSize:12,color:o.red,lineHeight:1.5},children:["Re-encryption only removes ",s.jsx("em",{children:"future"})," access. The removed key can still decrypt old versions from git history. You must rotate all secret values after removal."]}),s.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:10,cursor:"pointer",fontFamily:o.sans,fontSize:13,color:o.text,marginBottom:16},children:[s.jsx("input",{type:"checkbox",checked:j,onChange:L=>_(L.target.checked),"data-testid":"acknowledge-checkbox",style:{accentColor:o.red,marginTop:2}}),"I understand — I will rotate secrets after removal"]}),s.jsxs("div",{style:{display:"flex",gap:10},children:[s.jsx(W,{variant:"ghost",onClick:B,children:"Cancel"}),s.jsx(W,{variant:"danger",onClick:()=>w(2),disabled:!j,children:"Continue"})]})]}),h===2&&f&&s.jsxs("div",{"data-testid":"remove-confirm-dialog",style:{background:o.surface,border:`1px solid ${o.red}44`,borderRadius:10,padding:20,marginBottom:24},children:[s.jsx("div",{style:{fontFamily:o.sans,fontSize:14,fontWeight:600,color:o.red,marginBottom:12},children:"Confirm removal"}),s.jsxs("div",{style:{fontFamily:o.sans,fontSize:13,color:o.text,lineHeight:1.6,marginBottom:16},children:["This will remove"," ",s.jsx("strong",{style:{color:o.accent},children:f.label??f.preview})," ","and re-encrypt all ",l," file",l!==1?"s":"",". This cannot be undone."]}),s.jsxs("div",{style:{display:"flex",gap:10},children:[s.jsx(W,{variant:"ghost",onClick:B,children:"Cancel"}),s.jsx(W,{variant:"danger",onClick:T,disabled:S,children:S?"Re-encrypting...":"Remove and re-encrypt"})]})]}),n.length===0&&!a&&s.jsx("div",{style:{textAlign:"center",paddingTop:40,fontFamily:o.sans,fontSize:14,color:o.textMuted},children:"No recipients configured. Add an age public key to get started."}),n.length>0&&s.jsxs("div",{children:[s.jsxs("div",{style:{fontFamily:o.sans,fontSize:12,fontWeight:600,color:o.textMuted,letterSpacing:"0.05em",textTransform:"uppercase",marginBottom:10},children:["Recipients (",n.length,")"]}),n.map(L=>s.jsxs("div",{"data-testid":"recipient-row",style:{display:"flex",alignItems:"center",gap:14,padding:"12px 16px",background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,marginBottom:8},children:[s.jsx("div",{style:{width:32,height:32,borderRadius:6,background:o.accentDim,border:`1px solid ${o.accent}44`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,flexShrink:0},children:"🔑"}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[L.label&&s.jsx("div",{style:{fontFamily:o.sans,fontSize:13,fontWeight:600,color:o.text,marginBottom:2},children:L.label}),s.jsx("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:L.preview})]}),s.jsx(W,{variant:"ghost",onClick:()=>R(L),disabled:h!==0||S,children:"Remove"})]},L.key)),s.jsxs("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textDim,marginTop:12},children:[l," encrypted file",l!==1?"s":""," in the matrix"]})]})]})})]})}function Ra({children:e}){return s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,fontWeight:600,color:o.textMuted,marginBottom:6,letterSpacing:"0.05em",textTransform:"uppercase"},children:e})}function Np({manifest:e}){const[t,n]=v.useState("list"),[r,l]=v.useState([]),[i,a]=v.useState(null),[u,d]=v.useState(""),[p,g]=v.useState(""),[x,m]=v.useState(""),[k,S]=v.useState(new Set),[C,F]=v.useState({}),[y,f]=v.useState(!1),[c,h]=v.useState(""),[w,j]=v.useState({}),[_,D]=v.useState(""),[O,P]=v.useState({}),[J,ue]=v.useState(!1),[R,B]=v.useState(""),[T,L]=v.useState(void 0),[G,$]=v.useState({}),[b,A]=v.useState(!1),[Z,ee]=v.useState(""),be=v.useCallback(async()=>{try{const I=await X("/api/service-identities");if(I.ok){const N=await I.json();l(N.identities)}}catch{}},[]);v.useEffect(()=>{be()},[be]);const ce=r.find(I=>I.name===i),wt=v.useCallback(()=>{g(""),m(""),S(new Set);const I={};for(const N of(e==null?void 0:e.environments)??[])I[N.name]={type:"age",provider:"aws",keyId:""};F(I),h(""),n("create")},[e]),Ke=v.useCallback(I=>{var V,U,le;const N={};for(const[pe,Ie]of Object.entries(I.environments)){const Tr=Ie.type==="kms"?"kms":"age";N[pe]={type:Tr,provider:((V=Ie.kms)==null?void 0:V.provider)??"aws",keyId:((U=Ie.kms)==null?void 0:U.keyId)??"",originalType:Tr,originalKeyId:((le=Ie.kms)==null?void 0:le.keyId)??""}}P(N),B(""),n("update")},[]),z=v.useCallback(()=>{a(null),d(""),n("list")},[]),K=v.useCallback(()=>{d(""),ee(""),n("detail")},[]);async function Q(){f(!0),h("");try{const I={};for(const[le,pe]of Object.entries(C))pe.type==="kms"&&(I[le]={provider:pe.provider,keyId:pe.keyId});const N={name:p.trim(),description:x.trim(),namespaces:Array.from(k)};Object.keys(I).length>0&&(N.kmsEnvConfigs=I);const V=await X("/api/service-identities",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)}),U=await V.json();if(!V.ok){h(U.error??"Failed to create service identity.");return}D(U.identity.name),j(U.privateKeys??{}),n("keys")}catch{h("Network error. Check that the UI server is running.")}finally{f(!1)}}async function ge(){if(i){ue(!0),B("");try{const I={};for(const[U,le]of Object.entries(O))le.type==="kms"&&(le.originalType!=="kms"||le.keyId!==le.originalKeyId)&&(I[U]={provider:le.provider,keyId:le.keyId});if(Object.keys(I).length===0){B("No changes to apply.");return}const N=await X(`/api/service-identities/${encodeURIComponent(i)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({kmsEnvConfigs:I})}),V=await N.json();if(!N.ok){B(V.error??"Failed to update service identity.");return}await be(),K()}catch{B("Network error. Check that the UI server is running.")}finally{ue(!1)}}}async function ot(I){if(i){L(I),d("");try{const N=await X(`/api/service-identities/${encodeURIComponent(i)}/rotate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({environment:I})}),V=await N.json();if(!N.ok){d(V.error??"Failed to rotate key.");return}$(V.privateKeys??{}),await be(),n("rotate-keys")}catch{d("Network error. Check that the UI server is running.")}finally{L(void 0)}}}async function Gl(){if(i){A(!0),ee("");try{const I=await X(`/api/service-identities/${encodeURIComponent(i)}`,{method:"DELETE"});if(!I.ok){const N=await I.json();ee(N.error??"Failed to delete service identity.");return}await be(),z()}catch{ee("Network error. Check that the UI server is running.")}finally{A(!1)}}}if(t==="list")return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Service Identities",subtitle:"Per-service cryptographic access scoping",actions:e&&s.jsx(W,{variant:"primary",onClick:wt,children:"+ New identity"})}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:620,margin:"0 auto"},children:[u&&s.jsx(Kn,{children:u}),r.length===0&&s.jsxs("div",{style:{textAlign:"center",padding:"48px 24px",color:o.textMuted,fontFamily:o.sans,fontSize:13},children:[s.jsx("div",{style:{fontSize:28,marginBottom:12,opacity:.4},children:"🔑"}),"No service identities configured.",e&&s.jsx("div",{style:{marginTop:16},children:s.jsx(W,{variant:"primary",onClick:wt,children:"Create the first one"})})]}),r.map(I=>s.jsxs("div",{role:"button",tabIndex:0,"data-testid":`si-${I.name}`,onClick:()=>{a(I.name),d(""),n("detail")},onKeyDown:N=>{N.key==="Enter"&&(a(I.name),n("detail"))},style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:"16px 20px",marginBottom:8,cursor:"pointer",transition:"all 0.12s"},onMouseEnter:N=>{N.currentTarget.style.borderColor=o.borderLight},onMouseLeave:N=>{N.currentTarget.style.borderColor=o.border},children:[s.jsx("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:s.jsx("span",{style:{fontFamily:o.sans,fontWeight:600,fontSize:14,color:o.text},children:I.name})}),s.jsxs("div",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted,marginBottom:10},children:["Scoped to: ",s.jsx("span",{style:{color:o.text},children:I.namespaces.join(", ")})]}),s.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:Object.entries(I.environments).map(([N,V])=>s.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[s.jsx(qe,{env:N,small:!0}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:9,color:V.type==="kms"?o.purple:o.textDim},children:V.type==="kms"?"KMS":"age"})]},N))})]},I.name))]})})]});if(t==="detail")return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:(ce==null?void 0:ce.name)??i??"",subtitle:ce==null?void 0:ce.description,actions:s.jsxs("div",{style:{display:"flex",gap:6},children:[ce&&s.jsx(W,{"data-testid":"update-backends-btn",variant:"ghost",onClick:()=>Ke(ce),children:"Update backends"}),s.jsxs("button",{"data-testid":"back-button",onClick:z,style:{background:"none",border:`1px solid ${o.borderLight}`,borderRadius:6,padding:"4px 12px",cursor:"pointer",fontFamily:o.sans,fontSize:12,color:o.textMuted,transition:"all 0.12s"},children:["←"," Back"]})]})}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:620,margin:"0 auto"},children:[u&&s.jsx(Kn,{children:u}),ce&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{marginBottom:20},children:[s.jsx(Yr,{children:"Scoped namespaces"}),s.jsx("div",{style:{display:"flex",gap:6},children:ce.namespaces.map(I=>s.jsx("span",{style:{fontFamily:o.mono,fontSize:11,color:o.accent,background:o.accentDim,border:`1px solid ${o.accent}33`,borderRadius:4,padding:"2px 8px"},children:I},I))})]}),s.jsx(Yr,{children:"Environment keys"}),e==null?void 0:e.environments.map(I=>{const N=ce.environments[I.name];if(!N)return null;const V=N.protected??!1,U=T===I.name;return s.jsxs("div",{"data-testid":`env-${I.name}`,style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:"16px 20px",marginBottom:10},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[s.jsx(qe,{env:I.name}),V&&s.jsx("span",{style:{fontSize:12,color:o.red},children:"🔒"}),N.type==="kms"&&s.jsx("span",{style:{fontFamily:o.mono,fontSize:10,color:o.purple,background:o.purpleDim,border:`1px solid ${o.purple}33`,borderRadius:3,padding:"1px 6px"},children:"KMS"})]}),N.type==="age"&&s.jsx("button",{"data-testid":`rotate-${I.name}`,disabled:U,onClick:()=>ot(I.name),style:{background:"none",border:`1px solid ${o.borderLight}`,borderRadius:5,padding:"3px 10px",cursor:U?"default":"pointer",fontFamily:o.sans,fontSize:11,color:U?o.textDim:o.textMuted,opacity:U?.5:1},children:U?"Rotating…":"Rotate key"})]}),N.type==="kms"&&N.kms&&s.jsxs("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted},children:[s.jsxs("div",{style:{marginBottom:8},children:["Authentication: ",s.jsx("span",{style:{color:o.purple},children:"IAM + KMS"})]}),s.jsxs("div",{children:["Provider:"," ",s.jsx("span",{style:{color:o.text},children:N.kms.provider})]}),s.jsxs("div",{style:{marginTop:4},children:["Key ID:"," ",s.jsx("span",{style:{color:o.text,wordBreak:"break-all"},children:N.kms.keyId})]}),s.jsx("div",{style:{marginTop:10,padding:"8px 12px",background:o.purpleDim,border:`1px solid ${o.purple}33`,borderRadius:4,fontSize:11,color:o.purple,fontFamily:o.sans},children:"No keys to provision. CI and runtime authenticate via IAM role with kms:Decrypt permission."})]}),N.type==="age"&&s.jsxs("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted},children:[s.jsxs("div",{style:{marginBottom:8},children:["Authentication: ",s.jsx("span",{style:{color:o.green},children:"age key"})]}),s.jsxs("div",{children:["Public key:"," ",s.jsx("span",{style:{color:o.text},children:N.publicKey?`${N.publicKey.slice(0,12)}...${N.publicKey.slice(-6)}`:"unknown"})]})]})]},I.name)}),s.jsx("div",{style:{marginTop:32,paddingTop:20,borderTop:`1px solid ${o.border}`,display:"flex",justifyContent:"flex-end"},children:s.jsx(W,{"data-testid":"delete-identity-btn",variant:"danger",onClick:()=>{ee(""),n("delete-confirm")},children:"Delete identity"})})]})]})})]});if(t==="delete-confirm")return s.jsxs("div",{"data-testid":"delete-confirm-view",style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Delete service identity",subtitle:"This action cannot be undone"}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:560,margin:"0 auto"},children:[Z&&s.jsx(Kn,{children:Z}),s.jsxs("div",{style:{background:"#1a0a0a",border:`1px solid ${o.red}55`,borderRadius:8,padding:"16px 20px",marginBottom:24,fontFamily:o.sans,fontSize:13,color:o.red},children:[s.jsxs("div",{style:{fontWeight:600,marginBottom:8},children:["Delete ",s.jsx("span",{style:{fontFamily:o.mono},children:i}),"?"]}),s.jsxs("div",{style:{color:o.textMuted,fontSize:12,lineHeight:1.6},children:["This will remove the identity from"," ",s.jsx("span",{style:{fontFamily:o.mono},children:"clef.yaml"})," and de-register its recipients from all scoped encrypted files. Any runtimes currently using this identity's private key will lose access on the next artifact refresh."]})]}),s.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[s.jsx(W,{"data-testid":"cancel-delete-btn",variant:"ghost",onClick:K,disabled:b,children:"Cancel"}),s.jsx(W,{"data-testid":"confirm-delete-btn",variant:"danger",onClick:Gl,disabled:b,children:b?"Deleting…":"Delete identity"})]})]})})]});if(t==="rotate-keys")return s.jsxs("div",{"data-testid":"rotate-keys-view",style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Key rotated",subtitle:`New keys for ${i}`}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:620,margin:"0 auto"},children:[s.jsxs("div",{style:{background:"#1a1200",border:`1px solid ${o.yellow}55`,borderRadius:8,padding:"14px 18px",marginBottom:20,fontFamily:o.sans,fontSize:13,color:o.yellow,display:"flex",gap:10,alignItems:"flex-start"},children:[s.jsx("span",{style:{fontSize:16,flexShrink:0},children:"⚠"}),s.jsx("span",{children:"Copy the new private key now — it will not be shown again. Provision it to the runtime and invalidate the old key."})]}),s.jsx(Yr,{children:"New private keys"}),Object.entries(G).map(([I,N])=>s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:"14px 18px",marginBottom:10},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[s.jsx(qe,{env:I}),s.jsx(jr,{text:N})]}),s.jsx("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted,wordBreak:"break-all",background:o.bg,borderRadius:4,padding:"8px 10px"},children:N})]},I)),s.jsx("div",{style:{marginTop:8,display:"flex",justifyContent:"flex-end"},children:s.jsx(W,{"data-testid":"rotate-done-btn",variant:"primary",onClick:K,children:"Done"})})]})})]});if(t==="update"){const I=(e==null?void 0:e.environments)??[],V=Object.values(O).filter(U=>U.type!=="kms"?!1:U.originalType!=="kms"||U.keyId!==U.originalKeyId).length>0&&Object.entries(O).every(([,U])=>U.type!=="kms"?!0:U.keyId.trim()!=="");return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"Update backends",subtitle:`Environment backends for ${i}`,actions:s.jsxs("button",{onClick:K,style:{background:"none",border:`1px solid ${o.borderLight}`,borderRadius:6,padding:"4px 12px",cursor:"pointer",fontFamily:o.sans,fontSize:12,color:o.textMuted},children:["←"," Cancel"]})}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:560,margin:"0 auto"},children:[R&&s.jsx(Kn,{children:R}),s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted,marginBottom:16,lineHeight:1.6},children:"Switch age environments to KMS, or update an existing KMS key ID. To revert KMS to age, delete and recreate the identity."}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8,marginBottom:28},children:I.map(U=>{const le=O[U.name];return le?s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:"14px 16px"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:le.type==="kms"?12:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx(qe,{env:U.name}),U.protected&&s.jsx("span",{style:{fontSize:11,color:o.red},children:"🔒"})]}),s.jsx("div",{style:{display:"flex",gap:4},children:["age","kms"].map(pe=>{const Ie=le.originalType==="kms"&&pe==="age";return s.jsx("button",{"data-testid":pe==="kms"?`update-kms-toggle-${U.name}`:void 0,disabled:Ie,onClick:()=>{Ie||P(Tr=>({...Tr,[U.name]:{...le,type:pe}}))},title:Ie?"KMS → age requires delete and recreate":void 0,style:{background:le.type===pe?pe==="kms"?o.purple:o.accent:"transparent",border:`1px solid ${le.type===pe?pe==="kms"?o.purple:o.accent:o.border}`,borderRadius:4,padding:"3px 10px",cursor:Ie?"not-allowed":"pointer",fontFamily:o.mono,fontSize:11,color:le.type===pe?"#fff":o.textMuted,opacity:Ie?.4:1,transition:"all 0.1s"},children:pe.toUpperCase()},pe)})})]}),le.type==="kms"&&s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("select",{value:le.provider,onChange:pe=>P(Ie=>({...Ie,[U.name]:{...le,provider:pe.target.value}})),style:{...an,width:90,flexShrink:0,padding:"7px 8px"},children:[s.jsx("option",{value:"aws",children:"AWS"}),s.jsx("option",{value:"gcp",children:"GCP"}),s.jsx("option",{value:"azure",children:"Azure"})]}),s.jsx("input",{"data-testid":`update-keyid-${U.name}`,value:le.keyId,onChange:pe=>P(Ie=>({...Ie,[U.name]:{...le,keyId:pe.target.value}})),placeholder:"arn:aws:kms:… or key resource ID",style:{...an,flex:1}})]})]},U.name):null})}),s.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[s.jsx(W,{"data-testid":"update-cancel-btn",variant:"ghost",onClick:K,disabled:J,children:"Cancel"}),s.jsx(W,{"data-testid":"update-submit-btn",variant:"primary",onClick:ge,disabled:!V||J,children:J?"Saving…":"Save changes"})]})]})})]})}if(t==="keys"){const I=Object.keys(w).length>0;return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:`${_} created`,subtitle:"Service identity ready"}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:620,margin:"0 auto"},children:[I&&s.jsxs("div",{style:{background:"#1a1200",border:`1px solid ${o.yellow}55`,borderRadius:8,padding:"14px 18px",marginBottom:20,fontFamily:o.sans,fontSize:13,color:o.yellow,display:"flex",gap:10,alignItems:"flex-start"},children:[s.jsx("span",{style:{fontSize:16,flexShrink:0},children:"⚠"}),s.jsx("span",{children:"Copy these private keys now — they will not be shown again. Store each key securely and provision it to the relevant runtime."})]}),!I&&s.jsx("div",{style:{background:o.purpleDim,border:`1px solid ${o.purple}44`,borderRadius:8,padding:"14px 18px",marginBottom:20,fontFamily:o.sans,fontSize:13,color:o.purple},children:"All environments use KMS. No private keys to provision — runtimes authenticate via IAM role."}),s.jsx(Yr,{children:"Private keys"}),Object.entries(w).map(([N,V])=>s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:"14px 18px",marginBottom:10},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[s.jsx(qe,{env:N}),s.jsx(jr,{text:V})]}),s.jsx("div",{style:{fontFamily:o.mono,fontSize:11,color:o.textMuted,wordBreak:"break-all",background:o.bg,borderRadius:4,padding:"8px 10px"},children:V})]},N)),s.jsx("div",{style:{marginTop:8,display:"flex",justifyContent:"flex-end"},children:s.jsx(W,{variant:"primary",onClick:()=>{be(),z()},children:"Done"})})]})})]})}const Rr=(e==null?void 0:e.namespaces)??[],_r=(e==null?void 0:e.environments)??[],ln=p.trim()&&r.some(I=>I.name===p.trim())?"A service identity with this name already exists.":"",on=p.trim()!==""&&!ln&&k.size>0&&_r.every(I=>{const N=C[I.name];return(N==null?void 0:N.type)==="age"||(N==null?void 0:N.type)==="kms"&&N.provider&&N.keyId.trim()});return s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"New service identity",subtitle:"Scope cryptographic access to specific namespaces",actions:s.jsxs("button",{onClick:z,style:{background:"none",border:`1px solid ${o.borderLight}`,borderRadius:6,padding:"4px 12px",cursor:"pointer",fontFamily:o.sans,fontSize:12,color:o.textMuted},children:["←"," Cancel"]})}),s.jsx("div",{style:{flex:1,overflow:"auto",padding:24},children:s.jsxs("div",{style:{maxWidth:560,margin:"0 auto"},children:[c&&s.jsx(Kn,{children:c}),s.jsxs("div",{style:{marginBottom:20},children:[s.jsx(Gr,{children:"Name"}),s.jsx("input",{"data-testid":"si-name-input",value:p,onChange:I=>g(I.target.value),placeholder:"e.g. api-gateway",style:an}),ln&&s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,color:o.red,marginTop:6},children:ln})]}),s.jsxs("div",{style:{marginBottom:24},children:[s.jsx(Gr,{children:"Description (optional)"}),s.jsx("input",{value:x,onChange:I=>m(I.target.value),placeholder:"e.g. API gateway service account",style:an})]}),s.jsxs("div",{style:{marginBottom:24},children:[s.jsx(Gr,{children:"Namespaces"}),s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted,marginBottom:10},children:"This identity can decrypt secrets only from the selected namespaces."}),Rr.length===0&&s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,color:o.textDim},children:"No namespaces defined in manifest."}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Rr.map(I=>{const N=k.has(I.name);return s.jsxs("label",{"data-testid":`ns-checkbox-${I.name}`,style:{display:"flex",alignItems:"center",gap:10,padding:"10px 14px",background:N?o.accentDim:o.surface,border:`1px solid ${N?o.accent+"55":o.border}`,borderRadius:6,cursor:"pointer",transition:"all 0.1s"},children:[s.jsx("input",{type:"checkbox",checked:N,onChange:V=>{const U=new Set(k);V.target.checked?U.add(I.name):U.delete(I.name),S(U)},style:{accentColor:o.accent}}),s.jsx("span",{style:{fontFamily:o.mono,fontSize:12,color:N?o.accent:o.text},children:I.name}),I.description&&s.jsxs("span",{style:{fontFamily:o.sans,fontSize:11,color:o.textMuted},children:["— ",I.description]})]},I.name)})})]}),s.jsxs("div",{style:{marginBottom:28},children:[s.jsx(Gr,{children:"Environment backends"}),s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,color:o.textMuted,marginBottom:10},children:"Age generates a key pair per environment. KMS uses your cloud provider — no key material is provisioned."}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:_r.map(I=>{const N=C[I.name]??{type:"age",provider:"aws",keyId:""};return s.jsxs("div",{style:{background:o.surface,border:`1px solid ${o.border}`,borderRadius:8,padding:"14px 16px"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:N.type==="kms"?12:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx(qe,{env:I.name}),I.protected&&s.jsx("span",{style:{fontSize:11,color:o.red},children:"🔒"})]}),s.jsx("div",{style:{display:"flex",gap:4},children:["age","kms"].map(V=>s.jsx("button",{onClick:()=>F(U=>({...U,[I.name]:{...N,type:V}})),style:{background:N.type===V?V==="kms"?o.purple:o.accent:"transparent",border:`1px solid ${N.type===V?V==="kms"?o.purple:o.accent:o.border}`,borderRadius:4,padding:"3px 10px",cursor:"pointer",fontFamily:o.mono,fontSize:11,color:N.type===V?"#fff":o.textMuted,transition:"all 0.1s"},children:V.toUpperCase()},V))})]}),N.type==="kms"&&s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("select",{value:N.provider,onChange:V=>F(U=>({...U,[I.name]:{...N,provider:V.target.value}})),style:{...an,width:90,flexShrink:0,padding:"7px 8px"},children:[s.jsx("option",{value:"aws",children:"AWS"}),s.jsx("option",{value:"gcp",children:"GCP"}),s.jsx("option",{value:"azure",children:"Azure"})]}),s.jsx("input",{value:N.keyId,onChange:V=>F(U=>({...U,[I.name]:{...N,keyId:V.target.value}})),placeholder:"arn:aws:kms:… or key resource ID",style:{...an,flex:1}})]})]},I.name)})})]}),s.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[s.jsx(W,{variant:"ghost",onClick:z,disabled:y,children:"Cancel"}),s.jsx(W,{"data-testid":"create-si-submit",variant:"primary",onClick:Q,disabled:!on||y,children:y?"Creating…":"Create identity"})]})]})})]})}function Yr({children:e}){return s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,fontWeight:600,color:o.textMuted,marginBottom:6,letterSpacing:"0.05em",textTransform:"uppercase"},children:e})}function Gr({children:e}){return s.jsx("div",{style:{fontFamily:o.sans,fontSize:12,fontWeight:600,color:o.textMuted,marginBottom:6},children:e})}function Kn({children:e}){return s.jsx("div",{style:{background:o.redDim,border:`1px solid ${o.red}44`,borderRadius:8,padding:"12px 16px",marginBottom:16,fontFamily:o.sans,fontSize:13,color:o.red},children:e})}const an={width:"100%",background:o.surface,border:`1px solid ${o.border}`,borderRadius:6,padding:"8px 12px",fontFamily:o.mono,fontSize:12,color:o.text,outline:"none",boxSizing:"border-box"};function Mp({manifest:e}){var S,C;const t=(e==null?void 0:e.namespaces)??[],n=(e==null?void 0:e.environments)??[],[r,l]=v.useState(((S=t[0])==null?void 0:S.name)??""),[i,a]=v.useState(((C=n[0])==null?void 0:C.name)??""),[u,d]=v.useState([]),[p,g]=v.useState(!1),[x,m]=v.useState(null);v.useEffect(()=>{t.length>0&&!r&&l(t[0].name),n.length>0&&!i&&a(n[0].name)},[t,n,r,i]);const k=v.useCallback(async()=>{if(!(!r||!i)){g(!0),m(null);try{const F=await X(`/api/git/log/${r}/${i}`);if(F.ok){const y=await F.json();d(y.log)}else{const y=await F.json().catch(()=>({}));m(y.error??"Failed to load history"),d([])}}catch{m("Network error — could not load history"),d([])}finally{g(!1)}}},[r,i]);return v.useEffect(()=>{k()},[k]),s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(Ee,{title:"History",subtitle:"Commit log per encrypted file"}),s.jsxs("div",{style:{display:"flex",gap:12,padding:"16px 24px",borderBottom:`1px solid ${o.border}`},children:[s.jsxs("label",{style:{display:"flex",gap:8,alignItems:"center",fontFamily:o.mono,fontSize:12,color:o.textMuted},children:["Namespace",s.jsx("select",{value:r,onChange:F=>l(F.target.value),style:{fontFamily:o.mono,fontSize:12,background:o.surface,color:o.text,border:`1px solid ${o.border}`,borderRadius:4,padding:"3px 8px"},children:t.map(F=>s.jsx("option",{value:F.name,children:F.name},F.name))})]}),s.jsxs("label",{style:{display:"flex",gap:8,alignItems:"center",fontFamily:o.mono,fontSize:12,color:o.textMuted},children:["Environment",s.jsx("select",{value:i,onChange:F=>a(F.target.value),style:{fontFamily:o.mono,fontSize:12,background:o.surface,color:o.text,border:`1px solid ${o.border}`,borderRadius:4,padding:"3px 8px"},children:n.map(F=>s.jsx("option",{value:F.name,children:F.name},F.name))})]})]}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:"0 24px 24px"},children:[p&&s.jsx("div",{style:{padding:24,color:o.textMuted,fontFamily:o.mono,fontSize:12},children:"Loading…"}),!p&&x&&s.jsx("div",{style:{padding:24,color:o.red,fontFamily:o.mono,fontSize:12},children:x}),!p&&!x&&u.length===0&&s.jsxs("div",{style:{padding:24,color:o.textMuted,fontFamily:o.mono,fontSize:12},children:["No commits found for ",r,"/",i,"."]}),!p&&!x&&u.length>0&&s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:o.mono,fontSize:12,marginTop:16},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{borderBottom:`1px solid ${o.border}`,color:o.textDim},children:[s.jsx("th",{style:{textAlign:"left",padding:"6px 12px 6px 0",fontWeight:600},children:"Hash"}),s.jsx("th",{style:{textAlign:"left",padding:"6px 12px",fontWeight:600},children:"Date"}),s.jsx("th",{style:{textAlign:"left",padding:"6px 12px",fontWeight:600},children:"Author"}),s.jsx("th",{style:{textAlign:"left",padding:"6px 0",fontWeight:600},children:"Message"})]})}),s.jsx("tbody",{children:u.map(F=>s.jsxs("tr",{style:{borderBottom:`1px solid ${o.border}22`},children:[s.jsx("td",{style:{padding:"8px 12px 8px 0",color:o.accent},children:F.hash.slice(0,7)}),s.jsx("td",{style:{padding:"8px 12px",color:o.textMuted,whiteSpace:"nowrap"},children:new Date(F.date).toLocaleDateString()}),s.jsx("td",{style:{padding:"8px 12px",color:o.textMuted},children:F.author}),s.jsx("td",{style:{padding:"8px 0",color:o.text},children:F.message})]},F.hash))})]})]})]})}function Pp(){const[e,t]=v.useState("matrix"),[n,r]=v.useState(""),[l,i]=v.useState(!0),[a,u]=v.useState(null),[d,p]=v.useState([]),[g,x]=v.useState(null),[m,k]=v.useState(0),[S,C]=v.useState(0),F=v.useCallback(async()=>{try{const j=await X("/api/manifest");if(j.ok){const _=await j.json();u(_),!n&&_.namespaces.length>0&&r(_.namespaces[0].name)}}catch{}finally{i(!1)}},[n]),y=v.useCallback(async()=>{try{const j=await X("/api/matrix");j.ok&&p(await j.json())}catch{}},[]),f=v.useCallback(async()=>{try{const j=await X("/api/git/status");j.ok&&x(await j.json())}catch{}},[]),c=v.useCallback(async()=>{try{const j=await X("/api/lint");if(j.ok){const _=await j.json();k(_.issues.filter(D=>D.severity==="error").length)}}catch{}},[]),h=v.useCallback(async()=>{var j,_;try{const D=await X("/api/scan/status");if(D.ok){const O=await D.json();if(O.lastRun){const P=(((j=O.lastRun.matches)==null?void 0:j.length)??0)+(((_=O.lastRun.unencryptedMatrixFiles)==null?void 0:_.length)??0);C(P)}}}catch{}},[]);v.useEffect(()=>{F(),y(),f(),c(),h()},[F,y,f,c,h]);const w=async j=>{try{await X("/api/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:j})}),await f(),await y()}catch{}};return l?s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",background:o.bg,color:o.textMuted,fontFamily:o.sans},children:s.jsxs("div",{style:{textAlign:"center"},children:[s.jsx("div",{style:{fontSize:24,color:o.accent,marginBottom:12},children:"♪"}),s.jsx("div",{style:{fontSize:13},children:"Loading..."})]})}):s.jsxs("div",{style:{display:"flex",height:"100vh",background:o.bg,color:o.text,fontFamily:o.sans,overflow:"hidden"},children:[s.jsx(kp,{activeView:e,setView:t,activeNs:n,setNs:r,manifest:a,matrixStatuses:d,gitStatus:g,lintErrorCount:m,scanIssueCount:S}),s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e==="matrix"&&s.jsx(Fp,{setView:t,setNs:r,manifest:a,matrixStatuses:d}),e==="editor"&&s.jsx(Rp,{ns:n,manifest:a,onCommit:w}),e==="diff"&&s.jsx(_p,{manifest:a}),e==="lint"&&s.jsx(Tp,{setView:t,setNs:r}),e==="scan"&&s.jsx(Dp,{}),e==="import"&&s.jsx(Ip,{manifest:a,setView:t}),e==="recipients"&&s.jsx($p,{manifest:a,setView:t}),e==="identities"&&s.jsx(Np,{manifest:a}),e==="history"&&s.jsx(Mp,{manifest:a})]})]})}vp();const _a=document.getElementById("root");_a&&Ei.createRoot(_a).render(s.jsx(Oa.StrictMode,{children:s.jsx(Pp,{})}));