@manojkmfsi/monodog 1.1.21 → 1.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/controllers/publish-controller.js +249 -0
- package/dist/middleware/server-startup.js +9 -0
- package/dist/routes/publish-routes.js +40 -0
- package/dist/services/changeset-service.js +285 -0
- package/monodog-dashboard/dist/assets/index-7G3SCgcz.css +1 -0
- package/monodog-dashboard/dist/assets/index-BYVT2h3u.js +12 -0
- package/monodog-dashboard/dist/index.html +2 -2
- package/package.json +1 -1
- package/monodog-dashboard/dist/assets/index-DN0rk9Ub.css +0 -1
- package/monodog-dashboard/dist/assets/index-DS89XTlx.js +0 -12
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function Km(s,a){for(var i=0;i<a.length;i++){const c=a[i];if(typeof c!="string"&&!Array.isArray(c)){for(const d in c)if(d!=="default"&&!(d in s)){const m=Object.getOwnPropertyDescriptor(c,d);m&&Object.defineProperty(s,d,m.get?m:{enumerable:!0,get:()=>c[d]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function i(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(d){if(d.ep)return;d.ep=!0;const m=i(d);fetch(d.href,m)}})();function Zm(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var mi={exports:{}},Wr={},hi={exports:{}},ne={};var Fu;function Xm(){if(Fu)return ne;Fu=1;var s=Symbol.for("react.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),S=Symbol.iterator;function T(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,I={};function P(j,O,te){this.props=j,this.context=O,this.refs=I,this.updater=te||M}P.prototype.isReactComponent={},P.prototype.setState=function(j,O){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,O,"setState")},P.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function $(){}$.prototype=P.prototype;function L(j,O,te){this.props=j,this.context=O,this.refs=I,this.updater=te||M}var A=L.prototype=new $;A.constructor=L,R(A,P.prototype),A.isPureReactComponent=!0;var G=Array.isArray,se=Object.prototype.hasOwnProperty,me={current:null},J={key:!0,ref:!0,__self:!0,__source:!0};function de(j,O,te){var re,ae={},ie=null,fe=null;if(O!=null)for(re in O.ref!==void 0&&(fe=O.ref),O.key!==void 0&&(ie=""+O.key),O)se.call(O,re)&&!J.hasOwnProperty(re)&&(ae[re]=O[re]);var ce=arguments.length-2;if(ce===1)ae.children=te;else if(1<ce){for(var je=Array(ce),nt=0;nt<ce;nt++)je[nt]=arguments[nt+2];ae.children=je}if(j&&j.defaultProps)for(re in ce=j.defaultProps,ce)ae[re]===void 0&&(ae[re]=ce[re]);return{$$typeof:s,type:j,key:ie,ref:fe,props:ae,_owner:me.current}}function Ue(j,O){return{$$typeof:s,type:j.type,key:O,ref:j.ref,props:j.props,_owner:j._owner}}function he(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}function Me(j){var O={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(te){return O[te]})}var _e=/\/+/g;function Se(j,O){return typeof j=="object"&&j!==null&&j.key!=null?Me(""+j.key):O.toString(36)}function xe(j,O,te,re,ae){var ie=typeof j;(ie==="undefined"||ie==="boolean")&&(j=null);var fe=!1;if(j===null)fe=!0;else switch(ie){case"string":case"number":fe=!0;break;case"object":switch(j.$$typeof){case s:case a:fe=!0}}if(fe)return fe=j,ae=ae(fe),j=re===""?"."+Se(fe,0):re,G(ae)?(te="",j!=null&&(te=j.replace(_e,"$&/")+"/"),xe(ae,O,te,"",function(nt){return nt})):ae!=null&&(he(ae)&&(ae=Ue(ae,te+(!ae.key||fe&&fe.key===ae.key?"":(""+ae.key).replace(_e,"$&/")+"/")+j)),O.push(ae)),1;if(fe=0,re=re===""?".":re+":",G(j))for(var ce=0;ce<j.length;ce++){ie=j[ce];var je=re+Se(ie,ce);fe+=xe(ie,O,te,je,ae)}else if(je=T(j),typeof je=="function")for(j=je.call(j),ce=0;!(ie=j.next()).done;)ie=ie.value,je=re+Se(ie,ce++),fe+=xe(ie,O,te,je,ae);else if(ie==="object")throw O=String(j),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.");return fe}function Ae(j,O,te){if(j==null)return j;var re=[],ae=0;return xe(j,re,"","",function(ie){return O.call(te,ie,ae++)}),re}function Ce(j){if(j._status===-1){var O=j._result;O=O(),O.then(function(te){(j._status===0||j._status===-1)&&(j._status=1,j._result=te)},function(te){(j._status===0||j._status===-1)&&(j._status=2,j._result=te)}),j._status===-1&&(j._status=0,j._result=O)}if(j._status===1)return j._result.default;throw j._result}var ye={current:null},B={transition:null},K={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:B,ReactCurrentOwner:me};function V(){throw Error("act(...) is not supported in production builds of React.")}return ne.Children={map:Ae,forEach:function(j,O,te){Ae(j,function(){O.apply(this,arguments)},te)},count:function(j){var O=0;return Ae(j,function(){O++}),O},toArray:function(j){return Ae(j,function(O){return O})||[]},only:function(j){if(!he(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},ne.Component=P,ne.Fragment=i,ne.Profiler=d,ne.PureComponent=L,ne.StrictMode=c,ne.Suspense=f,ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,ne.act=V,ne.cloneElement=function(j,O,te){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var re=R({},j.props),ae=j.key,ie=j.ref,fe=j._owner;if(O!=null){if(O.ref!==void 0&&(ie=O.ref,fe=me.current),O.key!==void 0&&(ae=""+O.key),j.type&&j.type.defaultProps)var ce=j.type.defaultProps;for(je in O)se.call(O,je)&&!J.hasOwnProperty(je)&&(re[je]=O[je]===void 0&&ce!==void 0?ce[je]:O[je])}var je=arguments.length-2;if(je===1)re.children=te;else if(1<je){ce=Array(je);for(var nt=0;nt<je;nt++)ce[nt]=arguments[nt+2];re.children=ce}return{$$typeof:s,type:j.type,key:ae,ref:ie,props:re,_owner:fe}},ne.createContext=function(j){return j={$$typeof:h,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:m,_context:j},j.Consumer=j},ne.createElement=de,ne.createFactory=function(j){var O=de.bind(null,j);return O.type=j,O},ne.createRef=function(){return{current:null}},ne.forwardRef=function(j){return{$$typeof:g,render:j}},ne.isValidElement=he,ne.lazy=function(j){return{$$typeof:E,_payload:{_status:-1,_result:j},_init:Ce}},ne.memo=function(j,O){return{$$typeof:b,type:j,compare:O===void 0?null:O}},ne.startTransition=function(j){var O=B.transition;B.transition={};try{j()}finally{B.transition=O}},ne.unstable_act=V,ne.useCallback=function(j,O){return ye.current.useCallback(j,O)},ne.useContext=function(j){return ye.current.useContext(j)},ne.useDebugValue=function(){},ne.useDeferredValue=function(j){return ye.current.useDeferredValue(j)},ne.useEffect=function(j,O){return ye.current.useEffect(j,O)},ne.useId=function(){return ye.current.useId()},ne.useImperativeHandle=function(j,O,te){return ye.current.useImperativeHandle(j,O,te)},ne.useInsertionEffect=function(j,O){return ye.current.useInsertionEffect(j,O)},ne.useLayoutEffect=function(j,O){return ye.current.useLayoutEffect(j,O)},ne.useMemo=function(j,O){return ye.current.useMemo(j,O)},ne.useReducer=function(j,O,te){return ye.current.useReducer(j,O,te)},ne.useRef=function(j){return ye.current.useRef(j)},ne.useState=function(j){return ye.current.useState(j)},ne.useSyncExternalStore=function(j,O,te){return ye.current.useSyncExternalStore(j,O,te)},ne.useTransition=function(){return ye.current.useTransition()},ne.version="18.3.1",ne}var Du;function bi(){return Du||(Du=1,hi.exports=Xm()),hi.exports}var Au;function Jm(){if(Au)return Wr;Au=1;var s=bi(),a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function h(g,f,b){var E,S={},T=null,M=null;b!==void 0&&(T=""+b),f.key!==void 0&&(T=""+f.key),f.ref!==void 0&&(M=f.ref);for(E in f)c.call(f,E)&&!m.hasOwnProperty(E)&&(S[E]=f[E]);if(g&&g.defaultProps)for(E in f=g.defaultProps,f)S[E]===void 0&&(S[E]=f[E]);return{$$typeof:a,type:g,key:T,ref:M,props:S,_owner:d.current}}return Wr.Fragment=i,Wr.jsx=h,Wr.jsxs=h,Wr}var Bu;function qm(){return Bu||(Bu=1,mi.exports=Jm()),mi.exports}var n=qm(),cl={},xi={exports:{}},tt={},fi={exports:{}},pi={};var $u;function eh(){return $u||($u=1,(function(s){function a(B,K){var V=B.length;B.push(K);e:for(;0<V;){var j=V-1>>>1,O=B[j];if(0<d(O,K))B[j]=K,B[V]=O,V=j;else break e}}function i(B){return B.length===0?null:B[0]}function c(B){if(B.length===0)return null;var K=B[0],V=B.pop();if(V!==K){B[0]=V;e:for(var j=0,O=B.length,te=O>>>1;j<te;){var re=2*(j+1)-1,ae=B[re],ie=re+1,fe=B[ie];if(0>d(ae,V))ie<O&&0>d(fe,ae)?(B[j]=fe,B[ie]=V,j=ie):(B[j]=ae,B[re]=V,j=re);else if(ie<O&&0>d(fe,V))B[j]=fe,B[ie]=V,j=ie;else break e}}return K}function d(B,K){var V=B.sortIndex-K.sortIndex;return V!==0?V:B.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var m=performance;s.unstable_now=function(){return m.now()}}else{var h=Date,g=h.now();s.unstable_now=function(){return h.now()-g}}var f=[],b=[],E=1,S=null,T=3,M=!1,R=!1,I=!1,P=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(B){for(var K=i(b);K!==null;){if(K.callback===null)c(b);else if(K.startTime<=B)c(b),K.sortIndex=K.expirationTime,a(f,K);else break;K=i(b)}}function G(B){if(I=!1,A(B),!R)if(i(f)!==null)R=!0,Ce(se);else{var K=i(b);K!==null&&ye(G,K.startTime-B)}}function se(B,K){R=!1,I&&(I=!1,$(de),de=-1),M=!0;var V=T;try{for(A(K),S=i(f);S!==null&&(!(S.expirationTime>K)||B&&!Me());){var j=S.callback;if(typeof j=="function"){S.callback=null,T=S.priorityLevel;var O=j(S.expirationTime<=K);K=s.unstable_now(),typeof O=="function"?S.callback=O:S===i(f)&&c(f),A(K)}else c(f);S=i(f)}if(S!==null)var te=!0;else{var re=i(b);re!==null&&ye(G,re.startTime-K),te=!1}return te}finally{S=null,T=V,M=!1}}var me=!1,J=null,de=-1,Ue=5,he=-1;function Me(){return!(s.unstable_now()-he<Ue)}function _e(){if(J!==null){var B=s.unstable_now();he=B;var K=!0;try{K=J(!0,B)}finally{K?Se():(me=!1,J=null)}}else me=!1}var Se;if(typeof L=="function")Se=function(){L(_e)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Ae=xe.port2;xe.port1.onmessage=_e,Se=function(){Ae.postMessage(null)}}else Se=function(){P(_e,0)};function Ce(B){J=B,me||(me=!0,Se())}function ye(B,K){de=P(function(){B(s.unstable_now())},K)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(B){B.callback=null},s.unstable_continueExecution=function(){R||M||(R=!0,Ce(se))},s.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ue=0<B?Math.floor(1e3/B):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_getFirstCallbackNode=function(){return i(f)},s.unstable_next=function(B){switch(T){case 1:case 2:case 3:var K=3;break;default:K=T}var V=T;T=K;try{return B()}finally{T=V}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(B,K){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var V=T;T=B;try{return K()}finally{T=V}},s.unstable_scheduleCallback=function(B,K,V){var j=s.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?j+V:j):V=j,B){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=V+O,B={id:E++,callback:K,priorityLevel:B,startTime:V,expirationTime:O,sortIndex:-1},V>j?(B.sortIndex=V,a(b,B),i(f)===null&&B===i(b)&&(I?($(de),de=-1):I=!0,ye(G,V-j))):(B.sortIndex=O,a(f,B),R||M||(R=!0,Ce(se))),B},s.unstable_shouldYield=Me,s.unstable_wrapCallback=function(B){var K=T;return function(){var V=T;T=K;try{return B.apply(this,arguments)}finally{T=V}}}})(pi)),pi}var Uu;function th(){return Uu||(Uu=1,fi.exports=eh()),fi.exports}var Hu;function nh(){if(Hu)return tt;Hu=1;var s=bi(),a=th();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 c=new Set,d={};function m(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(d[e]=t,e=0;e<t.length;e++)c.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,b=/^[: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]*$/,E={},S={};function T(e){return f.call(S,e)?!0:f.call(E,e)?!1:b.test(e)?S[e]=!0:(E[e]=!0,!1)}function M(e,t,r,l){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R(e,t,r,l){if(t===null||typeof t>"u"||M(e,t,r,l))return!0;if(l)return!1;if(r!==null)switch(r.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 I(e,t,r,l,o,u,x){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=x}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){P[e]=new I(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];P[t]=new I(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){P[e]=new I(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){P[e]=new I(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){P[e]=new I(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){P[e]=new I(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){P[e]=new I(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){P[e]=new I(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){P[e]=new I(e,5,!1,e.toLowerCase(),null,!1,!1)});var $=/[\-:]([a-z])/g;function L(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($,L);P[t]=new I(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($,L);P[t]=new I(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($,L);P[t]=new I(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){P[e]=new I(e,1,!1,e.toLowerCase(),null,!1,!1)}),P.xlinkHref=new I("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){P[e]=new I(e,1,!1,e.toLowerCase(),null,!0,!0)});function A(e,t,r,l){var o=P.hasOwnProperty(t)?P[t]:null;(o!==null?o.type!==0:l||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R(t,r,o,l)&&(r=null),l||o===null?T(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,l=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,l?e.setAttributeNS(l,t,r):e.setAttribute(t,r))))}var G=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,se=Symbol.for("react.element"),me=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),de=Symbol.for("react.strict_mode"),Ue=Symbol.for("react.profiler"),he=Symbol.for("react.provider"),Me=Symbol.for("react.context"),_e=Symbol.for("react.forward_ref"),Se=Symbol.for("react.suspense"),xe=Symbol.for("react.suspense_list"),Ae=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),B=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var V=Object.assign,j;function O(e){if(j===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return`
|
|
2
|
-
`+j+e}var te=!1;function re(e,t){if(!e||te)return"";te=!0;var r=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(C){var l=C}Reflect.construct(e,[],t)}else{try{t.call()}catch(C){l=C}e.call(t.prototype)}else{try{throw Error()}catch(C){l=C}e()}}catch(C){if(C&&l&&typeof C.stack=="string"){for(var o=C.stack.split(`
|
|
3
|
-
`),u=l.stack.split(`
|
|
4
|
-
`),x=o.length-1,p=u.length-1;1<=x&&0<=p&&o[x]!==u[p];)p--;for(;1<=x&&0<=p;x--,p--)if(o[x]!==u[p]){if(x!==1||p!==1)do if(x--,p--,0>p||o[x]!==u[p]){var v=`
|
|
5
|
-
`+o[x].replace(" at new "," at ");return e.displayName&&v.includes("<anonymous>")&&(v=v.replace("<anonymous>",e.displayName)),v}while(1<=x&&0<=p);break}}}finally{te=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?O(e):""}function ae(e){switch(e.tag){case 5:return O(e.type);case 16:return O("Lazy");case 13:return O("Suspense");case 19:return O("SuspenseList");case 0:case 2:case 15:return e=re(e.type,!1),e;case 11:return e=re(e.type.render,!1),e;case 1:return e=re(e.type,!0),e;default:return""}}function ie(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 J:return"Fragment";case me:return"Portal";case Ue:return"Profiler";case de:return"StrictMode";case Se:return"Suspense";case xe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Me:return(e.displayName||"Context")+".Consumer";case he:return(e._context.displayName||"Context")+".Provider";case _e:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return t=e.displayName||null,t!==null?t:ie(e.type)||"Memo";case Ce:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}function fe(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 ie(t);case 8:return t===de?"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 ce(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function je(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nt(e){var t=je(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,u=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(x){l=""+x,u.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){e._valueTracker||(e._valueTracker=nt(e))}function Ui(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),l="";return e&&(l=je(e)?e.checked?"true":"false":e.value),e=l,e!==r?(t.setValue(e),!0):!1}function es(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 yl(e,t){var r=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Hi(e,t){var r=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;r=ce(t.value!=null?t.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vi(e,t){t=t.checked,t!=null&&A(e,"checked",t,!1)}function jl(e,t){Vi(e,t);var r=ce(t.value),l=t.type;if(r!=null)l==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wl(e,t.type,r):t.hasOwnProperty("defaultValue")&&wl(e,t.type,ce(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Wi(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function wl(e,t,r){(t!=="number"||es(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ar=Array.isArray;function En(e,t,r,l){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&l&&(e[r].defaultSelected=!0)}else{for(r=""+ce(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Nl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return V({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qi(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(i(92));if(ar(r)){if(1<r.length)throw Error(i(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ce(r)}}function Yi(e,t){var r=ce(t.value),l=ce(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),l!=null&&(e.defaultValue=""+l)}function Gi(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ki(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 bl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ki(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ts,Zi=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,l,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,l,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ts=ts||document.createElement("div"),ts.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ts.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ir(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var or={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},qd=["Webkit","ms","Moz","O"];Object.keys(or).forEach(function(e){qd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),or[t]=or[e]})});function Xi(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||or.hasOwnProperty(e)&&or[e]?(""+t).trim():t+"px"}function Ji(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var l=r.indexOf("--")===0,o=Xi(r,t[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,o):e[r]=o}}var e0=V({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 kl(e,t){if(t){if(e0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function Sl(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 Cl=null;function El(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pl=null,Pn=null,Ln=null;function qi(e){if(e=Tr(e)){if(typeof Pl!="function")throw Error(i(280));var t=e.stateNode;t&&(t=ks(t),Pl(e.stateNode,e.type,t))}}function eo(e){Pn?Ln?Ln.push(e):Ln=[e]:Pn=e}function to(){if(Pn){var e=Pn,t=Ln;if(Ln=Pn=null,qi(e),t)for(e=0;e<t.length;e++)qi(t[e])}}function no(e,t){return e(t)}function ro(){}var Ll=!1;function so(e,t,r){if(Ll)return e(t,r);Ll=!0;try{return no(e,t,r)}finally{Ll=!1,(Pn!==null||Ln!==null)&&(ro(),to())}}function cr(e,t){var r=e.stateNode;if(r===null)return null;var l=ks(r);if(l===null)return null;r=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(i(231,t,typeof r));return r}var Tl=!1;if(g)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){Tl=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Tl=!1}function t0(e,t,r,l,o,u,x,p,v){var C=Array.prototype.slice.call(arguments,3);try{t.apply(r,C)}catch(z){this.onError(z)}}var dr=!1,ns=null,rs=!1,Ml=null,n0={onError:function(e){dr=!0,ns=e}};function r0(e,t,r,l,o,u,x,p,v){dr=!1,ns=null,t0.apply(n0,arguments)}function s0(e,t,r,l,o,u,x,p,v){if(r0.apply(this,arguments),dr){if(dr){var C=ns;dr=!1,ns=null}else throw Error(i(198));rs||(rs=!0,Ml=C)}}function mn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function lo(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 ao(e){if(mn(e)!==e)throw Error(i(188))}function l0(e){var t=e.alternate;if(!t){if(t=mn(e),t===null)throw Error(i(188));return t!==e?null:e}for(var r=e,l=t;;){var o=r.return;if(o===null)break;var u=o.alternate;if(u===null){if(l=o.return,l!==null){r=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===r)return ao(o),e;if(u===l)return ao(o),t;u=u.sibling}throw Error(i(188))}if(r.return!==l.return)r=o,l=u;else{for(var x=!1,p=o.child;p;){if(p===r){x=!0,r=o,l=u;break}if(p===l){x=!0,l=o,r=u;break}p=p.sibling}if(!x){for(p=u.child;p;){if(p===r){x=!0,r=u,l=o;break}if(p===l){x=!0,l=u,r=o;break}p=p.sibling}if(!x)throw Error(i(189))}}if(r.alternate!==l)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?e:t}function io(e){return e=l0(e),e!==null?oo(e):null}function oo(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=oo(e);if(t!==null)return t;e=e.sibling}return null}var co=a.unstable_scheduleCallback,uo=a.unstable_cancelCallback,a0=a.unstable_shouldYield,i0=a.unstable_requestPaint,Ee=a.unstable_now,o0=a.unstable_getCurrentPriorityLevel,_l=a.unstable_ImmediatePriority,mo=a.unstable_UserBlockingPriority,ss=a.unstable_NormalPriority,c0=a.unstable_LowPriority,ho=a.unstable_IdlePriority,ls=null,Nt=null;function u0(e){if(Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(ls,e,void 0,(e.current.flags&128)===128)}catch{}}var ft=Math.clz32?Math.clz32:h0,d0=Math.log,m0=Math.LN2;function h0(e){return e>>>=0,e===0?32:31-(d0(e)/m0|0)|0}var as=64,is=4194304;function mr(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 os(e,t){var r=e.pendingLanes;if(r===0)return 0;var l=0,o=e.suspendedLanes,u=e.pingedLanes,x=r&268435455;if(x!==0){var p=x&~o;p!==0?l=mr(p):(u&=x,u!==0&&(l=mr(u)))}else x=r&~o,x!==0?l=mr(x):u!==0&&(l=mr(u));if(l===0)return 0;if(t!==0&&t!==l&&(t&o)===0&&(o=l&-l,u=t&-t,o>=u||o===16&&(u&4194240)!==0))return t;if((l&4)!==0&&(l|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0<t;)r=31-ft(t),o=1<<r,l|=e[r],t&=~o;return l}function x0(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 f0(e,t){for(var r=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var x=31-ft(u),p=1<<x,v=o[x];v===-1?((p&r)===0||(p&l)!==0)&&(o[x]=x0(p,t)):v<=t&&(e.expiredLanes|=p),u&=~p}}function Il(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xo(){var e=as;return as<<=1,(as&4194240)===0&&(as=64),e}function Rl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function hr(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ft(t),e[t]=r}function p0(e,t){var r=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 l=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-ft(r),u=1<<o;t[o]=0,l[o]=-1,e[o]=-1,r&=~u}}function Ol(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var l=31-ft(r),o=1<<l;o&t|e[l]&t&&(e[l]|=t),r&=~o}}var ue=0;function fo(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var po,zl,go,vo,yo,Fl=!1,cs=[],$t=null,Ut=null,Ht=null,xr=new Map,fr=new Map,Vt=[],g0="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 jo(e,t){switch(e){case"focusin":case"focusout":$t=null;break;case"dragenter":case"dragleave":Ut=null;break;case"mouseover":case"mouseout":Ht=null;break;case"pointerover":case"pointerout":xr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fr.delete(t.pointerId)}}function pr(e,t,r,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:r,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Tr(t),t!==null&&zl(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function v0(e,t,r,l,o){switch(t){case"focusin":return $t=pr($t,e,t,r,l,o),!0;case"dragenter":return Ut=pr(Ut,e,t,r,l,o),!0;case"mouseover":return Ht=pr(Ht,e,t,r,l,o),!0;case"pointerover":var u=o.pointerId;return xr.set(u,pr(xr.get(u)||null,e,t,r,l,o)),!0;case"gotpointercapture":return u=o.pointerId,fr.set(u,pr(fr.get(u)||null,e,t,r,l,o)),!0}return!1}function wo(e){var t=hn(e.target);if(t!==null){var r=mn(t);if(r!==null){if(t=r.tag,t===13){if(t=lo(r),t!==null){e.blockedOn=t,yo(e.priority,function(){go(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function us(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Al(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var l=new r.constructor(r.type,r);Cl=l,r.target.dispatchEvent(l),Cl=null}else return t=Tr(r),t!==null&&zl(t),e.blockedOn=r,!1;t.shift()}return!0}function No(e,t,r){us(e)&&r.delete(t)}function y0(){Fl=!1,$t!==null&&us($t)&&($t=null),Ut!==null&&us(Ut)&&(Ut=null),Ht!==null&&us(Ht)&&(Ht=null),xr.forEach(No),fr.forEach(No)}function gr(e,t){e.blockedOn===t&&(e.blockedOn=null,Fl||(Fl=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,y0)))}function vr(e){function t(o){return gr(o,e)}if(0<cs.length){gr(cs[0],e);for(var r=1;r<cs.length;r++){var l=cs[r];l.blockedOn===e&&(l.blockedOn=null)}}for($t!==null&&gr($t,e),Ut!==null&&gr(Ut,e),Ht!==null&&gr(Ht,e),xr.forEach(t),fr.forEach(t),r=0;r<Vt.length;r++)l=Vt[r],l.blockedOn===e&&(l.blockedOn=null);for(;0<Vt.length&&(r=Vt[0],r.blockedOn===null);)wo(r),r.blockedOn===null&&Vt.shift()}var Tn=G.ReactCurrentBatchConfig,ds=!0;function j0(e,t,r,l){var o=ue,u=Tn.transition;Tn.transition=null;try{ue=1,Dl(e,t,r,l)}finally{ue=o,Tn.transition=u}}function w0(e,t,r,l){var o=ue,u=Tn.transition;Tn.transition=null;try{ue=4,Dl(e,t,r,l)}finally{ue=o,Tn.transition=u}}function Dl(e,t,r,l){if(ds){var o=Al(e,t,r,l);if(o===null)na(e,t,l,ms,r),jo(e,l);else if(v0(o,e,t,r,l))l.stopPropagation();else if(jo(e,l),t&4&&-1<g0.indexOf(e)){for(;o!==null;){var u=Tr(o);if(u!==null&&po(u),u=Al(e,t,r,l),u===null&&na(e,t,l,ms,r),u===o)break;o=u}o!==null&&l.stopPropagation()}else na(e,t,l,null,r)}}var ms=null;function Al(e,t,r,l){if(ms=null,e=El(l),e=hn(e),e!==null)if(t=mn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=lo(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ms=e,null}function bo(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(o0()){case _l:return 1;case mo:return 4;case ss:case c0:return 16;case ho:return 536870912;default:return 16}default:return 16}}var Wt=null,Bl=null,hs=null;function ko(){if(hs)return hs;var e,t=Bl,r=t.length,l,o="value"in Wt?Wt.value:Wt.textContent,u=o.length;for(e=0;e<r&&t[e]===o[e];e++);var x=r-e;for(l=1;l<=x&&t[r-l]===o[u-l];l++);return hs=o.slice(e,1<l?1-l:void 0)}function xs(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 fs(){return!0}function So(){return!1}function rt(e){function t(r,l,o,u,x){this._reactName=r,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=x,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(r=e[p],this[p]=r?r(u):u[p]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?fs:So,this.isPropagationStopped=So,this}return V(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=fs)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=fs)},persist:function(){},isPersistent:fs}),t}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$l=rt(Mn),yr=V({},Mn,{view:0,detail:0}),N0=rt(yr),Ul,Hl,jr,ps=V({},yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wl,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!==jr&&(jr&&e.type==="mousemove"?(Ul=e.screenX-jr.screenX,Hl=e.screenY-jr.screenY):Hl=Ul=0,jr=e),Ul)},movementY:function(e){return"movementY"in e?e.movementY:Hl}}),Co=rt(ps),b0=V({},ps,{dataTransfer:0}),k0=rt(b0),S0=V({},yr,{relatedTarget:0}),Vl=rt(S0),C0=V({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0}),E0=rt(C0),P0=V({},Mn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),L0=rt(P0),T0=V({},Mn,{data:0}),Eo=rt(T0),M0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_0={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"},I0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=I0[e])?!!t[e]:!1}function Wl(){return R0}var O0=V({},yr,{key:function(e){if(e.key){var t=M0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wl,charCode:function(e){return e.type==="keypress"?xs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),z0=rt(O0),F0=V({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Po=rt(F0),D0=V({},yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wl}),A0=rt(D0),B0=V({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0}),$0=rt(B0),U0=V({},ps,{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}),H0=rt(U0),V0=[9,13,27,32],Ql=g&&"CompositionEvent"in window,wr=null;g&&"documentMode"in document&&(wr=document.documentMode);var W0=g&&"TextEvent"in window&&!wr,Lo=g&&(!Ql||wr&&8<wr&&11>=wr),To=" ",Mo=!1;function _o(e,t){switch(e){case"keyup":return V0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Io(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function Q0(e,t){switch(e){case"compositionend":return Io(t);case"keypress":return t.which!==32?null:(Mo=!0,To);case"textInput":return e=t.data,e===To&&Mo?null:e;default:return null}}function Y0(e,t){if(_n)return e==="compositionend"||!Ql&&_o(e,t)?(e=ko(),hs=Bl=Wt=null,_n=!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 Lo&&t.locale!=="ko"?null:t.data;default:return null}}var G0={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 Ro(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G0[e.type]:t==="textarea"}function Oo(e,t,r,l){eo(l),t=ws(t,"onChange"),0<t.length&&(r=new $l("onChange","change",null,r,l),e.push({event:r,listeners:t}))}var Nr=null,br=null;function K0(e){qo(e,0)}function gs(e){var t=Fn(e);if(Ui(t))return e}function Z0(e,t){if(e==="change")return t}var zo=!1;if(g){var Yl;if(g){var Gl="oninput"in document;if(!Gl){var Fo=document.createElement("div");Fo.setAttribute("oninput","return;"),Gl=typeof Fo.oninput=="function"}Yl=Gl}else Yl=!1;zo=Yl&&(!document.documentMode||9<document.documentMode)}function Do(){Nr&&(Nr.detachEvent("onpropertychange",Ao),br=Nr=null)}function Ao(e){if(e.propertyName==="value"&&gs(br)){var t=[];Oo(t,br,e,El(e)),so(K0,t)}}function X0(e,t,r){e==="focusin"?(Do(),Nr=t,br=r,Nr.attachEvent("onpropertychange",Ao)):e==="focusout"&&Do()}function J0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gs(br)}function q0(e,t){if(e==="click")return gs(t)}function em(e,t){if(e==="input"||e==="change")return gs(t)}function tm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pt=typeof Object.is=="function"?Object.is:tm;function kr(e,t){if(pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),l=Object.keys(t);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var o=r[l];if(!f.call(t,o)||!pt(e[o],t[o]))return!1}return!0}function Bo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $o(e,t){var r=Bo(e);e=0;for(var l;r;){if(r.nodeType===3){if(l=e+r.textContent.length,e<=t&&l>=t)return{node:r,offset:t-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Bo(r)}}function Uo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ho(){for(var e=window,t=es();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=es(e.document)}return t}function Kl(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 nm(e){var t=Ho(),r=e.focusedElem,l=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Uo(r.ownerDocument.documentElement,r)){if(l!==null&&Kl(r)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,u=Math.min(l.start,o);l=l.end===void 0?u:Math.min(l.end,o),!e.extend&&u>l&&(o=l,l=u,u=o),o=$o(r,u);var x=$o(r,l);o&&x&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),u>l?(e.addRange(t),e.extend(x.node,x.offset)):(t.setEnd(x.node,x.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rm=g&&"documentMode"in document&&11>=document.documentMode,In=null,Zl=null,Sr=null,Xl=!1;function Vo(e,t,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Xl||In==null||In!==es(l)||(l=In,"selectionStart"in l&&Kl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Sr&&kr(Sr,l)||(Sr=l,l=ws(Zl,"onSelect"),0<l.length&&(t=new $l("onSelect","select",null,t,r),e.push({event:t,listeners:l}),t.target=In)))}function vs(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Rn={animationend:vs("Animation","AnimationEnd"),animationiteration:vs("Animation","AnimationIteration"),animationstart:vs("Animation","AnimationStart"),transitionend:vs("Transition","TransitionEnd")},Jl={},Wo={};g&&(Wo=document.createElement("div").style,"AnimationEvent"in window||(delete Rn.animationend.animation,delete Rn.animationiteration.animation,delete Rn.animationstart.animation),"TransitionEvent"in window||delete Rn.transitionend.transition);function ys(e){if(Jl[e])return Jl[e];if(!Rn[e])return e;var t=Rn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Wo)return Jl[e]=t[r];return e}var Qo=ys("animationend"),Yo=ys("animationiteration"),Go=ys("animationstart"),Ko=ys("transitionend"),Zo=new Map,Xo="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 Qt(e,t){Zo.set(e,t),m(t,[e])}for(var ql=0;ql<Xo.length;ql++){var ea=Xo[ql],sm=ea.toLowerCase(),lm=ea[0].toUpperCase()+ea.slice(1);Qt(sm,"on"+lm)}Qt(Qo,"onAnimationEnd"),Qt(Yo,"onAnimationIteration"),Qt(Go,"onAnimationStart"),Qt("dblclick","onDoubleClick"),Qt("focusin","onFocus"),Qt("focusout","onBlur"),Qt(Ko,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),m("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),m("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),m("onBeforeInput",["compositionend","keypress","textInput","paste"]),m("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="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(" "),am=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function Jo(e,t,r){var l=e.type||"unknown-event";e.currentTarget=r,s0(l,t,void 0,e),e.currentTarget=null}function qo(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var l=e[r],o=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var x=l.length-1;0<=x;x--){var p=l[x],v=p.instance,C=p.currentTarget;if(p=p.listener,v!==u&&o.isPropagationStopped())break e;Jo(o,p,C),u=v}else for(x=0;x<l.length;x++){if(p=l[x],v=p.instance,C=p.currentTarget,p=p.listener,v!==u&&o.isPropagationStopped())break e;Jo(o,p,C),u=v}}}if(rs)throw e=Ml,rs=!1,Ml=null,e}function ge(e,t){var r=t[oa];r===void 0&&(r=t[oa]=new Set);var l=e+"__bubble";r.has(l)||(ec(t,e,2,!1),r.add(l))}function ta(e,t,r){var l=0;t&&(l|=4),ec(r,e,l,t)}var js="_reactListening"+Math.random().toString(36).slice(2);function Er(e){if(!e[js]){e[js]=!0,c.forEach(function(r){r!=="selectionchange"&&(am.has(r)||ta(r,!1,e),ta(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[js]||(t[js]=!0,ta("selectionchange",!1,t))}}function ec(e,t,r,l){switch(bo(t)){case 1:var o=j0;break;case 4:o=w0;break;default:o=Dl}r=o.bind(null,t,r,e),o=void 0,!Tl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function na(e,t,r,l,o){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var p=l.stateNode.containerInfo;if(p===o||p.nodeType===8&&p.parentNode===o)break;if(x===4)for(x=l.return;x!==null;){var v=x.tag;if((v===3||v===4)&&(v=x.stateNode.containerInfo,v===o||v.nodeType===8&&v.parentNode===o))return;x=x.return}for(;p!==null;){if(x=hn(p),x===null)return;if(v=x.tag,v===5||v===6){l=u=x;continue e}p=p.parentNode}}l=l.return}so(function(){var C=u,z=El(r),F=[];e:{var _=Zo.get(e);if(_!==void 0){var U=$l,W=e;switch(e){case"keypress":if(xs(r)===0)break e;case"keydown":case"keyup":U=z0;break;case"focusin":W="focus",U=Vl;break;case"focusout":W="blur",U=Vl;break;case"beforeblur":case"afterblur":U=Vl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=Co;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=k0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=A0;break;case Qo:case Yo:case Go:U=E0;break;case Ko:U=$0;break;case"scroll":U=N0;break;case"wheel":U=H0;break;case"copy":case"cut":case"paste":U=L0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Po}var Q=(t&4)!==0,Pe=!Q&&e==="scroll",N=Q?_!==null?_+"Capture":null:_;Q=[];for(var y=C,k;y!==null;){k=y;var D=k.stateNode;if(k.tag===5&&D!==null&&(k=D,N!==null&&(D=cr(y,N),D!=null&&Q.push(Pr(y,D,k)))),Pe)break;y=y.return}0<Q.length&&(_=new U(_,W,null,r,z),F.push({event:_,listeners:Q}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",_&&r!==Cl&&(W=r.relatedTarget||r.fromElement)&&(hn(W)||W[Tt]))break e;if((U||_)&&(_=z.window===z?z:(_=z.ownerDocument)?_.defaultView||_.parentWindow:window,U?(W=r.relatedTarget||r.toElement,U=C,W=W?hn(W):null,W!==null&&(Pe=mn(W),W!==Pe||W.tag!==5&&W.tag!==6)&&(W=null)):(U=null,W=C),U!==W)){if(Q=Co,D="onMouseLeave",N="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(Q=Po,D="onPointerLeave",N="onPointerEnter",y="pointer"),Pe=U==null?_:Fn(U),k=W==null?_:Fn(W),_=new Q(D,y+"leave",U,r,z),_.target=Pe,_.relatedTarget=k,D=null,hn(z)===C&&(Q=new Q(N,y+"enter",W,r,z),Q.target=k,Q.relatedTarget=Pe,D=Q),Pe=D,U&&W)t:{for(Q=U,N=W,y=0,k=Q;k;k=On(k))y++;for(k=0,D=N;D;D=On(D))k++;for(;0<y-k;)Q=On(Q),y--;for(;0<k-y;)N=On(N),k--;for(;y--;){if(Q===N||N!==null&&Q===N.alternate)break t;Q=On(Q),N=On(N)}Q=null}else Q=null;U!==null&&tc(F,_,U,Q,!1),W!==null&&Pe!==null&&tc(F,Pe,W,Q,!0)}}e:{if(_=C?Fn(C):window,U=_.nodeName&&_.nodeName.toLowerCase(),U==="select"||U==="input"&&_.type==="file")var Y=Z0;else if(Ro(_))if(zo)Y=em;else{Y=J0;var Z=X0}else(U=_.nodeName)&&U.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(Y=q0);if(Y&&(Y=Y(e,C))){Oo(F,Y,r,z);break e}Z&&Z(e,_,C),e==="focusout"&&(Z=_._wrapperState)&&Z.controlled&&_.type==="number"&&wl(_,"number",_.value)}switch(Z=C?Fn(C):window,e){case"focusin":(Ro(Z)||Z.contentEditable==="true")&&(In=Z,Zl=C,Sr=null);break;case"focusout":Sr=Zl=In=null;break;case"mousedown":Xl=!0;break;case"contextmenu":case"mouseup":case"dragend":Xl=!1,Vo(F,r,z);break;case"selectionchange":if(rm)break;case"keydown":case"keyup":Vo(F,r,z)}var X;if(Ql)e:{switch(e){case"compositionstart":var q="onCompositionStart";break e;case"compositionend":q="onCompositionEnd";break e;case"compositionupdate":q="onCompositionUpdate";break e}q=void 0}else _n?_o(e,r)&&(q="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(q="onCompositionStart");q&&(Lo&&r.locale!=="ko"&&(_n||q!=="onCompositionStart"?q==="onCompositionEnd"&&_n&&(X=ko()):(Wt=z,Bl="value"in Wt?Wt.value:Wt.textContent,_n=!0)),Z=ws(C,q),0<Z.length&&(q=new Eo(q,e,null,r,z),F.push({event:q,listeners:Z}),X?q.data=X:(X=Io(r),X!==null&&(q.data=X)))),(X=W0?Q0(e,r):Y0(e,r))&&(C=ws(C,"onBeforeInput"),0<C.length&&(z=new Eo("onBeforeInput","beforeinput",null,r,z),F.push({event:z,listeners:C}),z.data=X))}qo(F,t)})}function Pr(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ws(e,t){for(var r=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;o.tag===5&&u!==null&&(o=u,u=cr(e,r),u!=null&&l.unshift(Pr(e,u,o)),u=cr(e,t),u!=null&&l.push(Pr(e,u,o))),e=e.return}return l}function On(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function tc(e,t,r,l,o){for(var u=t._reactName,x=[];r!==null&&r!==l;){var p=r,v=p.alternate,C=p.stateNode;if(v!==null&&v===l)break;p.tag===5&&C!==null&&(p=C,o?(v=cr(r,u),v!=null&&x.unshift(Pr(r,v,p))):o||(v=cr(r,u),v!=null&&x.push(Pr(r,v,p)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var im=/\r\n?/g,om=/\u0000|\uFFFD/g;function nc(e){return(typeof e=="string"?e:""+e).replace(im,`
|
|
6
|
-
`).replace(om,"")}function Ns(e,t,r){if(t=nc(t),nc(e)!==t&&r)throw Error(i(425))}function bs(){}var ra=null,sa=null;function la(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 aa=typeof setTimeout=="function"?setTimeout:void 0,cm=typeof clearTimeout=="function"?clearTimeout:void 0,rc=typeof Promise=="function"?Promise:void 0,um=typeof queueMicrotask=="function"?queueMicrotask:typeof rc<"u"?function(e){return rc.resolve(null).then(e).catch(dm)}:aa;function dm(e){setTimeout(function(){throw e})}function ia(e,t){var r=t,l=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(l===0){e.removeChild(o),vr(t);return}l--}else r!=="$"&&r!=="$?"&&r!=="$!"||l++;r=o}while(r);vr(t)}function Yt(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 sc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var zn=Math.random().toString(36).slice(2),bt="__reactFiber$"+zn,Lr="__reactProps$"+zn,Tt="__reactContainer$"+zn,oa="__reactEvents$"+zn,mm="__reactListeners$"+zn,hm="__reactHandles$"+zn;function hn(e){var t=e[bt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Tt]||r[bt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=sc(e);e!==null;){if(r=e[bt])return r;e=sc(e)}return t}e=r,r=e.parentNode}return null}function Tr(e){return e=e[bt]||e[Tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function ks(e){return e[Lr]||null}var ca=[],Dn=-1;function Gt(e){return{current:e}}function ve(e){0>Dn||(e.current=ca[Dn],ca[Dn]=null,Dn--)}function pe(e,t){Dn++,ca[Dn]=e.current,e.current=t}var Kt={},He=Gt(Kt),Ze=Gt(!1),xn=Kt;function An(e,t){var r=e.type.contextTypes;if(!r)return Kt;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in r)o[u]=t[u];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Xe(e){return e=e.childContextTypes,e!=null}function Ss(){ve(Ze),ve(He)}function lc(e,t,r){if(He.current!==Kt)throw Error(i(168));pe(He,t),pe(Ze,r)}function ac(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var o in l)if(!(o in t))throw Error(i(108,fe(e)||"Unknown",o));return V({},r,l)}function Cs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kt,xn=He.current,pe(He,e),pe(Ze,Ze.current),!0}function ic(e,t,r){var l=e.stateNode;if(!l)throw Error(i(169));r?(e=ac(e,t,xn),l.__reactInternalMemoizedMergedChildContext=e,ve(Ze),ve(He),pe(He,e)):ve(Ze),pe(Ze,r)}var Mt=null,Es=!1,ua=!1;function oc(e){Mt===null?Mt=[e]:Mt.push(e)}function xm(e){Es=!0,oc(e)}function Zt(){if(!ua&&Mt!==null){ua=!0;var e=0,t=ue;try{var r=Mt;for(ue=1;e<r.length;e++){var l=r[e];do l=l(!0);while(l!==null)}Mt=null,Es=!1}catch(o){throw Mt!==null&&(Mt=Mt.slice(e+1)),co(_l,Zt),o}finally{ue=t,ua=!1}}return null}var Bn=[],$n=0,Ps=null,Ls=0,ot=[],ct=0,fn=null,_t=1,It="";function pn(e,t){Bn[$n++]=Ls,Bn[$n++]=Ps,Ps=e,Ls=t}function cc(e,t,r){ot[ct++]=_t,ot[ct++]=It,ot[ct++]=fn,fn=e;var l=_t;e=It;var o=32-ft(l)-1;l&=~(1<<o),r+=1;var u=32-ft(t)+o;if(30<u){var x=o-o%5;u=(l&(1<<x)-1).toString(32),l>>=x,o-=x,_t=1<<32-ft(t)+o|r<<o|l,It=u+e}else _t=1<<u|r<<o|l,It=e}function da(e){e.return!==null&&(pn(e,1),cc(e,1,0))}function ma(e){for(;e===Ps;)Ps=Bn[--$n],Bn[$n]=null,Ls=Bn[--$n],Bn[$n]=null;for(;e===fn;)fn=ot[--ct],ot[ct]=null,It=ot[--ct],ot[ct]=null,_t=ot[--ct],ot[ct]=null}var st=null,lt=null,we=!1,gt=null;function uc(e,t){var r=ht(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function dc(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,st=e,lt=Yt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,lt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=fn!==null?{id:_t,overflow:It}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ht(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,st=e,lt=null,!0):!1;default:return!1}}function ha(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xa(e){if(we){var t=lt;if(t){var r=t;if(!dc(e,t)){if(ha(e))throw Error(i(418));t=Yt(r.nextSibling);var l=st;t&&dc(e,t)?uc(l,r):(e.flags=e.flags&-4097|2,we=!1,st=e)}}else{if(ha(e))throw Error(i(418));e.flags=e.flags&-4097|2,we=!1,st=e}}}function mc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function Ts(e){if(e!==st)return!1;if(!we)return mc(e),we=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!la(e.type,e.memoizedProps)),t&&(t=lt)){if(ha(e))throw hc(),Error(i(418));for(;t;)uc(e,t),t=Yt(t.nextSibling)}if(mc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){lt=Yt(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}lt=null}}else lt=st?Yt(e.stateNode.nextSibling):null;return!0}function hc(){for(var e=lt;e;)e=Yt(e.nextSibling)}function Un(){lt=st=null,we=!1}function fa(e){gt===null?gt=[e]:gt.push(e)}var fm=G.ReactCurrentBatchConfig;function Mr(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(i(309));var l=r.stateNode}if(!l)throw Error(i(147,e));var o=l,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(x){var p=o.refs;x===null?delete p[u]:p[u]=x},t._stringRef=u,t)}if(typeof e!="string")throw Error(i(284));if(!r._owner)throw Error(i(290,e))}return e}function Ms(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xc(e){var t=e._init;return t(e._payload)}function fc(e){function t(N,y){if(e){var k=N.deletions;k===null?(N.deletions=[y],N.flags|=16):k.push(y)}}function r(N,y){if(!e)return null;for(;y!==null;)t(N,y),y=y.sibling;return null}function l(N,y){for(N=new Map;y!==null;)y.key!==null?N.set(y.key,y):N.set(y.index,y),y=y.sibling;return N}function o(N,y){return N=sn(N,y),N.index=0,N.sibling=null,N}function u(N,y,k){return N.index=k,e?(k=N.alternate,k!==null?(k=k.index,k<y?(N.flags|=2,y):k):(N.flags|=2,y)):(N.flags|=1048576,y)}function x(N){return e&&N.alternate===null&&(N.flags|=2),N}function p(N,y,k,D){return y===null||y.tag!==6?(y=ai(k,N.mode,D),y.return=N,y):(y=o(y,k),y.return=N,y)}function v(N,y,k,D){var Y=k.type;return Y===J?z(N,y,k.props.children,D,k.key):y!==null&&(y.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===Ce&&xc(Y)===y.type)?(D=o(y,k.props),D.ref=Mr(N,y,k),D.return=N,D):(D=tl(k.type,k.key,k.props,null,N.mode,D),D.ref=Mr(N,y,k),D.return=N,D)}function C(N,y,k,D){return y===null||y.tag!==4||y.stateNode.containerInfo!==k.containerInfo||y.stateNode.implementation!==k.implementation?(y=ii(k,N.mode,D),y.return=N,y):(y=o(y,k.children||[]),y.return=N,y)}function z(N,y,k,D,Y){return y===null||y.tag!==7?(y=kn(k,N.mode,D,Y),y.return=N,y):(y=o(y,k),y.return=N,y)}function F(N,y,k){if(typeof y=="string"&&y!==""||typeof y=="number")return y=ai(""+y,N.mode,k),y.return=N,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case se:return k=tl(y.type,y.key,y.props,null,N.mode,k),k.ref=Mr(N,null,y),k.return=N,k;case me:return y=ii(y,N.mode,k),y.return=N,y;case Ce:var D=y._init;return F(N,D(y._payload),k)}if(ar(y)||K(y))return y=kn(y,N.mode,k,null),y.return=N,y;Ms(N,y)}return null}function _(N,y,k,D){var Y=y!==null?y.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return Y!==null?null:p(N,y,""+k,D);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case se:return k.key===Y?v(N,y,k,D):null;case me:return k.key===Y?C(N,y,k,D):null;case Ce:return Y=k._init,_(N,y,Y(k._payload),D)}if(ar(k)||K(k))return Y!==null?null:z(N,y,k,D,null);Ms(N,k)}return null}function U(N,y,k,D,Y){if(typeof D=="string"&&D!==""||typeof D=="number")return N=N.get(k)||null,p(y,N,""+D,Y);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case se:return N=N.get(D.key===null?k:D.key)||null,v(y,N,D,Y);case me:return N=N.get(D.key===null?k:D.key)||null,C(y,N,D,Y);case Ce:var Z=D._init;return U(N,y,k,Z(D._payload),Y)}if(ar(D)||K(D))return N=N.get(k)||null,z(y,N,D,Y,null);Ms(y,D)}return null}function W(N,y,k,D){for(var Y=null,Z=null,X=y,q=y=0,Fe=null;X!==null&&q<k.length;q++){X.index>q?(Fe=X,X=null):Fe=X.sibling;var oe=_(N,X,k[q],D);if(oe===null){X===null&&(X=Fe);break}e&&X&&oe.alternate===null&&t(N,X),y=u(oe,y,q),Z===null?Y=oe:Z.sibling=oe,Z=oe,X=Fe}if(q===k.length)return r(N,X),we&&pn(N,q),Y;if(X===null){for(;q<k.length;q++)X=F(N,k[q],D),X!==null&&(y=u(X,y,q),Z===null?Y=X:Z.sibling=X,Z=X);return we&&pn(N,q),Y}for(X=l(N,X);q<k.length;q++)Fe=U(X,N,q,k[q],D),Fe!==null&&(e&&Fe.alternate!==null&&X.delete(Fe.key===null?q:Fe.key),y=u(Fe,y,q),Z===null?Y=Fe:Z.sibling=Fe,Z=Fe);return e&&X.forEach(function(ln){return t(N,ln)}),we&&pn(N,q),Y}function Q(N,y,k,D){var Y=K(k);if(typeof Y!="function")throw Error(i(150));if(k=Y.call(k),k==null)throw Error(i(151));for(var Z=Y=null,X=y,q=y=0,Fe=null,oe=k.next();X!==null&&!oe.done;q++,oe=k.next()){X.index>q?(Fe=X,X=null):Fe=X.sibling;var ln=_(N,X,oe.value,D);if(ln===null){X===null&&(X=Fe);break}e&&X&&ln.alternate===null&&t(N,X),y=u(ln,y,q),Z===null?Y=ln:Z.sibling=ln,Z=ln,X=Fe}if(oe.done)return r(N,X),we&&pn(N,q),Y;if(X===null){for(;!oe.done;q++,oe=k.next())oe=F(N,oe.value,D),oe!==null&&(y=u(oe,y,q),Z===null?Y=oe:Z.sibling=oe,Z=oe);return we&&pn(N,q),Y}for(X=l(N,X);!oe.done;q++,oe=k.next())oe=U(X,N,q,oe.value,D),oe!==null&&(e&&oe.alternate!==null&&X.delete(oe.key===null?q:oe.key),y=u(oe,y,q),Z===null?Y=oe:Z.sibling=oe,Z=oe);return e&&X.forEach(function(Gm){return t(N,Gm)}),we&&pn(N,q),Y}function Pe(N,y,k,D){if(typeof k=="object"&&k!==null&&k.type===J&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case se:e:{for(var Y=k.key,Z=y;Z!==null;){if(Z.key===Y){if(Y=k.type,Y===J){if(Z.tag===7){r(N,Z.sibling),y=o(Z,k.props.children),y.return=N,N=y;break e}}else if(Z.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===Ce&&xc(Y)===Z.type){r(N,Z.sibling),y=o(Z,k.props),y.ref=Mr(N,Z,k),y.return=N,N=y;break e}r(N,Z);break}else t(N,Z);Z=Z.sibling}k.type===J?(y=kn(k.props.children,N.mode,D,k.key),y.return=N,N=y):(D=tl(k.type,k.key,k.props,null,N.mode,D),D.ref=Mr(N,y,k),D.return=N,N=D)}return x(N);case me:e:{for(Z=k.key;y!==null;){if(y.key===Z)if(y.tag===4&&y.stateNode.containerInfo===k.containerInfo&&y.stateNode.implementation===k.implementation){r(N,y.sibling),y=o(y,k.children||[]),y.return=N,N=y;break e}else{r(N,y);break}else t(N,y);y=y.sibling}y=ii(k,N.mode,D),y.return=N,N=y}return x(N);case Ce:return Z=k._init,Pe(N,y,Z(k._payload),D)}if(ar(k))return W(N,y,k,D);if(K(k))return Q(N,y,k,D);Ms(N,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,y!==null&&y.tag===6?(r(N,y.sibling),y=o(y,k),y.return=N,N=y):(r(N,y),y=ai(k,N.mode,D),y.return=N,N=y),x(N)):r(N,y)}return Pe}var Hn=fc(!0),pc=fc(!1),_s=Gt(null),Is=null,Vn=null,pa=null;function ga(){pa=Vn=Is=null}function va(e){var t=_s.current;ve(_s),e._currentValue=t}function ya(e,t,r){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===r)break;e=e.return}}function Wn(e,t){Is=e,pa=Vn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Je=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(pa!==e)if(e={context:e,memoizedValue:t,next:null},Vn===null){if(Is===null)throw Error(i(308));Vn=e,Is.dependencies={lanes:0,firstContext:e}}else Vn=Vn.next=e;return t}var gn=null;function ja(e){gn===null?gn=[e]:gn.push(e)}function gc(e,t,r,l){var o=t.interleaved;return o===null?(r.next=r,ja(t)):(r.next=o.next,o.next=r),t.interleaved=r,Rt(e,l)}function Rt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Xt=!1;function wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vc(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 Ot(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jt(e,t,r){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(le&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,Rt(e,r)}return o=l.interleaved,o===null?(t.next=t,ja(l)):(t.next=o.next,o.next=t),l.interleaved=t,Rt(e,r)}function Rs(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,Ol(e,r)}}function yc(e,t){var r=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var o=null,u=null;if(r=r.firstBaseUpdate,r!==null){do{var x={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};u===null?o=u=x:u=u.next=x,r=r.next}while(r!==null);u===null?o=u=t:u=u.next=t}else o=u=t;r={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:l.shared,effects:l.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Os(e,t,r,l){var o=e.updateQueue;Xt=!1;var u=o.firstBaseUpdate,x=o.lastBaseUpdate,p=o.shared.pending;if(p!==null){o.shared.pending=null;var v=p,C=v.next;v.next=null,x===null?u=C:x.next=C,x=v;var z=e.alternate;z!==null&&(z=z.updateQueue,p=z.lastBaseUpdate,p!==x&&(p===null?z.firstBaseUpdate=C:p.next=C,z.lastBaseUpdate=v))}if(u!==null){var F=o.baseState;x=0,z=C=v=null,p=u;do{var _=p.lane,U=p.eventTime;if((l&_)===_){z!==null&&(z=z.next={eventTime:U,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var W=e,Q=p;switch(_=t,U=r,Q.tag){case 1:if(W=Q.payload,typeof W=="function"){F=W.call(U,F,_);break e}F=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=Q.payload,_=typeof W=="function"?W.call(U,F,_):W,_==null)break e;F=V({},F,_);break e;case 2:Xt=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,_=o.effects,_===null?o.effects=[p]:_.push(p))}else U={eventTime:U,lane:_,tag:p.tag,payload:p.payload,callback:p.callback,next:null},z===null?(C=z=U,v=F):z=z.next=U,x|=_;if(p=p.next,p===null){if(p=o.shared.pending,p===null)break;_=p,p=_.next,_.next=null,o.lastBaseUpdate=_,o.shared.pending=null}}while(!0);if(z===null&&(v=F),o.baseState=v,o.firstBaseUpdate=C,o.lastBaseUpdate=z,t=o.shared.interleaved,t!==null){o=t;do x|=o.lane,o=o.next;while(o!==t)}else u===null&&(o.shared.lanes=0);jn|=x,e.lanes=x,e.memoizedState=F}}function jc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var l=e[t],o=l.callback;if(o!==null){if(l.callback=null,l=r,typeof o!="function")throw Error(i(191,o));o.call(l)}}}var _r={},kt=Gt(_r),Ir=Gt(_r),Rr=Gt(_r);function vn(e){if(e===_r)throw Error(i(174));return e}function Na(e,t){switch(pe(Rr,t),pe(Ir,e),pe(kt,_r),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:bl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=bl(t,e)}ve(kt),pe(kt,t)}function Qn(){ve(kt),ve(Ir),ve(Rr)}function wc(e){vn(Rr.current);var t=vn(kt.current),r=bl(t,e.type);t!==r&&(pe(Ir,e),pe(kt,r))}function ba(e){Ir.current===e&&(ve(kt),ve(Ir))}var Ne=Gt(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ka=[];function Sa(){for(var e=0;e<ka.length;e++)ka[e]._workInProgressVersionPrimary=null;ka.length=0}var Fs=G.ReactCurrentDispatcher,Ca=G.ReactCurrentBatchConfig,yn=0,be=null,Ie=null,Oe=null,Ds=!1,Or=!1,zr=0,pm=0;function Ve(){throw Error(i(321))}function Ea(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!pt(e[r],t[r]))return!1;return!0}function Pa(e,t,r,l,o,u){if(yn=u,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Fs.current=e===null||e.memoizedState===null?jm:wm,e=r(l,o),Or){u=0;do{if(Or=!1,zr=0,25<=u)throw Error(i(301));u+=1,Oe=Ie=null,t.updateQueue=null,Fs.current=Nm,e=r(l,o)}while(Or)}if(Fs.current=$s,t=Ie!==null&&Ie.next!==null,yn=0,Oe=Ie=be=null,Ds=!1,t)throw Error(i(300));return e}function La(){var e=zr!==0;return zr=0,e}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oe===null?be.memoizedState=Oe=e:Oe=Oe.next=e,Oe}function dt(){if(Ie===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=Oe===null?be.memoizedState:Oe.next;if(t!==null)Oe=t,Ie=e;else{if(e===null)throw Error(i(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},Oe===null?be.memoizedState=Oe=e:Oe=Oe.next=e}return Oe}function Fr(e,t){return typeof t=="function"?t(e):t}function Ta(e){var t=dt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=Ie,o=l.baseQueue,u=r.pending;if(u!==null){if(o!==null){var x=o.next;o.next=u.next,u.next=x}l.baseQueue=o=u,r.pending=null}if(o!==null){u=o.next,l=l.baseState;var p=x=null,v=null,C=u;do{var z=C.lane;if((yn&z)===z)v!==null&&(v=v.next={lane:0,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),l=C.hasEagerState?C.eagerState:e(l,C.action);else{var F={lane:z,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null};v===null?(p=v=F,x=l):v=v.next=F,be.lanes|=z,jn|=z}C=C.next}while(C!==null&&C!==u);v===null?x=l:v.next=p,pt(l,t.memoizedState)||(Je=!0),t.memoizedState=l,t.baseState=x,t.baseQueue=v,r.lastRenderedState=l}if(e=r.interleaved,e!==null){o=e;do u=o.lane,be.lanes|=u,jn|=u,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ma(e){var t=dt(),r=t.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=r.dispatch,o=r.pending,u=t.memoizedState;if(o!==null){r.pending=null;var x=o=o.next;do u=e(u,x.action),x=x.next;while(x!==o);pt(u,t.memoizedState)||(Je=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),r.lastRenderedState=u}return[u,l]}function Nc(){}function bc(e,t){var r=be,l=dt(),o=t(),u=!pt(l.memoizedState,o);if(u&&(l.memoizedState=o,Je=!0),l=l.queue,_a(Cc.bind(null,r,l,e),[e]),l.getSnapshot!==t||u||Oe!==null&&Oe.memoizedState.tag&1){if(r.flags|=2048,Dr(9,Sc.bind(null,r,l,o,t),void 0,null),ze===null)throw Error(i(349));(yn&30)!==0||kc(r,t,o)}return o}function kc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Sc(e,t,r,l){t.value=r,t.getSnapshot=l,Ec(t)&&Pc(e)}function Cc(e,t,r){return r(function(){Ec(t)&&Pc(e)})}function Ec(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!pt(e,r)}catch{return!0}}function Pc(e){var t=Rt(e,1);t!==null&&wt(t,e,1,-1)}function Lc(e){var t=St();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:e},t.queue=e,e=e.dispatch=ym.bind(null,be,e),[t.memoizedState,e]}function Dr(e,t,r,l){return e={tag:e,create:t,destroy:r,deps:l,next:null},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(l=r.next,r.next=e,e.next=l,t.lastEffect=e)),e}function Tc(){return dt().memoizedState}function As(e,t,r,l){var o=St();be.flags|=e,o.memoizedState=Dr(1|t,r,void 0,l===void 0?null:l)}function Bs(e,t,r,l){var o=dt();l=l===void 0?null:l;var u=void 0;if(Ie!==null){var x=Ie.memoizedState;if(u=x.destroy,l!==null&&Ea(l,x.deps)){o.memoizedState=Dr(t,r,u,l);return}}be.flags|=e,o.memoizedState=Dr(1|t,r,u,l)}function Mc(e,t){return As(8390656,8,e,t)}function _a(e,t){return Bs(2048,8,e,t)}function _c(e,t){return Bs(4,2,e,t)}function Ic(e,t){return Bs(4,4,e,t)}function Rc(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 Oc(e,t,r){return r=r!=null?r.concat([e]):null,Bs(4,4,Rc.bind(null,t,e),r)}function Ia(){}function zc(e,t){var r=dt();t=t===void 0?null:t;var l=r.memoizedState;return l!==null&&t!==null&&Ea(t,l[1])?l[0]:(r.memoizedState=[e,t],e)}function Fc(e,t){var r=dt();t=t===void 0?null:t;var l=r.memoizedState;return l!==null&&t!==null&&Ea(t,l[1])?l[0]:(e=e(),r.memoizedState=[e,t],e)}function Dc(e,t,r){return(yn&21)===0?(e.baseState&&(e.baseState=!1,Je=!0),e.memoizedState=r):(pt(r,t)||(r=xo(),be.lanes|=r,jn|=r,e.baseState=!0),t)}function gm(e,t){var r=ue;ue=r!==0&&4>r?r:4,e(!0);var l=Ca.transition;Ca.transition={};try{e(!1),t()}finally{ue=r,Ca.transition=l}}function Ac(){return dt().memoizedState}function vm(e,t,r){var l=nn(e);if(r={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null},Bc(e))$c(t,r);else if(r=gc(e,t,r,l),r!==null){var o=Ke();wt(r,e,l,o),Uc(r,t,l)}}function ym(e,t,r){var l=nn(e),o={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null};if(Bc(e))$c(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var x=t.lastRenderedState,p=u(x,r);if(o.hasEagerState=!0,o.eagerState=p,pt(p,x)){var v=t.interleaved;v===null?(o.next=o,ja(t)):(o.next=v.next,v.next=o),t.interleaved=o;return}}catch{}r=gc(e,t,o,l),r!==null&&(o=Ke(),wt(r,e,l,o),Uc(r,t,l))}}function Bc(e){var t=e.alternate;return e===be||t!==null&&t===be}function $c(e,t){Or=Ds=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Uc(e,t,r){if((r&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,Ol(e,r)}}var $s={readContext:ut,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},jm={readContext:ut,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:Mc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,As(4194308,4,Rc.bind(null,t,e),r)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){return As(4,2,e,t)},useMemo:function(e,t){var r=St();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var l=St();return t=r!==void 0?r(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=vm.bind(null,be,e),[l.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Lc,useDebugValue:Ia,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Lc(!1),t=e[0];return e=gm.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=be,o=St();if(we){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),ze===null)throw Error(i(349));(yn&30)!==0||kc(l,t,r)}o.memoizedState=r;var u={value:r,getSnapshot:t};return o.queue=u,Mc(Cc.bind(null,l,u,e),[e]),l.flags|=2048,Dr(9,Sc.bind(null,l,u,r,t),void 0,null),r},useId:function(){var e=St(),t=ze.identifierPrefix;if(we){var r=It,l=_t;r=(l&~(1<<32-ft(l)-1)).toString(32)+r,t=":"+t+"R"+r,r=zr++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=pm++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wm={readContext:ut,useCallback:zc,useContext:ut,useEffect:_a,useImperativeHandle:Oc,useInsertionEffect:_c,useLayoutEffect:Ic,useMemo:Fc,useReducer:Ta,useRef:Tc,useState:function(){return Ta(Fr)},useDebugValue:Ia,useDeferredValue:function(e){var t=dt();return Dc(t,Ie.memoizedState,e)},useTransition:function(){var e=Ta(Fr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:Nc,useSyncExternalStore:bc,useId:Ac,unstable_isNewReconciler:!1},Nm={readContext:ut,useCallback:zc,useContext:ut,useEffect:_a,useImperativeHandle:Oc,useInsertionEffect:_c,useLayoutEffect:Ic,useMemo:Fc,useReducer:Ma,useRef:Tc,useState:function(){return Ma(Fr)},useDebugValue:Ia,useDeferredValue:function(e){var t=dt();return Ie===null?t.memoizedState=e:Dc(t,Ie.memoizedState,e)},useTransition:function(){var e=Ma(Fr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:Nc,useSyncExternalStore:bc,useId:Ac,unstable_isNewReconciler:!1};function vt(e,t){if(e&&e.defaultProps){t=V({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ra(e,t,r,l){t=e.memoizedState,r=r(l,t),r=r==null?t:V({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Us={isMounted:function(e){return(e=e._reactInternals)?mn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var l=Ke(),o=nn(e),u=Ot(l,o);u.payload=t,r!=null&&(u.callback=r),t=Jt(e,u,o),t!==null&&(wt(t,e,o,l),Rs(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var l=Ke(),o=nn(e),u=Ot(l,o);u.tag=1,u.payload=t,r!=null&&(u.callback=r),t=Jt(e,u,o),t!==null&&(wt(t,e,o,l),Rs(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ke(),l=nn(e),o=Ot(r,l);o.tag=2,t!=null&&(o.callback=t),t=Jt(e,o,l),t!==null&&(wt(t,e,l,r),Rs(t,e,l))}};function Hc(e,t,r,l,o,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,x):t.prototype&&t.prototype.isPureReactComponent?!kr(r,l)||!kr(o,u):!0}function Vc(e,t,r){var l=!1,o=Kt,u=t.contextType;return typeof u=="object"&&u!==null?u=ut(u):(o=Xe(t)?xn:He.current,l=t.contextTypes,u=(l=l!=null)?An(e,o):Kt),t=new t(r,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Us,e.stateNode=t,t._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=u),t}function Wc(e,t,r,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,l),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Oa(e,t,r,l){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},wa(e);var u=t.contextType;typeof u=="object"&&u!==null?o.context=ut(u):(u=Xe(t)?xn:He.current,o.context=An(e,u)),o.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(Ra(e,t,u,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Us.enqueueReplaceState(o,o.state,null),Os(e,r,o,l),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Yn(e,t){try{var r="",l=t;do r+=ae(l),l=l.return;while(l);var o=r}catch(u){o=`
|
|
7
|
-
Error generating stack: `+u.message+`
|
|
8
|
-
`+u.stack}return{value:e,source:t,stack:o,digest:null}}function za(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Fa(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var bm=typeof WeakMap=="function"?WeakMap:Map;function Qc(e,t,r){r=Ot(-1,r),r.tag=3,r.payload={element:null};var l=t.value;return r.callback=function(){Ks||(Ks=!0,Ja=l),Fa(e,t)},r}function Yc(e,t,r){r=Ot(-1,r),r.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var o=t.value;r.payload=function(){return l(o)},r.callback=function(){Fa(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(r.callback=function(){Fa(e,t),typeof l!="function"&&(en===null?en=new Set([this]):en.add(this));var x=t.stack;this.componentDidCatch(t.value,{componentStack:x!==null?x:""})}),r}function Gc(e,t,r){var l=e.pingCache;if(l===null){l=e.pingCache=new bm;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(r)||(o.add(r),e=Fm.bind(null,e,t,r),t.then(e,e))}function Kc(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 Zc(e,t,r,l,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ot(-1,1),t.tag=2,Jt(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var km=G.ReactCurrentOwner,Je=!1;function Ge(e,t,r,l){t.child=e===null?pc(t,null,r,l):Hn(t,e.child,r,l)}function Xc(e,t,r,l,o){r=r.render;var u=t.ref;return Wn(t,o),l=Pa(e,t,r,l,u,o),r=La(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zt(e,t,o)):(we&&r&&da(t),t.flags|=1,Ge(e,t,l,o),t.child)}function Jc(e,t,r,l,o){if(e===null){var u=r.type;return typeof u=="function"&&!li(u)&&u.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=u,qc(e,t,u,l,o)):(e=tl(r.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&o)===0){var x=u.memoizedProps;if(r=r.compare,r=r!==null?r:kr,r(x,l)&&e.ref===t.ref)return zt(e,t,o)}return t.flags|=1,e=sn(u,l),e.ref=t.ref,e.return=t,t.child=e}function qc(e,t,r,l,o){if(e!==null){var u=e.memoizedProps;if(kr(u,l)&&e.ref===t.ref)if(Je=!1,t.pendingProps=l=u,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,zt(e,t,o)}return Da(e,t,r,l,o)}function eu(e,t,r){var l=t.pendingProps,o=l.children,u=e!==null?e.memoizedState:null;if(l.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},pe(Kn,at),at|=r;else{if((r&1073741824)===0)return e=u!==null?u.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,pe(Kn,at),at|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=u!==null?u.baseLanes:r,pe(Kn,at),at|=l}else u!==null?(l=u.baseLanes|r,t.memoizedState=null):l=r,pe(Kn,at),at|=l;return Ge(e,t,o,r),t.child}function tu(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Da(e,t,r,l,o){var u=Xe(r)?xn:He.current;return u=An(t,u),Wn(t,o),r=Pa(e,t,r,l,u,o),l=La(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zt(e,t,o)):(we&&l&&da(t),t.flags|=1,Ge(e,t,r,o),t.child)}function nu(e,t,r,l,o){if(Xe(r)){var u=!0;Cs(t)}else u=!1;if(Wn(t,o),t.stateNode===null)Vs(e,t),Vc(t,r,l),Oa(t,r,l,o),l=!0;else if(e===null){var x=t.stateNode,p=t.memoizedProps;x.props=p;var v=x.context,C=r.contextType;typeof C=="object"&&C!==null?C=ut(C):(C=Xe(r)?xn:He.current,C=An(t,C));var z=r.getDerivedStateFromProps,F=typeof z=="function"||typeof x.getSnapshotBeforeUpdate=="function";F||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(p!==l||v!==C)&&Wc(t,x,l,C),Xt=!1;var _=t.memoizedState;x.state=_,Os(t,l,x,o),v=t.memoizedState,p!==l||_!==v||Ze.current||Xt?(typeof z=="function"&&(Ra(t,r,z,l),v=t.memoizedState),(p=Xt||Hc(t,r,p,l,_,v,C))?(F||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(t.flags|=4194308)):(typeof x.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=v),x.props=l,x.state=v,x.context=C,l=p):(typeof x.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{x=t.stateNode,vc(e,t),p=t.memoizedProps,C=t.type===t.elementType?p:vt(t.type,p),x.props=C,F=t.pendingProps,_=x.context,v=r.contextType,typeof v=="object"&&v!==null?v=ut(v):(v=Xe(r)?xn:He.current,v=An(t,v));var U=r.getDerivedStateFromProps;(z=typeof U=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(p!==F||_!==v)&&Wc(t,x,l,v),Xt=!1,_=t.memoizedState,x.state=_,Os(t,l,x,o);var W=t.memoizedState;p!==F||_!==W||Ze.current||Xt?(typeof U=="function"&&(Ra(t,r,U,l),W=t.memoizedState),(C=Xt||Hc(t,r,C,l,_,W,v)||!1)?(z||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(l,W,v),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(l,W,v)),typeof x.componentDidUpdate=="function"&&(t.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof x.componentDidUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=W),x.props=l,x.state=W,x.context=v,l=C):(typeof x.componentDidUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),l=!1)}return Aa(e,t,r,l,u,o)}function Aa(e,t,r,l,o,u){tu(e,t);var x=(t.flags&128)!==0;if(!l&&!x)return o&&ic(t,r,!1),zt(e,t,u);l=t.stateNode,km.current=t;var p=x&&typeof r.getDerivedStateFromError!="function"?null:l.render();return t.flags|=1,e!==null&&x?(t.child=Hn(t,e.child,null,u),t.child=Hn(t,null,p,u)):Ge(e,t,p,u),t.memoizedState=l.state,o&&ic(t,r,!0),t.child}function ru(e){var t=e.stateNode;t.pendingContext?lc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lc(e,t.context,!1),Na(e,t.containerInfo)}function su(e,t,r,l,o){return Un(),fa(o),t.flags|=256,Ge(e,t,r,l),t.child}var Ba={dehydrated:null,treeContext:null,retryLane:0};function $a(e){return{baseLanes:e,cachePool:null,transitions:null}}function lu(e,t,r){var l=t.pendingProps,o=Ne.current,u=!1,x=(t.flags&128)!==0,p;if((p=x)||(p=e!==null&&e.memoizedState===null?!1:(o&2)!==0),p?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),pe(Ne,o&1),e===null)return xa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(x=l.children,e=l.fallback,u?(l=t.mode,u=t.child,x={mode:"hidden",children:x},(l&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=x):u=nl(x,l,0,null),e=kn(e,l,r,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=$a(r),t.memoizedState=Ba,e):Ua(t,x));if(o=e.memoizedState,o!==null&&(p=o.dehydrated,p!==null))return Sm(e,t,x,l,p,o,r);if(u){u=l.fallback,x=t.mode,o=e.child,p=o.sibling;var v={mode:"hidden",children:l.children};return(x&1)===0&&t.child!==o?(l=t.child,l.childLanes=0,l.pendingProps=v,t.deletions=null):(l=sn(o,v),l.subtreeFlags=o.subtreeFlags&14680064),p!==null?u=sn(p,u):(u=kn(u,x,r,null),u.flags|=2),u.return=t,l.return=t,l.sibling=u,t.child=l,l=u,u=t.child,x=e.child.memoizedState,x=x===null?$a(r):{baseLanes:x.baseLanes|r,cachePool:null,transitions:x.transitions},u.memoizedState=x,u.childLanes=e.childLanes&~r,t.memoizedState=Ba,l}return u=e.child,e=u.sibling,l=sn(u,{mode:"visible",children:l.children}),(t.mode&1)===0&&(l.lanes=r),l.return=t,l.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=l,t.memoizedState=null,l}function Ua(e,t){return t=nl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hs(e,t,r,l){return l!==null&&fa(l),Hn(t,e.child,null,r),e=Ua(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sm(e,t,r,l,o,u,x){if(r)return t.flags&256?(t.flags&=-257,l=za(Error(i(422))),Hs(e,t,x,l)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=l.fallback,o=t.mode,l=nl({mode:"visible",children:l.children},o,0,null),u=kn(u,o,x,null),u.flags|=2,l.return=t,u.return=t,l.sibling=u,t.child=l,(t.mode&1)!==0&&Hn(t,e.child,null,x),t.child.memoizedState=$a(x),t.memoizedState=Ba,u);if((t.mode&1)===0)return Hs(e,t,x,null);if(o.data==="$!"){if(l=o.nextSibling&&o.nextSibling.dataset,l)var p=l.dgst;return l=p,u=Error(i(419)),l=za(u,l,void 0),Hs(e,t,x,l)}if(p=(x&e.childLanes)!==0,Je||p){if(l=ze,l!==null){switch(x&-x){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(l.suspendedLanes|x))!==0?0:o,o!==0&&o!==u.retryLane&&(u.retryLane=o,Rt(e,o),wt(l,e,o,-1))}return si(),l=za(Error(i(421))),Hs(e,t,x,l)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Dm.bind(null,e),o._reactRetry=t,null):(e=u.treeContext,lt=Yt(o.nextSibling),st=t,we=!0,gt=null,e!==null&&(ot[ct++]=_t,ot[ct++]=It,ot[ct++]=fn,_t=e.id,It=e.overflow,fn=t),t=Ua(t,l.children),t.flags|=4096,t)}function au(e,t,r){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ya(e.return,t,r)}function Ha(e,t,r,l,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=l,u.tail=r,u.tailMode=o)}function iu(e,t,r){var l=t.pendingProps,o=l.revealOrder,u=l.tail;if(Ge(e,t,l.children,r),l=Ne.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&au(e,r,t);else if(e.tag===19)au(e,r,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}l&=1}if(pe(Ne,l),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&zs(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Ha(t,!1,o,r,u);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&zs(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Ha(t,!0,r,null,u);break;case"together":Ha(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),jn|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,r=sn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=sn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Cm(e,t,r){switch(t.tag){case 3:ru(t),Un();break;case 5:wc(t);break;case 1:Xe(t.type)&&Cs(t);break;case 4:Na(t,t.stateNode.containerInfo);break;case 10:var l=t.type._context,o=t.memoizedProps.value;pe(_s,l._currentValue),l._currentValue=o;break;case 13:if(l=t.memoizedState,l!==null)return l.dehydrated!==null?(pe(Ne,Ne.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?lu(e,t,r):(pe(Ne,Ne.current&1),e=zt(e,t,r),e!==null?e.sibling:null);pe(Ne,Ne.current&1);break;case 19:if(l=(r&t.childLanes)!==0,(e.flags&128)!==0){if(l)return iu(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pe(Ne,Ne.current),l)break;return null;case 22:case 23:return t.lanes=0,eu(e,t,r)}return zt(e,t,r)}var ou,Va,cu,uu;ou=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Va=function(){},cu=function(e,t,r,l){var o=e.memoizedProps;if(o!==l){e=t.stateNode,vn(kt.current);var u=null;switch(r){case"input":o=yl(e,o),l=yl(e,l),u=[];break;case"select":o=V({},o,{value:void 0}),l=V({},l,{value:void 0}),u=[];break;case"textarea":o=Nl(e,o),l=Nl(e,l),u=[];break;default:typeof o.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=bs)}kl(r,l);var x;r=null;for(C in o)if(!l.hasOwnProperty(C)&&o.hasOwnProperty(C)&&o[C]!=null)if(C==="style"){var p=o[C];for(x in p)p.hasOwnProperty(x)&&(r||(r={}),r[x]="")}else C!=="dangerouslySetInnerHTML"&&C!=="children"&&C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(d.hasOwnProperty(C)?u||(u=[]):(u=u||[]).push(C,null));for(C in l){var v=l[C];if(p=o?.[C],l.hasOwnProperty(C)&&v!==p&&(v!=null||p!=null))if(C==="style")if(p){for(x in p)!p.hasOwnProperty(x)||v&&v.hasOwnProperty(x)||(r||(r={}),r[x]="");for(x in v)v.hasOwnProperty(x)&&p[x]!==v[x]&&(r||(r={}),r[x]=v[x])}else r||(u||(u=[]),u.push(C,r)),r=v;else C==="dangerouslySetInnerHTML"?(v=v?v.__html:void 0,p=p?p.__html:void 0,v!=null&&p!==v&&(u=u||[]).push(C,v)):C==="children"?typeof v!="string"&&typeof v!="number"||(u=u||[]).push(C,""+v):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&(d.hasOwnProperty(C)?(v!=null&&C==="onScroll"&&ge("scroll",e),u||p===v||(u=[])):(u=u||[]).push(C,v))}r&&(u=u||[]).push("style",r);var C=u;(t.updateQueue=C)&&(t.flags|=4)}},uu=function(e,t,r,l){r!==l&&(t.flags|=4)};function Ar(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,l=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,l|=o.subtreeFlags&14680064,l|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=r,t}function Em(e,t,r){var l=t.pendingProps;switch(ma(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return Xe(t.type)&&Ss(),We(t),null;case 3:return l=t.stateNode,Qn(),ve(Ze),ve(He),Sa(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ts(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gt!==null&&(ti(gt),gt=null))),Va(e,t),We(t),null;case 5:ba(t);var o=vn(Rr.current);if(r=t.type,e!==null&&t.stateNode!=null)cu(e,t,r,l,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!l){if(t.stateNode===null)throw Error(i(166));return We(t),null}if(e=vn(kt.current),Ts(t)){l=t.stateNode,r=t.type;var u=t.memoizedProps;switch(l[bt]=t,l[Lr]=u,e=(t.mode&1)!==0,r){case"dialog":ge("cancel",l),ge("close",l);break;case"iframe":case"object":case"embed":ge("load",l);break;case"video":case"audio":for(o=0;o<Cr.length;o++)ge(Cr[o],l);break;case"source":ge("error",l);break;case"img":case"image":case"link":ge("error",l),ge("load",l);break;case"details":ge("toggle",l);break;case"input":Hi(l,u),ge("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!u.multiple},ge("invalid",l);break;case"textarea":Qi(l,u),ge("invalid",l)}kl(r,u),o=null;for(var x in u)if(u.hasOwnProperty(x)){var p=u[x];x==="children"?typeof p=="string"?l.textContent!==p&&(u.suppressHydrationWarning!==!0&&Ns(l.textContent,p,e),o=["children",p]):typeof p=="number"&&l.textContent!==""+p&&(u.suppressHydrationWarning!==!0&&Ns(l.textContent,p,e),o=["children",""+p]):d.hasOwnProperty(x)&&p!=null&&x==="onScroll"&&ge("scroll",l)}switch(r){case"input":qr(l),Wi(l,u,!0);break;case"textarea":qr(l),Gi(l);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(l.onclick=bs)}l=o,t.updateQueue=l,l!==null&&(t.flags|=4)}else{x=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ki(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=x.createElement(r,{is:l.is}):(e=x.createElement(r),r==="select"&&(x=e,l.multiple?x.multiple=!0:l.size&&(x.size=l.size))):e=x.createElementNS(e,r),e[bt]=t,e[Lr]=l,ou(e,t,!1,!1),t.stateNode=e;e:{switch(x=Sl(r,l),r){case"dialog":ge("cancel",e),ge("close",e),o=l;break;case"iframe":case"object":case"embed":ge("load",e),o=l;break;case"video":case"audio":for(o=0;o<Cr.length;o++)ge(Cr[o],e);o=l;break;case"source":ge("error",e),o=l;break;case"img":case"image":case"link":ge("error",e),ge("load",e),o=l;break;case"details":ge("toggle",e),o=l;break;case"input":Hi(e,l),o=yl(e,l),ge("invalid",e);break;case"option":o=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},o=V({},l,{value:void 0}),ge("invalid",e);break;case"textarea":Qi(e,l),o=Nl(e,l),ge("invalid",e);break;default:o=l}kl(r,o),p=o;for(u in p)if(p.hasOwnProperty(u)){var v=p[u];u==="style"?Ji(e,v):u==="dangerouslySetInnerHTML"?(v=v?v.__html:void 0,v!=null&&Zi(e,v)):u==="children"?typeof v=="string"?(r!=="textarea"||v!=="")&&ir(e,v):typeof v=="number"&&ir(e,""+v):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?v!=null&&u==="onScroll"&&ge("scroll",e):v!=null&&A(e,u,v,x))}switch(r){case"input":qr(e),Wi(e,l,!1);break;case"textarea":qr(e),Gi(e);break;case"option":l.value!=null&&e.setAttribute("value",""+ce(l.value));break;case"select":e.multiple=!!l.multiple,u=l.value,u!=null?En(e,!!l.multiple,u,!1):l.defaultValue!=null&&En(e,!!l.multiple,l.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=bs)}switch(r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return We(t),null;case 6:if(e&&t.stateNode!=null)uu(e,t,e.memoizedProps,l);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(r=vn(Rr.current),vn(kt.current),Ts(t)){if(l=t.stateNode,r=t.memoizedProps,l[bt]=t,(u=l.nodeValue!==r)&&(e=st,e!==null))switch(e.tag){case 3:Ns(l.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ns(l.nodeValue,r,(e.mode&1)!==0)}u&&(t.flags|=4)}else l=(r.nodeType===9?r:r.ownerDocument).createTextNode(l),l[bt]=t,t.stateNode=l}return We(t),null;case 13:if(ve(Ne),l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(we&<!==null&&(t.mode&1)!==0&&(t.flags&128)===0)hc(),Un(),t.flags|=98560,u=!1;else if(u=Ts(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(i(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(i(317));u[bt]=t}else Un(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),u=!1}else gt!==null&&(ti(gt),gt=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ne.current&1)!==0?Re===0&&(Re=3):si())),t.updateQueue!==null&&(t.flags|=4),We(t),null);case 4:return Qn(),Va(e,t),e===null&&Er(t.stateNode.containerInfo),We(t),null;case 10:return va(t.type._context),We(t),null;case 17:return Xe(t.type)&&Ss(),We(t),null;case 19:if(ve(Ne),u=t.memoizedState,u===null)return We(t),null;if(l=(t.flags&128)!==0,x=u.rendering,x===null)if(l)Ar(u,!1);else{if(Re!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(x=zs(e),x!==null){for(t.flags|=128,Ar(u,!1),l=x.updateQueue,l!==null&&(t.updateQueue=l,t.flags|=4),t.subtreeFlags=0,l=r,r=t.child;r!==null;)u=r,e=l,u.flags&=14680066,x=u.alternate,x===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=x.childLanes,u.lanes=x.lanes,u.child=x.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=x.memoizedProps,u.memoizedState=x.memoizedState,u.updateQueue=x.updateQueue,u.type=x.type,e=x.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return pe(Ne,Ne.current&1|2),t.child}e=e.sibling}u.tail!==null&&Ee()>Zn&&(t.flags|=128,l=!0,Ar(u,!1),t.lanes=4194304)}else{if(!l)if(e=zs(x),e!==null){if(t.flags|=128,l=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ar(u,!0),u.tail===null&&u.tailMode==="hidden"&&!x.alternate&&!we)return We(t),null}else 2*Ee()-u.renderingStartTime>Zn&&r!==1073741824&&(t.flags|=128,l=!0,Ar(u,!1),t.lanes=4194304);u.isBackwards?(x.sibling=t.child,t.child=x):(r=u.last,r!==null?r.sibling=x:t.child=x,u.last=x)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ee(),t.sibling=null,r=Ne.current,pe(Ne,l?r&1|2:r&1),t):(We(t),null);case 22:case 23:return ri(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(at&1073741824)!==0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Pm(e,t){switch(ma(t),t.tag){case 1:return Xe(t.type)&&Ss(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(),ve(Ze),ve(He),Sa(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ba(t),null;case 13:if(ve(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(Ne),null;case 4:return Qn(),null;case 10:return va(t.type._context),null;case 22:case 23:return ri(),null;case 24:return null;default:return null}}var Ws=!1,Qe=!1,Lm=typeof WeakSet=="function"?WeakSet:Set,H=null;function Gn(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){ke(e,t,l)}else r.current=null}function Wa(e,t,r){try{r()}catch(l){ke(e,t,l)}}var du=!1;function Tm(e,t){if(ra=ds,e=Ho(),Kl(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var o=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{r.nodeType,u.nodeType}catch{r=null;break e}var x=0,p=-1,v=-1,C=0,z=0,F=e,_=null;t:for(;;){for(var U;F!==r||o!==0&&F.nodeType!==3||(p=x+o),F!==u||l!==0&&F.nodeType!==3||(v=x+l),F.nodeType===3&&(x+=F.nodeValue.length),(U=F.firstChild)!==null;)_=F,F=U;for(;;){if(F===e)break t;if(_===r&&++C===o&&(p=x),_===u&&++z===l&&(v=x),(U=F.nextSibling)!==null)break;F=_,_=F.parentNode}F=U}r=p===-1||v===-1?null:{start:p,end:v}}else r=null}r=r||{start:0,end:0}}else r=null;for(sa={focusedElem:e,selectionRange:r},ds=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var W=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var Q=W.memoizedProps,Pe=W.memoizedState,N=t.stateNode,y=N.getSnapshotBeforeUpdate(t.elementType===t.type?Q:vt(t.type,Q),Pe);N.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(D){ke(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return W=du,du=!1,W}function Br(e,t,r){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var o=l=l.next;do{if((o.tag&e)===e){var u=o.destroy;o.destroy=void 0,u!==void 0&&Wa(t,r,u)}o=o.next}while(o!==l)}}function Qs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var l=r.create;r.destroy=l()}r=r.next}while(r!==t)}}function Qa(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function mu(e){var t=e.alternate;t!==null&&(e.alternate=null,mu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bt],delete t[Lr],delete t[oa],delete t[mm],delete t[hm])),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 hu(e){return e.tag===5||e.tag===3||e.tag===4}function xu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hu(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 Ya(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=bs));else if(l!==4&&(e=e.child,e!==null))for(Ya(e,t,r),e=e.sibling;e!==null;)Ya(e,t,r),e=e.sibling}function Ga(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Ga(e,t,r),e=e.sibling;e!==null;)Ga(e,t,r),e=e.sibling}var Be=null,yt=!1;function qt(e,t,r){for(r=r.child;r!==null;)fu(e,t,r),r=r.sibling}function fu(e,t,r){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(ls,r)}catch{}switch(r.tag){case 5:Qe||Gn(r,t);case 6:var l=Be,o=yt;Be=null,qt(e,t,r),Be=l,yt=o,Be!==null&&(yt?(e=Be,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Be.removeChild(r.stateNode));break;case 18:Be!==null&&(yt?(e=Be,r=r.stateNode,e.nodeType===8?ia(e.parentNode,r):e.nodeType===1&&ia(e,r),vr(e)):ia(Be,r.stateNode));break;case 4:l=Be,o=yt,Be=r.stateNode.containerInfo,yt=!0,qt(e,t,r),Be=l,yt=o;break;case 0:case 11:case 14:case 15:if(!Qe&&(l=r.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){o=l=l.next;do{var u=o,x=u.destroy;u=u.tag,x!==void 0&&((u&2)!==0||(u&4)!==0)&&Wa(r,t,x),o=o.next}while(o!==l)}qt(e,t,r);break;case 1:if(!Qe&&(Gn(r,t),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(p){ke(r,t,p)}qt(e,t,r);break;case 21:qt(e,t,r);break;case 22:r.mode&1?(Qe=(l=Qe)||r.memoizedState!==null,qt(e,t,r),Qe=l):qt(e,t,r);break;default:qt(e,t,r)}}function pu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Lm),t.forEach(function(l){var o=Am.bind(null,e,l);r.has(l)||(r.add(l),l.then(o,o))})}}function jt(e,t){var r=t.deletions;if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];try{var u=e,x=t,p=x;e:for(;p!==null;){switch(p.tag){case 5:Be=p.stateNode,yt=!1;break e;case 3:Be=p.stateNode.containerInfo,yt=!0;break e;case 4:Be=p.stateNode.containerInfo,yt=!0;break e}p=p.return}if(Be===null)throw Error(i(160));fu(u,x,o),Be=null,yt=!1;var v=o.alternate;v!==null&&(v.return=null),o.return=null}catch(C){ke(o,t,C)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gu(t,e),t=t.sibling}function gu(e,t){var r=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jt(t,e),Ct(e),l&4){try{Br(3,e,e.return),Qs(3,e)}catch(Q){ke(e,e.return,Q)}try{Br(5,e,e.return)}catch(Q){ke(e,e.return,Q)}}break;case 1:jt(t,e),Ct(e),l&512&&r!==null&&Gn(r,r.return);break;case 5:if(jt(t,e),Ct(e),l&512&&r!==null&&Gn(r,r.return),e.flags&32){var o=e.stateNode;try{ir(o,"")}catch(Q){ke(e,e.return,Q)}}if(l&4&&(o=e.stateNode,o!=null)){var u=e.memoizedProps,x=r!==null?r.memoizedProps:u,p=e.type,v=e.updateQueue;if(e.updateQueue=null,v!==null)try{p==="input"&&u.type==="radio"&&u.name!=null&&Vi(o,u),Sl(p,x);var C=Sl(p,u);for(x=0;x<v.length;x+=2){var z=v[x],F=v[x+1];z==="style"?Ji(o,F):z==="dangerouslySetInnerHTML"?Zi(o,F):z==="children"?ir(o,F):A(o,z,F,C)}switch(p){case"input":jl(o,u);break;case"textarea":Yi(o,u);break;case"select":var _=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!u.multiple;var U=u.value;U!=null?En(o,!!u.multiple,U,!1):_!==!!u.multiple&&(u.defaultValue!=null?En(o,!!u.multiple,u.defaultValue,!0):En(o,!!u.multiple,u.multiple?[]:"",!1))}o[Lr]=u}catch(Q){ke(e,e.return,Q)}}break;case 6:if(jt(t,e),Ct(e),l&4){if(e.stateNode===null)throw Error(i(162));o=e.stateNode,u=e.memoizedProps;try{o.nodeValue=u}catch(Q){ke(e,e.return,Q)}}break;case 3:if(jt(t,e),Ct(e),l&4&&r!==null&&r.memoizedState.isDehydrated)try{vr(t.containerInfo)}catch(Q){ke(e,e.return,Q)}break;case 4:jt(t,e),Ct(e);break;case 13:jt(t,e),Ct(e),o=e.child,o.flags&8192&&(u=o.memoizedState!==null,o.stateNode.isHidden=u,!u||o.alternate!==null&&o.alternate.memoizedState!==null||(Xa=Ee())),l&4&&pu(e);break;case 22:if(z=r!==null&&r.memoizedState!==null,e.mode&1?(Qe=(C=Qe)||z,jt(t,e),Qe=C):jt(t,e),Ct(e),l&8192){if(C=e.memoizedState!==null,(e.stateNode.isHidden=C)&&!z&&(e.mode&1)!==0)for(H=e,z=e.child;z!==null;){for(F=H=z;H!==null;){switch(_=H,U=_.child,_.tag){case 0:case 11:case 14:case 15:Br(4,_,_.return);break;case 1:Gn(_,_.return);var W=_.stateNode;if(typeof W.componentWillUnmount=="function"){l=_,r=_.return;try{t=l,W.props=t.memoizedProps,W.state=t.memoizedState,W.componentWillUnmount()}catch(Q){ke(l,r,Q)}}break;case 5:Gn(_,_.return);break;case 22:if(_.memoizedState!==null){ju(F);continue}}U!==null?(U.return=_,H=U):ju(F)}z=z.sibling}e:for(z=null,F=e;;){if(F.tag===5){if(z===null){z=F;try{o=F.stateNode,C?(u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(p=F.stateNode,v=F.memoizedProps.style,x=v!=null&&v.hasOwnProperty("display")?v.display:null,p.style.display=Xi("display",x))}catch(Q){ke(e,e.return,Q)}}}else if(F.tag===6){if(z===null)try{F.stateNode.nodeValue=C?"":F.memoizedProps}catch(Q){ke(e,e.return,Q)}}else if((F.tag!==22&&F.tag!==23||F.memoizedState===null||F===e)&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===e)break e;for(;F.sibling===null;){if(F.return===null||F.return===e)break e;z===F&&(z=null),F=F.return}z===F&&(z=null),F.sibling.return=F.return,F=F.sibling}}break;case 19:jt(t,e),Ct(e),l&4&&pu(e);break;case 21:break;default:jt(t,e),Ct(e)}}function Ct(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(hu(r)){var l=r;break e}r=r.return}throw Error(i(160))}switch(l.tag){case 5:var o=l.stateNode;l.flags&32&&(ir(o,""),l.flags&=-33);var u=xu(e);Ga(e,u,o);break;case 3:case 4:var x=l.stateNode.containerInfo,p=xu(e);Ya(e,p,x);break;default:throw Error(i(161))}}catch(v){ke(e,e.return,v)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mm(e,t,r){H=e,vu(e)}function vu(e,t,r){for(var l=(e.mode&1)!==0;H!==null;){var o=H,u=o.child;if(o.tag===22&&l){var x=o.memoizedState!==null||Ws;if(!x){var p=o.alternate,v=p!==null&&p.memoizedState!==null||Qe;p=Ws;var C=Qe;if(Ws=x,(Qe=v)&&!C)for(H=o;H!==null;)x=H,v=x.child,x.tag===22&&x.memoizedState!==null?wu(o):v!==null?(v.return=x,H=v):wu(o);for(;u!==null;)H=u,vu(u),u=u.sibling;H=o,Ws=p,Qe=C}yu(e)}else(o.subtreeFlags&8772)!==0&&u!==null?(u.return=o,H=u):yu(e)}}function yu(e){for(;H!==null;){var t=H;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Qe||Qs(5,t);break;case 1:var l=t.stateNode;if(t.flags&4&&!Qe)if(r===null)l.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:vt(t.type,r.memoizedProps);l.componentDidUpdate(o,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&jc(t,u,l);break;case 3:var x=t.updateQueue;if(x!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}jc(t,x,r)}break;case 5:var p=t.stateNode;if(r===null&&t.flags&4){r=p;var v=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":v.autoFocus&&r.focus();break;case"img":v.src&&(r.src=v.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var C=t.alternate;if(C!==null){var z=C.memoizedState;if(z!==null){var F=z.dehydrated;F!==null&&vr(F)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}Qe||t.flags&512&&Qa(t)}catch(_){ke(t,t.return,_)}}if(t===e){H=null;break}if(r=t.sibling,r!==null){r.return=t.return,H=r;break}H=t.return}}function ju(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var r=t.sibling;if(r!==null){r.return=t.return,H=r;break}H=t.return}}function wu(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Qs(4,t)}catch(v){ke(t,r,v)}break;case 1:var l=t.stateNode;if(typeof l.componentDidMount=="function"){var o=t.return;try{l.componentDidMount()}catch(v){ke(t,o,v)}}var u=t.return;try{Qa(t)}catch(v){ke(t,u,v)}break;case 5:var x=t.return;try{Qa(t)}catch(v){ke(t,x,v)}}}catch(v){ke(t,t.return,v)}if(t===e){H=null;break}var p=t.sibling;if(p!==null){p.return=t.return,H=p;break}H=t.return}}var _m=Math.ceil,Ys=G.ReactCurrentDispatcher,Ka=G.ReactCurrentOwner,mt=G.ReactCurrentBatchConfig,le=0,ze=null,Te=null,$e=0,at=0,Kn=Gt(0),Re=0,$r=null,jn=0,Gs=0,Za=0,Ur=null,qe=null,Xa=0,Zn=1/0,Ft=null,Ks=!1,Ja=null,en=null,Zs=!1,tn=null,Xs=0,Hr=0,qa=null,Js=-1,qs=0;function Ke(){return(le&6)!==0?Ee():Js!==-1?Js:Js=Ee()}function nn(e){return(e.mode&1)===0?1:(le&2)!==0&&$e!==0?$e&-$e:fm.transition!==null?(qs===0&&(qs=xo()),qs):(e=ue,e!==0||(e=window.event,e=e===void 0?16:bo(e.type)),e)}function wt(e,t,r,l){if(50<Hr)throw Hr=0,qa=null,Error(i(185));hr(e,r,l),((le&2)===0||e!==ze)&&(e===ze&&((le&2)===0&&(Gs|=r),Re===4&&rn(e,$e)),et(e,l),r===1&&le===0&&(t.mode&1)===0&&(Zn=Ee()+500,Es&&Zt()))}function et(e,t){var r=e.callbackNode;f0(e,t);var l=os(e,e===ze?$e:0);if(l===0)r!==null&&uo(r),e.callbackNode=null,e.callbackPriority=0;else if(t=l&-l,e.callbackPriority!==t){if(r!=null&&uo(r),t===1)e.tag===0?xm(bu.bind(null,e)):oc(bu.bind(null,e)),um(function(){(le&6)===0&&Zt()}),r=null;else{switch(fo(l)){case 1:r=_l;break;case 4:r=mo;break;case 16:r=ss;break;case 536870912:r=ho;break;default:r=ss}r=Mu(r,Nu.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Nu(e,t){if(Js=-1,qs=0,(le&6)!==0)throw Error(i(327));var r=e.callbackNode;if(Xn()&&e.callbackNode!==r)return null;var l=os(e,e===ze?$e:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||t)t=el(e,l);else{t=l;var o=le;le|=2;var u=Su();(ze!==e||$e!==t)&&(Ft=null,Zn=Ee()+500,Nn(e,t));do try{Om();break}catch(p){ku(e,p)}while(!0);ga(),Ys.current=u,le=o,Te!==null?t=0:(ze=null,$e=0,t=Re)}if(t!==0){if(t===2&&(o=Il(e),o!==0&&(l=o,t=ei(e,o))),t===1)throw r=$r,Nn(e,0),rn(e,l),et(e,Ee()),r;if(t===6)rn(e,l);else{if(o=e.current.alternate,(l&30)===0&&!Im(o)&&(t=el(e,l),t===2&&(u=Il(e),u!==0&&(l=u,t=ei(e,u))),t===1))throw r=$r,Nn(e,0),rn(e,l),et(e,Ee()),r;switch(e.finishedWork=o,e.finishedLanes=l,t){case 0:case 1:throw Error(i(345));case 2:bn(e,qe,Ft);break;case 3:if(rn(e,l),(l&130023424)===l&&(t=Xa+500-Ee(),10<t)){if(os(e,0)!==0)break;if(o=e.suspendedLanes,(o&l)!==l){Ke(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=aa(bn.bind(null,e,qe,Ft),t);break}bn(e,qe,Ft);break;case 4:if(rn(e,l),(l&4194240)===l)break;for(t=e.eventTimes,o=-1;0<l;){var x=31-ft(l);u=1<<x,x=t[x],x>o&&(o=x),l&=~u}if(l=o,l=Ee()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*_m(l/1960))-l,10<l){e.timeoutHandle=aa(bn.bind(null,e,qe,Ft),l);break}bn(e,qe,Ft);break;case 5:bn(e,qe,Ft);break;default:throw Error(i(329))}}}return et(e,Ee()),e.callbackNode===r?Nu.bind(null,e):null}function ei(e,t){var r=Ur;return e.current.memoizedState.isDehydrated&&(Nn(e,t).flags|=256),e=el(e,t),e!==2&&(t=qe,qe=r,t!==null&&ti(t)),e}function ti(e){qe===null?qe=e:qe.push.apply(qe,e)}function Im(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var l=0;l<r.length;l++){var o=r[l],u=o.getSnapshot;o=o.value;try{if(!pt(u(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 rn(e,t){for(t&=~Za,t&=~Gs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-ft(t),l=1<<r;e[r]=-1,t&=~l}}function bu(e){if((le&6)!==0)throw Error(i(327));Xn();var t=os(e,0);if((t&1)===0)return et(e,Ee()),null;var r=el(e,t);if(e.tag!==0&&r===2){var l=Il(e);l!==0&&(t=l,r=ei(e,l))}if(r===1)throw r=$r,Nn(e,0),rn(e,t),et(e,Ee()),r;if(r===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bn(e,qe,Ft),et(e,Ee()),null}function ni(e,t){var r=le;le|=1;try{return e(t)}finally{le=r,le===0&&(Zn=Ee()+500,Es&&Zt())}}function wn(e){tn!==null&&tn.tag===0&&(le&6)===0&&Xn();var t=le;le|=1;var r=mt.transition,l=ue;try{if(mt.transition=null,ue=1,e)return e()}finally{ue=l,mt.transition=r,le=t,(le&6)===0&&Zt()}}function ri(){at=Kn.current,ve(Kn)}function Nn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,cm(r)),Te!==null)for(r=Te.return;r!==null;){var l=r;switch(ma(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&Ss();break;case 3:Qn(),ve(Ze),ve(He),Sa();break;case 5:ba(l);break;case 4:Qn();break;case 13:ve(Ne);break;case 19:ve(Ne);break;case 10:va(l.type._context);break;case 22:case 23:ri()}r=r.return}if(ze=e,Te=e=sn(e.current,null),$e=at=t,Re=0,$r=null,Za=Gs=jn=0,qe=Ur=null,gn!==null){for(t=0;t<gn.length;t++)if(r=gn[t],l=r.interleaved,l!==null){r.interleaved=null;var o=l.next,u=r.pending;if(u!==null){var x=u.next;u.next=o,l.next=x}r.pending=l}gn=null}return e}function ku(e,t){do{var r=Te;try{if(ga(),Fs.current=$s,Ds){for(var l=be.memoizedState;l!==null;){var o=l.queue;o!==null&&(o.pending=null),l=l.next}Ds=!1}if(yn=0,Oe=Ie=be=null,Or=!1,zr=0,Ka.current=null,r===null||r.return===null){Re=1,$r=t,Te=null;break}e:{var u=e,x=r.return,p=r,v=t;if(t=$e,p.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){var C=v,z=p,F=z.tag;if((z.mode&1)===0&&(F===0||F===11||F===15)){var _=z.alternate;_?(z.updateQueue=_.updateQueue,z.memoizedState=_.memoizedState,z.lanes=_.lanes):(z.updateQueue=null,z.memoizedState=null)}var U=Kc(x);if(U!==null){U.flags&=-257,Zc(U,x,p,u,t),U.mode&1&&Gc(u,C,t),t=U,v=C;var W=t.updateQueue;if(W===null){var Q=new Set;Q.add(v),t.updateQueue=Q}else W.add(v);break e}else{if((t&1)===0){Gc(u,C,t),si();break e}v=Error(i(426))}}else if(we&&p.mode&1){var Pe=Kc(x);if(Pe!==null){(Pe.flags&65536)===0&&(Pe.flags|=256),Zc(Pe,x,p,u,t),fa(Yn(v,p));break e}}u=v=Yn(v,p),Re!==4&&(Re=2),Ur===null?Ur=[u]:Ur.push(u),u=x;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var N=Qc(u,v,t);yc(u,N);break e;case 1:p=v;var y=u.type,k=u.stateNode;if((u.flags&128)===0&&(typeof y.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(en===null||!en.has(k)))){u.flags|=65536,t&=-t,u.lanes|=t;var D=Yc(u,p,t);yc(u,D);break e}}u=u.return}while(u!==null)}Eu(r)}catch(Y){t=Y,Te===r&&r!==null&&(Te=r=r.return);continue}break}while(!0)}function Su(){var e=Ys.current;return Ys.current=$s,e===null?$s:e}function si(){(Re===0||Re===3||Re===2)&&(Re=4),ze===null||(jn&268435455)===0&&(Gs&268435455)===0||rn(ze,$e)}function el(e,t){var r=le;le|=2;var l=Su();(ze!==e||$e!==t)&&(Ft=null,Nn(e,t));do try{Rm();break}catch(o){ku(e,o)}while(!0);if(ga(),le=r,Ys.current=l,Te!==null)throw Error(i(261));return ze=null,$e=0,Re}function Rm(){for(;Te!==null;)Cu(Te)}function Om(){for(;Te!==null&&!a0();)Cu(Te)}function Cu(e){var t=Tu(e.alternate,e,at);e.memoizedProps=e.pendingProps,t===null?Eu(e):Te=t,Ka.current=null}function Eu(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Em(r,t,at),r!==null){Te=r;return}}else{if(r=Pm(r,t),r!==null){r.flags&=32767,Te=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Re=6,Te=null;return}}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);Re===0&&(Re=5)}function bn(e,t,r){var l=ue,o=mt.transition;try{mt.transition=null,ue=1,zm(e,t,r,l)}finally{mt.transition=o,ue=l}return null}function zm(e,t,r,l){do Xn();while(tn!==null);if((le&6)!==0)throw Error(i(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var u=r.lanes|r.childLanes;if(p0(e,u),e===ze&&(Te=ze=null,$e=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Zs||(Zs=!0,Mu(ss,function(){return Xn(),null})),u=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||u){u=mt.transition,mt.transition=null;var x=ue;ue=1;var p=le;le|=4,Ka.current=null,Tm(e,r),gu(r,e),nm(sa),ds=!!ra,sa=ra=null,e.current=r,Mm(r),i0(),le=p,ue=x,mt.transition=u}else e.current=r;if(Zs&&(Zs=!1,tn=e,Xs=o),u=e.pendingLanes,u===0&&(en=null),u0(r.stateNode),et(e,Ee()),t!==null)for(l=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],l(o.value,{componentStack:o.stack,digest:o.digest});if(Ks)throw Ks=!1,e=Ja,Ja=null,e;return(Xs&1)!==0&&e.tag!==0&&Xn(),u=e.pendingLanes,(u&1)!==0?e===qa?Hr++:(Hr=0,qa=e):Hr=0,Zt(),null}function Xn(){if(tn!==null){var e=fo(Xs),t=mt.transition,r=ue;try{if(mt.transition=null,ue=16>e?16:e,tn===null)var l=!1;else{if(e=tn,tn=null,Xs=0,(le&6)!==0)throw Error(i(331));var o=le;for(le|=4,H=e.current;H!==null;){var u=H,x=u.child;if((H.flags&16)!==0){var p=u.deletions;if(p!==null){for(var v=0;v<p.length;v++){var C=p[v];for(H=C;H!==null;){var z=H;switch(z.tag){case 0:case 11:case 15:Br(8,z,u)}var F=z.child;if(F!==null)F.return=z,H=F;else for(;H!==null;){z=H;var _=z.sibling,U=z.return;if(mu(z),z===C){H=null;break}if(_!==null){_.return=U,H=_;break}H=U}}}var W=u.alternate;if(W!==null){var Q=W.child;if(Q!==null){W.child=null;do{var Pe=Q.sibling;Q.sibling=null,Q=Pe}while(Q!==null)}}H=u}}if((u.subtreeFlags&2064)!==0&&x!==null)x.return=u,H=x;else e:for(;H!==null;){if(u=H,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:Br(9,u,u.return)}var N=u.sibling;if(N!==null){N.return=u.return,H=N;break e}H=u.return}}var y=e.current;for(H=y;H!==null;){x=H;var k=x.child;if((x.subtreeFlags&2064)!==0&&k!==null)k.return=x,H=k;else e:for(x=y;H!==null;){if(p=H,(p.flags&2048)!==0)try{switch(p.tag){case 0:case 11:case 15:Qs(9,p)}}catch(Y){ke(p,p.return,Y)}if(p===x){H=null;break e}var D=p.sibling;if(D!==null){D.return=p.return,H=D;break e}H=p.return}}if(le=o,Zt(),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(ls,e)}catch{}l=!0}return l}finally{ue=r,mt.transition=t}}return!1}function Pu(e,t,r){t=Yn(r,t),t=Qc(e,t,1),e=Jt(e,t,1),t=Ke(),e!==null&&(hr(e,1,t),et(e,t))}function ke(e,t,r){if(e.tag===3)Pu(e,e,r);else for(;t!==null;){if(t.tag===3){Pu(t,e,r);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(en===null||!en.has(l))){e=Yn(r,e),e=Yc(t,e,1),t=Jt(t,e,1),e=Ke(),t!==null&&(hr(t,1,e),et(t,e));break}}t=t.return}}function Fm(e,t,r){var l=e.pingCache;l!==null&&l.delete(t),t=Ke(),e.pingedLanes|=e.suspendedLanes&r,ze===e&&($e&r)===r&&(Re===4||Re===3&&($e&130023424)===$e&&500>Ee()-Xa?Nn(e,0):Za|=r),et(e,t)}function Lu(e,t){t===0&&((e.mode&1)===0?t=1:(t=is,is<<=1,(is&130023424)===0&&(is=4194304)));var r=Ke();e=Rt(e,t),e!==null&&(hr(e,t,r),et(e,r))}function Dm(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Lu(e,r)}function Am(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(t),Lu(e,r)}var Tu;Tu=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Je=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Je=!1,Cm(e,t,r);Je=(e.flags&131072)!==0}else Je=!1,we&&(t.flags&1048576)!==0&&cc(t,Ls,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Vs(e,t),e=t.pendingProps;var o=An(t,He.current);Wn(t,r),o=Pa(null,t,l,e,o,r);var u=La();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xe(l)?(u=!0,Cs(t)):u=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,wa(t),o.updater=Us,t.stateNode=o,o._reactInternals=t,Oa(t,l,e,r),t=Aa(null,t,l,!0,u,r)):(t.tag=0,we&&u&&da(t),Ge(null,t,o,r),t=t.child),t;case 16:l=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=l._init,l=o(l._payload),t.type=l,o=t.tag=$m(l),e=vt(l,e),o){case 0:t=Da(null,t,l,e,r);break e;case 1:t=nu(null,t,l,e,r);break e;case 11:t=Xc(null,t,l,e,r);break e;case 14:t=Jc(null,t,l,vt(l.type,e),r);break e}throw Error(i(306,l,""))}return t;case 0:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:vt(l,o),Da(e,t,l,o,r);case 1:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:vt(l,o),nu(e,t,l,o,r);case 3:e:{if(ru(t),e===null)throw Error(i(387));l=t.pendingProps,u=t.memoizedState,o=u.element,vc(e,t),Os(t,l,null,r);var x=t.memoizedState;if(l=x.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){o=Yn(Error(i(423)),t),t=su(e,t,l,r,o);break e}else if(l!==o){o=Yn(Error(i(424)),t),t=su(e,t,l,r,o);break e}else for(lt=Yt(t.stateNode.containerInfo.firstChild),st=t,we=!0,gt=null,r=pc(t,null,l,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Un(),l===o){t=zt(e,t,r);break e}Ge(e,t,l,r)}t=t.child}return t;case 5:return wc(t),e===null&&xa(t),l=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,x=o.children,la(l,o)?x=null:u!==null&&la(l,u)&&(t.flags|=32),tu(e,t),Ge(e,t,x,r),t.child;case 6:return e===null&&xa(t),null;case 13:return lu(e,t,r);case 4:return Na(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Hn(t,null,l,r):Ge(e,t,l,r),t.child;case 11:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:vt(l,o),Xc(e,t,l,o,r);case 7:return Ge(e,t,t.pendingProps,r),t.child;case 8:return Ge(e,t,t.pendingProps.children,r),t.child;case 12:return Ge(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,o=t.pendingProps,u=t.memoizedProps,x=o.value,pe(_s,l._currentValue),l._currentValue=x,u!==null)if(pt(u.value,x)){if(u.children===o.children&&!Ze.current){t=zt(e,t,r);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var p=u.dependencies;if(p!==null){x=u.child;for(var v=p.firstContext;v!==null;){if(v.context===l){if(u.tag===1){v=Ot(-1,r&-r),v.tag=2;var C=u.updateQueue;if(C!==null){C=C.shared;var z=C.pending;z===null?v.next=v:(v.next=z.next,z.next=v),C.pending=v}}u.lanes|=r,v=u.alternate,v!==null&&(v.lanes|=r),ya(u.return,r,t),p.lanes|=r;break}v=v.next}}else if(u.tag===10)x=u.type===t.type?null:u.child;else if(u.tag===18){if(x=u.return,x===null)throw Error(i(341));x.lanes|=r,p=x.alternate,p!==null&&(p.lanes|=r),ya(x,r,t),x=u.sibling}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===t){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}Ge(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,l=t.pendingProps.children,Wn(t,r),o=ut(o),l=l(o),t.flags|=1,Ge(e,t,l,r),t.child;case 14:return l=t.type,o=vt(l,t.pendingProps),o=vt(l.type,o),Jc(e,t,l,o,r);case 15:return qc(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,o=t.pendingProps,o=t.elementType===l?o:vt(l,o),Vs(e,t),t.tag=1,Xe(l)?(e=!0,Cs(t)):e=!1,Wn(t,r),Vc(t,l,o),Oa(t,l,o,r),Aa(null,t,l,!0,e,r);case 19:return iu(e,t,r);case 22:return eu(e,t,r)}throw Error(i(156,t.tag))};function Mu(e,t){return co(e,t)}function Bm(e,t,r,l){this.tag=e,this.key=r,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ht(e,t,r,l){return new Bm(e,t,r,l)}function li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $m(e){if(typeof e=="function")return li(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_e)return 11;if(e===Ae)return 14}return 2}function sn(e,t){var r=e.alternate;return r===null?(r=ht(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function tl(e,t,r,l,o,u){var x=2;if(l=e,typeof e=="function")li(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case J:return kn(r.children,o,u,t);case de:x=8,o|=8;break;case Ue:return e=ht(12,r,t,o|2),e.elementType=Ue,e.lanes=u,e;case Se:return e=ht(13,r,t,o),e.elementType=Se,e.lanes=u,e;case xe:return e=ht(19,r,t,o),e.elementType=xe,e.lanes=u,e;case ye:return nl(r,o,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case he:x=10;break e;case Me:x=9;break e;case _e:x=11;break e;case Ae:x=14;break e;case Ce:x=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=ht(x,r,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function kn(e,t,r,l){return e=ht(7,e,l,t),e.lanes=r,e}function nl(e,t,r,l){return e=ht(22,e,l,t),e.elementType=ye,e.lanes=r,e.stateNode={isHidden:!1},e}function ai(e,t,r){return e=ht(6,e,null,t),e.lanes=r,e}function ii(e,t,r){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Um(e,t,r,l,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rl(0),this.expirationTimes=Rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rl(0),this.identifierPrefix=l,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function oi(e,t,r,l,o,u,x,p,v){return e=new Um(e,t,r,p,v),t===1?(t=1,u===!0&&(t|=8)):t=0,u=ht(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:l,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},wa(u),e}function Hm(e,t,r){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:me,key:l==null?null:""+l,children:e,containerInfo:t,implementation:r}}function _u(e){if(!e)return Kt;e=e._reactInternals;e:{if(mn(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var r=e.type;if(Xe(r))return ac(e,r,t)}return t}function Iu(e,t,r,l,o,u,x,p,v){return e=oi(r,l,!0,e,o,u,x,p,v),e.context=_u(null),r=e.current,l=Ke(),o=nn(r),u=Ot(l,o),u.callback=t??null,Jt(r,u,o),e.current.lanes=o,hr(e,o,l),et(e,l),e}function rl(e,t,r,l){var o=t.current,u=Ke(),x=nn(o);return r=_u(r),t.context===null?t.context=r:t.pendingContext=r,t=Ot(u,x),t.payload={element:e},l=l===void 0?null:l,l!==null&&(t.callback=l),e=Jt(o,t,x),e!==null&&(wt(e,o,x,u),Rs(e,o,x)),x}function sl(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Ru(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function ci(e,t){Ru(e,t),(e=e.alternate)&&Ru(e,t)}function Vm(){return null}var Ou=typeof reportError=="function"?reportError:function(e){console.error(e)};function ui(e){this._internalRoot=e}ll.prototype.render=ui.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));rl(e,t,null,null)},ll.prototype.unmount=ui.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wn(function(){rl(null,e,null,null)}),t[Tt]=null}};function ll(e){this._internalRoot=e}ll.prototype.unstable_scheduleHydration=function(e){if(e){var t=vo();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Vt.length&&t!==0&&t<Vt[r].priority;r++);Vt.splice(r,0,e),r===0&&wo(e)}};function di(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function al(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zu(){}function Wm(e,t,r,l,o){if(o){if(typeof l=="function"){var u=l;l=function(){var C=sl(x);u.call(C)}}var x=Iu(t,l,e,0,null,!1,!1,"",zu);return e._reactRootContainer=x,e[Tt]=x.current,Er(e.nodeType===8?e.parentNode:e),wn(),x}for(;o=e.lastChild;)e.removeChild(o);if(typeof l=="function"){var p=l;l=function(){var C=sl(v);p.call(C)}}var v=oi(e,0,!1,null,null,!1,!1,"",zu);return e._reactRootContainer=v,e[Tt]=v.current,Er(e.nodeType===8?e.parentNode:e),wn(function(){rl(t,v,r,l)}),v}function il(e,t,r,l,o){var u=r._reactRootContainer;if(u){var x=u;if(typeof o=="function"){var p=o;o=function(){var v=sl(x);p.call(v)}}rl(t,x,e,o)}else x=Wm(r,t,e,o,l);return sl(x)}po=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=mr(t.pendingLanes);r!==0&&(Ol(t,r|1),et(t,Ee()),(le&6)===0&&(Zn=Ee()+500,Zt()))}break;case 13:wn(function(){var l=Rt(e,1);if(l!==null){var o=Ke();wt(l,e,1,o)}}),ci(e,1)}},zl=function(e){if(e.tag===13){var t=Rt(e,134217728);if(t!==null){var r=Ke();wt(t,e,134217728,r)}ci(e,134217728)}},go=function(e){if(e.tag===13){var t=nn(e),r=Rt(e,t);if(r!==null){var l=Ke();wt(r,e,t,l)}ci(e,t)}},vo=function(){return ue},yo=function(e,t){var r=ue;try{return ue=e,t()}finally{ue=r}},Pl=function(e,t,r){switch(t){case"input":if(jl(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var l=r[t];if(l!==e&&l.form===e.form){var o=ks(l);if(!o)throw Error(i(90));Ui(l),jl(l,o)}}}break;case"textarea":Yi(e,r);break;case"select":t=r.value,t!=null&&En(e,!!r.multiple,t,!1)}},no=ni,ro=wn;var Qm={usingClientEntryPoint:!1,Events:[Tr,Fn,ks,eo,to,ni]},Vr={findFiberByHostInstance:hn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ym={bundleType:Vr.bundleType,version:Vr.version,rendererPackageName:Vr.rendererPackageName,rendererConfig:Vr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=io(e),e===null?null:e.stateNode},findFiberByHostInstance:Vr.findFiberByHostInstance||Vm,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 ol=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ol.isDisabled&&ol.supportsFiber)try{ls=ol.inject(Ym),Nt=ol}catch{}}return tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qm,tt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!di(t))throw Error(i(200));return Hm(e,t,null,r)},tt.createRoot=function(e,t){if(!di(e))throw Error(i(299));var r=!1,l="",o=Ou;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=oi(e,1,!1,null,null,r,!1,l,o),e[Tt]=t.current,Er(e.nodeType===8?e.parentNode:e),new ui(t)},tt.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(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=io(t),e=e===null?null:e.stateNode,e},tt.flushSync=function(e){return wn(e)},tt.hydrate=function(e,t,r){if(!al(t))throw Error(i(200));return il(null,e,t,!0,r)},tt.hydrateRoot=function(e,t,r){if(!di(e))throw Error(i(405));var l=r!=null&&r.hydratedSources||null,o=!1,u="",x=Ou;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(x=r.onRecoverableError)),t=Iu(t,null,e,1,r??null,o,!1,u,x),e[Tt]=t.current,Er(e),l)for(e=0;e<l.length;e++)r=l[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new ll(t)},tt.render=function(e,t,r){if(!al(t))throw Error(i(200));return il(null,e,t,!1,r)},tt.unmountComponentAtNode=function(e){if(!al(e))throw Error(i(40));return e._reactRootContainer?(wn(function(){il(null,null,e,!1,function(){e._reactRootContainer=null,e[Tt]=null})}),!0):!1},tt.unstable_batchedUpdates=ni,tt.unstable_renderSubtreeIntoContainer=function(e,t,r,l){if(!al(r))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return il(e,t,r,!1,l)},tt.version="18.3.1-next-f1338f8080-20240426",tt}var Vu;function gd(){if(Vu)return xi.exports;Vu=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(a){console.error(a)}}return s(),xi.exports=nh(),xi.exports}var Wu;function rh(){if(Wu)return cl;Wu=1;var s=gd();return cl.createRoot=s.createRoot,cl.hydrateRoot=s.hydrateRoot,cl}var sh=rh(),w=bi();const vd=Zm(w),lh=Km({__proto__:null,default:vd},[w]);gd();function Yr(){return Yr=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(s[c]=i[c])}return s},Yr.apply(this,arguments)}var an;(function(s){s.Pop="POP",s.Push="PUSH",s.Replace="REPLACE"})(an||(an={}));const Qu="popstate";function ah(s){s===void 0&&(s={});function a(c,d){let{pathname:m,search:h,hash:g}=c.location;return vi("",{pathname:m,search:h,hash:g},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(c,d){return typeof d=="string"?d:ul(d)}return oh(a,i,null,s)}function Le(s,a){if(s===!1||s===null||typeof s>"u")throw new Error(a)}function ki(s,a){if(!s){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function ih(){return Math.random().toString(36).substr(2,8)}function Yu(s,a){return{usr:s.state,key:s.key,idx:a}}function vi(s,a,i,c){return i===void 0&&(i=null),Yr({pathname:typeof s=="string"?s:s.pathname,search:"",hash:""},typeof a=="string"?rr(a):a,{state:i,key:a&&a.key||c||ih()})}function ul(s){let{pathname:a="/",search:i="",hash:c=""}=s;return i&&i!=="?"&&(a+=i.charAt(0)==="?"?i:"?"+i),c&&c!=="#"&&(a+=c.charAt(0)==="#"?c:"#"+c),a}function rr(s){let a={};if(s){let i=s.indexOf("#");i>=0&&(a.hash=s.substr(i),s=s.substr(0,i));let c=s.indexOf("?");c>=0&&(a.search=s.substr(c),s=s.substr(0,c)),s&&(a.pathname=s)}return a}function oh(s,a,i,c){c===void 0&&(c={});let{window:d=document.defaultView,v5Compat:m=!1}=c,h=d.history,g=an.Pop,f=null,b=E();b==null&&(b=0,h.replaceState(Yr({},h.state,{idx:b}),""));function E(){return(h.state||{idx:null}).idx}function S(){g=an.Pop;let P=E(),$=P==null?null:P-b;b=P,f&&f({action:g,location:I.location,delta:$})}function T(P,$){g=an.Push;let L=vi(I.location,P,$);b=E()+1;let A=Yu(L,b),G=I.createHref(L);try{h.pushState(A,"",G)}catch(se){if(se instanceof DOMException&&se.name==="DataCloneError")throw se;d.location.assign(G)}m&&f&&f({action:g,location:I.location,delta:1})}function M(P,$){g=an.Replace;let L=vi(I.location,P,$);b=E();let A=Yu(L,b),G=I.createHref(L);h.replaceState(A,"",G),m&&f&&f({action:g,location:I.location,delta:0})}function R(P){let $=d.location.origin!=="null"?d.location.origin:d.location.href,L=typeof P=="string"?P:ul(P);return L=L.replace(/ $/,"%20"),Le($,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,$)}let I={get action(){return g},get location(){return s(d,h)},listen(P){if(f)throw new Error("A history only accepts one active listener");return d.addEventListener(Qu,S),f=P,()=>{d.removeEventListener(Qu,S),f=null}},createHref(P){return a(d,P)},createURL:R,encodeLocation(P){let $=R(P);return{pathname:$.pathname,search:$.search,hash:$.hash}},push:T,replace:M,go(P){return h.go(P)}};return I}var Gu;(function(s){s.data="data",s.deferred="deferred",s.redirect="redirect",s.error="error"})(Gu||(Gu={}));function ch(s,a,i){return i===void 0&&(i="/"),uh(s,a,i)}function uh(s,a,i,c){let d=typeof a=="string"?rr(a):a,m=Si(d.pathname||"/",i);if(m==null)return null;let h=yd(s);dh(h);let g=null;for(let f=0;g==null&&f<h.length;++f){let b=bh(m);g=jh(h[f],b)}return g}function yd(s,a,i,c){a===void 0&&(a=[]),i===void 0&&(i=[]),c===void 0&&(c="");let d=(m,h,g)=>{let f={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:h,route:m};f.relativePath.startsWith("/")&&(Le(f.relativePath.startsWith(c),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+c+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(c.length));let b=on([c,f.relativePath]),E=i.concat(f);m.children&&m.children.length>0&&(Le(m.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+b+'".')),yd(m.children,a,E,b)),!(m.path==null&&!m.index)&&a.push({path:b,score:vh(b,m.index),routesMeta:E})};return s.forEach((m,h)=>{var g;if(m.path===""||!((g=m.path)!=null&&g.includes("?")))d(m,h);else for(let f of jd(m.path))d(m,h,f)}),a}function jd(s){let a=s.split("/");if(a.length===0)return[];let[i,...c]=a,d=i.endsWith("?"),m=i.replace(/\?$/,"");if(c.length===0)return d?[m,""]:[m];let h=jd(c.join("/")),g=[];return g.push(...h.map(f=>f===""?m:[m,f].join("/"))),d&&g.push(...h),g.map(f=>s.startsWith("/")&&f===""?"/":f)}function dh(s){s.sort((a,i)=>a.score!==i.score?i.score-a.score:yh(a.routesMeta.map(c=>c.childrenIndex),i.routesMeta.map(c=>c.childrenIndex)))}const mh=/^:[\w-]+$/,hh=3,xh=2,fh=1,ph=10,gh=-2,Ku=s=>s==="*";function vh(s,a){let i=s.split("/"),c=i.length;return i.some(Ku)&&(c+=gh),a&&(c+=xh),i.filter(d=>!Ku(d)).reduce((d,m)=>d+(mh.test(m)?hh:m===""?fh:ph),c)}function yh(s,a){return s.length===a.length&&s.slice(0,-1).every((c,d)=>c===a[d])?s[s.length-1]-a[a.length-1]:0}function jh(s,a,i){let{routesMeta:c}=s,d={},m="/",h=[];for(let g=0;g<c.length;++g){let f=c[g],b=g===c.length-1,E=m==="/"?a:a.slice(m.length)||"/",S=wh({path:f.relativePath,caseSensitive:f.caseSensitive,end:b},E),T=f.route;if(!S)return null;Object.assign(d,S.params),h.push({params:d,pathname:on([m,S.pathname]),pathnameBase:Ph(on([m,S.pathnameBase])),route:T}),S.pathnameBase!=="/"&&(m=on([m,S.pathnameBase]))}return h}function wh(s,a){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[i,c]=Nh(s.path,s.caseSensitive,s.end),d=a.match(i);if(!d)return null;let m=d[0],h=m.replace(/(.)\/+$/,"$1"),g=d.slice(1);return{params:c.reduce((b,E,S)=>{let{paramName:T,isOptional:M}=E;if(T==="*"){let I=g[S]||"";h=m.slice(0,m.length-I.length).replace(/(.)\/+$/,"$1")}const R=g[S];return M&&!R?b[T]=void 0:b[T]=(R||"").replace(/%2F/g,"/"),b},{}),pathname:m,pathnameBase:h,pattern:s}}function Nh(s,a,i){a===void 0&&(a=!1),i===void 0&&(i=!0),ki(s==="*"||!s.endsWith("*")||s.endsWith("/*"),'Route path "'+s+'" will be treated as if it were '+('"'+s.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+s.replace(/\*$/,"/*")+'".'));let c=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,g,f)=>(c.push({paramName:g,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return s.endsWith("*")?(c.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,a?void 0:"i"),c]}function bh(s){try{return s.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return ki(!1,'The URL path "'+s+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),s}}function Si(s,a){if(a==="/")return s;if(!s.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,c=s.charAt(i);return c&&c!=="/"?null:s.slice(i)||"/"}const kh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sh=s=>kh.test(s);function Ch(s,a){a===void 0&&(a="/");let{pathname:i,search:c="",hash:d=""}=typeof s=="string"?rr(s):s,m;if(i)if(Sh(i))m=i;else{if(i.includes("//")){let h=i;i=i.replace(/\/\/+/g,"/"),ki(!1,"Pathnames cannot have embedded double slashes - normalizing "+(h+" -> "+i))}i.startsWith("/")?m=Zu(i.substring(1),"/"):m=Zu(i,a)}else m=a;return{pathname:m,search:Lh(c),hash:Th(d)}}function Zu(s,a){let i=a.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?i.length>1&&i.pop():d!=="."&&i.push(d)}),i.length>1?i.join("/"):"/"}function gi(s,a,i,c){return"Cannot include a '"+s+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(c)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Eh(s){return s.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Ci(s,a){let i=Eh(s);return a?i.map((c,d)=>d===i.length-1?c.pathname:c.pathnameBase):i.map(c=>c.pathnameBase)}function Ei(s,a,i,c){c===void 0&&(c=!1);let d;typeof s=="string"?d=rr(s):(d=Yr({},s),Le(!d.pathname||!d.pathname.includes("?"),gi("?","pathname","search",d)),Le(!d.pathname||!d.pathname.includes("#"),gi("#","pathname","hash",d)),Le(!d.search||!d.search.includes("#"),gi("#","search","hash",d)));let m=s===""||d.pathname==="",h=m?"/":d.pathname,g;if(h==null)g=i;else{let S=a.length-1;if(!c&&h.startsWith("..")){let T=h.split("/");for(;T[0]==="..";)T.shift(),S-=1;d.pathname=T.join("/")}g=S>=0?a[S]:"/"}let f=Ch(d,g),b=h&&h!=="/"&&h.endsWith("/"),E=(m||h===".")&&i.endsWith("/");return!f.pathname.endsWith("/")&&(b||E)&&(f.pathname+="/"),f}const on=s=>s.join("/").replace(/\/\/+/g,"/"),Ph=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Lh=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Th=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function Mh(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}const wd=["post","put","patch","delete"];new Set(wd);const _h=["get",...wd];new Set(_h);function Gr(){return Gr=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(s[c]=i[c])}return s},Gr.apply(this,arguments)}const Pi=w.createContext(null),Ih=w.createContext(null),un=w.createContext(null),fl=w.createContext(null),Bt=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Nd=w.createContext(null);function Rh(s,a){let{relative:i}=a===void 0?{}:a;sr()||Le(!1);let{basename:c,navigator:d}=w.useContext(un),{hash:m,pathname:h,search:g}=kd(s,{relative:i}),f=h;return c!=="/"&&(f=h==="/"?c:on([c,h])),d.createHref({pathname:f,search:g,hash:m})}function sr(){return w.useContext(fl)!=null}function lr(){return sr()||Le(!1),w.useContext(fl).location}function bd(s){w.useContext(un).static||w.useLayoutEffect(s)}function Li(){let{isDataRoute:s}=w.useContext(Bt);return s?Gh():Oh()}function Oh(){sr()||Le(!1);let s=w.useContext(Pi),{basename:a,future:i,navigator:c}=w.useContext(un),{matches:d}=w.useContext(Bt),{pathname:m}=lr(),h=JSON.stringify(Ci(d,i.v7_relativeSplatPath)),g=w.useRef(!1);return bd(()=>{g.current=!0}),w.useCallback(function(b,E){if(E===void 0&&(E={}),!g.current)return;if(typeof b=="number"){c.go(b);return}let S=Ei(b,JSON.parse(h),m,E.relative==="path");s==null&&a!=="/"&&(S.pathname=S.pathname==="/"?a:on([a,S.pathname])),(E.replace?c.replace:c.push)(S,E.state,E)},[a,c,h,m,s])}function zh(){let{matches:s}=w.useContext(Bt),a=s[s.length-1];return a?a.params:{}}function kd(s,a){let{relative:i}=a===void 0?{}:a,{future:c}=w.useContext(un),{matches:d}=w.useContext(Bt),{pathname:m}=lr(),h=JSON.stringify(Ci(d,c.v7_relativeSplatPath));return w.useMemo(()=>Ei(s,JSON.parse(h),m,i==="path"),[s,h,m,i])}function Fh(s,a){return Dh(s,a)}function Dh(s,a,i,c){sr()||Le(!1);let{navigator:d}=w.useContext(un),{matches:m}=w.useContext(Bt),h=m[m.length-1],g=h?h.params:{};h&&h.pathname;let f=h?h.pathnameBase:"/";h&&h.route;let b=lr(),E;if(a){var S;let P=typeof a=="string"?rr(a):a;f==="/"||(S=P.pathname)!=null&&S.startsWith(f)||Le(!1),E=P}else E=b;let T=E.pathname||"/",M=T;if(f!=="/"){let P=f.replace(/^\//,"").split("/");M="/"+T.replace(/^\//,"").split("/").slice(P.length).join("/")}let R=ch(s,{pathname:M}),I=Hh(R&&R.map(P=>Object.assign({},P,{params:Object.assign({},g,P.params),pathname:on([f,d.encodeLocation?d.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?f:on([f,d.encodeLocation?d.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),m,i,c);return a&&I?w.createElement(fl.Provider,{value:{location:Gr({pathname:"/",search:"",hash:"",state:null,key:"default"},E),navigationType:an.Pop}},I):I}function Ah(){let s=Yh(),a=Mh(s)?s.status+" "+s.statusText:s instanceof Error?s.message:JSON.stringify(s),i=s instanceof Error?s.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},a),i?w.createElement("pre",{style:d},i):null,null)}const Bh=w.createElement(Ah,null);class $h extends w.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,i){return i.location!==a.location||i.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:i.error,location:i.location,revalidation:a.revalidation||i.revalidation}}componentDidCatch(a,i){console.error("React Router caught the following error during render",a,i)}render(){return this.state.error!==void 0?w.createElement(Bt.Provider,{value:this.props.routeContext},w.createElement(Nd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Uh(s){let{routeContext:a,match:i,children:c}=s,d=w.useContext(Pi);return d&&d.static&&d.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=i.route.id),w.createElement(Bt.Provider,{value:a},c)}function Hh(s,a,i,c){var d;if(a===void 0&&(a=[]),i===void 0&&(i=null),c===void 0&&(c=null),s==null){var m;if(!i)return null;if(i.errors)s=i.matches;else if((m=c)!=null&&m.v7_partialHydration&&a.length===0&&!i.initialized&&i.matches.length>0)s=i.matches;else return null}let h=s,g=(d=i)==null?void 0:d.errors;if(g!=null){let E=h.findIndex(S=>S.route.id&&g?.[S.route.id]!==void 0);E>=0||Le(!1),h=h.slice(0,Math.min(h.length,E+1))}let f=!1,b=-1;if(i&&c&&c.v7_partialHydration)for(let E=0;E<h.length;E++){let S=h[E];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(b=E),S.route.id){let{loaderData:T,errors:M}=i,R=S.route.loader&&T[S.route.id]===void 0&&(!M||M[S.route.id]===void 0);if(S.route.lazy||R){f=!0,b>=0?h=h.slice(0,b+1):h=[h[0]];break}}}return h.reduceRight((E,S,T)=>{let M,R=!1,I=null,P=null;i&&(M=g&&S.route.id?g[S.route.id]:void 0,I=S.route.errorElement||Bh,f&&(b<0&&T===0?(Kh("route-fallback"),R=!0,P=null):b===T&&(R=!0,P=S.route.hydrateFallbackElement||null)));let $=a.concat(h.slice(0,T+1)),L=()=>{let A;return M?A=I:R?A=P:S.route.Component?A=w.createElement(S.route.Component,null):S.route.element?A=S.route.element:A=E,w.createElement(Uh,{match:S,routeContext:{outlet:E,matches:$,isDataRoute:i!=null},children:A})};return i&&(S.route.ErrorBoundary||S.route.errorElement||T===0)?w.createElement($h,{location:i.location,revalidation:i.revalidation,component:I,error:M,children:L(),routeContext:{outlet:null,matches:$,isDataRoute:!0}}):L()},null)}var Sd=(function(s){return s.UseBlocker="useBlocker",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s})(Sd||{}),Cd=(function(s){return s.UseBlocker="useBlocker",s.UseLoaderData="useLoaderData",s.UseActionData="useActionData",s.UseRouteError="useRouteError",s.UseNavigation="useNavigation",s.UseRouteLoaderData="useRouteLoaderData",s.UseMatches="useMatches",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s.UseRouteId="useRouteId",s})(Cd||{});function Vh(s){let a=w.useContext(Pi);return a||Le(!1),a}function Wh(s){let a=w.useContext(Ih);return a||Le(!1),a}function Qh(s){let a=w.useContext(Bt);return a||Le(!1),a}function Ed(s){let a=Qh(),i=a.matches[a.matches.length-1];return i.route.id||Le(!1),i.route.id}function Yh(){var s;let a=w.useContext(Nd),i=Wh(),c=Ed();return a!==void 0?a:(s=i.errors)==null?void 0:s[c]}function Gh(){let{router:s}=Vh(Sd.UseNavigateStable),a=Ed(Cd.UseNavigateStable),i=w.useRef(!1);return bd(()=>{i.current=!0}),w.useCallback(function(d,m){m===void 0&&(m={}),i.current&&(typeof d=="number"?s.navigate(d):s.navigate(d,Gr({fromRouteId:a},m)))},[s,a])}const Xu={};function Kh(s,a,i){Xu[s]||(Xu[s]=!0)}function Zh(s,a){s?.v7_startTransition,s?.v7_relativeSplatPath}function Xh(s){let{to:a,replace:i,state:c,relative:d}=s;sr()||Le(!1);let{future:m,static:h}=w.useContext(un),{matches:g}=w.useContext(Bt),{pathname:f}=lr(),b=Li(),E=Ei(a,Ci(g,m.v7_relativeSplatPath),f,d==="path"),S=JSON.stringify(E);return w.useEffect(()=>b(JSON.parse(S),{replace:i,state:c,relative:d}),[b,S,d,i,c]),null}function tr(s){Le(!1)}function Jh(s){let{basename:a="/",children:i=null,location:c,navigationType:d=an.Pop,navigator:m,static:h=!1,future:g}=s;sr()&&Le(!1);let f=a.replace(/^\/*/,"/"),b=w.useMemo(()=>({basename:f,navigator:m,static:h,future:Gr({v7_relativeSplatPath:!1},g)}),[f,g,m,h]);typeof c=="string"&&(c=rr(c));let{pathname:E="/",search:S="",hash:T="",state:M=null,key:R="default"}=c,I=w.useMemo(()=>{let P=Si(E,f);return P==null?null:{location:{pathname:P,search:S,hash:T,state:M,key:R},navigationType:d}},[f,E,S,T,M,R,d]);return I==null?null:w.createElement(un.Provider,{value:b},w.createElement(fl.Provider,{children:i,value:I}))}function Pd(s){let{children:a,location:i}=s;return Fh(yi(a),i)}new Promise(()=>{});function yi(s,a){a===void 0&&(a=[]);let i=[];return w.Children.forEach(s,(c,d)=>{if(!w.isValidElement(c))return;let m=[...a,d];if(c.type===w.Fragment){i.push.apply(i,yi(c.props.children,m));return}c.type!==tr&&Le(!1),!c.props.index||!c.props.children||Le(!1);let h={id:c.props.id||m.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,loader:c.props.loader,action:c.props.action,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(h.children=yi(c.props.children,m)),i.push(h)}),i}function ji(){return ji=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(s[c]=i[c])}return s},ji.apply(this,arguments)}function qh(s,a){if(s==null)return{};var i={},c=Object.keys(s),d,m;for(m=0;m<c.length;m++)d=c[m],!(a.indexOf(d)>=0)&&(i[d]=s[d]);return i}function ex(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function tx(s,a){return s.button===0&&(!a||a==="_self")&&!ex(s)}const nx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],rx="6";try{window.__reactRouterVersion=rx}catch{}const sx="startTransition",Ju=lh[sx];function lx(s){let{basename:a,children:i,future:c,window:d}=s,m=w.useRef();m.current==null&&(m.current=ah({window:d,v5Compat:!0}));let h=m.current,[g,f]=w.useState({action:h.action,location:h.location}),{v7_startTransition:b}=c||{},E=w.useCallback(S=>{b&&Ju?Ju(()=>f(S)):f(S)},[f,b]);return w.useLayoutEffect(()=>h.listen(E),[h,E]),w.useEffect(()=>Zh(c),[c]),w.createElement(Jh,{basename:a,children:i,location:g.location,navigationType:g.action,navigator:h,future:c})}const ax=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ix=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dt=w.forwardRef(function(a,i){let{onClick:c,relative:d,reloadDocument:m,replace:h,state:g,target:f,to:b,preventScrollReset:E,viewTransition:S}=a,T=qh(a,nx),{basename:M}=w.useContext(un),R,I=!1;if(typeof b=="string"&&ix.test(b)&&(R=b,ax))try{let A=new URL(window.location.href),G=b.startsWith("//")?new URL(A.protocol+b):new URL(b),se=Si(G.pathname,M);G.origin===A.origin&&se!=null?b=se+G.search+G.hash:I=!0}catch{}let P=Rh(b,{relative:d}),$=ox(b,{replace:h,state:g,target:f,preventScrollReset:E,relative:d,viewTransition:S});function L(A){c&&c(A),A.defaultPrevented||$(A)}return w.createElement("a",ji({},T,{href:R||P,onClick:I||m?c:L,ref:i,target:f}))});var qu;(function(s){s.UseScrollRestoration="useScrollRestoration",s.UseSubmit="useSubmit",s.UseSubmitFetcher="useSubmitFetcher",s.UseFetcher="useFetcher",s.useViewTransitionState="useViewTransitionState"})(qu||(qu={}));var ed;(function(s){s.UseFetcher="useFetcher",s.UseFetchers="useFetchers",s.UseScrollRestoration="useScrollRestoration"})(ed||(ed={}));function ox(s,a){let{target:i,replace:c,state:d,preventScrollReset:m,relative:h,viewTransition:g}=a===void 0?{}:a,f=Li(),b=lr(),E=kd(s,{relative:h});return w.useCallback(S=>{if(tx(S,i)){S.preventDefault();let T=c!==void 0?c:ul(b)===ul(E);f(s,{replace:T,state:d,preventScrollReset:m,relative:h,viewTransition:g})}},[b,f,E,c,d,i,s,m,h,g])}const Ld=[{path:"/",name:"dashboard",component:"Dashboard",title:"Dashboard",description:"Main dashboard overview",exact:!0},{path:"/packages",name:"packages",component:"PackagesOverview",title:"Packages",description:"Package management and overview",exact:!0},{path:"/packages/:name",name:"package-detail",component:"PackageDetail",title:"Package Details",description:"Detailed view of a specific package"},{path:"/dependencies",name:"dependencies",component:"DependencyGraph",title:"Dependencies",description:"Dependency graph visualization"},{path:"/health",name:"health",component:"HealthStatus",title:"Health Status",description:"Monorepo health monitoring"},{path:"/publish",name:"publish",component:"PublishControl",title:"Publish Control",description:"Package publishing and versioning"},{path:"/ci",name:"ci",component:"CIIntegration",title:"CI/CD",description:"Continuous integration and deployment"},{path:"/config",name:"config",component:"ConfigInspector",title:"Configuration",description:"Configuration file inspector"}];Ld.filter(s=>!s.path.includes(":")&&s.path!=="/");function cx({isOpen:s,onClose:a,children:i}){return s?n.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:n.jsx("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden",onClick:c=>c.stopPropagation(),children:i})}):null}const ee="w-6 h-6",ux=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M10.5 3.75H5.625a1.875 1.875 0 0 0-1.875 1.875V20.25a1.875 1.875 0 0 0 1.875 1.875h12.75a1.875 1.875 0 0 0 1.875-1.875V5.625a1.875 1.875 0 0 0-1.875-1.875H13.5m-3 0V3m0 .75H9m1.5 0h1.5m-9 6.75h12m-12 4.5h12"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})}),it=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})}),Ti=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),Xr=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),dx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}):n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:[n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),mx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 4.338 5.31 7.5 10.066 7.5.996 0 1.956-.11 2.895-.327m4.326-3.494a11.952 11.952 0 0 0 3.464-5.192c-1.292-4.338-5.31-7.5-10.066-7.5-.996 0-1.956.11-2.895.327m0 0a11.966 11.966 0 0 0-4.576 3.84m4.576-3.84a11.966 11.966 0 0 1 4.576 3.84M6.502 16.503a3 3 0 1 1 4.243-4.243m-4.243 4.243L3.75 19.75"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),hx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:[n.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25z"}),n.jsx("path",{d:"M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})]}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),Mi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M8 5v14l11-7z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.591-.784l12 9c.54.406.54 1.358 0 1.764l-12 9c-.674.614-1.591.07-1.591-.784V5.653z"})}),_i=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M7 14l5-5 5 5z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18"})}),Td=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M7 10l5 5 5-5z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3"})}),xx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),td=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5L15.75 12l-7.5 7.5"})}),fx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),Pt=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Lt=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.3 10.3l-1.3 1.3L13.3 15l1.3 1.3-1.3 1.3L12 16.3l-1.3 1.3-1.3-1.3L10.7 15 9.4 13.7l1.3-1.3L10.7 11l-1.3-1.3 1.3-1.3L12 10.3l1.3-1.3 1.3 1.3L13.3 11l1.3 1.3z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Jr=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M5 9.2h3V19H5zM10.6 5h2.8v14h-2.8zm5.6 8H19v6h-2.8z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75zM9.75 6.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v13.5c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V6.875zm6-4.5c-.621 0-1.125.504-1.125 1.125v15.75c0 .621.504 1.125 1.125 1.125h2.25a1.125 1.125 0 0 0 1.125-1.125V3.375c0-.621-.504-1.125-1.125-1.125h-2.25z"})}),Ii=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Md=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM16 16v-3.5h-3v3.5h-3l4 4 4-4h-2z"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.6 4.6 0 0 1-.88-9.1A5 5 0 1 1 15.9 6L16 6a5 5 0 1 1 .9 9.9m-5 5v-5m0 0L9.7 10.7M12 16l2.3-2.3"})}),_d=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.75 7.5A2.25 2.25 0 0 1 8 5.25h8a2.25 2.25 0 0 1 2.25 2.25v8a2.25 2.25 0 0 1-2.25 2.25H8A2.25 2.25 0 0 1 5.75 15V7.5Z"})}),pl=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0 0 12 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75Z"})}),Ri=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2z"})}),dl=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),Oi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 8h10M7 12h10m-7 4h7M9 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-4l-2-2z"})}),px=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),gx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.185 0-2.25 1.065-2.25 2.25v5.338a2.25 2.25 0 0 0 .375 1.322l1.968 2.332c.494.583.745 1.379.745 2.191V17.5a2.25 2.25 0 0 0 2.25 2.25h5a2.25 2.25 0 0 0 2.25-2.25v-1.5a.75.75 0 0 0-1.5 0v1.5a.75.75 0 0 1-.75.75h-5a.75.75 0 0 1-.75-.75V9.991a.75.75 0 0 1-.75-.75V4.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 0 1.5 0V4.5c0-.647-.146-1.262-.406-1.812z"})}),zi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.402.402.937.629 1.531.629a2.16 2.16 0 0 0 1.532-.629l7.04-7.04a2.16 2.16 0 0 0 .628-1.532c0-.595-.227-1.129-.628-1.531l-9.58-9.581a2.25 2.25 0 0 0-1.592-.659H9.568z"})}),Id=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zM14.25 15h.008v.008H14.25V15zm0 2.25h.008v.008H14.25v-.008zM16.5 15h.008v.008H16.5V15zm0 2.25h.008v.008H16.5v-.008z"})}),At=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),gl=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.039l1.758-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})}),dn=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:[n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})," "]}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})}),Fi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5z"})}),vl=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),nr=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zm-9-3.75h.008v.008H12V8.25z"})}),De=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})}),cn=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z"})}),Rd=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:[n.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),n.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),Cn=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:[n.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),n.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),vx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0H8.25m4.125 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0H12.25m4.125 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),nd=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})}),rd=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.655.355-1.08.852-1.358 1.446-.201.416-.348.665-.518.923a2.712 2.712 0 0 0-.5 1.703c0 .462.1.946.348 1.384.245.531.645 1.046 1.28 1.696a.75.75 0 0 0 1.067-.03c.635-.64 1.035-1.165 1.28-1.696.248-.438.348-.922.348-1.384a2.712 2.712 0 0 0-.5-1.703c-.17-.258-.317-.507-.518-.923-.278-.594-.703-1.091-1.358-1.446m0 0C9.806 2.94 10.923 2.5 12 2.5c1.077 0 2.194.44 3.15 1.336m-1.8 0c.068.087.137.176.207.266.343.417.682.83 1.013 1.296.31.426.629.846 1.013 1.296a.75.75 0 0 0-.584 1.28 60.461 60.461 0 0 1-2.694-.449.75.75 0 0 0-.606.073c-.223.145-.456.366-.656.732a2.75 2.75 0 0 0-.426-1.26c0-.45.09-.88.258-1.28H9m0 0c.068.087.137.176.207.266.343.417.682.83 1.013 1.296.31.426.629.846 1.013 1.296M6.75 12a3 3 0 1 1 6 0 3 3 0 0 1-6 0zm12 0a3 3 0 1 1 6 0 3 3 0 0 1-6 0z"})}),yx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.375 19.5h17.25m-17.25-4.5h17.25m-17.25-4.5h17.25m-17.25-4.5h17.25"})}),jx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5.432 15.3a9.01 9.01 0 0 0-2.02 3.991v2.084a2.25 2.25 0 0 0 2.25 2.25h13.636a2.25 2.25 0 0 0 2.25-2.25v-2.084a9.01 9.01 0 0 0-2.02-3.991l-3.659-4.591A2.25 2.25 0 0 1 14.25 8.818v-5.714m0 0L9.75 3.104M14.25 3.104l4.5 0v5.714a2.25 2.25 0 0 1-.659 1.591L18.568 15.3"})}),wx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6.75v10.5a.75.75 0 0 1-1.5 0V6.75m0 0a.75.75 0 0 1 1.5 0zm12 0v10.5a.75.75 0 0 1-1.5 0V6.75m0 0a.75.75 0 0 1 1.5 0z"})}),wi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9z"})}),Nx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5zm-6-3.75h.008v.008H12v-.008zm0 2.25h.008v.008H12v-.008zm0-8.25h.008v.008H12V8.25z"})}),bx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:c,stroke:"currentColor",className:s,width:a,height:i,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5zm-3-7.5h-3m0 0H9m0 0v3m0-3v-3"})});function kx({onSave:s,onClose:a}){return n.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Rd,{className:"w-6 h-6 text-gray-600"}),n.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Dashboard Configuration"})]}),n.jsxs("div",{className:"flex space-x-3",children:[n.jsxs("button",{onClick:s,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[n.jsx(Ti,{className:"w-5 h-5"}),n.jsx("span",{children:"Save"})]}),n.jsxs("button",{onClick:a,className:"bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 flex items-center space-x-2",children:[n.jsx(Xr,{className:"w-5 h-5"}),n.jsx("span",{children:"Cancel"})]})]})]})}const Sx=()=>[{id:"general",label:"General",icon:n.jsx(Cn,{className:"w-6 h-6 text-primary-600"})},{id:"features",label:"Features",icon:n.jsx(dn,{className:"w-6 h-6 text-primary-600"})},{id:"branding",label:"Branding",icon:"🎨"},{id:"monorepo",label:"Monorepo",icon:n.jsx(it,{className:"w-6 h-6 text-primary-600"})}],Cx=()=>({title:"monodog Dashboard",description:"Visual management of our monorepo packages",packageTypes:["app","lib","tool","service"],customFields:["team","priority","environment"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{logo:"",primaryColor:"#3B82F6",secondaryColor:"#1E40AF"},monorepo:{structure:"standard",packageManager:"pnpm",directories:["apps","packages","libs"],ignorePatterns:["node_modules","dist",".git"]}}),sd=s=>{const a=Cx();return{...a,...s,features:{...a.features,...s.features},branding:{...a.branding,...s.branding},monorepo:{...a.monorepo,...s.monorepo}}},Ex=s=>{const a=[];return(!s.title||s.title.trim()==="")&&a.push("Dashboard title is required"),s.monorepo?.directories&&s.monorepo.directories.length===0&&a.push("At least one package directory is required"),s.branding?.primaryColor&&!ld(s.branding.primaryColor)&&a.push("Primary color must be a valid hex color"),s.branding?.secondaryColor&&!ld(s.branding.secondaryColor)&&a.push("Secondary color must be a valid hex color"),{isValid:a.length===0,errors:a}},ld=s=>/^#[0-9A-F]{6}$/i.test(s),ml=s=>s.split(",").map(a=>a.trim()).filter(a=>a.length>0),hl=s=>s?s.join(", "):"",Px=s=>s.replace(/([A-Z])/g," $1").trim();function Lx({activeTab:s,onTabChange:a}){const i=Sx();return n.jsx("div",{className:"border-b border-gray-200",children:n.jsx("nav",{className:"flex space-x-8 px-6",children:i.map(c=>n.jsxs("button",{onClick:()=>a(c.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${s===c.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[n.jsx("span",{children:c.icon}),n.jsx("span",{children:c.label})]},c.id))})})}function ad({config:s,onConfigChange:a}){return n.jsx("div",{className:"space-y-6",children:n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"General Settings"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Dashboard Title"}),n.jsx("input",{type:"text",value:s.title||"",onChange:i=>a({title:i.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"My Monorepo Dashboard"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),n.jsx("input",{type:"text",value:s.description||"",onChange:i=>a({description:i.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Visual management of our monorepo packages"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Types"}),n.jsx("input",{type:"text",value:hl(s.packageTypes),onChange:i=>a({packageTypes:ml(i.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"app, lib, tool, service"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated list of package types"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Custom Fields"}),n.jsx("input",{type:"text",value:hl(s.customFields),onChange:i=>a({customFields:ml(i.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"team, priority, environment"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Additional fields to display for packages"})]})]})]})})}function Tx({config:s,onConfigChange:a}){const i=(c,d)=>{a({features:{...s.features,[c]:d}})};return n.jsx("div",{className:"space-y-6",children:n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Feature Toggles"}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(s.features||{}).map(([c,d])=>n.jsxs("label",{className:"flex items-center space-x-3",children:[n.jsx("input",{type:"checkbox",checked:d,onChange:m=>i(c,m.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),n.jsx("span",{className:"text-sm font-medium text-gray-700 capitalize",children:Px(c)})]},c))}),n.jsxs("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[n.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Feature Descriptions"}),n.jsxs("div",{className:"text-xs text-blue-800 space-y-1",children:[n.jsxs("div",{children:[n.jsx("strong",{children:"Health Checks:"})," Monitor package health and status"]}),n.jsxs("div",{children:[n.jsx("strong",{children:"CI Integration:"})," Connect with CI/CD providers"]}),n.jsxs("div",{children:[n.jsx("strong",{children:"Dependency Graph:"})," Visualize package dependencies"]}),n.jsxs("div",{children:[n.jsx("strong",{children:"Publish Control:"})," Manage package publishing and versioning"]}),n.jsxs("div",{children:[n.jsx("strong",{children:"Search And Filter:"})," Advanced search and filtering capabilities"]}),n.jsxs("div",{children:[n.jsx("strong",{children:"Configuration Inspector:"})," View and edit configuration files"]})]})]})]})})}function Mx({config:s,onConfigChange:a}){const i=(c,d)=>{a({branding:{...s.branding,[c]:d}})};return n.jsx("div",{className:"space-y-6",children:n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Branding & Appearance"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Logo URL"}),n.jsx("input",{type:"text",value:s.branding?.logo||"",onChange:c=>i("logo",c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"https://example.com/logo.png"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"URL to your company logo"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Color"}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("input",{type:"color",value:s.branding?.primaryColor||"#3B82F6",onChange:c=>i("primaryColor",c.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),n.jsx("input",{type:"text",value:s.branding?.primaryColor||"#3B82F6",onChange:c=>i("primaryColor",c.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#3B82F6"})]}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Primary brand color for buttons and accents"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Color"}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("input",{type:"color",value:s.branding?.secondaryColor||"#1E40AF",onChange:c=>i("secondaryColor",c.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),n.jsx("input",{type:"text",value:s.branding?.secondaryColor||"#1E40AF",onChange:c=>i("secondaryColor",c.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#1E40AF"})]}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Secondary color for hover states and highlights"})]})]}),n.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Color Preview"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:s.branding?.primaryColor||"#3B82F6"}}),n.jsx("span",{className:"text-sm text-gray-600",children:"Primary"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:s.branding?.secondaryColor||"#1E40AF"}}),n.jsx("span",{className:"text-sm text-gray-600",children:"Secondary"})]}),n.jsx("button",{className:"px-4 py-2 rounded-lg text-white text-sm font-medium",style:{backgroundColor:s.branding?.primaryColor||"#3B82F6"},children:"Sample Button"})]})]})]})})}function _x({config:s,onConfigChange:a}){const i=(c,d)=>{a({monorepo:{...s.monorepo,[c]:d}})};return n.jsx("div",{className:"space-y-6",children:n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Monorepo Configuration"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Structure Type"}),n.jsxs("select",{value:s.monorepo?.structure||"standard",onChange:c=>i("structure",c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"standard",children:"Standard (apps/packages/libs)"}),n.jsx("option",{value:"custom",children:"Custom Structure"})]}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Choose your monorepo directory structure"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Manager"}),n.jsxs("select",{value:s.monorepo?.packageManager||"pnpm",onChange:c=>i("packageManager",c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"pnpm",children:"pnpm"}),n.jsx("option",{value:"npm",children:"npm"}),n.jsx("option",{value:"yarn",children:"Yarn"}),n.jsx("option",{value:"lerna",children:"Lerna"}),n.jsx("option",{value:"nx",children:"Nx"})]}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Package manager used in your monorepo"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Directories"}),n.jsx("input",{type:"text",value:hl(s.monorepo?.directories),onChange:c=>i("directories",ml(c.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"apps, packages, libs, services"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Directories containing packages"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ignore Patterns"}),n.jsx("input",{type:"text",value:hl(s.monorepo?.ignorePatterns),onChange:c=>i("ignorePatterns",ml(c.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"node_modules, dist, .git"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Patterns to ignore when scanning"})]})]}),n.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Configuration Preview"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-700",children:"Structure:"}),n.jsx("span",{className:"ml-2 text-gray-600 capitalize",children:s.monorepo?.structure||"standard"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"}),n.jsx("span",{className:"ml-2 text-gray-600",children:s.monorepo?.packageManager||"pnpm"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-700",children:"Directories:"}),n.jsxs("span",{className:"ml-2 text-gray-600",children:[s.monorepo?.directories?.length||0," configured"]})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-700",children:"Ignore Patterns:"}),n.jsxs("span",{className:"ml-2 text-gray-600",children:[s.monorepo?.ignorePatterns?.length||0," patterns"]})]})]})]}),s.monorepo?.packageManager&&n.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[n.jsxs("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:[s.monorepo.packageManager.toUpperCase()," Configuration Tips"]}),n.jsxs("div",{className:"text-xs text-blue-800",children:[s.monorepo.packageManager==="pnpm"&&n.jsx("p",{children:"Make sure you have a pnpm-workspace.yaml file in your root directory."}),s.monorepo.packageManager==="npm"&&n.jsx("p",{children:'Configure workspaces in your package.json with the "workspaces" field.'}),s.monorepo.packageManager==="yarn"&&n.jsx("p",{children:"Ensure you have workspaces configured in your package.json."}),s.monorepo.packageManager==="lerna"&&n.jsx("p",{children:"Make sure you have a lerna.json configuration file in your root."}),s.monorepo.packageManager==="nx"&&n.jsx("p",{children:"Ensure you have an nx.json configuration file in your workspace root."})]})]})]})})}function Ix({isOpen:s,onClose:a,onSave:i,currentConfig:c}){const[d,m]=w.useState(sd(c)),[h,g]=w.useState("general");w.useEffect(()=>{m(sd(c))},[c]);const f=()=>{const S=Ex(d);S.isValid||console.warn("Configuration validation errors:",S.errors),i(d),a()},b=S=>{m(T=>({...T,...S}))},E=()=>{const S={config:d,onConfigChange:b};switch(h){case"general":return n.jsx(ad,{...S});case"features":return n.jsx(Tx,{...S});case"branding":return n.jsx(Mx,{...S});case"monorepo":return n.jsx(_x,{...S});default:return n.jsx(ad,{...S})}};return n.jsxs(cx,{isOpen:s,onClose:a,children:[n.jsx(kx,{onSave:f,onClose:a}),n.jsx(Lx,{activeTab:h,onTabChange:g}),n.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:E()})]})}function Rx({isOpen:s,onClose:a,children:i}){return s?n.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:n.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-hidden",onClick:c=>c.stopPropagation(),children:i})}):null}function Ox({onClose:s}){return n.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Setup Guide"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Configure your monorepo dashboard for optimal performance"})]}),n.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors",children:n.jsx(Xr,{className:"w-6 h-6"})})]})}function zx({progress:s}){const{currentStep:a,totalSteps:i,completedSteps:c}=s,d=(a+1)/i*100;return n.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("span",{className:"text-sm font-medium text-gray-700",children:["Step ",a+1," of ",i]}),n.jsxs("span",{className:"text-sm text-gray-500",children:[c," completed"]})]}),n.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:n.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${d}%`}})})]})}function Fx({step:s,onStepComplete:a}){const i=()=>{switch(s.id){case"monorepo-structure":return n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Quick Setup"}),n.jsx("p",{className:"text-blue-800 text-sm mb-3",children:"Choose your monorepo structure to get started quickly:"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[n.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[n.jsx("div",{className:"font-medium text-blue-900",children:"Standard Structure"}),n.jsx("div",{className:"text-sm text-blue-700",children:"apps/, packages/, libs/"})]}),n.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[n.jsx("div",{className:"font-medium text-blue-900",children:"Custom Structure"}),n.jsx("div",{className:"text-sm text-blue-700",children:"Define your own directories"})]})]})]}),n.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Manual Configuration"}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Root Directory"}),n.jsx("input",{type:"text",defaultValue:"/path/to/monorepo",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Package Manager"}),n.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm",children:[n.jsx("option",{value:"pnpm",children:"pnpm"}),n.jsx("option",{value:"npm",children:"npm"}),n.jsx("option",{value:"yarn",children:"yarn"})]})]})]})]})]});case"package-scanning":return n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-green-900 mb-2",children:"Automatic Discovery"}),n.jsx("p",{className:"text-green-800 text-sm mb-3",children:"We'll scan your monorepo for packages automatically:"}),n.jsx("button",{onClick:()=>a(s.id),className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 text-sm",children:"Start Package Scan"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[n.jsx(nr,{className:"w-4 h-4 mr-2"}),"Scans for package.json files"]}),n.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[n.jsx(nr,{className:"w-4 h-4 mr-2"}),"Analyzes dependencies and relationships"]}),n.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[n.jsx(nr,{className:"w-4 h-4 mr-2"}),"Detects build configurations"]})]})]});case"ci-integration":return n.jsx("div",{className:"space-y-4",children:n.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-purple-900 mb-2",children:"Connect CI/CD"}),n.jsx("p",{className:"text-purple-800 text-sm mb-3",children:"Choose your CI/CD provider to monitor builds and deployments:"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[n.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[n.jsx("div",{className:"font-medium text-purple-900",children:"GitHub Actions"}),n.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitHub"})]}),n.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[n.jsx("div",{className:"font-medium text-purple-900",children:"GitLab CI"}),n.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitLab"})]}),n.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[n.jsx("div",{className:"font-medium text-purple-900",children:"Jenkins"}),n.jsx("div",{className:"text-sm text-purple-700",children:"Connect with Jenkins"})]}),n.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[n.jsx("div",{className:"font-medium text-purple-900",children:"Skip for now"}),n.jsx("div",{className:"text-sm text-purple-700",children:"Configure later"})]})]})]})});case"health-checks":return n.jsx("div",{className:"space-y-4",children:n.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-orange-900 mb-2",children:"Health Monitoring"}),n.jsx("p",{className:"text-orange-800 text-sm mb-3",children:"Configure how we monitor your package health:"}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),n.jsx("span",{className:"text-sm text-orange-900",children:"Monitor build status"})]}),n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),n.jsx("span",{className:"text-sm text-orange-900",children:"Track test coverage"})]}),n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2"}),n.jsx("span",{className:"text-sm text-orange-900",children:"Dependency vulnerability scanning"})]}),n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2"}),n.jsx("span",{className:"text-sm text-orange-900",children:"Performance monitoring"})]})]}),n.jsx("button",{onClick:()=>a(s.id),className:"mt-3 bg-orange-600 text-white px-4 py-2 rounded-lg hover:bg-orange-700 text-sm",children:"Save Settings"})]})});case"notifications":return n.jsx("div",{className:"space-y-4",children:n.jsxs("div",{className:"bg-indigo-50 border border-indigo-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-indigo-900 mb-2",children:"Notification Preferences"}),n.jsx("p",{className:"text-indigo-800 text-sm mb-3",children:"Choose how you want to be notified about important events:"}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),n.jsx("span",{className:"text-sm text-indigo-900",children:"Build failures"})]}),n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2"}),n.jsx("span",{className:"text-sm text-indigo-900",children:"Security vulnerabilities"})]}),n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2"}),n.jsx("span",{className:"text-sm text-indigo-900",children:"Dependency updates"})]}),n.jsxs("label",{className:"flex items-center",children:[n.jsx("input",{type:"checkbox",className:"mr-2"}),n.jsx("span",{className:"text-sm text-indigo-900",children:"Performance degradation"})]})]}),n.jsx("button",{onClick:()=>a(s.id),className:"mt-3 bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 text-sm",children:"Save Preferences"})]})});default:return n.jsx("div",{className:"text-center py-8",children:n.jsx("p",{className:"text-gray-500",children:"Step content not found"})})}};return n.jsxs("div",{className:"p-6 overflow-y-auto max-h-[50vh]",children:[n.jsxs("div",{className:"mb-6",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:s.title}),n.jsx("p",{className:"text-gray-600 mb-4",children:s.description})]}),i()]})}function Dx({currentStep:s,totalSteps:a,canGoNext:i,canGoPrevious:c,onNext:d,onPrevious:m,onComplete:h,isLastStep:g}){return n.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-gray-200",children:[n.jsx("button",{onClick:m,disabled:!c,className:`px-4 py-2 text-sm rounded-lg border transition-colors ${c?"border-gray-300 text-gray-700 hover:bg-gray-50":"border-gray-200 text-gray-400 cursor-not-allowed"}`,children:"Previous"}),n.jsx("div",{className:"flex space-x-2",children:Array.from({length:a},(f,b)=>n.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${b<=s?"bg-blue-600":"bg-gray-300"}`},b))}),g?n.jsxs("button",{onClick:h,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 flex items-center space-x-2 text-sm",children:[n.jsx(Ti,{className:"w-4 h-4"}),n.jsx("span",{children:"Complete Setup"})]}):n.jsx("button",{onClick:d,disabled:!i,className:`px-4 py-2 text-sm rounded-lg transition-colors ${i?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Next"})]})}const Ax=()=>[{id:"monorepo-structure",title:"Monorepo Structure",description:"Configure your monorepo directory structure and package manager",completed:!1,required:!0},{id:"package-scanning",title:"Package Scanning",description:"Set up automatic package discovery and dependency analysis",completed:!1,required:!0},{id:"ci-integration",title:"CI/CD Integration",description:"Connect with your CI/CD providers (GitHub Actions, GitLab CI, etc.)",completed:!1,required:!1},{id:"health-checks",title:"Health Monitoring",description:"Configure package health checks and status monitoring",completed:!1,required:!1},{id:"notifications",title:"Notifications",description:"Set up alerts and notifications for important events",completed:!1,required:!1}],Bx=(s,a)=>({currentStep:a,totalSteps:s.length,completedSteps:s.filter(i=>i.completed).length}),$x=(s,a)=>{const i=s[a];return!i.required||i.completed},Ux=s=>s.filter(i=>i.required).every(i=>i.completed),Hx=(s,a)=>s.map(i=>i.id===a?{...i,completed:!0}:i);function Vx({isOpen:s,onClose:a,onComplete:i}){const[c,d]=w.useState(0),[m,h]=w.useState(Ax()),g=P=>{const $=Hx(m,P);h($),$[c].completed&&c<m.length-1&&d(A=>A+1)},f=()=>{c<m.length-1&&d(P=>P+1)},b=()=>{c>0&&d(P=>P-1)},E=()=>{Ux(m)&&(i(),a())},S=Bx(m,c),T=$x(m,c),M=c>0,R=c===m.length-1,I=m[c];return n.jsxs(Rx,{isOpen:s,onClose:a,children:[n.jsx(Ox,{onClose:a}),n.jsx(zx,{progress:S}),n.jsx(Fx,{step:I,onStepComplete:g}),n.jsx(Dx,{currentStep:c,totalSteps:m.length,canGoNext:T,canGoPrevious:M,onNext:f,onPrevious:b,onComplete:E,isLastStep:R})]})}function Wx({config:s,onShowSetupGuide:a,onShowConfig:i,onRefresh:c}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-heading text-3xl",children:s.title}),n.jsx("p",{className:"text-body mt-2",children:s.description}),n.jsx("button",{onClick:a,className:"hidden text-primary-600 hover:text-primary-700 text-sm font-medium mt-2",children:"First time? Run the setup guide"})]}),n.jsxs("div",{className:"flex space-x-3",children:[n.jsxs("button",{onClick:c,className:"btn-primary flex items-center space-x-2",children:[n.jsx(cn,{className:"w-5 h-5"}),n.jsx("span",{children:"Refresh"})]}),n.jsxs("button",{onClick:i,className:"hidden btn-ghost flex items-center space-x-2",children:[n.jsx(Rd,{className:"w-5 h-5"}),n.jsx("span",{children:"Configure"})]})]})]})}function Qx({stats:s}){return n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[n.jsx("div",{className:"card p-6 bg-gray-100",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 rounded-lg",children:n.jsx(it,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Total Packages"}),n.jsx("p",{className:"text-heading text-2xl",children:s.total})]})]})}),n.jsx("div",{className:"card p-6 bg-green-100",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-secondary-100 rounded-lg",children:n.jsx(dn,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Applications"}),n.jsx("p",{className:"text-heading text-2xl",children:s.apps})]})]})}),n.jsx("div",{className:"card p-6 bg-yellow-100",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-accent-100 rounded-lg",children:n.jsx(pl,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Libraries"}),n.jsx("p",{className:"text-heading text-2xl",children:s.libs})]})]})}),n.jsx("div",{className:"card p-6 bg-blue-100",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 rounded-lg",children:n.jsx(gl,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Dependencies"}),n.jsx("p",{className:"text-heading text-2xl",children:s.totalDependencies})]})]})})]})}function Yx(){return n.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[n.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[n.jsx(Dt,{to:"/dependencies",className:"p-4 border border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:n.jsx(Jr,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-medium text-gray-900",children:"Dependency Graph"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Visualize package relationships"})]})]})}),n.jsx(Dt,{to:"/health",className:"p-4 border border-gray-200 rounded-lg hover:border-green-300 hover:bg-green-50 transition-colors",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:n.jsx(Ii,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-medium text-gray-900",children:"Health Check"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Monitor package health"})]})]})}),n.jsx(Dt,{to:"/ci",className:"hidden p-4 border border-gray-200 rounded-lg hover:border-purple-300 hover:bg-purple-50 transition-colors",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:n.jsx("span",{className:"text-2xl",children:"🧪"})}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-medium text-gray-900",children:"CI/CD Status"}),n.jsx("p",{className:"text-sm text-gray-600",children:"View build status"})]})]})})]})]})}function Gx({searchTerm:s,selectedType:a,packageTypes:i,onSearchChange:c,onTypeChange:d}){return n.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[n.jsxs("div",{className:"flex-1 relative",children:[n.jsx(Fi,{className:"w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"}),n.jsx("input",{type:"text",placeholder:"Search packages...",value:s,onChange:m=>c(m.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(vl,{className:"w-5 h-5 text-gray-400"}),n.jsxs("select",{value:a,onChange:m=>d(m.target.value),className:"px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Types"}),i.map(m=>n.jsx("option",{value:m,className:"capitalize",children:m},m))]})]})]})}function Kx({packages:s,getTypeIcon:a,getStatusColor:i}){return n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[n.jsx("thead",{className:"bg-gray-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Version"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(c=>n.jsxs("tr",{className:"hover:bg-gray-50",children:[n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"text-2xl mr-3",children:a(c.type)}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium text-gray-900",children:c.name}),n.jsx("div",{className:"text-sm text-gray-500",children:c.path})]})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${i(c.type)}`,children:c.type})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.version}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(c.dependencies).length+Object.keys(c.devDependencies).length+Object.keys(c.peerDependencies).length}),n.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 max-w-xs truncate",children:c.description||"No description"}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:n.jsx(Dt,{to:`/packages/${encodeURIComponent(c.name)}`,className:"text-blue-600 hover:text-blue-500",children:"View Details"})})]},c.name))})]})})}const Zx=window.ENV?.API_URL??"http://localhost:8999",Et=`${Zx}/api`;class Xx{constructor(){this.mockPackages=[]}async getPackages(){try{const a=await fetch(`${Et}/packages`);if(a.ok)return await a.json();console.error(`getPackages: initial fetch failed with status ${a.status}. Attempting refresh...`);try{return await this.refreshPackages()}catch(i){return console.error("getPackages: refresh failed",i),[]}}catch(a){return console.error("getPackages: unexpected error",a),[]}}async getPackage(a){const i=await fetch(`${Et}/packages/`+encodeURIComponent(a));if(!i.ok)throw new Error(`Failed to fetch package details for "${a}" (Status: ${i.status})`);return await i.json()}async getDependencies(){await new Promise(i=>setTimeout(i,200));const a=new Set;try{return(await this.getPackages()).forEach(d=>{d.dependencies?.forEach(m=>a.add(m))}),Array.from(a).map(d=>({name:d,version:"unknown",type:"dependency",status:"active"}))}catch(i){return console.error("Error fetching dependencies:",i),[]}}async refreshPackages(){try{const a=await fetch(`${Et}/packages/refresh`,{method:"POST",headers:{"Content-Type":"application/json"}});return a.ok?await a.json():(console.error(`refreshPackages: fetch failed with status ${a.status}`),[])}catch(a){return console.error("refreshPackages: unexpected error",a),[]}}async getHealthStatus(){try{const a=await fetch(`${Et}/health/packages`);if(!a.ok){if(!(await fetch(`${Et}/health/refresh`,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to refresh health data");await new Promise(h=>setTimeout(h,1e3));const d=await fetch(`${Et}/health/packages`);if(!d.ok)throw new Error("Failed to fetch health data after refresh");return await d.json()}return await a.json()}catch{}}async refreshHealthStatus(){try{const a=await fetch(`${Et}/health/refresh`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!a.ok)throw new Error("Failed to fetch health data");return await a.json()}catch(a){console.error("Error fetching health data:",a)}}async getFallbackHealthStatus(){await new Promise(d=>setTimeout(d,400));const a=[{name:"Package Count",value:this.mockPackages.length,status:"healthy",description:`${this.mockPackages.length} packages in monorepo`},{name:"Dependency Health",value:85,status:"healthy",description:"Dependencies are up to date"},{name:"Build Status",value:95,status:"healthy",description:"Most builds are successful"}],i=this.mockPackages.map(d=>({package:d.name,score:d.status==="healthy"?90:d.status==="warning"?70:50,issues:d.status==="healthy"?[]:["Needs attention"]}));return{overallScore:85,metrics:a,packageHealth:i}}async updatePackageConfiguration(a,i,c){try{const d=await fetch(`${Et}/packages/update-config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({packageName:a,config:i,packagePath:c})});if(!d.ok){const h=await d.text();console.error("📥 Error response:",h);let g=`HTTP error ${d.status}`;if(h)try{const f=JSON.parse(h);g=f.error||f.message||g}catch{g=h||g}throw new Error(g)}return await d.json()}catch(d){throw console.error("Error updating package configuration:",d),d}}async getBuildStatus(){await new Promise(i=>setTimeout(i,500));const a=[];for(const i of this.mockPackages){const c=i.scripts&&i.scripts.build,d=i.scripts&&i.scripts.test;if(c||d){const m=new Date(Date.now()-Math.random()*864e5).toISOString(),h=Math.random()>.8?"failed":Math.random()>.6?"building":Math.random()>.4?"queued":"success";a.push({id:`build-${i.name}-${Date.now()}`,package:i.name,status:h,startTime:m,endTime:h!=="building"?new Date(Date.now()-Math.random()*36e5).toISOString():void 0,duration:h!=="building"?Math.floor(Math.random()*300)+60:void 0,stages:this.generateBuildStages(i,h)})}}return a}async getConfigurationFiles(){try{const a=await fetch(`${Et}/config/files`);if(!a.ok)throw new Error(`Failed to fetch config files: ${a.status} ${a.statusText}`);const i=await a.json();if(i.success&&i.files)return i.files;throw new Error("Invalid response format from config files API")}catch(a){return console.error("Error fetching configuration files from backend:",a),[]}}async saveConfigurationFile(a,i){try{const c=await fetch(`${Et}/config/files/${encodeURIComponent(a)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:i})});if(!c.ok){const m=await c.json();throw new Error(m.error||`Failed to save file: ${c.status} ${c.statusText}`)}const d=await c.json();if(d.success&&d.file)return d.file;throw new Error("Invalid response format from save file API")}catch(c){throw console.error("Error saving configuration file:",c),c}}generateBuildStages(a,i){const c=[{name:"Install",status:"success",duration:Math.floor(Math.random()*30)+10,logs:["Installing dependencies...","Dependencies installed successfully"]},{name:"Lint",status:i==="failed"&&Math.random()>.7?"failed":"success",duration:Math.floor(Math.random()*20)+5,logs:["Running ESLint...","Linting completed"]},{name:"Test",status:i==="failed"&&Math.random()>.5?"failed":"success",duration:Math.floor(Math.random()*60)+30,logs:["Running tests...","Test suite completed"]},{name:"Build",status:i==="failed"?"failed":"success",duration:Math.floor(Math.random()*120)+60,logs:["Building package...","Build completed successfully"]}];if(i==="building"){const d=Math.floor(Math.random()*c.length);c[d].status="running",c.slice(d+1).forEach(m=>m.status="pending")}return c}}const xt=new Xx,Jx=s=>({total:s.length,apps:s.filter(a=>a.type==="app").length,libs:s.filter(a=>a.type==="lib").length,tools:s.filter(a=>a.type==="tool").length,custom:s.filter(a=>!["app","Plib","tool"].includes(a.type)).length,totalDependencies:s.reduce((a,i)=>a+Object.keys(i.dependencies).length+Object.keys(i.peerDependencies).length+Object.keys(i.devDependencies).length,0)}),qx=s=>[...new Set(s.map(a=>a.type))],ef=(s,a,i)=>s.filter(c=>{const d=c.name.toLowerCase().includes(a.toLowerCase())||c.description?.toLowerCase().includes(a.toLowerCase()),m=i==="all"||c.type===i;return d&&m}),tf=s=>{switch(s){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-green-100 text-green-800";case"tool":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},nf=s=>{switch(s){case"app":return n.jsx(dn,{className:"w-6 h-6 text-primary-600"});case"lib":return n.jsx(pl,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return n.jsx(it,{className:"w-6 h-6 text-primary-600"})}};function Di({message:s="Loading packages..."}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function Od({error:s,onRetry:a}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx(De,{className:"w-12 h-12 text-red-500 mx-auto"}),n.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&n.jsx("button",{onClick:a,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function rf({stats:s}){return n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[n.jsx("div",{className:"bg-gray-100 p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 rounded-lg",children:n.jsx(it,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.total})]})]})}),n.jsx("div",{className:"bg-green-100 p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:n.jsx(Pt,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Healthy"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:s.healthy})]})]})}),n.jsx("div",{className:"bg-yellow-100 p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-yellow-100 rounded-lg",children:n.jsx(De,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Warnings"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:s.warnings})]})]})}),n.jsx("div",{className:"bg-red-100 p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:n.jsx(Lt,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Errors"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:s.errors})]})]})})]})}function sf({filters:s,onFiltersChange:a,availableTypes:i,availableStatuses:c}){return n.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between space-y-4 md:space-y-0 md:space-x-4",children:[n.jsxs("div",{className:"flex-1 relative",children:[n.jsx(Fi,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),n.jsx("input",{type:"text",placeholder:"Search packages by name, description, or tags...",value:s.search,onChange:d=>a({...s,search:d.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(vl,{className:"h-5 w-5 text-gray-400"}),n.jsxs("select",{value:s.type,onChange:d=>a({...s,type:d.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Types"}),i.map(d=>n.jsx("option",{value:d,children:d.charAt(0).toUpperCase()+d.slice(1)},d))]})]}),n.jsxs("select",{value:s.status,onChange:d=>a({...s,status:d.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Status"}),c.map(d=>n.jsx("option",{value:d,children:d.charAt(0).toUpperCase()+d.slice(1)},d))]})]})]})})}const lf=s=>({total:s.length,healthy:s.filter(a=>a.status==="healthy").length,warnings:s.filter(a=>a.status==="warning").length,errors:s.filter(a=>a.status==="error").length}),af=s=>[...new Set(s.map(a=>a.type))],of=s=>[...new Set(s.map(a=>a.status))],cf=(s,a)=>s.filter(i=>{const c=i.name.toLowerCase().includes(a.search.toLowerCase())||i.description.toLowerCase().includes(a.search.toLowerCase()),d=a.type==="all"||i.type===a.type,m=a.status==="all"||i.status===a.status;return c&&d&&m}),uf=(s,a)=>[...s].sort((i,c)=>{let d,m;switch(a.field){case"name":d=i.name.toLowerCase(),m=c.name.toLowerCase();break;case"version":d=i.version,m=c.version;break;case"lastUpdated":d=new Date(i.lastUpdated),m=new Date(c.lastUpdated);break;case"dependencies":d=Object.keys(i.dependencies).length,m=Object.keys(c.dependencies).length;break;default:return 0}return d<m?a.order==="asc"?-1:1:d>m?a.order==="asc"?1:-1:0}),zd=s=>{switch(s){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";case"building":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},Fd=s=>{switch(s){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";case"service":return"bg-green-100 text-green-800";default:return"bg-gray-100 text-gray-800"}},df=s=>{switch(s){case"up-to-date":return"bg-green-100 text-green-800";case"outdated":return"bg-yellow-100 text-yellow-800";case"major-update":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},mf=s=>{switch(s){case"feature":return"bg-blue-100 text-blue-800";case"fix":return"bg-green-100 text-green-800";case"chore":return"bg-gray-100 text-gray-800";case"breaking":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},Ai=s=>new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Dd=s=>s.startsWith("v")?s:`v${s}`,Ad=s=>{switch(s){case"app":return n.jsx(dn,{className:"w-6 h-6 text-primary-600"});case"lib":return n.jsx(pl,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";case"service":return"🌐";default:return n.jsx(it,{className:"w-6 h-6 text-primary-600"})}};function hf({packages:s,sorting:a,onSortChange:i}){const c=m=>{const h=a.field===m&&a.order==="asc"?"desc":"asc";i({field:m,order:h})},d=m=>a.field!==m?null:a.order==="asc"?n.jsx(_i,{className:"w-4 h-4"}):n.jsx(Td,{className:"w-4 h-4"});return n.jsx("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>c("name"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Package"}),d("name")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>c("version"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Version"}),d("version")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>c("dependencies"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Dependencies"}),d("dependencies")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>c("lastUpdated"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Last Updated"}),d("lastUpdated")]})}),n.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Maintainers"})]})}),n.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(m=>n.jsxs("tr",{className:"hover:bg-gray-50",children:[n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"text-2xl mr-3",children:Ad(m.type)}),n.jsxs("div",{children:[n.jsx(Dt,{to:`/packages/${encodeURIComponent(m.name)}`,className:"text-sm font-medium text-blue-600 hover:text-blue-500",children:m.name}),n.jsx("div",{className:"text-sm text-gray-500",children:m.description})]})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:"text-sm font-mono text-gray-900",children:Dd(m.version)})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Fd(m.type)}`,children:m.type})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${zd(m.status)}`,children:m.status})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(m.dependencies).length>0&&n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(m.dependencies).slice(0,3).join(", "),Object.keys(m.dependencies).length>3&&` +${Object.keys(m.dependencies).length-3} more`]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Ai(m.lastUpdated)}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex -space-x-1",children:[m.maintainers.slice(0,3).map((h,g)=>n.jsx("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-500 text-xs font-medium text-white",title:h,children:h.charAt(0).toUpperCase()},h)),m.maintainers.length>3&&n.jsxs("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-300 text-xs font-medium text-gray-600",children:["+",m.maintainers.length-3]})]})})]},m.name))})]})})})}function xf({packageData:s}){const a=i=>{switch(i){case"healthy":return n.jsx(Pt,{className:"h-5 w-5 text-green-500"});case"warning":return n.jsx(De,{className:"h-5 w-5 text-yellow-500"});case"error":return n.jsx(De,{className:"h-5 w-5 text-red-500"});default:return n.jsx(At,{className:"h-5 w-5 text-gray-500"})}};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"mb-6",children:n.jsxs(Dt,{to:"/packages",className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-700",children:[n.jsx(xx,{className:"mr-2 h-4 w-4"}),"Back to Packages"]})}),n.jsxs("div",{className:"bg-white rounded-lg shadow border p-6 mb-6",children:[n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex items-start space-x-4",children:[n.jsx("div",{className:"text-4xl",children:Ad(s.type)}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s.name}),n.jsx("p",{className:"text-gray-600 mt-1",children:s.description}),n.jsxs("div",{className:"flex items-center space-x-4 mt-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Version:"}),n.jsx("span",{className:"text-sm font-mono bg-gray-100 px-2 py-1 rounded",children:Dd(s.version)})]}),n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Fd(s.type)}`,children:s.type}),n.jsxs("div",{className:"flex items-center space-x-1",children:[a(s.status),n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${zd(s.status)}`,children:s.status})]})]})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"Health Score"}),n.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:[s.packageHealth?.packageOverallScore??"","%"]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mt-6 pt-6 border-t border-gray-200",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Id,{className:"h-4 w-4 text-gray-400"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-xs text-gray-500",children:"Last Updated"}),n.jsx("div",{className:"text-sm font-medium",children:Ai(s.lastUpdated)})]})]}),n.jsxs("div",{className:"hidden flex items-center space-x-2",children:[n.jsx(fx,{className:"h-4 w-4 text-gray-400"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-xs text-gray-500",children:"Maintainers"}),n.jsx("div",{className:"text-sm font-medium",children:s.maintainers.length})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(zi,{className:"h-4 w-4 text-gray-400"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-xs text-gray-500",children:"License"}),n.jsx("div",{className:"text-sm font-medium",children:s.license})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"h-4 w-4 text-gray-400",children:n.jsx(gl,{className:"h-4 w-4 text-gray-400"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-xs text-gray-500",children:"Repository"}),n.jsx("div",{className:"text-sm font-medium truncate",children:n.jsx("a",{href:s.repository.url||"",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-500",children:s.repository?.url?.split("/").pop()})})]})]})]}),s.tags?.length>0&&n.jsxs("div",{className:"mt-4",children:[n.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Tags"}),n.jsx("div",{className:"flex flex-wrap gap-2",children:s.tags.map(i=>n.jsx("span",{className:"inline-flex px-2 py-1 text-xs bg-gray-100 text-gray-700 rounded-full",children:i},i))})]})]})]})}function ff({activeTab:s,onTabChange:a}){const i=[{id:"overview",label:"Overview",icon:it},{id:"dependencies",label:"Dependencies",icon:Oi},{id:"commits",label:"Recent Commits",icon:At},{id:"health",label:"Health Metrics",icon:Ii},{id:"config",label:"Configuration",icon:Cn}];return n.jsx("div",{className:"border-b border-gray-200",children:n.jsx("nav",{className:"flex space-x-8",children:i.map(c=>{const d=c.icon;return n.jsxs("button",{onClick:()=>a(c.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${s===c.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[n.jsx(d,{className:"w-4 h-4"}),n.jsx("span",{children:c.label})]},c.id)})})})}function pf({packageData:s}){if(!s.dependenciesInfo.length)return n.jsx("p",{className:"py-6 text-gray-600",children:"No dependency found."});const a=(i,c)=>n.jsxs("div",{className:"mb-8",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:c}),n.jsx("div",{className:"bg-white border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current"}),n.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Latest"}),n.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),n.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:i.map(d=>n.jsxs("tr",{className:"hover:bg-gray-50",children:[n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("div",{className:"text-sm font-medium text-gray-900",children:d.name})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:"text-sm font-mono text-gray-700",children:d.version})}),n.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:"text-sm font-mono text-gray-700",children:d.latest})}),n.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${df(d.status)}`,children:d.status.replace("-"," ")})}),n.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm",children:d.status!=="up-to-date"&&n.jsxs("button",{className:"text-blue-600 hover:text-blue-500 flex items-center space-x-1",children:[n.jsx(_i,{className:"w-4 h-4"}),n.jsx("span",{children:"Update"})]})})]},d.name))})]})})]});return n.jsxs("div",{className:"py-6",children:[a(s.dependenciesInfo.filter(i=>i.type=="dependency"),"Dependencies"),a(s.dependenciesInfo.filter(i=>i.type=="devDependency"),"Dev Dependencies"),a(s.dependenciesInfo.filter(i=>i.type=="peerDependency"),"Peer Dependencies"),n.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Dependency Summary"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-blue-800",children:"Total Dependencies:"}),n.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.type=="dependency").length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-blue-800",children:"Dev Dependencies:"}),n.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.type=="devDependency").length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-blue-800",children:"Peer Dependencies:"}),n.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.type=="peerDependency").length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-blue-800",children:"Outdated:"}),n.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.status==="outdated").length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-blue-800",children:"Major Updates:"}),n.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.status==="major-update").length})]})]})]})]})}function gf({packageData:s}){return n.jsxs("div",{className:"py-6",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Recent Commits"}),n.jsx("div",{className:"space-y-4",children:s.commits.map(a=>n.jsx("div",{className:"bg-white border rounded-lg p-4 hover:shadow-md transition-shadow",children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mf(a.type)}`,children:a.type}),n.jsx("span",{className:"text-sm font-mono text-gray-500",children:a.hash})]}),n.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:a.message}),n.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[n.jsxs("span",{children:["by ",a.author]}),n.jsx("span",{children:Ai(a.date)})]})]}),n.jsx("div",{className:"hidden ml-4",children:n.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm",children:"View Diff"})})]})},a.hash))}),s.commits.length===0&&n.jsxs("div",{className:"text-center py-8",children:[n.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),n.jsx("p",{className:"text-gray-500",children:"No recent commits found"})]}),n.jsxs("div",{className:"mt-6 bg-gray-50 border border-gray-200 rounded-lg p-4",children:[n.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Commit Summary"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-800",children:"Features:"}),n.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="feat").length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-800",children:"Fixes:"}),n.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="fix").length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-800",children:"Chores:"}),n.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="chore").length})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium text-gray-800",children:"Breaking:"}),n.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="breaking").length})]})]})]})]})}function vf({packageData:s}){const a=m=>m>=80?"text-green-600":m>=60?"text-yellow-600":"text-red-600",i=m=>{switch(m){case"success":return n.jsx(Pt,{className:"w-5 h-5 text-green-500"});case"failed":return n.jsx(Lt,{className:"w-5 h-5 text-red-500"});case"running":return n.jsx("div",{className:"w-5 h-5 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"});default:return n.jsx(De,{className:"w-5 h-5 text-gray-500"})}},c=m=>{switch(m){case"success":return"bg-green-100 text-green-800";case"failed":return"bg-red-100 text-red-800";case"running":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},d=m=>{switch(m){case"pass":return"bg-green-100 text-green-800";case"fail":return"bg-red-100 text-red-800";case"warning":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}};return s.packageHealth?.packageOverallScore?n.jsxs("div",{className:"py-6",children:[n.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Health Score"}),n.jsxs("div",{className:`text-3xl font-bold ${a(s.packageHealth.packageOverallScore)}`,children:[s.packageHealth.packageOverallScore,"%"]})]}),n.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3 mb-4",children:n.jsx("div",{className:`h-3 rounded-full transition-all duration-300 ${s.packageHealth.packageOverallScore>=80?"bg-green-500":s.packageHealth.packageOverallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${s.packageHealth.packageOverallScore}%`}})}),n.jsxs("p",{className:"text-sm text-gray-600",children:[s.packageHealth.packageOverallScore>=80&&"Excellent health - package is in great condition",s.packageHealth.packageOverallScore>=60&&s.packageHealth.packageOverallScore<80&&"Good health - minor issues detected",s.packageHealth.packageOverallScore<60&&"Needs attention - several issues require fixing"]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[n.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Build Status"}),i(s.packageHealth.packageBuildStatus)]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(s.packageHealth.packageBuildStatus)}`,children:s.packageHealth.packageBuildStatus}),n.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Logs"})]})]}),n.jsxs("div",{className:"hidden bg-white border rounded-lg p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Test Coverage"}),n.jsxs("div",{className:`text-lg font-semibold ${s.packageHealth.packageTestCoverage>=80?"text-green-600":s.packageHealth.packageTestCoverage>=60?"text-yellow-600":"text-red-600"}`,children:[s.packageHealth.packageTestCoverage,"%"]})]}),n.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:n.jsx("div",{className:`h-2 rounded-full ${s.packageHealth.packageTestCoverage>=80?"bg-green-500":s.packageHealth.packageTestCoverage>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${s.packageHealth.packageTestCoverage}%`}})})]}),n.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Lint Status"}),s.packageHealth.packageLintStatus==="pass"&&n.jsx(Pt,{className:"w-5 h-5 text-green-500"}),s.packageHealth.packageLintStatus==="fail"&&n.jsx(Lt,{className:"w-5 h-5 text-red-500"}),s.packageHealth.packageLintStatus==="warning"&&n.jsx(De,{className:"w-5 h-5 text-yellow-500"})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${d(s.packageHealth.packageLintStatus)}`,children:s.packageHealth.packageLintStatus}),n.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Issues"})]})]})]}),n.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[n.jsx("h4",{className:"text-lg font-medium text-gray-900 mb-4",children:"Detailed Metrics"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Dependencies"}),n.jsxs("div",{className:"space-y-2 text-sm",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Total Dependencies:"}),n.jsx("span",{className:"font-medium",children:Object.keys(s.dependenciesInfo).length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Outdated:"}),n.jsx("span",{className:"font-medium text-yellow-600",children:s.dependenciesInfo.filter(m=>m.status==="outdated").length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Major Updates Available:"}),n.jsx("span",{className:"font-medium text-red-600",children:s.dependenciesInfo.filter(m=>m.status==="major-update").length})]})]})]}),n.jsxs("div",{children:[n.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Code Quality"}),n.jsxs("div",{className:"space-y-2 text-sm",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Build Status:"}),n.jsx("span",{className:`font-medium ${s.packageHealth.packageBuildStatus==="success"?"text-green-600":s.packageHealth.packageBuildStatus==="failed"?"text-red-600":"text-yellow-600"}`,children:s.packageHealth.packageBuildStatus})]}),n.jsxs("div",{className:"hidden flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Test Coverage:"}),n.jsxs("span",{className:"font-medium",children:[s.packageHealth.packageTestCoverage,"%"]})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Lint Status:"}),n.jsx("span",{className:`font-medium ${s.packageHealth.packageLintStatus==="pass"?"text-green-600":s.packageHealth.packageLintStatus==="fail"?"text-red-600":"text-yellow-600"}`,children:s.packageHealth.packageLintStatus})]})]})]})]})]})]}):n.jsx("p",{className:"py-6 text-gray-600",children:"No health data available."})}function yf({packageData:s}){const[a,i]=w.useState(!1),[c,d]=w.useState(""),[m,h]=w.useState(!1),[g,f]=w.useState(""),[b,E]=w.useState(null),[S,T]=w.useState(!1),M=()=>{const A={name:s.name,version:s.version,description:s.description||"",license:s.license||"",repository:s.repository||{},scripts:s.scripts||{},dependencies:s.dependencies||{},devDependencies:s.devDependencies||{},peerDependencies:s.peerDependencies||{}};return JSON.stringify(A,null,2)};w.useState(()=>{d(M())});const R=()=>{i(!0),d(M()),f("")},I=()=>{i(!1),d(M()),f("")},P=async()=>{if(!c.trim()){f("Configuration cannot be empty");return}h(!0),f("");try{const A=await xt.updatePackageConfiguration(s.name,c,s.path);if(A.success)f("Configuration updated successfully!"),i(!1);else throw new Error(A.message||"Update failed")}catch(A){console.error("Error saving configuration:",A),f(A instanceof Error?A.message:"Failed to save configuration. Please try again.")}finally{h(!1)}},$=A=>{d(A.target.value),g&&f("")},L=async(A,G,se)=>{try{await navigator.clipboard.writeText(A),G==="config"?(T(!0),setTimeout(()=>T(!1),4e3)):G==="script"&&se&&(E(se),setTimeout(()=>E(null),4e3))}catch(me){console.error("Failed to copy to clipboard:",me);const J=document.createElement("textarea");J.value=A,document.body.appendChild(J),J.select();try{document.execCommand("copy"),G==="config"?(T(!0),setTimeout(()=>T(!1),2e3)):G==="script"&&se&&(E(se),setTimeout(()=>E(null),2e3))}catch(de){console.error("Fallback copy failed:",de),G==="config"&&f("Failed to copy to clipboard")}document.body.removeChild(J)}};return n.jsxs("div",{className:"py-6",children:[n.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(Oi,{className:"w-5 h-5 text-gray-600"}),n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Scripts"})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(s.scripts).map(([A,G])=>n.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:A}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("button",{onClick:()=>L(G,"script",A),className:`text-sm flex items-center space-x-1 ${b===A?"text-green-600":"text-gray-600 hover:text-gray-700"}`,title:"Copy command to clipboard",children:b===A?n.jsxs(n.Fragment,{children:[n.jsx(rd,{className:"w-4 h-4"}),n.jsx("span",{children:"Copied!"})]}):n.jsxs(n.Fragment,{children:[n.jsx(nd,{className:"w-4 h-4"}),n.jsx("span",{children:"Copy"})]})}),n.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"Run"})]})]}),n.jsx("code",{className:"text-xs text-gray-600 bg-gray-100 p-2 rounded block overflow-x-auto",children:G})]},A))}),Object.keys(s.scripts).length===0&&n.jsxs("div",{className:"text-center py-8",children:[n.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),n.jsx("p",{className:"text-gray-500",children:"No scripts configured"})]})]}),n.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Configuration"}),!a&&n.jsx("div",{className:"text-sm text-gray-500",children:"Read-only preview"})]}),a?n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg",children:n.jsx("textarea",{value:c,onChange:$,className:"w-full h-96 bg-gray-900 text-gray-100 text-sm font-mono resize-none focus:outline-none focus:ring-2 focus:ring-blue-500 rounded",spellCheck:"false"})}),g&&n.jsx("div",{className:`p-3 rounded-lg text-sm ${g.includes("successfully")?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:g}),n.jsxs("div",{className:"flex space-x-3",children:[n.jsx("button",{onClick:P,disabled:m,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed text-sm flex items-center space-x-2",children:m?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),n.jsx("span",{children:"Saving..."})]}):n.jsx("span",{children:"Save Changes"})}),n.jsx("button",{onClick:I,disabled:m,className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed text-sm",children:"Cancel"})]})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:n.jsx("pre",{className:"text-sm",children:c})}),n.jsxs("div",{className:"mt-4 flex space-x-3",children:[n.jsx("button",{onClick:R,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 text-sm",children:"Edit Configuration"}),n.jsx("button",{onClick:()=>L(a?c:M(),"config"),className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 text-sm flex items-center space-x-2",children:S?n.jsxs(n.Fragment,{children:[n.jsx(rd,{className:"w-4 h-4 text-green-600"}),n.jsx("span",{children:"Copied!"})]}):n.jsxs(n.Fragment,{children:[n.jsx(nd,{className:"w-4 h-4"}),n.jsx("span",{children:"Copy"})]})})]})]})]})]})}const id={title:"Monorepo Dashboard",description:"Visual management and monitoring of your monorepo packages",packageTypes:["app","lib","tool"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{primaryColor:"#3B82F6",secondaryColor:"#1E40AF"}};function jf(){const[s,a]=w.useState(),[i,c]=w.useState(""),[d,m]=w.useState("all"),[h,g]=w.useState(id),[f,b]=w.useState(!1),[E,S]=w.useState(!1),[T,M]=w.useState(!0),[R,I]=w.useState(null),[P,$]=w.useState(!1);w.useEffect(()=>{(async()=>{try{M(!0);const de=await xt.getPackages();a(de),I(null)}catch(de){I("Failed to fetch packages"),console.error("Error fetching packages:",de)}finally{M(!1)}})()},[]),w.useEffect(()=>{const J=localStorage.getItem("monodog-config");J&&g({...id,...JSON.parse(J)})},[]);const L=J=>{g(J),localStorage.setItem("monodog-config",JSON.stringify(J))},A=async()=>{try{$(!0),I(null),M(!0);try{const J=await xt.refreshPackages();a(J),I(null)}catch(J){I("Failed to fetch package data"),console.error("Error fetching package data:",J)}finally{M(!1)}}catch(J){I("Failed to refresh package data"),console.error("Error refreshing package data:",J)}finally{$(!1)}};if(T&&!s)return n.jsx(Di,{});if(R)return n.jsx(Od,{error:R,onRetry:A});const G=ef(s??[],i,d),se=qx(s??[]),me=Jx(s??[]);return n.jsxs("div",{className:"p-6 space-y-6",children:[P&&s&&n.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing packages..."})]})}),n.jsx(Wx,{config:h,onShowSetupGuide:()=>S(!0),onShowConfig:()=>b(!0),onRefresh:A}),n.jsx(Qx,{stats:me}),n.jsx(Yx,{}),n.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[n.jsx(Gx,{searchTerm:i,selectedType:d,packageTypes:se,onSearchChange:c,onTypeChange:m}),n.jsx(Kx,{packages:G,getTypeIcon:nf,getStatusColor:tf})]}),n.jsx(Ix,{isOpen:f,onClose:()=>b(!1),onSave:L,currentConfig:h}),n.jsx(Vx,{isOpen:E,onClose:()=>S(!1),onComplete:()=>S(!1)})]})}function wf(){const[s,a]=w.useState([]),[i,c]=w.useState(!0),[d,m]=w.useState(null),[h,g]=w.useState({search:"",type:"all",status:"all"}),[f,b]=w.useState({field:"name",order:"asc"});w.useEffect(()=>{(async()=>{try{c(!0);const $=await xt.getPackages();a($),m(null)}catch($){m("Failed to fetch packages"),console.error("Error fetching packages:",$)}finally{c(!1)}})()},[]);const E=()=>{window.location.reload()},S=cf(s,h),T=uf(S,f),M=lf(s),R=af(s),I=of(s);return i?n.jsx(Di,{}):d?n.jsx(Od,{error:d,onRetry:E}):n.jsxs("div",{className:"space-y-6",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{children:[n.jsx("h1",{className:"text-heading text-2xl",children:"Packages Overview"}),n.jsx("p",{className:"text-body mt-1",children:"Manage and monitor all packages in your monorepo"})]})}),n.jsx(rf,{stats:M}),n.jsx(sf,{filters:h,onFiltersChange:g,availableTypes:R,availableStatuses:I}),n.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[n.jsxs("span",{children:["Showing ",T.length," of ",s.length," packages",h.search&&` matching "${h.search}"`]}),n.jsxs("span",{children:[h.type!=="all"&&`Filtered by type: ${h.type}`,h.status!=="all"&&` • status: ${h.status}`]})]}),n.jsx(hf,{packages:T,sorting:f,onSortChange:b}),T.length===0&&!i&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"text-neutral-400 text-6xl mb-4 flex justify-center",children:n.jsx(it,{className:"w-6 h-6 text-primary-600"})}),n.jsx("h3",{className:"text-heading text-lg mb-2",children:"No packages found"}),n.jsx("p",{className:"text-body mb-4",children:h.search||h.type!=="all"||h.status!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first package to the monorepo."}),(h.search||h.type!=="all"||h.status!=="all")&&n.jsx("button",{onClick:()=>g({search:"",type:"all",status:"all"}),className:"text-primary-600 hover:text-primary-500",children:"Clear Filters"})]})]})}function Nf(){const{name:s}=zh(),[a,i]=w.useState(null),[c,d]=w.useState("overview");if(w.useEffect(()=>{(async()=>{try{const g=await xt.getPackage(s??"");i(g)}catch(g){console.error("Error fetching packages:",g)}})()},[s]),!a)return n.jsx(Di,{message:"Loading package details..."});const m=()=>{switch(c){case"overview":return n.jsx("div",{className:"py-6",children:n.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Package Overview"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Description"}),n.jsx("p",{className:"text-gray-600 mb-4",children:a.description}),n.jsx("h4",{className:"hidden text-sm font-medium text-gray-700 mb-2",children:"Maintainers"}),n.jsx("div",{className:"space-y-1",children:Object.keys(a.maintainers).map(h=>n.jsx("div",{className:"text-sm text-gray-600",children:h},h))})]}),n.jsxs("div",{children:[n.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Quick Stats"}),n.jsxs("div",{className:"space-y-2 text-sm",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Dependencies:"}),n.jsx("span",{className:"font-medium",children:a.dependenciesInfo.filter(h=>h.type=="dependency").length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Dev Dependencies:"}),n.jsx("span",{className:"font-medium",children:a.dependenciesInfo.filter(h=>h.type=="devDependency").length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Peer Dependencies:"}),n.jsx("span",{className:"font-medium",children:a.dependenciesInfo.filter(h=>h.type=="peerDependency").length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Scripts:"}),n.jsx("span",{className:"font-medium",children:Object.keys(a.scripts).length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Recent Commits:"}),n.jsx("span",{className:"font-medium",children:a.commits?.length})]})]})]})]})]})});case"dependencies":return n.jsx(pf,{packageData:a});case"commits":return n.jsx(gf,{packageData:a});case"health":return n.jsx(vf,{packageData:a});case"config":return n.jsx(yf,{packageData:a});default:return null}};return n.jsxs("div",{className:"space-y-6",children:[n.jsx(xf,{packageData:a}),n.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[n.jsx(ff,{activeTab:c,onTabChange:d}),n.jsx("div",{className:"px-6",children:m()})]})]})}function bf({message:s="Loading dependency graph..."}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function kf({error:s,onRetry:a}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx(De,{className:"w-12 h-12 text-red-500 mx-auto"}),n.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&n.jsx("button",{onClick:a,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function Sf({onRefresh:s,loading:a=!1}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Dependency Graph"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Visualize package dependencies and relationships"})]}),s&&n.jsxs("button",{onClick:s,disabled:a,className:"hidden bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[n.jsx(cn,{className:`w-5 h-5 ${a?"animate-spin":""}`}),n.jsx("span",{children:"Refresh"})]})]})}function Cf({viewMode:s,onViewModeChange:a,layout:i,onLayoutChange:c,showLegend:d,onToggleLegend:m,zoomLevel:h,onZoomChange:g}){return n.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-sm font-medium text-gray-700",children:"View:"}),n.jsxs("div",{className:"flex rounded-lg border border-gray-300 overflow-hidden",children:[n.jsxs("button",{onClick:()=>a("graph"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${s==="graph"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[n.jsx(yx,{className:"w-4 h-4"}),n.jsx("span",{children:"Graph"})]}),n.jsxs("button",{onClick:()=>a("list"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${s==="list"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[n.jsx(vx,{className:"w-4 h-4"}),n.jsx("span",{children:"List"})]})]})]}),s==="graph"&&n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Layout:"}),n.jsxs("select",{value:i,onChange:f=>c(f.target.value),className:"border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"hierarchical",children:"Hierarchical"}),n.jsx("option",{value:"circular",children:"Circular"}),n.jsx("option",{value:"force",children:"Force-Directed"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Zoom:"}),n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("button",{onClick:()=>g(Math.max(.5,h-.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:h<=.5,children:n.jsx(bx,{className:"w-4 h-4"})}),n.jsxs("span",{className:"text-sm text-gray-600 min-w-[3rem] text-center",children:[Math.round(h*100),"%"]}),n.jsx("button",{onClick:()=>g(Math.min(2,h+.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:h>=2,children:n.jsx(Nx,{className:"w-4 h-4"})})]})]})]}),n.jsxs("button",{onClick:m,className:`px-3 py-2 text-sm font-medium rounded-lg flex items-center space-x-1 transition-colors ${d?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[n.jsx(nr,{className:"w-4 h-4"}),n.jsx("span",{children:"Legend"})]})]})}const Bd=s=>{switch(s){case"healthy":return"text-green-600 bg-green-100";case"warning":return"text-yellow-600 bg-yellow-100";case"error":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},$d=s=>{switch(s){case"app":return"text-blue-600 bg-blue-100";case"lib":return"text-purple-600 bg-purple-100";case"tool":return"text-orange-600 bg-orange-100";default:return"text-gray-600 bg-gray-100"}},od=(s,a)=>{const i=a.find(c=>c.name===s);if(!i)return"text-gray-400";switch(i.status){case"healthy":return"text-green-500";case"warning":return"text-yellow-500";case"error":return"text-red-500";default:return"text-gray-400"}},Ef=s=>{const a=s.length,i=s.reduce((f,b)=>f+Object.keys(b.dependencies).length,0),c=s.filter(f=>Object.keys(f.dependencies).length===0).length,d=s.filter(f=>f.dependents.length===0).length,m=Pf(s),h=a>0?i/a:0,g=Ud(s);return{totalPackages:a,totalDependencies:i,circularDependencies:g.length,leafPackages:c,rootPackages:d,maxDepth:m,avgDependencies:Math.round(h*10)/10}},Pf=s=>{const a=new Set;let i=0;const c=(d,m)=>{if(a.has(d))return m;a.add(d);const h=s.find(f=>f.name===d);if(!h)return m;let g=m;for(const f of Object.keys(h.dependencies)){const b=c(f,m+1);g=Math.max(g,b)}return g};for(const d of s)if(!a.has(d.name)){const m=c(d.name,0);i=Math.max(i,m)}return i},Ud=s=>{const a=[],i=new Set,c=new Set,d=[],m=h=>{if(c.has(h)){const f=d.indexOf(h),b=d.slice(f).concat(h);return a.push({cycle:b,severity:b.length>5?"high":b.length>3?"medium":"low",impact:`Circular dependency involving ${b.length} packages`}),!0}if(i.has(h))return!1;i.add(h),c.add(h),d.push(h);const g=s.find(f=>f.name===h);if(g){for(const f of Object.keys(g.dependencies))if(m(f))return!0}return c.delete(h),d.pop(),!1};for(const h of s)i.has(h.name)||m(h.name);return a},Lf=(s,a,i)=>[...s].sort((c,d)=>{let m,h;switch(a){case"name":m=c.name.toLowerCase(),h=d.name.toLowerCase();break;case"dependencies":m=Object.keys(c.dependencies).length,h=Object.keys(d.dependencies).length;break;case"dependents":m=c.dependents.length,h=d.dependents.length;break;case"status":{const g={error:0,warning:1,healthy:2};m=g[c.status]||3,h=g[d.status]||3;break}default:return 0}return m<h?i==="asc"?-1:1:m>h?i==="asc"?1:-1:0}),Tf=(s,a,i=800,c=600)=>{switch(a){case"hierarchical":return Mf(s,i,c);case"circular":return _f(s,i,c);case"force":return If(s,i,c);default:return s}},Mf=(s,a,i)=>{const c=[],d=new Set,m=(h,g)=>{if(d.has(h))return;d.add(h),c[g]||(c[g]=[]),c[g].push(h);const f=s.find(b=>b.name===h);f&&f.dependents.forEach(b=>m(b,g+1))};return s.filter(h=>Object.keys(h.dependencies).length===0&&h.dependents.length>0).forEach(h=>{m(h.name,0)}),c.length===0&&s.filter(h=>Object.keys(h.dependencies).length>0&&h.dependents.length>0).forEach(h=>{m(h.name,0)}),s.map(h=>{const g=c.findIndex(E=>E.includes(h.name)),f=c[g]?.indexOf(h.name)||0,b=c[g]?.length||1;return{...h,x:a/(c.length+1)*(g+1)-50,y:i/(b+1)*(f+1)-25}})},_f=(s,a,i)=>{const c=a/2,d=i/2,m=Math.min(a,i)/3;return s.map((h,g)=>{const f=2*Math.PI*g/s.length;return{...h,x:c+m*Math.cos(f)-50,y:d+m*Math.sin(f)-25}})},If=(s,a,i)=>{const c=s.map((d,m)=>({...d,x:Math.random()*(a-100),y:Math.random()*(i-50)}));for(let d=0;d<50;d++)c.forEach(m=>{let h=0,g=0;c.forEach(f=>{if(f.name!==m.name){const b=m.x-f.x,E=m.y-f.y,S=Math.sqrt(b*b+E*E)||1,T=1e3/(S*S);h+=b/S*T,g+=E/S*T}}),Object.keys(m.dependencies).forEach(f=>{const b=c.find(E=>E.name===f);if(b){const E=b.x-m.x,S=b.y-m.y,T=Math.sqrt(E*E+S*S)||1,M=T*.01;h+=E/T*M,g+=S/T*M}}),m.x+=h*.1,m.y+=g*.1,m.x=Math.max(50,Math.min(a-100,m.x)),m.y=Math.max(25,Math.min(i-50,m.y))});return c},Rf=s=>{switch(s){case"app":return n.jsx(dn,{className:"w-6 h-6 text-primary-600"});case"lib":return n.jsx(pl,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return n.jsx(it,{className:"w-6 h-6 text-primary-600"})}},Of=s=>s.length>12?`${s.substring(0,12)}...`:s,zf=s=>{const a={};return s.forEach(i=>{a[i.name]=[]}),s.forEach(i=>{const c=i.name;[...Object.keys(i.dependencies??{}),...Object.keys(i.devDependencies??{}),...Object.keys(i.peerDependencies??{})].forEach(m=>{a[m]||(a[m]=[]),a[m].includes(c)||a[m].push(c)})}),a};function Ff({packages:s,selectedPackage:a,hoveredPackage:i,onPackageSelect:c,onPackageHover:d,layout:m}){return n.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm border border-gray-200 p-6 min-h-[600px]",children:[n.jsxs("svg",{className:"w-full h-full absolute inset-0",viewBox:"0 0 800 600",children:[s.map(h=>Object.keys(h.dependencies).map(g=>{const f=s.find(E=>E.name===g);if(!f)return null;const b=i===h.name||i===g||a===h.name||a===g;return n.jsxs("g",{children:[n.jsx("defs",{children:n.jsx("marker",{id:`arrow-${h.name}-${g}`,markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:n.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:b?"#3B82F6":"#6B7280"})})}),n.jsx("line",{x1:f.x+50,y1:f.y+25,x2:h.x,y2:h.y+25,stroke:b?"#3B82F6":"#6B7280",strokeWidth:b?"3":"2",markerEnd:`url(#arrow-${h.name}-${g})`,className:"transition-all duration-200",style:{opacity:b?1:.6}})]},`${h.name}-${g}`)})),s.map(h=>{const g=a===h.name,f=i===h.name,b=a&&(Object.keys(h.dependencies).includes(a)||Object.keys(h.dependents).includes(a));return n.jsxs("g",{children:[n.jsx("rect",{x:h.x,y:h.y,width:"100",height:"50",rx:"8",fill:"white",stroke:g?"#3B82F6":b?"#10B981":f?"#6B7280":"#E5E7EB",strokeWidth:g?"3":"2",className:"cursor-pointer transition-all duration-200",style:{filter:f||g||b?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"},onMouseEnter:()=>d(h.name),onMouseLeave:()=>d(null),onClick:()=>c(g?null:h.name)}),n.jsx("text",{x:h.x+50,y:h.y+20,textAnchor:"middle",className:"text-xs font-medium fill-gray-900 pointer-events-none",children:Of(h.name)}),n.jsxs("text",{x:h.x+50,y:h.y+35,textAnchor:"middle",className:"text-xs fill-gray-500 pointer-events-none",children:["v",h.version]}),n.jsx("circle",{cx:h.x+85,cy:h.y+15,r:"6",fill:h.status==="healthy"?"#10B981":h.status==="warning"?"#F59E0B":"#EF4444",className:"pointer-events-none"}),n.jsx("rect",{x:h.x+5,y:h.y+5,width:"12",height:"8",rx:"2",fill:h.type==="app"?"#3B82F6":h.type==="lib"?"#8B5CF6":"#F97316",className:"pointer-events-none"})]},h.name)})]}),s.length===0&&n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:n.jsx(gl,{className:"w-6 h-6 text-primary-600"})}),n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No dependencies found"}),n.jsx("p",{className:"text-gray-600",children:"No package dependencies to display."})]})})]})}function Df({packages:s,selectedPackage:a,onPackageSelect:i,sortBy:c,sortOrder:d,onSortChange:m}){const h=f=>{m(f,c===f&&d==="asc"?"desc":"asc")},g=f=>c!==f?null:d==="asc"?n.jsx(_i,{className:"w-4 h-4"}):n.jsx(Td,{className:"w-4 h-4"});return n.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200",children:[n.jsxs("div",{className:"p-6 border-b border-gray-200",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Dependencies"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Click on a view details to explore its dependencies, commits, configuration and health"})]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[n.jsx("thead",{className:"bg-gray-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>h("name"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Package"}),g("name")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>h("dependencies"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Dependencies"}),g("dependencies")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>h("dependents"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Dependents"}),g("dependents")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(f=>n.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer transition-colors ${a===f.name?"bg-blue-50":""}`,onClick:()=>i(f.name),children:[n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"text-2xl mr-3",children:Rf(f.type)}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium text-gray-900",children:f.name}),n.jsxs("div",{className:"text-sm text-gray-500",children:["v",f.version]})]})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${$d(f.type)}`,children:f.type})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Bd(f.status)}`,children:f.status})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"text-sm text-gray-900",children:[Object.keys(f.dependencies).length,Object.keys(f.dependencies).length>0&&n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(f.dependencies).slice(0,3).join(", "),Object.keys(f.dependencies).length>3&&` +${Object.keys(f.dependencies).length-3} more`]})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"text-sm text-gray-900",children:[f.dependents.length,f.dependents.length>0&&n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[f.dependents.slice(0,3).join(", "),f.dependents.length>3&&` +${f.dependents.length-3} more`]})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:n.jsx(Dt,{to:`/packages/${encodeURIComponent(f.name)}`,className:"text-blue-600 hover:text-blue-500",onClick:b=>b.stopPropagation(),children:"View Details"})})]},f.name))})]})}),s.length===0&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"text-gray-400 text-4xl mb-2 flex justify-center",children:n.jsx(it,{className:"w-6 h-6 text-primary-600"})}),n.jsx("p",{className:"text-gray-500",children:"No packages found"})]})]})}function Af({package:s,packages:a,onClose:i}){return s?n.jsxs("div",{className:"absolute top-4 right-4 bg-white p-4 rounded-lg shadow-lg border border-gray-200 w-80 max-h-[80vh] overflow-y-auto",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:s.name}),n.jsx("button",{onClick:i,className:"text-gray-400 hover:text-gray-600 transition-colors",children:n.jsx(Xr,{className:"w-5 h-5"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${$d(s.type)}`,children:s.type}),n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Bd(s.status)}`,children:s.status})]}),n.jsxs("div",{className:"text-sm text-gray-600",children:["Version: ",n.jsx("span",{className:"font-mono",children:s.version})]})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependencies"}),n.jsxs("span",{className:"text-xs text-gray-500",children:["(",Object.keys(s.dependencies).length,")"]})]}),Object.keys(s.dependencies).length>0?n.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:Object.keys(s.dependencies).map(c=>{const d=a.find(m=>m.name===c);return d?n.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[n.jsx("span",{className:"text-gray-600 truncate",children:d.name}),n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{className:"text-xs text-gray-400",children:d.version}),n.jsx("span",{className:`${od(c,a)}`,children:d.status==="healthy"?"✓":d.status==="warning"?"⚠":"✗"})]})]},c):n.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[c," (not found)"]},c)})}):n.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependencies"})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependents"}),n.jsxs("span",{className:"text-xs text-gray-500",children:["(",s.dependents.length,")"]})]}),s.dependents.length>0?n.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:s.dependents.map(c=>{const d=a.find(m=>m.name===c);return d?n.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[n.jsx("span",{className:"text-gray-600 truncate",children:d.name}),n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{className:"text-xs text-gray-400",children:d.version}),n.jsx("span",{className:`${od(c,a)}`,children:d.status==="healthy"?"✓":d.status==="warning"?"⚠":"✗"})]})]},c):n.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[c," (not found)"]},c)})}):n.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependents"})]}),n.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Impact Analysis"}),n.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{children:"Direct dependencies:"}),n.jsx("span",{className:"font-medium",children:Object.keys(s.dependencies).length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{children:"Direct dependents:"}),n.jsx("span",{className:"font-medium",children:s.dependents.length})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{children:"Risk level:"}),n.jsx("span",{className:`font-medium ${s.dependents.length>5?"text-red-600":s.dependents.length>2?"text-yellow-600":"text-green-600"}`,children:s.dependents.length>5?"High":s.dependents.length>2?"Medium":"Low"})]})]})]}),n.jsx("div",{className:"pt-2 border-t border-gray-200",children:n.jsx(Dt,{to:`/packages/${encodeURIComponent(s.name)}`,className:"block w-full text-center bg-blue-600 text-white px-3 py-2 rounded-lg hover:bg-blue-700 text-sm font-medium transition-colors",children:"View Package Details →"})})]})]}):null}function Bf({stats:s,packages:a}){return n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[n.jsx("div",{className:"bg-gray-100 p-4 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 rounded-lg",children:n.jsx(it,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.totalPackages})]})]})}),n.jsx("div",{className:"bg-blue-100 p-4 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 rounded-lg",children:n.jsx(gl,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Dependencies"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.totalDependencies})]})]})}),n.jsx("div",{className:`${s.circularDependencies>0?"bg-red-100":"bg-green-100"} p-4 rounded-lg shadow border`,children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:`p-2 rounded-lg ${s.circularDependencies>0?"bg-red-100":"bg-green-100"}`,children:n.jsx(De,{className:`w-6 h-6 ${s.circularDependencies>0?"text-red-600":"text-primary-600"}`})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Circular Deps"}),n.jsx("p",{className:`text-2xl font-semibold ${s.circularDependencies>0?"text-red-600":"text-gray-600"}`,children:s.circularDependencies})]})]})}),n.jsx("div",{className:"bg-purple-100 p-4 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:n.jsx(Jr,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Max Depth"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.maxDepth})]})]})}),n.jsxs("div",{className:"md:col-span-4 bg-white p-4 rounded-lg shadow border",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Dependency Analysis"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[n.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[n.jsx("div",{className:"text-2xl font-bold text-blue-600",children:s.leafPackages}),n.jsx("div",{className:"text-sm text-gray-600",children:"Leaf Packages"}),n.jsx("div",{className:"text-xs text-gray-500",children:"No dependencies"})]}),n.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[n.jsx("div",{className:"text-2xl font-bold text-green-600",children:s.rootPackages}),n.jsx("div",{className:"text-sm text-gray-600",children:"Root Packages"}),n.jsx("div",{className:"text-xs text-gray-500",children:"No dependents"})]}),n.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[n.jsx("div",{className:"text-2xl font-bold text-purple-600",children:s.avgDependencies}),n.jsx("div",{className:"text-sm text-gray-600",children:"Avg Dependencies"}),n.jsx("div",{className:"text-xs text-gray-500",children:"Per package"})]}),n.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[n.jsx("div",{className:"text-2xl font-bold text-orange-600",children:a.filter(i=>i.status==="healthy").length}),n.jsx("div",{className:"text-sm text-gray-600",children:"Healthy Packages"}),n.jsxs("div",{className:"text-xs text-gray-500",children:[Math.round(a.filter(i=>i.status==="healthy").length/a.length*100),"% of total"]})]})]})]})]})}function $f({cycles:s,packages:a,onPackageSelect:i}){const c=m=>{switch(m){case"high":return"bg-red-100 text-red-800 border-red-200";case"medium":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"low":return"bg-blue-100 text-blue-800 border-blue-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},d=m=>{switch(m){case"high":return"🔴";case"medium":return"🟡";case"low":return"🔵";default:return"⚪"}};return s.length===0?n.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[n.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[n.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:n.jsx(De,{className:"w-6 h-6 text-green-600"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Dependency cycle analysis"})]})]}),n.jsxs("div",{className:"text-center py-8",children:[n.jsx("div",{className:"text-green-400 text-4xl mb-2"}),n.jsx("h4",{className:"text-green-800 font-medium mb-1",children:"No Circular Dependencies!"}),n.jsx("p",{className:"text-green-700 text-sm",children:"Your dependency graph is clean and free of circular references."})]})]}):n.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[n.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[n.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:n.jsx(De,{className:"w-6 h-6 text-red-600"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),n.jsxs("p",{className:"text-sm text-gray-600",children:["Found ",s.length," circular dependency cycle",s.length>1?"s":""]})]})]}),n.jsx("div",{className:"space-y-4",children:s.map((m,h)=>n.jsxs("div",{className:`border rounded-lg p-4 ${c(m.severity)}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-lg",children:d(m.severity)}),n.jsxs("span",{className:"text-sm font-medium capitalize",children:[m.severity," Severity"]})]}),n.jsxs("span",{className:"text-xs opacity-75",children:[m.cycle.length," packages affected"]})]}),n.jsx("div",{className:"mb-3",children:n.jsx("p",{className:"text-sm mb-2",children:m.impact})}),n.jsx("div",{className:"bg-white bg-opacity-50 rounded-lg p-3",children:n.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[m.cycle.map((g,f)=>n.jsxs(w.Fragment,{children:[n.jsx("button",{onClick:()=>i(g),className:"px-3 py-1 bg-white rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors border shadow-sm",children:g}),f<m.cycle.length-1&&n.jsx(td,{className:"w-4 h-4 text-gray-400"})]},`${g}-${f}`)),m.cycle.length>1&&n.jsxs(n.Fragment,{children:[n.jsx(td,{className:"w-4 h-4 text-gray-400"}),n.jsxs("span",{className:"text-sm text-gray-500 italic",children:["(cycles back to ",m.cycle[0],")"]})]})]})}),n.jsxs("div",{className:"mt-3 pt-3 border-t border-current border-opacity-20",children:[n.jsx("h5",{className:"text-xs font-medium mb-1",children:"Recommendation:"}),n.jsxs("p",{className:"text-xs opacity-90",children:[m.severity==="high"&&"Critical: Refactor immediately to break this cycle. Consider dependency inversion or splitting packages.",m.severity==="medium"&&"Important: Plan to refactor this cycle. Review package boundaries and extract common dependencies.",m.severity==="low"&&"Minor: Monitor this cycle. Consider if these packages could be merged or dependencies restructured."]})]})]},h))}),n.jsx("div",{className:"mt-6 pt-4 border-t border-gray-200",children:n.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-lg font-bold text-red-600",children:s.filter(m=>m.severity==="high").length}),n.jsx("div",{className:"text-xs text-gray-600",children:"High Severity"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-lg font-bold text-yellow-600",children:s.filter(m=>m.severity==="medium").length}),n.jsx("div",{className:"text-xs text-gray-600",children:"Medium Severity"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-lg font-bold text-blue-600",children:s.filter(m=>m.severity==="low").length}),n.jsx("div",{className:"text-xs text-gray-600",children:"Low Severity"})]})]})})]})}function Uf({show:s}){return s?n.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Legend"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Package Types"}),n.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-3 h-2 bg-blue-500 rounded"}),n.jsx("span",{children:"App"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-3 h-2 bg-purple-500 rounded"}),n.jsx("span",{children:"Library"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-3 h-2 bg-orange-500 rounded"}),n.jsx("span",{children:"Tool"})]})]})]}),n.jsxs("div",{children:[n.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Health Status"}),n.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),n.jsx("span",{children:"Healthy"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-3 h-3 bg-yellow-500 rounded-full"}),n.jsx("span",{children:"Warning"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-3 h-3 bg-red-500 rounded-full"}),n.jsx("span",{children:"Error"})]})]})]}),n.jsxs("div",{children:[n.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Visual Elements"}),n.jsxs("div",{className:"space-y-1 text-xs",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs("svg",{width:"16",height:"8",children:[n.jsx("line",{x1:"0",y1:"4",x2:"16",y2:"4",stroke:"#6B7280",strokeWidth:"2",markerEnd:"url(#arrow)"}),n.jsx("defs",{children:n.jsx("marker",{id:"arrow",markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:n.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:"#6B7280"})})})]}),n.jsx("span",{children:"Dependency"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-4 h-3 border-2 border-blue-500 rounded bg-white"}),n.jsx("span",{children:"Selected"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-4 h-3 border-2 border-green-500 rounded bg-white"}),n.jsx("span",{children:"Connected"})]})]})]}),n.jsxs("div",{children:[n.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Interactions"}),n.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[n.jsx("div",{children:"• Click a package to select and view details"}),n.jsx("div",{children:"• Hover to highlight connections"}),n.jsx("div",{children:"• Use toolbar to change layout and zoom"})]})]})]})]}):null}function Hf(){w.useEffect(()=>{(async()=>{try{a(!0);const Ce=await xt.getPackages(),ye=zf(Ce),B=Ce.map(K=>({...K,dependencies:{...K.dependencies,...K.devDependencies,...K.peerDependencies},dependents:ye[K.name]}));m(B),c(null)}catch(Ce){c("Failed to fetch packages"),console.error("Error fetching packages:",Ce)}finally{a(!1)}})()},[]);const[s,a]=w.useState(!1),[i,c]=w.useState(null),[d,m]=w.useState([]),[h,g]=w.useState("graph"),[f,b]=w.useState("hierarchical"),[E,S]=w.useState(null),[T,M]=w.useState(null),[R,I]=w.useState(!0),[P,$]=w.useState(1),[L,A]=w.useState("name"),[G,se]=w.useState("asc"),me=w.useMemo(()=>Tf(d??[],f,800,600),[d,f]),J=w.useMemo(()=>Lf(d,L,G),[d,L,G]),de=w.useMemo(()=>Ef(d),[d]),Ue=w.useMemo(()=>Ud(d),[d]),he=E&&d.find(Ae=>Ae.name===E)||null,Me=()=>{},_e=Ae=>{S(Ae)},Se=(Ae,Ce)=>{A(Ae),se(Ce)},xe=()=>{window.location.reload()};return s?n.jsx(bf,{}):i?n.jsx(kf,{error:i,onRetry:xe}):n.jsxs("div",{className:"space-y-6",children:[n.jsx(Sf,{onRefresh:Me,loading:s}),n.jsx(Bf,{stats:de,packages:d??[]}),Ue.length>0&&n.jsx($f,{cycles:Ue,packages:d,onPackageSelect:_e}),n.jsx(Cf,{viewMode:h,onViewModeChange:g,layout:f,onLayoutChange:b,showLegend:R,onToggleLegend:()=>I(!R),zoomLevel:P,onZoomChange:$}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[n.jsx("div",{className:`${R?"lg:col-span-3":"lg:col-span-4"}`,children:h==="graph"?n.jsxs("div",{className:"relative",children:[n.jsx("div",{style:{transform:`scale(${P})`,transformOrigin:"top left"},children:n.jsx(Ff,{packages:me,selectedPackage:E,hoveredPackage:T,onPackageSelect:_e,onPackageHover:M,layout:f})}),n.jsx(Af,{package:he,packages:d,onClose:()=>S(null)})]}):n.jsx(Df,{packages:J,selectedPackage:E,onPackageSelect:_e,sortBy:L,sortOrder:G,onSortChange:Se})}),R&&n.jsx("div",{className:"lg:col-span-1",children:n.jsx(Uf,{show:R})})]})]})}function Vf(){const[s,a]=w.useState(0),[i,c]=w.useState(null),[d,m]=w.useState(!0),[h,g]=w.useState(null),[f,b]=w.useState(!1);w.useEffect(()=>{(async()=>{try{m(!0);const A=await xt.getHealthStatus();c(A),g(null)}catch(A){g("Failed to fetch health data"),console.error("Error fetching health data:",A)}finally{m(!1)}})()},[s]);const E=async()=>{try{b(!0),g(null),m(!0);try{const L=await xt.refreshHealthStatus();c(L),g(null)}catch(L){g("Failed to fetch health data"),console.error("Error fetching health data:",L)}finally{m(!1)}}catch(L){g("Failed to refresh health data"),console.error("Error refreshing health data:",L)}finally{b(!1)}},S=()=>{a(L=>L+1)},T=L=>{switch(L){case"healthy":case"success":case"pass":case"up-to-date":return"bg-green-100 text-green-800";case"warning":case"warn":case"outdated":return"bg-yellow-100 text-yellow-800";case"error":case"failed":case"fail":case"vulnerable":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};if(d&&!i)return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-600",children:"Loading health data..."})]})});if(h)return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx(De,{className:"w-12 h-12 text-red-500 mx-auto"}),n.jsx("p",{className:"mt-4 text-red-600",children:h}),n.jsx("button",{onClick:S,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})});const M=i?i.summary?.averageScore:0,R=i?i?.packages?.filter(L=>L.health.overallScore>=80).length:0,I=i?i?.packages?.filter(L=>L.health.overallScore>=60&&L.health.overallScore<80).length:0,P=i?i?.packages?.filter(L=>L.health.overallScore<60).length:0,$=[{name:"Package Health",value:R||0,status:(()=>{const L=R||0,A=i?.packages.length||0;if(A===0)return"healthy";const G=L/A;return G>=.8?"healthy":G>=.6?"warning":"error"})(),description:`${R||0} healthy packages out of ${i?.packages.length||0}`},{name:"Overall Score",value:Math.round(M),status:Math.round(M)>=80?"healthy":Math.round(M)>=60?"warning":"error",description:`Average health score: ${Math.round(M)}/100`},{name:"Unhealthy Packages",value:I+P||0,status:(I+P||0)===0?"healthy":(I+P||0)<=2?"warning":"error",description:`${I+P||0} packages need attention`}];return n.jsxs("div",{className:"",children:[n.jsxs("div",{className:"flex items-center justify-between my-3",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Health Status"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Monitor the health and performance of your monorepo packages"})]}),n.jsxs("button",{onClick:E,disabled:f,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[f?n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):n.jsx(cn,{className:"w-5 h-5"}),n.jsx("span",{children:f?"Refreshing...":"Refresh"})]})]}),f&&i&&n.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing health data..."})]})}),n.jsxs("div",{className:"my-3 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg p-6 text-white",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-xl font-semibold",children:"Overall Monorepo Health"}),n.jsx("p",{className:"text-blue-100 mt-1",children:"Based on all package metrics and recent activity"})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("div",{className:"text-4xl font-bold",children:M?.toFixed(2)}),n.jsx("div",{className:"text-blue-100",children:"out of 100"})]})]}),n.jsxs("div",{className:"mt-4 flex space-x-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Pt,{className:"w-5 h-5 text-green-300"}),n.jsxs("span",{children:[R," Healthy"]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(De,{className:"w-5 h-5 text-yellow-300"}),n.jsxs("span",{children:[I," Warnings"]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Lt,{className:"w-5 h-5 text-red-300"}),n.jsxs("span",{children:[P," Errors"]})]})]})]}),n.jsx("div",{className:"my-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:$.map(L=>n.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:L.name}),n.jsx("div",{className:`w-3 h-3 rounded-full ${L.status==="healthy"?"bg-green-500":L.status==="warning"?"bg-yellow-500":"bg-red-500"}`})]}),n.jsx("div",{className:"flex items-end space-x-2",children:n.jsx("span",{className:"text-3xl font-bold text-gray-900",children:L.value})}),n.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${T(L.status)}`,children:L.status}),n.jsx("span",{className:"text-sm text-gray-500",children:L.description})]})]},L.name))}),n.jsxs("div",{className:"my-3 bg-white rounded-lg shadow border overflow-hidden",children:[n.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Health Details"})}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[n.jsx("thead",{className:"bg-gray-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Overall Score"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Build Status"}),n.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Test Coverage"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Lint Status"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Security"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),n.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:i?.packages?.map(L=>n.jsxs("tr",{className:"hover:bg-gray-50",children:[n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:n.jsx("div",{className:"text-sm",children:n.jsx(it,{className:"w-6 h-6 text-primary-600"})})}),n.jsxs("div",{className:"ml-3",children:[n.jsx("div",{className:"text-sm font-medium text-gray-900",children:L.packageName}),n.jsxs("div",{className:"text-sm text-gray-500",children:["Score: ",L.health.overallScore,"/100"]})]})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"w-16 bg-gray-200 rounded-full h-2 mr-2",children:n.jsx("div",{className:`h-2 rounded-full ${L.health.overallScore>=80?"bg-green-500":L.health.overallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${L.health.overallScore}%`}})}),n.jsx("span",{className:"text-sm font-medium text-gray-900",children:L.health.overallScore})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:`w-3 h-3 rounded-full ${L.health.buildStatus==="success"?"bg-green-500":L.health.buildStatus==="unknown"?"bg-yellow-500":"bg-red-500"}`}),n.jsx("span",{className:`ml-2 inline-flex px-2 py-1 text-xs font-semibold rounded-full ${T(L.health.buildStatus==="success"?"healthy":L.health.buildStatus==="unknown"?"warning":"error")}`,children:L.health.buildStatus==="success"?"healthy":L.health.buildStatus==="unknown"?"warning":"error"})]})}),n.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx(jx,{className:"w-4 h-4 text-gray-400 mr-1"}),n.jsx("span",{className:"text-sm text-gray-900",children:"-"})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${T(L.health.lintStatus==="pass"?"pass":L.health.lintStatus==="unknown"?"warn":"fail")}`,children:L.health.lintStatus==="pass"?"pass":L.health.lintStatus==="unknown"?"warn":"fail"})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("div",{className:"flex items-center",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${T(L.health.securityAudit==="pass"?"pass":L.health.securityAudit==="unknown"?"warn":"fail")}`,children:L.health.securityAudit==="pass"?"pass":L.health.securityAudit==="unknown"?"warn":"fail"})})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${T(L.health.overallScore>=80?"up-to-date":L.health.overallScore>=60?"outdated":"vulnerable")}`,children:L.health.overallScore>=80?"up-to-date":L.health.overallScore>=60?"outdated":"vulnerable"})}),n.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm font-medium",children:n.jsx("div",{className:"flex space-x-2",children:n.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"})})})]},L.packageName))})]})})]}),n.jsxs("div",{className:"hidden bg-white rounded-lg shadow border p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Health Recommendations"}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:[n.jsx(De,{className:"w-5 h-5 text-yellow-600 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-yellow-800",children:"Test Coverage Below Target"}),n.jsx("p",{className:"text-sm text-yellow-700",children:"Consider adding more tests to improve coverage above 90%"})]})]}),n.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-red-50 rounded-lg border border-red-200",children:[n.jsx(Lt,{className:"w-5 h-5 text-red-600 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-red-800",children:"Build Failures Detected"}),n.jsx("p",{className:"text-sm text-red-700",children:"monorepo-scanner package has build failures that need immediate attention"})]})]}),n.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg border border-blue-200",children:[n.jsx(Jr,{className:"w-5 h-5 text-blue-600 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-blue-800",children:"Performance Improvements Available"}),n.jsx("p",{className:"text-sm text-blue-700",children:"Consider optimizing build times and dependency resolution"})]})]})]})]})]})}function Wf({packageCount:s,onNewRelease:a}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Publish Control"}),n.jsxs("p",{className:"text-gray-600 mt-1",children:["Manage package releases and versioning across your monorepo (",s," packages)"]})]}),n.jsxs("button",{onClick:a,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[n.jsx(Md,{className:"w-5 h-5"}),n.jsx("span",{children:"New Release"})]})]})}function Qf({stats:s}){return n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[n.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:n.jsx(Mi,{className:"w-6 h-6 text-green-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Ready to Publish"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.readyToPublish})]})]})}),n.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:n.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"In Progress"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.inProgress})]})]})}),n.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:n.jsx("span",{className:"text-2xl",children:n.jsx(dn,{className:"w-6 h-6 text-primary-600"})})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Published Today"}),n.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.published})]})]})})]})}const Yf=s=>({readyToPublish:s.filter(a=>a.status==="ready").length,inProgress:s.filter(a=>a.status==="building"||a.status==="testing").length,published:s.filter(a=>a.status==="published").length}),Hd=s=>{switch(s){case"ready":case"completed":return"bg-green-100 text-green-800";case"building":case"testing":case"in-progress":return"bg-blue-100 text-blue-800";case"published":return"bg-purple-100 text-purple-800";case"failed":return"bg-red-100 text-red-800";case"scheduled":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},Gf=s=>{switch(s){case"patch":return"bg-green-100 text-green-800";case"minor":return"bg-blue-100 text-blue-800";case"major":return"bg-red-100 text-red-800";case"prerelease":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},Kf=(s,a)=>a==="all"?s:s.filter(i=>i.name===a);function Zf({packages:s,selectedPackage:a,onPackageChange:i}){return n.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[n.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Release Status"}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-sm text-gray-500",children:"Filter by package:"}),n.jsxs("select",{value:a,onChange:c=>i(c.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Packages"}),[...new Set(s.map(c=>c.name))].map(c=>n.jsx("option",{value:c,children:c},c))]})]})]})}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[n.jsx("thead",{className:"bg-gray-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current Version"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Next Version"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Commits"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Published"}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(c=>n.jsxs("tr",{className:"hover:bg-gray-50",children:[n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:n.jsx(zi,{className:"w-4 h-4 text-gray-600"})}),n.jsxs("div",{className:"ml-3",children:[n.jsx("div",{className:"text-sm font-medium text-gray-900",children:c.name}),n.jsxs("div",{className:"text-sm text-gray-500",children:[Object.keys(c.dependencies).length," dependencies"]})]})]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.currentVersion}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.nextVersion}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Gf(c.publishType)}`,children:c.publishType})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Hd(c.status)}`,children:c.status})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.commits}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsxs("div",{className:"flex items-center text-sm text-gray-900",children:[n.jsx(At,{className:"w-4 h-4 mr-1 text-gray-400"}),c.lastPublished]})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:n.jsxs("div",{className:"flex space-x-2",children:[c.status==="ready"&&n.jsx("button",{className:"text-green-600 hover:text-green-900",children:"Publish"}),n.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"}),n.jsx("button",{className:"text-purple-600 hover:text-purple-900",children:"Changelog"})]})})]},c.name))})]})})]})}function Xf({releases:s,selectedStatus:a,onStatusChange:i}){const c=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 11:00 AM",startedAt:"2024-01-16 11:05 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"}];return n.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[n.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Release Schedule"}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-sm text-gray-500",children:"Filter by status:"}),n.jsxs("select",{value:a,onChange:d=>i(d.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Status"}),n.jsx("option",{value:"scheduled",children:"Scheduled"}),n.jsx("option",{value:"in-progress",children:"In Progress"}),n.jsx("option",{value:"completed",children:"Completed"}),n.jsx("option",{value:"failed",children:"Failed"})]})]})]})}),n.jsx("div",{className:"p-6",children:n.jsx("div",{className:"space-y-4",children:c.map(d=>n.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"h-8 w-8 rounded-lg bg-purple-100 flex items-center justify-center",children:n.jsx(Id,{className:"w-4 h-4 text-purple-600"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[d.packageName," v",d.version]}),n.jsxs("div",{className:"text-sm text-gray-500",children:["by ",d.author]})]})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Hd(d.status)}`,children:d.status}),n.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[n.jsx(At,{className:"w-4 h-4 mr-1"}),d.scheduledFor]})]})]}),n.jsx("div",{className:"mt-3 text-sm text-gray-700",children:d.changelog})]},d.id))})})]})}function Jf(){const s=[{id:"1",packageName:"dashboard",version:"1.0.0",date:"2024-01-15",changes:["Added new dashboard layout","Improved search functionality","Fixed responsive design issues"],author:"team-frontend",type:"feature"},{id:"2",packageName:"backend",version:"1.2.0",date:"2024-01-14",changes:["Added authentication middleware","Implemented rate limiting","Fixed database connection pool"],author:"team-backend",type:"feature"}],a=i=>{switch(i){case"feature":return"bg-green-100 text-green-800";case"bugfix":return"bg-blue-100 text-blue-800";case"breaking":return"bg-red-100 text-red-800";case"docs":return"bg-gray-100 text-gray-800";default:return"bg-gray-100 text-gray-800"}};return n.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[n.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Changelogs"})}),n.jsx("div",{className:"p-6",children:n.jsx("div",{className:"space-y-6",children:s.map(i=>n.jsxs("div",{className:"border-l-4 border-blue-500 pl-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-100 flex items-center justify-center",children:n.jsx(zi,{className:"w-4 h-4 text-blue-600"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[i.packageName," v",i.version]}),n.jsxs("div",{className:"text-sm text-gray-500",children:[i.date," • by ",i.author]})]})]}),n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${a(i.type)}`,children:i.type})]}),n.jsx("div",{className:"space-y-1",children:i.changes.map((c,d)=>n.jsxs("div",{className:"flex items-start space-x-2",children:[n.jsx(Oi,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),n.jsx("span",{className:"text-sm text-gray-700",children:c})]},d))})]},i.id))})})]})}function qf(){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-600",children:"Loading package data..."})]})})}function ep({error:s,onRetry:a}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx(De,{className:"w-12 h-12 text-red-500 mx-auto"}),n.jsx("p",{className:"mt-4 text-red-600",children:s}),n.jsx("button",{onClick:a,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}const cd=[{name:"dashboard",currentVersion:"1.0.0",nextVersion:"1.0.1",status:"ready",lastPublished:"2024-01-10",changelog:"Bug fixes and performance improvements",commits:15,dependencies:["react","tailwindcss"],publishType:"patch"},{name:"backend",currentVersion:"1.2.0",nextVersion:"1.3.0",status:"building",lastPublished:"2024-01-08",changelog:"New API endpoints and enhanced security",commits:28,dependencies:["express","prisma"],publishType:"minor"},{name:"utils",currentVersion:"0.5.2",nextVersion:"1.0.0",status:"ready",lastPublished:"2024-01-05",changelog:"Major refactor with breaking changes",commits:42,dependencies:["lodash"],publishType:"major"},{name:"ci-status",currentVersion:"0.3.1",nextVersion:"0.4.0",status:"testing",lastPublished:"2024-01-12",changelog:"Enhanced CI monitoring and reporting",commits:18,dependencies:["axios","ws"],publishType:"minor"}],tp=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 09:00 AM",startedAt:"2024-01-16 09:00 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"},{id:"3",packageName:"utils",version:"1.0.0",status:"completed",scheduledFor:"2024-01-15 02:00 PM",startedAt:"2024-01-15 02:00 PM",completedAt:"2024-01-15 02:15 PM",changelog:"Major refactor with breaking changes",author:"team-shared"}];function np(){const[s,a]=w.useState("all"),[i,c]=w.useState("all"),[d,m]=w.useState(cd),[h,g]=w.useState(!1),[f,b]=w.useState(null);w.useEffect(()=>{(async()=>{try{g(!0);const A=(await xt.getPackages()).map(G=>({name:G.name,currentVersion:G.version,nextVersion:E(G.version),status:S(G.status),lastPublished:G.lastUpdated,changelog:G.description||"No changelog available",commits:Math.floor(Math.random()*20)+1,dependencies:G.dependencies||[],publishType:T()}));m(A),b(null)}catch(L){b("Failed to fetch package data"),console.error("Error fetching packages:",L),m(cd)}finally{g(!1)}})()},[]);const E=$=>{const L=$.split(".").map(Number);return L[2]+=1,L.join(".")},S=$=>{switch($){case"healthy":return"ready";case"warning":return"testing";case"error":return"failed";case"building":return"building";default:return"ready"}},T=()=>{const $=["patch","minor","major","prerelease"];return $[Math.floor(Math.random()*$.length)]},M=()=>{},R=()=>{window.location.reload()},I=Kf(d,s),P=Yf(d);return h?n.jsx(qf,{}):f?n.jsx(ep,{error:f,onRetry:R}):n.jsxs("div",{className:"space-y-6",children:[n.jsx(Wf,{packageCount:d.length,onNewRelease:M}),n.jsx(Qf,{stats:P}),n.jsx(Zf,{packages:I,selectedPackage:s,onPackageChange:a}),n.jsx(Xf,{releases:tp,selectedStatus:i,onStatusChange:c}),n.jsx(Jf,{})]})}function rp({message:s="Loading CI/CD data..."}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function sp({error:s,onRetry:a}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx(De,{className:"w-12 h-12 text-red-500 mx-auto"}),n.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&n.jsx("button",{onClick:a,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function lp({onTriggerBuild:s,onCreatePipeline:a}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-heading text-2xl",children:"CI/CD Integration"}),n.jsx("p",{className:"text-body mt-1",children:"Monitor and manage continuous integration and deployment pipelines"})]}),n.jsxs("div",{className:"flex space-x-2",children:[n.jsxs("button",{onClick:s,className:"btn-secondary flex items-center space-x-2",children:[n.jsx(Mi,{className:"w-5 h-5"}),n.jsx("span",{children:"Trigger Build"})]}),n.jsxs("button",{onClick:a,className:"btn-primary flex items-center space-x-2",children:[n.jsx(_d,{className:"w-5 h-5"}),n.jsx("span",{children:"New Pipeline"})]})]})]})}const xl=s=>{switch(s){case"success":case"active":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-yellow-100 text-yellow-800";case"failed":case"cancelled":return"bg-red-100 text-red-800";case"paused":return"bg-gray-100 text-gray-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},ap=s=>{switch(s){case"success":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-gray-100 text-gray-800";case"failed":return"bg-red-100 text-red-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},ip=s=>{const a=s.length,i=s.filter(f=>f.status==="success").length,c=s.filter(f=>f.status==="failed").length,d=s.filter(f=>f.status==="running").length,m=a>0?Math.round(i/a*100):0,h=s.filter(f=>f.duration),g=h.length>0?Math.round(h.reduce((f,b)=>f+(b.duration||0),0)/h.length):0;return{total:a,successful:i,failed:c,running:d,successRate:m,avgDuration:g}},op=(s,a)=>s.filter(i=>{const c=a.package==="all"||i.packageName===a.package,d=a.status==="all"||i.status===a.status;return c&&d&&!0}),cp=s=>[...new Set(s.map(a=>a.packageName))],up=s=>[...new Set(s.map(a=>a.status))],Kr=s=>{if(s<60)return`${s}s`;if(s<3600){const a=Math.floor(s/60),i=s%60;return i>0?`${a}m ${i}s`:`${a}m`}else{const a=Math.floor(s/3600),i=Math.floor(s%3600/60);return i>0?`${a}h ${i}m`:`${a}h`}},ud=s=>new Date(s).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Vd=s=>{const a=new Date(s),c=new Date().getTime()-a.getTime(),d=Math.floor(c/(1e3*60)),m=Math.floor(d/60),h=Math.floor(m/24);return d<1?"Just now":d<60?`${d} min ago`:m<24?`${m} hour${m>1?"s":""} ago`:`${h} day${h>1?"s":""} ago`},dp=s=>{if(s.status==="success"||s.status==="failed"||s.status==="cancelled")return 100;if(s.status==="pending")return 0;const a=s.stages.length;if(a===0)return 0;const i=s.stages.filter(m=>m.status==="success"||m.status==="failed"||m.status==="skipped").length,c=s.stages.filter(m=>m.status==="running").length,d=(i+c*.5)/a;return Math.round(d*100)},mp=s=>{const a=s.toLowerCase();return a.includes("build")||a.includes("compile")?"🔨":a.includes("test")?"🧪":a.includes("lint")||a.includes("format")?"✨":a.includes("deploy")||a.includes("publish")?n.jsx(dn,{className:"w-6 h-6 text-primary-600"}):a.includes("security")||a.includes("audit")?"🔒":a.includes("install")||a.includes("dependencies")?n.jsx(it,{className:"w-6 h-6 text-primary-600"}):n.jsx(Cn,{className:"w-6 h-6 text-primary-600"})},hp=s=>s.status==="failed"?"critical":s.status==="paused"?"warning":s.successRate<70?"critical":s.successRate<85?"warning":"healthy",Wd=s=>s.substring(0,8);function xp({stats:s,onRefresh:a,loading:i=!1}){return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-heading text-lg",children:"Build Statistics"}),n.jsxs("button",{onClick:a,disabled:i,className:"btn-ghost",children:[n.jsx(cn,{className:`w-4 h-4 mr-2 ${i?"animate-spin":""}`}),"Refresh"]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[n.jsx("div",{className:"card p-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-primary-100 rounded-lg",children:n.jsx(Jr,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Total Builds"}),n.jsx("p",{className:"text-heading text-2xl",children:s.total})]})]})}),n.jsx("div",{className:"card p-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-success-100 rounded-lg",children:n.jsx(Pt,{className:"w-6 h-6 text-success-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Successful"}),n.jsx("p",{className:"text-heading text-2xl text-success-600",children:s.successful})]})]})}),n.jsx("div",{className:"card p-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-error-100 rounded-lg",children:n.jsx(Lt,{className:"w-6 h-6 text-error-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Failed"}),n.jsx("p",{className:"text-heading text-2xl text-error-600",children:s.failed})]})]})}),n.jsx("div",{className:"card p-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsx("div",{className:"p-2 bg-info-100 rounded-lg",children:n.jsx(At,{className:"w-6 h-6 text-info-600"})}),n.jsxs("div",{className:"ml-4",children:[n.jsx("p",{className:"text-caption font-medium",children:"Running"}),n.jsx("p",{className:"text-heading text-2xl text-info-600",children:s.running})]})]})}),n.jsxs("div",{className:"card p-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("p",{className:"text-caption font-medium",children:"Success Rate"}),n.jsxs("span",{className:`text-lg font-bold ${s.successRate>=90?"text-success-600":s.successRate>=70?"text-warning-600":"text-error-600"}`,children:[s.successRate,"%"]})]}),n.jsx("div",{className:"w-full bg-neutral-200 rounded-full h-2",children:n.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${s.successRate>=90?"bg-success-500":s.successRate>=70?"bg-warning-500":"bg-error-500"}`,style:{width:`${s.successRate}%`}})})]})]}),n.jsxs("div",{className:"card p-6",children:[n.jsx("h3",{className:"text-heading text-lg mb-4",children:"Performance Metrics"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-heading text-2xl text-primary-600",children:Kr(s.avgDuration)}),n.jsx("div",{className:"text-caption",children:"Avg Duration"})]}),n.jsxs("div",{className:"text-center",children:[n.jsxs("div",{className:"text-heading text-2xl text-success-600",children:[s.total>0?Math.round(s.successful/s.total*100):0,"%"]}),n.jsx("div",{className:"text-caption",children:"Success Rate"})]}),n.jsxs("div",{className:"text-center",children:[n.jsxs("div",{className:"text-heading text-2xl text-error-600",children:[s.total>0?Math.round(s.failed/s.total*100):0,"%"]}),n.jsx("div",{className:"text-caption",children:"Failure Rate"})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-heading text-2xl text-accent-600",children:s.running}),n.jsx("div",{className:"text-caption",children:"Active Builds"})]})]})]})]})}function fp({builds:s,selectedBuild:a,onBuildSelect:i,filters:c,onFiltersChange:d}){const m=cp(s),h=up(s),g=f=>{switch(f){case"success":return n.jsx(Pt,{className:"h-5 w-5 text-green-500"});case"running":return n.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return n.jsx(At,{className:"h-5 w-5 text-yellow-500"});case"failed":return n.jsx(Lt,{className:"h-5 w-5 text-red-500"});case"cancelled":return n.jsx(wi,{className:"h-5 w-5 text-red-500"});default:return n.jsx(At,{className:"h-5 w-5 text-gray-500"})}};return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(vl,{className:"h-4 w-4 text-gray-400"}),n.jsxs("select",{value:c.package,onChange:f=>d({...c,package:f.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Packages"}),m.map(f=>n.jsx("option",{value:f,children:f},f))]})]}),n.jsxs("select",{value:c.status,onChange:f=>d({...c,status:f.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Statuses"}),h.map(f=>n.jsx("option",{value:f,children:f.charAt(0).toUpperCase()+f.slice(1)},f))]}),n.jsxs("select",{value:c.dateRange,onChange:f=>d({...c,dateRange:f.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Time"}),n.jsx("option",{value:"today",children:"Today"}),n.jsx("option",{value:"week",children:"This Week"}),n.jsx("option",{value:"month",children:"This Month"})]})]})}),n.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[n.jsxs("div",{className:"p-4 border-b border-gray-200",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Builds"}),n.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[s.length," build",s.length!==1?"s":""," found"]})]}),s.length===0?n.jsxs("div",{className:"p-8 text-center",children:[n.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"🔨"}),n.jsx("p",{className:"text-gray-500",children:"No builds found matching your filters"})]}):n.jsx("div",{className:"divide-y divide-gray-200",children:s.map(f=>{const b=dp(f),E=a===f.id;return n.jsxs("div",{className:`p-4 cursor-pointer transition-colors ${E?"bg-blue-50 border-l-4 border-blue-500":"hover:bg-gray-50"}`,onClick:()=>i(E?null:f.id),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[g(f.status),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:f.packageName}),n.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:f.branch}),n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:Wd(f.commit)})]}),n.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xl(f.status)}`,children:f.status}),n.jsxs("span",{className:"text-xs text-gray-500",children:["by ",f.triggeredBy]}),n.jsx("span",{className:"text-xs text-gray-500",children:Vd(f.startTime)})]})]})]}),n.jsxs("div",{className:"text-right",children:[f.duration&&n.jsx("div",{className:"text-sm font-medium text-gray-900",children:Kr(f.duration)}),f.status==="running"&&n.jsx("div",{className:"mt-1",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-20 bg-gray-200 rounded-full h-2",children:n.jsx("div",{className:"bg-blue-500 h-2 rounded-full transition-all duration-300",style:{width:`${b}%`}})}),n.jsxs("span",{className:"text-xs text-gray-500",children:[b,"%"]})]})})]})]}),E&&f.stages.length>0&&n.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:n.jsx("div",{className:"flex items-center space-x-2",children:f.stages.map((S,T)=>n.jsx("div",{className:`flex items-center px-2 py-1 text-xs rounded ${xl(S.status)}`,title:`${S.name}: ${S.status}`,children:S.name},S.name))})})]},f.id)})})]})]})}function pp({pipelines:s,onPipelineSelect:a,onPipelineToggle:i}){const c=m=>{switch(m){case"healthy":return n.jsx(Pt,{className:"w-5 h-5 text-green-500"});case"warning":return n.jsx(De,{className:"w-5 h-5 text-yellow-500"});case"critical":return n.jsx(Lt,{className:"w-5 h-5 text-red-500"});default:return n.jsx(Cn,{className:"w-5 h-5 text-gray-500"})}},d=m=>{switch(m){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"critical":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};return s.length===0?n.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:n.jsxs("div",{className:"text-center",children:[n.jsx(Cn,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Pipelines Configured"}),n.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by creating your first CI/CD pipeline to automate builds and deployments."}),n.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})}):n.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[n.jsxs("div",{className:"p-4 border-b border-gray-200",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Pipeline Status"}),n.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[s.length," pipeline",s.length!==1?"s":""," ","configured"]})]}),n.jsx("div",{className:"divide-y divide-gray-200",children:s.map(m=>{const h=hp(m);return n.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>a(m.id),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[c(h),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:m.name}),n.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:m.packageName})]}),n.jsxs("div",{className:"flex items-center space-x-4 mt-1",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xl(m.status)}`,children:m.status}),n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${d(h)}`,children:h})]})]})]}),n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx("button",{onClick:g=>{g.stopPropagation(),i(m.id,m.status!=="active")},className:`p-2 rounded-lg transition-colors ${m.status==="active"?"text-green-600 hover:bg-green-100":"text-gray-400 hover:bg-gray-100"}`,title:m.status==="active"?"Pause Pipeline":"Activate Pipeline",children:m.status==="active"?n.jsx(wx,{className:"w-5 h-5"}):n.jsx(Mi,{className:"w-5 h-5"})})})]}),n.jsxs("div",{className:"mt-3 grid grid-cols-4 gap-4 text-xs",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"Success Rate:"}),n.jsxs("div",{className:`font-medium ${m.successRate>=90?"text-green-600":m.successRate>=70?"text-yellow-600":"text-red-600"}`,children:[m.successRate,"%"]})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"Avg Duration:"}),n.jsx("div",{className:"font-medium text-gray-900",children:Kr(m.avgDuration)})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"Last Run:"}),n.jsx("div",{className:"font-medium text-gray-900",children:Vd(m.lastRun)})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"Triggers:"}),n.jsx("div",{className:"font-medium text-gray-900",children:m.triggers.length})]})]}),n.jsxs("div",{className:"mt-3",children:[n.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[n.jsx("span",{className:"text-gray-500",children:"Pipeline Health"}),n.jsxs("span",{className:"font-medium text-gray-900",children:[m.successRate,"%"]})]}),n.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:n.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${m.successRate>=90?"bg-green-500":m.successRate>=70?"bg-yellow-500":"bg-red-500"}`,style:{width:`${m.successRate}%`}})})]}),n.jsx("div",{className:"mt-3",children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Triggers:"}),m.triggers.map(g=>n.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800",children:g},g))]})})]},m.id)})})]})}function gp({build:s,onClose:a,onCancel:i,onRetry:c}){if(!s)return null;const d=m=>{switch(m){case"success":return n.jsx(Pt,{className:"h-5 w-5 text-green-500"});case"running":return n.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return n.jsx(At,{className:"h-5 w-5 text-yellow-500"});case"failed":return n.jsx(Lt,{className:"h-5 w-5 text-red-500"});case"cancelled":return n.jsx(wi,{className:"h-5 w-5 text-red-500"});default:return n.jsx(At,{className:"h-5 w-5 text-gray-500"})}};return n.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[d(s.status),n.jsxs("div",{children:[n.jsxs("h2",{className:"text-xl font-semibold text-gray-900",children:[s.packageName," Build"]}),n.jsxs("p",{className:"text-sm text-gray-600",children:[s.branch," • ",Wd(s.commit)]})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[s.status==="running"&&i&&n.jsxs("button",{onClick:()=>i(s.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-red-700 bg-red-100 rounded-lg hover:bg-red-200 transition-colors",children:[n.jsx(wi,{className:"w-4 h-4 mr-1"}),"Cancel"]}),(s.status==="failed"||s.status==="cancelled")&&c&&n.jsxs("button",{onClick:()=>c(s.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-green-700 bg-green-100 rounded-lg hover:bg-green-200 transition-colors",children:[n.jsx(cn,{className:"w-4 h-4 mr-1"}),"Retry"]}),n.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-600 transition-colors",children:n.jsx(Xr,{className:"w-6 h-6"})})]})]}),n.jsxs("div",{className:"p-6 overflow-y-auto max-h-[70vh]",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[n.jsx("div",{className:"space-y-4",children:n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Build Information"}),n.jsxs("div",{className:"space-y-2 text-sm",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Status:"}),n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xl(s.status)}`,children:s.status})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Started:"}),n.jsx("span",{className:"font-medium",children:ud(s.startTime)})]}),s.endTime&&n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Ended:"}),n.jsx("span",{className:"font-medium",children:ud(s.endTime)})]}),s.duration&&n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Duration:"}),n.jsx("span",{className:"font-medium",children:Kr(s.duration)})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-600",children:"Triggered by:"}),n.jsx("span",{className:"font-medium",children:s.triggeredBy})]})]})]})}),n.jsx("div",{className:"space-y-4",children:n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Artifacts"}),s.artifacts.length>0?n.jsx("div",{className:"space-y-1",children:s.artifacts.map((m,h)=>n.jsx("div",{className:"text-sm",children:n.jsx("a",{href:"#",className:"text-blue-600 hover:text-blue-500 font-medium",children:m})},h))}):n.jsx("p",{className:"text-sm text-gray-500",children:"No artifacts generated"})]})})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Build Stages"}),n.jsx("div",{className:"space-y-4",children:s.stages.map((m,h)=>n.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("span",{className:"text-2xl",children:mp(m.name)}),n.jsxs("div",{children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:m.name}),n.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${ap(m.status)}`,children:m.status}),m.duration&&n.jsx("span",{className:"text-xs text-gray-500",children:Kr(m.duration)})]})]})]}),n.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",h+1," of ",s.stages.length]})]}),m.logs&&m.logs.length>0&&n.jsxs("div",{className:"mt-3",children:[n.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Logs"}),n.jsx("div",{className:"bg-gray-900 text-gray-100 p-3 rounded-lg text-xs font-mono max-h-32 overflow-y-auto",children:m.logs.map((g,f)=>n.jsx("div",{className:"mb-1",children:g},f))})]})]},m.name))})]})]})]})})}const vp=[{id:"1",name:"Dashboard CI",packageName:"dashboard",status:"active",lastRun:"2024-01-16T09:00:00Z",nextRun:"2024-01-16T10:00:00Z",successRate:95,avgDuration:420,triggers:["push","pull_request"]},{id:"2",name:"Backend CI",packageName:"backend",status:"active",lastRun:"2024-01-16T08:30:00Z",nextRun:"2024-01-16T09:30:00Z",successRate:88,avgDuration:900,triggers:["push","pull_request","tag"]},{id:"3",name:"Utils CI",packageName:"utils",status:"paused",lastRun:"2024-01-16T08:00:00Z",successRate:75,avgDuration:600,triggers:["push","pull_request"]}];function yp(){const[s,a]=w.useState(!0),[i,c]=w.useState(null),[d,m]=w.useState([]),[h]=w.useState(vp),[g,f]=w.useState(null),[b,E]=w.useState({package:"all",status:"all",pipeline:"all",dateRange:"all"});w.useEffect(()=>{(async()=>{try{a(!0);const Ue=(await xt.getBuildStatus()).map(he=>({id:he.id||Math.random().toString(36).substr(2,9),packageName:he.package||he.packageName||"unknown",branch:he.branch||"main",commit:he.commit||"unknown",status:he.status||"pending",startTime:he.startTime||new Date().toISOString(),endTime:he.endTime,duration:he.duration,stages:he.stages||[],triggeredBy:he.triggeredBy||"system",artifacts:he.artifacts||[]}));m(Ue),c(null)}catch(de){c("Failed to fetch build data"),console.error("Error fetching build data:",de)}finally{a(!1)}})()},[]);const S=op(d,b),T=ip(d),M=g&&d.find(J=>J.id===g)||null,R=()=>{window.location.reload()},I=()=>{console.log("Triggering new build...")},P=()=>{console.log("Creating new pipeline...")},$=J=>{f(J)},L=J=>{console.log("Selected pipeline:",J)},A=(J,de)=>{console.log("Toggle pipeline:",J,"active:",de)},G=J=>{console.log("Cancelling build:",J),f(null)},se=J=>{console.log("Retrying build:",J),f(null)},me=()=>{window.location.reload()};return s?n.jsx(rp,{}):i?n.jsx(sp,{error:i,onRetry:me}):n.jsxs("div",{className:"space-y-6",children:[n.jsx(lp,{onTriggerBuild:I,onCreatePipeline:P}),n.jsx(xp,{stats:T,onRefresh:R,loading:s}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[n.jsx("div",{className:"lg:col-span-2",children:n.jsx(fp,{builds:S,selectedBuild:g,onBuildSelect:$,filters:b,onFiltersChange:E})}),n.jsx("div",{className:"lg:col-span-1",children:n.jsx(pp,{pipelines:h,onPipelineSelect:L,onPipelineToggle:A})})]}),n.jsx(gp,{build:M,onClose:()=>f(null),onCancel:G,onRetry:se}),S.length===0&&d.length>0&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔨"}),n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No builds found"}),n.jsx("p",{className:"text-gray-600 mb-4",children:"No builds match your current filters. Try adjusting your search criteria."}),n.jsx("button",{onClick:()=>E({package:"all",status:"all",pipeline:"all",dateRange:"all"}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]}),d.length===0&&!s&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:n.jsx(dn,{className:"w-6 h-6 text-primary-600"})}),n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No CI/CD data available"}),n.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by triggering your first build or setting up a pipeline."}),n.jsxs("div",{className:"flex justify-center space-x-4",children:[n.jsx("button",{onClick:I,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors",children:"Trigger Build"}),n.jsx("button",{onClick:P,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})]})]})}function jp({message:s="Loading configuration files..."}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),n.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function wp({error:s,onRetry:a}){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx(De,{className:"w-12 h-12 text-red-500 mx-auto"}),n.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&n.jsx("button",{onClick:a,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function Np({onRefresh:s,loading:a=!1}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Configuration Inspector"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"View and manage configuration files across your monorepo"})]}),s&&n.jsxs("button",{onClick:s,disabled:a,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[n.jsx(cn,{className:`w-5 h-5 ${a?"animate-spin":""}`}),n.jsx("span",{children:"Refresh"})]})]})}function Qd(s){return typeof s>"u"||s===null}function bp(s){return typeof s=="object"&&s!==null}function kp(s){return Array.isArray(s)?s:Qd(s)?[]:[s]}function Sp(s,a){var i,c,d,m;if(a)for(m=Object.keys(a),i=0,c=m.length;i<c;i+=1)d=m[i],s[d]=a[d];return s}function Cp(s,a){var i="",c;for(c=0;c<a;c+=1)i+=s;return i}function Ep(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}var Pp=Qd,Lp=bp,Tp=kp,Mp=Cp,_p=Ep,Ip=Sp,Bi={isNothing:Pp,isObject:Lp,toArray:Tp,repeat:Mp,isNegativeZero:_p,extend:Ip};function Yd(s,a){var i="",c=s.reason||"(unknown reason)";return s.mark?(s.mark.name&&(i+='in "'+s.mark.name+'" '),i+="("+(s.mark.line+1)+":"+(s.mark.column+1)+")",!a&&s.mark.snippet&&(i+=`
|
|
9
|
-
|
|
10
|
-
`+s.mark.snippet),c+" "+i):c}function Zr(s,a){Error.call(this),this.name="YAMLException",this.reason=s,this.mark=a,this.message=Yd(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Zr.prototype=Object.create(Error.prototype);Zr.prototype.constructor=Zr;Zr.prototype.toString=function(a){return this.name+": "+Yd(this,a)};var Sn=Zr,Rp=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Op=["scalar","sequence","mapping"];function zp(s){var a={};return s!==null&&Object.keys(s).forEach(function(i){s[i].forEach(function(c){a[String(c)]=i})}),a}function Fp(s,a){if(a=a||{},Object.keys(a).forEach(function(i){if(Rp.indexOf(i)===-1)throw new Sn('Unknown option "'+i+'" is met in definition of "'+s+'" YAML type.')}),this.options=a,this.tag=s,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(i){return i},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=zp(a.styleAliases||null),Op.indexOf(this.kind)===-1)throw new Sn('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}var Ye=Fp;function dd(s,a){var i=[];return s[a].forEach(function(c){var d=i.length;i.forEach(function(m,h){m.tag===c.tag&&m.kind===c.kind&&m.multi===c.multi&&(d=h)}),i[d]=c}),i}function Dp(){var s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},a,i;function c(d){d.multi?(s.multi[d.kind].push(d),s.multi.fallback.push(d)):s[d.kind][d.tag]=s.fallback[d.tag]=d}for(a=0,i=arguments.length;a<i;a+=1)arguments[a].forEach(c);return s}function Ni(s){return this.extend(s)}Ni.prototype.extend=function(a){var i=[],c=[];if(a instanceof Ye)c.push(a);else if(Array.isArray(a))c=c.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(i=i.concat(a.implicit)),a.explicit&&(c=c.concat(a.explicit));else throw new Sn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(m){if(!(m instanceof Ye))throw new Sn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(m.loadKind&&m.loadKind!=="scalar")throw new Sn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(m.multi)throw new Sn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(m){if(!(m instanceof Ye))throw new Sn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var d=Object.create(Ni.prototype);return d.implicit=(this.implicit||[]).concat(i),d.explicit=(this.explicit||[]).concat(c),d.compiledImplicit=dd(d,"implicit"),d.compiledExplicit=dd(d,"explicit"),d.compiledTypeMap=Dp(d.compiledImplicit,d.compiledExplicit),d};var Ap=Ni,Bp=new Ye("tag:yaml.org,2002:str",{kind:"scalar",construct:function(s){return s!==null?s:""}}),$p=new Ye("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(s){return s!==null?s:[]}}),Up=new Ye("tag:yaml.org,2002:map",{kind:"mapping",construct:function(s){return s!==null?s:{}}}),Hp=new Ap({explicit:[Bp,$p,Up]});function Vp(s){if(s===null)return!0;var a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function Wp(){return null}function Qp(s){return s===null}var Yp=new Ye("tag:yaml.org,2002:null",{kind:"scalar",resolve:Vp,construct:Wp,predicate:Qp,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Gp(s){if(s===null)return!1;var a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function Kp(s){return s==="true"||s==="True"||s==="TRUE"}function Zp(s){return Object.prototype.toString.call(s)==="[object Boolean]"}var Xp=new Ye("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Gp,construct:Kp,predicate:Zp,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"});function Jp(s){return 48<=s&&s<=57||65<=s&&s<=70||97<=s&&s<=102}function qp(s){return 48<=s&&s<=55}function eg(s){return 48<=s&&s<=57}function tg(s){if(s===null)return!1;var a=s.length,i=0,c=!1,d;if(!a)return!1;if(d=s[i],(d==="-"||d==="+")&&(d=s[++i]),d==="0"){if(i+1===a)return!0;if(d=s[++i],d==="b"){for(i++;i<a;i++)if(d=s[i],d!=="_"){if(d!=="0"&&d!=="1")return!1;c=!0}return c&&d!=="_"}if(d==="x"){for(i++;i<a;i++)if(d=s[i],d!=="_"){if(!Jp(s.charCodeAt(i)))return!1;c=!0}return c&&d!=="_"}if(d==="o"){for(i++;i<a;i++)if(d=s[i],d!=="_"){if(!qp(s.charCodeAt(i)))return!1;c=!0}return c&&d!=="_"}}if(d==="_")return!1;for(;i<a;i++)if(d=s[i],d!=="_"){if(!eg(s.charCodeAt(i)))return!1;c=!0}return!(!c||d==="_")}function ng(s){var a=s,i=1,c;if(a.indexOf("_")!==-1&&(a=a.replace(/_/g,"")),c=a[0],(c==="-"||c==="+")&&(c==="-"&&(i=-1),a=a.slice(1),c=a[0]),a==="0")return 0;if(c==="0"){if(a[1]==="b")return i*parseInt(a.slice(2),2);if(a[1]==="x")return i*parseInt(a.slice(2),16);if(a[1]==="o")return i*parseInt(a.slice(2),8)}return i*parseInt(a,10)}function rg(s){return Object.prototype.toString.call(s)==="[object Number]"&&s%1===0&&!Bi.isNegativeZero(s)}var sg=new Ye("tag:yaml.org,2002:int",{kind:"scalar",resolve:tg,construct:ng,predicate:rg,represent:{binary:function(s){return s>=0?"0b"+s.toString(2):"-0b"+s.toString(2).slice(1)},octal:function(s){return s>=0?"0o"+s.toString(8):"-0o"+s.toString(8).slice(1)},decimal:function(s){return s.toString(10)},hexadecimal:function(s){return s>=0?"0x"+s.toString(16).toUpperCase():"-0x"+s.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),lg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ag(s){return!(s===null||!lg.test(s)||s[s.length-1]==="_")}function ig(s){var a,i;return a=s.replace(/_/g,"").toLowerCase(),i=a[0]==="-"?-1:1,"+-".indexOf(a[0])>=0&&(a=a.slice(1)),a===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:a===".nan"?NaN:i*parseFloat(a,10)}var og=/^[-+]?[0-9]+e/;function cg(s,a){var i;if(isNaN(s))switch(a){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===s)switch(a){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===s)switch(a){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Bi.isNegativeZero(s))return"-0.0";return i=s.toString(10),og.test(i)?i.replace("e",".e"):i}function ug(s){return Object.prototype.toString.call(s)==="[object Number]"&&(s%1!==0||Bi.isNegativeZero(s))}var dg=new Ye("tag:yaml.org,2002:float",{kind:"scalar",resolve:ag,construct:ig,predicate:ug,represent:cg,defaultStyle:"lowercase"}),mg=Hp.extend({implicit:[Yp,Xp,sg,dg]}),hg=mg,Gd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function xg(s){return s===null?!1:Gd.exec(s)!==null||Kd.exec(s)!==null}function fg(s){var a,i,c,d,m,h,g,f=0,b=null,E,S,T;if(a=Gd.exec(s),a===null&&(a=Kd.exec(s)),a===null)throw new Error("Date resolve error");if(i=+a[1],c=+a[2]-1,d=+a[3],!a[4])return new Date(Date.UTC(i,c,d));if(m=+a[4],h=+a[5],g=+a[6],a[7]){for(f=a[7].slice(0,3);f.length<3;)f+="0";f=+f}return a[9]&&(E=+a[10],S=+(a[11]||0),b=(E*60+S)*6e4,a[9]==="-"&&(b=-b)),T=new Date(Date.UTC(i,c,d,m,h,g,f)),b&&T.setTime(T.getTime()-b),T}function pg(s){return s.toISOString()}var gg=new Ye("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:xg,construct:fg,instanceOf:Date,represent:pg});function vg(s){return s==="<<"||s===null}var yg=new Ye("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vg}),$i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
11
|
-
\r`;function jg(s){if(s===null)return!1;var a,i,c=0,d=s.length,m=$i;for(i=0;i<d;i++)if(a=m.indexOf(s.charAt(i)),!(a>64)){if(a<0)return!1;c+=6}return c%8===0}function wg(s){var a,i,c=s.replace(/[\r\n=]/g,""),d=c.length,m=$i,h=0,g=[];for(a=0;a<d;a++)a%4===0&&a&&(g.push(h>>16&255),g.push(h>>8&255),g.push(h&255)),h=h<<6|m.indexOf(c.charAt(a));return i=d%4*6,i===0?(g.push(h>>16&255),g.push(h>>8&255),g.push(h&255)):i===18?(g.push(h>>10&255),g.push(h>>2&255)):i===12&&g.push(h>>4&255),new Uint8Array(g)}function Ng(s){var a="",i=0,c,d,m=s.length,h=$i;for(c=0;c<m;c++)c%3===0&&c&&(a+=h[i>>18&63],a+=h[i>>12&63],a+=h[i>>6&63],a+=h[i&63]),i=(i<<8)+s[c];return d=m%3,d===0?(a+=h[i>>18&63],a+=h[i>>12&63],a+=h[i>>6&63],a+=h[i&63]):d===2?(a+=h[i>>10&63],a+=h[i>>4&63],a+=h[i<<2&63],a+=h[64]):d===1&&(a+=h[i>>2&63],a+=h[i<<4&63],a+=h[64],a+=h[64]),a}function bg(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}var kg=new Ye("tag:yaml.org,2002:binary",{kind:"scalar",resolve:jg,construct:wg,predicate:bg,represent:Ng}),Sg=Object.prototype.hasOwnProperty,Cg=Object.prototype.toString;function Eg(s){if(s===null)return!0;var a=[],i,c,d,m,h,g=s;for(i=0,c=g.length;i<c;i+=1){if(d=g[i],h=!1,Cg.call(d)!=="[object Object]")return!1;for(m in d)if(Sg.call(d,m))if(!h)h=!0;else return!1;if(!h)return!1;if(a.indexOf(m)===-1)a.push(m);else return!1}return!0}function Pg(s){return s!==null?s:[]}var Lg=new Ye("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Eg,construct:Pg}),Tg=Object.prototype.toString;function Mg(s){if(s===null)return!0;var a,i,c,d,m,h=s;for(m=new Array(h.length),a=0,i=h.length;a<i;a+=1){if(c=h[a],Tg.call(c)!=="[object Object]"||(d=Object.keys(c),d.length!==1))return!1;m[a]=[d[0],c[d[0]]]}return!0}function _g(s){if(s===null)return[];var a,i,c,d,m,h=s;for(m=new Array(h.length),a=0,i=h.length;a<i;a+=1)c=h[a],d=Object.keys(c),m[a]=[d[0],c[d[0]]];return m}var Ig=new Ye("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Mg,construct:_g}),Rg=Object.prototype.hasOwnProperty;function Og(s){if(s===null)return!0;var a,i=s;for(a in i)if(Rg.call(i,a)&&i[a]!==null)return!1;return!0}function zg(s){return s!==null?s:{}}var Fg=new Ye("tag:yaml.org,2002:set",{kind:"mapping",resolve:Og,construct:zg});hg.extend({implicit:[gg,yg],explicit:[kg,Lg,Ig,Fg]});function md(s){return s===48?"\0":s===97?"\x07":s===98?"\b":s===116||s===9?" ":s===110?`
|
|
12
|
-
`:s===118?"\v":s===102?"\f":s===114?"\r":s===101?"\x1B":s===32?" ":s===34?'"':s===47?"/":s===92?"\\":s===78?"
":s===95?" ":s===76?"\u2028":s===80?"\u2029":""}var Dg=new Array(256),Ag=new Array(256);for(var Jn=0;Jn<256;Jn++)Dg[Jn]=md(Jn)?1:0,Ag[Jn]=md(Jn);const Bg=s=>{switch(s){case"workspace":return"bg-blue-100 text-blue-800";case"package":return"bg-green-100 text-green-800";case"environment":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";default:return"bg-gray-100 text-gray-800"}},hd=s=>{switch(s){case"valid":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},$g=(s,a)=>s.filter(i=>{const c=a.section==="all"||i.id===a.section,d=a.type==="all"||i.type===a.type,m=a.status==="all"||a.status==="secrets"&&i.hasSecrets||a.status==="standard"&&!i.hasSecrets,h=!a.search||i.name.toLowerCase().includes(a.search.toLowerCase())||i.path.toLowerCase().includes(a.search.toLowerCase());return c&&d&&m&&h}),Ug=s=>[...new Set(s.map(a=>a.type))],Hg=s=>{if(s===0)return"0 Bytes";const a=1024,i=["Bytes","KB","MB","GB"],c=Math.floor(Math.log(s)/Math.log(a));return parseFloat((s/Math.pow(a,c)).toFixed(2))+" "+i[c]},Vg=s=>new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Zd=s=>{const a=s.split(".").pop()?.toLowerCase(),i={json:"json",yaml:"yaml",yml:"yaml",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",env:"env",config:"text",rc:"text",lock:"text",md:"markdown",txt:"text"};return s==="package.json"?"json":s==="docker-compose.yml"||s==="docker-compose.yaml"?"yaml":s===".eslintrc.js"||s===".prettierrc.js"?"javascript":s==="tsconfig.json"?"json":i[a||""]||"text"},Wg=s=>{const a=[/^([A-Z_]+(?:PASSWORD|SECRET|KEY|TOKEN|AUTH)[A-Z_]*)\s*=\s*(.+)$/gim,/"([^"]*(?:password|secret|key|token|auth)[^"]*)"\s*:\s*"([^"]+)"/gi,/^(\s*[^:\s]*(?:password|secret|key|token|auth)[^:\s]*)\s*:\s*(.+)$/gim];let i=s;return a.forEach(c=>{i=i.replace(c,(d,m,h)=>{const g="*".repeat(Math.min(h.length,8));return d.replace(h,g)})}),i},Qg=s=>{switch(Zd(s)){case"json":return n.jsx(dl,{className:"w-6 h-6 text-primary-600"});case"yaml":return n.jsx(dl,{className:"w-6 h-6 text-primary-600"});case"javascript":case"typescript":return n.jsx(Cn,{className:"w-6 h-6 text-primary-600"});case"env":return"🔐";case"markdown":return"📝";default:return n.jsx(Ri,{className:"w-6 h-6 text-primary-600"})}};function Yg({configs:s,selectedConfig:a,onConfigSelect:i,filters:c,onFiltersChange:d}){const m=Ug(s);return n.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col max-h-[calc(100vh-180px)]",children:[n.jsxs("div",{className:"p-4 border-b border-gray-200",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Configuration Files"}),n.jsxs("div",{className:"relative mb-4",children:[n.jsx(Fi,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),n.jsx("input",{type:"text",placeholder:"Search config files...",value:c.search,onChange:h=>d({...c,search:h.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(vl,{className:"h-4 w-4 text-gray-400"}),n.jsxs("select",{value:c.type,onChange:h=>d({...c,type:h.target.value}),className:"flex-1 border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Types"}),m.map(h=>n.jsx("option",{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]})]}),n.jsxs("select",{value:c.status,onChange:h=>d({...c,status:h.target.value}),className:"w-full border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[n.jsx("option",{value:"all",children:"All Files"}),n.jsx("option",{value:"standard",children:"Standard Files"}),n.jsx("option",{value:"secrets",children:"Files with Secrets"})]})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto",children:s.length===0?n.jsxs("div",{className:"p-4 text-center text-gray-500",children:[n.jsx("div",{className:"text-4xl mb-2",children:n.jsx(Ri,{className:"w-6 h-6 text-primary-600"})}),n.jsx("p",{className:"text-sm",children:"No configuration files found"})]}):n.jsx("div",{className:"p-2",children:s.map(h=>n.jsx("button",{onClick:()=>i(h.id),className:`w-full text-left p-3 rounded-lg mb-2 transition-colors ${a===h.id?"bg-blue-50 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:n.jsxs("div",{className:"flex items-start space-x-3",children:[n.jsx("div",{className:"text-2xl",children:Qg(h.name)}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[n.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:h.name}),h.hasSecrets&&n.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒"})]}),n.jsx("p",{className:"text-xs text-gray-500 truncate mb-1",children:h.path}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${Bg(h.type)}`,children:h.type}),n.jsx("span",{className:"text-xs text-gray-400",children:Hg(h.size)})]}),n.jsx("p",{className:"text-xs text-gray-400 mt-1",children:Vg(h.lastModified)})]})]})},h.id))})}),n.jsx("div",{className:"p-4 border-t border-gray-200",children:n.jsxs("div",{className:"text-xs text-gray-500",children:[s.length," file",s.length!==1?"s":""," found"]})})]})}function Gg({isEditing:s,canEdit:a,hasSecrets:i,showSecrets:c,saving:d,onStartEdit:m,onSaveEdit:h,onCancelEdit:g,onToggleSecrets:f,onRefresh:b,content:E}){const[S,T]=w.useState(!1),M=async()=>{try{const R=E||"No content available";await navigator.clipboard.writeText(R),T(!0),setTimeout(()=>{T(!1)},4e3)}catch(R){console.error("Failed to copy to clipboard:",R),T(!0),setTimeout(()=>T(!1),2e3)}};return d?n.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[n.jsx("div",{className:"flex items-center space-x-2",children:n.jsxs("div",{className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-orange-600 bg-white border border-gray-300 rounded-lg",children:[n.jsx(cn,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]})}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsxs("button",{onClick:b,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[n.jsx(cn,{className:"w-4 h-4 mr-1"}),"Refresh"]})})]}):n.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[s?n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:h,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 transition-colors",children:[n.jsx(Ti,{className:"w-4 h-4 mr-1"}),"Save"]}),n.jsxs("button",{onClick:g,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[n.jsx(Xr,{className:"w-4 h-4 mr-1"}),"Cancel"]})]}):a&&n.jsxs("button",{onClick:m,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[n.jsx(hx,{className:"w-4 h-4 mr-1"}),"Edit"]}),i&&n.jsx("button",{onClick:f,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${c?"text-red-700 bg-red-100 hover:bg-red-200":"text-yellow-700 bg-yellow-100 hover:bg-yellow-200"}`,children:c?n.jsxs(n.Fragment,{children:[n.jsx(mx,{className:"w-4 h-4 mr-1"}),"Hide Secrets"]}):n.jsxs(n.Fragment,{children:[n.jsx(dx,{className:"w-4 h-4 mr-1"}),"Show Secrets"]})})]}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsx("button",{onClick:M,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${S?"text-green-700 bg-green-100 border border-green-300":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:S?n.jsxs(n.Fragment,{children:[n.jsx(px,{className:"w-4 h-4 mr-1"}),"Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsx(gx,{className:"w-4 h-4 mr-1"}),"Copy"]})})})]})}function Kg({config:s,isEditing:a,editValue:i,onStartEdit:c,onSaveEdit:d,onCancelEdit:m,onValueChange:h,showSecrets:g,onToggleSecrets:f}){if(!s)return n.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 rounded-lg",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:n.jsx(dl,{className:"w-6 h-6 text-primary-600"})}),n.jsx("p",{className:"text-gray-500",children:"Select a configuration file to view or edit"})]})});const b=Zd(s.name),E=g?s.content:Wg(s.content);return n.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col",children:[n.jsx("div",{className:"p-4 border-b border-gray-200",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"text-2xl",children:n.jsx(dl,{className:"w-6 h-6 text-primary-600"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:s.name}),n.jsx("p",{className:"text-sm text-gray-500",children:s.path})]})]})}),n.jsx("div",{className:"flex-1 p-4",children:a?n.jsx("div",{className:"h-full",children:n.jsx("textarea",{value:i,onChange:S=>h(S.target.value),className:"w-full h-full font-mono text-sm border border-gray-300 rounded-lg p-4 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Enter configuration content...",spellCheck:!1})}):n.jsx("div",{className:"h-full",children:n.jsx("pre",{className:"w-full h-full font-mono text-sm bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto whitespace-pre-wrap",children:n.jsx("code",{className:`language-${b}`,children:E})})})}),n.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:n.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("span",{children:["Language: ",b.toUpperCase()]}),n.jsxs("span",{children:["Size: ",s.content.length," characters"]}),s.hasSecrets&&n.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒 Contains secrets"})]}),n.jsx("div",{children:a?n.jsx("span",{className:"text-blue-600 font-medium",children:"Editing mode"}):s.isEditable?n.jsx("span",{className:"text-green-600",children:"Editable"}):n.jsx("span",{className:"text-gray-400",children:"Read-only"})})]})})]})}function Zg({validation:s,configName:a}){const i=f=>{switch(f){case"valid":return n.jsx(Pt,{className:"w-5 h-5 text-green-500"});case"warning":return n.jsx(De,{className:"w-5 h-5 text-yellow-500"});case"error":return n.jsx(Lt,{className:"w-5 h-5 text-red-500"});default:return n.jsx(nr,{className:"w-5 h-5 text-gray-500"})}},d=s.some(f=>f.status==="error")?"error":s.some(f=>f.status==="warning")?"warning":"valid",m=s.filter(f=>f.status==="error").length,h=s.filter(f=>f.status==="warning").length,g=s.filter(f=>f.status==="valid").length;return s.length===0?n.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:n.jsxs("div",{className:"text-center",children:[n.jsx(nr,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),n.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Validation Results"}),n.jsx("p",{className:"text-sm text-gray-500",children:"Select a configuration file to see validation results."})]})}):n.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[n.jsxs("div",{className:"p-4 border-b border-gray-200",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Validation Results"}),n.jsxs("div",{className:"flex items-center space-x-2",children:[i(d),n.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${hd(d)}`,children:d.toUpperCase()})]})]}),n.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Validation results for ",a]})]}),n.jsx("div",{className:"p-4 border-b border-gray-200 bg-gray-50",children:n.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-lg font-bold text-green-600",children:g}),n.jsx("div",{className:"text-xs text-gray-600",children:"Valid"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-lg font-bold text-yellow-600",children:h}),n.jsx("div",{className:"text-xs text-gray-600",children:"Warnings"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-lg font-bold text-red-600",children:m}),n.jsx("div",{className:"text-xs text-gray-600",children:"Errors"})]})]})}),n.jsx("div",{className:"p-4",children:n.jsx("div",{className:"space-y-3",children:s.map((f,b)=>n.jsx("div",{className:`p-3 rounded-lg border ${f.status==="error"?"border-red-200 bg-red-50":f.status==="warning"?"border-yellow-200 bg-yellow-50":"border-green-200 bg-green-50"}`,children:n.jsxs("div",{className:"flex items-start space-x-3",children:[i(f.status),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900",children:f.field}),n.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${hd(f.status)}`,children:f.status})]}),n.jsx("p",{className:"text-sm text-gray-600",children:f.message})]})]})},b))})}),(m>0||h>0)&&n.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"text-sm text-gray-600",children:[m>0&&n.jsxs("span",{className:"text-red-600 font-medium",children:[m," error",m>1?"s":""," need attention"]}),h>0&&m===0&&n.jsxs("span",{className:"text-yellow-600 font-medium",children:[h," warning",h>1?"s":""," to review"]})]}),n.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm font-medium",children:"View Details"})]})})]})}function Xg(){const[s,a]=w.useState(!0),[i,c]=w.useState(!1),[d,m]=w.useState(null),[h,g]=w.useState([]),[f,b]=w.useState(null),[E,S]=w.useState(!1),[T,M]=w.useState(""),[R,I]=w.useState(!1),[P,$]=w.useState({section:"all",type:"all",status:"all",search:""});w.useEffect(()=>{(async()=>{try{a(!0);const Se=(await xt.getConfigurationFiles()).map(xe=>({id:xe.id||xe.name,name:xe.name,path:xe.path||xe.name,type:xe.type||"text",content:xe.content||"",size:xe.content?.length||0,lastModified:xe.lastModified||new Date().toISOString(),hasSecrets:xe.hasSecrets||!1,isEditable:xe.isEditable!==!1,validation:xe.validation||[]}));g(Se),m(null)}catch(_e){m("Failed to fetch configuration files"),console.error("Error fetching config files:",_e)}finally{a(!1)}})()},[]);const L=$g(h,P),A=f&&h.find(Me=>Me.id===f)||null,G=()=>{window.location.reload()},se=Me=>{b(Me),S(!1),M("")},me=()=>{A&&(S(!0),M(A.content))},J=async()=>{if(A&&!i)try{c(!0),m(null);const Me=await xt.saveConfigurationFile(A.id,T);g(_e=>_e.map(Se=>Se.id===f?{...Me,isEditable:Se.isEditable}:Se)),f===A.id&&b(A.id),S(!1),M("")}catch(Me){console.error("Error saving config file:",Me),m(`Failed to save configuration: ${Me.message}`)}finally{c(!1)}},de=()=>{S(!1),M("")},Ue=()=>{I(!R)},he=()=>{window.location.reload()};return s?n.jsx(jp,{}):d?n.jsx(wp,{error:d,onRetry:he}):n.jsxs("div",{className:"space-y-6",children:[n.jsx(Np,{onRefresh:G,loading:s}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-[800px]",children:[n.jsx("div",{className:"lg:col-span-1",children:n.jsx(Yg,{configs:L,selectedConfig:f,onConfigSelect:se,filters:P,onFiltersChange:$})}),n.jsxs("div",{className:"lg:col-span-2 flex flex-col",children:[A&&n.jsx("div",{className:"mb-4",children:n.jsx(Gg,{isEditing:E,canEdit:A.isEditable,hasSecrets:A.hasSecrets,showSecrets:R,saving:i,onStartEdit:me,onSaveEdit:J,onCancelEdit:de,onToggleSecrets:Ue,onRefresh:G,content:E?T:A?.content})}),n.jsx("div",{className:"flex-1",children:n.jsx(Kg,{config:A,isEditing:E,editValue:T,saving:i,onStartEdit:me,onSaveEdit:J,onCancelEdit:de,onValueChange:M,showSecrets:R,onToggleSecrets:Ue})})]}),n.jsx("div",{className:"lg:col-span-1 space-y-6",children:n.jsx(Zg,{validation:A?.validation||[],configName:A?.name||"No file selected"})})]}),L.length===0&&!s&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:n.jsx(Ri,{className:"w-6 h-6 text-primary-600"})}),n.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No configuration files found"}),n.jsx("p",{className:"text-gray-600 mb-4",children:P.search||P.type!=="all"||P.status!=="all"?"Try adjusting your filters to see more results.":"No configuration files are available to inspect."}),(P.search||P.type!=="all"||P.status!=="all")&&n.jsx("button",{onClick:()=>$({section:"all",type:"all",status:"all",search:""}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]})]})}const xd=[{name:"Dashboard",href:"/",icon:ux},{name:"Packages",href:"/packages",icon:it},{name:"Dependencies",href:"/dependencies",icon:Jr},{name:"Health Status",href:"/health",icon:Ii},{name:"Publish Control",href:"/publish",icon:Md},{name:"CI/CD",href:"/ci",icon:_d},{name:"Configuration",href:"/config",icon:Cn}];function Jg({children:s}){const a=lr();return n.jsxs("div",{className:"min-h-screen bg-neutral-50",children:[n.jsxs("div",{className:"fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-medium",children:[n.jsx("div",{className:"flex h-16 items-center justify-center border-b border-neutral-200",children:n.jsx("h1",{className:"text-heading text-xl text-primary-700",children:"MonoDog"})}),n.jsx("nav",{className:"mt-8 px-4",children:n.jsx("ul",{className:"space-y-2",children:xd.map(i=>{const c=a.pathname===i.href;return n.jsx("li",{children:n.jsxs(Dt,{to:i.href,className:`nav-link ${c?"nav-link-active":"nav-link-inactive"}`,children:[n.jsx(i.icon,{className:"mr-3 h-5 w-5"}),i.name]})},i.name)})})})]}),n.jsxs("div",{className:"pl-64",children:[n.jsxs("header",{className:"bg-white shadow-soft border-b border-neutral-200 flex items-center justify-between px-6 py-4",children:[n.jsx("div",{className:"flex items-center gap-4",children:n.jsx("h2",{className:"text-heading text-lg font-semibold",children:xd.find(i=>i.href===a.pathname)?.name||"Dashboard"})}),n.jsxs("div",{className:"hidden flex items-center gap-3",children:[n.jsxs("div",{className:"flex flex-col items-end text-sm",children:[n.jsx("span",{className:"font-medium text-primary-700",children:"John Doe"}),n.jsx("span",{className:"text-neutral-500",children:"Admin"})]}),n.jsx("img",{src:"",alt:"User Avatar",className:"h-8 w-8 rounded-full border border-neutral-200"})]})]}),n.jsx("main",{className:"p-6",children:s})]})]})}const qg={Dashboard:jf,PackagesOverview:wf,PackageDetail:Nf,DependencyGraph:Hf,HealthStatus:Vf,PublishControl:np,CIIntegration:yp,ConfigInspector:Xg},ev=({componentName:s})=>{const a=qg[s];return a?n.jsx(a,{}):n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Page Not Found"}),n.jsx("p",{className:"text-gray-600",children:"The requested page could not be found."})]})})};function tv(){return n.jsxs(Pd,{children:[Ld.map(s=>n.jsx(tr,{path:s.path,element:n.jsx(ev,{componentName:s.component})},s.path)),n.jsx(tr,{path:"*",element:n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔍"}),n.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"404 - Page Not Found"}),n.jsx("p",{className:"text-gray-600 mb-4",children:"The page you're looking for doesn't exist or has been moved."}),n.jsx("a",{href:"/",className:"text-blue-600 hover:text-blue-500 font-medium",children:"Go back to Dashboard"})]})})})]})}const Xd=w.createContext(void 0),nv=window.ENV?.API_URL??"http://localhost:8999",Qr=`${nv}/api`,qn="monodog_session_token",er="monodog_session_data";function rv({children:s}){const[a,i]=w.useState(null),[c,d]=w.useState(!0),[m,h]=w.useState(null);w.useEffect(()=>{const M=localStorage.getItem(qn),R=localStorage.getItem(er);if(M&&R)try{const I=JSON.parse(R);i({sessionToken:M,...I})}catch{localStorage.removeItem(qn),localStorage.removeItem(er)}d(!1)},[]);const g=w.useCallback(async()=>{try{d(!0),h(null);const M=await fetch(`${Qr}/auth/login`,{method:"GET"});if(!M.ok)throw new Error("Failed to initiate login");const R=await M.json();R.authUrl&&(window.location.href=R.authUrl)}catch(M){const R=M instanceof Error?M.message:"Login failed";h(R),d(!1)}},[]),f=w.useCallback(async M=>{try{d(!0),h(null);const R=await fetch(`${Qr}/auth/me`,{method:"GET",headers:{Authorization:`Bearer ${M}`}});if(!R.ok)throw new Error("Failed to fetch user info");const I=await R.json(),P={sessionToken:M,user:I.user,scopes:I.scopes||[],expiresAt:I.expiresAt};return localStorage.setItem(qn,M),localStorage.setItem(er,JSON.stringify({user:I.user,scopes:I.scopes||[],expiresAt:I.expiresAt})),i(P),!0}catch(R){const I=R instanceof Error?R.message:"Auth failed";return h(I),!1}finally{d(!1)}},[]),b=w.useCallback(async()=>{try{d(!0),a?.sessionToken&&await fetch(`${Qr}/auth/logout`,{method:"POST",headers:{Authorization:`Bearer ${a.sessionToken}`}}),localStorage.removeItem(qn),localStorage.removeItem(er),i(null)}catch(M){console.error("Logout error:",M)}finally{d(!1)}},[a]),E=w.useCallback(async()=>{if(!a?.sessionToken)return!1;try{const M=await fetch(`${Qr}/auth/validate`,{method:"POST",headers:{Authorization:`Bearer ${a.sessionToken}`}});return M.ok?(await M.json()).valid===!0:(localStorage.removeItem(qn),localStorage.removeItem(er),i(null),!1)}catch(M){return console.error("Session check error:",M),!1}},[a]),S=w.useCallback(async()=>{if(!a?.sessionToken)return!1;try{d(!0);const M=await fetch(`${Qr}/auth/refresh`,{method:"POST",headers:{Authorization:`Bearer ${a.sessionToken}`}});if(!M.ok)throw new Error("Failed to refresh session");const R=await M.json();if(R.success&&R.sessionToken){const I={sessionToken:R.sessionToken,user:a.user,scopes:a.scopes,expiresAt:R.expiresAt};return localStorage.setItem(qn,R.sessionToken),localStorage.setItem(er,JSON.stringify({user:a.user,scopes:a.scopes,expiresAt:R.expiresAt})),i(I),!0}return!1}catch(M){return console.error("Session refresh error:",M),!1}finally{d(!1)}},[a]);w.useEffect(()=>{if(!a)return;const M=setInterval(()=>{E()},300*1e3);return()=>clearInterval(M)},[a,E]);const T={session:a,isAuthenticated:!!a,isLoading:c,error:m,login:g,logout:b,checkSession:E,refreshSession:S};return window.__authContext={handleOAuthCallback:f},n.jsx(Xd.Provider,{value:T,children:s})}function Jd(){const s=vd.useContext(Xd);if(s===void 0)throw new Error("useAuth must be used within an AuthProvider");return s}const sv=w.createContext(void 0),lv=window.ENV?.API_URL??"http://localhost:8999",fd=`${lv}/api`;function av({children:s}){const[a,i]=w.useState(new Map),[c,d]=w.useState(!1),[m,h]=w.useState(null),g=(M,R)=>`${M}/${R}`,f=w.useCallback(async(M,R,I)=>{try{d(!0),h(null);const P=g(R,I);if(a.has(P))return a.get(P)||null;const $=await fetch(`${fd}/permissions/${R}/${I}`,{method:"GET",headers:{Authorization:`Bearer ${M}`}});if(!$.ok)throw $.status===401?new Error("Unauthorized"):new Error("Failed to check permission");const L=await $.json(),A={permission:L.permission,role:L.role,canAdmin:L.canAdmin,canMaintain:L.canMaintain,canWrite:L.canWrite,canRead:L.canRead,denied:L.denied};return i(G=>{const se=new Map(G);return se.set(P,A),se}),A}catch(P){const $=P instanceof Error?P.message:"Permission check failed";return h($),null}finally{d(!1)}},[a]),b=w.useCallback(async(M,R,I,P)=>{try{d(!0),h(null);const $=await fetch(`${fd}/permissions/${R}/${I}/can-action`,{method:"POST",headers:{Authorization:`Bearer ${M}`,"Content-Type":"application/json"},body:JSON.stringify({action:P})});if(!$.ok)throw new Error("Failed to check action permission");return(await $.json()).can===!0}catch($){return console.error("Action permission check error:",$),!1}finally{d(!1)}},[]),E=w.useCallback((M,R)=>{const I=g(M,R);i(P=>{const $=new Map(P);return $.delete(I),$})},[]),S=w.useCallback(()=>{i(new Map)},[]),T={permissions:a,isLoading:c,error:m,checkPermission:f,canPerformAction:b,invalidatePermission:E,invalidateAll:S};return n.jsx(sv.Provider,{value:T,children:s})}function iv(){const{login:s,isLoading:a,error:i}=Jd(),[c,d]=w.useState(!1),m=async()=>{d(!0),await s()};return n.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-primary-500 to-primary-700 p-5",children:n.jsxs("div",{className:"bg-white rounded-xl shadow-2xl max-w-md w-full overflow-hidden",children:[n.jsxs("div",{className:"bg-gradient-to-br from-primary-500 to-primary-700 text-white p-8 text-center",children:[n.jsx("h1",{className:"text-4xl font-bold m-0",children:"MonoDog"}),n.jsx("p",{className:"text-sm opacity-90 font-medium mt-2 m-0",children:"Monorepo Analytics & Management"})]}),n.jsxs("div",{className:"p-10",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 text-center mb-8",children:"Sign in to your account"}),i&&n.jsx("div",{className:"bg-red-100 text-red-700 px-4 py-3 rounded-lg mb-5 text-sm border-l-4 border-red-700",children:i}),n.jsxs("button",{onClick:m,disabled:a||c,className:"w-full flex items-center justify-center gap-3 px-5 py-3 bg-primary-600 text-white rounded-lg font-semibold text-base cursor-pointer transition-all duration-300 disabled:opacity-60 disabled:cursor-not-allowed hover:enabled:bg-primary-700 hover:enabled:-translate-y-0.5 hover:enabled:shadow-lg mb-8",children:[n.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v 3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})}),"Continue with GitHub"]}),n.jsxs("div",{className:"flex items-center gap-3 my-8 text-gray-400 text-xs font-semibold uppercase tracking-widest",children:[n.jsx("div",{className:"flex-1 h-px bg-gray-200"}),n.jsx("span",{children:"GitHub OAuth Authentication"}),n.jsx("div",{className:"flex-1 h-px bg-gray-200"})]}),n.jsxs("div",{className:"bg-gray-50 rounded-lg p-5 mb-5",children:[n.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Why GitHub OAuth?"}),n.jsxs("ul",{className:"m-0 p-0 list-none space-y-2",children:[n.jsxs("li",{className:"text-sm text-gray-700 leading-relaxed",children:[n.jsx("strong",{className:"text-gray-900",children:"Secure:"})," No passwords stored, GitHub handles authentication"]}),n.jsxs("li",{className:"text-sm text-gray-700 leading-relaxed",children:[n.jsx("strong",{className:"text-gray-900",children:"Permissions:"})," Your permissions are automatically synced from GitHub"]}),n.jsxs("li",{className:"text-sm text-gray-700 leading-relaxed",children:[n.jsx("strong",{className:"text-gray-900",children:"Single Source of Truth:"})," GitHub remains your authority"]})]})]}),n.jsxs("div",{className:"bg-primary-50 rounded-lg p-5 border-l-4 border-primary-500",children:[n.jsx("h4",{className:"text-xs font-semibold text-gray-900 mb-3 uppercase tracking-wide",children:"Requested Permissions"}),n.jsxs("ul",{className:"m-0 p-0 list-none space-y-2",children:[n.jsxs("li",{className:"text-sm text-gray-700",children:[n.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"read:user"})," - Read your profile information"]}),n.jsxs("li",{className:"text-sm text-gray-700",children:[n.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"user:email"})," - Access your email address"]}),n.jsxs("li",{className:"text-sm text-gray-700",children:[n.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"repo"})," - Access your repositories (required for private repos)"]})]})]})]}),n.jsx("div",{className:"bg-gray-50 px-10 py-5 border-t border-gray-200 text-center",children:n.jsx("p",{className:"text-xs text-gray-500 leading-relaxed m-0",children:"By signing in, you agree to our Terms of Service and Privacy Policy"})})]})})}function ov(){const s=Li(),[a,i]=w.useState(!0),[c,d]=w.useState(null);return w.useEffect(()=>{(async()=>{try{const h=new URLSearchParams(window.location.search),g=h.get("code"),f=h.get("state"),b=h.get("error"),E=h.get("error_description");if(b){d(`${b}: ${E}`),i(!1);return}if(!g||!f){d("Missing authorization code or state"),i(!1);return}const T=`${window.ENV?.API_URL??"http://localhost:8999"}/api`,M=await fetch(`${T}/auth/callback?code=${g}&state=${f}`);if(!M.ok){const P=await M.json();d(P.message||"Authentication failed"),i(!1);return}const R=await M.json();if(!R.success||!R.sessionToken){d("Failed to complete authentication"),i(!1);return}const I=window.__authContext;if(I&&I.handleOAuthCallback)if(await I.handleOAuthCallback(R.sessionToken)){const $=R.redirectUrl||"/";s($)}else d("Failed to store session");else d("Auth context not available")}catch(h){const g=h instanceof Error?h.message:"Unknown error occurred";d(g)}finally{i(!1)}})()},[s]),n.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-primary-500 to-primary-700 p-5",children:n.jsx("div",{className:"bg-white rounded-xl shadow-2xl max-w-sm text-center p-10",children:a?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"w-10 h-10 border-4 border-gray-200 border-t-indigo-500 rounded-full animate-spin mx-auto my-5"}),n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mt-5 mb-2",children:"Completing Authentication..."}),n.jsx("p",{className:"text-gray-700 text-sm leading-relaxed",children:"Please wait while we verify your GitHub account."})]}):c?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"text-5xl mb-5",children:"⚠️"}),n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Authentication Failed"}),n.jsx("p",{className:"text-gray-700 text-sm leading-relaxed mb-5",children:c}),n.jsx("button",{onClick:()=>s("/login"),className:"inline-block px-6 py-3 bg-primary-500 text-white rounded-lg font-semibold text-sm cursor-pointer transition-all duration-300 hover:bg-primary-600 hover:-translate-y-0.5 hover:shadow-lg",children:"Return to Login"})]}):null})})}function cv({children:s}){const{isAuthenticated:a,isLoading:i}=Jd();return i?n.jsxs("div",{className:"loading-container",children:[n.jsx("div",{className:"spinner"}),n.jsx("p",{children:"Loading..."})]}):a?n.jsx(n.Fragment,{children:s}):n.jsx(Xh,{to:"/login",replace:!0})}function uv(){return n.jsx(lx,{children:n.jsx(rv,{children:n.jsx(av,{children:n.jsxs(Pd,{children:[n.jsx(tr,{path:"/login",element:n.jsx(iv,{})}),n.jsx(tr,{path:"/auth/callback",element:n.jsx(ov,{})}),n.jsx(tr,{path:"/*",element:n.jsx(cv,{children:n.jsx(Jg,{children:n.jsx(tv,{})})})})]})})})})}const pd=document.getElementById("root");pd&&sh.createRoot(pd).render(n.jsx(uv,{}));
|