@manojkmfsi/monodog 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
- function g0(r,s){for(var l=0;l<s.length;l++){const i=s[l];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in r)){const d=Object.getOwnPropertyDescriptor(i,c);d&&Object.defineProperty(r,c,d.get?d:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();function y0(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Qo={exports:{}},ha={},Jo={exports:{}},ke={};var xm;function v0(){if(xm)return ke;xm=1;var r=Symbol.for("react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function C(S){return S===null||typeof S!="object"?null:(S=y&&S[y]||S["@@iterator"],typeof S=="function"?S:null)}var F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,_={};function b(S,D,Y){this.props=S,this.context=D,this.refs=_,this.updater=Y||F}b.prototype.isReactComponent={},b.prototype.setState=function(S,D){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,D,"setState")},b.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function U(){}U.prototype=b.prototype;function R(S,D,Y){this.props=S,this.context=D,this.refs=_,this.updater=Y||F}var M=R.prototype=new U;M.constructor=R,N(M,b.prototype),M.isPureReactComponent=!0;var P=Array.isArray,W=Object.prototype.hasOwnProperty,ae={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function oe(S,D,Y){var ue,ne={},be=null,Te=null;if(D!=null)for(ue in D.ref!==void 0&&(Te=D.ref),D.key!==void 0&&(be=""+D.key),D)W.call(D,ue)&&!z.hasOwnProperty(ue)&&(ne[ue]=D[ue]);var _e=arguments.length-2;if(_e===1)ne.children=Y;else if(1<_e){for(var Ie=Array(_e),it=0;it<_e;it++)Ie[it]=arguments[it+2];ne.children=Ie}if(S&&S.defaultProps)for(ue in _e=S.defaultProps,_e)ne[ue]===void 0&&(ne[ue]=_e[ue]);return{$$typeof:r,type:S,key:be,ref:Te,props:ne,_owner:ae.current}}function xe(S,D){return{$$typeof:r,type:S.type,key:D,ref:S.ref,props:S.props,_owner:S._owner}}function Ne(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function te(S){var D={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(Y){return D[Y]})}var ye=/\/+/g;function me(S,D){return typeof S=="object"&&S!==null&&S.key!=null?te(""+S.key):D.toString(36)}function ve(S,D,Y,ue,ne){var be=typeof S;(be==="undefined"||be==="boolean")&&(S=null);var Te=!1;if(S===null)Te=!0;else switch(be){case"string":case"number":Te=!0;break;case"object":switch(S.$$typeof){case r:case s:Te=!0}}if(Te)return Te=S,ne=ne(Te),S=ue===""?"."+me(Te,0):ue,P(ne)?(Y="",S!=null&&(Y=S.replace(ye,"$&/")+"/"),ve(ne,D,Y,"",function(it){return it})):ne!=null&&(Ne(ne)&&(ne=xe(ne,Y+(!ne.key||Te&&Te.key===ne.key?"":(""+ne.key).replace(ye,"$&/")+"/")+S)),D.push(ne)),1;if(Te=0,ue=ue===""?".":ue+":",P(S))for(var _e=0;_e<S.length;_e++){be=S[_e];var Ie=ue+me(be,_e);Te+=ve(be,D,Y,Ie,ne)}else if(Ie=C(S),typeof Ie=="function")for(S=Ie.call(S),_e=0;!(be=S.next()).done;)be=be.value,Ie=ue+me(be,_e++),Te+=ve(be,D,Y,Ie,ne);else if(be==="object")throw D=String(S),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.");return Te}function Z(S,D,Y){if(S==null)return S;var ue=[],ne=0;return ve(S,ue,"","",function(be){return D.call(Y,be,ne++)}),ue}function Q(S){if(S._status===-1){var D=S._result;D=D(),D.then(function(Y){(S._status===0||S._status===-1)&&(S._status=1,S._result=Y)},function(Y){(S._status===0||S._status===-1)&&(S._status=2,S._result=Y)}),S._status===-1&&(S._status=0,S._result=D)}if(S._status===1)return S._result.default;throw S._result}var X={current:null},B={transition:null},J={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:B,ReactCurrentOwner:ae};function q(){throw Error("act(...) is not supported in production builds of React.")}return ke.Children={map:Z,forEach:function(S,D,Y){Z(S,function(){D.apply(this,arguments)},Y)},count:function(S){var D=0;return Z(S,function(){D++}),D},toArray:function(S){return Z(S,function(D){return D})||[]},only:function(S){if(!Ne(S))throw Error("React.Children.only expected to receive a single React element child.");return S}},ke.Component=b,ke.Fragment=l,ke.Profiler=c,ke.PureComponent=R,ke.StrictMode=i,ke.Suspense=h,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,ke.act=q,ke.cloneElement=function(S,D,Y){if(S==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+S+".");var ue=N({},S.props),ne=S.key,be=S.ref,Te=S._owner;if(D!=null){if(D.ref!==void 0&&(be=D.ref,Te=ae.current),D.key!==void 0&&(ne=""+D.key),S.type&&S.type.defaultProps)var _e=S.type.defaultProps;for(Ie in D)W.call(D,Ie)&&!z.hasOwnProperty(Ie)&&(ue[Ie]=D[Ie]===void 0&&_e!==void 0?_e[Ie]:D[Ie])}var Ie=arguments.length-2;if(Ie===1)ue.children=Y;else if(1<Ie){_e=Array(Ie);for(var it=0;it<Ie;it++)_e[it]=arguments[it+2];ue.children=_e}return{$$typeof:r,type:S.type,key:ne,ref:be,props:ue,_owner:Te}},ke.createContext=function(S){return S={$$typeof:m,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},S.Provider={$$typeof:d,_context:S},S.Consumer=S},ke.createElement=oe,ke.createFactory=function(S){var D=oe.bind(null,S);return D.type=S,D},ke.createRef=function(){return{current:null}},ke.forwardRef=function(S){return{$$typeof:p,render:S}},ke.isValidElement=Ne,ke.lazy=function(S){return{$$typeof:v,_payload:{_status:-1,_result:S},_init:Q}},ke.memo=function(S,D){return{$$typeof:g,type:S,compare:D===void 0?null:D}},ke.startTransition=function(S){var D=B.transition;B.transition={};try{S()}finally{B.transition=D}},ke.unstable_act=q,ke.useCallback=function(S,D){return X.current.useCallback(S,D)},ke.useContext=function(S){return X.current.useContext(S)},ke.useDebugValue=function(){},ke.useDeferredValue=function(S){return X.current.useDeferredValue(S)},ke.useEffect=function(S,D){return X.current.useEffect(S,D)},ke.useId=function(){return X.current.useId()},ke.useImperativeHandle=function(S,D,Y){return X.current.useImperativeHandle(S,D,Y)},ke.useInsertionEffect=function(S,D){return X.current.useInsertionEffect(S,D)},ke.useLayoutEffect=function(S,D){return X.current.useLayoutEffect(S,D)},ke.useMemo=function(S,D){return X.current.useMemo(S,D)},ke.useReducer=function(S,D,Y){return X.current.useReducer(S,D,Y)},ke.useRef=function(S){return X.current.useRef(S)},ke.useState=function(S){return X.current.useState(S)},ke.useSyncExternalStore=function(S,D,Y){return X.current.useSyncExternalStore(S,D,Y)},ke.useTransition=function(){return X.current.useTransition()},ke.version="18.3.1",ke}var gm;function kc(){return gm||(gm=1,Jo.exports=v0()),Jo.exports}var ym;function j0(){if(ym)return ha;ym=1;var r=kc(),s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function m(p,h,g){var v,y={},C=null,F=null;g!==void 0&&(C=""+g),h.key!==void 0&&(C=""+h.key),h.ref!==void 0&&(F=h.ref);for(v in h)i.call(h,v)&&!d.hasOwnProperty(v)&&(y[v]=h[v]);if(p&&p.defaultProps)for(v in h=p.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:s,type:p,key:C,ref:F,props:y,_owner:c.current}}return ha.Fragment=l,ha.jsx=m,ha.jsxs=m,ha}var vm;function w0(){return vm||(vm=1,Qo.exports=j0()),Qo.exports}var t=w0(),Vl={},Xo={exports:{}},_t={},Zo={exports:{}},ec={};var jm;function N0(){return jm||(jm=1,(function(r){function s(B,J){var q=B.length;B.push(J);e:for(;0<q;){var S=q-1>>>1,D=B[S];if(0<c(D,J))B[S]=J,B[q]=D,q=S;else break e}}function l(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var J=B[0],q=B.pop();if(q!==J){B[0]=q;e:for(var S=0,D=B.length,Y=D>>>1;S<Y;){var ue=2*(S+1)-1,ne=B[ue],be=ue+1,Te=B[be];if(0>c(ne,q))be<D&&0>c(Te,ne)?(B[S]=Te,B[be]=q,S=be):(B[S]=ne,B[ue]=q,S=ue);else if(be<D&&0>c(Te,q))B[S]=Te,B[be]=q,S=be;else break e}}return J}function c(B,J){var q=B.sortIndex-J.sortIndex;return q!==0?q:B.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var m=Date,p=m.now();r.unstable_now=function(){return m.now()-p}}var h=[],g=[],v=1,y=null,C=3,F=!1,N=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(B){for(var J=l(g);J!==null;){if(J.callback===null)i(g);else if(J.startTime<=B)i(g),J.sortIndex=J.expirationTime,s(h,J);else break;J=l(g)}}function P(B){if(_=!1,M(B),!N)if(l(h)!==null)N=!0,Q(W);else{var J=l(g);J!==null&&X(P,J.startTime-B)}}function W(B,J){N=!1,_&&(_=!1,U(oe),oe=-1),F=!0;var q=C;try{for(M(J),y=l(h);y!==null&&(!(y.expirationTime>J)||B&&!te());){var S=y.callback;if(typeof S=="function"){y.callback=null,C=y.priorityLevel;var D=S(y.expirationTime<=J);J=r.unstable_now(),typeof D=="function"?y.callback=D:y===l(h)&&i(h),M(J)}else i(h);y=l(h)}if(y!==null)var Y=!0;else{var ue=l(g);ue!==null&&X(P,ue.startTime-J),Y=!1}return Y}finally{y=null,C=q,F=!1}}var ae=!1,z=null,oe=-1,xe=5,Ne=-1;function te(){return!(r.unstable_now()-Ne<xe)}function ye(){if(z!==null){var B=r.unstable_now();Ne=B;var J=!0;try{J=z(!0,B)}finally{J?me():(ae=!1,z=null)}}else ae=!1}var me;if(typeof R=="function")me=function(){R(ye)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Z=ve.port2;ve.port1.onmessage=ye,me=function(){Z.postMessage(null)}}else me=function(){b(ye,0)};function Q(B){z=B,ae||(ae=!0,me())}function X(B,J){oe=b(function(){B(r.unstable_now())},J)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(B){B.callback=null},r.unstable_continueExecution=function(){N||F||(N=!0,Q(W))},r.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<B?Math.floor(1e3/B):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_getFirstCallbackNode=function(){return l(h)},r.unstable_next=function(B){switch(C){case 1:case 2:case 3:var J=3;break;default:J=C}var q=C;C=J;try{return B()}finally{C=q}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(B,J){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var q=C;C=B;try{return J()}finally{C=q}},r.unstable_scheduleCallback=function(B,J,q){var S=r.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?S+q:S):q=S,B){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=q+D,B={id:v++,callback:J,priorityLevel:B,startTime:q,expirationTime:D,sortIndex:-1},q>S?(B.sortIndex=q,s(g,B),l(h)===null&&B===l(g)&&(_?(U(oe),oe=-1):_=!0,X(P,q-S))):(B.sortIndex=D,s(h,B),N||F||(N=!0,Q(W))),B},r.unstable_shouldYield=te,r.unstable_wrapCallback=function(B){var J=C;return function(){var q=C;C=J;try{return B.apply(this,arguments)}finally{C=q}}}})(ec)),ec}var wm;function b0(){return wm||(wm=1,Zo.exports=N0()),Zo.exports}var Nm;function S0(){if(Nm)return _t;Nm=1;var r=kc(),s=b0();function l(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a]);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 i=new Set,c={};function d(e,n){m(e,n),m(e+"Capture",n)}function m(e,n){for(c[e]=n,e=0;e<n.length;e++)i.add(n[e])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function C(e){return h.call(y,e)?!0:h.call(v,e)?!1:g.test(e)?y[e]=!0:(v[e]=!0,!1)}function F(e,n,a,o){if(a!==null&&a.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,a,o){if(n===null||typeof n>"u"||F(e,n,a,o))return!0;if(o)return!1;if(a!==null)switch(a.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 _(e,n,a,o,u,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new _(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new _(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){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var U=/[\-:]([a-z])/g;function R(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(U,R);b[n]=new _(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(U,R);b[n]=new _(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(U,R);b[n]=new _(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function M(e,n,a,o){var u=b.hasOwnProperty(n)?b[n]:null;(u!==null?u.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,a,u,o)&&(a=null),o||u===null?C(n)&&(a===null?e.removeAttribute(n):e.setAttribute(n,""+a)):u.mustUseProperty?e[u.propertyName]=a===null?u.type===3?!1:"":a:(n=u.attributeName,o=u.attributeNamespace,a===null?e.removeAttribute(n):(u=u.type,a=u===3||u===4&&a===!0?"":""+a,o?e.setAttributeNS(o,n,a):e.setAttribute(n,a))))}var P=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),ae=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),xe=Symbol.for("react.profiler"),Ne=Symbol.for("react.provider"),te=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),B=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var q=Object.assign,S;function D(e){if(S===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);S=n&&n[1]||""}return`
1
+ function g0(r,s){for(var l=0;l<s.length;l++){const i=s[l];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in r)){const d=Object.getOwnPropertyDescriptor(i,c);d&&Object.defineProperty(r,c,d.get?d:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();function y0(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Qo={exports:{}},ha={},Jo={exports:{}},ke={};var xm;function v0(){if(xm)return ke;xm=1;var r=Symbol.for("react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function C(S){return S===null||typeof S!="object"?null:(S=y&&S[y]||S["@@iterator"],typeof S=="function"?S:null)}var F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,_={};function b(S,D,Y){this.props=S,this.context=D,this.refs=_,this.updater=Y||F}b.prototype.isReactComponent={},b.prototype.setState=function(S,D){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,D,"setState")},b.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function U(){}U.prototype=b.prototype;function R(S,D,Y){this.props=S,this.context=D,this.refs=_,this.updater=Y||F}var M=R.prototype=new U;M.constructor=R,N(M,b.prototype),M.isPureReactComponent=!0;var P=Array.isArray,W=Object.prototype.hasOwnProperty,ae={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function oe(S,D,Y){var ue,ne={},be=null,Re=null;if(D!=null)for(ue in D.ref!==void 0&&(Re=D.ref),D.key!==void 0&&(be=""+D.key),D)W.call(D,ue)&&!z.hasOwnProperty(ue)&&(ne[ue]=D[ue]);var _e=arguments.length-2;if(_e===1)ne.children=Y;else if(1<_e){for(var Ie=Array(_e),it=0;it<_e;it++)Ie[it]=arguments[it+2];ne.children=Ie}if(S&&S.defaultProps)for(ue in _e=S.defaultProps,_e)ne[ue]===void 0&&(ne[ue]=_e[ue]);return{$$typeof:r,type:S,key:be,ref:Re,props:ne,_owner:ae.current}}function xe(S,D){return{$$typeof:r,type:S.type,key:D,ref:S.ref,props:S.props,_owner:S._owner}}function Ne(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function te(S){var D={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(Y){return D[Y]})}var ye=/\/+/g;function me(S,D){return typeof S=="object"&&S!==null&&S.key!=null?te(""+S.key):D.toString(36)}function ve(S,D,Y,ue,ne){var be=typeof S;(be==="undefined"||be==="boolean")&&(S=null);var Re=!1;if(S===null)Re=!0;else switch(be){case"string":case"number":Re=!0;break;case"object":switch(S.$$typeof){case r:case s:Re=!0}}if(Re)return Re=S,ne=ne(Re),S=ue===""?"."+me(Re,0):ue,P(ne)?(Y="",S!=null&&(Y=S.replace(ye,"$&/")+"/"),ve(ne,D,Y,"",function(it){return it})):ne!=null&&(Ne(ne)&&(ne=xe(ne,Y+(!ne.key||Re&&Re.key===ne.key?"":(""+ne.key).replace(ye,"$&/")+"/")+S)),D.push(ne)),1;if(Re=0,ue=ue===""?".":ue+":",P(S))for(var _e=0;_e<S.length;_e++){be=S[_e];var Ie=ue+me(be,_e);Re+=ve(be,D,Y,Ie,ne)}else if(Ie=C(S),typeof Ie=="function")for(S=Ie.call(S),_e=0;!(be=S.next()).done;)be=be.value,Ie=ue+me(be,_e++),Re+=ve(be,D,Y,Ie,ne);else if(be==="object")throw D=String(S),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.");return Re}function Z(S,D,Y){if(S==null)return S;var ue=[],ne=0;return ve(S,ue,"","",function(be){return D.call(Y,be,ne++)}),ue}function Q(S){if(S._status===-1){var D=S._result;D=D(),D.then(function(Y){(S._status===0||S._status===-1)&&(S._status=1,S._result=Y)},function(Y){(S._status===0||S._status===-1)&&(S._status=2,S._result=Y)}),S._status===-1&&(S._status=0,S._result=D)}if(S._status===1)return S._result.default;throw S._result}var X={current:null},B={transition:null},J={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:B,ReactCurrentOwner:ae};function q(){throw Error("act(...) is not supported in production builds of React.")}return ke.Children={map:Z,forEach:function(S,D,Y){Z(S,function(){D.apply(this,arguments)},Y)},count:function(S){var D=0;return Z(S,function(){D++}),D},toArray:function(S){return Z(S,function(D){return D})||[]},only:function(S){if(!Ne(S))throw Error("React.Children.only expected to receive a single React element child.");return S}},ke.Component=b,ke.Fragment=l,ke.Profiler=c,ke.PureComponent=R,ke.StrictMode=i,ke.Suspense=h,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,ke.act=q,ke.cloneElement=function(S,D,Y){if(S==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+S+".");var ue=N({},S.props),ne=S.key,be=S.ref,Re=S._owner;if(D!=null){if(D.ref!==void 0&&(be=D.ref,Re=ae.current),D.key!==void 0&&(ne=""+D.key),S.type&&S.type.defaultProps)var _e=S.type.defaultProps;for(Ie in D)W.call(D,Ie)&&!z.hasOwnProperty(Ie)&&(ue[Ie]=D[Ie]===void 0&&_e!==void 0?_e[Ie]:D[Ie])}var Ie=arguments.length-2;if(Ie===1)ue.children=Y;else if(1<Ie){_e=Array(Ie);for(var it=0;it<Ie;it++)_e[it]=arguments[it+2];ue.children=_e}return{$$typeof:r,type:S.type,key:ne,ref:be,props:ue,_owner:Re}},ke.createContext=function(S){return S={$$typeof:m,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},S.Provider={$$typeof:d,_context:S},S.Consumer=S},ke.createElement=oe,ke.createFactory=function(S){var D=oe.bind(null,S);return D.type=S,D},ke.createRef=function(){return{current:null}},ke.forwardRef=function(S){return{$$typeof:p,render:S}},ke.isValidElement=Ne,ke.lazy=function(S){return{$$typeof:v,_payload:{_status:-1,_result:S},_init:Q}},ke.memo=function(S,D){return{$$typeof:g,type:S,compare:D===void 0?null:D}},ke.startTransition=function(S){var D=B.transition;B.transition={};try{S()}finally{B.transition=D}},ke.unstable_act=q,ke.useCallback=function(S,D){return X.current.useCallback(S,D)},ke.useContext=function(S){return X.current.useContext(S)},ke.useDebugValue=function(){},ke.useDeferredValue=function(S){return X.current.useDeferredValue(S)},ke.useEffect=function(S,D){return X.current.useEffect(S,D)},ke.useId=function(){return X.current.useId()},ke.useImperativeHandle=function(S,D,Y){return X.current.useImperativeHandle(S,D,Y)},ke.useInsertionEffect=function(S,D){return X.current.useInsertionEffect(S,D)},ke.useLayoutEffect=function(S,D){return X.current.useLayoutEffect(S,D)},ke.useMemo=function(S,D){return X.current.useMemo(S,D)},ke.useReducer=function(S,D,Y){return X.current.useReducer(S,D,Y)},ke.useRef=function(S){return X.current.useRef(S)},ke.useState=function(S){return X.current.useState(S)},ke.useSyncExternalStore=function(S,D,Y){return X.current.useSyncExternalStore(S,D,Y)},ke.useTransition=function(){return X.current.useTransition()},ke.version="18.3.1",ke}var gm;function kc(){return gm||(gm=1,Jo.exports=v0()),Jo.exports}var ym;function j0(){if(ym)return ha;ym=1;var r=kc(),s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function m(p,h,g){var v,y={},C=null,F=null;g!==void 0&&(C=""+g),h.key!==void 0&&(C=""+h.key),h.ref!==void 0&&(F=h.ref);for(v in h)i.call(h,v)&&!d.hasOwnProperty(v)&&(y[v]=h[v]);if(p&&p.defaultProps)for(v in h=p.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:s,type:p,key:C,ref:F,props:y,_owner:c.current}}return ha.Fragment=l,ha.jsx=m,ha.jsxs=m,ha}var vm;function w0(){return vm||(vm=1,Qo.exports=j0()),Qo.exports}var t=w0(),Vl={},Xo={exports:{}},_t={},Zo={exports:{}},ec={};var jm;function N0(){return jm||(jm=1,(function(r){function s(B,J){var q=B.length;B.push(J);e:for(;0<q;){var S=q-1>>>1,D=B[S];if(0<c(D,J))B[S]=J,B[q]=D,q=S;else break e}}function l(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var J=B[0],q=B.pop();if(q!==J){B[0]=q;e:for(var S=0,D=B.length,Y=D>>>1;S<Y;){var ue=2*(S+1)-1,ne=B[ue],be=ue+1,Re=B[be];if(0>c(ne,q))be<D&&0>c(Re,ne)?(B[S]=Re,B[be]=q,S=be):(B[S]=ne,B[ue]=q,S=ue);else if(be<D&&0>c(Re,q))B[S]=Re,B[be]=q,S=be;else break e}}return J}function c(B,J){var q=B.sortIndex-J.sortIndex;return q!==0?q:B.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var m=Date,p=m.now();r.unstable_now=function(){return m.now()-p}}var h=[],g=[],v=1,y=null,C=3,F=!1,N=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(B){for(var J=l(g);J!==null;){if(J.callback===null)i(g);else if(J.startTime<=B)i(g),J.sortIndex=J.expirationTime,s(h,J);else break;J=l(g)}}function P(B){if(_=!1,M(B),!N)if(l(h)!==null)N=!0,Q(W);else{var J=l(g);J!==null&&X(P,J.startTime-B)}}function W(B,J){N=!1,_&&(_=!1,U(oe),oe=-1),F=!0;var q=C;try{for(M(J),y=l(h);y!==null&&(!(y.expirationTime>J)||B&&!te());){var S=y.callback;if(typeof S=="function"){y.callback=null,C=y.priorityLevel;var D=S(y.expirationTime<=J);J=r.unstable_now(),typeof D=="function"?y.callback=D:y===l(h)&&i(h),M(J)}else i(h);y=l(h)}if(y!==null)var Y=!0;else{var ue=l(g);ue!==null&&X(P,ue.startTime-J),Y=!1}return Y}finally{y=null,C=q,F=!1}}var ae=!1,z=null,oe=-1,xe=5,Ne=-1;function te(){return!(r.unstable_now()-Ne<xe)}function ye(){if(z!==null){var B=r.unstable_now();Ne=B;var J=!0;try{J=z(!0,B)}finally{J?me():(ae=!1,z=null)}}else ae=!1}var me;if(typeof R=="function")me=function(){R(ye)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Z=ve.port2;ve.port1.onmessage=ye,me=function(){Z.postMessage(null)}}else me=function(){b(ye,0)};function Q(B){z=B,ae||(ae=!0,me())}function X(B,J){oe=b(function(){B(r.unstable_now())},J)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(B){B.callback=null},r.unstable_continueExecution=function(){N||F||(N=!0,Q(W))},r.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<B?Math.floor(1e3/B):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_getFirstCallbackNode=function(){return l(h)},r.unstable_next=function(B){switch(C){case 1:case 2:case 3:var J=3;break;default:J=C}var q=C;C=J;try{return B()}finally{C=q}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(B,J){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var q=C;C=B;try{return J()}finally{C=q}},r.unstable_scheduleCallback=function(B,J,q){var S=r.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?S+q:S):q=S,B){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=q+D,B={id:v++,callback:J,priorityLevel:B,startTime:q,expirationTime:D,sortIndex:-1},q>S?(B.sortIndex=q,s(g,B),l(h)===null&&B===l(g)&&(_?(U(oe),oe=-1):_=!0,X(P,q-S))):(B.sortIndex=D,s(h,B),N||F||(N=!0,Q(W))),B},r.unstable_shouldYield=te,r.unstable_wrapCallback=function(B){var J=C;return function(){var q=C;C=J;try{return B.apply(this,arguments)}finally{C=q}}}})(ec)),ec}var wm;function b0(){return wm||(wm=1,Zo.exports=N0()),Zo.exports}var Nm;function S0(){if(Nm)return _t;Nm=1;var r=kc(),s=b0();function l(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a]);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 i=new Set,c={};function d(e,n){m(e,n),m(e+"Capture",n)}function m(e,n){for(c[e]=n,e=0;e<n.length;e++)i.add(n[e])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function C(e){return h.call(y,e)?!0:h.call(v,e)?!1:g.test(e)?y[e]=!0:(v[e]=!0,!1)}function F(e,n,a,o){if(a!==null&&a.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,a,o){if(n===null||typeof n>"u"||F(e,n,a,o))return!0;if(o)return!1;if(a!==null)switch(a.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 _(e,n,a,o,u,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new _(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new _(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){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var U=/[\-:]([a-z])/g;function R(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(U,R);b[n]=new _(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(U,R);b[n]=new _(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(U,R);b[n]=new _(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function M(e,n,a,o){var u=b.hasOwnProperty(n)?b[n]:null;(u!==null?u.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,a,u,o)&&(a=null),o||u===null?C(n)&&(a===null?e.removeAttribute(n):e.setAttribute(n,""+a)):u.mustUseProperty?e[u.propertyName]=a===null?u.type===3?!1:"":a:(n=u.attributeName,o=u.attributeNamespace,a===null?e.removeAttribute(n):(u=u.type,a=u===3||u===4&&a===!0?"":""+a,o?e.setAttributeNS(o,n,a):e.setAttribute(n,a))))}var P=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),ae=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),xe=Symbol.for("react.profiler"),Ne=Symbol.for("react.provider"),te=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),B=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var q=Object.assign,S;function D(e){if(S===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);S=n&&n[1]||""}return`
2
2
  `+S+e}var Y=!1;function ue(e,n){if(!e||Y)return"";Y=!0;var a=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(O){var o=O}Reflect.construct(e,[],n)}else{try{n.call()}catch(O){o=O}e.call(n.prototype)}else{try{throw Error()}catch(O){o=O}e()}}catch(O){if(O&&o&&typeof O.stack=="string"){for(var u=O.stack.split(`
3
3
  `),f=o.stack.split(`
4
4
  `),x=u.length-1,j=f.length-1;1<=x&&0<=j&&u[x]!==f[j];)j--;for(;1<=x&&0<=j;x--,j--)if(u[x]!==f[j]){if(x!==1||j!==1)do if(x--,j--,0>j||u[x]!==f[j]){var k=`
5
- `+u[x].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=x&&0<=j);break}}}finally{Y=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?D(e):""}function ne(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return""}}function be(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 ae:return"Portal";case xe:return"Profiler";case oe:return"StrictMode";case me:return"Suspense";case ve:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case te:return(e.displayName||"Context")+".Consumer";case Ne:return(e._context.displayName||"Context")+".Provider";case ye:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return n=e.displayName||null,n!==null?n:be(e.type)||"Memo";case Q:n=e._payload,e=e._init;try{return be(e(n))}catch{}}return null}function Te(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 be(n);case 8:return n===oe?"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 _e(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ie(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function it(e){var n=Ie(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,f=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(x){o=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function pr(e){e._valueTracker||(e._valueTracker=it(e))}function Es(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=Ie(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function Qt(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 Dn(e,n){var a=n.checked;return q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function dn(e,n){var a=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;a=_e(n.value!=null?n.value:a),e._wrapperState={initialChecked:o,initialValue:a,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Hr(e,n){n=n.checked,n!=null&&M(e,"checked",n,!1)}function xr(e,n){Hr(e,n);var a=_e(n.value),o=n.type;if(a!=null)o==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Fn(e,n.type,a):n.hasOwnProperty("defaultValue")&&Fn(e,n.type,_e(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function jn(e,n,a){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,a||n===e.value||(e.value=n),e.defaultValue=n}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function Fn(e,n,a){(n!=="number"||Qt(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var mn=Array.isArray;function wn(e,n,a,o){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&o&&(e[a].defaultSelected=!0)}else{for(a=""+_e(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function $r(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(l(91));return q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oa(e,n){var a=n.value;if(a==null){if(a=n.children,n=n.defaultValue,a!=null){if(n!=null)throw Error(l(92));if(mn(a)){if(1<a.length)throw Error(l(93));a=a[0]}n=a}n==null&&(n=""),a=n}e._wrapperState={initialValue:_e(a)}}function Vr(e,n){var a=_e(n.value),o=_e(n.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),n.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),o!=null&&(e.defaultValue=""+o)}function Un(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Nn(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 Nt(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Nn(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Bn,Cs=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,a,o,u){MSApp.execUnsafeLocalFunction(function(){return e(n,a,o,u)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Bn=Bn||document.createElement("div"),Bn.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Bn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function zn(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var bn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ia=["Webkit","ms","Moz","O"];Object.keys(bn).forEach(function(e){Ia.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),bn[n]=bn[e]})});function gr(e,n,a){return n==null||typeof n=="boolean"||n===""?"":a||typeof n!="number"||n===0||bn.hasOwnProperty(e)&&bn[e]?(""+n).trim():n+"px"}function yr(e,n){e=e.style;for(var a in n)if(n.hasOwnProperty(a)){var o=a.indexOf("--")===0,u=gr(a,n[a],o);a==="float"&&(a="cssFloat"),o?e.setProperty(a,u):e[a]=u}}var Jt=q({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 fn(e,n){if(n){if(Jt[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(l(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(l(61))}if(n.style!=null&&typeof n.style!="object")throw Error(l(62))}}function vr(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 jr=null;function _s(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hn=null,Xt=null,$n=null;function Vn(e){if(e=Zs(e)){if(typeof Hn!="function")throw Error(l(280));var n=e.stateNode;n&&(n=al(n),Hn(e.stateNode,e.type,n))}}function Ma(e){Xt?$n?$n.push(e):$n=[e]:Xt=e}function Da(){if(Xt){var e=Xt,n=$n;if($n=Xt=null,Vn(e),n)for(e=0;e<n.length;e++)Vn(n[e])}}function We(e,n){return e(n)}function Sn(){}var Ts=!1;function Rs(e,n,a){if(Ts)return e(n,a);Ts=!0;try{return We(e,n,a)}finally{Ts=!1,(Xt!==null||$n!==null)&&(Sn(),Da())}}function kn(e,n){var a=e.stateNode;if(a===null)return null;var o=al(a);if(o===null)return null;a=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var Wr=!1;if(p)try{var Wn={};Object.defineProperty(Wn,"passive",{get:function(){Wr=!0}}),window.addEventListener("test",Wn,Wn),window.removeEventListener("test",Wn,Wn)}catch{Wr=!1}function pi(e,n,a,o,u,f,x,j,k){var O=Array.prototype.slice.call(arguments,3);try{n.apply(a,O)}catch($){this.onError($)}}var ut=!1,Bt=null,wr=!1,Gr=null,As={onError:function(e){ut=!0,Bt=e}};function Fa(e,n,a,o,u,f,x,j,k){ut=!1,Bt=null,pi.apply(As,arguments)}function Zt(e,n,a,o,u,f,x,j,k){if(Fa.apply(this,arguments),ut){if(ut){var O=Bt;ut=!1,Bt=null}else throw Error(l(198));wr||(wr=!0,Gr=O)}}function hn(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function Ps(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 Ls(e){if(hn(e)!==e)throw Error(l(188))}function Ua(e){var n=e.alternate;if(!n){if(n=hn(e),n===null)throw Error(l(188));return n!==e?null:e}for(var a=e,o=n;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(o=u.return,o!==null){a=o;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return Ls(u),e;if(f===o)return Ls(u),n;f=f.sibling}throw Error(l(188))}if(a.return!==o.return)a=u,o=f;else{for(var x=!1,j=u.child;j;){if(j===a){x=!0,a=u,o=f;break}if(j===o){x=!0,o=u,a=f;break}j=j.sibling}if(!x){for(j=f.child;j;){if(j===a){x=!0,a=f,o=u;break}if(j===o){x=!0,o=f,a=u;break}j=j.sibling}if(!x)throw Error(l(189))}}if(a.alternate!==o)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:n}function Ba(e){return e=Ua(e),e!==null?de(e):null}function de(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=de(e);if(n!==null)return n;e=e.sibling}return null}var E=s.unstable_scheduleCallback,G=s.unstable_cancelCallback,le=s.unstable_shouldYield,Me=s.unstable_requestPaint,Se=s.unstable_now,Ge=s.unstable_getCurrentPriorityLevel,tt=s.unstable_ImmediatePriority,zt=s.unstable_UserBlockingPriority,en=s.unstable_NormalPriority,Os=s.unstable_LowPriority,Je=s.unstable_IdlePriority,Nr=null,Pt=null;function Ph(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(Nr,e,void 0,(e.current.flags&128)===128)}catch{}}var tn=Math.clz32?Math.clz32:Ih,Lh=Math.log,Oh=Math.LN2;function Ih(e){return e>>>=0,e===0?32:31-(Lh(e)/Oh|0)|0}var za=64,Ha=4194304;function Is(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 $a(e,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,u=e.suspendedLanes,f=e.pingedLanes,x=a&268435455;if(x!==0){var j=x&~u;j!==0?o=Is(j):(f&=x,f!==0&&(o=Is(f)))}else x=a&~u,x!==0?o=Is(x):f!==0&&(o=Is(f));if(o===0)return 0;if(n!==0&&n!==o&&(n&u)===0&&(u=o&-o,f=n&-n,u>=f||u===16&&(f&4194240)!==0))return n;if((o&4)!==0&&(o|=a&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)a=31-tn(n),u=1<<a,o|=e[a],n&=~u;return o}function Mh(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 Dh(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-tn(f),j=1<<x,k=u[x];k===-1?((j&a)===0||(j&o)!==0)&&(u[x]=Mh(j,n)):k<=n&&(e.expiredLanes|=j),f&=~j}}function xi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Kc(){var e=za;return za<<=1,(za&4194240)===0&&(za=64),e}function gi(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Ms(e,n,a){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-tn(n),e[n]=a}function Fh(e,n){var a=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 o=e.eventTimes;for(e=e.expirationTimes;0<a;){var u=31-tn(a),f=1<<u;n[u]=0,o[u]=-1,e[u]=-1,a&=~f}}function yi(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-tn(a),u=1<<o;u&n|e[o]&n&&(e[o]|=n),a&=~u}}var Le=0;function qc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Yc,vi,Qc,Jc,Xc,ji=!1,Va=[],Gn=null,Kn=null,qn=null,Ds=new Map,Fs=new Map,Yn=[],Uh="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 Zc(e,n){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":Ds.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(n.pointerId)}}function Us(e,n,a,o,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Zs(n),n!==null&&vi(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Bh(e,n,a,o,u){switch(n){case"focusin":return Gn=Us(Gn,e,n,a,o,u),!0;case"dragenter":return Kn=Us(Kn,e,n,a,o,u),!0;case"mouseover":return qn=Us(qn,e,n,a,o,u),!0;case"pointerover":var f=u.pointerId;return Ds.set(f,Us(Ds.get(f)||null,e,n,a,o,u)),!0;case"gotpointercapture":return f=u.pointerId,Fs.set(f,Us(Fs.get(f)||null,e,n,a,o,u)),!0}return!1}function eu(e){var n=br(e.target);if(n!==null){var a=hn(n);if(a!==null){if(n=a.tag,n===13){if(n=Ps(a),n!==null){e.blockedOn=n,Xc(e.priority,function(){Qc(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wa(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Ni(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);jr=o,a.target.dispatchEvent(o),jr=null}else return n=Zs(a),n!==null&&vi(n),e.blockedOn=a,!1;n.shift()}return!0}function tu(e,n,a){Wa(e)&&a.delete(n)}function zh(){ji=!1,Gn!==null&&Wa(Gn)&&(Gn=null),Kn!==null&&Wa(Kn)&&(Kn=null),qn!==null&&Wa(qn)&&(qn=null),Ds.forEach(tu),Fs.forEach(tu)}function Bs(e,n){e.blockedOn===n&&(e.blockedOn=null,ji||(ji=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,zh)))}function zs(e){function n(u){return Bs(u,e)}if(0<Va.length){Bs(Va[0],e);for(var a=1;a<Va.length;a++){var o=Va[a];o.blockedOn===e&&(o.blockedOn=null)}}for(Gn!==null&&Bs(Gn,e),Kn!==null&&Bs(Kn,e),qn!==null&&Bs(qn,e),Ds.forEach(n),Fs.forEach(n),a=0;a<Yn.length;a++)o=Yn[a],o.blockedOn===e&&(o.blockedOn=null);for(;0<Yn.length&&(a=Yn[0],a.blockedOn===null);)eu(a),a.blockedOn===null&&Yn.shift()}var Kr=P.ReactCurrentBatchConfig,Ga=!0;function Hh(e,n,a,o){var u=Le,f=Kr.transition;Kr.transition=null;try{Le=1,wi(e,n,a,o)}finally{Le=u,Kr.transition=f}}function $h(e,n,a,o){var u=Le,f=Kr.transition;Kr.transition=null;try{Le=4,wi(e,n,a,o)}finally{Le=u,Kr.transition=f}}function wi(e,n,a,o){if(Ga){var u=Ni(e,n,a,o);if(u===null)Ui(e,n,o,Ka,a),Zc(e,o);else if(Bh(u,e,n,a,o))o.stopPropagation();else if(Zc(e,o),n&4&&-1<Uh.indexOf(e)){for(;u!==null;){var f=Zs(u);if(f!==null&&Yc(f),f=Ni(e,n,a,o),f===null&&Ui(e,n,o,Ka,a),f===u)break;u=f}u!==null&&o.stopPropagation()}else Ui(e,n,o,null,a)}}var Ka=null;function Ni(e,n,a,o){if(Ka=null,e=_s(o),e=br(e),e!==null)if(n=hn(e),n===null)e=null;else if(a=n.tag,a===13){if(e=Ps(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Ka=e,null}function nu(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(Ge()){case tt:return 1;case zt:return 4;case en:case Os:return 16;case Je:return 536870912;default:return 16}default:return 16}}var Qn=null,bi=null,qa=null;function ru(){if(qa)return qa;var e,n=bi,a=n.length,o,u="value"in Qn?Qn.value:Qn.textContent,f=u.length;for(e=0;e<a&&n[e]===u[e];e++);var x=a-e;for(o=1;o<=x&&n[a-o]===u[f-o];o++);return qa=u.slice(e,1<o?1-o:void 0)}function Ya(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 Qa(){return!0}function su(){return!1}function Lt(e){function n(a,o,u,f,x){this._reactName=a,this._targetInst=u,this.type=o,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(a=e[j],this[j]=a?a(f):f[j]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Qa:su,this.isPropagationStopped=su,this}return q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),n}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Si=Lt(qr),Hs=q({},qr,{view:0,detail:0}),Vh=Lt(Hs),ki,Ei,$s,Ja=q({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_i,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!==$s&&($s&&e.type==="mousemove"?(ki=e.screenX-$s.screenX,Ei=e.screenY-$s.screenY):Ei=ki=0,$s=e),ki)},movementY:function(e){return"movementY"in e?e.movementY:Ei}}),au=Lt(Ja),Wh=q({},Ja,{dataTransfer:0}),Gh=Lt(Wh),Kh=q({},Hs,{relatedTarget:0}),Ci=Lt(Kh),qh=q({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),Yh=Lt(qh),Qh=q({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jh=Lt(Qh),Xh=q({},qr,{data:0}),lu=Lt(Xh),Zh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ep={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"},tp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function np(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=tp[e])?!!n[e]:!1}function _i(){return np}var rp=q({},Hs,{key:function(e){if(e.key){var n=Zh[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ep[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_i,charCode:function(e){return e.type==="keypress"?Ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sp=Lt(rp),ap=q({},Ja,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),iu=Lt(ap),lp=q({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_i}),ip=Lt(lp),op=q({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),cp=Lt(op),up=q({},Ja,{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}),dp=Lt(up),mp=[9,13,27,32],Ti=p&&"CompositionEvent"in window,Vs=null;p&&"documentMode"in document&&(Vs=document.documentMode);var fp=p&&"TextEvent"in window&&!Vs,ou=p&&(!Ti||Vs&&8<Vs&&11>=Vs),cu=" ",uu=!1;function du(e,n){switch(e){case"keyup":return mp.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function hp(e,n){switch(e){case"compositionend":return mu(n);case"keypress":return n.which!==32?null:(uu=!0,cu);case"textInput":return e=n.data,e===cu&&uu?null:e;default:return null}}function pp(e,n){if(Yr)return e==="compositionend"||!Ti&&du(e,n)?(e=ru(),qa=bi=Qn=null,Yr=!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 ou&&n.locale!=="ko"?null:n.data;default:return null}}var xp={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 fu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!xp[e.type]:n==="textarea"}function hu(e,n,a,o){Ma(o),n=nl(n,"onChange"),0<n.length&&(a=new Si("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var Ws=null,Gs=null;function gp(e){Pu(e,0)}function Xa(e){var n=es(e);if(Es(n))return e}function yp(e,n){if(e==="change")return n}var pu=!1;if(p){var Ri;if(p){var Ai="oninput"in document;if(!Ai){var xu=document.createElement("div");xu.setAttribute("oninput","return;"),Ai=typeof xu.oninput=="function"}Ri=Ai}else Ri=!1;pu=Ri&&(!document.documentMode||9<document.documentMode)}function gu(){Ws&&(Ws.detachEvent("onpropertychange",yu),Gs=Ws=null)}function yu(e){if(e.propertyName==="value"&&Xa(Gs)){var n=[];hu(n,Gs,e,_s(e)),Rs(gp,n)}}function vp(e,n,a){e==="focusin"?(gu(),Ws=n,Gs=a,Ws.attachEvent("onpropertychange",yu)):e==="focusout"&&gu()}function jp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xa(Gs)}function wp(e,n){if(e==="click")return Xa(n)}function Np(e,n){if(e==="input"||e==="change")return Xa(n)}function bp(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:bp;function Ks(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var u=a[o];if(!h.call(n,u)||!nn(e[u],n[u]))return!1}return!0}function vu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ju(e,n){var a=vu(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=vu(a)}}function wu(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?wu(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Nu(){for(var e=window,n=Qt();n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Qt(e.document)}return n}function Pi(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 Sp(e){var n=Nu(),a=e.focusedElem,o=e.selectionRange;if(n!==a&&a&&a.ownerDocument&&wu(a.ownerDocument.documentElement,a)){if(o!==null&&Pi(a)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in a)a.selectionStart=n,a.selectionEnd=Math.min(e,a.value.length);else if(e=(n=a.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var u=a.textContent.length,f=Math.min(o.start,u);o=o.end===void 0?f:Math.min(o.end,u),!e.extend&&f>o&&(u=o,o=f,f=u),u=ju(a,f);var x=ju(a,o);u&&x&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(u.node,u.offset),e.removeAllRanges(),f>o?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=a;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<n.length;a++)e=n[a],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var kp=p&&"documentMode"in document&&11>=document.documentMode,Qr=null,Li=null,qs=null,Oi=!1;function bu(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Oi||Qr==null||Qr!==Qt(o)||(o=Qr,"selectionStart"in o&&Pi(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),qs&&Ks(qs,o)||(qs=o,o=nl(Li,"onSelect"),0<o.length&&(n=new Si("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=Qr)))}function Za(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Jr={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},Ii={},Su={};p&&(Su=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function el(e){if(Ii[e])return Ii[e];if(!Jr[e])return e;var n=Jr[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Su)return Ii[e]=n[a];return e}var ku=el("animationend"),Eu=el("animationiteration"),Cu=el("animationstart"),_u=el("transitionend"),Tu=new Map,Ru="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 Jn(e,n){Tu.set(e,n),d(n,[e])}for(var Mi=0;Mi<Ru.length;Mi++){var Di=Ru[Mi],Ep=Di.toLowerCase(),Cp=Di[0].toUpperCase()+Di.slice(1);Jn(Ep,"on"+Cp)}Jn(ku,"onAnimationEnd"),Jn(Eu,"onAnimationIteration"),Jn(Cu,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(_u,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),_p=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ys));function Au(e,n,a){var o=e.type||"unknown-event";e.currentTarget=a,Zt(o,n,void 0,e),e.currentTarget=null}function Pu(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],u=o.event;o=o.listeners;e:{var f=void 0;if(n)for(var x=o.length-1;0<=x;x--){var j=o[x],k=j.instance,O=j.currentTarget;if(j=j.listener,k!==f&&u.isPropagationStopped())break e;Au(u,j,O),f=k}else for(x=0;x<o.length;x++){if(j=o[x],k=j.instance,O=j.currentTarget,j=j.listener,k!==f&&u.isPropagationStopped())break e;Au(u,j,O),f=k}}}if(wr)throw e=Gr,wr=!1,Gr=null,e}function Ue(e,n){var a=n[Wi];a===void 0&&(a=n[Wi]=new Set);var o=e+"__bubble";a.has(o)||(Lu(n,e,2,!1),a.add(o))}function Fi(e,n,a){var o=0;n&&(o|=4),Lu(a,e,o,n)}var tl="_reactListening"+Math.random().toString(36).slice(2);function Qs(e){if(!e[tl]){e[tl]=!0,i.forEach(function(a){a!=="selectionchange"&&(_p.has(a)||Fi(a,!1,e),Fi(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[tl]||(n[tl]=!0,Fi("selectionchange",!1,n))}}function Lu(e,n,a,o){switch(nu(n)){case 1:var u=Hh;break;case 4:u=$h;break;default:u=wi}a=u.bind(null,n,a,e),u=void 0,!Wr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(n,a,{capture:!0,passive:u}):e.addEventListener(n,a,!0):u!==void 0?e.addEventListener(n,a,{passive:u}):e.addEventListener(n,a,!1)}function Ui(e,n,a,o,u){var f=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var j=o.stateNode.containerInfo;if(j===u||j.nodeType===8&&j.parentNode===u)break;if(x===4)for(x=o.return;x!==null;){var k=x.tag;if((k===3||k===4)&&(k=x.stateNode.containerInfo,k===u||k.nodeType===8&&k.parentNode===u))return;x=x.return}for(;j!==null;){if(x=br(j),x===null)return;if(k=x.tag,k===5||k===6){o=f=x;continue e}j=j.parentNode}}o=o.return}Rs(function(){var O=f,$=_s(a),V=[];e:{var H=Tu.get(e);if(H!==void 0){var ee=Si,se=e;switch(e){case"keypress":if(Ya(a)===0)break e;case"keydown":case"keyup":ee=sp;break;case"focusin":se="focus",ee=Ci;break;case"focusout":se="blur",ee=Ci;break;case"beforeblur":case"afterblur":ee=Ci;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=au;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Gh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=ip;break;case ku:case Eu:case Cu:ee=Yh;break;case _u:ee=cp;break;case"scroll":ee=Vh;break;case"wheel":ee=dp;break;case"copy":case"cut":case"paste":ee=Jh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=iu}var ie=(n&4)!==0,Ye=!ie&&e==="scroll",A=ie?H!==null?H+"Capture":null:H;ie=[];for(var T=O,L;T!==null;){L=T;var K=L.stateNode;if(L.tag===5&&K!==null&&(L=K,A!==null&&(K=kn(T,A),K!=null&&ie.push(Js(T,K,L)))),Ye)break;T=T.return}0<ie.length&&(H=new ee(H,se,null,a,$),V.push({event:H,listeners:ie}))}}if((n&7)===0){e:{if(H=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",H&&a!==jr&&(se=a.relatedTarget||a.fromElement)&&(br(se)||se[En]))break e;if((ee||H)&&(H=$.window===$?$:(H=$.ownerDocument)?H.defaultView||H.parentWindow:window,ee?(se=a.relatedTarget||a.toElement,ee=O,se=se?br(se):null,se!==null&&(Ye=hn(se),se!==Ye||se.tag!==5&&se.tag!==6)&&(se=null)):(ee=null,se=O),ee!==se)){if(ie=au,K="onMouseLeave",A="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(ie=iu,K="onPointerLeave",A="onPointerEnter",T="pointer"),Ye=ee==null?H:es(ee),L=se==null?H:es(se),H=new ie(K,T+"leave",ee,a,$),H.target=Ye,H.relatedTarget=L,K=null,br($)===O&&(ie=new ie(A,T+"enter",se,a,$),ie.target=L,ie.relatedTarget=Ye,K=ie),Ye=K,ee&&se)t:{for(ie=ee,A=se,T=0,L=ie;L;L=Xr(L))T++;for(L=0,K=A;K;K=Xr(K))L++;for(;0<T-L;)ie=Xr(ie),T--;for(;0<L-T;)A=Xr(A),L--;for(;T--;){if(ie===A||A!==null&&ie===A.alternate)break t;ie=Xr(ie),A=Xr(A)}ie=null}else ie=null;ee!==null&&Ou(V,H,ee,ie,!1),se!==null&&Ye!==null&&Ou(V,Ye,se,ie,!0)}}e:{if(H=O?es(O):window,ee=H.nodeName&&H.nodeName.toLowerCase(),ee==="select"||ee==="input"&&H.type==="file")var ce=yp;else if(fu(H))if(pu)ce=Np;else{ce=jp;var fe=vp}else(ee=H.nodeName)&&ee.toLowerCase()==="input"&&(H.type==="checkbox"||H.type==="radio")&&(ce=wp);if(ce&&(ce=ce(e,O))){hu(V,ce,a,$);break e}fe&&fe(e,H,O),e==="focusout"&&(fe=H._wrapperState)&&fe.controlled&&H.type==="number"&&Fn(H,"number",H.value)}switch(fe=O?es(O):window,e){case"focusin":(fu(fe)||fe.contentEditable==="true")&&(Qr=fe,Li=O,qs=null);break;case"focusout":qs=Li=Qr=null;break;case"mousedown":Oi=!0;break;case"contextmenu":case"mouseup":case"dragend":Oi=!1,bu(V,a,$);break;case"selectionchange":if(kp)break;case"keydown":case"keyup":bu(V,a,$)}var he;if(Ti)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Yr?du(e,a)&&(je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(je="onCompositionStart");je&&(ou&&a.locale!=="ko"&&(Yr||je!=="onCompositionStart"?je==="onCompositionEnd"&&Yr&&(he=ru()):(Qn=$,bi="value"in Qn?Qn.value:Qn.textContent,Yr=!0)),fe=nl(O,je),0<fe.length&&(je=new lu(je,e,null,a,$),V.push({event:je,listeners:fe}),he?je.data=he:(he=mu(a),he!==null&&(je.data=he)))),(he=fp?hp(e,a):pp(e,a))&&(O=nl(O,"onBeforeInput"),0<O.length&&($=new lu("onBeforeInput","beforeinput",null,a,$),V.push({event:$,listeners:O}),$.data=he))}Pu(V,n)})}function Js(e,n,a){return{instance:e,listener:n,currentTarget:a}}function nl(e,n){for(var a=n+"Capture",o=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=kn(e,a),f!=null&&o.unshift(Js(e,f,u)),f=kn(e,n),f!=null&&o.push(Js(e,f,u))),e=e.return}return o}function Xr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ou(e,n,a,o,u){for(var f=n._reactName,x=[];a!==null&&a!==o;){var j=a,k=j.alternate,O=j.stateNode;if(k!==null&&k===o)break;j.tag===5&&O!==null&&(j=O,u?(k=kn(a,f),k!=null&&x.unshift(Js(a,k,j))):u||(k=kn(a,f),k!=null&&x.push(Js(a,k,j)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var Tp=/\r\n?/g,Rp=/\u0000|\uFFFD/g;function Iu(e){return(typeof e=="string"?e:""+e).replace(Tp,`
6
- `).replace(Rp,"")}function rl(e,n,a){if(n=Iu(n),Iu(e)!==n&&a)throw Error(l(425))}function sl(){}var Bi=null,zi=null;function Hi(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 $i=typeof setTimeout=="function"?setTimeout:void 0,Ap=typeof clearTimeout=="function"?clearTimeout:void 0,Mu=typeof Promise=="function"?Promise:void 0,Pp=typeof queueMicrotask=="function"?queueMicrotask:typeof Mu<"u"?function(e){return Mu.resolve(null).then(e).catch(Lp)}:$i;function Lp(e){setTimeout(function(){throw e})}function Vi(e,n){var a=n,o=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(o===0){e.removeChild(u),zs(n);return}o--}else a!=="$"&&a!=="$?"&&a!=="$!"||o++;a=u}while(a);zs(n)}function Xn(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 Du(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(n===0)return e;n--}else a==="/$"&&n++}e=e.previousSibling}return null}var Zr=Math.random().toString(36).slice(2),pn="__reactFiber$"+Zr,Xs="__reactProps$"+Zr,En="__reactContainer$"+Zr,Wi="__reactEvents$"+Zr,Op="__reactListeners$"+Zr,Ip="__reactHandles$"+Zr;function br(e){var n=e[pn];if(n)return n;for(var a=e.parentNode;a;){if(n=a[En]||a[pn]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Du(e);e!==null;){if(a=e[pn])return a;e=Du(e)}return n}e=a,a=e.parentNode}return null}function Zs(e){return e=e[pn]||e[En],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function al(e){return e[Xs]||null}var Gi=[],ts=-1;function Zn(e){return{current:e}}function Be(e){0>ts||(e.current=Gi[ts],Gi[ts]=null,ts--)}function De(e,n){ts++,Gi[ts]=e.current,e.current=n}var er={},dt=Zn(er),bt=Zn(!1),Sr=er;function ns(e,n){var a=e.type.contextTypes;if(!a)return er;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in a)u[f]=n[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function St(e){return e=e.childContextTypes,e!=null}function ll(){Be(bt),Be(dt)}function Fu(e,n,a){if(dt.current!==er)throw Error(l(168));De(dt,n),De(bt,a)}function Uu(e,n,a){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return a;o=o.getChildContext();for(var u in o)if(!(u in n))throw Error(l(108,Te(e)||"Unknown",u));return q({},a,o)}function il(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||er,Sr=dt.current,De(dt,e),De(bt,bt.current),!0}function Bu(e,n,a){var o=e.stateNode;if(!o)throw Error(l(169));a?(e=Uu(e,n,Sr),o.__reactInternalMemoizedMergedChildContext=e,Be(bt),Be(dt),De(dt,e)):Be(bt),De(bt,a)}var Cn=null,ol=!1,Ki=!1;function zu(e){Cn===null?Cn=[e]:Cn.push(e)}function Mp(e){ol=!0,zu(e)}function tr(){if(!Ki&&Cn!==null){Ki=!0;var e=0,n=Le;try{var a=Cn;for(Le=1;e<a.length;e++){var o=a[e];do o=o(!0);while(o!==null)}Cn=null,ol=!1}catch(u){throw Cn!==null&&(Cn=Cn.slice(e+1)),E(tt,tr),u}finally{Le=n,Ki=!1}}return null}var rs=[],ss=0,cl=null,ul=0,Ht=[],$t=0,kr=null,_n=1,Tn="";function Er(e,n){rs[ss++]=ul,rs[ss++]=cl,cl=e,ul=n}function Hu(e,n,a){Ht[$t++]=_n,Ht[$t++]=Tn,Ht[$t++]=kr,kr=e;var o=_n;e=Tn;var u=32-tn(o)-1;o&=~(1<<u),a+=1;var f=32-tn(n)+u;if(30<f){var x=u-u%5;f=(o&(1<<x)-1).toString(32),o>>=x,u-=x,_n=1<<32-tn(n)+u|a<<u|o,Tn=f+e}else _n=1<<f|a<<u|o,Tn=e}function qi(e){e.return!==null&&(Er(e,1),Hu(e,1,0))}function Yi(e){for(;e===cl;)cl=rs[--ss],rs[ss]=null,ul=rs[--ss],rs[ss]=null;for(;e===kr;)kr=Ht[--$t],Ht[$t]=null,Tn=Ht[--$t],Ht[$t]=null,_n=Ht[--$t],Ht[$t]=null}var Ot=null,It=null,ze=!1,rn=null;function $u(e,n){var a=Kt(5,null,null,0);a.elementType="DELETED",a.stateNode=n,a.return=e,n=e.deletions,n===null?(e.deletions=[a],e.flags|=16):n.push(a)}function Vu(e,n){switch(e.tag){case 5:var a=e.type;return n=n.nodeType!==1||a.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Ot=e,It=Xn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Ot=e,It=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(a=kr!==null?{id:_n,overflow:Tn}:null,e.memoizedState={dehydrated:n,treeContext:a,retryLane:1073741824},a=Kt(18,null,null,0),a.stateNode=n,a.return=e,e.child=a,Ot=e,It=null,!0):!1;default:return!1}}function Qi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ji(e){if(ze){var n=It;if(n){var a=n;if(!Vu(e,n)){if(Qi(e))throw Error(l(418));n=Xn(a.nextSibling);var o=Ot;n&&Vu(e,n)?$u(o,a):(e.flags=e.flags&-4097|2,ze=!1,Ot=e)}}else{if(Qi(e))throw Error(l(418));e.flags=e.flags&-4097|2,ze=!1,Ot=e}}}function Wu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ot=e}function dl(e){if(e!==Ot)return!1;if(!ze)return Wu(e),ze=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Hi(e.type,e.memoizedProps)),n&&(n=It)){if(Qi(e))throw Gu(),Error(l(418));for(;n;)$u(e,n),n=Xn(n.nextSibling)}if(Wu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(n===0){It=Xn(e.nextSibling);break e}n--}else a!=="$"&&a!=="$!"&&a!=="$?"||n++}e=e.nextSibling}It=null}}else It=Ot?Xn(e.stateNode.nextSibling):null;return!0}function Gu(){for(var e=It;e;)e=Xn(e.nextSibling)}function as(){It=Ot=null,ze=!1}function Xi(e){rn===null?rn=[e]:rn.push(e)}var Dp=P.ReactCurrentBatchConfig;function ea(e,n,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(l(309));var o=a.stateNode}if(!o)throw Error(l(147,e));var u=o,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(x){var j=u.refs;x===null?delete j[f]:j[f]=x},n._stringRef=f,n)}if(typeof e!="string")throw Error(l(284));if(!a._owner)throw Error(l(290,e))}return e}function ml(e,n){throw e=Object.prototype.toString.call(n),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Ku(e){var n=e._init;return n(e._payload)}function qu(e){function n(A,T){if(e){var L=A.deletions;L===null?(A.deletions=[T],A.flags|=16):L.push(T)}}function a(A,T){if(!e)return null;for(;T!==null;)n(A,T),T=T.sibling;return null}function o(A,T){for(A=new Map;T!==null;)T.key!==null?A.set(T.key,T):A.set(T.index,T),T=T.sibling;return A}function u(A,T){return A=cr(A,T),A.index=0,A.sibling=null,A}function f(A,T,L){return A.index=L,e?(L=A.alternate,L!==null?(L=L.index,L<T?(A.flags|=2,T):L):(A.flags|=2,T)):(A.flags|=1048576,T)}function x(A){return e&&A.alternate===null&&(A.flags|=2),A}function j(A,T,L,K){return T===null||T.tag!==6?(T=Vo(L,A.mode,K),T.return=A,T):(T=u(T,L),T.return=A,T)}function k(A,T,L,K){var ce=L.type;return ce===z?$(A,T,L.props.children,K,L.key):T!==null&&(T.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Q&&Ku(ce)===T.type)?(K=u(T,L.props),K.ref=ea(A,T,L),K.return=A,K):(K=Ml(L.type,L.key,L.props,null,A.mode,K),K.ref=ea(A,T,L),K.return=A,K)}function O(A,T,L,K){return T===null||T.tag!==4||T.stateNode.containerInfo!==L.containerInfo||T.stateNode.implementation!==L.implementation?(T=Wo(L,A.mode,K),T.return=A,T):(T=u(T,L.children||[]),T.return=A,T)}function $(A,T,L,K,ce){return T===null||T.tag!==7?(T=Or(L,A.mode,K,ce),T.return=A,T):(T=u(T,L),T.return=A,T)}function V(A,T,L){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Vo(""+T,A.mode,L),T.return=A,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case W:return L=Ml(T.type,T.key,T.props,null,A.mode,L),L.ref=ea(A,null,T),L.return=A,L;case ae:return T=Wo(T,A.mode,L),T.return=A,T;case Q:var K=T._init;return V(A,K(T._payload),L)}if(mn(T)||J(T))return T=Or(T,A.mode,L,null),T.return=A,T;ml(A,T)}return null}function H(A,T,L,K){var ce=T!==null?T.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return ce!==null?null:j(A,T,""+L,K);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case W:return L.key===ce?k(A,T,L,K):null;case ae:return L.key===ce?O(A,T,L,K):null;case Q:return ce=L._init,H(A,T,ce(L._payload),K)}if(mn(L)||J(L))return ce!==null?null:$(A,T,L,K,null);ml(A,L)}return null}function ee(A,T,L,K,ce){if(typeof K=="string"&&K!==""||typeof K=="number")return A=A.get(L)||null,j(T,A,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case W:return A=A.get(K.key===null?L:K.key)||null,k(T,A,K,ce);case ae:return A=A.get(K.key===null?L:K.key)||null,O(T,A,K,ce);case Q:var fe=K._init;return ee(A,T,L,fe(K._payload),ce)}if(mn(K)||J(K))return A=A.get(L)||null,$(T,A,K,ce,null);ml(T,K)}return null}function se(A,T,L,K){for(var ce=null,fe=null,he=T,je=T=0,st=null;he!==null&&je<L.length;je++){he.index>je?(st=he,he=null):st=he.sibling;var Pe=H(A,he,L[je],K);if(Pe===null){he===null&&(he=st);break}e&&he&&Pe.alternate===null&&n(A,he),T=f(Pe,T,je),fe===null?ce=Pe:fe.sibling=Pe,fe=Pe,he=st}if(je===L.length)return a(A,he),ze&&Er(A,je),ce;if(he===null){for(;je<L.length;je++)he=V(A,L[je],K),he!==null&&(T=f(he,T,je),fe===null?ce=he:fe.sibling=he,fe=he);return ze&&Er(A,je),ce}for(he=o(A,he);je<L.length;je++)st=ee(he,A,je,L[je],K),st!==null&&(e&&st.alternate!==null&&he.delete(st.key===null?je:st.key),T=f(st,T,je),fe===null?ce=st:fe.sibling=st,fe=st);return e&&he.forEach(function(ur){return n(A,ur)}),ze&&Er(A,je),ce}function ie(A,T,L,K){var ce=J(L);if(typeof ce!="function")throw Error(l(150));if(L=ce.call(L),L==null)throw Error(l(151));for(var fe=ce=null,he=T,je=T=0,st=null,Pe=L.next();he!==null&&!Pe.done;je++,Pe=L.next()){he.index>je?(st=he,he=null):st=he.sibling;var ur=H(A,he,Pe.value,K);if(ur===null){he===null&&(he=st);break}e&&he&&ur.alternate===null&&n(A,he),T=f(ur,T,je),fe===null?ce=ur:fe.sibling=ur,fe=ur,he=st}if(Pe.done)return a(A,he),ze&&Er(A,je),ce;if(he===null){for(;!Pe.done;je++,Pe=L.next())Pe=V(A,Pe.value,K),Pe!==null&&(T=f(Pe,T,je),fe===null?ce=Pe:fe.sibling=Pe,fe=Pe);return ze&&Er(A,je),ce}for(he=o(A,he);!Pe.done;je++,Pe=L.next())Pe=ee(he,A,je,Pe.value,K),Pe!==null&&(e&&Pe.alternate!==null&&he.delete(Pe.key===null?je:Pe.key),T=f(Pe,T,je),fe===null?ce=Pe:fe.sibling=Pe,fe=Pe);return e&&he.forEach(function(x0){return n(A,x0)}),ze&&Er(A,je),ce}function Ye(A,T,L,K){if(typeof L=="object"&&L!==null&&L.type===z&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case W:e:{for(var ce=L.key,fe=T;fe!==null;){if(fe.key===ce){if(ce=L.type,ce===z){if(fe.tag===7){a(A,fe.sibling),T=u(fe,L.props.children),T.return=A,A=T;break e}}else if(fe.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Q&&Ku(ce)===fe.type){a(A,fe.sibling),T=u(fe,L.props),T.ref=ea(A,fe,L),T.return=A,A=T;break e}a(A,fe);break}else n(A,fe);fe=fe.sibling}L.type===z?(T=Or(L.props.children,A.mode,K,L.key),T.return=A,A=T):(K=Ml(L.type,L.key,L.props,null,A.mode,K),K.ref=ea(A,T,L),K.return=A,A=K)}return x(A);case ae:e:{for(fe=L.key;T!==null;){if(T.key===fe)if(T.tag===4&&T.stateNode.containerInfo===L.containerInfo&&T.stateNode.implementation===L.implementation){a(A,T.sibling),T=u(T,L.children||[]),T.return=A,A=T;break e}else{a(A,T);break}else n(A,T);T=T.sibling}T=Wo(L,A.mode,K),T.return=A,A=T}return x(A);case Q:return fe=L._init,Ye(A,T,fe(L._payload),K)}if(mn(L))return se(A,T,L,K);if(J(L))return ie(A,T,L,K);ml(A,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,T!==null&&T.tag===6?(a(A,T.sibling),T=u(T,L),T.return=A,A=T):(a(A,T),T=Vo(L,A.mode,K),T.return=A,A=T),x(A)):a(A,T)}return Ye}var ls=qu(!0),Yu=qu(!1),fl=Zn(null),hl=null,is=null,Zi=null;function eo(){Zi=is=hl=null}function to(e){var n=fl.current;Be(fl),e._currentValue=n}function no(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function os(e,n){hl=e,Zi=is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(kt=!0),e.firstContext=null)}function Vt(e){var n=e._currentValue;if(Zi!==e)if(e={context:e,memoizedValue:n,next:null},is===null){if(hl===null)throw Error(l(308));is=e,hl.dependencies={lanes:0,firstContext:e}}else is=is.next=e;return n}var Cr=null;function ro(e){Cr===null?Cr=[e]:Cr.push(e)}function Qu(e,n,a,o){var u=n.interleaved;return u===null?(a.next=a,ro(n)):(a.next=u.next,u.next=a),n.interleaved=a,Rn(e,o)}function Rn(e,n){e.lanes|=n;var a=e.alternate;for(a!==null&&(a.lanes|=n),a=e,e=e.return;e!==null;)e.childLanes|=n,a=e.alternate,a!==null&&(a.childLanes|=n),a=e,e=e.return;return a.tag===3?a.stateNode:null}var nr=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ju(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 An(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function rr(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Re&2)!==0){var u=o.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),o.pending=n,Rn(e,a)}return u=o.interleaved,u===null?(n.next=n,ro(o)):(n.next=u.next,u.next=n),o.interleaved=n,Rn(e,a)}function pl(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,yi(e,a)}}function Xu(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var x={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};f===null?u=f=x:f=f.next=x,a=a.next}while(a!==null);f===null?u=f=n:f=f.next=n}else u=f=n;a={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}function xl(e,n,a,o){var u=e.updateQueue;nr=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var k=j,O=k.next;k.next=null,x===null?f=O:x.next=O,x=k;var $=e.alternate;$!==null&&($=$.updateQueue,j=$.lastBaseUpdate,j!==x&&(j===null?$.firstBaseUpdate=O:j.next=O,$.lastBaseUpdate=k))}if(f!==null){var V=u.baseState;x=0,$=O=k=null,j=f;do{var H=j.lane,ee=j.eventTime;if((o&H)===H){$!==null&&($=$.next={eventTime:ee,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var se=e,ie=j;switch(H=n,ee=a,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){V=se.call(ee,V,H);break e}V=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,H=typeof se=="function"?se.call(ee,V,H):se,H==null)break e;V=q({},V,H);break e;case 2:nr=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,H=u.effects,H===null?u.effects=[j]:H.push(j))}else ee={eventTime:ee,lane:H,tag:j.tag,payload:j.payload,callback:j.callback,next:null},$===null?(O=$=ee,k=V):$=$.next=ee,x|=H;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;H=j,j=H.next,H.next=null,u.lastBaseUpdate=H,u.shared.pending=null}}while(!0);if($===null&&(k=V),u.baseState=k,u.firstBaseUpdate=O,u.lastBaseUpdate=$,n=u.shared.interleaved,n!==null){u=n;do x|=u.lane,u=u.next;while(u!==n)}else f===null&&(u.shared.lanes=0);Rr|=x,e.lanes=x,e.memoizedState=V}}function Zu(e,n,a){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],u=o.callback;if(u!==null){if(o.callback=null,o=a,typeof u!="function")throw Error(l(191,u));u.call(o)}}}var ta={},xn=Zn(ta),na=Zn(ta),ra=Zn(ta);function _r(e){if(e===ta)throw Error(l(174));return e}function ao(e,n){switch(De(ra,n),De(na,e),De(xn,ta),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Nt(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Nt(n,e)}Be(xn),De(xn,n)}function cs(){Be(xn),Be(na),Be(ra)}function ed(e){_r(ra.current);var n=_r(xn.current),a=Nt(n,e.type);n!==a&&(De(na,e),De(xn,a))}function lo(e){na.current===e&&(Be(xn),Be(na))}var $e=Zn(0);function gl(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.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 io=[];function oo(){for(var e=0;e<io.length;e++)io[e]._workInProgressVersionPrimary=null;io.length=0}var yl=P.ReactCurrentDispatcher,co=P.ReactCurrentBatchConfig,Tr=0,Ve=null,Ze=null,nt=null,vl=!1,sa=!1,aa=0,Fp=0;function mt(){throw Error(l(321))}function uo(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!nn(e[a],n[a]))return!1;return!0}function mo(e,n,a,o,u,f){if(Tr=f,Ve=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,yl.current=e===null||e.memoizedState===null?Hp:$p,e=a(o,u),sa){f=0;do{if(sa=!1,aa=0,25<=f)throw Error(l(301));f+=1,nt=Ze=null,n.updateQueue=null,yl.current=Vp,e=a(o,u)}while(sa)}if(yl.current=Nl,n=Ze!==null&&Ze.next!==null,Tr=0,nt=Ze=Ve=null,vl=!1,n)throw Error(l(300));return e}function fo(){var e=aa!==0;return aa=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ve.memoizedState=nt=e:nt=nt.next=e,nt}function Wt(){if(Ze===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var n=nt===null?Ve.memoizedState:nt.next;if(n!==null)nt=n,Ze=e;else{if(e===null)throw Error(l(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},nt===null?Ve.memoizedState=nt=e:nt=nt.next=e}return nt}function la(e,n){return typeof n=="function"?n(e):n}function ho(e){var n=Wt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var o=Ze,u=o.baseQueue,f=a.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}o.baseQueue=u=f,a.pending=null}if(u!==null){f=u.next,o=o.baseState;var j=x=null,k=null,O=f;do{var $=O.lane;if((Tr&$)===$)k!==null&&(k=k.next={lane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),o=O.hasEagerState?O.eagerState:e(o,O.action);else{var V={lane:$,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null};k===null?(j=k=V,x=o):k=k.next=V,Ve.lanes|=$,Rr|=$}O=O.next}while(O!==null&&O!==f);k===null?x=o:k.next=j,nn(o,n.memoizedState)||(kt=!0),n.memoizedState=o,n.baseState=x,n.baseQueue=k,a.lastRenderedState=o}if(e=a.interleaved,e!==null){u=e;do f=u.lane,Ve.lanes|=f,Rr|=f,u=u.next;while(u!==e)}else u===null&&(a.lanes=0);return[n.memoizedState,a.dispatch]}function po(e){var n=Wt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var o=a.dispatch,u=a.pending,f=n.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do f=e(f,x.action),x=x.next;while(x!==u);nn(f,n.memoizedState)||(kt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,o]}function td(){}function nd(e,n){var a=Ve,o=Wt(),u=n(),f=!nn(o.memoizedState,u);if(f&&(o.memoizedState=u,kt=!0),o=o.queue,xo(ad.bind(null,a,o,e),[e]),o.getSnapshot!==n||f||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,ia(9,sd.bind(null,a,o,u,n),void 0,null),rt===null)throw Error(l(349));(Tr&30)!==0||rd(a,n,u)}return u}function rd(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Ve.updateQueue,n===null?(n={lastEffect:null,stores:null},Ve.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function sd(e,n,a,o){n.value=a,n.getSnapshot=o,ld(n)&&id(e)}function ad(e,n,a){return a(function(){ld(n)&&id(e)})}function ld(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!nn(e,a)}catch{return!0}}function id(e){var n=Rn(e,1);n!==null&&on(n,e,1,-1)}function od(e){var n=gn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:e},n.queue=e,e=e.dispatch=zp.bind(null,Ve,e),[n.memoizedState,e]}function ia(e,n,a,o){return e={tag:e,create:n,destroy:a,deps:o,next:null},n=Ve.updateQueue,n===null?(n={lastEffect:null,stores:null},Ve.updateQueue=n,n.lastEffect=e.next=e):(a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e)),e}function cd(){return Wt().memoizedState}function jl(e,n,a,o){var u=gn();Ve.flags|=e,u.memoizedState=ia(1|n,a,void 0,o===void 0?null:o)}function wl(e,n,a,o){var u=Wt();o=o===void 0?null:o;var f=void 0;if(Ze!==null){var x=Ze.memoizedState;if(f=x.destroy,o!==null&&uo(o,x.deps)){u.memoizedState=ia(n,a,f,o);return}}Ve.flags|=e,u.memoizedState=ia(1|n,a,f,o)}function ud(e,n){return jl(8390656,8,e,n)}function xo(e,n){return wl(2048,8,e,n)}function dd(e,n){return wl(4,2,e,n)}function md(e,n){return wl(4,4,e,n)}function fd(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 hd(e,n,a){return a=a!=null?a.concat([e]):null,wl(4,4,fd.bind(null,n,e),a)}function go(){}function pd(e,n){var a=Wt();n=n===void 0?null:n;var o=a.memoizedState;return o!==null&&n!==null&&uo(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function xd(e,n){var a=Wt();n=n===void 0?null:n;var o=a.memoizedState;return o!==null&&n!==null&&uo(n,o[1])?o[0]:(e=e(),a.memoizedState=[e,n],e)}function gd(e,n,a){return(Tr&21)===0?(e.baseState&&(e.baseState=!1,kt=!0),e.memoizedState=a):(nn(a,n)||(a=Kc(),Ve.lanes|=a,Rr|=a,e.baseState=!0),n)}function Up(e,n){var a=Le;Le=a!==0&&4>a?a:4,e(!0);var o=co.transition;co.transition={};try{e(!1),n()}finally{Le=a,co.transition=o}}function yd(){return Wt().memoizedState}function Bp(e,n,a){var o=ir(e);if(a={lane:o,action:a,hasEagerState:!1,eagerState:null,next:null},vd(e))jd(n,a);else if(a=Qu(e,n,a,o),a!==null){var u=yt();on(a,e,o,u),wd(a,n,o)}}function zp(e,n,a){var o=ir(e),u={lane:o,action:a,hasEagerState:!1,eagerState:null,next:null};if(vd(e))jd(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,j=f(x,a);if(u.hasEagerState=!0,u.eagerState=j,nn(j,x)){var k=n.interleaved;k===null?(u.next=u,ro(n)):(u.next=k.next,k.next=u),n.interleaved=u;return}}catch{}a=Qu(e,n,u,o),a!==null&&(u=yt(),on(a,e,o,u),wd(a,n,o))}}function vd(e){var n=e.alternate;return e===Ve||n!==null&&n===Ve}function jd(e,n){sa=vl=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function wd(e,n,a){if((a&4194240)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,yi(e,a)}}var Nl={readContext:Vt,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},Hp={readContext:Vt,useCallback:function(e,n){return gn().memoizedState=[e,n===void 0?null:n],e},useContext:Vt,useEffect:ud,useImperativeHandle:function(e,n,a){return a=a!=null?a.concat([e]):null,jl(4194308,4,fd.bind(null,n,e),a)},useLayoutEffect:function(e,n){return jl(4194308,4,e,n)},useInsertionEffect:function(e,n){return jl(4,2,e,n)},useMemo:function(e,n){var a=gn();return n=n===void 0?null:n,e=e(),a.memoizedState=[e,n],e},useReducer:function(e,n,a){var o=gn();return n=a!==void 0?a(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=Bp.bind(null,Ve,e),[o.memoizedState,e]},useRef:function(e){var n=gn();return e={current:e},n.memoizedState=e},useState:od,useDebugValue:go,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=od(!1),n=e[0];return e=Up.bind(null,e[1]),gn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,a){var o=Ve,u=gn();if(ze){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),rt===null)throw Error(l(349));(Tr&30)!==0||rd(o,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,ud(ad.bind(null,o,f,e),[e]),o.flags|=2048,ia(9,sd.bind(null,o,f,a,n),void 0,null),a},useId:function(){var e=gn(),n=rt.identifierPrefix;if(ze){var a=Tn,o=_n;a=(o&~(1<<32-tn(o)-1)).toString(32)+a,n=":"+n+"R"+a,a=aa++,0<a&&(n+="H"+a.toString(32)),n+=":"}else a=Fp++,n=":"+n+"r"+a.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},$p={readContext:Vt,useCallback:pd,useContext:Vt,useEffect:xo,useImperativeHandle:hd,useInsertionEffect:dd,useLayoutEffect:md,useMemo:xd,useReducer:ho,useRef:cd,useState:function(){return ho(la)},useDebugValue:go,useDeferredValue:function(e){var n=Wt();return gd(n,Ze.memoizedState,e)},useTransition:function(){var e=ho(la)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:td,useSyncExternalStore:nd,useId:yd,unstable_isNewReconciler:!1},Vp={readContext:Vt,useCallback:pd,useContext:Vt,useEffect:xo,useImperativeHandle:hd,useInsertionEffect:dd,useLayoutEffect:md,useMemo:xd,useReducer:po,useRef:cd,useState:function(){return po(la)},useDebugValue:go,useDeferredValue:function(e){var n=Wt();return Ze===null?n.memoizedState=e:gd(n,Ze.memoizedState,e)},useTransition:function(){var e=po(la)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:td,useSyncExternalStore:nd,useId:yd,unstable_isNewReconciler:!1};function sn(e,n){if(e&&e.defaultProps){n=q({},n),e=e.defaultProps;for(var a in e)n[a]===void 0&&(n[a]=e[a]);return n}return n}function yo(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:q({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var bl={isMounted:function(e){return(e=e._reactInternals)?hn(e)===e:!1},enqueueSetState:function(e,n,a){e=e._reactInternals;var o=yt(),u=ir(e),f=An(o,u);f.payload=n,a!=null&&(f.callback=a),n=rr(e,f,u),n!==null&&(on(n,e,u,o),pl(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=yt(),u=ir(e),f=An(o,u);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=rr(e,f,u),n!==null&&(on(n,e,u,o),pl(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=yt(),o=ir(e),u=An(a,o);u.tag=2,n!=null&&(u.callback=n),n=rr(e,u,o),n!==null&&(on(n,e,o,a),pl(n,e,o))}};function Nd(e,n,a,o,u,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,x):n.prototype&&n.prototype.isPureReactComponent?!Ks(a,o)||!Ks(u,f):!0}function bd(e,n,a){var o=!1,u=er,f=n.contextType;return typeof f=="object"&&f!==null?f=Vt(f):(u=St(n)?Sr:dt.current,o=n.contextTypes,f=(o=o!=null)?ns(e,u):er),n=new n(a,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=bl,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function Sd(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&bl.enqueueReplaceState(n,n.state,null)}function vo(e,n,a,o){var u=e.stateNode;u.props=a,u.state=e.memoizedState,u.refs={},so(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=Vt(f):(f=St(n)?Sr:dt.current,u.context=ns(e,f)),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(yo(e,n,f,a),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&bl.enqueueReplaceState(u,u.state,null),xl(e,a,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function us(e,n){try{var a="",o=n;do a+=ne(o),o=o.return;while(o);var u=a}catch(f){u=`
5
+ `+u[x].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=x&&0<=j);break}}}finally{Y=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?D(e):""}function ne(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return""}}function be(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 ae:return"Portal";case xe:return"Profiler";case oe:return"StrictMode";case me:return"Suspense";case ve:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case te:return(e.displayName||"Context")+".Consumer";case Ne:return(e._context.displayName||"Context")+".Provider";case ye:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return n=e.displayName||null,n!==null?n:be(e.type)||"Memo";case Q:n=e._payload,e=e._init;try{return be(e(n))}catch{}}return null}function Re(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 be(n);case 8:return n===oe?"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 _e(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ie(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function it(e){var n=Ie(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,f=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(x){o=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function pr(e){e._valueTracker||(e._valueTracker=it(e))}function Es(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=Ie(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function Qt(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 Dn(e,n){var a=n.checked;return q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function dn(e,n){var a=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;a=_e(n.value!=null?n.value:a),e._wrapperState={initialChecked:o,initialValue:a,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function zr(e,n){n=n.checked,n!=null&&M(e,"checked",n,!1)}function xr(e,n){zr(e,n);var a=_e(n.value),o=n.type;if(a!=null)o==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Fn(e,n.type,a):n.hasOwnProperty("defaultValue")&&Fn(e,n.type,_e(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function jn(e,n,a){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,a||n===e.value||(e.value=n),e.defaultValue=n}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function Fn(e,n,a){(n!=="number"||Qt(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var mn=Array.isArray;function wn(e,n,a,o){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&o&&(e[a].defaultSelected=!0)}else{for(a=""+_e(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Hr(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(l(91));return q({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oa(e,n){var a=n.value;if(a==null){if(a=n.children,n=n.defaultValue,a!=null){if(n!=null)throw Error(l(92));if(mn(a)){if(1<a.length)throw Error(l(93));a=a[0]}n=a}n==null&&(n=""),a=n}e._wrapperState={initialValue:_e(a)}}function $r(e,n){var a=_e(n.value),o=_e(n.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),n.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),o!=null&&(e.defaultValue=""+o)}function Un(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Nn(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 Nt(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Nn(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Bn,Cs=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,a,o,u){MSApp.execUnsafeLocalFunction(function(){return e(n,a,o,u)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Bn=Bn||document.createElement("div"),Bn.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Bn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function zn(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var bn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ia=["Webkit","ms","Moz","O"];Object.keys(bn).forEach(function(e){Ia.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),bn[n]=bn[e]})});function gr(e,n,a){return n==null||typeof n=="boolean"||n===""?"":a||typeof n!="number"||n===0||bn.hasOwnProperty(e)&&bn[e]?(""+n).trim():n+"px"}function yr(e,n){e=e.style;for(var a in n)if(n.hasOwnProperty(a)){var o=a.indexOf("--")===0,u=gr(a,n[a],o);a==="float"&&(a="cssFloat"),o?e.setProperty(a,u):e[a]=u}}var Jt=q({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 fn(e,n){if(n){if(Jt[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(l(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(l(61))}if(n.style!=null&&typeof n.style!="object")throw Error(l(62))}}function vr(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 jr=null;function _s(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hn=null,Xt=null,$n=null;function Vn(e){if(e=Zs(e)){if(typeof Hn!="function")throw Error(l(280));var n=e.stateNode;n&&(n=al(n),Hn(e.stateNode,e.type,n))}}function Ma(e){Xt?$n?$n.push(e):$n=[e]:Xt=e}function Da(){if(Xt){var e=Xt,n=$n;if($n=Xt=null,Vn(e),n)for(e=0;e<n.length;e++)Vn(n[e])}}function We(e,n){return e(n)}function Sn(){}var Ts=!1;function Rs(e,n,a){if(Ts)return e(n,a);Ts=!0;try{return We(e,n,a)}finally{Ts=!1,(Xt!==null||$n!==null)&&(Sn(),Da())}}function kn(e,n){var a=e.stateNode;if(a===null)return null;var o=al(a);if(o===null)return null;a=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var Vr=!1;if(p)try{var Wn={};Object.defineProperty(Wn,"passive",{get:function(){Vr=!0}}),window.addEventListener("test",Wn,Wn),window.removeEventListener("test",Wn,Wn)}catch{Vr=!1}function pi(e,n,a,o,u,f,x,j,k){var O=Array.prototype.slice.call(arguments,3);try{n.apply(a,O)}catch($){this.onError($)}}var ut=!1,Bt=null,wr=!1,Wr=null,As={onError:function(e){ut=!0,Bt=e}};function Fa(e,n,a,o,u,f,x,j,k){ut=!1,Bt=null,pi.apply(As,arguments)}function Zt(e,n,a,o,u,f,x,j,k){if(Fa.apply(this,arguments),ut){if(ut){var O=Bt;ut=!1,Bt=null}else throw Error(l(198));wr||(wr=!0,Wr=O)}}function hn(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function Ps(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 Ls(e){if(hn(e)!==e)throw Error(l(188))}function Ua(e){var n=e.alternate;if(!n){if(n=hn(e),n===null)throw Error(l(188));return n!==e?null:e}for(var a=e,o=n;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(o=u.return,o!==null){a=o;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return Ls(u),e;if(f===o)return Ls(u),n;f=f.sibling}throw Error(l(188))}if(a.return!==o.return)a=u,o=f;else{for(var x=!1,j=u.child;j;){if(j===a){x=!0,a=u,o=f;break}if(j===o){x=!0,o=u,a=f;break}j=j.sibling}if(!x){for(j=f.child;j;){if(j===a){x=!0,a=f,o=u;break}if(j===o){x=!0,o=f,a=u;break}j=j.sibling}if(!x)throw Error(l(189))}}if(a.alternate!==o)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:n}function Ba(e){return e=Ua(e),e!==null?de(e):null}function de(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=de(e);if(n!==null)return n;e=e.sibling}return null}var E=s.unstable_scheduleCallback,G=s.unstable_cancelCallback,le=s.unstable_shouldYield,Me=s.unstable_requestPaint,Se=s.unstable_now,Ge=s.unstable_getCurrentPriorityLevel,tt=s.unstable_ImmediatePriority,zt=s.unstable_UserBlockingPriority,en=s.unstable_NormalPriority,Os=s.unstable_LowPriority,Je=s.unstable_IdlePriority,Nr=null,Pt=null;function Ph(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(Nr,e,void 0,(e.current.flags&128)===128)}catch{}}var tn=Math.clz32?Math.clz32:Ih,Lh=Math.log,Oh=Math.LN2;function Ih(e){return e>>>=0,e===0?32:31-(Lh(e)/Oh|0)|0}var za=64,Ha=4194304;function Is(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 $a(e,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,u=e.suspendedLanes,f=e.pingedLanes,x=a&268435455;if(x!==0){var j=x&~u;j!==0?o=Is(j):(f&=x,f!==0&&(o=Is(f)))}else x=a&~u,x!==0?o=Is(x):f!==0&&(o=Is(f));if(o===0)return 0;if(n!==0&&n!==o&&(n&u)===0&&(u=o&-o,f=n&-n,u>=f||u===16&&(f&4194240)!==0))return n;if((o&4)!==0&&(o|=a&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)a=31-tn(n),u=1<<a,o|=e[a],n&=~u;return o}function Mh(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 Dh(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-tn(f),j=1<<x,k=u[x];k===-1?((j&a)===0||(j&o)!==0)&&(u[x]=Mh(j,n)):k<=n&&(e.expiredLanes|=j),f&=~j}}function xi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Kc(){var e=za;return za<<=1,(za&4194240)===0&&(za=64),e}function gi(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Ms(e,n,a){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-tn(n),e[n]=a}function Fh(e,n){var a=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 o=e.eventTimes;for(e=e.expirationTimes;0<a;){var u=31-tn(a),f=1<<u;n[u]=0,o[u]=-1,e[u]=-1,a&=~f}}function yi(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-tn(a),u=1<<o;u&n|e[o]&n&&(e[o]|=n),a&=~u}}var Le=0;function qc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Yc,vi,Qc,Jc,Xc,ji=!1,Va=[],Gn=null,Kn=null,qn=null,Ds=new Map,Fs=new Map,Yn=[],Uh="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 Zc(e,n){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":Ds.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(n.pointerId)}}function Us(e,n,a,o,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Zs(n),n!==null&&vi(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Bh(e,n,a,o,u){switch(n){case"focusin":return Gn=Us(Gn,e,n,a,o,u),!0;case"dragenter":return Kn=Us(Kn,e,n,a,o,u),!0;case"mouseover":return qn=Us(qn,e,n,a,o,u),!0;case"pointerover":var f=u.pointerId;return Ds.set(f,Us(Ds.get(f)||null,e,n,a,o,u)),!0;case"gotpointercapture":return f=u.pointerId,Fs.set(f,Us(Fs.get(f)||null,e,n,a,o,u)),!0}return!1}function eu(e){var n=br(e.target);if(n!==null){var a=hn(n);if(a!==null){if(n=a.tag,n===13){if(n=Ps(a),n!==null){e.blockedOn=n,Xc(e.priority,function(){Qc(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wa(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Ni(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);jr=o,a.target.dispatchEvent(o),jr=null}else return n=Zs(a),n!==null&&vi(n),e.blockedOn=a,!1;n.shift()}return!0}function tu(e,n,a){Wa(e)&&a.delete(n)}function zh(){ji=!1,Gn!==null&&Wa(Gn)&&(Gn=null),Kn!==null&&Wa(Kn)&&(Kn=null),qn!==null&&Wa(qn)&&(qn=null),Ds.forEach(tu),Fs.forEach(tu)}function Bs(e,n){e.blockedOn===n&&(e.blockedOn=null,ji||(ji=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,zh)))}function zs(e){function n(u){return Bs(u,e)}if(0<Va.length){Bs(Va[0],e);for(var a=1;a<Va.length;a++){var o=Va[a];o.blockedOn===e&&(o.blockedOn=null)}}for(Gn!==null&&Bs(Gn,e),Kn!==null&&Bs(Kn,e),qn!==null&&Bs(qn,e),Ds.forEach(n),Fs.forEach(n),a=0;a<Yn.length;a++)o=Yn[a],o.blockedOn===e&&(o.blockedOn=null);for(;0<Yn.length&&(a=Yn[0],a.blockedOn===null);)eu(a),a.blockedOn===null&&Yn.shift()}var Gr=P.ReactCurrentBatchConfig,Ga=!0;function Hh(e,n,a,o){var u=Le,f=Gr.transition;Gr.transition=null;try{Le=1,wi(e,n,a,o)}finally{Le=u,Gr.transition=f}}function $h(e,n,a,o){var u=Le,f=Gr.transition;Gr.transition=null;try{Le=4,wi(e,n,a,o)}finally{Le=u,Gr.transition=f}}function wi(e,n,a,o){if(Ga){var u=Ni(e,n,a,o);if(u===null)Ui(e,n,o,Ka,a),Zc(e,o);else if(Bh(u,e,n,a,o))o.stopPropagation();else if(Zc(e,o),n&4&&-1<Uh.indexOf(e)){for(;u!==null;){var f=Zs(u);if(f!==null&&Yc(f),f=Ni(e,n,a,o),f===null&&Ui(e,n,o,Ka,a),f===u)break;u=f}u!==null&&o.stopPropagation()}else Ui(e,n,o,null,a)}}var Ka=null;function Ni(e,n,a,o){if(Ka=null,e=_s(o),e=br(e),e!==null)if(n=hn(e),n===null)e=null;else if(a=n.tag,a===13){if(e=Ps(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Ka=e,null}function nu(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(Ge()){case tt:return 1;case zt:return 4;case en:case Os:return 16;case Je:return 536870912;default:return 16}default:return 16}}var Qn=null,bi=null,qa=null;function ru(){if(qa)return qa;var e,n=bi,a=n.length,o,u="value"in Qn?Qn.value:Qn.textContent,f=u.length;for(e=0;e<a&&n[e]===u[e];e++);var x=a-e;for(o=1;o<=x&&n[a-o]===u[f-o];o++);return qa=u.slice(e,1<o?1-o:void 0)}function Ya(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 Qa(){return!0}function su(){return!1}function Lt(e){function n(a,o,u,f,x){this._reactName=a,this._targetInst=u,this.type=o,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(a=e[j],this[j]=a?a(f):f[j]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Qa:su,this.isPropagationStopped=su,this}return q(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),n}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Si=Lt(Kr),Hs=q({},Kr,{view:0,detail:0}),Vh=Lt(Hs),ki,Ei,$s,Ja=q({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_i,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!==$s&&($s&&e.type==="mousemove"?(ki=e.screenX-$s.screenX,Ei=e.screenY-$s.screenY):Ei=ki=0,$s=e),ki)},movementY:function(e){return"movementY"in e?e.movementY:Ei}}),au=Lt(Ja),Wh=q({},Ja,{dataTransfer:0}),Gh=Lt(Wh),Kh=q({},Hs,{relatedTarget:0}),Ci=Lt(Kh),qh=q({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),Yh=Lt(qh),Qh=q({},Kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jh=Lt(Qh),Xh=q({},Kr,{data:0}),lu=Lt(Xh),Zh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ep={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"},tp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function np(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=tp[e])?!!n[e]:!1}function _i(){return np}var rp=q({},Hs,{key:function(e){if(e.key){var n=Zh[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ep[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_i,charCode:function(e){return e.type==="keypress"?Ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sp=Lt(rp),ap=q({},Ja,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),iu=Lt(ap),lp=q({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_i}),ip=Lt(lp),op=q({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),cp=Lt(op),up=q({},Ja,{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}),dp=Lt(up),mp=[9,13,27,32],Ti=p&&"CompositionEvent"in window,Vs=null;p&&"documentMode"in document&&(Vs=document.documentMode);var fp=p&&"TextEvent"in window&&!Vs,ou=p&&(!Ti||Vs&&8<Vs&&11>=Vs),cu=" ",uu=!1;function du(e,n){switch(e){case"keyup":return mp.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qr=!1;function hp(e,n){switch(e){case"compositionend":return mu(n);case"keypress":return n.which!==32?null:(uu=!0,cu);case"textInput":return e=n.data,e===cu&&uu?null:e;default:return null}}function pp(e,n){if(qr)return e==="compositionend"||!Ti&&du(e,n)?(e=ru(),qa=bi=Qn=null,qr=!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 ou&&n.locale!=="ko"?null:n.data;default:return null}}var xp={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 fu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!xp[e.type]:n==="textarea"}function hu(e,n,a,o){Ma(o),n=nl(n,"onChange"),0<n.length&&(a=new Si("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var Ws=null,Gs=null;function gp(e){Pu(e,0)}function Xa(e){var n=Zr(e);if(Es(n))return e}function yp(e,n){if(e==="change")return n}var pu=!1;if(p){var Ri;if(p){var Ai="oninput"in document;if(!Ai){var xu=document.createElement("div");xu.setAttribute("oninput","return;"),Ai=typeof xu.oninput=="function"}Ri=Ai}else Ri=!1;pu=Ri&&(!document.documentMode||9<document.documentMode)}function gu(){Ws&&(Ws.detachEvent("onpropertychange",yu),Gs=Ws=null)}function yu(e){if(e.propertyName==="value"&&Xa(Gs)){var n=[];hu(n,Gs,e,_s(e)),Rs(gp,n)}}function vp(e,n,a){e==="focusin"?(gu(),Ws=n,Gs=a,Ws.attachEvent("onpropertychange",yu)):e==="focusout"&&gu()}function jp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xa(Gs)}function wp(e,n){if(e==="click")return Xa(n)}function Np(e,n){if(e==="input"||e==="change")return Xa(n)}function bp(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:bp;function Ks(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var u=a[o];if(!h.call(n,u)||!nn(e[u],n[u]))return!1}return!0}function vu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ju(e,n){var a=vu(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=vu(a)}}function wu(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?wu(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Nu(){for(var e=window,n=Qt();n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Qt(e.document)}return n}function Pi(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 Sp(e){var n=Nu(),a=e.focusedElem,o=e.selectionRange;if(n!==a&&a&&a.ownerDocument&&wu(a.ownerDocument.documentElement,a)){if(o!==null&&Pi(a)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in a)a.selectionStart=n,a.selectionEnd=Math.min(e,a.value.length);else if(e=(n=a.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var u=a.textContent.length,f=Math.min(o.start,u);o=o.end===void 0?f:Math.min(o.end,u),!e.extend&&f>o&&(u=o,o=f,f=u),u=ju(a,f);var x=ju(a,o);u&&x&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(u.node,u.offset),e.removeAllRanges(),f>o?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=a;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<n.length;a++)e=n[a],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var kp=p&&"documentMode"in document&&11>=document.documentMode,Yr=null,Li=null,qs=null,Oi=!1;function bu(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Oi||Yr==null||Yr!==Qt(o)||(o=Yr,"selectionStart"in o&&Pi(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),qs&&Ks(qs,o)||(qs=o,o=nl(Li,"onSelect"),0<o.length&&(n=new Si("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=Yr)))}function Za(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Qr={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},Ii={},Su={};p&&(Su=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function el(e){if(Ii[e])return Ii[e];if(!Qr[e])return e;var n=Qr[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Su)return Ii[e]=n[a];return e}var ku=el("animationend"),Eu=el("animationiteration"),Cu=el("animationstart"),_u=el("transitionend"),Tu=new Map,Ru="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 Jn(e,n){Tu.set(e,n),d(n,[e])}for(var Mi=0;Mi<Ru.length;Mi++){var Di=Ru[Mi],Ep=Di.toLowerCase(),Cp=Di[0].toUpperCase()+Di.slice(1);Jn(Ep,"on"+Cp)}Jn(ku,"onAnimationEnd"),Jn(Eu,"onAnimationIteration"),Jn(Cu,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(_u,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),_p=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ys));function Au(e,n,a){var o=e.type||"unknown-event";e.currentTarget=a,Zt(o,n,void 0,e),e.currentTarget=null}function Pu(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],u=o.event;o=o.listeners;e:{var f=void 0;if(n)for(var x=o.length-1;0<=x;x--){var j=o[x],k=j.instance,O=j.currentTarget;if(j=j.listener,k!==f&&u.isPropagationStopped())break e;Au(u,j,O),f=k}else for(x=0;x<o.length;x++){if(j=o[x],k=j.instance,O=j.currentTarget,j=j.listener,k!==f&&u.isPropagationStopped())break e;Au(u,j,O),f=k}}}if(wr)throw e=Wr,wr=!1,Wr=null,e}function Ue(e,n){var a=n[Wi];a===void 0&&(a=n[Wi]=new Set);var o=e+"__bubble";a.has(o)||(Lu(n,e,2,!1),a.add(o))}function Fi(e,n,a){var o=0;n&&(o|=4),Lu(a,e,o,n)}var tl="_reactListening"+Math.random().toString(36).slice(2);function Qs(e){if(!e[tl]){e[tl]=!0,i.forEach(function(a){a!=="selectionchange"&&(_p.has(a)||Fi(a,!1,e),Fi(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[tl]||(n[tl]=!0,Fi("selectionchange",!1,n))}}function Lu(e,n,a,o){switch(nu(n)){case 1:var u=Hh;break;case 4:u=$h;break;default:u=wi}a=u.bind(null,n,a,e),u=void 0,!Vr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(n,a,{capture:!0,passive:u}):e.addEventListener(n,a,!0):u!==void 0?e.addEventListener(n,a,{passive:u}):e.addEventListener(n,a,!1)}function Ui(e,n,a,o,u){var f=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var j=o.stateNode.containerInfo;if(j===u||j.nodeType===8&&j.parentNode===u)break;if(x===4)for(x=o.return;x!==null;){var k=x.tag;if((k===3||k===4)&&(k=x.stateNode.containerInfo,k===u||k.nodeType===8&&k.parentNode===u))return;x=x.return}for(;j!==null;){if(x=br(j),x===null)return;if(k=x.tag,k===5||k===6){o=f=x;continue e}j=j.parentNode}}o=o.return}Rs(function(){var O=f,$=_s(a),V=[];e:{var H=Tu.get(e);if(H!==void 0){var ee=Si,se=e;switch(e){case"keypress":if(Ya(a)===0)break e;case"keydown":case"keyup":ee=sp;break;case"focusin":se="focus",ee=Ci;break;case"focusout":se="blur",ee=Ci;break;case"beforeblur":case"afterblur":ee=Ci;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=au;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Gh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=ip;break;case ku:case Eu:case Cu:ee=Yh;break;case _u:ee=cp;break;case"scroll":ee=Vh;break;case"wheel":ee=dp;break;case"copy":case"cut":case"paste":ee=Jh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=iu}var ie=(n&4)!==0,Ye=!ie&&e==="scroll",A=ie?H!==null?H+"Capture":null:H;ie=[];for(var T=O,L;T!==null;){L=T;var K=L.stateNode;if(L.tag===5&&K!==null&&(L=K,A!==null&&(K=kn(T,A),K!=null&&ie.push(Js(T,K,L)))),Ye)break;T=T.return}0<ie.length&&(H=new ee(H,se,null,a,$),V.push({event:H,listeners:ie}))}}if((n&7)===0){e:{if(H=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",H&&a!==jr&&(se=a.relatedTarget||a.fromElement)&&(br(se)||se[En]))break e;if((ee||H)&&(H=$.window===$?$:(H=$.ownerDocument)?H.defaultView||H.parentWindow:window,ee?(se=a.relatedTarget||a.toElement,ee=O,se=se?br(se):null,se!==null&&(Ye=hn(se),se!==Ye||se.tag!==5&&se.tag!==6)&&(se=null)):(ee=null,se=O),ee!==se)){if(ie=au,K="onMouseLeave",A="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(ie=iu,K="onPointerLeave",A="onPointerEnter",T="pointer"),Ye=ee==null?H:Zr(ee),L=se==null?H:Zr(se),H=new ie(K,T+"leave",ee,a,$),H.target=Ye,H.relatedTarget=L,K=null,br($)===O&&(ie=new ie(A,T+"enter",se,a,$),ie.target=L,ie.relatedTarget=Ye,K=ie),Ye=K,ee&&se)t:{for(ie=ee,A=se,T=0,L=ie;L;L=Jr(L))T++;for(L=0,K=A;K;K=Jr(K))L++;for(;0<T-L;)ie=Jr(ie),T--;for(;0<L-T;)A=Jr(A),L--;for(;T--;){if(ie===A||A!==null&&ie===A.alternate)break t;ie=Jr(ie),A=Jr(A)}ie=null}else ie=null;ee!==null&&Ou(V,H,ee,ie,!1),se!==null&&Ye!==null&&Ou(V,Ye,se,ie,!0)}}e:{if(H=O?Zr(O):window,ee=H.nodeName&&H.nodeName.toLowerCase(),ee==="select"||ee==="input"&&H.type==="file")var ce=yp;else if(fu(H))if(pu)ce=Np;else{ce=jp;var fe=vp}else(ee=H.nodeName)&&ee.toLowerCase()==="input"&&(H.type==="checkbox"||H.type==="radio")&&(ce=wp);if(ce&&(ce=ce(e,O))){hu(V,ce,a,$);break e}fe&&fe(e,H,O),e==="focusout"&&(fe=H._wrapperState)&&fe.controlled&&H.type==="number"&&Fn(H,"number",H.value)}switch(fe=O?Zr(O):window,e){case"focusin":(fu(fe)||fe.contentEditable==="true")&&(Yr=fe,Li=O,qs=null);break;case"focusout":qs=Li=Yr=null;break;case"mousedown":Oi=!0;break;case"contextmenu":case"mouseup":case"dragend":Oi=!1,bu(V,a,$);break;case"selectionchange":if(kp)break;case"keydown":case"keyup":bu(V,a,$)}var he;if(Ti)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else qr?du(e,a)&&(je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(je="onCompositionStart");je&&(ou&&a.locale!=="ko"&&(qr||je!=="onCompositionStart"?je==="onCompositionEnd"&&qr&&(he=ru()):(Qn=$,bi="value"in Qn?Qn.value:Qn.textContent,qr=!0)),fe=nl(O,je),0<fe.length&&(je=new lu(je,e,null,a,$),V.push({event:je,listeners:fe}),he?je.data=he:(he=mu(a),he!==null&&(je.data=he)))),(he=fp?hp(e,a):pp(e,a))&&(O=nl(O,"onBeforeInput"),0<O.length&&($=new lu("onBeforeInput","beforeinput",null,a,$),V.push({event:$,listeners:O}),$.data=he))}Pu(V,n)})}function Js(e,n,a){return{instance:e,listener:n,currentTarget:a}}function nl(e,n){for(var a=n+"Capture",o=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=kn(e,a),f!=null&&o.unshift(Js(e,f,u)),f=kn(e,n),f!=null&&o.push(Js(e,f,u))),e=e.return}return o}function Jr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ou(e,n,a,o,u){for(var f=n._reactName,x=[];a!==null&&a!==o;){var j=a,k=j.alternate,O=j.stateNode;if(k!==null&&k===o)break;j.tag===5&&O!==null&&(j=O,u?(k=kn(a,f),k!=null&&x.unshift(Js(a,k,j))):u||(k=kn(a,f),k!=null&&x.push(Js(a,k,j)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var Tp=/\r\n?/g,Rp=/\u0000|\uFFFD/g;function Iu(e){return(typeof e=="string"?e:""+e).replace(Tp,`
6
+ `).replace(Rp,"")}function rl(e,n,a){if(n=Iu(n),Iu(e)!==n&&a)throw Error(l(425))}function sl(){}var Bi=null,zi=null;function Hi(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 $i=typeof setTimeout=="function"?setTimeout:void 0,Ap=typeof clearTimeout=="function"?clearTimeout:void 0,Mu=typeof Promise=="function"?Promise:void 0,Pp=typeof queueMicrotask=="function"?queueMicrotask:typeof Mu<"u"?function(e){return Mu.resolve(null).then(e).catch(Lp)}:$i;function Lp(e){setTimeout(function(){throw e})}function Vi(e,n){var a=n,o=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(o===0){e.removeChild(u),zs(n);return}o--}else a!=="$"&&a!=="$?"&&a!=="$!"||o++;a=u}while(a);zs(n)}function Xn(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 Du(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(n===0)return e;n--}else a==="/$"&&n++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),pn="__reactFiber$"+Xr,Xs="__reactProps$"+Xr,En="__reactContainer$"+Xr,Wi="__reactEvents$"+Xr,Op="__reactListeners$"+Xr,Ip="__reactHandles$"+Xr;function br(e){var n=e[pn];if(n)return n;for(var a=e.parentNode;a;){if(n=a[En]||a[pn]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Du(e);e!==null;){if(a=e[pn])return a;e=Du(e)}return n}e=a,a=e.parentNode}return null}function Zs(e){return e=e[pn]||e[En],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function al(e){return e[Xs]||null}var Gi=[],es=-1;function Zn(e){return{current:e}}function Be(e){0>es||(e.current=Gi[es],Gi[es]=null,es--)}function De(e,n){es++,Gi[es]=e.current,e.current=n}var er={},dt=Zn(er),bt=Zn(!1),Sr=er;function ts(e,n){var a=e.type.contextTypes;if(!a)return er;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in a)u[f]=n[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function St(e){return e=e.childContextTypes,e!=null}function ll(){Be(bt),Be(dt)}function Fu(e,n,a){if(dt.current!==er)throw Error(l(168));De(dt,n),De(bt,a)}function Uu(e,n,a){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return a;o=o.getChildContext();for(var u in o)if(!(u in n))throw Error(l(108,Re(e)||"Unknown",u));return q({},a,o)}function il(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||er,Sr=dt.current,De(dt,e),De(bt,bt.current),!0}function Bu(e,n,a){var o=e.stateNode;if(!o)throw Error(l(169));a?(e=Uu(e,n,Sr),o.__reactInternalMemoizedMergedChildContext=e,Be(bt),Be(dt),De(dt,e)):Be(bt),De(bt,a)}var Cn=null,ol=!1,Ki=!1;function zu(e){Cn===null?Cn=[e]:Cn.push(e)}function Mp(e){ol=!0,zu(e)}function tr(){if(!Ki&&Cn!==null){Ki=!0;var e=0,n=Le;try{var a=Cn;for(Le=1;e<a.length;e++){var o=a[e];do o=o(!0);while(o!==null)}Cn=null,ol=!1}catch(u){throw Cn!==null&&(Cn=Cn.slice(e+1)),E(tt,tr),u}finally{Le=n,Ki=!1}}return null}var ns=[],rs=0,cl=null,ul=0,Ht=[],$t=0,kr=null,_n=1,Tn="";function Er(e,n){ns[rs++]=ul,ns[rs++]=cl,cl=e,ul=n}function Hu(e,n,a){Ht[$t++]=_n,Ht[$t++]=Tn,Ht[$t++]=kr,kr=e;var o=_n;e=Tn;var u=32-tn(o)-1;o&=~(1<<u),a+=1;var f=32-tn(n)+u;if(30<f){var x=u-u%5;f=(o&(1<<x)-1).toString(32),o>>=x,u-=x,_n=1<<32-tn(n)+u|a<<u|o,Tn=f+e}else _n=1<<f|a<<u|o,Tn=e}function qi(e){e.return!==null&&(Er(e,1),Hu(e,1,0))}function Yi(e){for(;e===cl;)cl=ns[--rs],ns[rs]=null,ul=ns[--rs],ns[rs]=null;for(;e===kr;)kr=Ht[--$t],Ht[$t]=null,Tn=Ht[--$t],Ht[$t]=null,_n=Ht[--$t],Ht[$t]=null}var Ot=null,It=null,ze=!1,rn=null;function $u(e,n){var a=Kt(5,null,null,0);a.elementType="DELETED",a.stateNode=n,a.return=e,n=e.deletions,n===null?(e.deletions=[a],e.flags|=16):n.push(a)}function Vu(e,n){switch(e.tag){case 5:var a=e.type;return n=n.nodeType!==1||a.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Ot=e,It=Xn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Ot=e,It=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(a=kr!==null?{id:_n,overflow:Tn}:null,e.memoizedState={dehydrated:n,treeContext:a,retryLane:1073741824},a=Kt(18,null,null,0),a.stateNode=n,a.return=e,e.child=a,Ot=e,It=null,!0):!1;default:return!1}}function Qi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ji(e){if(ze){var n=It;if(n){var a=n;if(!Vu(e,n)){if(Qi(e))throw Error(l(418));n=Xn(a.nextSibling);var o=Ot;n&&Vu(e,n)?$u(o,a):(e.flags=e.flags&-4097|2,ze=!1,Ot=e)}}else{if(Qi(e))throw Error(l(418));e.flags=e.flags&-4097|2,ze=!1,Ot=e}}}function Wu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ot=e}function dl(e){if(e!==Ot)return!1;if(!ze)return Wu(e),ze=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Hi(e.type,e.memoizedProps)),n&&(n=It)){if(Qi(e))throw Gu(),Error(l(418));for(;n;)$u(e,n),n=Xn(n.nextSibling)}if(Wu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(n===0){It=Xn(e.nextSibling);break e}n--}else a!=="$"&&a!=="$!"&&a!=="$?"||n++}e=e.nextSibling}It=null}}else It=Ot?Xn(e.stateNode.nextSibling):null;return!0}function Gu(){for(var e=It;e;)e=Xn(e.nextSibling)}function ss(){It=Ot=null,ze=!1}function Xi(e){rn===null?rn=[e]:rn.push(e)}var Dp=P.ReactCurrentBatchConfig;function ea(e,n,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(l(309));var o=a.stateNode}if(!o)throw Error(l(147,e));var u=o,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(x){var j=u.refs;x===null?delete j[f]:j[f]=x},n._stringRef=f,n)}if(typeof e!="string")throw Error(l(284));if(!a._owner)throw Error(l(290,e))}return e}function ml(e,n){throw e=Object.prototype.toString.call(n),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Ku(e){var n=e._init;return n(e._payload)}function qu(e){function n(A,T){if(e){var L=A.deletions;L===null?(A.deletions=[T],A.flags|=16):L.push(T)}}function a(A,T){if(!e)return null;for(;T!==null;)n(A,T),T=T.sibling;return null}function o(A,T){for(A=new Map;T!==null;)T.key!==null?A.set(T.key,T):A.set(T.index,T),T=T.sibling;return A}function u(A,T){return A=cr(A,T),A.index=0,A.sibling=null,A}function f(A,T,L){return A.index=L,e?(L=A.alternate,L!==null?(L=L.index,L<T?(A.flags|=2,T):L):(A.flags|=2,T)):(A.flags|=1048576,T)}function x(A){return e&&A.alternate===null&&(A.flags|=2),A}function j(A,T,L,K){return T===null||T.tag!==6?(T=Vo(L,A.mode,K),T.return=A,T):(T=u(T,L),T.return=A,T)}function k(A,T,L,K){var ce=L.type;return ce===z?$(A,T,L.props.children,K,L.key):T!==null&&(T.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Q&&Ku(ce)===T.type)?(K=u(T,L.props),K.ref=ea(A,T,L),K.return=A,K):(K=Ml(L.type,L.key,L.props,null,A.mode,K),K.ref=ea(A,T,L),K.return=A,K)}function O(A,T,L,K){return T===null||T.tag!==4||T.stateNode.containerInfo!==L.containerInfo||T.stateNode.implementation!==L.implementation?(T=Wo(L,A.mode,K),T.return=A,T):(T=u(T,L.children||[]),T.return=A,T)}function $(A,T,L,K,ce){return T===null||T.tag!==7?(T=Or(L,A.mode,K,ce),T.return=A,T):(T=u(T,L),T.return=A,T)}function V(A,T,L){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Vo(""+T,A.mode,L),T.return=A,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case W:return L=Ml(T.type,T.key,T.props,null,A.mode,L),L.ref=ea(A,null,T),L.return=A,L;case ae:return T=Wo(T,A.mode,L),T.return=A,T;case Q:var K=T._init;return V(A,K(T._payload),L)}if(mn(T)||J(T))return T=Or(T,A.mode,L,null),T.return=A,T;ml(A,T)}return null}function H(A,T,L,K){var ce=T!==null?T.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return ce!==null?null:j(A,T,""+L,K);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case W:return L.key===ce?k(A,T,L,K):null;case ae:return L.key===ce?O(A,T,L,K):null;case Q:return ce=L._init,H(A,T,ce(L._payload),K)}if(mn(L)||J(L))return ce!==null?null:$(A,T,L,K,null);ml(A,L)}return null}function ee(A,T,L,K,ce){if(typeof K=="string"&&K!==""||typeof K=="number")return A=A.get(L)||null,j(T,A,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case W:return A=A.get(K.key===null?L:K.key)||null,k(T,A,K,ce);case ae:return A=A.get(K.key===null?L:K.key)||null,O(T,A,K,ce);case Q:var fe=K._init;return ee(A,T,L,fe(K._payload),ce)}if(mn(K)||J(K))return A=A.get(L)||null,$(T,A,K,ce,null);ml(T,K)}return null}function se(A,T,L,K){for(var ce=null,fe=null,he=T,je=T=0,st=null;he!==null&&je<L.length;je++){he.index>je?(st=he,he=null):st=he.sibling;var Pe=H(A,he,L[je],K);if(Pe===null){he===null&&(he=st);break}e&&he&&Pe.alternate===null&&n(A,he),T=f(Pe,T,je),fe===null?ce=Pe:fe.sibling=Pe,fe=Pe,he=st}if(je===L.length)return a(A,he),ze&&Er(A,je),ce;if(he===null){for(;je<L.length;je++)he=V(A,L[je],K),he!==null&&(T=f(he,T,je),fe===null?ce=he:fe.sibling=he,fe=he);return ze&&Er(A,je),ce}for(he=o(A,he);je<L.length;je++)st=ee(he,A,je,L[je],K),st!==null&&(e&&st.alternate!==null&&he.delete(st.key===null?je:st.key),T=f(st,T,je),fe===null?ce=st:fe.sibling=st,fe=st);return e&&he.forEach(function(ur){return n(A,ur)}),ze&&Er(A,je),ce}function ie(A,T,L,K){var ce=J(L);if(typeof ce!="function")throw Error(l(150));if(L=ce.call(L),L==null)throw Error(l(151));for(var fe=ce=null,he=T,je=T=0,st=null,Pe=L.next();he!==null&&!Pe.done;je++,Pe=L.next()){he.index>je?(st=he,he=null):st=he.sibling;var ur=H(A,he,Pe.value,K);if(ur===null){he===null&&(he=st);break}e&&he&&ur.alternate===null&&n(A,he),T=f(ur,T,je),fe===null?ce=ur:fe.sibling=ur,fe=ur,he=st}if(Pe.done)return a(A,he),ze&&Er(A,je),ce;if(he===null){for(;!Pe.done;je++,Pe=L.next())Pe=V(A,Pe.value,K),Pe!==null&&(T=f(Pe,T,je),fe===null?ce=Pe:fe.sibling=Pe,fe=Pe);return ze&&Er(A,je),ce}for(he=o(A,he);!Pe.done;je++,Pe=L.next())Pe=ee(he,A,je,Pe.value,K),Pe!==null&&(e&&Pe.alternate!==null&&he.delete(Pe.key===null?je:Pe.key),T=f(Pe,T,je),fe===null?ce=Pe:fe.sibling=Pe,fe=Pe);return e&&he.forEach(function(x0){return n(A,x0)}),ze&&Er(A,je),ce}function Ye(A,T,L,K){if(typeof L=="object"&&L!==null&&L.type===z&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case W:e:{for(var ce=L.key,fe=T;fe!==null;){if(fe.key===ce){if(ce=L.type,ce===z){if(fe.tag===7){a(A,fe.sibling),T=u(fe,L.props.children),T.return=A,A=T;break e}}else if(fe.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Q&&Ku(ce)===fe.type){a(A,fe.sibling),T=u(fe,L.props),T.ref=ea(A,fe,L),T.return=A,A=T;break e}a(A,fe);break}else n(A,fe);fe=fe.sibling}L.type===z?(T=Or(L.props.children,A.mode,K,L.key),T.return=A,A=T):(K=Ml(L.type,L.key,L.props,null,A.mode,K),K.ref=ea(A,T,L),K.return=A,A=K)}return x(A);case ae:e:{for(fe=L.key;T!==null;){if(T.key===fe)if(T.tag===4&&T.stateNode.containerInfo===L.containerInfo&&T.stateNode.implementation===L.implementation){a(A,T.sibling),T=u(T,L.children||[]),T.return=A,A=T;break e}else{a(A,T);break}else n(A,T);T=T.sibling}T=Wo(L,A.mode,K),T.return=A,A=T}return x(A);case Q:return fe=L._init,Ye(A,T,fe(L._payload),K)}if(mn(L))return se(A,T,L,K);if(J(L))return ie(A,T,L,K);ml(A,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,T!==null&&T.tag===6?(a(A,T.sibling),T=u(T,L),T.return=A,A=T):(a(A,T),T=Vo(L,A.mode,K),T.return=A,A=T),x(A)):a(A,T)}return Ye}var as=qu(!0),Yu=qu(!1),fl=Zn(null),hl=null,ls=null,Zi=null;function eo(){Zi=ls=hl=null}function to(e){var n=fl.current;Be(fl),e._currentValue=n}function no(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function is(e,n){hl=e,Zi=ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(kt=!0),e.firstContext=null)}function Vt(e){var n=e._currentValue;if(Zi!==e)if(e={context:e,memoizedValue:n,next:null},ls===null){if(hl===null)throw Error(l(308));ls=e,hl.dependencies={lanes:0,firstContext:e}}else ls=ls.next=e;return n}var Cr=null;function ro(e){Cr===null?Cr=[e]:Cr.push(e)}function Qu(e,n,a,o){var u=n.interleaved;return u===null?(a.next=a,ro(n)):(a.next=u.next,u.next=a),n.interleaved=a,Rn(e,o)}function Rn(e,n){e.lanes|=n;var a=e.alternate;for(a!==null&&(a.lanes|=n),a=e,e=e.return;e!==null;)e.childLanes|=n,a=e.alternate,a!==null&&(a.childLanes|=n),a=e,e=e.return;return a.tag===3?a.stateNode:null}var nr=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ju(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 An(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function rr(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var u=o.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),o.pending=n,Rn(e,a)}return u=o.interleaved,u===null?(n.next=n,ro(o)):(n.next=u.next,u.next=n),o.interleaved=n,Rn(e,a)}function pl(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,yi(e,a)}}function Xu(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var x={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};f===null?u=f=x:f=f.next=x,a=a.next}while(a!==null);f===null?u=f=n:f=f.next=n}else u=f=n;a={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}function xl(e,n,a,o){var u=e.updateQueue;nr=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var k=j,O=k.next;k.next=null,x===null?f=O:x.next=O,x=k;var $=e.alternate;$!==null&&($=$.updateQueue,j=$.lastBaseUpdate,j!==x&&(j===null?$.firstBaseUpdate=O:j.next=O,$.lastBaseUpdate=k))}if(f!==null){var V=u.baseState;x=0,$=O=k=null,j=f;do{var H=j.lane,ee=j.eventTime;if((o&H)===H){$!==null&&($=$.next={eventTime:ee,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var se=e,ie=j;switch(H=n,ee=a,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){V=se.call(ee,V,H);break e}V=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,H=typeof se=="function"?se.call(ee,V,H):se,H==null)break e;V=q({},V,H);break e;case 2:nr=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,H=u.effects,H===null?u.effects=[j]:H.push(j))}else ee={eventTime:ee,lane:H,tag:j.tag,payload:j.payload,callback:j.callback,next:null},$===null?(O=$=ee,k=V):$=$.next=ee,x|=H;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;H=j,j=H.next,H.next=null,u.lastBaseUpdate=H,u.shared.pending=null}}while(!0);if($===null&&(k=V),u.baseState=k,u.firstBaseUpdate=O,u.lastBaseUpdate=$,n=u.shared.interleaved,n!==null){u=n;do x|=u.lane,u=u.next;while(u!==n)}else f===null&&(u.shared.lanes=0);Rr|=x,e.lanes=x,e.memoizedState=V}}function Zu(e,n,a){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],u=o.callback;if(u!==null){if(o.callback=null,o=a,typeof u!="function")throw Error(l(191,u));u.call(o)}}}var ta={},xn=Zn(ta),na=Zn(ta),ra=Zn(ta);function _r(e){if(e===ta)throw Error(l(174));return e}function ao(e,n){switch(De(ra,n),De(na,e),De(xn,ta),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Nt(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Nt(n,e)}Be(xn),De(xn,n)}function os(){Be(xn),Be(na),Be(ra)}function ed(e){_r(ra.current);var n=_r(xn.current),a=Nt(n,e.type);n!==a&&(De(na,e),De(xn,a))}function lo(e){na.current===e&&(Be(xn),Be(na))}var $e=Zn(0);function gl(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.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 io=[];function oo(){for(var e=0;e<io.length;e++)io[e]._workInProgressVersionPrimary=null;io.length=0}var yl=P.ReactCurrentDispatcher,co=P.ReactCurrentBatchConfig,Tr=0,Ve=null,Ze=null,nt=null,vl=!1,sa=!1,aa=0,Fp=0;function mt(){throw Error(l(321))}function uo(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!nn(e[a],n[a]))return!1;return!0}function mo(e,n,a,o,u,f){if(Tr=f,Ve=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,yl.current=e===null||e.memoizedState===null?Hp:$p,e=a(o,u),sa){f=0;do{if(sa=!1,aa=0,25<=f)throw Error(l(301));f+=1,nt=Ze=null,n.updateQueue=null,yl.current=Vp,e=a(o,u)}while(sa)}if(yl.current=Nl,n=Ze!==null&&Ze.next!==null,Tr=0,nt=Ze=Ve=null,vl=!1,n)throw Error(l(300));return e}function fo(){var e=aa!==0;return aa=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ve.memoizedState=nt=e:nt=nt.next=e,nt}function Wt(){if(Ze===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var n=nt===null?Ve.memoizedState:nt.next;if(n!==null)nt=n,Ze=e;else{if(e===null)throw Error(l(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},nt===null?Ve.memoizedState=nt=e:nt=nt.next=e}return nt}function la(e,n){return typeof n=="function"?n(e):n}function ho(e){var n=Wt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var o=Ze,u=o.baseQueue,f=a.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}o.baseQueue=u=f,a.pending=null}if(u!==null){f=u.next,o=o.baseState;var j=x=null,k=null,O=f;do{var $=O.lane;if((Tr&$)===$)k!==null&&(k=k.next={lane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),o=O.hasEagerState?O.eagerState:e(o,O.action);else{var V={lane:$,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null};k===null?(j=k=V,x=o):k=k.next=V,Ve.lanes|=$,Rr|=$}O=O.next}while(O!==null&&O!==f);k===null?x=o:k.next=j,nn(o,n.memoizedState)||(kt=!0),n.memoizedState=o,n.baseState=x,n.baseQueue=k,a.lastRenderedState=o}if(e=a.interleaved,e!==null){u=e;do f=u.lane,Ve.lanes|=f,Rr|=f,u=u.next;while(u!==e)}else u===null&&(a.lanes=0);return[n.memoizedState,a.dispatch]}function po(e){var n=Wt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var o=a.dispatch,u=a.pending,f=n.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do f=e(f,x.action),x=x.next;while(x!==u);nn(f,n.memoizedState)||(kt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,o]}function td(){}function nd(e,n){var a=Ve,o=Wt(),u=n(),f=!nn(o.memoizedState,u);if(f&&(o.memoizedState=u,kt=!0),o=o.queue,xo(ad.bind(null,a,o,e),[e]),o.getSnapshot!==n||f||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,ia(9,sd.bind(null,a,o,u,n),void 0,null),rt===null)throw Error(l(349));(Tr&30)!==0||rd(a,n,u)}return u}function rd(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Ve.updateQueue,n===null?(n={lastEffect:null,stores:null},Ve.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function sd(e,n,a,o){n.value=a,n.getSnapshot=o,ld(n)&&id(e)}function ad(e,n,a){return a(function(){ld(n)&&id(e)})}function ld(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!nn(e,a)}catch{return!0}}function id(e){var n=Rn(e,1);n!==null&&on(n,e,1,-1)}function od(e){var n=gn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:e},n.queue=e,e=e.dispatch=zp.bind(null,Ve,e),[n.memoizedState,e]}function ia(e,n,a,o){return e={tag:e,create:n,destroy:a,deps:o,next:null},n=Ve.updateQueue,n===null?(n={lastEffect:null,stores:null},Ve.updateQueue=n,n.lastEffect=e.next=e):(a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e)),e}function cd(){return Wt().memoizedState}function jl(e,n,a,o){var u=gn();Ve.flags|=e,u.memoizedState=ia(1|n,a,void 0,o===void 0?null:o)}function wl(e,n,a,o){var u=Wt();o=o===void 0?null:o;var f=void 0;if(Ze!==null){var x=Ze.memoizedState;if(f=x.destroy,o!==null&&uo(o,x.deps)){u.memoizedState=ia(n,a,f,o);return}}Ve.flags|=e,u.memoizedState=ia(1|n,a,f,o)}function ud(e,n){return jl(8390656,8,e,n)}function xo(e,n){return wl(2048,8,e,n)}function dd(e,n){return wl(4,2,e,n)}function md(e,n){return wl(4,4,e,n)}function fd(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 hd(e,n,a){return a=a!=null?a.concat([e]):null,wl(4,4,fd.bind(null,n,e),a)}function go(){}function pd(e,n){var a=Wt();n=n===void 0?null:n;var o=a.memoizedState;return o!==null&&n!==null&&uo(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function xd(e,n){var a=Wt();n=n===void 0?null:n;var o=a.memoizedState;return o!==null&&n!==null&&uo(n,o[1])?o[0]:(e=e(),a.memoizedState=[e,n],e)}function gd(e,n,a){return(Tr&21)===0?(e.baseState&&(e.baseState=!1,kt=!0),e.memoizedState=a):(nn(a,n)||(a=Kc(),Ve.lanes|=a,Rr|=a,e.baseState=!0),n)}function Up(e,n){var a=Le;Le=a!==0&&4>a?a:4,e(!0);var o=co.transition;co.transition={};try{e(!1),n()}finally{Le=a,co.transition=o}}function yd(){return Wt().memoizedState}function Bp(e,n,a){var o=ir(e);if(a={lane:o,action:a,hasEagerState:!1,eagerState:null,next:null},vd(e))jd(n,a);else if(a=Qu(e,n,a,o),a!==null){var u=yt();on(a,e,o,u),wd(a,n,o)}}function zp(e,n,a){var o=ir(e),u={lane:o,action:a,hasEagerState:!1,eagerState:null,next:null};if(vd(e))jd(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,j=f(x,a);if(u.hasEagerState=!0,u.eagerState=j,nn(j,x)){var k=n.interleaved;k===null?(u.next=u,ro(n)):(u.next=k.next,k.next=u),n.interleaved=u;return}}catch{}a=Qu(e,n,u,o),a!==null&&(u=yt(),on(a,e,o,u),wd(a,n,o))}}function vd(e){var n=e.alternate;return e===Ve||n!==null&&n===Ve}function jd(e,n){sa=vl=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function wd(e,n,a){if((a&4194240)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,yi(e,a)}}var Nl={readContext:Vt,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},Hp={readContext:Vt,useCallback:function(e,n){return gn().memoizedState=[e,n===void 0?null:n],e},useContext:Vt,useEffect:ud,useImperativeHandle:function(e,n,a){return a=a!=null?a.concat([e]):null,jl(4194308,4,fd.bind(null,n,e),a)},useLayoutEffect:function(e,n){return jl(4194308,4,e,n)},useInsertionEffect:function(e,n){return jl(4,2,e,n)},useMemo:function(e,n){var a=gn();return n=n===void 0?null:n,e=e(),a.memoizedState=[e,n],e},useReducer:function(e,n,a){var o=gn();return n=a!==void 0?a(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=Bp.bind(null,Ve,e),[o.memoizedState,e]},useRef:function(e){var n=gn();return e={current:e},n.memoizedState=e},useState:od,useDebugValue:go,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=od(!1),n=e[0];return e=Up.bind(null,e[1]),gn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,a){var o=Ve,u=gn();if(ze){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),rt===null)throw Error(l(349));(Tr&30)!==0||rd(o,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,ud(ad.bind(null,o,f,e),[e]),o.flags|=2048,ia(9,sd.bind(null,o,f,a,n),void 0,null),a},useId:function(){var e=gn(),n=rt.identifierPrefix;if(ze){var a=Tn,o=_n;a=(o&~(1<<32-tn(o)-1)).toString(32)+a,n=":"+n+"R"+a,a=aa++,0<a&&(n+="H"+a.toString(32)),n+=":"}else a=Fp++,n=":"+n+"r"+a.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},$p={readContext:Vt,useCallback:pd,useContext:Vt,useEffect:xo,useImperativeHandle:hd,useInsertionEffect:dd,useLayoutEffect:md,useMemo:xd,useReducer:ho,useRef:cd,useState:function(){return ho(la)},useDebugValue:go,useDeferredValue:function(e){var n=Wt();return gd(n,Ze.memoizedState,e)},useTransition:function(){var e=ho(la)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:td,useSyncExternalStore:nd,useId:yd,unstable_isNewReconciler:!1},Vp={readContext:Vt,useCallback:pd,useContext:Vt,useEffect:xo,useImperativeHandle:hd,useInsertionEffect:dd,useLayoutEffect:md,useMemo:xd,useReducer:po,useRef:cd,useState:function(){return po(la)},useDebugValue:go,useDeferredValue:function(e){var n=Wt();return Ze===null?n.memoizedState=e:gd(n,Ze.memoizedState,e)},useTransition:function(){var e=po(la)[0],n=Wt().memoizedState;return[e,n]},useMutableSource:td,useSyncExternalStore:nd,useId:yd,unstable_isNewReconciler:!1};function sn(e,n){if(e&&e.defaultProps){n=q({},n),e=e.defaultProps;for(var a in e)n[a]===void 0&&(n[a]=e[a]);return n}return n}function yo(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:q({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var bl={isMounted:function(e){return(e=e._reactInternals)?hn(e)===e:!1},enqueueSetState:function(e,n,a){e=e._reactInternals;var o=yt(),u=ir(e),f=An(o,u);f.payload=n,a!=null&&(f.callback=a),n=rr(e,f,u),n!==null&&(on(n,e,u,o),pl(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=yt(),u=ir(e),f=An(o,u);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=rr(e,f,u),n!==null&&(on(n,e,u,o),pl(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=yt(),o=ir(e),u=An(a,o);u.tag=2,n!=null&&(u.callback=n),n=rr(e,u,o),n!==null&&(on(n,e,o,a),pl(n,e,o))}};function Nd(e,n,a,o,u,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,x):n.prototype&&n.prototype.isPureReactComponent?!Ks(a,o)||!Ks(u,f):!0}function bd(e,n,a){var o=!1,u=er,f=n.contextType;return typeof f=="object"&&f!==null?f=Vt(f):(u=St(n)?Sr:dt.current,o=n.contextTypes,f=(o=o!=null)?ts(e,u):er),n=new n(a,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=bl,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function Sd(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&bl.enqueueReplaceState(n,n.state,null)}function vo(e,n,a,o){var u=e.stateNode;u.props=a,u.state=e.memoizedState,u.refs={},so(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=Vt(f):(f=St(n)?Sr:dt.current,u.context=ts(e,f)),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(yo(e,n,f,a),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&bl.enqueueReplaceState(u,u.state,null),xl(e,a,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function cs(e,n){try{var a="",o=n;do a+=ne(o),o=o.return;while(o);var u=a}catch(f){u=`
7
7
  Error generating stack: `+f.message+`
8
- `+f.stack}return{value:e,source:n,stack:u,digest:null}}function jo(e,n,a){return{value:e,source:null,stack:a??null,digest:n??null}}function wo(e,n){try{console.error(n.value)}catch(a){setTimeout(function(){throw a})}}var Wp=typeof WeakMap=="function"?WeakMap:Map;function kd(e,n,a){a=An(-1,a),a.tag=3,a.payload={element:null};var o=n.value;return a.callback=function(){Rl||(Rl=!0,Mo=o),wo(e,n)},a}function Ed(e,n,a){a=An(-1,a),a.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=n.value;a.payload=function(){return o(u)},a.callback=function(){wo(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(a.callback=function(){wo(e,n),typeof o!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),a}function Cd(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new Wp;var u=new Set;o.set(n,u)}else u=o.get(n),u===void 0&&(u=new Set,o.set(n,u));u.has(a)||(u.add(a),e=a0.bind(null,e,n,a),n.then(e,e))}function _d(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 Td(e,n,a,o,u){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(n=An(-1,1),n.tag=2,rr(a,n,1))),a.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var Gp=P.ReactCurrentOwner,kt=!1;function gt(e,n,a,o){n.child=e===null?Yu(n,null,a,o):ls(n,e.child,a,o)}function Rd(e,n,a,o,u){a=a.render;var f=n.ref;return os(n,u),o=mo(e,n,a,o,f,u),a=fo(),e!==null&&!kt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,Pn(e,n,u)):(ze&&a&&qi(n),n.flags|=1,gt(e,n,o,u),n.child)}function Ad(e,n,a,o,u){if(e===null){var f=a.type;return typeof f=="function"&&!$o(f)&&f.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(n.tag=15,n.type=f,Pd(e,n,f,o,u)):(e=Ml(a.type,null,o,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&u)===0){var x=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ks,a(x,o)&&e.ref===n.ref)return Pn(e,n,u)}return n.flags|=1,e=cr(f,o),e.ref=n.ref,e.return=n,n.child=e}function Pd(e,n,a,o,u){if(e!==null){var f=e.memoizedProps;if(Ks(f,o)&&e.ref===n.ref)if(kt=!1,n.pendingProps=o=f,(e.lanes&u)!==0)(e.flags&131072)!==0&&(kt=!0);else return n.lanes=e.lanes,Pn(e,n,u)}return No(e,n,a,o,u)}function Ld(e,n,a){var o=n.pendingProps,u=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(ms,Mt),Mt|=a;else{if((a&1073741824)===0)return e=f!==null?f.baseLanes|a:a,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,De(ms,Mt),Mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:a,De(ms,Mt),Mt|=o}else f!==null?(o=f.baseLanes|a,n.memoizedState=null):o=a,De(ms,Mt),Mt|=o;return gt(e,n,u,a),n.child}function Od(e,n){var a=n.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(n.flags|=512,n.flags|=2097152)}function No(e,n,a,o,u){var f=St(a)?Sr:dt.current;return f=ns(n,f),os(n,u),a=mo(e,n,a,o,f,u),o=fo(),e!==null&&!kt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,Pn(e,n,u)):(ze&&o&&qi(n),n.flags|=1,gt(e,n,a,u),n.child)}function Id(e,n,a,o,u){if(St(a)){var f=!0;il(n)}else f=!1;if(os(n,u),n.stateNode===null)kl(e,n),bd(n,a,o),vo(n,a,o,u),o=!0;else if(e===null){var x=n.stateNode,j=n.memoizedProps;x.props=j;var k=x.context,O=a.contextType;typeof O=="object"&&O!==null?O=Vt(O):(O=St(a)?Sr:dt.current,O=ns(n,O));var $=a.getDerivedStateFromProps,V=typeof $=="function"||typeof x.getSnapshotBeforeUpdate=="function";V||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==o||k!==O)&&Sd(n,x,o,O),nr=!1;var H=n.memoizedState;x.state=H,xl(n,o,x,u),k=n.memoizedState,j!==o||H!==k||bt.current||nr?(typeof $=="function"&&(yo(n,a,$,o),k=n.memoizedState),(j=nr||Nd(n,a,j,o,H,k,O))?(V||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=o,n.memoizedState=k),x.props=o,x.state=k,x.context=O,o=j):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{x=n.stateNode,Ju(e,n),j=n.memoizedProps,O=n.type===n.elementType?j:sn(n.type,j),x.props=O,V=n.pendingProps,H=x.context,k=a.contextType,typeof k=="object"&&k!==null?k=Vt(k):(k=St(a)?Sr:dt.current,k=ns(n,k));var ee=a.getDerivedStateFromProps;($=typeof ee=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==V||H!==k)&&Sd(n,x,o,k),nr=!1,H=n.memoizedState,x.state=H,xl(n,o,x,u);var se=n.memoizedState;j!==V||H!==se||bt.current||nr?(typeof ee=="function"&&(yo(n,a,ee,o),se=n.memoizedState),(O=nr||Nd(n,a,O,o,H,se,k)||!1)?($||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(o,se,k),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(o,se,k)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=se),x.props=o,x.state=se,x.context=k,o=O):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=1024),o=!1)}return bo(e,n,a,o,f,u)}function bo(e,n,a,o,u,f){Od(e,n);var x=(n.flags&128)!==0;if(!o&&!x)return u&&Bu(n,a,!1),Pn(e,n,f);o=n.stateNode,Gp.current=n;var j=x&&typeof a.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&x?(n.child=ls(n,e.child,null,f),n.child=ls(n,null,j,f)):gt(e,n,j,f),n.memoizedState=o.state,u&&Bu(n,a,!0),n.child}function Md(e){var n=e.stateNode;n.pendingContext?Fu(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Fu(e,n.context,!1),ao(e,n.containerInfo)}function Dd(e,n,a,o,u){return as(),Xi(u),n.flags|=256,gt(e,n,a,o),n.child}var So={dehydrated:null,treeContext:null,retryLane:0};function ko(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fd(e,n,a){var o=n.pendingProps,u=$e.current,f=!1,x=(n.flags&128)!==0,j;if((j=x)||(j=e!==null&&e.memoizedState===null?!1:(u&2)!==0),j?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),De($e,u&1),e===null)return Ji(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=o.children,e=o.fallback,f?(o=n.mode,f=n.child,x={mode:"hidden",children:x},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=Dl(x,o,0,null),e=Or(e,o,a,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=ko(a),n.memoizedState=So,e):Eo(n,x));if(u=e.memoizedState,u!==null&&(j=u.dehydrated,j!==null))return Kp(e,n,x,o,j,u,a);if(f){f=o.fallback,x=n.mode,u=e.child,j=u.sibling;var k={mode:"hidden",children:o.children};return(x&1)===0&&n.child!==u?(o=n.child,o.childLanes=0,o.pendingProps=k,n.deletions=null):(o=cr(u,k),o.subtreeFlags=u.subtreeFlags&14680064),j!==null?f=cr(j,f):(f=Or(f,x,a,null),f.flags|=2),f.return=n,o.return=n,o.sibling=f,n.child=o,o=f,f=n.child,x=e.child.memoizedState,x=x===null?ko(a):{baseLanes:x.baseLanes|a,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~a,n.memoizedState=So,o}return f=e.child,e=f.sibling,o=cr(f,{mode:"visible",children:o.children}),(n.mode&1)===0&&(o.lanes=a),o.return=n,o.sibling=null,e!==null&&(a=n.deletions,a===null?(n.deletions=[e],n.flags|=16):a.push(e)),n.child=o,n.memoizedState=null,o}function Eo(e,n){return n=Dl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Sl(e,n,a,o){return o!==null&&Xi(o),ls(n,e.child,null,a),e=Eo(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Kp(e,n,a,o,u,f,x){if(a)return n.flags&256?(n.flags&=-257,o=jo(Error(l(422))),Sl(e,n,x,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=o.fallback,u=n.mode,o=Dl({mode:"visible",children:o.children},u,0,null),f=Or(f,u,x,null),f.flags|=2,o.return=n,f.return=n,o.sibling=f,n.child=o,(n.mode&1)!==0&&ls(n,e.child,null,x),n.child.memoizedState=ko(x),n.memoizedState=So,f);if((n.mode&1)===0)return Sl(e,n,x,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var j=o.dgst;return o=j,f=Error(l(419)),o=jo(f,o,void 0),Sl(e,n,x,o)}if(j=(x&e.childLanes)!==0,kt||j){if(o=rt,o!==null){switch(x&-x){case 4:u=2;break;case 16:u=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:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|x))!==0?0:u,u!==0&&u!==f.retryLane&&(f.retryLane=u,Rn(e,u),on(o,e,u,-1))}return Ho(),o=jo(Error(l(421))),Sl(e,n,x,o)}return u.data==="$?"?(n.flags|=128,n.child=e.child,n=l0.bind(null,e),u._reactRetry=n,null):(e=f.treeContext,It=Xn(u.nextSibling),Ot=n,ze=!0,rn=null,e!==null&&(Ht[$t++]=_n,Ht[$t++]=Tn,Ht[$t++]=kr,_n=e.id,Tn=e.overflow,kr=n),n=Eo(n,o.children),n.flags|=4096,n)}function Ud(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),no(e.return,n,a)}function Co(e,n,a,o,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:u}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=a,f.tailMode=u)}function Bd(e,n,a){var o=n.pendingProps,u=o.revealOrder,f=o.tail;if(gt(e,n,o.children,a),o=$e.current,(o&2)!==0)o=o&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&&Ud(e,a,n);else if(e.tag===19)Ud(e,a,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}o&=1}if(De($e,o),(n.mode&1)===0)n.memoizedState=null;else switch(u){case"forwards":for(a=n.child,u=null;a!==null;)e=a.alternate,e!==null&&gl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),Co(n,!1,u,a,f);break;case"backwards":for(a=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&gl(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Co(n,!0,a,null,f);break;case"together":Co(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function kl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Pn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Rr|=n.lanes,(a&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(l(153));if(n.child!==null){for(e=n.child,a=cr(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=cr(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function qp(e,n,a){switch(n.tag){case 3:Md(n),as();break;case 5:ed(n);break;case 1:St(n.type)&&il(n);break;case 4:ao(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,u=n.memoizedProps.value;De(fl,o._currentValue),o._currentValue=u;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(De($e,$e.current&1),n.flags|=128,null):(a&n.child.childLanes)!==0?Fd(e,n,a):(De($e,$e.current&1),e=Pn(e,n,a),e!==null?e.sibling:null);De($e,$e.current&1);break;case 19:if(o=(a&n.childLanes)!==0,(e.flags&128)!==0){if(o)return Bd(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),De($e,$e.current),o)break;return null;case 22:case 23:return n.lanes=0,Ld(e,n,a)}return Pn(e,n,a)}var zd,_o,Hd,$d;zd=function(e,n){for(var a=n.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},_o=function(){},Hd=function(e,n,a,o){var u=e.memoizedProps;if(u!==o){e=n.stateNode,_r(xn.current);var f=null;switch(a){case"input":u=Dn(e,u),o=Dn(e,o),f=[];break;case"select":u=q({},u,{value:void 0}),o=q({},o,{value:void 0}),f=[];break;case"textarea":u=$r(e,u),o=$r(e,o),f=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=sl)}fn(a,o);var x;a=null;for(O in u)if(!o.hasOwnProperty(O)&&u.hasOwnProperty(O)&&u[O]!=null)if(O==="style"){var j=u[O];for(x in j)j.hasOwnProperty(x)&&(a||(a={}),a[x]="")}else O!=="dangerouslySetInnerHTML"&&O!=="children"&&O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(c.hasOwnProperty(O)?f||(f=[]):(f=f||[]).push(O,null));for(O in o){var k=o[O];if(j=u?.[O],o.hasOwnProperty(O)&&k!==j&&(k!=null||j!=null))if(O==="style")if(j){for(x in j)!j.hasOwnProperty(x)||k&&k.hasOwnProperty(x)||(a||(a={}),a[x]="");for(x in k)k.hasOwnProperty(x)&&j[x]!==k[x]&&(a||(a={}),a[x]=k[x])}else a||(f||(f=[]),f.push(O,a)),a=k;else O==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,j=j?j.__html:void 0,k!=null&&j!==k&&(f=f||[]).push(O,k)):O==="children"?typeof k!="string"&&typeof k!="number"||(f=f||[]).push(O,""+k):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&(c.hasOwnProperty(O)?(k!=null&&O==="onScroll"&&Ue("scroll",e),f||j===k||(f=[])):(f=f||[]).push(O,k))}a&&(f=f||[]).push("style",a);var O=f;(n.updateQueue=O)&&(n.flags|=4)}},$d=function(e,n,a,o){a!==o&&(n.flags|=4)};function oa(e,n){if(!ze)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ft(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function Yp(e,n,a){var o=n.pendingProps;switch(Yi(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(n),null;case 1:return St(n.type)&&ll(),ft(n),null;case 3:return o=n.stateNode,cs(),Be(bt),Be(dt),oo(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(dl(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,rn!==null&&(Uo(rn),rn=null))),_o(e,n),ft(n),null;case 5:lo(n);var u=_r(ra.current);if(a=n.type,e!==null&&n.stateNode!=null)Hd(e,n,a,o,u),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(l(166));return ft(n),null}if(e=_r(xn.current),dl(n)){o=n.stateNode,a=n.type;var f=n.memoizedProps;switch(o[pn]=n,o[Xs]=f,e=(n.mode&1)!==0,a){case"dialog":Ue("cancel",o),Ue("close",o);break;case"iframe":case"object":case"embed":Ue("load",o);break;case"video":case"audio":for(u=0;u<Ys.length;u++)Ue(Ys[u],o);break;case"source":Ue("error",o);break;case"img":case"image":case"link":Ue("error",o),Ue("load",o);break;case"details":Ue("toggle",o);break;case"input":dn(o,f),Ue("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},Ue("invalid",o);break;case"textarea":Oa(o,f),Ue("invalid",o)}fn(a,f),u=null;for(var x in f)if(f.hasOwnProperty(x)){var j=f[x];x==="children"?typeof j=="string"?o.textContent!==j&&(f.suppressHydrationWarning!==!0&&rl(o.textContent,j,e),u=["children",j]):typeof j=="number"&&o.textContent!==""+j&&(f.suppressHydrationWarning!==!0&&rl(o.textContent,j,e),u=["children",""+j]):c.hasOwnProperty(x)&&j!=null&&x==="onScroll"&&Ue("scroll",o)}switch(a){case"input":pr(o),jn(o,f,!0);break;case"textarea":pr(o),Un(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=sl)}o=u,n.updateQueue=o,o!==null&&(n.flags|=4)}else{x=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nn(a)),e==="http://www.w3.org/1999/xhtml"?a==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=x.createElement(a,{is:o.is}):(e=x.createElement(a),a==="select"&&(x=e,o.multiple?x.multiple=!0:o.size&&(x.size=o.size))):e=x.createElementNS(e,a),e[pn]=n,e[Xs]=o,zd(e,n,!1,!1),n.stateNode=e;e:{switch(x=vr(a,o),a){case"dialog":Ue("cancel",e),Ue("close",e),u=o;break;case"iframe":case"object":case"embed":Ue("load",e),u=o;break;case"video":case"audio":for(u=0;u<Ys.length;u++)Ue(Ys[u],e);u=o;break;case"source":Ue("error",e),u=o;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),u=o;break;case"details":Ue("toggle",e),u=o;break;case"input":dn(e,o),u=Dn(e,o),Ue("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=q({},o,{value:void 0}),Ue("invalid",e);break;case"textarea":Oa(e,o),u=$r(e,o),Ue("invalid",e);break;default:u=o}fn(a,u),j=u;for(f in j)if(j.hasOwnProperty(f)){var k=j[f];f==="style"?yr(e,k):f==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,k!=null&&Cs(e,k)):f==="children"?typeof k=="string"?(a!=="textarea"||k!=="")&&zn(e,k):typeof k=="number"&&zn(e,""+k):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(c.hasOwnProperty(f)?k!=null&&f==="onScroll"&&Ue("scroll",e):k!=null&&M(e,f,k,x))}switch(a){case"input":pr(e),jn(e,o,!1);break;case"textarea":pr(e),Un(e);break;case"option":o.value!=null&&e.setAttribute("value",""+_e(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?wn(e,!!o.multiple,f,!1):o.defaultValue!=null&&wn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=sl)}switch(a){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return ft(n),null;case 6:if(e&&n.stateNode!=null)$d(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(l(166));if(a=_r(ra.current),_r(xn.current),dl(n)){if(o=n.stateNode,a=n.memoizedProps,o[pn]=n,(f=o.nodeValue!==a)&&(e=Ot,e!==null))switch(e.tag){case 3:rl(o.nodeValue,a,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rl(o.nodeValue,a,(e.mode&1)!==0)}f&&(n.flags|=4)}else o=(a.nodeType===9?a:a.ownerDocument).createTextNode(o),o[pn]=n,n.stateNode=o}return ft(n),null;case 13:if(Be($e),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&It!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Gu(),as(),n.flags|=98560,f=!1;else if(f=dl(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[pn]=n}else as(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),f=!1}else rn!==null&&(Uo(rn),rn=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=a,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||($e.current&1)!==0?et===0&&(et=3):Ho())),n.updateQueue!==null&&(n.flags|=4),ft(n),null);case 4:return cs(),_o(e,n),e===null&&Qs(n.stateNode.containerInfo),ft(n),null;case 10:return to(n.type._context),ft(n),null;case 17:return St(n.type)&&ll(),ft(n),null;case 19:if(Be($e),f=n.memoizedState,f===null)return ft(n),null;if(o=(n.flags&128)!==0,x=f.rendering,x===null)if(o)oa(f,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=gl(e),x!==null){for(n.flags|=128,oa(f,!1),o=x.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=a,a=n.child;a!==null;)f=a,e=o,f.flags&=14680066,x=f.alternate,x===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=x.childLanes,f.lanes=x.lanes,f.child=x.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=x.memoizedProps,f.memoizedState=x.memoizedState,f.updateQueue=x.updateQueue,f.type=x.type,e=x.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return De($e,$e.current&1|2),n.child}e=e.sibling}f.tail!==null&&Se()>fs&&(n.flags|=128,o=!0,oa(f,!1),n.lanes=4194304)}else{if(!o)if(e=gl(x),e!==null){if(n.flags|=128,o=!0,a=e.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),oa(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!ze)return ft(n),null}else 2*Se()-f.renderingStartTime>fs&&a!==1073741824&&(n.flags|=128,o=!0,oa(f,!1),n.lanes=4194304);f.isBackwards?(x.sibling=n.child,n.child=x):(a=f.last,a!==null?a.sibling=x:n.child=x,f.last=x)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Se(),n.sibling=null,a=$e.current,De($e,o?a&1|2:a&1),n):(ft(n),null);case 22:case 23:return zo(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&(n.mode&1)!==0?(Mt&1073741824)!==0&&(ft(n),n.subtreeFlags&6&&(n.flags|=8192)):ft(n),null;case 24:return null;case 25:return null}throw Error(l(156,n.tag))}function Qp(e,n){switch(Yi(n),n.tag){case 1:return St(n.type)&&ll(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return cs(),Be(bt),Be(dt),oo(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return lo(n),null;case 13:if(Be($e),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(l(340));as()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Be($e),null;case 4:return cs(),null;case 10:return to(n.type._context),null;case 22:case 23:return zo(),null;case 24:return null;default:return null}}var El=!1,ht=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,re=null;function ds(e,n){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(o){Ke(e,n,o)}else a.current=null}function To(e,n,a){try{a()}catch(o){Ke(e,n,o)}}var Vd=!1;function Xp(e,n){if(Bi=Ga,e=Nu(),Pi(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var u=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var x=0,j=-1,k=-1,O=0,$=0,V=e,H=null;t:for(;;){for(var ee;V!==a||u!==0&&V.nodeType!==3||(j=x+u),V!==f||o!==0&&V.nodeType!==3||(k=x+o),V.nodeType===3&&(x+=V.nodeValue.length),(ee=V.firstChild)!==null;)H=V,V=ee;for(;;){if(V===e)break t;if(H===a&&++O===u&&(j=x),H===f&&++$===o&&(k=x),(ee=V.nextSibling)!==null)break;V=H,H=V.parentNode}V=ee}a=j===-1||k===-1?null:{start:j,end:k}}else a=null}a=a||{start:0,end:0}}else a=null;for(zi={focusedElem:e,selectionRange:a},Ga=!1,re=n;re!==null;)if(n=re,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,re=e;else for(;re!==null;){n=re;try{var se=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,Ye=se.memoizedState,A=n.stateNode,T=A.getSnapshotBeforeUpdate(n.elementType===n.type?ie:sn(n.type,ie),Ye);A.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var L=n.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(K){Ke(n,n.return,K)}if(e=n.sibling,e!==null){e.return=n.return,re=e;break}re=n.return}return se=Vd,Vd=!1,se}function ca(e,n,a){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var f=u.destroy;u.destroy=void 0,f!==void 0&&To(n,a,f)}u=u.next}while(u!==o)}}function Cl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var o=a.create;a.destroy=o()}a=a.next}while(a!==n)}}function Ro(e){var n=e.ref;if(n!==null){var a=e.stateNode;e.tag,e=a,typeof n=="function"?n(e):n.current=e}}function Wd(e){var n=e.alternate;n!==null&&(e.alternate=null,Wd(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[pn],delete n[Xs],delete n[Wi],delete n[Op],delete n[Ip])),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 Gd(e){return e.tag===5||e.tag===3||e.tag===4}function Kd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gd(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 Ao(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.nodeType===8?a.parentNode.insertBefore(e,n):a.insertBefore(e,n):(a.nodeType===8?(n=a.parentNode,n.insertBefore(e,a)):(n=a,n.appendChild(e)),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=sl));else if(o!==4&&(e=e.child,e!==null))for(Ao(e,n,a),e=e.sibling;e!==null;)Ao(e,n,a),e=e.sibling}function Po(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Po(e,n,a),e=e.sibling;e!==null;)Po(e,n,a),e=e.sibling}var ot=null,an=!1;function sr(e,n,a){for(a=a.child;a!==null;)qd(e,n,a),a=a.sibling}function qd(e,n,a){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(Nr,a)}catch{}switch(a.tag){case 5:ht||ds(a,n);case 6:var o=ot,u=an;ot=null,sr(e,n,a),ot=o,an=u,ot!==null&&(an?(e=ot,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):ot.removeChild(a.stateNode));break;case 18:ot!==null&&(an?(e=ot,a=a.stateNode,e.nodeType===8?Vi(e.parentNode,a):e.nodeType===1&&Vi(e,a),zs(e)):Vi(ot,a.stateNode));break;case 4:o=ot,u=an,ot=a.stateNode.containerInfo,an=!0,sr(e,n,a),ot=o,an=u;break;case 0:case 11:case 14:case 15:if(!ht&&(o=a.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var f=u,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&To(a,n,x),u=u.next}while(u!==o)}sr(e,n,a);break;case 1:if(!ht&&(ds(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=a.memoizedProps,o.state=a.memoizedState,o.componentWillUnmount()}catch(j){Ke(a,n,j)}sr(e,n,a);break;case 21:sr(e,n,a);break;case 22:a.mode&1?(ht=(o=ht)||a.memoizedState!==null,sr(e,n,a),ht=o):sr(e,n,a);break;default:sr(e,n,a)}}function Yd(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new Jp),n.forEach(function(o){var u=i0.bind(null,e,o);a.has(o)||(a.add(o),o.then(u,u))})}}function ln(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];try{var f=e,x=n,j=x;e:for(;j!==null;){switch(j.tag){case 5:ot=j.stateNode,an=!1;break e;case 3:ot=j.stateNode.containerInfo,an=!0;break e;case 4:ot=j.stateNode.containerInfo,an=!0;break e}j=j.return}if(ot===null)throw Error(l(160));qd(f,x,u),ot=null,an=!1;var k=u.alternate;k!==null&&(k.return=null),u.return=null}catch(O){Ke(u,n,O)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Qd(n,e),n=n.sibling}function Qd(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ln(n,e),yn(e),o&4){try{ca(3,e,e.return),Cl(3,e)}catch(ie){Ke(e,e.return,ie)}try{ca(5,e,e.return)}catch(ie){Ke(e,e.return,ie)}}break;case 1:ln(n,e),yn(e),o&512&&a!==null&&ds(a,a.return);break;case 5:if(ln(n,e),yn(e),o&512&&a!==null&&ds(a,a.return),e.flags&32){var u=e.stateNode;try{zn(u,"")}catch(ie){Ke(e,e.return,ie)}}if(o&4&&(u=e.stateNode,u!=null)){var f=e.memoizedProps,x=a!==null?a.memoizedProps:f,j=e.type,k=e.updateQueue;if(e.updateQueue=null,k!==null)try{j==="input"&&f.type==="radio"&&f.name!=null&&Hr(u,f),vr(j,x);var O=vr(j,f);for(x=0;x<k.length;x+=2){var $=k[x],V=k[x+1];$==="style"?yr(u,V):$==="dangerouslySetInnerHTML"?Cs(u,V):$==="children"?zn(u,V):M(u,$,V,O)}switch(j){case"input":xr(u,f);break;case"textarea":Vr(u,f);break;case"select":var H=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!f.multiple;var ee=f.value;ee!=null?wn(u,!!f.multiple,ee,!1):H!==!!f.multiple&&(f.defaultValue!=null?wn(u,!!f.multiple,f.defaultValue,!0):wn(u,!!f.multiple,f.multiple?[]:"",!1))}u[Xs]=f}catch(ie){Ke(e,e.return,ie)}}break;case 6:if(ln(n,e),yn(e),o&4){if(e.stateNode===null)throw Error(l(162));u=e.stateNode,f=e.memoizedProps;try{u.nodeValue=f}catch(ie){Ke(e,e.return,ie)}}break;case 3:if(ln(n,e),yn(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{zs(n.containerInfo)}catch(ie){Ke(e,e.return,ie)}break;case 4:ln(n,e),yn(e);break;case 13:ln(n,e),yn(e),u=e.child,u.flags&8192&&(f=u.memoizedState!==null,u.stateNode.isHidden=f,!f||u.alternate!==null&&u.alternate.memoizedState!==null||(Io=Se())),o&4&&Yd(e);break;case 22:if($=a!==null&&a.memoizedState!==null,e.mode&1?(ht=(O=ht)||$,ln(n,e),ht=O):ln(n,e),yn(e),o&8192){if(O=e.memoizedState!==null,(e.stateNode.isHidden=O)&&!$&&(e.mode&1)!==0)for(re=e,$=e.child;$!==null;){for(V=re=$;re!==null;){switch(H=re,ee=H.child,H.tag){case 0:case 11:case 14:case 15:ca(4,H,H.return);break;case 1:ds(H,H.return);var se=H.stateNode;if(typeof se.componentWillUnmount=="function"){o=H,a=H.return;try{n=o,se.props=n.memoizedProps,se.state=n.memoizedState,se.componentWillUnmount()}catch(ie){Ke(o,a,ie)}}break;case 5:ds(H,H.return);break;case 22:if(H.memoizedState!==null){Zd(V);continue}}ee!==null?(ee.return=H,re=ee):Zd(V)}$=$.sibling}e:for($=null,V=e;;){if(V.tag===5){if($===null){$=V;try{u=V.stateNode,O?(f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(j=V.stateNode,k=V.memoizedProps.style,x=k!=null&&k.hasOwnProperty("display")?k.display:null,j.style.display=gr("display",x))}catch(ie){Ke(e,e.return,ie)}}}else if(V.tag===6){if($===null)try{V.stateNode.nodeValue=O?"":V.memoizedProps}catch(ie){Ke(e,e.return,ie)}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===e)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===e)break e;for(;V.sibling===null;){if(V.return===null||V.return===e)break e;$===V&&($=null),V=V.return}$===V&&($=null),V.sibling.return=V.return,V=V.sibling}}break;case 19:ln(n,e),yn(e),o&4&&Yd(e);break;case 21:break;default:ln(n,e),yn(e)}}function yn(e){var n=e.flags;if(n&2){try{e:{for(var a=e.return;a!==null;){if(Gd(a)){var o=a;break e}a=a.return}throw Error(l(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&(zn(u,""),o.flags&=-33);var f=Kd(e);Po(e,f,u);break;case 3:case 4:var x=o.stateNode.containerInfo,j=Kd(e);Ao(e,j,x);break;default:throw Error(l(161))}}catch(k){Ke(e,e.return,k)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Zp(e,n,a){re=e,Jd(e)}function Jd(e,n,a){for(var o=(e.mode&1)!==0;re!==null;){var u=re,f=u.child;if(u.tag===22&&o){var x=u.memoizedState!==null||El;if(!x){var j=u.alternate,k=j!==null&&j.memoizedState!==null||ht;j=El;var O=ht;if(El=x,(ht=k)&&!O)for(re=u;re!==null;)x=re,k=x.child,x.tag===22&&x.memoizedState!==null?em(u):k!==null?(k.return=x,re=k):em(u);for(;f!==null;)re=f,Jd(f),f=f.sibling;re=u,El=j,ht=O}Xd(e)}else(u.subtreeFlags&8772)!==0&&f!==null?(f.return=u,re=f):Xd(e)}}function Xd(e){for(;re!==null;){var n=re;if((n.flags&8772)!==0){var a=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:ht||Cl(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!ht)if(a===null)o.componentDidMount();else{var u=n.elementType===n.type?a.memoizedProps:sn(n.type,a.memoizedProps);o.componentDidUpdate(u,a.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&Zu(n,f,o);break;case 3:var x=n.updateQueue;if(x!==null){if(a=null,n.child!==null)switch(n.child.tag){case 5:a=n.child.stateNode;break;case 1:a=n.child.stateNode}Zu(n,x,a)}break;case 5:var j=n.stateNode;if(a===null&&n.flags&4){a=j;var k=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":k.autoFocus&&a.focus();break;case"img":k.src&&(a.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var O=n.alternate;if(O!==null){var $=O.memoizedState;if($!==null){var V=$.dehydrated;V!==null&&zs(V)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}ht||n.flags&512&&Ro(n)}catch(H){Ke(n,n.return,H)}}if(n===e){re=null;break}if(a=n.sibling,a!==null){a.return=n.return,re=a;break}re=n.return}}function Zd(e){for(;re!==null;){var n=re;if(n===e){re=null;break}var a=n.sibling;if(a!==null){a.return=n.return,re=a;break}re=n.return}}function em(e){for(;re!==null;){var n=re;try{switch(n.tag){case 0:case 11:case 15:var a=n.return;try{Cl(4,n)}catch(k){Ke(n,a,k)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var u=n.return;try{o.componentDidMount()}catch(k){Ke(n,u,k)}}var f=n.return;try{Ro(n)}catch(k){Ke(n,f,k)}break;case 5:var x=n.return;try{Ro(n)}catch(k){Ke(n,x,k)}}}catch(k){Ke(n,n.return,k)}if(n===e){re=null;break}var j=n.sibling;if(j!==null){j.return=n.return,re=j;break}re=n.return}}var e0=Math.ceil,_l=P.ReactCurrentDispatcher,Lo=P.ReactCurrentOwner,Gt=P.ReactCurrentBatchConfig,Re=0,rt=null,Xe=null,ct=0,Mt=0,ms=Zn(0),et=0,ua=null,Rr=0,Tl=0,Oo=0,da=null,Et=null,Io=0,fs=1/0,Ln=null,Rl=!1,Mo=null,ar=null,Al=!1,lr=null,Pl=0,ma=0,Do=null,Ll=-1,Ol=0;function yt(){return(Re&6)!==0?Se():Ll!==-1?Ll:Ll=Se()}function ir(e){return(e.mode&1)===0?1:(Re&2)!==0&&ct!==0?ct&-ct:Dp.transition!==null?(Ol===0&&(Ol=Kc()),Ol):(e=Le,e!==0||(e=window.event,e=e===void 0?16:nu(e.type)),e)}function on(e,n,a,o){if(50<ma)throw ma=0,Do=null,Error(l(185));Ms(e,a,o),((Re&2)===0||e!==rt)&&(e===rt&&((Re&2)===0&&(Tl|=a),et===4&&or(e,ct)),Ct(e,o),a===1&&Re===0&&(n.mode&1)===0&&(fs=Se()+500,ol&&tr()))}function Ct(e,n){var a=e.callbackNode;Dh(e,n);var o=$a(e,e===rt?ct:0);if(o===0)a!==null&&G(a),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(a!=null&&G(a),n===1)e.tag===0?Mp(nm.bind(null,e)):zu(nm.bind(null,e)),Pp(function(){(Re&6)===0&&tr()}),a=null;else{switch(qc(o)){case 1:a=tt;break;case 4:a=zt;break;case 16:a=en;break;case 536870912:a=Je;break;default:a=en}a=um(a,tm.bind(null,e))}e.callbackPriority=n,e.callbackNode=a}}function tm(e,n){if(Ll=-1,Ol=0,(Re&6)!==0)throw Error(l(327));var a=e.callbackNode;if(hs()&&e.callbackNode!==a)return null;var o=$a(e,e===rt?ct:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||n)n=Il(e,o);else{n=o;var u=Re;Re|=2;var f=sm();(rt!==e||ct!==n)&&(Ln=null,fs=Se()+500,Pr(e,n));do try{r0();break}catch(j){rm(e,j)}while(!0);eo(),_l.current=f,Re=u,Xe!==null?n=0:(rt=null,ct=0,n=et)}if(n!==0){if(n===2&&(u=xi(e),u!==0&&(o=u,n=Fo(e,u))),n===1)throw a=ua,Pr(e,0),or(e,o),Ct(e,Se()),a;if(n===6)or(e,o);else{if(u=e.current.alternate,(o&30)===0&&!t0(u)&&(n=Il(e,o),n===2&&(f=xi(e),f!==0&&(o=f,n=Fo(e,f))),n===1))throw a=ua,Pr(e,0),or(e,o),Ct(e,Se()),a;switch(e.finishedWork=u,e.finishedLanes=o,n){case 0:case 1:throw Error(l(345));case 2:Lr(e,Et,Ln);break;case 3:if(or(e,o),(o&130023424)===o&&(n=Io+500-Se(),10<n)){if($a(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){yt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=$i(Lr.bind(null,e,Et,Ln),n);break}Lr(e,Et,Ln);break;case 4:if(or(e,o),(o&4194240)===o)break;for(n=e.eventTimes,u=-1;0<o;){var x=31-tn(o);f=1<<x,x=n[x],x>u&&(u=x),o&=~f}if(o=u,o=Se()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*e0(o/1960))-o,10<o){e.timeoutHandle=$i(Lr.bind(null,e,Et,Ln),o);break}Lr(e,Et,Ln);break;case 5:Lr(e,Et,Ln);break;default:throw Error(l(329))}}}return Ct(e,Se()),e.callbackNode===a?tm.bind(null,e):null}function Fo(e,n){var a=da;return e.current.memoizedState.isDehydrated&&(Pr(e,n).flags|=256),e=Il(e,n),e!==2&&(n=Et,Et=a,n!==null&&Uo(n)),e}function Uo(e){Et===null?Et=e:Et.push.apply(Et,e)}function t0(e){for(var n=e;;){if(n.flags&16384){var a=n.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var o=0;o<a.length;o++){var u=a[o],f=u.getSnapshot;u=u.value;try{if(!nn(f(),u))return!1}catch{return!1}}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;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 or(e,n){for(n&=~Oo,n&=~Tl,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var a=31-tn(n),o=1<<a;e[a]=-1,n&=~o}}function nm(e){if((Re&6)!==0)throw Error(l(327));hs();var n=$a(e,0);if((n&1)===0)return Ct(e,Se()),null;var a=Il(e,n);if(e.tag!==0&&a===2){var o=xi(e);o!==0&&(n=o,a=Fo(e,o))}if(a===1)throw a=ua,Pr(e,0),or(e,n),Ct(e,Se()),a;if(a===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Lr(e,Et,Ln),Ct(e,Se()),null}function Bo(e,n){var a=Re;Re|=1;try{return e(n)}finally{Re=a,Re===0&&(fs=Se()+500,ol&&tr())}}function Ar(e){lr!==null&&lr.tag===0&&(Re&6)===0&&hs();var n=Re;Re|=1;var a=Gt.transition,o=Le;try{if(Gt.transition=null,Le=1,e)return e()}finally{Le=o,Gt.transition=a,Re=n,(Re&6)===0&&tr()}}function zo(){Mt=ms.current,Be(ms)}function Pr(e,n){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,Ap(a)),Xe!==null)for(a=Xe.return;a!==null;){var o=a;switch(Yi(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&ll();break;case 3:cs(),Be(bt),Be(dt),oo();break;case 5:lo(o);break;case 4:cs();break;case 13:Be($e);break;case 19:Be($e);break;case 10:to(o.type._context);break;case 22:case 23:zo()}a=a.return}if(rt=e,Xe=e=cr(e.current,null),ct=Mt=n,et=0,ua=null,Oo=Tl=Rr=0,Et=da=null,Cr!==null){for(n=0;n<Cr.length;n++)if(a=Cr[n],o=a.interleaved,o!==null){a.interleaved=null;var u=o.next,f=a.pending;if(f!==null){var x=f.next;f.next=u,o.next=x}a.pending=o}Cr=null}return e}function rm(e,n){do{var a=Xe;try{if(eo(),yl.current=Nl,vl){for(var o=Ve.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}vl=!1}if(Tr=0,nt=Ze=Ve=null,sa=!1,aa=0,Lo.current=null,a===null||a.return===null){et=1,ua=n,Xe=null;break}e:{var f=e,x=a.return,j=a,k=n;if(n=ct,j.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){var O=k,$=j,V=$.tag;if(($.mode&1)===0&&(V===0||V===11||V===15)){var H=$.alternate;H?($.updateQueue=H.updateQueue,$.memoizedState=H.memoizedState,$.lanes=H.lanes):($.updateQueue=null,$.memoizedState=null)}var ee=_d(x);if(ee!==null){ee.flags&=-257,Td(ee,x,j,f,n),ee.mode&1&&Cd(f,O,n),n=ee,k=O;var se=n.updateQueue;if(se===null){var ie=new Set;ie.add(k),n.updateQueue=ie}else se.add(k);break e}else{if((n&1)===0){Cd(f,O,n),Ho();break e}k=Error(l(426))}}else if(ze&&j.mode&1){var Ye=_d(x);if(Ye!==null){(Ye.flags&65536)===0&&(Ye.flags|=256),Td(Ye,x,j,f,n),Xi(us(k,j));break e}}f=k=us(k,j),et!==4&&(et=2),da===null?da=[f]:da.push(f),f=x;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var A=kd(f,k,n);Xu(f,A);break e;case 1:j=k;var T=f.type,L=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(ar===null||!ar.has(L)))){f.flags|=65536,n&=-n,f.lanes|=n;var K=Ed(f,j,n);Xu(f,K);break e}}f=f.return}while(f!==null)}lm(a)}catch(ce){n=ce,Xe===a&&a!==null&&(Xe=a=a.return);continue}break}while(!0)}function sm(){var e=_l.current;return _l.current=Nl,e===null?Nl:e}function Ho(){(et===0||et===3||et===2)&&(et=4),rt===null||(Rr&268435455)===0&&(Tl&268435455)===0||or(rt,ct)}function Il(e,n){var a=Re;Re|=2;var o=sm();(rt!==e||ct!==n)&&(Ln=null,Pr(e,n));do try{n0();break}catch(u){rm(e,u)}while(!0);if(eo(),Re=a,_l.current=o,Xe!==null)throw Error(l(261));return rt=null,ct=0,et}function n0(){for(;Xe!==null;)am(Xe)}function r0(){for(;Xe!==null&&!le();)am(Xe)}function am(e){var n=cm(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,n===null?lm(e):Xe=n,Lo.current=null}function lm(e){var n=e;do{var a=n.alternate;if(e=n.return,(n.flags&32768)===0){if(a=Yp(a,n,Mt),a!==null){Xe=a;return}}else{if(a=Qp(a,n),a!==null){a.flags&=32767,Xe=a;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{et=6,Xe=null;return}}if(n=n.sibling,n!==null){Xe=n;return}Xe=n=e}while(n!==null);et===0&&(et=5)}function Lr(e,n,a){var o=Le,u=Gt.transition;try{Gt.transition=null,Le=1,s0(e,n,a,o)}finally{Gt.transition=u,Le=o}return null}function s0(e,n,a,o){do hs();while(lr!==null);if((Re&6)!==0)throw Error(l(327));a=e.finishedWork;var u=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var f=a.lanes|a.childLanes;if(Fh(e,f),e===rt&&(Xe=rt=null,ct=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Al||(Al=!0,um(en,function(){return hs(),null})),f=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||f){f=Gt.transition,Gt.transition=null;var x=Le;Le=1;var j=Re;Re|=4,Lo.current=null,Xp(e,a),Qd(a,e),Sp(zi),Ga=!!Bi,zi=Bi=null,e.current=a,Zp(a),Me(),Re=j,Le=x,Gt.transition=f}else e.current=a;if(Al&&(Al=!1,lr=e,Pl=u),f=e.pendingLanes,f===0&&(ar=null),Ph(a.stateNode),Ct(e,Se()),n!==null)for(o=e.onRecoverableError,a=0;a<n.length;a++)u=n[a],o(u.value,{componentStack:u.stack,digest:u.digest});if(Rl)throw Rl=!1,e=Mo,Mo=null,e;return(Pl&1)!==0&&e.tag!==0&&hs(),f=e.pendingLanes,(f&1)!==0?e===Do?ma++:(ma=0,Do=e):ma=0,tr(),null}function hs(){if(lr!==null){var e=qc(Pl),n=Gt.transition,a=Le;try{if(Gt.transition=null,Le=16>e?16:e,lr===null)var o=!1;else{if(e=lr,lr=null,Pl=0,(Re&6)!==0)throw Error(l(331));var u=Re;for(Re|=4,re=e.current;re!==null;){var f=re,x=f.child;if((re.flags&16)!==0){var j=f.deletions;if(j!==null){for(var k=0;k<j.length;k++){var O=j[k];for(re=O;re!==null;){var $=re;switch($.tag){case 0:case 11:case 15:ca(8,$,f)}var V=$.child;if(V!==null)V.return=$,re=V;else for(;re!==null;){$=re;var H=$.sibling,ee=$.return;if(Wd($),$===O){re=null;break}if(H!==null){H.return=ee,re=H;break}re=ee}}}var se=f.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var Ye=ie.sibling;ie.sibling=null,ie=Ye}while(ie!==null)}}re=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,re=x;else e:for(;re!==null;){if(f=re,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:ca(9,f,f.return)}var A=f.sibling;if(A!==null){A.return=f.return,re=A;break e}re=f.return}}var T=e.current;for(re=T;re!==null;){x=re;var L=x.child;if((x.subtreeFlags&2064)!==0&&L!==null)L.return=x,re=L;else e:for(x=T;re!==null;){if(j=re,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:Cl(9,j)}}catch(ce){Ke(j,j.return,ce)}if(j===x){re=null;break e}var K=j.sibling;if(K!==null){K.return=j.return,re=K;break e}re=j.return}}if(Re=u,tr(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(Nr,e)}catch{}o=!0}return o}finally{Le=a,Gt.transition=n}}return!1}function im(e,n,a){n=us(a,n),n=kd(e,n,1),e=rr(e,n,1),n=yt(),e!==null&&(Ms(e,1,n),Ct(e,n))}function Ke(e,n,a){if(e.tag===3)im(e,e,a);else for(;n!==null;){if(n.tag===3){im(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ar===null||!ar.has(o))){e=us(a,e),e=Ed(n,e,1),n=rr(n,e,1),e=yt(),n!==null&&(Ms(n,1,e),Ct(n,e));break}}n=n.return}}function a0(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),n=yt(),e.pingedLanes|=e.suspendedLanes&a,rt===e&&(ct&a)===a&&(et===4||et===3&&(ct&130023424)===ct&&500>Se()-Io?Pr(e,0):Oo|=a),Ct(e,n)}function om(e,n){n===0&&((e.mode&1)===0?n=1:(n=Ha,Ha<<=1,(Ha&130023424)===0&&(Ha=4194304)));var a=yt();e=Rn(e,n),e!==null&&(Ms(e,n,a),Ct(e,a))}function l0(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),om(e,a)}function i0(e,n){var a=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(l(314))}o!==null&&o.delete(n),om(e,a)}var cm;cm=function(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps||bt.current)kt=!0;else{if((e.lanes&a)===0&&(n.flags&128)===0)return kt=!1,qp(e,n,a);kt=(e.flags&131072)!==0}else kt=!1,ze&&(n.flags&1048576)!==0&&Hu(n,ul,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;kl(e,n),e=n.pendingProps;var u=ns(n,dt.current);os(n,a),u=mo(null,n,o,e,u,a);var f=fo();return n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,St(o)?(f=!0,il(n)):f=!1,n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,so(n),u.updater=bl,n.stateNode=u,u._reactInternals=n,vo(n,o,e,a),n=bo(null,n,o,!0,f,a)):(n.tag=0,ze&&f&&qi(n),gt(null,n,u,a),n=n.child),n;case 16:o=n.elementType;e:{switch(kl(e,n),e=n.pendingProps,u=o._init,o=u(o._payload),n.type=o,u=n.tag=c0(o),e=sn(o,e),u){case 0:n=No(null,n,o,e,a);break e;case 1:n=Id(null,n,o,e,a);break e;case 11:n=Rd(null,n,o,e,a);break e;case 14:n=Ad(null,n,o,sn(o.type,e),a);break e}throw Error(l(306,o,""))}return n;case 0:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),No(e,n,o,u,a);case 1:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),Id(e,n,o,u,a);case 3:e:{if(Md(n),e===null)throw Error(l(387));o=n.pendingProps,f=n.memoizedState,u=f.element,Ju(e,n),xl(n,o,null,a);var x=n.memoizedState;if(o=x.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){u=us(Error(l(423)),n),n=Dd(e,n,o,a,u);break e}else if(o!==u){u=us(Error(l(424)),n),n=Dd(e,n,o,a,u);break e}else for(It=Xn(n.stateNode.containerInfo.firstChild),Ot=n,ze=!0,rn=null,a=Yu(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(as(),o===u){n=Pn(e,n,a);break e}gt(e,n,o,a)}n=n.child}return n;case 5:return ed(n),e===null&&Ji(n),o=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,x=u.children,Hi(o,u)?x=null:f!==null&&Hi(o,f)&&(n.flags|=32),Od(e,n),gt(e,n,x,a),n.child;case 6:return e===null&&Ji(n),null;case 13:return Fd(e,n,a);case 4:return ao(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=ls(n,null,o,a):gt(e,n,o,a),n.child;case 11:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),Rd(e,n,o,u,a);case 7:return gt(e,n,n.pendingProps,a),n.child;case 8:return gt(e,n,n.pendingProps.children,a),n.child;case 12:return gt(e,n,n.pendingProps.children,a),n.child;case 10:e:{if(o=n.type._context,u=n.pendingProps,f=n.memoizedProps,x=u.value,De(fl,o._currentValue),o._currentValue=x,f!==null)if(nn(f.value,x)){if(f.children===u.children&&!bt.current){n=Pn(e,n,a);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var j=f.dependencies;if(j!==null){x=f.child;for(var k=j.firstContext;k!==null;){if(k.context===o){if(f.tag===1){k=An(-1,a&-a),k.tag=2;var O=f.updateQueue;if(O!==null){O=O.shared;var $=O.pending;$===null?k.next=k:(k.next=$.next,$.next=k),O.pending=k}}f.lanes|=a,k=f.alternate,k!==null&&(k.lanes|=a),no(f.return,a,n),j.lanes|=a;break}k=k.next}}else if(f.tag===10)x=f.type===n.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(l(341));x.lanes|=a,j=x.alternate,j!==null&&(j.lanes|=a),no(x,a,n),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===n){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}gt(e,n,u.children,a),n=n.child}return n;case 9:return u=n.type,o=n.pendingProps.children,os(n,a),u=Vt(u),o=o(u),n.flags|=1,gt(e,n,o,a),n.child;case 14:return o=n.type,u=sn(o,n.pendingProps),u=sn(o.type,u),Ad(e,n,o,u,a);case 15:return Pd(e,n,n.type,n.pendingProps,a);case 17:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),kl(e,n),n.tag=1,St(o)?(e=!0,il(n)):e=!1,os(n,a),bd(n,o,u),vo(n,o,u,a),bo(null,n,o,!0,e,a);case 19:return Bd(e,n,a);case 22:return Ld(e,n,a)}throw Error(l(156,n.tag))};function um(e,n){return E(e,n)}function o0(e,n,a,o){this.tag=e,this.key=a,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,n,a,o){return new o0(e,n,a,o)}function $o(e){return e=e.prototype,!(!e||!e.isReactComponent)}function c0(e){if(typeof e=="function")return $o(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ye)return 11;if(e===Z)return 14}return 2}function cr(e,n){var a=e.alternate;return a===null?(a=Kt(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function Ml(e,n,a,o,u,f){var x=2;if(o=e,typeof e=="function")$o(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case z:return Or(a.children,u,f,n);case oe:x=8,u|=8;break;case xe:return e=Kt(12,a,n,u|2),e.elementType=xe,e.lanes=f,e;case me:return e=Kt(13,a,n,u),e.elementType=me,e.lanes=f,e;case ve:return e=Kt(19,a,n,u),e.elementType=ve,e.lanes=f,e;case X:return Dl(a,u,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ne:x=10;break e;case te:x=9;break e;case ye:x=11;break e;case Z:x=14;break e;case Q:x=16,o=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return n=Kt(x,a,n,u),n.elementType=e,n.type=o,n.lanes=f,n}function Or(e,n,a,o){return e=Kt(7,e,o,n),e.lanes=a,e}function Dl(e,n,a,o){return e=Kt(22,e,o,n),e.elementType=X,e.lanes=a,e.stateNode={isHidden:!1},e}function Vo(e,n,a){return e=Kt(6,e,null,n),e.lanes=a,e}function Wo(e,n,a){return n=Kt(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function u0(e,n,a,o,u){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=gi(0),this.expirationTimes=gi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gi(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Go(e,n,a,o,u,f,x,j,k){return e=new u0(e,n,a,j,k),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Kt(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},so(f),e}function d0(e,n,a){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ae,key:o==null?null:""+o,children:e,containerInfo:n,implementation:a}}function dm(e){if(!e)return er;e=e._reactInternals;e:{if(hn(e)!==e||e.tag!==1)throw Error(l(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(St(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(l(171))}if(e.tag===1){var a=e.type;if(St(a))return Uu(e,a,n)}return n}function mm(e,n,a,o,u,f,x,j,k){return e=Go(a,o,!0,e,u,f,x,j,k),e.context=dm(null),a=e.current,o=yt(),u=ir(a),f=An(o,u),f.callback=n??null,rr(a,f,u),e.current.lanes=u,Ms(e,u,o),Ct(e,o),e}function Fl(e,n,a,o){var u=n.current,f=yt(),x=ir(u);return a=dm(a),n.context===null?n.context=a:n.pendingContext=a,n=An(f,x),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=rr(u,n,x),e!==null&&(on(e,u,x,f),pl(e,u,x)),x}function Ul(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function fm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Ko(e,n){fm(e,n),(e=e.alternate)&&fm(e,n)}function m0(){return null}var hm=typeof reportError=="function"?reportError:function(e){console.error(e)};function qo(e){this._internalRoot=e}Bl.prototype.render=qo.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(l(409));Fl(e,n,null,null)},Bl.prototype.unmount=qo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Ar(function(){Fl(null,e,null,null)}),n[En]=null}};function Bl(e){this._internalRoot=e}Bl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Jc();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Yn.length&&n!==0&&n<Yn[a].priority;a++);Yn.splice(a,0,e),a===0&&eu(e)}};function Yo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pm(){}function f0(e,n,a,o,u){if(u){if(typeof o=="function"){var f=o;o=function(){var O=Ul(x);f.call(O)}}var x=mm(n,o,e,0,null,!1,!1,"",pm);return e._reactRootContainer=x,e[En]=x.current,Qs(e.nodeType===8?e.parentNode:e),Ar(),x}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var j=o;o=function(){var O=Ul(k);j.call(O)}}var k=Go(e,0,!1,null,null,!1,!1,"",pm);return e._reactRootContainer=k,e[En]=k.current,Qs(e.nodeType===8?e.parentNode:e),Ar(function(){Fl(n,k,a,o)}),k}function Hl(e,n,a,o,u){var f=a._reactRootContainer;if(f){var x=f;if(typeof u=="function"){var j=u;u=function(){var k=Ul(x);j.call(k)}}Fl(n,x,e,u)}else x=f0(a,n,e,u,o);return Ul(x)}Yc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var a=Is(n.pendingLanes);a!==0&&(yi(n,a|1),Ct(n,Se()),(Re&6)===0&&(fs=Se()+500,tr()))}break;case 13:Ar(function(){var o=Rn(e,1);if(o!==null){var u=yt();on(o,e,1,u)}}),Ko(e,1)}},vi=function(e){if(e.tag===13){var n=Rn(e,134217728);if(n!==null){var a=yt();on(n,e,134217728,a)}Ko(e,134217728)}},Qc=function(e){if(e.tag===13){var n=ir(e),a=Rn(e,n);if(a!==null){var o=yt();on(a,e,n,o)}Ko(e,n)}},Jc=function(){return Le},Xc=function(e,n){var a=Le;try{return Le=e,n()}finally{Le=a}},Hn=function(e,n,a){switch(n){case"input":if(xr(e,a),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var u=al(o);if(!u)throw Error(l(90));Es(o),xr(o,u)}}}break;case"textarea":Vr(e,a);break;case"select":n=a.value,n!=null&&wn(e,!!a.multiple,n,!1)}},We=Bo,Sn=Ar;var h0={usingClientEntryPoint:!1,Events:[Zs,es,al,Ma,Da,Bo]},fa={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p0={bundleType:fa.bundleType,version:fa.version,rendererPackageName:fa.rendererPackageName,rendererConfig:fa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ba(e),e===null?null:e.stateNode},findFiberByHostInstance:fa.findFiberByHostInstance||m0,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 $l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$l.isDisabled&&$l.supportsFiber)try{Nr=$l.inject(p0),Pt=$l}catch{}}return _t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h0,_t.createPortal=function(e,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yo(n))throw Error(l(200));return d0(e,n,null,a)},_t.createRoot=function(e,n){if(!Yo(e))throw Error(l(299));var a=!1,o="",u=hm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),n=Go(e,1,!1,null,null,a,!1,o,u),e[En]=n.current,Qs(e.nodeType===8?e.parentNode:e),new qo(n)},_t.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(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=Ba(n),e=e===null?null:e.stateNode,e},_t.flushSync=function(e){return Ar(e)},_t.hydrate=function(e,n,a){if(!zl(n))throw Error(l(200));return Hl(null,e,n,!0,a)},_t.hydrateRoot=function(e,n,a){if(!Yo(e))throw Error(l(405));var o=a!=null&&a.hydratedSources||null,u=!1,f="",x=hm;if(a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),n=mm(n,null,e,1,a??null,u,!1,f,x),e[En]=n.current,Qs(e),o)for(e=0;e<o.length;e++)a=o[e],u=a._getVersion,u=u(a._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[a,u]:n.mutableSourceEagerHydrationData.push(a,u);return new Bl(n)},_t.render=function(e,n,a){if(!zl(n))throw Error(l(200));return Hl(null,e,n,!1,a)},_t.unmountComponentAtNode=function(e){if(!zl(e))throw Error(l(40));return e._reactRootContainer?(Ar(function(){Hl(null,null,e,!1,function(){e._reactRootContainer=null,e[En]=null})}),!0):!1},_t.unstable_batchedUpdates=Bo,_t.unstable_renderSubtreeIntoContainer=function(e,n,a,o){if(!zl(a))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Hl(e,n,a,!1,o)},_t.version="18.3.1-next-f1338f8080-20240426",_t}var bm;function bf(){if(bm)return Xo.exports;bm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(s){console.error(s)}}return r(),Xo.exports=S0(),Xo.exports}var Sm;function k0(){if(Sm)return Vl;Sm=1;var r=bf();return Vl.createRoot=r.createRoot,Vl.hydrateRoot=r.hydrateRoot,Vl}var E0=k0(),w=kc();const Sf=y0(w),C0=g0({__proto__:null,default:Sf},[w]);bf();function ba(){return ba=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},ba.apply(this,arguments)}var dr;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(dr||(dr={}));const km="popstate";function _0(r){r===void 0&&(r={});function s(i,c){let{pathname:d,search:m,hash:p}=i.location;return mc("",{pathname:d,search:m,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function l(i,c){return typeof c=="string"?c:Xl(c)}return R0(s,l,null,r)}function Qe(r,s){if(r===!1||r===null||typeof r>"u")throw new Error(s)}function Ec(r,s){if(!r){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function T0(){return Math.random().toString(36).substr(2,8)}function Em(r,s){return{usr:r.state,key:r.key,idx:s}}function mc(r,s,l,i){return l===void 0&&(l=null),ba({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof s=="string"?ws(s):s,{state:l,key:s&&s.key||i||T0()})}function Xl(r){let{pathname:s="/",search:l="",hash:i=""}=r;return l&&l!=="?"&&(s+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(s+=i.charAt(0)==="#"?i:"#"+i),s}function ws(r){let s={};if(r){let l=r.indexOf("#");l>=0&&(s.hash=r.substr(l),r=r.substr(0,l));let i=r.indexOf("?");i>=0&&(s.search=r.substr(i),r=r.substr(0,i)),r&&(s.pathname=r)}return s}function R0(r,s,l,i){i===void 0&&(i={});let{window:c=document.defaultView,v5Compat:d=!1}=i,m=c.history,p=dr.Pop,h=null,g=v();g==null&&(g=0,m.replaceState(ba({},m.state,{idx:g}),""));function v(){return(m.state||{idx:null}).idx}function y(){p=dr.Pop;let b=v(),U=b==null?null:b-g;g=b,h&&h({action:p,location:_.location,delta:U})}function C(b,U){p=dr.Push;let R=mc(_.location,b,U);g=v()+1;let M=Em(R,g),P=_.createHref(R);try{m.pushState(M,"",P)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;c.location.assign(P)}d&&h&&h({action:p,location:_.location,delta:1})}function F(b,U){p=dr.Replace;let R=mc(_.location,b,U);g=v();let M=Em(R,g),P=_.createHref(R);m.replaceState(M,"",P),d&&h&&h({action:p,location:_.location,delta:0})}function N(b){let U=c.location.origin!=="null"?c.location.origin:c.location.href,R=typeof b=="string"?b:Xl(b);return R=R.replace(/ $/,"%20"),Qe(U,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,U)}let _={get action(){return p},get location(){return r(c,m)},listen(b){if(h)throw new Error("A history only accepts one active listener");return c.addEventListener(km,y),h=b,()=>{c.removeEventListener(km,y),h=null}},createHref(b){return s(c,b)},createURL:N,encodeLocation(b){let U=N(b);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:C,replace:F,go(b){return m.go(b)}};return _}var Cm;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Cm||(Cm={}));function A0(r,s,l){return l===void 0&&(l="/"),P0(r,s,l)}function P0(r,s,l,i){let c=typeof s=="string"?ws(s):s,d=Cc(c.pathname||"/",l);if(d==null)return null;let m=kf(r);L0(m);let p=null;for(let h=0;p==null&&h<m.length;++h){let g=W0(d);p=H0(m[h],g)}return p}function kf(r,s,l,i){s===void 0&&(s=[]),l===void 0&&(l=[]),i===void 0&&(i="");let c=(d,m,p)=>{let h={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};h.relativePath.startsWith("/")&&(Qe(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let g=mr([i,h.relativePath]),v=l.concat(h);d.children&&d.children.length>0&&(Qe(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),kf(d.children,s,v,g)),!(d.path==null&&!d.index)&&s.push({path:g,score:B0(g,d.index),routesMeta:v})};return r.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))c(d,m);else for(let h of Ef(d.path))c(d,m,h)}),s}function Ef(r){let s=r.split("/");if(s.length===0)return[];let[l,...i]=s,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(i.length===0)return c?[d,""]:[d];let m=Ef(i.join("/")),p=[];return p.push(...m.map(h=>h===""?d:[d,h].join("/"))),c&&p.push(...m),p.map(h=>r.startsWith("/")&&h===""?"/":h)}function L0(r){r.sort((s,l)=>s.score!==l.score?l.score-s.score:z0(s.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}const O0=/^:[\w-]+$/,I0=3,M0=2,D0=1,F0=10,U0=-2,_m=r=>r==="*";function B0(r,s){let l=r.split("/"),i=l.length;return l.some(_m)&&(i+=U0),s&&(i+=M0),l.filter(c=>!_m(c)).reduce((c,d)=>c+(O0.test(d)?I0:d===""?D0:F0),i)}function z0(r,s){return r.length===s.length&&r.slice(0,-1).every((i,c)=>i===s[c])?r[r.length-1]-s[s.length-1]:0}function H0(r,s,l){let{routesMeta:i}=r,c={},d="/",m=[];for(let p=0;p<i.length;++p){let h=i[p],g=p===i.length-1,v=d==="/"?s:s.slice(d.length)||"/",y=$0({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},v),C=h.route;if(!y)return null;Object.assign(c,y.params),m.push({params:c,pathname:mr([d,y.pathname]),pathnameBase:Q0(mr([d,y.pathnameBase])),route:C}),y.pathnameBase!=="/"&&(d=mr([d,y.pathnameBase]))}return m}function $0(r,s){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[l,i]=V0(r.path,r.caseSensitive,r.end),c=s.match(l);if(!c)return null;let d=c[0],m=d.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:i.reduce((g,v,y)=>{let{paramName:C,isOptional:F}=v;if(C==="*"){let _=p[y]||"";m=d.slice(0,d.length-_.length).replace(/(.)\/+$/,"$1")}const N=p[y];return F&&!N?g[C]=void 0:g[C]=(N||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:m,pattern:r}}function V0(r,s,l){s===void 0&&(s=!1),l===void 0&&(l=!0),Ec(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let i=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,p,h)=>(i.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(i.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),i]}function W0(r){try{return r.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Ec(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+s+").")),r}}function Cc(r,s){if(s==="/")return r;if(!r.toLowerCase().startsWith(s.toLowerCase()))return null;let l=s.endsWith("/")?s.length-1:s.length,i=r.charAt(l);return i&&i!=="/"?null:r.slice(l)||"/"}const G0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,K0=r=>G0.test(r);function q0(r,s){s===void 0&&(s="/");let{pathname:l,search:i="",hash:c=""}=typeof r=="string"?ws(r):r,d;if(l)if(K0(l))d=l;else{if(l.includes("//")){let m=l;l=l.replace(/\/\/+/g,"/"),Ec(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+l))}l.startsWith("/")?d=Tm(l.substring(1),"/"):d=Tm(l,s)}else d=s;return{pathname:d,search:J0(i),hash:X0(c)}}function Tm(r,s){let l=s.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function tc(r,s,l,i){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+s+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+l+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Y0(r){return r.filter((s,l)=>l===0||s.route.path&&s.route.path.length>0)}function _c(r,s){let l=Y0(r);return s?l.map((i,c)=>c===l.length-1?i.pathname:i.pathnameBase):l.map(i=>i.pathnameBase)}function Tc(r,s,l,i){i===void 0&&(i=!1);let c;typeof r=="string"?c=ws(r):(c=ba({},r),Qe(!c.pathname||!c.pathname.includes("?"),tc("?","pathname","search",c)),Qe(!c.pathname||!c.pathname.includes("#"),tc("#","pathname","hash",c)),Qe(!c.search||!c.search.includes("#"),tc("#","search","hash",c)));let d=r===""||c.pathname==="",m=d?"/":c.pathname,p;if(m==null)p=l;else{let y=s.length-1;if(!i&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),y-=1;c.pathname=C.join("/")}p=y>=0?s[y]:"/"}let h=q0(c,p),g=m&&m!=="/"&&m.endsWith("/"),v=(d||m===".")&&l.endsWith("/");return!h.pathname.endsWith("/")&&(g||v)&&(h.pathname+="/"),h}const mr=r=>r.join("/").replace(/\/\/+/g,"/"),Q0=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),J0=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,X0=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function Z0(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const Cf=["post","put","patch","delete"];new Set(Cf);const ex=["get",...Cf];new Set(ex);function Sa(){return Sa=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Sa.apply(this,arguments)}const Rc=w.createContext(null),tx=w.createContext(null),hr=w.createContext(null),si=w.createContext(null),In=w.createContext({outlet:null,matches:[],isDataRoute:!1}),_f=w.createContext(null);function nx(r,s){let{relative:l}=s===void 0?{}:s;Ns()||Qe(!1);let{basename:i,navigator:c}=w.useContext(hr),{hash:d,pathname:m,search:p}=Rf(r,{relative:l}),h=m;return i!=="/"&&(h=m==="/"?i:mr([i,m])),c.createHref({pathname:h,search:p,hash:d})}function Ns(){return w.useContext(si)!=null}function bs(){return Ns()||Qe(!1),w.useContext(si).location}function Tf(r){w.useContext(hr).static||w.useLayoutEffect(r)}function Ac(){let{isDataRoute:r}=w.useContext(In);return r?xx():rx()}function rx(){Ns()||Qe(!1);let r=w.useContext(Rc),{basename:s,future:l,navigator:i}=w.useContext(hr),{matches:c}=w.useContext(In),{pathname:d}=bs(),m=JSON.stringify(_c(c,l.v7_relativeSplatPath)),p=w.useRef(!1);return Tf(()=>{p.current=!0}),w.useCallback(function(g,v){if(v===void 0&&(v={}),!p.current)return;if(typeof g=="number"){i.go(g);return}let y=Tc(g,JSON.parse(m),d,v.relative==="path");r==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:mr([s,y.pathname])),(v.replace?i.replace:i.push)(y,v.state,v)},[s,i,m,d,r])}function sx(){let{matches:r}=w.useContext(In),s=r[r.length-1];return s?s.params:{}}function Rf(r,s){let{relative:l}=s===void 0?{}:s,{future:i}=w.useContext(hr),{matches:c}=w.useContext(In),{pathname:d}=bs(),m=JSON.stringify(_c(c,i.v7_relativeSplatPath));return w.useMemo(()=>Tc(r,JSON.parse(m),d,l==="path"),[r,m,d,l])}function ax(r,s){return lx(r,s)}function lx(r,s,l,i){Ns()||Qe(!1);let{navigator:c}=w.useContext(hr),{matches:d}=w.useContext(In),m=d[d.length-1],p=m?m.params:{};m&&m.pathname;let h=m?m.pathnameBase:"/";m&&m.route;let g=bs(),v;if(s){var y;let b=typeof s=="string"?ws(s):s;h==="/"||(y=b.pathname)!=null&&y.startsWith(h)||Qe(!1),v=b}else v=g;let C=v.pathname||"/",F=C;if(h!=="/"){let b=h.replace(/^\//,"").split("/");F="/"+C.replace(/^\//,"").split("/").slice(b.length).join("/")}let N=A0(r,{pathname:F}),_=dx(N&&N.map(b=>Object.assign({},b,{params:Object.assign({},p,b.params),pathname:mr([h,c.encodeLocation?c.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?h:mr([h,c.encodeLocation?c.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),d,l,i);return s&&_?w.createElement(si.Provider,{value:{location:Sa({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:dr.Pop}},_):_}function ix(){let r=px(),s=Z0(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),l=r instanceof Error?r.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},s),l?w.createElement("pre",{style:c},l):null,null)}const ox=w.createElement(ix,null);class cx extends w.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,l){return l.location!==s.location||l.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:l.error,location:l.location,revalidation:s.revalidation||l.revalidation}}componentDidCatch(s,l){console.error("React Router caught the following error during render",s,l)}render(){return this.state.error!==void 0?w.createElement(In.Provider,{value:this.props.routeContext},w.createElement(_f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ux(r){let{routeContext:s,match:l,children:i}=r,c=w.useContext(Rc);return c&&c.static&&c.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=l.route.id),w.createElement(In.Provider,{value:s},i)}function dx(r,s,l,i){var c;if(s===void 0&&(s=[]),l===void 0&&(l=null),i===void 0&&(i=null),r==null){var d;if(!l)return null;if(l.errors)r=l.matches;else if((d=i)!=null&&d.v7_partialHydration&&s.length===0&&!l.initialized&&l.matches.length>0)r=l.matches;else return null}let m=r,p=(c=l)==null?void 0:c.errors;if(p!=null){let v=m.findIndex(y=>y.route.id&&p?.[y.route.id]!==void 0);v>=0||Qe(!1),m=m.slice(0,Math.min(m.length,v+1))}let h=!1,g=-1;if(l&&i&&i.v7_partialHydration)for(let v=0;v<m.length;v++){let y=m[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=v),y.route.id){let{loaderData:C,errors:F}=l,N=y.route.loader&&C[y.route.id]===void 0&&(!F||F[y.route.id]===void 0);if(y.route.lazy||N){h=!0,g>=0?m=m.slice(0,g+1):m=[m[0]];break}}}return m.reduceRight((v,y,C)=>{let F,N=!1,_=null,b=null;l&&(F=p&&y.route.id?p[y.route.id]:void 0,_=y.route.errorElement||ox,h&&(g<0&&C===0?(gx("route-fallback"),N=!0,b=null):g===C&&(N=!0,b=y.route.hydrateFallbackElement||null)));let U=s.concat(m.slice(0,C+1)),R=()=>{let M;return F?M=_:N?M=b:y.route.Component?M=w.createElement(y.route.Component,null):y.route.element?M=y.route.element:M=v,w.createElement(ux,{match:y,routeContext:{outlet:v,matches:U,isDataRoute:l!=null},children:M})};return l&&(y.route.ErrorBoundary||y.route.errorElement||C===0)?w.createElement(cx,{location:l.location,revalidation:l.revalidation,component:_,error:F,children:R(),routeContext:{outlet:null,matches:U,isDataRoute:!0}}):R()},null)}var Af=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(Af||{}),Pf=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(Pf||{});function mx(r){let s=w.useContext(Rc);return s||Qe(!1),s}function fx(r){let s=w.useContext(tx);return s||Qe(!1),s}function hx(r){let s=w.useContext(In);return s||Qe(!1),s}function Lf(r){let s=hx(),l=s.matches[s.matches.length-1];return l.route.id||Qe(!1),l.route.id}function px(){var r;let s=w.useContext(_f),l=fx(),i=Lf();return s!==void 0?s:(r=l.errors)==null?void 0:r[i]}function xx(){let{router:r}=mx(Af.UseNavigateStable),s=Lf(Pf.UseNavigateStable),l=w.useRef(!1);return Tf(()=>{l.current=!0}),w.useCallback(function(c,d){d===void 0&&(d={}),l.current&&(typeof c=="number"?r.navigate(c):r.navigate(c,Sa({fromRouteId:s},d)))},[r,s])}const Rm={};function gx(r,s,l){Rm[r]||(Rm[r]=!0)}function yx(r,s){r?.v7_startTransition,r?.v7_relativeSplatPath}function vx(r){let{to:s,replace:l,state:i,relative:c}=r;Ns()||Qe(!1);let{future:d,static:m}=w.useContext(hr),{matches:p}=w.useContext(In),{pathname:h}=bs(),g=Ac(),v=Tc(s,_c(p,d.v7_relativeSplatPath),h,c==="path"),y=JSON.stringify(v);return w.useEffect(()=>g(JSON.parse(y),{replace:l,state:i,relative:c}),[g,y,c,l,i]),null}function ys(r){Qe(!1)}function jx(r){let{basename:s="/",children:l=null,location:i,navigationType:c=dr.Pop,navigator:d,static:m=!1,future:p}=r;Ns()&&Qe(!1);let h=s.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:h,navigator:d,static:m,future:Sa({v7_relativeSplatPath:!1},p)}),[h,p,d,m]);typeof i=="string"&&(i=ws(i));let{pathname:v="/",search:y="",hash:C="",state:F=null,key:N="default"}=i,_=w.useMemo(()=>{let b=Cc(v,h);return b==null?null:{location:{pathname:b,search:y,hash:C,state:F,key:N},navigationType:c}},[h,v,y,C,F,N,c]);return _==null?null:w.createElement(hr.Provider,{value:g},w.createElement(si.Provider,{children:l,value:_}))}function Of(r){let{children:s,location:l}=r;return ax(fc(s),l)}new Promise(()=>{});function fc(r,s){s===void 0&&(s=[]);let l=[];return w.Children.forEach(r,(i,c)=>{if(!w.isValidElement(i))return;let d=[...s,c];if(i.type===w.Fragment){l.push.apply(l,fc(i.props.children,d));return}i.type!==ys&&Qe(!1),!i.props.index||!i.props.children||Qe(!1);let m={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(m.children=fc(i.props.children,d)),l.push(m)}),l}function hc(){return hc=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},hc.apply(this,arguments)}function wx(r,s){if(r==null)return{};var l={},i=Object.keys(r),c,d;for(d=0;d<i.length;d++)c=i[d],!(s.indexOf(c)>=0)&&(l[c]=r[c]);return l}function Nx(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function bx(r,s){return r.button===0&&(!s||s==="_self")&&!Nx(r)}const Sx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],kx="6";try{window.__reactRouterVersion=kx}catch{}const Ex="startTransition",Am=C0[Ex];function Cx(r){let{basename:s,children:l,future:i,window:c}=r,d=w.useRef();d.current==null&&(d.current=_0({window:c,v5Compat:!0}));let m=d.current,[p,h]=w.useState({action:m.action,location:m.location}),{v7_startTransition:g}=i||{},v=w.useCallback(y=>{g&&Am?Am(()=>h(y)):h(y)},[h,g]);return w.useLayoutEffect(()=>m.listen(v),[m,v]),w.useEffect(()=>yx(i),[i]),w.createElement(jx,{basename:s,children:l,location:p.location,navigationType:p.action,navigator:m,future:i})}const _x=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,On=w.forwardRef(function(s,l){let{onClick:i,relative:c,reloadDocument:d,replace:m,state:p,target:h,to:g,preventScrollReset:v,viewTransition:y}=s,C=wx(s,Sx),{basename:F}=w.useContext(hr),N,_=!1;if(typeof g=="string"&&Tx.test(g)&&(N=g,_x))try{let M=new URL(window.location.href),P=g.startsWith("//")?new URL(M.protocol+g):new URL(g),W=Cc(P.pathname,F);P.origin===M.origin&&W!=null?g=W+P.search+P.hash:_=!0}catch{}let b=nx(g,{relative:c}),U=Rx(g,{replace:m,state:p,target:h,preventScrollReset:v,relative:c,viewTransition:y});function R(M){i&&i(M),M.defaultPrevented||U(M)}return w.createElement("a",hc({},C,{href:N||b,onClick:_||d?i:R,ref:l,target:h}))});var Pm;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Pm||(Pm={}));var Lm;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(Lm||(Lm={}));function Rx(r,s){let{target:l,replace:i,state:c,preventScrollReset:d,relative:m,viewTransition:p}=s===void 0?{}:s,h=Ac(),g=bs(),v=Rf(r,{relative:m});return w.useCallback(y=>{if(bx(y,l)){y.preventDefault();let C=i!==void 0?i:Xl(g)===Xl(v);h(r,{replace:C,state:c,preventScrollReset:d,relative:m,viewTransition:p})}},[g,h,v,i,c,l,r,d,m,p])}const If=[{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 independent engine",protected:!0},{path:"/independent-release",name:"independent-release",component:"IndependentReleaseManagerPage",title:"Independent Release",description:"New release system independent of Changesets",protected:!0},{path:"/ci",name:"ci",component:"CIIntegration",title:"CI/CD",description:"Continuous integration and deployment"},{path:"/pipeline",name:"pipeline",component:"Pipeline",title:"Release Pipeline",description:"Real-time release pipeline monitoring and management",protected:!0},{path:"/config",name:"config",component:"ConfigInspector",title:"Configuration",description:"Configuration file inspector"}];If.filter(r=>!r.path.includes(":")&&r.path!=="/");const pe="w-6 h-6",Ax=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ut=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),ai=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),Ss=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Px=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})]}),Lx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ox=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),li=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Pc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18"})}),Mf=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3"})}),Ix=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),Om=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5L15.75 12l-7.5 7.5"})}),wa=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}),Mx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),At=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Dt=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ca=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})}),_a=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Lc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Df=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Dx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),ii=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Oc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Zl=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ic=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Fx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ux=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Mc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ff=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),He=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),oi=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Mn=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Dc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),ci=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),vs=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),lt=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),fr=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Uf=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})]}),Ur=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})]}),Bx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Im=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Mm=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),zx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Hx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),$x=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),pc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Vx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Wx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Gx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}),Kx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})}),qx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})}),Yx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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"})}),xc={LOGIN_SUCCESS:"Login successful! Redirecting...",LOGIN_FAILED:"Login failed",LOGOUT_SUCCESS:"You have been logged out",SESSION_EXPIRED:"Your session has expired. Please login again.",AUTH_FAILED:"Authentication failed"},Bf={QUOTA_EXHAUSTED:"GitHub API quota exhausted",QUOTA_RESET:r=>`GitHub API quota exhausted. The limit will reset at ${r}. Please try again later.`,APPROACHING_LIMIT:(r,s)=>`GitHub API quota running low: ${r}/${s} requests remaining`},Ce={UNKNOWN_ERROR:"Unknown error occurred",NETWORK_ERROR:"Network error. Please check your connection.",FAILED_TO_FETCH_PACKAGES:"Failed to fetch workspace packages",FAILED_TO_FETCH_WORKFLOWS:"Failed to fetch workflows",FAILED_TO_TRIGGER_WORKFLOW:"Failed to trigger workflow",FAILED_TO_CANCEL_RUN:"Failed to cancel workflow run",FAILED_TO_RERUN_WORKFLOW:"Failed to rerun workflow",FAILED_TO_FETCH_LOGS:"Failed to fetch job logs",PERMISSION_ERROR:"Permission denied",AUTHENTICATION_ERROR:"Authentication error",FAILED_TO_FETCH_USER_INFO:"Failed to fetch user info",FAILED_TO_REFRESH_SESSION:"Failed to refresh session",FAILED_TO_CHECK_PERMISSION:"Failed to check permission",FAILED_TO_CHECK_ACTION_PERMISSION:"Failed to check action permission",VALIDATION_FAILED:"Validation failed",FAILED_TO_CREATE_CHANGESET:"Failed to create changeset",FAILED_TO_TRIGGER_PUBLISH:"Failed to trigger publish",FAILED_TO_SAVE_CONFIG:"Failed to save configuration"},Qx="Describe the changes in this release (e.g., 'Add new API endpoints for user management')",Jx="Summary must be at least 10 characters";var Dm={};const Xx="localhost",Zx=8999,eg=3e4,tg=6e4,zf=Dm.REACT_APP_API_URL||Dm.VITE_API_URL||`http://${Xx}:${Zx}`,Ae={AUTH:{LOGIN:"/auth/login",CALLBACK:"/auth/callback",ME:"/auth/me",VALIDATE:"/auth/validate",LOGOUT:"/auth/logout",REFRESH:"/auth/refresh"},PACKAGES:{REFRESH:"/packages/refresh",UPDATE_CONFIG:"/packages/update-config",LIST:"/packages",DETAILS:r=>`/packages/${encodeURIComponent(r)}`},PIPELINES:{LIST:"/pipelines",STATUS:r=>`/pipelines/${r}/status`},PUBLISH:{PREVIEW:"/publish/preview",STATUS:"/publish/status",PACKAGES:"/publish/packages",CHANGESETS:"/publish/changesets",CREATE_CHANGESET:"/publish/changesets/create",TRIGGER:"/publish/trigger"},CONFIG:{FILES:"/config/files",FILE:r=>`/config/files/${encodeURIComponent(r)}`},HEALTH:{PACKAGES:"/health/packages",REFRESH:"/health/refresh"},WORKFLOWS:{LIST:(r,s)=>`/workflows/${r}/${s}`,AVAILABLE:(r,s)=>`/workflows/${r}/${s}/available`,BY_PACKAGE:(r,s,l)=>`/workflows/package/${r}/${s}/${encodeURIComponent(l)}`,RUNS:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}`,LOGS:(r,s,l)=>`/workflows/${r}/${s}/jobs/${l}/logs`,TRIGGER:(r,s)=>`/workflows/${r}/${s}/trigger`,CANCEL:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}/cancel`,RERUN:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}/rerun`}};function Hf(r,s){return function(){return r.apply(s,arguments)}}const{toString:ng}=Object.prototype,{getPrototypeOf:Fc}=Object,{iterator:ui,toStringTag:$f}=Symbol,di=(r=>s=>{const l=ng.call(s);return r[l]||(r[l]=l.slice(8,-1).toLowerCase())})(Object.create(null)),un=r=>(r=r.toLowerCase(),s=>di(s)===r),mi=r=>s=>typeof s===r,{isArray:ks}=Array,js=mi("undefined");function Ta(r){return r!==null&&!js(r)&&r.constructor!==null&&!js(r.constructor)&&Tt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Vf=un("ArrayBuffer");function rg(r){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(r):s=r&&r.buffer&&Vf(r.buffer),s}const sg=mi("string"),Tt=mi("function"),Wf=mi("number"),Ra=r=>r!==null&&typeof r=="object",ag=r=>r===!0||r===!1,ql=r=>{if(di(r)!=="object")return!1;const s=Fc(r);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!($f in r)&&!(ui in r)},lg=r=>{if(!Ra(r)||Ta(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},ig=un("Date"),og=un("File"),cg=un("Blob"),ug=un("FileList"),dg=r=>Ra(r)&&Tt(r.pipe),mg=r=>{let s;return r&&(typeof FormData=="function"&&r instanceof FormData||Tt(r.append)&&((s=di(r))==="formdata"||s==="object"&&Tt(r.toString)&&r.toString()==="[object FormData]"))},fg=un("URLSearchParams"),[hg,pg,xg,gg]=["ReadableStream","Request","Response","Headers"].map(un),yg=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Aa(r,s,{allOwnKeys:l=!1}={}){if(r===null||typeof r>"u")return;let i,c;if(typeof r!="object"&&(r=[r]),ks(r))for(i=0,c=r.length;i<c;i++)s.call(null,r[i],i,r);else{if(Ta(r))return;const d=l?Object.getOwnPropertyNames(r):Object.keys(r),m=d.length;let p;for(i=0;i<m;i++)p=d[i],s.call(null,r[p],p,r)}}function Gf(r,s){if(Ta(r))return null;s=s.toLowerCase();const l=Object.keys(r);let i=l.length,c;for(;i-- >0;)if(c=l[i],s===c.toLowerCase())return c;return null}const Mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kf=r=>!js(r)&&r!==Mr;function gc(){const{caseless:r,skipUndefined:s}=Kf(this)&&this||{},l={},i=(c,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const m=r&&Gf(l,d)||d;ql(l[m])&&ql(c)?l[m]=gc(l[m],c):ql(c)?l[m]=gc({},c):ks(c)?l[m]=c.slice():(!s||!js(c))&&(l[m]=c)};for(let c=0,d=arguments.length;c<d;c++)arguments[c]&&Aa(arguments[c],i);return l}const vg=(r,s,l,{allOwnKeys:i}={})=>(Aa(s,(c,d)=>{l&&Tt(c)?Object.defineProperty(r,d,{value:Hf(c,l),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,d,{value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),r),jg=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),wg=(r,s,l,i)=>{r.prototype=Object.create(s.prototype,i),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:s.prototype}),l&&Object.assign(r.prototype,l)},Ng=(r,s,l,i)=>{let c,d,m;const p={};if(s=s||{},r==null)return s;do{for(c=Object.getOwnPropertyNames(r),d=c.length;d-- >0;)m=c[d],(!i||i(m,r,s))&&!p[m]&&(s[m]=r[m],p[m]=!0);r=l!==!1&&Fc(r)}while(r&&(!l||l(r,s))&&r!==Object.prototype);return s},bg=(r,s,l)=>{r=String(r),(l===void 0||l>r.length)&&(l=r.length),l-=s.length;const i=r.indexOf(s,l);return i!==-1&&i===l},Sg=r=>{if(!r)return null;if(ks(r))return r;let s=r.length;if(!Wf(s))return null;const l=new Array(s);for(;s-- >0;)l[s]=r[s];return l},kg=(r=>s=>r&&s instanceof r)(typeof Uint8Array<"u"&&Fc(Uint8Array)),Eg=(r,s)=>{const i=(r&&r[ui]).call(r);let c;for(;(c=i.next())&&!c.done;){const d=c.value;s.call(r,d[0],d[1])}},Cg=(r,s)=>{let l;const i=[];for(;(l=r.exec(s))!==null;)i.push(l);return i},_g=un("HTMLFormElement"),Tg=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(l,i,c){return i.toUpperCase()+c}),Fm=(({hasOwnProperty:r})=>(s,l)=>r.call(s,l))(Object.prototype),Rg=un("RegExp"),qf=(r,s)=>{const l=Object.getOwnPropertyDescriptors(r),i={};Aa(l,(c,d)=>{let m;(m=s(c,d,r))!==!1&&(i[d]=m||c)}),Object.defineProperties(r,i)},Ag=r=>{qf(r,(s,l)=>{if(Tt(r)&&["arguments","caller","callee"].indexOf(l)!==-1)return!1;const i=r[l];if(Tt(i)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+l+"'")})}})},Pg=(r,s)=>{const l={},i=c=>{c.forEach(d=>{l[d]=!0})};return ks(r)?i(r):i(String(r).split(s)),l},Lg=()=>{},Og=(r,s)=>r!=null&&Number.isFinite(r=+r)?r:s;function Ig(r){return!!(r&&Tt(r.append)&&r[$f]==="FormData"&&r[ui])}const Mg=r=>{const s=new Array(10),l=(i,c)=>{if(Ra(i)){if(s.indexOf(i)>=0)return;if(Ta(i))return i;if(!("toJSON"in i)){s[c]=i;const d=ks(i)?[]:{};return Aa(i,(m,p)=>{const h=l(m,c+1);!js(h)&&(d[p]=h)}),s[c]=void 0,d}}return i};return l(r,0)},Dg=un("AsyncFunction"),Fg=r=>r&&(Ra(r)||Tt(r))&&Tt(r.then)&&Tt(r.catch),Yf=((r,s)=>r?setImmediate:s?((l,i)=>(Mr.addEventListener("message",({source:c,data:d})=>{c===Mr&&d===l&&i.length&&i.shift()()},!1),c=>{i.push(c),Mr.postMessage(l,"*")}))(`axios@${Math.random()}`,[]):l=>setTimeout(l))(typeof setImmediate=="function",Tt(Mr.postMessage)),Ug=typeof queueMicrotask<"u"?queueMicrotask.bind(Mr):typeof process<"u"&&process.nextTick||Yf,Bg=r=>r!=null&&Tt(r[ui]),I={isArray:ks,isArrayBuffer:Vf,isBuffer:Ta,isFormData:mg,isArrayBufferView:rg,isString:sg,isNumber:Wf,isBoolean:ag,isObject:Ra,isPlainObject:ql,isEmptyObject:lg,isReadableStream:hg,isRequest:pg,isResponse:xg,isHeaders:gg,isUndefined:js,isDate:ig,isFile:og,isBlob:cg,isRegExp:Rg,isFunction:Tt,isStream:dg,isURLSearchParams:fg,isTypedArray:kg,isFileList:ug,forEach:Aa,merge:gc,extend:vg,trim:yg,stripBOM:jg,inherits:wg,toFlatObject:Ng,kindOf:di,kindOfTest:un,endsWith:bg,toArray:Sg,forEachEntry:Eg,matchAll:Cg,isHTMLForm:_g,hasOwnProperty:Fm,hasOwnProp:Fm,reduceDescriptors:qf,freezeMethods:Ag,toObjectSet:Pg,toCamelCase:Tg,noop:Lg,toFiniteNumber:Og,findKey:Gf,global:Mr,isContextDefined:Kf,isSpecCompliantForm:Ig,toJSONObject:Mg,isAsyncFn:Dg,isThenable:Fg,setImmediate:Yf,asap:Ug,isIterable:Bg};let ge=class Qf extends Error{static from(s,l,i,c,d,m){const p=new Qf(s.message,l||s.code,i,c,d);return p.cause=s,p.name=s.name,m&&Object.assign(p,m),p}constructor(s,l,i,c,d){super(s),this.name="AxiosError",this.isAxiosError=!0,l&&(this.code=l),i&&(this.config=i),c&&(this.request=c),d&&(this.response=d,this.status=d.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}};ge.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ge.ERR_BAD_OPTION="ERR_BAD_OPTION";ge.ECONNABORTED="ECONNABORTED";ge.ETIMEDOUT="ETIMEDOUT";ge.ERR_NETWORK="ERR_NETWORK";ge.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ge.ERR_DEPRECATED="ERR_DEPRECATED";ge.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ge.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ge.ERR_CANCELED="ERR_CANCELED";ge.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ge.ERR_INVALID_URL="ERR_INVALID_URL";const zg=null;function yc(r){return I.isPlainObject(r)||I.isArray(r)}function Jf(r){return I.endsWith(r,"[]")?r.slice(0,-2):r}function Um(r,s,l){return r?r.concat(s).map(function(c,d){return c=Jf(c),!l&&d?"["+c+"]":c}).join(l?".":""):s}function Hg(r){return I.isArray(r)&&!r.some(yc)}const $g=I.toFlatObject(I,{},null,function(s){return/^is[A-Z]/.test(s)});function fi(r,s,l){if(!I.isObject(r))throw new TypeError("target must be an object");s=s||new FormData,l=I.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,b){return!I.isUndefined(b[_])});const i=l.metaTokens,c=l.visitor||v,d=l.dots,m=l.indexes,h=(l.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(s);if(!I.isFunction(c))throw new TypeError("visitor must be a function");function g(N){if(N===null)return"";if(I.isDate(N))return N.toISOString();if(I.isBoolean(N))return N.toString();if(!h&&I.isBlob(N))throw new ge("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(N)||I.isTypedArray(N)?h&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function v(N,_,b){let U=N;if(N&&!b&&typeof N=="object"){if(I.endsWith(_,"{}"))_=i?_:_.slice(0,-2),N=JSON.stringify(N);else if(I.isArray(N)&&Hg(N)||(I.isFileList(N)||I.endsWith(_,"[]"))&&(U=I.toArray(N)))return _=Jf(_),U.forEach(function(M,P){!(I.isUndefined(M)||M===null)&&s.append(m===!0?Um([_],P,d):m===null?_:_+"[]",g(M))}),!1}return yc(N)?!0:(s.append(Um(b,_,d),g(N)),!1)}const y=[],C=Object.assign($g,{defaultVisitor:v,convertValue:g,isVisitable:yc});function F(N,_){if(!I.isUndefined(N)){if(y.indexOf(N)!==-1)throw Error("Circular reference detected in "+_.join("."));y.push(N),I.forEach(N,function(U,R){(!(I.isUndefined(U)||U===null)&&c.call(s,U,I.isString(R)?R.trim():R,_,C))===!0&&F(U,_?_.concat(R):[R])}),y.pop()}}if(!I.isObject(r))throw new TypeError("data must be an object");return F(r),s}function Bm(r){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return s[i]})}function Uc(r,s){this._pairs=[],r&&fi(r,this,s)}const Xf=Uc.prototype;Xf.append=function(s,l){this._pairs.push([s,l])};Xf.toString=function(s){const l=s?function(i){return s.call(this,i,Bm)}:Bm;return this._pairs.map(function(c){return l(c[0])+"="+l(c[1])},"").join("&")};function Vg(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zf(r,s,l){if(!s)return r;const i=l&&l.encode||Vg,c=I.isFunction(l)?{serialize:l}:l,d=c&&c.serialize;let m;if(d?m=d(s,c):m=I.isURLSearchParams(s)?s.toString():new Uc(s,c).toString(i),m){const p=r.indexOf("#");p!==-1&&(r=r.slice(0,p)),r+=(r.indexOf("?")===-1?"?":"&")+m}return r}class zm{constructor(){this.handlers=[]}use(s,l,i){return this.handlers.push({fulfilled:s,rejected:l,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){I.forEach(this.handlers,function(i){i!==null&&s(i)})}}const Bc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Wg=typeof URLSearchParams<"u"?URLSearchParams:Uc,Gg=typeof FormData<"u"?FormData:null,Kg=typeof Blob<"u"?Blob:null,qg={isBrowser:!0,classes:{URLSearchParams:Wg,FormData:Gg,Blob:Kg},protocols:["http","https","file","blob","url","data"]},zc=typeof window<"u"&&typeof document<"u",vc=typeof navigator=="object"&&navigator||void 0,Yg=zc&&(!vc||["ReactNative","NativeScript","NS"].indexOf(vc.product)<0),Qg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jg=zc&&window.location.href||"http://localhost",Xg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zc,hasStandardBrowserEnv:Yg,hasStandardBrowserWebWorkerEnv:Qg,navigator:vc,origin:Jg},Symbol.toStringTag,{value:"Module"})),pt={...Xg,...qg};function Zg(r,s){return fi(r,new pt.classes.URLSearchParams,{visitor:function(l,i,c,d){return pt.isNode&&I.isBuffer(l)?(this.append(i,l.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...s})}function ey(r){return I.matchAll(/\w+|\[(\w*)]/g,r).map(s=>s[0]==="[]"?"":s[1]||s[0])}function ty(r){const s={},l=Object.keys(r);let i;const c=l.length;let d;for(i=0;i<c;i++)d=l[i],s[d]=r[d];return s}function eh(r){function s(l,i,c,d){let m=l[d++];if(m==="__proto__")return!0;const p=Number.isFinite(+m),h=d>=l.length;return m=!m&&I.isArray(c)?c.length:m,h?(I.hasOwnProp(c,m)?c[m]=[c[m],i]:c[m]=i,!p):((!c[m]||!I.isObject(c[m]))&&(c[m]=[]),s(l,i,c[m],d)&&I.isArray(c[m])&&(c[m]=ty(c[m])),!p)}if(I.isFormData(r)&&I.isFunction(r.entries)){const l={};return I.forEachEntry(r,(i,c)=>{s(ey(i),c,l,0)}),l}return null}function ny(r,s,l){if(I.isString(r))try{return(s||JSON.parse)(r),I.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(l||JSON.stringify)(r)}const Pa={transitional:Bc,adapter:["xhr","http","fetch"],transformRequest:[function(s,l){const i=l.getContentType()||"",c=i.indexOf("application/json")>-1,d=I.isObject(s);if(d&&I.isHTMLForm(s)&&(s=new FormData(s)),I.isFormData(s))return c?JSON.stringify(eh(s)):s;if(I.isArrayBuffer(s)||I.isBuffer(s)||I.isStream(s)||I.isFile(s)||I.isBlob(s)||I.isReadableStream(s))return s;if(I.isArrayBufferView(s))return s.buffer;if(I.isURLSearchParams(s))return l.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(d){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Zg(s,this.formSerializer).toString();if((p=I.isFileList(s))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return fi(p?{"files[]":s}:s,h&&new h,this.formSerializer)}}return d||c?(l.setContentType("application/json",!1),ny(s)):s}],transformResponse:[function(s){const l=this.transitional||Pa.transitional,i=l&&l.forcedJSONParsing,c=this.responseType==="json";if(I.isResponse(s)||I.isReadableStream(s))return s;if(s&&I.isString(s)&&(i&&!this.responseType||c)){const m=!(l&&l.silentJSONParsing)&&c;try{return JSON.parse(s,this.parseReviver)}catch(p){if(m)throw p.name==="SyntaxError"?ge.from(p,ge.ERR_BAD_RESPONSE,this,null,this.response):p}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],r=>{Pa.headers[r]={}});const ry=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sy=r=>{const s={};let l,i,c;return r&&r.split(`
8
+ `+f.stack}return{value:e,source:n,stack:u,digest:null}}function jo(e,n,a){return{value:e,source:null,stack:a??null,digest:n??null}}function wo(e,n){try{console.error(n.value)}catch(a){setTimeout(function(){throw a})}}var Wp=typeof WeakMap=="function"?WeakMap:Map;function kd(e,n,a){a=An(-1,a),a.tag=3,a.payload={element:null};var o=n.value;return a.callback=function(){Rl||(Rl=!0,Mo=o),wo(e,n)},a}function Ed(e,n,a){a=An(-1,a),a.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=n.value;a.payload=function(){return o(u)},a.callback=function(){wo(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(a.callback=function(){wo(e,n),typeof o!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),a}function Cd(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new Wp;var u=new Set;o.set(n,u)}else u=o.get(n),u===void 0&&(u=new Set,o.set(n,u));u.has(a)||(u.add(a),e=a0.bind(null,e,n,a),n.then(e,e))}function _d(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 Td(e,n,a,o,u){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(n=An(-1,1),n.tag=2,rr(a,n,1))),a.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var Gp=P.ReactCurrentOwner,kt=!1;function gt(e,n,a,o){n.child=e===null?Yu(n,null,a,o):as(n,e.child,a,o)}function Rd(e,n,a,o,u){a=a.render;var f=n.ref;return is(n,u),o=mo(e,n,a,o,f,u),a=fo(),e!==null&&!kt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,Pn(e,n,u)):(ze&&a&&qi(n),n.flags|=1,gt(e,n,o,u),n.child)}function Ad(e,n,a,o,u){if(e===null){var f=a.type;return typeof f=="function"&&!$o(f)&&f.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(n.tag=15,n.type=f,Pd(e,n,f,o,u)):(e=Ml(a.type,null,o,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&u)===0){var x=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ks,a(x,o)&&e.ref===n.ref)return Pn(e,n,u)}return n.flags|=1,e=cr(f,o),e.ref=n.ref,e.return=n,n.child=e}function Pd(e,n,a,o,u){if(e!==null){var f=e.memoizedProps;if(Ks(f,o)&&e.ref===n.ref)if(kt=!1,n.pendingProps=o=f,(e.lanes&u)!==0)(e.flags&131072)!==0&&(kt=!0);else return n.lanes=e.lanes,Pn(e,n,u)}return No(e,n,a,o,u)}function Ld(e,n,a){var o=n.pendingProps,u=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(ds,Mt),Mt|=a;else{if((a&1073741824)===0)return e=f!==null?f.baseLanes|a:a,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,De(ds,Mt),Mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:a,De(ds,Mt),Mt|=o}else f!==null?(o=f.baseLanes|a,n.memoizedState=null):o=a,De(ds,Mt),Mt|=o;return gt(e,n,u,a),n.child}function Od(e,n){var a=n.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(n.flags|=512,n.flags|=2097152)}function No(e,n,a,o,u){var f=St(a)?Sr:dt.current;return f=ts(n,f),is(n,u),a=mo(e,n,a,o,f,u),o=fo(),e!==null&&!kt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,Pn(e,n,u)):(ze&&o&&qi(n),n.flags|=1,gt(e,n,a,u),n.child)}function Id(e,n,a,o,u){if(St(a)){var f=!0;il(n)}else f=!1;if(is(n,u),n.stateNode===null)kl(e,n),bd(n,a,o),vo(n,a,o,u),o=!0;else if(e===null){var x=n.stateNode,j=n.memoizedProps;x.props=j;var k=x.context,O=a.contextType;typeof O=="object"&&O!==null?O=Vt(O):(O=St(a)?Sr:dt.current,O=ts(n,O));var $=a.getDerivedStateFromProps,V=typeof $=="function"||typeof x.getSnapshotBeforeUpdate=="function";V||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==o||k!==O)&&Sd(n,x,o,O),nr=!1;var H=n.memoizedState;x.state=H,xl(n,o,x,u),k=n.memoizedState,j!==o||H!==k||bt.current||nr?(typeof $=="function"&&(yo(n,a,$,o),k=n.memoizedState),(j=nr||Nd(n,a,j,o,H,k,O))?(V||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=o,n.memoizedState=k),x.props=o,x.state=k,x.context=O,o=j):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{x=n.stateNode,Ju(e,n),j=n.memoizedProps,O=n.type===n.elementType?j:sn(n.type,j),x.props=O,V=n.pendingProps,H=x.context,k=a.contextType,typeof k=="object"&&k!==null?k=Vt(k):(k=St(a)?Sr:dt.current,k=ts(n,k));var ee=a.getDerivedStateFromProps;($=typeof ee=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==V||H!==k)&&Sd(n,x,o,k),nr=!1,H=n.memoizedState,x.state=H,xl(n,o,x,u);var se=n.memoizedState;j!==V||H!==se||bt.current||nr?(typeof ee=="function"&&(yo(n,a,ee,o),se=n.memoizedState),(O=nr||Nd(n,a,O,o,H,se,k)||!1)?($||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(o,se,k),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(o,se,k)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=se),x.props=o,x.state=se,x.context=k,o=O):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&H===e.memoizedState||(n.flags|=1024),o=!1)}return bo(e,n,a,o,f,u)}function bo(e,n,a,o,u,f){Od(e,n);var x=(n.flags&128)!==0;if(!o&&!x)return u&&Bu(n,a,!1),Pn(e,n,f);o=n.stateNode,Gp.current=n;var j=x&&typeof a.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&x?(n.child=as(n,e.child,null,f),n.child=as(n,null,j,f)):gt(e,n,j,f),n.memoizedState=o.state,u&&Bu(n,a,!0),n.child}function Md(e){var n=e.stateNode;n.pendingContext?Fu(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Fu(e,n.context,!1),ao(e,n.containerInfo)}function Dd(e,n,a,o,u){return ss(),Xi(u),n.flags|=256,gt(e,n,a,o),n.child}var So={dehydrated:null,treeContext:null,retryLane:0};function ko(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fd(e,n,a){var o=n.pendingProps,u=$e.current,f=!1,x=(n.flags&128)!==0,j;if((j=x)||(j=e!==null&&e.memoizedState===null?!1:(u&2)!==0),j?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),De($e,u&1),e===null)return Ji(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=o.children,e=o.fallback,f?(o=n.mode,f=n.child,x={mode:"hidden",children:x},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=Dl(x,o,0,null),e=Or(e,o,a,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=ko(a),n.memoizedState=So,e):Eo(n,x));if(u=e.memoizedState,u!==null&&(j=u.dehydrated,j!==null))return Kp(e,n,x,o,j,u,a);if(f){f=o.fallback,x=n.mode,u=e.child,j=u.sibling;var k={mode:"hidden",children:o.children};return(x&1)===0&&n.child!==u?(o=n.child,o.childLanes=0,o.pendingProps=k,n.deletions=null):(o=cr(u,k),o.subtreeFlags=u.subtreeFlags&14680064),j!==null?f=cr(j,f):(f=Or(f,x,a,null),f.flags|=2),f.return=n,o.return=n,o.sibling=f,n.child=o,o=f,f=n.child,x=e.child.memoizedState,x=x===null?ko(a):{baseLanes:x.baseLanes|a,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~a,n.memoizedState=So,o}return f=e.child,e=f.sibling,o=cr(f,{mode:"visible",children:o.children}),(n.mode&1)===0&&(o.lanes=a),o.return=n,o.sibling=null,e!==null&&(a=n.deletions,a===null?(n.deletions=[e],n.flags|=16):a.push(e)),n.child=o,n.memoizedState=null,o}function Eo(e,n){return n=Dl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Sl(e,n,a,o){return o!==null&&Xi(o),as(n,e.child,null,a),e=Eo(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Kp(e,n,a,o,u,f,x){if(a)return n.flags&256?(n.flags&=-257,o=jo(Error(l(422))),Sl(e,n,x,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=o.fallback,u=n.mode,o=Dl({mode:"visible",children:o.children},u,0,null),f=Or(f,u,x,null),f.flags|=2,o.return=n,f.return=n,o.sibling=f,n.child=o,(n.mode&1)!==0&&as(n,e.child,null,x),n.child.memoizedState=ko(x),n.memoizedState=So,f);if((n.mode&1)===0)return Sl(e,n,x,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var j=o.dgst;return o=j,f=Error(l(419)),o=jo(f,o,void 0),Sl(e,n,x,o)}if(j=(x&e.childLanes)!==0,kt||j){if(o=rt,o!==null){switch(x&-x){case 4:u=2;break;case 16:u=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:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|x))!==0?0:u,u!==0&&u!==f.retryLane&&(f.retryLane=u,Rn(e,u),on(o,e,u,-1))}return Ho(),o=jo(Error(l(421))),Sl(e,n,x,o)}return u.data==="$?"?(n.flags|=128,n.child=e.child,n=l0.bind(null,e),u._reactRetry=n,null):(e=f.treeContext,It=Xn(u.nextSibling),Ot=n,ze=!0,rn=null,e!==null&&(Ht[$t++]=_n,Ht[$t++]=Tn,Ht[$t++]=kr,_n=e.id,Tn=e.overflow,kr=n),n=Eo(n,o.children),n.flags|=4096,n)}function Ud(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),no(e.return,n,a)}function Co(e,n,a,o,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:u}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=a,f.tailMode=u)}function Bd(e,n,a){var o=n.pendingProps,u=o.revealOrder,f=o.tail;if(gt(e,n,o.children,a),o=$e.current,(o&2)!==0)o=o&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&&Ud(e,a,n);else if(e.tag===19)Ud(e,a,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}o&=1}if(De($e,o),(n.mode&1)===0)n.memoizedState=null;else switch(u){case"forwards":for(a=n.child,u=null;a!==null;)e=a.alternate,e!==null&&gl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),Co(n,!1,u,a,f);break;case"backwards":for(a=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&gl(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Co(n,!0,a,null,f);break;case"together":Co(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function kl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Pn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Rr|=n.lanes,(a&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(l(153));if(n.child!==null){for(e=n.child,a=cr(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=cr(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function qp(e,n,a){switch(n.tag){case 3:Md(n),ss();break;case 5:ed(n);break;case 1:St(n.type)&&il(n);break;case 4:ao(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,u=n.memoizedProps.value;De(fl,o._currentValue),o._currentValue=u;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(De($e,$e.current&1),n.flags|=128,null):(a&n.child.childLanes)!==0?Fd(e,n,a):(De($e,$e.current&1),e=Pn(e,n,a),e!==null?e.sibling:null);De($e,$e.current&1);break;case 19:if(o=(a&n.childLanes)!==0,(e.flags&128)!==0){if(o)return Bd(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),De($e,$e.current),o)break;return null;case 22:case 23:return n.lanes=0,Ld(e,n,a)}return Pn(e,n,a)}var zd,_o,Hd,$d;zd=function(e,n){for(var a=n.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},_o=function(){},Hd=function(e,n,a,o){var u=e.memoizedProps;if(u!==o){e=n.stateNode,_r(xn.current);var f=null;switch(a){case"input":u=Dn(e,u),o=Dn(e,o),f=[];break;case"select":u=q({},u,{value:void 0}),o=q({},o,{value:void 0}),f=[];break;case"textarea":u=Hr(e,u),o=Hr(e,o),f=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=sl)}fn(a,o);var x;a=null;for(O in u)if(!o.hasOwnProperty(O)&&u.hasOwnProperty(O)&&u[O]!=null)if(O==="style"){var j=u[O];for(x in j)j.hasOwnProperty(x)&&(a||(a={}),a[x]="")}else O!=="dangerouslySetInnerHTML"&&O!=="children"&&O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(c.hasOwnProperty(O)?f||(f=[]):(f=f||[]).push(O,null));for(O in o){var k=o[O];if(j=u?.[O],o.hasOwnProperty(O)&&k!==j&&(k!=null||j!=null))if(O==="style")if(j){for(x in j)!j.hasOwnProperty(x)||k&&k.hasOwnProperty(x)||(a||(a={}),a[x]="");for(x in k)k.hasOwnProperty(x)&&j[x]!==k[x]&&(a||(a={}),a[x]=k[x])}else a||(f||(f=[]),f.push(O,a)),a=k;else O==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,j=j?j.__html:void 0,k!=null&&j!==k&&(f=f||[]).push(O,k)):O==="children"?typeof k!="string"&&typeof k!="number"||(f=f||[]).push(O,""+k):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&(c.hasOwnProperty(O)?(k!=null&&O==="onScroll"&&Ue("scroll",e),f||j===k||(f=[])):(f=f||[]).push(O,k))}a&&(f=f||[]).push("style",a);var O=f;(n.updateQueue=O)&&(n.flags|=4)}},$d=function(e,n,a,o){a!==o&&(n.flags|=4)};function oa(e,n){if(!ze)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ft(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function Yp(e,n,a){var o=n.pendingProps;switch(Yi(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(n),null;case 1:return St(n.type)&&ll(),ft(n),null;case 3:return o=n.stateNode,os(),Be(bt),Be(dt),oo(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(dl(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,rn!==null&&(Uo(rn),rn=null))),_o(e,n),ft(n),null;case 5:lo(n);var u=_r(ra.current);if(a=n.type,e!==null&&n.stateNode!=null)Hd(e,n,a,o,u),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(l(166));return ft(n),null}if(e=_r(xn.current),dl(n)){o=n.stateNode,a=n.type;var f=n.memoizedProps;switch(o[pn]=n,o[Xs]=f,e=(n.mode&1)!==0,a){case"dialog":Ue("cancel",o),Ue("close",o);break;case"iframe":case"object":case"embed":Ue("load",o);break;case"video":case"audio":for(u=0;u<Ys.length;u++)Ue(Ys[u],o);break;case"source":Ue("error",o);break;case"img":case"image":case"link":Ue("error",o),Ue("load",o);break;case"details":Ue("toggle",o);break;case"input":dn(o,f),Ue("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},Ue("invalid",o);break;case"textarea":Oa(o,f),Ue("invalid",o)}fn(a,f),u=null;for(var x in f)if(f.hasOwnProperty(x)){var j=f[x];x==="children"?typeof j=="string"?o.textContent!==j&&(f.suppressHydrationWarning!==!0&&rl(o.textContent,j,e),u=["children",j]):typeof j=="number"&&o.textContent!==""+j&&(f.suppressHydrationWarning!==!0&&rl(o.textContent,j,e),u=["children",""+j]):c.hasOwnProperty(x)&&j!=null&&x==="onScroll"&&Ue("scroll",o)}switch(a){case"input":pr(o),jn(o,f,!0);break;case"textarea":pr(o),Un(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=sl)}o=u,n.updateQueue=o,o!==null&&(n.flags|=4)}else{x=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nn(a)),e==="http://www.w3.org/1999/xhtml"?a==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=x.createElement(a,{is:o.is}):(e=x.createElement(a),a==="select"&&(x=e,o.multiple?x.multiple=!0:o.size&&(x.size=o.size))):e=x.createElementNS(e,a),e[pn]=n,e[Xs]=o,zd(e,n,!1,!1),n.stateNode=e;e:{switch(x=vr(a,o),a){case"dialog":Ue("cancel",e),Ue("close",e),u=o;break;case"iframe":case"object":case"embed":Ue("load",e),u=o;break;case"video":case"audio":for(u=0;u<Ys.length;u++)Ue(Ys[u],e);u=o;break;case"source":Ue("error",e),u=o;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),u=o;break;case"details":Ue("toggle",e),u=o;break;case"input":dn(e,o),u=Dn(e,o),Ue("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=q({},o,{value:void 0}),Ue("invalid",e);break;case"textarea":Oa(e,o),u=Hr(e,o),Ue("invalid",e);break;default:u=o}fn(a,u),j=u;for(f in j)if(j.hasOwnProperty(f)){var k=j[f];f==="style"?yr(e,k):f==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,k!=null&&Cs(e,k)):f==="children"?typeof k=="string"?(a!=="textarea"||k!=="")&&zn(e,k):typeof k=="number"&&zn(e,""+k):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(c.hasOwnProperty(f)?k!=null&&f==="onScroll"&&Ue("scroll",e):k!=null&&M(e,f,k,x))}switch(a){case"input":pr(e),jn(e,o,!1);break;case"textarea":pr(e),Un(e);break;case"option":o.value!=null&&e.setAttribute("value",""+_e(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?wn(e,!!o.multiple,f,!1):o.defaultValue!=null&&wn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=sl)}switch(a){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return ft(n),null;case 6:if(e&&n.stateNode!=null)$d(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(l(166));if(a=_r(ra.current),_r(xn.current),dl(n)){if(o=n.stateNode,a=n.memoizedProps,o[pn]=n,(f=o.nodeValue!==a)&&(e=Ot,e!==null))switch(e.tag){case 3:rl(o.nodeValue,a,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rl(o.nodeValue,a,(e.mode&1)!==0)}f&&(n.flags|=4)}else o=(a.nodeType===9?a:a.ownerDocument).createTextNode(o),o[pn]=n,n.stateNode=o}return ft(n),null;case 13:if(Be($e),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&It!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Gu(),ss(),n.flags|=98560,f=!1;else if(f=dl(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[pn]=n}else ss(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),f=!1}else rn!==null&&(Uo(rn),rn=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=a,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||($e.current&1)!==0?et===0&&(et=3):Ho())),n.updateQueue!==null&&(n.flags|=4),ft(n),null);case 4:return os(),_o(e,n),e===null&&Qs(n.stateNode.containerInfo),ft(n),null;case 10:return to(n.type._context),ft(n),null;case 17:return St(n.type)&&ll(),ft(n),null;case 19:if(Be($e),f=n.memoizedState,f===null)return ft(n),null;if(o=(n.flags&128)!==0,x=f.rendering,x===null)if(o)oa(f,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=gl(e),x!==null){for(n.flags|=128,oa(f,!1),o=x.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=a,a=n.child;a!==null;)f=a,e=o,f.flags&=14680066,x=f.alternate,x===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=x.childLanes,f.lanes=x.lanes,f.child=x.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=x.memoizedProps,f.memoizedState=x.memoizedState,f.updateQueue=x.updateQueue,f.type=x.type,e=x.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return De($e,$e.current&1|2),n.child}e=e.sibling}f.tail!==null&&Se()>ms&&(n.flags|=128,o=!0,oa(f,!1),n.lanes=4194304)}else{if(!o)if(e=gl(x),e!==null){if(n.flags|=128,o=!0,a=e.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),oa(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!ze)return ft(n),null}else 2*Se()-f.renderingStartTime>ms&&a!==1073741824&&(n.flags|=128,o=!0,oa(f,!1),n.lanes=4194304);f.isBackwards?(x.sibling=n.child,n.child=x):(a=f.last,a!==null?a.sibling=x:n.child=x,f.last=x)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Se(),n.sibling=null,a=$e.current,De($e,o?a&1|2:a&1),n):(ft(n),null);case 22:case 23:return zo(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&(n.mode&1)!==0?(Mt&1073741824)!==0&&(ft(n),n.subtreeFlags&6&&(n.flags|=8192)):ft(n),null;case 24:return null;case 25:return null}throw Error(l(156,n.tag))}function Qp(e,n){switch(Yi(n),n.tag){case 1:return St(n.type)&&ll(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return os(),Be(bt),Be(dt),oo(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return lo(n),null;case 13:if(Be($e),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(l(340));ss()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Be($e),null;case 4:return os(),null;case 10:return to(n.type._context),null;case 22:case 23:return zo(),null;case 24:return null;default:return null}}var El=!1,ht=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,re=null;function us(e,n){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(o){Ke(e,n,o)}else a.current=null}function To(e,n,a){try{a()}catch(o){Ke(e,n,o)}}var Vd=!1;function Xp(e,n){if(Bi=Ga,e=Nu(),Pi(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var u=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var x=0,j=-1,k=-1,O=0,$=0,V=e,H=null;t:for(;;){for(var ee;V!==a||u!==0&&V.nodeType!==3||(j=x+u),V!==f||o!==0&&V.nodeType!==3||(k=x+o),V.nodeType===3&&(x+=V.nodeValue.length),(ee=V.firstChild)!==null;)H=V,V=ee;for(;;){if(V===e)break t;if(H===a&&++O===u&&(j=x),H===f&&++$===o&&(k=x),(ee=V.nextSibling)!==null)break;V=H,H=V.parentNode}V=ee}a=j===-1||k===-1?null:{start:j,end:k}}else a=null}a=a||{start:0,end:0}}else a=null;for(zi={focusedElem:e,selectionRange:a},Ga=!1,re=n;re!==null;)if(n=re,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,re=e;else for(;re!==null;){n=re;try{var se=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,Ye=se.memoizedState,A=n.stateNode,T=A.getSnapshotBeforeUpdate(n.elementType===n.type?ie:sn(n.type,ie),Ye);A.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var L=n.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(K){Ke(n,n.return,K)}if(e=n.sibling,e!==null){e.return=n.return,re=e;break}re=n.return}return se=Vd,Vd=!1,se}function ca(e,n,a){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var f=u.destroy;u.destroy=void 0,f!==void 0&&To(n,a,f)}u=u.next}while(u!==o)}}function Cl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var o=a.create;a.destroy=o()}a=a.next}while(a!==n)}}function Ro(e){var n=e.ref;if(n!==null){var a=e.stateNode;e.tag,e=a,typeof n=="function"?n(e):n.current=e}}function Wd(e){var n=e.alternate;n!==null&&(e.alternate=null,Wd(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[pn],delete n[Xs],delete n[Wi],delete n[Op],delete n[Ip])),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 Gd(e){return e.tag===5||e.tag===3||e.tag===4}function Kd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gd(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 Ao(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.nodeType===8?a.parentNode.insertBefore(e,n):a.insertBefore(e,n):(a.nodeType===8?(n=a.parentNode,n.insertBefore(e,a)):(n=a,n.appendChild(e)),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=sl));else if(o!==4&&(e=e.child,e!==null))for(Ao(e,n,a),e=e.sibling;e!==null;)Ao(e,n,a),e=e.sibling}function Po(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Po(e,n,a),e=e.sibling;e!==null;)Po(e,n,a),e=e.sibling}var ot=null,an=!1;function sr(e,n,a){for(a=a.child;a!==null;)qd(e,n,a),a=a.sibling}function qd(e,n,a){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(Nr,a)}catch{}switch(a.tag){case 5:ht||us(a,n);case 6:var o=ot,u=an;ot=null,sr(e,n,a),ot=o,an=u,ot!==null&&(an?(e=ot,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):ot.removeChild(a.stateNode));break;case 18:ot!==null&&(an?(e=ot,a=a.stateNode,e.nodeType===8?Vi(e.parentNode,a):e.nodeType===1&&Vi(e,a),zs(e)):Vi(ot,a.stateNode));break;case 4:o=ot,u=an,ot=a.stateNode.containerInfo,an=!0,sr(e,n,a),ot=o,an=u;break;case 0:case 11:case 14:case 15:if(!ht&&(o=a.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var f=u,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&To(a,n,x),u=u.next}while(u!==o)}sr(e,n,a);break;case 1:if(!ht&&(us(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=a.memoizedProps,o.state=a.memoizedState,o.componentWillUnmount()}catch(j){Ke(a,n,j)}sr(e,n,a);break;case 21:sr(e,n,a);break;case 22:a.mode&1?(ht=(o=ht)||a.memoizedState!==null,sr(e,n,a),ht=o):sr(e,n,a);break;default:sr(e,n,a)}}function Yd(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new Jp),n.forEach(function(o){var u=i0.bind(null,e,o);a.has(o)||(a.add(o),o.then(u,u))})}}function ln(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];try{var f=e,x=n,j=x;e:for(;j!==null;){switch(j.tag){case 5:ot=j.stateNode,an=!1;break e;case 3:ot=j.stateNode.containerInfo,an=!0;break e;case 4:ot=j.stateNode.containerInfo,an=!0;break e}j=j.return}if(ot===null)throw Error(l(160));qd(f,x,u),ot=null,an=!1;var k=u.alternate;k!==null&&(k.return=null),u.return=null}catch(O){Ke(u,n,O)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Qd(n,e),n=n.sibling}function Qd(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ln(n,e),yn(e),o&4){try{ca(3,e,e.return),Cl(3,e)}catch(ie){Ke(e,e.return,ie)}try{ca(5,e,e.return)}catch(ie){Ke(e,e.return,ie)}}break;case 1:ln(n,e),yn(e),o&512&&a!==null&&us(a,a.return);break;case 5:if(ln(n,e),yn(e),o&512&&a!==null&&us(a,a.return),e.flags&32){var u=e.stateNode;try{zn(u,"")}catch(ie){Ke(e,e.return,ie)}}if(o&4&&(u=e.stateNode,u!=null)){var f=e.memoizedProps,x=a!==null?a.memoizedProps:f,j=e.type,k=e.updateQueue;if(e.updateQueue=null,k!==null)try{j==="input"&&f.type==="radio"&&f.name!=null&&zr(u,f),vr(j,x);var O=vr(j,f);for(x=0;x<k.length;x+=2){var $=k[x],V=k[x+1];$==="style"?yr(u,V):$==="dangerouslySetInnerHTML"?Cs(u,V):$==="children"?zn(u,V):M(u,$,V,O)}switch(j){case"input":xr(u,f);break;case"textarea":$r(u,f);break;case"select":var H=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!f.multiple;var ee=f.value;ee!=null?wn(u,!!f.multiple,ee,!1):H!==!!f.multiple&&(f.defaultValue!=null?wn(u,!!f.multiple,f.defaultValue,!0):wn(u,!!f.multiple,f.multiple?[]:"",!1))}u[Xs]=f}catch(ie){Ke(e,e.return,ie)}}break;case 6:if(ln(n,e),yn(e),o&4){if(e.stateNode===null)throw Error(l(162));u=e.stateNode,f=e.memoizedProps;try{u.nodeValue=f}catch(ie){Ke(e,e.return,ie)}}break;case 3:if(ln(n,e),yn(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{zs(n.containerInfo)}catch(ie){Ke(e,e.return,ie)}break;case 4:ln(n,e),yn(e);break;case 13:ln(n,e),yn(e),u=e.child,u.flags&8192&&(f=u.memoizedState!==null,u.stateNode.isHidden=f,!f||u.alternate!==null&&u.alternate.memoizedState!==null||(Io=Se())),o&4&&Yd(e);break;case 22:if($=a!==null&&a.memoizedState!==null,e.mode&1?(ht=(O=ht)||$,ln(n,e),ht=O):ln(n,e),yn(e),o&8192){if(O=e.memoizedState!==null,(e.stateNode.isHidden=O)&&!$&&(e.mode&1)!==0)for(re=e,$=e.child;$!==null;){for(V=re=$;re!==null;){switch(H=re,ee=H.child,H.tag){case 0:case 11:case 14:case 15:ca(4,H,H.return);break;case 1:us(H,H.return);var se=H.stateNode;if(typeof se.componentWillUnmount=="function"){o=H,a=H.return;try{n=o,se.props=n.memoizedProps,se.state=n.memoizedState,se.componentWillUnmount()}catch(ie){Ke(o,a,ie)}}break;case 5:us(H,H.return);break;case 22:if(H.memoizedState!==null){Zd(V);continue}}ee!==null?(ee.return=H,re=ee):Zd(V)}$=$.sibling}e:for($=null,V=e;;){if(V.tag===5){if($===null){$=V;try{u=V.stateNode,O?(f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(j=V.stateNode,k=V.memoizedProps.style,x=k!=null&&k.hasOwnProperty("display")?k.display:null,j.style.display=gr("display",x))}catch(ie){Ke(e,e.return,ie)}}}else if(V.tag===6){if($===null)try{V.stateNode.nodeValue=O?"":V.memoizedProps}catch(ie){Ke(e,e.return,ie)}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===e)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===e)break e;for(;V.sibling===null;){if(V.return===null||V.return===e)break e;$===V&&($=null),V=V.return}$===V&&($=null),V.sibling.return=V.return,V=V.sibling}}break;case 19:ln(n,e),yn(e),o&4&&Yd(e);break;case 21:break;default:ln(n,e),yn(e)}}function yn(e){var n=e.flags;if(n&2){try{e:{for(var a=e.return;a!==null;){if(Gd(a)){var o=a;break e}a=a.return}throw Error(l(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&(zn(u,""),o.flags&=-33);var f=Kd(e);Po(e,f,u);break;case 3:case 4:var x=o.stateNode.containerInfo,j=Kd(e);Ao(e,j,x);break;default:throw Error(l(161))}}catch(k){Ke(e,e.return,k)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Zp(e,n,a){re=e,Jd(e)}function Jd(e,n,a){for(var o=(e.mode&1)!==0;re!==null;){var u=re,f=u.child;if(u.tag===22&&o){var x=u.memoizedState!==null||El;if(!x){var j=u.alternate,k=j!==null&&j.memoizedState!==null||ht;j=El;var O=ht;if(El=x,(ht=k)&&!O)for(re=u;re!==null;)x=re,k=x.child,x.tag===22&&x.memoizedState!==null?em(u):k!==null?(k.return=x,re=k):em(u);for(;f!==null;)re=f,Jd(f),f=f.sibling;re=u,El=j,ht=O}Xd(e)}else(u.subtreeFlags&8772)!==0&&f!==null?(f.return=u,re=f):Xd(e)}}function Xd(e){for(;re!==null;){var n=re;if((n.flags&8772)!==0){var a=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:ht||Cl(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!ht)if(a===null)o.componentDidMount();else{var u=n.elementType===n.type?a.memoizedProps:sn(n.type,a.memoizedProps);o.componentDidUpdate(u,a.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&Zu(n,f,o);break;case 3:var x=n.updateQueue;if(x!==null){if(a=null,n.child!==null)switch(n.child.tag){case 5:a=n.child.stateNode;break;case 1:a=n.child.stateNode}Zu(n,x,a)}break;case 5:var j=n.stateNode;if(a===null&&n.flags&4){a=j;var k=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":k.autoFocus&&a.focus();break;case"img":k.src&&(a.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var O=n.alternate;if(O!==null){var $=O.memoizedState;if($!==null){var V=$.dehydrated;V!==null&&zs(V)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}ht||n.flags&512&&Ro(n)}catch(H){Ke(n,n.return,H)}}if(n===e){re=null;break}if(a=n.sibling,a!==null){a.return=n.return,re=a;break}re=n.return}}function Zd(e){for(;re!==null;){var n=re;if(n===e){re=null;break}var a=n.sibling;if(a!==null){a.return=n.return,re=a;break}re=n.return}}function em(e){for(;re!==null;){var n=re;try{switch(n.tag){case 0:case 11:case 15:var a=n.return;try{Cl(4,n)}catch(k){Ke(n,a,k)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var u=n.return;try{o.componentDidMount()}catch(k){Ke(n,u,k)}}var f=n.return;try{Ro(n)}catch(k){Ke(n,f,k)}break;case 5:var x=n.return;try{Ro(n)}catch(k){Ke(n,x,k)}}}catch(k){Ke(n,n.return,k)}if(n===e){re=null;break}var j=n.sibling;if(j!==null){j.return=n.return,re=j;break}re=n.return}}var e0=Math.ceil,_l=P.ReactCurrentDispatcher,Lo=P.ReactCurrentOwner,Gt=P.ReactCurrentBatchConfig,Ae=0,rt=null,Xe=null,ct=0,Mt=0,ds=Zn(0),et=0,ua=null,Rr=0,Tl=0,Oo=0,da=null,Et=null,Io=0,ms=1/0,Ln=null,Rl=!1,Mo=null,ar=null,Al=!1,lr=null,Pl=0,ma=0,Do=null,Ll=-1,Ol=0;function yt(){return(Ae&6)!==0?Se():Ll!==-1?Ll:Ll=Se()}function ir(e){return(e.mode&1)===0?1:(Ae&2)!==0&&ct!==0?ct&-ct:Dp.transition!==null?(Ol===0&&(Ol=Kc()),Ol):(e=Le,e!==0||(e=window.event,e=e===void 0?16:nu(e.type)),e)}function on(e,n,a,o){if(50<ma)throw ma=0,Do=null,Error(l(185));Ms(e,a,o),((Ae&2)===0||e!==rt)&&(e===rt&&((Ae&2)===0&&(Tl|=a),et===4&&or(e,ct)),Ct(e,o),a===1&&Ae===0&&(n.mode&1)===0&&(ms=Se()+500,ol&&tr()))}function Ct(e,n){var a=e.callbackNode;Dh(e,n);var o=$a(e,e===rt?ct:0);if(o===0)a!==null&&G(a),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(a!=null&&G(a),n===1)e.tag===0?Mp(nm.bind(null,e)):zu(nm.bind(null,e)),Pp(function(){(Ae&6)===0&&tr()}),a=null;else{switch(qc(o)){case 1:a=tt;break;case 4:a=zt;break;case 16:a=en;break;case 536870912:a=Je;break;default:a=en}a=um(a,tm.bind(null,e))}e.callbackPriority=n,e.callbackNode=a}}function tm(e,n){if(Ll=-1,Ol=0,(Ae&6)!==0)throw Error(l(327));var a=e.callbackNode;if(fs()&&e.callbackNode!==a)return null;var o=$a(e,e===rt?ct:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||n)n=Il(e,o);else{n=o;var u=Ae;Ae|=2;var f=sm();(rt!==e||ct!==n)&&(Ln=null,ms=Se()+500,Pr(e,n));do try{r0();break}catch(j){rm(e,j)}while(!0);eo(),_l.current=f,Ae=u,Xe!==null?n=0:(rt=null,ct=0,n=et)}if(n!==0){if(n===2&&(u=xi(e),u!==0&&(o=u,n=Fo(e,u))),n===1)throw a=ua,Pr(e,0),or(e,o),Ct(e,Se()),a;if(n===6)or(e,o);else{if(u=e.current.alternate,(o&30)===0&&!t0(u)&&(n=Il(e,o),n===2&&(f=xi(e),f!==0&&(o=f,n=Fo(e,f))),n===1))throw a=ua,Pr(e,0),or(e,o),Ct(e,Se()),a;switch(e.finishedWork=u,e.finishedLanes=o,n){case 0:case 1:throw Error(l(345));case 2:Lr(e,Et,Ln);break;case 3:if(or(e,o),(o&130023424)===o&&(n=Io+500-Se(),10<n)){if($a(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){yt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=$i(Lr.bind(null,e,Et,Ln),n);break}Lr(e,Et,Ln);break;case 4:if(or(e,o),(o&4194240)===o)break;for(n=e.eventTimes,u=-1;0<o;){var x=31-tn(o);f=1<<x,x=n[x],x>u&&(u=x),o&=~f}if(o=u,o=Se()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*e0(o/1960))-o,10<o){e.timeoutHandle=$i(Lr.bind(null,e,Et,Ln),o);break}Lr(e,Et,Ln);break;case 5:Lr(e,Et,Ln);break;default:throw Error(l(329))}}}return Ct(e,Se()),e.callbackNode===a?tm.bind(null,e):null}function Fo(e,n){var a=da;return e.current.memoizedState.isDehydrated&&(Pr(e,n).flags|=256),e=Il(e,n),e!==2&&(n=Et,Et=a,n!==null&&Uo(n)),e}function Uo(e){Et===null?Et=e:Et.push.apply(Et,e)}function t0(e){for(var n=e;;){if(n.flags&16384){var a=n.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var o=0;o<a.length;o++){var u=a[o],f=u.getSnapshot;u=u.value;try{if(!nn(f(),u))return!1}catch{return!1}}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;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 or(e,n){for(n&=~Oo,n&=~Tl,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var a=31-tn(n),o=1<<a;e[a]=-1,n&=~o}}function nm(e){if((Ae&6)!==0)throw Error(l(327));fs();var n=$a(e,0);if((n&1)===0)return Ct(e,Se()),null;var a=Il(e,n);if(e.tag!==0&&a===2){var o=xi(e);o!==0&&(n=o,a=Fo(e,o))}if(a===1)throw a=ua,Pr(e,0),or(e,n),Ct(e,Se()),a;if(a===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Lr(e,Et,Ln),Ct(e,Se()),null}function Bo(e,n){var a=Ae;Ae|=1;try{return e(n)}finally{Ae=a,Ae===0&&(ms=Se()+500,ol&&tr())}}function Ar(e){lr!==null&&lr.tag===0&&(Ae&6)===0&&fs();var n=Ae;Ae|=1;var a=Gt.transition,o=Le;try{if(Gt.transition=null,Le=1,e)return e()}finally{Le=o,Gt.transition=a,Ae=n,(Ae&6)===0&&tr()}}function zo(){Mt=ds.current,Be(ds)}function Pr(e,n){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,Ap(a)),Xe!==null)for(a=Xe.return;a!==null;){var o=a;switch(Yi(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&ll();break;case 3:os(),Be(bt),Be(dt),oo();break;case 5:lo(o);break;case 4:os();break;case 13:Be($e);break;case 19:Be($e);break;case 10:to(o.type._context);break;case 22:case 23:zo()}a=a.return}if(rt=e,Xe=e=cr(e.current,null),ct=Mt=n,et=0,ua=null,Oo=Tl=Rr=0,Et=da=null,Cr!==null){for(n=0;n<Cr.length;n++)if(a=Cr[n],o=a.interleaved,o!==null){a.interleaved=null;var u=o.next,f=a.pending;if(f!==null){var x=f.next;f.next=u,o.next=x}a.pending=o}Cr=null}return e}function rm(e,n){do{var a=Xe;try{if(eo(),yl.current=Nl,vl){for(var o=Ve.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}vl=!1}if(Tr=0,nt=Ze=Ve=null,sa=!1,aa=0,Lo.current=null,a===null||a.return===null){et=1,ua=n,Xe=null;break}e:{var f=e,x=a.return,j=a,k=n;if(n=ct,j.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){var O=k,$=j,V=$.tag;if(($.mode&1)===0&&(V===0||V===11||V===15)){var H=$.alternate;H?($.updateQueue=H.updateQueue,$.memoizedState=H.memoizedState,$.lanes=H.lanes):($.updateQueue=null,$.memoizedState=null)}var ee=_d(x);if(ee!==null){ee.flags&=-257,Td(ee,x,j,f,n),ee.mode&1&&Cd(f,O,n),n=ee,k=O;var se=n.updateQueue;if(se===null){var ie=new Set;ie.add(k),n.updateQueue=ie}else se.add(k);break e}else{if((n&1)===0){Cd(f,O,n),Ho();break e}k=Error(l(426))}}else if(ze&&j.mode&1){var Ye=_d(x);if(Ye!==null){(Ye.flags&65536)===0&&(Ye.flags|=256),Td(Ye,x,j,f,n),Xi(cs(k,j));break e}}f=k=cs(k,j),et!==4&&(et=2),da===null?da=[f]:da.push(f),f=x;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var A=kd(f,k,n);Xu(f,A);break e;case 1:j=k;var T=f.type,L=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(ar===null||!ar.has(L)))){f.flags|=65536,n&=-n,f.lanes|=n;var K=Ed(f,j,n);Xu(f,K);break e}}f=f.return}while(f!==null)}lm(a)}catch(ce){n=ce,Xe===a&&a!==null&&(Xe=a=a.return);continue}break}while(!0)}function sm(){var e=_l.current;return _l.current=Nl,e===null?Nl:e}function Ho(){(et===0||et===3||et===2)&&(et=4),rt===null||(Rr&268435455)===0&&(Tl&268435455)===0||or(rt,ct)}function Il(e,n){var a=Ae;Ae|=2;var o=sm();(rt!==e||ct!==n)&&(Ln=null,Pr(e,n));do try{n0();break}catch(u){rm(e,u)}while(!0);if(eo(),Ae=a,_l.current=o,Xe!==null)throw Error(l(261));return rt=null,ct=0,et}function n0(){for(;Xe!==null;)am(Xe)}function r0(){for(;Xe!==null&&!le();)am(Xe)}function am(e){var n=cm(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,n===null?lm(e):Xe=n,Lo.current=null}function lm(e){var n=e;do{var a=n.alternate;if(e=n.return,(n.flags&32768)===0){if(a=Yp(a,n,Mt),a!==null){Xe=a;return}}else{if(a=Qp(a,n),a!==null){a.flags&=32767,Xe=a;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{et=6,Xe=null;return}}if(n=n.sibling,n!==null){Xe=n;return}Xe=n=e}while(n!==null);et===0&&(et=5)}function Lr(e,n,a){var o=Le,u=Gt.transition;try{Gt.transition=null,Le=1,s0(e,n,a,o)}finally{Gt.transition=u,Le=o}return null}function s0(e,n,a,o){do fs();while(lr!==null);if((Ae&6)!==0)throw Error(l(327));a=e.finishedWork;var u=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var f=a.lanes|a.childLanes;if(Fh(e,f),e===rt&&(Xe=rt=null,ct=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Al||(Al=!0,um(en,function(){return fs(),null})),f=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||f){f=Gt.transition,Gt.transition=null;var x=Le;Le=1;var j=Ae;Ae|=4,Lo.current=null,Xp(e,a),Qd(a,e),Sp(zi),Ga=!!Bi,zi=Bi=null,e.current=a,Zp(a),Me(),Ae=j,Le=x,Gt.transition=f}else e.current=a;if(Al&&(Al=!1,lr=e,Pl=u),f=e.pendingLanes,f===0&&(ar=null),Ph(a.stateNode),Ct(e,Se()),n!==null)for(o=e.onRecoverableError,a=0;a<n.length;a++)u=n[a],o(u.value,{componentStack:u.stack,digest:u.digest});if(Rl)throw Rl=!1,e=Mo,Mo=null,e;return(Pl&1)!==0&&e.tag!==0&&fs(),f=e.pendingLanes,(f&1)!==0?e===Do?ma++:(ma=0,Do=e):ma=0,tr(),null}function fs(){if(lr!==null){var e=qc(Pl),n=Gt.transition,a=Le;try{if(Gt.transition=null,Le=16>e?16:e,lr===null)var o=!1;else{if(e=lr,lr=null,Pl=0,(Ae&6)!==0)throw Error(l(331));var u=Ae;for(Ae|=4,re=e.current;re!==null;){var f=re,x=f.child;if((re.flags&16)!==0){var j=f.deletions;if(j!==null){for(var k=0;k<j.length;k++){var O=j[k];for(re=O;re!==null;){var $=re;switch($.tag){case 0:case 11:case 15:ca(8,$,f)}var V=$.child;if(V!==null)V.return=$,re=V;else for(;re!==null;){$=re;var H=$.sibling,ee=$.return;if(Wd($),$===O){re=null;break}if(H!==null){H.return=ee,re=H;break}re=ee}}}var se=f.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var Ye=ie.sibling;ie.sibling=null,ie=Ye}while(ie!==null)}}re=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,re=x;else e:for(;re!==null;){if(f=re,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:ca(9,f,f.return)}var A=f.sibling;if(A!==null){A.return=f.return,re=A;break e}re=f.return}}var T=e.current;for(re=T;re!==null;){x=re;var L=x.child;if((x.subtreeFlags&2064)!==0&&L!==null)L.return=x,re=L;else e:for(x=T;re!==null;){if(j=re,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:Cl(9,j)}}catch(ce){Ke(j,j.return,ce)}if(j===x){re=null;break e}var K=j.sibling;if(K!==null){K.return=j.return,re=K;break e}re=j.return}}if(Ae=u,tr(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(Nr,e)}catch{}o=!0}return o}finally{Le=a,Gt.transition=n}}return!1}function im(e,n,a){n=cs(a,n),n=kd(e,n,1),e=rr(e,n,1),n=yt(),e!==null&&(Ms(e,1,n),Ct(e,n))}function Ke(e,n,a){if(e.tag===3)im(e,e,a);else for(;n!==null;){if(n.tag===3){im(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ar===null||!ar.has(o))){e=cs(a,e),e=Ed(n,e,1),n=rr(n,e,1),e=yt(),n!==null&&(Ms(n,1,e),Ct(n,e));break}}n=n.return}}function a0(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),n=yt(),e.pingedLanes|=e.suspendedLanes&a,rt===e&&(ct&a)===a&&(et===4||et===3&&(ct&130023424)===ct&&500>Se()-Io?Pr(e,0):Oo|=a),Ct(e,n)}function om(e,n){n===0&&((e.mode&1)===0?n=1:(n=Ha,Ha<<=1,(Ha&130023424)===0&&(Ha=4194304)));var a=yt();e=Rn(e,n),e!==null&&(Ms(e,n,a),Ct(e,a))}function l0(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),om(e,a)}function i0(e,n){var a=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(l(314))}o!==null&&o.delete(n),om(e,a)}var cm;cm=function(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps||bt.current)kt=!0;else{if((e.lanes&a)===0&&(n.flags&128)===0)return kt=!1,qp(e,n,a);kt=(e.flags&131072)!==0}else kt=!1,ze&&(n.flags&1048576)!==0&&Hu(n,ul,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;kl(e,n),e=n.pendingProps;var u=ts(n,dt.current);is(n,a),u=mo(null,n,o,e,u,a);var f=fo();return n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,St(o)?(f=!0,il(n)):f=!1,n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,so(n),u.updater=bl,n.stateNode=u,u._reactInternals=n,vo(n,o,e,a),n=bo(null,n,o,!0,f,a)):(n.tag=0,ze&&f&&qi(n),gt(null,n,u,a),n=n.child),n;case 16:o=n.elementType;e:{switch(kl(e,n),e=n.pendingProps,u=o._init,o=u(o._payload),n.type=o,u=n.tag=c0(o),e=sn(o,e),u){case 0:n=No(null,n,o,e,a);break e;case 1:n=Id(null,n,o,e,a);break e;case 11:n=Rd(null,n,o,e,a);break e;case 14:n=Ad(null,n,o,sn(o.type,e),a);break e}throw Error(l(306,o,""))}return n;case 0:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),No(e,n,o,u,a);case 1:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),Id(e,n,o,u,a);case 3:e:{if(Md(n),e===null)throw Error(l(387));o=n.pendingProps,f=n.memoizedState,u=f.element,Ju(e,n),xl(n,o,null,a);var x=n.memoizedState;if(o=x.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){u=cs(Error(l(423)),n),n=Dd(e,n,o,a,u);break e}else if(o!==u){u=cs(Error(l(424)),n),n=Dd(e,n,o,a,u);break e}else for(It=Xn(n.stateNode.containerInfo.firstChild),Ot=n,ze=!0,rn=null,a=Yu(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ss(),o===u){n=Pn(e,n,a);break e}gt(e,n,o,a)}n=n.child}return n;case 5:return ed(n),e===null&&Ji(n),o=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,x=u.children,Hi(o,u)?x=null:f!==null&&Hi(o,f)&&(n.flags|=32),Od(e,n),gt(e,n,x,a),n.child;case 6:return e===null&&Ji(n),null;case 13:return Fd(e,n,a);case 4:return ao(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=as(n,null,o,a):gt(e,n,o,a),n.child;case 11:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),Rd(e,n,o,u,a);case 7:return gt(e,n,n.pendingProps,a),n.child;case 8:return gt(e,n,n.pendingProps.children,a),n.child;case 12:return gt(e,n,n.pendingProps.children,a),n.child;case 10:e:{if(o=n.type._context,u=n.pendingProps,f=n.memoizedProps,x=u.value,De(fl,o._currentValue),o._currentValue=x,f!==null)if(nn(f.value,x)){if(f.children===u.children&&!bt.current){n=Pn(e,n,a);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var j=f.dependencies;if(j!==null){x=f.child;for(var k=j.firstContext;k!==null;){if(k.context===o){if(f.tag===1){k=An(-1,a&-a),k.tag=2;var O=f.updateQueue;if(O!==null){O=O.shared;var $=O.pending;$===null?k.next=k:(k.next=$.next,$.next=k),O.pending=k}}f.lanes|=a,k=f.alternate,k!==null&&(k.lanes|=a),no(f.return,a,n),j.lanes|=a;break}k=k.next}}else if(f.tag===10)x=f.type===n.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(l(341));x.lanes|=a,j=x.alternate,j!==null&&(j.lanes|=a),no(x,a,n),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===n){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}gt(e,n,u.children,a),n=n.child}return n;case 9:return u=n.type,o=n.pendingProps.children,is(n,a),u=Vt(u),o=o(u),n.flags|=1,gt(e,n,o,a),n.child;case 14:return o=n.type,u=sn(o,n.pendingProps),u=sn(o.type,u),Ad(e,n,o,u,a);case 15:return Pd(e,n,n.type,n.pendingProps,a);case 17:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:sn(o,u),kl(e,n),n.tag=1,St(o)?(e=!0,il(n)):e=!1,is(n,a),bd(n,o,u),vo(n,o,u,a),bo(null,n,o,!0,e,a);case 19:return Bd(e,n,a);case 22:return Ld(e,n,a)}throw Error(l(156,n.tag))};function um(e,n){return E(e,n)}function o0(e,n,a,o){this.tag=e,this.key=a,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,n,a,o){return new o0(e,n,a,o)}function $o(e){return e=e.prototype,!(!e||!e.isReactComponent)}function c0(e){if(typeof e=="function")return $o(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ye)return 11;if(e===Z)return 14}return 2}function cr(e,n){var a=e.alternate;return a===null?(a=Kt(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function Ml(e,n,a,o,u,f){var x=2;if(o=e,typeof e=="function")$o(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case z:return Or(a.children,u,f,n);case oe:x=8,u|=8;break;case xe:return e=Kt(12,a,n,u|2),e.elementType=xe,e.lanes=f,e;case me:return e=Kt(13,a,n,u),e.elementType=me,e.lanes=f,e;case ve:return e=Kt(19,a,n,u),e.elementType=ve,e.lanes=f,e;case X:return Dl(a,u,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ne:x=10;break e;case te:x=9;break e;case ye:x=11;break e;case Z:x=14;break e;case Q:x=16,o=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return n=Kt(x,a,n,u),n.elementType=e,n.type=o,n.lanes=f,n}function Or(e,n,a,o){return e=Kt(7,e,o,n),e.lanes=a,e}function Dl(e,n,a,o){return e=Kt(22,e,o,n),e.elementType=X,e.lanes=a,e.stateNode={isHidden:!1},e}function Vo(e,n,a){return e=Kt(6,e,null,n),e.lanes=a,e}function Wo(e,n,a){return n=Kt(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function u0(e,n,a,o,u){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=gi(0),this.expirationTimes=gi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gi(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Go(e,n,a,o,u,f,x,j,k){return e=new u0(e,n,a,j,k),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Kt(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},so(f),e}function d0(e,n,a){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ae,key:o==null?null:""+o,children:e,containerInfo:n,implementation:a}}function dm(e){if(!e)return er;e=e._reactInternals;e:{if(hn(e)!==e||e.tag!==1)throw Error(l(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(St(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(l(171))}if(e.tag===1){var a=e.type;if(St(a))return Uu(e,a,n)}return n}function mm(e,n,a,o,u,f,x,j,k){return e=Go(a,o,!0,e,u,f,x,j,k),e.context=dm(null),a=e.current,o=yt(),u=ir(a),f=An(o,u),f.callback=n??null,rr(a,f,u),e.current.lanes=u,Ms(e,u,o),Ct(e,o),e}function Fl(e,n,a,o){var u=n.current,f=yt(),x=ir(u);return a=dm(a),n.context===null?n.context=a:n.pendingContext=a,n=An(f,x),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=rr(u,n,x),e!==null&&(on(e,u,x,f),pl(e,u,x)),x}function Ul(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function fm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Ko(e,n){fm(e,n),(e=e.alternate)&&fm(e,n)}function m0(){return null}var hm=typeof reportError=="function"?reportError:function(e){console.error(e)};function qo(e){this._internalRoot=e}Bl.prototype.render=qo.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(l(409));Fl(e,n,null,null)},Bl.prototype.unmount=qo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Ar(function(){Fl(null,e,null,null)}),n[En]=null}};function Bl(e){this._internalRoot=e}Bl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Jc();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Yn.length&&n!==0&&n<Yn[a].priority;a++);Yn.splice(a,0,e),a===0&&eu(e)}};function Yo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pm(){}function f0(e,n,a,o,u){if(u){if(typeof o=="function"){var f=o;o=function(){var O=Ul(x);f.call(O)}}var x=mm(n,o,e,0,null,!1,!1,"",pm);return e._reactRootContainer=x,e[En]=x.current,Qs(e.nodeType===8?e.parentNode:e),Ar(),x}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var j=o;o=function(){var O=Ul(k);j.call(O)}}var k=Go(e,0,!1,null,null,!1,!1,"",pm);return e._reactRootContainer=k,e[En]=k.current,Qs(e.nodeType===8?e.parentNode:e),Ar(function(){Fl(n,k,a,o)}),k}function Hl(e,n,a,o,u){var f=a._reactRootContainer;if(f){var x=f;if(typeof u=="function"){var j=u;u=function(){var k=Ul(x);j.call(k)}}Fl(n,x,e,u)}else x=f0(a,n,e,u,o);return Ul(x)}Yc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var a=Is(n.pendingLanes);a!==0&&(yi(n,a|1),Ct(n,Se()),(Ae&6)===0&&(ms=Se()+500,tr()))}break;case 13:Ar(function(){var o=Rn(e,1);if(o!==null){var u=yt();on(o,e,1,u)}}),Ko(e,1)}},vi=function(e){if(e.tag===13){var n=Rn(e,134217728);if(n!==null){var a=yt();on(n,e,134217728,a)}Ko(e,134217728)}},Qc=function(e){if(e.tag===13){var n=ir(e),a=Rn(e,n);if(a!==null){var o=yt();on(a,e,n,o)}Ko(e,n)}},Jc=function(){return Le},Xc=function(e,n){var a=Le;try{return Le=e,n()}finally{Le=a}},Hn=function(e,n,a){switch(n){case"input":if(xr(e,a),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var u=al(o);if(!u)throw Error(l(90));Es(o),xr(o,u)}}}break;case"textarea":$r(e,a);break;case"select":n=a.value,n!=null&&wn(e,!!a.multiple,n,!1)}},We=Bo,Sn=Ar;var h0={usingClientEntryPoint:!1,Events:[Zs,Zr,al,Ma,Da,Bo]},fa={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p0={bundleType:fa.bundleType,version:fa.version,rendererPackageName:fa.rendererPackageName,rendererConfig:fa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ba(e),e===null?null:e.stateNode},findFiberByHostInstance:fa.findFiberByHostInstance||m0,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 $l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$l.isDisabled&&$l.supportsFiber)try{Nr=$l.inject(p0),Pt=$l}catch{}}return _t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h0,_t.createPortal=function(e,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yo(n))throw Error(l(200));return d0(e,n,null,a)},_t.createRoot=function(e,n){if(!Yo(e))throw Error(l(299));var a=!1,o="",u=hm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),n=Go(e,1,!1,null,null,a,!1,o,u),e[En]=n.current,Qs(e.nodeType===8?e.parentNode:e),new qo(n)},_t.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(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=Ba(n),e=e===null?null:e.stateNode,e},_t.flushSync=function(e){return Ar(e)},_t.hydrate=function(e,n,a){if(!zl(n))throw Error(l(200));return Hl(null,e,n,!0,a)},_t.hydrateRoot=function(e,n,a){if(!Yo(e))throw Error(l(405));var o=a!=null&&a.hydratedSources||null,u=!1,f="",x=hm;if(a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),n=mm(n,null,e,1,a??null,u,!1,f,x),e[En]=n.current,Qs(e),o)for(e=0;e<o.length;e++)a=o[e],u=a._getVersion,u=u(a._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[a,u]:n.mutableSourceEagerHydrationData.push(a,u);return new Bl(n)},_t.render=function(e,n,a){if(!zl(n))throw Error(l(200));return Hl(null,e,n,!1,a)},_t.unmountComponentAtNode=function(e){if(!zl(e))throw Error(l(40));return e._reactRootContainer?(Ar(function(){Hl(null,null,e,!1,function(){e._reactRootContainer=null,e[En]=null})}),!0):!1},_t.unstable_batchedUpdates=Bo,_t.unstable_renderSubtreeIntoContainer=function(e,n,a,o){if(!zl(a))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Hl(e,n,a,!1,o)},_t.version="18.3.1-next-f1338f8080-20240426",_t}var bm;function bf(){if(bm)return Xo.exports;bm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(s){console.error(s)}}return r(),Xo.exports=S0(),Xo.exports}var Sm;function k0(){if(Sm)return Vl;Sm=1;var r=bf();return Vl.createRoot=r.createRoot,Vl.hydrateRoot=r.hydrateRoot,Vl}var E0=k0(),w=kc();const Sf=y0(w),C0=g0({__proto__:null,default:Sf},[w]);bf();function ba(){return ba=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},ba.apply(this,arguments)}var dr;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(dr||(dr={}));const km="popstate";function _0(r){r===void 0&&(r={});function s(i,c){let{pathname:d,search:m,hash:p}=i.location;return mc("",{pathname:d,search:m,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function l(i,c){return typeof c=="string"?c:Xl(c)}return R0(s,l,null,r)}function Qe(r,s){if(r===!1||r===null||typeof r>"u")throw new Error(s)}function Ec(r,s){if(!r){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function T0(){return Math.random().toString(36).substr(2,8)}function Em(r,s){return{usr:r.state,key:r.key,idx:s}}function mc(r,s,l,i){return l===void 0&&(l=null),ba({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof s=="string"?ws(s):s,{state:l,key:s&&s.key||i||T0()})}function Xl(r){let{pathname:s="/",search:l="",hash:i=""}=r;return l&&l!=="?"&&(s+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(s+=i.charAt(0)==="#"?i:"#"+i),s}function ws(r){let s={};if(r){let l=r.indexOf("#");l>=0&&(s.hash=r.substr(l),r=r.substr(0,l));let i=r.indexOf("?");i>=0&&(s.search=r.substr(i),r=r.substr(0,i)),r&&(s.pathname=r)}return s}function R0(r,s,l,i){i===void 0&&(i={});let{window:c=document.defaultView,v5Compat:d=!1}=i,m=c.history,p=dr.Pop,h=null,g=v();g==null&&(g=0,m.replaceState(ba({},m.state,{idx:g}),""));function v(){return(m.state||{idx:null}).idx}function y(){p=dr.Pop;let b=v(),U=b==null?null:b-g;g=b,h&&h({action:p,location:_.location,delta:U})}function C(b,U){p=dr.Push;let R=mc(_.location,b,U);g=v()+1;let M=Em(R,g),P=_.createHref(R);try{m.pushState(M,"",P)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;c.location.assign(P)}d&&h&&h({action:p,location:_.location,delta:1})}function F(b,U){p=dr.Replace;let R=mc(_.location,b,U);g=v();let M=Em(R,g),P=_.createHref(R);m.replaceState(M,"",P),d&&h&&h({action:p,location:_.location,delta:0})}function N(b){let U=c.location.origin!=="null"?c.location.origin:c.location.href,R=typeof b=="string"?b:Xl(b);return R=R.replace(/ $/,"%20"),Qe(U,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,U)}let _={get action(){return p},get location(){return r(c,m)},listen(b){if(h)throw new Error("A history only accepts one active listener");return c.addEventListener(km,y),h=b,()=>{c.removeEventListener(km,y),h=null}},createHref(b){return s(c,b)},createURL:N,encodeLocation(b){let U=N(b);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:C,replace:F,go(b){return m.go(b)}};return _}var Cm;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Cm||(Cm={}));function A0(r,s,l){return l===void 0&&(l="/"),P0(r,s,l)}function P0(r,s,l,i){let c=typeof s=="string"?ws(s):s,d=Cc(c.pathname||"/",l);if(d==null)return null;let m=kf(r);L0(m);let p=null;for(let h=0;p==null&&h<m.length;++h){let g=W0(d);p=H0(m[h],g)}return p}function kf(r,s,l,i){s===void 0&&(s=[]),l===void 0&&(l=[]),i===void 0&&(i="");let c=(d,m,p)=>{let h={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};h.relativePath.startsWith("/")&&(Qe(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let g=mr([i,h.relativePath]),v=l.concat(h);d.children&&d.children.length>0&&(Qe(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),kf(d.children,s,v,g)),!(d.path==null&&!d.index)&&s.push({path:g,score:B0(g,d.index),routesMeta:v})};return r.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))c(d,m);else for(let h of Ef(d.path))c(d,m,h)}),s}function Ef(r){let s=r.split("/");if(s.length===0)return[];let[l,...i]=s,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(i.length===0)return c?[d,""]:[d];let m=Ef(i.join("/")),p=[];return p.push(...m.map(h=>h===""?d:[d,h].join("/"))),c&&p.push(...m),p.map(h=>r.startsWith("/")&&h===""?"/":h)}function L0(r){r.sort((s,l)=>s.score!==l.score?l.score-s.score:z0(s.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}const O0=/^:[\w-]+$/,I0=3,M0=2,D0=1,F0=10,U0=-2,_m=r=>r==="*";function B0(r,s){let l=r.split("/"),i=l.length;return l.some(_m)&&(i+=U0),s&&(i+=M0),l.filter(c=>!_m(c)).reduce((c,d)=>c+(O0.test(d)?I0:d===""?D0:F0),i)}function z0(r,s){return r.length===s.length&&r.slice(0,-1).every((i,c)=>i===s[c])?r[r.length-1]-s[s.length-1]:0}function H0(r,s,l){let{routesMeta:i}=r,c={},d="/",m=[];for(let p=0;p<i.length;++p){let h=i[p],g=p===i.length-1,v=d==="/"?s:s.slice(d.length)||"/",y=$0({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},v),C=h.route;if(!y)return null;Object.assign(c,y.params),m.push({params:c,pathname:mr([d,y.pathname]),pathnameBase:Q0(mr([d,y.pathnameBase])),route:C}),y.pathnameBase!=="/"&&(d=mr([d,y.pathnameBase]))}return m}function $0(r,s){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[l,i]=V0(r.path,r.caseSensitive,r.end),c=s.match(l);if(!c)return null;let d=c[0],m=d.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:i.reduce((g,v,y)=>{let{paramName:C,isOptional:F}=v;if(C==="*"){let _=p[y]||"";m=d.slice(0,d.length-_.length).replace(/(.)\/+$/,"$1")}const N=p[y];return F&&!N?g[C]=void 0:g[C]=(N||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:m,pattern:r}}function V0(r,s,l){s===void 0&&(s=!1),l===void 0&&(l=!0),Ec(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let i=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,p,h)=>(i.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(i.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),i]}function W0(r){try{return r.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Ec(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+s+").")),r}}function Cc(r,s){if(s==="/")return r;if(!r.toLowerCase().startsWith(s.toLowerCase()))return null;let l=s.endsWith("/")?s.length-1:s.length,i=r.charAt(l);return i&&i!=="/"?null:r.slice(l)||"/"}const G0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,K0=r=>G0.test(r);function q0(r,s){s===void 0&&(s="/");let{pathname:l,search:i="",hash:c=""}=typeof r=="string"?ws(r):r,d;if(l)if(K0(l))d=l;else{if(l.includes("//")){let m=l;l=l.replace(/\/\/+/g,"/"),Ec(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+l))}l.startsWith("/")?d=Tm(l.substring(1),"/"):d=Tm(l,s)}else d=s;return{pathname:d,search:J0(i),hash:X0(c)}}function Tm(r,s){let l=s.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function tc(r,s,l,i){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+s+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+l+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Y0(r){return r.filter((s,l)=>l===0||s.route.path&&s.route.path.length>0)}function _c(r,s){let l=Y0(r);return s?l.map((i,c)=>c===l.length-1?i.pathname:i.pathnameBase):l.map(i=>i.pathnameBase)}function Tc(r,s,l,i){i===void 0&&(i=!1);let c;typeof r=="string"?c=ws(r):(c=ba({},r),Qe(!c.pathname||!c.pathname.includes("?"),tc("?","pathname","search",c)),Qe(!c.pathname||!c.pathname.includes("#"),tc("#","pathname","hash",c)),Qe(!c.search||!c.search.includes("#"),tc("#","search","hash",c)));let d=r===""||c.pathname==="",m=d?"/":c.pathname,p;if(m==null)p=l;else{let y=s.length-1;if(!i&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),y-=1;c.pathname=C.join("/")}p=y>=0?s[y]:"/"}let h=q0(c,p),g=m&&m!=="/"&&m.endsWith("/"),v=(d||m===".")&&l.endsWith("/");return!h.pathname.endsWith("/")&&(g||v)&&(h.pathname+="/"),h}const mr=r=>r.join("/").replace(/\/\/+/g,"/"),Q0=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),J0=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,X0=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function Z0(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const Cf=["post","put","patch","delete"];new Set(Cf);const ex=["get",...Cf];new Set(ex);function Sa(){return Sa=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Sa.apply(this,arguments)}const Rc=w.createContext(null),tx=w.createContext(null),hr=w.createContext(null),si=w.createContext(null),In=w.createContext({outlet:null,matches:[],isDataRoute:!1}),_f=w.createContext(null);function nx(r,s){let{relative:l}=s===void 0?{}:s;Ns()||Qe(!1);let{basename:i,navigator:c}=w.useContext(hr),{hash:d,pathname:m,search:p}=Rf(r,{relative:l}),h=m;return i!=="/"&&(h=m==="/"?i:mr([i,m])),c.createHref({pathname:h,search:p,hash:d})}function Ns(){return w.useContext(si)!=null}function bs(){return Ns()||Qe(!1),w.useContext(si).location}function Tf(r){w.useContext(hr).static||w.useLayoutEffect(r)}function Ac(){let{isDataRoute:r}=w.useContext(In);return r?xx():rx()}function rx(){Ns()||Qe(!1);let r=w.useContext(Rc),{basename:s,future:l,navigator:i}=w.useContext(hr),{matches:c}=w.useContext(In),{pathname:d}=bs(),m=JSON.stringify(_c(c,l.v7_relativeSplatPath)),p=w.useRef(!1);return Tf(()=>{p.current=!0}),w.useCallback(function(g,v){if(v===void 0&&(v={}),!p.current)return;if(typeof g=="number"){i.go(g);return}let y=Tc(g,JSON.parse(m),d,v.relative==="path");r==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:mr([s,y.pathname])),(v.replace?i.replace:i.push)(y,v.state,v)},[s,i,m,d,r])}function sx(){let{matches:r}=w.useContext(In),s=r[r.length-1];return s?s.params:{}}function Rf(r,s){let{relative:l}=s===void 0?{}:s,{future:i}=w.useContext(hr),{matches:c}=w.useContext(In),{pathname:d}=bs(),m=JSON.stringify(_c(c,i.v7_relativeSplatPath));return w.useMemo(()=>Tc(r,JSON.parse(m),d,l==="path"),[r,m,d,l])}function ax(r,s){return lx(r,s)}function lx(r,s,l,i){Ns()||Qe(!1);let{navigator:c}=w.useContext(hr),{matches:d}=w.useContext(In),m=d[d.length-1],p=m?m.params:{};m&&m.pathname;let h=m?m.pathnameBase:"/";m&&m.route;let g=bs(),v;if(s){var y;let b=typeof s=="string"?ws(s):s;h==="/"||(y=b.pathname)!=null&&y.startsWith(h)||Qe(!1),v=b}else v=g;let C=v.pathname||"/",F=C;if(h!=="/"){let b=h.replace(/^\//,"").split("/");F="/"+C.replace(/^\//,"").split("/").slice(b.length).join("/")}let N=A0(r,{pathname:F}),_=dx(N&&N.map(b=>Object.assign({},b,{params:Object.assign({},p,b.params),pathname:mr([h,c.encodeLocation?c.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?h:mr([h,c.encodeLocation?c.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),d,l,i);return s&&_?w.createElement(si.Provider,{value:{location:Sa({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:dr.Pop}},_):_}function ix(){let r=px(),s=Z0(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),l=r instanceof Error?r.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},s),l?w.createElement("pre",{style:c},l):null,null)}const ox=w.createElement(ix,null);class cx extends w.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,l){return l.location!==s.location||l.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:l.error,location:l.location,revalidation:s.revalidation||l.revalidation}}componentDidCatch(s,l){console.error("React Router caught the following error during render",s,l)}render(){return this.state.error!==void 0?w.createElement(In.Provider,{value:this.props.routeContext},w.createElement(_f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ux(r){let{routeContext:s,match:l,children:i}=r,c=w.useContext(Rc);return c&&c.static&&c.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=l.route.id),w.createElement(In.Provider,{value:s},i)}function dx(r,s,l,i){var c;if(s===void 0&&(s=[]),l===void 0&&(l=null),i===void 0&&(i=null),r==null){var d;if(!l)return null;if(l.errors)r=l.matches;else if((d=i)!=null&&d.v7_partialHydration&&s.length===0&&!l.initialized&&l.matches.length>0)r=l.matches;else return null}let m=r,p=(c=l)==null?void 0:c.errors;if(p!=null){let v=m.findIndex(y=>y.route.id&&p?.[y.route.id]!==void 0);v>=0||Qe(!1),m=m.slice(0,Math.min(m.length,v+1))}let h=!1,g=-1;if(l&&i&&i.v7_partialHydration)for(let v=0;v<m.length;v++){let y=m[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=v),y.route.id){let{loaderData:C,errors:F}=l,N=y.route.loader&&C[y.route.id]===void 0&&(!F||F[y.route.id]===void 0);if(y.route.lazy||N){h=!0,g>=0?m=m.slice(0,g+1):m=[m[0]];break}}}return m.reduceRight((v,y,C)=>{let F,N=!1,_=null,b=null;l&&(F=p&&y.route.id?p[y.route.id]:void 0,_=y.route.errorElement||ox,h&&(g<0&&C===0?(gx("route-fallback"),N=!0,b=null):g===C&&(N=!0,b=y.route.hydrateFallbackElement||null)));let U=s.concat(m.slice(0,C+1)),R=()=>{let M;return F?M=_:N?M=b:y.route.Component?M=w.createElement(y.route.Component,null):y.route.element?M=y.route.element:M=v,w.createElement(ux,{match:y,routeContext:{outlet:v,matches:U,isDataRoute:l!=null},children:M})};return l&&(y.route.ErrorBoundary||y.route.errorElement||C===0)?w.createElement(cx,{location:l.location,revalidation:l.revalidation,component:_,error:F,children:R(),routeContext:{outlet:null,matches:U,isDataRoute:!0}}):R()},null)}var Af=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(Af||{}),Pf=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(Pf||{});function mx(r){let s=w.useContext(Rc);return s||Qe(!1),s}function fx(r){let s=w.useContext(tx);return s||Qe(!1),s}function hx(r){let s=w.useContext(In);return s||Qe(!1),s}function Lf(r){let s=hx(),l=s.matches[s.matches.length-1];return l.route.id||Qe(!1),l.route.id}function px(){var r;let s=w.useContext(_f),l=fx(),i=Lf();return s!==void 0?s:(r=l.errors)==null?void 0:r[i]}function xx(){let{router:r}=mx(Af.UseNavigateStable),s=Lf(Pf.UseNavigateStable),l=w.useRef(!1);return Tf(()=>{l.current=!0}),w.useCallback(function(c,d){d===void 0&&(d={}),l.current&&(typeof c=="number"?r.navigate(c):r.navigate(c,Sa({fromRouteId:s},d)))},[r,s])}const Rm={};function gx(r,s,l){Rm[r]||(Rm[r]=!0)}function yx(r,s){r?.v7_startTransition,r?.v7_relativeSplatPath}function vx(r){let{to:s,replace:l,state:i,relative:c}=r;Ns()||Qe(!1);let{future:d,static:m}=w.useContext(hr),{matches:p}=w.useContext(In),{pathname:h}=bs(),g=Ac(),v=Tc(s,_c(p,d.v7_relativeSplatPath),h,c==="path"),y=JSON.stringify(v);return w.useEffect(()=>g(JSON.parse(y),{replace:l,state:i,relative:c}),[g,y,c,l,i]),null}function gs(r){Qe(!1)}function jx(r){let{basename:s="/",children:l=null,location:i,navigationType:c=dr.Pop,navigator:d,static:m=!1,future:p}=r;Ns()&&Qe(!1);let h=s.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:h,navigator:d,static:m,future:Sa({v7_relativeSplatPath:!1},p)}),[h,p,d,m]);typeof i=="string"&&(i=ws(i));let{pathname:v="/",search:y="",hash:C="",state:F=null,key:N="default"}=i,_=w.useMemo(()=>{let b=Cc(v,h);return b==null?null:{location:{pathname:b,search:y,hash:C,state:F,key:N},navigationType:c}},[h,v,y,C,F,N,c]);return _==null?null:w.createElement(hr.Provider,{value:g},w.createElement(si.Provider,{children:l,value:_}))}function Of(r){let{children:s,location:l}=r;return ax(fc(s),l)}new Promise(()=>{});function fc(r,s){s===void 0&&(s=[]);let l=[];return w.Children.forEach(r,(i,c)=>{if(!w.isValidElement(i))return;let d=[...s,c];if(i.type===w.Fragment){l.push.apply(l,fc(i.props.children,d));return}i.type!==gs&&Qe(!1),!i.props.index||!i.props.children||Qe(!1);let m={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(m.children=fc(i.props.children,d)),l.push(m)}),l}function hc(){return hc=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},hc.apply(this,arguments)}function wx(r,s){if(r==null)return{};var l={},i=Object.keys(r),c,d;for(d=0;d<i.length;d++)c=i[d],!(s.indexOf(c)>=0)&&(l[c]=r[c]);return l}function Nx(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function bx(r,s){return r.button===0&&(!s||s==="_self")&&!Nx(r)}const Sx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],kx="6";try{window.__reactRouterVersion=kx}catch{}const Ex="startTransition",Am=C0[Ex];function Cx(r){let{basename:s,children:l,future:i,window:c}=r,d=w.useRef();d.current==null&&(d.current=_0({window:c,v5Compat:!0}));let m=d.current,[p,h]=w.useState({action:m.action,location:m.location}),{v7_startTransition:g}=i||{},v=w.useCallback(y=>{g&&Am?Am(()=>h(y)):h(y)},[h,g]);return w.useLayoutEffect(()=>m.listen(v),[m,v]),w.useEffect(()=>yx(i),[i]),w.createElement(jx,{basename:s,children:l,location:p.location,navigationType:p.action,navigator:m,future:i})}const _x=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,On=w.forwardRef(function(s,l){let{onClick:i,relative:c,reloadDocument:d,replace:m,state:p,target:h,to:g,preventScrollReset:v,viewTransition:y}=s,C=wx(s,Sx),{basename:F}=w.useContext(hr),N,_=!1;if(typeof g=="string"&&Tx.test(g)&&(N=g,_x))try{let M=new URL(window.location.href),P=g.startsWith("//")?new URL(M.protocol+g):new URL(g),W=Cc(P.pathname,F);P.origin===M.origin&&W!=null?g=W+P.search+P.hash:_=!0}catch{}let b=nx(g,{relative:c}),U=Rx(g,{replace:m,state:p,target:h,preventScrollReset:v,relative:c,viewTransition:y});function R(M){i&&i(M),M.defaultPrevented||U(M)}return w.createElement("a",hc({},C,{href:N||b,onClick:_||d?i:R,ref:l,target:h}))});var Pm;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Pm||(Pm={}));var Lm;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(Lm||(Lm={}));function Rx(r,s){let{target:l,replace:i,state:c,preventScrollReset:d,relative:m,viewTransition:p}=s===void 0?{}:s,h=Ac(),g=bs(),v=Rf(r,{relative:m});return w.useCallback(y=>{if(bx(y,l)){y.preventDefault();let C=i!==void 0?i:Xl(g)===Xl(v);h(r,{replace:C,state:c,preventScrollReset:d,relative:m,viewTransition:p})}},[g,h,v,i,c,l,r,d,m,p])}const If=[{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 independent engine",protected:!0},{path:"/independent-release",name:"independent-release",component:"IndependentReleaseManagerPage",title:"Independent Release",description:"New release system independent of Changesets",protected:!0},{path:"/ci",name:"ci",component:"CIIntegration",title:"CI/CD",description:"Continuous integration and deployment"},{path:"/pipeline",name:"pipeline",component:"Pipeline",title:"Release Pipeline",description:"Real-time release pipeline monitoring and management",protected:!0},{path:"/config",name:"config",component:"ConfigInspector",title:"Configuration",description:"Configuration file inspector"}];If.filter(r=>!r.path.includes(":")&&r.path!=="/");const pe="w-6 h-6",Ax=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ut=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),ai=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),Ss=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Px=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})]}),Lx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ox=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),li=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Pc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18"})}),Mf=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3"})}),Ix=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),Om=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5L15.75 12l-7.5 7.5"})}),wa=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}),Mx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),At=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Dt=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ca=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})}),_a=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Lc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Df=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Dx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),ii=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Oc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Zl=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ic=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Fx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ux=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Mc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Ff=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),He=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),oi=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Mn=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Dc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),ci=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),ys=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),lt=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),fr=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Uf=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})]}),Fr=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})]}),Bx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Im=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Mm=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),zx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Hx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),$x=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),pc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Vx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Wx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,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"})}),Gx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}),Kx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})}),qx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})}),Yx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,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"})}),xc={LOGIN_SUCCESS:"Login successful! Redirecting...",LOGIN_FAILED:"Login failed",LOGOUT_SUCCESS:"You have been logged out",SESSION_EXPIRED:"Your session has expired. Please login again.",AUTH_FAILED:"Authentication failed"},Bf={QUOTA_EXHAUSTED:"GitHub API quota exhausted",QUOTA_RESET:r=>`GitHub API quota exhausted. The limit will reset at ${r}. Please try again later.`,APPROACHING_LIMIT:(r,s)=>`GitHub API quota running low: ${r}/${s} requests remaining`},Ce={UNKNOWN_ERROR:"Unknown error occurred",NETWORK_ERROR:"Network error. Please check your connection.",FAILED_TO_FETCH_PACKAGES:"Failed to fetch workspace packages",FAILED_TO_FETCH_WORKFLOWS:"Failed to fetch workflows",FAILED_TO_TRIGGER_WORKFLOW:"Failed to trigger workflow",FAILED_TO_CANCEL_RUN:"Failed to cancel workflow run",FAILED_TO_RERUN_WORKFLOW:"Failed to rerun workflow",FAILED_TO_FETCH_LOGS:"Failed to fetch job logs",PERMISSION_ERROR:"Permission denied",AUTHENTICATION_ERROR:"Authentication error",FAILED_TO_FETCH_USER_INFO:"Failed to fetch user info",FAILED_TO_REFRESH_SESSION:"Failed to refresh session",FAILED_TO_CHECK_PERMISSION:"Failed to check permission",FAILED_TO_CHECK_ACTION_PERMISSION:"Failed to check action permission",VALIDATION_FAILED:"Validation failed",FAILED_TO_CREATE_CHANGESET:"Failed to create changeset",FAILED_TO_TRIGGER_PUBLISH:"Failed to trigger publish",FAILED_TO_SAVE_CONFIG:"Failed to save configuration"},Qx="Describe the changes in this release (e.g., 'Add new API endpoints for user management')",Jx="Summary must be at least 10 characters";var Dm={};const Xx="localhost",Zx=8999,eg=3e4,tg=6e4,zf=Dm.REACT_APP_API_URL||Dm.VITE_API_URL||`http://${Xx}:${Zx}`,Te={AUTH:{LOGIN:"/auth/login",CALLBACK:"/auth/callback",ME:"/auth/me",VALIDATE:"/auth/validate",LOGOUT:"/auth/logout",REFRESH:"/auth/refresh"},PACKAGES:{REFRESH:"/packages/refresh",UPDATE_CONFIG:"/packages/update-config",LIST:"/packages",DETAILS:r=>`/packages/${encodeURIComponent(r)}`},PIPELINES:{LIST:"/pipelines",STATUS:r=>`/pipelines/${r}/status`},PUBLISH:{PREVIEW:"/publish/preview",STATUS:"/publish/status",PACKAGES:"/publish/packages",CHANGESETS:"/publish/changesets",CREATE_CHANGESET:"/publish/changesets/create",TRIGGER:"/publish/trigger"},CONFIG:{FILES:"/config/files",FILE:r=>`/config/files/${encodeURIComponent(r)}`},HEALTH:{PACKAGES:"/health/packages",REFRESH:"/health/refresh"},WORKFLOWS:{LIST:(r,s)=>`/workflows/${r}/${s}`,AVAILABLE:(r,s)=>`/workflows/${r}/${s}/available`,BY_PACKAGE:(r,s,l)=>`/workflows/package/${r}/${s}/${encodeURIComponent(l)}`,RUNS:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}`,LOGS:(r,s,l)=>`/workflows/${r}/${s}/jobs/${l}/logs`,TRIGGER:(r,s)=>`/workflows/${r}/${s}/trigger`,CANCEL:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}/cancel`,RERUN:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}/rerun`}};function Hf(r,s){return function(){return r.apply(s,arguments)}}const{toString:ng}=Object.prototype,{getPrototypeOf:Fc}=Object,{iterator:ui,toStringTag:$f}=Symbol,di=(r=>s=>{const l=ng.call(s);return r[l]||(r[l]=l.slice(8,-1).toLowerCase())})(Object.create(null)),un=r=>(r=r.toLowerCase(),s=>di(s)===r),mi=r=>s=>typeof s===r,{isArray:ks}=Array,vs=mi("undefined");function Ta(r){return r!==null&&!vs(r)&&r.constructor!==null&&!vs(r.constructor)&&Tt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Vf=un("ArrayBuffer");function rg(r){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(r):s=r&&r.buffer&&Vf(r.buffer),s}const sg=mi("string"),Tt=mi("function"),Wf=mi("number"),Ra=r=>r!==null&&typeof r=="object",ag=r=>r===!0||r===!1,ql=r=>{if(di(r)!=="object")return!1;const s=Fc(r);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!($f in r)&&!(ui in r)},lg=r=>{if(!Ra(r)||Ta(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},ig=un("Date"),og=un("File"),cg=un("Blob"),ug=un("FileList"),dg=r=>Ra(r)&&Tt(r.pipe),mg=r=>{let s;return r&&(typeof FormData=="function"&&r instanceof FormData||Tt(r.append)&&((s=di(r))==="formdata"||s==="object"&&Tt(r.toString)&&r.toString()==="[object FormData]"))},fg=un("URLSearchParams"),[hg,pg,xg,gg]=["ReadableStream","Request","Response","Headers"].map(un),yg=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Aa(r,s,{allOwnKeys:l=!1}={}){if(r===null||typeof r>"u")return;let i,c;if(typeof r!="object"&&(r=[r]),ks(r))for(i=0,c=r.length;i<c;i++)s.call(null,r[i],i,r);else{if(Ta(r))return;const d=l?Object.getOwnPropertyNames(r):Object.keys(r),m=d.length;let p;for(i=0;i<m;i++)p=d[i],s.call(null,r[p],p,r)}}function Gf(r,s){if(Ta(r))return null;s=s.toLowerCase();const l=Object.keys(r);let i=l.length,c;for(;i-- >0;)if(c=l[i],s===c.toLowerCase())return c;return null}const Mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kf=r=>!vs(r)&&r!==Mr;function gc(){const{caseless:r,skipUndefined:s}=Kf(this)&&this||{},l={},i=(c,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const m=r&&Gf(l,d)||d;ql(l[m])&&ql(c)?l[m]=gc(l[m],c):ql(c)?l[m]=gc({},c):ks(c)?l[m]=c.slice():(!s||!vs(c))&&(l[m]=c)};for(let c=0,d=arguments.length;c<d;c++)arguments[c]&&Aa(arguments[c],i);return l}const vg=(r,s,l,{allOwnKeys:i}={})=>(Aa(s,(c,d)=>{l&&Tt(c)?Object.defineProperty(r,d,{value:Hf(c,l),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,d,{value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),r),jg=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),wg=(r,s,l,i)=>{r.prototype=Object.create(s.prototype,i),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:s.prototype}),l&&Object.assign(r.prototype,l)},Ng=(r,s,l,i)=>{let c,d,m;const p={};if(s=s||{},r==null)return s;do{for(c=Object.getOwnPropertyNames(r),d=c.length;d-- >0;)m=c[d],(!i||i(m,r,s))&&!p[m]&&(s[m]=r[m],p[m]=!0);r=l!==!1&&Fc(r)}while(r&&(!l||l(r,s))&&r!==Object.prototype);return s},bg=(r,s,l)=>{r=String(r),(l===void 0||l>r.length)&&(l=r.length),l-=s.length;const i=r.indexOf(s,l);return i!==-1&&i===l},Sg=r=>{if(!r)return null;if(ks(r))return r;let s=r.length;if(!Wf(s))return null;const l=new Array(s);for(;s-- >0;)l[s]=r[s];return l},kg=(r=>s=>r&&s instanceof r)(typeof Uint8Array<"u"&&Fc(Uint8Array)),Eg=(r,s)=>{const i=(r&&r[ui]).call(r);let c;for(;(c=i.next())&&!c.done;){const d=c.value;s.call(r,d[0],d[1])}},Cg=(r,s)=>{let l;const i=[];for(;(l=r.exec(s))!==null;)i.push(l);return i},_g=un("HTMLFormElement"),Tg=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(l,i,c){return i.toUpperCase()+c}),Fm=(({hasOwnProperty:r})=>(s,l)=>r.call(s,l))(Object.prototype),Rg=un("RegExp"),qf=(r,s)=>{const l=Object.getOwnPropertyDescriptors(r),i={};Aa(l,(c,d)=>{let m;(m=s(c,d,r))!==!1&&(i[d]=m||c)}),Object.defineProperties(r,i)},Ag=r=>{qf(r,(s,l)=>{if(Tt(r)&&["arguments","caller","callee"].indexOf(l)!==-1)return!1;const i=r[l];if(Tt(i)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+l+"'")})}})},Pg=(r,s)=>{const l={},i=c=>{c.forEach(d=>{l[d]=!0})};return ks(r)?i(r):i(String(r).split(s)),l},Lg=()=>{},Og=(r,s)=>r!=null&&Number.isFinite(r=+r)?r:s;function Ig(r){return!!(r&&Tt(r.append)&&r[$f]==="FormData"&&r[ui])}const Mg=r=>{const s=new Array(10),l=(i,c)=>{if(Ra(i)){if(s.indexOf(i)>=0)return;if(Ta(i))return i;if(!("toJSON"in i)){s[c]=i;const d=ks(i)?[]:{};return Aa(i,(m,p)=>{const h=l(m,c+1);!vs(h)&&(d[p]=h)}),s[c]=void 0,d}}return i};return l(r,0)},Dg=un("AsyncFunction"),Fg=r=>r&&(Ra(r)||Tt(r))&&Tt(r.then)&&Tt(r.catch),Yf=((r,s)=>r?setImmediate:s?((l,i)=>(Mr.addEventListener("message",({source:c,data:d})=>{c===Mr&&d===l&&i.length&&i.shift()()},!1),c=>{i.push(c),Mr.postMessage(l,"*")}))(`axios@${Math.random()}`,[]):l=>setTimeout(l))(typeof setImmediate=="function",Tt(Mr.postMessage)),Ug=typeof queueMicrotask<"u"?queueMicrotask.bind(Mr):typeof process<"u"&&process.nextTick||Yf,Bg=r=>r!=null&&Tt(r[ui]),I={isArray:ks,isArrayBuffer:Vf,isBuffer:Ta,isFormData:mg,isArrayBufferView:rg,isString:sg,isNumber:Wf,isBoolean:ag,isObject:Ra,isPlainObject:ql,isEmptyObject:lg,isReadableStream:hg,isRequest:pg,isResponse:xg,isHeaders:gg,isUndefined:vs,isDate:ig,isFile:og,isBlob:cg,isRegExp:Rg,isFunction:Tt,isStream:dg,isURLSearchParams:fg,isTypedArray:kg,isFileList:ug,forEach:Aa,merge:gc,extend:vg,trim:yg,stripBOM:jg,inherits:wg,toFlatObject:Ng,kindOf:di,kindOfTest:un,endsWith:bg,toArray:Sg,forEachEntry:Eg,matchAll:Cg,isHTMLForm:_g,hasOwnProperty:Fm,hasOwnProp:Fm,reduceDescriptors:qf,freezeMethods:Ag,toObjectSet:Pg,toCamelCase:Tg,noop:Lg,toFiniteNumber:Og,findKey:Gf,global:Mr,isContextDefined:Kf,isSpecCompliantForm:Ig,toJSONObject:Mg,isAsyncFn:Dg,isThenable:Fg,setImmediate:Yf,asap:Ug,isIterable:Bg};let ge=class Qf extends Error{static from(s,l,i,c,d,m){const p=new Qf(s.message,l||s.code,i,c,d);return p.cause=s,p.name=s.name,m&&Object.assign(p,m),p}constructor(s,l,i,c,d){super(s),this.name="AxiosError",this.isAxiosError=!0,l&&(this.code=l),i&&(this.config=i),c&&(this.request=c),d&&(this.response=d,this.status=d.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}};ge.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ge.ERR_BAD_OPTION="ERR_BAD_OPTION";ge.ECONNABORTED="ECONNABORTED";ge.ETIMEDOUT="ETIMEDOUT";ge.ERR_NETWORK="ERR_NETWORK";ge.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ge.ERR_DEPRECATED="ERR_DEPRECATED";ge.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ge.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ge.ERR_CANCELED="ERR_CANCELED";ge.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ge.ERR_INVALID_URL="ERR_INVALID_URL";const zg=null;function yc(r){return I.isPlainObject(r)||I.isArray(r)}function Jf(r){return I.endsWith(r,"[]")?r.slice(0,-2):r}function Um(r,s,l){return r?r.concat(s).map(function(c,d){return c=Jf(c),!l&&d?"["+c+"]":c}).join(l?".":""):s}function Hg(r){return I.isArray(r)&&!r.some(yc)}const $g=I.toFlatObject(I,{},null,function(s){return/^is[A-Z]/.test(s)});function fi(r,s,l){if(!I.isObject(r))throw new TypeError("target must be an object");s=s||new FormData,l=I.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,b){return!I.isUndefined(b[_])});const i=l.metaTokens,c=l.visitor||v,d=l.dots,m=l.indexes,h=(l.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(s);if(!I.isFunction(c))throw new TypeError("visitor must be a function");function g(N){if(N===null)return"";if(I.isDate(N))return N.toISOString();if(I.isBoolean(N))return N.toString();if(!h&&I.isBlob(N))throw new ge("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(N)||I.isTypedArray(N)?h&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function v(N,_,b){let U=N;if(N&&!b&&typeof N=="object"){if(I.endsWith(_,"{}"))_=i?_:_.slice(0,-2),N=JSON.stringify(N);else if(I.isArray(N)&&Hg(N)||(I.isFileList(N)||I.endsWith(_,"[]"))&&(U=I.toArray(N)))return _=Jf(_),U.forEach(function(M,P){!(I.isUndefined(M)||M===null)&&s.append(m===!0?Um([_],P,d):m===null?_:_+"[]",g(M))}),!1}return yc(N)?!0:(s.append(Um(b,_,d),g(N)),!1)}const y=[],C=Object.assign($g,{defaultVisitor:v,convertValue:g,isVisitable:yc});function F(N,_){if(!I.isUndefined(N)){if(y.indexOf(N)!==-1)throw Error("Circular reference detected in "+_.join("."));y.push(N),I.forEach(N,function(U,R){(!(I.isUndefined(U)||U===null)&&c.call(s,U,I.isString(R)?R.trim():R,_,C))===!0&&F(U,_?_.concat(R):[R])}),y.pop()}}if(!I.isObject(r))throw new TypeError("data must be an object");return F(r),s}function Bm(r){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return s[i]})}function Uc(r,s){this._pairs=[],r&&fi(r,this,s)}const Xf=Uc.prototype;Xf.append=function(s,l){this._pairs.push([s,l])};Xf.toString=function(s){const l=s?function(i){return s.call(this,i,Bm)}:Bm;return this._pairs.map(function(c){return l(c[0])+"="+l(c[1])},"").join("&")};function Vg(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zf(r,s,l){if(!s)return r;const i=l&&l.encode||Vg,c=I.isFunction(l)?{serialize:l}:l,d=c&&c.serialize;let m;if(d?m=d(s,c):m=I.isURLSearchParams(s)?s.toString():new Uc(s,c).toString(i),m){const p=r.indexOf("#");p!==-1&&(r=r.slice(0,p)),r+=(r.indexOf("?")===-1?"?":"&")+m}return r}class zm{constructor(){this.handlers=[]}use(s,l,i){return this.handlers.push({fulfilled:s,rejected:l,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){I.forEach(this.handlers,function(i){i!==null&&s(i)})}}const Bc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Wg=typeof URLSearchParams<"u"?URLSearchParams:Uc,Gg=typeof FormData<"u"?FormData:null,Kg=typeof Blob<"u"?Blob:null,qg={isBrowser:!0,classes:{URLSearchParams:Wg,FormData:Gg,Blob:Kg},protocols:["http","https","file","blob","url","data"]},zc=typeof window<"u"&&typeof document<"u",vc=typeof navigator=="object"&&navigator||void 0,Yg=zc&&(!vc||["ReactNative","NativeScript","NS"].indexOf(vc.product)<0),Qg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jg=zc&&window.location.href||"http://localhost",Xg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zc,hasStandardBrowserEnv:Yg,hasStandardBrowserWebWorkerEnv:Qg,navigator:vc,origin:Jg},Symbol.toStringTag,{value:"Module"})),pt={...Xg,...qg};function Zg(r,s){return fi(r,new pt.classes.URLSearchParams,{visitor:function(l,i,c,d){return pt.isNode&&I.isBuffer(l)?(this.append(i,l.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...s})}function ey(r){return I.matchAll(/\w+|\[(\w*)]/g,r).map(s=>s[0]==="[]"?"":s[1]||s[0])}function ty(r){const s={},l=Object.keys(r);let i;const c=l.length;let d;for(i=0;i<c;i++)d=l[i],s[d]=r[d];return s}function eh(r){function s(l,i,c,d){let m=l[d++];if(m==="__proto__")return!0;const p=Number.isFinite(+m),h=d>=l.length;return m=!m&&I.isArray(c)?c.length:m,h?(I.hasOwnProp(c,m)?c[m]=[c[m],i]:c[m]=i,!p):((!c[m]||!I.isObject(c[m]))&&(c[m]=[]),s(l,i,c[m],d)&&I.isArray(c[m])&&(c[m]=ty(c[m])),!p)}if(I.isFormData(r)&&I.isFunction(r.entries)){const l={};return I.forEachEntry(r,(i,c)=>{s(ey(i),c,l,0)}),l}return null}function ny(r,s,l){if(I.isString(r))try{return(s||JSON.parse)(r),I.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(l||JSON.stringify)(r)}const Pa={transitional:Bc,adapter:["xhr","http","fetch"],transformRequest:[function(s,l){const i=l.getContentType()||"",c=i.indexOf("application/json")>-1,d=I.isObject(s);if(d&&I.isHTMLForm(s)&&(s=new FormData(s)),I.isFormData(s))return c?JSON.stringify(eh(s)):s;if(I.isArrayBuffer(s)||I.isBuffer(s)||I.isStream(s)||I.isFile(s)||I.isBlob(s)||I.isReadableStream(s))return s;if(I.isArrayBufferView(s))return s.buffer;if(I.isURLSearchParams(s))return l.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(d){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Zg(s,this.formSerializer).toString();if((p=I.isFileList(s))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return fi(p?{"files[]":s}:s,h&&new h,this.formSerializer)}}return d||c?(l.setContentType("application/json",!1),ny(s)):s}],transformResponse:[function(s){const l=this.transitional||Pa.transitional,i=l&&l.forcedJSONParsing,c=this.responseType==="json";if(I.isResponse(s)||I.isReadableStream(s))return s;if(s&&I.isString(s)&&(i&&!this.responseType||c)){const m=!(l&&l.silentJSONParsing)&&c;try{return JSON.parse(s,this.parseReviver)}catch(p){if(m)throw p.name==="SyntaxError"?ge.from(p,ge.ERR_BAD_RESPONSE,this,null,this.response):p}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],r=>{Pa.headers[r]={}});const ry=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sy=r=>{const s={};let l,i,c;return r&&r.split(`
9
9
  `).forEach(function(m){c=m.indexOf(":"),l=m.substring(0,c).trim().toLowerCase(),i=m.substring(c+1).trim(),!(!l||s[l]&&ry[l])&&(l==="set-cookie"?s[l]?s[l].push(i):s[l]=[i]:s[l]=s[l]?s[l]+", "+i:i)}),s},Hm=Symbol("internals");function pa(r){return r&&String(r).trim().toLowerCase()}function Yl(r){return r===!1||r==null?r:I.isArray(r)?r.map(Yl):String(r)}function ay(r){const s=Object.create(null),l=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=l.exec(r);)s[i[1]]=i[2];return s}const ly=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function nc(r,s,l,i,c){if(I.isFunction(i))return i.call(this,s,l);if(c&&(s=l),!!I.isString(s)){if(I.isString(i))return s.indexOf(i)!==-1;if(I.isRegExp(i))return i.test(s)}}function iy(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,l,i)=>l.toUpperCase()+i)}function oy(r,s){const l=I.toCamelCase(" "+s);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+l,{value:function(c,d,m){return this[i].call(this,s,c,d,m)},configurable:!0})})}let Rt=class{constructor(s){s&&this.set(s)}set(s,l,i){const c=this;function d(p,h,g){const v=pa(h);if(!v)throw new Error("header name must be a non-empty string");const y=I.findKey(c,v);(!y||c[y]===void 0||g===!0||g===void 0&&c[y]!==!1)&&(c[y||h]=Yl(p))}const m=(p,h)=>I.forEach(p,(g,v)=>d(g,v,h));if(I.isPlainObject(s)||s instanceof this.constructor)m(s,l);else if(I.isString(s)&&(s=s.trim())&&!ly(s))m(sy(s),l);else if(I.isObject(s)&&I.isIterable(s)){let p={},h,g;for(const v of s){if(!I.isArray(v))throw TypeError("Object iterator must return a key-value pair");p[g=v[0]]=(h=p[g])?I.isArray(h)?[...h,v[1]]:[h,v[1]]:v[1]}m(p,l)}else s!=null&&d(l,s,i);return this}get(s,l){if(s=pa(s),s){const i=I.findKey(this,s);if(i){const c=this[i];if(!l)return c;if(l===!0)return ay(c);if(I.isFunction(l))return l.call(this,c,i);if(I.isRegExp(l))return l.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,l){if(s=pa(s),s){const i=I.findKey(this,s);return!!(i&&this[i]!==void 0&&(!l||nc(this,this[i],i,l)))}return!1}delete(s,l){const i=this;let c=!1;function d(m){if(m=pa(m),m){const p=I.findKey(i,m);p&&(!l||nc(i,i[p],p,l))&&(delete i[p],c=!0)}}return I.isArray(s)?s.forEach(d):d(s),c}clear(s){const l=Object.keys(this);let i=l.length,c=!1;for(;i--;){const d=l[i];(!s||nc(this,this[d],d,s,!0))&&(delete this[d],c=!0)}return c}normalize(s){const l=this,i={};return I.forEach(this,(c,d)=>{const m=I.findKey(i,d);if(m){l[m]=Yl(c),delete l[d];return}const p=s?iy(d):String(d).trim();p!==d&&delete l[d],l[p]=Yl(c),i[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const l=Object.create(null);return I.forEach(this,(i,c)=>{i!=null&&i!==!1&&(l[c]=s&&I.isArray(i)?i.join(", "):i)}),l}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,l])=>s+": "+l).join(`
10
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...l){const i=new this(s);return l.forEach(c=>i.set(c)),i}static accessor(s){const i=(this[Hm]=this[Hm]={accessors:{}}).accessors,c=this.prototype;function d(m){const p=pa(m);i[p]||(oy(c,m),i[p]=!0)}return I.isArray(s)?s.forEach(d):d(s),this}};Rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(Rt.prototype,({value:r},s)=>{let l=s[0].toUpperCase()+s.slice(1);return{get:()=>r,set(i){this[l]=i}}});I.freezeMethods(Rt);function rc(r,s){const l=this||Pa,i=s||l,c=Rt.from(i.headers);let d=i.data;return I.forEach(r,function(p){d=p.call(l,d,c.normalize(),s?s.status:void 0)}),c.normalize(),d}function th(r){return!!(r&&r.__CANCEL__)}let La=class extends ge{constructor(s,l,i){super(s??"canceled",ge.ERR_CANCELED,l,i),this.name="CanceledError",this.__CANCEL__=!0}};function nh(r,s,l){const i=l.config.validateStatus;!l.status||!i||i(l.status)?r(l):s(new ge("Request failed with status code "+l.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(l.status/100)-4],l.config,l.request,l))}function cy(r){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return s&&s[1]||""}function uy(r,s){r=r||10;const l=new Array(r),i=new Array(r);let c=0,d=0,m;return s=s!==void 0?s:1e3,function(h){const g=Date.now(),v=i[d];m||(m=g),l[c]=h,i[c]=g;let y=d,C=0;for(;y!==c;)C+=l[y++],y=y%r;if(c=(c+1)%r,c===d&&(d=(d+1)%r),g-m<s)return;const F=v&&g-v;return F?Math.round(C*1e3/F):void 0}}function dy(r,s){let l=0,i=1e3/s,c,d;const m=(g,v=Date.now())=>{l=v,c=null,d&&(clearTimeout(d),d=null),r(...g)};return[(...g)=>{const v=Date.now(),y=v-l;y>=i?m(g,v):(c=g,d||(d=setTimeout(()=>{d=null,m(c)},i-y)))},()=>c&&m(c)]}const ei=(r,s,l=3)=>{let i=0;const c=uy(50,250);return dy(d=>{const m=d.loaded,p=d.lengthComputable?d.total:void 0,h=m-i,g=c(h),v=m<=p;i=m;const y={loaded:m,total:p,progress:p?m/p:void 0,bytes:h,rate:g||void 0,estimated:g&&p&&v?(p-m)/g:void 0,event:d,lengthComputable:p!=null,[s?"download":"upload"]:!0};r(y)},l)},$m=(r,s)=>{const l=r!=null;return[i=>s[0]({lengthComputable:l,total:r,loaded:i}),s[1]]},Vm=r=>(...s)=>I.asap(()=>r(...s)),my=pt.hasStandardBrowserEnv?((r,s)=>l=>(l=new URL(l,pt.origin),r.protocol===l.protocol&&r.host===l.host&&(s||r.port===l.port)))(new URL(pt.origin),pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent)):()=>!0,fy=pt.hasStandardBrowserEnv?{write(r,s,l,i,c,d,m){if(typeof document>"u")return;const p=[`${r}=${encodeURIComponent(s)}`];I.isNumber(l)&&p.push(`expires=${new Date(l).toUTCString()}`),I.isString(i)&&p.push(`path=${i}`),I.isString(c)&&p.push(`domain=${c}`),d===!0&&p.push("secure"),I.isString(m)&&p.push(`SameSite=${m}`),document.cookie=p.join("; ")},read(r){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function hy(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function py(r,s){return s?r.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):r}function rh(r,s,l){let i=!hy(s);return r&&(i||l==!1)?py(r,s):s}const Wm=r=>r instanceof Rt?{...r}:r;function Br(r,s){s=s||{};const l={};function i(g,v,y,C){return I.isPlainObject(g)&&I.isPlainObject(v)?I.merge.call({caseless:C},g,v):I.isPlainObject(v)?I.merge({},v):I.isArray(v)?v.slice():v}function c(g,v,y,C){if(I.isUndefined(v)){if(!I.isUndefined(g))return i(void 0,g,y,C)}else return i(g,v,y,C)}function d(g,v){if(!I.isUndefined(v))return i(void 0,v)}function m(g,v){if(I.isUndefined(v)){if(!I.isUndefined(g))return i(void 0,g)}else return i(void 0,v)}function p(g,v,y){if(y in s)return i(g,v);if(y in r)return i(void 0,g)}const h={url:d,method:d,data:d,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:p,headers:(g,v,y)=>c(Wm(g),Wm(v),y,!0)};return I.forEach(Object.keys({...r,...s}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const y=I.hasOwnProp(h,v)?h[v]:c,C=y(r[v],s[v],v);I.isUndefined(C)&&y!==p||(l[v]=C)}),l}const sh=r=>{const s=Br({},r);let{data:l,withXSRFToken:i,xsrfHeaderName:c,xsrfCookieName:d,headers:m,auth:p}=s;if(s.headers=m=Rt.from(m),s.url=Zf(rh(s.baseURL,s.url,s.allowAbsoluteUrls),r.params,r.paramsSerializer),p&&m.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),I.isFormData(l)){if(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(I.isFunction(l.getHeaders)){const h=l.getHeaders(),g=["content-type","content-length"];Object.entries(h).forEach(([v,y])=>{g.includes(v.toLowerCase())&&m.set(v,y)})}}if(pt.hasStandardBrowserEnv&&(i&&I.isFunction(i)&&(i=i(s)),i||i!==!1&&my(s.url))){const h=c&&d&&fy.read(d);h&&m.set(c,h)}return s},xy=typeof XMLHttpRequest<"u",gy=xy&&function(r){return new Promise(function(l,i){const c=sh(r);let d=c.data;const m=Rt.from(c.headers).normalize();let{responseType:p,onUploadProgress:h,onDownloadProgress:g}=c,v,y,C,F,N;function _(){F&&F(),N&&N(),c.cancelToken&&c.cancelToken.unsubscribe(v),c.signal&&c.signal.removeEventListener("abort",v)}let b=new XMLHttpRequest;b.open(c.method.toUpperCase(),c.url,!0),b.timeout=c.timeout;function U(){if(!b)return;const M=Rt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),W={data:!p||p==="text"||p==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:M,config:r,request:b};nh(function(z){l(z),_()},function(z){i(z),_()},W),b=null}"onloadend"in b?b.onloadend=U:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(U)},b.onabort=function(){b&&(i(new ge("Request aborted",ge.ECONNABORTED,r,b)),b=null)},b.onerror=function(P){const W=P&&P.message?P.message:"Network Error",ae=new ge(W,ge.ERR_NETWORK,r,b);ae.event=P||null,i(ae),b=null},b.ontimeout=function(){let P=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded";const W=c.transitional||Bc;c.timeoutErrorMessage&&(P=c.timeoutErrorMessage),i(new ge(P,W.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,r,b)),b=null},d===void 0&&m.setContentType(null),"setRequestHeader"in b&&I.forEach(m.toJSON(),function(P,W){b.setRequestHeader(W,P)}),I.isUndefined(c.withCredentials)||(b.withCredentials=!!c.withCredentials),p&&p!=="json"&&(b.responseType=c.responseType),g&&([C,N]=ei(g,!0),b.addEventListener("progress",C)),h&&b.upload&&([y,F]=ei(h),b.upload.addEventListener("progress",y),b.upload.addEventListener("loadend",F)),(c.cancelToken||c.signal)&&(v=M=>{b&&(i(!M||M.type?new La(null,r,b):M),b.abort(),b=null)},c.cancelToken&&c.cancelToken.subscribe(v),c.signal&&(c.signal.aborted?v():c.signal.addEventListener("abort",v)));const R=cy(c.url);if(R&&pt.protocols.indexOf(R)===-1){i(new ge("Unsupported protocol "+R+":",ge.ERR_BAD_REQUEST,r));return}b.send(d||null)})},yy=(r,s)=>{const{length:l}=r=r?r.filter(Boolean):[];if(s||l){let i=new AbortController,c;const d=function(g){if(!c){c=!0,p();const v=g instanceof Error?g:this.reason;i.abort(v instanceof ge?v:new La(v instanceof Error?v.message:v))}};let m=s&&setTimeout(()=>{m=null,d(new ge(`timeout of ${s}ms exceeded`,ge.ETIMEDOUT))},s);const p=()=>{r&&(m&&clearTimeout(m),m=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),r=null)};r.forEach(g=>g.addEventListener("abort",d));const{signal:h}=i;return h.unsubscribe=()=>I.asap(p),h}},vy=function*(r,s){let l=r.byteLength;if(l<s){yield r;return}let i=0,c;for(;i<l;)c=i+s,yield r.slice(i,c),i=c},jy=async function*(r,s){for await(const l of wy(r))yield*vy(l,s)},wy=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const s=r.getReader();try{for(;;){const{done:l,value:i}=await s.read();if(l)break;yield i}}finally{await s.cancel()}},Gm=(r,s,l,i)=>{const c=jy(r,s);let d=0,m,p=h=>{m||(m=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:g,value:v}=await c.next();if(g){p(),h.close();return}let y=v.byteLength;if(l){let C=d+=y;l(C)}h.enqueue(new Uint8Array(v))}catch(g){throw p(g),g}},cancel(h){return p(h),c.return()}},{highWaterMark:2})},Km=64*1024,{isFunction:Wl}=I,Ny=(({Request:r,Response:s})=>({Request:r,Response:s}))(I.global),{ReadableStream:qm,TextEncoder:Ym}=I.global,Qm=(r,...s)=>{try{return!!r(...s)}catch{return!1}},by=r=>{r=I.merge.call({skipUndefined:!0},Ny,r);const{fetch:s,Request:l,Response:i}=r,c=s?Wl(s):typeof fetch=="function",d=Wl(l),m=Wl(i);if(!c)return!1;const p=c&&Wl(qm),h=c&&(typeof Ym=="function"?(N=>_=>N.encode(_))(new Ym):async N=>new Uint8Array(await new l(N).arrayBuffer())),g=d&&p&&Qm(()=>{let N=!1;const _=new l(pt.origin,{body:new qm,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!_}),v=m&&p&&Qm(()=>I.isReadableStream(new i("").body)),y={stream:v&&(N=>N.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!y[N]&&(y[N]=(_,b)=>{let U=_&&_[N];if(U)return U.call(_);throw new ge(`Response type '${N}' is not supported`,ge.ERR_NOT_SUPPORT,b)})});const C=async N=>{if(N==null)return 0;if(I.isBlob(N))return N.size;if(I.isSpecCompliantForm(N))return(await new l(pt.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(I.isArrayBufferView(N)||I.isArrayBuffer(N))return N.byteLength;if(I.isURLSearchParams(N)&&(N=N+""),I.isString(N))return(await h(N)).byteLength},F=async(N,_)=>{const b=I.toFiniteNumber(N.getContentLength());return b??C(_)};return async N=>{let{url:_,method:b,data:U,signal:R,cancelToken:M,timeout:P,onDownloadProgress:W,onUploadProgress:ae,responseType:z,headers:oe,withCredentials:xe="same-origin",fetchOptions:Ne}=sh(N),te=s||fetch;z=z?(z+"").toLowerCase():"text";let ye=yy([R,M&&M.toAbortSignal()],P),me=null;const ve=ye&&ye.unsubscribe&&(()=>{ye.unsubscribe()});let Z;try{if(ae&&g&&b!=="get"&&b!=="head"&&(Z=await F(oe,U))!==0){let S=new l(_,{method:"POST",body:U,duplex:"half"}),D;if(I.isFormData(U)&&(D=S.headers.get("content-type"))&&oe.setContentType(D),S.body){const[Y,ue]=$m(Z,ei(Vm(ae)));U=Gm(S.body,Km,Y,ue)}}I.isString(xe)||(xe=xe?"include":"omit");const Q=d&&"credentials"in l.prototype,X={...Ne,signal:ye,method:b.toUpperCase(),headers:oe.normalize().toJSON(),body:U,duplex:"half",credentials:Q?xe:void 0};me=d&&new l(_,X);let B=await(d?te(me,Ne):te(_,X));const J=v&&(z==="stream"||z==="response");if(v&&(W||J&&ve)){const S={};["status","statusText","headers"].forEach(ne=>{S[ne]=B[ne]});const D=I.toFiniteNumber(B.headers.get("content-length")),[Y,ue]=W&&$m(D,ei(Vm(W),!0))||[];B=new i(Gm(B.body,Km,Y,()=>{ue&&ue(),ve&&ve()}),S)}z=z||"text";let q=await y[I.findKey(y,z)||"text"](B,N);return!J&&ve&&ve(),await new Promise((S,D)=>{nh(S,D,{data:q,headers:Rt.from(B.headers),status:B.status,statusText:B.statusText,config:N,request:me})})}catch(Q){throw ve&&ve(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,N,me,Q&&Q.response),{cause:Q.cause||Q}):ge.from(Q,Q&&Q.code,N,me,Q&&Q.response)}}},Sy=new Map,ah=r=>{let s=r&&r.env||{};const{fetch:l,Request:i,Response:c}=s,d=[i,c,l];let m=d.length,p=m,h,g,v=Sy;for(;p--;)h=d[p],g=v.get(h),g===void 0&&v.set(h,g=p?new Map:by(s)),v=g;return g};ah();const Hc={http:zg,xhr:gy,fetch:{get:ah}};I.forEach(Hc,(r,s)=>{if(r){try{Object.defineProperty(r,"name",{value:s})}catch{}Object.defineProperty(r,"adapterName",{value:s})}});const Jm=r=>`- ${r}`,ky=r=>I.isFunction(r)||r===null||r===!1;function Ey(r,s){r=I.isArray(r)?r:[r];const{length:l}=r;let i,c;const d={};for(let m=0;m<l;m++){i=r[m];let p;if(c=i,!ky(i)&&(c=Hc[(p=String(i)).toLowerCase()],c===void 0))throw new ge(`Unknown adapter '${p}'`);if(c&&(I.isFunction(c)||(c=c.get(s))))break;d[p||"#"+m]=c}if(!c){const m=Object.entries(d).map(([h,g])=>`adapter ${h} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=l?m.length>1?`since :
10
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...l){const i=new this(s);return l.forEach(c=>i.set(c)),i}static accessor(s){const i=(this[Hm]=this[Hm]={accessors:{}}).accessors,c=this.prototype;function d(m){const p=pa(m);i[p]||(oy(c,m),i[p]=!0)}return I.isArray(s)?s.forEach(d):d(s),this}};Rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(Rt.prototype,({value:r},s)=>{let l=s[0].toUpperCase()+s.slice(1);return{get:()=>r,set(i){this[l]=i}}});I.freezeMethods(Rt);function rc(r,s){const l=this||Pa,i=s||l,c=Rt.from(i.headers);let d=i.data;return I.forEach(r,function(p){d=p.call(l,d,c.normalize(),s?s.status:void 0)}),c.normalize(),d}function th(r){return!!(r&&r.__CANCEL__)}let La=class extends ge{constructor(s,l,i){super(s??"canceled",ge.ERR_CANCELED,l,i),this.name="CanceledError",this.__CANCEL__=!0}};function nh(r,s,l){const i=l.config.validateStatus;!l.status||!i||i(l.status)?r(l):s(new ge("Request failed with status code "+l.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(l.status/100)-4],l.config,l.request,l))}function cy(r){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return s&&s[1]||""}function uy(r,s){r=r||10;const l=new Array(r),i=new Array(r);let c=0,d=0,m;return s=s!==void 0?s:1e3,function(h){const g=Date.now(),v=i[d];m||(m=g),l[c]=h,i[c]=g;let y=d,C=0;for(;y!==c;)C+=l[y++],y=y%r;if(c=(c+1)%r,c===d&&(d=(d+1)%r),g-m<s)return;const F=v&&g-v;return F?Math.round(C*1e3/F):void 0}}function dy(r,s){let l=0,i=1e3/s,c,d;const m=(g,v=Date.now())=>{l=v,c=null,d&&(clearTimeout(d),d=null),r(...g)};return[(...g)=>{const v=Date.now(),y=v-l;y>=i?m(g,v):(c=g,d||(d=setTimeout(()=>{d=null,m(c)},i-y)))},()=>c&&m(c)]}const ei=(r,s,l=3)=>{let i=0;const c=uy(50,250);return dy(d=>{const m=d.loaded,p=d.lengthComputable?d.total:void 0,h=m-i,g=c(h),v=m<=p;i=m;const y={loaded:m,total:p,progress:p?m/p:void 0,bytes:h,rate:g||void 0,estimated:g&&p&&v?(p-m)/g:void 0,event:d,lengthComputable:p!=null,[s?"download":"upload"]:!0};r(y)},l)},$m=(r,s)=>{const l=r!=null;return[i=>s[0]({lengthComputable:l,total:r,loaded:i}),s[1]]},Vm=r=>(...s)=>I.asap(()=>r(...s)),my=pt.hasStandardBrowserEnv?((r,s)=>l=>(l=new URL(l,pt.origin),r.protocol===l.protocol&&r.host===l.host&&(s||r.port===l.port)))(new URL(pt.origin),pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent)):()=>!0,fy=pt.hasStandardBrowserEnv?{write(r,s,l,i,c,d,m){if(typeof document>"u")return;const p=[`${r}=${encodeURIComponent(s)}`];I.isNumber(l)&&p.push(`expires=${new Date(l).toUTCString()}`),I.isString(i)&&p.push(`path=${i}`),I.isString(c)&&p.push(`domain=${c}`),d===!0&&p.push("secure"),I.isString(m)&&p.push(`SameSite=${m}`),document.cookie=p.join("; ")},read(r){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function hy(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function py(r,s){return s?r.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):r}function rh(r,s,l){let i=!hy(s);return r&&(i||l==!1)?py(r,s):s}const Wm=r=>r instanceof Rt?{...r}:r;function Ur(r,s){s=s||{};const l={};function i(g,v,y,C){return I.isPlainObject(g)&&I.isPlainObject(v)?I.merge.call({caseless:C},g,v):I.isPlainObject(v)?I.merge({},v):I.isArray(v)?v.slice():v}function c(g,v,y,C){if(I.isUndefined(v)){if(!I.isUndefined(g))return i(void 0,g,y,C)}else return i(g,v,y,C)}function d(g,v){if(!I.isUndefined(v))return i(void 0,v)}function m(g,v){if(I.isUndefined(v)){if(!I.isUndefined(g))return i(void 0,g)}else return i(void 0,v)}function p(g,v,y){if(y in s)return i(g,v);if(y in r)return i(void 0,g)}const h={url:d,method:d,data:d,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:p,headers:(g,v,y)=>c(Wm(g),Wm(v),y,!0)};return I.forEach(Object.keys({...r,...s}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const y=I.hasOwnProp(h,v)?h[v]:c,C=y(r[v],s[v],v);I.isUndefined(C)&&y!==p||(l[v]=C)}),l}const sh=r=>{const s=Ur({},r);let{data:l,withXSRFToken:i,xsrfHeaderName:c,xsrfCookieName:d,headers:m,auth:p}=s;if(s.headers=m=Rt.from(m),s.url=Zf(rh(s.baseURL,s.url,s.allowAbsoluteUrls),r.params,r.paramsSerializer),p&&m.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),I.isFormData(l)){if(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(I.isFunction(l.getHeaders)){const h=l.getHeaders(),g=["content-type","content-length"];Object.entries(h).forEach(([v,y])=>{g.includes(v.toLowerCase())&&m.set(v,y)})}}if(pt.hasStandardBrowserEnv&&(i&&I.isFunction(i)&&(i=i(s)),i||i!==!1&&my(s.url))){const h=c&&d&&fy.read(d);h&&m.set(c,h)}return s},xy=typeof XMLHttpRequest<"u",gy=xy&&function(r){return new Promise(function(l,i){const c=sh(r);let d=c.data;const m=Rt.from(c.headers).normalize();let{responseType:p,onUploadProgress:h,onDownloadProgress:g}=c,v,y,C,F,N;function _(){F&&F(),N&&N(),c.cancelToken&&c.cancelToken.unsubscribe(v),c.signal&&c.signal.removeEventListener("abort",v)}let b=new XMLHttpRequest;b.open(c.method.toUpperCase(),c.url,!0),b.timeout=c.timeout;function U(){if(!b)return;const M=Rt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),W={data:!p||p==="text"||p==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:M,config:r,request:b};nh(function(z){l(z),_()},function(z){i(z),_()},W),b=null}"onloadend"in b?b.onloadend=U:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(U)},b.onabort=function(){b&&(i(new ge("Request aborted",ge.ECONNABORTED,r,b)),b=null)},b.onerror=function(P){const W=P&&P.message?P.message:"Network Error",ae=new ge(W,ge.ERR_NETWORK,r,b);ae.event=P||null,i(ae),b=null},b.ontimeout=function(){let P=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded";const W=c.transitional||Bc;c.timeoutErrorMessage&&(P=c.timeoutErrorMessage),i(new ge(P,W.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,r,b)),b=null},d===void 0&&m.setContentType(null),"setRequestHeader"in b&&I.forEach(m.toJSON(),function(P,W){b.setRequestHeader(W,P)}),I.isUndefined(c.withCredentials)||(b.withCredentials=!!c.withCredentials),p&&p!=="json"&&(b.responseType=c.responseType),g&&([C,N]=ei(g,!0),b.addEventListener("progress",C)),h&&b.upload&&([y,F]=ei(h),b.upload.addEventListener("progress",y),b.upload.addEventListener("loadend",F)),(c.cancelToken||c.signal)&&(v=M=>{b&&(i(!M||M.type?new La(null,r,b):M),b.abort(),b=null)},c.cancelToken&&c.cancelToken.subscribe(v),c.signal&&(c.signal.aborted?v():c.signal.addEventListener("abort",v)));const R=cy(c.url);if(R&&pt.protocols.indexOf(R)===-1){i(new ge("Unsupported protocol "+R+":",ge.ERR_BAD_REQUEST,r));return}b.send(d||null)})},yy=(r,s)=>{const{length:l}=r=r?r.filter(Boolean):[];if(s||l){let i=new AbortController,c;const d=function(g){if(!c){c=!0,p();const v=g instanceof Error?g:this.reason;i.abort(v instanceof ge?v:new La(v instanceof Error?v.message:v))}};let m=s&&setTimeout(()=>{m=null,d(new ge(`timeout of ${s}ms exceeded`,ge.ETIMEDOUT))},s);const p=()=>{r&&(m&&clearTimeout(m),m=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),r=null)};r.forEach(g=>g.addEventListener("abort",d));const{signal:h}=i;return h.unsubscribe=()=>I.asap(p),h}},vy=function*(r,s){let l=r.byteLength;if(l<s){yield r;return}let i=0,c;for(;i<l;)c=i+s,yield r.slice(i,c),i=c},jy=async function*(r,s){for await(const l of wy(r))yield*vy(l,s)},wy=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const s=r.getReader();try{for(;;){const{done:l,value:i}=await s.read();if(l)break;yield i}}finally{await s.cancel()}},Gm=(r,s,l,i)=>{const c=jy(r,s);let d=0,m,p=h=>{m||(m=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:g,value:v}=await c.next();if(g){p(),h.close();return}let y=v.byteLength;if(l){let C=d+=y;l(C)}h.enqueue(new Uint8Array(v))}catch(g){throw p(g),g}},cancel(h){return p(h),c.return()}},{highWaterMark:2})},Km=64*1024,{isFunction:Wl}=I,Ny=(({Request:r,Response:s})=>({Request:r,Response:s}))(I.global),{ReadableStream:qm,TextEncoder:Ym}=I.global,Qm=(r,...s)=>{try{return!!r(...s)}catch{return!1}},by=r=>{r=I.merge.call({skipUndefined:!0},Ny,r);const{fetch:s,Request:l,Response:i}=r,c=s?Wl(s):typeof fetch=="function",d=Wl(l),m=Wl(i);if(!c)return!1;const p=c&&Wl(qm),h=c&&(typeof Ym=="function"?(N=>_=>N.encode(_))(new Ym):async N=>new Uint8Array(await new l(N).arrayBuffer())),g=d&&p&&Qm(()=>{let N=!1;const _=new l(pt.origin,{body:new qm,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!_}),v=m&&p&&Qm(()=>I.isReadableStream(new i("").body)),y={stream:v&&(N=>N.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!y[N]&&(y[N]=(_,b)=>{let U=_&&_[N];if(U)return U.call(_);throw new ge(`Response type '${N}' is not supported`,ge.ERR_NOT_SUPPORT,b)})});const C=async N=>{if(N==null)return 0;if(I.isBlob(N))return N.size;if(I.isSpecCompliantForm(N))return(await new l(pt.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(I.isArrayBufferView(N)||I.isArrayBuffer(N))return N.byteLength;if(I.isURLSearchParams(N)&&(N=N+""),I.isString(N))return(await h(N)).byteLength},F=async(N,_)=>{const b=I.toFiniteNumber(N.getContentLength());return b??C(_)};return async N=>{let{url:_,method:b,data:U,signal:R,cancelToken:M,timeout:P,onDownloadProgress:W,onUploadProgress:ae,responseType:z,headers:oe,withCredentials:xe="same-origin",fetchOptions:Ne}=sh(N),te=s||fetch;z=z?(z+"").toLowerCase():"text";let ye=yy([R,M&&M.toAbortSignal()],P),me=null;const ve=ye&&ye.unsubscribe&&(()=>{ye.unsubscribe()});let Z;try{if(ae&&g&&b!=="get"&&b!=="head"&&(Z=await F(oe,U))!==0){let S=new l(_,{method:"POST",body:U,duplex:"half"}),D;if(I.isFormData(U)&&(D=S.headers.get("content-type"))&&oe.setContentType(D),S.body){const[Y,ue]=$m(Z,ei(Vm(ae)));U=Gm(S.body,Km,Y,ue)}}I.isString(xe)||(xe=xe?"include":"omit");const Q=d&&"credentials"in l.prototype,X={...Ne,signal:ye,method:b.toUpperCase(),headers:oe.normalize().toJSON(),body:U,duplex:"half",credentials:Q?xe:void 0};me=d&&new l(_,X);let B=await(d?te(me,Ne):te(_,X));const J=v&&(z==="stream"||z==="response");if(v&&(W||J&&ve)){const S={};["status","statusText","headers"].forEach(ne=>{S[ne]=B[ne]});const D=I.toFiniteNumber(B.headers.get("content-length")),[Y,ue]=W&&$m(D,ei(Vm(W),!0))||[];B=new i(Gm(B.body,Km,Y,()=>{ue&&ue(),ve&&ve()}),S)}z=z||"text";let q=await y[I.findKey(y,z)||"text"](B,N);return!J&&ve&&ve(),await new Promise((S,D)=>{nh(S,D,{data:q,headers:Rt.from(B.headers),status:B.status,statusText:B.statusText,config:N,request:me})})}catch(Q){throw ve&&ve(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,N,me,Q&&Q.response),{cause:Q.cause||Q}):ge.from(Q,Q&&Q.code,N,me,Q&&Q.response)}}},Sy=new Map,ah=r=>{let s=r&&r.env||{};const{fetch:l,Request:i,Response:c}=s,d=[i,c,l];let m=d.length,p=m,h,g,v=Sy;for(;p--;)h=d[p],g=v.get(h),g===void 0&&v.set(h,g=p?new Map:by(s)),v=g;return g};ah();const Hc={http:zg,xhr:gy,fetch:{get:ah}};I.forEach(Hc,(r,s)=>{if(r){try{Object.defineProperty(r,"name",{value:s})}catch{}Object.defineProperty(r,"adapterName",{value:s})}});const Jm=r=>`- ${r}`,ky=r=>I.isFunction(r)||r===null||r===!1;function Ey(r,s){r=I.isArray(r)?r:[r];const{length:l}=r;let i,c;const d={};for(let m=0;m<l;m++){i=r[m];let p;if(c=i,!ky(i)&&(c=Hc[(p=String(i)).toLowerCase()],c===void 0))throw new ge(`Unknown adapter '${p}'`);if(c&&(I.isFunction(c)||(c=c.get(s))))break;d[p||"#"+m]=c}if(!c){const m=Object.entries(d).map(([h,g])=>`adapter ${h} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=l?m.length>1?`since :
11
11
  `+m.map(Jm).join(`
12
12
  `):" "+Jm(m[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return c}const lh={getAdapter:Ey,adapters:Hc};function sc(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new La(null,r)}function Xm(r){return sc(r),r.headers=Rt.from(r.headers),r.data=rc.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),lh.getAdapter(r.adapter||Pa.adapter,r)(r).then(function(i){return sc(r),i.data=rc.call(r,r.transformResponse,i),i.headers=Rt.from(i.headers),i},function(i){return th(i)||(sc(r),i&&i.response&&(i.response.data=rc.call(r,r.transformResponse,i.response),i.response.headers=Rt.from(i.response.headers))),Promise.reject(i)})}const ih="1.13.5",hi={};["object","boolean","number","function","string","symbol"].forEach((r,s)=>{hi[r]=function(i){return typeof i===r||"a"+(s<1?"n ":" ")+r}});const Zm={};hi.transitional=function(s,l,i){function c(d,m){return"[Axios v"+ih+"] Transitional option '"+d+"'"+m+(i?". "+i:"")}return(d,m,p)=>{if(s===!1)throw new ge(c(m," has been removed"+(l?" in "+l:"")),ge.ERR_DEPRECATED);return l&&!Zm[m]&&(Zm[m]=!0,console.warn(c(m," has been deprecated since v"+l+" and will be removed in the near future"))),s?s(d,m,p):!0}};hi.spelling=function(s){return(l,i)=>(console.warn(`${i} is likely a misspelling of ${s}`),!0)};function Cy(r,s,l){if(typeof r!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let c=i.length;for(;c-- >0;){const d=i[c],m=s[d];if(m){const p=r[d],h=p===void 0||m(p,d,r);if(h!==!0)throw new ge("option "+d+" must be "+h,ge.ERR_BAD_OPTION_VALUE);continue}if(l!==!0)throw new ge("Unknown option "+d,ge.ERR_BAD_OPTION)}}const Ql={assertOptions:Cy,validators:hi},qt=Ql.validators;let Dr=class{constructor(s){this.defaults=s||{},this.interceptors={request:new zm,response:new zm}}async request(s,l){try{return await this._request(s,l)}catch(i){if(i instanceof Error){let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const d=c.stack?c.stack.replace(/^.+\n/,""):"";try{i.stack?d&&!String(i.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(i.stack+=`
13
- `+d):i.stack=d}catch{}}throw i}}_request(s,l){typeof s=="string"?(l=l||{},l.url=s):l=s||{},l=Br(this.defaults,l);const{transitional:i,paramsSerializer:c,headers:d}=l;i!==void 0&&Ql.assertOptions(i,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean),legacyInterceptorReqResOrdering:qt.transitional(qt.boolean)},!1),c!=null&&(I.isFunction(c)?l.paramsSerializer={serialize:c}:Ql.assertOptions(c,{encode:qt.function,serialize:qt.function},!0)),l.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?l.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:l.allowAbsoluteUrls=!0),Ql.assertOptions(l,{baseUrl:qt.spelling("baseURL"),withXsrfToken:qt.spelling("withXSRFToken")},!0),l.method=(l.method||this.defaults.method||"get").toLowerCase();let m=d&&I.merge(d.common,d[l.method]);d&&I.forEach(["delete","get","head","post","put","patch","common"],N=>{delete d[N]}),l.headers=Rt.concat(m,d);const p=[];let h=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(l)===!1)return;h=h&&_.synchronous;const b=l.transitional||Bc;b&&b.legacyInterceptorReqResOrdering?p.unshift(_.fulfilled,_.rejected):p.push(_.fulfilled,_.rejected)});const g=[];this.interceptors.response.forEach(function(_){g.push(_.fulfilled,_.rejected)});let v,y=0,C;if(!h){const N=[Xm.bind(this),void 0];for(N.unshift(...p),N.push(...g),C=N.length,v=Promise.resolve(l);y<C;)v=v.then(N[y++],N[y++]);return v}C=p.length;let F=l;for(;y<C;){const N=p[y++],_=p[y++];try{F=N(F)}catch(b){_.call(this,b);break}}try{v=Xm.call(this,F)}catch(N){return Promise.reject(N)}for(y=0,C=g.length;y<C;)v=v.then(g[y++],g[y++]);return v}getUri(s){s=Br(this.defaults,s);const l=rh(s.baseURL,s.url,s.allowAbsoluteUrls);return Zf(l,s.params,s.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(s){Dr.prototype[s]=function(l,i){return this.request(Br(i||{},{method:s,url:l,data:(i||{}).data}))}});I.forEach(["post","put","patch"],function(s){function l(i){return function(d,m,p){return this.request(Br(p||{},{method:s,headers:i?{"Content-Type":"multipart/form-data"}:{},url:d,data:m}))}}Dr.prototype[s]=l(),Dr.prototype[s+"Form"]=l(!0)});let _y=class oh{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let l;this.promise=new Promise(function(d){l=d});const i=this;this.promise.then(c=>{if(!i._listeners)return;let d=i._listeners.length;for(;d-- >0;)i._listeners[d](c);i._listeners=null}),this.promise.then=c=>{let d;const m=new Promise(p=>{i.subscribe(p),d=p}).then(c);return m.cancel=function(){i.unsubscribe(d)},m},s(function(d,m,p){i.reason||(i.reason=new La(d,m,p),l(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const l=this._listeners.indexOf(s);l!==-1&&this._listeners.splice(l,1)}toAbortSignal(){const s=new AbortController,l=i=>{s.abort(i)};return this.subscribe(l),s.signal.unsubscribe=()=>this.unsubscribe(l),s.signal}static source(){let s;return{token:new oh(function(c){s=c}),cancel:s}}};function Ty(r){return function(l){return r.apply(null,l)}}function Ry(r){return I.isObject(r)&&r.isAxiosError===!0}const jc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jc).forEach(([r,s])=>{jc[s]=r});function ch(r){const s=new Dr(r),l=Hf(Dr.prototype.request,s);return I.extend(l,Dr.prototype,s,{allOwnKeys:!0}),I.extend(l,s,null,{allOwnKeys:!0}),l.create=function(c){return ch(Br(r,c))},l}const qe=ch(Pa);qe.Axios=Dr;qe.CanceledError=La;qe.CancelToken=_y;qe.isCancel=th;qe.VERSION=ih;qe.toFormData=fi;qe.AxiosError=ge;qe.Cancel=qe.CanceledError;qe.all=function(s){return Promise.all(s)};qe.spread=Ty;qe.isAxiosError=Ry;qe.mergeConfig=Br;qe.AxiosHeaders=Rt;qe.formToJSON=r=>eh(I.isHTMLForm(r)?new FormData(r):r);qe.getAdapter=lh.getAdapter;qe.HttpStatusCode=jc;qe.default=qe;const{Axios:dN,AxiosError:mN,CanceledError:fN,isCancel:hN,CancelToken:pN,VERSION:xN,all:gN,Cancel:yN,isAxiosError:vN,spread:jN,toFormData:wN,AxiosHeaders:NN,HttpStatusCode:bN,formToJSON:SN,getAdapter:kN,mergeConfig:EN}=qe,at={set:(r,s,l=7)=>{const i=new Date;i.setTime(i.getTime()+l*24*60*60*1e3);const c=[`${r}=${encodeURIComponent(s)}`,`expires=${i.toUTCString()}`,"path=/","SameSite=Lax",window.location.protocol==="https:"?"Secure":""].filter(Boolean).join("; ");document.cookie=c},get:r=>{const s=`${r}=`,l=document.cookie.split(";");for(let i=0;i<l.length;i++){const c=l[i].trim();if(c.indexOf(s)===0)return decodeURIComponent(c.substring(s.length))}return null},remove:r=>{document.cookie=`${r}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Lax`}};class Ay{constructor(s={}){const l=s.baseUrl||zf;this.axiosInstance=qe.create({baseURL:l,timeout:s.timeout||eg,headers:{"Content-Type":"application/json",...s.headers},withCredentials:!0}),this.attachAuthHandling()}attachAuthHandling(){this.axiosInstance.interceptors.request.use(s=>{const l=at.get("monodog_session_token");return l&&(s.headers=s.headers||{},s.headers.Authorization=`Bearer ${l}`),s}),this.axiosInstance.interceptors.response.use(s=>s,s=>(s.response?.status===401&&(at.remove("monodog_session_token"),at.remove("monodog_session_data")),Promise.reject(s)))}mapAxiosError(s){const l=s.response?.status||0,i=s.response?.statusText||s.message,c=s.response&&typeof s.response.data=="object"?s.response.data:void 0,m=s.response?.data?.rateLimit;let p;switch(l){case 400:p="VALIDATION";break;case 401:p="UNAUTHORIZED";break;case 403:p="FORBIDDEN";break;case 404:p="NOT_FOUND";break;case 408:p="TIMEOUT";break;case 429:p="RATE_LIMIT";break;case 500:case 502:case 503:case 504:p="SERVER_ERROR";break;default:p=l?`HTTP_${l}`:"UNKNOWN"}return console.error(`API error [${l}] ${i}`,{code:p,details:c}),{success:!1,error:{code:p,message:i,status:l,details:typeof c=="object"&&c!==null&&"details"in c?c.details:void 0},meta:{status:l,statusText:i,headers:s.response?.headers||{},timestamp:Date.now(),duration:0},...m&&{rateLimit:m}}}async request(s,l,i={}){const c=`/api${l}`,d=Date.now();try{const m=await this.axiosInstance.request({method:s.toLowerCase(),url:c,data:i.body,headers:i.headers,timeout:i.timeout}),p=Date.now()-d,g=m.data?.rateLimit;return{success:!0,data:m.data,meta:{status:m.status,statusText:m.statusText,headers:m.headers,timestamp:Date.now(),duration:p},...g&&{rateLimit:g}}}catch(m){const p=Date.now()-d;if(qe.isAxiosError(m))return this.mapAxiosError(m);const h=m instanceof Error?m.message:"Unknown error";return console.error("Unexpected error in API client",h),{success:!1,error:{code:"UNKNOWN",message:h,status:0},meta:{timestamp:Date.now(),duration:p}}}}get(s,l){return this.request("GET",s,l||{})}post(s,l,i){return this.request("POST",s,{...i,body:l})}put(s,l,i){return this.request("PUT",s,{...i,body:l})}delete(s,l){return this.request("DELETE",s,l||{})}patch(s,l,i){return this.request("PATCH",s,{...i,body:l})}}var ef={};function Py(){const r=ef.REACT_APP_API_URL||ef.VITE_API_URL;if(r)return r;const s=window.ENV?.API_URL;return s||zf}const we=new Ay({baseUrl:Py(),timeout:tg,headers:{"Content-Type":"application/json"}}),uh=w.createContext(void 0),ps="monodog_session_token",xs="monodog_session_data";function Ly({children:r}){const[s,l]=w.useState(null),[i,c]=w.useState(!0),[d,m]=w.useState(null);w.useEffect(()=>{const N=at.get(ps),_=at.get(xs);if(N&&_)try{const b=JSON.parse(_);l({sessionToken:N,...b})}catch{at.remove(ps),at.remove(xs)}c(!1)},[]);const p=w.useCallback(async()=>{try{c(!0),m(null);const N=await we.get(Ae.AUTH.LOGIN);if(!N.success)throw new Error(N.error.message||xc.LOGIN_FAILED);N.data.authUrl&&(window.location.href=N.data.authUrl)}catch(N){const _=N instanceof Error?N.message:xc.LOGIN_FAILED;m(_),c(!1)}},[]),h=w.useCallback(async(N,_)=>{try{c(!0),m(null);const b=await we.get(Ae.AUTH.ME,{headers:{Authorization:`Bearer ${N}`}});if(!b.success)throw new Error(Ce.FAILED_TO_FETCH_USER_INFO);const U=b.data,R={sessionToken:N,user:U.user,scopes:U.scopes||[],expiresAt:U.expiresAt},M={user:U.user,scopes:U.scopes||[],permission:_||U.permission,expiresAt:U.expiresAt};at.set(ps,N),at.set(xs,JSON.stringify(M));const P={...R,permission:_||U.permission};return l(P),!0}catch(b){const U=b instanceof Error?b.message:"Auth failed";return m(U),!1}finally{c(!1)}},[]),g=w.useCallback(async()=>{try{c(!0),s?.sessionToken&&await we.post(Ae.AUTH.LOGOUT,void 0),at.remove(ps),at.remove(xs),l(null)}catch(N){console.error("Logout error:",N)}finally{c(!1)}},[s]),v=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{const N=await we.post(Ae.AUTH.VALIDATE,void 0);return N.success?N.data.valid===!0:(at.remove(ps),at.remove(xs),l(null),!1)}catch(N){return console.error("Session check error:",N),!1}},[s]),y=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{c(!0);const N=await we.post(Ae.AUTH.REFRESH,void 0);if(!N.success)throw new Error(Ce.FAILED_TO_REFRESH_SESSION);const _=N.data;if(_.success&&_.sessionToken){const b={sessionToken:_.sessionToken,user:s.user,scopes:s.scopes,expiresAt:_.expiresAt};return at.set(ps,_.sessionToken),at.set(xs,JSON.stringify({user:s.user,scopes:s.scopes,expiresAt:_.expiresAt})),l(b),!0}return!1}catch(N){return console.error("Session refresh error:",N),!1}finally{c(!1)}},[s]);w.useEffect(()=>{if(!s)return;const N=setInterval(()=>{v()},300*1e3);return()=>clearInterval(N)},[s,v]);const C=w.useCallback(N=>{if(!s)return console.warn("[Auth] No session available for permission check"),!1;const _={admin:4,maintain:3,write:2,read:1,none:0};let b="read";const U=s.permission;typeof U=="string"?b=U:U&&typeof U=="object"&&(U.level?b=U.level:U.permission&&(b=U.permission));const R=_[b]||0,M=_[N]||0;return R>=M},[s]),F={session:s,isAuthenticated:!!s,isLoading:i,error:d,login:p,logout:g,checkSession:v,refreshSession:y,hasPermission:C,permission:(()=>{const N=s?.permission;return N&&N.level||null})()};return window.__authContext={handleOAuthCallback:h},t.jsx(uh.Provider,{value:F,children:r})}function zr(){const r=Sf.useContext(uh);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r}const tf=[{name:"Dashboard",href:"/",icon:Ax},{name:"Packages",href:"/packages",icon:Ut},{name:"Dependencies",href:"/dependencies",icon:_a},{name:"Health Status",href:"/health",icon:Lc},{name:"Release",href:"/release",icon:Df},{name:"Pipeline",href:"/pipeline",icon:Mn},{name:"Configuration",href:"/config",icon:Ur}];function Oy({children:r}){const s=bs(),{session:l,logout:i}=zr();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:tf.map(c=>{const d=s.pathname===c.href;return t.jsx("li",{children:t.jsxs(On,{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:tf.find(c=>c.href===s.pathname)?.name||"Dashboard"})}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex flex-col items-end text-sm",children:t.jsx("button",{className:"font-medium",onClick:i,title:"Logout",children:t.jsx(qx,{})})}),t.jsxs("div",{className:"flex flex-col items-end text-sm",children:[l&&t.jsx("span",{className:"font-medium text-primary-700",children:l.user?.login??"anonymous"}),l&&t.jsx("span",{className:"text-neutral-500",children:l.permission?.role??"Denied"})]}),t.jsx("img",{src:l.user?.avatar_url??"",alt:"User Avatar",className:"h-8 w-8 rounded-full border border-neutral-200"})]})]}),t.jsx("main",{className:"p-6",children:r})]})]})}function Iy({isOpen:r,onClose:s,children:l}){return r?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:i=>i.stopPropagation(),children:l})}):null}function My({onSave:r,onClose:s}){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(Uf,{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:r,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(ai,{className:"w-5 h-5"}),t.jsx("span",{children:"Save"})]}),t.jsxs("button",{onClick:s,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(Ss,{className:"w-5 h-5"}),t.jsx("span",{children:"Cancel"})]})]})]})}const Dy=()=>[{id:"general",label:"General",icon:t.jsx(Ur,{className:"w-6 h-6 text-primary-600"})},{id:"features",label:"Features",icon:t.jsx(Mn,{className:"w-6 h-6 text-primary-600"})},{id:"branding",label:"Branding",icon:"🎨"},{id:"monorepo",label:"Monorepo",icon:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}],Fy=()=>({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"]}}),nf=r=>{const s=Fy();return{...s,...r,features:{...s.features,...r.features},branding:{...s.branding,...r.branding},monorepo:{...s.monorepo,...r.monorepo}}},Uy=r=>{const s=[];return(!r.title||r.title.trim()==="")&&s.push("Dashboard title is required"),r.monorepo?.directories&&r.monorepo.directories.length===0&&s.push("At least one package directory is required"),r.branding?.primaryColor&&!rf(r.branding.primaryColor)&&s.push("Primary color must be a valid hex color"),r.branding?.secondaryColor&&!rf(r.branding.secondaryColor)&&s.push("Secondary color must be a valid hex color"),{isValid:s.length===0,errors:s}},rf=r=>/^#[0-9A-F]{6}$/i.test(r),ti=r=>r.split(",").map(s=>s.trim()).filter(s=>s.length>0),ni=r=>r?r.join(", "):"",By=r=>r.replace(/([A-Z])/g," $1").trim();function zy({activeTab:r,onTabChange:s}){const l=Dy();return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8 px-6",children:l.map(i=>t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.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:i.icon}),t.jsx("span",{children:i.label})]},i.id))})})}function sf({config:r,onConfigChange:s}){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:r.title||"",onChange:l=>s({title:l.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:r.description||"",onChange:l=>s({description:l.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:ni(r.packageTypes),onChange:l=>s({packageTypes:ti(l.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:ni(r.customFields),onChange:l=>s({customFields:ti(l.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 Hy({config:r,onConfigChange:s}){const l=(i,c)=>{s({features:{...r.features,[i]:c}})};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(r.features||{}).map(([i,c])=>t.jsxs("label",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:c,onChange:d=>l(i,d.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:By(i)})]},i))}),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 $y({config:r,onConfigChange:s}){const l=(i,c)=>{s({branding:{...r.branding,[i]:c}})};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:r.branding?.logo||"",onChange:i=>l("logo",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:"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:r.branding?.primaryColor||"#3B82F6",onChange:i=>l("primaryColor",i.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:r.branding?.primaryColor||"#3B82F6",onChange:i=>l("primaryColor",i.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:r.branding?.secondaryColor||"#1E40AF",onChange:i=>l("secondaryColor",i.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:r.branding?.secondaryColor||"#1E40AF",onChange:i=>l("secondaryColor",i.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:r.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:r.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:r.branding?.primaryColor||"#3B82F6"},children:"Sample Button"})]})]})]})})}function Vy({config:r,onConfigChange:s}){const l=(i,c)=>{s({monorepo:{...r.monorepo,[i]:c}})};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:r.monorepo?.structure||"standard",onChange:i=>l("structure",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",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:r.monorepo?.packageManager||"pnpm",onChange:i=>l("packageManager",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",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:ni(r.monorepo?.directories),onChange:i=>l("directories",ti(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:"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:ni(r.monorepo?.ignorePatterns),onChange:i=>l("ignorePatterns",ti(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:"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:r.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:r.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:[r.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:[r.monorepo?.ignorePatterns?.length||0," patterns"]})]})]})]}),r.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:[r.monorepo.packageManager.toUpperCase()," Configuration Tips"]}),t.jsxs("div",{className:"text-xs text-blue-800",children:[r.monorepo.packageManager==="pnpm"&&t.jsx("p",{children:"Make sure you have a pnpm-workspace.yaml file in your root directory."}),r.monorepo.packageManager==="npm"&&t.jsx("p",{children:'Configure workspaces in your package.json with the "workspaces" field.'}),r.monorepo.packageManager==="yarn"&&t.jsx("p",{children:"Ensure you have workspaces configured in your package.json."}),r.monorepo.packageManager==="lerna"&&t.jsx("p",{children:"Make sure you have a lerna.json configuration file in your root."}),r.monorepo.packageManager==="nx"&&t.jsx("p",{children:"Ensure you have an nx.json configuration file in your workspace root."})]})]})]})})}function Wy({isOpen:r,onClose:s,onSave:l,currentConfig:i}){const[c,d]=w.useState(nf(i)),[m,p]=w.useState("general");w.useEffect(()=>{d(nf(i))},[i]);const h=()=>{const y=Uy(c);y.isValid||console.warn("Configuration validation errors:",y.errors),l(c),s()},g=y=>{d(C=>({...C,...y}))},v=()=>{const y={config:c,onConfigChange:g};switch(m){case"general":return t.jsx(sf,{...y});case"features":return t.jsx(Hy,{...y});case"branding":return t.jsx($y,{...y});case"monorepo":return t.jsx(Vy,{...y});default:return t.jsx(sf,{...y})}};return t.jsxs(Iy,{isOpen:r,onClose:s,children:[t.jsx(My,{onSave:h,onClose:s}),t.jsx(zy,{activeTab:m,onTabChange:p}),t.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:v()})]})}function Gy({isOpen:r,onClose:s,children:l}){return r?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:i=>i.stopPropagation(),children:l})}):null}function Ky({onClose:r}){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:r,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Ss,{className:"w-6 h-6"})})]})}function qy({progress:r}){const{currentStep:s,totalSteps:l,completedSteps:i}=r,c=(s+1)/l*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 ",s+1," of ",l]}),t.jsxs("span",{className:"text-sm text-gray-500",children:[i," 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:`${c}%`}})})]})}function Yy({step:r,onStepComplete:s}){const l=()=>{switch(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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(vs,{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(vs,{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(vs,{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:()=>s(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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:r.title}),t.jsx("p",{className:"text-gray-600 mb-4",children:r.description})]}),l()]})}function Qy({currentStep:r,totalSteps:s,canGoNext:l,canGoPrevious:i,onNext:c,onPrevious:d,onComplete:m,isLastStep:p}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-gray-200",children:[t.jsx("button",{onClick:d,disabled:!i,className:`px-4 py-2 text-sm rounded-lg border transition-colors ${i?"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:s},(h,g)=>t.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${g<=r?"bg-blue-600":"bg-gray-300"}`},g))}),p?t.jsxs("button",{onClick:m,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(ai,{className:"w-4 h-4"}),t.jsx("span",{children:"Complete Setup"})]}):t.jsx("button",{onClick:c,disabled:!l,className:`px-4 py-2 text-sm rounded-lg transition-colors ${l?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Next"})]})}const Jy=()=>[{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}],Xy=(r,s)=>({currentStep:s,totalSteps:r.length,completedSteps:r.filter(l=>l.completed).length}),Zy=(r,s)=>{const l=r[s];return!l.required||l.completed},ev=r=>r.filter(l=>l.required).every(l=>l.completed),tv=(r,s)=>r.map(l=>l.id===s?{...l,completed:!0}:l);function nv({isOpen:r,onClose:s,onComplete:l}){const[i,c]=w.useState(0),[d,m]=w.useState(Jy()),p=b=>{const U=tv(d,b);m(U),U[i].completed&&i<d.length-1&&c(M=>M+1)},h=()=>{i<d.length-1&&c(b=>b+1)},g=()=>{i>0&&c(b=>b-1)},v=()=>{ev(d)&&(l(),s())},y=Xy(d,i),C=Zy(d,i),F=i>0,N=i===d.length-1,_=d[i];return t.jsxs(Gy,{isOpen:r,onClose:s,children:[t.jsx(Ky,{onClose:s}),t.jsx(qy,{progress:y}),t.jsx(Yy,{step:_,onStepComplete:p}),t.jsx(Qy,{currentStep:i,totalSteps:d.length,canGoNext:C,canGoPrevious:F,onNext:h,onPrevious:g,onComplete:v,isLastStep:N})]})}function rv({config:r,onShowSetupGuide:s,onShowConfig:l,onRefresh:i}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-3xl",children:r.title}),t.jsx("p",{className:"text-body mt-2",children:r.description}),t.jsx("button",{onClick:s,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:i,className:"btn-primary flex items-center space-x-2",children:[t.jsx(fr,{className:"w-5 h-5"}),t.jsx("span",{children:"Refresh"})]}),t.jsxs("button",{onClick:l,className:"hidden btn-ghost flex items-center space-x-2",children:[t.jsx(Uf,{className:"w-5 h-5"}),t.jsx("span",{children:"Configure"})]})]})]})}function sv({stats:r}){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(Ut,{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:r.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(Mn,{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:r.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(ii,{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:r.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(oi,{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:r.totalDependencies})]})]})})]})}function av(){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(On,{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(_a,{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(On,{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(Lc,{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(On,{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 lv({searchTerm:r,selectedType:s,packageTypes:l,onSearchChange:i,onTypeChange:c}){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(Dc,{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:r,onChange:d=>i(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-2",children:[t.jsx(ci,{className:"w-5 h-5 text-gray-400"}),t.jsxs("select",{value:s,onChange:d=>c(d.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"}),l.map(d=>t.jsx("option",{value:d,className:"capitalize",children:d},d))]})]})]})}function iv({packages:r,getTypeIcon:s,getStatusColor:l}){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:r.map(i=>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:s(i.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:i.name}),t.jsx("div",{className:"text-sm text-gray-500",children:i.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 ${l(i.type)}`,children:i.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.version}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(i.dependencies).length+Object.keys(i.devDependencies).length+Object.keys(i.peerDependencies).length}),t.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 max-w-xs truncate",children:i.description||"No description"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsx(On,{to:`/packages/${encodeURIComponent(i.name)}`,className:"text-blue-600 hover:text-blue-500",children:"View Details"})})]},i.name))})]})})}class ov{constructor(){this.mockPackages=[]}async getPackages(){try{const s=await we.get(Ae.PACKAGES.LIST);if(s.success)return s.data;console.error(`getPackages: initial fetch failed with status ${s.error.status}. Attempting refresh...`);try{return await this.refreshPackages()}catch(l){return console.error("getPackages: refresh failed",l),[]}}catch(s){return console.error("getPackages: unexpected error",s),[]}}async getPackage(s){const l=await we.get(Ae.PACKAGES.DETAILS(s));if(!l.success)throw new Error(`Failed to fetch package details for "${s}" (Status: ${l.error.status})`);return l.data}async getDependencies(){await new Promise(l=>setTimeout(l,200));const s=new Set;try{return(await this.getPackages()).forEach(c=>{c.dependencies?.forEach(d=>s.add(d))}),Array.from(s).map(c=>({name:c,version:"unknown",type:"dependency",status:"active"}))}catch(l){return console.error("Error fetching dependencies:",l),[]}}async refreshPackages(){try{const s=await we.post(Ae.PACKAGES.REFRESH);return s.success?s.data:(console.error(`refreshPackages: fetch failed with status ${s.error.status}`),[])}catch(s){return console.error("refreshPackages: unexpected error",s),[]}}async getHealthStatus(){try{let s=await we.get(Ae.HEALTH.PACKAGES);if(!s.success){if(!(await we.post(Ae.HEALTH.REFRESH)).success)throw new Error("Failed to refresh health data");if(await new Promise(i=>setTimeout(i,1e3)),s=await we.get(Ae.HEALTH.PACKAGES),!s.success)throw new Error("Failed to fetch health data after refresh")}return s.data}catch(s){throw console.error("Error fetching health data:",s),s}}async refreshHealthStatus(){try{const s=await we.post(Ae.HEALTH.REFRESH);if(!s.success)throw new Error("Failed to fetch health data");return s.data}catch(s){console.error("Error fetching health data:",s)}}async getFallbackHealthStatus(){await new Promise(c=>setTimeout(c,400));const s=[{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"}],l=this.mockPackages.map(c=>({package:c.name,score:c.status==="healthy"?90:c.status==="warning"?70:50,issues:c.status==="healthy"?[]:["Needs attention"]}));return{overallScore:85,metrics:s,packageHealth:l}}async updatePackageConfiguration(s,l,i){try{const c=await we.put(Ae.PACKAGES.UPDATE_CONFIG,JSON.stringify({packageName:s,config:l,packagePath:i}));if(!c.success)throw new Error(`HTTP error: ${c.error?.message}`);return c.data}catch(c){throw console.error("Error updating package configuration:",c),c}}async getBuildStatus(){await new Promise(l=>setTimeout(l,500));const s=[];for(const l of this.mockPackages){const i=l.scripts&&l.scripts.build,c=l.scripts&&l.scripts.test;if(i||c){const d=new Date(Date.now()-Math.random()*864e5).toISOString(),m=Math.random()>.8?"failed":Math.random()>.6?"building":Math.random()>.4?"queued":"success";s.push({id:`build-${l.name}-${Date.now()}`,package:l.name,status:m,startTime:d,endTime:m!=="building"?new Date(Date.now()-Math.random()*36e5).toISOString():void 0,duration:m!=="building"?Math.floor(Math.random()*300)+60:void 0,stages:this.generateBuildStages(l,m)})}}return s}async getConfigurationFiles(){try{const s=await we.get(Ae.CONFIG.FILES);if(!s.success)throw new Error(`Failed to fetch config files: ${s.error?.message}`);const l=s.data;if(l.success&&l.files)return l.files;throw new Error("Invalid response format from config files API")}catch(s){return console.error("Error fetching configuration files from backend:",s),[]}}async saveConfigurationFile(s,l){try{const i=await we.put(Ae.CONFIG.FILE(s),JSON.stringify({content:l}));if(!i.success)throw new Error(i.error?.message||"Failed to save file");const c=i.data;if(c.success&&c.file)return c.file;throw new Error("Invalid response format from save file API")}catch(i){throw console.error("Error saving configuration file:",i),i}}generateBuildStages(s,l){const i=[{name:"Install",status:"success",duration:Math.floor(Math.random()*30)+10,logs:["Installing dependencies...","Dependencies installed successfully"]},{name:"Lint",status:l==="failed"&&Math.random()>.7?"failed":"success",duration:Math.floor(Math.random()*20)+5,logs:["Running ESLint...","Linting completed"]},{name:"Test",status:l==="failed"&&Math.random()>.5?"failed":"success",duration:Math.floor(Math.random()*60)+30,logs:["Running tests...","Test suite completed"]},{name:"Build",status:l==="failed"?"failed":"success",duration:Math.floor(Math.random()*120)+60,logs:["Building package...","Build completed successfully"]}];if(l==="building"){const c=Math.floor(Math.random()*i.length);i[c].status="running",i.slice(c+1).forEach(d=>d.status="pending")}return i}}const Ft=new ov,cv=r=>({total:r.length,apps:r.filter(s=>s.type==="app").length,libs:r.filter(s=>s.type==="lib").length,tools:r.filter(s=>s.type==="tool").length,custom:r.filter(s=>!["app","Plib","tool"].includes(s.type)).length,totalDependencies:r.reduce((s,l)=>s+Object.keys(l.dependencies).length+Object.keys(l.peerDependencies).length+Object.keys(l.devDependencies).length,0)}),uv=r=>[...new Set(r.map(s=>s.type))],dv=(r,s,l)=>r.filter(i=>{const c=i.name.toLowerCase().includes(s.toLowerCase())||i.description?.toLowerCase().includes(s.toLowerCase()),d=l==="all"||i.type===l;return c&&d}),mv=r=>{switch(r){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"}},fv=r=>{switch(r){case"app":return t.jsx(Mn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ii,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}};function $c({message:r="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:r})]})})}function dh({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function hv({stats:r}){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(Ut,{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:r.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(At,{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:r.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(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:"Warnings"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.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(Dt,{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:r.errors})]})]})})]})}function pv({filters:r,onFiltersChange:s,availableTypes:l,availableStatuses:i}){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(Dc,{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:r.search,onChange:c=>s({...r,search:c.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(ci,{className:"h-5 w-5 text-gray-400"}),t.jsxs("select",{value:r.type,onChange:c=>s({...r,type:c.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"}),l.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]}),t.jsxs("select",{value:r.status,onChange:c=>s({...r,status:c.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"}),i.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]})]})})}const xv=r=>({total:r.length,healthy:r.filter(s=>s.status==="healthy").length,warnings:r.filter(s=>s.status==="warning").length,errors:r.filter(s=>s.status==="error").length}),gv=r=>[...new Set(r.map(s=>s.type))],yv=r=>[...new Set(r.map(s=>s.status))],vv=(r,s)=>r.filter(l=>{const i=l.name.toLowerCase().includes(s.search.toLowerCase())||l.description.toLowerCase().includes(s.search.toLowerCase()),c=s.type==="all"||l.type===s.type,d=s.status==="all"||l.status===s.status;return i&&c&&d}),jv=(r,s)=>[...r].sort((l,i)=>{let c,d;switch(s.field){case"name":c=l.name.toLowerCase(),d=i.name.toLowerCase();break;case"version":c=l.version,d=i.version;break;case"lastUpdated":c=new Date(l.lastUpdated),d=new Date(i.lastUpdated);break;case"dependencies":c=Object.keys(l.dependencies).length,d=Object.keys(i.dependencies).length;break;default:return 0}return c<d?s.order==="asc"?-1:1:c>d?s.order==="asc"?1:-1:0}),mh=r=>{switch(r){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"}},fh=r=>{switch(r){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"}},wv=r=>{switch(r){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"}},Nv=r=>{switch(r){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"}},Vc=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),hh=r=>r.startsWith("v")?r:`v${r}`,ph=r=>{switch(r){case"app":return t.jsx(Mn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ii,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";case"service":return"🌐";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}};function bv({packages:r,sorting:s,onSortChange:l}){const i=d=>{const m=s.field===d&&s.order==="asc"?"desc":"asc";l({field:d,order:m})},c=d=>s.field!==d?null:s.order==="asc"?t.jsx(Pc,{className:"w-4 h-4"}):t.jsx(Mf,{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:()=>i("name"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),c("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:()=>i("version"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Version"}),c("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:()=>i("dependencies"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),c("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:()=>i("lastUpdated"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Last Updated"}),c("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:r.map(d=>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:ph(d.type)}),t.jsxs("div",{children:[t.jsx(On,{to:`/packages/${encodeURIComponent(d.name)}`,className:"text-sm font-medium text-blue-600 hover:text-blue-500",children:d.name}),t.jsx("div",{className:"text-sm text-gray-500",children:d.description})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-900",children:hh(d.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 ${fh(d.type)}`,children:d.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 ${mh(d.status)}`,children:d.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(d.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(d.dependencies).slice(0,3).join(", "),Object.keys(d.dependencies).length>3&&` +${Object.keys(d.dependencies).length-3} more`]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Vc(d.lastUpdated)}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex -space-x-1",children:[d.maintainers.slice(0,3).map((m,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:m,children:m.charAt(0).toUpperCase()},m)),d.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:["+",d.maintainers.length-3]})]})})]},d.name))})]})})})}function Sv({packageData:r}){const s=l=>{switch(l){case"healthy":return t.jsx(At,{className:"h-5 w-5 text-green-500"});case"warning":return t.jsx(lt,{className:"h-5 w-5 text-yellow-500"});case"error":return t.jsx(lt,{className:"h-5 w-5 text-red-500"});default:return t.jsx(He,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-6",children:t.jsxs(On,{to:"/packages",className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-700",children:[t.jsx(Ix,{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:ph(r.type)}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:r.name}),t.jsx("p",{className:"text-gray-600 mt-1",children:r.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:hh(r.version)})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${fh(r.type)}`,children:r.type}),t.jsxs("div",{className:"flex items-center space-x-1",children:[s(r.status),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mh(r.status)}`,children:r.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:[r.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(Ff,{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:Vc(r.lastUpdated)})]})]}),t.jsxs("div",{className:"hidden flex items-center space-x-2",children:[t.jsx(Mx,{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:r.maintainers.length})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Mc,{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:r.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(oi,{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:r.repository.url||"",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-500",children:r.repository?.url?.split("/").pop()})})]})]})]}),r.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:r.tags.map(l=>t.jsx("span",{className:"inline-flex px-2 py-1 text-xs bg-gray-100 text-gray-700 rounded-full",children:l},l))})]})]})]})}function kv({activeTab:r,onTabChange:s}){const l=[{id:"overview",label:"Overview",icon:Ut},{id:"dependencies",label:"Dependencies",icon:Ic},{id:"commits",label:"Recent Commits",icon:He},{id:"health",label:"Health Metrics",icon:Lc},{id:"config",label:"Configuration",icon:Ur}];return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8",children:l.map(i=>{const c=i.icon;return t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[t.jsx(c,{className:"w-4 h-4"}),t.jsx("span",{children:i.label})]},i.id)})})})}function Ev({packageData:r}){if(!r.dependenciesInfo.length)return t.jsx("p",{className:"py-6 text-gray-600",children:"No dependency found."});const s=(l,i)=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:i}),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:l.map(c=>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:c.name})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:c.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:c.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 ${wv(c.status)}`,children:c.status.replace("-"," ")})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm",children:c.status!=="up-to-date"&&t.jsxs("button",{className:"text-blue-600 hover:text-blue-500 flex items-center space-x-1",children:[t.jsx(Pc,{className:"w-4 h-4"}),t.jsx("span",{children:"Update"})]})})]},c.name))})]})})]});return t.jsxs("div",{className:"py-6",children:[s(r.dependenciesInfo.filter(l=>l.type=="dependency"),"Dependencies"),s(r.dependenciesInfo.filter(l=>l.type=="devDependency"),"Dev Dependencies"),s(r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.status==="major-update").length})]})]})]})]})}function Cv({packageData:r}){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:r.commits.map(s=>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 ${Nv(s.type)}`,children:s.type}),t.jsx("span",{className:"text-sm font-mono text-gray-500",children:s.hash})]}),t.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:s.message}),t.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[t.jsxs("span",{children:["by ",s.author]}),t.jsx("span",{children:Vc(s.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"})})]})},s.hash))}),r.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:r.commits.filter(s=>s.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:r.commits.filter(s=>s.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:r.commits.filter(s=>s.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:r.commits.filter(s=>s.type==="breaking").length})]})]})]})]})}function _v({packageData:r}){const s=d=>d>=80?"text-green-600":d>=60?"text-yellow-600":"text-red-600",l=d=>{switch(d){case"success":return t.jsx(At,{className:"w-5 h-5 text-green-500"});case"failed":return t.jsx(Dt,{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(lt,{className:"w-5 h-5 text-gray-500"})}},i=d=>{switch(d){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"}},c=d=>{switch(d){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 r.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 ${s(r.packageHealth.packageOverallScore)}`,children:[r.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 ${r.packageHealth.packageOverallScore>=80?"bg-green-500":r.packageHealth.packageOverallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.packageHealth.packageOverallScore}%`}})}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.packageHealth.packageOverallScore>=80&&"Excellent health - package is in great condition",r.packageHealth.packageOverallScore>=60&&r.packageHealth.packageOverallScore<80&&"Good health - minor issues detected",r.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"}),l(r.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 ${i(r.packageHealth.packageBuildStatus)}`,children:r.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 ${r.packageHealth.packageTestCoverage>=80?"text-green-600":r.packageHealth.packageTestCoverage>=60?"text-yellow-600":"text-red-600"}`,children:[r.packageHealth.packageTestCoverage,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full ${r.packageHealth.packageTestCoverage>=80?"bg-green-500":r.packageHealth.packageTestCoverage>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.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"}),r.packageHealth.packageLintStatus==="pass"&&t.jsx(At,{className:"w-5 h-5 text-green-500"}),r.packageHealth.packageLintStatus==="fail"&&t.jsx(Dt,{className:"w-5 h-5 text-red-500"}),r.packageHealth.packageLintStatus==="warning"&&t.jsx(lt,{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 ${c(r.packageHealth.packageLintStatus)}`,children:r.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(r.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:r.dependenciesInfo.filter(d=>d.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:r.dependenciesInfo.filter(d=>d.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 ${r.packageHealth.packageBuildStatus==="success"?"text-green-600":r.packageHealth.packageBuildStatus==="failed"?"text-red-600":"text-yellow-600"}`,children:r.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:[r.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 ${r.packageHealth.packageLintStatus==="pass"?"text-green-600":r.packageHealth.packageLintStatus==="fail"?"text-red-600":"text-yellow-600"}`,children:r.packageHealth.packageLintStatus})]})]})]})]})]})]}):t.jsx("p",{className:"py-6 text-gray-600",children:"No health data available."})}function Tv({packageData:r}){const[s,l]=w.useState(!1),[i,c]=w.useState(""),[d,m]=w.useState(!1),[p,h]=w.useState(""),[g,v]=w.useState(null),[y,C]=w.useState(!1),F=()=>{const M={name:r.name,version:r.version,description:r.description||"",license:r.license||"",repository:r.repository||{},scripts:r.scripts||{},dependencies:r.dependencies||{},devDependencies:r.devDependencies||{},peerDependencies:r.peerDependencies||{}};return JSON.stringify(M,null,2)};w.useState(()=>{c(F())});const N=()=>{l(!0),c(F()),h("")},_=()=>{l(!1),c(F()),h("")},b=async()=>{if(!i.trim()){h("Configuration cannot be empty");return}m(!0),h("");try{const M=await Ft.updatePackageConfiguration(r.name,i,r.path);if(M.success)h("Configuration updated successfully!"),l(!1);else throw new Error(M.message||"Update failed")}catch(M){console.error("Error saving configuration:",M),h(M instanceof Error?M.message:"Failed to save configuration. Please try again.")}finally{m(!1)}},U=M=>{c(M.target.value),p&&h("")},R=async(M,P,W)=>{try{await navigator.clipboard.writeText(M),P==="config"?(C(!0),setTimeout(()=>C(!1),4e3)):P==="script"&&W&&(v(W),setTimeout(()=>v(null),4e3))}catch(ae){console.error("Failed to copy to clipboard:",ae);const z=document.createElement("textarea");z.value=M,document.body.appendChild(z),z.select();try{document.execCommand("copy"),P==="config"?(C(!0),setTimeout(()=>C(!1),2e3)):P==="script"&&W&&(v(W),setTimeout(()=>v(null),2e3))}catch(oe){console.error("Fallback copy failed:",oe),P==="config"&&h("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(Ic,{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(r.scripts).map(([M,P])=>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:M}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>R(P,"script",M),className:`text-sm flex items-center space-x-1 ${g===M?"text-green-600":"text-gray-600 hover:text-gray-700"}`,title:"Copy command to clipboard",children:g===M?t.jsxs(t.Fragment,{children:[t.jsx(Mm,{className:"w-4 h-4"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Im,{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:P})]},M))}),Object.keys(r.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"}),!s&&t.jsx("div",{className:"text-sm text-gray-500",children:"Read-only preview"})]}),s?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:i,onChange:U,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:b,disabled:d,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:d?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:_,disabled:d,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:i})}),t.jsxs("div",{className:"mt-4 flex space-x-3",children:[t.jsx("button",{onClick:N,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:()=>R(s?i:F(),"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:y?t.jsxs(t.Fragment,{children:[t.jsx(Mm,{className:"w-4 h-4 text-green-600"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Im,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})})]})]})]})]})}const af={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 Rv(){const[r,s]=w.useState(),[l,i]=w.useState(""),[c,d]=w.useState("all"),[m,p]=w.useState(af),[h,g]=w.useState(!1),[v,y]=w.useState(!1),[C,F]=w.useState(!0),[N,_]=w.useState(null),[b,U]=w.useState(!1);w.useEffect(()=>{(async()=>{try{F(!0);const oe=await Ft.getPackages();s(oe),_(null)}catch(oe){_(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",oe)}finally{F(!1)}})()},[]),w.useEffect(()=>{const z=at.get("monodog-config");z&&p({...af,...JSON.parse(z)})},[]);const R=z=>{p(z),at.set("monodog-config",JSON.stringify(z))},M=async()=>{try{U(!0),_(null),F(!0);try{const z=await Ft.refreshPackages();s(z),_(null)}catch(z){_(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching package data:",z)}finally{F(!1)}}catch(z){_(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error refreshing package data:",z)}finally{U(!1)}};if(C&&!r)return t.jsx($c,{});if(N)return t.jsx(dh,{error:N,onRetry:M});const P=dv(r??[],l,c),W=uv(r??[]),ae=cv(r??[]);return t.jsxs("div",{className:"p-6 space-y-6",children:[b&&r&&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(rv,{config:m,onShowSetupGuide:()=>y(!0),onShowConfig:()=>g(!0),onRefresh:M}),t.jsx(sv,{stats:ae}),t.jsx(av,{}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx(lv,{searchTerm:l,selectedType:c,packageTypes:W,onSearchChange:i,onTypeChange:d}),t.jsx(iv,{packages:P,getTypeIcon:fv,getStatusColor:mv})]}),t.jsx(Wy,{isOpen:h,onClose:()=>g(!1),onSave:R,currentConfig:m}),t.jsx(nv,{isOpen:v,onClose:()=>y(!1),onComplete:()=>y(!1)})]})}function Av(){const[r,s]=w.useState([]),[l,i]=w.useState(!0),[c,d]=w.useState(null),[m,p]=w.useState({search:"",type:"all",status:"all"}),[h,g]=w.useState({field:"name",order:"asc"});w.useEffect(()=>{(async()=>{try{i(!0);const U=await Ft.getPackages();s(U),d(null)}catch(U){d(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",U)}finally{i(!1)}})()},[]);const v=()=>{window.location.reload()},y=vv(r,m),C=jv(y,h),F=xv(r),N=gv(r),_=yv(r);return l?t.jsx($c,{}):c?t.jsx(dh,{error:c,onRetry:v}):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(hv,{stats:F}),t.jsx(pv,{filters:m,onFiltersChange:p,availableTypes:N,availableStatuses:_}),t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[t.jsxs("span",{children:["Showing ",C.length," of ",r.length," packages",m.search&&` matching "${m.search}"`]}),t.jsxs("span",{children:[m.type!=="all"&&`Filtered by type: ${m.type}`,m.status!=="all"&&` • status: ${m.status}`]})]}),t.jsx(bv,{packages:C,sorting:h,onSortChange:g}),C.length===0&&!l&&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(Ut,{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:m.search||m.type!=="all"||m.status!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first package to the monorepo."}),(m.search||m.type!=="all"||m.status!=="all")&&t.jsx("button",{onClick:()=>p({search:"",type:"all",status:"all"}),className:"text-primary-600 hover:text-primary-500",children:"Clear Filters"})]})]})}function Pv(){const{name:r}=sx(),[s,l]=w.useState(null),[i,c]=w.useState("overview");if(w.useEffect(()=>{(async()=>{try{const p=await Ft.getPackage(r??"");l(p)}catch(p){console.error("Error fetching packages:",p)}})()},[r]),!s)return t.jsx($c,{message:"Loading package details..."});const d=()=>{switch(i){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:s.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(s.maintainers).map(m=>t.jsx("div",{className:"text-sm text-gray-600",children:m},m))})]}),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:s.dependenciesInfo.filter(m=>m.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:s.dependenciesInfo.filter(m=>m.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:s.dependenciesInfo.filter(m=>m.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(s.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:s.commits?.length})]})]})]})]})]})});case"dependencies":return t.jsx(Ev,{packageData:s});case"commits":return t.jsx(Cv,{packageData:s});case"health":return t.jsx(_v,{packageData:s});case"config":return t.jsx(Tv,{packageData:s});default:return null}};return t.jsxs("div",{className:"space-y-6",children:[t.jsx(Sv,{packageData:s}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsx(kv,{activeTab:i,onTabChange:c}),t.jsx("div",{className:"px-6",children:d()})]})]})}function Lv({message:r="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:r})]})})}function Ov({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function Iv({onRefresh:r,loading:s=!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"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,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(fr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Mv({viewMode:r,onViewModeChange:s,layout:l,onLayoutChange:i,showLegend:c,onToggleLegend:d,zoomLevel:m,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:()=>s("graph"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="graph"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(zx,{className:"w-4 h-4"}),t.jsx("span",{children:"Graph"})]}),t.jsxs("button",{onClick:()=>s("list"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="list"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(Bx,{className:"w-4 h-4"}),t.jsx("span",{children:"List"})]})]})]}),r==="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:l,onChange:h=>i(h.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,m-.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m<=.5,children:t.jsx(Wx,{className:"w-4 h-4"})}),t.jsxs("span",{className:"text-sm text-gray-600 min-w-[3rem] text-center",children:[Math.round(m*100),"%"]}),t.jsx("button",{onClick:()=>p(Math.min(2,m+.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m>=2,children:t.jsx(Vx,{className:"w-4 h-4"})})]})]})]}),t.jsxs("button",{onClick:d,className:`px-3 py-2 text-sm font-medium rounded-lg flex items-center space-x-1 transition-colors ${c?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[t.jsx(vs,{className:"w-4 h-4"}),t.jsx("span",{children:"Legend"})]})]})}const xh=r=>{switch(r){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"}},gh=r=>{switch(r){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"}},lf=(r,s)=>{const l=s.find(i=>i.name===r);if(!l)return"text-gray-400";switch(l.status){case"healthy":return"text-green-500";case"warning":return"text-yellow-500";case"error":return"text-red-500";default:return"text-gray-400"}},Dv=r=>{const s=r.length,l=r.reduce((h,g)=>h+Object.keys(g.dependencies).length,0),i=r.filter(h=>Object.keys(h.dependencies).length===0).length,c=r.filter(h=>h.dependents.length===0).length,d=Fv(r),m=s>0?l/s:0,p=yh(r);return{totalPackages:s,totalDependencies:l,circularDependencies:p.length,leafPackages:i,rootPackages:c,maxDepth:d,avgDependencies:Math.round(m*10)/10}},Fv=r=>{const s=new Set;let l=0;const i=(c,d)=>{if(s.has(c))return d;s.add(c);const m=r.find(h=>h.name===c);if(!m)return d;let p=d;for(const h of Object.keys(m.dependencies)){const g=i(h,d+1);p=Math.max(p,g)}return p};for(const c of r)if(!s.has(c.name)){const d=i(c.name,0);l=Math.max(l,d)}return l},yh=r=>{const s=[],l=new Set,i=new Set,c=[],d=m=>{if(i.has(m)){const h=c.indexOf(m),g=c.slice(h).concat(m);return s.push({cycle:g,severity:g.length>5?"high":g.length>3?"medium":"low",impact:`Circular dependency involving ${g.length} packages`}),!0}if(l.has(m))return!1;l.add(m),i.add(m),c.push(m);const p=r.find(h=>h.name===m);if(p){for(const h of Object.keys(p.dependencies))if(d(h))return!0}return i.delete(m),c.pop(),!1};for(const m of r)l.has(m.name)||d(m.name);return s},Uv=(r,s,l)=>[...r].sort((i,c)=>{let d,m;switch(s){case"name":d=i.name.toLowerCase(),m=c.name.toLowerCase();break;case"dependencies":d=Object.keys(i.dependencies).length,m=Object.keys(c.dependencies).length;break;case"dependents":d=i.dependents.length,m=c.dependents.length;break;case"status":{const p={error:0,warning:1,healthy:2};d=p[i.status]||3,m=p[c.status]||3;break}default:return 0}return d<m?l==="asc"?-1:1:d>m?l==="asc"?1:-1:0}),Bv=(r,s,l=800,i=600)=>{switch(s){case"hierarchical":return zv(r,l,i);case"circular":return Hv(r,l,i);case"force":return $v(r,l,i);default:return r}},zv=(r,s,l)=>{const i=[],c=new Set,d=(m,p)=>{if(c.has(m))return;c.add(m),i[p]||(i[p]=[]),i[p].push(m);const h=r.find(g=>g.name===m);h&&h.dependents.forEach(g=>d(g,p+1))};return r.filter(m=>Object.keys(m.dependencies).length===0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),i.length===0&&r.filter(m=>Object.keys(m.dependencies).length>0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),r.map(m=>{const p=i.findIndex(v=>v.includes(m.name)),h=i[p]?.indexOf(m.name)||0,g=i[p]?.length||1;return{...m,x:s/(i.length+1)*(p+1)-50,y:l/(g+1)*(h+1)-25}})},Hv=(r,s,l)=>{const i=s/2,c=l/2,d=Math.min(s,l)/3;return r.map((m,p)=>{const h=2*Math.PI*p/r.length;return{...m,x:i+d*Math.cos(h)-50,y:c+d*Math.sin(h)-25}})},$v=(r,s,l)=>{const i=r.map((c,d)=>({...c,x:Math.random()*(s-100),y:Math.random()*(l-50)}));for(let c=0;c<50;c++)i.forEach(d=>{let m=0,p=0;i.forEach(h=>{if(h.name!==d.name){const g=d.x-h.x,v=d.y-h.y,y=Math.sqrt(g*g+v*v)||1,C=1e3/(y*y);m+=g/y*C,p+=v/y*C}}),Object.keys(d.dependencies).forEach(h=>{const g=i.find(v=>v.name===h);if(g){const v=g.x-d.x,y=g.y-d.y,C=Math.sqrt(v*v+y*y)||1,F=C*.01;m+=v/C*F,p+=y/C*F}}),d.x+=m*.1,d.y+=p*.1,d.x=Math.max(50,Math.min(s-100,d.x)),d.y=Math.max(25,Math.min(l-50,d.y))});return i},Vv=r=>{switch(r){case"app":return t.jsx(Mn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ii,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}},Wv=r=>r.length>12?`${r.substring(0,12)}...`:r,Gv=r=>{const s={};return r.forEach(l=>{s[l.name]=[]}),r.forEach(l=>{const i=l.name;[...Object.keys(l.dependencies??{}),...Object.keys(l.devDependencies??{}),...Object.keys(l.peerDependencies??{})].forEach(d=>{s[d]||(s[d]=[]),s[d].includes(i)||s[d].push(i)})}),s};function Kv({packages:r,selectedPackage:s,hoveredPackage:l,onPackageSelect:i,onPackageHover:c,layout:d}){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:[r.map(m=>Object.keys(m.dependencies).map(p=>{const h=r.find(v=>v.name===p);if(!h)return null;const g=l===m.name||l===p||s===m.name||s===p;return t.jsxs("g",{children:[t.jsx("defs",{children:t.jsx("marker",{id:`arrow-${m.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:g?"#3B82F6":"#6B7280"})})}),t.jsx("line",{x1:h.x+50,y1:h.y+25,x2:m.x,y2:m.y+25,stroke:g?"#3B82F6":"#6B7280",strokeWidth:g?"3":"2",markerEnd:`url(#arrow-${m.name}-${p})`,className:"transition-all duration-200",style:{opacity:g?1:.6}})]},`${m.name}-${p}`)})),r.map(m=>{const p=s===m.name,h=l===m.name,g=s&&(Object.keys(m.dependencies).includes(s)||Object.keys(m.dependents).includes(s));return t.jsxs("g",{children:[t.jsx("rect",{x:m.x,y:m.y,width:"100",height:"50",rx:"8",fill:"white",stroke:p?"#3B82F6":g?"#10B981":h?"#6B7280":"#E5E7EB",strokeWidth:p?"3":"2",className:"cursor-pointer transition-all duration-200",style:{filter:h||p||g?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"},onMouseEnter:()=>c(m.name),onMouseLeave:()=>c(null),onClick:()=>i(p?null:m.name)}),t.jsx("text",{x:m.x+50,y:m.y+20,textAnchor:"middle",className:"text-xs font-medium fill-gray-900 pointer-events-none",children:Wv(m.name)}),t.jsxs("text",{x:m.x+50,y:m.y+35,textAnchor:"middle",className:"text-xs fill-gray-500 pointer-events-none",children:["v",m.version]}),t.jsx("circle",{cx:m.x+85,cy:m.y+15,r:"6",fill:m.status==="healthy"?"#10B981":m.status==="warning"?"#F59E0B":"#EF4444",className:"pointer-events-none"}),t.jsx("rect",{x:m.x+5,y:m.y+5,width:"12",height:"8",rx:"2",fill:m.type==="app"?"#3B82F6":m.type==="lib"?"#8B5CF6":"#F97316",className:"pointer-events-none"})]},m.name)})]}),r.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(oi,{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 qv({packages:r,selectedPackage:s,onPackageSelect:l,sortBy:i,sortOrder:c,onSortChange:d}){const m=h=>{d(h,i===h&&c==="asc"?"desc":"asc")},p=h=>i!==h?null:c==="asc"?t.jsx(Pc,{className:"w-4 h-4"}):t.jsx(Mf,{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:()=>m("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:()=>m("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:()=>m("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:r.map(h=>t.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer transition-colors ${s===h.name?"bg-blue-50":""}`,onClick:()=>l(h.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:Vv(h.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:h.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:["v",h.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 ${gh(h.type)}`,children:h.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 ${xh(h.status)}`,children:h.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[Object.keys(h.dependencies).length,Object.keys(h.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(h.dependencies).slice(0,3).join(", "),Object.keys(h.dependencies).length>3&&` +${Object.keys(h.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:[h.dependents.length,h.dependents.length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[h.dependents.slice(0,3).join(", "),h.dependents.length>3&&` +${h.dependents.length-3} more`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:t.jsx(On,{to:`/packages/${encodeURIComponent(h.name)}`,className:"text-blue-600 hover:text-blue-500",onClick:g=>g.stopPropagation(),children:"View Details"})})]},h.name))})]})}),r.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(Ut,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"No packages found"})]})]})}function Yv({package:r,packages:s,onClose:l}){return r?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:r.name}),t.jsx("button",{onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Ss,{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 ${gh(r.type)}`,children:r.type}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xh(r.status)}`,children:r.status})]}),t.jsxs("div",{className:"text-sm text-gray-600",children:["Version: ",t.jsx("span",{className:"font-mono",children:r.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(r.dependencies).length,")"]})]}),Object.keys(r.dependencies).length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:Object.keys(r.dependencies).map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${lf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):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:["(",r.dependents.length,")"]})]}),r.dependents.length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:r.dependents.map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${lf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):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(r.dependencies).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependents:"}),t.jsx("span",{className:"font-medium",children:r.dependents.length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Risk level:"}),t.jsx("span",{className:`font-medium ${r.dependents.length>5?"text-red-600":r.dependents.length>2?"text-yellow-600":"text-green-600"}`,children:r.dependents.length>5?"High":r.dependents.length>2?"Medium":"Low"})]})]})]}),t.jsx("div",{className:"pt-2 border-t border-gray-200",children:t.jsx(On,{to:`/packages/${encodeURIComponent(r.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 Qv({stats:r,packages:s}){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(Ut,{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:r.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(oi,{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:r.totalDependencies})]})]})}),t.jsx("div",{className:`${r.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 ${r.circularDependencies>0?"bg-red-100":"bg-green-100"}`,children:t.jsx(lt,{className:`w-6 h-6 ${r.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 ${r.circularDependencies>0?"text-red-600":"text-gray-600"}`,children:r.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(_a,{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:r.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:r.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:r.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:r.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:s.filter(l=>l.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(s.filter(l=>l.status==="healthy").length/s.length*100),"% of total"]})]})]})]})]})}function Jv({cycles:r,packages:s,onPackageSelect:l}){const i=d=>{switch(d){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"}},c=d=>{switch(d){case"high":return"🔴";case"medium":return"🟡";case"low":return"🔵";default:return"⚪"}};return r.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(lt,{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(lt,{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 ",r.length," circular dependency cycle",r.length>1?"s":""]})]})]}),t.jsx("div",{className:"space-y-4",children:r.map((d,m)=>t.jsxs("div",{className:`border rounded-lg p-4 ${i(d.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:c(d.severity)}),t.jsxs("span",{className:"text-sm font-medium capitalize",children:[d.severity," Severity"]})]}),t.jsxs("span",{className:"text-xs opacity-75",children:[d.cycle.length," packages affected"]})]}),t.jsx("div",{className:"mb-3",children:t.jsx("p",{className:"text-sm mb-2",children:d.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:[d.cycle.map((p,h)=>t.jsxs(w.Fragment,{children:[t.jsx("button",{onClick:()=>l(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}),h<d.cycle.length-1&&t.jsx(Om,{className:"w-4 h-4 text-gray-400"})]},`${p}-${h}`)),d.cycle.length>1&&t.jsxs(t.Fragment,{children:[t.jsx(Om,{className:"w-4 h-4 text-gray-400"}),t.jsxs("span",{className:"text-sm text-gray-500 italic",children:["(cycles back to ",d.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:[d.severity==="high"&&"Critical: Refactor immediately to break this cycle. Consider dependency inversion or splitting packages.",d.severity==="medium"&&"Important: Plan to refactor this cycle. Review package boundaries and extract common dependencies.",d.severity==="low"&&"Minor: Monitor this cycle. Consider if these packages could be merged or dependencies restructured."]})]})]},m))}),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:r.filter(d=>d.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:r.filter(d=>d.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:r.filter(d=>d.severity==="low").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Low Severity"})]})]})})]})}function Xv({show:r}){return r?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.jsx(wa,{}),t.jsx("span",{children:"Dependency"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-6 h-4 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-6 h-4 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 Zv(){w.useEffect(()=>{(async()=>{try{s(!0);const Q=await Ft.getPackages(),X=Gv(Q),B=Q.map(J=>({...J,dependencies:{...J.dependencies,...J.devDependencies,...J.peerDependencies},dependents:X[J.name]}));d(B),i(null)}catch(Q){i(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",Q)}finally{s(!1)}})()},[]);const[r,s]=w.useState(!1),[l,i]=w.useState(null),[c,d]=w.useState([]),[m,p]=w.useState("graph"),[h,g]=w.useState("hierarchical"),[v,y]=w.useState(null),[C,F]=w.useState(null),[N,_]=w.useState(!0),[b,U]=w.useState(1),[R,M]=w.useState("name"),[P,W]=w.useState("asc"),ae=w.useMemo(()=>Bv(c??[],h,800,600),[c,h]),z=w.useMemo(()=>Uv(c,R,P),[c,R,P]),oe=w.useMemo(()=>Dv(c),[c]),xe=w.useMemo(()=>yh(c),[c]),Ne=v&&c.find(Z=>Z.name===v)||null,te=()=>{},ye=Z=>{y(Z)},me=(Z,Q)=>{M(Z),W(Q)},ve=()=>{window.location.reload()};return r?t.jsx(Lv,{}):l?t.jsx(Ov,{error:l,onRetry:ve}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(Iv,{onRefresh:te,loading:r}),t.jsx(Qv,{stats:oe,packages:c??[]}),xe.length>0&&t.jsx(Jv,{cycles:xe,packages:c,onPackageSelect:ye}),t.jsx(Mv,{viewMode:m,onViewModeChange:p,layout:h,onLayoutChange:g,showLegend:N,onToggleLegend:()=>_(!N),zoomLevel:b,onZoomChange:U}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:`${N?"lg:col-span-3":"lg:col-span-4"}`,children:m==="graph"?t.jsxs("div",{className:"relative",children:[t.jsx("div",{style:{transform:`scale(${b})`,transformOrigin:"top left"},children:t.jsx(Kv,{packages:ae,selectedPackage:v,hoveredPackage:C,onPackageSelect:ye,onPackageHover:F,layout:h})}),t.jsx(Yv,{package:Ne,packages:c,onClose:()=>y(null)})]}):t.jsx(qv,{packages:z,selectedPackage:v,onPackageSelect:ye,sortBy:R,sortOrder:P,onSortChange:me})}),N&&t.jsx("div",{className:"lg:col-span-1",children:t.jsx(Xv,{show:N})})]})]})}function e1(){const[r,s]=w.useState(0),[l,i]=w.useState(null),[c,d]=w.useState(!0),[m,p]=w.useState(null),[h,g]=w.useState(!1);w.useEffect(()=>{(async()=>{try{d(!0);const M=await Ft.getHealthStatus();i(M),p(null)}catch(M){p(Ce.UNKNOWN_ERROR),console.error("Error fetching health data:",M)}finally{d(!1)}})()},[r]);const v=async()=>{try{g(!0),p(null),d(!0);try{const R=await Ft.refreshHealthStatus();i(R),p(null)}catch(R){p(Ce.UNKNOWN_ERROR),console.error("Error fetching health data:",R)}finally{d(!1)}}catch(R){p(Ce.UNKNOWN_ERROR),console.error("Error refreshing health data:",R)}finally{g(!1)}},y=()=>{s(R=>R+1)},C=R=>{switch(R){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(c&&!l)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(m)return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:m}),t.jsx("button",{onClick:y,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})});const F=l?l.summary?.averageScore:0,N=l?l?.packages?.filter(R=>R.health.overallScore>=80).length:0,_=l?l?.packages?.filter(R=>R.health.overallScore>=60&&R.health.overallScore<80).length:0,b=l?l?.packages?.filter(R=>R.health.overallScore<60).length:0,U=[{name:"Package Health",value:N||0,status:(()=>{const R=N||0,M=l?.packages.length||0;if(M===0)return"healthy";const P=R/M;return P>=.8?"healthy":P>=.6?"warning":"error"})(),description:`${N||0} healthy packages out of ${l?.packages.length||0}`},{name:"Overall Score",value:Math.round(F),status:Math.round(F)>=80?"healthy":Math.round(F)>=60?"warning":"error",description:`Average health score: ${Math.round(F)}/100`},{name:"Unhealthy Packages",value:_+b||0,status:(_+b||0)===0?"healthy":(_+b||0)<=2?"warning":"error",description:`${_+b||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:v,disabled:h,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:[h?t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):t.jsx(fr,{className:"w-5 h-5"}),t.jsx("span",{children:h?"Refreshing...":"Refresh"})]})]}),h&&l&&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:F?.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(At,{className:"w-5 h-5 text-green-300"}),t.jsxs("span",{children:[N," Healthy"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(lt,{className:"w-5 h-5 text-yellow-300"}),t.jsxs("span",{children:[_," Warnings"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Dt,{className:"w-5 h-5 text-red-300"}),t.jsxs("span",{children:[b," Errors"]})]})]})]}),t.jsx("div",{className:"my-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:U.map(R=>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:R.name}),t.jsx("div",{className:`w-3 h-3 rounded-full ${R.status==="healthy"?"bg-green-500":R.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:R.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 ${C(R.status)}`,children:R.status}),t.jsx("span",{className:"text-sm text-gray-500",children:R.description})]})]},R.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:l?.packages?.map(R=>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(Ut,{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:R.packageName}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Score: ",R.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 ${R.health.overallScore>=80?"bg-green-500":R.health.overallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${R.health.overallScore}%`}})}),t.jsx("span",{className:"text-sm font-medium text-gray-900",children:R.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 ${R.health.buildStatus==="success"?"bg-green-500":R.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 ${C(R.health.buildStatus==="success"?"healthy":R.health.buildStatus==="unknown"?"warning":"error")}`,children:R.health.buildStatus==="success"?"healthy":R.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(Hx,{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 ${C(R.health.lintStatus==="pass"?"pass":R.health.lintStatus==="unknown"?"warn":"fail")}`,children:R.health.lintStatus==="pass"?"pass":R.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 ${C(R.health.securityAudit==="pass"?"pass":R.health.securityAudit==="unknown"?"warn":"fail")}`,children:R.health.securityAudit==="pass"?"pass":R.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 ${C(R.health.overallScore>=80?"up-to-date":R.health.overallScore>=60?"outdated":"vulnerable")}`,children:R.health.overallScore>=80?"up-to-date":R.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"})})})]},R.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(lt,{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(Dt,{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(_a,{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 t1({packageCount:r,onNewRelease:s}){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 (",r," packages)"]})]}),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(Df,{className:"w-5 h-5"}),t.jsx("span",{children:"New Release"})]})]})}function n1({stats:r}){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(li,{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:r.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:r.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(Mn,{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:r.published})]})]})})]})}const r1=r=>({readyToPublish:r.filter(s=>s.status==="ready").length,inProgress:r.filter(s=>s.status==="building"||s.status==="testing").length,published:r.filter(s=>s.status==="published").length}),vh=r=>{switch(r){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"}},s1=r=>{switch(r){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"}},a1=(r,s)=>s==="all"?r:r.filter(l=>l.name===s);function l1({packages:r,selectedPackage:s,onPackageChange:l}){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:s,onChange:i=>l(i.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(r.map(i=>i.name))].map(i=>t.jsx("option",{value:i,children:i},i))]})]})]})}),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:r.map(i=>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(Mc,{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:i.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:[Object.keys(i.dependencies).length," dependencies"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.currentVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.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 ${s1(i.publishType)}`,children:i.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 ${vh(i.status)}`,children:i.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.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(He,{className:"w-4 h-4 mr-1 text-gray-400"}),i.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:[i.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"})]})})]},i.name))})]})})]})}function i1({releases:r,selectedStatus:s,onStatusChange:l}){const i=[{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:s,onChange:c=>l(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 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:i.map(c=>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(Ff,{className:"w-4 h-4 text-purple-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[c.packageName," v",c.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["by ",c.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 ${vh(c.status)}`,children:c.status}),t.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[t.jsx(He,{className:"w-4 h-4 mr-1"}),c.scheduledFor]})]})]}),t.jsx("div",{className:"mt-3 text-sm text-gray-700",children:c.changelog})]},c.id))})})]})}function o1(){const r=[{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"}],s=l=>{switch(l){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:r.map(l=>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(Mc,{className:"w-4 h-4 text-blue-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[l.packageName," v",l.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:[l.date," • by ",l.author]})]})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${s(l.type)}`,children:l.type})]}),t.jsx("div",{className:"space-y-1",children:l.changes.map((i,c)=>t.jsxs("div",{className:"flex items-start space-x-2",children:[t.jsx(Ic,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),t.jsx("span",{className:"text-sm text-gray-700",children:i})]},c))})]},l.id))})})]})}function c1(){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 u1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}const of=[{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"}],d1=[{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 m1(){const[r,s]=w.useState("all"),[l,i]=w.useState("all"),[c,d]=w.useState(of),[m,p]=w.useState(!1),[h,g]=w.useState(null);w.useEffect(()=>{(async()=>{try{p(!0);const M=(await Ft.getPackages()).map(P=>({name:P.name,currentVersion:P.version,nextVersion:v(P.version),status:y(P.status),lastPublished:P.lastUpdated,changelog:P.description||"No changelog available",commits:Math.floor(Math.random()*20)+1,dependencies:P.dependencies||[],publishType:C()}));d(M),g(null)}catch(R){g(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",R),d(of)}finally{p(!1)}})()},[]);const v=U=>{const R=U.split(".").map(Number);return R[2]+=1,R.join(".")},y=U=>{switch(U){case"healthy":return"ready";case"warning":return"testing";case"error":return"failed";case"building":return"building";default:return"ready"}},C=()=>{const U=["patch","minor","major","prerelease"];return U[Math.floor(Math.random()*U.length)]},F=()=>{},N=()=>{window.location.reload()},_=a1(c,r),b=r1(c);return m?t.jsx(c1,{}):h?t.jsx(u1,{error:h,onRetry:N}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(t1,{packageCount:c.length,onNewRelease:F}),t.jsx(n1,{stats:b}),t.jsx(l1,{packages:_,selectedPackage:r,onPackageChange:s}),t.jsx(i1,{releases:d1,selectedStatus:l,onStatusChange:i}),t.jsx(o1,{})]})}function f1({message:r="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:r})]})})}function h1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function p1({onTriggerBuild:r,onCreatePipeline:s}){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:r,className:"btn-secondary flex items-center space-x-2",children:[t.jsx(li,{className:"w-5 h-5"}),t.jsx("span",{children:"Trigger Build"})]}),t.jsxs("button",{onClick:s,className:"btn-primary flex items-center space-x-2",children:[t.jsx(Dx,{className:"w-5 h-5"}),t.jsx("span",{children:"New Pipeline"})]})]})]})}const ri=r=>{switch(r){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"}},x1=r=>{switch(r){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"}},g1=r=>{const s=r.length,l=r.filter(h=>h.status==="success").length,i=r.filter(h=>h.status==="failed").length,c=r.filter(h=>h.status==="running").length,d=s>0?Math.round(l/s*100):0,m=r.filter(h=>h.duration),p=m.length>0?Math.round(m.reduce((h,g)=>h+(g.duration||0),0)/m.length):0;return{total:s,successful:l,failed:i,running:c,successRate:d,avgDuration:p}},y1=(r,s)=>r.filter(l=>{const i=s.package==="all"||l.packageName===s.package,c=s.status==="all"||l.status===s.status;return i&&c&&!0}),v1=r=>[...new Set(r.map(s=>s.packageName))],j1=r=>[...new Set(r.map(s=>s.status))],ka=r=>{if(r<60)return`${r}s`;if(r<3600){const s=Math.floor(r/60),l=r%60;return l>0?`${s}m ${l}s`:`${s}m`}else{const s=Math.floor(r/3600),l=Math.floor(r%3600/60);return l>0?`${s}h ${l}m`:`${s}h`}},cf=r=>new Date(r).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),jh=r=>{const s=new Date(r),i=new Date().getTime()-s.getTime(),c=Math.floor(i/(1e3*60)),d=Math.floor(c/60),m=Math.floor(d/24);return c<1?"Just now":c<60?`${c} min ago`:d<24?`${d} hour${d>1?"s":""} ago`:`${m} day${m>1?"s":""} ago`},w1=r=>{if(r.status==="success"||r.status==="failed"||r.status==="cancelled")return 100;if(r.status==="pending")return 0;const s=r.stages.length;if(s===0)return 0;const l=r.stages.filter(d=>d.status==="success"||d.status==="failed"||d.status==="skipped").length,i=r.stages.filter(d=>d.status==="running").length,c=(l+i*.5)/s;return Math.round(c*100)},N1=r=>{const s=r.toLowerCase();return s.includes("build")||s.includes("compile")?"🔨":s.includes("test")?"🧪":s.includes("lint")||s.includes("format")?"✨":s.includes("deploy")||s.includes("publish")?t.jsx(Mn,{className:"w-6 h-6 text-primary-600"}):s.includes("security")||s.includes("audit")?"🔒":s.includes("install")||s.includes("dependencies")?t.jsx(Ut,{className:"w-6 h-6 text-primary-600"}):t.jsx(Ur,{className:"w-6 h-6 text-primary-600"})},b1=r=>r.status==="failed"?"critical":r.status==="paused"?"warning":r.successRate<70?"critical":r.successRate<85?"warning":"healthy",wh=r=>r.substring(0,8);function S1({stats:r,onRefresh:s,loading:l=!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:s,disabled:l,className:"btn-ghost",children:[t.jsx(fr,{className:`w-4 h-4 mr-2 ${l?"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(_a,{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:r.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(At,{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:r.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(Dt,{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:r.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(He,{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:r.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 ${r.successRate>=90?"text-success-600":r.successRate>=70?"text-warning-600":"text-error-600"}`,children:[r.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 ${r.successRate>=90?"bg-success-500":r.successRate>=70?"bg-warning-500":"bg-error-500"}`,style:{width:`${r.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:ka(r.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:[r.total>0?Math.round(r.successful/r.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:[r.total>0?Math.round(r.failed/r.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:r.running}),t.jsx("div",{className:"text-caption",children:"Active Builds"})]})]})]})]})}function k1({builds:r,selectedBuild:s,onBuildSelect:l,filters:i,onFiltersChange:c}){const d=v1(r),m=j1(r),p=h=>{switch(h){case"success":return t.jsx(At,{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(He,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Dt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(pc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(He,{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(ci,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.package,onChange:h=>c({...i,package:h.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"}),d.map(h=>t.jsx("option",{value:h,children:h},h))]})]}),t.jsxs("select",{value:i.status,onChange:h=>c({...i,status:h.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"}),m.map(h=>t.jsx("option",{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]}),t.jsxs("select",{value:i.dateRange,onChange:h=>c({...i,dateRange:h.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:[r.length," build",r.length!==1?"s":""," found"]})]}),r.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:r.map(h=>{const g=w1(h),v=s===h.id;return t.jsxs("div",{className:`p-4 cursor-pointer transition-colors ${v?"bg-blue-50 border-l-4 border-blue-500":"hover:bg-gray-50"}`,onClick:()=>l(v?null:h.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[p(h.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:h.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:h.branch}),t.jsx("span",{className:"text-xs text-gray-500 font-mono",children:wh(h.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 ${ri(h.status)}`,children:h.status}),t.jsxs("span",{className:"text-xs text-gray-500",children:["by ",h.triggeredBy]}),t.jsx("span",{className:"text-xs text-gray-500",children:jh(h.startTime)})]})]})]}),t.jsxs("div",{className:"text-right",children:[h.duration&&t.jsx("div",{className:"text-sm font-medium text-gray-900",children:ka(h.duration)}),h.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:`${g}%`}})}),t.jsxs("span",{className:"text-xs text-gray-500",children:[g,"%"]})]})})]})]}),v&&h.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:h.stages.map((y,C)=>t.jsx("div",{className:`flex items-center px-2 py-1 text-xs rounded ${ri(y.status)}`,title:`${y.name}: ${y.status}`,children:y.name},y.name))})})]},h.id)})})]})]})}function E1({pipelines:r,onPipelineSelect:s,onPipelineToggle:l}){const i=d=>{switch(d){case"healthy":return t.jsx(At,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(lt,{className:"w-5 h-5 text-yellow-500"});case"critical":return t.jsx(Dt,{className:"w-5 h-5 text-red-500"});default:return t.jsx(Ur,{className:"w-5 h-5 text-gray-500"})}},c=d=>{switch(d){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 r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Ur,{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:[r.length," pipeline",r.length!==1?"s":""," ","configured"]})]}),t.jsx("div",{className:"divide-y divide-gray-200",children:r.map(d=>{const m=b1(d);return t.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>s(d.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[i(m),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:d.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:d.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 ${ri(d.status)}`,children:d.status}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(m)}`,children:m})]})]})]}),t.jsx("div",{className:"flex items-center space-x-4",children:t.jsx("button",{onClick:p=>{p.stopPropagation(),l(d.id,d.status!=="active")},className:`p-2 rounded-lg transition-colors ${d.status==="active"?"text-green-600 hover:bg-green-100":"text-gray-400 hover:bg-gray-100"}`,title:d.status==="active"?"Pause Pipeline":"Activate Pipeline",children:d.status==="active"?t.jsx($x,{className:"w-5 h-5"}):t.jsx(li,{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 ${d.successRate>=90?"text-green-600":d.successRate>=70?"text-yellow-600":"text-red-600"}`,children:[d.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:ka(d.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:jh(d.lastRun)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Triggers:"}),t.jsx("div",{className:"font-medium text-gray-900",children:d.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:[d.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 ${d.successRate>=90?"bg-green-500":d.successRate>=70?"bg-yellow-500":"bg-red-500"}`,style:{width:`${d.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:"}),d.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))]})})]},d.id)})})]})}function C1({build:r,onClose:s,onCancel:l,onRetry:i}){if(!r)return null;const c=d=>{switch(d){case"success":return t.jsx(At,{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(He,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Dt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(pc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(He,{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:[c(r.status),t.jsxs("div",{children:[t.jsxs("h2",{className:"text-xl font-semibold text-gray-900",children:[r.packageName," Build"]}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.branch," • ",wh(r.commit)]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[r.status==="running"&&l&&t.jsxs("button",{onClick:()=>l(r.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(pc,{className:"w-4 h-4 mr-1"}),"Cancel"]}),(r.status==="failed"||r.status==="cancelled")&&i&&t.jsxs("button",{onClick:()=>i(r.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(fr,{className:"w-4 h-4 mr-1"}),"Retry"]}),t.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Ss,{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 ${ri(r.status)}`,children:r.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:cf(r.startTime)})]}),r.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:cf(r.endTime)})]}),r.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:ka(r.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:r.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"}),r.artifacts.length>0?t.jsx("div",{className:"space-y-1",children:r.artifacts.map((d,m)=>t.jsx("div",{className:"text-sm",children:t.jsx("a",{href:"#",className:"text-blue-600 hover:text-blue-500 font-medium",children:d})},m))}):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:r.stages.map((d,m)=>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:N1(d.name)}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:d.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 ${x1(d.status)}`,children:d.status}),d.duration&&t.jsx("span",{className:"text-xs text-gray-500",children:ka(d.duration)})]})]})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",m+1," of ",r.stages.length]})]}),d.logs&&d.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:d.logs.map((p,h)=>t.jsx("div",{className:"mb-1",children:p},h))})]})]},d.name))})]})]})]})})}const _1=[{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 T1(){const[r,s]=w.useState(!0),[l,i]=w.useState(null),[c,d]=w.useState([]),[m]=w.useState(_1),[p,h]=w.useState(null),[g,v]=w.useState({package:"all",status:"all",pipeline:"all",dateRange:"all"});w.useEffect(()=>{(async()=>{try{s(!0);const xe=(await Ft.getBuildStatus()).map(Ne=>({id:Ne.id||Math.random().toString(36).substr(2,9),packageName:Ne.package||Ne.packageName||"unknown",branch:Ne.branch||"main",commit:Ne.commit||"unknown",status:Ne.status||"pending",startTime:Ne.startTime||new Date().toISOString(),endTime:Ne.endTime,duration:Ne.duration,stages:Ne.stages||[],triggeredBy:Ne.triggeredBy||"system",artifacts:Ne.artifacts||[]}));d(xe),i(null)}catch(oe){i(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching build data:",oe)}finally{s(!1)}})()},[]);const y=y1(c,g),C=g1(c),F=p&&c.find(z=>z.id===p)||null,N=()=>{window.location.reload()},_=()=>{console.log("Triggering new build...")},b=()=>{console.log("Creating new pipeline...")},U=z=>{h(z)},R=z=>{console.log("Selected pipeline:",z)},M=(z,oe)=>{console.log("Toggle pipeline:",z,"active:",oe)},P=z=>{console.log("Cancelling build:",z),h(null)},W=z=>{console.log("Retrying build:",z),h(null)},ae=()=>{window.location.reload()};return r?t.jsx(f1,{}):l?t.jsx(h1,{error:l,onRetry:ae}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(p1,{onTriggerBuild:_,onCreatePipeline:b}),t.jsx(S1,{stats:C,onRefresh:N,loading:r}),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(k1,{builds:y,selectedBuild:p,onBuildSelect:U,filters:g,onFiltersChange:v})}),t.jsx("div",{className:"lg:col-span-1",children:t.jsx(E1,{pipelines:m,onPipelineSelect:R,onPipelineToggle:M})})]}),t.jsx(C1,{build:F,onClose:()=>h(null),onCancel:P,onRetry:W}),y.length===0&&c.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:()=>v({package:"all",status:"all",pipeline:"all",dateRange:"all"}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]}),c.length===0&&!r&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:t.jsx(Mn,{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:_,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:b,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})]})]})}function R1({message:r="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:r})]})})}function A1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function P1({onRefresh:r,loading:s=!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"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,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(fr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Nh(r){return typeof r>"u"||r===null}function L1(r){return typeof r=="object"&&r!==null}function O1(r){return Array.isArray(r)?r:Nh(r)?[]:[r]}function I1(r,s){var l,i,c,d;if(s)for(d=Object.keys(s),l=0,i=d.length;l<i;l+=1)c=d[l],r[c]=s[c];return r}function M1(r,s){var l="",i;for(i=0;i<s;i+=1)l+=r;return l}function D1(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}var F1=Nh,U1=L1,B1=O1,z1=M1,H1=D1,$1=I1,Wc={isNothing:F1,isObject:U1,toArray:B1,repeat:z1,isNegativeZero:H1,extend:$1};function bh(r,s){var l="",i=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(l+='in "'+r.mark.name+'" '),l+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!s&&r.mark.snippet&&(l+=`
13
+ `+d):i.stack=d}catch{}}throw i}}_request(s,l){typeof s=="string"?(l=l||{},l.url=s):l=s||{},l=Ur(this.defaults,l);const{transitional:i,paramsSerializer:c,headers:d}=l;i!==void 0&&Ql.assertOptions(i,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean),legacyInterceptorReqResOrdering:qt.transitional(qt.boolean)},!1),c!=null&&(I.isFunction(c)?l.paramsSerializer={serialize:c}:Ql.assertOptions(c,{encode:qt.function,serialize:qt.function},!0)),l.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?l.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:l.allowAbsoluteUrls=!0),Ql.assertOptions(l,{baseUrl:qt.spelling("baseURL"),withXsrfToken:qt.spelling("withXSRFToken")},!0),l.method=(l.method||this.defaults.method||"get").toLowerCase();let m=d&&I.merge(d.common,d[l.method]);d&&I.forEach(["delete","get","head","post","put","patch","common"],N=>{delete d[N]}),l.headers=Rt.concat(m,d);const p=[];let h=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(l)===!1)return;h=h&&_.synchronous;const b=l.transitional||Bc;b&&b.legacyInterceptorReqResOrdering?p.unshift(_.fulfilled,_.rejected):p.push(_.fulfilled,_.rejected)});const g=[];this.interceptors.response.forEach(function(_){g.push(_.fulfilled,_.rejected)});let v,y=0,C;if(!h){const N=[Xm.bind(this),void 0];for(N.unshift(...p),N.push(...g),C=N.length,v=Promise.resolve(l);y<C;)v=v.then(N[y++],N[y++]);return v}C=p.length;let F=l;for(;y<C;){const N=p[y++],_=p[y++];try{F=N(F)}catch(b){_.call(this,b);break}}try{v=Xm.call(this,F)}catch(N){return Promise.reject(N)}for(y=0,C=g.length;y<C;)v=v.then(g[y++],g[y++]);return v}getUri(s){s=Ur(this.defaults,s);const l=rh(s.baseURL,s.url,s.allowAbsoluteUrls);return Zf(l,s.params,s.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(s){Dr.prototype[s]=function(l,i){return this.request(Ur(i||{},{method:s,url:l,data:(i||{}).data}))}});I.forEach(["post","put","patch"],function(s){function l(i){return function(d,m,p){return this.request(Ur(p||{},{method:s,headers:i?{"Content-Type":"multipart/form-data"}:{},url:d,data:m}))}}Dr.prototype[s]=l(),Dr.prototype[s+"Form"]=l(!0)});let _y=class oh{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let l;this.promise=new Promise(function(d){l=d});const i=this;this.promise.then(c=>{if(!i._listeners)return;let d=i._listeners.length;for(;d-- >0;)i._listeners[d](c);i._listeners=null}),this.promise.then=c=>{let d;const m=new Promise(p=>{i.subscribe(p),d=p}).then(c);return m.cancel=function(){i.unsubscribe(d)},m},s(function(d,m,p){i.reason||(i.reason=new La(d,m,p),l(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const l=this._listeners.indexOf(s);l!==-1&&this._listeners.splice(l,1)}toAbortSignal(){const s=new AbortController,l=i=>{s.abort(i)};return this.subscribe(l),s.signal.unsubscribe=()=>this.unsubscribe(l),s.signal}static source(){let s;return{token:new oh(function(c){s=c}),cancel:s}}};function Ty(r){return function(l){return r.apply(null,l)}}function Ry(r){return I.isObject(r)&&r.isAxiosError===!0}const jc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jc).forEach(([r,s])=>{jc[s]=r});function ch(r){const s=new Dr(r),l=Hf(Dr.prototype.request,s);return I.extend(l,Dr.prototype,s,{allOwnKeys:!0}),I.extend(l,s,null,{allOwnKeys:!0}),l.create=function(c){return ch(Ur(r,c))},l}const qe=ch(Pa);qe.Axios=Dr;qe.CanceledError=La;qe.CancelToken=_y;qe.isCancel=th;qe.VERSION=ih;qe.toFormData=fi;qe.AxiosError=ge;qe.Cancel=qe.CanceledError;qe.all=function(s){return Promise.all(s)};qe.spread=Ty;qe.isAxiosError=Ry;qe.mergeConfig=Ur;qe.AxiosHeaders=Rt;qe.formToJSON=r=>eh(I.isHTMLForm(r)?new FormData(r):r);qe.getAdapter=lh.getAdapter;qe.HttpStatusCode=jc;qe.default=qe;const{Axios:dN,AxiosError:mN,CanceledError:fN,isCancel:hN,CancelToken:pN,VERSION:xN,all:gN,Cancel:yN,isAxiosError:vN,spread:jN,toFormData:wN,AxiosHeaders:NN,HttpStatusCode:bN,formToJSON:SN,getAdapter:kN,mergeConfig:EN}=qe,at={set:(r,s,l=7)=>{const i=new Date;i.setTime(i.getTime()+l*24*60*60*1e3);const c=[`${r}=${encodeURIComponent(s)}`,`expires=${i.toUTCString()}`,"path=/","SameSite=Lax",window.location.protocol==="https:"?"Secure":""].filter(Boolean).join("; ");document.cookie=c},get:r=>{const s=`${r}=`,l=document.cookie.split(";");for(let i=0;i<l.length;i++){const c=l[i].trim();if(c.indexOf(s)===0)return decodeURIComponent(c.substring(s.length))}return null},remove:r=>{document.cookie=`${r}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Lax`}};class Ay{constructor(s={}){const l=s.baseUrl||zf;this.axiosInstance=qe.create({baseURL:l,timeout:s.timeout||eg,headers:{"Content-Type":"application/json",...s.headers},withCredentials:!0}),this.attachAuthHandling()}attachAuthHandling(){this.axiosInstance.interceptors.request.use(s=>{const l=at.get("monodog_session_token");return l&&(s.headers=s.headers||{},s.headers.Authorization=`Bearer ${l}`),s}),this.axiosInstance.interceptors.response.use(s=>s,s=>(s.response?.status===401&&(at.remove("monodog_session_token"),at.remove("monodog_session_data")),Promise.reject(s)))}mapAxiosError(s){const l=s.response?.status||0,i=s.response?.statusText||s.message,c=s.response&&typeof s.response.data=="object"?s.response.data:void 0,m=s.response?.data?.rateLimit;let p;switch(l){case 400:p="VALIDATION";break;case 401:p="UNAUTHORIZED";break;case 403:p="FORBIDDEN";break;case 404:p="NOT_FOUND";break;case 408:p="TIMEOUT";break;case 429:p="RATE_LIMIT";break;case 500:case 502:case 503:case 504:p="SERVER_ERROR";break;default:p=l?`HTTP_${l}`:"UNKNOWN"}return console.error(`API error [${l}] ${i}`,{code:p,details:c}),{success:!1,error:{code:p,message:i,status:l,details:typeof c=="object"&&c!==null&&"details"in c?c.details:void 0},meta:{status:l,statusText:i,headers:s.response?.headers||{},timestamp:Date.now(),duration:0},...m&&{rateLimit:m}}}async request(s,l,i={}){const c=`/api${l}`,d=Date.now();try{const m=await this.axiosInstance.request({method:s.toLowerCase(),url:c,data:i.body,headers:i.headers,timeout:i.timeout}),p=Date.now()-d,g=m.data?.rateLimit;return{success:!0,data:m.data,meta:{status:m.status,statusText:m.statusText,headers:m.headers,timestamp:Date.now(),duration:p},...g&&{rateLimit:g}}}catch(m){const p=Date.now()-d;if(qe.isAxiosError(m))return this.mapAxiosError(m);const h=m instanceof Error?m.message:"Unknown error";return console.error("Unexpected error in API client",h),{success:!1,error:{code:"UNKNOWN",message:h,status:0},meta:{timestamp:Date.now(),duration:p}}}}get(s,l){return this.request("GET",s,l||{})}post(s,l,i){return this.request("POST",s,{...i,body:l})}put(s,l,i){return this.request("PUT",s,{...i,body:l})}delete(s,l){return this.request("DELETE",s,l||{})}patch(s,l,i){return this.request("PATCH",s,{...i,body:l})}}var ef={};function Py(){const r=ef.REACT_APP_API_URL||ef.VITE_API_URL;if(r)return r;const s=window.ENV?.API_URL;return s||zf}const we=new Ay({baseUrl:Py(),timeout:tg,headers:{"Content-Type":"application/json"}}),uh=w.createContext(void 0),hs="monodog_session_token",ps="monodog_session_data";function Ly({children:r}){const[s,l]=w.useState(null),[i,c]=w.useState(!0),[d,m]=w.useState(null);w.useEffect(()=>{const N=at.get(hs),_=at.get(ps);if(N&&_)try{const b=JSON.parse(_);l({sessionToken:N,...b})}catch{at.remove(hs),at.remove(ps)}c(!1)},[]);const p=w.useCallback(async()=>{try{c(!0),m(null);const N=await we.get(Te.AUTH.LOGIN);if(!N.success)throw new Error(N.error.message||xc.LOGIN_FAILED);N.data.authUrl&&(window.location.href=N.data.authUrl)}catch(N){const _=N instanceof Error?N.message:xc.LOGIN_FAILED;m(_),c(!1)}},[]),h=w.useCallback(async(N,_)=>{try{c(!0),m(null);const b=await we.get(Te.AUTH.ME,{headers:{Authorization:`Bearer ${N}`}});if(!b.success)throw new Error(Ce.FAILED_TO_FETCH_USER_INFO);const U=b.data,R={sessionToken:N,user:U.user,scopes:U.scopes||[],expiresAt:U.expiresAt},M={user:U.user,scopes:U.scopes||[],permission:_||U.permission,expiresAt:U.expiresAt};at.set(hs,N),at.set(ps,JSON.stringify(M));const P={...R,permission:_||U.permission};return l(P),!0}catch(b){const U=b instanceof Error?b.message:"Auth failed";return m(U),!1}finally{c(!1)}},[]),g=w.useCallback(async()=>{try{c(!0),s?.sessionToken&&await we.post(Te.AUTH.LOGOUT,void 0),at.remove(hs),at.remove(ps),l(null)}catch(N){console.error("Logout error:",N)}finally{c(!1)}},[s]),v=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{const N=await we.post(Te.AUTH.VALIDATE,void 0);return N.success?N.data.valid===!0:(at.remove(hs),at.remove(ps),l(null),!1)}catch(N){return console.error("Session check error:",N),!1}},[s]),y=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{c(!0);const N=await we.post(Te.AUTH.REFRESH,void 0);if(!N.success)throw new Error(Ce.FAILED_TO_REFRESH_SESSION);const _=N.data;if(_.success&&_.sessionToken){const b={sessionToken:_.sessionToken,user:s.user,scopes:s.scopes,expiresAt:_.expiresAt};return at.set(hs,_.sessionToken),at.set(ps,JSON.stringify({user:s.user,scopes:s.scopes,expiresAt:_.expiresAt})),l(b),!0}return!1}catch(N){return console.error("Session refresh error:",N),!1}finally{c(!1)}},[s]);w.useEffect(()=>{if(!s)return;const N=setInterval(()=>{v()},300*1e3);return()=>clearInterval(N)},[s,v]);const C=w.useCallback(N=>{if(!s)return console.warn("[Auth] No session available for permission check"),!1;const _={admin:4,maintain:3,write:2,read:1,none:0};let b="read";const U=s.permission;typeof U=="string"?b=U:U&&typeof U=="object"&&(U.level?b=U.level:U.permission&&(b=U.permission));const R=_[b]||0,M=_[N]||0;return R>=M},[s]),F={session:s,isAuthenticated:!!s,isLoading:i,error:d,login:p,logout:g,checkSession:v,refreshSession:y,hasPermission:C,permission:(()=>{const N=s?.permission;return N&&N.level||null})()};return window.__authContext={handleOAuthCallback:h},t.jsx(uh.Provider,{value:F,children:r})}function Br(){const r=Sf.useContext(uh);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r}const tf=[{name:"Dashboard",href:"/",icon:Ax},{name:"Packages",href:"/packages",icon:Ut},{name:"Dependencies",href:"/dependencies",icon:_a},{name:"Health Status",href:"/health",icon:Lc},{name:"Release",href:"/release",icon:Df},{name:"Pipeline",href:"/pipeline",icon:Mn},{name:"Configuration",href:"/config",icon:Fr}];function Oy({children:r}){const s=bs(),{session:l,logout:i}=Br();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:tf.map(c=>{const d=s.pathname===c.href;return t.jsx("li",{children:t.jsxs(On,{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:tf.find(c=>c.href===s.pathname)?.name||"Dashboard"})}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex flex-col items-end text-sm",children:t.jsx("button",{className:"font-medium",onClick:i,title:"Logout",children:t.jsx(qx,{})})}),t.jsxs("div",{className:"flex flex-col items-end text-sm",children:[l&&t.jsx("span",{className:"font-medium text-primary-700",children:l.user?.login??"anonymous"}),l&&t.jsx("span",{className:"text-neutral-500",children:l.permission?.role??"Denied"})]}),t.jsx("img",{src:l.user?.avatar_url??"",alt:"User Avatar",className:"h-8 w-8 rounded-full border border-neutral-200"})]})]}),t.jsx("main",{className:"p-6",children:r})]})]})}function Iy({isOpen:r,onClose:s,children:l}){return r?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:i=>i.stopPropagation(),children:l})}):null}function My({onSave:r,onClose:s}){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(Uf,{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:r,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(ai,{className:"w-5 h-5"}),t.jsx("span",{children:"Save"})]}),t.jsxs("button",{onClick:s,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(Ss,{className:"w-5 h-5"}),t.jsx("span",{children:"Cancel"})]})]})]})}const Dy=()=>[{id:"general",label:"General",icon:t.jsx(Fr,{className:"w-6 h-6 text-primary-600"})},{id:"features",label:"Features",icon:t.jsx(Mn,{className:"w-6 h-6 text-primary-600"})},{id:"branding",label:"Branding",icon:"🎨"},{id:"monorepo",label:"Monorepo",icon:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}],Fy=()=>({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"]}}),nf=r=>{const s=Fy();return{...s,...r,features:{...s.features,...r.features},branding:{...s.branding,...r.branding},monorepo:{...s.monorepo,...r.monorepo}}},Uy=r=>{const s=[];return(!r.title||r.title.trim()==="")&&s.push("Dashboard title is required"),r.monorepo?.directories&&r.monorepo.directories.length===0&&s.push("At least one package directory is required"),r.branding?.primaryColor&&!rf(r.branding.primaryColor)&&s.push("Primary color must be a valid hex color"),r.branding?.secondaryColor&&!rf(r.branding.secondaryColor)&&s.push("Secondary color must be a valid hex color"),{isValid:s.length===0,errors:s}},rf=r=>/^#[0-9A-F]{6}$/i.test(r),ti=r=>r.split(",").map(s=>s.trim()).filter(s=>s.length>0),ni=r=>r?r.join(", "):"",By=r=>r.replace(/([A-Z])/g," $1").trim();function zy({activeTab:r,onTabChange:s}){const l=Dy();return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8 px-6",children:l.map(i=>t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.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:i.icon}),t.jsx("span",{children:i.label})]},i.id))})})}function sf({config:r,onConfigChange:s}){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:r.title||"",onChange:l=>s({title:l.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:r.description||"",onChange:l=>s({description:l.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:ni(r.packageTypes),onChange:l=>s({packageTypes:ti(l.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:ni(r.customFields),onChange:l=>s({customFields:ti(l.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 Hy({config:r,onConfigChange:s}){const l=(i,c)=>{s({features:{...r.features,[i]:c}})};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(r.features||{}).map(([i,c])=>t.jsxs("label",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:c,onChange:d=>l(i,d.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:By(i)})]},i))}),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 $y({config:r,onConfigChange:s}){const l=(i,c)=>{s({branding:{...r.branding,[i]:c}})};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:r.branding?.logo||"",onChange:i=>l("logo",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:"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:r.branding?.primaryColor||"#3B82F6",onChange:i=>l("primaryColor",i.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:r.branding?.primaryColor||"#3B82F6",onChange:i=>l("primaryColor",i.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:r.branding?.secondaryColor||"#1E40AF",onChange:i=>l("secondaryColor",i.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:r.branding?.secondaryColor||"#1E40AF",onChange:i=>l("secondaryColor",i.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:r.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:r.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:r.branding?.primaryColor||"#3B82F6"},children:"Sample Button"})]})]})]})})}function Vy({config:r,onConfigChange:s}){const l=(i,c)=>{s({monorepo:{...r.monorepo,[i]:c}})};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:r.monorepo?.structure||"standard",onChange:i=>l("structure",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",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:r.monorepo?.packageManager||"pnpm",onChange:i=>l("packageManager",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",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:ni(r.monorepo?.directories),onChange:i=>l("directories",ti(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:"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:ni(r.monorepo?.ignorePatterns),onChange:i=>l("ignorePatterns",ti(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:"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:r.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:r.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:[r.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:[r.monorepo?.ignorePatterns?.length||0," patterns"]})]})]})]}),r.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:[r.monorepo.packageManager.toUpperCase()," Configuration Tips"]}),t.jsxs("div",{className:"text-xs text-blue-800",children:[r.monorepo.packageManager==="pnpm"&&t.jsx("p",{children:"Make sure you have a pnpm-workspace.yaml file in your root directory."}),r.monorepo.packageManager==="npm"&&t.jsx("p",{children:'Configure workspaces in your package.json with the "workspaces" field.'}),r.monorepo.packageManager==="yarn"&&t.jsx("p",{children:"Ensure you have workspaces configured in your package.json."}),r.monorepo.packageManager==="lerna"&&t.jsx("p",{children:"Make sure you have a lerna.json configuration file in your root."}),r.monorepo.packageManager==="nx"&&t.jsx("p",{children:"Ensure you have an nx.json configuration file in your workspace root."})]})]})]})})}function Wy({isOpen:r,onClose:s,onSave:l,currentConfig:i}){const[c,d]=w.useState(nf(i)),[m,p]=w.useState("general");w.useEffect(()=>{d(nf(i))},[i]);const h=()=>{const y=Uy(c);y.isValid||console.warn("Configuration validation errors:",y.errors),l(c),s()},g=y=>{d(C=>({...C,...y}))},v=()=>{const y={config:c,onConfigChange:g};switch(m){case"general":return t.jsx(sf,{...y});case"features":return t.jsx(Hy,{...y});case"branding":return t.jsx($y,{...y});case"monorepo":return t.jsx(Vy,{...y});default:return t.jsx(sf,{...y})}};return t.jsxs(Iy,{isOpen:r,onClose:s,children:[t.jsx(My,{onSave:h,onClose:s}),t.jsx(zy,{activeTab:m,onTabChange:p}),t.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:v()})]})}function Gy({isOpen:r,onClose:s,children:l}){return r?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:i=>i.stopPropagation(),children:l})}):null}function Ky({onClose:r}){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:r,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Ss,{className:"w-6 h-6"})})]})}function qy({progress:r}){const{currentStep:s,totalSteps:l,completedSteps:i}=r,c=(s+1)/l*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 ",s+1," of ",l]}),t.jsxs("span",{className:"text-sm text-gray-500",children:[i," 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:`${c}%`}})})]})}function Yy({step:r,onStepComplete:s}){const l=()=>{switch(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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(ys,{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(ys,{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(ys,{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:()=>s(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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:()=>s(r.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:r.title}),t.jsx("p",{className:"text-gray-600 mb-4",children:r.description})]}),l()]})}function Qy({currentStep:r,totalSteps:s,canGoNext:l,canGoPrevious:i,onNext:c,onPrevious:d,onComplete:m,isLastStep:p}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-gray-200",children:[t.jsx("button",{onClick:d,disabled:!i,className:`px-4 py-2 text-sm rounded-lg border transition-colors ${i?"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:s},(h,g)=>t.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${g<=r?"bg-blue-600":"bg-gray-300"}`},g))}),p?t.jsxs("button",{onClick:m,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(ai,{className:"w-4 h-4"}),t.jsx("span",{children:"Complete Setup"})]}):t.jsx("button",{onClick:c,disabled:!l,className:`px-4 py-2 text-sm rounded-lg transition-colors ${l?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Next"})]})}const Jy=()=>[{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}],Xy=(r,s)=>({currentStep:s,totalSteps:r.length,completedSteps:r.filter(l=>l.completed).length}),Zy=(r,s)=>{const l=r[s];return!l.required||l.completed},ev=r=>r.filter(l=>l.required).every(l=>l.completed),tv=(r,s)=>r.map(l=>l.id===s?{...l,completed:!0}:l);function nv({isOpen:r,onClose:s,onComplete:l}){const[i,c]=w.useState(0),[d,m]=w.useState(Jy()),p=b=>{const U=tv(d,b);m(U),U[i].completed&&i<d.length-1&&c(M=>M+1)},h=()=>{i<d.length-1&&c(b=>b+1)},g=()=>{i>0&&c(b=>b-1)},v=()=>{ev(d)&&(l(),s())},y=Xy(d,i),C=Zy(d,i),F=i>0,N=i===d.length-1,_=d[i];return t.jsxs(Gy,{isOpen:r,onClose:s,children:[t.jsx(Ky,{onClose:s}),t.jsx(qy,{progress:y}),t.jsx(Yy,{step:_,onStepComplete:p}),t.jsx(Qy,{currentStep:i,totalSteps:d.length,canGoNext:C,canGoPrevious:F,onNext:h,onPrevious:g,onComplete:v,isLastStep:N})]})}function rv({config:r,onShowSetupGuide:s,onShowConfig:l,onRefresh:i}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-3xl",children:r.title}),t.jsx("p",{className:"text-body mt-2",children:r.description}),t.jsx("button",{onClick:s,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:i,className:"btn-primary flex items-center space-x-2",children:[t.jsx(fr,{className:"w-5 h-5"}),t.jsx("span",{children:"Refresh"})]}),t.jsxs("button",{onClick:l,className:"hidden btn-ghost flex items-center space-x-2",children:[t.jsx(Uf,{className:"w-5 h-5"}),t.jsx("span",{children:"Configure"})]})]})]})}function sv({stats:r}){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(Ut,{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:r.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(Mn,{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:r.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(ii,{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:r.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(oi,{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:r.totalDependencies})]})]})})]})}function av(){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(On,{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(_a,{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(On,{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(Lc,{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(On,{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 lv({searchTerm:r,selectedType:s,packageTypes:l,onSearchChange:i,onTypeChange:c}){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(Dc,{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:r,onChange:d=>i(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-2",children:[t.jsx(ci,{className:"w-5 h-5 text-gray-400"}),t.jsxs("select",{value:s,onChange:d=>c(d.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"}),l.map(d=>t.jsx("option",{value:d,className:"capitalize",children:d},d))]})]})]})}function iv({packages:r,getTypeIcon:s,getStatusColor:l}){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:r.map(i=>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:s(i.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:i.name}),t.jsx("div",{className:"text-sm text-gray-500",children:i.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 ${l(i.type)}`,children:i.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.version}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(i.dependencies).length+Object.keys(i.devDependencies).length+Object.keys(i.peerDependencies).length}),t.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 max-w-xs truncate",children:i.description||"No description"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsx(On,{to:`/packages/${encodeURIComponent(i.name)}`,className:"text-blue-600 hover:text-blue-500",children:"View Details"})})]},i.name))})]})})}class ov{constructor(){this.mockPackages=[]}async getPackages(){try{const s=await we.get(Te.PACKAGES.LIST);if(s.success)return s.data;console.error(`getPackages: initial fetch failed with status ${s.error.status}. Attempting refresh...`);try{return await this.refreshPackages()}catch(l){return console.error("getPackages: refresh failed",l),[]}}catch(s){return console.error("getPackages: unexpected error",s),[]}}async getPackage(s){const l=await we.get(Te.PACKAGES.DETAILS(s));if(!l.success)throw new Error(`Failed to fetch package details for "${s}" (Status: ${l.error.status})`);return l.data}async getDependencies(){await new Promise(l=>setTimeout(l,200));const s=new Set;try{return(await this.getPackages()).forEach(c=>{c.dependencies?.forEach(d=>s.add(d))}),Array.from(s).map(c=>({name:c,version:"unknown",type:"dependency",status:"active"}))}catch(l){return console.error("Error fetching dependencies:",l),[]}}async refreshPackages(){try{const s=await we.post(Te.PACKAGES.REFRESH);return s.success?s.data:(console.error(`refreshPackages: fetch failed with status ${s.error.status}`),[])}catch(s){return console.error("refreshPackages: unexpected error",s),[]}}async getHealthStatus(){try{let s=await we.get(Te.HEALTH.PACKAGES);if(!s.success){if(!(await we.post(Te.HEALTH.REFRESH)).success)throw new Error("Failed to refresh health data");if(await new Promise(i=>setTimeout(i,1e3)),s=await we.get(Te.HEALTH.PACKAGES),!s.success)throw new Error("Failed to fetch health data after refresh")}return s.data}catch(s){throw console.error("Error fetching health data:",s),s}}async refreshHealthStatus(){try{const s=await we.post(Te.HEALTH.REFRESH);if(!s.success)throw new Error("Failed to fetch health data");return s.data}catch(s){console.error("Error fetching health data:",s)}}async getFallbackHealthStatus(){await new Promise(c=>setTimeout(c,400));const s=[{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"}],l=this.mockPackages.map(c=>({package:c.name,score:c.status==="healthy"?90:c.status==="warning"?70:50,issues:c.status==="healthy"?[]:["Needs attention"]}));return{overallScore:85,metrics:s,packageHealth:l}}async updatePackageConfiguration(s,l,i){try{const c=await we.put(Te.PACKAGES.UPDATE_CONFIG,JSON.stringify({packageName:s,config:l,packagePath:i}));if(!c.success)throw new Error(`HTTP error: ${c.error?.message}`);return c.data}catch(c){throw console.error("Error updating package configuration:",c),c}}async getBuildStatus(){await new Promise(l=>setTimeout(l,500));const s=[];for(const l of this.mockPackages){const i=l.scripts&&l.scripts.build,c=l.scripts&&l.scripts.test;if(i||c){const d=new Date(Date.now()-Math.random()*864e5).toISOString(),m=Math.random()>.8?"failed":Math.random()>.6?"building":Math.random()>.4?"queued":"success";s.push({id:`build-${l.name}-${Date.now()}`,package:l.name,status:m,startTime:d,endTime:m!=="building"?new Date(Date.now()-Math.random()*36e5).toISOString():void 0,duration:m!=="building"?Math.floor(Math.random()*300)+60:void 0,stages:this.generateBuildStages(l,m)})}}return s}async getConfigurationFiles(){try{const s=await we.get(Te.CONFIG.FILES);if(!s.success)throw new Error(`Failed to fetch config files: ${s.error?.message}`);const l=s.data;if(l.success&&l.files)return l.files;throw new Error("Invalid response format from config files API")}catch(s){return console.error("Error fetching configuration files from backend:",s),[]}}async saveConfigurationFile(s,l){try{const i=await we.put(Te.CONFIG.FILE(s),JSON.stringify({content:l}));if(!i.success)throw new Error(i.error?.message||"Failed to save file");const c=i.data;if(c.success&&c.file)return c.file;throw new Error("Invalid response format from save file API")}catch(i){throw console.error("Error saving configuration file:",i),i}}generateBuildStages(s,l){const i=[{name:"Install",status:"success",duration:Math.floor(Math.random()*30)+10,logs:["Installing dependencies...","Dependencies installed successfully"]},{name:"Lint",status:l==="failed"&&Math.random()>.7?"failed":"success",duration:Math.floor(Math.random()*20)+5,logs:["Running ESLint...","Linting completed"]},{name:"Test",status:l==="failed"&&Math.random()>.5?"failed":"success",duration:Math.floor(Math.random()*60)+30,logs:["Running tests...","Test suite completed"]},{name:"Build",status:l==="failed"?"failed":"success",duration:Math.floor(Math.random()*120)+60,logs:["Building package...","Build completed successfully"]}];if(l==="building"){const c=Math.floor(Math.random()*i.length);i[c].status="running",i.slice(c+1).forEach(d=>d.status="pending")}return i}}const Ft=new ov,cv=r=>({total:r.length,apps:r.filter(s=>s.type==="app").length,libs:r.filter(s=>s.type==="lib").length,tools:r.filter(s=>s.type==="tool").length,custom:r.filter(s=>!["app","Plib","tool"].includes(s.type)).length,totalDependencies:r.reduce((s,l)=>s+Object.keys(l.dependencies).length+Object.keys(l.peerDependencies).length+Object.keys(l.devDependencies).length,0)}),uv=r=>[...new Set(r.map(s=>s.type))],dv=(r,s,l)=>r.filter(i=>{const c=i.name.toLowerCase().includes(s.toLowerCase())||i.description?.toLowerCase().includes(s.toLowerCase()),d=l==="all"||i.type===l;return c&&d}),mv=r=>{switch(r){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"}},fv=r=>{switch(r){case"app":return t.jsx(Mn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ii,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}};function $c({message:r="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:r})]})})}function dh({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function hv({stats:r}){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(Ut,{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:r.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(At,{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:r.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(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:"Warnings"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.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(Dt,{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:r.errors})]})]})})]})}function pv({filters:r,onFiltersChange:s,availableTypes:l,availableStatuses:i}){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(Dc,{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:r.search,onChange:c=>s({...r,search:c.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(ci,{className:"h-5 w-5 text-gray-400"}),t.jsxs("select",{value:r.type,onChange:c=>s({...r,type:c.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"}),l.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]}),t.jsxs("select",{value:r.status,onChange:c=>s({...r,status:c.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"}),i.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]})]})})}const xv=r=>({total:r.length,healthy:r.filter(s=>s.status==="healthy").length,warnings:r.filter(s=>s.status==="warning").length,errors:r.filter(s=>s.status==="error").length}),gv=r=>[...new Set(r.map(s=>s.type))],yv=r=>[...new Set(r.map(s=>s.status))],vv=(r,s)=>r.filter(l=>{const i=l.name.toLowerCase().includes(s.search.toLowerCase())||l.description.toLowerCase().includes(s.search.toLowerCase()),c=s.type==="all"||l.type===s.type,d=s.status==="all"||l.status===s.status;return i&&c&&d}),jv=(r,s)=>[...r].sort((l,i)=>{let c,d;switch(s.field){case"name":c=l.name.toLowerCase(),d=i.name.toLowerCase();break;case"version":c=l.version,d=i.version;break;case"lastUpdated":c=new Date(l.lastUpdated),d=new Date(i.lastUpdated);break;case"dependencies":c=Object.keys(l.dependencies).length,d=Object.keys(i.dependencies).length;break;default:return 0}return c<d?s.order==="asc"?-1:1:c>d?s.order==="asc"?1:-1:0}),mh=r=>{switch(r){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"}},fh=r=>{switch(r){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"}},wv=r=>{switch(r){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"}},Nv=r=>{switch(r){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"}},Vc=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),hh=r=>r.startsWith("v")?r:`v${r}`,ph=r=>{switch(r){case"app":return t.jsx(Mn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ii,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";case"service":return"🌐";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}};function bv({packages:r,sorting:s,onSortChange:l}){const i=d=>{const m=s.field===d&&s.order==="asc"?"desc":"asc";l({field:d,order:m})},c=d=>s.field!==d?null:s.order==="asc"?t.jsx(Pc,{className:"w-4 h-4"}):t.jsx(Mf,{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:()=>i("name"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),c("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:()=>i("version"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Version"}),c("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:()=>i("dependencies"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),c("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:()=>i("lastUpdated"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Last Updated"}),c("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:r.map(d=>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:ph(d.type)}),t.jsxs("div",{children:[t.jsx(On,{to:`/packages/${encodeURIComponent(d.name)}`,className:"text-sm font-medium text-blue-600 hover:text-blue-500",children:d.name}),t.jsx("div",{className:"text-sm text-gray-500",children:d.description})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-900",children:hh(d.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 ${fh(d.type)}`,children:d.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 ${mh(d.status)}`,children:d.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(d.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(d.dependencies).slice(0,3).join(", "),Object.keys(d.dependencies).length>3&&` +${Object.keys(d.dependencies).length-3} more`]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Vc(d.lastUpdated)}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex -space-x-1",children:[d.maintainers.slice(0,3).map((m,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:m,children:m.charAt(0).toUpperCase()},m)),d.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:["+",d.maintainers.length-3]})]})})]},d.name))})]})})})}function Sv({packageData:r}){const s=l=>{switch(l){case"healthy":return t.jsx(At,{className:"h-5 w-5 text-green-500"});case"warning":return t.jsx(lt,{className:"h-5 w-5 text-yellow-500"});case"error":return t.jsx(lt,{className:"h-5 w-5 text-red-500"});default:return t.jsx(He,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-6",children:t.jsxs(On,{to:"/packages",className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-700",children:[t.jsx(Ix,{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:ph(r.type)}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:r.name}),t.jsx("p",{className:"text-gray-600 mt-1",children:r.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:hh(r.version)})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${fh(r.type)}`,children:r.type}),t.jsxs("div",{className:"flex items-center space-x-1",children:[s(r.status),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mh(r.status)}`,children:r.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:[r.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(Ff,{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:Vc(r.lastUpdated)})]})]}),t.jsxs("div",{className:"hidden flex items-center space-x-2",children:[t.jsx(Mx,{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:r.maintainers.length})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Mc,{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:r.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(oi,{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:r.repository.url||"",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-500",children:r.repository?.url?.split("/").pop()})})]})]})]}),r.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:r.tags.map(l=>t.jsx("span",{className:"inline-flex px-2 py-1 text-xs bg-gray-100 text-gray-700 rounded-full",children:l},l))})]})]})]})}function kv({activeTab:r,onTabChange:s}){const l=[{id:"overview",label:"Overview",icon:Ut},{id:"dependencies",label:"Dependencies",icon:Ic},{id:"commits",label:"Recent Commits",icon:He},{id:"health",label:"Health Metrics",icon:Lc},{id:"config",label:"Configuration",icon:Fr}];return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8",children:l.map(i=>{const c=i.icon;return t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[t.jsx(c,{className:"w-4 h-4"}),t.jsx("span",{children:i.label})]},i.id)})})})}function Ev({packageData:r}){if(!r.dependenciesInfo.length)return t.jsx("p",{className:"py-6 text-gray-600",children:"No dependency found."});const s=(l,i)=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:i}),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:l.map(c=>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:c.name})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:c.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:c.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 ${wv(c.status)}`,children:c.status.replace("-"," ")})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm",children:c.status!=="up-to-date"&&t.jsxs("button",{className:"text-blue-600 hover:text-blue-500 flex items-center space-x-1",children:[t.jsx(Pc,{className:"w-4 h-4"}),t.jsx("span",{children:"Update"})]})})]},c.name))})]})})]});return t.jsxs("div",{className:"py-6",children:[s(r.dependenciesInfo.filter(l=>l.type=="dependency"),"Dependencies"),s(r.dependenciesInfo.filter(l=>l.type=="devDependency"),"Dev Dependencies"),s(r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.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:r.dependenciesInfo.filter(l=>l.status==="major-update").length})]})]})]})]})}function Cv({packageData:r}){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:r.commits.map(s=>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 ${Nv(s.type)}`,children:s.type}),t.jsx("span",{className:"text-sm font-mono text-gray-500",children:s.hash})]}),t.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:s.message}),t.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[t.jsxs("span",{children:["by ",s.author]}),t.jsx("span",{children:Vc(s.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"})})]})},s.hash))}),r.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:r.commits.filter(s=>s.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:r.commits.filter(s=>s.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:r.commits.filter(s=>s.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:r.commits.filter(s=>s.type==="breaking").length})]})]})]})]})}function _v({packageData:r}){const s=d=>d>=80?"text-green-600":d>=60?"text-yellow-600":"text-red-600",l=d=>{switch(d){case"success":return t.jsx(At,{className:"w-5 h-5 text-green-500"});case"failed":return t.jsx(Dt,{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(lt,{className:"w-5 h-5 text-gray-500"})}},i=d=>{switch(d){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"}},c=d=>{switch(d){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 r.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 ${s(r.packageHealth.packageOverallScore)}`,children:[r.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 ${r.packageHealth.packageOverallScore>=80?"bg-green-500":r.packageHealth.packageOverallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.packageHealth.packageOverallScore}%`}})}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.packageHealth.packageOverallScore>=80&&"Excellent health - package is in great condition",r.packageHealth.packageOverallScore>=60&&r.packageHealth.packageOverallScore<80&&"Good health - minor issues detected",r.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"}),l(r.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 ${i(r.packageHealth.packageBuildStatus)}`,children:r.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 ${r.packageHealth.packageTestCoverage>=80?"text-green-600":r.packageHealth.packageTestCoverage>=60?"text-yellow-600":"text-red-600"}`,children:[r.packageHealth.packageTestCoverage,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full ${r.packageHealth.packageTestCoverage>=80?"bg-green-500":r.packageHealth.packageTestCoverage>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.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"}),r.packageHealth.packageLintStatus==="pass"&&t.jsx(At,{className:"w-5 h-5 text-green-500"}),r.packageHealth.packageLintStatus==="fail"&&t.jsx(Dt,{className:"w-5 h-5 text-red-500"}),r.packageHealth.packageLintStatus==="warning"&&t.jsx(lt,{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 ${c(r.packageHealth.packageLintStatus)}`,children:r.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(r.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:r.dependenciesInfo.filter(d=>d.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:r.dependenciesInfo.filter(d=>d.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 ${r.packageHealth.packageBuildStatus==="success"?"text-green-600":r.packageHealth.packageBuildStatus==="failed"?"text-red-600":"text-yellow-600"}`,children:r.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:[r.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 ${r.packageHealth.packageLintStatus==="pass"?"text-green-600":r.packageHealth.packageLintStatus==="fail"?"text-red-600":"text-yellow-600"}`,children:r.packageHealth.packageLintStatus})]})]})]})]})]})]}):t.jsx("p",{className:"py-6 text-gray-600",children:"No health data available."})}function Tv({packageData:r}){const[s,l]=w.useState(!1),[i,c]=w.useState(""),[d,m]=w.useState(!1),[p,h]=w.useState(""),[g,v]=w.useState(null),[y,C]=w.useState(!1),F=()=>{const M={name:r.name,version:r.version,description:r.description||"",license:r.license||"",repository:r.repository||{},scripts:r.scripts||{},dependencies:r.dependencies||{},devDependencies:r.devDependencies||{},peerDependencies:r.peerDependencies||{}};return JSON.stringify(M,null,2)};w.useState(()=>{c(F())});const N=()=>{l(!0),c(F()),h("")},_=()=>{l(!1),c(F()),h("")},b=async()=>{if(!i.trim()){h("Configuration cannot be empty");return}m(!0),h("");try{const M=await Ft.updatePackageConfiguration(r.name,i,r.path);if(M.success)h("Configuration updated successfully!"),l(!1);else throw new Error(M.message||"Update failed")}catch(M){console.error("Error saving configuration:",M),h(M instanceof Error?M.message:"Failed to save configuration. Please try again.")}finally{m(!1)}},U=M=>{c(M.target.value),p&&h("")},R=async(M,P,W)=>{try{await navigator.clipboard.writeText(M),P==="config"?(C(!0),setTimeout(()=>C(!1),4e3)):P==="script"&&W&&(v(W),setTimeout(()=>v(null),4e3))}catch(ae){console.error("Failed to copy to clipboard:",ae);const z=document.createElement("textarea");z.value=M,document.body.appendChild(z),z.select();try{document.execCommand("copy"),P==="config"?(C(!0),setTimeout(()=>C(!1),2e3)):P==="script"&&W&&(v(W),setTimeout(()=>v(null),2e3))}catch(oe){console.error("Fallback copy failed:",oe),P==="config"&&h("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(Ic,{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(r.scripts).map(([M,P])=>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:M}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>R(P,"script",M),className:`text-sm flex items-center space-x-1 ${g===M?"text-green-600":"text-gray-600 hover:text-gray-700"}`,title:"Copy command to clipboard",children:g===M?t.jsxs(t.Fragment,{children:[t.jsx(Mm,{className:"w-4 h-4"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Im,{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:P})]},M))}),Object.keys(r.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"}),!s&&t.jsx("div",{className:"text-sm text-gray-500",children:"Read-only preview"})]}),s?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:i,onChange:U,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:b,disabled:d,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:d?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:_,disabled:d,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:i})}),t.jsxs("div",{className:"mt-4 flex space-x-3",children:[t.jsx("button",{onClick:N,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:()=>R(s?i:F(),"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:y?t.jsxs(t.Fragment,{children:[t.jsx(Mm,{className:"w-4 h-4 text-green-600"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Im,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})})]})]})]})]})}const af={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 Rv(){const[r,s]=w.useState(),[l,i]=w.useState(""),[c,d]=w.useState("all"),[m,p]=w.useState(af),[h,g]=w.useState(!1),[v,y]=w.useState(!1),[C,F]=w.useState(!0),[N,_]=w.useState(null),[b,U]=w.useState(!1);w.useEffect(()=>{(async()=>{try{F(!0);const oe=await Ft.getPackages();s(oe),_(null)}catch(oe){_(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",oe)}finally{F(!1)}})()},[]),w.useEffect(()=>{const z=at.get("monodog-config");z&&p({...af,...JSON.parse(z)})},[]);const R=z=>{p(z),at.set("monodog-config",JSON.stringify(z))},M=async()=>{try{U(!0),_(null),F(!0);try{const z=await Ft.refreshPackages();s(z),_(null)}catch(z){_(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching package data:",z)}finally{F(!1)}}catch(z){_(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error refreshing package data:",z)}finally{U(!1)}};if(C&&!r)return t.jsx($c,{});if(N)return t.jsx(dh,{error:N,onRetry:M});const P=dv(r??[],l,c),W=uv(r??[]),ae=cv(r??[]);return t.jsxs("div",{className:"p-6 space-y-6",children:[b&&r&&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(rv,{config:m,onShowSetupGuide:()=>y(!0),onShowConfig:()=>g(!0),onRefresh:M}),t.jsx(sv,{stats:ae}),t.jsx(av,{}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx(lv,{searchTerm:l,selectedType:c,packageTypes:W,onSearchChange:i,onTypeChange:d}),t.jsx(iv,{packages:P,getTypeIcon:fv,getStatusColor:mv})]}),t.jsx(Wy,{isOpen:h,onClose:()=>g(!1),onSave:R,currentConfig:m}),t.jsx(nv,{isOpen:v,onClose:()=>y(!1),onComplete:()=>y(!1)})]})}function Av(){const[r,s]=w.useState([]),[l,i]=w.useState(!0),[c,d]=w.useState(null),[m,p]=w.useState({search:"",type:"all",status:"all"}),[h,g]=w.useState({field:"name",order:"asc"});w.useEffect(()=>{(async()=>{try{i(!0);const U=await Ft.getPackages();s(U),d(null)}catch(U){d(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",U)}finally{i(!1)}})()},[]);const v=()=>{window.location.reload()},y=vv(r,m),C=jv(y,h),F=xv(r),N=gv(r),_=yv(r);return l?t.jsx($c,{}):c?t.jsx(dh,{error:c,onRetry:v}):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(hv,{stats:F}),t.jsx(pv,{filters:m,onFiltersChange:p,availableTypes:N,availableStatuses:_}),t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[t.jsxs("span",{children:["Showing ",C.length," of ",r.length," packages",m.search&&` matching "${m.search}"`]}),t.jsxs("span",{children:[m.type!=="all"&&`Filtered by type: ${m.type}`,m.status!=="all"&&` • status: ${m.status}`]})]}),t.jsx(bv,{packages:C,sorting:h,onSortChange:g}),C.length===0&&!l&&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(Ut,{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:m.search||m.type!=="all"||m.status!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first package to the monorepo."}),(m.search||m.type!=="all"||m.status!=="all")&&t.jsx("button",{onClick:()=>p({search:"",type:"all",status:"all"}),className:"text-primary-600 hover:text-primary-500",children:"Clear Filters"})]})]})}function Pv(){const{name:r}=sx(),[s,l]=w.useState(null),[i,c]=w.useState("overview");if(w.useEffect(()=>{(async()=>{try{const p=await Ft.getPackage(r??"");l(p)}catch(p){console.error("Error fetching packages:",p)}})()},[r]),!s)return t.jsx($c,{message:"Loading package details..."});const d=()=>{switch(i){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:s.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(s.maintainers).map(m=>t.jsx("div",{className:"text-sm text-gray-600",children:m},m))})]}),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:s.dependenciesInfo.filter(m=>m.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:s.dependenciesInfo.filter(m=>m.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:s.dependenciesInfo.filter(m=>m.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(s.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:s.commits?.length})]})]})]})]})]})});case"dependencies":return t.jsx(Ev,{packageData:s});case"commits":return t.jsx(Cv,{packageData:s});case"health":return t.jsx(_v,{packageData:s});case"config":return t.jsx(Tv,{packageData:s});default:return null}};return t.jsxs("div",{className:"space-y-6",children:[t.jsx(Sv,{packageData:s}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsx(kv,{activeTab:i,onTabChange:c}),t.jsx("div",{className:"px-6",children:d()})]})]})}function Lv({message:r="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:r})]})})}function Ov({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function Iv({onRefresh:r,loading:s=!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"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,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(fr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Mv({viewMode:r,onViewModeChange:s,layout:l,onLayoutChange:i,showLegend:c,onToggleLegend:d,zoomLevel:m,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:()=>s("graph"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="graph"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(zx,{className:"w-4 h-4"}),t.jsx("span",{children:"Graph"})]}),t.jsxs("button",{onClick:()=>s("list"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="list"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(Bx,{className:"w-4 h-4"}),t.jsx("span",{children:"List"})]})]})]}),r==="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:l,onChange:h=>i(h.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,m-.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m<=.5,children:t.jsx(Wx,{className:"w-4 h-4"})}),t.jsxs("span",{className:"text-sm text-gray-600 min-w-[3rem] text-center",children:[Math.round(m*100),"%"]}),t.jsx("button",{onClick:()=>p(Math.min(2,m+.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m>=2,children:t.jsx(Vx,{className:"w-4 h-4"})})]})]})]}),t.jsxs("button",{onClick:d,className:`px-3 py-2 text-sm font-medium rounded-lg flex items-center space-x-1 transition-colors ${c?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[t.jsx(ys,{className:"w-4 h-4"}),t.jsx("span",{children:"Legend"})]})]})}const xh=r=>{switch(r){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"}},gh=r=>{switch(r){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"}},lf=(r,s)=>{const l=s.find(i=>i.name===r);if(!l)return"text-gray-400";switch(l.status){case"healthy":return"text-green-500";case"warning":return"text-yellow-500";case"error":return"text-red-500";default:return"text-gray-400"}},Dv=r=>{const s=r.length,l=r.reduce((h,g)=>h+Object.keys(g.dependencies).length,0),i=r.filter(h=>Object.keys(h.dependencies).length===0).length,c=r.filter(h=>h.dependents.length===0).length,d=Fv(r),m=s>0?l/s:0,p=yh(r);return{totalPackages:s,totalDependencies:l,circularDependencies:p.length,leafPackages:i,rootPackages:c,maxDepth:d,avgDependencies:Math.round(m*10)/10}},Fv=r=>{const s=new Set;let l=0;const i=(c,d)=>{if(s.has(c))return d;s.add(c);const m=r.find(h=>h.name===c);if(!m)return d;let p=d;for(const h of Object.keys(m.dependencies)){const g=i(h,d+1);p=Math.max(p,g)}return p};for(const c of r)if(!s.has(c.name)){const d=i(c.name,0);l=Math.max(l,d)}return l},yh=r=>{const s=[],l=new Set,i=new Set,c=[],d=m=>{if(i.has(m)){const h=c.indexOf(m),g=c.slice(h).concat(m);return s.push({cycle:g,severity:g.length>5?"high":g.length>3?"medium":"low",impact:`Circular dependency involving ${g.length} packages`}),!0}if(l.has(m))return!1;l.add(m),i.add(m),c.push(m);const p=r.find(h=>h.name===m);if(p){for(const h of Object.keys(p.dependencies))if(d(h))return!0}return i.delete(m),c.pop(),!1};for(const m of r)l.has(m.name)||d(m.name);return s},Uv=(r,s,l)=>[...r].sort((i,c)=>{let d,m;switch(s){case"name":d=i.name.toLowerCase(),m=c.name.toLowerCase();break;case"dependencies":d=Object.keys(i.dependencies).length,m=Object.keys(c.dependencies).length;break;case"dependents":d=i.dependents.length,m=c.dependents.length;break;case"status":{const p={error:0,warning:1,healthy:2};d=p[i.status]||3,m=p[c.status]||3;break}default:return 0}return d<m?l==="asc"?-1:1:d>m?l==="asc"?1:-1:0}),Bv=(r,s,l=800,i=600)=>{switch(s){case"hierarchical":return zv(r,l,i);case"circular":return Hv(r,l,i);case"force":return $v(r,l,i);default:return r}},zv=(r,s,l)=>{const i=[],c=new Set,d=(m,p)=>{if(c.has(m))return;c.add(m),i[p]||(i[p]=[]),i[p].push(m);const h=r.find(g=>g.name===m);h&&h.dependents.forEach(g=>d(g,p+1))};return r.filter(m=>Object.keys(m.dependencies).length===0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),i.length===0&&r.filter(m=>Object.keys(m.dependencies).length>0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),r.map(m=>{const p=i.findIndex(v=>v.includes(m.name)),h=i[p]?.indexOf(m.name)||0,g=i[p]?.length||1;return{...m,x:s/(i.length+1)*(p+1)-50,y:l/(g+1)*(h+1)-25}})},Hv=(r,s,l)=>{const i=s/2,c=l/2,d=Math.min(s,l)/3;return r.map((m,p)=>{const h=2*Math.PI*p/r.length;return{...m,x:i+d*Math.cos(h)-50,y:c+d*Math.sin(h)-25}})},$v=(r,s,l)=>{const i=r.map((c,d)=>({...c,x:Math.random()*(s-100),y:Math.random()*(l-50)}));for(let c=0;c<50;c++)i.forEach(d=>{let m=0,p=0;i.forEach(h=>{if(h.name!==d.name){const g=d.x-h.x,v=d.y-h.y,y=Math.sqrt(g*g+v*v)||1,C=1e3/(y*y);m+=g/y*C,p+=v/y*C}}),Object.keys(d.dependencies).forEach(h=>{const g=i.find(v=>v.name===h);if(g){const v=g.x-d.x,y=g.y-d.y,C=Math.sqrt(v*v+y*y)||1,F=C*.01;m+=v/C*F,p+=y/C*F}}),d.x+=m*.1,d.y+=p*.1,d.x=Math.max(50,Math.min(s-100,d.x)),d.y=Math.max(25,Math.min(l-50,d.y))});return i},Vv=r=>{switch(r){case"app":return t.jsx(Mn,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ii,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}},Wv=r=>r.length>12?`${r.substring(0,12)}...`:r,Gv=r=>{const s={};return r.forEach(l=>{s[l.name]=[]}),r.forEach(l=>{const i=l.name;[...Object.keys(l.dependencies??{}),...Object.keys(l.devDependencies??{}),...Object.keys(l.peerDependencies??{})].forEach(d=>{s[d]||(s[d]=[]),s[d].includes(i)||s[d].push(i)})}),s};function Kv({packages:r,selectedPackage:s,hoveredPackage:l,onPackageSelect:i,onPackageHover:c,layout:d}){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:[r.map(m=>Object.keys(m.dependencies).map(p=>{const h=r.find(v=>v.name===p);if(!h)return null;const g=l===m.name||l===p||s===m.name||s===p;return t.jsxs("g",{children:[t.jsx("defs",{children:t.jsx("marker",{id:`arrow-${m.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:g?"#3B82F6":"#6B7280"})})}),t.jsx("line",{x1:h.x+50,y1:h.y+25,x2:m.x,y2:m.y+25,stroke:g?"#3B82F6":"#6B7280",strokeWidth:g?"3":"2",markerEnd:`url(#arrow-${m.name}-${p})`,className:"transition-all duration-200",style:{opacity:g?1:.6}})]},`${m.name}-${p}`)})),r.map(m=>{const p=s===m.name,h=l===m.name,g=s&&(Object.keys(m.dependencies).includes(s)||Object.keys(m.dependents).includes(s));return t.jsxs("g",{children:[t.jsx("rect",{x:m.x,y:m.y,width:"100",height:"50",rx:"8",fill:"white",stroke:p?"#3B82F6":g?"#10B981":h?"#6B7280":"#E5E7EB",strokeWidth:p?"3":"2",className:"cursor-pointer transition-all duration-200",style:{filter:h||p||g?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"},onMouseEnter:()=>c(m.name),onMouseLeave:()=>c(null),onClick:()=>i(p?null:m.name)}),t.jsx("text",{x:m.x+50,y:m.y+20,textAnchor:"middle",className:"text-xs font-medium fill-gray-900 pointer-events-none",children:Wv(m.name)}),t.jsxs("text",{x:m.x+50,y:m.y+35,textAnchor:"middle",className:"text-xs fill-gray-500 pointer-events-none",children:["v",m.version]}),t.jsx("circle",{cx:m.x+85,cy:m.y+15,r:"6",fill:m.status==="healthy"?"#10B981":m.status==="warning"?"#F59E0B":"#EF4444",className:"pointer-events-none"}),t.jsx("rect",{x:m.x+5,y:m.y+5,width:"12",height:"8",rx:"2",fill:m.type==="app"?"#3B82F6":m.type==="lib"?"#8B5CF6":"#F97316",className:"pointer-events-none"})]},m.name)})]}),r.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(oi,{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 qv({packages:r,selectedPackage:s,onPackageSelect:l,sortBy:i,sortOrder:c,onSortChange:d}){const m=h=>{d(h,i===h&&c==="asc"?"desc":"asc")},p=h=>i!==h?null:c==="asc"?t.jsx(Pc,{className:"w-4 h-4"}):t.jsx(Mf,{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:()=>m("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:()=>m("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:()=>m("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:r.map(h=>t.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer transition-colors ${s===h.name?"bg-blue-50":""}`,onClick:()=>l(h.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:Vv(h.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:h.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:["v",h.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 ${gh(h.type)}`,children:h.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 ${xh(h.status)}`,children:h.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[Object.keys(h.dependencies).length,Object.keys(h.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(h.dependencies).slice(0,3).join(", "),Object.keys(h.dependencies).length>3&&` +${Object.keys(h.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:[h.dependents.length,h.dependents.length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[h.dependents.slice(0,3).join(", "),h.dependents.length>3&&` +${h.dependents.length-3} more`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:t.jsx(On,{to:`/packages/${encodeURIComponent(h.name)}`,className:"text-blue-600 hover:text-blue-500",onClick:g=>g.stopPropagation(),children:"View Details"})})]},h.name))})]})}),r.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(Ut,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"No packages found"})]})]})}function Yv({package:r,packages:s,onClose:l}){return r?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:r.name}),t.jsx("button",{onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Ss,{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 ${gh(r.type)}`,children:r.type}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xh(r.status)}`,children:r.status})]}),t.jsxs("div",{className:"text-sm text-gray-600",children:["Version: ",t.jsx("span",{className:"font-mono",children:r.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(r.dependencies).length,")"]})]}),Object.keys(r.dependencies).length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:Object.keys(r.dependencies).map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${lf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):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:["(",r.dependents.length,")"]})]}),r.dependents.length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:r.dependents.map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${lf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):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(r.dependencies).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependents:"}),t.jsx("span",{className:"font-medium",children:r.dependents.length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Risk level:"}),t.jsx("span",{className:`font-medium ${r.dependents.length>5?"text-red-600":r.dependents.length>2?"text-yellow-600":"text-green-600"}`,children:r.dependents.length>5?"High":r.dependents.length>2?"Medium":"Low"})]})]})]}),t.jsx("div",{className:"pt-2 border-t border-gray-200",children:t.jsx(On,{to:`/packages/${encodeURIComponent(r.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 Qv({stats:r,packages:s}){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(Ut,{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:r.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(oi,{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:r.totalDependencies})]})]})}),t.jsx("div",{className:`${r.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 ${r.circularDependencies>0?"bg-red-100":"bg-green-100"}`,children:t.jsx(lt,{className:`w-6 h-6 ${r.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 ${r.circularDependencies>0?"text-red-600":"text-gray-600"}`,children:r.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(_a,{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:r.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:r.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:r.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:r.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:s.filter(l=>l.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(s.filter(l=>l.status==="healthy").length/s.length*100),"% of total"]})]})]})]})]})}function Jv({cycles:r,packages:s,onPackageSelect:l}){const i=d=>{switch(d){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"}},c=d=>{switch(d){case"high":return"🔴";case"medium":return"🟡";case"low":return"🔵";default:return"⚪"}};return r.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(lt,{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(lt,{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 ",r.length," circular dependency cycle",r.length>1?"s":""]})]})]}),t.jsx("div",{className:"space-y-4",children:r.map((d,m)=>t.jsxs("div",{className:`border rounded-lg p-4 ${i(d.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:c(d.severity)}),t.jsxs("span",{className:"text-sm font-medium capitalize",children:[d.severity," Severity"]})]}),t.jsxs("span",{className:"text-xs opacity-75",children:[d.cycle.length," packages affected"]})]}),t.jsx("div",{className:"mb-3",children:t.jsx("p",{className:"text-sm mb-2",children:d.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:[d.cycle.map((p,h)=>t.jsxs(w.Fragment,{children:[t.jsx("button",{onClick:()=>l(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}),h<d.cycle.length-1&&t.jsx(Om,{className:"w-4 h-4 text-gray-400"})]},`${p}-${h}`)),d.cycle.length>1&&t.jsxs(t.Fragment,{children:[t.jsx(Om,{className:"w-4 h-4 text-gray-400"}),t.jsxs("span",{className:"text-sm text-gray-500 italic",children:["(cycles back to ",d.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:[d.severity==="high"&&"Critical: Refactor immediately to break this cycle. Consider dependency inversion or splitting packages.",d.severity==="medium"&&"Important: Plan to refactor this cycle. Review package boundaries and extract common dependencies.",d.severity==="low"&&"Minor: Monitor this cycle. Consider if these packages could be merged or dependencies restructured."]})]})]},m))}),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:r.filter(d=>d.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:r.filter(d=>d.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:r.filter(d=>d.severity==="low").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Low Severity"})]})]})})]})}function Xv({show:r}){return r?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.jsx(wa,{}),t.jsx("span",{children:"Dependency"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-6 h-4 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-6 h-4 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 Zv(){w.useEffect(()=>{(async()=>{try{s(!0);const Q=await Ft.getPackages(),X=Gv(Q),B=Q.map(J=>({...J,dependencies:{...J.dependencies,...J.devDependencies,...J.peerDependencies},dependents:X[J.name]}));d(B),i(null)}catch(Q){i(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",Q)}finally{s(!1)}})()},[]);const[r,s]=w.useState(!1),[l,i]=w.useState(null),[c,d]=w.useState([]),[m,p]=w.useState("graph"),[h,g]=w.useState("hierarchical"),[v,y]=w.useState(null),[C,F]=w.useState(null),[N,_]=w.useState(!0),[b,U]=w.useState(1),[R,M]=w.useState("name"),[P,W]=w.useState("asc"),ae=w.useMemo(()=>Bv(c??[],h,800,600),[c,h]),z=w.useMemo(()=>Uv(c,R,P),[c,R,P]),oe=w.useMemo(()=>Dv(c),[c]),xe=w.useMemo(()=>yh(c),[c]),Ne=v&&c.find(Z=>Z.name===v)||null,te=()=>{},ye=Z=>{y(Z)},me=(Z,Q)=>{M(Z),W(Q)},ve=()=>{window.location.reload()};return r?t.jsx(Lv,{}):l?t.jsx(Ov,{error:l,onRetry:ve}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(Iv,{onRefresh:te,loading:r}),t.jsx(Qv,{stats:oe,packages:c??[]}),xe.length>0&&t.jsx(Jv,{cycles:xe,packages:c,onPackageSelect:ye}),t.jsx(Mv,{viewMode:m,onViewModeChange:p,layout:h,onLayoutChange:g,showLegend:N,onToggleLegend:()=>_(!N),zoomLevel:b,onZoomChange:U}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:`${N?"lg:col-span-3":"lg:col-span-4"}`,children:m==="graph"?t.jsxs("div",{className:"relative",children:[t.jsx("div",{style:{transform:`scale(${b})`,transformOrigin:"top left"},children:t.jsx(Kv,{packages:ae,selectedPackage:v,hoveredPackage:C,onPackageSelect:ye,onPackageHover:F,layout:h})}),t.jsx(Yv,{package:Ne,packages:c,onClose:()=>y(null)})]}):t.jsx(qv,{packages:z,selectedPackage:v,onPackageSelect:ye,sortBy:R,sortOrder:P,onSortChange:me})}),N&&t.jsx("div",{className:"lg:col-span-1",children:t.jsx(Xv,{show:N})})]})]})}function e1(){const[r,s]=w.useState(0),[l,i]=w.useState(null),[c,d]=w.useState(!0),[m,p]=w.useState(null),[h,g]=w.useState(!1);w.useEffect(()=>{(async()=>{try{d(!0);const M=await Ft.getHealthStatus();i(M),p(null)}catch(M){p(Ce.UNKNOWN_ERROR),console.error("Error fetching health data:",M)}finally{d(!1)}})()},[r]);const v=async()=>{try{g(!0),p(null),d(!0);try{const R=await Ft.refreshHealthStatus();i(R),p(null)}catch(R){p(Ce.UNKNOWN_ERROR),console.error("Error fetching health data:",R)}finally{d(!1)}}catch(R){p(Ce.UNKNOWN_ERROR),console.error("Error refreshing health data:",R)}finally{g(!1)}},y=()=>{s(R=>R+1)},C=R=>{switch(R){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(c&&!l)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(m)return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:m}),t.jsx("button",{onClick:y,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})});const F=l?l.summary?.averageScore:0,N=l?l?.packages?.filter(R=>R.health.overallScore>=80).length:0,_=l?l?.packages?.filter(R=>R.health.overallScore>=60&&R.health.overallScore<80).length:0,b=l?l?.packages?.filter(R=>R.health.overallScore<60).length:0,U=[{name:"Package Health",value:N||0,status:(()=>{const R=N||0,M=l?.packages.length||0;if(M===0)return"healthy";const P=R/M;return P>=.8?"healthy":P>=.6?"warning":"error"})(),description:`${N||0} healthy packages out of ${l?.packages.length||0}`},{name:"Overall Score",value:Math.round(F),status:Math.round(F)>=80?"healthy":Math.round(F)>=60?"warning":"error",description:`Average health score: ${Math.round(F)}/100`},{name:"Unhealthy Packages",value:_+b||0,status:(_+b||0)===0?"healthy":(_+b||0)<=2?"warning":"error",description:`${_+b||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:v,disabled:h,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:[h?t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):t.jsx(fr,{className:"w-5 h-5"}),t.jsx("span",{children:h?"Refreshing...":"Refresh"})]})]}),h&&l&&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:F?.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(At,{className:"w-5 h-5 text-green-300"}),t.jsxs("span",{children:[N," Healthy"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(lt,{className:"w-5 h-5 text-yellow-300"}),t.jsxs("span",{children:[_," Warnings"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Dt,{className:"w-5 h-5 text-red-300"}),t.jsxs("span",{children:[b," Errors"]})]})]})]}),t.jsx("div",{className:"my-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:U.map(R=>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:R.name}),t.jsx("div",{className:`w-3 h-3 rounded-full ${R.status==="healthy"?"bg-green-500":R.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:R.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 ${C(R.status)}`,children:R.status}),t.jsx("span",{className:"text-sm text-gray-500",children:R.description})]})]},R.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:l?.packages?.map(R=>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(Ut,{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:R.packageName}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Score: ",R.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 ${R.health.overallScore>=80?"bg-green-500":R.health.overallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${R.health.overallScore}%`}})}),t.jsx("span",{className:"text-sm font-medium text-gray-900",children:R.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 ${R.health.buildStatus==="success"?"bg-green-500":R.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 ${C(R.health.buildStatus==="success"?"healthy":R.health.buildStatus==="unknown"?"warning":"error")}`,children:R.health.buildStatus==="success"?"healthy":R.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(Hx,{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 ${C(R.health.lintStatus==="pass"?"pass":R.health.lintStatus==="unknown"?"warn":"fail")}`,children:R.health.lintStatus==="pass"?"pass":R.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 ${C(R.health.securityAudit==="pass"?"pass":R.health.securityAudit==="unknown"?"warn":"fail")}`,children:R.health.securityAudit==="pass"?"pass":R.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 ${C(R.health.overallScore>=80?"up-to-date":R.health.overallScore>=60?"outdated":"vulnerable")}`,children:R.health.overallScore>=80?"up-to-date":R.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"})})})]},R.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(lt,{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(Dt,{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(_a,{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 t1({packageCount:r,onNewRelease:s}){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 (",r," packages)"]})]}),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(Df,{className:"w-5 h-5"}),t.jsx("span",{children:"New Release"})]})]})}function n1({stats:r}){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(li,{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:r.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:r.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(Mn,{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:r.published})]})]})})]})}const r1=r=>({readyToPublish:r.filter(s=>s.status==="ready").length,inProgress:r.filter(s=>s.status==="building"||s.status==="testing").length,published:r.filter(s=>s.status==="published").length}),vh=r=>{switch(r){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"}},s1=r=>{switch(r){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"}},a1=(r,s)=>s==="all"?r:r.filter(l=>l.name===s);function l1({packages:r,selectedPackage:s,onPackageChange:l}){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:s,onChange:i=>l(i.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(r.map(i=>i.name))].map(i=>t.jsx("option",{value:i,children:i},i))]})]})]})}),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:r.map(i=>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(Mc,{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:i.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:[Object.keys(i.dependencies).length," dependencies"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.currentVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.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 ${s1(i.publishType)}`,children:i.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 ${vh(i.status)}`,children:i.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.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(He,{className:"w-4 h-4 mr-1 text-gray-400"}),i.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:[i.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"})]})})]},i.name))})]})})]})}function i1({releases:r,selectedStatus:s,onStatusChange:l}){const i=[{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:s,onChange:c=>l(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 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:i.map(c=>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(Ff,{className:"w-4 h-4 text-purple-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[c.packageName," v",c.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["by ",c.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 ${vh(c.status)}`,children:c.status}),t.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[t.jsx(He,{className:"w-4 h-4 mr-1"}),c.scheduledFor]})]})]}),t.jsx("div",{className:"mt-3 text-sm text-gray-700",children:c.changelog})]},c.id))})})]})}function o1(){const r=[{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"}],s=l=>{switch(l){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:r.map(l=>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(Mc,{className:"w-4 h-4 text-blue-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[l.packageName," v",l.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:[l.date," • by ",l.author]})]})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${s(l.type)}`,children:l.type})]}),t.jsx("div",{className:"space-y-1",children:l.changes.map((i,c)=>t.jsxs("div",{className:"flex items-start space-x-2",children:[t.jsx(Ic,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),t.jsx("span",{className:"text-sm text-gray-700",children:i})]},c))})]},l.id))})})]})}function c1(){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 u1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}const of=[{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"}],d1=[{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 m1(){const[r,s]=w.useState("all"),[l,i]=w.useState("all"),[c,d]=w.useState(of),[m,p]=w.useState(!1),[h,g]=w.useState(null);w.useEffect(()=>{(async()=>{try{p(!0);const M=(await Ft.getPackages()).map(P=>({name:P.name,currentVersion:P.version,nextVersion:v(P.version),status:y(P.status),lastPublished:P.lastUpdated,changelog:P.description||"No changelog available",commits:Math.floor(Math.random()*20)+1,dependencies:P.dependencies||[],publishType:C()}));d(M),g(null)}catch(R){g(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",R),d(of)}finally{p(!1)}})()},[]);const v=U=>{const R=U.split(".").map(Number);return R[2]+=1,R.join(".")},y=U=>{switch(U){case"healthy":return"ready";case"warning":return"testing";case"error":return"failed";case"building":return"building";default:return"ready"}},C=()=>{const U=["patch","minor","major","prerelease"];return U[Math.floor(Math.random()*U.length)]},F=()=>{},N=()=>{window.location.reload()},_=a1(c,r),b=r1(c);return m?t.jsx(c1,{}):h?t.jsx(u1,{error:h,onRetry:N}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(t1,{packageCount:c.length,onNewRelease:F}),t.jsx(n1,{stats:b}),t.jsx(l1,{packages:_,selectedPackage:r,onPackageChange:s}),t.jsx(i1,{releases:d1,selectedStatus:l,onStatusChange:i}),t.jsx(o1,{})]})}function f1({message:r="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:r})]})})}function h1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function p1({onTriggerBuild:r,onCreatePipeline:s}){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:r,className:"btn-secondary flex items-center space-x-2",children:[t.jsx(li,{className:"w-5 h-5"}),t.jsx("span",{children:"Trigger Build"})]}),t.jsxs("button",{onClick:s,className:"btn-primary flex items-center space-x-2",children:[t.jsx(Dx,{className:"w-5 h-5"}),t.jsx("span",{children:"New Pipeline"})]})]})]})}const ri=r=>{switch(r){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"}},x1=r=>{switch(r){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"}},g1=r=>{const s=r.length,l=r.filter(h=>h.status==="success").length,i=r.filter(h=>h.status==="failed").length,c=r.filter(h=>h.status==="running").length,d=s>0?Math.round(l/s*100):0,m=r.filter(h=>h.duration),p=m.length>0?Math.round(m.reduce((h,g)=>h+(g.duration||0),0)/m.length):0;return{total:s,successful:l,failed:i,running:c,successRate:d,avgDuration:p}},y1=(r,s)=>r.filter(l=>{const i=s.package==="all"||l.packageName===s.package,c=s.status==="all"||l.status===s.status;return i&&c&&!0}),v1=r=>[...new Set(r.map(s=>s.packageName))],j1=r=>[...new Set(r.map(s=>s.status))],ka=r=>{if(r<60)return`${r}s`;if(r<3600){const s=Math.floor(r/60),l=r%60;return l>0?`${s}m ${l}s`:`${s}m`}else{const s=Math.floor(r/3600),l=Math.floor(r%3600/60);return l>0?`${s}h ${l}m`:`${s}h`}},cf=r=>new Date(r).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),jh=r=>{const s=new Date(r),i=new Date().getTime()-s.getTime(),c=Math.floor(i/(1e3*60)),d=Math.floor(c/60),m=Math.floor(d/24);return c<1?"Just now":c<60?`${c} min ago`:d<24?`${d} hour${d>1?"s":""} ago`:`${m} day${m>1?"s":""} ago`},w1=r=>{if(r.status==="success"||r.status==="failed"||r.status==="cancelled")return 100;if(r.status==="pending")return 0;const s=r.stages.length;if(s===0)return 0;const l=r.stages.filter(d=>d.status==="success"||d.status==="failed"||d.status==="skipped").length,i=r.stages.filter(d=>d.status==="running").length,c=(l+i*.5)/s;return Math.round(c*100)},N1=r=>{const s=r.toLowerCase();return s.includes("build")||s.includes("compile")?"🔨":s.includes("test")?"🧪":s.includes("lint")||s.includes("format")?"✨":s.includes("deploy")||s.includes("publish")?t.jsx(Mn,{className:"w-6 h-6 text-primary-600"}):s.includes("security")||s.includes("audit")?"🔒":s.includes("install")||s.includes("dependencies")?t.jsx(Ut,{className:"w-6 h-6 text-primary-600"}):t.jsx(Fr,{className:"w-6 h-6 text-primary-600"})},b1=r=>r.status==="failed"?"critical":r.status==="paused"?"warning":r.successRate<70?"critical":r.successRate<85?"warning":"healthy",wh=r=>r.substring(0,8);function S1({stats:r,onRefresh:s,loading:l=!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:s,disabled:l,className:"btn-ghost",children:[t.jsx(fr,{className:`w-4 h-4 mr-2 ${l?"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(_a,{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:r.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(At,{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:r.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(Dt,{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:r.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(He,{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:r.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 ${r.successRate>=90?"text-success-600":r.successRate>=70?"text-warning-600":"text-error-600"}`,children:[r.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 ${r.successRate>=90?"bg-success-500":r.successRate>=70?"bg-warning-500":"bg-error-500"}`,style:{width:`${r.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:ka(r.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:[r.total>0?Math.round(r.successful/r.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:[r.total>0?Math.round(r.failed/r.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:r.running}),t.jsx("div",{className:"text-caption",children:"Active Builds"})]})]})]})]})}function k1({builds:r,selectedBuild:s,onBuildSelect:l,filters:i,onFiltersChange:c}){const d=v1(r),m=j1(r),p=h=>{switch(h){case"success":return t.jsx(At,{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(He,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Dt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(pc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(He,{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(ci,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.package,onChange:h=>c({...i,package:h.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"}),d.map(h=>t.jsx("option",{value:h,children:h},h))]})]}),t.jsxs("select",{value:i.status,onChange:h=>c({...i,status:h.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"}),m.map(h=>t.jsx("option",{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]}),t.jsxs("select",{value:i.dateRange,onChange:h=>c({...i,dateRange:h.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:[r.length," build",r.length!==1?"s":""," found"]})]}),r.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:r.map(h=>{const g=w1(h),v=s===h.id;return t.jsxs("div",{className:`p-4 cursor-pointer transition-colors ${v?"bg-blue-50 border-l-4 border-blue-500":"hover:bg-gray-50"}`,onClick:()=>l(v?null:h.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[p(h.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:h.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:h.branch}),t.jsx("span",{className:"text-xs text-gray-500 font-mono",children:wh(h.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 ${ri(h.status)}`,children:h.status}),t.jsxs("span",{className:"text-xs text-gray-500",children:["by ",h.triggeredBy]}),t.jsx("span",{className:"text-xs text-gray-500",children:jh(h.startTime)})]})]})]}),t.jsxs("div",{className:"text-right",children:[h.duration&&t.jsx("div",{className:"text-sm font-medium text-gray-900",children:ka(h.duration)}),h.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:`${g}%`}})}),t.jsxs("span",{className:"text-xs text-gray-500",children:[g,"%"]})]})})]})]}),v&&h.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:h.stages.map((y,C)=>t.jsx("div",{className:`flex items-center px-2 py-1 text-xs rounded ${ri(y.status)}`,title:`${y.name}: ${y.status}`,children:y.name},y.name))})})]},h.id)})})]})]})}function E1({pipelines:r,onPipelineSelect:s,onPipelineToggle:l}){const i=d=>{switch(d){case"healthy":return t.jsx(At,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(lt,{className:"w-5 h-5 text-yellow-500"});case"critical":return t.jsx(Dt,{className:"w-5 h-5 text-red-500"});default:return t.jsx(Fr,{className:"w-5 h-5 text-gray-500"})}},c=d=>{switch(d){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 r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Fr,{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:[r.length," pipeline",r.length!==1?"s":""," ","configured"]})]}),t.jsx("div",{className:"divide-y divide-gray-200",children:r.map(d=>{const m=b1(d);return t.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>s(d.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[i(m),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:d.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:d.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 ${ri(d.status)}`,children:d.status}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(m)}`,children:m})]})]})]}),t.jsx("div",{className:"flex items-center space-x-4",children:t.jsx("button",{onClick:p=>{p.stopPropagation(),l(d.id,d.status!=="active")},className:`p-2 rounded-lg transition-colors ${d.status==="active"?"text-green-600 hover:bg-green-100":"text-gray-400 hover:bg-gray-100"}`,title:d.status==="active"?"Pause Pipeline":"Activate Pipeline",children:d.status==="active"?t.jsx($x,{className:"w-5 h-5"}):t.jsx(li,{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 ${d.successRate>=90?"text-green-600":d.successRate>=70?"text-yellow-600":"text-red-600"}`,children:[d.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:ka(d.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:jh(d.lastRun)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Triggers:"}),t.jsx("div",{className:"font-medium text-gray-900",children:d.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:[d.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 ${d.successRate>=90?"bg-green-500":d.successRate>=70?"bg-yellow-500":"bg-red-500"}`,style:{width:`${d.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:"}),d.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))]})})]},d.id)})})]})}function C1({build:r,onClose:s,onCancel:l,onRetry:i}){if(!r)return null;const c=d=>{switch(d){case"success":return t.jsx(At,{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(He,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Dt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(pc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(He,{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:[c(r.status),t.jsxs("div",{children:[t.jsxs("h2",{className:"text-xl font-semibold text-gray-900",children:[r.packageName," Build"]}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.branch," • ",wh(r.commit)]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[r.status==="running"&&l&&t.jsxs("button",{onClick:()=>l(r.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(pc,{className:"w-4 h-4 mr-1"}),"Cancel"]}),(r.status==="failed"||r.status==="cancelled")&&i&&t.jsxs("button",{onClick:()=>i(r.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(fr,{className:"w-4 h-4 mr-1"}),"Retry"]}),t.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(Ss,{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 ${ri(r.status)}`,children:r.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:cf(r.startTime)})]}),r.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:cf(r.endTime)})]}),r.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:ka(r.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:r.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"}),r.artifacts.length>0?t.jsx("div",{className:"space-y-1",children:r.artifacts.map((d,m)=>t.jsx("div",{className:"text-sm",children:t.jsx("a",{href:"#",className:"text-blue-600 hover:text-blue-500 font-medium",children:d})},m))}):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:r.stages.map((d,m)=>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:N1(d.name)}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:d.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 ${x1(d.status)}`,children:d.status}),d.duration&&t.jsx("span",{className:"text-xs text-gray-500",children:ka(d.duration)})]})]})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",m+1," of ",r.stages.length]})]}),d.logs&&d.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:d.logs.map((p,h)=>t.jsx("div",{className:"mb-1",children:p},h))})]})]},d.name))})]})]})]})})}const _1=[{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 T1(){const[r,s]=w.useState(!0),[l,i]=w.useState(null),[c,d]=w.useState([]),[m]=w.useState(_1),[p,h]=w.useState(null),[g,v]=w.useState({package:"all",status:"all",pipeline:"all",dateRange:"all"});w.useEffect(()=>{(async()=>{try{s(!0);const xe=(await Ft.getBuildStatus()).map(Ne=>({id:Ne.id||Math.random().toString(36).substr(2,9),packageName:Ne.package||Ne.packageName||"unknown",branch:Ne.branch||"main",commit:Ne.commit||"unknown",status:Ne.status||"pending",startTime:Ne.startTime||new Date().toISOString(),endTime:Ne.endTime,duration:Ne.duration,stages:Ne.stages||[],triggeredBy:Ne.triggeredBy||"system",artifacts:Ne.artifacts||[]}));d(xe),i(null)}catch(oe){i(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching build data:",oe)}finally{s(!1)}})()},[]);const y=y1(c,g),C=g1(c),F=p&&c.find(z=>z.id===p)||null,N=()=>{window.location.reload()},_=()=>{console.log("Triggering new build...")},b=()=>{console.log("Creating new pipeline...")},U=z=>{h(z)},R=z=>{console.log("Selected pipeline:",z)},M=(z,oe)=>{console.log("Toggle pipeline:",z,"active:",oe)},P=z=>{console.log("Cancelling build:",z),h(null)},W=z=>{console.log("Retrying build:",z),h(null)},ae=()=>{window.location.reload()};return r?t.jsx(f1,{}):l?t.jsx(h1,{error:l,onRetry:ae}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(p1,{onTriggerBuild:_,onCreatePipeline:b}),t.jsx(S1,{stats:C,onRefresh:N,loading:r}),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(k1,{builds:y,selectedBuild:p,onBuildSelect:U,filters:g,onFiltersChange:v})}),t.jsx("div",{className:"lg:col-span-1",children:t.jsx(E1,{pipelines:m,onPipelineSelect:R,onPipelineToggle:M})})]}),t.jsx(C1,{build:F,onClose:()=>h(null),onCancel:P,onRetry:W}),y.length===0&&c.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:()=>v({package:"all",status:"all",pipeline:"all",dateRange:"all"}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]}),c.length===0&&!r&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:t.jsx(Mn,{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:_,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:b,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})]})]})}function R1({message:r="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:r})]})})}function A1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function P1({onRefresh:r,loading:s=!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"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,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(fr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Nh(r){return typeof r>"u"||r===null}function L1(r){return typeof r=="object"&&r!==null}function O1(r){return Array.isArray(r)?r:Nh(r)?[]:[r]}function I1(r,s){var l,i,c,d;if(s)for(d=Object.keys(s),l=0,i=d.length;l<i;l+=1)c=d[l],r[c]=s[c];return r}function M1(r,s){var l="",i;for(i=0;i<s;i+=1)l+=r;return l}function D1(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}var F1=Nh,U1=L1,B1=O1,z1=M1,H1=D1,$1=I1,Wc={isNothing:F1,isObject:U1,toArray:B1,repeat:z1,isNegativeZero:H1,extend:$1};function bh(r,s){var l="",i=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(l+='in "'+r.mark.name+'" '),l+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!s&&r.mark.snippet&&(l+=`
14
14
 
15
15
  `+r.mark.snippet),i+" "+l):i}function Ea(r,s){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=s,this.message=bh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ea.prototype=Object.create(Error.prototype);Ea.prototype.constructor=Ea;Ea.prototype.toString=function(s){return this.name+": "+bh(this,s)};var Ir=Ea,V1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],W1=["scalar","sequence","mapping"];function G1(r){var s={};return r!==null&&Object.keys(r).forEach(function(l){r[l].forEach(function(i){s[String(i)]=l})}),s}function K1(r,s){if(s=s||{},Object.keys(s).forEach(function(l){if(V1.indexOf(l)===-1)throw new Ir('Unknown option "'+l+'" is met in definition of "'+r+'" YAML type.')}),this.options=s,this.tag=r,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(l){return l},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=G1(s.styleAliases||null),W1.indexOf(this.kind)===-1)throw new Ir('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}var xt=K1;function uf(r,s){var l=[];return r[s].forEach(function(i){var c=l.length;l.forEach(function(d,m){d.tag===i.tag&&d.kind===i.kind&&d.multi===i.multi&&(c=m)}),l[c]=i}),l}function q1(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},s,l;function i(c){c.multi?(r.multi[c.kind].push(c),r.multi.fallback.push(c)):r[c.kind][c.tag]=r.fallback[c.tag]=c}for(s=0,l=arguments.length;s<l;s+=1)arguments[s].forEach(i);return r}function wc(r){return this.extend(r)}wc.prototype.extend=function(s){var l=[],i=[];if(s instanceof xt)i.push(s);else if(Array.isArray(s))i=i.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(l=l.concat(s.implicit)),s.explicit&&(i=i.concat(s.explicit));else throw new Ir("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");l.forEach(function(d){if(!(d instanceof xt))throw new Ir("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new Ir("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new Ir("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(d){if(!(d instanceof xt))throw new Ir("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var c=Object.create(wc.prototype);return c.implicit=(this.implicit||[]).concat(l),c.explicit=(this.explicit||[]).concat(i),c.compiledImplicit=uf(c,"implicit"),c.compiledExplicit=uf(c,"explicit"),c.compiledTypeMap=q1(c.compiledImplicit,c.compiledExplicit),c};var Y1=wc,Q1=new xt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}}),J1=new xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}}),X1=new xt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}}),Z1=new Y1({explicit:[Q1,J1,X1]});function ej(r){if(r===null)return!0;var s=r.length;return s===1&&r==="~"||s===4&&(r==="null"||r==="Null"||r==="NULL")}function tj(){return null}function nj(r){return r===null}var rj=new xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:ej,construct:tj,predicate:nj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function sj(r){if(r===null)return!1;var s=r.length;return s===4&&(r==="true"||r==="True"||r==="TRUE")||s===5&&(r==="false"||r==="False"||r==="FALSE")}function aj(r){return r==="true"||r==="True"||r==="TRUE"}function lj(r){return Object.prototype.toString.call(r)==="[object Boolean]"}var ij=new xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:sj,construct:aj,predicate:lj,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"});function oj(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function cj(r){return 48<=r&&r<=55}function uj(r){return 48<=r&&r<=57}function dj(r){if(r===null)return!1;var s=r.length,l=0,i=!1,c;if(!s)return!1;if(c=r[l],(c==="-"||c==="+")&&(c=r[++l]),c==="0"){if(l+1===s)return!0;if(c=r[++l],c==="b"){for(l++;l<s;l++)if(c=r[l],c!=="_"){if(c!=="0"&&c!=="1")return!1;i=!0}return i&&c!=="_"}if(c==="x"){for(l++;l<s;l++)if(c=r[l],c!=="_"){if(!oj(r.charCodeAt(l)))return!1;i=!0}return i&&c!=="_"}if(c==="o"){for(l++;l<s;l++)if(c=r[l],c!=="_"){if(!cj(r.charCodeAt(l)))return!1;i=!0}return i&&c!=="_"}}if(c==="_")return!1;for(;l<s;l++)if(c=r[l],c!=="_"){if(!uj(r.charCodeAt(l)))return!1;i=!0}return!(!i||c==="_")}function mj(r){var s=r,l=1,i;if(s.indexOf("_")!==-1&&(s=s.replace(/_/g,"")),i=s[0],(i==="-"||i==="+")&&(i==="-"&&(l=-1),s=s.slice(1),i=s[0]),s==="0")return 0;if(i==="0"){if(s[1]==="b")return l*parseInt(s.slice(2),2);if(s[1]==="x")return l*parseInt(s.slice(2),16);if(s[1]==="o")return l*parseInt(s.slice(2),8)}return l*parseInt(s,10)}function fj(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!Wc.isNegativeZero(r)}var hj=new xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:dj,construct:mj,predicate:fj,represent:{binary:function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),pj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function xj(r){return!(r===null||!pj.test(r)||r[r.length-1]==="_")}function gj(r){var s,l;return s=r.replace(/_/g,"").toLowerCase(),l=s[0]==="-"?-1:1,"+-".indexOf(s[0])>=0&&(s=s.slice(1)),s===".inf"?l===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:s===".nan"?NaN:l*parseFloat(s,10)}var yj=/^[-+]?[0-9]+e/;function vj(r,s){var l;if(isNaN(r))switch(s){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(s){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(s){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Wc.isNegativeZero(r))return"-0.0";return l=r.toString(10),yj.test(l)?l.replace("e",".e"):l}function jj(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||Wc.isNegativeZero(r))}var wj=new xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:xj,construct:gj,predicate:jj,represent:vj,defaultStyle:"lowercase"}),Nj=Z1.extend({implicit:[rj,ij,hj,wj]}),bj=Nj,Sh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kh=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 Sj(r){return r===null?!1:Sh.exec(r)!==null||kh.exec(r)!==null}function kj(r){var s,l,i,c,d,m,p,h=0,g=null,v,y,C;if(s=Sh.exec(r),s===null&&(s=kh.exec(r)),s===null)throw new Error("Date resolve error");if(l=+s[1],i=+s[2]-1,c=+s[3],!s[4])return new Date(Date.UTC(l,i,c));if(d=+s[4],m=+s[5],p=+s[6],s[7]){for(h=s[7].slice(0,3);h.length<3;)h+="0";h=+h}return s[9]&&(v=+s[10],y=+(s[11]||0),g=(v*60+y)*6e4,s[9]==="-"&&(g=-g)),C=new Date(Date.UTC(l,i,c,d,m,p,h)),g&&C.setTime(C.getTime()-g),C}function Ej(r){return r.toISOString()}var Cj=new xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Sj,construct:kj,instanceOf:Date,represent:Ej});function _j(r){return r==="<<"||r===null}var Tj=new xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_j}),Gc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
16
  \r`;function Rj(r){if(r===null)return!1;var s,l,i=0,c=r.length,d=Gc;for(l=0;l<c;l++)if(s=d.indexOf(r.charAt(l)),!(s>64)){if(s<0)return!1;i+=6}return i%8===0}function Aj(r){var s,l,i=r.replace(/[\r\n=]/g,""),c=i.length,d=Gc,m=0,p=[];for(s=0;s<c;s++)s%4===0&&s&&(p.push(m>>16&255),p.push(m>>8&255),p.push(m&255)),m=m<<6|d.indexOf(i.charAt(s));return l=c%4*6,l===0?(p.push(m>>16&255),p.push(m>>8&255),p.push(m&255)):l===18?(p.push(m>>10&255),p.push(m>>2&255)):l===12&&p.push(m>>4&255),new Uint8Array(p)}function Pj(r){var s="",l=0,i,c,d=r.length,m=Gc;for(i=0;i<d;i++)i%3===0&&i&&(s+=m[l>>18&63],s+=m[l>>12&63],s+=m[l>>6&63],s+=m[l&63]),l=(l<<8)+r[i];return c=d%3,c===0?(s+=m[l>>18&63],s+=m[l>>12&63],s+=m[l>>6&63],s+=m[l&63]):c===2?(s+=m[l>>10&63],s+=m[l>>4&63],s+=m[l<<2&63],s+=m[64]):c===1&&(s+=m[l>>2&63],s+=m[l<<4&63],s+=m[64],s+=m[64]),s}function Lj(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}var Oj=new xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Rj,construct:Aj,predicate:Lj,represent:Pj}),Ij=Object.prototype.hasOwnProperty,Mj=Object.prototype.toString;function Dj(r){if(r===null)return!0;var s=[],l,i,c,d,m,p=r;for(l=0,i=p.length;l<i;l+=1){if(c=p[l],m=!1,Mj.call(c)!=="[object Object]")return!1;for(d in c)if(Ij.call(c,d))if(!m)m=!0;else return!1;if(!m)return!1;if(s.indexOf(d)===-1)s.push(d);else return!1}return!0}function Fj(r){return r!==null?r:[]}var Uj=new xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Dj,construct:Fj}),Bj=Object.prototype.toString;function zj(r){if(r===null)return!0;var s,l,i,c,d,m=r;for(d=new Array(m.length),s=0,l=m.length;s<l;s+=1){if(i=m[s],Bj.call(i)!=="[object Object]"||(c=Object.keys(i),c.length!==1))return!1;d[s]=[c[0],i[c[0]]]}return!0}function Hj(r){if(r===null)return[];var s,l,i,c,d,m=r;for(d=new Array(m.length),s=0,l=m.length;s<l;s+=1)i=m[s],c=Object.keys(i),d[s]=[c[0],i[c[0]]];return d}var $j=new xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:zj,construct:Hj}),Vj=Object.prototype.hasOwnProperty;function Wj(r){if(r===null)return!0;var s,l=r;for(s in l)if(Vj.call(l,s)&&l[s]!==null)return!1;return!0}function Gj(r){return r!==null?r:{}}var Kj=new xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Wj,construct:Gj});bj.extend({implicit:[Cj,Tj],explicit:[Oj,Uj,$j,Kj]});function df(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
17
- `:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}var qj=new Array(256),Yj=new Array(256);for(var gs=0;gs<256;gs++)qj[gs]=df(gs)?1:0,Yj[gs]=df(gs);const Qj=r=>{switch(r){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"}},mf=r=>{switch(r){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"}},Jj=(r,s)=>r.filter(l=>{const i=s.section==="all"||l.id===s.section,c=s.type==="all"||l.type===s.type,d=s.status==="all"||s.status==="secrets"&&l.hasSecrets||s.status==="standard"&&!l.hasSecrets,m=!s.search||l.name.toLowerCase().includes(s.search.toLowerCase())||l.path.toLowerCase().includes(s.search.toLowerCase());return i&&c&&d&&m}),Xj=r=>[...new Set(r.map(s=>s.type))],Zj=r=>{if(r===0)return"0 Bytes";const s=1024,l=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,i)).toFixed(2))+" "+l[i]},e2=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Eh=r=>{const s=r.split(".").pop()?.toLowerCase(),l={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 r==="package.json"?"json":r==="docker-compose.yml"||r==="docker-compose.yaml"?"yaml":r===".eslintrc.js"||r===".prettierrc.js"?"javascript":r==="tsconfig.json"?"json":l[s||""]||"text"},t2=r=>{const s=[/^([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 l=r;return s.forEach(i=>{l=l.replace(i,(c,d,m)=>{const p="*".repeat(Math.min(m.length,8));return c.replace(m,p)})}),l},n2=r=>{switch(Eh(r)){case"json":return t.jsx(Zl,{className:"w-6 h-6 text-primary-600"});case"yaml":return t.jsx(Zl,{className:"w-6 h-6 text-primary-600"});case"javascript":case"typescript":return t.jsx(Ur,{className:"w-6 h-6 text-primary-600"});case"env":return"🔐";case"markdown":return"📝";default:return t.jsx(Oc,{className:"w-6 h-6 text-primary-600"})}};function r2({configs:r,selectedConfig:s,onConfigSelect:l,filters:i,onFiltersChange:c}){const d=Xj(r);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(Dc,{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:i.search,onChange:m=>c({...i,search: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 text-sm"})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(ci,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.type,onChange:m=>c({...i,type:m.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"}),d.map(m=>t.jsx("option",{value:m,children:m.charAt(0).toUpperCase()+m.slice(1)},m))]})]}),t.jsxs("select",{value:i.status,onChange:m=>c({...i,status:m.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:r.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(Oc,{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:r.map(m=>t.jsx("button",{onClick:()=>l(m.id),className:`w-full text-left p-3 rounded-lg mb-2 transition-colors ${s===m.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:n2(m.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:m.name}),m.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:m.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 ${Qj(m.type)}`,children:m.type}),t.jsx("span",{className:"text-xs text-gray-400",children:Zj(m.size)})]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:e2(m.lastModified)})]})]})},m.id))})}),t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsxs("div",{className:"text-xs text-gray-500",children:[r.length," file",r.length!==1?"s":""," found"]})})]})}function s2({isEditing:r,canEdit:s,hasSecrets:l,showSecrets:i,saving:c,onStartEdit:d,onSaveEdit:m,onCancelEdit:p,onToggleSecrets:h,onRefresh:g,content:v}){const[y,C]=w.useState(!1),F=async()=>{try{const N=v||"No content available";await navigator.clipboard.writeText(N),C(!0),setTimeout(()=>{C(!1)},4e3)}catch(N){console.error("Failed to copy to clipboard:",N),C(!0),setTimeout(()=>C(!1),2e3)}};return c?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(fr,{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:g,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(fr,{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:[r?t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:m,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(ai,{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(Ss,{className:"w-4 h-4 mr-1"}),"Cancel"]})]}):s&&t.jsxs("button",{onClick:d,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(Ox,{className:"w-4 h-4 mr-1"}),"Edit"]}),l&&t.jsx("button",{onClick:h,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${i?"text-red-700 bg-red-100 hover:bg-red-200":"text-yellow-700 bg-yellow-100 hover:bg-yellow-200"}`,children:i?t.jsxs(t.Fragment,{children:[t.jsx(Lx,{className:"w-4 h-4 mr-1"}),"Hide Secrets"]}):t.jsxs(t.Fragment,{children:[t.jsx(Px,{className:"w-4 h-4 mr-1"}),"Show Secrets"]})})]}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsx("button",{onClick:F,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${y?"text-green-700 bg-green-100 border border-green-300":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:y?t.jsxs(t.Fragment,{children:[t.jsx(Fx,{className:"w-4 h-4 mr-1"}),"Copied!"]}):t.jsxs(t.Fragment,{children:[t.jsx(Ux,{className:"w-4 h-4 mr-1"}),"Copy"]})})})]})}function a2({config:r,isEditing:s,editValue:l,onStartEdit:i,onSaveEdit:c,onCancelEdit:d,onValueChange:m,showSecrets:p,onToggleSecrets:h}){if(!r)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(Zl,{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 g=Eh(r.name),v=p?r.content:t2(r.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(Zl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:r.name}),t.jsx("p",{className:"text-sm text-gray-500",children:r.path})]})]})}),t.jsx("div",{className:"flex-1 p-4",children:s?t.jsx("div",{className:"h-full",children:t.jsx("textarea",{value:l,onChange:y=>m(y.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-${g}`,children:v})})})}),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: ",g.toUpperCase()]}),t.jsxs("span",{children:["Size: ",r.content.length," characters"]}),r.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:s?t.jsx("span",{className:"text-blue-600 font-medium",children:"Editing mode"}):r.isEditable?t.jsx("span",{className:"text-green-600",children:"Editable"}):t.jsx("span",{className:"text-gray-400",children:"Read-only"})})]})})]})}function l2({validation:r,configName:s}){const l=h=>{switch(h){case"valid":return t.jsx(At,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(lt,{className:"w-5 h-5 text-yellow-500"});case"error":return t.jsx(Dt,{className:"w-5 h-5 text-red-500"});default:return t.jsx(vs,{className:"w-5 h-5 text-gray-500"})}},c=r.some(h=>h.status==="error")?"error":r.some(h=>h.status==="warning")?"warning":"valid",d=r.filter(h=>h.status==="error").length,m=r.filter(h=>h.status==="warning").length,p=r.filter(h=>h.status==="valid").length;return r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(vs,{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:[l(c),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mf(c)}`,children:c.toUpperCase()})]})]}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Validation results for ",s]})]}),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:m}),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:d}),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:r.map((h,g)=>t.jsx("div",{className:`p-3 rounded-lg border ${h.status==="error"?"border-red-200 bg-red-50":h.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:[l(h.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:h.field}),t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${mf(h.status)}`,children:h.status})]}),t.jsx("p",{className:"text-sm text-gray-600",children:h.message})]})]})},g))})}),(d>0||m>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:[d>0&&t.jsxs("span",{className:"text-red-600 font-medium",children:[d," error",d>1?"s":""," need attention"]}),m>0&&d===0&&t.jsxs("span",{className:"text-yellow-600 font-medium",children:[m," warning",m>1?"s":""," to review"]})]}),t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm font-medium",children:"View Details"})]})})]})}function i2(){const[r,s]=w.useState(!0),[l,i]=w.useState(!1),[c,d]=w.useState(null),[m,p]=w.useState([]),[h,g]=w.useState(null),[v,y]=w.useState(!1),[C,F]=w.useState(""),[N,_]=w.useState(!1),[b,U]=w.useState({section:"all",type:"all",status:"all",search:""});w.useEffect(()=>{(async()=>{try{s(!0);const me=(await Ft.getConfigurationFiles()).map(ve=>({id:ve.id||ve.name,name:ve.name,path:ve.path||ve.name,type:ve.type||"text",content:ve.content||"",size:ve.content?.length||0,lastModified:ve.lastModified||new Date().toISOString(),hasSecrets:ve.hasSecrets||!1,isEditable:ve.isEditable!==!1,validation:ve.validation||[]}));p(me),d(null)}catch(ye){d(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching config files:",ye)}finally{s(!1)}})()},[]);const R=Jj(m,b),M=h&&m.find(te=>te.id===h)||null,P=()=>{window.location.reload()},W=te=>{g(te),y(!1),F("")},ae=()=>{M&&(y(!0),F(M.content))},z=async()=>{if(M&&!l)try{i(!0),d(null);const te=await Ft.saveConfigurationFile(M.id,C);p(ye=>ye.map(me=>me.id===h?{...te,isEditable:me.isEditable}:me)),h===M.id&&g(M.id),y(!1),F("")}catch(te){console.error("Error saving config file:",te),d(`${Ce.FAILED_TO_SAVE_CONFIG}: ${te.message}`)}finally{i(!1)}},oe=()=>{y(!1),F("")},xe=()=>{_(!N)},Ne=()=>{window.location.reload()};return r?t.jsx(R1,{}):c?t.jsx(A1,{error:c,onRetry:Ne}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(P1,{onRefresh:P,loading:r}),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(r2,{configs:R,selectedConfig:h,onConfigSelect:W,filters:b,onFiltersChange:U})}),t.jsxs("div",{className:"lg:col-span-2 flex flex-col",children:[M&&t.jsx("div",{className:"mb-4",children:t.jsx(s2,{isEditing:v,canEdit:M.isEditable,hasSecrets:M.hasSecrets,showSecrets:N,saving:l,onStartEdit:ae,onSaveEdit:z,onCancelEdit:oe,onToggleSecrets:xe,onRefresh:P,content:v?C:M?.content})}),t.jsx("div",{className:"flex-1",children:t.jsx(a2,{config:M,isEditing:v,editValue:C,saving:l,onStartEdit:ae,onSaveEdit:z,onCancelEdit:oe,onValueChange:F,showSecrets:N,onToggleSecrets:xe})})]}),t.jsx("div",{className:"lg:col-span-1 space-y-6",children:t.jsx(l2,{validation:M?.validation||[],configName:M?.name||"No file selected"})})]}),R.length===0&&!r&&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(Oc,{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:b.search||b.type!=="all"||b.status!=="all"?"Try adjusting your filters to see more results.":"No configuration files are available to inspect."}),(b.search||b.type!=="all"||b.status!=="all")&&t.jsx("button",{onClick:()=>U({section:"all",type:"all",status:"all",search:""}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]})]})}const Fr={async getPackages(){return we.get("/releases/packages")},async analyzeChanges(r,s){return we.post("/releases/analyze",{packageNames:r,packagePaths:s})},async checkReadiness(r,s){return we.post("/releases/check-readiness",{packageNames:r,packagePaths:s})},async prepare(r,s,l=!1){return we.post("/releases/prepare",{packageNames:r,packagePaths:s,dryRun:l})},async startPublish(r,s,l){return we.post("/releases/start",{packageNames:r,packagePaths:s,...l})},async getPipelineStatus(r){return we.get(`/releases/status/${r}`)},async getPipelineDetails(r){return we.get(`/releases/details/${r}`)},async getPipelines(r,s){const l=new URLSearchParams;r&&l.append("status",r),s&&l.append("limit",String(s));const i=l.toString();return we.get(`/releases/pipelines?${i}`)},async cancelPipeline(r){return we.post(`/releases/cancel/${r}`)},async getPackageVersions(r){return we.get(`/releases/npm/${r}/versions`)},async isVersionAvailable(r,s){return we.get(`/releases/npm/${r}/${s}/available`)},async getHealth(){return we.get("/releases/health")}};function o2({packages:r,onConfirm:s,loading:l}){const[i,c]=w.useState(new Set),[d,m]=w.useState(""),p=w.useMemo(()=>r.filter(y=>!y.private&&y.name.toLowerCase().includes(d.toLowerCase())),[r,d]),h=y=>{const C=new Set(i);C.has(y)?C.delete(y):C.add(y),c(C)},g=()=>{i.size===p.length?c(new Set):c(new Set(p.map(y=>y.name)))},v=()=>{const y=r.filter(C=>i.has(C.name));s(y)};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:d,onChange:y=>m(y.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:g,className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:i.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(y=>t.jsx("div",{className:"p-4 hover:bg-gray-50 cursor-pointer transition",onClick:()=>h(y.name),children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:i.has(y.name),onChange:()=>h(y.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:y.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",y.version]})]}),y.dependencies&&y.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:[y.dependencies.length," deps"]})]})},y.name))})]}),t.jsx("div",{className:"flex gap-3 justify-end",children:t.jsxs("button",{onClick:v,disabled:i.size===0||l,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 (",i.size," selected)"]})})]})}const c2={major:"Breaking changes, incompatible API changes",minor:"New features, backward compatible",patch:"Bug fixes, patches, backward compatible"};function u2({packages:r,onConfirm:s,onBack:l}){const[i,c]=w.useState(r.reduce((h,g)=>({...h,[g.name]:g.bumpType}),{})),d=(h,g)=>{const v=h.split(".").map(Number);return g==="major"?`${v[0]+1}.0.0`:g==="minor"?`${v[0]}.${v[1]+1}.0`:`${v[0]}.${v[1]}.${v[2]+1}`},m=(h,g)=>{c(v=>({...v,[h]:g}))},p=()=>{const h=r.map(g=>({...g,bumpType:i[g.name],newVersion:d(g.currentVersion,i[g.name])}));s(h)};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(c2).map(([h,g])=>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:h}),t.jsx("p",{className:"text-sm text-gray-600",children:g})]},h))}),t.jsx("div",{className:"space-y-4",children:r.map(h=>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:h.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",h.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",d(h.currentVersion,i[h.name])]})]})]}),t.jsx("div",{className:"grid grid-cols-3 gap-3",children:["major","minor","patch"].map(g=>t.jsx("button",{onClick:()=>m(h.name,g),className:`p-3 rounded-lg border-2 transition font-medium text-sm ${i[h.name]===g?"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:g})},g))}),h.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:["ℹ️ ",h.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"})]})]},h.name))}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:l,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 d2({packages:r,existingChangesets:s,onConfirm:l,onBack:i,loading:c}){const[d,m]=w.useState(""),[p,h]=w.useState([]),g=()=>{const y=[];return d.trim()||y.push("Please enter a changelog summary"),d.trim().length<10&&y.push(Jx),h(y),y.length===0},v=()=>{g()&&l(d)};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:d,onChange:y=>{m(y.target.value),g()},placeholder:Qx,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((y,C)=>t.jsx("p",{className:"text-sm text-red-600",children:y},C))})]}),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:r.map(y=>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:y.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:[y.currentVersion," ",t.jsx(wa,{})," ",y.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:y.bumpType.charAt(0).toUpperCase()+y.bumpType.slice(1)})})]},y.name))})]}),s.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 ",s.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:i,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:c,children:"Back"}),t.jsx("button",{onClick:v,disabled:c||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:c?"Processing...":"Continue to Validation"})]})]})}function m2({validation:r,packages:s,onConfirm:l,onBack:i,loading:c}){const d=[{name:"User Permissions",passed:r.checks.permissions},{name:"Working Tree Clean",passed:r.checks.workingTreeClean},{name:"CI Tests Passing",passed:r.checks.ciPassing},{name:"Version Available on npm",passed:r.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 ${r.isValid?"bg-green-50":"bg-red-50"}`,children:[t.jsx("p",{className:`font-medium ${r.isValid?"text-green-900":"text-red-900"}`,children:r.isValid?"Ready to Release":"Not Ready"}),t.jsx("p",{className:`text-sm mt-1 ${r.isValid?"text-green-700":"text-red-700"}`,children:r.isValid?"All checks passed. Safe to proceed.":`${r.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:[s.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:d.map((m,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg ${m.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 p-1 ${m.passed?"bg-green-500":"bg-red-500"}`,children:m.passed?t.jsx(ai,{}):t.jsx(Ss,{})}),t.jsx("span",{className:`font-medium ${m.passed?"text-green-900":"text-red-900"}`,children:m.name})]},p))})]}),r.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:r.errors.map((m,p)=>t.jsxs("p",{className:"text-red-700 text-sm",children:["• ",m]},p))})]}),r.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:r.warnings.map((m,p)=>t.jsx("p",{className:"text-yellow-700 text-sm",children:m},p))})]}),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",disabled:c,children:"Back"}),t.jsx("button",{onClick:l,disabled:!r.isValid||c,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:c?"Publishing...":"Confirm & Publish"})]})]})}function f2({packages:r,summary:s,onReset:l}){const i=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 ",r.length," package(s)"]}),t.jsxs("p",{className:"text-gray-500 text-sm",children:["Initiated on ",i]})]}),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:r.map(c=>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:c.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:["v",c.currentVersion," ",t.jsx(wa,{})," v",c.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:c.bumpType.charAt(0).toUpperCase()+c.bumpType.slice(1)})]},c.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:s})})]}),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:l,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.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View Release on GitHub ",t.jsx(wa,{})]}),t.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View on npm ",t.jsx(wa,{})]})]})]})}function h2({message:r="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:r})]})}function p2({error:r,onRetry:s}){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:r}),t.jsx("button",{onClick:s,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 x2(){const{isAuthenticated:r,hasPermission:s}=zr(),[l,i]=w.useState("select"),[c,d]=w.useState([]),[m,p]=w.useState(""),[h,g]=w.useState(!1),[v,y]=w.useState(null),[C,F]=w.useState(null),[N,_]=w.useState([]),[b,U]=w.useState([]);w.useEffect(()=>{R()},[]);const R=async()=>{try{g(!0);const te=await we.get(Ae.PUBLISH.PACKAGES);if(te.success)_(te.data.packages||[]);else{console.warn("Failed to fetch packages:",te.error?.message);const me=await we.get(Ae.PACKAGES.LIST);me.success&&_(me.data||[])}const ye=await we.get(Ae.PUBLISH.CHANGESETS);ye.success?U(ye.data.changesets||[]):(ye.error?.status===401||ye.error?.status===403)&&(window.location.href="/login"),y(null)}catch(te){const ye=te instanceof Error?te.message:Ce.FAILED_TO_FETCH_PACKAGES;y(ye),console.error("Error fetching workspace data:",te)}finally{g(!1)}},M=te=>{const ye=te.map(me=>({name:me.name,currentVersion:me.version,newVersion:me.version,bumpType:"patch",affectedDependencies:me.dependents||[]}));d(ye),i("bump")},P=te=>{d(te),i("preview")},W=te=>{p(te),ae(c,te)},ae=async(te,ye)=>{try{g(!0);const me=te.map(D=>D.name),ve=me.reduce((D,Y)=>{const ue=N.find(ne=>ne.name===Y);return ue&&(D[Y]=ue.path||"./packages/"+Y.split("/").pop()),D},{}),Z=await Fr.checkReadiness(me,ve),Q=[],X=[];let B=!0;if(Z.success){const D=Z.data;B=D.canProceed!==!1,D.globalBlockers&&Array.isArray(D.globalBlockers)&&Q.push(...D.globalBlockers.map(Y=>`🚨 ${Y}`)),D.checks&&Array.isArray(D.checks)&&D.checks.forEach(Y=>{Y.blockers&&Array.isArray(Y.blockers)&&Y.blockers.forEach(ue=>{Q.push(`❌ ${Y.packageName}: ${ue}`)}),Y.warnings&&Array.isArray(Y.warnings)&&Y.warnings.forEach(ue=>{X.push(`⚠️ ${Y.packageName}: ${ue}`)})})}const J=await we.post(Ae.PUBLISH.PREVIEW,{packages:me,bumps:te.map(D=>({package:D.name,bumpType:D.bumpType})),summary:ye});if(!J.success)throw new Error(Ce.VALIDATION_FAILED);const q=J.data,S={isValid:(q.isValid??!0)&&B,errors:[...Q,...q.errors??[]],warnings:[...X,...q.warnings??[]],checks:q.checks??{permissions:!0,workingTreeClean:Q.length===0,ciPassing:!0,versionAvailable:!Q.some(D=>D.includes("already exists"))}};F(S),i("validate"),y(null)}catch(me){const ve=me instanceof Error?me.message:"Validation error";y(ve),console.error("Validation error:",me)}finally{g(!1)}},z=async()=>{try{if(C&&!C.isValid){y("Cannot proceed with publishing. Please fix validation errors and re-validate."),i("validate");return}if(!s("maintain")){y(Ce.PERMISSION_ERROR);return}g(!0);const te=c.map(Z=>Z.name),ye=te.reduce((Z,Q)=>{const X=N.find(B=>B.name===Q);return X&&(Z[Q]=X.path||"./packages/"+Q.split("/").pop()),Z},{}),me={};c.forEach(Z=>{me[Z.name]=Z.newVersion});const ve=await Fr.startPublish(te,ye,{versionMap:me,method:"node",dryRun:!1,autoTag:!0,createReleases:!0});if(!ve.success)throw new Error(ve.error?.message||"Failed to start publishing");try{await we.post(Ae.PUBLISH.CHANGESETS,{packages:te,bumps:c.map(Z=>({package:Z.name,bumpType:Z.bumpType})),summary:m})}catch(Z){console.warn("Failed to create changeset record:",Z)}i("confirm"),y(null)}catch(te){const ye=te instanceof Error?te.message:"Publishing error";y(ye)}finally{g(!1)}},oe=()=>{i("select"),d([]),p(""),F(null),y(null),R()};if(!r)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(h&&l==="select"&&N.length===0)return t.jsx(h2,{message:"Loading workspace packages..."});if(v&&l==="select")return t.jsx(p2,{error:v,onRetry:R});const xe=s("write"),Ne=s("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 the independent release engine"})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step"," ",["select","bump","preview","validate","confirm"].indexOf(l)+1," ","of 5"]})]}),!xe&&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."})]}),v&&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:v})]}),b.length>0&&l==="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:[b.length," pending release(s)"]}),t.jsx("p",{className:"text-blue-600 text-sm mt-1",children:"Pull the latest changes and refresh the dashboard to see if these have been published."})]}),l==="select"&&!xe&&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."})]}),l==="select"&&xe&&t.jsx(o2,{packages:N,onConfirm:M,loading:h}),l==="bump"&&xe&&t.jsx(u2,{packages:c,onConfirm:P,onBack:()=>i("select")}),l==="preview"&&xe&&t.jsx(d2,{packages:c,existingChangesets:b,onConfirm:W,onBack:()=>i("bump"),loading:h}),l==="validate"&&!Ne&&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."})]}),l==="validate"&&Ne&&C&&t.jsx(m2,{validation:C,packages:c,onConfirm:z,onBack:()=>i("preview"),loading:h}),l==="confirm"&&t.jsx(f2,{packages:c,summary:m,onReset:oe}),t.jsx("div",{className:"flex gap-2 justify-center",children:["select","bump","preview","validate","confirm"].map((te,ye)=>t.jsx("div",{className:`h-2 flex-1 rounded-full transition-colors ${["select","bump","preview","validate","confirm"].indexOf(l)>=ye?"bg-primary-500":"bg-gray-300"}`},te))})]})}const{entries:Ch,setPrototypeOf:ff,isFrozen:g2,getPrototypeOf:y2,getOwnPropertyDescriptor:v2}=Object;let{freeze:jt,seal:Yt,create:Nc}=Object,{apply:bc,construct:Sc}=typeof Reflect<"u"&&Reflect;jt||(jt=function(s){return s});Yt||(Yt=function(s){return s});bc||(bc=function(s,l){for(var i=arguments.length,c=new Array(i>2?i-2:0),d=2;d<i;d++)c[d-2]=arguments[d];return s.apply(l,c)});Sc||(Sc=function(s){for(var l=arguments.length,i=new Array(l>1?l-1:0),c=1;c<l;c++)i[c-1]=arguments[c];return new s(...i)});const Gl=wt(Array.prototype.forEach),j2=wt(Array.prototype.lastIndexOf),hf=wt(Array.prototype.pop),xa=wt(Array.prototype.push),w2=wt(Array.prototype.splice),Jl=wt(String.prototype.toLowerCase),ac=wt(String.prototype.toString),lc=wt(String.prototype.match),ga=wt(String.prototype.replace),N2=wt(String.prototype.indexOf),b2=wt(String.prototype.trim),cn=wt(Object.prototype.hasOwnProperty),vt=wt(RegExp.prototype.test),ya=S2(TypeError);function wt(r){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var l=arguments.length,i=new Array(l>1?l-1:0),c=1;c<l;c++)i[c-1]=arguments[c];return bc(r,s,i)}}function S2(r){return function(){for(var s=arguments.length,l=new Array(s),i=0;i<s;i++)l[i]=arguments[i];return Sc(r,l)}}function Ee(r,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jl;ff&&ff(r,null);let i=s.length;for(;i--;){let c=s[i];if(typeof c=="string"){const d=l(c);d!==c&&(g2(s)||(s[i]=d),c=d)}r[c]=!0}return r}function k2(r){for(let s=0;s<r.length;s++)cn(r,s)||(r[s]=null);return r}function vn(r){const s=Nc(null);for(const[l,i]of Ch(r))cn(r,l)&&(Array.isArray(i)?s[l]=k2(i):i&&typeof i=="object"&&i.constructor===Object?s[l]=vn(i):s[l]=i);return s}function va(r,s){for(;r!==null;){const i=v2(r,s);if(i){if(i.get)return wt(i.get);if(typeof i.value=="function")return wt(i.value)}r=y2(r)}function l(){return null}return l}const pf=jt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ic=jt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),oc=jt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E2=jt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),cc=jt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),C2=jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xf=jt(["#text"]),gf=jt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),uc=jt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yf=jt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kl=jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_2=Yt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),T2=Yt(/<%[\w\W]*|[\w\W]*%>/gm),R2=Yt(/\$\{[\w\W]*/gm),A2=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),P2=Yt(/^aria-[\-\w]+$/),_h=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),L2=Yt(/^(?:\w+script|data):/i),O2=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Th=Yt(/^html$/i),I2=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i);var vf=Object.freeze({__proto__:null,ARIA_ATTR:P2,ATTR_WHITESPACE:O2,CUSTOM_ELEMENT:I2,DATA_ATTR:A2,DOCTYPE_NAME:Th,ERB_EXPR:T2,IS_ALLOWED_URI:_h,IS_SCRIPT_OR_DATA:L2,MUSTACHE_EXPR:_2,TMPLIT_EXPR:R2});const ja={element:1,text:3,progressingInstruction:7,comment:8,document:9},M2=function(){return typeof window>"u"?null:window},D2=function(s,l){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let i=null;const c="data-tt-policy-suffix";l&&l.hasAttribute(c)&&(i=l.getAttribute(c));const d="dompurify"+(i?"#"+i:"");try{return s.createPolicy(d,{createHTML(m){return m},createScriptURL(m){return m}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},jf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Rh(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:M2();const s=de=>Rh(de);if(s.version="3.3.1",s.removed=[],!r||!r.document||r.document.nodeType!==ja.document||!r.Element)return s.isSupported=!1,s;let{document:l}=r;const i=l,c=i.currentScript,{DocumentFragment:d,HTMLTemplateElement:m,Node:p,Element:h,NodeFilter:g,NamedNodeMap:v=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:y,DOMParser:C,trustedTypes:F}=r,N=h.prototype,_=va(N,"cloneNode"),b=va(N,"remove"),U=va(N,"nextSibling"),R=va(N,"childNodes"),M=va(N,"parentNode");if(typeof m=="function"){const de=l.createElement("template");de.content&&de.content.ownerDocument&&(l=de.content.ownerDocument)}let P,W="";const{implementation:ae,createNodeIterator:z,createDocumentFragment:oe,getElementsByTagName:xe}=l,{importNode:Ne}=i;let te=jf();s.isSupported=typeof Ch=="function"&&typeof M=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ye,ERB_EXPR:me,TMPLIT_EXPR:ve,DATA_ATTR:Z,ARIA_ATTR:Q,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:J}=vf;let{IS_ALLOWED_URI:q}=vf,S=null;const D=Ee({},[...pf,...ic,...oc,...cc,...xf]);let Y=null;const ue=Ee({},[...gf,...uc,...yf,...Kl]);let ne=Object.seal(Nc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,Te=null;const _e=Object.seal(Nc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ie=!0,it=!0,pr=!1,Es=!0,Qt=!1,Dn=!0,dn=!1,Hr=!1,xr=!1,jn=!1,Fn=!1,mn=!1,wn=!0,$r=!1;const Oa="user-content-";let Vr=!0,Un=!1,Nn={},Nt=null;const Bn=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Cs=null;const zn=Ee({},["audio","video","img","source","image","track"]);let bn=null;const Ia=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gr="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let fn=Jt,vr=!1,jr=null;const _s=Ee({},[gr,yr,Jt],ac);let Hn=Ee({},["mi","mo","mn","ms","mtext"]),Xt=Ee({},["annotation-xml"]);const $n=Ee({},["title","style","font","a","script"]);let Vn=null;const Ma=["application/xhtml+xml","text/html"],Da="text/html";let We=null,Sn=null;const Ts=l.createElement("form"),Rs=function(E){return E instanceof RegExp||E instanceof Function},kn=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Sn&&Sn===E)){if((!E||typeof E!="object")&&(E={}),E=vn(E),Vn=Ma.indexOf(E.PARSER_MEDIA_TYPE)===-1?Da:E.PARSER_MEDIA_TYPE,We=Vn==="application/xhtml+xml"?ac:Jl,S=cn(E,"ALLOWED_TAGS")?Ee({},E.ALLOWED_TAGS,We):D,Y=cn(E,"ALLOWED_ATTR")?Ee({},E.ALLOWED_ATTR,We):ue,jr=cn(E,"ALLOWED_NAMESPACES")?Ee({},E.ALLOWED_NAMESPACES,ac):_s,bn=cn(E,"ADD_URI_SAFE_ATTR")?Ee(vn(Ia),E.ADD_URI_SAFE_ATTR,We):Ia,Cs=cn(E,"ADD_DATA_URI_TAGS")?Ee(vn(zn),E.ADD_DATA_URI_TAGS,We):zn,Nt=cn(E,"FORBID_CONTENTS")?Ee({},E.FORBID_CONTENTS,We):Bn,be=cn(E,"FORBID_TAGS")?Ee({},E.FORBID_TAGS,We):vn({}),Te=cn(E,"FORBID_ATTR")?Ee({},E.FORBID_ATTR,We):vn({}),Nn=cn(E,"USE_PROFILES")?E.USE_PROFILES:!1,Ie=E.ALLOW_ARIA_ATTR!==!1,it=E.ALLOW_DATA_ATTR!==!1,pr=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Es=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qt=E.SAFE_FOR_TEMPLATES||!1,Dn=E.SAFE_FOR_XML!==!1,dn=E.WHOLE_DOCUMENT||!1,jn=E.RETURN_DOM||!1,Fn=E.RETURN_DOM_FRAGMENT||!1,mn=E.RETURN_TRUSTED_TYPE||!1,xr=E.FORCE_BODY||!1,wn=E.SANITIZE_DOM!==!1,$r=E.SANITIZE_NAMED_PROPS||!1,Vr=E.KEEP_CONTENT!==!1,Un=E.IN_PLACE||!1,q=E.ALLOWED_URI_REGEXP||_h,fn=E.NAMESPACE||Jt,Hn=E.MATHML_TEXT_INTEGRATION_POINTS||Hn,Xt=E.HTML_INTEGRATION_POINTS||Xt,ne=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Rs(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ne.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Rs(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ne.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qt&&(it=!1),Fn&&(jn=!0),Nn&&(S=Ee({},xf),Y=[],Nn.html===!0&&(Ee(S,pf),Ee(Y,gf)),Nn.svg===!0&&(Ee(S,ic),Ee(Y,uc),Ee(Y,Kl)),Nn.svgFilters===!0&&(Ee(S,oc),Ee(Y,uc),Ee(Y,Kl)),Nn.mathMl===!0&&(Ee(S,cc),Ee(Y,yf),Ee(Y,Kl))),E.ADD_TAGS&&(typeof E.ADD_TAGS=="function"?_e.tagCheck=E.ADD_TAGS:(S===D&&(S=vn(S)),Ee(S,E.ADD_TAGS,We))),E.ADD_ATTR&&(typeof E.ADD_ATTR=="function"?_e.attributeCheck=E.ADD_ATTR:(Y===ue&&(Y=vn(Y)),Ee(Y,E.ADD_ATTR,We))),E.ADD_URI_SAFE_ATTR&&Ee(bn,E.ADD_URI_SAFE_ATTR,We),E.FORBID_CONTENTS&&(Nt===Bn&&(Nt=vn(Nt)),Ee(Nt,E.FORBID_CONTENTS,We)),E.ADD_FORBID_CONTENTS&&(Nt===Bn&&(Nt=vn(Nt)),Ee(Nt,E.ADD_FORBID_CONTENTS,We)),Vr&&(S["#text"]=!0),dn&&Ee(S,["html","head","body"]),S.table&&(Ee(S,["tbody"]),delete be.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw ya('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ya('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');P=E.TRUSTED_TYPES_POLICY,W=P.createHTML("")}else P===void 0&&(P=D2(F,c)),P!==null&&typeof W=="string"&&(W=P.createHTML(""));jt&&jt(E),Sn=E}},Wr=Ee({},[...ic,...oc,...E2]),Wn=Ee({},[...cc,...C2]),pi=function(E){let G=M(E);(!G||!G.tagName)&&(G={namespaceURI:fn,tagName:"template"});const le=Jl(E.tagName),Me=Jl(G.tagName);return jr[E.namespaceURI]?E.namespaceURI===yr?G.namespaceURI===Jt?le==="svg":G.namespaceURI===gr?le==="svg"&&(Me==="annotation-xml"||Hn[Me]):!!Wr[le]:E.namespaceURI===gr?G.namespaceURI===Jt?le==="math":G.namespaceURI===yr?le==="math"&&Xt[Me]:!!Wn[le]:E.namespaceURI===Jt?G.namespaceURI===yr&&!Xt[Me]||G.namespaceURI===gr&&!Hn[Me]?!1:!Wn[le]&&($n[le]||!Wr[le]):!!(Vn==="application/xhtml+xml"&&jr[E.namespaceURI]):!1},ut=function(E){xa(s.removed,{element:E});try{M(E).removeChild(E)}catch{b(E)}},Bt=function(E,G){try{xa(s.removed,{attribute:G.getAttributeNode(E),from:G})}catch{xa(s.removed,{attribute:null,from:G})}if(G.removeAttribute(E),E==="is")if(jn||Fn)try{ut(G)}catch{}else try{G.setAttribute(E,"")}catch{}},wr=function(E){let G=null,le=null;if(xr)E="<remove></remove>"+E;else{const Ge=lc(E,/^[\r\n\t ]+/);le=Ge&&Ge[0]}Vn==="application/xhtml+xml"&&fn===Jt&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");const Me=P?P.createHTML(E):E;if(fn===Jt)try{G=new C().parseFromString(Me,Vn)}catch{}if(!G||!G.documentElement){G=ae.createDocument(fn,"template",null);try{G.documentElement.innerHTML=vr?W:Me}catch{}}const Se=G.body||G.documentElement;return E&&le&&Se.insertBefore(l.createTextNode(le),Se.childNodes[0]||null),fn===Jt?xe.call(G,dn?"html":"body")[0]:dn?G.documentElement:Se},Gr=function(E){return z.call(E.ownerDocument||E,E,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},As=function(E){return E instanceof y&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof v)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},Fa=function(E){return typeof p=="function"&&E instanceof p};function Zt(de,E,G){Gl(de,le=>{le.call(s,E,G,Sn)})}const hn=function(E){let G=null;if(Zt(te.beforeSanitizeElements,E,null),As(E))return ut(E),!0;const le=We(E.nodeName);if(Zt(te.uponSanitizeElement,E,{tagName:le,allowedTags:S}),Dn&&E.hasChildNodes()&&!Fa(E.firstElementChild)&&vt(/<[/\w!]/g,E.innerHTML)&&vt(/<[/\w!]/g,E.textContent)||E.nodeType===ja.progressingInstruction||Dn&&E.nodeType===ja.comment&&vt(/<[/\w]/g,E.data))return ut(E),!0;if(!(_e.tagCheck instanceof Function&&_e.tagCheck(le))&&(!S[le]||be[le])){if(!be[le]&&Ls(le)&&(ne.tagNameCheck instanceof RegExp&&vt(ne.tagNameCheck,le)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(le)))return!1;if(Vr&&!Nt[le]){const Me=M(E)||E.parentNode,Se=R(E)||E.childNodes;if(Se&&Me){const Ge=Se.length;for(let tt=Ge-1;tt>=0;--tt){const zt=_(Se[tt],!0);zt.__removalCount=(E.__removalCount||0)+1,Me.insertBefore(zt,U(E))}}}return ut(E),!0}return E instanceof h&&!pi(E)||(le==="noscript"||le==="noembed"||le==="noframes")&&vt(/<\/no(script|embed|frames)/i,E.innerHTML)?(ut(E),!0):(Qt&&E.nodeType===ja.text&&(G=E.textContent,Gl([ye,me,ve],Me=>{G=ga(G,Me," ")}),E.textContent!==G&&(xa(s.removed,{element:E.cloneNode()}),E.textContent=G)),Zt(te.afterSanitizeElements,E,null),!1)},Ps=function(E,G,le){if(wn&&(G==="id"||G==="name")&&(le in l||le in Ts))return!1;if(!(it&&!Te[G]&&vt(Z,G))){if(!(Ie&&vt(Q,G))){if(!(_e.attributeCheck instanceof Function&&_e.attributeCheck(G,E))){if(!Y[G]||Te[G]){if(!(Ls(E)&&(ne.tagNameCheck instanceof RegExp&&vt(ne.tagNameCheck,E)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(E))&&(ne.attributeNameCheck instanceof RegExp&&vt(ne.attributeNameCheck,G)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(G,E))||G==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&vt(ne.tagNameCheck,le)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(le))))return!1}else if(!bn[G]){if(!vt(q,ga(le,B,""))){if(!((G==="src"||G==="xlink:href"||G==="href")&&E!=="script"&&N2(le,"data:")===0&&Cs[E])){if(!(pr&&!vt(X,ga(le,B,"")))){if(le)return!1}}}}}}}return!0},Ls=function(E){return E!=="annotation-xml"&&lc(E,J)},Ua=function(E){Zt(te.beforeSanitizeAttributes,E,null);const{attributes:G}=E;if(!G||As(E))return;const le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Me=G.length;for(;Me--;){const Se=G[Me],{name:Ge,namespaceURI:tt,value:zt}=Se,en=We(Ge),Os=zt;let Je=Ge==="value"?Os:b2(Os);if(le.attrName=en,le.attrValue=Je,le.keepAttr=!0,le.forceKeepAttr=void 0,Zt(te.uponSanitizeAttribute,E,le),Je=le.attrValue,$r&&(en==="id"||en==="name")&&(Bt(Ge,E),Je=Oa+Je),Dn&&vt(/((--!?|])>)|<\/(style|title|textarea)/i,Je)){Bt(Ge,E);continue}if(en==="attributename"&&lc(Je,"href")){Bt(Ge,E);continue}if(le.forceKeepAttr)continue;if(!le.keepAttr){Bt(Ge,E);continue}if(!Es&&vt(/\/>/i,Je)){Bt(Ge,E);continue}Qt&&Gl([ye,me,ve],Pt=>{Je=ga(Je,Pt," ")});const Nr=We(E.nodeName);if(!Ps(Nr,en,Je)){Bt(Ge,E);continue}if(P&&typeof F=="object"&&typeof F.getAttributeType=="function"&&!tt)switch(F.getAttributeType(Nr,en)){case"TrustedHTML":{Je=P.createHTML(Je);break}case"TrustedScriptURL":{Je=P.createScriptURL(Je);break}}if(Je!==Os)try{tt?E.setAttributeNS(tt,Ge,Je):E.setAttribute(Ge,Je),As(E)?ut(E):hf(s.removed)}catch{Bt(Ge,E)}}Zt(te.afterSanitizeAttributes,E,null)},Ba=function de(E){let G=null;const le=Gr(E);for(Zt(te.beforeSanitizeShadowDOM,E,null);G=le.nextNode();)Zt(te.uponSanitizeShadowNode,G,null),hn(G),Ua(G),G.content instanceof d&&de(G.content);Zt(te.afterSanitizeShadowDOM,E,null)};return s.sanitize=function(de){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=null,le=null,Me=null,Se=null;if(vr=!de,vr&&(de="<!-->"),typeof de!="string"&&!Fa(de))if(typeof de.toString=="function"){if(de=de.toString(),typeof de!="string")throw ya("dirty is not a string, aborting")}else throw ya("toString is not a function");if(!s.isSupported)return de;if(Hr||kn(E),s.removed=[],typeof de=="string"&&(Un=!1),Un){if(de.nodeName){const zt=We(de.nodeName);if(!S[zt]||be[zt])throw ya("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof p)G=wr("<!---->"),le=G.ownerDocument.importNode(de,!0),le.nodeType===ja.element&&le.nodeName==="BODY"||le.nodeName==="HTML"?G=le:G.appendChild(le);else{if(!jn&&!Qt&&!dn&&de.indexOf("<")===-1)return P&&mn?P.createHTML(de):de;if(G=wr(de),!G)return jn?null:mn?W:""}G&&xr&&ut(G.firstChild);const Ge=Gr(Un?de:G);for(;Me=Ge.nextNode();)hn(Me),Ua(Me),Me.content instanceof d&&Ba(Me.content);if(Un)return de;if(jn){if(Fn)for(Se=oe.call(G.ownerDocument);G.firstChild;)Se.appendChild(G.firstChild);else Se=G;return(Y.shadowroot||Y.shadowrootmode)&&(Se=Ne.call(i,Se,!0)),Se}let tt=dn?G.outerHTML:G.innerHTML;return dn&&S["!doctype"]&&G.ownerDocument&&G.ownerDocument.doctype&&G.ownerDocument.doctype.name&&vt(Th,G.ownerDocument.doctype.name)&&(tt="<!DOCTYPE "+G.ownerDocument.doctype.name+`>
18
- `+tt),Qt&&Gl([ye,me,ve],zt=>{tt=ga(tt,zt," ")}),P&&mn?P.createHTML(tt):tt},s.setConfig=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kn(de),Hr=!0},s.clearConfig=function(){Sn=null,Hr=!1},s.isValidAttribute=function(de,E,G){Sn||kn({});const le=We(de),Me=We(E);return Ps(le,Me,G)},s.addHook=function(de,E){typeof E=="function"&&xa(te[de],E)},s.removeHook=function(de,E){if(E!==void 0){const G=j2(te[de],E);return G===-1?void 0:w2(te[de],G,1)[0]}return hf(te[de])},s.removeHooks=function(de){te[de]=[]},s.removeAllHooks=function(){te=jf()},s}var F2=Rh();function U2(r){const s=/\u001b\[([0-9;]*m|K)|(\u001b\(B|\u001b\[m)/g;let l="",i={};const c=Array.from(r.matchAll(s)),d={30:"#000000",31:"#e06c75",32:"#98c379",33:"#e5c07b",34:"#61afef",35:"#c678dd",36:"#56b6c2",37:"#abb2bf"},m={90:"#5c6370",91:"#ff7b86",92:"#98c379",93:"#e5c07b",94:"#61afef",95:"#c678dd",96:"#56b6c2",97:"#ffffff"};let p=0,h="";for(const v of c){const y=r.substring(p,v.index);h+=wf(y);const C=v[1];if(p=v.index+v[0].length,C==="m"||C==="0m")h&&(l+=dc(h,i),h=""),i={};else if(C==="1m")i.fontWeight="bold";else if(C==="2m")i.opacity="0.5";else if(C==="3m")i.fontStyle="italic";else if(C==="4m")i.textDecoration="underline";else if(C.includes(";")){const F=C.split(";").filter(N=>N);for(const N of F){const _=parseInt(N);if(_===0)h&&(l+=dc(h,i),h=""),i={};else if(_===1)i.fontWeight="bold";else if(_===2)i.opacity="0.5";else if(_===3)i.fontStyle="italic";else if(_===4)i.textDecoration="underline";else if(d[_])i.color=d[_];else if(m[_])i.color=m[_];else if(_>=40&&_<=47){const b=d[_-10];b&&(i.backgroundColor=b)}else if(_>=100&&_<=107){const b=m[_-60];b&&(i.backgroundColor=b)}}}else{const F=parseInt(C);d[F]?i.color=d[F]:m[F]&&(i.color=m[F])}}const g=r.substring(p);return h+=wf(g),h&&(l+=dc(h,i)),l}function wf(r){const s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return r.replace(/[&<>"']/g,l=>s[l])}function dc(r,s){return!r||Object.keys(s).length===0?r:`<span style="${Object.entries(s).map(([i,c])=>`${i.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${c}`).join("; ")}">${r}</span>`}function B2(r,s){if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Dt,{className:"h-6 w-6 text-gray-600"})}return t.jsx(He,{className:"h-6 w-6 text-blue-600"})}function Ah({step:r,onToggle:s,expandedSteps:l,stepIndex:i}){const c=w.useRef(null),[d,m]=w.useState(!1),p=l.has(r.stepNumber),h=r.children&&r.children.length>0||r.logs.length>0,g=w.useMemo(()=>d?r.logs:r.logs.slice(0,1e3),[r.logs,d]);w.useEffect(()=>{if(r.status==="in_progress"&&p&&c.current){const C=c.current;C.scrollTop=C.scrollHeight}},[r.logs.length,p,r.status]);const v=w.useMemo(()=>!r.startedAt||!r.completedAt?0:Math.round((new Date(r.completedAt).getTime()-new Date(r.startedAt).getTime())/100)/10,[r.startedAt,r.completedAt]),y={marginLeft:`${r.level*20}px`};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"border-b border-gray-200 bg-white",style:y,children:[t.jsxs("button",{onClick:()=>s(r.stepNumber),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-gray-50 transition-colors group",children:[t.jsx("span",{className:"text-gray-400 group-hover:text-gray-600 flex-shrink-0",children:h?p?t.jsx(Gx,{className:"h-5 w-5"}):t.jsx(Kx,{className:"h-5 w-5"}):t.jsx("span",{className:"h-5 w-5"})}),t.jsx("span",{className:"text-xs font-bold text-gray-500 bg-gray-100 rounded px-2 py-1 min-w-fit",children:i+1}),t.jsx("span",{className:"flex-1 text-left",children:t.jsx("span",{className:"text-sm font-semibold text-gray-900",children:r.stepName})}),t.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[r.status==="in_progress"&&t.jsx("span",{className:"flex h-2 w-2 rounded-full bg-blue-500 animate-pulse"}),t.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:[v,"s"]})]})]}),p&&r.logs.length>0&&t.jsx("div",{className:"border-t border-gray-200 bg-[#0d1117]",children:t.jsxs("div",{ref:c,className:"text-gray-300 font-mono text-xs max-h-[600px] overflow-y-auto",children:[g.length===0?t.jsx("div",{className:"px-10 py-6 italic text-gray-500 text-center",children:"No logs available yet"}):t.jsx("div",{className:"py-2 px-0",children:g.map((C,F)=>t.jsxs("div",{className:"flex hover:bg-gray-800/40 transition-colors leading-6 group",children:[t.jsx("span",{className:"w-12 text-right pr-4 text-gray-600 select-none border-r border-gray-800 flex-shrink-0 group-hover:bg-gray-800/20",children:C.lineNumber}),t.jsx("span",{className:"pl-4 pr-3 text-gray-500 select-none opacity-50 text-xs flex-shrink-0",children:C.timestamp.split("T")[1]?.slice(0,8)}),t.jsx("span",{className:"flex-1 whitespace-pre break-all pr-4 text-gray-300",dangerouslySetInnerHTML:{__html:F2.sanitize(U2(C.ansiContent))}})]},`${r.stepNumber}-${C.lineNumber}`))}),!d&&r.logs.length>1e3&&t.jsx("div",{className:"px-4 py-2 border-t border-gray-800 text-center",children:t.jsxs("button",{onClick:()=>m(!0),className:"text-blue-400 hover:text-blue-300 text-xs font-medium transition-colors",children:["Show all ",r.logs.length," lines"]})})]})})]}),p&&r.children&&r.children.length>0&&t.jsx(t.Fragment,{children:r.children.map((C,F)=>t.jsx(Ah,{step:C,onToggle:s,expandedSteps:l,stepIndex:F},C.stepNumber))})]})}function z2({steps:r,jobName:s,jobStatus:l,jobConclusion:i,gitHubLogsUrl:c}){const[d,m]=w.useState(new Set([r[0]?.stepNumber])),p=g=>{m(v=>{const y=new Set(v);return y.has(g)?y.delete(g):y.add(g),y})},h=g=>g.reduce((v,y)=>{let C=1;return y.children&&y.children.length>0&&(C+=h(y.children)),v+C},0);return t.jsxs("div",{className:"flex flex-col h-full bg-white border border-gray-200 rounded-lg overflow-hidden",children:[t.jsxs("div",{className:"px-4 py-3 bg-gray-50 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"text-lg font-semibold ",children:B2(l,i)}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:s}),t.jsxs("p",{className:"text-xs text-gray-500",children:[h(r)," step",h(r)!==1?"s":""]})]})]}),t.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-3 py-2 bg-blue-50 text-blue-600 hover:bg-blue-100 rounded border border-blue-200 transition-colors",children:"View on GitHub"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:r.length===0?t.jsx("div",{className:"p-4 text-center text-gray-500",children:"No steps available"}):r.map((g,v)=>t.jsx(Ah,{step:g,onToggle:p,expandedSteps:d,stepIndex:v},g.stepNumber))})]})}const H2=r=>{if(!r)return!1;const s=r.limit*.1;return r.remaining>0&&r.remaining<=s},$2=r=>{const s=new Date(r*1e3),l=new Date,i=s.getTime()-l.getTime();if(i<0)return"now";const c=Math.floor(i/1e3),d=Math.floor(c/60),m=Math.floor(d/60);return m>0?`${m}h ${d%60}m`:d>0?`${d}m ${c%60}s`:`${c}s`},Na=r=>{if(!r||r.remaining>0)return"";const s=$2(r.reset);return Bf.QUOTA_RESET(s)},V2=r=>!r||!H2(r)?"":Bf.APPROACHING_LIMIT(r.remaining,r.limit);function W2(r,s){if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-5 w-5 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-5 w-5 text-red-600"})}return t.jsx(He,{className:"h-5 w-5 text-yellow-600"})}function G2(r,s){if(r==="completed"){if(s==="success")return"bg-green-100 text-green-800";if(s==="failure")return"bg-red-100 text-red-800"}return"bg-yellow-100 text-yellow-800"}function K2(r){const s=new Date(r),i=Math.floor((new Date().getTime()-s.getTime())/1e3);if(i<60)return"just now";const c=Math.floor(i/60);if(c<60)return`${c}m ago`;const d=Math.floor(c/60);if(d<24)return`${d}h ago`;const m=Math.floor(d/24);return m<7?`${m}d ago`:s.toLocaleDateString()}function q2({owner:r,repo:s,packageName:l,onSelectRun:i,runId:c,limit:d=10}){const[m,p]=w.useState([]),[h,g]=w.useState(!0),[v,y]=w.useState(null),[C,F]=w.useState(null),{isAuthenticated:N,hasPermission:_}=zr();w.useEffect(()=>{const R=async()=>{try{g(!0),y(null);let P=Ae.WORKFLOWS.LIST(r,s)+`?per_page=${d}`;l&&(P=Ae.WORKFLOWS.BY_PACKAGE(r,s,l));const W=await we.get(P);if(!W.success){const oe=Na(W.rateLimit);if(oe){y(oe);return}throw new Error(Ce.FAILED_TO_FETCH_WORKFLOWS)}const ae=W.data;let z=[];if(l)if(Array.isArray(ae))z=ae.flatMap(oe=>oe.runs||[]).slice(0,d);else{const oe=ae;z=(Array.isArray(oe.runs)?oe.runs:[]).slice(0,d)}else z=Array.isArray(ae.runs)?ae.runs:[];p(z)}catch(P){y(P instanceof Error?P.message:Ce.UNKNOWN_ERROR)}finally{g(!1)}},M=setInterval(R,5e3);return R(),()=>clearInterval(M)},[r,s,l,d]);const b=async(R,M)=>{R.stopPropagation(),F(M.id);try{const P=await we.post(Ae.WORKFLOWS.CANCEL(r,s,M.id));if(P.success)p(m.map(W=>W.id===M.id?{...W,status:"completed",conclusion:"cancelled"}:W));else{const W=Na(P.rateLimit);if(W){y(W);return}throw new Error(Ce.FAILED_TO_CANCEL_RUN)}}catch(P){console.error("Failed to cancel run:",P),y(P instanceof Error?P.message:Ce.FAILED_TO_CANCEL_RUN)}finally{F(null)}},U=async(R,M)=>{R.stopPropagation(),F(M.id);try{const P=await we.post(Ae.WORKFLOWS.RERUN(r,s,M.id),{failedOnly:!1});if(P.success)p(m.map(W=>W.id===M.id?{...W,status:"in_progress",conclusion:null}:W));else{const W=Na(P.rateLimit);if(W){y(W);return}throw new Error(Ce.FAILED_TO_RERUN_WORKFLOW)}}catch(P){console.error("Failed to rerun workflow:",P),y(P instanceof Error?P.message:Ce.FAILED_TO_RERUN_WORKFLOW)}finally{F(null)}};return h&&m.length===0?t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):v?t.jsx("div",{className:"rounded-lg bg-red-50 p-4 border border-red-200",children:t.jsxs("p",{className:"text-sm text-red-800",children:["Error: ",v]})}):t.jsx("div",{className:"space-y-2",children:!m||m.length===0?t.jsx("p",{className:"text-sm text-gray-500 py-4",children:"No workflow runs found"}):m.map(R=>t.jsxs("div",{className:`text-left p-3 rounded-lg border transition-colors ${c===R.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:[t.jsx("button",{onClick:()=>i?.(R.id),className:"w-full text-left",children:t.jsxs("div",{className:"flex items-start gap-2",children:[W2(R.status,R.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900",children:R.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${G2(R.status,R.conclusion)}`,children:R.conclusion??R.status}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["Branch: ",R.head_branch]}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["by ",R.actor.login]}),t.jsx("span",{children:" • "}),t.jsx("span",{children:K2(R.created_at)})]})]})]})}),_("maintain")&&t.jsxs("div",{className:"flex gap-2 mt-3",children:[R.status==="in_progress"&&t.jsx("button",{onClick:M=>b(M,R),disabled:C===R.id,className:"flex-1 px-3 py-2 text-sm font-medium text-red-700 bg-red-50 border border-red-200 rounded hover:bg-red-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Cancel this workflow run",children:C===R.id?"Cancelling...":"Cancel Run"}),(R.conclusion==="cancelled"||R.conclusion==="failure")&&t.jsx("button",{onClick:M=>U(M,R),disabled:C===R.id,className:"flex-1 px-3 py-2 text-sm font-medium text-blue-700 bg-blue-50 border border-blue-200 rounded hover:bg-blue-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Rerun this workflow",children:C===R.id?"Rerunning...":"Rerun"})]})]},R.id))})}function Y2({owner:r,repo:s,defaultBranch:l="main",onSuccess:i,onError:c}){const[d,m]=w.useState(!1),[p,h]=w.useState(l),[g,v]=w.useState({}),[y,C]=w.useState(!1),[F,N]=w.useState(null),[_,b]=w.useState([]),[U,R]=w.useState(),[M,P]=w.useState(!1);w.useEffect(()=>{d&&_.length===0&&W()},[d]);const W=async()=>{try{P(!0);const z=await we.get(Ae.WORKFLOWS.AVAILABLE(r,s));z.success&&(b(z.data.workflows||[]),z.data.workflows?.length>0&&!U&&R(z.data.workflows[0].path))}catch(z){console.error("Failed to fetch workflows:",z)}finally{P(!1)}},ae=async()=>{try{C(!0),N(null);const z=await we.post(Ae.WORKFLOWS.TRIGGER(r,s),{workflow:U,ref:p,inputs:g,workflowId:_.find(xe=>xe.path==U)?.id??""});if(!z.success){const xe=Na(z.rateLimit);if(xe){N(xe),c?.(xe);return}throw new Error(Ce.FAILED_TO_TRIGGER_WORKFLOW)}const oe=z.data;if(oe.success)i?.(oe.runUrl||`https://github.com/${r}/${s}/actions`),m(!1),h(l),v({});else throw new Error(oe.message||Ce.FAILED_TO_TRIGGER_WORKFLOW)}catch(z){const oe=z instanceof Error?z.message:Ce.UNKNOWN_ERROR;N(oe),c?.(oe)}finally{C(!1)}};return t.jsxs("div",{className:"relative",children:[t.jsxs("button",{onClick:()=>m(!d),disabled:y,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[t.jsx(li,{className:"h-4 w-4"}),"Trigger Workflow"]}),d&&t.jsxs("div",{className:"absolute right-0 mt-2 w-96 bg-white border border-gray-200 rounded-lg shadow-lg z-10 p-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Trigger Workflow"}),F&&t.jsxs("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3",children:[t.jsx(Ca,{className:"h-5 w-5 text-red-600 flex-shrink-0 mt-0.5"}),t.jsx("p",{className:"text-sm text-red-700",children:F})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Workflow"}),M?t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-500",children:"Loading workflows..."}):_.length>0?t.jsx("select",{value:U,onChange:z=>R(z.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",children:_.map(z=>t.jsxs("option",{value:z.path,children:[z.name," (",z.path,")"]},z.id))}):t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-yellow-50 text-yellow-700 text-sm",children:"No workflows available"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Branch"}),t.jsx("input",{type:"text",value:p,onChange:z=>h(z.target.value),placeholder:"main",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"flex gap-2 pt-4",children:[t.jsx("button",{onClick:ae,disabled:y||!p,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:y?"Triggering...":"Trigger"}),t.jsx("button",{onClick:()=>m(!1),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors font-medium",children:"Cancel"})]})]})]})]})}function Q2(r,s,l=!1){if(l)return t.jsx(He,{className:"h-6 w-6 text-yellow-500 animate-spin"});if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Dt,{className:"h-6 w-6 text-gray-600"});if(s==="skipped")return t.jsx(He,{className:"h-6 w-6 text-gray-600"})}return r==="in_progress"||r==="queued"?t.jsx(He,{className:"h-6 w-6 text-blue-600"}):t.jsx(He,{className:"h-6 w-6 text-gray-600"})}function J2({jobs:r,selectedJob:s,onSelectJob:l}){return t.jsx(t.Fragment,{children:r.map(i=>{const c=i.startedAt&&i.completedAt?Math.round((new Date(i.completedAt).getTime()-new Date(i.startedAt).getTime())/1e3):0;return t.jsx("div",{className:`rounded-lg border transition-colors ${s?.id===i.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:t.jsx("button",{onClick:()=>l(i),className:"w-full text-left p-3",children:t.jsxs("div",{className:"flex items-start gap-2",children:[Q2(i.status,i.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:i.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[i.status," • ",c,"s"]})]})]})})},i.id)})})}const X2=()=>{try{const r=at.get("monodog_session_data");return r?JSON.parse(r).permission:null}catch(r){return console.error("Failed to parse session data",r),null}};function Z2(r){const s=r.split(`
19
- `),l=[];let i=null;const c=[];for(let d=0;d<s.length;d++){const m=s[d],p=m.trim(),h=m.match(/^(\s*)/)?.[1].length||0,g=Math.floor(h/2);if(m.includes("##[group]")){const v=m.match(/##\[group\](.*?)(?:##\[endgroup\]|$)/),C={name:v?v[1].trim():`Step ${l.length+1}`,logs:[],level:g,children:[],startIndex:d};for(;c.length>0&&c[c.length-1].level>=C.level;)c.pop();if(c.length>0){const F=c[c.length-1];F.children||(F.children=[]),F.children.push(C)}else l.push(C);c.push(C),i=C}else{if(m.includes("##[endgroup]"))continue;p&&i&&i.logs.push(m)}}return l}function ew(r,s,l=!1){if(l)return t.jsx(He,{className:"h-6 w-6 text-yellow-500 animate-spin"});if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Dt,{className:"h-6 w-6 text-gray-600"});if(s==="skipped")return t.jsx(He,{className:"h-6 w-6 text-gray-600"})}return r==="in_progress"||r==="queued"?t.jsx(He,{className:"h-6 w-6 text-blue-600"}):t.jsx(He,{className:"h-6 w-6 text-gray-600"})}function tw({packageName:r,onNavigate:s}){const[l,i]=w.useState([]),[c,d]=w.useState(null),[m,p]=w.useState([]),[h,g]=w.useState(null),[v,y]=w.useState(null),[C,F]=w.useState(!0),[N,_]=w.useState(null),[b,U]=w.useState(new Set),{hasPermission:R}=zr(),[M,P]=w.useState(0),[W,ae]=w.useState(!1),z=10,oe=20,{owner:xe,repo:Ne}=w.useMemo(()=>X2()||{},[]);w.useEffect(()=>{const Z=async()=>{try{const X=Ae.PIPELINES.LIST,B=await we.get(X);if(!B.success){if(B.error?.status===401||B.error?.status===403){window.location.href="/login";return}if(B.error?.status===404){console.warn("Pipelines endpoint not available"),i([]),F(!1);return}throw new Error(`Failed to fetch pipelines: ${B.error?.message}`)}const J=Array.isArray(B.data)?B.data:[];i(J),F(!1)}catch(X){_(X instanceof Error?X.message:"Unknown error"),F(!1)}};Z();const Q=setInterval(Z,5e3);return()=>clearInterval(Q)},[xe,Ne,r]),w.useEffect(()=>{const Z=async()=>{try{l.forEach(async X=>{if(X.workflowId&&X.currentStatus!=="completed"&&!b.has(X.workflowId)){const B=Ae.WORKFLOWS.LIST(xe,Ne)+`?workflow_id=${X.workflowId}&per_page=${oe}&page=1`,J=await we.get(B);if(J.success){const q=J.data,S=q.workflow_runs?.[0]||q.runs?.[0];if(S){const D=S.status!==X.currentStatus,Y=S.conclusion!==X.currentConclusion;if(D||Y){U(ue=>new Set(ue).add(X.workflowId));try{const ue=await we.put(Ae.PIPELINES.STATUS(X.id),{currentStatus:S.status,currentConclusion:S.conclusion||null,lastRunId:S.id}),ne={...X,currentStatus:S.status,currentConclusion:S.conclusion||null,lastRunId:S.id};if(console.log(ne),ne.currentStatus=="completed"){const be=await Ft.refreshPackages()}i(be=>be.map(Te=>Te.id===X.id?ne:Te))}catch(ue){console.warn("Failed to update pipeline status:",ue)}finally{U(ue=>{const ne=new Set(ue);return ne.delete(X.workflowId),ne})}}}}}})}catch(X){console.warn("Failed to poll pipeline status:",X)}};Z();const Q=setInterval(Z,1e4);return()=>clearInterval(Q)},[l,xe,Ne]),w.useEffect(()=>{if(!c)return;const Z=async()=>{try{const X=await we.get(Ae.WORKFLOWS.RUNS(xe,Ne,c));if(!X.success){if(X.error?.status===401||X.error?.status===403){window.location.href="/login";return}throw new Error(`Failed to fetch jobs: ${X.error?.message}`)}p(X.data.jobs||[])}catch(X){_(X instanceof Error?X.message:"Unknown error")}},Q=setInterval(Z,5e3);return Z(),()=>clearInterval(Q)},[c,xe,Ne]),w.useEffect(()=>{if(!h)return;const Z=async()=>{try{const Q=await we.get(Ae.WORKFLOWS.LOGS(xe,Ne,h.gitHubJobId));if(!Q.success){const B=Na(Q.rateLimit);if(B){_(B);return}if(Q.error?.status===403)_(Ce.PERMISSION_ERROR);else if(Q.error?.status===401)_(xc.SESSION_EXPIRED),window.location.href="/login";else{console.log(Q);const J=Q.error?.details||"Unknown error";_(`${Ce.FAILED_TO_FETCH_LOGS}: ${J}`)}return}const X=Q.data;if(X.meta&&X.meta.isEmpty)y(""),_(Ce.FAILED_TO_FETCH_LOGS);else{y(X.logs||X);const B=V2(Q.rateLimit);B&&console.warn(B),_(null)}}catch(Q){const X=Q instanceof Error?Q.message:Ce.FAILED_TO_FETCH_LOGS;_(`${Ce.FAILED_TO_FETCH_LOGS}: ${X}`)}};if(Z(),h.status!=="completed"){const Q=setInterval(Z,5e3);return()=>clearInterval(Q)}},[h,xe,Ne]);const te=Z=>{g(Z),y(null)},ye=Z=>{const Q=Z.currentTarget;Q.scrollHeight-Q.scrollTop-Q.clientHeight<100&&!W&&l.length>=z&&me()},me=async()=>{if(!W){ae(!0);try{const Z=Ae.PIPELINES.LIST+`?offset=${M+z}&limit=${z}`,Q=await we.get(Z);if(!Q.success)throw new Error("Failed to fetch more pipelines");const X=Q.data;i(B=>[...B,...X]),P(B=>B+z)}catch(Z){console.error("Error loading more pipelines:",Z)}finally{ae(!1)}}},ve=Z=>{d(Z),g(null),p([])};return C&&l.length===0?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 h-[50vh] overflow-hidden",children:[t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",onScroll:ye,children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Pipelines"}),R("maintain")&&t.jsx(Y2,{owner:xe,repo:Ne})]}),N&&t.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:t.jsx("p",{className:"text-xs text-red-700",children:N})}),t.jsx("div",{className:"space-y-2",children:l.length===0?t.jsx("p",{className:"text-sm text-gray-500",children:"No pipelines found"}):t.jsxs(t.Fragment,{children:[l.map(Z=>t.jsx("div",{className:"w-full text-left p-3 rounded-lg border transition-colors border-gray-200 hover:bg-gray-50",children:t.jsxs("div",{className:"flex items-start gap-2",children:[ew(Z.currentStatus,Z.currentConclusion||null,b.has(Z.id)),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:Z.packageName}),t.jsxs("p",{className:"text-xs text-gray-500",children:["v",Z.releaseVersion]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:Z.workflowName})]})]})},Z.id)),W&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-5 w-5 text-blue-600"})})})]})})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Runs"}),t.jsx(q2,{owner:xe,repo:Ne,packageName:r,onSelectRun:ve,runId:c,limit:oe})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Jobs"}),t.jsx("div",{className:"space-y-2",children:m.length?t.jsx(J2,{jobs:m,selectedJob:h,onSelectJob:te}):c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):t.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:t.jsx("p",{className:"text-sm",children:"Select a run to view jobs"})})})]})})]}),t.jsx("div",{className:"lg:col-span-1 overflow-hidden border-t pt-2 h-[50vh]",children:t.jsxs("div",{className:"p-4 h-full overflow-hidden flex flex-col",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Logs"}),h&&v?t.jsx(z2,{steps:(()=>{const Z=Z2(v);let Q=0;const X=B=>B.map(J=>{Q++;const q=J.logs.at(0)?.split(" ")[0],S=J.logs.at(-1)?.split(" ")[0];return{stepNumber:Q,stepName:J.name,level:J.level,status:"",conclusion:"",startedAt:q,completedAt:S,logs:J.logs.map((D,Y)=>({lineNumber:Y+1,timestamp:new Date().toISOString(),content:D,ansiContent:D})),children:J.children?X(J.children):void 0}});return X(Z)})(),jobName:h.name,jobStatus:h.status,jobConclusion:h.conclusion,gitHubLogsUrl:h.htmlUrl}):h?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):t.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:t.jsx("p",{className:"text-sm",children:"Select a job to view logs"})})]})})]})}function nw(){const{session:r}=zr();return r?t.jsx("div",{className:"h-screen overflow-hidden",children:t.jsx(tw,{})}):t.jsx("div",{className:"flex items-center justify-center h-screen",children:t.jsx("p",{className:"text-gray-600",children:"Please sign in to view pipelines"})})}const rw="_container_qu28c_5",sw="_header_qu28c_13",aw="_subtitle_qu28c_26",lw="_error_qu28c_33",iw="_healthSection_qu28c_43",ow="_statusBadge_qu28c_51",cw="_statusDot_qu28c_59",uw="_stats_qu28c_85",dw="_stat_qu28c_51",mw="_statLabel_qu28c_99",fw="_statValue_qu28c_106",hw="_timestamp_qu28c_113",pw="_pipelinesSection_qu28c_120",xw="_pipelinesList_qu28c_135",gw="_pipelineItem_qu28c_143",yw="_pipelineHeader_qu28c_151",vw="_pipelineId_qu28c_158",jw="_pipelineStatus_qu28c_168",ww="_pipelineProgress_qu28c_193",Nw="_progressBar_qu28c_200",bw="_progressFill_qu28c_208",Sw="_progressText_qu28c_215",kw="_pipelinePackages_qu28c_222",Ew="_featuresSection_qu28c_230",Oe={container:rw,header:sw,subtitle:aw,error:lw,healthSection:iw,statusBadge:ow,statusDot:cw,stats:uw,stat:dw,statLabel:mw,statValue:fw,timestamp:hw,pipelinesSection:pw,pipelinesList:xw,pipelineItem:gw,pipelineHeader:yw,pipelineId:vw,pipelineStatus:jw,pipelineProgress:ww,progressBar:Nw,progressFill:bw,progressText:Sw,pipelinePackages:kw,featuresSection:Ew};function Cw(){const[r,s]=w.useState(null),[l,i]=w.useState([]),[c,d]=w.useState(!0),[m,p]=w.useState(null);return w.useEffect(()=>{const h=async()=>{try{d(!0);const v=await Fr.getHealth();v.success&&s(v.data);const y=await Fr.getPipelines(void 0,5);y.success&&i(y.data.pipelines||[]),p(null)}catch(v){p(v instanceof Error?v.message:"Failed to fetch release status")}finally{d(!1)}};h();const g=setInterval(h,1e4);return()=>clearInterval(g)},[]),c&&!r?t.jsx("div",{className:Oe.container,children:t.jsx("p",{children:"Loading release system status..."})}):t.jsxs("div",{className:Oe.container,children:[t.jsxs("div",{className:Oe.header,children:[t.jsx("h3",{children:"🚀 Independent Release Engine"}),t.jsx("p",{className:Oe.subtitle,children:"New release system (independent of Changesets)"})]}),m&&t.jsxs("div",{className:Oe.error,children:["Error: ",m]}),r&&t.jsxs("div",{className:Oe.healthSection,children:[t.jsxs("div",{className:Oe.statusBadge,children:[t.jsx("span",{className:Oe.statusDot,"data-status":r.status}),t.jsxs("span",{children:["System Status: ",t.jsx("strong",{children:r.status})]})]}),t.jsxs("div",{className:Oe.stats,children:[t.jsxs("div",{className:Oe.stat,children:[t.jsx("span",{className:Oe.statLabel,children:"Active Pipelines"}),t.jsx("span",{className:Oe.statValue,children:r.activePipelines})]}),t.jsxs("div",{className:Oe.stat,children:[t.jsx("span",{className:Oe.statLabel,children:"Total Pipelines"}),t.jsx("span",{className:Oe.statValue,children:r.totalPipelines})]})]}),r.timestamp&&t.jsxs("p",{className:Oe.timestamp,children:["Last updated: ",new Date(r.timestamp).toLocaleTimeString()]})]}),l.length>0&&t.jsxs("div",{className:Oe.pipelinesSection,children:[t.jsx("h4",{children:"Recent Pipelines"}),t.jsx("div",{className:Oe.pipelinesList,children:l.map(h=>t.jsxs("div",{className:Oe.pipelineItem,children:[t.jsxs("div",{className:Oe.pipelineHeader,children:[t.jsx("span",{className:Oe.pipelineId,children:h.pipelineId}),t.jsx("span",{className:Oe.pipelineStatus,"data-status":h.status,children:h.status})]}),t.jsxs("div",{className:Oe.pipelineProgress,children:[t.jsx("div",{className:Oe.progressBar,children:t.jsx("div",{className:Oe.progressFill,style:{width:`${h.progress}%`}})}),t.jsxs("span",{className:Oe.progressText,children:[h.progress,"%"]})]}),t.jsxs("p",{className:Oe.pipelinePackages,children:["Packages: ",h.packagesToPublish?.join(", ")||"None"]})]},h.pipelineId))})]}),t.jsxs("div",{className:Oe.featuresSection,children:[t.jsx("h4",{children:"Key Features"}),t.jsxs("ul",{children:[t.jsx("li",{children:"✅ Independent of @changesets/cli"}),t.jsx("li",{children:"✅ Git-based change detection (Conventional Commits)"}),t.jsx("li",{children:"✅ Internal semantic versioning (SemVer)"}),t.jsx("li",{children:"✅ Direct npm publishing (no CLI dependency)"}),t.jsx("li",{children:"✅ Hybrid execution (Node.js + GitHub Actions)"}),t.jsx("li",{children:"✅ Encrypted token handling"}),t.jsx("li",{children:"✅ Full audit logging"})]})]})]})}const _w="_container_9usjn_5",Tw="_header_9usjn_11",Rw="_error_9usjn_30",Aw="_warning_9usjn_40",Pw="_content_9usjn_50",Lw="_section_9usjn_55",Ow="_packageList_9usjn_70",Iw="_packageItem_9usjn_76",Mw="_packageName_9usjn_104",Dw="_packageVersion_9usjn_110",Fw="_button_9usjn_116",Uw="_publishButton_9usjn_140",Bw="_options_9usjn_150",zw="_option_9usjn_150",Hw="_readinessResults_9usjn_171",$w="_readinessItem_9usjn_177",Vw="_ready_9usjn_184",Ww="_notReady_9usjn_189",Gw="_readinessHeader_9usjn_194",Kw="_readinessStatus_9usjn_202",qw="_readinessName_9usjn_206",Yw="_readinessBlockers_9usjn_210",Qw="_readinessWarnings_9usjn_243",Fe={container:_w,header:Tw,error:Rw,warning:Aw,content:Pw,section:Lw,packageList:Ow,packageItem:Iw,packageName:Mw,packageVersion:Dw,button:Fw,publishButton:Uw,options:Bw,option:zw,readinessResults:Hw,readinessItem:$w,ready:Vw,notReady:Ww,readinessHeader:Gw,readinessStatus:Kw,readinessName:qw,readinessBlockers:Yw,readinessWarnings:Qw};function Jw(){const[r,s]=w.useState([]),[l,i]=w.useState([]),[c,d]=w.useState(null),[m,p]=w.useState(!0),[h,g]=w.useState(!1),[v,y]=w.useState(null),[C,F]=w.useState(!0);w.useEffect(()=>{N()},[]);const N=async()=>{try{p(!0);const P=await Fr.getPackages();P.success&&(s(P.data.packages||[]),y(null))}catch(P){y(P instanceof Error?P.message:"Failed to fetch packages")}finally{p(!1)}},_=P=>{i(W=>W.includes(P)?W.filter(ae=>ae!==P):[...W,P])},b=async()=>{if(l.length===0){y("Please select at least one package");return}try{p(!0);const P=l.reduce((ae,z)=>{const oe=r.find(xe=>xe.name===z);return oe&&(ae[z]=oe.path),ae},{}),W=await Fr.checkReadiness(l,P);W.success?(d(W.data.checks||[]),y(null)):y(W.error?.message||"Failed to check readiness")}catch(P){y(P instanceof Error?P.message:"Failed to check readiness")}finally{p(!1)}},U=async()=>{if(l.length===0){y("Please select at least one package");return}try{g(!0);const P=l.reduce((ae,z)=>{const oe=r.find(xe=>xe.name===z);return oe&&(ae[z]=oe.path),ae},{}),W=await Fr.startPublish(l,P,{method:"node",dryRun:C,autoTag:!0,createReleases:!1});W.success?(y(null),i([]),d(null),alert(C?`✅ Dry-run successful for ${l.length} package(s)`:`✅ Publishing started for ${l.length} package(s)
20
- Pipeline ID: ${W.data.pipelineId}`)):y(W.error?.message||"Failed to start publish")}catch(P){y(P instanceof Error?P.message:"Failed to start publish")}finally{g(!1)}},R=c?.filter(P=>l.includes(P.packageName)),M=R?.every(P=>P.isReady)??!1;return t.jsxs("div",{className:Fe.container,children:[t.jsxs("div",{className:Fe.header,children:[t.jsx("h1",{children:"🚀 Independent Release Manager"}),t.jsx("p",{children:"New release system independent of Changesets"})]}),t.jsx(Cw,{}),v&&t.jsx("div",{className:Fe.error,children:v}),t.jsxs("div",{className:Fe.content,children:[t.jsxs("div",{className:Fe.section,children:[t.jsx("h2",{children:"Step 1: Select Packages"}),m&&!r.length?t.jsx("p",{children:"Loading packages..."}):r.length===0?t.jsx("p",{children:"No packages found"}):t.jsx("div",{className:Fe.packageList,children:r.map(P=>t.jsxs("label",{className:Fe.packageItem,children:[t.jsx("input",{type:"checkbox",checked:l.includes(P.name),onChange:()=>_(P.name)}),t.jsx("span",{className:Fe.packageName,children:P.name}),t.jsxs("span",{className:Fe.packageVersion,children:["v",P.version]})]},P.name))})]}),t.jsxs("div",{className:Fe.section,children:[t.jsx("h2",{children:"Step 2: Check Readiness"}),t.jsx("button",{onClick:b,disabled:l.length===0||m,className:Fe.button,children:"Check Readiness"}),R&&R.length>0&&t.jsx("div",{className:Fe.readinessResults,children:R.map(P=>t.jsxs("div",{className:`${Fe.readinessItem} ${P.isReady?Fe.ready:Fe.notReady}`,children:[t.jsxs("div",{className:Fe.readinessHeader,children:[t.jsx("span",{className:Fe.readinessStatus,children:P.isReady?"✅":"❌"}),t.jsx("span",{className:Fe.readinessName,children:P.packageName})]}),P.blockers.length>0&&t.jsxs("div",{className:Fe.readinessBlockers,children:[t.jsx("strong",{children:"Blockers:"}),t.jsx("ul",{children:P.blockers.map((W,ae)=>t.jsx("li",{children:W},ae))})]}),P.warnings.length>0&&t.jsxs("div",{className:Fe.readinessWarnings,children:[t.jsx("strong",{children:"Warnings:"}),t.jsx("ul",{children:P.warnings.map((W,ae)=>t.jsx("li",{children:W},ae))})]})]},P.packageName))})]}),t.jsxs("div",{className:Fe.section,children:[t.jsx("h2",{children:"Step 3: Publish Packages"}),t.jsx("div",{className:Fe.options,children:t.jsxs("label",{className:Fe.option,children:[t.jsx("input",{type:"checkbox",checked:C,onChange:P=>F(P.target.checked)}),t.jsx("span",{children:"Dry-run (test without publishing)"})]})}),t.jsx("button",{onClick:U,disabled:l.length===0||h||!M,className:`${Fe.button} ${Fe.publishButton}`,children:h?"Publishing...":C?"Test Publish (Dry-run)":"Publish to npm"}),l.length>0&&!M&&!C&&t.jsx("div",{className:Fe.warning,children:"⚠️ Some packages are not ready. Run dry-run first or fix blockers."})]})]})]})}const Xw={Dashboard:Rv,PackagesOverview:Av,PackageDetail:Pv,DependencyGraph:Zv,HealthStatus:e1,PublishControl:m1,CIIntegration:T1,ConfigInspector:i2,ReleaseManager:x2,Pipeline:nw,IndependentReleaseManagerPage:Jw},Zw=({componentName:r})=>{const s=Xw[r];return s?t.jsx(s,{}):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 eN(){return t.jsxs(Of,{children:[If.map(r=>t.jsx(ys,{path:r.path,element:t.jsx(Zw,{componentName:r.component})},r.path)),t.jsx(ys,{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 tN=w.createContext(void 0);function nN({children:r}){const[s,l]=w.useState(new Map),[i,c]=w.useState(!1),[d,m]=w.useState(null),p=(F,N)=>`${F}/${N}`,h=w.useCallback(async(F,N,_)=>{try{c(!0),m(null);const b=p(N,_);if(s.has(b))return s.get(b)||null;const U=await we.get(`/permissions/${N}/${_}`);if(!U.success)throw U.error.status===401?new Error(Ce.AUTHENTICATION_ERROR):new Error(Ce.FAILED_TO_CHECK_PERMISSION);const R=U.data,M={permission:R.permission,role:R.role,canAdmin:R.canAdmin,canMaintain:R.canMaintain,canWrite:R.canWrite,canRead:R.canRead,denied:R.denied};return l(P=>{const W=new Map(P);return W.set(b,M),W}),M}catch(b){const U=b instanceof Error?b.message:"Permission check failed";return m(U),null}finally{c(!1)}},[s]),g=w.useCallback(async(F,N,_,b)=>{try{c(!0),m(null);const U=await we.post(`/permissions/${N}/${_}/can-action`,{action:b});if(!U.success)throw new Error(Ce.FAILED_TO_CHECK_ACTION_PERMISSION);return U.data.can===!0}catch(U){return console.error("Action permission check error:",U),!1}finally{c(!1)}},[]),v=w.useCallback((F,N)=>{const _=p(F,N);l(b=>{const U=new Map(b);return U.delete(_),U})},[]),y=w.useCallback(()=>{l(new Map)},[]),C={permissions:s,isLoading:i,error:d,checkPermission:h,canPerformAction:g,invalidatePermission:v,invalidateAll:y};return t.jsx(tN.Provider,{value:C,children:r})}function rN(){const{login:r,isLoading:s,error:l}=zr(),[i,c]=w.useState(!1),d=async()=>{c(!0),await r()};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"}),l&&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:l}),t.jsxs("button",{onClick:d,disabled:s||i,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(Yx,{}),"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 sN(){const r=Ac(),[s,l]=w.useState(!0),[i,c]=w.useState(null);return w.useEffect(()=>{(async()=>{try{const m=new URLSearchParams(window.location.search),p=m.get("code"),h=m.get("state"),g=m.get("error"),v=m.get("error_description");if(g){c(`${g}: ${v}`),l(!1);return}if(!p||!h){c("Missing authorization code or state"),l(!1);return}const y=await we.get(Ae.AUTH.CALLBACK+`?code=${p}&state=${h}`);if(!y.success){c(y.error?.message||"Authentication failed"),l(!1);return}const C=y.data;if(!C.success||!C.sessionToken){c(Ce.AUTHENTICATION_ERROR),l(!1);return}const F=window.__authContext;if(F&&F.handleOAuthCallback)if(await F.handleOAuthCallback(C.sessionToken,C.permission)){const _=C.redirectUrl||"/";r(_)}else c(Ce.AUTHENTICATION_ERROR);else c(Ce.AUTHENTICATION_ERROR)}catch(m){const p=m instanceof Error?m.message:Ce.UNKNOWN_ERROR;c(p)}finally{l(!1)}})()},[r]),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:s?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."})]}):i?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"text-5xl mb-5",children:"Warning!"}),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:i}),t.jsx("button",{onClick:()=>r("/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 aN({message:r="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:r})]})}function lN({children:r}){const{isAuthenticated:s,isLoading:l}=zr();return l?t.jsx(aN,{}):s?t.jsx(t.Fragment,{children:r}):t.jsx(vx,{to:"/login",replace:!0})}function iN(){return t.jsx(Cx,{children:t.jsx(Ly,{children:t.jsx(nN,{children:t.jsxs(Of,{children:[t.jsx(ys,{path:"/login",element:t.jsx(rN,{})}),t.jsx(ys,{path:"/auth/callback",element:t.jsx(sN,{})}),t.jsx(ys,{path:"/*",element:t.jsx(lN,{children:t.jsx(Oy,{children:t.jsx(eN,{})})})})]})})})})}const Nf=document.getElementById("root");Nf&&E0.createRoot(Nf).render(t.jsx(iN,{}));
17
+ `:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}var qj=new Array(256),Yj=new Array(256);for(var xs=0;xs<256;xs++)qj[xs]=df(xs)?1:0,Yj[xs]=df(xs);const Qj=r=>{switch(r){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"}},mf=r=>{switch(r){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"}},Jj=(r,s)=>r.filter(l=>{const i=s.section==="all"||l.id===s.section,c=s.type==="all"||l.type===s.type,d=s.status==="all"||s.status==="secrets"&&l.hasSecrets||s.status==="standard"&&!l.hasSecrets,m=!s.search||l.name.toLowerCase().includes(s.search.toLowerCase())||l.path.toLowerCase().includes(s.search.toLowerCase());return i&&c&&d&&m}),Xj=r=>[...new Set(r.map(s=>s.type))],Zj=r=>{if(r===0)return"0 Bytes";const s=1024,l=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,i)).toFixed(2))+" "+l[i]},e2=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Eh=r=>{const s=r.split(".").pop()?.toLowerCase(),l={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 r==="package.json"?"json":r==="docker-compose.yml"||r==="docker-compose.yaml"?"yaml":r===".eslintrc.js"||r===".prettierrc.js"?"javascript":r==="tsconfig.json"?"json":l[s||""]||"text"},t2=r=>{const s=[/^([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 l=r;return s.forEach(i=>{l=l.replace(i,(c,d,m)=>{const p="*".repeat(Math.min(m.length,8));return c.replace(m,p)})}),l},n2=r=>{switch(Eh(r)){case"json":return t.jsx(Zl,{className:"w-6 h-6 text-primary-600"});case"yaml":return t.jsx(Zl,{className:"w-6 h-6 text-primary-600"});case"javascript":case"typescript":return t.jsx(Fr,{className:"w-6 h-6 text-primary-600"});case"env":return"🔐";case"markdown":return"📝";default:return t.jsx(Oc,{className:"w-6 h-6 text-primary-600"})}};function r2({configs:r,selectedConfig:s,onConfigSelect:l,filters:i,onFiltersChange:c}){const d=Xj(r);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(Dc,{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:i.search,onChange:m=>c({...i,search: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 text-sm"})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(ci,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.type,onChange:m=>c({...i,type:m.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"}),d.map(m=>t.jsx("option",{value:m,children:m.charAt(0).toUpperCase()+m.slice(1)},m))]})]}),t.jsxs("select",{value:i.status,onChange:m=>c({...i,status:m.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:r.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(Oc,{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:r.map(m=>t.jsx("button",{onClick:()=>l(m.id),className:`w-full text-left p-3 rounded-lg mb-2 transition-colors ${s===m.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:n2(m.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:m.name}),m.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:m.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 ${Qj(m.type)}`,children:m.type}),t.jsx("span",{className:"text-xs text-gray-400",children:Zj(m.size)})]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:e2(m.lastModified)})]})]})},m.id))})}),t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsxs("div",{className:"text-xs text-gray-500",children:[r.length," file",r.length!==1?"s":""," found"]})})]})}function s2({isEditing:r,canEdit:s,hasSecrets:l,showSecrets:i,saving:c,onStartEdit:d,onSaveEdit:m,onCancelEdit:p,onToggleSecrets:h,onRefresh:g,content:v}){const[y,C]=w.useState(!1),F=async()=>{try{const N=v||"No content available";await navigator.clipboard.writeText(N),C(!0),setTimeout(()=>{C(!1)},4e3)}catch(N){console.error("Failed to copy to clipboard:",N),C(!0),setTimeout(()=>C(!1),2e3)}};return c?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(fr,{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:g,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(fr,{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:[r?t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:m,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(ai,{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(Ss,{className:"w-4 h-4 mr-1"}),"Cancel"]})]}):s&&t.jsxs("button",{onClick:d,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(Ox,{className:"w-4 h-4 mr-1"}),"Edit"]}),l&&t.jsx("button",{onClick:h,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${i?"text-red-700 bg-red-100 hover:bg-red-200":"text-yellow-700 bg-yellow-100 hover:bg-yellow-200"}`,children:i?t.jsxs(t.Fragment,{children:[t.jsx(Lx,{className:"w-4 h-4 mr-1"}),"Hide Secrets"]}):t.jsxs(t.Fragment,{children:[t.jsx(Px,{className:"w-4 h-4 mr-1"}),"Show Secrets"]})})]}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsx("button",{onClick:F,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${y?"text-green-700 bg-green-100 border border-green-300":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:y?t.jsxs(t.Fragment,{children:[t.jsx(Fx,{className:"w-4 h-4 mr-1"}),"Copied!"]}):t.jsxs(t.Fragment,{children:[t.jsx(Ux,{className:"w-4 h-4 mr-1"}),"Copy"]})})})]})}function a2({config:r,isEditing:s,editValue:l,onStartEdit:i,onSaveEdit:c,onCancelEdit:d,onValueChange:m,showSecrets:p,onToggleSecrets:h}){if(!r)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(Zl,{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 g=Eh(r.name),v=p?r.content:t2(r.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(Zl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:r.name}),t.jsx("p",{className:"text-sm text-gray-500",children:r.path})]})]})}),t.jsx("div",{className:"flex-1 p-4",children:s?t.jsx("div",{className:"h-full",children:t.jsx("textarea",{value:l,onChange:y=>m(y.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-${g}`,children:v})})})}),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: ",g.toUpperCase()]}),t.jsxs("span",{children:["Size: ",r.content.length," characters"]}),r.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:s?t.jsx("span",{className:"text-blue-600 font-medium",children:"Editing mode"}):r.isEditable?t.jsx("span",{className:"text-green-600",children:"Editable"}):t.jsx("span",{className:"text-gray-400",children:"Read-only"})})]})})]})}function l2({validation:r,configName:s}){const l=h=>{switch(h){case"valid":return t.jsx(At,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(lt,{className:"w-5 h-5 text-yellow-500"});case"error":return t.jsx(Dt,{className:"w-5 h-5 text-red-500"});default:return t.jsx(ys,{className:"w-5 h-5 text-gray-500"})}},c=r.some(h=>h.status==="error")?"error":r.some(h=>h.status==="warning")?"warning":"valid",d=r.filter(h=>h.status==="error").length,m=r.filter(h=>h.status==="warning").length,p=r.filter(h=>h.status==="valid").length;return r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(ys,{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:[l(c),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mf(c)}`,children:c.toUpperCase()})]})]}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Validation results for ",s]})]}),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:m}),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:d}),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:r.map((h,g)=>t.jsx("div",{className:`p-3 rounded-lg border ${h.status==="error"?"border-red-200 bg-red-50":h.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:[l(h.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:h.field}),t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${mf(h.status)}`,children:h.status})]}),t.jsx("p",{className:"text-sm text-gray-600",children:h.message})]})]})},g))})}),(d>0||m>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:[d>0&&t.jsxs("span",{className:"text-red-600 font-medium",children:[d," error",d>1?"s":""," need attention"]}),m>0&&d===0&&t.jsxs("span",{className:"text-yellow-600 font-medium",children:[m," warning",m>1?"s":""," to review"]})]}),t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm font-medium",children:"View Details"})]})})]})}function i2(){const[r,s]=w.useState(!0),[l,i]=w.useState(!1),[c,d]=w.useState(null),[m,p]=w.useState([]),[h,g]=w.useState(null),[v,y]=w.useState(!1),[C,F]=w.useState(""),[N,_]=w.useState(!1),[b,U]=w.useState({section:"all",type:"all",status:"all",search:""});w.useEffect(()=>{(async()=>{try{s(!0);const me=(await Ft.getConfigurationFiles()).map(ve=>({id:ve.id||ve.name,name:ve.name,path:ve.path||ve.name,type:ve.type||"text",content:ve.content||"",size:ve.content?.length||0,lastModified:ve.lastModified||new Date().toISOString(),hasSecrets:ve.hasSecrets||!1,isEditable:ve.isEditable!==!1,validation:ve.validation||[]}));p(me),d(null)}catch(ye){d(Ce.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching config files:",ye)}finally{s(!1)}})()},[]);const R=Jj(m,b),M=h&&m.find(te=>te.id===h)||null,P=()=>{window.location.reload()},W=te=>{g(te),y(!1),F("")},ae=()=>{M&&(y(!0),F(M.content))},z=async()=>{if(M&&!l)try{i(!0),d(null);const te=await Ft.saveConfigurationFile(M.id,C);p(ye=>ye.map(me=>me.id===h?{...te,isEditable:me.isEditable}:me)),h===M.id&&g(M.id),y(!1),F("")}catch(te){console.error("Error saving config file:",te),d(`${Ce.FAILED_TO_SAVE_CONFIG}: ${te.message}`)}finally{i(!1)}},oe=()=>{y(!1),F("")},xe=()=>{_(!N)},Ne=()=>{window.location.reload()};return r?t.jsx(R1,{}):c?t.jsx(A1,{error:c,onRetry:Ne}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(P1,{onRefresh:P,loading:r}),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(r2,{configs:R,selectedConfig:h,onConfigSelect:W,filters:b,onFiltersChange:U})}),t.jsxs("div",{className:"lg:col-span-2 flex flex-col",children:[M&&t.jsx("div",{className:"mb-4",children:t.jsx(s2,{isEditing:v,canEdit:M.isEditable,hasSecrets:M.hasSecrets,showSecrets:N,saving:l,onStartEdit:ae,onSaveEdit:z,onCancelEdit:oe,onToggleSecrets:xe,onRefresh:P,content:v?C:M?.content})}),t.jsx("div",{className:"flex-1",children:t.jsx(a2,{config:M,isEditing:v,editValue:C,saving:l,onStartEdit:ae,onSaveEdit:z,onCancelEdit:oe,onValueChange:F,showSecrets:N,onToggleSecrets:xe})})]}),t.jsx("div",{className:"lg:col-span-1 space-y-6",children:t.jsx(l2,{validation:M?.validation||[],configName:M?.name||"No file selected"})})]}),R.length===0&&!r&&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(Oc,{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:b.search||b.type!=="all"||b.status!=="all"?"Try adjusting your filters to see more results.":"No configuration files are available to inspect."}),(b.search||b.type!=="all"||b.status!=="all")&&t.jsx("button",{onClick:()=>U({section:"all",type:"all",status:"all",search:""}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]})]})}const js={async getPackages(){return we.get("/releases/packages")},async analyzeChanges(r,s){return we.post("/releases/analyze",{packageNames:r,packagePaths:s})},async checkReadiness(r,s){return we.post("/releases/check-readiness",{packageNames:r,packagePaths:s})},async prepare(r,s,l=!1){return we.post("/releases/prepare",{packageNames:r,packagePaths:s,dryRun:l})},async startPublish(r,s,l){return we.post("/releases/start",{packageNames:r,packagePaths:s,...l})},async getPipelineStatus(r){return we.get(`/releases/status/${r}`)},async getPipelineDetails(r){return we.get(`/releases/details/${r}`)},async getPipelines(r,s){const l=new URLSearchParams;r&&l.append("status",r),s&&l.append("limit",String(s));const i=l.toString();return we.get(`/releases/pipelines?${i}`)},async cancelPipeline(r){return we.post(`/releases/cancel/${r}`)},async getPackageVersions(r){return we.get(`/releases/npm/${r}/versions`)},async isVersionAvailable(r,s){return we.get(`/releases/npm/${r}/${s}/available`)},async getHealth(){return we.get("/releases/health")}};function o2({packages:r,onConfirm:s,loading:l}){const[i,c]=w.useState(new Set),[d,m]=w.useState(""),p=w.useMemo(()=>r.filter(y=>!y.private&&y.name.toLowerCase().includes(d.toLowerCase())),[r,d]),h=y=>{const C=new Set(i);C.has(y)?C.delete(y):C.add(y),c(C)},g=()=>{i.size===p.length?c(new Set):c(new Set(p.map(y=>y.name)))},v=()=>{const y=r.filter(C=>i.has(C.name));s(y)};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:d,onChange:y=>m(y.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:g,className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:i.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(y=>t.jsx("div",{className:"p-4 hover:bg-gray-50 cursor-pointer transition",onClick:()=>h(y.name),children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:i.has(y.name),onChange:()=>h(y.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:y.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",y.version]})]}),y.dependencies&&y.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:[y.dependencies.length," deps"]})]})},y.name))})]}),t.jsx("div",{className:"flex gap-3 justify-end",children:t.jsxs("button",{onClick:v,disabled:i.size===0||l,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 (",i.size," selected)"]})})]})}const c2={major:"Breaking changes, incompatible API changes",minor:"New features, backward compatible",patch:"Bug fixes, patches, backward compatible"};function u2({packages:r,onConfirm:s,onBack:l}){const[i,c]=w.useState(r.reduce((h,g)=>({...h,[g.name]:g.bumpType}),{})),d=(h,g)=>{const v=h.split(".").map(Number);return g==="major"?`${v[0]+1}.0.0`:g==="minor"?`${v[0]}.${v[1]+1}.0`:`${v[0]}.${v[1]}.${v[2]+1}`},m=(h,g)=>{c(v=>({...v,[h]:g}))},p=()=>{const h=r.map(g=>({...g,bumpType:i[g.name],newVersion:d(g.currentVersion,i[g.name])}));s(h)};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(c2).map(([h,g])=>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:h}),t.jsx("p",{className:"text-sm text-gray-600",children:g})]},h))}),t.jsx("div",{className:"space-y-4",children:r.map(h=>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:h.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",h.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",d(h.currentVersion,i[h.name])]})]})]}),t.jsx("div",{className:"grid grid-cols-3 gap-3",children:["major","minor","patch"].map(g=>t.jsx("button",{onClick:()=>m(h.name,g),className:`p-3 rounded-lg border-2 transition font-medium text-sm ${i[h.name]===g?"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:g})},g))}),h.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:["ℹ️ ",h.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"})]})]},h.name))}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:l,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 d2({packages:r,existingChangesets:s,onConfirm:l,onBack:i,loading:c}){const[d,m]=w.useState(""),[p,h]=w.useState([]),g=()=>{const y=[];return d.trim()||y.push("Please enter a changelog summary"),d.trim().length<10&&y.push(Jx),h(y),y.length===0},v=()=>{g()&&l(d)};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:d,onChange:y=>{m(y.target.value),g()},placeholder:Qx,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((y,C)=>t.jsx("p",{className:"text-sm text-red-600",children:y},C))})]}),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:r.map(y=>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:y.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:[y.currentVersion," ",t.jsx(wa,{})," ",y.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:y.bumpType.charAt(0).toUpperCase()+y.bumpType.slice(1)})})]},y.name))})]}),s.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 ",s.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:i,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:c,children:"Back"}),t.jsx("button",{onClick:v,disabled:c||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:c?"Processing...":"Continue to Validation"})]})]})}function m2({validation:r,packages:s,onConfirm:l,onBack:i,loading:c}){const d=[{name:"User Permissions",passed:r.checks.permissions},{name:"Working Tree Clean",passed:r.checks.workingTreeClean},{name:"CI Tests Passing",passed:r.checks.ciPassing},{name:"Version Available on npm",passed:r.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 ${r.isValid?"bg-green-50":"bg-red-50"}`,children:[t.jsx("p",{className:`font-medium ${r.isValid?"text-green-900":"text-red-900"}`,children:r.isValid?"Ready to Release":"Not Ready"}),t.jsx("p",{className:`text-sm mt-1 ${r.isValid?"text-green-700":"text-red-700"}`,children:r.isValid?"All checks passed. Safe to proceed.":`${r.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:[s.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:d.map((m,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg ${m.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 p-1 ${m.passed?"bg-green-500":"bg-red-500"}`,children:m.passed?t.jsx(ai,{}):t.jsx(Ss,{})}),t.jsx("span",{className:`font-medium ${m.passed?"text-green-900":"text-red-900"}`,children:m.name})]},p))})]}),r.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:r.errors.map((m,p)=>t.jsxs("p",{className:"text-red-700 text-sm",children:["• ",m]},p))})]}),r.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:r.warnings.map((m,p)=>t.jsx("p",{className:"text-yellow-700 text-sm",children:m},p))})]}),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",disabled:c,children:"Back"}),t.jsx("button",{onClick:l,disabled:!r.isValid||c,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:c?"Publishing...":"Confirm & Publish"})]})]})}function f2({packages:r,summary:s,onReset:l}){const i=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 ",r.length," package(s)"]}),t.jsxs("p",{className:"text-gray-500 text-sm",children:["Initiated on ",i]})]}),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:r.map(c=>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:c.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:["v",c.currentVersion," ",t.jsx(wa,{})," v",c.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:c.bumpType.charAt(0).toUpperCase()+c.bumpType.slice(1)})]},c.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:s})})]}),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:l,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.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View Release on GitHub ",t.jsx(wa,{})]}),t.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View on npm ",t.jsx(wa,{})]})]})]})}function h2({message:r="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:r})]})}function p2({error:r,onRetry:s}){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:r}),t.jsx("button",{onClick:s,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 x2(){const{isAuthenticated:r,hasPermission:s}=Br(),[l,i]=w.useState("select"),[c,d]=w.useState([]),[m,p]=w.useState(""),[h,g]=w.useState(!1),[v,y]=w.useState(null),[C,F]=w.useState(null),[N,_]=w.useState([]),[b,U]=w.useState([]);w.useEffect(()=>{R()},[]);const R=async()=>{try{g(!0);const te=await we.get(Te.PUBLISH.PACKAGES);if(te.success)_(te.data.packages||[]);else{console.warn("Failed to fetch packages:",te.error?.message);const me=await we.get(Te.PACKAGES.LIST);me.success&&_(me.data||[])}const ye=await we.get(Te.PUBLISH.CHANGESETS);ye.success?U(ye.data.changesets||[]):(ye.error?.status===401||ye.error?.status===403)&&(window.location.href="/login"),y(null)}catch(te){const ye=te instanceof Error?te.message:Ce.FAILED_TO_FETCH_PACKAGES;y(ye),console.error("Error fetching workspace data:",te)}finally{g(!1)}},M=te=>{const ye=te.map(me=>({name:me.name,currentVersion:me.version,newVersion:me.version,bumpType:"patch",affectedDependencies:me.dependents||[]}));d(ye),i("bump")},P=te=>{d(te),i("preview")},W=te=>{p(te),ae(c,te)},ae=async(te,ye)=>{try{g(!0);const me=te.map(D=>D.name),ve=me.reduce((D,Y)=>{const ue=N.find(ne=>ne.name===Y);return ue&&(D[Y]=ue.path||"./packages/"+Y.split("/").pop()),D},{}),Z=await js.checkReadiness(me,ve),Q=[],X=[];let B=!0;if(Z.success){const D=Z.data;B=D.canProceed!==!1,D.globalBlockers&&Array.isArray(D.globalBlockers)&&Q.push(...D.globalBlockers.map(Y=>`🚨 ${Y}`)),D.checks&&Array.isArray(D.checks)&&D.checks.forEach(Y=>{Y.blockers&&Array.isArray(Y.blockers)&&Y.blockers.forEach(ue=>{Q.push(`❌ ${Y.packageName}: ${ue}`)}),Y.warnings&&Array.isArray(Y.warnings)&&Y.warnings.forEach(ue=>{X.push(`⚠️ ${Y.packageName}: ${ue}`)})})}const J=await we.post(Te.PUBLISH.PREVIEW,{packages:me,bumps:te.map(D=>({package:D.name,bumpType:D.bumpType})),summary:ye});if(!J.success)throw new Error(Ce.VALIDATION_FAILED);const q=J.data,S={isValid:(q.isValid??!0)&&B,errors:[...Q,...q.errors??[]],warnings:[...X,...q.warnings??[]],checks:q.checks??{permissions:!0,workingTreeClean:Q.length===0,ciPassing:!0,versionAvailable:!Q.some(D=>D.includes("already exists"))}};F(S),i("validate"),y(null)}catch(me){const ve=me instanceof Error?me.message:"Validation error";y(ve),console.error("Validation error:",me)}finally{g(!1)}},z=async()=>{try{if(C&&!C.isValid){y("Cannot proceed with publishing. Please fix validation errors and re-validate."),i("validate");return}if(!s("maintain")){y(Ce.PERMISSION_ERROR);return}g(!0);const te=c.map(Z=>Z.name),ye=te.reduce((Z,Q)=>{const X=N.find(B=>B.name===Q);return X&&(Z[Q]=X.path||"./packages/"+Q.split("/").pop()),Z},{}),me={};c.forEach(Z=>{me[Z.name]=Z.newVersion});const ve=await js.startPublish(te,ye,{versionMap:me,method:"node",dryRun:!1,autoTag:!0,createReleases:!0});if(!ve.success)throw new Error(ve.error?.message||"Failed to start publishing");try{await we.post(Te.PUBLISH.CHANGESETS,{packages:te,bumps:c.map(Z=>({package:Z.name,bumpType:Z.bumpType})),summary:m})}catch(Z){console.warn("Failed to create changeset record:",Z)}i("confirm"),y(null)}catch(te){const ye=te instanceof Error?te.message:"Publishing error";y(ye)}finally{g(!1)}},oe=()=>{i("select"),d([]),p(""),F(null),y(null),R()};if(!r)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(h&&l==="select"&&N.length===0)return t.jsx(h2,{message:"Loading workspace packages..."});if(v&&l==="select")return t.jsx(p2,{error:v,onRetry:R});const xe=s("write"),Ne=s("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 the independent release engine"})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step"," ",["select","bump","preview","validate","confirm"].indexOf(l)+1," ","of 5"]})]}),!xe&&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."})]}),v&&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:v})]}),b.length>0&&l==="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:[b.length," pending release(s)"]}),t.jsx("p",{className:"text-blue-600 text-sm mt-1",children:"Pull the latest changes and refresh the dashboard to see if these have been published."})]}),l==="select"&&!xe&&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."})]}),l==="select"&&xe&&t.jsx(o2,{packages:N,onConfirm:M,loading:h}),l==="bump"&&xe&&t.jsx(u2,{packages:c,onConfirm:P,onBack:()=>i("select")}),l==="preview"&&xe&&t.jsx(d2,{packages:c,existingChangesets:b,onConfirm:W,onBack:()=>i("bump"),loading:h}),l==="validate"&&!Ne&&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."})]}),l==="validate"&&Ne&&C&&t.jsx(m2,{validation:C,packages:c,onConfirm:z,onBack:()=>i("preview"),loading:h}),l==="confirm"&&t.jsx(f2,{packages:c,summary:m,onReset:oe}),t.jsx("div",{className:"flex gap-2 justify-center",children:["select","bump","preview","validate","confirm"].map((te,ye)=>t.jsx("div",{className:`h-2 flex-1 rounded-full transition-colors ${["select","bump","preview","validate","confirm"].indexOf(l)>=ye?"bg-primary-500":"bg-gray-300"}`},te))})]})}const{entries:Ch,setPrototypeOf:ff,isFrozen:g2,getPrototypeOf:y2,getOwnPropertyDescriptor:v2}=Object;let{freeze:jt,seal:Yt,create:Nc}=Object,{apply:bc,construct:Sc}=typeof Reflect<"u"&&Reflect;jt||(jt=function(s){return s});Yt||(Yt=function(s){return s});bc||(bc=function(s,l){for(var i=arguments.length,c=new Array(i>2?i-2:0),d=2;d<i;d++)c[d-2]=arguments[d];return s.apply(l,c)});Sc||(Sc=function(s){for(var l=arguments.length,i=new Array(l>1?l-1:0),c=1;c<l;c++)i[c-1]=arguments[c];return new s(...i)});const Gl=wt(Array.prototype.forEach),j2=wt(Array.prototype.lastIndexOf),hf=wt(Array.prototype.pop),xa=wt(Array.prototype.push),w2=wt(Array.prototype.splice),Jl=wt(String.prototype.toLowerCase),ac=wt(String.prototype.toString),lc=wt(String.prototype.match),ga=wt(String.prototype.replace),N2=wt(String.prototype.indexOf),b2=wt(String.prototype.trim),cn=wt(Object.prototype.hasOwnProperty),vt=wt(RegExp.prototype.test),ya=S2(TypeError);function wt(r){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var l=arguments.length,i=new Array(l>1?l-1:0),c=1;c<l;c++)i[c-1]=arguments[c];return bc(r,s,i)}}function S2(r){return function(){for(var s=arguments.length,l=new Array(s),i=0;i<s;i++)l[i]=arguments[i];return Sc(r,l)}}function Ee(r,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jl;ff&&ff(r,null);let i=s.length;for(;i--;){let c=s[i];if(typeof c=="string"){const d=l(c);d!==c&&(g2(s)||(s[i]=d),c=d)}r[c]=!0}return r}function k2(r){for(let s=0;s<r.length;s++)cn(r,s)||(r[s]=null);return r}function vn(r){const s=Nc(null);for(const[l,i]of Ch(r))cn(r,l)&&(Array.isArray(i)?s[l]=k2(i):i&&typeof i=="object"&&i.constructor===Object?s[l]=vn(i):s[l]=i);return s}function va(r,s){for(;r!==null;){const i=v2(r,s);if(i){if(i.get)return wt(i.get);if(typeof i.value=="function")return wt(i.value)}r=y2(r)}function l(){return null}return l}const pf=jt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ic=jt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),oc=jt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E2=jt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),cc=jt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),C2=jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xf=jt(["#text"]),gf=jt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),uc=jt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yf=jt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kl=jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_2=Yt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),T2=Yt(/<%[\w\W]*|[\w\W]*%>/gm),R2=Yt(/\$\{[\w\W]*/gm),A2=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),P2=Yt(/^aria-[\-\w]+$/),_h=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),L2=Yt(/^(?:\w+script|data):/i),O2=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Th=Yt(/^html$/i),I2=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i);var vf=Object.freeze({__proto__:null,ARIA_ATTR:P2,ATTR_WHITESPACE:O2,CUSTOM_ELEMENT:I2,DATA_ATTR:A2,DOCTYPE_NAME:Th,ERB_EXPR:T2,IS_ALLOWED_URI:_h,IS_SCRIPT_OR_DATA:L2,MUSTACHE_EXPR:_2,TMPLIT_EXPR:R2});const ja={element:1,text:3,progressingInstruction:7,comment:8,document:9},M2=function(){return typeof window>"u"?null:window},D2=function(s,l){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let i=null;const c="data-tt-policy-suffix";l&&l.hasAttribute(c)&&(i=l.getAttribute(c));const d="dompurify"+(i?"#"+i:"");try{return s.createPolicy(d,{createHTML(m){return m},createScriptURL(m){return m}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},jf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Rh(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:M2();const s=de=>Rh(de);if(s.version="3.3.1",s.removed=[],!r||!r.document||r.document.nodeType!==ja.document||!r.Element)return s.isSupported=!1,s;let{document:l}=r;const i=l,c=i.currentScript,{DocumentFragment:d,HTMLTemplateElement:m,Node:p,Element:h,NodeFilter:g,NamedNodeMap:v=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:y,DOMParser:C,trustedTypes:F}=r,N=h.prototype,_=va(N,"cloneNode"),b=va(N,"remove"),U=va(N,"nextSibling"),R=va(N,"childNodes"),M=va(N,"parentNode");if(typeof m=="function"){const de=l.createElement("template");de.content&&de.content.ownerDocument&&(l=de.content.ownerDocument)}let P,W="";const{implementation:ae,createNodeIterator:z,createDocumentFragment:oe,getElementsByTagName:xe}=l,{importNode:Ne}=i;let te=jf();s.isSupported=typeof Ch=="function"&&typeof M=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ye,ERB_EXPR:me,TMPLIT_EXPR:ve,DATA_ATTR:Z,ARIA_ATTR:Q,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:J}=vf;let{IS_ALLOWED_URI:q}=vf,S=null;const D=Ee({},[...pf,...ic,...oc,...cc,...xf]);let Y=null;const ue=Ee({},[...gf,...uc,...yf,...Kl]);let ne=Object.seal(Nc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,Re=null;const _e=Object.seal(Nc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ie=!0,it=!0,pr=!1,Es=!0,Qt=!1,Dn=!0,dn=!1,zr=!1,xr=!1,jn=!1,Fn=!1,mn=!1,wn=!0,Hr=!1;const Oa="user-content-";let $r=!0,Un=!1,Nn={},Nt=null;const Bn=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Cs=null;const zn=Ee({},["audio","video","img","source","image","track"]);let bn=null;const Ia=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gr="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let fn=Jt,vr=!1,jr=null;const _s=Ee({},[gr,yr,Jt],ac);let Hn=Ee({},["mi","mo","mn","ms","mtext"]),Xt=Ee({},["annotation-xml"]);const $n=Ee({},["title","style","font","a","script"]);let Vn=null;const Ma=["application/xhtml+xml","text/html"],Da="text/html";let We=null,Sn=null;const Ts=l.createElement("form"),Rs=function(E){return E instanceof RegExp||E instanceof Function},kn=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Sn&&Sn===E)){if((!E||typeof E!="object")&&(E={}),E=vn(E),Vn=Ma.indexOf(E.PARSER_MEDIA_TYPE)===-1?Da:E.PARSER_MEDIA_TYPE,We=Vn==="application/xhtml+xml"?ac:Jl,S=cn(E,"ALLOWED_TAGS")?Ee({},E.ALLOWED_TAGS,We):D,Y=cn(E,"ALLOWED_ATTR")?Ee({},E.ALLOWED_ATTR,We):ue,jr=cn(E,"ALLOWED_NAMESPACES")?Ee({},E.ALLOWED_NAMESPACES,ac):_s,bn=cn(E,"ADD_URI_SAFE_ATTR")?Ee(vn(Ia),E.ADD_URI_SAFE_ATTR,We):Ia,Cs=cn(E,"ADD_DATA_URI_TAGS")?Ee(vn(zn),E.ADD_DATA_URI_TAGS,We):zn,Nt=cn(E,"FORBID_CONTENTS")?Ee({},E.FORBID_CONTENTS,We):Bn,be=cn(E,"FORBID_TAGS")?Ee({},E.FORBID_TAGS,We):vn({}),Re=cn(E,"FORBID_ATTR")?Ee({},E.FORBID_ATTR,We):vn({}),Nn=cn(E,"USE_PROFILES")?E.USE_PROFILES:!1,Ie=E.ALLOW_ARIA_ATTR!==!1,it=E.ALLOW_DATA_ATTR!==!1,pr=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Es=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qt=E.SAFE_FOR_TEMPLATES||!1,Dn=E.SAFE_FOR_XML!==!1,dn=E.WHOLE_DOCUMENT||!1,jn=E.RETURN_DOM||!1,Fn=E.RETURN_DOM_FRAGMENT||!1,mn=E.RETURN_TRUSTED_TYPE||!1,xr=E.FORCE_BODY||!1,wn=E.SANITIZE_DOM!==!1,Hr=E.SANITIZE_NAMED_PROPS||!1,$r=E.KEEP_CONTENT!==!1,Un=E.IN_PLACE||!1,q=E.ALLOWED_URI_REGEXP||_h,fn=E.NAMESPACE||Jt,Hn=E.MATHML_TEXT_INTEGRATION_POINTS||Hn,Xt=E.HTML_INTEGRATION_POINTS||Xt,ne=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Rs(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ne.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Rs(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ne.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qt&&(it=!1),Fn&&(jn=!0),Nn&&(S=Ee({},xf),Y=[],Nn.html===!0&&(Ee(S,pf),Ee(Y,gf)),Nn.svg===!0&&(Ee(S,ic),Ee(Y,uc),Ee(Y,Kl)),Nn.svgFilters===!0&&(Ee(S,oc),Ee(Y,uc),Ee(Y,Kl)),Nn.mathMl===!0&&(Ee(S,cc),Ee(Y,yf),Ee(Y,Kl))),E.ADD_TAGS&&(typeof E.ADD_TAGS=="function"?_e.tagCheck=E.ADD_TAGS:(S===D&&(S=vn(S)),Ee(S,E.ADD_TAGS,We))),E.ADD_ATTR&&(typeof E.ADD_ATTR=="function"?_e.attributeCheck=E.ADD_ATTR:(Y===ue&&(Y=vn(Y)),Ee(Y,E.ADD_ATTR,We))),E.ADD_URI_SAFE_ATTR&&Ee(bn,E.ADD_URI_SAFE_ATTR,We),E.FORBID_CONTENTS&&(Nt===Bn&&(Nt=vn(Nt)),Ee(Nt,E.FORBID_CONTENTS,We)),E.ADD_FORBID_CONTENTS&&(Nt===Bn&&(Nt=vn(Nt)),Ee(Nt,E.ADD_FORBID_CONTENTS,We)),$r&&(S["#text"]=!0),dn&&Ee(S,["html","head","body"]),S.table&&(Ee(S,["tbody"]),delete be.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw ya('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ya('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');P=E.TRUSTED_TYPES_POLICY,W=P.createHTML("")}else P===void 0&&(P=D2(F,c)),P!==null&&typeof W=="string"&&(W=P.createHTML(""));jt&&jt(E),Sn=E}},Vr=Ee({},[...ic,...oc,...E2]),Wn=Ee({},[...cc,...C2]),pi=function(E){let G=M(E);(!G||!G.tagName)&&(G={namespaceURI:fn,tagName:"template"});const le=Jl(E.tagName),Me=Jl(G.tagName);return jr[E.namespaceURI]?E.namespaceURI===yr?G.namespaceURI===Jt?le==="svg":G.namespaceURI===gr?le==="svg"&&(Me==="annotation-xml"||Hn[Me]):!!Vr[le]:E.namespaceURI===gr?G.namespaceURI===Jt?le==="math":G.namespaceURI===yr?le==="math"&&Xt[Me]:!!Wn[le]:E.namespaceURI===Jt?G.namespaceURI===yr&&!Xt[Me]||G.namespaceURI===gr&&!Hn[Me]?!1:!Wn[le]&&($n[le]||!Vr[le]):!!(Vn==="application/xhtml+xml"&&jr[E.namespaceURI]):!1},ut=function(E){xa(s.removed,{element:E});try{M(E).removeChild(E)}catch{b(E)}},Bt=function(E,G){try{xa(s.removed,{attribute:G.getAttributeNode(E),from:G})}catch{xa(s.removed,{attribute:null,from:G})}if(G.removeAttribute(E),E==="is")if(jn||Fn)try{ut(G)}catch{}else try{G.setAttribute(E,"")}catch{}},wr=function(E){let G=null,le=null;if(xr)E="<remove></remove>"+E;else{const Ge=lc(E,/^[\r\n\t ]+/);le=Ge&&Ge[0]}Vn==="application/xhtml+xml"&&fn===Jt&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");const Me=P?P.createHTML(E):E;if(fn===Jt)try{G=new C().parseFromString(Me,Vn)}catch{}if(!G||!G.documentElement){G=ae.createDocument(fn,"template",null);try{G.documentElement.innerHTML=vr?W:Me}catch{}}const Se=G.body||G.documentElement;return E&&le&&Se.insertBefore(l.createTextNode(le),Se.childNodes[0]||null),fn===Jt?xe.call(G,dn?"html":"body")[0]:dn?G.documentElement:Se},Wr=function(E){return z.call(E.ownerDocument||E,E,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},As=function(E){return E instanceof y&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof v)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},Fa=function(E){return typeof p=="function"&&E instanceof p};function Zt(de,E,G){Gl(de,le=>{le.call(s,E,G,Sn)})}const hn=function(E){let G=null;if(Zt(te.beforeSanitizeElements,E,null),As(E))return ut(E),!0;const le=We(E.nodeName);if(Zt(te.uponSanitizeElement,E,{tagName:le,allowedTags:S}),Dn&&E.hasChildNodes()&&!Fa(E.firstElementChild)&&vt(/<[/\w!]/g,E.innerHTML)&&vt(/<[/\w!]/g,E.textContent)||E.nodeType===ja.progressingInstruction||Dn&&E.nodeType===ja.comment&&vt(/<[/\w]/g,E.data))return ut(E),!0;if(!(_e.tagCheck instanceof Function&&_e.tagCheck(le))&&(!S[le]||be[le])){if(!be[le]&&Ls(le)&&(ne.tagNameCheck instanceof RegExp&&vt(ne.tagNameCheck,le)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(le)))return!1;if($r&&!Nt[le]){const Me=M(E)||E.parentNode,Se=R(E)||E.childNodes;if(Se&&Me){const Ge=Se.length;for(let tt=Ge-1;tt>=0;--tt){const zt=_(Se[tt],!0);zt.__removalCount=(E.__removalCount||0)+1,Me.insertBefore(zt,U(E))}}}return ut(E),!0}return E instanceof h&&!pi(E)||(le==="noscript"||le==="noembed"||le==="noframes")&&vt(/<\/no(script|embed|frames)/i,E.innerHTML)?(ut(E),!0):(Qt&&E.nodeType===ja.text&&(G=E.textContent,Gl([ye,me,ve],Me=>{G=ga(G,Me," ")}),E.textContent!==G&&(xa(s.removed,{element:E.cloneNode()}),E.textContent=G)),Zt(te.afterSanitizeElements,E,null),!1)},Ps=function(E,G,le){if(wn&&(G==="id"||G==="name")&&(le in l||le in Ts))return!1;if(!(it&&!Re[G]&&vt(Z,G))){if(!(Ie&&vt(Q,G))){if(!(_e.attributeCheck instanceof Function&&_e.attributeCheck(G,E))){if(!Y[G]||Re[G]){if(!(Ls(E)&&(ne.tagNameCheck instanceof RegExp&&vt(ne.tagNameCheck,E)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(E))&&(ne.attributeNameCheck instanceof RegExp&&vt(ne.attributeNameCheck,G)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(G,E))||G==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&vt(ne.tagNameCheck,le)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(le))))return!1}else if(!bn[G]){if(!vt(q,ga(le,B,""))){if(!((G==="src"||G==="xlink:href"||G==="href")&&E!=="script"&&N2(le,"data:")===0&&Cs[E])){if(!(pr&&!vt(X,ga(le,B,"")))){if(le)return!1}}}}}}}return!0},Ls=function(E){return E!=="annotation-xml"&&lc(E,J)},Ua=function(E){Zt(te.beforeSanitizeAttributes,E,null);const{attributes:G}=E;if(!G||As(E))return;const le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Me=G.length;for(;Me--;){const Se=G[Me],{name:Ge,namespaceURI:tt,value:zt}=Se,en=We(Ge),Os=zt;let Je=Ge==="value"?Os:b2(Os);if(le.attrName=en,le.attrValue=Je,le.keepAttr=!0,le.forceKeepAttr=void 0,Zt(te.uponSanitizeAttribute,E,le),Je=le.attrValue,Hr&&(en==="id"||en==="name")&&(Bt(Ge,E),Je=Oa+Je),Dn&&vt(/((--!?|])>)|<\/(style|title|textarea)/i,Je)){Bt(Ge,E);continue}if(en==="attributename"&&lc(Je,"href")){Bt(Ge,E);continue}if(le.forceKeepAttr)continue;if(!le.keepAttr){Bt(Ge,E);continue}if(!Es&&vt(/\/>/i,Je)){Bt(Ge,E);continue}Qt&&Gl([ye,me,ve],Pt=>{Je=ga(Je,Pt," ")});const Nr=We(E.nodeName);if(!Ps(Nr,en,Je)){Bt(Ge,E);continue}if(P&&typeof F=="object"&&typeof F.getAttributeType=="function"&&!tt)switch(F.getAttributeType(Nr,en)){case"TrustedHTML":{Je=P.createHTML(Je);break}case"TrustedScriptURL":{Je=P.createScriptURL(Je);break}}if(Je!==Os)try{tt?E.setAttributeNS(tt,Ge,Je):E.setAttribute(Ge,Je),As(E)?ut(E):hf(s.removed)}catch{Bt(Ge,E)}}Zt(te.afterSanitizeAttributes,E,null)},Ba=function de(E){let G=null;const le=Wr(E);for(Zt(te.beforeSanitizeShadowDOM,E,null);G=le.nextNode();)Zt(te.uponSanitizeShadowNode,G,null),hn(G),Ua(G),G.content instanceof d&&de(G.content);Zt(te.afterSanitizeShadowDOM,E,null)};return s.sanitize=function(de){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=null,le=null,Me=null,Se=null;if(vr=!de,vr&&(de="<!-->"),typeof de!="string"&&!Fa(de))if(typeof de.toString=="function"){if(de=de.toString(),typeof de!="string")throw ya("dirty is not a string, aborting")}else throw ya("toString is not a function");if(!s.isSupported)return de;if(zr||kn(E),s.removed=[],typeof de=="string"&&(Un=!1),Un){if(de.nodeName){const zt=We(de.nodeName);if(!S[zt]||be[zt])throw ya("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof p)G=wr("<!---->"),le=G.ownerDocument.importNode(de,!0),le.nodeType===ja.element&&le.nodeName==="BODY"||le.nodeName==="HTML"?G=le:G.appendChild(le);else{if(!jn&&!Qt&&!dn&&de.indexOf("<")===-1)return P&&mn?P.createHTML(de):de;if(G=wr(de),!G)return jn?null:mn?W:""}G&&xr&&ut(G.firstChild);const Ge=Wr(Un?de:G);for(;Me=Ge.nextNode();)hn(Me),Ua(Me),Me.content instanceof d&&Ba(Me.content);if(Un)return de;if(jn){if(Fn)for(Se=oe.call(G.ownerDocument);G.firstChild;)Se.appendChild(G.firstChild);else Se=G;return(Y.shadowroot||Y.shadowrootmode)&&(Se=Ne.call(i,Se,!0)),Se}let tt=dn?G.outerHTML:G.innerHTML;return dn&&S["!doctype"]&&G.ownerDocument&&G.ownerDocument.doctype&&G.ownerDocument.doctype.name&&vt(Th,G.ownerDocument.doctype.name)&&(tt="<!DOCTYPE "+G.ownerDocument.doctype.name+`>
18
+ `+tt),Qt&&Gl([ye,me,ve],zt=>{tt=ga(tt,zt," ")}),P&&mn?P.createHTML(tt):tt},s.setConfig=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kn(de),zr=!0},s.clearConfig=function(){Sn=null,zr=!1},s.isValidAttribute=function(de,E,G){Sn||kn({});const le=We(de),Me=We(E);return Ps(le,Me,G)},s.addHook=function(de,E){typeof E=="function"&&xa(te[de],E)},s.removeHook=function(de,E){if(E!==void 0){const G=j2(te[de],E);return G===-1?void 0:w2(te[de],G,1)[0]}return hf(te[de])},s.removeHooks=function(de){te[de]=[]},s.removeAllHooks=function(){te=jf()},s}var F2=Rh();function U2(r){const s=/\u001b\[([0-9;]*m|K)|(\u001b\(B|\u001b\[m)/g;let l="",i={};const c=Array.from(r.matchAll(s)),d={30:"#000000",31:"#e06c75",32:"#98c379",33:"#e5c07b",34:"#61afef",35:"#c678dd",36:"#56b6c2",37:"#abb2bf"},m={90:"#5c6370",91:"#ff7b86",92:"#98c379",93:"#e5c07b",94:"#61afef",95:"#c678dd",96:"#56b6c2",97:"#ffffff"};let p=0,h="";for(const v of c){const y=r.substring(p,v.index);h+=wf(y);const C=v[1];if(p=v.index+v[0].length,C==="m"||C==="0m")h&&(l+=dc(h,i),h=""),i={};else if(C==="1m")i.fontWeight="bold";else if(C==="2m")i.opacity="0.5";else if(C==="3m")i.fontStyle="italic";else if(C==="4m")i.textDecoration="underline";else if(C.includes(";")){const F=C.split(";").filter(N=>N);for(const N of F){const _=parseInt(N);if(_===0)h&&(l+=dc(h,i),h=""),i={};else if(_===1)i.fontWeight="bold";else if(_===2)i.opacity="0.5";else if(_===3)i.fontStyle="italic";else if(_===4)i.textDecoration="underline";else if(d[_])i.color=d[_];else if(m[_])i.color=m[_];else if(_>=40&&_<=47){const b=d[_-10];b&&(i.backgroundColor=b)}else if(_>=100&&_<=107){const b=m[_-60];b&&(i.backgroundColor=b)}}}else{const F=parseInt(C);d[F]?i.color=d[F]:m[F]&&(i.color=m[F])}}const g=r.substring(p);return h+=wf(g),h&&(l+=dc(h,i)),l}function wf(r){const s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return r.replace(/[&<>"']/g,l=>s[l])}function dc(r,s){return!r||Object.keys(s).length===0?r:`<span style="${Object.entries(s).map(([i,c])=>`${i.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${c}`).join("; ")}">${r}</span>`}function B2(r,s){if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Dt,{className:"h-6 w-6 text-gray-600"})}return t.jsx(He,{className:"h-6 w-6 text-blue-600"})}function Ah({step:r,onToggle:s,expandedSteps:l,stepIndex:i}){const c=w.useRef(null),[d,m]=w.useState(!1),p=l.has(r.stepNumber),h=r.children&&r.children.length>0||r.logs.length>0,g=w.useMemo(()=>d?r.logs:r.logs.slice(0,1e3),[r.logs,d]);w.useEffect(()=>{if(r.status==="in_progress"&&p&&c.current){const C=c.current;C.scrollTop=C.scrollHeight}},[r.logs.length,p,r.status]);const v=w.useMemo(()=>!r.startedAt||!r.completedAt?0:Math.round((new Date(r.completedAt).getTime()-new Date(r.startedAt).getTime())/100)/10,[r.startedAt,r.completedAt]),y={marginLeft:`${r.level*20}px`};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"border-b border-gray-200 bg-white",style:y,children:[t.jsxs("button",{onClick:()=>s(r.stepNumber),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-gray-50 transition-colors group",children:[t.jsx("span",{className:"text-gray-400 group-hover:text-gray-600 flex-shrink-0",children:h?p?t.jsx(Gx,{className:"h-5 w-5"}):t.jsx(Kx,{className:"h-5 w-5"}):t.jsx("span",{className:"h-5 w-5"})}),t.jsx("span",{className:"text-xs font-bold text-gray-500 bg-gray-100 rounded px-2 py-1 min-w-fit",children:i+1}),t.jsx("span",{className:"flex-1 text-left",children:t.jsx("span",{className:"text-sm font-semibold text-gray-900",children:r.stepName})}),t.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[r.status==="in_progress"&&t.jsx("span",{className:"flex h-2 w-2 rounded-full bg-blue-500 animate-pulse"}),t.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:[v,"s"]})]})]}),p&&r.logs.length>0&&t.jsx("div",{className:"border-t border-gray-200 bg-[#0d1117]",children:t.jsxs("div",{ref:c,className:"text-gray-300 font-mono text-xs max-h-[600px] overflow-y-auto",children:[g.length===0?t.jsx("div",{className:"px-10 py-6 italic text-gray-500 text-center",children:"No logs available yet"}):t.jsx("div",{className:"py-2 px-0",children:g.map((C,F)=>t.jsxs("div",{className:"flex hover:bg-gray-800/40 transition-colors leading-6 group",children:[t.jsx("span",{className:"w-12 text-right pr-4 text-gray-600 select-none border-r border-gray-800 flex-shrink-0 group-hover:bg-gray-800/20",children:C.lineNumber}),t.jsx("span",{className:"pl-4 pr-3 text-gray-500 select-none opacity-50 text-xs flex-shrink-0",children:C.timestamp.split("T")[1]?.slice(0,8)}),t.jsx("span",{className:"flex-1 whitespace-pre break-all pr-4 text-gray-300",dangerouslySetInnerHTML:{__html:F2.sanitize(U2(C.ansiContent))}})]},`${r.stepNumber}-${C.lineNumber}`))}),!d&&r.logs.length>1e3&&t.jsx("div",{className:"px-4 py-2 border-t border-gray-800 text-center",children:t.jsxs("button",{onClick:()=>m(!0),className:"text-blue-400 hover:text-blue-300 text-xs font-medium transition-colors",children:["Show all ",r.logs.length," lines"]})})]})})]}),p&&r.children&&r.children.length>0&&t.jsx(t.Fragment,{children:r.children.map((C,F)=>t.jsx(Ah,{step:C,onToggle:s,expandedSteps:l,stepIndex:F},C.stepNumber))})]})}function z2({steps:r,jobName:s,jobStatus:l,jobConclusion:i,gitHubLogsUrl:c}){const[d,m]=w.useState(new Set([r[0]?.stepNumber])),p=g=>{m(v=>{const y=new Set(v);return y.has(g)?y.delete(g):y.add(g),y})},h=g=>g.reduce((v,y)=>{let C=1;return y.children&&y.children.length>0&&(C+=h(y.children)),v+C},0);return t.jsxs("div",{className:"flex flex-col h-full bg-white border border-gray-200 rounded-lg overflow-hidden",children:[t.jsxs("div",{className:"px-4 py-3 bg-gray-50 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"text-lg font-semibold ",children:B2(l,i)}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:s}),t.jsxs("p",{className:"text-xs text-gray-500",children:[h(r)," step",h(r)!==1?"s":""]})]})]}),t.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-3 py-2 bg-blue-50 text-blue-600 hover:bg-blue-100 rounded border border-blue-200 transition-colors",children:"View on GitHub"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:r.length===0?t.jsx("div",{className:"p-4 text-center text-gray-500",children:"No steps available"}):r.map((g,v)=>t.jsx(Ah,{step:g,onToggle:p,expandedSteps:d,stepIndex:v},g.stepNumber))})]})}const H2=r=>{if(!r)return!1;const s=r.limit*.1;return r.remaining>0&&r.remaining<=s},$2=r=>{const s=new Date(r*1e3),l=new Date,i=s.getTime()-l.getTime();if(i<0)return"now";const c=Math.floor(i/1e3),d=Math.floor(c/60),m=Math.floor(d/60);return m>0?`${m}h ${d%60}m`:d>0?`${d}m ${c%60}s`:`${c}s`},Na=r=>{if(!r||r.remaining>0)return"";const s=$2(r.reset);return Bf.QUOTA_RESET(s)},V2=r=>!r||!H2(r)?"":Bf.APPROACHING_LIMIT(r.remaining,r.limit);function W2(r,s){if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-5 w-5 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-5 w-5 text-red-600"})}return t.jsx(He,{className:"h-5 w-5 text-yellow-600"})}function G2(r,s){if(r==="completed"){if(s==="success")return"bg-green-100 text-green-800";if(s==="failure")return"bg-red-100 text-red-800"}return"bg-yellow-100 text-yellow-800"}function K2(r){const s=new Date(r),i=Math.floor((new Date().getTime()-s.getTime())/1e3);if(i<60)return"just now";const c=Math.floor(i/60);if(c<60)return`${c}m ago`;const d=Math.floor(c/60);if(d<24)return`${d}h ago`;const m=Math.floor(d/24);return m<7?`${m}d ago`:s.toLocaleDateString()}function q2({owner:r,repo:s,packageName:l,onSelectRun:i,runId:c,limit:d=10}){const[m,p]=w.useState([]),[h,g]=w.useState(!0),[v,y]=w.useState(null),[C,F]=w.useState(null),{isAuthenticated:N,hasPermission:_}=Br();w.useEffect(()=>{const R=async()=>{try{g(!0),y(null);let P=Te.WORKFLOWS.LIST(r,s)+`?per_page=${d}`;l&&(P=Te.WORKFLOWS.BY_PACKAGE(r,s,l));const W=await we.get(P);if(!W.success){const oe=Na(W.rateLimit);if(oe){y(oe);return}throw new Error(Ce.FAILED_TO_FETCH_WORKFLOWS)}const ae=W.data;let z=[];if(l)if(Array.isArray(ae))z=ae.flatMap(oe=>oe.runs||[]).slice(0,d);else{const oe=ae;z=(Array.isArray(oe.runs)?oe.runs:[]).slice(0,d)}else z=Array.isArray(ae.runs)?ae.runs:[];p(z)}catch(P){y(P instanceof Error?P.message:Ce.UNKNOWN_ERROR)}finally{g(!1)}},M=setInterval(R,5e3);return R(),()=>clearInterval(M)},[r,s,l,d]);const b=async(R,M)=>{R.stopPropagation(),F(M.id);try{const P=await we.post(Te.WORKFLOWS.CANCEL(r,s,M.id));if(P.success)p(m.map(W=>W.id===M.id?{...W,status:"completed",conclusion:"cancelled"}:W));else{const W=Na(P.rateLimit);if(W){y(W);return}throw new Error(Ce.FAILED_TO_CANCEL_RUN)}}catch(P){console.error("Failed to cancel run:",P),y(P instanceof Error?P.message:Ce.FAILED_TO_CANCEL_RUN)}finally{F(null)}},U=async(R,M)=>{R.stopPropagation(),F(M.id);try{const P=await we.post(Te.WORKFLOWS.RERUN(r,s,M.id),{failedOnly:!1});if(P.success)p(m.map(W=>W.id===M.id?{...W,status:"in_progress",conclusion:null}:W));else{const W=Na(P.rateLimit);if(W){y(W);return}throw new Error(Ce.FAILED_TO_RERUN_WORKFLOW)}}catch(P){console.error("Failed to rerun workflow:",P),y(P instanceof Error?P.message:Ce.FAILED_TO_RERUN_WORKFLOW)}finally{F(null)}};return h&&m.length===0?t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):v?t.jsx("div",{className:"rounded-lg bg-red-50 p-4 border border-red-200",children:t.jsxs("p",{className:"text-sm text-red-800",children:["Error: ",v]})}):t.jsx("div",{className:"space-y-2",children:!m||m.length===0?t.jsx("p",{className:"text-sm text-gray-500 py-4",children:"No workflow runs found"}):m.map(R=>t.jsxs("div",{className:`text-left p-3 rounded-lg border transition-colors ${c===R.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:[t.jsx("button",{onClick:()=>i?.(R.id),className:"w-full text-left",children:t.jsxs("div",{className:"flex items-start gap-2",children:[W2(R.status,R.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900",children:R.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${G2(R.status,R.conclusion)}`,children:R.conclusion??R.status}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["Branch: ",R.head_branch]}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["by ",R.actor.login]}),t.jsx("span",{children:" • "}),t.jsx("span",{children:K2(R.created_at)})]})]})]})}),_("maintain")&&t.jsxs("div",{className:"flex gap-2 mt-3",children:[R.status==="in_progress"&&t.jsx("button",{onClick:M=>b(M,R),disabled:C===R.id,className:"flex-1 px-3 py-2 text-sm font-medium text-red-700 bg-red-50 border border-red-200 rounded hover:bg-red-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Cancel this workflow run",children:C===R.id?"Cancelling...":"Cancel Run"}),(R.conclusion==="cancelled"||R.conclusion==="failure")&&t.jsx("button",{onClick:M=>U(M,R),disabled:C===R.id,className:"flex-1 px-3 py-2 text-sm font-medium text-blue-700 bg-blue-50 border border-blue-200 rounded hover:bg-blue-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Rerun this workflow",children:C===R.id?"Rerunning...":"Rerun"})]})]},R.id))})}function Y2({owner:r,repo:s,defaultBranch:l="main",onSuccess:i,onError:c}){const[d,m]=w.useState(!1),[p,h]=w.useState(l),[g,v]=w.useState({}),[y,C]=w.useState(!1),[F,N]=w.useState(null),[_,b]=w.useState([]),[U,R]=w.useState(),[M,P]=w.useState(!1);w.useEffect(()=>{d&&_.length===0&&W()},[d]);const W=async()=>{try{P(!0);const z=await we.get(Te.WORKFLOWS.AVAILABLE(r,s));z.success&&(b(z.data.workflows||[]),z.data.workflows?.length>0&&!U&&R(z.data.workflows[0].path))}catch(z){console.error("Failed to fetch workflows:",z)}finally{P(!1)}},ae=async()=>{try{C(!0),N(null);const z=await we.post(Te.WORKFLOWS.TRIGGER(r,s),{workflow:U,ref:p,inputs:g,workflowId:_.find(xe=>xe.path==U)?.id??""});if(!z.success){const xe=Na(z.rateLimit);if(xe){N(xe),c?.(xe);return}throw new Error(Ce.FAILED_TO_TRIGGER_WORKFLOW)}const oe=z.data;if(oe.success)i?.(oe.runUrl||`https://github.com/${r}/${s}/actions`),m(!1),h(l),v({});else throw new Error(oe.message||Ce.FAILED_TO_TRIGGER_WORKFLOW)}catch(z){const oe=z instanceof Error?z.message:Ce.UNKNOWN_ERROR;N(oe),c?.(oe)}finally{C(!1)}};return t.jsxs("div",{className:"relative",children:[t.jsxs("button",{onClick:()=>m(!d),disabled:y,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[t.jsx(li,{className:"h-4 w-4"}),"Trigger Workflow"]}),d&&t.jsxs("div",{className:"absolute right-0 mt-2 w-96 bg-white border border-gray-200 rounded-lg shadow-lg z-10 p-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Trigger Workflow"}),F&&t.jsxs("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3",children:[t.jsx(Ca,{className:"h-5 w-5 text-red-600 flex-shrink-0 mt-0.5"}),t.jsx("p",{className:"text-sm text-red-700",children:F})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Workflow"}),M?t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-500",children:"Loading workflows..."}):_.length>0?t.jsx("select",{value:U,onChange:z=>R(z.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",children:_.map(z=>t.jsxs("option",{value:z.path,children:[z.name," (",z.path,")"]},z.id))}):t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-yellow-50 text-yellow-700 text-sm",children:"No workflows available"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Branch"}),t.jsx("input",{type:"text",value:p,onChange:z=>h(z.target.value),placeholder:"main",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"flex gap-2 pt-4",children:[t.jsx("button",{onClick:ae,disabled:y||!p,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:y?"Triggering...":"Trigger"}),t.jsx("button",{onClick:()=>m(!1),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors font-medium",children:"Cancel"})]})]})]})]})}function Q2(r,s,l=!1){if(l)return t.jsx(He,{className:"h-6 w-6 text-yellow-500 animate-spin"});if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Dt,{className:"h-6 w-6 text-gray-600"});if(s==="skipped")return t.jsx(He,{className:"h-6 w-6 text-gray-600"})}return r==="in_progress"||r==="queued"?t.jsx(He,{className:"h-6 w-6 text-blue-600"}):t.jsx(He,{className:"h-6 w-6 text-gray-600"})}function J2({jobs:r,selectedJob:s,onSelectJob:l}){return t.jsx(t.Fragment,{children:r.map(i=>{const c=i.startedAt&&i.completedAt?Math.round((new Date(i.completedAt).getTime()-new Date(i.startedAt).getTime())/1e3):0;return t.jsx("div",{className:`rounded-lg border transition-colors ${s?.id===i.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:t.jsx("button",{onClick:()=>l(i),className:"w-full text-left p-3",children:t.jsxs("div",{className:"flex items-start gap-2",children:[Q2(i.status,i.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:i.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[i.status," • ",c,"s"]})]})]})})},i.id)})})}const X2=()=>{try{const r=at.get("monodog_session_data");return r?JSON.parse(r).permission:null}catch(r){return console.error("Failed to parse session data",r),null}};function Z2(r){const s=r.split(`
19
+ `),l=[];let i=null;const c=[];for(let d=0;d<s.length;d++){const m=s[d],p=m.trim(),h=m.match(/^(\s*)/)?.[1].length||0,g=Math.floor(h/2);if(m.includes("##[group]")){const v=m.match(/##\[group\](.*?)(?:##\[endgroup\]|$)/),C={name:v?v[1].trim():`Step ${l.length+1}`,logs:[],level:g,children:[],startIndex:d};for(;c.length>0&&c[c.length-1].level>=C.level;)c.pop();if(c.length>0){const F=c[c.length-1];F.children||(F.children=[]),F.children.push(C)}else l.push(C);c.push(C),i=C}else{if(m.includes("##[endgroup]"))continue;p&&i&&i.logs.push(m)}}return l}function ew(r,s,l=!1){if(l)return t.jsx(He,{className:"h-6 w-6 text-yellow-500 animate-spin"});if(r==="completed"){if(s==="success")return t.jsx(At,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(Ca,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Dt,{className:"h-6 w-6 text-gray-600"});if(s==="skipped")return t.jsx(He,{className:"h-6 w-6 text-gray-600"})}return r==="in_progress"||r==="queued"?t.jsx(He,{className:"h-6 w-6 text-blue-600"}):t.jsx(He,{className:"h-6 w-6 text-gray-600"})}function tw({packageName:r,onNavigate:s}){const[l,i]=w.useState([]),[c,d]=w.useState(null),[m,p]=w.useState([]),[h,g]=w.useState(null),[v,y]=w.useState(null),[C,F]=w.useState(!0),[N,_]=w.useState(null),[b,U]=w.useState(new Set),{hasPermission:R}=Br(),[M,P]=w.useState(0),[W,ae]=w.useState(!1),z=10,oe=20,{owner:xe,repo:Ne}=w.useMemo(()=>X2()||{},[]);w.useEffect(()=>{const Z=async()=>{try{const X=Te.PIPELINES.LIST,B=await we.get(X);if(!B.success){if(B.error?.status===401||B.error?.status===403){window.location.href="/login";return}if(B.error?.status===404){console.warn("Pipelines endpoint not available"),i([]),F(!1);return}throw new Error(`Failed to fetch pipelines: ${B.error?.message}`)}const J=Array.isArray(B.data)?B.data:[];i(J),F(!1)}catch(X){_(X instanceof Error?X.message:"Unknown error"),F(!1)}};Z();const Q=setInterval(Z,5e3);return()=>clearInterval(Q)},[xe,Ne,r]),w.useEffect(()=>{const Z=async()=>{try{l.forEach(async X=>{if(X.workflowId&&X.currentStatus!=="completed"&&!b.has(X.workflowId)){const B=Te.WORKFLOWS.LIST(xe,Ne)+`?workflow_id=${X.workflowId}&per_page=${oe}&page=1`,J=await we.get(B);if(J.success){const q=J.data,S=q.workflow_runs?.[0]||q.runs?.[0];if(S){const D=S.status!==X.currentStatus,Y=S.conclusion!==X.currentConclusion;if(D||Y){U(ue=>new Set(ue).add(X.workflowId));try{const ue=await we.put(Te.PIPELINES.STATUS(X.id),{currentStatus:S.status,currentConclusion:S.conclusion||null,lastRunId:S.id}),ne={...X,currentStatus:S.status,currentConclusion:S.conclusion||null,lastRunId:S.id};if(console.log(ne),ne.currentStatus=="completed"){const be=await Ft.refreshPackages()}i(be=>be.map(Re=>Re.id===X.id?ne:Re))}catch(ue){console.warn("Failed to update pipeline status:",ue)}finally{U(ue=>{const ne=new Set(ue);return ne.delete(X.workflowId),ne})}}}}}})}catch(X){console.warn("Failed to poll pipeline status:",X)}};Z();const Q=setInterval(Z,1e4);return()=>clearInterval(Q)},[l,xe,Ne]),w.useEffect(()=>{if(!c)return;const Z=async()=>{try{const X=await we.get(Te.WORKFLOWS.RUNS(xe,Ne,c));if(!X.success){if(X.error?.status===401||X.error?.status===403){window.location.href="/login";return}throw new Error(`Failed to fetch jobs: ${X.error?.message}`)}p(X.data.jobs||[])}catch(X){_(X instanceof Error?X.message:"Unknown error")}},Q=setInterval(Z,5e3);return Z(),()=>clearInterval(Q)},[c,xe,Ne]),w.useEffect(()=>{if(!h)return;const Z=async()=>{try{const Q=await we.get(Te.WORKFLOWS.LOGS(xe,Ne,h.gitHubJobId));if(!Q.success){const B=Na(Q.rateLimit);if(B){_(B);return}if(Q.error?.status===403)_(Ce.PERMISSION_ERROR);else if(Q.error?.status===401)_(xc.SESSION_EXPIRED),window.location.href="/login";else{console.log(Q);const J=Q.error?.details||"Unknown error";_(`${Ce.FAILED_TO_FETCH_LOGS}: ${J}`)}return}const X=Q.data;if(X.meta&&X.meta.isEmpty)y(""),_(Ce.FAILED_TO_FETCH_LOGS);else{y(X.logs||X);const B=V2(Q.rateLimit);B&&console.warn(B),_(null)}}catch(Q){const X=Q instanceof Error?Q.message:Ce.FAILED_TO_FETCH_LOGS;_(`${Ce.FAILED_TO_FETCH_LOGS}: ${X}`)}};if(Z(),h.status!=="completed"){const Q=setInterval(Z,5e3);return()=>clearInterval(Q)}},[h,xe,Ne]);const te=Z=>{g(Z),y(null)},ye=Z=>{const Q=Z.currentTarget;Q.scrollHeight-Q.scrollTop-Q.clientHeight<100&&!W&&l.length>=z&&me()},me=async()=>{if(!W){ae(!0);try{const Z=Te.PIPELINES.LIST+`?offset=${M+z}&limit=${z}`,Q=await we.get(Z);if(!Q.success)throw new Error("Failed to fetch more pipelines");const X=Q.data;i(B=>[...B,...X]),P(B=>B+z)}catch(Z){console.error("Error loading more pipelines:",Z)}finally{ae(!1)}}},ve=Z=>{d(Z),g(null),p([])};return C&&l.length===0?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 h-[50vh] overflow-hidden",children:[t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",onScroll:ye,children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Pipelines"}),R("maintain")&&t.jsx(Y2,{owner:xe,repo:Ne})]}),N&&t.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:t.jsx("p",{className:"text-xs text-red-700",children:N})}),t.jsx("div",{className:"space-y-2",children:l.length===0?t.jsx("p",{className:"text-sm text-gray-500",children:"No pipelines found"}):t.jsxs(t.Fragment,{children:[l.map(Z=>t.jsx("div",{className:"w-full text-left p-3 rounded-lg border transition-colors border-gray-200 hover:bg-gray-50",children:t.jsxs("div",{className:"flex items-start gap-2",children:[ew(Z.currentStatus,Z.currentConclusion||null,b.has(Z.id)),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:Z.packageName}),t.jsxs("p",{className:"text-xs text-gray-500",children:["v",Z.releaseVersion]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:Z.workflowName})]})]})},Z.id)),W&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-5 w-5 text-blue-600"})})})]})})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Runs"}),t.jsx(q2,{owner:xe,repo:Ne,packageName:r,onSelectRun:ve,runId:c,limit:oe})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Jobs"}),t.jsx("div",{className:"space-y-2",children:m.length?t.jsx(J2,{jobs:m,selectedJob:h,onSelectJob:te}):c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):t.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:t.jsx("p",{className:"text-sm",children:"Select a run to view jobs"})})})]})})]}),t.jsx("div",{className:"lg:col-span-1 overflow-hidden border-t pt-2 h-[50vh]",children:t.jsxs("div",{className:"p-4 h-full overflow-hidden flex flex-col",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Logs"}),h&&v?t.jsx(z2,{steps:(()=>{const Z=Z2(v);let Q=0;const X=B=>B.map(J=>{Q++;const q=J.logs.at(0)?.split(" ")[0],S=J.logs.at(-1)?.split(" ")[0];return{stepNumber:Q,stepName:J.name,level:J.level,status:"",conclusion:"",startedAt:q,completedAt:S,logs:J.logs.map((D,Y)=>({lineNumber:Y+1,timestamp:new Date().toISOString(),content:D,ansiContent:D})),children:J.children?X(J.children):void 0}});return X(Z)})(),jobName:h.name,jobStatus:h.status,jobConclusion:h.conclusion,gitHubLogsUrl:h.htmlUrl}):h?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"animate-spin",children:t.jsx(He,{className:"h-8 w-8 text-blue-600"})})}):t.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:t.jsx("p",{className:"text-sm",children:"Select a job to view logs"})})]})})]})}function nw(){const{session:r}=Br();return r?t.jsx("div",{className:"h-screen overflow-hidden",children:t.jsx(tw,{})}):t.jsx("div",{className:"flex items-center justify-center h-screen",children:t.jsx("p",{className:"text-gray-600",children:"Please sign in to view pipelines"})})}const rw="_container_qu28c_5",sw="_header_qu28c_13",aw="_subtitle_qu28c_26",lw="_error_qu28c_33",iw="_healthSection_qu28c_43",ow="_statusBadge_qu28c_51",cw="_statusDot_qu28c_59",uw="_stats_qu28c_85",dw="_stat_qu28c_51",mw="_statLabel_qu28c_99",fw="_statValue_qu28c_106",hw="_timestamp_qu28c_113",pw="_pipelinesSection_qu28c_120",xw="_pipelinesList_qu28c_135",gw="_pipelineItem_qu28c_143",yw="_pipelineHeader_qu28c_151",vw="_pipelineId_qu28c_158",jw="_pipelineStatus_qu28c_168",ww="_pipelineProgress_qu28c_193",Nw="_progressBar_qu28c_200",bw="_progressFill_qu28c_208",Sw="_progressText_qu28c_215",kw="_pipelinePackages_qu28c_222",Ew="_featuresSection_qu28c_230",Oe={container:rw,header:sw,subtitle:aw,error:lw,healthSection:iw,statusBadge:ow,statusDot:cw,stats:uw,stat:dw,statLabel:mw,statValue:fw,timestamp:hw,pipelinesSection:pw,pipelinesList:xw,pipelineItem:gw,pipelineHeader:yw,pipelineId:vw,pipelineStatus:jw,pipelineProgress:ww,progressBar:Nw,progressFill:bw,progressText:Sw,pipelinePackages:kw,featuresSection:Ew};function Cw(){const[r,s]=w.useState(null),[l,i]=w.useState([]),[c,d]=w.useState(!0),[m,p]=w.useState(null);return w.useEffect(()=>{const h=async()=>{try{d(!0);const v=await js.getHealth();v.success&&s(v.data);const y=await js.getPipelines(void 0,5);y.success&&i(y.data.pipelines||[]),p(null)}catch(v){p(v instanceof Error?v.message:"Failed to fetch release status")}finally{d(!1)}};h();const g=setInterval(h,1e4);return()=>clearInterval(g)},[]),c&&!r?t.jsx("div",{className:Oe.container,children:t.jsx("p",{children:"Loading release system status..."})}):t.jsxs("div",{className:Oe.container,children:[t.jsxs("div",{className:Oe.header,children:[t.jsx("h3",{children:"🚀 Independent Release Engine"}),t.jsx("p",{className:Oe.subtitle,children:"New release system (independent of Changesets)"})]}),m&&t.jsxs("div",{className:Oe.error,children:["Error: ",m]}),r&&t.jsxs("div",{className:Oe.healthSection,children:[t.jsxs("div",{className:Oe.statusBadge,children:[t.jsx("span",{className:Oe.statusDot,"data-status":r.status}),t.jsxs("span",{children:["System Status: ",t.jsx("strong",{children:r.status})]})]}),t.jsxs("div",{className:Oe.stats,children:[t.jsxs("div",{className:Oe.stat,children:[t.jsx("span",{className:Oe.statLabel,children:"Active Pipelines"}),t.jsx("span",{className:Oe.statValue,children:r.activePipelines})]}),t.jsxs("div",{className:Oe.stat,children:[t.jsx("span",{className:Oe.statLabel,children:"Total Pipelines"}),t.jsx("span",{className:Oe.statValue,children:r.totalPipelines})]})]}),r.timestamp&&t.jsxs("p",{className:Oe.timestamp,children:["Last updated: ",new Date(r.timestamp).toLocaleTimeString()]})]}),l.length>0&&t.jsxs("div",{className:Oe.pipelinesSection,children:[t.jsx("h4",{children:"Recent Pipelines"}),t.jsx("div",{className:Oe.pipelinesList,children:l.map(h=>t.jsxs("div",{className:Oe.pipelineItem,children:[t.jsxs("div",{className:Oe.pipelineHeader,children:[t.jsx("span",{className:Oe.pipelineId,children:h.pipelineId}),t.jsx("span",{className:Oe.pipelineStatus,"data-status":h.status,children:h.status})]}),t.jsxs("div",{className:Oe.pipelineProgress,children:[t.jsx("div",{className:Oe.progressBar,children:t.jsx("div",{className:Oe.progressFill,style:{width:`${h.progress}%`}})}),t.jsxs("span",{className:Oe.progressText,children:[h.progress,"%"]})]}),t.jsxs("p",{className:Oe.pipelinePackages,children:["Packages: ",h.packagesToPublish?.join(", ")||"None"]})]},h.pipelineId))})]}),t.jsxs("div",{className:Oe.featuresSection,children:[t.jsx("h4",{children:"Key Features"}),t.jsxs("ul",{children:[t.jsx("li",{children:"✅ Independent of @changesets/cli"}),t.jsx("li",{children:"✅ Git-based change detection (Conventional Commits)"}),t.jsx("li",{children:"✅ Internal semantic versioning (SemVer)"}),t.jsx("li",{children:"✅ Direct npm publishing (no CLI dependency)"}),t.jsx("li",{children:"✅ Hybrid execution (Node.js + GitHub Actions)"}),t.jsx("li",{children:"✅ Encrypted token handling"}),t.jsx("li",{children:"✅ Full audit logging"})]})]})]})}const _w="_container_9usjn_5",Tw="_header_9usjn_11",Rw="_error_9usjn_30",Aw="_warning_9usjn_40",Pw="_content_9usjn_50",Lw="_section_9usjn_55",Ow="_packageList_9usjn_70",Iw="_packageItem_9usjn_76",Mw="_packageName_9usjn_104",Dw="_packageVersion_9usjn_110",Fw="_button_9usjn_116",Uw="_publishButton_9usjn_140",Bw="_options_9usjn_150",zw="_option_9usjn_150",Hw="_readinessResults_9usjn_171",$w="_readinessItem_9usjn_177",Vw="_ready_9usjn_184",Ww="_notReady_9usjn_189",Gw="_readinessHeader_9usjn_194",Kw="_readinessStatus_9usjn_202",qw="_readinessName_9usjn_206",Yw="_readinessBlockers_9usjn_210",Qw="_readinessWarnings_9usjn_243",Fe={container:_w,header:Tw,error:Rw,warning:Aw,content:Pw,section:Lw,packageList:Ow,packageItem:Iw,packageName:Mw,packageVersion:Dw,button:Fw,publishButton:Uw,options:Bw,option:zw,readinessResults:Hw,readinessItem:$w,ready:Vw,notReady:Ww,readinessHeader:Gw,readinessStatus:Kw,readinessName:qw,readinessBlockers:Yw,readinessWarnings:Qw};function Jw(){const[r,s]=w.useState([]),[l,i]=w.useState([]),[c,d]=w.useState(null),[m,p]=w.useState(!0),[h,g]=w.useState(!1),[v,y]=w.useState(null),[C,F]=w.useState(!0);w.useEffect(()=>{N()},[]);const N=async()=>{try{p(!0);const P=await we.get(Te.PUBLISH.PACKAGES);P.success&&(s(P.data.packages||[]),y(null))}catch(P){y(P instanceof Error?P.message:"Failed to fetch packages")}finally{p(!1)}},_=P=>{i(W=>W.includes(P)?W.filter(ae=>ae!==P):[...W,P])},b=async()=>{if(l.length===0){y("Please select at least one package");return}try{p(!0);const P=l.reduce((ae,z)=>{const oe=r.find(xe=>xe.name===z);return oe&&(ae[z]=oe.path),ae},{}),W=await js.checkReadiness(l,P);W.success?(d(W.data.checks||[]),y(null)):y(W.error?.message||"Failed to check readiness")}catch(P){y(P instanceof Error?P.message:"Failed to check readiness")}finally{p(!1)}},U=async()=>{if(l.length===0){y("Please select at least one package");return}try{g(!0);const P=l.reduce((ae,z)=>{const oe=r.find(xe=>xe.name===z);return oe&&(ae[z]=oe.path),ae},{}),W=await js.startPublish(l,P,{method:"node",dryRun:C,autoTag:!0,createReleases:!1});W.success?(y(null),i([]),d(null),alert(C?`✅ Dry-run successful for ${l.length} package(s)`:`✅ Publishing started for ${l.length} package(s)
20
+ Pipeline ID: ${W.data.pipelineId}`)):y(W.error?.message||"Failed to start publish")}catch(P){y(P instanceof Error?P.message:"Failed to start publish")}finally{g(!1)}},R=c?.filter(P=>l.includes(P.packageName)),M=R?.every(P=>P.isReady)??!1;return t.jsxs("div",{className:Fe.container,children:[t.jsxs("div",{className:Fe.header,children:[t.jsx("h1",{children:"🚀 Independent Release Manager"}),t.jsx("p",{children:"New release system independent of Changesets"})]}),t.jsx(Cw,{}),v&&t.jsx("div",{className:Fe.error,children:v}),t.jsxs("div",{className:Fe.content,children:[t.jsxs("div",{className:Fe.section,children:[t.jsx("h2",{children:"Step 1: Select Packages"}),m&&!r.length?t.jsx("p",{children:"Loading packages..."}):r.length===0?t.jsx("p",{children:"No packages found"}):t.jsx("div",{className:Fe.packageList,children:r.map(P=>t.jsxs("label",{className:Fe.packageItem,children:[t.jsx("input",{type:"checkbox",checked:l.includes(P.name),onChange:()=>_(P.name)}),t.jsx("span",{className:Fe.packageName,children:P.name}),t.jsxs("span",{className:Fe.packageVersion,children:["v",P.version]})]},P.name))})]}),t.jsxs("div",{className:Fe.section,children:[t.jsx("h2",{children:"Step 2: Check Readiness"}),t.jsx("button",{onClick:b,disabled:l.length===0||m,className:Fe.button,children:"Check Readiness"}),R&&R.length>0&&t.jsx("div",{className:Fe.readinessResults,children:R.map(P=>t.jsxs("div",{className:`${Fe.readinessItem} ${P.isReady?Fe.ready:Fe.notReady}`,children:[t.jsxs("div",{className:Fe.readinessHeader,children:[t.jsx("span",{className:Fe.readinessStatus,children:P.isReady?"✅":"❌"}),t.jsx("span",{className:Fe.readinessName,children:P.packageName})]}),P.blockers.length>0&&t.jsxs("div",{className:Fe.readinessBlockers,children:[t.jsx("strong",{children:"Blockers:"}),t.jsx("ul",{children:P.blockers.map((W,ae)=>t.jsx("li",{children:W},ae))})]}),P.warnings.length>0&&t.jsxs("div",{className:Fe.readinessWarnings,children:[t.jsx("strong",{children:"Warnings:"}),t.jsx("ul",{children:P.warnings.map((W,ae)=>t.jsx("li",{children:W},ae))})]})]},P.packageName))})]}),t.jsxs("div",{className:Fe.section,children:[t.jsx("h2",{children:"Step 3: Publish Packages"}),t.jsx("div",{className:Fe.options,children:t.jsxs("label",{className:Fe.option,children:[t.jsx("input",{type:"checkbox",checked:C,onChange:P=>F(P.target.checked)}),t.jsx("span",{children:"Dry-run (test without publishing)"})]})}),t.jsx("button",{onClick:U,disabled:l.length===0||h||!M,className:`${Fe.button} ${Fe.publishButton}`,children:h?"Publishing...":C?"Test Publish (Dry-run)":"Publish to npm"}),l.length>0&&!M&&!C&&t.jsx("div",{className:Fe.warning,children:"⚠️ Some packages are not ready. Run dry-run first or fix blockers."})]})]})]})}const Xw={Dashboard:Rv,PackagesOverview:Av,PackageDetail:Pv,DependencyGraph:Zv,HealthStatus:e1,PublishControl:m1,CIIntegration:T1,ConfigInspector:i2,ReleaseManager:x2,Pipeline:nw,IndependentReleaseManagerPage:Jw},Zw=({componentName:r})=>{const s=Xw[r];return s?t.jsx(s,{}):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 eN(){return t.jsxs(Of,{children:[If.map(r=>t.jsx(gs,{path:r.path,element:t.jsx(Zw,{componentName:r.component})},r.path)),t.jsx(gs,{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 tN=w.createContext(void 0);function nN({children:r}){const[s,l]=w.useState(new Map),[i,c]=w.useState(!1),[d,m]=w.useState(null),p=(F,N)=>`${F}/${N}`,h=w.useCallback(async(F,N,_)=>{try{c(!0),m(null);const b=p(N,_);if(s.has(b))return s.get(b)||null;const U=await we.get(`/permissions/${N}/${_}`);if(!U.success)throw U.error.status===401?new Error(Ce.AUTHENTICATION_ERROR):new Error(Ce.FAILED_TO_CHECK_PERMISSION);const R=U.data,M={permission:R.permission,role:R.role,canAdmin:R.canAdmin,canMaintain:R.canMaintain,canWrite:R.canWrite,canRead:R.canRead,denied:R.denied};return l(P=>{const W=new Map(P);return W.set(b,M),W}),M}catch(b){const U=b instanceof Error?b.message:"Permission check failed";return m(U),null}finally{c(!1)}},[s]),g=w.useCallback(async(F,N,_,b)=>{try{c(!0),m(null);const U=await we.post(`/permissions/${N}/${_}/can-action`,{action:b});if(!U.success)throw new Error(Ce.FAILED_TO_CHECK_ACTION_PERMISSION);return U.data.can===!0}catch(U){return console.error("Action permission check error:",U),!1}finally{c(!1)}},[]),v=w.useCallback((F,N)=>{const _=p(F,N);l(b=>{const U=new Map(b);return U.delete(_),U})},[]),y=w.useCallback(()=>{l(new Map)},[]),C={permissions:s,isLoading:i,error:d,checkPermission:h,canPerformAction:g,invalidatePermission:v,invalidateAll:y};return t.jsx(tN.Provider,{value:C,children:r})}function rN(){const{login:r,isLoading:s,error:l}=Br(),[i,c]=w.useState(!1),d=async()=>{c(!0),await r()};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"}),l&&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:l}),t.jsxs("button",{onClick:d,disabled:s||i,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(Yx,{}),"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 sN(){const r=Ac(),[s,l]=w.useState(!0),[i,c]=w.useState(null);return w.useEffect(()=>{(async()=>{try{const m=new URLSearchParams(window.location.search),p=m.get("code"),h=m.get("state"),g=m.get("error"),v=m.get("error_description");if(g){c(`${g}: ${v}`),l(!1);return}if(!p||!h){c("Missing authorization code or state"),l(!1);return}const y=await we.get(Te.AUTH.CALLBACK+`?code=${p}&state=${h}`);if(!y.success){c(y.error?.message||"Authentication failed"),l(!1);return}const C=y.data;if(!C.success||!C.sessionToken){c(Ce.AUTHENTICATION_ERROR),l(!1);return}const F=window.__authContext;if(F&&F.handleOAuthCallback)if(await F.handleOAuthCallback(C.sessionToken,C.permission)){const _=C.redirectUrl||"/";r(_)}else c(Ce.AUTHENTICATION_ERROR);else c(Ce.AUTHENTICATION_ERROR)}catch(m){const p=m instanceof Error?m.message:Ce.UNKNOWN_ERROR;c(p)}finally{l(!1)}})()},[r]),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:s?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."})]}):i?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"text-5xl mb-5",children:"Warning!"}),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:i}),t.jsx("button",{onClick:()=>r("/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 aN({message:r="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:r})]})}function lN({children:r}){const{isAuthenticated:s,isLoading:l}=Br();return l?t.jsx(aN,{}):s?t.jsx(t.Fragment,{children:r}):t.jsx(vx,{to:"/login",replace:!0})}function iN(){return t.jsx(Cx,{children:t.jsx(Ly,{children:t.jsx(nN,{children:t.jsxs(Of,{children:[t.jsx(gs,{path:"/login",element:t.jsx(rN,{})}),t.jsx(gs,{path:"/auth/callback",element:t.jsx(sN,{})}),t.jsx(gs,{path:"/*",element:t.jsx(lN,{children:t.jsx(Oy,{children:t.jsx(eN,{})})})})]})})})})}const Nf=document.getElementById("root");Nf&&E0.createRoot(Nf).render(t.jsx(iN,{}));