@manojkmfsi/monodog 1.1.21 â 1.1.23
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 +12 -0
- package/dist/controllers/publish-controller.js +311 -0
- package/dist/middleware/auth-middleware.js +27 -4
- package/dist/middleware/server-startup.js +9 -0
- package/dist/routes/auth-routes.js +30 -2
- package/dist/routes/publish-routes.js +46 -0
- package/dist/services/changeset-service.js +249 -0
- package/dist/utils/utilities.js +49 -0
- package/monodog-dashboard/dist/assets/index-7G3SCgcz.css +1 -0
- package/monodog-dashboard/dist/assets/index-BMoE990p.js +13 -0
- package/monodog-dashboard/dist/assets/index-BMoE990p.js.map +1 -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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function G0(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 K0(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var hi={exports:{}},Wr={},xi={exports:{}},se={};var Du;function Z0(){if(Du)return se;Du=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"),p=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),v=Symbol.iterator;function T(b){return b===null||typeof b!="object"?null:(b=v&&b[v]||b["@@iterator"],typeof b=="function"?b:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,R={};function P(b,I,re){this.props=b,this.context=I,this.refs=R,this.updater=re||B}P.prototype.isReactComponent={},P.prototype.setState=function(b,I){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,I,"setState")},P.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function A(){}A.prototype=P.prototype;function L(b,I,re){this.props=b,this.context=I,this.refs=R,this.updater=re||B}var D=L.prototype=new A;D.constructor=L,M(D,P.prototype),D.isPureReactComponent=!0;var Y=Array.isArray,oe=Object.prototype.hasOwnProperty,ve={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function xe(b,I,re){var ie,de={},me=null,je=null;if(I!=null)for(ie in I.ref!==void 0&&(je=I.ref),I.key!==void 0&&(me=""+I.key),I)oe.call(I,ie)&&!Z.hasOwnProperty(ie)&&(de[ie]=I[ie]);var ge=arguments.length-2;if(ge===1)de.children=re;else if(1<ge){for(var Se=Array(ge),nt=0;nt<ge;nt++)Se[nt]=arguments[nt+2];de.children=Se}if(b&&b.defaultProps)for(ie in ge=b.defaultProps,ge)de[ie]===void 0&&(de[ie]=ge[ie]);return{$$typeof:s,type:b,key:me,ref:je,props:de,_owner:ve.current}}function Le(b,I){return{$$typeof:s,type:b.type,key:I,ref:b.ref,props:b.props,_owner:b._owner}}function fe(b){return typeof b=="object"&&b!==null&&b.$$typeof===s}function ne(b){var I={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(re){return I[re]})}var ce=/\/+/g;function le(b,I){return typeof b=="object"&&b!==null&&b.key!=null?ne(""+b.key):I.toString(36)}function ae(b,I,re,ie,de){var me=typeof b;(me==="undefined"||me==="boolean")&&(b=null);var je=!1;if(b===null)je=!0;else switch(me){case"string":case"number":je=!0;break;case"object":switch(b.$$typeof){case s:case a:je=!0}}if(je)return je=b,de=de(je),b=ie===""?"."+le(je,0):ie,Y(de)?(re="",b!=null&&(re=b.replace(ce,"$&/")+"/"),ae(de,I,re,"",function(nt){return nt})):de!=null&&(fe(de)&&(de=Le(de,re+(!de.key||je&&je.key===de.key?"":(""+de.key).replace(ce,"$&/")+"/")+b)),I.push(de)),1;if(je=0,ie=ie===""?".":ie+":",Y(b))for(var ge=0;ge<b.length;ge++){me=b[ge];var Se=ie+le(me,ge);je+=ae(me,I,re,Se,de)}else if(Se=T(b),typeof Se=="function")for(b=Se.call(b),ge=0;!(me=b.next()).done;)me=me.value,Se=ie+le(me,ge++),je+=ae(me,I,re,Se,de);else if(me==="object")throw I=String(b),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.");return je}function Ne(b,I,re){if(b==null)return b;var ie=[],de=0;return ae(b,ie,"","",function(me){return I.call(re,me,de++)}),ie}function pe(b){if(b._status===-1){var I=b._result;I=I(),I.then(function(re){(b._status===0||b._status===-1)&&(b._status=1,b._result=re)},function(re){(b._status===0||b._status===-1)&&(b._status=2,b._result=re)}),b._status===-1&&(b._status=0,b._result=I)}if(b._status===1)return b._result.default;throw b._result}var te={current:null},$={transition:null},K={ReactCurrentDispatcher:te,ReactCurrentBatchConfig:$,ReactCurrentOwner:ve};function U(){throw Error("act(...) is not supported in production builds of React.")}return se.Children={map:Ne,forEach:function(b,I,re){Ne(b,function(){I.apply(this,arguments)},re)},count:function(b){var I=0;return Ne(b,function(){I++}),I},toArray:function(b){return Ne(b,function(I){return I})||[]},only:function(b){if(!fe(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},se.Component=P,se.Fragment=i,se.Profiler=d,se.PureComponent=L,se.StrictMode=c,se.Suspense=f,se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,se.act=U,se.cloneElement=function(b,I,re){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var ie=M({},b.props),de=b.key,me=b.ref,je=b._owner;if(I!=null){if(I.ref!==void 0&&(me=I.ref,je=ve.current),I.key!==void 0&&(de=""+I.key),b.type&&b.type.defaultProps)var ge=b.type.defaultProps;for(Se in I)oe.call(I,Se)&&!Z.hasOwnProperty(Se)&&(ie[Se]=I[Se]===void 0&&ge!==void 0?ge[Se]:I[Se])}var Se=arguments.length-2;if(Se===1)ie.children=re;else if(1<Se){ge=Array(Se);for(var nt=0;nt<Se;nt++)ge[nt]=arguments[nt+2];ie.children=ge}return{$$typeof:s,type:b.type,key:de,ref:me,props:ie,_owner:je}},se.createContext=function(b){return b={$$typeof:h,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:m,_context:b},b.Consumer=b},se.createElement=xe,se.createFactory=function(b){var I=xe.bind(null,b);return I.type=b,I},se.createRef=function(){return{current:null}},se.forwardRef=function(b){return{$$typeof:p,render:b}},se.isValidElement=fe,se.lazy=function(b){return{$$typeof:C,_payload:{_status:-1,_result:b},_init:pe}},se.memo=function(b,I){return{$$typeof:j,type:b,compare:I===void 0?null:I}},se.startTransition=function(b){var I=$.transition;$.transition={};try{b()}finally{$.transition=I}},se.unstable_act=U,se.useCallback=function(b,I){return te.current.useCallback(b,I)},se.useContext=function(b){return te.current.useContext(b)},se.useDebugValue=function(){},se.useDeferredValue=function(b){return te.current.useDeferredValue(b)},se.useEffect=function(b,I){return te.current.useEffect(b,I)},se.useId=function(){return te.current.useId()},se.useImperativeHandle=function(b,I,re){return te.current.useImperativeHandle(b,I,re)},se.useInsertionEffect=function(b,I){return te.current.useInsertionEffect(b,I)},se.useLayoutEffect=function(b,I){return te.current.useLayoutEffect(b,I)},se.useMemo=function(b,I){return te.current.useMemo(b,I)},se.useReducer=function(b,I,re){return te.current.useReducer(b,I,re)},se.useRef=function(b){return te.current.useRef(b)},se.useState=function(b){return te.current.useState(b)},se.useSyncExternalStore=function(b,I,re){return te.current.useSyncExternalStore(b,I,re)},se.useTransition=function(){return te.current.useTransition()},se.version="18.3.1",se}var Fu;function ki(){return Fu||(Fu=1,xi.exports=Z0()),xi.exports}var Bu;function X0(){if(Bu)return Wr;Bu=1;var s=ki(),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(p,f,j){var C,v={},T=null,B=null;j!==void 0&&(T=""+j),f.key!==void 0&&(T=""+f.key),f.ref!==void 0&&(B=f.ref);for(C in f)c.call(f,C)&&!m.hasOwnProperty(C)&&(v[C]=f[C]);if(p&&p.defaultProps)for(C in f=p.defaultProps,f)v[C]===void 0&&(v[C]=f[C]);return{$$typeof:a,type:p,key:T,ref:B,props:v,_owner:d.current}}return Wr.Fragment=i,Wr.jsx=h,Wr.jsxs=h,Wr}var $u;function q0(){return $u||($u=1,hi.exports=X0()),hi.exports}var t=q0(),cl={},fi={exports:{}},tt={},pi={exports:{}},gi={};var Uu;function J0(){return Uu||(Uu=1,(function(s){function a($,K){var U=$.length;$.push(K);e:for(;0<U;){var b=U-1>>>1,I=$[b];if(0<d(I,K))$[b]=K,$[U]=I,U=b;else break e}}function i($){return $.length===0?null:$[0]}function c($){if($.length===0)return null;var K=$[0],U=$.pop();if(U!==K){$[0]=U;e:for(var b=0,I=$.length,re=I>>>1;b<re;){var ie=2*(b+1)-1,de=$[ie],me=ie+1,je=$[me];if(0>d(de,U))me<I&&0>d(je,de)?($[b]=je,$[me]=U,b=me):($[b]=de,$[ie]=U,b=ie);else if(me<I&&0>d(je,U))$[b]=je,$[me]=U,b=me;else break e}}return K}function d($,K){var U=$.sortIndex-K.sortIndex;return U!==0?U:$.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,p=h.now();s.unstable_now=function(){return h.now()-p}}var f=[],j=[],C=1,v=null,T=3,B=!1,M=!1,R=!1,P=typeof setTimeout=="function"?setTimeout:null,A=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 D($){for(var K=i(j);K!==null;){if(K.callback===null)c(j);else if(K.startTime<=$)c(j),K.sortIndex=K.expirationTime,a(f,K);else break;K=i(j)}}function Y($){if(R=!1,D($),!M)if(i(f)!==null)M=!0,pe(oe);else{var K=i(j);K!==null&&te(Y,K.startTime-$)}}function oe($,K){M=!1,R&&(R=!1,A(xe),xe=-1),B=!0;var U=T;try{for(D(K),v=i(f);v!==null&&(!(v.expirationTime>K)||$&&!ne());){var b=v.callback;if(typeof b=="function"){v.callback=null,T=v.priorityLevel;var I=b(v.expirationTime<=K);K=s.unstable_now(),typeof I=="function"?v.callback=I:v===i(f)&&c(f),D(K)}else c(f);v=i(f)}if(v!==null)var re=!0;else{var ie=i(j);ie!==null&&te(Y,ie.startTime-K),re=!1}return re}finally{v=null,T=U,B=!1}}var ve=!1,Z=null,xe=-1,Le=5,fe=-1;function ne(){return!(s.unstable_now()-fe<Le)}function ce(){if(Z!==null){var $=s.unstable_now();fe=$;var K=!0;try{K=Z(!0,$)}finally{K?le():(ve=!1,Z=null)}}else ve=!1}var le;if(typeof L=="function")le=function(){L(ce)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,Ne=ae.port2;ae.port1.onmessage=ce,le=function(){Ne.postMessage(null)}}else le=function(){P(ce,0)};function pe($){Z=$,ve||(ve=!0,le())}function te($,K){xe=P(function(){$(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($){$.callback=null},s.unstable_continueExecution=function(){M||B||(M=!0,pe(oe))},s.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Le=0<$?Math.floor(1e3/$):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_getFirstCallbackNode=function(){return i(f)},s.unstable_next=function($){switch(T){case 1:case 2:case 3:var K=3;break;default:K=T}var U=T;T=K;try{return $()}finally{T=U}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function($,K){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var U=T;T=$;try{return K()}finally{T=U}},s.unstable_scheduleCallback=function($,K,U){var b=s.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?b+U:b):U=b,$){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=U+I,$={id:C++,callback:K,priorityLevel:$,startTime:U,expirationTime:I,sortIndex:-1},U>b?($.sortIndex=U,a(j,$),i(f)===null&&$===i(j)&&(R?(A(xe),xe=-1):R=!0,te(Y,U-b))):($.sortIndex=I,a(f,$),M||B||(M=!0,pe(oe))),$},s.unstable_shouldYield=ne,s.unstable_wrapCallback=function($){var K=T;return function(){var U=T;T=K;try{return $.apply(this,arguments)}finally{T=U}}}})(gi)),gi}var Vu;function eh(){return Vu||(Vu=1,pi.exports=J0()),pi.exports}var Hu;function th(){if(Hu)return tt;Hu=1;var s=ki(),a=eh();function i(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+n+" 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,n){h(e,n),h(e+"Capture",n)}function h(e,n){for(d[e]=n,e=0;e<n.length;e++)c.add(n[e])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,j=/^[: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]*$/,C={},v={};function T(e){return f.call(v,e)?!0:f.call(C,e)?!1:j.test(e)?v[e]=!0:(C[e]=!0,!1)}function B(e,n,r,l){if(r!==null&&r.type===0)return!1;switch(typeof n){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 M(e,n,r,l){if(n===null||typeof n>"u"||B(e,n,r,l))return!0;if(l)return!1;if(r!==null)switch(r.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function R(e,n,r,l,o,u,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=l,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=x}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){P[e]=new R(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];P[n]=new R(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){P[e]=new R(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){P[e]=new R(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 R(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){P[e]=new R(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){P[e]=new R(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){P[e]=new R(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){P[e]=new R(e,5,!1,e.toLowerCase(),null,!1,!1)});var A=/[\-:]([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 n=e.replace(A,L);P[n]=new R(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(A,L);P[n]=new R(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(A,L);P[n]=new R(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){P[e]=new R(e,1,!1,e.toLowerCase(),null,!1,!1)}),P.xlinkHref=new R("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){P[e]=new R(e,1,!1,e.toLowerCase(),null,!0,!0)});function D(e,n,r,l){var o=P.hasOwnProperty(n)?P[n]:null;(o!==null?o.type!==0:l||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(M(n,r,o,l)&&(r=null),l||o===null?T(n)&&(r===null?e.removeAttribute(n):e.setAttribute(n,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(n=o.attributeName,l=o.attributeNamespace,r===null?e.removeAttribute(n):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,l?e.setAttributeNS(l,n,r):e.setAttribute(n,r))))}var Y=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,oe=Symbol.for("react.element"),ve=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),xe=Symbol.for("react.strict_mode"),Le=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),ne=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),te=Symbol.for("react.offscreen"),$=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=$&&e[$]||e["@@iterator"],typeof e=="function"?e:null)}var U=Object.assign,b;function I(e){if(b===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);b=n&&n[1]||""}return`
|
|
2
|
+
`+b+e}var re=!1;function ie(e,n){if(!e||re)return"";re=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(E){var l=E}Reflect.construct(e,[],n)}else{try{n.call()}catch(E){l=E}e.call(n.prototype)}else{try{throw Error()}catch(E){l=E}e()}}catch(E){if(E&&l&&typeof E.stack=="string"){for(var o=E.stack.split(`
|
|
3
|
+
`),u=l.stack.split(`
|
|
4
|
+
`),x=o.length-1,g=u.length-1;1<=x&&0<=g&&o[x]!==u[g];)g--;for(;1<=x&&0<=g;x--,g--)if(o[x]!==u[g]){if(x!==1||g!==1)do if(x--,g--,0>g||o[x]!==u[g]){var y=`
|
|
5
|
+
`+o[x].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),y}while(1<=x&&0<=g);break}}}finally{re=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?I(e):""}function de(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=ie(e.type,!1),e;case 11:return e=ie(e.type.render,!1),e;case 1:return e=ie(e.type,!0),e;default:return""}}function me(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 Z:return"Fragment";case ve:return"Portal";case Le:return"Profiler";case xe:return"StrictMode";case le:return"Suspense";case ae:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ne:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case ce:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ne:return n=e.displayName||null,n!==null?n:me(e.type)||"Memo";case pe:n=e._payload,e=e._init;try{return me(e(n))}catch{}}return null}function je(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(n);case 8:return n===xe?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function ge(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Se(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function nt(e){var n=Se(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,u=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return o.call(this)},set:function(x){l=""+x,u.call(this,x)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Jr(e){e._valueTracker||(e._valueTracker=nt(e))}function Vi(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),l="";return e&&(l=Se(e)?e.checked?"true":"false":e.value),e=l,e!==r?(n.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 jl(e,n){var r=n.checked;return U({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Hi(e,n){var r=n.defaultValue==null?"":n.defaultValue,l=n.checked!=null?n.checked:n.defaultChecked;r=ge(n.value!=null?n.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Wi(e,n){n=n.checked,n!=null&&D(e,"checked",n,!1)}function wl(e,n){Wi(e,n);var r=ge(n.value),l=n.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}n.hasOwnProperty("value")?Nl(e,n.type,r):n.hasOwnProperty("defaultValue")&&Nl(e,n.type,ge(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Yi(e,n,r){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var l=n.type;if(!(l!=="submit"&&l!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,r||n===e.value||(e.value=n),e.defaultValue=n}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Nl(e,n,r){(n!=="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,n,r,l){if(e=e.options,n){n={};for(var o=0;o<r.length;o++)n["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=n.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&l&&(e[r].defaultSelected=!0)}else{for(r=""+ge(r),n=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}n!==null||e[o].disabled||(n=e[o])}n!==null&&(n.selected=!0)}}function bl(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(i(91));return U({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qi(e,n){var r=n.value;if(r==null){if(r=n.children,n=n.defaultValue,r!=null){if(n!=null)throw Error(i(92));if(ar(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n==null&&(n=""),r=n}e._wrapperState={initialValue:ge(r)}}function Gi(e,n){var r=ge(n.value),l=ge(n.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),n.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),l!=null&&(e.defaultValue=""+l)}function Ki(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Zi(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 kl(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Zi(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ts,Xi=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,r,l,o){MSApp.execUnsafeLocalFunction(function(){return e(n,r,l,o)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(ts=ts||document.createElement("div"),ts.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=ts.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function ir(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}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(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),or[n]=or[e]})});function qi(e,n,r){return n==null||typeof n=="boolean"||n===""?"":r||typeof n!="number"||n===0||or.hasOwnProperty(e)&&or[e]?(""+n).trim():n+"px"}function Ji(e,n){e=e.style;for(var r in n)if(n.hasOwnProperty(r)){var l=r.indexOf("--")===0,o=qi(r,n[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,o):e[r]=o}}var Jd=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sl(e,n){if(n){if(Jd[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(i(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(i(61))}if(n.style!=null&&typeof n.style!="object")throw Error(i(62))}}function Cl(e,n){if(e.indexOf("-")===-1)return typeof n.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 El=null;function Pl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ll=null,Pn=null,Ln=null;function eo(e){if(e=Tr(e)){if(typeof Ll!="function")throw Error(i(280));var n=e.stateNode;n&&(n=ks(n),Ll(e.stateNode,e.type,n))}}function to(e){Pn?Ln?Ln.push(e):Ln=[e]:Pn=e}function no(){if(Pn){var e=Pn,n=Ln;if(Ln=Pn=null,eo(e),n)for(e=0;e<n.length;e++)eo(n[e])}}function ro(e,n){return e(n)}function so(){}var Tl=!1;function lo(e,n,r){if(Tl)return e(n,r);Tl=!0;try{return ro(e,n,r)}finally{Tl=!1,(Pn!==null||Ln!==null)&&(so(),no())}}function cr(e,n){var r=e.stateNode;if(r===null)return null;var l=ks(r);if(l===null)return null;r=l[n];e:switch(n){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,n,typeof r));return r}var Ml=!1;if(p)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){Ml=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Ml=!1}function em(e,n,r,l,o,u,x,g,y){var E=Array.prototype.slice.call(arguments,3);try{n.apply(r,E)}catch(O){this.onError(O)}}var dr=!1,ns=null,rs=!1,Rl=null,tm={onError:function(e){dr=!0,ns=e}};function nm(e,n,r,l,o,u,x,g,y){dr=!1,ns=null,em.apply(tm,arguments)}function rm(e,n,r,l,o,u,x,g,y){if(nm.apply(this,arguments),dr){if(dr){var E=ns;dr=!1,ns=null}else throw Error(i(198));rs||(rs=!0,Rl=E)}}function mn(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function ao(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function io(e){if(mn(e)!==e)throw Error(i(188))}function sm(e){var n=e.alternate;if(!n){if(n=mn(e),n===null)throw Error(i(188));return n!==e?null:e}for(var r=e,l=n;;){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 io(o),e;if(u===l)return io(o),n;u=u.sibling}throw Error(i(188))}if(r.return!==l.return)r=o,l=u;else{for(var x=!1,g=o.child;g;){if(g===r){x=!0,r=o,l=u;break}if(g===l){x=!0,l=o,r=u;break}g=g.sibling}if(!x){for(g=u.child;g;){if(g===r){x=!0,r=u,l=o;break}if(g===l){x=!0,l=u,r=o;break}g=g.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:n}function oo(e){return e=sm(e),e!==null?co(e):null}function co(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=co(e);if(n!==null)return n;e=e.sibling}return null}var uo=a.unstable_scheduleCallback,mo=a.unstable_cancelCallback,lm=a.unstable_shouldYield,am=a.unstable_requestPaint,Me=a.unstable_now,im=a.unstable_getCurrentPriorityLevel,_l=a.unstable_ImmediatePriority,ho=a.unstable_UserBlockingPriority,ss=a.unstable_NormalPriority,om=a.unstable_LowPriority,xo=a.unstable_IdlePriority,ls=null,Nt=null;function cm(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:mm,um=Math.log,dm=Math.LN2;function mm(e){return e>>>=0,e===0?32:31-(um(e)/dm|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,n){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 g=x&~o;g!==0?l=mr(g):(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(n!==0&&n!==l&&(n&o)===0&&(o=l&-l,u=n&-n,o>=u||o===16&&(u&4194240)!==0))return n;if((l&4)!==0&&(l|=r&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=l;0<n;)r=31-ft(n),o=1<<r,l|=e[r],n&=~o;return l}function hm(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 xm(e,n){for(var r=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes;0<u;){var x=31-ft(u),g=1<<x,y=o[x];y===-1?((g&r)===0||(g&l)!==0)&&(o[x]=hm(g,n)):y<=n&&(e.expiredLanes|=g),u&=~g}}function Il(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fo(){var e=as;return as<<=1,(as&4194240)===0&&(as=64),e}function Ol(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function hr(e,n,r){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-ft(n),e[n]=r}function fm(e,n){var r=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-ft(r),u=1<<o;n[o]=0,l[o]=-1,e[o]=-1,r&=~u}}function zl(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var l=31-ft(r),o=1<<l;o&n|e[l]&n&&(e[l]|=n),r&=~o}}var ye=0;function po(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var go,Al,yo,vo,jo,Dl=!1,cs=[],$t=null,Ut=null,Vt=null,xr=new Map,fr=new Map,Ht=[],pm="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 wo(e,n){switch(e){case"focusin":case"focusout":$t=null;break;case"dragenter":case"dragleave":Ut=null;break;case"mouseover":case"mouseout":Vt=null;break;case"pointerover":case"pointerout":xr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":fr.delete(n.pointerId)}}function pr(e,n,r,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:n,domEventName:r,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},n!==null&&(n=Tr(n),n!==null&&Al(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,o!==null&&n.indexOf(o)===-1&&n.push(o),e)}function gm(e,n,r,l,o){switch(n){case"focusin":return $t=pr($t,e,n,r,l,o),!0;case"dragenter":return Ut=pr(Ut,e,n,r,l,o),!0;case"mouseover":return Vt=pr(Vt,e,n,r,l,o),!0;case"pointerover":var u=o.pointerId;return xr.set(u,pr(xr.get(u)||null,e,n,r,l,o)),!0;case"gotpointercapture":return u=o.pointerId,fr.set(u,pr(fr.get(u)||null,e,n,r,l,o)),!0}return!1}function No(e){var n=hn(e.target);if(n!==null){var r=mn(n);if(r!==null){if(n=r.tag,n===13){if(n=ao(r),n!==null){e.blockedOn=n,jo(e.priority,function(){yo(r)});return}}else if(n===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 n=e.targetContainers;0<n.length;){var r=Bl(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var l=new r.constructor(r.type,r);El=l,r.target.dispatchEvent(l),El=null}else return n=Tr(r),n!==null&&Al(n),e.blockedOn=r,!1;n.shift()}return!0}function bo(e,n,r){us(e)&&r.delete(n)}function ym(){Dl=!1,$t!==null&&us($t)&&($t=null),Ut!==null&&us(Ut)&&(Ut=null),Vt!==null&&us(Vt)&&(Vt=null),xr.forEach(bo),fr.forEach(bo)}function gr(e,n){e.blockedOn===n&&(e.blockedOn=null,Dl||(Dl=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,ym)))}function yr(e){function n(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),Vt!==null&&gr(Vt,e),xr.forEach(n),fr.forEach(n),r=0;r<Ht.length;r++)l=Ht[r],l.blockedOn===e&&(l.blockedOn=null);for(;0<Ht.length&&(r=Ht[0],r.blockedOn===null);)No(r),r.blockedOn===null&&Ht.shift()}var Tn=Y.ReactCurrentBatchConfig,ds=!0;function vm(e,n,r,l){var o=ye,u=Tn.transition;Tn.transition=null;try{ye=1,Fl(e,n,r,l)}finally{ye=o,Tn.transition=u}}function jm(e,n,r,l){var o=ye,u=Tn.transition;Tn.transition=null;try{ye=4,Fl(e,n,r,l)}finally{ye=o,Tn.transition=u}}function Fl(e,n,r,l){if(ds){var o=Bl(e,n,r,l);if(o===null)ra(e,n,l,ms,r),wo(e,l);else if(gm(o,e,n,r,l))l.stopPropagation();else if(wo(e,l),n&4&&-1<pm.indexOf(e)){for(;o!==null;){var u=Tr(o);if(u!==null&&go(u),u=Bl(e,n,r,l),u===null&&ra(e,n,l,ms,r),u===o)break;o=u}o!==null&&l.stopPropagation()}else ra(e,n,l,null,r)}}var ms=null;function Bl(e,n,r,l){if(ms=null,e=Pl(l),e=hn(e),e!==null)if(n=mn(e),n===null)e=null;else if(r=n.tag,r===13){if(e=ao(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return ms=e,null}function ko(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(im()){case _l:return 1;case ho:return 4;case ss:case om:return 16;case xo:return 536870912;default:return 16}default:return 16}}var Wt=null,$l=null,hs=null;function So(){if(hs)return hs;var e,n=$l,r=n.length,l,o="value"in Wt?Wt.value:Wt.textContent,u=o.length;for(e=0;e<r&&n[e]===o[e];e++);var x=r-e;for(l=1;l<=x&&n[r-l]===o[u-l];l++);return hs=o.slice(e,1<l?1-l:void 0)}function xs(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function fs(){return!0}function Co(){return!1}function rt(e){function n(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 g in e)e.hasOwnProperty(g)&&(r=e[g],this[g]=r?r(u):u[g]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?fs:Co,this.isPropagationStopped=Co,this}return U(n.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}),n}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ul=rt(Mn),vr=U({},Mn,{view:0,detail:0}),wm=rt(vr),Vl,Hl,jr,ps=U({},vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yl,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"?(Vl=e.screenX-jr.screenX,Hl=e.screenY-jr.screenY):Hl=Vl=0,jr=e),Vl)},movementY:function(e){return"movementY"in e?e.movementY:Hl}}),Eo=rt(ps),Nm=U({},ps,{dataTransfer:0}),bm=rt(Nm),km=U({},vr,{relatedTarget:0}),Wl=rt(km),Sm=U({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0}),Cm=rt(Sm),Em=U({},Mn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pm=rt(Em),Lm=U({},Mn,{data:0}),Po=rt(Lm),Tm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mm={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"},Rm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _m(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Rm[e])?!!n[e]:!1}function Yl(){return _m}var Im=U({},vr,{key:function(e){if(e.key){var n=Tm[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yl,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}}),Om=rt(Im),zm=U({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lo=rt(zm),Am=U({},vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yl}),Dm=rt(Am),Fm=U({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bm=rt(Fm),$m=U({},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}),Um=rt($m),Vm=[9,13,27,32],Ql=p&&"CompositionEvent"in window,wr=null;p&&"documentMode"in document&&(wr=document.documentMode);var Hm=p&&"TextEvent"in window&&!wr,To=p&&(!Ql||wr&&8<wr&&11>=wr),Mo=" ",Ro=!1;function _o(e,n){switch(e){case"keyup":return Vm.indexOf(n.keyCode)!==-1;case"keydown":return n.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 Rn=!1;function Wm(e,n){switch(e){case"compositionend":return Io(n);case"keypress":return n.which!==32?null:(Ro=!0,Mo);case"textInput":return e=n.data,e===Mo&&Ro?null:e;default:return null}}function Ym(e,n){if(Rn)return e==="compositionend"||!Ql&&_o(e,n)?(e=So(),hs=$l=Wt=null,Rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return To&&n.locale!=="ko"?null:n.data;default:return null}}var Qm={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 Oo(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Qm[e.type]:n==="textarea"}function zo(e,n,r,l){to(l),n=ws(n,"onChange"),0<n.length&&(r=new Ul("onChange","change",null,r,l),e.push({event:r,listeners:n}))}var Nr=null,br=null;function Gm(e){ec(e,0)}function gs(e){var n=An(e);if(Vi(n))return e}function Km(e,n){if(e==="change")return n}var Ao=!1;if(p){var Gl;if(p){var Kl="oninput"in document;if(!Kl){var Do=document.createElement("div");Do.setAttribute("oninput","return;"),Kl=typeof Do.oninput=="function"}Gl=Kl}else Gl=!1;Ao=Gl&&(!document.documentMode||9<document.documentMode)}function Fo(){Nr&&(Nr.detachEvent("onpropertychange",Bo),br=Nr=null)}function Bo(e){if(e.propertyName==="value"&&gs(br)){var n=[];zo(n,br,e,Pl(e)),lo(Gm,n)}}function Zm(e,n,r){e==="focusin"?(Fo(),Nr=n,br=r,Nr.attachEvent("onpropertychange",Bo)):e==="focusout"&&Fo()}function Xm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gs(br)}function qm(e,n){if(e==="click")return gs(n)}function Jm(e,n){if(e==="input"||e==="change")return gs(n)}function e0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var pt=typeof Object.is=="function"?Object.is:e0;function kr(e,n){if(pt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),l=Object.keys(n);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var o=r[l];if(!f.call(n,o)||!pt(e[o],n[o]))return!1}return!0}function $o(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uo(e,n){var r=$o(e);e=0;for(var l;r;){if(r.nodeType===3){if(l=e+r.textContent.length,e<=n&&l>=n)return{node:r,offset:n-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=$o(r)}}function Vo(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Vo(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ho(){for(var e=window,n=es();n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=es(e.document)}return n}function Zl(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function t0(e){var n=Ho(),r=e.focusedElem,l=e.selectionRange;if(n!==r&&r&&r.ownerDocument&&Vo(r.ownerDocument.documentElement,r)){if(l!==null&&Zl(r)){if(n=l.start,e=l.end,e===void 0&&(e=n),"selectionStart"in r)r.selectionStart=n,r.selectionEnd=Math.min(e,r.value.length);else if(e=(n=r.ownerDocument||document)&&n.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=Uo(r,u);var x=Uo(r,l);o&&x&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(o.node,o.offset),e.removeAllRanges(),u>l?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=r;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<n.length;r++)e=n[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var n0=p&&"documentMode"in document&&11>=document.documentMode,_n=null,Xl=null,Sr=null,ql=!1;function Wo(e,n,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ql||_n==null||_n!==es(l)||(l=_n,"selectionStart"in l&&Zl(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(Xl,"onSelect"),0<l.length&&(n=new Ul("onSelect","select",null,n,r),e.push({event:n,listeners:l}),n.target=_n)))}function ys(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var In={animationend:ys("Animation","AnimationEnd"),animationiteration:ys("Animation","AnimationIteration"),animationstart:ys("Animation","AnimationStart"),transitionend:ys("Transition","TransitionEnd")},Jl={},Yo={};p&&(Yo=document.createElement("div").style,"AnimationEvent"in window||(delete In.animationend.animation,delete In.animationiteration.animation,delete In.animationstart.animation),"TransitionEvent"in window||delete In.transitionend.transition);function vs(e){if(Jl[e])return Jl[e];if(!In[e])return e;var n=In[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in Yo)return Jl[e]=n[r];return e}var Qo=vs("animationend"),Go=vs("animationiteration"),Ko=vs("animationstart"),Zo=vs("transitionend"),Xo=new Map,qo="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 Yt(e,n){Xo.set(e,n),m(n,[e])}for(var ea=0;ea<qo.length;ea++){var ta=qo[ea],r0=ta.toLowerCase(),s0=ta[0].toUpperCase()+ta.slice(1);Yt(r0,"on"+s0)}Yt(Qo,"onAnimationEnd"),Yt(Go,"onAnimationIteration"),Yt(Ko,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(Zo,"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(" "),l0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function Jo(e,n,r){var l=e.type||"unknown-event";e.currentTarget=r,rm(l,n,void 0,e),e.currentTarget=null}function ec(e,n){n=(n&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(n)for(var x=l.length-1;0<=x;x--){var g=l[x],y=g.instance,E=g.currentTarget;if(g=g.listener,y!==u&&o.isPropagationStopped())break e;Jo(o,g,E),u=y}else for(x=0;x<l.length;x++){if(g=l[x],y=g.instance,E=g.currentTarget,g=g.listener,y!==u&&o.isPropagationStopped())break e;Jo(o,g,E),u=y}}}if(rs)throw e=Rl,rs=!1,Rl=null,e}function be(e,n){var r=n[ca];r===void 0&&(r=n[ca]=new Set);var l=e+"__bubble";r.has(l)||(tc(n,e,2,!1),r.add(l))}function na(e,n,r){var l=0;n&&(l|=4),tc(r,e,l,n)}var js="_reactListening"+Math.random().toString(36).slice(2);function Er(e){if(!e[js]){e[js]=!0,c.forEach(function(r){r!=="selectionchange"&&(l0.has(r)||na(r,!1,e),na(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[js]||(n[js]=!0,na("selectionchange",!1,n))}}function tc(e,n,r,l){switch(ko(n)){case 1:var o=vm;break;case 4:o=jm;break;default:o=Fl}r=o.bind(null,n,r,e),o=void 0,!Ml||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(n,r,{capture:!0,passive:o}):e.addEventListener(n,r,!0):o!==void 0?e.addEventListener(n,r,{passive:o}):e.addEventListener(n,r,!1)}function ra(e,n,r,l,o){var u=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var g=l.stateNode.containerInfo;if(g===o||g.nodeType===8&&g.parentNode===o)break;if(x===4)for(x=l.return;x!==null;){var y=x.tag;if((y===3||y===4)&&(y=x.stateNode.containerInfo,y===o||y.nodeType===8&&y.parentNode===o))return;x=x.return}for(;g!==null;){if(x=hn(g),x===null)return;if(y=x.tag,y===5||y===6){l=u=x;continue e}g=g.parentNode}}l=l.return}lo(function(){var E=u,O=Pl(r),z=[];e:{var _=Xo.get(e);if(_!==void 0){var V=Ul,W=e;switch(e){case"keypress":if(xs(r)===0)break e;case"keydown":case"keyup":V=Om;break;case"focusin":W="focus",V=Wl;break;case"focusout":W="blur",V=Wl;break;case"beforeblur":case"afterblur":V=Wl;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":V=Eo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=bm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=Dm;break;case Qo:case Go:case Ko:V=Cm;break;case Zo:V=Bm;break;case"scroll":V=wm;break;case"wheel":V=Um;break;case"copy":case"cut":case"paste":V=Pm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Lo}var Q=(n&4)!==0,Re=!Q&&e==="scroll",k=Q?_!==null?_+"Capture":null:_;Q=[];for(var w=E,S;w!==null;){S=w;var F=S.stateNode;if(S.tag===5&&F!==null&&(S=F,k!==null&&(F=cr(w,k),F!=null&&Q.push(Pr(w,F,S)))),Re)break;w=w.return}0<Q.length&&(_=new V(_,W,null,r,O),z.push({event:_,listeners:Q}))}}if((n&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",_&&r!==El&&(W=r.relatedTarget||r.fromElement)&&(hn(W)||W[Tt]))break e;if((V||_)&&(_=O.window===O?O:(_=O.ownerDocument)?_.defaultView||_.parentWindow:window,V?(W=r.relatedTarget||r.toElement,V=E,W=W?hn(W):null,W!==null&&(Re=mn(W),W!==Re||W.tag!==5&&W.tag!==6)&&(W=null)):(V=null,W=E),V!==W)){if(Q=Eo,F="onMouseLeave",k="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(Q=Lo,F="onPointerLeave",k="onPointerEnter",w="pointer"),Re=V==null?_:An(V),S=W==null?_:An(W),_=new Q(F,w+"leave",V,r,O),_.target=Re,_.relatedTarget=S,F=null,hn(O)===E&&(Q=new Q(k,w+"enter",W,r,O),Q.target=S,Q.relatedTarget=Re,F=Q),Re=F,V&&W)t:{for(Q=V,k=W,w=0,S=Q;S;S=On(S))w++;for(S=0,F=k;F;F=On(F))S++;for(;0<w-S;)Q=On(Q),w--;for(;0<S-w;)k=On(k),S--;for(;w--;){if(Q===k||k!==null&&Q===k.alternate)break t;Q=On(Q),k=On(k)}Q=null}else Q=null;V!==null&&nc(z,_,V,Q,!1),W!==null&&Re!==null&&nc(z,Re,W,Q,!0)}}e:{if(_=E?An(E):window,V=_.nodeName&&_.nodeName.toLowerCase(),V==="select"||V==="input"&&_.type==="file")var G=Km;else if(Oo(_))if(Ao)G=Jm;else{G=Xm;var X=Zm}else(V=_.nodeName)&&V.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(G=qm);if(G&&(G=G(e,E))){zo(z,G,r,O);break e}X&&X(e,_,E),e==="focusout"&&(X=_._wrapperState)&&X.controlled&&_.type==="number"&&Nl(_,"number",_.value)}switch(X=E?An(E):window,e){case"focusin":(Oo(X)||X.contentEditable==="true")&&(_n=X,Xl=E,Sr=null);break;case"focusout":Sr=Xl=_n=null;break;case"mousedown":ql=!0;break;case"contextmenu":case"mouseup":case"dragend":ql=!1,Wo(z,r,O);break;case"selectionchange":if(n0)break;case"keydown":case"keyup":Wo(z,r,O)}var q;if(Ql)e:{switch(e){case"compositionstart":var J="onCompositionStart";break e;case"compositionend":J="onCompositionEnd";break e;case"compositionupdate":J="onCompositionUpdate";break e}J=void 0}else Rn?_o(e,r)&&(J="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(J="onCompositionStart");J&&(To&&r.locale!=="ko"&&(Rn||J!=="onCompositionStart"?J==="onCompositionEnd"&&Rn&&(q=So()):(Wt=O,$l="value"in Wt?Wt.value:Wt.textContent,Rn=!0)),X=ws(E,J),0<X.length&&(J=new Po(J,e,null,r,O),z.push({event:J,listeners:X}),q?J.data=q:(q=Io(r),q!==null&&(J.data=q)))),(q=Hm?Wm(e,r):Ym(e,r))&&(E=ws(E,"onBeforeInput"),0<E.length&&(O=new Po("onBeforeInput","beforeinput",null,r,O),z.push({event:O,listeners:E}),O.data=q))}ec(z,n)})}function Pr(e,n,r){return{instance:e,listener:n,currentTarget:r}}function ws(e,n){for(var r=n+"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,n),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 nc(e,n,r,l,o){for(var u=n._reactName,x=[];r!==null&&r!==l;){var g=r,y=g.alternate,E=g.stateNode;if(y!==null&&y===l)break;g.tag===5&&E!==null&&(g=E,o?(y=cr(r,u),y!=null&&x.unshift(Pr(r,y,g))):o||(y=cr(r,u),y!=null&&x.push(Pr(r,y,g)))),r=r.return}x.length!==0&&e.push({event:n,listeners:x})}var a0=/\r\n?/g,i0=/\u0000|\uFFFD/g;function rc(e){return(typeof e=="string"?e:""+e).replace(a0,`
|
|
6
|
+
`).replace(i0,"")}function Ns(e,n,r){if(n=rc(n),rc(e)!==n&&r)throw Error(i(425))}function bs(){}var sa=null,la=null;function aa(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var ia=typeof setTimeout=="function"?setTimeout:void 0,o0=typeof clearTimeout=="function"?clearTimeout:void 0,sc=typeof Promise=="function"?Promise:void 0,c0=typeof queueMicrotask=="function"?queueMicrotask:typeof sc<"u"?function(e){return sc.resolve(null).then(e).catch(u0)}:ia;function u0(e){setTimeout(function(){throw e})}function oa(e,n){var r=n,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),yr(n);return}l--}else r!=="$"&&r!=="$?"&&r!=="$!"||l++;r=o}while(r);yr(n)}function Qt(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function lc(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(n===0)return e;n--}else r==="/$"&&n++}e=e.previousSibling}return null}var zn=Math.random().toString(36).slice(2),bt="__reactFiber$"+zn,Lr="__reactProps$"+zn,Tt="__reactContainer$"+zn,ca="__reactEvents$"+zn,d0="__reactListeners$"+zn,m0="__reactHandles$"+zn;function hn(e){var n=e[bt];if(n)return n;for(var r=e.parentNode;r;){if(n=r[Tt]||r[bt]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=lc(e);e!==null;){if(r=e[bt])return r;e=lc(e)}return n}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 An(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function ks(e){return e[Lr]||null}var ua=[],Dn=-1;function Gt(e){return{current:e}}function ke(e){0>Dn||(e.current=ua[Dn],ua[Dn]=null,Dn--)}function we(e,n){Dn++,ua[Dn]=e.current,e.current=n}var Kt={},Ve=Gt(Kt),Ze=Gt(!1),xn=Kt;function Fn(e,n){var r=e.type.contextTypes;if(!r)return Kt;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===n)return l.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in r)o[u]=n[u];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=o),o}function Xe(e){return e=e.childContextTypes,e!=null}function Ss(){ke(Ze),ke(Ve)}function ac(e,n,r){if(Ve.current!==Kt)throw Error(i(168));we(Ve,n),we(Ze,r)}function ic(e,n,r){var l=e.stateNode;if(n=n.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var o in l)if(!(o in n))throw Error(i(108,je(e)||"Unknown",o));return U({},r,l)}function Cs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kt,xn=Ve.current,we(Ve,e),we(Ze,Ze.current),!0}function oc(e,n,r){var l=e.stateNode;if(!l)throw Error(i(169));r?(e=ic(e,n,xn),l.__reactInternalMemoizedMergedChildContext=e,ke(Ze),ke(Ve),we(Ve,e)):ke(Ze),we(Ze,r)}var Mt=null,Es=!1,da=!1;function cc(e){Mt===null?Mt=[e]:Mt.push(e)}function h0(e){Es=!0,cc(e)}function Zt(){if(!da&&Mt!==null){da=!0;var e=0,n=ye;try{var r=Mt;for(ye=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)),uo(_l,Zt),o}finally{ye=n,da=!1}}return null}var Bn=[],$n=0,Ps=null,Ls=0,ot=[],ct=0,fn=null,Rt=1,_t="";function pn(e,n){Bn[$n++]=Ls,Bn[$n++]=Ps,Ps=e,Ls=n}function uc(e,n,r){ot[ct++]=Rt,ot[ct++]=_t,ot[ct++]=fn,fn=e;var l=Rt;e=_t;var o=32-ft(l)-1;l&=~(1<<o),r+=1;var u=32-ft(n)+o;if(30<u){var x=o-o%5;u=(l&(1<<x)-1).toString(32),l>>=x,o-=x,Rt=1<<32-ft(n)+o|r<<o|l,_t=u+e}else Rt=1<<u|r<<o|l,_t=e}function ma(e){e.return!==null&&(pn(e,1),uc(e,1,0))}function ha(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,_t=ot[--ct],ot[ct]=null,Rt=ot[--ct],ot[ct]=null}var st=null,lt=null,Ce=!1,gt=null;function dc(e,n){var r=ht(5,null,null,0);r.elementType="DELETED",r.stateNode=n,r.return=e,n=e.deletions,n===null?(e.deletions=[r],e.flags|=16):n.push(r)}function mc(e,n){switch(e.tag){case 5:var r=e.type;return n=n.nodeType!==1||r.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,st=e,lt=Qt(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,st=e,lt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(r=fn!==null?{id:Rt,overflow:_t}:null,e.memoizedState={dehydrated:n,treeContext:r,retryLane:1073741824},r=ht(18,null,null,0),r.stateNode=n,r.return=e,e.child=r,st=e,lt=null,!0):!1;default:return!1}}function xa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function fa(e){if(Ce){var n=lt;if(n){var r=n;if(!mc(e,n)){if(xa(e))throw Error(i(418));n=Qt(r.nextSibling);var l=st;n&&mc(e,n)?dc(l,r):(e.flags=e.flags&-4097|2,Ce=!1,st=e)}}else{if(xa(e))throw Error(i(418));e.flags=e.flags&-4097|2,Ce=!1,st=e}}}function hc(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(!Ce)return hc(e),Ce=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!aa(e.type,e.memoizedProps)),n&&(n=lt)){if(xa(e))throw xc(),Error(i(418));for(;n;)dc(e,n),n=Qt(n.nextSibling)}if(hc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(n===0){lt=Qt(e.nextSibling);break e}n--}else r!=="$"&&r!=="$!"&&r!=="$?"||n++}e=e.nextSibling}lt=null}}else lt=st?Qt(e.stateNode.nextSibling):null;return!0}function xc(){for(var e=lt;e;)e=Qt(e.nextSibling)}function Un(){lt=st=null,Ce=!1}function pa(e){gt===null?gt=[e]:gt.push(e)}var x0=Y.ReactCurrentBatchConfig;function Mr(e,n,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 n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===u?n.ref:(n=function(x){var g=o.refs;x===null?delete g[u]:g[u]=x},n._stringRef=u,n)}if(typeof e!="string")throw Error(i(284));if(!r._owner)throw Error(i(290,e))}return e}function Ms(e,n){throw e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function fc(e){var n=e._init;return n(e._payload)}function pc(e){function n(k,w){if(e){var S=k.deletions;S===null?(k.deletions=[w],k.flags|=16):S.push(w)}}function r(k,w){if(!e)return null;for(;w!==null;)n(k,w),w=w.sibling;return null}function l(k,w){for(k=new Map;w!==null;)w.key!==null?k.set(w.key,w):k.set(w.index,w),w=w.sibling;return k}function o(k,w){return k=sn(k,w),k.index=0,k.sibling=null,k}function u(k,w,S){return k.index=S,e?(S=k.alternate,S!==null?(S=S.index,S<w?(k.flags|=2,w):S):(k.flags|=2,w)):(k.flags|=1048576,w)}function x(k){return e&&k.alternate===null&&(k.flags|=2),k}function g(k,w,S,F){return w===null||w.tag!==6?(w=ii(S,k.mode,F),w.return=k,w):(w=o(w,S),w.return=k,w)}function y(k,w,S,F){var G=S.type;return G===Z?O(k,w,S.props.children,F,S.key):w!==null&&(w.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===pe&&fc(G)===w.type)?(F=o(w,S.props),F.ref=Mr(k,w,S),F.return=k,F):(F=tl(S.type,S.key,S.props,null,k.mode,F),F.ref=Mr(k,w,S),F.return=k,F)}function E(k,w,S,F){return w===null||w.tag!==4||w.stateNode.containerInfo!==S.containerInfo||w.stateNode.implementation!==S.implementation?(w=oi(S,k.mode,F),w.return=k,w):(w=o(w,S.children||[]),w.return=k,w)}function O(k,w,S,F,G){return w===null||w.tag!==7?(w=kn(S,k.mode,F,G),w.return=k,w):(w=o(w,S),w.return=k,w)}function z(k,w,S){if(typeof w=="string"&&w!==""||typeof w=="number")return w=ii(""+w,k.mode,S),w.return=k,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case oe:return S=tl(w.type,w.key,w.props,null,k.mode,S),S.ref=Mr(k,null,w),S.return=k,S;case ve:return w=oi(w,k.mode,S),w.return=k,w;case pe:var F=w._init;return z(k,F(w._payload),S)}if(ar(w)||K(w))return w=kn(w,k.mode,S,null),w.return=k,w;Ms(k,w)}return null}function _(k,w,S,F){var G=w!==null?w.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return G!==null?null:g(k,w,""+S,F);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case oe:return S.key===G?y(k,w,S,F):null;case ve:return S.key===G?E(k,w,S,F):null;case pe:return G=S._init,_(k,w,G(S._payload),F)}if(ar(S)||K(S))return G!==null?null:O(k,w,S,F,null);Ms(k,S)}return null}function V(k,w,S,F,G){if(typeof F=="string"&&F!==""||typeof F=="number")return k=k.get(S)||null,g(w,k,""+F,G);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case oe:return k=k.get(F.key===null?S:F.key)||null,y(w,k,F,G);case ve:return k=k.get(F.key===null?S:F.key)||null,E(w,k,F,G);case pe:var X=F._init;return V(k,w,S,X(F._payload),G)}if(ar(F)||K(F))return k=k.get(S)||null,O(w,k,F,G,null);Ms(w,F)}return null}function W(k,w,S,F){for(var G=null,X=null,q=w,J=w=0,Fe=null;q!==null&&J<S.length;J++){q.index>J?(Fe=q,q=null):Fe=q.sibling;var he=_(k,q,S[J],F);if(he===null){q===null&&(q=Fe);break}e&&q&&he.alternate===null&&n(k,q),w=u(he,w,J),X===null?G=he:X.sibling=he,X=he,q=Fe}if(J===S.length)return r(k,q),Ce&&pn(k,J),G;if(q===null){for(;J<S.length;J++)q=z(k,S[J],F),q!==null&&(w=u(q,w,J),X===null?G=q:X.sibling=q,X=q);return Ce&&pn(k,J),G}for(q=l(k,q);J<S.length;J++)Fe=V(q,k,J,S[J],F),Fe!==null&&(e&&Fe.alternate!==null&&q.delete(Fe.key===null?J:Fe.key),w=u(Fe,w,J),X===null?G=Fe:X.sibling=Fe,X=Fe);return e&&q.forEach(function(ln){return n(k,ln)}),Ce&&pn(k,J),G}function Q(k,w,S,F){var G=K(S);if(typeof G!="function")throw Error(i(150));if(S=G.call(S),S==null)throw Error(i(151));for(var X=G=null,q=w,J=w=0,Fe=null,he=S.next();q!==null&&!he.done;J++,he=S.next()){q.index>J?(Fe=q,q=null):Fe=q.sibling;var ln=_(k,q,he.value,F);if(ln===null){q===null&&(q=Fe);break}e&&q&&ln.alternate===null&&n(k,q),w=u(ln,w,J),X===null?G=ln:X.sibling=ln,X=ln,q=Fe}if(he.done)return r(k,q),Ce&&pn(k,J),G;if(q===null){for(;!he.done;J++,he=S.next())he=z(k,he.value,F),he!==null&&(w=u(he,w,J),X===null?G=he:X.sibling=he,X=he);return Ce&&pn(k,J),G}for(q=l(k,q);!he.done;J++,he=S.next())he=V(q,k,J,he.value,F),he!==null&&(e&&he.alternate!==null&&q.delete(he.key===null?J:he.key),w=u(he,w,J),X===null?G=he:X.sibling=he,X=he);return e&&q.forEach(function(Q0){return n(k,Q0)}),Ce&&pn(k,J),G}function Re(k,w,S,F){if(typeof S=="object"&&S!==null&&S.type===Z&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case oe:e:{for(var G=S.key,X=w;X!==null;){if(X.key===G){if(G=S.type,G===Z){if(X.tag===7){r(k,X.sibling),w=o(X,S.props.children),w.return=k,k=w;break e}}else if(X.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===pe&&fc(G)===X.type){r(k,X.sibling),w=o(X,S.props),w.ref=Mr(k,X,S),w.return=k,k=w;break e}r(k,X);break}else n(k,X);X=X.sibling}S.type===Z?(w=kn(S.props.children,k.mode,F,S.key),w.return=k,k=w):(F=tl(S.type,S.key,S.props,null,k.mode,F),F.ref=Mr(k,w,S),F.return=k,k=F)}return x(k);case ve:e:{for(X=S.key;w!==null;){if(w.key===X)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){r(k,w.sibling),w=o(w,S.children||[]),w.return=k,k=w;break e}else{r(k,w);break}else n(k,w);w=w.sibling}w=oi(S,k.mode,F),w.return=k,k=w}return x(k);case pe:return X=S._init,Re(k,w,X(S._payload),F)}if(ar(S))return W(k,w,S,F);if(K(S))return Q(k,w,S,F);Ms(k,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(r(k,w.sibling),w=o(w,S),w.return=k,k=w):(r(k,w),w=ii(S,k.mode,F),w.return=k,k=w),x(k)):r(k,w)}return Re}var Vn=pc(!0),gc=pc(!1),Rs=Gt(null),_s=null,Hn=null,ga=null;function ya(){ga=Hn=_s=null}function va(e){var n=Rs.current;ke(Rs),e._currentValue=n}function ja(e,n,r){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===r)break;e=e.return}}function Wn(e,n){_s=e,ga=Hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(qe=!0),e.firstContext=null)}function ut(e){var n=e._currentValue;if(ga!==e)if(e={context:e,memoizedValue:n,next:null},Hn===null){if(_s===null)throw Error(i(308));Hn=e,_s.dependencies={lanes:0,firstContext:e}}else Hn=Hn.next=e;return n}var gn=null;function wa(e){gn===null?gn=[e]:gn.push(e)}function yc(e,n,r,l){var o=n.interleaved;return o===null?(r.next=r,wa(n)):(r.next=o.next,o.next=r),n.interleaved=r,It(e,l)}function It(e,n){e.lanes|=n;var r=e.alternate;for(r!==null&&(r.lanes|=n),r=e,e=e.return;e!==null;)e.childLanes|=n,r=e.alternate,r!==null&&(r.childLanes|=n),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Xt=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vc(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ot(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function qt(e,n,r){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ue&2)!==0){var o=l.pending;return o===null?n.next=n:(n.next=o.next,o.next=n),l.pending=n,It(e,r)}return o=l.interleaved,o===null?(n.next=n,wa(l)):(n.next=o.next,o.next=n),l.interleaved=n,It(e,r)}function Is(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194240)!==0)){var l=n.lanes;l&=e.pendingLanes,r|=l,n.lanes=r,zl(e,r)}}function jc(e,n){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=n:u=u.next=n}else o=u=n;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=n:e.next=n,r.lastBaseUpdate=n}function Os(e,n,r,l){var o=e.updateQueue;Xt=!1;var u=o.firstBaseUpdate,x=o.lastBaseUpdate,g=o.shared.pending;if(g!==null){o.shared.pending=null;var y=g,E=y.next;y.next=null,x===null?u=E:x.next=E,x=y;var O=e.alternate;O!==null&&(O=O.updateQueue,g=O.lastBaseUpdate,g!==x&&(g===null?O.firstBaseUpdate=E:g.next=E,O.lastBaseUpdate=y))}if(u!==null){var z=o.baseState;x=0,O=E=y=null,g=u;do{var _=g.lane,V=g.eventTime;if((l&_)===_){O!==null&&(O=O.next={eventTime:V,lane:0,tag:g.tag,payload:g.payload,callback:g.callback,next:null});e:{var W=e,Q=g;switch(_=n,V=r,Q.tag){case 1:if(W=Q.payload,typeof W=="function"){z=W.call(V,z,_);break e}z=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=Q.payload,_=typeof W=="function"?W.call(V,z,_):W,_==null)break e;z=U({},z,_);break e;case 2:Xt=!0}}g.callback!==null&&g.lane!==0&&(e.flags|=64,_=o.effects,_===null?o.effects=[g]:_.push(g))}else V={eventTime:V,lane:_,tag:g.tag,payload:g.payload,callback:g.callback,next:null},O===null?(E=O=V,y=z):O=O.next=V,x|=_;if(g=g.next,g===null){if(g=o.shared.pending,g===null)break;_=g,g=_.next,_.next=null,o.lastBaseUpdate=_,o.shared.pending=null}}while(!0);if(O===null&&(y=z),o.baseState=y,o.firstBaseUpdate=E,o.lastBaseUpdate=O,n=o.shared.interleaved,n!==null){o=n;do x|=o.lane,o=o.next;while(o!==n)}else u===null&&(o.shared.lanes=0);jn|=x,e.lanes=x,e.memoizedState=z}}function wc(e,n,r){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var l=e[n],o=l.callback;if(o!==null){if(l.callback=null,l=r,typeof o!="function")throw Error(i(191,o));o.call(l)}}}var Rr={},kt=Gt(Rr),_r=Gt(Rr),Ir=Gt(Rr);function yn(e){if(e===Rr)throw Error(i(174));return e}function ba(e,n){switch(we(Ir,n),we(_r,e),we(kt,Rr),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:kl(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=kl(n,e)}ke(kt),we(kt,n)}function Yn(){ke(kt),ke(_r),ke(Ir)}function Nc(e){yn(Ir.current);var n=yn(kt.current),r=kl(n,e.type);n!==r&&(we(_r,e),we(kt,r))}function ka(e){_r.current===e&&(ke(kt),ke(_r))}var Ee=Gt(0);function zs(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Sa=[];function Ca(){for(var e=0;e<Sa.length;e++)Sa[e]._workInProgressVersionPrimary=null;Sa.length=0}var As=Y.ReactCurrentDispatcher,Ea=Y.ReactCurrentBatchConfig,vn=0,Pe=null,Oe=null,Ae=null,Ds=!1,Or=!1,zr=0,f0=0;function He(){throw Error(i(321))}function Pa(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!pt(e[r],n[r]))return!1;return!0}function La(e,n,r,l,o,u){if(vn=u,Pe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,As.current=e===null||e.memoizedState===null?v0:j0,e=r(l,o),Or){u=0;do{if(Or=!1,zr=0,25<=u)throw Error(i(301));u+=1,Ae=Oe=null,n.updateQueue=null,As.current=w0,e=r(l,o)}while(Or)}if(As.current=$s,n=Oe!==null&&Oe.next!==null,vn=0,Ae=Oe=Pe=null,Ds=!1,n)throw Error(i(300));return e}function Ta(){var e=zr!==0;return zr=0,e}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ae===null?Pe.memoizedState=Ae=e:Ae=Ae.next=e,Ae}function dt(){if(Oe===null){var e=Pe.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var n=Ae===null?Pe.memoizedState:Ae.next;if(n!==null)Ae=n,Oe=e;else{if(e===null)throw Error(i(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Ae===null?Pe.memoizedState=Ae=e:Ae=Ae.next=e}return Ae}function Ar(e,n){return typeof n=="function"?n(e):n}function Ma(e){var n=dt(),r=n.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=Oe,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 g=x=null,y=null,E=u;do{var O=E.lane;if((vn&O)===O)y!==null&&(y=y.next={lane:0,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),l=E.hasEagerState?E.eagerState:e(l,E.action);else{var z={lane:O,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null};y===null?(g=y=z,x=l):y=y.next=z,Pe.lanes|=O,jn|=O}E=E.next}while(E!==null&&E!==u);y===null?x=l:y.next=g,pt(l,n.memoizedState)||(qe=!0),n.memoizedState=l,n.baseState=x,n.baseQueue=y,r.lastRenderedState=l}if(e=r.interleaved,e!==null){o=e;do u=o.lane,Pe.lanes|=u,jn|=u,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[n.memoizedState,r.dispatch]}function Ra(e){var n=dt(),r=n.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=e;var l=r.dispatch,o=r.pending,u=n.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,n.memoizedState)||(qe=!0),n.memoizedState=u,n.baseQueue===null&&(n.baseState=u),r.lastRenderedState=u}return[u,l]}function bc(){}function kc(e,n){var r=Pe,l=dt(),o=n(),u=!pt(l.memoizedState,o);if(u&&(l.memoizedState=o,qe=!0),l=l.queue,_a(Ec.bind(null,r,l,e),[e]),l.getSnapshot!==n||u||Ae!==null&&Ae.memoizedState.tag&1){if(r.flags|=2048,Dr(9,Cc.bind(null,r,l,o,n),void 0,null),De===null)throw Error(i(349));(vn&30)!==0||Sc(r,n,o)}return o}function Sc(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Pe.updateQueue,n===null?(n={lastEffect:null,stores:null},Pe.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function Cc(e,n,r,l){n.value=r,n.getSnapshot=l,Pc(n)&&Lc(e)}function Ec(e,n,r){return r(function(){Pc(n)&&Lc(e)})}function Pc(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!pt(e,r)}catch{return!0}}function Lc(e){var n=It(e,1);n!==null&&wt(n,e,1,-1)}function Tc(e){var n=St();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ar,lastRenderedState:e},n.queue=e,e=e.dispatch=y0.bind(null,Pe,e),[n.memoizedState,e]}function Dr(e,n,r,l){return e={tag:e,create:n,destroy:r,deps:l,next:null},n=Pe.updateQueue,n===null?(n={lastEffect:null,stores:null},Pe.updateQueue=n,n.lastEffect=e.next=e):(r=n.lastEffect,r===null?n.lastEffect=e.next=e:(l=r.next,r.next=e,e.next=l,n.lastEffect=e)),e}function Mc(){return dt().memoizedState}function Fs(e,n,r,l){var o=St();Pe.flags|=e,o.memoizedState=Dr(1|n,r,void 0,l===void 0?null:l)}function Bs(e,n,r,l){var o=dt();l=l===void 0?null:l;var u=void 0;if(Oe!==null){var x=Oe.memoizedState;if(u=x.destroy,l!==null&&Pa(l,x.deps)){o.memoizedState=Dr(n,r,u,l);return}}Pe.flags|=e,o.memoizedState=Dr(1|n,r,u,l)}function Rc(e,n){return Fs(8390656,8,e,n)}function _a(e,n){return Bs(2048,8,e,n)}function _c(e,n){return Bs(4,2,e,n)}function Ic(e,n){return Bs(4,4,e,n)}function Oc(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function zc(e,n,r){return r=r!=null?r.concat([e]):null,Bs(4,4,Oc.bind(null,n,e),r)}function Ia(){}function Ac(e,n){var r=dt();n=n===void 0?null:n;var l=r.memoizedState;return l!==null&&n!==null&&Pa(n,l[1])?l[0]:(r.memoizedState=[e,n],e)}function Dc(e,n){var r=dt();n=n===void 0?null:n;var l=r.memoizedState;return l!==null&&n!==null&&Pa(n,l[1])?l[0]:(e=e(),r.memoizedState=[e,n],e)}function Fc(e,n,r){return(vn&21)===0?(e.baseState&&(e.baseState=!1,qe=!0),e.memoizedState=r):(pt(r,n)||(r=fo(),Pe.lanes|=r,jn|=r,e.baseState=!0),n)}function p0(e,n){var r=ye;ye=r!==0&&4>r?r:4,e(!0);var l=Ea.transition;Ea.transition={};try{e(!1),n()}finally{ye=r,Ea.transition=l}}function Bc(){return dt().memoizedState}function g0(e,n,r){var l=nn(e);if(r={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null},$c(e))Uc(n,r);else if(r=yc(e,n,r,l),r!==null){var o=Ke();wt(r,e,l,o),Vc(r,n,l)}}function y0(e,n,r){var l=nn(e),o={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null};if($c(e))Uc(n,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=n.lastRenderedReducer,u!==null))try{var x=n.lastRenderedState,g=u(x,r);if(o.hasEagerState=!0,o.eagerState=g,pt(g,x)){var y=n.interleaved;y===null?(o.next=o,wa(n)):(o.next=y.next,y.next=o),n.interleaved=o;return}}catch{}r=yc(e,n,o,l),r!==null&&(o=Ke(),wt(r,e,l,o),Vc(r,n,l))}}function $c(e){var n=e.alternate;return e===Pe||n!==null&&n===Pe}function Uc(e,n){Or=Ds=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function Vc(e,n,r){if((r&4194240)!==0){var l=n.lanes;l&=e.pendingLanes,r|=l,n.lanes=r,zl(e,r)}}var $s={readContext:ut,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},v0={readContext:ut,useCallback:function(e,n){return St().memoizedState=[e,n===void 0?null:n],e},useContext:ut,useEffect:Rc,useImperativeHandle:function(e,n,r){return r=r!=null?r.concat([e]):null,Fs(4194308,4,Oc.bind(null,n,e),r)},useLayoutEffect:function(e,n){return Fs(4194308,4,e,n)},useInsertionEffect:function(e,n){return Fs(4,2,e,n)},useMemo:function(e,n){var r=St();return n=n===void 0?null:n,e=e(),r.memoizedState=[e,n],e},useReducer:function(e,n,r){var l=St();return n=r!==void 0?r(n):n,l.memoizedState=l.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=g0.bind(null,Pe,e),[l.memoizedState,e]},useRef:function(e){var n=St();return e={current:e},n.memoizedState=e},useState:Tc,useDebugValue:Ia,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Tc(!1),n=e[0];return e=p0.bind(null,e[1]),St().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,r){var l=Pe,o=St();if(Ce){if(r===void 0)throw Error(i(407));r=r()}else{if(r=n(),De===null)throw Error(i(349));(vn&30)!==0||Sc(l,n,r)}o.memoizedState=r;var u={value:r,getSnapshot:n};return o.queue=u,Rc(Ec.bind(null,l,u,e),[e]),l.flags|=2048,Dr(9,Cc.bind(null,l,u,r,n),void 0,null),r},useId:function(){var e=St(),n=De.identifierPrefix;if(Ce){var r=_t,l=Rt;r=(l&~(1<<32-ft(l)-1)).toString(32)+r,n=":"+n+"R"+r,r=zr++,0<r&&(n+="H"+r.toString(32)),n+=":"}else r=f0++,n=":"+n+"r"+r.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},j0={readContext:ut,useCallback:Ac,useContext:ut,useEffect:_a,useImperativeHandle:zc,useInsertionEffect:_c,useLayoutEffect:Ic,useMemo:Dc,useReducer:Ma,useRef:Mc,useState:function(){return Ma(Ar)},useDebugValue:Ia,useDeferredValue:function(e){var n=dt();return Fc(n,Oe.memoizedState,e)},useTransition:function(){var e=Ma(Ar)[0],n=dt().memoizedState;return[e,n]},useMutableSource:bc,useSyncExternalStore:kc,useId:Bc,unstable_isNewReconciler:!1},w0={readContext:ut,useCallback:Ac,useContext:ut,useEffect:_a,useImperativeHandle:zc,useInsertionEffect:_c,useLayoutEffect:Ic,useMemo:Dc,useReducer:Ra,useRef:Mc,useState:function(){return Ra(Ar)},useDebugValue:Ia,useDeferredValue:function(e){var n=dt();return Oe===null?n.memoizedState=e:Fc(n,Oe.memoizedState,e)},useTransition:function(){var e=Ra(Ar)[0],n=dt().memoizedState;return[e,n]},useMutableSource:bc,useSyncExternalStore:kc,useId:Bc,unstable_isNewReconciler:!1};function yt(e,n){if(e&&e.defaultProps){n=U({},n),e=e.defaultProps;for(var r in e)n[r]===void 0&&(n[r]=e[r]);return n}return n}function Oa(e,n,r,l){n=e.memoizedState,r=r(l,n),r=r==null?n:U({},n,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,n,r){e=e._reactInternals;var l=Ke(),o=nn(e),u=Ot(l,o);u.payload=n,r!=null&&(u.callback=r),n=qt(e,u,o),n!==null&&(wt(n,e,o,l),Is(n,e,o))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var l=Ke(),o=nn(e),u=Ot(l,o);u.tag=1,u.payload=n,r!=null&&(u.callback=r),n=qt(e,u,o),n!==null&&(wt(n,e,o,l),Is(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=Ke(),l=nn(e),o=Ot(r,l);o.tag=2,n!=null&&(o.callback=n),n=qt(e,o,l),n!==null&&(wt(n,e,l,r),Is(n,e,l))}};function Hc(e,n,r,l,o,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,x):n.prototype&&n.prototype.isPureReactComponent?!kr(r,l)||!kr(o,u):!0}function Wc(e,n,r){var l=!1,o=Kt,u=n.contextType;return typeof u=="object"&&u!==null?u=ut(u):(o=Xe(n)?xn:Ve.current,l=n.contextTypes,u=(l=l!=null)?Fn(e,o):Kt),n=new n(r,u),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Us,e.stateNode=n,n._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=u),n}function Yc(e,n,r,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,l),n.state!==e&&Us.enqueueReplaceState(n,n.state,null)}function za(e,n,r,l){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},Na(e);var u=n.contextType;typeof u=="object"&&u!==null?o.context=ut(u):(u=Xe(n)?xn:Ve.current,o.context=Fn(e,u)),o.state=e.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(Oa(e,n,u,r),o.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(n=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),n!==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 Qn(e,n){try{var r="",l=n;do r+=de(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:n,stack:o,digest:null}}function Aa(e,n,r){return{value:e,source:null,stack:r??null,digest:n??null}}function Da(e,n){try{console.error(n.value)}catch(r){setTimeout(function(){throw r})}}var N0=typeof WeakMap=="function"?WeakMap:Map;function Qc(e,n,r){r=Ot(-1,r),r.tag=3,r.payload={element:null};var l=n.value;return r.callback=function(){Ks||(Ks=!0,Ja=l),Da(e,n)},r}function Gc(e,n,r){r=Ot(-1,r),r.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var o=n.value;r.payload=function(){return l(o)},r.callback=function(){Da(e,n)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(r.callback=function(){Da(e,n),typeof l!="function"&&(en===null?en=new Set([this]):en.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),r}function Kc(e,n,r){var l=e.pingCache;if(l===null){l=e.pingCache=new N0;var o=new Set;l.set(n,o)}else o=l.get(n),o===void 0&&(o=new Set,l.set(n,o));o.has(r)||(o.add(r),e=z0.bind(null,e,n,r),n.then(e,e))}function Zc(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Xc(e,n,r,l,o){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(n=Ot(-1,1),n.tag=2,qt(r,n,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var b0=Y.ReactCurrentOwner,qe=!1;function Ge(e,n,r,l){n.child=e===null?gc(n,null,r,l):Vn(n,e.child,r,l)}function qc(e,n,r,l,o){r=r.render;var u=n.ref;return Wn(n,o),l=La(e,n,r,l,u,o),r=Ta(),e!==null&&!qe?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~o,zt(e,n,o)):(Ce&&r&&ma(n),n.flags|=1,Ge(e,n,l,o),n.child)}function Jc(e,n,r,l,o){if(e===null){var u=r.type;return typeof u=="function"&&!ai(u)&&u.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(n.tag=15,n.type=u,eu(e,n,u,l,o)):(e=tl(r.type,null,l,n,n.mode,o),e.ref=n.ref,e.return=n,n.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===n.ref)return zt(e,n,o)}return n.flags|=1,e=sn(u,l),e.ref=n.ref,e.return=n,n.child=e}function eu(e,n,r,l,o){if(e!==null){var u=e.memoizedProps;if(kr(u,l)&&e.ref===n.ref)if(qe=!1,n.pendingProps=l=u,(e.lanes&o)!==0)(e.flags&131072)!==0&&(qe=!0);else return n.lanes=e.lanes,zt(e,n,o)}return Fa(e,n,r,l,o)}function tu(e,n,r){var l=n.pendingProps,o=l.children,u=e!==null?e.memoizedState:null;if(l.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(Kn,at),at|=r;else{if((r&1073741824)===0)return e=u!==null?u.baseLanes|r:r,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,we(Kn,at),at|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=u!==null?u.baseLanes:r,we(Kn,at),at|=l}else u!==null?(l=u.baseLanes|r,n.memoizedState=null):l=r,we(Kn,at),at|=l;return Ge(e,n,o,r),n.child}function nu(e,n){var r=n.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(n.flags|=512,n.flags|=2097152)}function Fa(e,n,r,l,o){var u=Xe(r)?xn:Ve.current;return u=Fn(n,u),Wn(n,o),r=La(e,n,r,l,u,o),l=Ta(),e!==null&&!qe?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~o,zt(e,n,o)):(Ce&&l&&ma(n),n.flags|=1,Ge(e,n,r,o),n.child)}function ru(e,n,r,l,o){if(Xe(r)){var u=!0;Cs(n)}else u=!1;if(Wn(n,o),n.stateNode===null)Hs(e,n),Wc(n,r,l),za(n,r,l,o),l=!0;else if(e===null){var x=n.stateNode,g=n.memoizedProps;x.props=g;var y=x.context,E=r.contextType;typeof E=="object"&&E!==null?E=ut(E):(E=Xe(r)?xn:Ve.current,E=Fn(n,E));var O=r.getDerivedStateFromProps,z=typeof O=="function"||typeof x.getSnapshotBeforeUpdate=="function";z||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(g!==l||y!==E)&&Yc(n,x,l,E),Xt=!1;var _=n.memoizedState;x.state=_,Os(n,l,x,o),y=n.memoizedState,g!==l||_!==y||Ze.current||Xt?(typeof O=="function"&&(Oa(n,r,O,l),y=n.memoizedState),(g=Xt||Hc(n,r,g,l,_,y,E))?(z||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"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=y),x.props=l,x.state=y,x.context=E,l=g):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{x=n.stateNode,vc(e,n),g=n.memoizedProps,E=n.type===n.elementType?g:yt(n.type,g),x.props=E,z=n.pendingProps,_=x.context,y=r.contextType,typeof y=="object"&&y!==null?y=ut(y):(y=Xe(r)?xn:Ve.current,y=Fn(n,y));var V=r.getDerivedStateFromProps;(O=typeof V=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(g!==z||_!==y)&&Yc(n,x,l,y),Xt=!1,_=n.memoizedState,x.state=_,Os(n,l,x,o);var W=n.memoizedState;g!==z||_!==W||Ze.current||Xt?(typeof V=="function"&&(Oa(n,r,V,l),W=n.memoizedState),(E=Xt||Hc(n,r,E,l,_,W,y)||!1)?(O||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(l,W,y),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(l,W,y)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=W),x.props=l,x.state=W,x.context=y,l=E):(typeof x.componentDidUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&_===e.memoizedState||(n.flags|=1024),l=!1)}return Ba(e,n,r,l,u,o)}function Ba(e,n,r,l,o,u){nu(e,n);var x=(n.flags&128)!==0;if(!l&&!x)return o&&oc(n,r,!1),zt(e,n,u);l=n.stateNode,b0.current=n;var g=x&&typeof r.getDerivedStateFromError!="function"?null:l.render();return n.flags|=1,e!==null&&x?(n.child=Vn(n,e.child,null,u),n.child=Vn(n,null,g,u)):Ge(e,n,g,u),n.memoizedState=l.state,o&&oc(n,r,!0),n.child}function su(e){var n=e.stateNode;n.pendingContext?ac(e,n.pendingContext,n.pendingContext!==n.context):n.context&&ac(e,n.context,!1),ba(e,n.containerInfo)}function lu(e,n,r,l,o){return Un(),pa(o),n.flags|=256,Ge(e,n,r,l),n.child}var $a={dehydrated:null,treeContext:null,retryLane:0};function Ua(e){return{baseLanes:e,cachePool:null,transitions:null}}function au(e,n,r){var l=n.pendingProps,o=Ee.current,u=!1,x=(n.flags&128)!==0,g;if((g=x)||(g=e!==null&&e.memoizedState===null?!1:(o&2)!==0),g?(u=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),we(Ee,o&1),e===null)return fa(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=l.children,e=l.fallback,u?(l=n.mode,u=n.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=n,e.return=n,u.sibling=e,n.child=u,n.child.memoizedState=Ua(r),n.memoizedState=$a,e):Va(n,x));if(o=e.memoizedState,o!==null&&(g=o.dehydrated,g!==null))return k0(e,n,x,l,g,o,r);if(u){u=l.fallback,x=n.mode,o=e.child,g=o.sibling;var y={mode:"hidden",children:l.children};return(x&1)===0&&n.child!==o?(l=n.child,l.childLanes=0,l.pendingProps=y,n.deletions=null):(l=sn(o,y),l.subtreeFlags=o.subtreeFlags&14680064),g!==null?u=sn(g,u):(u=kn(u,x,r,null),u.flags|=2),u.return=n,l.return=n,l.sibling=u,n.child=l,l=u,u=n.child,x=e.child.memoizedState,x=x===null?Ua(r):{baseLanes:x.baseLanes|r,cachePool:null,transitions:x.transitions},u.memoizedState=x,u.childLanes=e.childLanes&~r,n.memoizedState=$a,l}return u=e.child,e=u.sibling,l=sn(u,{mode:"visible",children:l.children}),(n.mode&1)===0&&(l.lanes=r),l.return=n,l.sibling=null,e!==null&&(r=n.deletions,r===null?(n.deletions=[e],n.flags|=16):r.push(e)),n.child=l,n.memoizedState=null,l}function Va(e,n){return n=nl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Vs(e,n,r,l){return l!==null&&pa(l),Vn(n,e.child,null,r),e=Va(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function k0(e,n,r,l,o,u,x){if(r)return n.flags&256?(n.flags&=-257,l=Aa(Error(i(422))),Vs(e,n,x,l)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(u=l.fallback,o=n.mode,l=nl({mode:"visible",children:l.children},o,0,null),u=kn(u,o,x,null),u.flags|=2,l.return=n,u.return=n,l.sibling=u,n.child=l,(n.mode&1)!==0&&Vn(n,e.child,null,x),n.child.memoizedState=Ua(x),n.memoizedState=$a,u);if((n.mode&1)===0)return Vs(e,n,x,null);if(o.data==="$!"){if(l=o.nextSibling&&o.nextSibling.dataset,l)var g=l.dgst;return l=g,u=Error(i(419)),l=Aa(u,l,void 0),Vs(e,n,x,l)}if(g=(x&e.childLanes)!==0,qe||g){if(l=De,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,It(e,o),wt(l,e,o,-1))}return li(),l=Aa(Error(i(421))),Vs(e,n,x,l)}return o.data==="$?"?(n.flags|=128,n.child=e.child,n=A0.bind(null,e),o._reactRetry=n,null):(e=u.treeContext,lt=Qt(o.nextSibling),st=n,Ce=!0,gt=null,e!==null&&(ot[ct++]=Rt,ot[ct++]=_t,ot[ct++]=fn,Rt=e.id,_t=e.overflow,fn=n),n=Va(n,l.children),n.flags|=4096,n)}function iu(e,n,r){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),ja(e.return,n,r)}function Ha(e,n,r,l,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:o}:(u.isBackwards=n,u.rendering=null,u.renderingStartTime=0,u.last=l,u.tail=r,u.tailMode=o)}function ou(e,n,r){var l=n.pendingProps,o=l.revealOrder,u=l.tail;if(Ge(e,n,l.children,r),l=Ee.current,(l&2)!==0)l=l&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&iu(e,r,n);else if(e.tag===19)iu(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(we(Ee,l),(n.mode&1)===0)n.memoizedState=null;else switch(o){case"forwards":for(r=n.child,o=null;r!==null;)e=r.alternate,e!==null&&zs(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=n.child,n.child=null):(o=r.sibling,r.sibling=null),Ha(n,!1,o,r,u);break;case"backwards":for(r=null,o=n.child,n.child=null;o!==null;){if(e=o.alternate,e!==null&&zs(e)===null){n.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Ha(n,!0,r,null,u);break;case"together":Ha(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Hs(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function zt(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),jn|=n.lanes,(r&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,r=sn(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=sn(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function S0(e,n,r){switch(n.tag){case 3:su(n),Un();break;case 5:Nc(n);break;case 1:Xe(n.type)&&Cs(n);break;case 4:ba(n,n.stateNode.containerInfo);break;case 10:var l=n.type._context,o=n.memoizedProps.value;we(Rs,l._currentValue),l._currentValue=o;break;case 13:if(l=n.memoizedState,l!==null)return l.dehydrated!==null?(we(Ee,Ee.current&1),n.flags|=128,null):(r&n.child.childLanes)!==0?au(e,n,r):(we(Ee,Ee.current&1),e=zt(e,n,r),e!==null?e.sibling:null);we(Ee,Ee.current&1);break;case 19:if(l=(r&n.childLanes)!==0,(e.flags&128)!==0){if(l)return ou(e,n,r);n.flags|=128}if(o=n.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),we(Ee,Ee.current),l)break;return null;case 22:case 23:return n.lanes=0,tu(e,n,r)}return zt(e,n,r)}var cu,Wa,uu,du;cu=function(e,n){for(var r=n.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===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Wa=function(){},uu=function(e,n,r,l){var o=e.memoizedProps;if(o!==l){e=n.stateNode,yn(kt.current);var u=null;switch(r){case"input":o=jl(e,o),l=jl(e,l),u=[];break;case"select":o=U({},o,{value:void 0}),l=U({},l,{value:void 0}),u=[];break;case"textarea":o=bl(e,o),l=bl(e,l),u=[];break;default:typeof o.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=bs)}Sl(r,l);var x;r=null;for(E in o)if(!l.hasOwnProperty(E)&&o.hasOwnProperty(E)&&o[E]!=null)if(E==="style"){var g=o[E];for(x in g)g.hasOwnProperty(x)&&(r||(r={}),r[x]="")}else E!=="dangerouslySetInnerHTML"&&E!=="children"&&E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(d.hasOwnProperty(E)?u||(u=[]):(u=u||[]).push(E,null));for(E in l){var y=l[E];if(g=o?.[E],l.hasOwnProperty(E)&&y!==g&&(y!=null||g!=null))if(E==="style")if(g){for(x in g)!g.hasOwnProperty(x)||y&&y.hasOwnProperty(x)||(r||(r={}),r[x]="");for(x in y)y.hasOwnProperty(x)&&g[x]!==y[x]&&(r||(r={}),r[x]=y[x])}else r||(u||(u=[]),u.push(E,r)),r=y;else E==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,g=g?g.__html:void 0,y!=null&&g!==y&&(u=u||[]).push(E,y)):E==="children"?typeof y!="string"&&typeof y!="number"||(u=u||[]).push(E,""+y):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&(d.hasOwnProperty(E)?(y!=null&&E==="onScroll"&&be("scroll",e),u||g===y||(u=[])):(u=u||[]).push(E,y))}r&&(u=u||[]).push("style",r);var E=u;(n.updateQueue=E)&&(n.flags|=4)}},du=function(e,n,r,l){r!==l&&(n.flags|=4)};function Fr(e,n){if(!Ce)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.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?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function We(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,l=0;if(n)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,n}function C0(e,n,r){var l=n.pendingProps;switch(ha(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(n),null;case 1:return Xe(n.type)&&Ss(),We(n),null;case 3:return l=n.stateNode,Yn(),ke(Ze),ke(Ve),Ca(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ts(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,gt!==null&&(ni(gt),gt=null))),Wa(e,n),We(n),null;case 5:ka(n);var o=yn(Ir.current);if(r=n.type,e!==null&&n.stateNode!=null)uu(e,n,r,l,o),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!l){if(n.stateNode===null)throw Error(i(166));return We(n),null}if(e=yn(kt.current),Ts(n)){l=n.stateNode,r=n.type;var u=n.memoizedProps;switch(l[bt]=n,l[Lr]=u,e=(n.mode&1)!==0,r){case"dialog":be("cancel",l),be("close",l);break;case"iframe":case"object":case"embed":be("load",l);break;case"video":case"audio":for(o=0;o<Cr.length;o++)be(Cr[o],l);break;case"source":be("error",l);break;case"img":case"image":case"link":be("error",l),be("load",l);break;case"details":be("toggle",l);break;case"input":Hi(l,u),be("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!u.multiple},be("invalid",l);break;case"textarea":Qi(l,u),be("invalid",l)}Sl(r,u),o=null;for(var x in u)if(u.hasOwnProperty(x)){var g=u[x];x==="children"?typeof g=="string"?l.textContent!==g&&(u.suppressHydrationWarning!==!0&&Ns(l.textContent,g,e),o=["children",g]):typeof g=="number"&&l.textContent!==""+g&&(u.suppressHydrationWarning!==!0&&Ns(l.textContent,g,e),o=["children",""+g]):d.hasOwnProperty(x)&&g!=null&&x==="onScroll"&&be("scroll",l)}switch(r){case"input":Jr(l),Yi(l,u,!0);break;case"textarea":Jr(l),Ki(l);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(l.onclick=bs)}l=o,n.updateQueue=l,l!==null&&(n.flags|=4)}else{x=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Zi(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]=n,e[Lr]=l,cu(e,n,!1,!1),n.stateNode=e;e:{switch(x=Cl(r,l),r){case"dialog":be("cancel",e),be("close",e),o=l;break;case"iframe":case"object":case"embed":be("load",e),o=l;break;case"video":case"audio":for(o=0;o<Cr.length;o++)be(Cr[o],e);o=l;break;case"source":be("error",e),o=l;break;case"img":case"image":case"link":be("error",e),be("load",e),o=l;break;case"details":be("toggle",e),o=l;break;case"input":Hi(e,l),o=jl(e,l),be("invalid",e);break;case"option":o=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},o=U({},l,{value:void 0}),be("invalid",e);break;case"textarea":Qi(e,l),o=bl(e,l),be("invalid",e);break;default:o=l}Sl(r,o),g=o;for(u in g)if(g.hasOwnProperty(u)){var y=g[u];u==="style"?Ji(e,y):u==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,y!=null&&Xi(e,y)):u==="children"?typeof y=="string"?(r!=="textarea"||y!=="")&&ir(e,y):typeof y=="number"&&ir(e,""+y):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?y!=null&&u==="onScroll"&&be("scroll",e):y!=null&&D(e,u,y,x))}switch(r){case"input":Jr(e),Yi(e,l,!1);break;case"textarea":Jr(e),Ki(e);break;case"option":l.value!=null&&e.setAttribute("value",""+ge(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&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return We(n),null;case 6:if(e&&n.stateNode!=null)du(e,n,e.memoizedProps,l);else{if(typeof l!="string"&&n.stateNode===null)throw Error(i(166));if(r=yn(Ir.current),yn(kt.current),Ts(n)){if(l=n.stateNode,r=n.memoizedProps,l[bt]=n,(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&&(n.flags|=4)}else l=(r.nodeType===9?r:r.ownerDocument).createTextNode(l),l[bt]=n,n.stateNode=l}return We(n),null;case 13:if(ke(Ee),l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ce&<!==null&&(n.mode&1)!==0&&(n.flags&128)===0)xc(),Un(),n.flags|=98560,u=!1;else if(u=Ts(n),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(i(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(i(317));u[bt]=n}else Un(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;We(n),u=!1}else gt!==null&&(ni(gt),gt=null),u=!0;if(!u)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=r,n):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Ee.current&1)!==0?ze===0&&(ze=3):li())),n.updateQueue!==null&&(n.flags|=4),We(n),null);case 4:return Yn(),Wa(e,n),e===null&&Er(n.stateNode.containerInfo),We(n),null;case 10:return va(n.type._context),We(n),null;case 17:return Xe(n.type)&&Ss(),We(n),null;case 19:if(ke(Ee),u=n.memoizedState,u===null)return We(n),null;if(l=(n.flags&128)!==0,x=u.rendering,x===null)if(l)Fr(u,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=zs(e),x!==null){for(n.flags|=128,Fr(u,!1),l=x.updateQueue,l!==null&&(n.updateQueue=l,n.flags|=4),n.subtreeFlags=0,l=r,r=n.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 we(Ee,Ee.current&1|2),n.child}e=e.sibling}u.tail!==null&&Me()>Zn&&(n.flags|=128,l=!0,Fr(u,!1),n.lanes=4194304)}else{if(!l)if(e=zs(x),e!==null){if(n.flags|=128,l=!0,r=e.updateQueue,r!==null&&(n.updateQueue=r,n.flags|=4),Fr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!x.alternate&&!Ce)return We(n),null}else 2*Me()-u.renderingStartTime>Zn&&r!==1073741824&&(n.flags|=128,l=!0,Fr(u,!1),n.lanes=4194304);u.isBackwards?(x.sibling=n.child,n.child=x):(r=u.last,r!==null?r.sibling=x:n.child=x,u.last=x)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Me(),n.sibling=null,r=Ee.current,we(Ee,l?r&1|2:r&1),n):(We(n),null);case 22:case 23:return si(),l=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(n.flags|=8192),l&&(n.mode&1)!==0?(at&1073741824)!==0&&(We(n),n.subtreeFlags&6&&(n.flags|=8192)):We(n),null;case 24:return null;case 25:return null}throw Error(i(156,n.tag))}function E0(e,n){switch(ha(n),n.tag){case 1:return Xe(n.type)&&Ss(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Yn(),ke(Ze),ke(Ve),Ca(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return ka(n),null;case 13:if(ke(Ee),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Un()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return ke(Ee),null;case 4:return Yn(),null;case 10:return va(n.type._context),null;case 22:case 23:return si(),null;case 24:return null;default:return null}}var Ws=!1,Ye=!1,P0=typeof WeakSet=="function"?WeakSet:Set,H=null;function Gn(e,n){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){Te(e,n,l)}else r.current=null}function Ya(e,n,r){try{r()}catch(l){Te(e,n,l)}}var mu=!1;function L0(e,n){if(sa=ds,e=Ho(),Zl(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,g=-1,y=-1,E=0,O=0,z=e,_=null;t:for(;;){for(var V;z!==r||o!==0&&z.nodeType!==3||(g=x+o),z!==u||l!==0&&z.nodeType!==3||(y=x+l),z.nodeType===3&&(x+=z.nodeValue.length),(V=z.firstChild)!==null;)_=z,z=V;for(;;){if(z===e)break t;if(_===r&&++E===o&&(g=x),_===u&&++O===l&&(y=x),(V=z.nextSibling)!==null)break;z=_,_=z.parentNode}z=V}r=g===-1||y===-1?null:{start:g,end:y}}else r=null}r=r||{start:0,end:0}}else r=null;for(la={focusedElem:e,selectionRange:r},ds=!1,H=n;H!==null;)if(n=H,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,H=e;else for(;H!==null;){n=H;try{var W=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var Q=W.memoizedProps,Re=W.memoizedState,k=n.stateNode,w=k.getSnapshotBeforeUpdate(n.elementType===n.type?Q:yt(n.type,Q),Re);k.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=n.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(F){Te(n,n.return,F)}if(e=n.sibling,e!==null){e.return=n.return,H=e;break}H=n.return}return W=mu,mu=!1,W}function Br(e,n,r){var l=n.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&&Ya(n,r,u)}o=o.next}while(o!==l)}}function Ys(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&e)===e){var l=r.create;r.destroy=l()}r=r.next}while(r!==n)}}function Qa(e){var n=e.ref;if(n!==null){var r=e.stateNode;e.tag,e=r,typeof n=="function"?n(e):n.current=e}}function hu(e){var n=e.alternate;n!==null&&(e.alternate=null,hu(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[bt],delete n[Lr],delete n[ca],delete n[d0],delete n[m0])),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 xu(e){return e.tag===5||e.tag===3||e.tag===4}function fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xu(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 Ga(e,n,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?r.nodeType===8?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(r.nodeType===8?(n=r.parentNode,n.insertBefore(e,r)):(n=r,n.appendChild(e)),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=bs));else if(l!==4&&(e=e.child,e!==null))for(Ga(e,n,r),e=e.sibling;e!==null;)Ga(e,n,r),e=e.sibling}function Ka(e,n,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Ka(e,n,r),e=e.sibling;e!==null;)Ka(e,n,r),e=e.sibling}var $e=null,vt=!1;function Jt(e,n,r){for(r=r.child;r!==null;)pu(e,n,r),r=r.sibling}function pu(e,n,r){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(ls,r)}catch{}switch(r.tag){case 5:Ye||Gn(r,n);case 6:var l=$e,o=vt;$e=null,Jt(e,n,r),$e=l,vt=o,$e!==null&&(vt?(e=$e,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):$e.removeChild(r.stateNode));break;case 18:$e!==null&&(vt?(e=$e,r=r.stateNode,e.nodeType===8?oa(e.parentNode,r):e.nodeType===1&&oa(e,r),yr(e)):oa($e,r.stateNode));break;case 4:l=$e,o=vt,$e=r.stateNode.containerInfo,vt=!0,Jt(e,n,r),$e=l,vt=o;break;case 0:case 11:case 14:case 15:if(!Ye&&(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)&&Ya(r,n,x),o=o.next}while(o!==l)}Jt(e,n,r);break;case 1:if(!Ye&&(Gn(r,n),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(g){Te(r,n,g)}Jt(e,n,r);break;case 21:Jt(e,n,r);break;case 22:r.mode&1?(Ye=(l=Ye)||r.memoizedState!==null,Jt(e,n,r),Ye=l):Jt(e,n,r);break;default:Jt(e,n,r)}}function gu(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new P0),n.forEach(function(l){var o=D0.bind(null,e,l);r.has(l)||(r.add(l),l.then(o,o))})}}function jt(e,n){var r=n.deletions;if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];try{var u=e,x=n,g=x;e:for(;g!==null;){switch(g.tag){case 5:$e=g.stateNode,vt=!1;break e;case 3:$e=g.stateNode.containerInfo,vt=!0;break e;case 4:$e=g.stateNode.containerInfo,vt=!0;break e}g=g.return}if($e===null)throw Error(i(160));pu(u,x,o),$e=null,vt=!1;var y=o.alternate;y!==null&&(y.return=null),o.return=null}catch(E){Te(o,n,E)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)yu(n,e),n=n.sibling}function yu(e,n){var r=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jt(n,e),Ct(e),l&4){try{Br(3,e,e.return),Ys(3,e)}catch(Q){Te(e,e.return,Q)}try{Br(5,e,e.return)}catch(Q){Te(e,e.return,Q)}}break;case 1:jt(n,e),Ct(e),l&512&&r!==null&&Gn(r,r.return);break;case 5:if(jt(n,e),Ct(e),l&512&&r!==null&&Gn(r,r.return),e.flags&32){var o=e.stateNode;try{ir(o,"")}catch(Q){Te(e,e.return,Q)}}if(l&4&&(o=e.stateNode,o!=null)){var u=e.memoizedProps,x=r!==null?r.memoizedProps:u,g=e.type,y=e.updateQueue;if(e.updateQueue=null,y!==null)try{g==="input"&&u.type==="radio"&&u.name!=null&&Wi(o,u),Cl(g,x);var E=Cl(g,u);for(x=0;x<y.length;x+=2){var O=y[x],z=y[x+1];O==="style"?Ji(o,z):O==="dangerouslySetInnerHTML"?Xi(o,z):O==="children"?ir(o,z):D(o,O,z,E)}switch(g){case"input":wl(o,u);break;case"textarea":Gi(o,u);break;case"select":var _=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!u.multiple;var V=u.value;V!=null?En(o,!!u.multiple,V,!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){Te(e,e.return,Q)}}break;case 6:if(jt(n,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){Te(e,e.return,Q)}}break;case 3:if(jt(n,e),Ct(e),l&4&&r!==null&&r.memoizedState.isDehydrated)try{yr(n.containerInfo)}catch(Q){Te(e,e.return,Q)}break;case 4:jt(n,e),Ct(e);break;case 13:jt(n,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||(qa=Me())),l&4&&gu(e);break;case 22:if(O=r!==null&&r.memoizedState!==null,e.mode&1?(Ye=(E=Ye)||O,jt(n,e),Ye=E):jt(n,e),Ct(e),l&8192){if(E=e.memoizedState!==null,(e.stateNode.isHidden=E)&&!O&&(e.mode&1)!==0)for(H=e,O=e.child;O!==null;){for(z=H=O;H!==null;){switch(_=H,V=_.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{n=l,W.props=n.memoizedProps,W.state=n.memoizedState,W.componentWillUnmount()}catch(Q){Te(l,r,Q)}}break;case 5:Gn(_,_.return);break;case 22:if(_.memoizedState!==null){wu(z);continue}}V!==null?(V.return=_,H=V):wu(z)}O=O.sibling}e:for(O=null,z=e;;){if(z.tag===5){if(O===null){O=z;try{o=z.stateNode,E?(u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(g=z.stateNode,y=z.memoizedProps.style,x=y!=null&&y.hasOwnProperty("display")?y.display:null,g.style.display=qi("display",x))}catch(Q){Te(e,e.return,Q)}}}else if(z.tag===6){if(O===null)try{z.stateNode.nodeValue=E?"":z.memoizedProps}catch(Q){Te(e,e.return,Q)}}else if((z.tag!==22&&z.tag!==23||z.memoizedState===null||z===e)&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===e)break e;for(;z.sibling===null;){if(z.return===null||z.return===e)break e;O===z&&(O=null),z=z.return}O===z&&(O=null),z.sibling.return=z.return,z=z.sibling}}break;case 19:jt(n,e),Ct(e),l&4&&gu(e);break;case 21:break;default:jt(n,e),Ct(e)}}function Ct(e){var n=e.flags;if(n&2){try{e:{for(var r=e.return;r!==null;){if(xu(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=fu(e);Ka(e,u,o);break;case 3:case 4:var x=l.stateNode.containerInfo,g=fu(e);Ga(e,g,x);break;default:throw Error(i(161))}}catch(y){Te(e,e.return,y)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function T0(e,n,r){H=e,vu(e)}function vu(e,n,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 g=o.alternate,y=g!==null&&g.memoizedState!==null||Ye;g=Ws;var E=Ye;if(Ws=x,(Ye=y)&&!E)for(H=o;H!==null;)x=H,y=x.child,x.tag===22&&x.memoizedState!==null?Nu(o):y!==null?(y.return=x,H=y):Nu(o);for(;u!==null;)H=u,vu(u),u=u.sibling;H=o,Ws=g,Ye=E}ju(e)}else(o.subtreeFlags&8772)!==0&&u!==null?(u.return=o,H=u):ju(e)}}function ju(e){for(;H!==null;){var n=H;if((n.flags&8772)!==0){var r=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Ye||Ys(5,n);break;case 1:var l=n.stateNode;if(n.flags&4&&!Ye)if(r===null)l.componentDidMount();else{var o=n.elementType===n.type?r.memoizedProps:yt(n.type,r.memoizedProps);l.componentDidUpdate(o,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var u=n.updateQueue;u!==null&&wc(n,u,l);break;case 3:var x=n.updateQueue;if(x!==null){if(r=null,n.child!==null)switch(n.child.tag){case 5:r=n.child.stateNode;break;case 1:r=n.child.stateNode}wc(n,x,r)}break;case 5:var g=n.stateNode;if(r===null&&n.flags&4){r=g;var y=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":y.autoFocus&&r.focus();break;case"img":y.src&&(r.src=y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var E=n.alternate;if(E!==null){var O=E.memoizedState;if(O!==null){var z=O.dehydrated;z!==null&&yr(z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}Ye||n.flags&512&&Qa(n)}catch(_){Te(n,n.return,_)}}if(n===e){H=null;break}if(r=n.sibling,r!==null){r.return=n.return,H=r;break}H=n.return}}function wu(e){for(;H!==null;){var n=H;if(n===e){H=null;break}var r=n.sibling;if(r!==null){r.return=n.return,H=r;break}H=n.return}}function Nu(e){for(;H!==null;){var n=H;try{switch(n.tag){case 0:case 11:case 15:var r=n.return;try{Ys(4,n)}catch(y){Te(n,r,y)}break;case 1:var l=n.stateNode;if(typeof l.componentDidMount=="function"){var o=n.return;try{l.componentDidMount()}catch(y){Te(n,o,y)}}var u=n.return;try{Qa(n)}catch(y){Te(n,u,y)}break;case 5:var x=n.return;try{Qa(n)}catch(y){Te(n,x,y)}}}catch(y){Te(n,n.return,y)}if(n===e){H=null;break}var g=n.sibling;if(g!==null){g.return=n.return,H=g;break}H=n.return}}var M0=Math.ceil,Qs=Y.ReactCurrentDispatcher,Za=Y.ReactCurrentOwner,mt=Y.ReactCurrentBatchConfig,ue=0,De=null,Ie=null,Ue=0,at=0,Kn=Gt(0),ze=0,$r=null,jn=0,Gs=0,Xa=0,Ur=null,Je=null,qa=0,Zn=1/0,At=null,Ks=!1,Ja=null,en=null,Zs=!1,tn=null,Xs=0,Vr=0,ei=null,qs=-1,Js=0;function Ke(){return(ue&6)!==0?Me():qs!==-1?qs:qs=Me()}function nn(e){return(e.mode&1)===0?1:(ue&2)!==0&&Ue!==0?Ue&-Ue:x0.transition!==null?(Js===0&&(Js=fo()),Js):(e=ye,e!==0||(e=window.event,e=e===void 0?16:ko(e.type)),e)}function wt(e,n,r,l){if(50<Vr)throw Vr=0,ei=null,Error(i(185));hr(e,r,l),((ue&2)===0||e!==De)&&(e===De&&((ue&2)===0&&(Gs|=r),ze===4&&rn(e,Ue)),et(e,l),r===1&&ue===0&&(n.mode&1)===0&&(Zn=Me()+500,Es&&Zt()))}function et(e,n){var r=e.callbackNode;xm(e,n);var l=os(e,e===De?Ue:0);if(l===0)r!==null&&mo(r),e.callbackNode=null,e.callbackPriority=0;else if(n=l&-l,e.callbackPriority!==n){if(r!=null&&mo(r),n===1)e.tag===0?h0(ku.bind(null,e)):cc(ku.bind(null,e)),c0(function(){(ue&6)===0&&Zt()}),r=null;else{switch(po(l)){case 1:r=_l;break;case 4:r=ho;break;case 16:r=ss;break;case 536870912:r=xo;break;default:r=ss}r=Ru(r,bu.bind(null,e))}e.callbackPriority=n,e.callbackNode=r}}function bu(e,n){if(qs=-1,Js=0,(ue&6)!==0)throw Error(i(327));var r=e.callbackNode;if(Xn()&&e.callbackNode!==r)return null;var l=os(e,e===De?Ue:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||n)n=el(e,l);else{n=l;var o=ue;ue|=2;var u=Cu();(De!==e||Ue!==n)&&(At=null,Zn=Me()+500,Nn(e,n));do try{I0();break}catch(g){Su(e,g)}while(!0);ya(),Qs.current=u,ue=o,Ie!==null?n=0:(De=null,Ue=0,n=ze)}if(n!==0){if(n===2&&(o=Il(e),o!==0&&(l=o,n=ti(e,o))),n===1)throw r=$r,Nn(e,0),rn(e,l),et(e,Me()),r;if(n===6)rn(e,l);else{if(o=e.current.alternate,(l&30)===0&&!R0(o)&&(n=el(e,l),n===2&&(u=Il(e),u!==0&&(l=u,n=ti(e,u))),n===1))throw r=$r,Nn(e,0),rn(e,l),et(e,Me()),r;switch(e.finishedWork=o,e.finishedLanes=l,n){case 0:case 1:throw Error(i(345));case 2:bn(e,Je,At);break;case 3:if(rn(e,l),(l&130023424)===l&&(n=qa+500-Me(),10<n)){if(os(e,0)!==0)break;if(o=e.suspendedLanes,(o&l)!==l){Ke(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ia(bn.bind(null,e,Je,At),n);break}bn(e,Je,At);break;case 4:if(rn(e,l),(l&4194240)===l)break;for(n=e.eventTimes,o=-1;0<l;){var x=31-ft(l);u=1<<x,x=n[x],x>o&&(o=x),l&=~u}if(l=o,l=Me()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*M0(l/1960))-l,10<l){e.timeoutHandle=ia(bn.bind(null,e,Je,At),l);break}bn(e,Je,At);break;case 5:bn(e,Je,At);break;default:throw Error(i(329))}}}return et(e,Me()),e.callbackNode===r?bu.bind(null,e):null}function ti(e,n){var r=Ur;return e.current.memoizedState.isDehydrated&&(Nn(e,n).flags|=256),e=el(e,n),e!==2&&(n=Je,Je=r,n!==null&&ni(n)),e}function ni(e){Je===null?Je=e:Je.push.apply(Je,e)}function R0(e){for(var n=e;;){if(n.flags&16384){var r=n.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=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function rn(e,n){for(n&=~Xa,n&=~Gs,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var r=31-ft(n),l=1<<r;e[r]=-1,n&=~l}}function ku(e){if((ue&6)!==0)throw Error(i(327));Xn();var n=os(e,0);if((n&1)===0)return et(e,Me()),null;var r=el(e,n);if(e.tag!==0&&r===2){var l=Il(e);l!==0&&(n=l,r=ti(e,l))}if(r===1)throw r=$r,Nn(e,0),rn(e,n),et(e,Me()),r;if(r===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,bn(e,Je,At),et(e,Me()),null}function ri(e,n){var r=ue;ue|=1;try{return e(n)}finally{ue=r,ue===0&&(Zn=Me()+500,Es&&Zt())}}function wn(e){tn!==null&&tn.tag===0&&(ue&6)===0&&Xn();var n=ue;ue|=1;var r=mt.transition,l=ye;try{if(mt.transition=null,ye=1,e)return e()}finally{ye=l,mt.transition=r,ue=n,(ue&6)===0&&Zt()}}function si(){at=Kn.current,ke(Kn)}function Nn(e,n){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,o0(r)),Ie!==null)for(r=Ie.return;r!==null;){var l=r;switch(ha(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&Ss();break;case 3:Yn(),ke(Ze),ke(Ve),Ca();break;case 5:ka(l);break;case 4:Yn();break;case 13:ke(Ee);break;case 19:ke(Ee);break;case 10:va(l.type._context);break;case 22:case 23:si()}r=r.return}if(De=e,Ie=e=sn(e.current,null),Ue=at=n,ze=0,$r=null,Xa=Gs=jn=0,Je=Ur=null,gn!==null){for(n=0;n<gn.length;n++)if(r=gn[n],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 Su(e,n){do{var r=Ie;try{if(ya(),As.current=$s,Ds){for(var l=Pe.memoizedState;l!==null;){var o=l.queue;o!==null&&(o.pending=null),l=l.next}Ds=!1}if(vn=0,Ae=Oe=Pe=null,Or=!1,zr=0,Za.current=null,r===null||r.return===null){ze=1,$r=n,Ie=null;break}e:{var u=e,x=r.return,g=r,y=n;if(n=Ue,g.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){var E=y,O=g,z=O.tag;if((O.mode&1)===0&&(z===0||z===11||z===15)){var _=O.alternate;_?(O.updateQueue=_.updateQueue,O.memoizedState=_.memoizedState,O.lanes=_.lanes):(O.updateQueue=null,O.memoizedState=null)}var V=Zc(x);if(V!==null){V.flags&=-257,Xc(V,x,g,u,n),V.mode&1&&Kc(u,E,n),n=V,y=E;var W=n.updateQueue;if(W===null){var Q=new Set;Q.add(y),n.updateQueue=Q}else W.add(y);break e}else{if((n&1)===0){Kc(u,E,n),li();break e}y=Error(i(426))}}else if(Ce&&g.mode&1){var Re=Zc(x);if(Re!==null){(Re.flags&65536)===0&&(Re.flags|=256),Xc(Re,x,g,u,n),pa(Qn(y,g));break e}}u=y=Qn(y,g),ze!==4&&(ze=2),Ur===null?Ur=[u]:Ur.push(u),u=x;do{switch(u.tag){case 3:u.flags|=65536,n&=-n,u.lanes|=n;var k=Qc(u,y,n);jc(u,k);break e;case 1:g=y;var w=u.type,S=u.stateNode;if((u.flags&128)===0&&(typeof w.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(en===null||!en.has(S)))){u.flags|=65536,n&=-n,u.lanes|=n;var F=Gc(u,g,n);jc(u,F);break e}}u=u.return}while(u!==null)}Pu(r)}catch(G){n=G,Ie===r&&r!==null&&(Ie=r=r.return);continue}break}while(!0)}function Cu(){var e=Qs.current;return Qs.current=$s,e===null?$s:e}function li(){(ze===0||ze===3||ze===2)&&(ze=4),De===null||(jn&268435455)===0&&(Gs&268435455)===0||rn(De,Ue)}function el(e,n){var r=ue;ue|=2;var l=Cu();(De!==e||Ue!==n)&&(At=null,Nn(e,n));do try{_0();break}catch(o){Su(e,o)}while(!0);if(ya(),ue=r,Qs.current=l,Ie!==null)throw Error(i(261));return De=null,Ue=0,ze}function _0(){for(;Ie!==null;)Eu(Ie)}function I0(){for(;Ie!==null&&!lm();)Eu(Ie)}function Eu(e){var n=Mu(e.alternate,e,at);e.memoizedProps=e.pendingProps,n===null?Pu(e):Ie=n,Za.current=null}function Pu(e){var n=e;do{var r=n.alternate;if(e=n.return,(n.flags&32768)===0){if(r=C0(r,n,at),r!==null){Ie=r;return}}else{if(r=E0(r,n),r!==null){r.flags&=32767,Ie=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Ie=null;return}}if(n=n.sibling,n!==null){Ie=n;return}Ie=n=e}while(n!==null);ze===0&&(ze=5)}function bn(e,n,r){var l=ye,o=mt.transition;try{mt.transition=null,ye=1,O0(e,n,r,l)}finally{mt.transition=o,ye=l}return null}function O0(e,n,r,l){do Xn();while(tn!==null);if((ue&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(fm(e,u),e===De&&(Ie=De=null,Ue=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Zs||(Zs=!0,Ru(ss,function(){return Xn(),null})),u=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||u){u=mt.transition,mt.transition=null;var x=ye;ye=1;var g=ue;ue|=4,Za.current=null,L0(e,r),yu(r,e),t0(la),ds=!!sa,la=sa=null,e.current=r,T0(r),am(),ue=g,ye=x,mt.transition=u}else e.current=r;if(Zs&&(Zs=!1,tn=e,Xs=o),u=e.pendingLanes,u===0&&(en=null),cm(r.stateNode),et(e,Me()),n!==null)for(l=e.onRecoverableError,r=0;r<n.length;r++)o=n[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===ei?Vr++:(Vr=0,ei=e):Vr=0,Zt(),null}function Xn(){if(tn!==null){var e=po(Xs),n=mt.transition,r=ye;try{if(mt.transition=null,ye=16>e?16:e,tn===null)var l=!1;else{if(e=tn,tn=null,Xs=0,(ue&6)!==0)throw Error(i(331));var o=ue;for(ue|=4,H=e.current;H!==null;){var u=H,x=u.child;if((H.flags&16)!==0){var g=u.deletions;if(g!==null){for(var y=0;y<g.length;y++){var E=g[y];for(H=E;H!==null;){var O=H;switch(O.tag){case 0:case 11:case 15:Br(8,O,u)}var z=O.child;if(z!==null)z.return=O,H=z;else for(;H!==null;){O=H;var _=O.sibling,V=O.return;if(hu(O),O===E){H=null;break}if(_!==null){_.return=V,H=_;break}H=V}}}var W=u.alternate;if(W!==null){var Q=W.child;if(Q!==null){W.child=null;do{var Re=Q.sibling;Q.sibling=null,Q=Re}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 k=u.sibling;if(k!==null){k.return=u.return,H=k;break e}H=u.return}}var w=e.current;for(H=w;H!==null;){x=H;var S=x.child;if((x.subtreeFlags&2064)!==0&&S!==null)S.return=x,H=S;else e:for(x=w;H!==null;){if(g=H,(g.flags&2048)!==0)try{switch(g.tag){case 0:case 11:case 15:Ys(9,g)}}catch(G){Te(g,g.return,G)}if(g===x){H=null;break e}var F=g.sibling;if(F!==null){F.return=g.return,H=F;break e}H=g.return}}if(ue=o,Zt(),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(ls,e)}catch{}l=!0}return l}finally{ye=r,mt.transition=n}}return!1}function Lu(e,n,r){n=Qn(r,n),n=Qc(e,n,1),e=qt(e,n,1),n=Ke(),e!==null&&(hr(e,1,n),et(e,n))}function Te(e,n,r){if(e.tag===3)Lu(e,e,r);else for(;n!==null;){if(n.tag===3){Lu(n,e,r);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(en===null||!en.has(l))){e=Qn(r,e),e=Gc(n,e,1),n=qt(n,e,1),e=Ke(),n!==null&&(hr(n,1,e),et(n,e));break}}n=n.return}}function z0(e,n,r){var l=e.pingCache;l!==null&&l.delete(n),n=Ke(),e.pingedLanes|=e.suspendedLanes&r,De===e&&(Ue&r)===r&&(ze===4||ze===3&&(Ue&130023424)===Ue&&500>Me()-qa?Nn(e,0):Xa|=r),et(e,n)}function Tu(e,n){n===0&&((e.mode&1)===0?n=1:(n=is,is<<=1,(is&130023424)===0&&(is=4194304)));var r=Ke();e=It(e,n),e!==null&&(hr(e,n,r),et(e,r))}function A0(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Tu(e,r)}function D0(e,n){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(n),Tu(e,r)}var Mu;Mu=function(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps||Ze.current)qe=!0;else{if((e.lanes&r)===0&&(n.flags&128)===0)return qe=!1,S0(e,n,r);qe=(e.flags&131072)!==0}else qe=!1,Ce&&(n.flags&1048576)!==0&&uc(n,Ls,n.index);switch(n.lanes=0,n.tag){case 2:var l=n.type;Hs(e,n),e=n.pendingProps;var o=Fn(n,Ve.current);Wn(n,r),o=La(null,n,l,e,o,r);var u=Ta();return n.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,Xe(l)?(u=!0,Cs(n)):u=!1,n.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Na(n),o.updater=Us,n.stateNode=o,o._reactInternals=n,za(n,l,e,r),n=Ba(null,n,l,!0,u,r)):(n.tag=0,Ce&&u&&ma(n),Ge(null,n,o,r),n=n.child),n;case 16:l=n.elementType;e:{switch(Hs(e,n),e=n.pendingProps,o=l._init,l=o(l._payload),n.type=l,o=n.tag=B0(l),e=yt(l,e),o){case 0:n=Fa(null,n,l,e,r);break e;case 1:n=ru(null,n,l,e,r);break e;case 11:n=qc(null,n,l,e,r);break e;case 14:n=Jc(null,n,l,yt(l.type,e),r);break e}throw Error(i(306,l,""))}return n;case 0:return l=n.type,o=n.pendingProps,o=n.elementType===l?o:yt(l,o),Fa(e,n,l,o,r);case 1:return l=n.type,o=n.pendingProps,o=n.elementType===l?o:yt(l,o),ru(e,n,l,o,r);case 3:e:{if(su(n),e===null)throw Error(i(387));l=n.pendingProps,u=n.memoizedState,o=u.element,vc(e,n),Os(n,l,null,r);var x=n.memoizedState;if(l=x.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=u,n.memoizedState=u,n.flags&256){o=Qn(Error(i(423)),n),n=lu(e,n,l,r,o);break e}else if(l!==o){o=Qn(Error(i(424)),n),n=lu(e,n,l,r,o);break e}else for(lt=Qt(n.stateNode.containerInfo.firstChild),st=n,Ce=!0,gt=null,r=gc(n,null,l,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Un(),l===o){n=zt(e,n,r);break e}Ge(e,n,l,r)}n=n.child}return n;case 5:return Nc(n),e===null&&fa(n),l=n.type,o=n.pendingProps,u=e!==null?e.memoizedProps:null,x=o.children,aa(l,o)?x=null:u!==null&&aa(l,u)&&(n.flags|=32),nu(e,n),Ge(e,n,x,r),n.child;case 6:return e===null&&fa(n),null;case 13:return au(e,n,r);case 4:return ba(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Vn(n,null,l,r):Ge(e,n,l,r),n.child;case 11:return l=n.type,o=n.pendingProps,o=n.elementType===l?o:yt(l,o),qc(e,n,l,o,r);case 7:return Ge(e,n,n.pendingProps,r),n.child;case 8:return Ge(e,n,n.pendingProps.children,r),n.child;case 12:return Ge(e,n,n.pendingProps.children,r),n.child;case 10:e:{if(l=n.type._context,o=n.pendingProps,u=n.memoizedProps,x=o.value,we(Rs,l._currentValue),l._currentValue=x,u!==null)if(pt(u.value,x)){if(u.children===o.children&&!Ze.current){n=zt(e,n,r);break e}}else for(u=n.child,u!==null&&(u.return=n);u!==null;){var g=u.dependencies;if(g!==null){x=u.child;for(var y=g.firstContext;y!==null;){if(y.context===l){if(u.tag===1){y=Ot(-1,r&-r),y.tag=2;var E=u.updateQueue;if(E!==null){E=E.shared;var O=E.pending;O===null?y.next=y:(y.next=O.next,O.next=y),E.pending=y}}u.lanes|=r,y=u.alternate,y!==null&&(y.lanes|=r),ja(u.return,r,n),g.lanes|=r;break}y=y.next}}else if(u.tag===10)x=u.type===n.type?null:u.child;else if(u.tag===18){if(x=u.return,x===null)throw Error(i(341));x.lanes|=r,g=x.alternate,g!==null&&(g.lanes|=r),ja(x,r,n),x=u.sibling}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===n){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}Ge(e,n,o.children,r),n=n.child}return n;case 9:return o=n.type,l=n.pendingProps.children,Wn(n,r),o=ut(o),l=l(o),n.flags|=1,Ge(e,n,l,r),n.child;case 14:return l=n.type,o=yt(l,n.pendingProps),o=yt(l.type,o),Jc(e,n,l,o,r);case 15:return eu(e,n,n.type,n.pendingProps,r);case 17:return l=n.type,o=n.pendingProps,o=n.elementType===l?o:yt(l,o),Hs(e,n),n.tag=1,Xe(l)?(e=!0,Cs(n)):e=!1,Wn(n,r),Wc(n,l,o),za(n,l,o,r),Ba(null,n,l,!0,e,r);case 19:return ou(e,n,r);case 22:return tu(e,n,r)}throw Error(i(156,n.tag))};function Ru(e,n){return uo(e,n)}function F0(e,n,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=n,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,n,r,l){return new F0(e,n,r,l)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function B0(e){if(typeof e=="function")return ai(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ce)return 11;if(e===Ne)return 14}return 2}function sn(e,n){var r=e.alternate;return r===null?(r=ht(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,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,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function tl(e,n,r,l,o,u){var x=2;if(l=e,typeof e=="function")ai(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case Z:return kn(r.children,o,u,n);case xe:x=8,o|=8;break;case Le:return e=ht(12,r,n,o|2),e.elementType=Le,e.lanes=u,e;case le:return e=ht(13,r,n,o),e.elementType=le,e.lanes=u,e;case ae:return e=ht(19,r,n,o),e.elementType=ae,e.lanes=u,e;case te:return nl(r,o,u,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:x=10;break e;case ne:x=9;break e;case ce:x=11;break e;case Ne:x=14;break e;case pe:x=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return n=ht(x,r,n,o),n.elementType=e,n.type=l,n.lanes=u,n}function kn(e,n,r,l){return e=ht(7,e,l,n),e.lanes=r,e}function nl(e,n,r,l){return e=ht(22,e,l,n),e.elementType=te,e.lanes=r,e.stateNode={isHidden:!1},e}function ii(e,n,r){return e=ht(6,e,null,n),e.lanes=r,e}function oi(e,n,r){return n=ht(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function $0(e,n,r,l,o){this.tag=n,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=Ol(0),this.expirationTimes=Ol(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.identifierPrefix=l,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ci(e,n,r,l,o,u,x,g,y){return e=new $0(e,n,r,g,y),n===1?(n=1,u===!0&&(n|=8)):n=0,u=ht(3,null,null,n),e.current=u,u.stateNode=e,u.memoizedState={element:l,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Na(u),e}function U0(e,n,r){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ve,key:l==null?null:""+l,children:e,containerInfo:n,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 n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(Xe(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(i(171))}if(e.tag===1){var r=e.type;if(Xe(r))return ic(e,r,n)}return n}function Iu(e,n,r,l,o,u,x,g,y){return e=ci(r,l,!0,e,o,u,x,g,y),e.context=_u(null),r=e.current,l=Ke(),o=nn(r),u=Ot(l,o),u.callback=n??null,qt(r,u,o),e.current.lanes=o,hr(e,o,l),et(e,l),e}function rl(e,n,r,l){var o=n.current,u=Ke(),x=nn(o);return r=_u(r),n.context===null?n.context=r:n.pendingContext=r,n=Ot(u,x),n.payload={element:e},l=l===void 0?null:l,l!==null&&(n.callback=l),e=qt(o,n,x),e!==null&&(wt(e,o,x,u),Is(e,o,x)),x}function sl(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Ou(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function ui(e,n){Ou(e,n),(e=e.alternate)&&Ou(e,n)}function V0(){return null}var zu=typeof reportError=="function"?reportError:function(e){console.error(e)};function di(e){this._internalRoot=e}ll.prototype.render=di.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));rl(e,n,null,null)},ll.prototype.unmount=di.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;wn(function(){rl(null,e,null,null)}),n[Tt]=null}};function ll(e){this._internalRoot=e}ll.prototype.unstable_scheduleHydration=function(e){if(e){var n=vo();e={blockedOn:null,target:e,priority:n};for(var r=0;r<Ht.length&&n!==0&&n<Ht[r].priority;r++);Ht.splice(r,0,e),r===0&&No(e)}};function mi(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 Au(){}function H0(e,n,r,l,o){if(o){if(typeof l=="function"){var u=l;l=function(){var E=sl(x);u.call(E)}}var x=Iu(n,l,e,0,null,!1,!1,"",Au);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 g=l;l=function(){var E=sl(y);g.call(E)}}var y=ci(e,0,!1,null,null,!1,!1,"",Au);return e._reactRootContainer=y,e[Tt]=y.current,Er(e.nodeType===8?e.parentNode:e),wn(function(){rl(n,y,r,l)}),y}function il(e,n,r,l,o){var u=r._reactRootContainer;if(u){var x=u;if(typeof o=="function"){var g=o;o=function(){var y=sl(x);g.call(y)}}rl(n,x,e,o)}else x=H0(r,n,e,o,l);return sl(x)}go=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var r=mr(n.pendingLanes);r!==0&&(zl(n,r|1),et(n,Me()),(ue&6)===0&&(Zn=Me()+500,Zt()))}break;case 13:wn(function(){var l=It(e,1);if(l!==null){var o=Ke();wt(l,e,1,o)}}),ui(e,1)}},Al=function(e){if(e.tag===13){var n=It(e,134217728);if(n!==null){var r=Ke();wt(n,e,134217728,r)}ui(e,134217728)}},yo=function(e){if(e.tag===13){var n=nn(e),r=It(e,n);if(r!==null){var l=Ke();wt(r,e,n,l)}ui(e,n)}},vo=function(){return ye},jo=function(e,n){var r=ye;try{return ye=e,n()}finally{ye=r}},Ll=function(e,n,r){switch(n){case"input":if(wl(e,r),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<r.length;n++){var l=r[n];if(l!==e&&l.form===e.form){var o=ks(l);if(!o)throw Error(i(90));Vi(l),wl(l,o)}}}break;case"textarea":Gi(e,r);break;case"select":n=r.value,n!=null&&En(e,!!r.multiple,n,!1)}},ro=ri,so=wn;var W0={usingClientEntryPoint:!1,Events:[Tr,An,ks,to,no,ri]},Hr={findFiberByHostInstance:hn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Y0={bundleType:Hr.bundleType,version:Hr.version,rendererPackageName:Hr.rendererPackageName,rendererConfig:Hr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=oo(e),e===null?null:e.stateNode},findFiberByHostInstance:Hr.findFiberByHostInstance||V0,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(Y0),Nt=ol}catch{}}return tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W0,tt.createPortal=function(e,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mi(n))throw Error(i(200));return U0(e,n,null,r)},tt.createRoot=function(e,n){if(!mi(e))throw Error(i(299));var r=!1,l="",o=zu;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),n=ci(e,1,!1,null,null,r,!1,l,o),e[Tt]=n.current,Er(e.nodeType===8?e.parentNode:e),new di(n)},tt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=oo(n),e=e===null?null:e.stateNode,e},tt.flushSync=function(e){return wn(e)},tt.hydrate=function(e,n,r){if(!al(n))throw Error(i(200));return il(null,e,n,!0,r)},tt.hydrateRoot=function(e,n,r){if(!mi(e))throw Error(i(405));var l=r!=null&&r.hydratedSources||null,o=!1,u="",x=zu;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(x=r.onRecoverableError)),n=Iu(n,null,e,1,r??null,o,!1,u,x),e[Tt]=n.current,Er(e),l)for(e=0;e<l.length;e++)r=l[e],o=r._getVersion,o=o(r._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[r,o]:n.mutableSourceEagerHydrationData.push(r,o);return new ll(n)},tt.render=function(e,n,r){if(!al(n))throw Error(i(200));return il(null,e,n,!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=ri,tt.unstable_renderSubtreeIntoContainer=function(e,n,r,l){if(!al(r))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return il(e,n,r,!1,l)},tt.version="18.3.1-next-f1338f8080-20240426",tt}var Wu;function yd(){if(Wu)return fi.exports;Wu=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(),fi.exports=th(),fi.exports}var Yu;function nh(){if(Yu)return cl;Yu=1;var s=yd();return cl.createRoot=s.createRoot,cl.hydrateRoot=s.hydrateRoot,cl}var rh=nh(),N=ki();const vd=K0(N),sh=G0({__proto__:null,default:vd},[N]);yd();function Qr(){return Qr=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},Qr.apply(this,arguments)}var an;(function(s){s.Pop="POP",s.Push="PUSH",s.Replace="REPLACE"})(an||(an={}));const Qu="popstate";function lh(s){s===void 0&&(s={});function a(c,d){let{pathname:m,search:h,hash:p}=c.location;return vi("",{pathname:m,search:h,hash:p},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(c,d){return typeof d=="string"?d:ul(d)}return ih(a,i,null,s)}function _e(s,a){if(s===!1||s===null||typeof s>"u")throw new Error(a)}function Si(s,a){if(!s){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function ah(){return Math.random().toString(36).substr(2,8)}function Gu(s,a){return{usr:s.state,key:s.key,idx:a}}function vi(s,a,i,c){return i===void 0&&(i=null),Qr({pathname:typeof s=="string"?s:s.pathname,search:"",hash:""},typeof a=="string"?rr(a):a,{state:i,key:a&&a.key||c||ah()})}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 ih(s,a,i,c){c===void 0&&(c={});let{window:d=document.defaultView,v5Compat:m=!1}=c,h=d.history,p=an.Pop,f=null,j=C();j==null&&(j=0,h.replaceState(Qr({},h.state,{idx:j}),""));function C(){return(h.state||{idx:null}).idx}function v(){p=an.Pop;let P=C(),A=P==null?null:P-j;j=P,f&&f({action:p,location:R.location,delta:A})}function T(P,A){p=an.Push;let L=vi(R.location,P,A);j=C()+1;let D=Gu(L,j),Y=R.createHref(L);try{h.pushState(D,"",Y)}catch(oe){if(oe instanceof DOMException&&oe.name==="DataCloneError")throw oe;d.location.assign(Y)}m&&f&&f({action:p,location:R.location,delta:1})}function B(P,A){p=an.Replace;let L=vi(R.location,P,A);j=C();let D=Gu(L,j),Y=R.createHref(L);h.replaceState(D,"",Y),m&&f&&f({action:p,location:R.location,delta:0})}function M(P){let A=d.location.origin!=="null"?d.location.origin:d.location.href,L=typeof P=="string"?P:ul(P);return L=L.replace(/ $/,"%20"),_e(A,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,A)}let R={get action(){return p},get location(){return s(d,h)},listen(P){if(f)throw new Error("A history only accepts one active listener");return d.addEventListener(Qu,v),f=P,()=>{d.removeEventListener(Qu,v),f=null}},createHref(P){return a(d,P)},createURL:M,encodeLocation(P){let A=M(P);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:T,replace:B,go(P){return h.go(P)}};return R}var Ku;(function(s){s.data="data",s.deferred="deferred",s.redirect="redirect",s.error="error"})(Ku||(Ku={}));function oh(s,a,i){return i===void 0&&(i="/"),ch(s,a,i)}function ch(s,a,i,c){let d=typeof a=="string"?rr(a):a,m=Ci(d.pathname||"/",i);if(m==null)return null;let h=jd(s);uh(h);let p=null;for(let f=0;p==null&&f<h.length;++f){let j=Nh(m);p=vh(h[f],j)}return p}function jd(s,a,i,c){a===void 0&&(a=[]),i===void 0&&(i=[]),c===void 0&&(c="");let d=(m,h,p)=>{let f={relativePath:p===void 0?m.path||"":p,caseSensitive:m.caseSensitive===!0,childrenIndex:h,route:m};f.relativePath.startsWith("/")&&(_e(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 j=on([c,f.relativePath]),C=i.concat(f);m.children&&m.children.length>0&&(_e(m.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+j+'".')),jd(m.children,a,C,j)),!(m.path==null&&!m.index)&&a.push({path:j,score:gh(j,m.index),routesMeta:C})};return s.forEach((m,h)=>{var p;if(m.path===""||!((p=m.path)!=null&&p.includes("?")))d(m,h);else for(let f of wd(m.path))d(m,h,f)}),a}function wd(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=wd(c.join("/")),p=[];return p.push(...h.map(f=>f===""?m:[m,f].join("/"))),d&&p.push(...h),p.map(f=>s.startsWith("/")&&f===""?"/":f)}function uh(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 dh=/^:[\w-]+$/,mh=3,hh=2,xh=1,fh=10,ph=-2,Zu=s=>s==="*";function gh(s,a){let i=s.split("/"),c=i.length;return i.some(Zu)&&(c+=ph),a&&(c+=hh),i.filter(d=>!Zu(d)).reduce((d,m)=>d+(dh.test(m)?mh:m===""?xh:fh),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 vh(s,a,i){let{routesMeta:c}=s,d={},m="/",h=[];for(let p=0;p<c.length;++p){let f=c[p],j=p===c.length-1,C=m==="/"?a:a.slice(m.length)||"/",v=jh({path:f.relativePath,caseSensitive:f.caseSensitive,end:j},C),T=f.route;if(!v)return null;Object.assign(d,v.params),h.push({params:d,pathname:on([m,v.pathname]),pathnameBase:Eh(on([m,v.pathnameBase])),route:T}),v.pathnameBase!=="/"&&(m=on([m,v.pathnameBase]))}return h}function jh(s,a){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[i,c]=wh(s.path,s.caseSensitive,s.end),d=a.match(i);if(!d)return null;let m=d[0],h=m.replace(/(.)\/+$/,"$1"),p=d.slice(1);return{params:c.reduce((j,C,v)=>{let{paramName:T,isOptional:B}=C;if(T==="*"){let R=p[v]||"";h=m.slice(0,m.length-R.length).replace(/(.)\/+$/,"$1")}const M=p[v];return B&&!M?j[T]=void 0:j[T]=(M||"").replace(/%2F/g,"/"),j},{}),pathname:m,pathnameBase:h,pattern:s}}function wh(s,a,i){a===void 0&&(a=!1),i===void 0&&(i=!0),Si(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,p,f)=>(c.push({paramName:p,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 Nh(s){try{return s.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Si(!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 Ci(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 bh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kh=s=>bh.test(s);function Sh(s,a){a===void 0&&(a="/");let{pathname:i,search:c="",hash:d=""}=typeof s=="string"?rr(s):s,m;if(i)if(kh(i))m=i;else{if(i.includes("//")){let h=i;i=i.replace(/\/\/+/g,"/"),Si(!1,"Pathnames cannot have embedded double slashes - normalizing "+(h+" -> "+i))}i.startsWith("/")?m=Xu(i.substring(1),"/"):m=Xu(i,a)}else m=a;return{pathname:m,search:Ph(c),hash:Lh(d)}}function Xu(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 yi(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 Ch(s){return s.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Ei(s,a){let i=Ch(s);return a?i.map((c,d)=>d===i.length-1?c.pathname:c.pathnameBase):i.map(c=>c.pathnameBase)}function Pi(s,a,i,c){c===void 0&&(c=!1);let d;typeof s=="string"?d=rr(s):(d=Qr({},s),_e(!d.pathname||!d.pathname.includes("?"),yi("?","pathname","search",d)),_e(!d.pathname||!d.pathname.includes("#"),yi("#","pathname","hash",d)),_e(!d.search||!d.search.includes("#"),yi("#","search","hash",d)));let m=s===""||d.pathname==="",h=m?"/":d.pathname,p;if(h==null)p=i;else{let v=a.length-1;if(!c&&h.startsWith("..")){let T=h.split("/");for(;T[0]==="..";)T.shift(),v-=1;d.pathname=T.join("/")}p=v>=0?a[v]:"/"}let f=Sh(d,p),j=h&&h!=="/"&&h.endsWith("/"),C=(m||h===".")&&i.endsWith("/");return!f.pathname.endsWith("/")&&(j||C)&&(f.pathname+="/"),f}const on=s=>s.join("/").replace(/\/\/+/g,"/"),Eh=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Ph=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Lh=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function Th(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}const Nd=["post","put","patch","delete"];new Set(Nd);const Mh=["get",...Nd];new Set(Mh);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 Li=N.createContext(null),Rh=N.createContext(null),un=N.createContext(null),fl=N.createContext(null),Bt=N.createContext({outlet:null,matches:[],isDataRoute:!1}),bd=N.createContext(null);function _h(s,a){let{relative:i}=a===void 0?{}:a;sr()||_e(!1);let{basename:c,navigator:d}=N.useContext(un),{hash:m,pathname:h,search:p}=Sd(s,{relative:i}),f=h;return c!=="/"&&(f=h==="/"?c:on([c,h])),d.createHref({pathname:f,search:p,hash:m})}function sr(){return N.useContext(fl)!=null}function lr(){return sr()||_e(!1),N.useContext(fl).location}function kd(s){N.useContext(un).static||N.useLayoutEffect(s)}function Ti(){let{isDataRoute:s}=N.useContext(Bt);return s?Qh():Ih()}function Ih(){sr()||_e(!1);let s=N.useContext(Li),{basename:a,future:i,navigator:c}=N.useContext(un),{matches:d}=N.useContext(Bt),{pathname:m}=lr(),h=JSON.stringify(Ei(d,i.v7_relativeSplatPath)),p=N.useRef(!1);return kd(()=>{p.current=!0}),N.useCallback(function(j,C){if(C===void 0&&(C={}),!p.current)return;if(typeof j=="number"){c.go(j);return}let v=Pi(j,JSON.parse(h),m,C.relative==="path");s==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:on([a,v.pathname])),(C.replace?c.replace:c.push)(v,C.state,C)},[a,c,h,m,s])}function Oh(){let{matches:s}=N.useContext(Bt),a=s[s.length-1];return a?a.params:{}}function Sd(s,a){let{relative:i}=a===void 0?{}:a,{future:c}=N.useContext(un),{matches:d}=N.useContext(Bt),{pathname:m}=lr(),h=JSON.stringify(Ei(d,c.v7_relativeSplatPath));return N.useMemo(()=>Pi(s,JSON.parse(h),m,i==="path"),[s,h,m,i])}function zh(s,a){return Ah(s,a)}function Ah(s,a,i,c){sr()||_e(!1);let{navigator:d}=N.useContext(un),{matches:m}=N.useContext(Bt),h=m[m.length-1],p=h?h.params:{};h&&h.pathname;let f=h?h.pathnameBase:"/";h&&h.route;let j=lr(),C;if(a){var v;let P=typeof a=="string"?rr(a):a;f==="/"||(v=P.pathname)!=null&&v.startsWith(f)||_e(!1),C=P}else C=j;let T=C.pathname||"/",B=T;if(f!=="/"){let P=f.replace(/^\//,"").split("/");B="/"+T.replace(/^\//,"").split("/").slice(P.length).join("/")}let M=oh(s,{pathname:B}),R=Uh(M&&M.map(P=>Object.assign({},P,{params:Object.assign({},p,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&&R?N.createElement(fl.Provider,{value:{location:Gr({pathname:"/",search:"",hash:"",state:null,key:"default"},C),navigationType:an.Pop}},R):R}function Dh(){let s=Yh(),a=Th(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 N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},a),i?N.createElement("pre",{style:d},i):null,null)}const Fh=N.createElement(Dh,null);class Bh extends N.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?N.createElement(Bt.Provider,{value:this.props.routeContext},N.createElement(bd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $h(s){let{routeContext:a,match:i,children:c}=s,d=N.useContext(Li);return d&&d.static&&d.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=i.route.id),N.createElement(Bt.Provider,{value:a},c)}function Uh(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,p=(d=i)==null?void 0:d.errors;if(p!=null){let C=h.findIndex(v=>v.route.id&&p?.[v.route.id]!==void 0);C>=0||_e(!1),h=h.slice(0,Math.min(h.length,C+1))}let f=!1,j=-1;if(i&&c&&c.v7_partialHydration)for(let C=0;C<h.length;C++){let v=h[C];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(j=C),v.route.id){let{loaderData:T,errors:B}=i,M=v.route.loader&&T[v.route.id]===void 0&&(!B||B[v.route.id]===void 0);if(v.route.lazy||M){f=!0,j>=0?h=h.slice(0,j+1):h=[h[0]];break}}}return h.reduceRight((C,v,T)=>{let B,M=!1,R=null,P=null;i&&(B=p&&v.route.id?p[v.route.id]:void 0,R=v.route.errorElement||Fh,f&&(j<0&&T===0?(Gh("route-fallback"),M=!0,P=null):j===T&&(M=!0,P=v.route.hydrateFallbackElement||null)));let A=a.concat(h.slice(0,T+1)),L=()=>{let D;return B?D=R:M?D=P:v.route.Component?D=N.createElement(v.route.Component,null):v.route.element?D=v.route.element:D=C,N.createElement($h,{match:v,routeContext:{outlet:C,matches:A,isDataRoute:i!=null},children:D})};return i&&(v.route.ErrorBoundary||v.route.errorElement||T===0)?N.createElement(Bh,{location:i.location,revalidation:i.revalidation,component:R,error:B,children:L(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):L()},null)}var Cd=(function(s){return s.UseBlocker="useBlocker",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s})(Cd||{}),Ed=(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})(Ed||{});function Vh(s){let a=N.useContext(Li);return a||_e(!1),a}function Hh(s){let a=N.useContext(Rh);return a||_e(!1),a}function Wh(s){let a=N.useContext(Bt);return a||_e(!1),a}function Pd(s){let a=Wh(),i=a.matches[a.matches.length-1];return i.route.id||_e(!1),i.route.id}function Yh(){var s;let a=N.useContext(bd),i=Hh(),c=Pd();return a!==void 0?a:(s=i.errors)==null?void 0:s[c]}function Qh(){let{router:s}=Vh(Cd.UseNavigateStable),a=Pd(Ed.UseNavigateStable),i=N.useRef(!1);return kd(()=>{i.current=!0}),N.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 qu={};function Gh(s,a,i){qu[s]||(qu[s]=!0)}function Kh(s,a){s?.v7_startTransition,s?.v7_relativeSplatPath}function Zh(s){let{to:a,replace:i,state:c,relative:d}=s;sr()||_e(!1);let{future:m,static:h}=N.useContext(un),{matches:p}=N.useContext(Bt),{pathname:f}=lr(),j=Ti(),C=Pi(a,Ei(p,m.v7_relativeSplatPath),f,d==="path"),v=JSON.stringify(C);return N.useEffect(()=>j(JSON.parse(v),{replace:i,state:c,relative:d}),[j,v,d,i,c]),null}function tr(s){_e(!1)}function Xh(s){let{basename:a="/",children:i=null,location:c,navigationType:d=an.Pop,navigator:m,static:h=!1,future:p}=s;sr()&&_e(!1);let f=a.replace(/^\/*/,"/"),j=N.useMemo(()=>({basename:f,navigator:m,static:h,future:Gr({v7_relativeSplatPath:!1},p)}),[f,p,m,h]);typeof c=="string"&&(c=rr(c));let{pathname:C="/",search:v="",hash:T="",state:B=null,key:M="default"}=c,R=N.useMemo(()=>{let P=Ci(C,f);return P==null?null:{location:{pathname:P,search:v,hash:T,state:B,key:M},navigationType:d}},[f,C,v,T,B,M,d]);return R==null?null:N.createElement(un.Provider,{value:j},N.createElement(fl.Provider,{children:i,value:R}))}function Ld(s){let{children:a,location:i}=s;return zh(ji(a),i)}new Promise(()=>{});function ji(s,a){a===void 0&&(a=[]);let i=[];return N.Children.forEach(s,(c,d)=>{if(!N.isValidElement(c))return;let m=[...a,d];if(c.type===N.Fragment){i.push.apply(i,ji(c.props.children,m));return}c.type!==tr&&_e(!1),!c.props.index||!c.props.children||_e(!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=ji(c.props.children,m)),i.push(h)}),i}function wi(){return wi=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},wi.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 Jh(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function ex(s,a){return s.button===0&&(!a||a==="_self")&&!Jh(s)}const tx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],nx="6";try{window.__reactRouterVersion=nx}catch{}const rx="startTransition",Ju=sh[rx];function sx(s){let{basename:a,children:i,future:c,window:d}=s,m=N.useRef();m.current==null&&(m.current=lh({window:d,v5Compat:!0}));let h=m.current,[p,f]=N.useState({action:h.action,location:h.location}),{v7_startTransition:j}=c||{},C=N.useCallback(v=>{j&&Ju?Ju(()=>f(v)):f(v)},[f,j]);return N.useLayoutEffect(()=>h.listen(C),[h,C]),N.useEffect(()=>Kh(c),[c]),N.createElement(Xh,{basename:a,children:i,location:p.location,navigationType:p.action,navigator:h,future:c})}const lx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ax=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dt=N.forwardRef(function(a,i){let{onClick:c,relative:d,reloadDocument:m,replace:h,state:p,target:f,to:j,preventScrollReset:C,viewTransition:v}=a,T=qh(a,tx),{basename:B}=N.useContext(un),M,R=!1;if(typeof j=="string"&&ax.test(j)&&(M=j,lx))try{let D=new URL(window.location.href),Y=j.startsWith("//")?new URL(D.protocol+j):new URL(j),oe=Ci(Y.pathname,B);Y.origin===D.origin&&oe!=null?j=oe+Y.search+Y.hash:R=!0}catch{}let P=_h(j,{relative:d}),A=ix(j,{replace:h,state:p,target:f,preventScrollReset:C,relative:d,viewTransition:v});function L(D){c&&c(D),D.defaultPrevented||A(D)}return N.createElement("a",wi({},T,{href:M||P,onClick:R||m?c:L,ref:i,target:f}))});var ed;(function(s){s.UseScrollRestoration="useScrollRestoration",s.UseSubmit="useSubmit",s.UseSubmitFetcher="useSubmitFetcher",s.UseFetcher="useFetcher",s.useViewTransitionState="useViewTransitionState"})(ed||(ed={}));var td;(function(s){s.UseFetcher="useFetcher",s.UseFetchers="useFetchers",s.UseScrollRestoration="useScrollRestoration"})(td||(td={}));function ix(s,a){let{target:i,replace:c,state:d,preventScrollReset:m,relative:h,viewTransition:p}=a===void 0?{}:a,f=Ti(),j=lr(),C=Sd(s,{relative:h});return N.useCallback(v=>{if(ex(v,i)){v.preventDefault();let T=c!==void 0?c:ul(j)===ul(C);f(s,{replace:T,state:d,preventScrollReset:m,relative:h,viewTransition:p})}},[j,f,C,c,d,i,s,m,h,p])}const Td=[{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:"/release",name:"release",component:"ReleaseManager",title:"Release Manager",description:"Comprehensive release management with Changesets"},{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"}];Td.filter(s=>!s.path.includes(":")&&s.path!=="/");function ox({isOpen:s,onClose:a,children:i}){return s?t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.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",cx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"})}),Mi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}):t.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:t.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"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),ux=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:[t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.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"})]}),dx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"})}),mx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:[t.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25z"}),t.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"})]}):t.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:t.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"})}),Ri=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.jsx("path",{d:"M8 5v14l11-7z"})}):t.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:t.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"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.jsx("path",{d:"M7 14l5-5 5 5z"})}):t.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:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18"})}),Md=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.jsx("path",{d:"M7 10l5 5 5-5z"})}):t.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:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3"})}),hx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}):t.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:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),nd=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}):t.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:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5L15.75 12l-7.5 7.5"})}),xx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"})}),qr=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.jsx("path",{d:"M5 9.2h3V19H5zM10.6 5h2.8v14h-2.8zm5.6 8H19v6h-2.8z"})}):t.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:t.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"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"})}),Rd=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5,variant:d="outline"})=>d==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:t.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"})}):t.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:t.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"})}),fx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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"})}),Oi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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"})}),zi=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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})=>t.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:t.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"})}),Ai=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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"})}),_d=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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"})}),Ft=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:s,width:a,height:i,children:[t.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"})," "]}):t.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:t.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"})}),Di=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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"})}),yl=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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"})}),Be=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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"})}),Id=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:[t.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"}),t.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})=>t.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:[t.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"}),t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 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})=>t.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:t.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"})}),rd=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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"})}),sd=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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"})}),vx=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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})=>t.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:t.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"})}),Ni=({className:s=ee,width:a=24,height:i=24,strokeWidth:c=1.5})=>t.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:t.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})=>t.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:t.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})=>t.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:t.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 t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(Id,{className:"w-6 h-6 text-gray-600"}),t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Dashboard Configuration"})]}),t.jsxs("div",{className:"flex space-x-3",children:[t.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:[t.jsx(Mi,{className:"w-5 h-5"}),t.jsx("span",{children:"Save"})]}),t.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:[t.jsx(Xr,{className:"w-5 h-5"}),t.jsx("span",{children:"Cancel"})]})]})]})}const Sx=()=>[{id:"general",label:"General",icon:t.jsx(Cn,{className:"w-6 h-6 text-primary-600"})},{id:"features",label:"Features",icon:t.jsx(dn,{className:"w-6 h-6 text-primary-600"})},{id:"branding",label:"Branding",icon:"đ¨"},{id:"monorepo",label:"Monorepo",icon:t.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"]}}),ld=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&&!ad(s.branding.primaryColor)&&a.push("Primary color must be a valid hex color"),s.branding?.secondaryColor&&!ad(s.branding.secondaryColor)&&a.push("Secondary color must be a valid hex color"),{isValid:a.length===0,errors:a}},ad=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 t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8 px-6",children:i.map(c=>t.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:[t.jsx("span",{children:c.icon}),t.jsx("span",{children:c.label})]},c.id))})})}function id({config:s,onConfigChange:a}){return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"General Settings"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Dashboard Title"}),t.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"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.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"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Types"}),t.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"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated list of package types"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Custom Fields"}),t.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"}),t.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 t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Feature Toggles"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(s.features||{}).map(([c,d])=>t.jsxs("label",{className:"flex items-center space-x-3",children:[t.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"}),t.jsx("span",{className:"text-sm font-medium text-gray-700 capitalize",children:Px(c)})]},c))}),t.jsxs("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Feature Descriptions"}),t.jsxs("div",{className:"text-xs text-blue-800 space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Health Checks:"})," Monitor package health and status"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"CI Integration:"})," Connect with CI/CD providers"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Dependency Graph:"})," Visualize package dependencies"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Publish Control:"})," Manage package publishing and versioning"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Search And Filter:"})," Advanced search and filtering capabilities"]}),t.jsxs("div",{children:[t.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 t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Branding & Appearance"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Logo URL"}),t.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"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"URL to your company logo"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Color"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.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"}),t.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"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Primary brand color for buttons and accents"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Color"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.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"}),t.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"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Secondary color for hover states and highlights"})]})]}),t.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Color Preview"}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:s.branding?.primaryColor||"#3B82F6"}}),t.jsx("span",{className:"text-sm text-gray-600",children:"Primary"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:s.branding?.secondaryColor||"#1E40AF"}}),t.jsx("span",{className:"text-sm text-gray-600",children:"Secondary"})]}),t.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 Rx({config:s,onConfigChange:a}){const i=(c,d)=>{a({monorepo:{...s.monorepo,[c]:d}})};return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Monorepo Configuration"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Structure Type"}),t.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:[t.jsx("option",{value:"standard",children:"Standard (apps/packages/libs)"}),t.jsx("option",{value:"custom",children:"Custom Structure"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Choose your monorepo directory structure"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Manager"}),t.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:[t.jsx("option",{value:"pnpm",children:"pnpm"}),t.jsx("option",{value:"npm",children:"npm"}),t.jsx("option",{value:"yarn",children:"Yarn"}),t.jsx("option",{value:"lerna",children:"Lerna"}),t.jsx("option",{value:"nx",children:"Nx"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Package manager used in your monorepo"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Directories"}),t.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"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Directories containing packages"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ignore Patterns"}),t.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"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Patterns to ignore when scanning"})]})]}),t.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Configuration Preview"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Structure:"}),t.jsx("span",{className:"ml-2 text-gray-600 capitalize",children:s.monorepo?.structure||"standard"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:s.monorepo?.packageManager||"pnpm"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Directories:"}),t.jsxs("span",{className:"ml-2 text-gray-600",children:[s.monorepo?.directories?.length||0," configured"]})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Ignore Patterns:"}),t.jsxs("span",{className:"ml-2 text-gray-600",children:[s.monorepo?.ignorePatterns?.length||0," patterns"]})]})]})]}),s.monorepo?.packageManager&&t.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsxs("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:[s.monorepo.packageManager.toUpperCase()," Configuration Tips"]}),t.jsxs("div",{className:"text-xs text-blue-800",children:[s.monorepo.packageManager==="pnpm"&&t.jsx("p",{children:"Make sure you have a pnpm-workspace.yaml file in your root directory."}),s.monorepo.packageManager==="npm"&&t.jsx("p",{children:'Configure workspaces in your package.json with the "workspaces" field.'}),s.monorepo.packageManager==="yarn"&&t.jsx("p",{children:"Ensure you have workspaces configured in your package.json."}),s.monorepo.packageManager==="lerna"&&t.jsx("p",{children:"Make sure you have a lerna.json configuration file in your root."}),s.monorepo.packageManager==="nx"&&t.jsx("p",{children:"Ensure you have an nx.json configuration file in your workspace root."})]})]})]})})}function _x({isOpen:s,onClose:a,onSave:i,currentConfig:c}){const[d,m]=N.useState(ld(c)),[h,p]=N.useState("general");N.useEffect(()=>{m(ld(c))},[c]);const f=()=>{const v=Ex(d);v.isValid||console.warn("Configuration validation errors:",v.errors),i(d),a()},j=v=>{m(T=>({...T,...v}))},C=()=>{const v={config:d,onConfigChange:j};switch(h){case"general":return t.jsx(id,{...v});case"features":return t.jsx(Tx,{...v});case"branding":return t.jsx(Mx,{...v});case"monorepo":return t.jsx(Rx,{...v});default:return t.jsx(id,{...v})}};return t.jsxs(ox,{isOpen:s,onClose:a,children:[t.jsx(kx,{onSave:f,onClose:a}),t.jsx(Lx,{activeTab:h,onTabChange:p}),t.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:C()})]})}function Ix({isOpen:s,onClose:a,children:i}){return s?t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:t.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 t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Setup Guide"}),t.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Configure your monorepo dashboard for optimal performance"})]}),t.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.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 t.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsxs("span",{className:"text-sm font-medium text-gray-700",children:["Step ",a+1," of ",i]}),t.jsxs("span",{className:"text-sm text-gray-500",children:[c," completed"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${d}%`}})})]})}function Ax({step:s,onStepComplete:a}){const i=()=>{switch(s.id){case"monorepo-structure":return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Quick Setup"}),t.jsx("p",{className:"text-blue-800 text-sm mb-3",children:"Choose your monorepo structure to get started quickly:"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[t.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[t.jsx("div",{className:"font-medium text-blue-900",children:"Standard Structure"}),t.jsx("div",{className:"text-sm text-blue-700",children:"apps/, packages/, libs/"})]}),t.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[t.jsx("div",{className:"font-medium text-blue-900",children:"Custom Structure"}),t.jsx("div",{className:"text-sm text-blue-700",children:"Define your own directories"})]})]})]}),t.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Manual Configuration"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Root Directory"}),t.jsx("input",{type:"text",defaultValue:"/path/to/monorepo",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Package Manager"}),t.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm",children:[t.jsx("option",{value:"pnpm",children:"pnpm"}),t.jsx("option",{value:"npm",children:"npm"}),t.jsx("option",{value:"yarn",children:"yarn"})]})]})]})]})]});case"package-scanning":return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-green-900 mb-2",children:"Automatic Discovery"}),t.jsx("p",{className:"text-green-800 text-sm mb-3",children:"We'll scan your monorepo for packages automatically:"}),t.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"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(nr,{className:"w-4 h-4 mr-2"}),"Scans for package.json files"]}),t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(nr,{className:"w-4 h-4 mr-2"}),"Analyzes dependencies and relationships"]}),t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(nr,{className:"w-4 h-4 mr-2"}),"Detects build configurations"]})]})]});case"ci-integration":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-purple-900 mb-2",children:"Connect CI/CD"}),t.jsx("p",{className:"text-purple-800 text-sm mb-3",children:"Choose your CI/CD provider to monitor builds and deployments:"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[t.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"GitHub Actions"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitHub"})]}),t.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"GitLab CI"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitLab"})]}),t.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"Jenkins"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with Jenkins"})]}),t.jsxs("button",{onClick:()=>a(s.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"Skip for now"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Configure later"})]})]})]})});case"health-checks":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-orange-900 mb-2",children:"Health Monitoring"}),t.jsx("p",{className:"text-orange-800 text-sm mb-3",children:"Configure how we monitor your package health:"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-orange-900",children:"Monitor build status"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-orange-900",children:"Track test coverage"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-orange-900",children:"Dependency vulnerability scanning"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-orange-900",children:"Performance monitoring"})]})]}),t.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 t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-indigo-50 border border-indigo-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-indigo-900 mb-2",children:"Notification Preferences"}),t.jsx("p",{className:"text-indigo-800 text-sm mb-3",children:"Choose how you want to be notified about important events:"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Build failures"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Security vulnerabilities"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Dependency updates"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Performance degradation"})]})]}),t.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 t.jsx("div",{className:"text-center py-8",children:t.jsx("p",{className:"text-gray-500",children:"Step content not found"})})}};return t.jsxs("div",{className:"p-6 overflow-y-auto max-h-[50vh]",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:s.title}),t.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:p}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-gray-200",children:[t.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"}),t.jsx("div",{className:"flex space-x-2",children:Array.from({length:a},(f,j)=>t.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${j<=s?"bg-blue-600":"bg-gray-300"}`},j))}),p?t.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:[t.jsx(Mi,{className:"w-4 h-4"}),t.jsx("span",{children:"Complete Setup"})]}):t.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 Fx=()=>[{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),Vx=(s,a)=>s.map(i=>i.id===a?{...i,completed:!0}:i);function Hx({isOpen:s,onClose:a,onComplete:i}){const[c,d]=N.useState(0),[m,h]=N.useState(Fx()),p=P=>{const A=Vx(m,P);h(A),A[c].completed&&c<m.length-1&&d(D=>D+1)},f=()=>{c<m.length-1&&d(P=>P+1)},j=()=>{c>0&&d(P=>P-1)},C=()=>{Ux(m)&&(i(),a())},v=Bx(m,c),T=$x(m,c),B=c>0,M=c===m.length-1,R=m[c];return t.jsxs(Ix,{isOpen:s,onClose:a,children:[t.jsx(Ox,{onClose:a}),t.jsx(zx,{progress:v}),t.jsx(Ax,{step:R,onStepComplete:p}),t.jsx(Dx,{currentStep:c,totalSteps:m.length,canGoNext:T,canGoPrevious:B,onNext:f,onPrevious:j,onComplete:C,isLastStep:M})]})}function Wx({config:s,onShowSetupGuide:a,onShowConfig:i,onRefresh:c}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-3xl",children:s.title}),t.jsx("p",{className:"text-body mt-2",children:s.description}),t.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"})]}),t.jsxs("div",{className:"flex space-x-3",children:[t.jsxs("button",{onClick:c,className:"btn-primary flex items-center space-x-2",children:[t.jsx(cn,{className:"w-5 h-5"}),t.jsx("span",{children:"Refresh"})]}),t.jsxs("button",{onClick:i,className:"hidden btn-ghost flex items-center space-x-2",children:[t.jsx(Id,{className:"w-5 h-5"}),t.jsx("span",{children:"Configure"})]})]})]})}function Yx({stats:s}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:"card p-6 bg-gray-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(it,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Total Packages"}),t.jsx("p",{className:"text-heading text-2xl",children:s.total})]})]})}),t.jsx("div",{className:"card p-6 bg-green-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-secondary-100 rounded-lg",children:t.jsx(dn,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Applications"}),t.jsx("p",{className:"text-heading text-2xl",children:s.apps})]})]})}),t.jsx("div",{className:"card p-6 bg-yellow-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-accent-100 rounded-lg",children:t.jsx(pl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Libraries"}),t.jsx("p",{className:"text-heading text-2xl",children:s.libs})]})]})}),t.jsx("div",{className:"card p-6 bg-blue-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(gl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Dependencies"}),t.jsx("p",{className:"text-heading text-2xl",children:s.totalDependencies})]})]})})]})}function Qx(){return t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Dt,{to:"/dependencies",className:"p-4 border border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:t.jsx(qr,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"Dependency Graph"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Visualize package relationships"})]})]})}),t.jsx(Dt,{to:"/health",className:"p-4 border border-gray-200 rounded-lg hover:border-green-300 hover:bg-green-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(Ii,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"Health Check"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Monitor package health"})]})]})}),t.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:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx("span",{className:"text-2xl",children:"đ§Ē"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"CI/CD Status"}),t.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 t.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Di,{className:"w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"}),t.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"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(yl,{className:"w-5 h-5 text-gray-400"}),t.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:[t.jsx("option",{value:"all",children:"All Types"}),i.map(m=>t.jsx("option",{value:m,className:"capitalize",children:m},m))]})]})]})}function Kx({packages:s,getTypeIcon:a,getStatusColor:i}){return t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(c=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:a(c.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:c.name}),t.jsx("div",{className:"text-sm text-gray-500",children:c.path})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${i(c.type)}`,children:c.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.version}),t.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}),t.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 max-w-xs truncate",children:c.description||"No description"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.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 p=`HTTP error ${d.status}`;if(h)try{const f=JSON.parse(h);p=f.error||f.message||p}catch{p=h||p}throw new Error(p)}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,qx=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)}),Jx=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 t.jsx(dn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(pl,{className:"w-6 h-6 text-primary-600"});case"tool":return"đ§";default:return t.jsx(it,{className:"w-6 h-6 text-primary-600"})}};function Fi({message:s="Loading packages..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function Od({error:s,onRetry:a}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Be,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&t.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 t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[t.jsx("div",{className:"bg-gray-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(it,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.total})]})]})}),t.jsx("div",{className:"bg-green-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(Pt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Healthy"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:s.healthy})]})]})}),t.jsx("div",{className:"bg-yellow-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-yellow-100 rounded-lg",children:t.jsx(Be,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Warnings"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:s.warnings})]})]})}),t.jsx("div",{className:"bg-red-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:t.jsx(Lt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Errors"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:s.errors})]})]})})]})}function sf({filters:s,onFiltersChange:a,availableTypes:i,availableStatuses:c}){return t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.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:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Di,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),t.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"})]}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(yl,{className:"h-5 w-5 text-gray-400"}),t.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:[t.jsx("option",{value:"all",children:"All Types"}),i.map(d=>t.jsx("option",{value:d,children:d.charAt(0).toUpperCase()+d.slice(1)},d))]})]}),t.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:[t.jsx("option",{value:"all",children:"All Status"}),c.map(d=>t.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"}},Ad=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"}},Bi=s=>new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Dd=s=>s.startsWith("v")?s:`v${s}`,Fd=s=>{switch(s){case"app":return t.jsx(dn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(pl,{className:"w-6 h-6 text-primary-600"});case"tool":return"đ§";case"service":return"đ";default:return t.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"?t.jsx(_i,{className:"w-4 h-4"}):t.jsx(Md,{className:"w-4 h-4"});return t.jsx("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.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:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),d("name")]})}),t.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:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Version"}),d("version")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.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:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),d("dependencies")]})}),t.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:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Last Updated"}),d("lastUpdated")]})}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Maintainers"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(m=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:Fd(m.type)}),t.jsxs("div",{children:[t.jsx(Dt,{to:`/packages/${encodeURIComponent(m.name)}`,className:"text-sm font-medium text-blue-600 hover:text-blue-500",children:m.name}),t.jsx("div",{className:"text-sm text-gray-500",children:m.description})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-900",children:Dd(m.version)})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Ad(m.type)}`,children:m.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${zd(m.status)}`,children:m.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(m.dependencies).length>0&&t.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`]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Bi(m.lastUpdated)}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex -space-x-1",children:[m.maintainers.slice(0,3).map((h,p)=>t.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&&t.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 t.jsx(Pt,{className:"h-5 w-5 text-green-500"});case"warning":return t.jsx(Be,{className:"h-5 w-5 text-yellow-500"});case"error":return t.jsx(Be,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Ft,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-6",children:t.jsxs(Dt,{to:"/packages",className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-700",children:[t.jsx(hx,{className:"mr-2 h-4 w-4"}),"Back to Packages"]})}),t.jsxs("div",{className:"bg-white rounded-lg shadow border p-6 mb-6",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex items-start space-x-4",children:[t.jsx("div",{className:"text-4xl",children:Fd(s.type)}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s.name}),t.jsx("p",{className:"text-gray-600 mt-1",children:s.description}),t.jsxs("div",{className:"flex items-center space-x-4 mt-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Version:"}),t.jsx("span",{className:"text-sm font-mono bg-gray-100 px-2 py-1 rounded",children:Dd(s.version)})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Ad(s.type)}`,children:s.type}),t.jsxs("div",{className:"flex items-center space-x-1",children:[a(s.status),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${zd(s.status)}`,children:s.status})]})]})]})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"Health Score"}),t.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:[s.packageHealth?.packageOverallScore??"","%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mt-6 pt-6 border-t border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(_d,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Last Updated"}),t.jsx("div",{className:"text-sm font-medium",children:Bi(s.lastUpdated)})]})]}),t.jsxs("div",{className:"hidden flex items-center space-x-2",children:[t.jsx(xx,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Maintainers"}),t.jsx("div",{className:"text-sm font-medium",children:s.maintainers.length})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Ai,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"License"}),t.jsx("div",{className:"text-sm font-medium",children:s.license})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"h-4 w-4 text-gray-400",children:t.jsx(gl,{className:"h-4 w-4 text-gray-400"})}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Repository"}),t.jsx("div",{className:"text-sm font-medium truncate",children:t.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&&t.jsxs("div",{className:"mt-4",children:[t.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:s.tags.map(i=>t.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:zi},{id:"commits",label:"Recent Commits",icon:Ft},{id:"health",label:"Health Metrics",icon:Ii},{id:"config",label:"Configuration",icon:Cn}];return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8",children:i.map(c=>{const d=c.icon;return t.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:[t.jsx(d,{className:"w-4 h-4"}),t.jsx("span",{children:c.label})]},c.id)})})})}function pf({packageData:s}){if(!s.dependenciesInfo.length)return t.jsx("p",{className:"py-6 text-gray-600",children:"No dependency found."});const a=(i,c)=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:c}),t.jsx("div",{className:"bg-white border rounded-lg overflow-hidden",children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Latest"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:i.map(d=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("div",{className:"text-sm font-medium text-gray-900",children:d.name})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:d.version})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:d.latest})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${df(d.status)}`,children:d.status.replace("-"," ")})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm",children:d.status!=="up-to-date"&&t.jsxs("button",{className:"text-blue-600 hover:text-blue-500 flex items-center space-x-1",children:[t.jsx(_i,{className:"w-4 h-4"}),t.jsx("span",{children:"Update"})]})})]},d.name))})]})})]});return t.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"),t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Dependency Summary"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Total Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.type=="dependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Dev Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.type=="devDependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Peer Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.type=="peerDependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Outdated:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.status==="outdated").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Major Updates:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:s.dependenciesInfo.filter(i=>i.status==="major-update").length})]})]})]})]})}function gf({packageData:s}){return t.jsxs("div",{className:"py-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Recent Commits"}),t.jsx("div",{className:"space-y-4",children:s.commits.map(a=>t.jsx("div",{className:"bg-white border rounded-lg p-4 hover:shadow-md transition-shadow",children:t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mf(a.type)}`,children:a.type}),t.jsx("span",{className:"text-sm font-mono text-gray-500",children:a.hash})]}),t.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:a.message}),t.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[t.jsxs("span",{children:["by ",a.author]}),t.jsx("span",{children:Bi(a.date)})]})]}),t.jsx("div",{className:"hidden ml-4",children:t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm",children:"View Diff"})})]})},a.hash))}),s.commits.length===0&&t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"đ"}),t.jsx("p",{className:"text-gray-500",children:"No recent commits found"})]}),t.jsxs("div",{className:"mt-6 bg-gray-50 border border-gray-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Commit Summary"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Features:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="feat").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Fixes:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="fix").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Chores:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="chore").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Breaking:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:s.commits.filter(a=>a.type==="breaking").length})]})]})]})]})}function yf({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 t.jsx(Pt,{className:"w-5 h-5 text-green-500"});case"failed":return t.jsx(Lt,{className:"w-5 h-5 text-red-500"});case"running":return t.jsx("div",{className:"w-5 h-5 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"});default:return t.jsx(Be,{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?t.jsxs("div",{className:"py-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Health Score"}),t.jsxs("div",{className:`text-3xl font-bold ${a(s.packageHealth.packageOverallScore)}`,children:[s.packageHealth.packageOverallScore,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3 mb-4",children:t.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}%`}})}),t.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"]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Build Status"}),i(s.packageHealth.packageBuildStatus)]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(s.packageHealth.packageBuildStatus)}`,children:s.packageHealth.packageBuildStatus}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Logs"})]})]}),t.jsxs("div",{className:"hidden bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Test Coverage"}),t.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,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.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}%`}})})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Lint Status"}),s.packageHealth.packageLintStatus==="pass"&&t.jsx(Pt,{className:"w-5 h-5 text-green-500"}),s.packageHealth.packageLintStatus==="fail"&&t.jsx(Lt,{className:"w-5 h-5 text-red-500"}),s.packageHealth.packageLintStatus==="warning"&&t.jsx(Be,{className:"w-5 h-5 text-yellow-500"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${d(s.packageHealth.packageLintStatus)}`,children:s.packageHealth.packageLintStatus}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Issues"})]})]})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsx("h4",{className:"text-lg font-medium text-gray-900 mb-4",children:"Detailed Metrics"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Dependencies"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Total Dependencies:"}),t.jsx("span",{className:"font-medium",children:Object.keys(s.dependenciesInfo).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Outdated:"}),t.jsx("span",{className:"font-medium text-yellow-600",children:s.dependenciesInfo.filter(m=>m.status==="outdated").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Major Updates Available:"}),t.jsx("span",{className:"font-medium text-red-600",children:s.dependenciesInfo.filter(m=>m.status==="major-update").length})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Code Quality"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Build Status:"}),t.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})]}),t.jsxs("div",{className:"hidden flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Test Coverage:"}),t.jsxs("span",{className:"font-medium",children:[s.packageHealth.packageTestCoverage,"%"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Lint Status:"}),t.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})]})]})]})]})]})]}):t.jsx("p",{className:"py-6 text-gray-600",children:"No health data available."})}function vf({packageData:s}){const[a,i]=N.useState(!1),[c,d]=N.useState(""),[m,h]=N.useState(!1),[p,f]=N.useState(""),[j,C]=N.useState(null),[v,T]=N.useState(!1),B=()=>{const D={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(D,null,2)};N.useState(()=>{d(B())});const M=()=>{i(!0),d(B()),f("")},R=()=>{i(!1),d(B()),f("")},P=async()=>{if(!c.trim()){f("Configuration cannot be empty");return}h(!0),f("");try{const D=await xt.updatePackageConfiguration(s.name,c,s.path);if(D.success)f("Configuration updated successfully!"),i(!1);else throw new Error(D.message||"Update failed")}catch(D){console.error("Error saving configuration:",D),f(D instanceof Error?D.message:"Failed to save configuration. Please try again.")}finally{h(!1)}},A=D=>{d(D.target.value),p&&f("")},L=async(D,Y,oe)=>{try{await navigator.clipboard.writeText(D),Y==="config"?(T(!0),setTimeout(()=>T(!1),4e3)):Y==="script"&&oe&&(C(oe),setTimeout(()=>C(null),4e3))}catch(ve){console.error("Failed to copy to clipboard:",ve);const Z=document.createElement("textarea");Z.value=D,document.body.appendChild(Z),Z.select();try{document.execCommand("copy"),Y==="config"?(T(!0),setTimeout(()=>T(!1),2e3)):Y==="script"&&oe&&(C(oe),setTimeout(()=>C(null),2e3))}catch(xe){console.error("Fallback copy failed:",xe),Y==="config"&&f("Failed to copy to clipboard")}document.body.removeChild(Z)}};return t.jsxs("div",{className:"py-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[t.jsx(zi,{className:"w-5 h-5 text-gray-600"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Scripts"})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(s.scripts).map(([D,Y])=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:D}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>L(Y,"script",D),className:`text-sm flex items-center space-x-1 ${j===D?"text-green-600":"text-gray-600 hover:text-gray-700"}`,title:"Copy command to clipboard",children:j===D?t.jsxs(t.Fragment,{children:[t.jsx(sd,{className:"w-4 h-4"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(rd,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"Run"})]})]}),t.jsx("code",{className:"text-xs text-gray-600 bg-gray-100 p-2 rounded block overflow-x-auto",children:Y})]},D))}),Object.keys(s.scripts).length===0&&t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"đ"}),t.jsx("p",{className:"text-gray-500",children:"No scripts configured"})]})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Configuration"}),!a&&t.jsx("div",{className:"text-sm text-gray-500",children:"Read-only preview"})]}),a?t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg",children:t.jsx("textarea",{value:c,onChange:A,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"})}),p&&t.jsx("div",{className:`p-3 rounded-lg text-sm ${p.includes("successfully")?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:p}),t.jsxs("div",{className:"flex space-x-3",children:[t.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?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Saving..."})]}):t.jsx("span",{children:"Save Changes"})}),t.jsx("button",{onClick:R,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"})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:t.jsx("pre",{className:"text-sm",children:c})}),t.jsxs("div",{className:"mt-4 flex space-x-3",children:[t.jsx("button",{onClick:M,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 text-sm",children:"Edit Configuration"}),t.jsx("button",{onClick:()=>L(a?c:B(),"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:v?t.jsxs(t.Fragment,{children:[t.jsx(sd,{className:"w-4 h-4 text-green-600"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(rd,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})})]})]})]})]})}const od={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]=N.useState(),[i,c]=N.useState(""),[d,m]=N.useState("all"),[h,p]=N.useState(od),[f,j]=N.useState(!1),[C,v]=N.useState(!1),[T,B]=N.useState(!0),[M,R]=N.useState(null),[P,A]=N.useState(!1);N.useEffect(()=>{(async()=>{try{B(!0);const xe=await xt.getPackages();a(xe),R(null)}catch(xe){R("Failed to fetch packages"),console.error("Error fetching packages:",xe)}finally{B(!1)}})()},[]),N.useEffect(()=>{const Z=localStorage.getItem("monodog-config");Z&&p({...od,...JSON.parse(Z)})},[]);const L=Z=>{p(Z),localStorage.setItem("monodog-config",JSON.stringify(Z))},D=async()=>{try{A(!0),R(null),B(!0);try{const Z=await xt.refreshPackages();a(Z),R(null)}catch(Z){R("Failed to fetch package data"),console.error("Error fetching package data:",Z)}finally{B(!1)}}catch(Z){R("Failed to refresh package data"),console.error("Error refreshing package data:",Z)}finally{A(!1)}};if(T&&!s)return t.jsx(Fi,{});if(M)return t.jsx(Od,{error:M,onRetry:D});const Y=ef(s??[],i,d),oe=Jx(s??[]),ve=qx(s??[]);return t.jsxs("div",{className:"p-6 space-y-6",children:[P&&s&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing packages..."})]})}),t.jsx(Wx,{config:h,onShowSetupGuide:()=>v(!0),onShowConfig:()=>j(!0),onRefresh:D}),t.jsx(Yx,{stats:ve}),t.jsx(Qx,{}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx(Gx,{searchTerm:i,selectedType:d,packageTypes:oe,onSearchChange:c,onTypeChange:m}),t.jsx(Kx,{packages:Y,getTypeIcon:nf,getStatusColor:tf})]}),t.jsx(_x,{isOpen:f,onClose:()=>j(!1),onSave:L,currentConfig:h}),t.jsx(Hx,{isOpen:C,onClose:()=>v(!1),onComplete:()=>v(!1)})]})}function wf(){const[s,a]=N.useState([]),[i,c]=N.useState(!0),[d,m]=N.useState(null),[h,p]=N.useState({search:"",type:"all",status:"all"}),[f,j]=N.useState({field:"name",order:"asc"});N.useEffect(()=>{(async()=>{try{c(!0);const A=await xt.getPackages();a(A),m(null)}catch(A){m("Failed to fetch packages"),console.error("Error fetching packages:",A)}finally{c(!1)}})()},[]);const C=()=>{window.location.reload()},v=cf(s,h),T=uf(v,f),B=lf(s),M=af(s),R=of(s);return i?t.jsx(Fi,{}):d?t.jsx(Od,{error:d,onRetry:C}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-2xl",children:"Packages Overview"}),t.jsx("p",{className:"text-body mt-1",children:"Manage and monitor all packages in your monorepo"})]})}),t.jsx(rf,{stats:B}),t.jsx(sf,{filters:h,onFiltersChange:p,availableTypes:M,availableStatuses:R}),t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[t.jsxs("span",{children:["Showing ",T.length," of ",s.length," packages",h.search&&` matching "${h.search}"`]}),t.jsxs("span",{children:[h.type!=="all"&&`Filtered by type: ${h.type}`,h.status!=="all"&&` âĸ status: ${h.status}`]})]}),t.jsx(hf,{packages:T,sorting:f,onSortChange:j}),T.length===0&&!i&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-neutral-400 text-6xl mb-4 flex justify-center",children:t.jsx(it,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-heading text-lg mb-2",children:"No packages found"}),t.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")&&t.jsx("button",{onClick:()=>p({search:"",type:"all",status:"all"}),className:"text-primary-600 hover:text-primary-500",children:"Clear Filters"})]})]})}function Nf(){const{name:s}=Oh(),[a,i]=N.useState(null),[c,d]=N.useState("overview");if(N.useEffect(()=>{(async()=>{try{const p=await xt.getPackage(s??"");i(p)}catch(p){console.error("Error fetching packages:",p)}})()},[s]),!a)return t.jsx(Fi,{message:"Loading package details..."});const m=()=>{switch(c){case"overview":return t.jsx("div",{className:"py-6",children:t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Package Overview"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("p",{className:"text-gray-600 mb-4",children:a.description}),t.jsx("h4",{className:"hidden text-sm font-medium text-gray-700 mb-2",children:"Maintainers"}),t.jsx("div",{className:"space-y-1",children:Object.keys(a.maintainers).map(h=>t.jsx("div",{className:"text-sm text-gray-600",children:h},h))})]}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Quick Stats"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Dependencies:"}),t.jsx("span",{className:"font-medium",children:a.dependenciesInfo.filter(h=>h.type=="dependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Dev Dependencies:"}),t.jsx("span",{className:"font-medium",children:a.dependenciesInfo.filter(h=>h.type=="devDependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Peer Dependencies:"}),t.jsx("span",{className:"font-medium",children:a.dependenciesInfo.filter(h=>h.type=="peerDependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Scripts:"}),t.jsx("span",{className:"font-medium",children:Object.keys(a.scripts).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Recent Commits:"}),t.jsx("span",{className:"font-medium",children:a.commits?.length})]})]})]})]})]})});case"dependencies":return t.jsx(pf,{packageData:a});case"commits":return t.jsx(gf,{packageData:a});case"health":return t.jsx(yf,{packageData:a});case"config":return t.jsx(vf,{packageData:a});default:return null}};return t.jsxs("div",{className:"space-y-6",children:[t.jsx(xf,{packageData:a}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsx(ff,{activeTab:c,onTabChange:d}),t.jsx("div",{className:"px-6",children:m()})]})]})}function bf({message:s="Loading dependency graph..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function kf({error:s,onRetry:a}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Be,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&t.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 t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Dependency Graph"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Visualize package dependencies and relationships"})]}),s&&t.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:[t.jsx(cn,{className:`w-5 h-5 ${a?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Cf({viewMode:s,onViewModeChange:a,layout:i,onLayoutChange:c,showLegend:d,onToggleLegend:m,zoomLevel:h,onZoomChange:p}){return t.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"View:"}),t.jsxs("div",{className:"flex rounded-lg border border-gray-300 overflow-hidden",children:[t.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:[t.jsx(vx,{className:"w-4 h-4"}),t.jsx("span",{children:"Graph"})]}),t.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:[t.jsx(yx,{className:"w-4 h-4"}),t.jsx("span",{children:"List"})]})]})]}),s==="graph"&&t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Layout:"}),t.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:[t.jsx("option",{value:"hierarchical",children:"Hierarchical"}),t.jsx("option",{value:"circular",children:"Circular"}),t.jsx("option",{value:"force",children:"Force-Directed"})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Zoom:"}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("button",{onClick:()=>p(Math.max(.5,h-.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:h<=.5,children:t.jsx(bx,{className:"w-4 h-4"})}),t.jsxs("span",{className:"text-sm text-gray-600 min-w-[3rem] text-center",children:[Math.round(h*100),"%"]}),t.jsx("button",{onClick:()=>p(Math.min(2,h+.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:h>=2,children:t.jsx(Nx,{className:"w-4 h-4"})})]})]})]}),t.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:[t.jsx(nr,{className:"w-4 h-4"}),t.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"}},cd=(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,j)=>f+Object.keys(j.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,p=Ud(s);return{totalPackages:a,totalDependencies:i,circularDependencies:p.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 p=m;for(const f of Object.keys(h.dependencies)){const j=c(f,m+1);p=Math.max(p,j)}return p};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),j=d.slice(f).concat(h);return a.push({cycle:j,severity:j.length>5?"high":j.length>3?"medium":"low",impact:`Circular dependency involving ${j.length} packages`}),!0}if(i.has(h))return!1;i.add(h),c.add(h),d.push(h);const p=s.find(f=>f.name===h);if(p){for(const f of Object.keys(p.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 p={error:0,warning:1,healthy:2};m=p[c.status]||3,h=p[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 Rf(s,i,c);case"force":return _f(s,i,c);default:return s}},Mf=(s,a,i)=>{const c=[],d=new Set,m=(h,p)=>{if(d.has(h))return;d.add(h),c[p]||(c[p]=[]),c[p].push(h);const f=s.find(j=>j.name===h);f&&f.dependents.forEach(j=>m(j,p+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 p=c.findIndex(C=>C.includes(h.name)),f=c[p]?.indexOf(h.name)||0,j=c[p]?.length||1;return{...h,x:a/(c.length+1)*(p+1)-50,y:i/(j+1)*(f+1)-25}})},Rf=(s,a,i)=>{const c=a/2,d=i/2,m=Math.min(a,i)/3;return s.map((h,p)=>{const f=2*Math.PI*p/s.length;return{...h,x:c+m*Math.cos(f)-50,y:d+m*Math.sin(f)-25}})},_f=(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,p=0;c.forEach(f=>{if(f.name!==m.name){const j=m.x-f.x,C=m.y-f.y,v=Math.sqrt(j*j+C*C)||1,T=1e3/(v*v);h+=j/v*T,p+=C/v*T}}),Object.keys(m.dependencies).forEach(f=>{const j=c.find(C=>C.name===f);if(j){const C=j.x-m.x,v=j.y-m.y,T=Math.sqrt(C*C+v*v)||1,B=T*.01;h+=C/T*B,p+=v/T*B}}),m.x+=h*.1,m.y+=p*.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},If=s=>{switch(s){case"app":return t.jsx(dn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(pl,{className:"w-6 h-6 text-primary-600"});case"tool":return"đ§";default:return t.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 Af({packages:s,selectedPackage:a,hoveredPackage:i,onPackageSelect:c,onPackageHover:d,layout:m}){return t.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm border border-gray-200 p-6 min-h-[600px]",children:[t.jsxs("svg",{className:"w-full h-full absolute inset-0",viewBox:"0 0 800 600",children:[s.map(h=>Object.keys(h.dependencies).map(p=>{const f=s.find(C=>C.name===p);if(!f)return null;const j=i===h.name||i===p||a===h.name||a===p;return t.jsxs("g",{children:[t.jsx("defs",{children:t.jsx("marker",{id:`arrow-${h.name}-${p}`,markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:t.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:j?"#3B82F6":"#6B7280"})})}),t.jsx("line",{x1:f.x+50,y1:f.y+25,x2:h.x,y2:h.y+25,stroke:j?"#3B82F6":"#6B7280",strokeWidth:j?"3":"2",markerEnd:`url(#arrow-${h.name}-${p})`,className:"transition-all duration-200",style:{opacity:j?1:.6}})]},`${h.name}-${p}`)})),s.map(h=>{const p=a===h.name,f=i===h.name,j=a&&(Object.keys(h.dependencies).includes(a)||Object.keys(h.dependents).includes(a));return t.jsxs("g",{children:[t.jsx("rect",{x:h.x,y:h.y,width:"100",height:"50",rx:"8",fill:"white",stroke:p?"#3B82F6":j?"#10B981":f?"#6B7280":"#E5E7EB",strokeWidth:p?"3":"2",className:"cursor-pointer transition-all duration-200",style:{filter:f||p||j?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"},onMouseEnter:()=>d(h.name),onMouseLeave:()=>d(null),onClick:()=>c(p?null:h.name)}),t.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)}),t.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]}),t.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"}),t.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&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:t.jsx(gl,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No dependencies found"}),t.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")},p=f=>c!==f?null:d==="asc"?t.jsx(_i,{className:"w-4 h-4"}):t.jsx(Md,{className:"w-4 h-4"});return t.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200",children:[t.jsxs("div",{className:"p-6 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Dependencies"}),t.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Click on a view details to explore its dependencies, commits, configuration and health"})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.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:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),p("name")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.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:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),p("dependencies")]})}),t.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:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependents"}),p("dependents")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(f=>t.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer transition-colors ${a===f.name?"bg-blue-50":""}`,onClick:()=>i(f.name),children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:If(f.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:f.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:["v",f.version]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${$d(f.type)}`,children:f.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Bd(f.status)}`,children:f.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[Object.keys(f.dependencies).length,Object.keys(f.dependencies).length>0&&t.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`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[f.dependents.length,f.dependents.length>0&&t.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`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:t.jsx(Dt,{to:`/packages/${encodeURIComponent(f.name)}`,className:"text-blue-600 hover:text-blue-500",onClick:j=>j.stopPropagation(),children:"View Details"})})]},f.name))})]})}),s.length===0&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2 flex justify-center",children:t.jsx(it,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"No packages found"})]})]})}function Ff({package:s,packages:a,onClose:i}){return s?t.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:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:s.name}),t.jsx("button",{onClick:i,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Xr,{className:"w-5 h-5"})})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${$d(s.type)}`,children:s.type}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Bd(s.status)}`,children:s.status})]}),t.jsxs("div",{className:"text-sm text-gray-600",children:["Version: ",t.jsx("span",{className:"font-mono",children:s.version})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependencies"}),t.jsxs("span",{className:"text-xs text-gray-500",children:["(",Object.keys(s.dependencies).length,")"]})]}),Object.keys(s.dependencies).length>0?t.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?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:d.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:d.version}),t.jsx("span",{className:`${cd(c,a)}`,children:d.status==="healthy"?"â":d.status==="warning"?"â ":"â"})]})]},c):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[c," (not found)"]},c)})}):t.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependencies"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependents"}),t.jsxs("span",{className:"text-xs text-gray-500",children:["(",s.dependents.length,")"]})]}),s.dependents.length>0?t.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?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:d.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:d.version}),t.jsx("span",{className:`${cd(c,a)}`,children:d.status==="healthy"?"â":d.status==="warning"?"â ":"â"})]})]},c):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[c," (not found)"]},c)})}):t.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependents"})]}),t.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Impact Analysis"}),t.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependencies:"}),t.jsx("span",{className:"font-medium",children:Object.keys(s.dependencies).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependents:"}),t.jsx("span",{className:"font-medium",children:s.dependents.length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Risk level:"}),t.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"})]})]})]}),t.jsx("div",{className:"pt-2 border-t border-gray-200",children:t.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 t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[t.jsx("div",{className:"bg-gray-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(it,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.totalPackages})]})]})}),t.jsx("div",{className:"bg-blue-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(gl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Dependencies"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.totalDependencies})]})]})}),t.jsx("div",{className:`${s.circularDependencies>0?"bg-red-100":"bg-green-100"} p-4 rounded-lg shadow border`,children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:`p-2 rounded-lg ${s.circularDependencies>0?"bg-red-100":"bg-green-100"}`,children:t.jsx(Be,{className:`w-6 h-6 ${s.circularDependencies>0?"text-red-600":"text-primary-600"}`})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Circular Deps"}),t.jsx("p",{className:`text-2xl font-semibold ${s.circularDependencies>0?"text-red-600":"text-gray-600"}`,children:s.circularDependencies})]})]})}),t.jsx("div",{className:"bg-purple-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx(qr,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Max Depth"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.maxDepth})]})]})}),t.jsxs("div",{className:"md:col-span-4 bg-white p-4 rounded-lg shadow border",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Dependency Analysis"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-blue-600",children:s.leafPackages}),t.jsx("div",{className:"text-sm text-gray-600",children:"Leaf Packages"}),t.jsx("div",{className:"text-xs text-gray-500",children:"No dependencies"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-green-600",children:s.rootPackages}),t.jsx("div",{className:"text-sm text-gray-600",children:"Root Packages"}),t.jsx("div",{className:"text-xs text-gray-500",children:"No dependents"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-purple-600",children:s.avgDependencies}),t.jsx("div",{className:"text-sm text-gray-600",children:"Avg Dependencies"}),t.jsx("div",{className:"text-xs text-gray-500",children:"Per package"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-orange-600",children:a.filter(i=>i.status==="healthy").length}),t.jsx("div",{className:"text-sm text-gray-600",children:"Healthy Packages"}),t.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?t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(Be,{className:"w-6 h-6 text-green-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Dependency cycle analysis"})]})]}),t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-green-400 text-4xl mb-2"}),t.jsx("h4",{className:"text-green-800 font-medium mb-1",children:"No Circular Dependencies!"}),t.jsx("p",{className:"text-green-700 text-sm",children:"Your dependency graph is clean and free of circular references."})]})]}):t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[t.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:t.jsx(Be,{className:"w-6 h-6 text-red-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),t.jsxs("p",{className:"text-sm text-gray-600",children:["Found ",s.length," circular dependency cycle",s.length>1?"s":""]})]})]}),t.jsx("div",{className:"space-y-4",children:s.map((m,h)=>t.jsxs("div",{className:`border rounded-lg p-4 ${c(m.severity)}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg",children:d(m.severity)}),t.jsxs("span",{className:"text-sm font-medium capitalize",children:[m.severity," Severity"]})]}),t.jsxs("span",{className:"text-xs opacity-75",children:[m.cycle.length," packages affected"]})]}),t.jsx("div",{className:"mb-3",children:t.jsx("p",{className:"text-sm mb-2",children:m.impact})}),t.jsx("div",{className:"bg-white bg-opacity-50 rounded-lg p-3",children:t.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[m.cycle.map((p,f)=>t.jsxs(N.Fragment,{children:[t.jsx("button",{onClick:()=>i(p),className:"px-3 py-1 bg-white rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors border shadow-sm",children:p}),f<m.cycle.length-1&&t.jsx(nd,{className:"w-4 h-4 text-gray-400"})]},`${p}-${f}`)),m.cycle.length>1&&t.jsxs(t.Fragment,{children:[t.jsx(nd,{className:"w-4 h-4 text-gray-400"}),t.jsxs("span",{className:"text-sm text-gray-500 italic",children:["(cycles back to ",m.cycle[0],")"]})]})]})}),t.jsxs("div",{className:"mt-3 pt-3 border-t border-current border-opacity-20",children:[t.jsx("h5",{className:"text-xs font-medium mb-1",children:"Recommendation:"}),t.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))}),t.jsx("div",{className:"mt-6 pt-4 border-t border-gray-200",children:t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-red-600",children:s.filter(m=>m.severity==="high").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"High Severity"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-yellow-600",children:s.filter(m=>m.severity==="medium").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Medium Severity"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-blue-600",children:s.filter(m=>m.severity==="low").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Low Severity"})]})]})})]})}function Uf({show:s}){return s?t.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Legend"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Package Types"}),t.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-blue-500 rounded"}),t.jsx("span",{children:"App"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-purple-500 rounded"}),t.jsx("span",{children:"Library"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-orange-500 rounded"}),t.jsx("span",{children:"Tool"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Health Status"}),t.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),t.jsx("span",{children:"Healthy"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-yellow-500 rounded-full"}),t.jsx("span",{children:"Warning"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-red-500 rounded-full"}),t.jsx("span",{children:"Error"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Visual Elements"}),t.jsxs("div",{className:"space-y-1 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsxs("svg",{width:"16",height:"8",children:[t.jsx("line",{x1:"0",y1:"4",x2:"16",y2:"4",stroke:"#6B7280",strokeWidth:"2",markerEnd:"url(#arrow)"}),t.jsx("defs",{children:t.jsx("marker",{id:"arrow",markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:t.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:"#6B7280"})})})]}),t.jsx("span",{children:"Dependency"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-4 h-3 border-2 border-blue-500 rounded bg-white"}),t.jsx("span",{children:"Selected"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-4 h-3 border-2 border-green-500 rounded bg-white"}),t.jsx("span",{children:"Connected"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Interactions"}),t.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[t.jsx("div",{children:"âĸ Click a package to select and view details"}),t.jsx("div",{children:"âĸ Hover to highlight connections"}),t.jsx("div",{children:"âĸ Use toolbar to change layout and zoom"})]})]})]})]}):null}function Vf(){N.useEffect(()=>{(async()=>{try{a(!0);const pe=await xt.getPackages(),te=zf(pe),$=pe.map(K=>({...K,dependencies:{...K.dependencies,...K.devDependencies,...K.peerDependencies},dependents:te[K.name]}));m($),c(null)}catch(pe){c("Failed to fetch packages"),console.error("Error fetching packages:",pe)}finally{a(!1)}})()},[]);const[s,a]=N.useState(!1),[i,c]=N.useState(null),[d,m]=N.useState([]),[h,p]=N.useState("graph"),[f,j]=N.useState("hierarchical"),[C,v]=N.useState(null),[T,B]=N.useState(null),[M,R]=N.useState(!0),[P,A]=N.useState(1),[L,D]=N.useState("name"),[Y,oe]=N.useState("asc"),ve=N.useMemo(()=>Tf(d??[],f,800,600),[d,f]),Z=N.useMemo(()=>Lf(d,L,Y),[d,L,Y]),xe=N.useMemo(()=>Ef(d),[d]),Le=N.useMemo(()=>Ud(d),[d]),fe=C&&d.find(Ne=>Ne.name===C)||null,ne=()=>{},ce=Ne=>{v(Ne)},le=(Ne,pe)=>{D(Ne),oe(pe)},ae=()=>{window.location.reload()};return s?t.jsx(bf,{}):i?t.jsx(kf,{error:i,onRetry:ae}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(Sf,{onRefresh:ne,loading:s}),t.jsx(Bf,{stats:xe,packages:d??[]}),Le.length>0&&t.jsx($f,{cycles:Le,packages:d,onPackageSelect:ce}),t.jsx(Cf,{viewMode:h,onViewModeChange:p,layout:f,onLayoutChange:j,showLegend:M,onToggleLegend:()=>R(!M),zoomLevel:P,onZoomChange:A}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:`${M?"lg:col-span-3":"lg:col-span-4"}`,children:h==="graph"?t.jsxs("div",{className:"relative",children:[t.jsx("div",{style:{transform:`scale(${P})`,transformOrigin:"top left"},children:t.jsx(Af,{packages:ve,selectedPackage:C,hoveredPackage:T,onPackageSelect:ce,onPackageHover:B,layout:f})}),t.jsx(Ff,{package:fe,packages:d,onClose:()=>v(null)})]}):t.jsx(Df,{packages:Z,selectedPackage:C,onPackageSelect:ce,sortBy:L,sortOrder:Y,onSortChange:le})}),M&&t.jsx("div",{className:"lg:col-span-1",children:t.jsx(Uf,{show:M})})]})]})}function Hf(){const[s,a]=N.useState(0),[i,c]=N.useState(null),[d,m]=N.useState(!0),[h,p]=N.useState(null),[f,j]=N.useState(!1);N.useEffect(()=>{(async()=>{try{m(!0);const D=await xt.getHealthStatus();c(D),p(null)}catch(D){p("Failed to fetch health data"),console.error("Error fetching health data:",D)}finally{m(!1)}})()},[s]);const C=async()=>{try{j(!0),p(null),m(!0);try{const L=await xt.refreshHealthStatus();c(L),p(null)}catch(L){p("Failed to fetch health data"),console.error("Error fetching health data:",L)}finally{m(!1)}}catch(L){p("Failed to refresh health data"),console.error("Error refreshing health data:",L)}finally{j(!1)}},v=()=>{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 t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading health data..."})]})});if(h)return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Be,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:h}),t.jsx("button",{onClick:v,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})});const B=i?i.summary?.averageScore:0,M=i?i?.packages?.filter(L=>L.health.overallScore>=80).length:0,R=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,A=[{name:"Package Health",value:M||0,status:(()=>{const L=M||0,D=i?.packages.length||0;if(D===0)return"healthy";const Y=L/D;return Y>=.8?"healthy":Y>=.6?"warning":"error"})(),description:`${M||0} healthy packages out of ${i?.packages.length||0}`},{name:"Overall Score",value:Math.round(B),status:Math.round(B)>=80?"healthy":Math.round(B)>=60?"warning":"error",description:`Average health score: ${Math.round(B)}/100`},{name:"Unhealthy Packages",value:R+P||0,status:(R+P||0)===0?"healthy":(R+P||0)<=2?"warning":"error",description:`${R+P||0} packages need attention`}];return t.jsxs("div",{className:"",children:[t.jsxs("div",{className:"flex items-center justify-between my-3",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Health Status"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Monitor the health and performance of your monorepo packages"})]}),t.jsxs("button",{onClick:C,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?t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):t.jsx(cn,{className:"w-5 h-5"}),t.jsx("span",{children:f?"Refreshing...":"Refresh"})]})]}),f&&i&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing health data..."})]})}),t.jsxs("div",{className:"my-3 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg p-6 text-white",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Overall Monorepo Health"}),t.jsx("p",{className:"text-blue-100 mt-1",children:"Based on all package metrics and recent activity"})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"text-4xl font-bold",children:B?.toFixed(2)}),t.jsx("div",{className:"text-blue-100",children:"out of 100"})]})]}),t.jsxs("div",{className:"mt-4 flex space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Pt,{className:"w-5 h-5 text-green-300"}),t.jsxs("span",{children:[M," Healthy"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Be,{className:"w-5 h-5 text-yellow-300"}),t.jsxs("span",{children:[R," Warnings"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Lt,{className:"w-5 h-5 text-red-300"}),t.jsxs("span",{children:[P," Errors"]})]})]})]}),t.jsx("div",{className:"my-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:A.map(L=>t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:L.name}),t.jsx("div",{className:`w-3 h-3 rounded-full ${L.status==="healthy"?"bg-green-500":L.status==="warning"?"bg-yellow-500":"bg-red-500"}`})]}),t.jsx("div",{className:"flex items-end space-x-2",children:t.jsx("span",{className:"text-3xl font-bold text-gray-900",children:L.value})}),t.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${T(L.status)}`,children:L.status}),t.jsx("span",{className:"text-sm text-gray-500",children:L.description})]})]},L.name))}),t.jsxs("div",{className:"my-3 bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Health Details"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Overall Score"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Build Status"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Test Coverage"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Lint Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Security"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:i?.packages?.map(L=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:t.jsx("div",{className:"text-sm",children:t.jsx(it,{className:"w-6 h-6 text-primary-600"})})}),t.jsxs("div",{className:"ml-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:L.packageName}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Score: ",L.health.overallScore,"/100"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-16 bg-gray-200 rounded-full h-2 mr-2",children:t.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}%`}})}),t.jsx("span",{className:"text-sm font-medium text-gray-900",children:L.health.overallScore})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.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"}`}),t.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"})]})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx(jx,{className:"w-4 h-4 text-gray-400 mr-1"}),t.jsx("span",{className:"text-sm text-gray-900",children:"-"})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.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"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("div",{className:"flex items-center",children:t.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"})})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.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"})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsx("div",{className:"flex space-x-2",children:t.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"})})})]},L.packageName))})]})})]}),t.jsxs("div",{className:"hidden bg-white rounded-lg shadow border p-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Health Recommendations"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:[t.jsx(Be,{className:"w-5 h-5 text-yellow-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-yellow-800",children:"Test Coverage Below Target"}),t.jsx("p",{className:"text-sm text-yellow-700",children:"Consider adding more tests to improve coverage above 90%"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-red-50 rounded-lg border border-red-200",children:[t.jsx(Lt,{className:"w-5 h-5 text-red-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-red-800",children:"Build Failures Detected"}),t.jsx("p",{className:"text-sm text-red-700",children:"monorepo-scanner package has build failures that need immediate attention"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg border border-blue-200",children:[t.jsx(qr,{className:"w-5 h-5 text-blue-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-blue-800",children:"Performance Improvements Available"}),t.jsx("p",{className:"text-sm text-blue-700",children:"Consider optimizing build times and dependency resolution"})]})]})]})]})]})}function Wf({packageCount:s,onNewRelease:a}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Publish Control"}),t.jsxs("p",{className:"text-gray-600 mt-1",children:["Manage package releases and versioning across your monorepo (",s," packages)"]})]}),t.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:[t.jsx(Rd,{className:"w-5 h-5"}),t.jsx("span",{children:"New Release"})]})]})}function Yf({stats:s}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(Ri,{className:"w-6 h-6 text-green-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Ready to Publish"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.readyToPublish})]})]})}),t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"In Progress"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.inProgress})]})]})}),t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx("span",{className:"text-2xl",children:t.jsx(dn,{className:"w-6 h-6 text-primary-600"})})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Published Today"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:s.published})]})]})})]})}const Qf=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}),Vd=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 t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Release Status"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm text-gray-500",children:"Filter by package:"}),t.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:[t.jsx("option",{value:"all",children:"All Packages"}),[...new Set(s.map(c=>c.name))].map(c=>t.jsx("option",{value:c,children:c},c))]})]})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Next Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Commits"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Published"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map(c=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:t.jsx(Ai,{className:"w-4 h-4 text-gray-600"})}),t.jsxs("div",{className:"ml-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:c.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:[Object.keys(c.dependencies).length," dependencies"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.currentVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.nextVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Gf(c.publishType)}`,children:c.publishType})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Vd(c.status)}`,children:c.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.commits}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center text-sm text-gray-900",children:[t.jsx(Ft,{className:"w-4 h-4 mr-1 text-gray-400"}),c.lastPublished]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex space-x-2",children:[c.status==="ready"&&t.jsx("button",{className:"text-green-600 hover:text-green-900",children:"Publish"}),t.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"}),t.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 t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Release Schedule"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm text-gray-500",children:"Filter by status:"}),t.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:[t.jsx("option",{value:"all",children:"All Status"}),t.jsx("option",{value:"scheduled",children:"Scheduled"}),t.jsx("option",{value:"in-progress",children:"In Progress"}),t.jsx("option",{value:"completed",children:"Completed"}),t.jsx("option",{value:"failed",children:"Failed"})]})]})]})}),t.jsx("div",{className:"p-6",children:t.jsx("div",{className:"space-y-4",children:c.map(d=>t.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-purple-100 flex items-center justify-center",children:t.jsx(_d,{className:"w-4 h-4 text-purple-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[d.packageName," v",d.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["by ",d.author]})]})]}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Vd(d.status)}`,children:d.status}),t.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[t.jsx(Ft,{className:"w-4 h-4 mr-1"}),d.scheduledFor]})]})]}),t.jsx("div",{className:"mt-3 text-sm text-gray-700",children:d.changelog})]},d.id))})})]})}function qf(){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 t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Changelogs"})}),t.jsx("div",{className:"p-6",children:t.jsx("div",{className:"space-y-6",children:s.map(i=>t.jsxs("div",{className:"border-l-4 border-blue-500 pl-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-100 flex items-center justify-center",children:t.jsx(Ai,{className:"w-4 h-4 text-blue-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[i.packageName," v",i.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:[i.date," âĸ by ",i.author]})]})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${a(i.type)}`,children:i.type})]}),t.jsx("div",{className:"space-y-1",children:i.changes.map((c,d)=>t.jsxs("div",{className:"flex items-start space-x-2",children:[t.jsx(zi,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),t.jsx("span",{className:"text-sm text-gray-700",children:c})]},d))})]},i.id))})})]})}function Jf(){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading package data..."})]})})}function ep({error:s,onRetry:a}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Be,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:s}),t.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 ud=[{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]=N.useState("all"),[i,c]=N.useState("all"),[d,m]=N.useState(ud),[h,p]=N.useState(!1),[f,j]=N.useState(null);N.useEffect(()=>{(async()=>{try{p(!0);const D=(await xt.getPackages()).map(Y=>({name:Y.name,currentVersion:Y.version,nextVersion:C(Y.version),status:v(Y.status),lastPublished:Y.lastUpdated,changelog:Y.description||"No changelog available",commits:Math.floor(Math.random()*20)+1,dependencies:Y.dependencies||[],publishType:T()}));m(D),j(null)}catch(L){j("Failed to fetch package data"),console.error("Error fetching packages:",L),m(ud)}finally{p(!1)}})()},[]);const C=A=>{const L=A.split(".").map(Number);return L[2]+=1,L.join(".")},v=A=>{switch(A){case"healthy":return"ready";case"warning":return"testing";case"error":return"failed";case"building":return"building";default:return"ready"}},T=()=>{const A=["patch","minor","major","prerelease"];return A[Math.floor(Math.random()*A.length)]},B=()=>{},M=()=>{window.location.reload()},R=Kf(d,s),P=Qf(d);return h?t.jsx(Jf,{}):f?t.jsx(ep,{error:f,onRetry:M}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(Wf,{packageCount:d.length,onNewRelease:B}),t.jsx(Yf,{stats:P}),t.jsx(Zf,{packages:R,selectedPackage:s,onPackageChange:a}),t.jsx(Xf,{releases:tp,selectedStatus:i,onStatusChange:c}),t.jsx(qf,{})]})}function rp({message:s="Loading CI/CD data..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function sp({error:s,onRetry:a}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Be,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&t.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 t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-2xl",children:"CI/CD Integration"}),t.jsx("p",{className:"text-body mt-1",children:"Monitor and manage continuous integration and deployment pipelines"})]}),t.jsxs("div",{className:"flex space-x-2",children:[t.jsxs("button",{onClick:s,className:"btn-secondary flex items-center space-x-2",children:[t.jsx(Ri,{className:"w-5 h-5"}),t.jsx("span",{children:"Trigger Build"})]}),t.jsxs("button",{onClick:a,className:"btn-primary flex items-center space-x-2",children:[t.jsx(fx,{className:"w-5 h-5"}),t.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),p=h.length>0?Math.round(h.reduce((f,j)=>f+(j.duration||0),0)/h.length):0;return{total:a,successful:i,failed:c,running:d,successRate:m,avgDuration:p}},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`}},dd=s=>new Date(s).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Hd=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")?t.jsx(dn,{className:"w-6 h-6 text-primary-600"}):a.includes("security")||a.includes("audit")?"đ":a.includes("install")||a.includes("dependencies")?t.jsx(it,{className:"w-6 h-6 text-primary-600"}):t.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 t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-heading text-lg",children:"Build Statistics"}),t.jsxs("button",{onClick:a,disabled:i,className:"btn-ghost",children:[t.jsx(cn,{className:`w-4 h-4 mr-2 ${i?"animate-spin":""}`}),"Refresh"]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-primary-100 rounded-lg",children:t.jsx(qr,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Total Builds"}),t.jsx("p",{className:"text-heading text-2xl",children:s.total})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-success-100 rounded-lg",children:t.jsx(Pt,{className:"w-6 h-6 text-success-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Successful"}),t.jsx("p",{className:"text-heading text-2xl text-success-600",children:s.successful})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-error-100 rounded-lg",children:t.jsx(Lt,{className:"w-6 h-6 text-error-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Failed"}),t.jsx("p",{className:"text-heading text-2xl text-error-600",children:s.failed})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-info-100 rounded-lg",children:t.jsx(Ft,{className:"w-6 h-6 text-info-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Running"}),t.jsx("p",{className:"text-heading text-2xl text-info-600",children:s.running})]})]})}),t.jsxs("div",{className:"card p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("p",{className:"text-caption font-medium",children:"Success Rate"}),t.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,"%"]})]}),t.jsx("div",{className:"w-full bg-neutral-200 rounded-full h-2",children:t.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}%`}})})]})]}),t.jsxs("div",{className:"card p-6",children:[t.jsx("h3",{className:"text-heading text-lg mb-4",children:"Performance Metrics"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-heading text-2xl text-primary-600",children:Kr(s.avgDuration)}),t.jsx("div",{className:"text-caption",children:"Avg Duration"})]}),t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"text-heading text-2xl text-success-600",children:[s.total>0?Math.round(s.successful/s.total*100):0,"%"]}),t.jsx("div",{className:"text-caption",children:"Success Rate"})]}),t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"text-heading text-2xl text-error-600",children:[s.total>0?Math.round(s.failed/s.total*100):0,"%"]}),t.jsx("div",{className:"text-caption",children:"Failure Rate"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-heading text-2xl text-accent-600",children:s.running}),t.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),p=f=>{switch(f){case"success":return t.jsx(Pt,{className:"h-5 w-5 text-green-500"});case"running":return t.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return t.jsx(Ft,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Lt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(Ni,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Ft,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(yl,{className:"h-4 w-4 text-gray-400"}),t.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:[t.jsx("option",{value:"all",children:"All Packages"}),m.map(f=>t.jsx("option",{value:f,children:f},f))]})]}),t.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:[t.jsx("option",{value:"all",children:"All Statuses"}),h.map(f=>t.jsx("option",{value:f,children:f.charAt(0).toUpperCase()+f.slice(1)},f))]}),t.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:[t.jsx("option",{value:"all",children:"All Time"}),t.jsx("option",{value:"today",children:"Today"}),t.jsx("option",{value:"week",children:"This Week"}),t.jsx("option",{value:"month",children:"This Month"})]})]})}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Builds"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[s.length," build",s.length!==1?"s":""," found"]})]}),s.length===0?t.jsxs("div",{className:"p-8 text-center",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"đ¨"}),t.jsx("p",{className:"text-gray-500",children:"No builds found matching your filters"})]}):t.jsx("div",{className:"divide-y divide-gray-200",children:s.map(f=>{const j=dp(f),C=a===f.id;return t.jsxs("div",{className:`p-4 cursor-pointer transition-colors ${C?"bg-blue-50 border-l-4 border-blue-500":"hover:bg-gray-50"}`,onClick:()=>i(C?null:f.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[p(f.status),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:f.packageName}),t.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}),t.jsx("span",{className:"text-xs text-gray-500 font-mono",children:Wd(f.commit)})]}),t.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xl(f.status)}`,children:f.status}),t.jsxs("span",{className:"text-xs text-gray-500",children:["by ",f.triggeredBy]}),t.jsx("span",{className:"text-xs text-gray-500",children:Hd(f.startTime)})]})]})]}),t.jsxs("div",{className:"text-right",children:[f.duration&&t.jsx("div",{className:"text-sm font-medium text-gray-900",children:Kr(f.duration)}),f.status==="running"&&t.jsx("div",{className:"mt-1",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-20 bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-blue-500 h-2 rounded-full transition-all duration-300",style:{width:`${j}%`}})}),t.jsxs("span",{className:"text-xs text-gray-500",children:[j,"%"]})]})})]})]}),C&&f.stages.length>0&&t.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:t.jsx("div",{className:"flex items-center space-x-2",children:f.stages.map((v,T)=>t.jsx("div",{className:`flex items-center px-2 py-1 text-xs rounded ${xl(v.status)}`,title:`${v.name}: ${v.status}`,children:v.name},v.name))})})]},f.id)})})]})]})}function pp({pipelines:s,onPipelineSelect:a,onPipelineToggle:i}){const c=m=>{switch(m){case"healthy":return t.jsx(Pt,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(Be,{className:"w-5 h-5 text-yellow-500"});case"critical":return t.jsx(Lt,{className:"w-5 h-5 text-red-500"});default:return t.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?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Cn,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Pipelines Configured"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by creating your first CI/CD pipeline to automate builds and deployments."}),t.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})}):t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Pipeline Status"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[s.length," pipeline",s.length!==1?"s":""," ","configured"]})]}),t.jsx("div",{className:"divide-y divide-gray-200",children:s.map(m=>{const h=hp(m);return t.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>a(m.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[c(h),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:m.name}),t.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})]}),t.jsxs("div",{className:"flex items-center space-x-4 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xl(m.status)}`,children:m.status}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${d(h)}`,children:h})]})]})]}),t.jsx("div",{className:"flex items-center space-x-4",children:t.jsx("button",{onClick:p=>{p.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"?t.jsx(wx,{className:"w-5 h-5"}):t.jsx(Ri,{className:"w-5 h-5"})})})]}),t.jsxs("div",{className:"mt-3 grid grid-cols-4 gap-4 text-xs",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Success Rate:"}),t.jsxs("div",{className:`font-medium ${m.successRate>=90?"text-green-600":m.successRate>=70?"text-yellow-600":"text-red-600"}`,children:[m.successRate,"%"]})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Avg Duration:"}),t.jsx("div",{className:"font-medium text-gray-900",children:Kr(m.avgDuration)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Last Run:"}),t.jsx("div",{className:"font-medium text-gray-900",children:Hd(m.lastRun)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Triggers:"}),t.jsx("div",{className:"font-medium text-gray-900",children:m.triggers.length})]})]}),t.jsxs("div",{className:"mt-3",children:[t.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[t.jsx("span",{className:"text-gray-500",children:"Pipeline Health"}),t.jsxs("span",{className:"font-medium text-gray-900",children:[m.successRate,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.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}%`}})})]}),t.jsx("div",{className:"mt-3",children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-500",children:"Triggers:"}),m.triggers.map(p=>t.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800",children:p},p))]})})]},m.id)})})]})}function gp({build:s,onClose:a,onCancel:i,onRetry:c}){if(!s)return null;const d=m=>{switch(m){case"success":return t.jsx(Pt,{className:"h-5 w-5 text-green-500"});case"running":return t.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return t.jsx(Ft,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Lt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(Ni,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Ft,{className:"h-5 w-5 text-gray-500"})}};return t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[d(s.status),t.jsxs("div",{children:[t.jsxs("h2",{className:"text-xl font-semibold text-gray-900",children:[s.packageName," Build"]}),t.jsxs("p",{className:"text-sm text-gray-600",children:[s.branch," âĸ ",Wd(s.commit)]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[s.status==="running"&&i&&t.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:[t.jsx(Ni,{className:"w-4 h-4 mr-1"}),"Cancel"]}),(s.status==="failed"||s.status==="cancelled")&&c&&t.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:[t.jsx(cn,{className:"w-4 h-4 mr-1"}),"Retry"]}),t.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Xr,{className:"w-6 h-6"})})]})]}),t.jsxs("div",{className:"p-6 overflow-y-auto max-h-[70vh]",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Build Information"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Status:"}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xl(s.status)}`,children:s.status})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Started:"}),t.jsx("span",{className:"font-medium",children:dd(s.startTime)})]}),s.endTime&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Ended:"}),t.jsx("span",{className:"font-medium",children:dd(s.endTime)})]}),s.duration&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Duration:"}),t.jsx("span",{className:"font-medium",children:Kr(s.duration)})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Triggered by:"}),t.jsx("span",{className:"font-medium",children:s.triggeredBy})]})]})]})}),t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Artifacts"}),s.artifacts.length>0?t.jsx("div",{className:"space-y-1",children:s.artifacts.map((m,h)=>t.jsx("div",{className:"text-sm",children:t.jsx("a",{href:"#",className:"text-blue-600 hover:text-blue-500 font-medium",children:m})},h))}):t.jsx("p",{className:"text-sm text-gray-500",children:"No artifacts generated"})]})})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Build Stages"}),t.jsx("div",{className:"space-y-4",children:s.stages.map((m,h)=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("span",{className:"text-2xl",children:mp(m.name)}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:m.name}),t.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${ap(m.status)}`,children:m.status}),m.duration&&t.jsx("span",{className:"text-xs text-gray-500",children:Kr(m.duration)})]})]})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",h+1," of ",s.stages.length]})]}),m.logs&&m.logs.length>0&&t.jsxs("div",{className:"mt-3",children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Logs"}),t.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((p,f)=>t.jsx("div",{className:"mb-1",children:p},f))})]})]},m.name))})]})]})]})})}const yp=[{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 vp(){const[s,a]=N.useState(!0),[i,c]=N.useState(null),[d,m]=N.useState([]),[h]=N.useState(yp),[p,f]=N.useState(null),[j,C]=N.useState({package:"all",status:"all",pipeline:"all",dateRange:"all"});N.useEffect(()=>{(async()=>{try{a(!0);const Le=(await xt.getBuildStatus()).map(fe=>({id:fe.id||Math.random().toString(36).substr(2,9),packageName:fe.package||fe.packageName||"unknown",branch:fe.branch||"main",commit:fe.commit||"unknown",status:fe.status||"pending",startTime:fe.startTime||new Date().toISOString(),endTime:fe.endTime,duration:fe.duration,stages:fe.stages||[],triggeredBy:fe.triggeredBy||"system",artifacts:fe.artifacts||[]}));m(Le),c(null)}catch(xe){c("Failed to fetch build data"),console.error("Error fetching build data:",xe)}finally{a(!1)}})()},[]);const v=op(d,j),T=ip(d),B=p&&d.find(Z=>Z.id===p)||null,M=()=>{window.location.reload()},R=()=>{console.log("Triggering new build...")},P=()=>{console.log("Creating new pipeline...")},A=Z=>{f(Z)},L=Z=>{console.log("Selected pipeline:",Z)},D=(Z,xe)=>{console.log("Toggle pipeline:",Z,"active:",xe)},Y=Z=>{console.log("Cancelling build:",Z),f(null)},oe=Z=>{console.log("Retrying build:",Z),f(null)},ve=()=>{window.location.reload()};return s?t.jsx(rp,{}):i?t.jsx(sp,{error:i,onRetry:ve}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(lp,{onTriggerBuild:R,onCreatePipeline:P}),t.jsx(xp,{stats:T,onRefresh:M,loading:s}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[t.jsx("div",{className:"lg:col-span-2",children:t.jsx(fp,{builds:v,selectedBuild:p,onBuildSelect:A,filters:j,onFiltersChange:C})}),t.jsx("div",{className:"lg:col-span-1",children:t.jsx(pp,{pipelines:h,onPipelineSelect:L,onPipelineToggle:D})})]}),t.jsx(gp,{build:B,onClose:()=>f(null),onCancel:Y,onRetry:oe}),v.length===0&&d.length>0&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"đ¨"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No builds found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"No builds match your current filters. Try adjusting your search criteria."}),t.jsx("button",{onClick:()=>C({package:"all",status:"all",pipeline:"all",dateRange:"all"}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]}),d.length===0&&!s&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:t.jsx(dn,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No CI/CD data available"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by triggering your first build or setting up a pipeline."}),t.jsxs("div",{className:"flex justify-center space-x-4",children:[t.jsx("button",{onClick:R,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors",children:"Trigger Build"}),t.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 t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:s})]})})}function wp({error:s,onRetry:a}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Be,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:s}),a&&t.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 t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Configuration Inspector"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"View and manage configuration files across your monorepo"})]}),s&&t.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:[t.jsx(cn,{className:`w-5 h-5 ${a?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Yd(s){return typeof s>"u"||s===null}function bp(s){return typeof s=="object"&&s!==null}function kp(s){return Array.isArray(s)?s:Yd(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=Yd,Lp=bp,Tp=kp,Mp=Cp,Rp=Ep,_p=Sp,$i={isNothing:Pp,isObject:Lp,toArray:Tp,repeat:Mp,isNegativeZero:Rp,extend:_p};function Qd(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=Qd(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+": "+Qd(this,a)};var Sn=Zr,Ip=["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 Ap(s,a){if(a=a||{},Object.keys(a).forEach(function(i){if(Ip.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 Qe=Ap;function md(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 bi(s){return this.extend(s)}bi.prototype.extend=function(a){var i=[],c=[];if(a instanceof Qe)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 Qe))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 Qe))throw new Sn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var d=Object.create(bi.prototype);return d.implicit=(this.implicit||[]).concat(i),d.explicit=(this.explicit||[]).concat(c),d.compiledImplicit=md(d,"implicit"),d.compiledExplicit=md(d,"explicit"),d.compiledTypeMap=Dp(d.compiledImplicit,d.compiledExplicit),d};var Fp=bi,Bp=new Qe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(s){return s!==null?s:""}}),$p=new Qe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(s){return s!==null?s:[]}}),Up=new Qe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(s){return s!==null?s:{}}}),Vp=new Fp({explicit:[Bp,$p,Up]});function Hp(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 Yp(s){return s===null}var Qp=new Qe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Hp,construct:Wp,predicate:Yp,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 Qe("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 qp(s){return 48<=s&&s<=57||65<=s&&s<=70||97<=s&&s<=102}function Jp(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(!qp(s.charCodeAt(i)))return!1;c=!0}return c&&d!=="_"}if(d==="o"){for(i++;i<a;i++)if(d=s[i],d!=="_"){if(!Jp(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&&!$i.isNegativeZero(s)}var sg=new Qe("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($i.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||$i.isNegativeZero(s))}var dg=new Qe("tag:yaml.org,2002:float",{kind:"scalar",resolve:ag,construct:ig,predicate:ug,represent:cg,defaultStyle:"lowercase"}),mg=Vp.extend({implicit:[Qp,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,p,f=0,j=null,C,v,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],p=+a[6],a[7]){for(f=a[7].slice(0,3);f.length<3;)f+="0";f=+f}return a[9]&&(C=+a[10],v=+(a[11]||0),j=(C*60+v)*6e4,a[9]==="-"&&(j=-j)),T=new Date(Date.UTC(i,c,d,m,h,p,f)),j&&T.setTime(T.getTime()-j),T}function pg(s){return s.toISOString()}var gg=new Qe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:xg,construct:fg,instanceOf:Date,represent:pg});function yg(s){return s==="<<"||s===null}var vg=new Qe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:yg}),Ui=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
11
|
+
\r`;function jg(s){if(s===null)return!1;var a,i,c=0,d=s.length,m=Ui;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=Ui,h=0,p=[];for(a=0;a<d;a++)a%4===0&&a&&(p.push(h>>16&255),p.push(h>>8&255),p.push(h&255)),h=h<<6|m.indexOf(c.charAt(a));return i=d%4*6,i===0?(p.push(h>>16&255),p.push(h>>8&255),p.push(h&255)):i===18?(p.push(h>>10&255),p.push(h>>2&255)):i===12&&p.push(h>>4&255),new Uint8Array(p)}function Ng(s){var a="",i=0,c,d,m=s.length,h=Ui;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 Qe("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,p=s;for(i=0,c=p.length;i<c;i+=1){if(d=p[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 Qe("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 Rg(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 _g=new Qe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Mg,construct:Rg}),Ig=Object.prototype.hasOwnProperty;function Og(s){if(s===null)return!0;var a,i=s;for(a in i)if(Ig.call(i,a)&&i[a]!==null)return!1;return!0}function zg(s){return s!==null?s:{}}var Ag=new Qe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Og,construct:zg});hg.extend({implicit:[gg,vg],explicit:[kg,Lg,_g,Ag]});function hd(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),Fg=new Array(256);for(var qn=0;qn<256;qn++)Dg[qn]=hd(qn)?1:0,Fg[qn]=hd(qn);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"}},xd=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))],Vg=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]},Hg=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 p="*".repeat(Math.min(h.length,8));return d.replace(h,p)})}),i},Yg=s=>{switch(Zd(s)){case"json":return t.jsx(dl,{className:"w-6 h-6 text-primary-600"});case"yaml":return t.jsx(dl,{className:"w-6 h-6 text-primary-600"});case"javascript":case"typescript":return t.jsx(Cn,{className:"w-6 h-6 text-primary-600"});case"env":return"đ";case"markdown":return"đ";default:return t.jsx(Oi,{className:"w-6 h-6 text-primary-600"})}};function Qg({configs:s,selectedConfig:a,onConfigSelect:i,filters:c,onFiltersChange:d}){const m=Ug(s);return t.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col max-h-[calc(100vh-180px)]",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Configuration Files"}),t.jsxs("div",{className:"relative mb-4",children:[t.jsx(Di,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),t.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"})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(yl,{className:"h-4 w-4 text-gray-400"}),t.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:[t.jsx("option",{value:"all",children:"All Types"}),m.map(h=>t.jsx("option",{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]})]}),t.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:[t.jsx("option",{value:"all",children:"All Files"}),t.jsx("option",{value:"standard",children:"Standard Files"}),t.jsx("option",{value:"secrets",children:"Files with Secrets"})]})]})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:s.length===0?t.jsxs("div",{className:"p-4 text-center text-gray-500",children:[t.jsx("div",{className:"text-4xl mb-2",children:t.jsx(Oi,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-sm",children:"No configuration files found"})]}):t.jsx("div",{className:"p-2",children:s.map(h=>t.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:t.jsxs("div",{className:"flex items-start space-x-3",children:[t.jsx("div",{className:"text-2xl",children:Yg(h.name)}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:h.name}),h.hasSecrets&&t.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:"đ"})]}),t.jsx("p",{className:"text-xs text-gray-500 truncate mb-1",children:h.path}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${Bg(h.type)}`,children:h.type}),t.jsx("span",{className:"text-xs text-gray-400",children:Vg(h.size)})]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:Hg(h.lastModified)})]})]})},h.id))})}),t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.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:p,onToggleSecrets:f,onRefresh:j,content:C}){const[v,T]=N.useState(!1),B=async()=>{try{const M=C||"No content available";await navigator.clipboard.writeText(M),T(!0),setTimeout(()=>{T(!1)},4e3)}catch(M){console.error("Failed to copy to clipboard:",M),T(!0),setTimeout(()=>T(!1),2e3)}};return d?t.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[t.jsx("div",{className:"flex items-center space-x-2",children:t.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:[t.jsx(cn,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]})}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsxs("button",{onClick:j,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:[t.jsx(cn,{className:"w-4 h-4 mr-1"}),"Refresh"]})})]}):t.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[s?t.jsxs(t.Fragment,{children:[t.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:[t.jsx(Mi,{className:"w-4 h-4 mr-1"}),"Save"]}),t.jsxs("button",{onClick:p,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:[t.jsx(Xr,{className:"w-4 h-4 mr-1"}),"Cancel"]})]}):a&&t.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:[t.jsx(mx,{className:"w-4 h-4 mr-1"}),"Edit"]}),i&&t.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?t.jsxs(t.Fragment,{children:[t.jsx(dx,{className:"w-4 h-4 mr-1"}),"Hide Secrets"]}):t.jsxs(t.Fragment,{children:[t.jsx(ux,{className:"w-4 h-4 mr-1"}),"Show Secrets"]})})]}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsx("button",{onClick:B,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${v?"text-green-700 bg-green-100 border border-green-300":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:v?t.jsxs(t.Fragment,{children:[t.jsx(px,{className:"w-4 h-4 mr-1"}),"Copied!"]}):t.jsxs(t.Fragment,{children:[t.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:p,onToggleSecrets:f}){if(!s)return t.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 rounded-lg",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:t.jsx(dl,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"Select a configuration file to view or edit"})]})});const j=Zd(s.name),C=p?s.content:Wg(s.content);return t.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col",children:[t.jsx("div",{className:"p-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"text-2xl",children:t.jsx(dl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:s.name}),t.jsx("p",{className:"text-sm text-gray-500",children:s.path})]})]})}),t.jsx("div",{className:"flex-1 p-4",children:a?t.jsx("div",{className:"h-full",children:t.jsx("textarea",{value:i,onChange:v=>h(v.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})}):t.jsx("div",{className:"h-full",children:t.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:t.jsx("code",{className:`language-${j}`,children:C})})})}),t.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("span",{children:["Language: ",j.toUpperCase()]}),t.jsxs("span",{children:["Size: ",s.content.length," characters"]}),s.hasSecrets&&t.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"})]}),t.jsx("div",{children:a?t.jsx("span",{className:"text-blue-600 font-medium",children:"Editing mode"}):s.isEditable?t.jsx("span",{className:"text-green-600",children:"Editable"}):t.jsx("span",{className:"text-gray-400",children:"Read-only"})})]})})]})}function Zg({validation:s,configName:a}){const i=f=>{switch(f){case"valid":return t.jsx(Pt,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(Be,{className:"w-5 h-5 text-yellow-500"});case"error":return t.jsx(Lt,{className:"w-5 h-5 text-red-500"});default:return t.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,p=s.filter(f=>f.status==="valid").length;return s.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(nr,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),t.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Validation Results"}),t.jsx("p",{className:"text-sm text-gray-500",children:"Select a configuration file to see validation results."})]})}):t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Validation Results"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[i(d),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xd(d)}`,children:d.toUpperCase()})]})]}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Validation results for ",a]})]}),t.jsx("div",{className:"p-4 border-b border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-green-600",children:p}),t.jsx("div",{className:"text-xs text-gray-600",children:"Valid"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-yellow-600",children:h}),t.jsx("div",{className:"text-xs text-gray-600",children:"Warnings"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-red-600",children:m}),t.jsx("div",{className:"text-xs text-gray-600",children:"Errors"})]})]})}),t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"space-y-3",children:s.map((f,j)=>t.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:t.jsxs("div",{className:"flex items-start space-x-3",children:[i(f.status),t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:f.field}),t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${xd(f.status)}`,children:f.status})]}),t.jsx("p",{className:"text-sm text-gray-600",children:f.message})]})]})},j))})}),(m>0||h>0)&&t.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[m>0&&t.jsxs("span",{className:"text-red-600 font-medium",children:[m," error",m>1?"s":""," need attention"]}),h>0&&m===0&&t.jsxs("span",{className:"text-yellow-600 font-medium",children:[h," warning",h>1?"s":""," to review"]})]}),t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm font-medium",children:"View Details"})]})})]})}function Xg(){const[s,a]=N.useState(!0),[i,c]=N.useState(!1),[d,m]=N.useState(null),[h,p]=N.useState([]),[f,j]=N.useState(null),[C,v]=N.useState(!1),[T,B]=N.useState(""),[M,R]=N.useState(!1),[P,A]=N.useState({section:"all",type:"all",status:"all",search:""});N.useEffect(()=>{(async()=>{try{a(!0);const le=(await xt.getConfigurationFiles()).map(ae=>({id:ae.id||ae.name,name:ae.name,path:ae.path||ae.name,type:ae.type||"text",content:ae.content||"",size:ae.content?.length||0,lastModified:ae.lastModified||new Date().toISOString(),hasSecrets:ae.hasSecrets||!1,isEditable:ae.isEditable!==!1,validation:ae.validation||[]}));p(le),m(null)}catch(ce){m("Failed to fetch configuration files"),console.error("Error fetching config files:",ce)}finally{a(!1)}})()},[]);const L=$g(h,P),D=f&&h.find(ne=>ne.id===f)||null,Y=()=>{window.location.reload()},oe=ne=>{j(ne),v(!1),B("")},ve=()=>{D&&(v(!0),B(D.content))},Z=async()=>{if(D&&!i)try{c(!0),m(null);const ne=await xt.saveConfigurationFile(D.id,T);p(ce=>ce.map(le=>le.id===f?{...ne,isEditable:le.isEditable}:le)),f===D.id&&j(D.id),v(!1),B("")}catch(ne){console.error("Error saving config file:",ne),m(`Failed to save configuration: ${ne.message}`)}finally{c(!1)}},xe=()=>{v(!1),B("")},Le=()=>{R(!M)},fe=()=>{window.location.reload()};return s?t.jsx(jp,{}):d?t.jsx(wp,{error:d,onRetry:fe}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(Np,{onRefresh:Y,loading:s}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-[800px]",children:[t.jsx("div",{className:"lg:col-span-1",children:t.jsx(Qg,{configs:L,selectedConfig:f,onConfigSelect:oe,filters:P,onFiltersChange:A})}),t.jsxs("div",{className:"lg:col-span-2 flex flex-col",children:[D&&t.jsx("div",{className:"mb-4",children:t.jsx(Gg,{isEditing:C,canEdit:D.isEditable,hasSecrets:D.hasSecrets,showSecrets:M,saving:i,onStartEdit:ve,onSaveEdit:Z,onCancelEdit:xe,onToggleSecrets:Le,onRefresh:Y,content:C?T:D?.content})}),t.jsx("div",{className:"flex-1",children:t.jsx(Kg,{config:D,isEditing:C,editValue:T,saving:i,onStartEdit:ve,onSaveEdit:Z,onCancelEdit:xe,onValueChange:B,showSecrets:M,onToggleSecrets:Le})})]}),t.jsx("div",{className:"lg:col-span-1 space-y-6",children:t.jsx(Zg,{validation:D?.validation||[],configName:D?.name||"No file selected"})})]}),L.length===0&&!s&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:t.jsx(Oi,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No configuration files found"}),t.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")&&t.jsx("button",{onClick:()=>A({section:"all",type:"all",status:"all",search:""}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]})]})}const Xd=N.createContext(void 0),qg=window.ENV?.API_URL??"http://localhost:8999",Yr=`${qg}/api`,Jn="monodog_session_token",er="monodog_session_data";function Jg({children:s}){const[a,i]=N.useState(null),[c,d]=N.useState(!0),[m,h]=N.useState(null);N.useEffect(()=>{const M=localStorage.getItem(Jn),R=localStorage.getItem(er);if(M&&R)try{const P=JSON.parse(R);i({sessionToken:M,...P})}catch{localStorage.removeItem(Jn),localStorage.removeItem(er)}d(!1)},[]);const p=N.useCallback(async()=>{try{d(!0),h(null);const M=await fetch(`${Yr}/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=N.useCallback(async(M,R)=>{try{d(!0),h(null);const P=await fetch(`${Yr}/auth/me`,{method:"GET",headers:{Authorization:`Bearer ${M}`}});if(!P.ok)throw new Error("Failed to fetch user info");const A=await P.json(),L={sessionToken:M,user:A.user,scopes:A.scopes||[],expiresAt:A.expiresAt},D={user:A.user,scopes:A.scopes||[],permission:R||A.permission,expiresAt:A.expiresAt};localStorage.setItem(Jn,M),localStorage.setItem(er,JSON.stringify(D));const Y={...L,...D};return i(Y),!0}catch(P){const A=P instanceof Error?P.message:"Auth failed";return h(A),!1}finally{d(!1)}},[]),j=N.useCallback(async()=>{try{d(!0),a?.sessionToken&&await fetch(`${Yr}/auth/logout`,{method:"POST",headers:{Authorization:`Bearer ${a.sessionToken}`}}),localStorage.removeItem(Jn),localStorage.removeItem(er),i(null)}catch(M){console.error("Logout error:",M)}finally{d(!1)}},[a]),C=N.useCallback(async()=>{if(!a?.sessionToken)return!1;try{const M=await fetch(`${Yr}/auth/validate`,{method:"POST",headers:{Authorization:`Bearer ${a.sessionToken}`}});return M.ok?(await M.json()).valid===!0:(localStorage.removeItem(Jn),localStorage.removeItem(er),i(null),!1)}catch(M){return console.error("Session check error:",M),!1}},[a]),v=N.useCallback(async()=>{if(!a?.sessionToken)return!1;try{d(!0);const M=await fetch(`${Yr}/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 P={sessionToken:R.sessionToken,user:a.user,scopes:a.scopes,expiresAt:R.expiresAt};return localStorage.setItem(Jn,R.sessionToken),localStorage.setItem(er,JSON.stringify({user:a.user,scopes:a.scopes,expiresAt:R.expiresAt})),i(P),!0}return!1}catch(M){return console.error("Session refresh error:",M),!1}finally{d(!1)}},[a]);N.useEffect(()=>{if(!a)return;const M=setInterval(()=>{C()},300*1e3);return()=>clearInterval(M)},[a,C]);const T=N.useCallback(M=>{if(!a)return console.warn("[Auth] No session available for permission check"),!1;const R={admin:4,maintain:3,write:2,read:1,none:0};let P="read";const A=a?.permission;typeof A=="string"?P=A:A&&typeof A=="object"&&(A.level?P=A.level:A.permission&&(P=A.permission));const L=R[P]||0,D=R[M]||0;return console.debug(`[Auth] Permission check: user=${P}(${L}) required=${M}(${D}) result=${L>=D}`),L>=D},[a]),B={session:a,isAuthenticated:!!a,isLoading:c,error:m,login:p,logout:j,checkSession:C,refreshSession:v,hasPermission:T,permission:(()=>{const M=a?.permission;return M&&(M.level||M.permission)||null})()};return window.__authContext={handleOAuthCallback:f},t.jsx(Xd.Provider,{value:B,children:s})}function vl(){const s=vd.useContext(Xd);if(s===void 0)throw new Error("useAuth must be used within an AuthProvider");return s}function ey({packages:s,onConfirm:a,loading:i}){const[c,d]=N.useState(new Set),[m,h]=N.useState(""),p=N.useMemo(()=>s.filter(v=>!v.private&&v.name.toLowerCase().includes(m.toLowerCase())),[s,m]),f=v=>{const T=new Set(c);T.has(v)?T.delete(v):T.add(v),d(T)},j=()=>{c.size===p.length?d(new Set):d(new Set(p.map(v=>v.name)))},C=()=>{const v=s.filter(T=>c.has(T.name));a(v)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 1: Select Packages"}),t.jsx("p",{className:"text-gray-600",children:"Choose which packages you want to release. You can select multiple packages."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Search Packages"}),t.jsx("input",{type:"text",value:m,onChange:v=>h(v.target.value),placeholder:"Search by package name...",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsxs("label",{className:"text-sm font-medium text-gray-700",children:["Available Packages (",p.length,")"]}),p.length>0&&t.jsx("button",{onClick:j,className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:c.size===p.length?"Deselect All":"Select All"})]}),t.jsx("div",{className:"border border-gray-200 rounded-lg divide-y max-h-96 overflow-y-auto",children:p.length===0?t.jsx("div",{className:"p-4 text-center text-gray-500",children:"No packages found"}):p.map(v=>t.jsx("div",{className:"p-4 hover:bg-gray-50 cursor-pointer transition",onClick:()=>f(v.name),children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:c.has(v.name),onChange:()=>f(v.name),className:"w-4 h-4 text-primary-600 rounded focus:ring-2 focus:ring-primary-500"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"font-medium text-gray-900",children:v.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",v.version]})]}),v.dependencies&&v.dependencies.length>0&&t.jsxs("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:[v.dependencies.length," deps"]})]})},v.name))})]}),t.jsx("div",{className:"flex gap-3 justify-end",children:t.jsxs("button",{onClick:C,disabled:c.size===0||i,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:["Continue (",c.size," selected)"]})})]})}const ty={major:"Breaking changes, incompatible API changes",minor:"New features, backward compatible",patch:"Bug fixes, patches, backward compatible"};function ny({packages:s,onConfirm:a,onBack:i}){const[c,d]=N.useState(s.reduce((f,j)=>({...f,[j.name]:j.bumpType}),{})),m=(f,j)=>{const C=f.split(".").map(Number);return j==="major"?`${C[0]+1}.0.0`:j==="minor"?`${C[0]}.${C[1]+1}.0`:`${C[0]}.${C[1]}.${C[2]+1}`},h=(f,j)=>{d(C=>({...C,[f]:j}))},p=()=>{const f=s.map(j=>({...j,bumpType:c[j.name],newVersion:m(j.currentVersion,c[j.name])}));a(f)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 2: Select Version Bumps"}),t.jsx("p",{className:"text-gray-600",children:"Choose the version bump type for each package. This determines the new version number."})]}),t.jsx("div",{className:"grid grid-cols-3 gap-4",children:Object.entries(ty).map(([f,j])=>t.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[t.jsx("p",{className:"font-medium text-gray-900 capitalize mb-1",children:f}),t.jsx("p",{className:"text-sm text-gray-600",children:j})]},f))}),t.jsx("div",{className:"space-y-4",children:s.map(f=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:f.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",f.currentVersion]})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("p",{className:"text-sm text-gray-500",children:"New Version:"}),t.jsxs("p",{className:"text-lg font-bold text-primary-600",children:["v",m(f.currentVersion,c[f.name])]})]})]}),t.jsx("div",{className:"grid grid-cols-3 gap-3",children:["major","minor","patch"].map(j=>t.jsx("button",{onClick:()=>h(f.name,j),className:`p-3 rounded-lg border-2 transition font-medium text-sm ${c[f.name]===j?"border-primary-600 bg-primary-50 text-primary-700":"border-gray-200 bg-white text-gray-700 hover:border-gray-300"}`,children:t.jsx("span",{className:"capitalize",children:j})},j))}),f.affectedDependencies.length>0&&t.jsxs("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg",children:[t.jsxs("p",{className:"text-sm font-medium text-blue-900",children:["âšī¸ ",f.affectedDependencies.length," dependent package(s)"]}),t.jsx("p",{className:"text-xs text-blue-700 mt-1",children:"Will be auto-bumped when this package is released"})]})]},f.name))}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:i,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",children:"Back"}),t.jsx("button",{onClick:p,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 transition",children:"Continue"})]})]})}function ry({packages:s,existingChangesets:a,onConfirm:i,onBack:c,loading:d}){const[m,h]=N.useState(""),[p,f]=N.useState([]),j=()=>{const v=[];return m.trim()||v.push("Please enter a changelog summary"),m.trim().length<10&&v.push("Summary must be at least 10 characters"),f(v),v.length===0},C=()=>{j()&&i(m)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 3: Preview Changeset"}),t.jsx("p",{className:"text-gray-600",children:"Review the changeset that will be created. Enter a summary of the changes."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Changelog Summary"}),t.jsx("textarea",{value:m,onChange:v=>h(v.target.value),placeholder:"Describe the changes in this release (e.g., 'Add new API endpoints for user management')",rows:4,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent font-mono text-sm"}),p.length>0&&t.jsx("div",{className:"mt-2 space-y-1",children:p.map((v,T)=>t.jsxs("p",{className:"text-sm text-red-600",children:["â ",v]},T))})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Packages to Release"}),t.jsx("div",{className:"space-y-3",children:s.map(v=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:v.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:[v.currentVersion," â ",v.newVersion]})]}),t.jsx("div",{className:"text-right",children:t.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-primary-100 text-primary-800",children:v.bumpType.charAt(0).toUpperCase()+v.bumpType.slice(1)})})]},v.name))})]}),a.length>0&&t.jsxs("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[t.jsx("p",{className:"text-yellow-800 font-medium",children:"â ī¸ Unpublished Changesets"}),t.jsxs("p",{className:"text-yellow-700 text-sm mt-1",children:["There are ",a.length," existing unpublished changeset(s). Creating new ones will accumulate until published."]})]}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:c,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:d,children:"Back"}),t.jsx("button",{onClick:C,disabled:d||p.length>0,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:d?"Processing...":"Continue to Validation"})]})]})}function sy({validation:s,packages:a,onConfirm:i,onBack:c,loading:d}){const m=[{name:"User Permissions",passed:s.checks.permissions},{name:"Working Tree Clean",passed:s.checks.workingTreeClean},{name:"CI Tests Passing",passed:s.checks.ciPassing},{name:"Version Available on npm",passed:s.checks.versionAvailable}];return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 4: Validate Release"}),t.jsx("p",{className:"text-gray-600",children:"Checking if the release is safe to proceed. All checks must pass."})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{className:`p-4 rounded-lg ${s.isValid?"bg-green-50":"bg-red-50"}`,children:[t.jsx("p",{className:`font-medium ${s.isValid?"text-green-900":"text-red-900"}`,children:s.isValid?"â Ready to Release":"â Not Ready"}),t.jsx("p",{className:`text-sm mt-1 ${s.isValid?"text-green-700":"text-red-700"}`,children:s.isValid?"All checks passed. Safe to proceed.":`${s.errors.length} error(s) need resolution`})]}),t.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg",children:[t.jsx("p",{className:"font-medium text-blue-900",children:"Release Summary"}),t.jsxs("p",{className:"text-sm text-blue-700 mt-1",children:[a.length," package(s) will be released"]})]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Pre-release Checks"}),t.jsx("div",{className:"space-y-3",children:m.map((h,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg ${h.passed?"bg-green-50":"bg-red-50"}`,children:[t.jsx("div",{className:`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center font-bold text-white ${h.passed?"bg-green-500":"bg-red-500"}`,children:h.passed?"â":"â"}),t.jsx("span",{className:`font-medium ${h.passed?"text-green-900":"text-red-900"}`,children:h.name})]},p))})]}),s.errors.length>0&&t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-red-900 mb-4",children:"Errors"}),t.jsx("div",{className:"space-y-2",children:s.errors.map((h,p)=>t.jsxs("p",{className:"text-red-700 text-sm",children:["âĸ ",h]},p))})]}),s.warnings.length>0&&t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-yellow-900 mb-4",children:"Warnings"}),t.jsx("div",{className:"space-y-2",children:s.warnings.map((h,p)=>t.jsxs("p",{className:"text-yellow-700 text-sm",children:["â ī¸ ",h]},p))})]}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:c,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:d,children:"Back"}),t.jsx("button",{onClick:i,disabled:!s.isValid||d,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:d?"Publishing...":"Confirm & Publish"})]})]})}function ly({packages:s,summary:a,onReset:i}){const c=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:t.jsx("svg",{className:"w-10 h-10 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Release Initiated!"}),t.jsxs("p",{className:"text-gray-600 text-lg mb-4",children:["Changeset created and publishing workflow started for ",s.length," package(s)"]}),t.jsxs("p",{className:"text-gray-500 text-sm",children:["Initiated on ",c]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"What Happens Next"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"1. Changeset Created"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"A changeset has been created with your release information"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"2. Publishing Workflow Started"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"GitHub Actions workflow has been triggered to publish your packages"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsxs("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:[t.jsx("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),t.jsx("path",{fillRule:"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"3. Monitor Progress"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"Check GitHub Actions for the workflow status and npm registry for package updates"})]})]})]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Packages Released"}),t.jsx("div",{className:"space-y-2",children:s.map(d=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:d.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["v",d.currentVersion," â v",d.newVersion]})]}),t.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-primary-100 text-primary-800",children:d.bumpType.charAt(0).toUpperCase()+d.bumpType.slice(1)})]},d.name))})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Changelog Summary"}),t.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:t.jsx("p",{className:"text-gray-700 whitespace-pre-wrap",children:a})})]}),t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Next Steps"}),t.jsxs("ul",{className:"text-sm text-blue-700 space-y-2",children:[t.jsx("li",{children:"â Changeset created and committed"}),t.jsx("li",{children:"â Package versions updated"}),t.jsx("li",{children:"â Release pipeline triggered"}),t.jsx("li",{children:"â GitHub release created (in progress)"}),t.jsx("li",{children:"âŗ npm registry will be updated shortly"})]})]}),t.jsx("div",{className:"flex gap-3 justify-center",children:t.jsx("button",{onClick:i,className:"px-8 py-3 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 transition",children:"Release Another Package"})}),t.jsxs("div",{className:"border-t pt-6 flex gap-4 justify-center",children:[t.jsx("a",{href:"#",className:"text-primary-600 hover:text-primary-700 font-medium text-sm",children:"View Release on GitHub â"}),t.jsx("a",{href:"#",className:"text-primary-600 hover:text-primary-700 font-medium text-sm",children:"View on npm â"})]})]})}function ay({message:s="Loading..."}){return t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-gray-200 border-t-primary-500 animate-spin mb-4"}),t.jsx("p",{className:"text-gray-600",children:s})]})}function iy({error:s,onRetry:a}){return t.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:t.jsxs("div",{className:"flex items-start",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),t.jsxs("div",{className:"ml-3 flex-1",children:[t.jsx("h3",{className:"text-lg font-medium text-red-800",children:"Error"}),t.jsx("p",{className:"mt-2 text-sm text-red-700",children:s}),t.jsx("button",{onClick:a,className:"mt-4 px-4 py-2 bg-red-600 text-white rounded-lg font-medium hover:bg-red-700 transition",children:"Try Again"})]})]})})}function oy(){const{isAuthenticated:s,hasPermission:a}=vl(),[i,c]=N.useState("select"),[d,m]=N.useState([]),[h,p]=N.useState(""),[f,j]=N.useState(!1),[C,v]=N.useState(null),[T,B]=N.useState(null),[M,R]=N.useState([]),[P,A]=N.useState([]);N.useEffect(()=>{console.log("[ReleaseManager] hasPermission function available:",typeof a),console.log("[ReleaseManager] canCreateChangeset check:",a("write"))},[a]),N.useEffect(()=>{L()},[]);const L=async()=>{try{j(!0);const ce=`${window.ENV?.API_URL??"http://localhost:8999"}/api`,le=localStorage.getItem("monodog_session_token"),ae={"Content-Type":"application/json",...le&&{Authorization:`Bearer ${le}`}},Ne=await fetch(`${ce}/publish/packages`,{headers:ae});if(Ne.ok){const te=await Ne.json();R(te.packages||[])}else{console.warn("Failed to fetch packages:",Ne.status);const te=await fetch(`${ce}/packages`,{headers:ae});if(te.ok){const $=await te.json();R($||[])}}const pe=await fetch(`${ce}/publish/changesets`,{headers:ae});if(pe.ok){const te=await pe.json();A(te.changesets||[])}else(pe.status===401||pe.status===403)&&(window.location.href="/login");v(null)}catch(ne){const ce=ne instanceof Error?ne.message:"Failed to fetch workspace data";v(ce),console.error("Error fetching workspace data:",ne)}finally{j(!1)}},D=ne=>{const ce=ne.map(le=>({name:le.name,currentVersion:le.version,newVersion:le.version,bumpType:"patch",affectedDependencies:le.dependents||[]}));m(ce),c("bump")},Y=ne=>{m(ne),c("preview")},oe=ne=>{p(ne),ve(d,ne)},ve=async(ne,ce)=>{try{j(!0);const ae=`${window.ENV?.API_URL??"http://localhost:8999"}/api`,Ne=localStorage.getItem("monodog_session_token"),pe={"Content-Type":"application/json",...Ne&&{Authorization:`Bearer ${Ne}`}},te=await fetch(`${ae}/publish/preview`,{method:"POST",headers:pe,body:JSON.stringify({packages:ne.map(U=>U.name),bumps:ne.map(U=>({package:U.name,bumpType:U.bumpType})),summary:ce})});if(!te.ok)throw new Error("Validation failed");const $=await te.json(),K={isValid:$.isValid??!0,errors:$.errors??[],warnings:$.warnings??[],checks:$.checks??{permissions:!0,workingTreeClean:!0,ciPassing:!0,versionAvailable:!0}};B(K),c("validate"),v(null)}catch(le){const ae=le instanceof Error?le.message:"Validation error";v(ae),console.error("Validation error:",le)}finally{j(!1)}},Z=async()=>{try{if(!a("maintain")){v("You do not have permission to publish packages. Required: maintain permission");return}j(!0);const ce=`${window.ENV?.API_URL??"http://localhost:8999"}/api`,le=localStorage.getItem("monodog_session_token"),ae={"Content-Type":"application/json",...le&&{Authorization:`Bearer ${le}`}};if(!(await fetch(`${ce}/publish/changesets`,{method:"POST",headers:ae,body:JSON.stringify({packages:d.map(te=>te.name),bumps:d.map(te=>({package:te.name,bumpType:te.bumpType})),summary:h})})).ok)throw new Error("Failed to create changeset");if(!(await fetch(`${ce}/publish/trigger`,{method:"POST",headers:ae,body:JSON.stringify({packages:d.map(te=>te.name)})})).ok)throw new Error("Failed to trigger publish");c("confirm"),v(null)}catch(ne){const ce=ne instanceof Error?ne.message:"Publishing error";v(ce)}finally{j(!1)}},xe=()=>{c("select"),m([]),p(""),B(null),v(null),L()};if(!s)return t.jsx("div",{className:"p-6 bg-yellow-50 border border-yellow-200 rounded-lg",children:t.jsx("p",{className:"text-yellow-800",children:"Please log in to access release management."})});if(f&&i==="select"&&M.length===0)return t.jsx(ay,{message:"Loading workspace packages..."});if(C&&i==="select")return t.jsx(iy,{error:C,onRetry:L});const Le=a("write"),fe=a("maintain");return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Release Manager"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Manage package versions and publish releases with Changesets"})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",["select","bump","preview","validate","confirm"].indexOf(i)+1," of 5"]})]}),!Le&&t.jsxs("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[t.jsx("p",{className:"text-yellow-700 font-medium",children:"â ī¸ Limited Access"}),t.jsx("p",{className:"text-yellow-600 text-sm mt-1",children:"You do not have write permission to create and publish changesets. Contact your repository administrator to request access."})]}),C&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"Error"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:C})]}),P.length>0&&i==="select"&&t.jsxs("div",{className:"p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsxs("p",{className:"text-blue-700 font-medium",children:[P.length," unpublished changeset(s) detected"]}),t.jsx("p",{className:"text-blue-600 text-sm mt-1",children:"Consider reviewing existing changesets before creating new ones"})]}),i==="select"&&!Le&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"đĢ Access Denied"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:"You do not have write permission to create changesets. Contact your repository administrator."})]}),i==="select"&&Le&&t.jsx(ey,{packages:M,onConfirm:D,loading:f}),i==="bump"&&Le&&t.jsx(ny,{packages:d,onConfirm:Y,onBack:()=>c("select")}),i==="preview"&&Le&&t.jsx(ry,{packages:d,existingChangesets:P,onConfirm:oe,onBack:()=>c("select"),loading:f}),i==="validate"&&!fe&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"đĢ Access Denied"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:"You do not have maintain permission to publish changesets. Contact your repository administrator."})]}),i==="validate"&&fe&&T&&t.jsx(sy,{validation:T,packages:d,onConfirm:Z,onBack:()=>c("preview"),loading:f}),i==="confirm"&&t.jsx(ly,{packages:d,summary:h,onReset:xe}),t.jsx("div",{className:"flex gap-2 justify-center",children:["select","bump","preview","validate","confirm"].map((ne,ce)=>t.jsx("div",{className:`h-2 flex-1 rounded-full transition-colors ${["select","bump","preview","validate","confirm"].indexOf(i)>=ce?"bg-primary-500":"bg-gray-300"}`},ne))})]})}const fd=[{name:"Dashboard",href:"/",icon:cx},{name:"Packages",href:"/packages",icon:it},{name:"Dependencies",href:"/dependencies",icon:qr},{name:"Health Status",href:"/health",icon:Ii},{name:"Release",href:"/release",icon:Rd},{name:"Configuration",href:"/config",icon:Cn}];function cy({children:s}){const a=lr(),{session:i}=vl();return t.jsxs("div",{className:"min-h-screen bg-neutral-50",children:[t.jsxs("div",{className:"fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-medium",children:[t.jsx("div",{className:"flex h-16 items-center justify-center border-b border-neutral-200",children:t.jsx("h1",{className:"text-heading text-xl text-primary-700",children:"MonoDog"})}),t.jsx("nav",{className:"mt-8 px-4",children:t.jsx("ul",{className:"space-y-2",children:fd.map(c=>{const d=a.pathname===c.href;return t.jsx("li",{children:t.jsxs(Dt,{to:c.href,className:`nav-link ${d?"nav-link-active":"nav-link-inactive"}`,children:[t.jsx(c.icon,{className:"mr-3 h-5 w-5"}),c.name]})},c.name)})})})]}),t.jsxs("div",{className:"pl-64",children:[t.jsxs("header",{className:"bg-white shadow-soft border-b border-neutral-200 flex items-center justify-between px-6 py-4",children:[t.jsx("div",{className:"flex items-center gap-4",children:t.jsx("h2",{className:"text-heading text-lg font-semibold",children:fd.find(c=>c.href===a.pathname)?.name||"Dashboard"})}),t.jsx("div",{className:"flex items-center gap-3",children:t.jsxs("div",{className:"flex flex-col items-end text-sm",children:[t.jsx("span",{className:"font-medium text-primary-700",children:i.user.login}),t.jsx("span",{className:"text-neutral-500",children:i.permission.role})]})})]}),t.jsx("main",{className:"p-6",children:s})]})]})}const uy={Dashboard:jf,PackagesOverview:wf,PackageDetail:Nf,DependencyGraph:Vf,HealthStatus:Hf,PublishControl:np,CIIntegration:vp,ConfigInspector:Xg,ReleaseManager:oy},dy=({componentName:s})=>{const a=uy[s];return a?t.jsx(a,{}):t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Page Not Found"}),t.jsx("p",{className:"text-gray-600",children:"The requested page could not be found."})]})})};function my(){return t.jsxs(Ld,{children:[Td.map(s=>t.jsx(tr,{path:s.path,element:t.jsx(dy,{componentName:s.component})},s.path)),t.jsx(tr,{path:"*",element:t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"đ"}),t.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"404 - Page Not Found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"The page you're looking for doesn't exist or has been moved."}),t.jsx("a",{href:"/",className:"text-blue-600 hover:text-blue-500 font-medium",children:"Go back to Dashboard"})]})})})]})}const hy=N.createContext(void 0),xy=window.ENV?.API_URL??"http://localhost:8999",pd=`${xy}/api`;function fy({children:s}){const[a,i]=N.useState(new Map),[c,d]=N.useState(!1),[m,h]=N.useState(null),p=(B,M)=>`${B}/${M}`,f=N.useCallback(async(B,M,R)=>{try{d(!0),h(null);const P=p(M,R);if(a.has(P))return a.get(P)||null;const A=await fetch(`${pd}/permissions/${M}/${R}`,{method:"GET",headers:{Authorization:`Bearer ${B}`}});if(!A.ok)throw A.status===401?new Error("Unauthorized"):new Error("Failed to check permission");const L=await A.json(),D={permission:L.permission,role:L.role,canAdmin:L.canAdmin,canMaintain:L.canMaintain,canWrite:L.canWrite,canRead:L.canRead,denied:L.denied};return i(Y=>{const oe=new Map(Y);return oe.set(P,D),oe}),D}catch(P){const A=P instanceof Error?P.message:"Permission check failed";return h(A),null}finally{d(!1)}},[a]),j=N.useCallback(async(B,M,R,P)=>{try{d(!0),h(null);const A=await fetch(`${pd}/permissions/${M}/${R}/can-action`,{method:"POST",headers:{Authorization:`Bearer ${B}`,"Content-Type":"application/json"},body:JSON.stringify({action:P})});if(!A.ok)throw new Error("Failed to check action permission");return(await A.json()).can===!0}catch(A){return console.error("Action permission check error:",A),!1}finally{d(!1)}},[]),C=N.useCallback((B,M)=>{const R=p(B,M);i(P=>{const A=new Map(P);return A.delete(R),A})},[]),v=N.useCallback(()=>{i(new Map)},[]),T={permissions:a,isLoading:c,error:m,checkPermission:f,canPerformAction:j,invalidatePermission:C,invalidateAll:v};return t.jsx(hy.Provider,{value:T,children:s})}function py(){const{login:s,isLoading:a,error:i}=vl(),[c,d]=N.useState(!1),m=async()=>{d(!0),await s()};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br p-5",children:t.jsxs("div",{className:"bg-white rounded-xl shadow-2xl max-w-md w-full overflow-hidden",children:[t.jsxs("div",{className:"bg-gradient-to-br from-primary-500 to-primary-700 text-white p-8 text-center",children:[t.jsx("h1",{className:"text-4xl font-bold m-0",children:"MonoDog"}),t.jsx("p",{className:"text-sm opacity-90 font-medium mt-2 m-0",children:"Monorepo Analytics & Management"})]}),t.jsxs("div",{className:"p-10",children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 text-center mb-8",children:"Sign in to your account"}),i&&t.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}),t.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:[t.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"currentColor",children:t.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"]}),t.jsxs("div",{className:"flex items-center gap-3 my-8 text-gray-400 text-xs font-semibold uppercase tracking-widest",children:[t.jsx("div",{className:"flex-1 h-px bg-gray-200"}),t.jsx("span",{children:"GitHub OAuth Authentication"}),t.jsx("div",{className:"flex-1 h-px bg-gray-200"})]}),t.jsxs("div",{className:"bg-primary-50 rounded-lg p-5 border-l-4 border-primary-500",children:[t.jsx("h4",{className:"text-xs font-semibold text-gray-900 mb-3 uppercase tracking-wide",children:"Requested Permissions"}),t.jsxs("ul",{className:"m-0 p-0 list-none space-y-2",children:[t.jsxs("li",{className:"text-sm text-gray-700",children:[t.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"]}),t.jsxs("li",{className:"text-sm text-gray-700",children:[t.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"]}),t.jsxs("li",{className:"text-sm text-gray-700",children:[t.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)"]})]})]})]}),t.jsx("div",{className:"bg-gray-50 px-10 py-5 border-t border-gray-200 text-center",children:t.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 gy(){const s=Ti(),[a,i]=N.useState(!0),[c,d]=N.useState(null);return N.useEffect(()=>{(async()=>{try{const h=new URLSearchParams(window.location.search),p=h.get("code"),f=h.get("state"),j=h.get("error"),C=h.get("error_description");if(j){d(`${j}: ${C}`),i(!1);return}if(!p||!f){d("Missing authorization code or state"),i(!1);return}const T=`${window.ENV?.API_URL??"http://localhost:8999"}/api`,B=await fetch(`${T}/auth/callback?code=${p}&state=${f}`);if(!B.ok){const P=await B.json();d(P.message||"Authentication failed"),i(!1);return}const M=await B.json();if(!M.success||!M.sessionToken){d("Failed to complete authentication"),i(!1);return}const R=window.__authContext;if(R&&R.handleOAuthCallback)if(await R.handleOAuthCallback(M.sessionToken,M.permission)){const A=M.redirectUrl||"/";s(A)}else d("Failed to store session");else d("Auth context not available")}catch(h){const p=h instanceof Error?h.message:"Unknown error occurred";d(p)}finally{i(!1)}})()},[s]),t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-primary-500 to-primary-700 p-5",children:t.jsx("div",{className:"bg-white rounded-xl shadow-2xl max-w-sm text-center p-10",children:a?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-10 h-10 border-4 border-gray-200 border-t-indigo-500 rounded-full animate-spin mx-auto my-5"}),t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mt-5 mb-2",children:"Completing Authentication..."}),t.jsx("p",{className:"text-gray-700 text-sm leading-relaxed",children:"Please wait while we verify your GitHub account."})]}):c?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"text-5xl mb-5",children:"â ī¸"}),t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Authentication Failed"}),t.jsx("p",{className:"text-gray-700 text-sm leading-relaxed mb-5",children:c}),t.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 yy({children:s}){const{isAuthenticated:a,isLoading:i}=vl();return i?t.jsxs("div",{className:"loading-container",children:[t.jsx("div",{className:"spinner"}),t.jsx("p",{children:"Loading..."})]}):a?t.jsx(t.Fragment,{children:s}):t.jsx(Zh,{to:"/login",replace:!0})}function vy(){return t.jsx(sx,{children:t.jsx(Jg,{children:t.jsx(fy,{children:t.jsxs(Ld,{children:[t.jsx(tr,{path:"/login",element:t.jsx(py,{})}),t.jsx(tr,{path:"/auth/callback",element:t.jsx(gy,{})}),t.jsx(tr,{path:"/*",element:t.jsx(yy,{children:t.jsx(cy,{children:t.jsx(my,{})})})})]})})})})}const gd=document.getElementById("root");gd&&rh.createRoot(gd).render(t.jsx(vy,{}));
|
|
13
|
+
//# sourceMappingURL=index-BMoE990p.js.map
|