assuremind 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +254 -0
- package/LICENSE +21 -0
- package/README.md +367 -0
- package/dist/cli/index.js +14933 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.mts +2950 -0
- package/dist/index.d.ts +2950 -0
- package/dist/index.js +1628 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1525 -0
- package/dist/index.mjs.map +1 -0
- package/docs/CLI-REFERENCE.md +312 -0
- package/docs/GETTING-STARTED.md +378 -0
- package/docs/STUDIO.md +390 -0
- package/package.json +118 -0
- package/templates/AUTOMIND.md +275 -0
- package/templates/autotest.config.ts +25 -0
- package/templates/docs/CLI-REFERENCE.md +413 -0
- package/templates/docs/GETTING-STARTED.md +417 -0
- package/templates/docs/STUDIO.md +625 -0
- package/templates/env.example +112 -0
- package/templates/env.minimal +103 -0
- package/templates/gitignore +17 -0
- package/templates/global-variables.json +5 -0
- package/ui/dist/assets/index-CdtAorWT.js +819 -0
- package/ui/dist/assets/index-KjpMCzao.css +1 -0
- package/ui/dist/favicon.svg +36 -0
- package/ui/dist/index.html +15 -0
|
@@ -0,0 +1,819 @@
|
|
|
1
|
+
var km=e=>{throw TypeError(e)};var Pc=(e,t,s)=>t.has(e)||km("Cannot "+s);var k=(e,t,s)=>(Pc(e,t,"read from private field"),s?s.call(e):t.get(e)),Z=(e,t,s)=>t.has(e)?km("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),V=(e,t,s,r)=>(Pc(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),le=(e,t,s)=>(Pc(e,t,"access private method"),s);var vl=(e,t,s,r)=>({set _(a){V(e,t,a,s)},get _(){return k(e,t,r)}});function By(e,t){for(var s=0;s<t.length;s++){const r=t[s];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();function Hy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ff={exports:{}},Go={},If={exports:{}},me={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var ol=Symbol.for("react.element"),qy=Symbol.for("react.portal"),Ky=Symbol.for("react.fragment"),Wy=Symbol.for("react.strict_mode"),Vy=Symbol.for("react.profiler"),Qy=Symbol.for("react.provider"),Gy=Symbol.for("react.context"),Yy=Symbol.for("react.forward_ref"),Jy=Symbol.for("react.suspense"),Xy=Symbol.for("react.memo"),Zy=Symbol.for("react.lazy"),Sm=Symbol.iterator;function eb(e){return e===null||typeof e!="object"?null:(e=Sm&&e[Sm]||e["@@iterator"],typeof e=="function"?e:null)}var _f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$f=Object.assign,Uf={};function _a(e,t,s){this.props=e,this.context=t,this.refs=Uf,this.updater=s||_f}_a.prototype.isReactComponent={};_a.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bf(){}Bf.prototype=_a.prototype;function rx(e,t,s){this.props=e,this.context=t,this.refs=Uf,this.updater=s||_f}var ax=rx.prototype=new Bf;ax.constructor=rx;$f(ax,_a.prototype);ax.isPureReactComponent=!0;var Cm=Array.isArray,Hf=Object.prototype.hasOwnProperty,ix={current:null},qf={key:!0,ref:!0,__self:!0,__source:!0};function Kf(e,t,s){var r,a={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Hf.call(t,r)&&!qf.hasOwnProperty(r)&&(a[r]=t[r]);var o=arguments.length-2;if(o===1)a.children=s;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)a[r]===void 0&&(a[r]=o[r]);return{$$typeof:ol,type:e,key:i,ref:l,props:a,_owner:ix.current}}function tb(e,t){return{$$typeof:ol,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function lx(e){return typeof e=="object"&&e!==null&&e.$$typeof===ol}function nb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(s){return t[s]})}var Em=/\/+/g;function zc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nb(""+e.key):t.toString(36)}function Ql(e,t,s,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case ol:case qy:l=!0}}if(l)return l=e,a=a(l),e=r===""?"."+zc(l,0):r,Cm(a)?(s="",e!=null&&(s=e.replace(Em,"$&/")+"/"),Ql(a,t,s,"",function(u){return u})):a!=null&&(lx(a)&&(a=tb(a,s+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(Em,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=r===""?".":r+":",Cm(e))for(var o=0;o<e.length;o++){i=e[o];var c=r+zc(i,o);l+=Ql(i,t,s,c,a)}else if(c=eb(e),typeof c=="function")for(e=c.call(e),o=0;!(i=e.next()).done;)i=i.value,c=r+zc(i,o++),l+=Ql(i,t,s,c,a);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function jl(e,t,s){if(e==null)return e;var r=[],a=0;return Ql(e,r,"","",function(i){return t.call(s,i,a++)}),r}function sb(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s)},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var vt={current:null},Gl={transition:null},rb={ReactCurrentDispatcher:vt,ReactCurrentBatchConfig:Gl,ReactCurrentOwner:ix};function Wf(){throw Error("act(...) is not supported in production builds of React.")}me.Children={map:jl,forEach:function(e,t,s){jl(e,function(){t.apply(this,arguments)},s)},count:function(e){var t=0;return jl(e,function(){t++}),t},toArray:function(e){return jl(e,function(t){return t})||[]},only:function(e){if(!lx(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Component=_a;me.Fragment=Ky;me.Profiler=Vy;me.PureComponent=rx;me.StrictMode=Wy;me.Suspense=Jy;me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rb;me.act=Wf;me.cloneElement=function(e,t,s){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=$f({},e.props),a=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=ix.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)Hf.call(t,c)&&!qf.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=s;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:ol,type:e.type,key:a,ref:i,props:r,_owner:l}};me.createContext=function(e){return e={$$typeof:Gy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Qy,_context:e},e.Consumer=e};me.createElement=Kf;me.createFactory=function(e){var t=Kf.bind(null,e);return t.type=e,t};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:Yy,render:e}};me.isValidElement=lx;me.lazy=function(e){return{$$typeof:Zy,_payload:{_status:-1,_result:e},_init:sb}};me.memo=function(e,t){return{$$typeof:Xy,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=Gl.transition;Gl.transition={};try{e()}finally{Gl.transition=t}};me.unstable_act=Wf;me.useCallback=function(e,t){return vt.current.useCallback(e,t)};me.useContext=function(e){return vt.current.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e){return vt.current.useDeferredValue(e)};me.useEffect=function(e,t){return vt.current.useEffect(e,t)};me.useId=function(){return vt.current.useId()};me.useImperativeHandle=function(e,t,s){return vt.current.useImperativeHandle(e,t,s)};me.useInsertionEffect=function(e,t){return vt.current.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return vt.current.useLayoutEffect(e,t)};me.useMemo=function(e,t){return vt.current.useMemo(e,t)};me.useReducer=function(e,t,s){return vt.current.useReducer(e,t,s)};me.useRef=function(e){return vt.current.useRef(e)};me.useState=function(e){return vt.current.useState(e)};me.useSyncExternalStore=function(e,t,s){return vt.current.useSyncExternalStore(e,t,s)};me.useTransition=function(){return vt.current.useTransition()};me.version="18.3.1";If.exports=me;var m=If.exports;const ab=Hy(m),ib=By({__proto__:null,default:ab},[m]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var lb=m,ob=Symbol.for("react.element"),cb=Symbol.for("react.fragment"),db=Object.prototype.hasOwnProperty,ub=lb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xb={key:!0,ref:!0,__self:!0,__source:!0};function Vf(e,t,s){var r,a={},i=null,l=null;s!==void 0&&(i=""+s),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)db.call(t,r)&&!xb.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:ob,type:e,key:i,ref:l,props:a,_owner:ub.current}}Go.Fragment=cb;Go.jsx=Vf;Go.jsxs=Vf;Ff.exports=Go;var n=Ff.exports,Qf={exports:{}},_t={},Gf={exports:{}},Yf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(E,K){var M=E.length;E.push(K);e:for(;0<M;){var W=M-1>>>1,L=E[W];if(0<a(L,K))E[W]=K,E[M]=L,M=W;else break e}}function s(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var K=E[0],M=E.pop();if(M!==K){E[0]=M;e:for(var W=0,L=E.length,te=L>>>1;W<te;){var B=2*(W+1)-1,de=E[B],xe=B+1,ue=E[xe];if(0>a(de,M))xe<L&&0>a(ue,de)?(E[W]=ue,E[xe]=M,W=xe):(E[W]=de,E[B]=M,W=B);else if(xe<L&&0>a(ue,M))E[W]=ue,E[xe]=M,W=xe;else break e}}return K}function a(E,K){var M=E.sortIndex-K.sortIndex;return M!==0?M:E.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],u=[],x=1,f=null,g=3,v=!1,y=!1,j=!1,w=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(E){for(var K=s(u);K!==null;){if(K.callback===null)r(u);else if(K.startTime<=E)r(u),K.sortIndex=K.expirationTime,t(c,K);else break;K=s(u)}}function b(E){if(j=!1,p(E),!y)if(s(c)!==null)y=!0,ee(N);else{var K=s(u);K!==null&&ae(b,K.startTime-E)}}function N(E,K){y=!1,j&&(j=!1,h(P),P=-1),v=!0;var M=g;try{for(p(K),f=s(c);f!==null&&(!(f.expirationTime>K)||E&&!G());){var W=f.callback;if(typeof W=="function"){f.callback=null,g=f.priorityLevel;var L=W(f.expirationTime<=K);K=e.unstable_now(),typeof L=="function"?f.callback=L:f===s(c)&&r(c),p(K)}else r(c);f=s(c)}if(f!==null)var te=!0;else{var B=s(u);B!==null&&ae(b,B.startTime-K),te=!1}return te}finally{f=null,g=M,v=!1}}var C=!1,R=null,P=-1,_=5,D=-1;function G(){return!(e.unstable_now()-D<_)}function J(){if(R!==null){var E=e.unstable_now();D=E;var K=!0;try{K=R(!0,E)}finally{K?ne():(C=!1,R=null)}}else C=!1}var ne;if(typeof d=="function")ne=function(){d(J)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,I=z.port2;z.port1.onmessage=J,ne=function(){I.postMessage(null)}}else ne=function(){w(J,0)};function ee(E){R=E,C||(C=!0,ne())}function ae(E,K){P=w(function(){E(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){y||v||(y=!0,ee(N))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return s(c)},e.unstable_next=function(E){switch(g){case 1:case 2:case 3:var K=3;break;default:K=g}var M=g;g=K;try{return E()}finally{g=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,K){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var M=g;g=E;try{return K()}finally{g=M}},e.unstable_scheduleCallback=function(E,K,M){var W=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?W+M:W):M=W,E){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=M+L,E={id:x++,callback:K,priorityLevel:E,startTime:M,expirationTime:L,sortIndex:-1},M>W?(E.sortIndex=M,t(u,E),s(c)===null&&E===s(u)&&(j?(h(P),P=-1):j=!0,ae(b,M-W))):(E.sortIndex=L,t(c,E),y||v||(y=!0,ee(N))),E},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(E){var K=g;return function(){var M=g;g=K;try{return E.apply(this,arguments)}finally{g=M}}}})(Yf);Gf.exports=Yf;var mb=Gf.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var hb=m,It=mb;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Jf=new Set,Pi={};function zr(e,t){Pa(e,t),Pa(e+"Capture",t)}function Pa(e,t){for(Pi[e]=t,e=0;e<t.length;e++)Jf.add(t[e])}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pd=Object.prototype.hasOwnProperty,fb=/^[: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]*$/,Pm={},zm={};function pb(e){return Pd.call(zm,e)?!0:Pd.call(Pm,e)?!1:fb.test(e)?zm[e]=!0:(Pm[e]=!0,!1)}function gb(e,t,s,r){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function yb(e,t,s,r){if(t===null||typeof t>"u"||gb(e,t,s,r))return!0;if(r)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jt(e,t,s,r,a,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rt[e]=new jt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rt[t]=new jt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rt[e]=new jt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rt[e]=new jt(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){rt[e]=new jt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rt[e]=new jt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rt[e]=new jt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rt[e]=new jt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rt[e]=new jt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ox=/[\-:]([a-z])/g;function cx(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ox,cx);rt[t]=new jt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ox,cx);rt[t]=new jt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ox,cx);rt[t]=new jt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rt[e]=new jt(e,1,!1,e.toLowerCase(),null,!1,!1)});rt.xlinkHref=new jt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rt[e]=new jt(e,1,!1,e.toLowerCase(),null,!0,!0)});function dx(e,t,s,r){var a=rt.hasOwnProperty(t)?rt[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yb(t,s,a,r)&&(s=null),r||a===null?pb(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):a.mustUseProperty?e[a.propertyName]=s===null?a.type===3?!1:"":s:(t=a.attributeName,r=a.attributeNamespace,s===null?e.removeAttribute(t):(a=a.type,s=a===3||a===4&&s===!0?"":""+s,r?e.setAttributeNS(r,t,s):e.setAttribute(t,s))))}var Zn=hb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Nl=Symbol.for("react.element"),Gr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),ux=Symbol.for("react.strict_mode"),zd=Symbol.for("react.profiler"),Xf=Symbol.for("react.provider"),Zf=Symbol.for("react.context"),xx=Symbol.for("react.forward_ref"),Md=Symbol.for("react.suspense"),Td=Symbol.for("react.suspense_list"),mx=Symbol.for("react.memo"),ls=Symbol.for("react.lazy"),ep=Symbol.for("react.offscreen"),Mm=Symbol.iterator;function Va(e){return e===null||typeof e!="object"?null:(e=Mm&&e[Mm]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Object.assign,Mc;function ui(e){if(Mc===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Mc=t&&t[1]||""}return`
|
|
34
|
+
`+Mc+e}var Tc=!1;function Rc(e,t){if(!e||Tc)return"";Tc=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var a=u.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),l=a.length-1,o=i.length-1;1<=l&&0<=o&&a[l]!==i[o];)o--;for(;1<=l&&0<=o;l--,o--)if(a[l]!==i[o]){if(l!==1||o!==1)do if(l--,o--,0>o||a[l]!==i[o]){var c=`
|
|
37
|
+
`+a[l].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=l&&0<=o);break}}}finally{Tc=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?ui(e):""}function bb(e){switch(e.tag){case 5:return ui(e.type);case 16:return ui("Lazy");case 13:return ui("Suspense");case 19:return ui("SuspenseList");case 0:case 2:case 15:return e=Rc(e.type,!1),e;case 11:return e=Rc(e.type.render,!1),e;case 1:return e=Rc(e.type,!0),e;default:return""}}function Rd(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 Yr:return"Fragment";case Gr:return"Portal";case zd:return"Profiler";case ux:return"StrictMode";case Md:return"Suspense";case Td:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zf:return(e.displayName||"Context")+".Consumer";case Xf:return(e._context.displayName||"Context")+".Provider";case xx:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mx:return t=e.displayName||null,t!==null?t:Rd(e.type)||"Memo";case ls:t=e._payload,e=e._init;try{return Rd(e(t))}catch{}}return null}function vb(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rd(t);case 8:return t===ux?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function As(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jb(e){var t=tp(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var a=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wl(e){e._valueTracker||(e._valueTracker=jb(e))}function np(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),r="";return e&&(r=tp(e)?e.checked?"true":"false":e.value),e=r,e!==s?(t.setValue(e),!0):!1}function uo(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 Od(e,t){var s=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Tm(e,t){var s=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;s=As(t.value!=null?t.value:s),e._wrapperState={initialChecked:r,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sp(e,t){t=t.checked,t!=null&&dx(e,"checked",t,!1)}function Dd(e,t){sp(e,t);var s=As(t.value),r=t.type;if(s!=null)r==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ld(e,t.type,s):t.hasOwnProperty("defaultValue")&&Ld(e,t.type,As(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rm(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Ld(e,t,s){(t!=="number"||uo(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var xi=Array.isArray;function ca(e,t,s,r){if(e=e.options,t){t={};for(var a=0;a<s.length;a++)t["$"+s[a]]=!0;for(s=0;s<e.length;s++)a=t.hasOwnProperty("$"+e[s].value),e[s].selected!==a&&(e[s].selected=a),a&&r&&(e[s].defaultSelected=!0)}else{for(s=""+As(s),t=null,a=0;a<e.length;a++){if(e[a].value===s){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Ad(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Om(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(U(92));if(xi(s)){if(1<s.length)throw Error(U(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:As(s)}}function rp(e,t){var s=As(t.value),r=As(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),r!=null&&(e.defaultValue=""+r)}function Dm(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ap(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 Fd(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ap(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var kl,ip=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,s,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(kl=kl||document.createElement("div"),kl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=kl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zi(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var bi={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},Nb=["Webkit","ms","Moz","O"];Object.keys(bi).forEach(function(e){Nb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bi[t]=bi[e]})});function lp(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||bi.hasOwnProperty(e)&&bi[e]?(""+t).trim():t+"px"}function op(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var r=s.indexOf("--")===0,a=lp(s,t[s],r);s==="float"&&(s="cssFloat"),r?e.setProperty(s,a):e[s]=a}}var wb=Le({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 Id(e,t){if(t){if(wb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function _d(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $d=null;function hx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ud=null,da=null,ua=null;function Lm(e){if(e=ul(e)){if(typeof Ud!="function")throw Error(U(280));var t=e.stateNode;t&&(t=ec(t),Ud(e.stateNode,e.type,t))}}function cp(e){da?ua?ua.push(e):ua=[e]:da=e}function dp(){if(da){var e=da,t=ua;if(ua=da=null,Lm(e),t)for(e=0;e<t.length;e++)Lm(t[e])}}function up(e,t){return e(t)}function xp(){}var Oc=!1;function mp(e,t,s){if(Oc)return e(t,s);Oc=!0;try{return up(e,t,s)}finally{Oc=!1,(da!==null||ua!==null)&&(xp(),dp())}}function Mi(e,t){var s=e.stateNode;if(s===null)return null;var r=ec(s);if(r===null)return null;s=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(U(231,t,typeof s));return s}var Bd=!1;if(Vn)try{var Qa={};Object.defineProperty(Qa,"passive",{get:function(){Bd=!0}}),window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{Bd=!1}function kb(e,t,s,r,a,i,l,o,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(s,u)}catch(x){this.onError(x)}}var vi=!1,xo=null,mo=!1,Hd=null,Sb={onError:function(e){vi=!0,xo=e}};function Cb(e,t,s,r,a,i,l,o,c){vi=!1,xo=null,kb.apply(Sb,arguments)}function Eb(e,t,s,r,a,i,l,o,c){if(Cb.apply(this,arguments),vi){if(vi){var u=xo;vi=!1,xo=null}else throw Error(U(198));mo||(mo=!0,Hd=u)}}function Mr(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function hp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Am(e){if(Mr(e)!==e)throw Error(U(188))}function Pb(e){var t=e.alternate;if(!t){if(t=Mr(e),t===null)throw Error(U(188));return t!==e?null:e}for(var s=e,r=t;;){var a=s.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){s=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===s)return Am(a),e;if(i===r)return Am(a),t;i=i.sibling}throw Error(U(188))}if(s.return!==r.return)s=a,r=i;else{for(var l=!1,o=a.child;o;){if(o===s){l=!0,s=a,r=i;break}if(o===r){l=!0,r=a,s=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===s){l=!0,s=i,r=a;break}if(o===r){l=!0,r=i,s=a;break}o=o.sibling}if(!l)throw Error(U(189))}}if(s.alternate!==r)throw Error(U(190))}if(s.tag!==3)throw Error(U(188));return s.stateNode.current===s?e:t}function fp(e){return e=Pb(e),e!==null?pp(e):null}function pp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=pp(e);if(t!==null)return t;e=e.sibling}return null}var gp=It.unstable_scheduleCallback,Fm=It.unstable_cancelCallback,zb=It.unstable_shouldYield,Mb=It.unstable_requestPaint,$e=It.unstable_now,Tb=It.unstable_getCurrentPriorityLevel,fx=It.unstable_ImmediatePriority,yp=It.unstable_UserBlockingPriority,ho=It.unstable_NormalPriority,Rb=It.unstable_LowPriority,bp=It.unstable_IdlePriority,Yo=null,wn=null;function Ob(e){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(Yo,e,void 0,(e.current.flags&128)===128)}catch{}}var un=Math.clz32?Math.clz32:Ab,Db=Math.log,Lb=Math.LN2;function Ab(e){return e>>>=0,e===0?32:31-(Db(e)/Lb|0)|0}var Sl=64,Cl=4194304;function mi(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 fo(e,t){var s=e.pendingLanes;if(s===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,l=s&268435455;if(l!==0){var o=l&~a;o!==0?r=mi(o):(i&=l,i!==0&&(r=mi(i)))}else l=s&~a,l!==0?r=mi(l):i!==0&&(r=mi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(r&4&&(r|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)s=31-un(t),a=1<<s,r|=e[s],t&=~a;return r}function Fb(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ib(e,t){for(var s=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-un(i),o=1<<l,c=a[l];c===-1?(!(o&s)||o&r)&&(a[l]=Fb(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}}function qd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vp(){var e=Sl;return Sl<<=1,!(Sl&4194240)&&(Sl=64),e}function Dc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function cl(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-un(t),e[t]=s}function _b(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<s;){var a=31-un(s),i=1<<a;t[a]=0,r[a]=-1,e[a]=-1,s&=~i}}function px(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var r=31-un(s),a=1<<r;a&t|e[r]&t&&(e[r]|=t),s&=~a}}var we=0;function jp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Np,gx,wp,kp,Sp,Kd=!1,El=[],Cs=null,Es=null,Ps=null,Ti=new Map,Ri=new Map,us=[],$b="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 Im(e,t){switch(e){case"focusin":case"focusout":Cs=null;break;case"dragenter":case"dragleave":Es=null;break;case"mouseover":case"mouseout":Ps=null;break;case"pointerover":case"pointerout":Ti.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ri.delete(t.pointerId)}}function Ga(e,t,s,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:s,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=ul(t),t!==null&&gx(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Ub(e,t,s,r,a){switch(t){case"focusin":return Cs=Ga(Cs,e,t,s,r,a),!0;case"dragenter":return Es=Ga(Es,e,t,s,r,a),!0;case"mouseover":return Ps=Ga(Ps,e,t,s,r,a),!0;case"pointerover":var i=a.pointerId;return Ti.set(i,Ga(Ti.get(i)||null,e,t,s,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Ri.set(i,Ga(Ri.get(i)||null,e,t,s,r,a)),!0}return!1}function Cp(e){var t=tr(e.target);if(t!==null){var s=Mr(t);if(s!==null){if(t=s.tag,t===13){if(t=hp(s),t!==null){e.blockedOn=t,Sp(e.priority,function(){wp(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=Wd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var r=new s.constructor(s.type,s);$d=r,s.target.dispatchEvent(r),$d=null}else return t=ul(s),t!==null&&gx(t),e.blockedOn=s,!1;t.shift()}return!0}function _m(e,t,s){Yl(e)&&s.delete(t)}function Bb(){Kd=!1,Cs!==null&&Yl(Cs)&&(Cs=null),Es!==null&&Yl(Es)&&(Es=null),Ps!==null&&Yl(Ps)&&(Ps=null),Ti.forEach(_m),Ri.forEach(_m)}function Ya(e,t){e.blockedOn===t&&(e.blockedOn=null,Kd||(Kd=!0,It.unstable_scheduleCallback(It.unstable_NormalPriority,Bb)))}function Oi(e){function t(a){return Ya(a,e)}if(0<El.length){Ya(El[0],e);for(var s=1;s<El.length;s++){var r=El[s];r.blockedOn===e&&(r.blockedOn=null)}}for(Cs!==null&&Ya(Cs,e),Es!==null&&Ya(Es,e),Ps!==null&&Ya(Ps,e),Ti.forEach(t),Ri.forEach(t),s=0;s<us.length;s++)r=us[s],r.blockedOn===e&&(r.blockedOn=null);for(;0<us.length&&(s=us[0],s.blockedOn===null);)Cp(s),s.blockedOn===null&&us.shift()}var xa=Zn.ReactCurrentBatchConfig,po=!0;function Hb(e,t,s,r){var a=we,i=xa.transition;xa.transition=null;try{we=1,yx(e,t,s,r)}finally{we=a,xa.transition=i}}function qb(e,t,s,r){var a=we,i=xa.transition;xa.transition=null;try{we=4,yx(e,t,s,r)}finally{we=a,xa.transition=i}}function yx(e,t,s,r){if(po){var a=Wd(e,t,s,r);if(a===null)qc(e,t,r,go,s),Im(e,r);else if(Ub(a,e,t,s,r))r.stopPropagation();else if(Im(e,r),t&4&&-1<$b.indexOf(e)){for(;a!==null;){var i=ul(a);if(i!==null&&Np(i),i=Wd(e,t,s,r),i===null&&qc(e,t,r,go,s),i===a)break;a=i}a!==null&&r.stopPropagation()}else qc(e,t,r,null,s)}}var go=null;function Wd(e,t,s,r){if(go=null,e=hx(r),e=tr(e),e!==null)if(t=Mr(e),t===null)e=null;else if(s=t.tag,s===13){if(e=hp(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return go=e,null}function Ep(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(Tb()){case fx:return 1;case yp:return 4;case ho:case Rb:return 16;case bp:return 536870912;default:return 16}default:return 16}}var ws=null,bx=null,Jl=null;function Pp(){if(Jl)return Jl;var e,t=bx,s=t.length,r,a="value"in ws?ws.value:ws.textContent,i=a.length;for(e=0;e<s&&t[e]===a[e];e++);var l=s-e;for(r=1;r<=l&&t[s-r]===a[i-r];r++);return Jl=a.slice(e,1<r?1-r:void 0)}function Xl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Pl(){return!0}function $m(){return!1}function $t(e){function t(s,r,a,i,l){this._reactName=s,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(s=e[o],this[o]=s?s(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Pl:$m,this.isPropagationStopped=$m,this}return Le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Pl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vx=$t($a),dl=Le({},$a,{view:0,detail:0}),Kb=$t(dl),Lc,Ac,Ja,Jo=Le({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jx,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!==Ja&&(Ja&&e.type==="mousemove"?(Lc=e.screenX-Ja.screenX,Ac=e.screenY-Ja.screenY):Ac=Lc=0,Ja=e),Lc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),Um=$t(Jo),Wb=Le({},Jo,{dataTransfer:0}),Vb=$t(Wb),Qb=Le({},dl,{relatedTarget:0}),Fc=$t(Qb),Gb=Le({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),Yb=$t(Gb),Jb=Le({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xb=$t(Jb),Zb=Le({},$a,{data:0}),Bm=$t(Zb),e1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t1={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"},n1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=n1[e])?!!t[e]:!1}function jx(){return s1}var r1=Le({},dl,{key:function(e){if(e.key){var t=e1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jx,charCode:function(e){return e.type==="keypress"?Xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),a1=$t(r1),i1=Le({},Jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hm=$t(i1),l1=Le({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jx}),o1=$t(l1),c1=Le({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),d1=$t(c1),u1=Le({},Jo,{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}),x1=$t(u1),m1=[9,13,27,32],Nx=Vn&&"CompositionEvent"in window,ji=null;Vn&&"documentMode"in document&&(ji=document.documentMode);var h1=Vn&&"TextEvent"in window&&!ji,zp=Vn&&(!Nx||ji&&8<ji&&11>=ji),qm=" ",Km=!1;function Mp(e,t){switch(e){case"keyup":return m1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jr=!1;function f1(e,t){switch(e){case"compositionend":return Tp(t);case"keypress":return t.which!==32?null:(Km=!0,qm);case"textInput":return e=t.data,e===qm&&Km?null:e;default:return null}}function p1(e,t){if(Jr)return e==="compositionend"||!Nx&&Mp(e,t)?(e=Pp(),Jl=bx=ws=null,Jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zp&&t.locale!=="ko"?null:t.data;default:return null}}var g1={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 Wm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!g1[e.type]:t==="textarea"}function Rp(e,t,s,r){cp(r),t=yo(t,"onChange"),0<t.length&&(s=new vx("onChange","change",null,s,r),e.push({event:s,listeners:t}))}var Ni=null,Di=null;function y1(e){Hp(e,0)}function Xo(e){var t=ea(e);if(np(t))return e}function b1(e,t){if(e==="change")return t}var Op=!1;if(Vn){var Ic;if(Vn){var _c="oninput"in document;if(!_c){var Vm=document.createElement("div");Vm.setAttribute("oninput","return;"),_c=typeof Vm.oninput=="function"}Ic=_c}else Ic=!1;Op=Ic&&(!document.documentMode||9<document.documentMode)}function Qm(){Ni&&(Ni.detachEvent("onpropertychange",Dp),Di=Ni=null)}function Dp(e){if(e.propertyName==="value"&&Xo(Di)){var t=[];Rp(t,Di,e,hx(e)),mp(y1,t)}}function v1(e,t,s){e==="focusin"?(Qm(),Ni=t,Di=s,Ni.attachEvent("onpropertychange",Dp)):e==="focusout"&&Qm()}function j1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xo(Di)}function N1(e,t){if(e==="click")return Xo(t)}function w1(e,t){if(e==="input"||e==="change")return Xo(t)}function k1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:k1;function Li(e,t){if(hn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var a=s[r];if(!Pd.call(t,a)||!hn(e[a],t[a]))return!1}return!0}function Gm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ym(e,t){var s=Gm(e);e=0;for(var r;s;){if(s.nodeType===3){if(r=e+s.textContent.length,e<=t&&r>=t)return{node:s,offset:t-e};e=r}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Gm(s)}}function Lp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ap(){for(var e=window,t=uo();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=uo(e.document)}return t}function wx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function S1(e){var t=Ap(),s=e.focusedElem,r=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&Lp(s.ownerDocument.documentElement,s)){if(r!==null&&wx(s)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=s.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!e.extend&&i>r&&(a=r,r=i,i=a),a=Ym(s,i);var l=Ym(s,r);a&&l&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var C1=Vn&&"documentMode"in document&&11>=document.documentMode,Xr=null,Vd=null,wi=null,Qd=!1;function Jm(e,t,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Qd||Xr==null||Xr!==uo(r)||(r=Xr,"selectionStart"in r&&wx(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wi&&Li(wi,r)||(wi=r,r=yo(Vd,"onSelect"),0<r.length&&(t=new vx("onSelect","select",null,t,s),e.push({event:t,listeners:r}),t.target=Xr)))}function zl(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Zr={animationend:zl("Animation","AnimationEnd"),animationiteration:zl("Animation","AnimationIteration"),animationstart:zl("Animation","AnimationStart"),transitionend:zl("Transition","TransitionEnd")},$c={},Fp={};Vn&&(Fp=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);function Zo(e){if($c[e])return $c[e];if(!Zr[e])return e;var t=Zr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Fp)return $c[e]=t[s];return e}var Ip=Zo("animationend"),_p=Zo("animationiteration"),$p=Zo("animationstart"),Up=Zo("transitionend"),Bp=new Map,Xm="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 _s(e,t){Bp.set(e,t),zr(t,[e])}for(var Uc=0;Uc<Xm.length;Uc++){var Bc=Xm[Uc],E1=Bc.toLowerCase(),P1=Bc[0].toUpperCase()+Bc.slice(1);_s(E1,"on"+P1)}_s(Ip,"onAnimationEnd");_s(_p,"onAnimationIteration");_s($p,"onAnimationStart");_s("dblclick","onDoubleClick");_s("focusin","onFocus");_s("focusout","onBlur");_s(Up,"onTransitionEnd");Pa("onMouseEnter",["mouseout","mouseover"]);Pa("onMouseLeave",["mouseout","mouseover"]);Pa("onPointerEnter",["pointerout","pointerover"]);Pa("onPointerLeave",["pointerout","pointerover"]);zr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zr("onBeforeInput",["compositionend","keypress","textInput","paste"]);zr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),z1=new Set("cancel close invalid load scroll toggle".split(" ").concat(hi));function Zm(e,t,s){var r=e.type||"unknown-event";e.currentTarget=s,Eb(r,t,void 0,e),e.currentTarget=null}function Hp(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var r=e[s],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break e;Zm(a,o,u),i=c}else for(l=0;l<r.length;l++){if(o=r[l],c=o.instance,u=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break e;Zm(a,o,u),i=c}}}if(mo)throw e=Hd,mo=!1,Hd=null,e}function ze(e,t){var s=t[Zd];s===void 0&&(s=t[Zd]=new Set);var r=e+"__bubble";s.has(r)||(qp(t,e,2,!1),s.add(r))}function Hc(e,t,s){var r=0;t&&(r|=4),qp(s,e,r,t)}var Ml="_reactListening"+Math.random().toString(36).slice(2);function Ai(e){if(!e[Ml]){e[Ml]=!0,Jf.forEach(function(s){s!=="selectionchange"&&(z1.has(s)||Hc(s,!1,e),Hc(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ml]||(t[Ml]=!0,Hc("selectionchange",!1,t))}}function qp(e,t,s,r){switch(Ep(t)){case 1:var a=Hb;break;case 4:a=qb;break;default:a=yx}s=a.bind(null,t,s,e),a=void 0,!Bd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,s,{capture:!0,passive:a}):e.addEventListener(t,s,!0):a!==void 0?e.addEventListener(t,s,{passive:a}):e.addEventListener(t,s,!1)}function qc(e,t,s,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(l===4)for(l=r.return;l!==null;){var c=l.tag;if((c===3||c===4)&&(c=l.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;l=l.return}for(;o!==null;){if(l=tr(o),l===null)return;if(c=l.tag,c===5||c===6){r=i=l;continue e}o=o.parentNode}}r=r.return}mp(function(){var u=i,x=hx(s),f=[];e:{var g=Bp.get(e);if(g!==void 0){var v=vx,y=e;switch(e){case"keypress":if(Xl(s)===0)break e;case"keydown":case"keyup":v=a1;break;case"focusin":y="focus",v=Fc;break;case"focusout":y="blur",v=Fc;break;case"beforeblur":case"afterblur":v=Fc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=Um;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=Vb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=o1;break;case Ip:case _p:case $p:v=Yb;break;case Up:v=d1;break;case"scroll":v=Kb;break;case"wheel":v=x1;break;case"copy":case"cut":case"paste":v=Xb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Hm}var j=(t&4)!==0,w=!j&&e==="scroll",h=j?g!==null?g+"Capture":null:g;j=[];for(var d=u,p;d!==null;){p=d;var b=p.stateNode;if(p.tag===5&&b!==null&&(p=b,h!==null&&(b=Mi(d,h),b!=null&&j.push(Fi(d,b,p)))),w)break;d=d.return}0<j.length&&(g=new v(g,y,null,s,x),f.push({event:g,listeners:j}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",g&&s!==$d&&(y=s.relatedTarget||s.fromElement)&&(tr(y)||y[Qn]))break e;if((v||g)&&(g=x.window===x?x:(g=x.ownerDocument)?g.defaultView||g.parentWindow:window,v?(y=s.relatedTarget||s.toElement,v=u,y=y?tr(y):null,y!==null&&(w=Mr(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(v=null,y=u),v!==y)){if(j=Um,b="onMouseLeave",h="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(j=Hm,b="onPointerLeave",h="onPointerEnter",d="pointer"),w=v==null?g:ea(v),p=y==null?g:ea(y),g=new j(b,d+"leave",v,s,x),g.target=w,g.relatedTarget=p,b=null,tr(x)===u&&(j=new j(h,d+"enter",y,s,x),j.target=p,j.relatedTarget=w,b=j),w=b,v&&y)t:{for(j=v,h=y,d=0,p=j;p;p=_r(p))d++;for(p=0,b=h;b;b=_r(b))p++;for(;0<d-p;)j=_r(j),d--;for(;0<p-d;)h=_r(h),p--;for(;d--;){if(j===h||h!==null&&j===h.alternate)break t;j=_r(j),h=_r(h)}j=null}else j=null;v!==null&&eh(f,g,v,j,!1),y!==null&&w!==null&&eh(f,w,y,j,!0)}}e:{if(g=u?ea(u):window,v=g.nodeName&&g.nodeName.toLowerCase(),v==="select"||v==="input"&&g.type==="file")var N=b1;else if(Wm(g))if(Op)N=w1;else{N=j1;var C=v1}else(v=g.nodeName)&&v.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(N=N1);if(N&&(N=N(e,u))){Rp(f,N,s,x);break e}C&&C(e,g,u),e==="focusout"&&(C=g._wrapperState)&&C.controlled&&g.type==="number"&&Ld(g,"number",g.value)}switch(C=u?ea(u):window,e){case"focusin":(Wm(C)||C.contentEditable==="true")&&(Xr=C,Vd=u,wi=null);break;case"focusout":wi=Vd=Xr=null;break;case"mousedown":Qd=!0;break;case"contextmenu":case"mouseup":case"dragend":Qd=!1,Jm(f,s,x);break;case"selectionchange":if(C1)break;case"keydown":case"keyup":Jm(f,s,x)}var R;if(Nx)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Jr?Mp(e,s)&&(P="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(P="onCompositionStart");P&&(zp&&s.locale!=="ko"&&(Jr||P!=="onCompositionStart"?P==="onCompositionEnd"&&Jr&&(R=Pp()):(ws=x,bx="value"in ws?ws.value:ws.textContent,Jr=!0)),C=yo(u,P),0<C.length&&(P=new Bm(P,e,null,s,x),f.push({event:P,listeners:C}),R?P.data=R:(R=Tp(s),R!==null&&(P.data=R)))),(R=h1?f1(e,s):p1(e,s))&&(u=yo(u,"onBeforeInput"),0<u.length&&(x=new Bm("onBeforeInput","beforeinput",null,s,x),f.push({event:x,listeners:u}),x.data=R))}Hp(f,t)})}function Fi(e,t,s){return{instance:e,listener:t,currentTarget:s}}function yo(e,t){for(var s=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Mi(e,s),i!=null&&r.unshift(Fi(e,i,a)),i=Mi(e,t),i!=null&&r.push(Fi(e,i,a))),e=e.return}return r}function _r(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function eh(e,t,s,r,a){for(var i=t._reactName,l=[];s!==null&&s!==r;){var o=s,c=o.alternate,u=o.stateNode;if(c!==null&&c===r)break;o.tag===5&&u!==null&&(o=u,a?(c=Mi(s,i),c!=null&&l.unshift(Fi(s,c,o))):a||(c=Mi(s,i),c!=null&&l.push(Fi(s,c,o)))),s=s.return}l.length!==0&&e.push({event:t,listeners:l})}var M1=/\r\n?/g,T1=/\u0000|\uFFFD/g;function th(e){return(typeof e=="string"?e:""+e).replace(M1,`
|
|
38
|
+
`).replace(T1,"")}function Tl(e,t,s){if(t=th(t),th(e)!==t&&s)throw Error(U(425))}function bo(){}var Gd=null,Yd=null;function Jd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xd=typeof setTimeout=="function"?setTimeout:void 0,R1=typeof clearTimeout=="function"?clearTimeout:void 0,nh=typeof Promise=="function"?Promise:void 0,O1=typeof queueMicrotask=="function"?queueMicrotask:typeof nh<"u"?function(e){return nh.resolve(null).then(e).catch(D1)}:Xd;function D1(e){setTimeout(function(){throw e})}function Kc(e,t){var s=t,r=0;do{var a=s.nextSibling;if(e.removeChild(s),a&&a.nodeType===8)if(s=a.data,s==="/$"){if(r===0){e.removeChild(a),Oi(t);return}r--}else s!=="$"&&s!=="$?"&&s!=="$!"||r++;s=a}while(s);Oi(t)}function zs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function sh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var Ua=Math.random().toString(36).slice(2),jn="__reactFiber$"+Ua,Ii="__reactProps$"+Ua,Qn="__reactContainer$"+Ua,Zd="__reactEvents$"+Ua,L1="__reactListeners$"+Ua,A1="__reactHandles$"+Ua;function tr(e){var t=e[jn];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Qn]||s[jn]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=sh(e);e!==null;){if(s=e[jn])return s;e=sh(e)}return t}e=s,s=e.parentNode}return null}function ul(e){return e=e[jn]||e[Qn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ea(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function ec(e){return e[Ii]||null}var eu=[],ta=-1;function $s(e){return{current:e}}function Me(e){0>ta||(e.current=eu[ta],eu[ta]=null,ta--)}function Ee(e,t){ta++,eu[ta]=e.current,e.current=t}var Fs={},xt=$s(Fs),Pt=$s(!1),br=Fs;function za(e,t){var s=e.type.contextTypes;if(!s)return Fs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in s)a[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function zt(e){return e=e.childContextTypes,e!=null}function vo(){Me(Pt),Me(xt)}function rh(e,t,s){if(xt.current!==Fs)throw Error(U(168));Ee(xt,t),Ee(Pt,s)}function Kp(e,t,s){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return s;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(U(108,vb(e)||"Unknown",a));return Le({},s,r)}function jo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fs,br=xt.current,Ee(xt,e),Ee(Pt,Pt.current),!0}function ah(e,t,s){var r=e.stateNode;if(!r)throw Error(U(169));s?(e=Kp(e,t,br),r.__reactInternalMemoizedMergedChildContext=e,Me(Pt),Me(xt),Ee(xt,e)):Me(Pt),Ee(Pt,s)}var Fn=null,tc=!1,Wc=!1;function Wp(e){Fn===null?Fn=[e]:Fn.push(e)}function F1(e){tc=!0,Wp(e)}function Us(){if(!Wc&&Fn!==null){Wc=!0;var e=0,t=we;try{var s=Fn;for(we=1;e<s.length;e++){var r=s[e];do r=r(!0);while(r!==null)}Fn=null,tc=!1}catch(a){throw Fn!==null&&(Fn=Fn.slice(e+1)),gp(fx,Us),a}finally{we=t,Wc=!1}}return null}var na=[],sa=0,No=null,wo=0,Kt=[],Wt=0,vr=null,Hn=1,qn="";function Xs(e,t){na[sa++]=wo,na[sa++]=No,No=e,wo=t}function Vp(e,t,s){Kt[Wt++]=Hn,Kt[Wt++]=qn,Kt[Wt++]=vr,vr=e;var r=Hn;e=qn;var a=32-un(r)-1;r&=~(1<<a),s+=1;var i=32-un(t)+a;if(30<i){var l=a-a%5;i=(r&(1<<l)-1).toString(32),r>>=l,a-=l,Hn=1<<32-un(t)+a|s<<a|r,qn=i+e}else Hn=1<<i|s<<a|r,qn=e}function kx(e){e.return!==null&&(Xs(e,1),Vp(e,1,0))}function Sx(e){for(;e===No;)No=na[--sa],na[sa]=null,wo=na[--sa],na[sa]=null;for(;e===vr;)vr=Kt[--Wt],Kt[Wt]=null,qn=Kt[--Wt],Kt[Wt]=null,Hn=Kt[--Wt],Kt[Wt]=null}var Ft=null,At=null,Te=!1,cn=null;function Qp(e,t){var s=Vt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function ih(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ft=e,At=zs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,At=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=vr!==null?{id:Hn,overflow:qn}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Vt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,Ft=e,At=null,!0):!1;default:return!1}}function tu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function nu(e){if(Te){var t=At;if(t){var s=t;if(!ih(e,t)){if(tu(e))throw Error(U(418));t=zs(s.nextSibling);var r=Ft;t&&ih(e,t)?Qp(r,s):(e.flags=e.flags&-4097|2,Te=!1,Ft=e)}}else{if(tu(e))throw Error(U(418));e.flags=e.flags&-4097|2,Te=!1,Ft=e}}}function lh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function Rl(e){if(e!==Ft)return!1;if(!Te)return lh(e),Te=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Jd(e.type,e.memoizedProps)),t&&(t=At)){if(tu(e))throw Gp(),Error(U(418));for(;t;)Qp(e,t),t=zs(t.nextSibling)}if(lh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){At=zs(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}At=null}}else At=Ft?zs(e.stateNode.nextSibling):null;return!0}function Gp(){for(var e=At;e;)e=zs(e.nextSibling)}function Ma(){At=Ft=null,Te=!1}function Cx(e){cn===null?cn=[e]:cn.push(e)}var I1=Zn.ReactCurrentBatchConfig;function Xa(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(U(309));var r=s.stateNode}if(!r)throw Error(U(147,e));var a=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var o=a.refs;l===null?delete o[i]:o[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(U(284));if(!s._owner)throw Error(U(290,e))}return e}function Ol(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function oh(e){var t=e._init;return t(e._payload)}function Yp(e){function t(h,d){if(e){var p=h.deletions;p===null?(h.deletions=[d],h.flags|=16):p.push(d)}}function s(h,d){if(!e)return null;for(;d!==null;)t(h,d),d=d.sibling;return null}function r(h,d){for(h=new Map;d!==null;)d.key!==null?h.set(d.key,d):h.set(d.index,d),d=d.sibling;return h}function a(h,d){return h=Os(h,d),h.index=0,h.sibling=null,h}function i(h,d,p){return h.index=p,e?(p=h.alternate,p!==null?(p=p.index,p<d?(h.flags|=2,d):p):(h.flags|=2,d)):(h.flags|=1048576,d)}function l(h){return e&&h.alternate===null&&(h.flags|=2),h}function o(h,d,p,b){return d===null||d.tag!==6?(d=Zc(p,h.mode,b),d.return=h,d):(d=a(d,p),d.return=h,d)}function c(h,d,p,b){var N=p.type;return N===Yr?x(h,d,p.props.children,b,p.key):d!==null&&(d.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===ls&&oh(N)===d.type)?(b=a(d,p.props),b.ref=Xa(h,d,p),b.return=h,b):(b=ao(p.type,p.key,p.props,null,h.mode,b),b.ref=Xa(h,d,p),b.return=h,b)}function u(h,d,p,b){return d===null||d.tag!==4||d.stateNode.containerInfo!==p.containerInfo||d.stateNode.implementation!==p.implementation?(d=ed(p,h.mode,b),d.return=h,d):(d=a(d,p.children||[]),d.return=h,d)}function x(h,d,p,b,N){return d===null||d.tag!==7?(d=pr(p,h.mode,b,N),d.return=h,d):(d=a(d,p),d.return=h,d)}function f(h,d,p){if(typeof d=="string"&&d!==""||typeof d=="number")return d=Zc(""+d,h.mode,p),d.return=h,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Nl:return p=ao(d.type,d.key,d.props,null,h.mode,p),p.ref=Xa(h,null,d),p.return=h,p;case Gr:return d=ed(d,h.mode,p),d.return=h,d;case ls:var b=d._init;return f(h,b(d._payload),p)}if(xi(d)||Va(d))return d=pr(d,h.mode,p,null),d.return=h,d;Ol(h,d)}return null}function g(h,d,p,b){var N=d!==null?d.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return N!==null?null:o(h,d,""+p,b);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Nl:return p.key===N?c(h,d,p,b):null;case Gr:return p.key===N?u(h,d,p,b):null;case ls:return N=p._init,g(h,d,N(p._payload),b)}if(xi(p)||Va(p))return N!==null?null:x(h,d,p,b,null);Ol(h,p)}return null}function v(h,d,p,b,N){if(typeof b=="string"&&b!==""||typeof b=="number")return h=h.get(p)||null,o(d,h,""+b,N);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Nl:return h=h.get(b.key===null?p:b.key)||null,c(d,h,b,N);case Gr:return h=h.get(b.key===null?p:b.key)||null,u(d,h,b,N);case ls:var C=b._init;return v(h,d,p,C(b._payload),N)}if(xi(b)||Va(b))return h=h.get(p)||null,x(d,h,b,N,null);Ol(d,b)}return null}function y(h,d,p,b){for(var N=null,C=null,R=d,P=d=0,_=null;R!==null&&P<p.length;P++){R.index>P?(_=R,R=null):_=R.sibling;var D=g(h,R,p[P],b);if(D===null){R===null&&(R=_);break}e&&R&&D.alternate===null&&t(h,R),d=i(D,d,P),C===null?N=D:C.sibling=D,C=D,R=_}if(P===p.length)return s(h,R),Te&&Xs(h,P),N;if(R===null){for(;P<p.length;P++)R=f(h,p[P],b),R!==null&&(d=i(R,d,P),C===null?N=R:C.sibling=R,C=R);return Te&&Xs(h,P),N}for(R=r(h,R);P<p.length;P++)_=v(R,h,P,p[P],b),_!==null&&(e&&_.alternate!==null&&R.delete(_.key===null?P:_.key),d=i(_,d,P),C===null?N=_:C.sibling=_,C=_);return e&&R.forEach(function(G){return t(h,G)}),Te&&Xs(h,P),N}function j(h,d,p,b){var N=Va(p);if(typeof N!="function")throw Error(U(150));if(p=N.call(p),p==null)throw Error(U(151));for(var C=N=null,R=d,P=d=0,_=null,D=p.next();R!==null&&!D.done;P++,D=p.next()){R.index>P?(_=R,R=null):_=R.sibling;var G=g(h,R,D.value,b);if(G===null){R===null&&(R=_);break}e&&R&&G.alternate===null&&t(h,R),d=i(G,d,P),C===null?N=G:C.sibling=G,C=G,R=_}if(D.done)return s(h,R),Te&&Xs(h,P),N;if(R===null){for(;!D.done;P++,D=p.next())D=f(h,D.value,b),D!==null&&(d=i(D,d,P),C===null?N=D:C.sibling=D,C=D);return Te&&Xs(h,P),N}for(R=r(h,R);!D.done;P++,D=p.next())D=v(R,h,P,D.value,b),D!==null&&(e&&D.alternate!==null&&R.delete(D.key===null?P:D.key),d=i(D,d,P),C===null?N=D:C.sibling=D,C=D);return e&&R.forEach(function(J){return t(h,J)}),Te&&Xs(h,P),N}function w(h,d,p,b){if(typeof p=="object"&&p!==null&&p.type===Yr&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Nl:e:{for(var N=p.key,C=d;C!==null;){if(C.key===N){if(N=p.type,N===Yr){if(C.tag===7){s(h,C.sibling),d=a(C,p.props.children),d.return=h,h=d;break e}}else if(C.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===ls&&oh(N)===C.type){s(h,C.sibling),d=a(C,p.props),d.ref=Xa(h,C,p),d.return=h,h=d;break e}s(h,C);break}else t(h,C);C=C.sibling}p.type===Yr?(d=pr(p.props.children,h.mode,b,p.key),d.return=h,h=d):(b=ao(p.type,p.key,p.props,null,h.mode,b),b.ref=Xa(h,d,p),b.return=h,h=b)}return l(h);case Gr:e:{for(C=p.key;d!==null;){if(d.key===C)if(d.tag===4&&d.stateNode.containerInfo===p.containerInfo&&d.stateNode.implementation===p.implementation){s(h,d.sibling),d=a(d,p.children||[]),d.return=h,h=d;break e}else{s(h,d);break}else t(h,d);d=d.sibling}d=ed(p,h.mode,b),d.return=h,h=d}return l(h);case ls:return C=p._init,w(h,d,C(p._payload),b)}if(xi(p))return y(h,d,p,b);if(Va(p))return j(h,d,p,b);Ol(h,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,d!==null&&d.tag===6?(s(h,d.sibling),d=a(d,p),d.return=h,h=d):(s(h,d),d=Zc(p,h.mode,b),d.return=h,h=d),l(h)):s(h,d)}return w}var Ta=Yp(!0),Jp=Yp(!1),ko=$s(null),So=null,ra=null,Ex=null;function Px(){Ex=ra=So=null}function zx(e){var t=ko.current;Me(ko),e._currentValue=t}function su(e,t,s){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===s)break;e=e.return}}function ma(e,t){So=e,Ex=ra=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Et=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(Ex!==e)if(e={context:e,memoizedValue:t,next:null},ra===null){if(So===null)throw Error(U(308));ra=e,So.dependencies={lanes:0,firstContext:e}}else ra=ra.next=e;return t}var nr=null;function Mx(e){nr===null?nr=[e]:nr.push(e)}function Xp(e,t,s,r){var a=t.interleaved;return a===null?(s.next=s,Mx(t)):(s.next=a.next,a.next=s),t.interleaved=s,Gn(e,r)}function Gn(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var os=!1;function Tx(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Kn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ms(e,t,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Gn(e,s)}return a=r.interleaved,a===null?(t.next=t,Mx(r)):(t.next=a.next,a.next=t),r.interleaved=t,Gn(e,s)}function Zl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,s|=r,t.lanes=s,px(e,s)}}function ch(e,t){var s=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var a=null,i=null;if(s=s.firstBaseUpdate,s!==null){do{var l={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};i===null?a=i=l:i=i.next=l,s=s.next}while(s!==null);i===null?a=i=t:i=i.next=t}else a=i=t;s={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function Co(e,t,s,r){var a=e.updateQueue;os=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,u=c.next;c.next=null,l===null?i=u:l.next=u,l=c;var x=e.alternate;x!==null&&(x=x.updateQueue,o=x.lastBaseUpdate,o!==l&&(o===null?x.firstBaseUpdate=u:o.next=u,x.lastBaseUpdate=c))}if(i!==null){var f=a.baseState;l=0,x=u=c=null,o=i;do{var g=o.lane,v=o.eventTime;if((r&g)===g){x!==null&&(x=x.next={eventTime:v,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,j=o;switch(g=t,v=s,j.tag){case 1:if(y=j.payload,typeof y=="function"){f=y.call(v,f,g);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=j.payload,g=typeof y=="function"?y.call(v,f,g):y,g==null)break e;f=Le({},f,g);break e;case 2:os=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,g=a.effects,g===null?a.effects=[o]:g.push(o))}else v={eventTime:v,lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},x===null?(u=x=v,c=f):x=x.next=v,l|=g;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;g=o,o=g.next,g.next=null,a.lastBaseUpdate=g,a.shared.pending=null}}while(!0);if(x===null&&(c=f),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=x,t=a.shared.interleaved,t!==null){a=t;do l|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Nr|=l,e.lanes=l,e.memoizedState=f}}function dh(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=s,typeof a!="function")throw Error(U(191,a));a.call(r)}}}var xl={},kn=$s(xl),_i=$s(xl),$i=$s(xl);function sr(e){if(e===xl)throw Error(U(174));return e}function Rx(e,t){switch(Ee($i,t),Ee(_i,e),Ee(kn,xl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fd(t,e)}Me(kn),Ee(kn,t)}function Ra(){Me(kn),Me(_i),Me($i)}function e0(e){sr($i.current);var t=sr(kn.current),s=Fd(t,e.type);t!==s&&(Ee(_i,e),Ee(kn,s))}function Ox(e){_i.current===e&&(Me(kn),Me(_i))}var Oe=$s(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vc=[];function Dx(){for(var e=0;e<Vc.length;e++)Vc[e]._workInProgressVersionPrimary=null;Vc.length=0}var eo=Zn.ReactCurrentDispatcher,Qc=Zn.ReactCurrentBatchConfig,jr=0,De=null,We=null,Je=null,Po=!1,ki=!1,Ui=0,_1=0;function lt(){throw Error(U(321))}function Lx(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!hn(e[s],t[s]))return!1;return!0}function Ax(e,t,s,r,a,i){if(jr=i,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,eo.current=e===null||e.memoizedState===null?H1:q1,e=s(r,a),ki){i=0;do{if(ki=!1,Ui=0,25<=i)throw Error(U(301));i+=1,Je=We=null,t.updateQueue=null,eo.current=K1,e=s(r,a)}while(ki)}if(eo.current=zo,t=We!==null&&We.next!==null,jr=0,Je=We=De=null,Po=!1,t)throw Error(U(300));return e}function Fx(){var e=Ui!==0;return Ui=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?De.memoizedState=Je=e:Je=Je.next=e,Je}function Xt(){if(We===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=Je===null?De.memoizedState:Je.next;if(t!==null)Je=t,We=e;else{if(e===null)throw Error(U(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Je===null?De.memoizedState=Je=e:Je=Je.next=e}return Je}function Bi(e,t){return typeof t=="function"?t(e):t}function Gc(e){var t=Xt(),s=t.queue;if(s===null)throw Error(U(311));s.lastRenderedReducer=e;var r=We,a=r.baseQueue,i=s.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}r.baseQueue=a=i,s.pending=null}if(a!==null){i=a.next,r=r.baseState;var o=l=null,c=null,u=i;do{var x=u.lane;if((jr&x)===x)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:x,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(o=c=f,l=r):c=c.next=f,De.lanes|=x,Nr|=x}u=u.next}while(u!==null&&u!==i);c===null?l=r:c.next=o,hn(r,t.memoizedState)||(Et=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=c,s.lastRenderedState=r}if(e=s.interleaved,e!==null){a=e;do i=a.lane,De.lanes|=i,Nr|=i,a=a.next;while(a!==e)}else a===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function Yc(e){var t=Xt(),s=t.queue;if(s===null)throw Error(U(311));s.lastRenderedReducer=e;var r=s.dispatch,a=s.pending,i=t.memoizedState;if(a!==null){s.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);hn(i,t.memoizedState)||(Et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),s.lastRenderedState=i}return[i,r]}function t0(){}function n0(e,t){var s=De,r=Xt(),a=t(),i=!hn(r.memoizedState,a);if(i&&(r.memoizedState=a,Et=!0),r=r.queue,Ix(a0.bind(null,s,r,e),[e]),r.getSnapshot!==t||i||Je!==null&&Je.memoizedState.tag&1){if(s.flags|=2048,Hi(9,r0.bind(null,s,r,a,t),void 0,null),Xe===null)throw Error(U(349));jr&30||s0(s,t,a)}return a}function s0(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function r0(e,t,s,r){t.value=s,t.getSnapshot=r,i0(t)&&l0(e)}function a0(e,t,s){return s(function(){i0(t)&&l0(e)})}function i0(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!hn(e,s)}catch{return!0}}function l0(e){var t=Gn(e,1);t!==null&&xn(t,e,1,-1)}function uh(e){var t=gn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:e},t.queue=e,e=e.dispatch=B1.bind(null,De,e),[t.memoizedState,e]}function Hi(e,t,s,r){return e={tag:e,create:t,destroy:s,deps:r,next:null},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(r=s.next,s.next=e,e.next=r,t.lastEffect=e)),e}function o0(){return Xt().memoizedState}function to(e,t,s,r){var a=gn();De.flags|=e,a.memoizedState=Hi(1|t,s,void 0,r===void 0?null:r)}function nc(e,t,s,r){var a=Xt();r=r===void 0?null:r;var i=void 0;if(We!==null){var l=We.memoizedState;if(i=l.destroy,r!==null&&Lx(r,l.deps)){a.memoizedState=Hi(t,s,i,r);return}}De.flags|=e,a.memoizedState=Hi(1|t,s,i,r)}function xh(e,t){return to(8390656,8,e,t)}function Ix(e,t){return nc(2048,8,e,t)}function c0(e,t){return nc(4,2,e,t)}function d0(e,t){return nc(4,4,e,t)}function u0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function x0(e,t,s){return s=s!=null?s.concat([e]):null,nc(4,4,u0.bind(null,t,e),s)}function _x(){}function m0(e,t){var s=Xt();t=t===void 0?null:t;var r=s.memoizedState;return r!==null&&t!==null&&Lx(t,r[1])?r[0]:(s.memoizedState=[e,t],e)}function h0(e,t){var s=Xt();t=t===void 0?null:t;var r=s.memoizedState;return r!==null&&t!==null&&Lx(t,r[1])?r[0]:(e=e(),s.memoizedState=[e,t],e)}function f0(e,t,s){return jr&21?(hn(s,t)||(s=vp(),De.lanes|=s,Nr|=s,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Et=!0),e.memoizedState=s)}function $1(e,t){var s=we;we=s!==0&&4>s?s:4,e(!0);var r=Qc.transition;Qc.transition={};try{e(!1),t()}finally{we=s,Qc.transition=r}}function p0(){return Xt().memoizedState}function U1(e,t,s){var r=Rs(e);if(s={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null},g0(e))y0(t,s);else if(s=Xp(e,t,s,r),s!==null){var a=bt();xn(s,e,r,a),b0(s,t,r)}}function B1(e,t,s){var r=Rs(e),a={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null};if(g0(e))y0(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,s);if(a.hasEagerState=!0,a.eagerState=o,hn(o,l)){var c=t.interleaved;c===null?(a.next=a,Mx(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}s=Xp(e,t,a,r),s!==null&&(a=bt(),xn(s,e,r,a),b0(s,t,r))}}function g0(e){var t=e.alternate;return e===De||t!==null&&t===De}function y0(e,t){ki=Po=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function b0(e,t,s){if(s&4194240){var r=t.lanes;r&=e.pendingLanes,s|=r,t.lanes=s,px(e,s)}}var zo={readContext:Jt,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useInsertionEffect:lt,useLayoutEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useMutableSource:lt,useSyncExternalStore:lt,useId:lt,unstable_isNewReconciler:!1},H1={readContext:Jt,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:xh,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,to(4194308,4,u0.bind(null,t,e),s)},useLayoutEffect:function(e,t){return to(4194308,4,e,t)},useInsertionEffect:function(e,t){return to(4,2,e,t)},useMemo:function(e,t){var s=gn();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var r=gn();return t=s!==void 0?s(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=U1.bind(null,De,e),[r.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:uh,useDebugValue:_x,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=uh(!1),t=e[0];return e=$1.bind(null,e[1]),gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var r=De,a=gn();if(Te){if(s===void 0)throw Error(U(407));s=s()}else{if(s=t(),Xe===null)throw Error(U(349));jr&30||s0(r,t,s)}a.memoizedState=s;var i={value:s,getSnapshot:t};return a.queue=i,xh(a0.bind(null,r,i,e),[e]),r.flags|=2048,Hi(9,r0.bind(null,r,i,s,t),void 0,null),s},useId:function(){var e=gn(),t=Xe.identifierPrefix;if(Te){var s=qn,r=Hn;s=(r&~(1<<32-un(r)-1)).toString(32)+s,t=":"+t+"R"+s,s=Ui++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=_1++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},q1={readContext:Jt,useCallback:m0,useContext:Jt,useEffect:Ix,useImperativeHandle:x0,useInsertionEffect:c0,useLayoutEffect:d0,useMemo:h0,useReducer:Gc,useRef:o0,useState:function(){return Gc(Bi)},useDebugValue:_x,useDeferredValue:function(e){var t=Xt();return f0(t,We.memoizedState,e)},useTransition:function(){var e=Gc(Bi)[0],t=Xt().memoizedState;return[e,t]},useMutableSource:t0,useSyncExternalStore:n0,useId:p0,unstable_isNewReconciler:!1},K1={readContext:Jt,useCallback:m0,useContext:Jt,useEffect:Ix,useImperativeHandle:x0,useInsertionEffect:c0,useLayoutEffect:d0,useMemo:h0,useReducer:Yc,useRef:o0,useState:function(){return Yc(Bi)},useDebugValue:_x,useDeferredValue:function(e){var t=Xt();return We===null?t.memoizedState=e:f0(t,We.memoizedState,e)},useTransition:function(){var e=Yc(Bi)[0],t=Xt().memoizedState;return[e,t]},useMutableSource:t0,useSyncExternalStore:n0,useId:p0,unstable_isNewReconciler:!1};function an(e,t){if(e&&e.defaultProps){t=Le({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function ru(e,t,s,r){t=e.memoizedState,s=s(r,t),s=s==null?t:Le({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var sc={isMounted:function(e){return(e=e._reactInternals)?Mr(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var r=bt(),a=Rs(e),i=Kn(r,a);i.payload=t,s!=null&&(i.callback=s),t=Ms(e,i,a),t!==null&&(xn(t,e,a,r),Zl(t,e,a))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var r=bt(),a=Rs(e),i=Kn(r,a);i.tag=1,i.payload=t,s!=null&&(i.callback=s),t=Ms(e,i,a),t!==null&&(xn(t,e,a,r),Zl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=bt(),r=Rs(e),a=Kn(s,r);a.tag=2,t!=null&&(a.callback=t),t=Ms(e,a,r),t!==null&&(xn(t,e,r,s),Zl(t,e,r))}};function mh(e,t,s,r,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!Li(s,r)||!Li(a,i):!0}function v0(e,t,s){var r=!1,a=Fs,i=t.contextType;return typeof i=="object"&&i!==null?i=Jt(i):(a=zt(t)?br:xt.current,r=t.contextTypes,i=(r=r!=null)?za(e,a):Fs),t=new t(s,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=sc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function hh(e,t,s,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,r),t.state!==e&&sc.enqueueReplaceState(t,t.state,null)}function au(e,t,s,r){var a=e.stateNode;a.props=s,a.state=e.memoizedState,a.refs={},Tx(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Jt(i):(i=zt(t)?br:xt.current,a.context=za(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ru(e,t,i,s),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&sc.enqueueReplaceState(a,a.state,null),Co(e,s,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Oa(e,t){try{var s="",r=t;do s+=bb(r),r=r.return;while(r);var a=s}catch(i){a=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:a,digest:null}}function Jc(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function iu(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var W1=typeof WeakMap=="function"?WeakMap:Map;function j0(e,t,s){s=Kn(-1,s),s.tag=3,s.payload={element:null};var r=t.value;return s.callback=function(){To||(To=!0,pu=r),iu(e,t)},s}function N0(e,t,s){s=Kn(-1,s),s.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;s.payload=function(){return r(a)},s.callback=function(){iu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(s.callback=function(){iu(e,t),typeof r!="function"&&(Ts===null?Ts=new Set([this]):Ts.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),s}function fh(e,t,s){var r=e.pingCache;if(r===null){r=e.pingCache=new W1;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(s)||(a.add(s),e=iv.bind(null,e,t,s),t.then(e,e))}function ph(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function gh(e,t,s,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=Kn(-1,1),t.tag=2,Ms(s,t,1))),s.lanes|=1),e)}var V1=Zn.ReactCurrentOwner,Et=!1;function pt(e,t,s,r){t.child=e===null?Jp(t,null,s,r):Ta(t,e.child,s,r)}function yh(e,t,s,r,a){s=s.render;var i=t.ref;return ma(t,a),r=Ax(e,t,s,r,i,a),s=Fx(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Yn(e,t,a)):(Te&&s&&kx(t),t.flags|=1,pt(e,t,r,a),t.child)}function bh(e,t,s,r,a){if(e===null){var i=s.type;return typeof i=="function"&&!Vx(i)&&i.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=i,w0(e,t,i,r,a)):(e=ao(s.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var l=i.memoizedProps;if(s=s.compare,s=s!==null?s:Li,s(l,r)&&e.ref===t.ref)return Yn(e,t,a)}return t.flags|=1,e=Os(i,r),e.ref=t.ref,e.return=t,t.child=e}function w0(e,t,s,r,a){if(e!==null){var i=e.memoizedProps;if(Li(i,r)&&e.ref===t.ref)if(Et=!1,t.pendingProps=r=i,(e.lanes&a)!==0)e.flags&131072&&(Et=!0);else return t.lanes=e.lanes,Yn(e,t,a)}return lu(e,t,s,r,a)}function k0(e,t,s){var r=t.pendingProps,a=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ee(ia,Dt),Dt|=s;else{if(!(s&1073741824))return e=i!==null?i.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ee(ia,Dt),Dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:s,Ee(ia,Dt),Dt|=r}else i!==null?(r=i.baseLanes|s,t.memoizedState=null):r=s,Ee(ia,Dt),Dt|=r;return pt(e,t,a,s),t.child}function S0(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function lu(e,t,s,r,a){var i=zt(s)?br:xt.current;return i=za(t,i),ma(t,a),s=Ax(e,t,s,r,i,a),r=Fx(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Yn(e,t,a)):(Te&&r&&kx(t),t.flags|=1,pt(e,t,s,a),t.child)}function vh(e,t,s,r,a){if(zt(s)){var i=!0;jo(t)}else i=!1;if(ma(t,a),t.stateNode===null)no(e,t),v0(t,s,r),au(t,s,r,a),r=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var c=l.context,u=s.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=zt(s)?br:xt.current,u=za(t,u));var x=s.getDerivedStateFromProps,f=typeof x=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==r||c!==u)&&hh(t,l,r,u),os=!1;var g=t.memoizedState;l.state=g,Co(t,r,l,a),c=t.memoizedState,o!==r||g!==c||Pt.current||os?(typeof x=="function"&&(ru(t,s,x,r),c=t.memoizedState),(o=os||mh(t,s,o,r,g,c,u))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),l.props=r,l.state=c,l.context=u,r=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Zp(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:an(t.type,o),l.props=u,f=t.pendingProps,g=l.context,c=s.contextType,typeof c=="object"&&c!==null?c=Jt(c):(c=zt(s)?br:xt.current,c=za(t,c));var v=s.getDerivedStateFromProps;(x=typeof v=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==f||g!==c)&&hh(t,l,r,c),os=!1,g=t.memoizedState,l.state=g,Co(t,r,l,a);var y=t.memoizedState;o!==f||g!==y||Pt.current||os?(typeof v=="function"&&(ru(t,s,v,r),y=t.memoizedState),(u=os||mh(t,s,u,r,g,y,c)||!1)?(x||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,y,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,y,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),l.props=r,l.state=y,l.context=c,r=u):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return ou(e,t,s,r,i,a)}function ou(e,t,s,r,a,i){S0(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return a&&ah(t,s,!1),Yn(e,t,i);r=t.stateNode,V1.current=t;var o=l&&typeof s.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Ta(t,e.child,null,i),t.child=Ta(t,null,o,i)):pt(e,t,o,i),t.memoizedState=r.state,a&&ah(t,s,!0),t.child}function C0(e){var t=e.stateNode;t.pendingContext?rh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rh(e,t.context,!1),Rx(e,t.containerInfo)}function jh(e,t,s,r,a){return Ma(),Cx(a),t.flags|=256,pt(e,t,s,r),t.child}var cu={dehydrated:null,treeContext:null,retryLane:0};function du(e){return{baseLanes:e,cachePool:null,transitions:null}}function E0(e,t,s){var r=t.pendingProps,a=Oe.current,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Ee(Oe,a&1),e===null)return nu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=ic(l,r,0,null),e=pr(e,r,s,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=du(s),t.memoizedState=cu,e):$x(t,l));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return Q1(e,t,l,r,o,a,s);if(i){i=r.fallback,l=t.mode,a=e.child,o=a.sibling;var c={mode:"hidden",children:r.children};return!(l&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Os(a,c),r.subtreeFlags=a.subtreeFlags&14680064),o!==null?i=Os(o,i):(i=pr(i,l,s,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?du(s):{baseLanes:l.baseLanes|s,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~s,t.memoizedState=cu,r}return i=e.child,e=i.sibling,r=Os(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=s),r.return=t,r.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=r,t.memoizedState=null,r}function $x(e,t){return t=ic({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Dl(e,t,s,r){return r!==null&&Cx(r),Ta(t,e.child,null,s),e=$x(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Q1(e,t,s,r,a,i,l){if(s)return t.flags&256?(t.flags&=-257,r=Jc(Error(U(422))),Dl(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=ic({mode:"visible",children:r.children},a,0,null),i=pr(i,a,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Ta(t,e.child,null,l),t.child.memoizedState=du(l),t.memoizedState=cu,i);if(!(t.mode&1))return Dl(e,t,l,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(U(419)),r=Jc(i,r,void 0),Dl(e,t,l,r)}if(o=(l&e.childLanes)!==0,Et||o){if(r=Xe,r!==null){switch(l&-l){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(r.suspendedLanes|l)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,Gn(e,a),xn(r,e,a,-1))}return Wx(),r=Jc(Error(U(421))),Dl(e,t,l,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=lv.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,At=zs(a.nextSibling),Ft=t,Te=!0,cn=null,e!==null&&(Kt[Wt++]=Hn,Kt[Wt++]=qn,Kt[Wt++]=vr,Hn=e.id,qn=e.overflow,vr=t),t=$x(t,r.children),t.flags|=4096,t)}function Nh(e,t,s){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),su(e.return,t,s)}function Xc(e,t,s,r,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=s,i.tailMode=a)}function P0(e,t,s){var r=t.pendingProps,a=r.revealOrder,i=r.tail;if(pt(e,t,r.children,s),r=Oe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nh(e,s,t);else if(e.tag===19)Nh(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ee(Oe,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(s=t.child,a=null;s!==null;)e=s.alternate,e!==null&&Eo(e)===null&&(a=s),s=s.sibling;s=a,s===null?(a=t.child,t.child=null):(a=s.sibling,s.sibling=null),Xc(t,!1,a,s,i);break;case"backwards":for(s=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Eo(e)===null){t.child=a;break}e=a.sibling,a.sibling=s,s=a,a=e}Xc(t,!0,s,null,i);break;case"together":Xc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function no(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yn(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Nr|=t.lanes,!(s&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,s=Os(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=Os(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function G1(e,t,s){switch(t.tag){case 3:C0(t),Ma();break;case 5:e0(t);break;case 1:zt(t.type)&&jo(t);break;case 4:Rx(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Ee(ko,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ee(Oe,Oe.current&1),t.flags|=128,null):s&t.child.childLanes?E0(e,t,s):(Ee(Oe,Oe.current&1),e=Yn(e,t,s),e!==null?e.sibling:null);Ee(Oe,Oe.current&1);break;case 19:if(r=(s&t.childLanes)!==0,e.flags&128){if(r)return P0(e,t,s);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ee(Oe,Oe.current),r)break;return null;case 22:case 23:return t.lanes=0,k0(e,t,s)}return Yn(e,t,s)}var z0,uu,M0,T0;z0=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}};uu=function(){};M0=function(e,t,s,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,sr(kn.current);var i=null;switch(s){case"input":a=Od(e,a),r=Od(e,r),i=[];break;case"select":a=Le({},a,{value:void 0}),r=Le({},r,{value:void 0}),i=[];break;case"textarea":a=Ad(e,a),r=Ad(e,r),i=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bo)}Id(s,r);var l;s=null;for(u in a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var o=a[u];for(l in o)o.hasOwnProperty(l)&&(s||(s={}),s[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Pi.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(o=a!=null?a[u]:void 0,r.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(l in o)!o.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(s||(s={}),s[l]="");for(l in c)c.hasOwnProperty(l)&&o[l]!==c[l]&&(s||(s={}),s[l]=c[l])}else s||(i||(i=[]),i.push(u,s)),s=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Pi.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ze("scroll",e),i||o===c||(i=[])):(i=i||[]).push(u,c))}s&&(i=i||[]).push("style",s);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};T0=function(e,t,s,r){s!==r&&(t.flags|=4)};function Za(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var r=null;s!==null;)s.alternate!==null&&(r=s),s=s.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,r=0;if(t)for(var a=e.child;a!==null;)s|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)s|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=s,t}function Y1(e,t,s){var r=t.pendingProps;switch(Sx(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return zt(t.type)&&vo(),ot(t),null;case 3:return r=t.stateNode,Ra(),Me(Pt),Me(xt),Dx(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,cn!==null&&(bu(cn),cn=null))),uu(e,t),ot(t),null;case 5:Ox(t);var a=sr($i.current);if(s=t.type,e!==null&&t.stateNode!=null)M0(e,t,s,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return ot(t),null}if(e=sr(kn.current),Rl(t)){r=t.stateNode,s=t.type;var i=t.memoizedProps;switch(r[jn]=t,r[Ii]=i,e=(t.mode&1)!==0,s){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(a=0;a<hi.length;a++)ze(hi[a],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":Tm(r,i),ze("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ze("invalid",r);break;case"textarea":Om(r,i),ze("invalid",r)}Id(s,i),a=null;for(var l in i)if(i.hasOwnProperty(l)){var o=i[l];l==="children"?typeof o=="string"?r.textContent!==o&&(i.suppressHydrationWarning!==!0&&Tl(r.textContent,o,e),a=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Tl(r.textContent,o,e),a=["children",""+o]):Pi.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&ze("scroll",r)}switch(s){case"input":wl(r),Rm(r,i,!0);break;case"textarea":wl(r),Dm(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=bo)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ap(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(s,{is:r.is}):(e=l.createElement(s),s==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,s),e[jn]=t,e[Ii]=r,z0(e,t,!1,!1),t.stateNode=e;e:{switch(l=_d(s,r),s){case"dialog":ze("cancel",e),ze("close",e),a=r;break;case"iframe":case"object":case"embed":ze("load",e),a=r;break;case"video":case"audio":for(a=0;a<hi.length;a++)ze(hi[a],e);a=r;break;case"source":ze("error",e),a=r;break;case"img":case"image":case"link":ze("error",e),ze("load",e),a=r;break;case"details":ze("toggle",e),a=r;break;case"input":Tm(e,r),a=Od(e,r),ze("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=Le({},r,{value:void 0}),ze("invalid",e);break;case"textarea":Om(e,r),a=Ad(e,r),ze("invalid",e);break;default:a=r}Id(s,a),o=a;for(i in o)if(o.hasOwnProperty(i)){var c=o[i];i==="style"?op(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&ip(e,c)):i==="children"?typeof c=="string"?(s!=="textarea"||c!=="")&&zi(e,c):typeof c=="number"&&zi(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Pi.hasOwnProperty(i)?c!=null&&i==="onScroll"&&ze("scroll",e):c!=null&&dx(e,i,c,l))}switch(s){case"input":wl(e),Rm(e,r,!1);break;case"textarea":wl(e),Dm(e);break;case"option":r.value!=null&&e.setAttribute("value",""+As(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ca(e,!!r.multiple,i,!1):r.defaultValue!=null&&ca(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=bo)}switch(s){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ot(t),null;case 6:if(e&&t.stateNode!=null)T0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(s=sr($i.current),sr(kn.current),Rl(t)){if(r=t.stateNode,s=t.memoizedProps,r[jn]=t,(i=r.nodeValue!==s)&&(e=Ft,e!==null))switch(e.tag){case 3:Tl(r.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Tl(r.nodeValue,s,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(s.nodeType===9?s:s.ownerDocument).createTextNode(r),r[jn]=t,t.stateNode=r}return ot(t),null;case 13:if(Me(Oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Te&&At!==null&&t.mode&1&&!(t.flags&128))Gp(),Ma(),t.flags|=98560,i=!1;else if(i=Rl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[jn]=t}else Ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ot(t),i=!1}else cn!==null&&(bu(cn),cn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=s,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Oe.current&1?Ge===0&&(Ge=3):Wx())),t.updateQueue!==null&&(t.flags|=4),ot(t),null);case 4:return Ra(),uu(e,t),e===null&&Ai(t.stateNode.containerInfo),ot(t),null;case 10:return zx(t.type._context),ot(t),null;case 17:return zt(t.type)&&vo(),ot(t),null;case 19:if(Me(Oe),i=t.memoizedState,i===null)return ot(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)Za(i,!1);else{if(Ge!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Eo(e),l!==null){for(t.flags|=128,Za(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=s,s=t.child;s!==null;)i=s,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Ee(Oe,Oe.current&1|2),t.child}e=e.sibling}i.tail!==null&&$e()>Da&&(t.flags|=128,r=!0,Za(i,!1),t.lanes=4194304)}else{if(!r)if(e=Eo(l),e!==null){if(t.flags|=128,r=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),Za(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Te)return ot(t),null}else 2*$e()-i.renderingStartTime>Da&&s!==1073741824&&(t.flags|=128,r=!0,Za(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(s=i.last,s!==null?s.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=$e(),t.sibling=null,s=Oe.current,Ee(Oe,r?s&1|2:s&1),t):(ot(t),null);case 22:case 23:return Kx(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Dt&1073741824&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function J1(e,t){switch(Sx(t),t.tag){case 1:return zt(t.type)&&vo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ra(),Me(Pt),Me(xt),Dx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ox(t),null;case 13:if(Me(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Oe),null;case 4:return Ra(),null;case 10:return zx(t.type._context),null;case 22:case 23:return Kx(),null;case 24:return null;default:return null}}var Ll=!1,dt=!1,X1=typeof WeakSet=="function"?WeakSet:Set,Q=null;function aa(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(r){Ie(e,t,r)}else s.current=null}function xu(e,t,s){try{s()}catch(r){Ie(e,t,r)}}var wh=!1;function Z1(e,t){if(Gd=po,e=Ap(),wx(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{s.nodeType,i.nodeType}catch{s=null;break e}var l=0,o=-1,c=-1,u=0,x=0,f=e,g=null;t:for(;;){for(var v;f!==s||a!==0&&f.nodeType!==3||(o=l+a),f!==i||r!==0&&f.nodeType!==3||(c=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(v=f.firstChild)!==null;)g=f,f=v;for(;;){if(f===e)break t;if(g===s&&++u===a&&(o=l),g===i&&++x===r&&(c=l),(v=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=v}s=o===-1||c===-1?null:{start:o,end:c}}else s=null}s=s||{start:0,end:0}}else s=null;for(Yd={focusedElem:e,selectionRange:s},po=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var j=y.memoizedProps,w=y.memoizedState,h=t.stateNode,d=h.getSnapshotBeforeUpdate(t.elementType===t.type?j:an(t.type,j),w);h.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(b){Ie(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return y=wh,wh=!1,y}function Si(e,t,s){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&xu(t,s,i)}a=a.next}while(a!==r)}}function rc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var r=s.create;s.destroy=r()}s=s.next}while(s!==t)}}function mu(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function R0(e){var t=e.alternate;t!==null&&(e.alternate=null,R0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[Ii],delete t[Zd],delete t[L1],delete t[A1])),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 O0(e){return e.tag===5||e.tag===3||e.tag===4}function kh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||O0(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 hu(e,t,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=bo));else if(r!==4&&(e=e.child,e!==null))for(hu(e,t,s),e=e.sibling;e!==null;)hu(e,t,s),e=e.sibling}function fu(e,t,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(fu(e,t,s),e=e.sibling;e!==null;)fu(e,t,s),e=e.sibling}var nt=null,on=!1;function ss(e,t,s){for(s=s.child;s!==null;)D0(e,t,s),s=s.sibling}function D0(e,t,s){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(Yo,s)}catch{}switch(s.tag){case 5:dt||aa(s,t);case 6:var r=nt,a=on;nt=null,ss(e,t,s),nt=r,on=a,nt!==null&&(on?(e=nt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):nt.removeChild(s.stateNode));break;case 18:nt!==null&&(on?(e=nt,s=s.stateNode,e.nodeType===8?Kc(e.parentNode,s):e.nodeType===1&&Kc(e,s),Oi(e)):Kc(nt,s.stateNode));break;case 4:r=nt,a=on,nt=s.stateNode.containerInfo,on=!0,ss(e,t,s),nt=r,on=a;break;case 0:case 11:case 14:case 15:if(!dt&&(r=s.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var i=a,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&xu(s,t,l),a=a.next}while(a!==r)}ss(e,t,s);break;case 1:if(!dt&&(aa(s,t),r=s.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=s.memoizedProps,r.state=s.memoizedState,r.componentWillUnmount()}catch(o){Ie(s,t,o)}ss(e,t,s);break;case 21:ss(e,t,s);break;case 22:s.mode&1?(dt=(r=dt)||s.memoizedState!==null,ss(e,t,s),dt=r):ss(e,t,s);break;default:ss(e,t,s)}}function Sh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new X1),t.forEach(function(r){var a=ov.bind(null,e,r);s.has(r)||(s.add(r),r.then(a,a))})}}function sn(e,t){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var a=s[r];try{var i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:nt=o.stateNode,on=!1;break e;case 3:nt=o.stateNode.containerInfo,on=!0;break e;case 4:nt=o.stateNode.containerInfo,on=!0;break e}o=o.return}if(nt===null)throw Error(U(160));D0(i,l,a),nt=null,on=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(u){Ie(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)L0(t,e),t=t.sibling}function L0(e,t){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),pn(e),r&4){try{Si(3,e,e.return),rc(3,e)}catch(j){Ie(e,e.return,j)}try{Si(5,e,e.return)}catch(j){Ie(e,e.return,j)}}break;case 1:sn(t,e),pn(e),r&512&&s!==null&&aa(s,s.return);break;case 5:if(sn(t,e),pn(e),r&512&&s!==null&&aa(s,s.return),e.flags&32){var a=e.stateNode;try{zi(a,"")}catch(j){Ie(e,e.return,j)}}if(r&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,l=s!==null?s.memoizedProps:i,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&sp(a,i),_d(o,l);var u=_d(o,i);for(l=0;l<c.length;l+=2){var x=c[l],f=c[l+1];x==="style"?op(a,f):x==="dangerouslySetInnerHTML"?ip(a,f):x==="children"?zi(a,f):dx(a,x,f,u)}switch(o){case"input":Dd(a,i);break;case"textarea":rp(a,i);break;case"select":var g=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?ca(a,!!i.multiple,v,!1):g!==!!i.multiple&&(i.defaultValue!=null?ca(a,!!i.multiple,i.defaultValue,!0):ca(a,!!i.multiple,i.multiple?[]:"",!1))}a[Ii]=i}catch(j){Ie(e,e.return,j)}}break;case 6:if(sn(t,e),pn(e),r&4){if(e.stateNode===null)throw Error(U(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(j){Ie(e,e.return,j)}}break;case 3:if(sn(t,e),pn(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Oi(t.containerInfo)}catch(j){Ie(e,e.return,j)}break;case 4:sn(t,e),pn(e);break;case 13:sn(t,e),pn(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(Hx=$e())),r&4&&Sh(e);break;case 22:if(x=s!==null&&s.memoizedState!==null,e.mode&1?(dt=(u=dt)||x,sn(t,e),dt=u):sn(t,e),pn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!x&&e.mode&1)for(Q=e,x=e.child;x!==null;){for(f=Q=x;Q!==null;){switch(g=Q,v=g.child,g.tag){case 0:case 11:case 14:case 15:Si(4,g,g.return);break;case 1:aa(g,g.return);var y=g.stateNode;if(typeof y.componentWillUnmount=="function"){r=g,s=g.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(j){Ie(r,s,j)}}break;case 5:aa(g,g.return);break;case 22:if(g.memoizedState!==null){Eh(f);continue}}v!==null?(v.return=g,Q=v):Eh(f)}x=x.sibling}e:for(x=null,f=e;;){if(f.tag===5){if(x===null){x=f;try{a=f.stateNode,u?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=f.stateNode,c=f.memoizedProps.style,l=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=lp("display",l))}catch(j){Ie(e,e.return,j)}}}else if(f.tag===6){if(x===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(j){Ie(e,e.return,j)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;x===f&&(x=null),f=f.return}x===f&&(x=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:sn(t,e),pn(e),r&4&&Sh(e);break;case 21:break;default:sn(t,e),pn(e)}}function pn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(O0(s)){var r=s;break e}s=s.return}throw Error(U(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(zi(a,""),r.flags&=-33);var i=kh(e);fu(e,i,a);break;case 3:case 4:var l=r.stateNode.containerInfo,o=kh(e);hu(e,o,l);break;default:throw Error(U(161))}}catch(c){Ie(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ev(e,t,s){Q=e,A0(e)}function A0(e,t,s){for(var r=(e.mode&1)!==0;Q!==null;){var a=Q,i=a.child;if(a.tag===22&&r){var l=a.memoizedState!==null||Ll;if(!l){var o=a.alternate,c=o!==null&&o.memoizedState!==null||dt;o=Ll;var u=dt;if(Ll=l,(dt=c)&&!u)for(Q=a;Q!==null;)l=Q,c=l.child,l.tag===22&&l.memoizedState!==null?Ph(a):c!==null?(c.return=l,Q=c):Ph(a);for(;i!==null;)Q=i,A0(i),i=i.sibling;Q=a,Ll=o,dt=u}Ch(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,Q=i):Ch(e)}}function Ch(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var s=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:dt||rc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!dt)if(s===null)r.componentDidMount();else{var a=t.elementType===t.type?s.memoizedProps:an(t.type,s.memoizedProps);r.componentDidUpdate(a,s.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&dh(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}dh(t,l,s)}break;case 5:var o=t.stateNode;if(s===null&&t.flags&4){s=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&s.focus();break;case"img":c.src&&(s.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var x=u.memoizedState;if(x!==null){var f=x.dehydrated;f!==null&&Oi(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}dt||t.flags&512&&mu(t)}catch(g){Ie(t,t.return,g)}}if(t===e){Q=null;break}if(s=t.sibling,s!==null){s.return=t.return,Q=s;break}Q=t.return}}function Eh(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Q=s;break}Q=t.return}}function Ph(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{rc(4,t)}catch(c){Ie(t,s,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(c){Ie(t,a,c)}}var i=t.return;try{mu(t)}catch(c){Ie(t,i,c)}break;case 5:var l=t.return;try{mu(t)}catch(c){Ie(t,l,c)}}}catch(c){Ie(t,t.return,c)}if(t===e){Q=null;break}var o=t.sibling;if(o!==null){o.return=t.return,Q=o;break}Q=t.return}}var tv=Math.ceil,Mo=Zn.ReactCurrentDispatcher,Ux=Zn.ReactCurrentOwner,Qt=Zn.ReactCurrentBatchConfig,ye=0,Xe=null,qe=null,st=0,Dt=0,ia=$s(0),Ge=0,qi=null,Nr=0,ac=0,Bx=0,Ci=null,Ct=null,Hx=0,Da=1/0,An=null,To=!1,pu=null,Ts=null,Al=!1,ks=null,Ro=0,Ei=0,gu=null,so=-1,ro=0;function bt(){return ye&6?$e():so!==-1?so:so=$e()}function Rs(e){return e.mode&1?ye&2&&st!==0?st&-st:I1.transition!==null?(ro===0&&(ro=vp()),ro):(e=we,e!==0||(e=window.event,e=e===void 0?16:Ep(e.type)),e):1}function xn(e,t,s,r){if(50<Ei)throw Ei=0,gu=null,Error(U(185));cl(e,s,r),(!(ye&2)||e!==Xe)&&(e===Xe&&(!(ye&2)&&(ac|=s),Ge===4&&xs(e,st)),Mt(e,r),s===1&&ye===0&&!(t.mode&1)&&(Da=$e()+500,tc&&Us()))}function Mt(e,t){var s=e.callbackNode;Ib(e,t);var r=fo(e,e===Xe?st:0);if(r===0)s!==null&&Fm(s),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(s!=null&&Fm(s),t===1)e.tag===0?F1(zh.bind(null,e)):Wp(zh.bind(null,e)),O1(function(){!(ye&6)&&Us()}),s=null;else{switch(jp(r)){case 1:s=fx;break;case 4:s=yp;break;case 16:s=ho;break;case 536870912:s=bp;break;default:s=ho}s=q0(s,F0.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function F0(e,t){if(so=-1,ro=0,ye&6)throw Error(U(327));var s=e.callbackNode;if(ha()&&e.callbackNode!==s)return null;var r=fo(e,e===Xe?st:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Oo(e,r);else{t=r;var a=ye;ye|=2;var i=_0();(Xe!==e||st!==t)&&(An=null,Da=$e()+500,fr(e,t));do try{rv();break}catch(o){I0(e,o)}while(!0);Px(),Mo.current=i,ye=a,qe!==null?t=0:(Xe=null,st=0,t=Ge)}if(t!==0){if(t===2&&(a=qd(e),a!==0&&(r=a,t=yu(e,a))),t===1)throw s=qi,fr(e,0),xs(e,r),Mt(e,$e()),s;if(t===6)xs(e,r);else{if(a=e.current.alternate,!(r&30)&&!nv(a)&&(t=Oo(e,r),t===2&&(i=qd(e),i!==0&&(r=i,t=yu(e,i))),t===1))throw s=qi,fr(e,0),xs(e,r),Mt(e,$e()),s;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:Zs(e,Ct,An);break;case 3:if(xs(e,r),(r&130023424)===r&&(t=Hx+500-$e(),10<t)){if(fo(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){bt(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Xd(Zs.bind(null,e,Ct,An),t);break}Zs(e,Ct,An);break;case 4:if(xs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var l=31-un(r);i=1<<l,l=t[l],l>a&&(a=l),r&=~i}if(r=a,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tv(r/1960))-r,10<r){e.timeoutHandle=Xd(Zs.bind(null,e,Ct,An),r);break}Zs(e,Ct,An);break;case 5:Zs(e,Ct,An);break;default:throw Error(U(329))}}}return Mt(e,$e()),e.callbackNode===s?F0.bind(null,e):null}function yu(e,t){var s=Ci;return e.current.memoizedState.isDehydrated&&(fr(e,t).flags|=256),e=Oo(e,t),e!==2&&(t=Ct,Ct=s,t!==null&&bu(t)),e}function bu(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function nv(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var r=0;r<s.length;r++){var a=s[r],i=a.getSnapshot;a=a.value;try{if(!hn(i(),a))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xs(e,t){for(t&=~Bx,t&=~ac,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-un(t),r=1<<s;e[s]=-1,t&=~r}}function zh(e){if(ye&6)throw Error(U(327));ha();var t=fo(e,0);if(!(t&1))return Mt(e,$e()),null;var s=Oo(e,t);if(e.tag!==0&&s===2){var r=qd(e);r!==0&&(t=r,s=yu(e,r))}if(s===1)throw s=qi,fr(e,0),xs(e,t),Mt(e,$e()),s;if(s===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Zs(e,Ct,An),Mt(e,$e()),null}function qx(e,t){var s=ye;ye|=1;try{return e(t)}finally{ye=s,ye===0&&(Da=$e()+500,tc&&Us())}}function wr(e){ks!==null&&ks.tag===0&&!(ye&6)&&ha();var t=ye;ye|=1;var s=Qt.transition,r=we;try{if(Qt.transition=null,we=1,e)return e()}finally{we=r,Qt.transition=s,ye=t,!(ye&6)&&Us()}}function Kx(){Dt=ia.current,Me(ia)}function fr(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,R1(s)),qe!==null)for(s=qe.return;s!==null;){var r=s;switch(Sx(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vo();break;case 3:Ra(),Me(Pt),Me(xt),Dx();break;case 5:Ox(r);break;case 4:Ra();break;case 13:Me(Oe);break;case 19:Me(Oe);break;case 10:zx(r.type._context);break;case 22:case 23:Kx()}s=s.return}if(Xe=e,qe=e=Os(e.current,null),st=Dt=t,Ge=0,qi=null,Bx=ac=Nr=0,Ct=Ci=null,nr!==null){for(t=0;t<nr.length;t++)if(s=nr[t],r=s.interleaved,r!==null){s.interleaved=null;var a=r.next,i=s.pending;if(i!==null){var l=i.next;i.next=a,r.next=l}s.pending=r}nr=null}return e}function I0(e,t){do{var s=qe;try{if(Px(),eo.current=zo,Po){for(var r=De.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Po=!1}if(jr=0,Je=We=De=null,ki=!1,Ui=0,Ux.current=null,s===null||s.return===null){Ge=1,qi=t,qe=null;break}e:{var i=e,l=s.return,o=s,c=t;if(t=st,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,x=o,f=x.tag;if(!(x.mode&1)&&(f===0||f===11||f===15)){var g=x.alternate;g?(x.updateQueue=g.updateQueue,x.memoizedState=g.memoizedState,x.lanes=g.lanes):(x.updateQueue=null,x.memoizedState=null)}var v=ph(l);if(v!==null){v.flags&=-257,gh(v,l,o,i,t),v.mode&1&&fh(i,u,t),t=v,c=u;var y=t.updateQueue;if(y===null){var j=new Set;j.add(c),t.updateQueue=j}else y.add(c);break e}else{if(!(t&1)){fh(i,u,t),Wx();break e}c=Error(U(426))}}else if(Te&&o.mode&1){var w=ph(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),gh(w,l,o,i,t),Cx(Oa(c,o));break e}}i=c=Oa(c,o),Ge!==4&&(Ge=2),Ci===null?Ci=[i]:Ci.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var h=j0(i,c,t);ch(i,h);break e;case 1:o=c;var d=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof d.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Ts===null||!Ts.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=N0(i,o,t);ch(i,b);break e}}i=i.return}while(i!==null)}U0(s)}catch(N){t=N,qe===s&&s!==null&&(qe=s=s.return);continue}break}while(!0)}function _0(){var e=Mo.current;return Mo.current=zo,e===null?zo:e}function Wx(){(Ge===0||Ge===3||Ge===2)&&(Ge=4),Xe===null||!(Nr&268435455)&&!(ac&268435455)||xs(Xe,st)}function Oo(e,t){var s=ye;ye|=2;var r=_0();(Xe!==e||st!==t)&&(An=null,fr(e,t));do try{sv();break}catch(a){I0(e,a)}while(!0);if(Px(),ye=s,Mo.current=r,qe!==null)throw Error(U(261));return Xe=null,st=0,Ge}function sv(){for(;qe!==null;)$0(qe)}function rv(){for(;qe!==null&&!zb();)$0(qe)}function $0(e){var t=H0(e.alternate,e,Dt);e.memoizedProps=e.pendingProps,t===null?U0(e):qe=t,Ux.current=null}function U0(e){var t=e;do{var s=t.alternate;if(e=t.return,t.flags&32768){if(s=J1(s,t),s!==null){s.flags&=32767,qe=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ge=6,qe=null;return}}else if(s=Y1(s,t,Dt),s!==null){qe=s;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);Ge===0&&(Ge=5)}function Zs(e,t,s){var r=we,a=Qt.transition;try{Qt.transition=null,we=1,av(e,t,s,r)}finally{Qt.transition=a,we=r}return null}function av(e,t,s,r){do ha();while(ks!==null);if(ye&6)throw Error(U(327));s=e.finishedWork;var a=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var i=s.lanes|s.childLanes;if(_b(e,i),e===Xe&&(qe=Xe=null,st=0),!(s.subtreeFlags&2064)&&!(s.flags&2064)||Al||(Al=!0,q0(ho,function(){return ha(),null})),i=(s.flags&15990)!==0,s.subtreeFlags&15990||i){i=Qt.transition,Qt.transition=null;var l=we;we=1;var o=ye;ye|=4,Ux.current=null,Z1(e,s),L0(s,e),S1(Yd),po=!!Gd,Yd=Gd=null,e.current=s,ev(s),Mb(),ye=o,we=l,Qt.transition=i}else e.current=s;if(Al&&(Al=!1,ks=e,Ro=a),i=e.pendingLanes,i===0&&(Ts=null),Ob(s.stateNode),Mt(e,$e()),t!==null)for(r=e.onRecoverableError,s=0;s<t.length;s++)a=t[s],r(a.value,{componentStack:a.stack,digest:a.digest});if(To)throw To=!1,e=pu,pu=null,e;return Ro&1&&e.tag!==0&&ha(),i=e.pendingLanes,i&1?e===gu?Ei++:(Ei=0,gu=e):Ei=0,Us(),null}function ha(){if(ks!==null){var e=jp(Ro),t=Qt.transition,s=we;try{if(Qt.transition=null,we=16>e?16:e,ks===null)var r=!1;else{if(e=ks,ks=null,Ro=0,ye&6)throw Error(U(331));var a=ye;for(ye|=4,Q=e.current;Q!==null;){var i=Q,l=i.child;if(Q.flags&16){var o=i.deletions;if(o!==null){for(var c=0;c<o.length;c++){var u=o[c];for(Q=u;Q!==null;){var x=Q;switch(x.tag){case 0:case 11:case 15:Si(8,x,i)}var f=x.child;if(f!==null)f.return=x,Q=f;else for(;Q!==null;){x=Q;var g=x.sibling,v=x.return;if(R0(x),x===u){Q=null;break}if(g!==null){g.return=v,Q=g;break}Q=v}}}var y=i.alternate;if(y!==null){var j=y.child;if(j!==null){y.child=null;do{var w=j.sibling;j.sibling=null,j=w}while(j!==null)}}Q=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,Q=l;else e:for(;Q!==null;){if(i=Q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Si(9,i,i.return)}var h=i.sibling;if(h!==null){h.return=i.return,Q=h;break e}Q=i.return}}var d=e.current;for(Q=d;Q!==null;){l=Q;var p=l.child;if(l.subtreeFlags&2064&&p!==null)p.return=l,Q=p;else e:for(l=d;Q!==null;){if(o=Q,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:rc(9,o)}}catch(N){Ie(o,o.return,N)}if(o===l){Q=null;break e}var b=o.sibling;if(b!==null){b.return=o.return,Q=b;break e}Q=o.return}}if(ye=a,Us(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(Yo,e)}catch{}r=!0}return r}finally{we=s,Qt.transition=t}}return!1}function Mh(e,t,s){t=Oa(s,t),t=j0(e,t,1),e=Ms(e,t,1),t=bt(),e!==null&&(cl(e,1,t),Mt(e,t))}function Ie(e,t,s){if(e.tag===3)Mh(e,e,s);else for(;t!==null;){if(t.tag===3){Mh(t,e,s);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ts===null||!Ts.has(r))){e=Oa(s,e),e=N0(t,e,1),t=Ms(t,e,1),e=bt(),t!==null&&(cl(t,1,e),Mt(t,e));break}}t=t.return}}function iv(e,t,s){var r=e.pingCache;r!==null&&r.delete(t),t=bt(),e.pingedLanes|=e.suspendedLanes&s,Xe===e&&(st&s)===s&&(Ge===4||Ge===3&&(st&130023424)===st&&500>$e()-Hx?fr(e,0):Bx|=s),Mt(e,t)}function B0(e,t){t===0&&(e.mode&1?(t=Cl,Cl<<=1,!(Cl&130023424)&&(Cl=4194304)):t=1);var s=bt();e=Gn(e,t),e!==null&&(cl(e,t,s),Mt(e,s))}function lv(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),B0(e,s)}function ov(e,t){var s=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(s=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),B0(e,s)}var H0;H0=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pt.current)Et=!0;else{if(!(e.lanes&s)&&!(t.flags&128))return Et=!1,G1(e,t,s);Et=!!(e.flags&131072)}else Et=!1,Te&&t.flags&1048576&&Vp(t,wo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;no(e,t),e=t.pendingProps;var a=za(t,xt.current);ma(t,s),a=Ax(null,t,r,e,a,s);var i=Fx();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(i=!0,jo(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Tx(t),a.updater=sc,t.stateNode=a,a._reactInternals=t,au(t,r,e,s),t=ou(null,t,r,!0,i,s)):(t.tag=0,Te&&i&&kx(t),pt(null,t,a,s),t=t.child),t;case 16:r=t.elementType;e:{switch(no(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=dv(r),e=an(r,e),a){case 0:t=lu(null,t,r,e,s);break e;case 1:t=vh(null,t,r,e,s);break e;case 11:t=yh(null,t,r,e,s);break e;case 14:t=bh(null,t,r,an(r.type,e),s);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:an(r,a),lu(e,t,r,a,s);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:an(r,a),vh(e,t,r,a,s);case 3:e:{if(C0(t),e===null)throw Error(U(387));r=t.pendingProps,i=t.memoizedState,a=i.element,Zp(e,t),Co(t,r,null,s);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Oa(Error(U(423)),t),t=jh(e,t,r,s,a);break e}else if(r!==a){a=Oa(Error(U(424)),t),t=jh(e,t,r,s,a);break e}else for(At=zs(t.stateNode.containerInfo.firstChild),Ft=t,Te=!0,cn=null,s=Jp(t,null,r,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ma(),r===a){t=Yn(e,t,s);break e}pt(e,t,r,s)}t=t.child}return t;case 5:return e0(t),e===null&&nu(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,l=a.children,Jd(r,a)?l=null:i!==null&&Jd(r,i)&&(t.flags|=32),S0(e,t),pt(e,t,l,s),t.child;case 6:return e===null&&nu(t),null;case 13:return E0(e,t,s);case 4:return Rx(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ta(t,null,r,s):pt(e,t,r,s),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:an(r,a),yh(e,t,r,a,s);case 7:return pt(e,t,t.pendingProps,s),t.child;case 8:return pt(e,t,t.pendingProps.children,s),t.child;case 12:return pt(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,l=a.value,Ee(ko,r._currentValue),r._currentValue=l,i!==null)if(hn(i.value,l)){if(i.children===a.children&&!Pt.current){t=Yn(e,t,s);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Kn(-1,s&-s),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var x=u.pending;x===null?c.next=c:(c.next=x.next,x.next=c),u.pending=c}}i.lanes|=s,c=i.alternate,c!==null&&(c.lanes|=s),su(i.return,s,t),o.lanes|=s;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=s,o=l.alternate,o!==null&&(o.lanes|=s),su(l,s,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}pt(e,t,a.children,s),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,ma(t,s),a=Jt(a),r=r(a),t.flags|=1,pt(e,t,r,s),t.child;case 14:return r=t.type,a=an(r,t.pendingProps),a=an(r.type,a),bh(e,t,r,a,s);case 15:return w0(e,t,t.type,t.pendingProps,s);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:an(r,a),no(e,t),t.tag=1,zt(r)?(e=!0,jo(t)):e=!1,ma(t,s),v0(t,r,a),au(t,r,a,s),ou(null,t,r,!0,e,s);case 19:return P0(e,t,s);case 22:return k0(e,t,s)}throw Error(U(156,t.tag))};function q0(e,t){return gp(e,t)}function cv(e,t,s,r){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,s,r){return new cv(e,t,s,r)}function Vx(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dv(e){if(typeof e=="function")return Vx(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xx)return 11;if(e===mx)return 14}return 2}function Os(e,t){var s=e.alternate;return s===null?(s=Vt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function ao(e,t,s,r,a,i){var l=2;if(r=e,typeof e=="function")Vx(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Yr:return pr(s.children,a,i,t);case ux:l=8,a|=8;break;case zd:return e=Vt(12,s,t,a|2),e.elementType=zd,e.lanes=i,e;case Md:return e=Vt(13,s,t,a),e.elementType=Md,e.lanes=i,e;case Td:return e=Vt(19,s,t,a),e.elementType=Td,e.lanes=i,e;case ep:return ic(s,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xf:l=10;break e;case Zf:l=9;break e;case xx:l=11;break e;case mx:l=14;break e;case ls:l=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Vt(l,s,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function pr(e,t,s,r){return e=Vt(7,e,r,t),e.lanes=s,e}function ic(e,t,s,r){return e=Vt(22,e,r,t),e.elementType=ep,e.lanes=s,e.stateNode={isHidden:!1},e}function Zc(e,t,s){return e=Vt(6,e,null,t),e.lanes=s,e}function ed(e,t,s){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uv(e,t,s,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Dc(0),this.expirationTimes=Dc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dc(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Qx(e,t,s,r,a,i,l,o,c){return e=new uv(e,t,s,o,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Vt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tx(i),e}function xv(e,t,s){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:s}}function K0(e){if(!e)return Fs;e=e._reactInternals;e:{if(Mr(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var s=e.type;if(zt(s))return Kp(e,s,t)}return t}function W0(e,t,s,r,a,i,l,o,c){return e=Qx(s,r,!0,e,a,i,l,o,c),e.context=K0(null),s=e.current,r=bt(),a=Rs(s),i=Kn(r,a),i.callback=t??null,Ms(s,i,a),e.current.lanes=a,cl(e,a,r),Mt(e,r),e}function lc(e,t,s,r){var a=t.current,i=bt(),l=Rs(a);return s=K0(s),t.context===null?t.context=s:t.pendingContext=s,t=Kn(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ms(a,t,l),e!==null&&(xn(e,a,l,i),Zl(e,a,l)),l}function Do(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Th(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Gx(e,t){Th(e,t),(e=e.alternate)&&Th(e,t)}function mv(){return null}var V0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yx(e){this._internalRoot=e}oc.prototype.render=Yx.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));lc(e,t,null,null)};oc.prototype.unmount=Yx.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wr(function(){lc(null,e,null,null)}),t[Qn]=null}};function oc(e){this._internalRoot=e}oc.prototype.unstable_scheduleHydration=function(e){if(e){var t=kp();e={blockedOn:null,target:e,priority:t};for(var s=0;s<us.length&&t!==0&&t<us[s].priority;s++);us.splice(s,0,e),s===0&&Cp(e)}};function Jx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Rh(){}function hv(e,t,s,r,a){if(a){if(typeof r=="function"){var i=r;r=function(){var u=Do(l);i.call(u)}}var l=W0(t,r,e,0,null,!1,!1,"",Rh);return e._reactRootContainer=l,e[Qn]=l.current,Ai(e.nodeType===8?e.parentNode:e),wr(),l}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var o=r;r=function(){var u=Do(c);o.call(u)}}var c=Qx(e,0,!1,null,null,!1,!1,"",Rh);return e._reactRootContainer=c,e[Qn]=c.current,Ai(e.nodeType===8?e.parentNode:e),wr(function(){lc(t,c,s,r)}),c}function dc(e,t,s,r,a){var i=s._reactRootContainer;if(i){var l=i;if(typeof a=="function"){var o=a;a=function(){var c=Do(l);o.call(c)}}lc(t,l,e,a)}else l=hv(s,t,e,a,r);return Do(l)}Np=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=mi(t.pendingLanes);s!==0&&(px(t,s|1),Mt(t,$e()),!(ye&6)&&(Da=$e()+500,Us()))}break;case 13:wr(function(){var r=Gn(e,1);if(r!==null){var a=bt();xn(r,e,1,a)}}),Gx(e,1)}};gx=function(e){if(e.tag===13){var t=Gn(e,134217728);if(t!==null){var s=bt();xn(t,e,134217728,s)}Gx(e,134217728)}};wp=function(e){if(e.tag===13){var t=Rs(e),s=Gn(e,t);if(s!==null){var r=bt();xn(s,e,t,r)}Gx(e,t)}};kp=function(){return we};Sp=function(e,t){var s=we;try{return we=e,t()}finally{we=s}};Ud=function(e,t,s){switch(t){case"input":if(Dd(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var r=s[t];if(r!==e&&r.form===e.form){var a=ec(r);if(!a)throw Error(U(90));np(r),Dd(r,a)}}}break;case"textarea":rp(e,s);break;case"select":t=s.value,t!=null&&ca(e,!!s.multiple,t,!1)}};up=qx;xp=wr;var fv={usingClientEntryPoint:!1,Events:[ul,ea,ec,cp,dp,qx]},ei={findFiberByHostInstance:tr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},pv={bundleType:ei.bundleType,version:ei.version,rendererPackageName:ei.rendererPackageName,rendererConfig:ei.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fp(e),e===null?null:e.stateNode},findFiberByHostInstance:ei.findFiberByHostInstance||mv,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 Fl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fl.isDisabled&&Fl.supportsFiber)try{Yo=Fl.inject(pv),wn=Fl}catch{}}_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fv;_t.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jx(t))throw Error(U(200));return xv(e,t,null,s)};_t.createRoot=function(e,t){if(!Jx(e))throw Error(U(299));var s=!1,r="",a=V0;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Qx(e,1,!1,null,null,s,!1,r,a),e[Qn]=t.current,Ai(e.nodeType===8?e.parentNode:e),new Yx(t)};_t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=fp(t),e=e===null?null:e.stateNode,e};_t.flushSync=function(e){return wr(e)};_t.hydrate=function(e,t,s){if(!cc(t))throw Error(U(200));return dc(null,e,t,!0,s)};_t.hydrateRoot=function(e,t,s){if(!Jx(e))throw Error(U(405));var r=s!=null&&s.hydratedSources||null,a=!1,i="",l=V0;if(s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(i=s.identifierPrefix),s.onRecoverableError!==void 0&&(l=s.onRecoverableError)),t=W0(t,null,e,1,s??null,a,!1,i,l),e[Qn]=t.current,Ai(e),r)for(e=0;e<r.length;e++)s=r[e],a=s._getVersion,a=a(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,a]:t.mutableSourceEagerHydrationData.push(s,a);return new oc(t)};_t.render=function(e,t,s){if(!cc(t))throw Error(U(200));return dc(null,e,t,!1,s)};_t.unmountComponentAtNode=function(e){if(!cc(e))throw Error(U(40));return e._reactRootContainer?(wr(function(){dc(null,null,e,!1,function(){e._reactRootContainer=null,e[Qn]=null})}),!0):!1};_t.unstable_batchedUpdates=qx;_t.unstable_renderSubtreeIntoContainer=function(e,t,s,r){if(!cc(s))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return dc(e,t,s,!1,r)};_t.version="18.3.1-next-f1338f8080-20240426";function Q0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Q0)}catch(e){console.error(e)}}Q0(),Qf.exports=_t;var gv=Qf.exports,G0,Oh=gv;G0=Oh.createRoot,Oh.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ki.apply(this,arguments)}var Ss;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ss||(Ss={}));const Dh="popstate";function yv(e){e===void 0&&(e={});function t(r,a){let{pathname:i,search:l,hash:o}=r.location;return vu("",{pathname:i,search:l,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function s(r,a){return typeof a=="string"?a:Lo(a)}return vv(t,s,null,e)}function _e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xx(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bv(){return Math.random().toString(36).substr(2,8)}function Lh(e,t){return{usr:e.state,key:e.key,idx:t}}function vu(e,t,s,r){return s===void 0&&(s=null),Ki({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ba(t):t,{state:s,key:t&&t.key||r||bv()})}function Lo(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ba(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function vv(e,t,s,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,o=Ss.Pop,c=null,u=x();u==null&&(u=0,l.replaceState(Ki({},l.state,{idx:u}),""));function x(){return(l.state||{idx:null}).idx}function f(){o=Ss.Pop;let w=x(),h=w==null?null:w-u;u=w,c&&c({action:o,location:j.location,delta:h})}function g(w,h){o=Ss.Push;let d=vu(j.location,w,h);u=x()+1;let p=Lh(d,u),b=j.createHref(d);try{l.pushState(p,"",b)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(b)}i&&c&&c({action:o,location:j.location,delta:1})}function v(w,h){o=Ss.Replace;let d=vu(j.location,w,h);u=x();let p=Lh(d,u),b=j.createHref(d);l.replaceState(p,"",b),i&&c&&c({action:o,location:j.location,delta:0})}function y(w){let h=a.location.origin!=="null"?a.location.origin:a.location.href,d=typeof w=="string"?w:Lo(w);return d=d.replace(/ $/,"%20"),_e(h,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,h)}let j={get action(){return o},get location(){return e(a,l)},listen(w){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(Dh,f),c=w,()=>{a.removeEventListener(Dh,f),c=null}},createHref(w){return t(a,w)},createURL:y,encodeLocation(w){let h=y(w);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:g,replace:v,go(w){return l.go(w)}};return j}var Ah;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ah||(Ah={}));function jv(e,t,s){return s===void 0&&(s="/"),Nv(e,t,s)}function Nv(e,t,s,r){let a=typeof t=="string"?Ba(t):t,i=La(a.pathname||"/",s);if(i==null)return null;let l=Y0(e);wv(l);let o=null;for(let c=0;o==null&&c<l.length;++c){let u=Dv(i);o=Rv(l[c],u)}return o}function Y0(e,t,s,r){t===void 0&&(t=[]),s===void 0&&(s=[]),r===void 0&&(r="");let a=(i,l,o)=>{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};c.relativePath.startsWith("/")&&(_e(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ds([r,c.relativePath]),x=s.concat(c);i.children&&i.children.length>0&&(_e(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Y0(i.children,t,x,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Mv(u,i.index),routesMeta:x})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,l);else for(let c of J0(i.path))a(i,l,c)}),t}function J0(e){let t=e.split("/");if(t.length===0)return[];let[s,...r]=t,a=s.endsWith("?"),i=s.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let l=J0(r.join("/")),o=[];return o.push(...l.map(c=>c===""?i:[i,c].join("/"))),a&&o.push(...l),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function wv(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:Tv(t.routesMeta.map(r=>r.childrenIndex),s.routesMeta.map(r=>r.childrenIndex)))}const kv=/^:[\w-]+$/,Sv=3,Cv=2,Ev=1,Pv=10,zv=-2,Fh=e=>e==="*";function Mv(e,t){let s=e.split("/"),r=s.length;return s.some(Fh)&&(r+=zv),t&&(r+=Cv),s.filter(a=>!Fh(a)).reduce((a,i)=>a+(kv.test(i)?Sv:i===""?Ev:Pv),r)}function Tv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Rv(e,t,s){let{routesMeta:r}=e,a={},i="/",l=[];for(let o=0;o<r.length;++o){let c=r[o],u=o===r.length-1,x=i==="/"?t:t.slice(i.length)||"/",f=ju({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},x),g=c.route;if(!f)return null;Object.assign(a,f.params),l.push({params:a,pathname:Ds([i,f.pathname]),pathnameBase:_v(Ds([i,f.pathnameBase])),route:g}),f.pathnameBase!=="/"&&(i=Ds([i,f.pathnameBase]))}return l}function ju(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,r]=Ov(e.path,e.caseSensitive,e.end),a=t.match(s);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((u,x,f)=>{let{paramName:g,isOptional:v}=x;if(g==="*"){let j=o[f]||"";l=i.slice(0,i.length-j.length).replace(/(.)\/+$/,"$1")}const y=o[f];return v&&!y?u[g]=void 0:u[g]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function Ov(e,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),Xx(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Dv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xx(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function La(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&r!=="/"?null:e.slice(s)||"/"}const Lv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Av=e=>Lv.test(e);function Fv(e,t){t===void 0&&(t="/");let{pathname:s,search:r="",hash:a=""}=typeof e=="string"?Ba(e):e,i;if(s)if(Av(s))i=s;else{if(s.includes("//")){let l=s;s=s.replace(/\/\/+/g,"/"),Xx(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+s))}s.startsWith("/")?i=Ih(s.substring(1),"/"):i=Ih(s,t)}else i=t;return{pathname:i,search:$v(r),hash:Uv(a)}}function Ih(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function td(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Iv(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function X0(e,t){let s=Iv(e);return t?s.map((r,a)=>a===s.length-1?r.pathname:r.pathnameBase):s.map(r=>r.pathnameBase)}function Z0(e,t,s,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Ba(e):(a=Ki({},e),_e(!a.pathname||!a.pathname.includes("?"),td("?","pathname","search",a)),_e(!a.pathname||!a.pathname.includes("#"),td("#","pathname","hash",a)),_e(!a.search||!a.search.includes("#"),td("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=s;else{let f=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),f-=1;a.pathname=g.join("/")}o=f>=0?t[f]:"/"}let c=Fv(a,o),u=l&&l!=="/"&&l.endsWith("/"),x=(i||l===".")&&s.endsWith("/");return!c.pathname.endsWith("/")&&(u||x)&&(c.pathname+="/"),c}const Ds=e=>e.join("/").replace(/\/\/+/g,"/"),_v=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$v=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Uv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Bv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const eg=["post","put","patch","delete"];new Set(eg);const Hv=["get",...eg];new Set(Hv);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function Wi(){return Wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Wi.apply(this,arguments)}const uc=m.createContext(null),tg=m.createContext(null),Bs=m.createContext(null),xc=m.createContext(null),Hs=m.createContext({outlet:null,matches:[],isDataRoute:!1}),ng=m.createContext(null);function qv(e,t){let{relative:s}=t===void 0?{}:t;ml()||_e(!1);let{basename:r,navigator:a}=m.useContext(Bs),{hash:i,pathname:l,search:o}=mc(e,{relative:s}),c=l;return r!=="/"&&(c=l==="/"?r:Ds([r,l])),a.createHref({pathname:c,search:o,hash:i})}function ml(){return m.useContext(xc)!=null}function qs(){return ml()||_e(!1),m.useContext(xc).location}function sg(e){m.useContext(Bs).static||m.useLayoutEffect(e)}function En(){let{isDataRoute:e}=m.useContext(Hs);return e?rj():Kv()}function Kv(){ml()||_e(!1);let e=m.useContext(uc),{basename:t,future:s,navigator:r}=m.useContext(Bs),{matches:a}=m.useContext(Hs),{pathname:i}=qs(),l=JSON.stringify(X0(a,s.v7_relativeSplatPath)),o=m.useRef(!1);return sg(()=>{o.current=!0}),m.useCallback(function(u,x){if(x===void 0&&(x={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let f=Z0(u,JSON.parse(l),i,x.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ds([t,f.pathname])),(x.replace?r.replace:r.push)(f,x.state,x)},[t,r,l,i,e])}function Wv(){let{matches:e}=m.useContext(Hs),t=e[e.length-1];return t?t.params:{}}function mc(e,t){let{relative:s}=t===void 0?{}:t,{future:r}=m.useContext(Bs),{matches:a}=m.useContext(Hs),{pathname:i}=qs(),l=JSON.stringify(X0(a,r.v7_relativeSplatPath));return m.useMemo(()=>Z0(e,JSON.parse(l),i,s==="path"),[e,l,i,s])}function Vv(e,t){return Qv(e,t)}function Qv(e,t,s,r){ml()||_e(!1);let{navigator:a}=m.useContext(Bs),{matches:i}=m.useContext(Hs),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let c=l?l.pathnameBase:"/";l&&l.route;let u=qs(),x;if(t){var f;let w=typeof t=="string"?Ba(t):t;c==="/"||(f=w.pathname)!=null&&f.startsWith(c)||_e(!1),x=w}else x=u;let g=x.pathname||"/",v=g;if(c!=="/"){let w=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=jv(e,{pathname:v}),j=Zv(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Ds([c,a.encodeLocation?a.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:Ds([c,a.encodeLocation?a.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,s,r);return t&&j?m.createElement(xc.Provider,{value:{location:Wi({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:Ss.Pop}},j):j}function Gv(){let e=sj(),t=Bv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),s?m.createElement("pre",{style:a},s):null,null)}const Yv=m.createElement(Gv,null);class Jv extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?m.createElement(Hs.Provider,{value:this.props.routeContext},m.createElement(ng.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Xv(e){let{routeContext:t,match:s,children:r}=e,a=m.useContext(uc);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),m.createElement(Hs.Provider,{value:t},r)}function Zv(e,t,s,r){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),r===void 0&&(r=null),e==null){var i;if(!s)return null;if(s.errors)e=s.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let l=e,o=(a=s)==null?void 0:a.errors;if(o!=null){let x=l.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);x>=0||_e(!1),l=l.slice(0,Math.min(l.length,x+1))}let c=!1,u=-1;if(s&&r&&r.v7_partialHydration)for(let x=0;x<l.length;x++){let f=l[x];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=x),f.route.id){let{loaderData:g,errors:v}=s,y=f.route.loader&&g[f.route.id]===void 0&&(!v||v[f.route.id]===void 0);if(f.route.lazy||y){c=!0,u>=0?l=l.slice(0,u+1):l=[l[0]];break}}}return l.reduceRight((x,f,g)=>{let v,y=!1,j=null,w=null;s&&(v=o&&f.route.id?o[f.route.id]:void 0,j=f.route.errorElement||Yv,c&&(u<0&&g===0?(aj("route-fallback"),y=!0,w=null):u===g&&(y=!0,w=f.route.hydrateFallbackElement||null)));let h=t.concat(l.slice(0,g+1)),d=()=>{let p;return v?p=j:y?p=w:f.route.Component?p=m.createElement(f.route.Component,null):f.route.element?p=f.route.element:p=x,m.createElement(Xv,{match:f,routeContext:{outlet:x,matches:h,isDataRoute:s!=null},children:p})};return s&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?m.createElement(Jv,{location:s.location,revalidation:s.revalidation,component:j,error:v,children:d(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):d()},null)}var rg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(rg||{}),ag=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ag||{});function ej(e){let t=m.useContext(uc);return t||_e(!1),t}function tj(e){let t=m.useContext(tg);return t||_e(!1),t}function nj(e){let t=m.useContext(Hs);return t||_e(!1),t}function ig(e){let t=nj(),s=t.matches[t.matches.length-1];return s.route.id||_e(!1),s.route.id}function sj(){var e;let t=m.useContext(ng),s=tj(),r=ig();return t!==void 0?t:(e=s.errors)==null?void 0:e[r]}function rj(){let{router:e}=ej(rg.UseNavigateStable),t=ig(ag.UseNavigateStable),s=m.useRef(!1);return sg(()=>{s.current=!0}),m.useCallback(function(a,i){i===void 0&&(i={}),s.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Wi({fromRouteId:t},i)))},[e,t])}const _h={};function aj(e,t,s){_h[e]||(_h[e]=!0)}function ij(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function wt(e){_e(!1)}function lj(e){let{basename:t="/",children:s=null,location:r,navigationType:a=Ss.Pop,navigator:i,static:l=!1,future:o}=e;ml()&&_e(!1);let c=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:c,navigator:i,static:l,future:Wi({v7_relativeSplatPath:!1},o)}),[c,o,i,l]);typeof r=="string"&&(r=Ba(r));let{pathname:x="/",search:f="",hash:g="",state:v=null,key:y="default"}=r,j=m.useMemo(()=>{let w=La(x,c);return w==null?null:{location:{pathname:w,search:f,hash:g,state:v,key:y},navigationType:a}},[c,x,f,g,v,y,a]);return j==null?null:m.createElement(Bs.Provider,{value:u},m.createElement(xc.Provider,{children:s,value:j}))}function oj(e){let{children:t,location:s}=e;return Vv(Nu(t),s)}new Promise(()=>{});function Nu(e,t){t===void 0&&(t=[]);let s=[];return m.Children.forEach(e,(r,a)=>{if(!m.isValidElement(r))return;let i=[...t,a];if(r.type===m.Fragment){s.push.apply(s,Nu(r.props.children,i));return}r.type!==wt&&_e(!1),!r.props.index||!r.props.children||_e(!1);let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Nu(r.props.children,i)),s.push(l)}),s}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ao.apply(this,arguments)}function lg(e,t){if(e==null)return{};var s={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(s[a]=e[a]);return s}function cj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dj(e,t){return e.button===0&&(!t||t==="_self")&&!cj(e)}const uj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],xj=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],mj="6";try{window.__reactRouterVersion=mj}catch{}const hj=m.createContext({isTransitioning:!1}),fj="startTransition",$h=ib[fj];function pj(e){let{basename:t,children:s,future:r,window:a}=e,i=m.useRef();i.current==null&&(i.current=yv({window:a,v5Compat:!0}));let l=i.current,[o,c]=m.useState({action:l.action,location:l.location}),{v7_startTransition:u}=r||{},x=m.useCallback(f=>{u&&$h?$h(()=>c(f)):c(f)},[c,u]);return m.useLayoutEffect(()=>l.listen(x),[l,x]),m.useEffect(()=>ij(r),[r]),m.createElement(lj,{basename:t,children:s,location:o.location,navigationType:o.action,navigator:l,future:r})}const gj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bj=m.forwardRef(function(t,s){let{onClick:r,relative:a,reloadDocument:i,replace:l,state:o,target:c,to:u,preventScrollReset:x,viewTransition:f}=t,g=lg(t,uj),{basename:v}=m.useContext(Bs),y,j=!1;if(typeof u=="string"&&yj.test(u)&&(y=u,gj))try{let p=new URL(window.location.href),b=u.startsWith("//")?new URL(p.protocol+u):new URL(u),N=La(b.pathname,v);b.origin===p.origin&&N!=null?u=N+b.search+b.hash:j=!0}catch{}let w=qv(u,{relative:a}),h=Nj(u,{replace:l,state:o,target:c,preventScrollReset:x,relative:a,viewTransition:f});function d(p){r&&r(p),p.defaultPrevented||h(p)}return m.createElement("a",Ao({},g,{href:y||w,onClick:j||i?r:d,ref:s,target:c}))}),vj=m.forwardRef(function(t,s){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:l=!1,style:o,to:c,viewTransition:u,children:x}=t,f=lg(t,xj),g=mc(c,{relative:f.relative}),v=qs(),y=m.useContext(tg),{navigator:j,basename:w}=m.useContext(Bs),h=y!=null&&wj(g)&&u===!0,d=j.encodeLocation?j.encodeLocation(g).pathname:g.pathname,p=v.pathname,b=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(p=p.toLowerCase(),b=b?b.toLowerCase():null,d=d.toLowerCase()),b&&w&&(b=La(b,w)||b);const N=d!=="/"&&d.endsWith("/")?d.length-1:d.length;let C=p===d||!l&&p.startsWith(d)&&p.charAt(N)==="/",R=b!=null&&(b===d||!l&&b.startsWith(d)&&b.charAt(d.length)==="/"),P={isActive:C,isPending:R,isTransitioning:h},_=C?r:void 0,D;typeof i=="function"?D=i(P):D=[i,C?"active":null,R?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let G=typeof o=="function"?o(P):o;return m.createElement(bj,Ao({},f,{"aria-current":_,className:D,ref:s,style:G,to:c,viewTransition:u}),typeof x=="function"?x(P):x)});var wu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wu||(wu={}));var Uh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Uh||(Uh={}));function jj(e){let t=m.useContext(uc);return t||_e(!1),t}function Nj(e,t){let{target:s,replace:r,state:a,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,c=En(),u=qs(),x=mc(e,{relative:l});return m.useCallback(f=>{if(dj(f,s)){f.preventDefault();let g=r!==void 0?r:Lo(u)===Lo(x);c(e,{replace:g,state:a,preventScrollReset:i,relative:l,viewTransition:o})}},[u,c,x,r,a,s,e,i,l,o])}function wj(e,t){t===void 0&&(t={});let s=m.useContext(hj);s==null&&_e(!1);let{basename:r}=jj(wu.useViewTransitionState),a=mc(e,{relative:t.relative});if(!s.isTransitioning)return!1;let i=La(s.currentLocation.pathname,r)||s.currentLocation.pathname,l=La(s.nextLocation.pathname,r)||s.nextLocation.pathname;return ju(a.pathname,l)!=null||ju(a.pathname,i)!=null}var Ha=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ir,hs,pa,Cf,kj=(Cf=class extends Ha{constructor(){super();Z(this,ir);Z(this,hs);Z(this,pa);V(this,pa,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){k(this,hs)||this.setEventListener(k(this,pa))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,hs))==null||t.call(this),V(this,hs,void 0))}setEventListener(t){var s;V(this,pa,t),(s=k(this,hs))==null||s.call(this),V(this,hs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,ir)!==t&&(V(this,ir,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof k(this,ir)=="boolean"?k(this,ir):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ir=new WeakMap,hs=new WeakMap,pa=new WeakMap,Cf),Zx=new kj,Sj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fs,sx,Ef,Cj=(Ef=class{constructor(){Z(this,fs,Sj);Z(this,sx,!1)}setTimeoutProvider(e){V(this,fs,e)}setTimeout(e,t){return k(this,fs).setTimeout(e,t)}clearTimeout(e){k(this,fs).clearTimeout(e)}setInterval(e,t){return k(this,fs).setInterval(e,t)}clearInterval(e){k(this,fs).clearInterval(e)}},fs=new WeakMap,sx=new WeakMap,Ef),rr=new Cj;function Ej(e){setTimeout(e,0)}var Pj=typeof window>"u"||"Deno"in globalThis;function gt(){}function zj(e,t){return typeof e=="function"?e(t):e}function ku(e){return typeof e=="number"&&e>=0&&e!==1/0}function og(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ls(e,t){return typeof e=="function"?e(t):e}function qt(e,t){return typeof e=="function"?e(t):e}function Bh(e,t){const{type:s="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:o}=e;if(l){if(r){if(t.queryHash!==em(l,t.options))return!1}else if(!Vi(t.queryKey,l))return!1}if(s!=="all"){const c=t.isActive();if(s==="active"&&!c||s==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function Hh(e,t){const{exact:s,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(s){if(kr(t.options.mutationKey)!==kr(i))return!1}else if(!Vi(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function em(e,t){return((t==null?void 0:t.queryKeyHashFn)||kr)(e)}function kr(e){return JSON.stringify(e,(t,s)=>Su(s)?Object.keys(s).sort().reduce((r,a)=>(r[a]=s[a],r),{}):s)}function Vi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>Vi(e[s],t[s])):!1}var Mj=Object.prototype.hasOwnProperty;function cg(e,t,s=0){if(e===t)return e;if(s>500)return t;const r=qh(e)&&qh(t);if(!r&&!(Su(e)&&Su(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),o=l.length,c=r?new Array(o):{};let u=0;for(let x=0;x<o;x++){const f=r?x:l[x],g=e[f],v=t[f];if(g===v){c[f]=g,(r?x<i:Mj.call(e,f))&&u++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){c[f]=v;continue}const y=cg(g,v,s+1);c[f]=y,y===g&&u++}return i===o&&u===i?e:c}function Fo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function qh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Su(e){if(!Kh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Kh(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Kh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Tj(e){return new Promise(t=>{rr.setTimeout(t,e)})}function Cu(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?cg(e,t):t}function Rj(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function Oj(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var tm=Symbol();function dg(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===tm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function nm(e,t){return typeof e=="function"?e(...t):!!e}function Dj(e,t,s){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),e}var Qi=(()=>{let e=()=>Pj;return{isServer(){return e()},setIsServer(t){e=t}}})();function Eu(){let e,t;const s=new Promise((a,i)=>{e=a,t=i});s.status="pending",s.catch(()=>{});function r(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},s.reject=a=>{r({status:"rejected",reason:a}),t(a)},s}var Lj=Ej;function Aj(){let e=[],t=0,s=o=>{o()},r=o=>{o()},a=Lj;const i=o=>{t?e.push(o):a(()=>{s(o)})},l=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(c=>{s(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||l()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var Ve=Aj(),ga,ps,ya,Pf,Fj=(Pf=class extends Ha{constructor(){super();Z(this,ga,!0);Z(this,ps);Z(this,ya);V(this,ya,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,ps)||this.setEventListener(k(this,ya))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,ps))==null||t.call(this),V(this,ps,void 0))}setEventListener(t){var s;V(this,ya,t),(s=k(this,ps))==null||s.call(this),V(this,ps,t(this.setOnline.bind(this)))}setOnline(t){k(this,ga)!==t&&(V(this,ga,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,ga)}},ga=new WeakMap,ps=new WeakMap,ya=new WeakMap,Pf),Io=new Fj;function Ij(e){return Math.min(1e3*2**e,3e4)}function ug(e){return(e??"online")==="online"?Io.isOnline():!0}var Pu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xg(e){let t=!1,s=0,r;const a=Eu(),i=()=>a.status!=="pending",l=j=>{var w;if(!i()){const h=new Pu(j);g(h),(w=e.onCancel)==null||w.call(e,h)}},o=()=>{t=!0},c=()=>{t=!1},u=()=>Zx.isFocused()&&(e.networkMode==="always"||Io.isOnline())&&e.canRun(),x=()=>ug(e.networkMode)&&e.canRun(),f=j=>{i()||(r==null||r(),a.resolve(j))},g=j=>{i()||(r==null||r(),a.reject(j))},v=()=>new Promise(j=>{var w;r=h=>{(i()||u())&&j(h)},(w=e.onPause)==null||w.call(e)}).then(()=>{var j;r=void 0,i()||(j=e.onContinue)==null||j.call(e)}),y=()=>{if(i())return;let j;const w=s===0?e.initialPromise:void 0;try{j=w??e.fn()}catch(h){j=Promise.reject(h)}Promise.resolve(j).then(f).catch(h=>{var C;if(i())return;const d=e.retry??(Qi.isServer()?0:3),p=e.retryDelay??Ij,b=typeof p=="function"?p(s,h):p,N=d===!0||typeof d=="number"&&s<d||typeof d=="function"&&d(s,h);if(t||!N){g(h);return}s++,(C=e.onFail)==null||C.call(e,s,h),Tj(b).then(()=>u()?void 0:v()).then(()=>{t?g(h):y()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:c,canStart:x,start:()=>(x()?y():v().then(y),a)}}var lr,zf,mg=(zf=class{constructor(){Z(this,lr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ku(this.gcTime)&&V(this,lr,rr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qi.isServer()?1/0:5*60*1e3))}clearGcTimeout(){k(this,lr)&&(rr.clearTimeout(k(this,lr)),V(this,lr,void 0))}},lr=new WeakMap,zf),or,ba,Ht,cr,Ye,sl,dr,Lt,hg,Ln,Mf,_j=(Mf=class extends mg{constructor(t){super();Z(this,Lt);Z(this,or);Z(this,ba);Z(this,Ht);Z(this,cr);Z(this,Ye);Z(this,sl);Z(this,dr);V(this,dr,!1),V(this,sl,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,cr,t.client),V(this,Ht,k(this,cr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,or,Vh(this.options)),this.state=t.state??k(this,or),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,Ye))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,sl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Vh(this.options);s.data!==void 0&&(this.setState(Wh(s.data,s.dataUpdatedAt)),V(this,or,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Ht).remove(this)}setData(t,s){const r=Cu(this.state.data,t,this.options);return le(this,Lt,Ln).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t,s){le(this,Lt,Ln).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var r,a;const s=(r=k(this,Ye))==null?void 0:r.promise;return(a=k(this,Ye))==null||a.cancel(t),s?s.then(gt).catch(gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return k(this,or)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ls(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!og(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=k(this,Ye))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=k(this,Ye))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(k(this,Ye)&&(k(this,dr)||le(this,Lt,hg).call(this)?k(this,Ye).cancel({revert:!0}):k(this,Ye).cancelRetry()),this.scheduleGc()),k(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||le(this,Lt,Ln).call(this,{type:"invalidate"})}async fetch(t,s){var c,u,x,f,g,v,y,j,w,h,d,p;if(this.state.fetchStatus!=="idle"&&((c=k(this,Ye))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(k(this,Ye))return k(this,Ye).continueRetry(),k(this,Ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(N=>N.options.queryFn);b&&this.setOptions(b.options)}const r=new AbortController,a=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(V(this,dr,!0),r.signal)})},i=()=>{const b=dg(this.options,s),C=(()=>{const R={client:k(this,cr),queryKey:this.queryKey,meta:this.meta};return a(R),R})();return V(this,dr,!1),this.options.persister?this.options.persister(b,C,this):b(C)},o=(()=>{const b={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:k(this,cr),state:this.state,fetchFn:i};return a(b),b})();(u=this.options.behavior)==null||u.onFetch(o,this),V(this,ba,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=o.fetchOptions)==null?void 0:x.meta))&&le(this,Lt,Ln).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta}),V(this,Ye,xg({initialPromise:s==null?void 0:s.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof Pu&&b.revert&&this.setState({...k(this,ba),fetchStatus:"idle"}),r.abort()},onFail:(b,N)=>{le(this,Lt,Ln).call(this,{type:"failed",failureCount:b,error:N})},onPause:()=>{le(this,Lt,Ln).call(this,{type:"pause"})},onContinue:()=>{le(this,Lt,Ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await k(this,Ye).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(v=(g=k(this,Ht).config).onSuccess)==null||v.call(g,b,this),(j=(y=k(this,Ht).config).onSettled)==null||j.call(y,b,this.state.error,this),b}catch(b){if(b instanceof Pu){if(b.silent)return k(this,Ye).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw le(this,Lt,Ln).call(this,{type:"error",error:b}),(h=(w=k(this,Ht).config).onError)==null||h.call(w,b,this),(p=(d=k(this,Ht).config).onSettled)==null||p.call(d,this.state.data,b,this),b}finally{this.scheduleGc()}}},or=new WeakMap,ba=new WeakMap,Ht=new WeakMap,cr=new WeakMap,Ye=new WeakMap,sl=new WeakMap,dr=new WeakMap,Lt=new WeakSet,hg=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ln=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...fg(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...Wh(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return V(this,ba,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),Ve.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Ht).notify({query:this,type:"updated",action:t})})},Mf);function fg(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ug(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Wh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Vh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var kt,ge,rl,ft,ur,va,In,gs,al,ja,Na,xr,mr,ys,wa,je,fi,zu,Mu,Tu,Ru,Ou,Du,Lu,pg,Tf,$j=(Tf=class extends Ha{constructor(t,s){super();Z(this,je);Z(this,kt);Z(this,ge);Z(this,rl);Z(this,ft);Z(this,ur);Z(this,va);Z(this,In);Z(this,gs);Z(this,al);Z(this,ja);Z(this,Na);Z(this,xr);Z(this,mr);Z(this,ys);Z(this,wa,new Set);this.options=s,V(this,kt,t),V(this,gs,null),V(this,In,Eu()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,ge).addObserver(this),Qh(k(this,ge),this.options)?le(this,je,fi).call(this):this.updateResult(),le(this,je,Ru).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Au(k(this,ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Au(k(this,ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,le(this,je,Ou).call(this),le(this,je,Du).call(this),k(this,ge).removeObserver(this)}setOptions(t){const s=this.options,r=k(this,ge);if(this.options=k(this,kt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qt(this.options.enabled,k(this,ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");le(this,je,Lu).call(this),k(this,ge).setOptions(this.options),s._defaulted&&!Fo(this.options,s)&&k(this,kt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,ge),observer:this});const a=this.hasListeners();a&&Gh(k(this,ge),r,this.options,s)&&le(this,je,fi).call(this),this.updateResult(),a&&(k(this,ge)!==r||qt(this.options.enabled,k(this,ge))!==qt(s.enabled,k(this,ge))||Ls(this.options.staleTime,k(this,ge))!==Ls(s.staleTime,k(this,ge)))&&le(this,je,zu).call(this);const i=le(this,je,Mu).call(this);a&&(k(this,ge)!==r||qt(this.options.enabled,k(this,ge))!==qt(s.enabled,k(this,ge))||i!==k(this,ys))&&le(this,je,Tu).call(this,i)}getOptimisticResult(t){const s=k(this,kt).getQueryCache().build(k(this,kt),t),r=this.createResult(s,t);return Bj(this,r)&&(V(this,ft,r),V(this,va,this.options),V(this,ur,k(this,ge).state)),r}getCurrentResult(){return k(this,ft)}trackResult(t,s){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,In).status==="pending"&&k(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){k(this,wa).add(t)}getCurrentQuery(){return k(this,ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=k(this,kt).defaultQueryOptions(t),r=k(this,kt).getQueryCache().build(k(this,kt),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return le(this,je,fi).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,ft)))}createResult(t,s){var _;const r=k(this,ge),a=this.options,i=k(this,ft),l=k(this,ur),o=k(this,va),u=t!==r?t.state:k(this,rl),{state:x}=t;let f={...x},g=!1,v;if(s._optimisticResults){const D=this.hasListeners(),G=!D&&Qh(t,s),J=D&&Gh(t,r,s,a);(G||J)&&(f={...f,...fg(x.data,t.options)}),s._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:y,errorUpdatedAt:j,status:w}=f;v=f.data;let h=!1;if(s.placeholderData!==void 0&&v===void 0&&w==="pending"){let D;i!=null&&i.isPlaceholderData&&s.placeholderData===(o==null?void 0:o.placeholderData)?(D=i.data,h=!0):D=typeof s.placeholderData=="function"?s.placeholderData((_=k(this,Na))==null?void 0:_.state.data,k(this,Na)):s.placeholderData,D!==void 0&&(w="success",v=Cu(i==null?void 0:i.data,D,s),g=!0)}if(s.select&&v!==void 0&&!h)if(i&&v===(l==null?void 0:l.data)&&s.select===k(this,al))v=k(this,ja);else try{V(this,al,s.select),v=s.select(v),v=Cu(i==null?void 0:i.data,v,s),V(this,ja,v),V(this,gs,null)}catch(D){V(this,gs,D)}k(this,gs)&&(y=k(this,gs),v=k(this,ja),j=Date.now(),w="error");const d=f.fetchStatus==="fetching",p=w==="pending",b=w==="error",N=p&&d,C=v!==void 0,P={status:w,fetchStatus:f.fetchStatus,isPending:p,isSuccess:w==="success",isError:b,isInitialLoading:N,isLoading:N,data:v,dataUpdatedAt:f.dataUpdatedAt,error:y,errorUpdatedAt:j,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:d,isRefetching:d&&!p,isLoadingError:b&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:b&&C,isStale:sm(t,s),refetch:this.refetch,promise:k(this,In),isEnabled:qt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=P.data!==void 0,G=P.status==="error"&&!D,J=I=>{G?I.reject(P.error):D&&I.resolve(P.data)},ne=()=>{const I=V(this,In,P.promise=Eu());J(I)},z=k(this,In);switch(z.status){case"pending":t.queryHash===r.queryHash&&J(z);break;case"fulfilled":(G||P.data!==z.value)&&ne();break;case"rejected":(!G||P.error!==z.reason)&&ne();break}}return P}updateResult(){const t=k(this,ft),s=this.createResult(k(this,ge),this.options);if(V(this,ur,k(this,ge).state),V(this,va,this.options),k(this,ur).data!==void 0&&V(this,Na,k(this,ge)),Fo(s,t))return;V(this,ft,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!k(this,wa).size)return!0;const l=new Set(i??k(this,wa));return this.options.throwOnError&&l.add("error"),Object.keys(k(this,ft)).some(o=>{const c=o;return k(this,ft)[c]!==t[c]&&l.has(c)})};le(this,je,pg).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&le(this,je,Ru).call(this)}},kt=new WeakMap,ge=new WeakMap,rl=new WeakMap,ft=new WeakMap,ur=new WeakMap,va=new WeakMap,In=new WeakMap,gs=new WeakMap,al=new WeakMap,ja=new WeakMap,Na=new WeakMap,xr=new WeakMap,mr=new WeakMap,ys=new WeakMap,wa=new WeakMap,je=new WeakSet,fi=function(t){le(this,je,Lu).call(this);let s=k(this,ge).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(gt)),s},zu=function(){le(this,je,Ou).call(this);const t=Ls(this.options.staleTime,k(this,ge));if(Qi.isServer()||k(this,ft).isStale||!ku(t))return;const r=og(k(this,ft).dataUpdatedAt,t)+1;V(this,xr,rr.setTimeout(()=>{k(this,ft).isStale||this.updateResult()},r))},Mu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,ge)):this.options.refetchInterval)??!1},Tu=function(t){le(this,je,Du).call(this),V(this,ys,t),!(Qi.isServer()||qt(this.options.enabled,k(this,ge))===!1||!ku(k(this,ys))||k(this,ys)===0)&&V(this,mr,rr.setInterval(()=>{(this.options.refetchIntervalInBackground||Zx.isFocused())&&le(this,je,fi).call(this)},k(this,ys)))},Ru=function(){le(this,je,zu).call(this),le(this,je,Tu).call(this,le(this,je,Mu).call(this))},Ou=function(){k(this,xr)&&(rr.clearTimeout(k(this,xr)),V(this,xr,void 0))},Du=function(){k(this,mr)&&(rr.clearInterval(k(this,mr)),V(this,mr,void 0))},Lu=function(){const t=k(this,kt).getQueryCache().build(k(this,kt),this.options);if(t===k(this,ge))return;const s=k(this,ge);V(this,ge,t),V(this,rl,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},pg=function(t){Ve.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(k(this,ft))}),k(this,kt).getQueryCache().notify({query:k(this,ge),type:"observerResultsUpdated"})})},Tf);function Uj(e,t){return qt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Qh(e,t){return Uj(e,t)||e.state.data!==void 0&&Au(e,t,t.refetchOnMount)}function Au(e,t,s){if(qt(t.enabled,e)!==!1&&Ls(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&sm(e,t)}return!1}function Gh(e,t,s,r){return(e!==t||qt(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&sm(e,s)}function sm(e,t){return qt(t.enabled,e)!==!1&&e.isStaleByTime(Ls(t.staleTime,e))}function Bj(e,t){return!Fo(e.getCurrentResult(),t)}function Yh(e){return{onFetch:(t,s)=>{var x,f,g,v,y;const r=t.options,a=(g=(f=(x=t.fetchOptions)==null?void 0:x.meta)==null?void 0:f.fetchMore)==null?void 0:g.direction,i=((v=t.state.data)==null?void 0:v.pages)||[],l=((y=t.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let j=!1;const w=p=>{Dj(p,()=>t.signal,()=>j=!0)},h=dg(t.options,t.fetchOptions),d=async(p,b,N)=>{if(j)return Promise.reject();if(b==null&&p.pages.length)return Promise.resolve(p);const R=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:b,direction:N?"backward":"forward",meta:t.options.meta};return w(G),G})(),P=await h(R),{maxPages:_}=t.options,D=N?Oj:Rj;return{pages:D(p.pages,P,_),pageParams:D(p.pageParams,b,_)}};if(a&&i.length){const p=a==="backward",b=p?Hj:Jh,N={pages:i,pageParams:l},C=b(r,N);o=await d(N,C,p)}else{const p=e??i.length;do{const b=c===0?l[0]??r.initialPageParam:Jh(r,o);if(c>0&&b==null)break;o=await d(o,b),c++}while(c<p)}return o};t.options.persister?t.fetchFn=()=>{var j,w;return(w=(j=t.options).persister)==null?void 0:w.call(j,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=u}}}function Jh(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function Hj(e,{pages:t,pageParams:s}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,s[0],s):void 0}var il,yn,ct,hr,bn,is,Rf,qj=(Rf=class extends mg{constructor(t){super();Z(this,bn);Z(this,il);Z(this,yn);Z(this,ct);Z(this,hr);V(this,il,t.client),this.mutationId=t.mutationId,V(this,ct,t.mutationCache),V(this,yn,[]),this.state=t.state||gg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,yn).includes(t)||(k(this,yn).push(t),this.clearGcTimeout(),k(this,ct).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,yn,k(this,yn).filter(s=>s!==t)),this.scheduleGc(),k(this,ct).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,yn).length||(this.state.status==="pending"?this.scheduleGc():k(this,ct).remove(this))}continue(){var t;return((t=k(this,hr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,o,c,u,x,f,g,v,y,j,w,h,d,p,b,N,C,R;const s=()=>{le(this,bn,is).call(this,{type:"continue"})},r={client:k(this,il),meta:this.options.meta,mutationKey:this.options.mutationKey};V(this,hr,xg({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,_)=>{le(this,bn,is).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{le(this,bn,is).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,ct).canRun(this)}));const a=this.state.status==="pending",i=!k(this,hr).canStart();try{if(a)s();else{le(this,bn,is).call(this,{type:"pending",variables:t,isPaused:i}),k(this,ct).config.onMutate&&await k(this,ct).config.onMutate(t,this,r);const _=await((o=(l=this.options).onMutate)==null?void 0:o.call(l,t,r));_!==this.state.context&&le(this,bn,is).call(this,{type:"pending",context:_,variables:t,isPaused:i})}const P=await k(this,hr).start();return await((u=(c=k(this,ct).config).onSuccess)==null?void 0:u.call(c,P,t,this.state.context,this,r)),await((f=(x=this.options).onSuccess)==null?void 0:f.call(x,P,t,this.state.context,r)),await((v=(g=k(this,ct).config).onSettled)==null?void 0:v.call(g,P,null,this.state.variables,this.state.context,this,r)),await((j=(y=this.options).onSettled)==null?void 0:j.call(y,P,null,t,this.state.context,r)),le(this,bn,is).call(this,{type:"success",data:P}),P}catch(P){try{await((h=(w=k(this,ct).config).onError)==null?void 0:h.call(w,P,t,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((p=(d=this.options).onError)==null?void 0:p.call(d,P,t,this.state.context,r))}catch(_){Promise.reject(_)}try{await((N=(b=k(this,ct).config).onSettled)==null?void 0:N.call(b,void 0,P,this.state.variables,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((R=(C=this.options).onSettled)==null?void 0:R.call(C,void 0,P,t,this.state.context,r))}catch(_){Promise.reject(_)}throw le(this,bn,is).call(this,{type:"error",error:P}),P}finally{k(this,ct).runNext(this)}}},il=new WeakMap,yn=new WeakMap,ct=new WeakMap,hr=new WeakMap,bn=new WeakSet,is=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Ve.batch(()=>{k(this,yn).forEach(r=>{r.onMutationUpdate(t)}),k(this,ct).notify({mutation:this,type:"updated",action:t})})},Rf);function gg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _n,ln,ll,Of,Kj=(Of=class extends Ha{constructor(t={}){super();Z(this,_n);Z(this,ln);Z(this,ll);this.config=t,V(this,_n,new Set),V(this,ln,new Map),V(this,ll,0)}build(t,s,r){const a=new qj({client:t,mutationCache:this,mutationId:++vl(this,ll)._,options:t.defaultMutationOptions(s),state:r});return this.add(a),a}add(t){k(this,_n).add(t);const s=Il(t);if(typeof s=="string"){const r=k(this,ln).get(s);r?r.push(t):k(this,ln).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,_n).delete(t)){const s=Il(t);if(typeof s=="string"){const r=k(this,ln).get(s);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&k(this,ln).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Il(t);if(typeof s=="string"){const r=k(this,ln).get(s),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const s=Il(t);if(typeof s=="string"){const a=(r=k(this,ln).get(s))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ve.batch(()=>{k(this,_n).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,_n).clear(),k(this,ln).clear()})}getAll(){return Array.from(k(this,_n))}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Hh(s,r))}findAll(t={}){return this.getAll().filter(s=>Hh(t,s))}notify(t){Ve.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return Ve.batch(()=>Promise.all(t.map(s=>s.continue().catch(gt))))}},_n=new WeakMap,ln=new WeakMap,ll=new WeakMap,Of);function Il(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $n,bs,St,Un,Wn,io,Fu,Df,Wj=(Df=class extends Ha{constructor(s,r){super();Z(this,Wn);Z(this,$n);Z(this,bs);Z(this,St);Z(this,Un);V(this,$n,s),this.setOptions(r),this.bindMethods(),le(this,Wn,io).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var a;const r=this.options;this.options=k(this,$n).defaultMutationOptions(s),Fo(this.options,r)||k(this,$n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,St),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&kr(r.mutationKey)!==kr(this.options.mutationKey)?this.reset():((a=k(this,St))==null?void 0:a.state.status)==="pending"&&k(this,St).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=k(this,St))==null||s.removeObserver(this)}onMutationUpdate(s){le(this,Wn,io).call(this),le(this,Wn,Fu).call(this,s)}getCurrentResult(){return k(this,bs)}reset(){var s;(s=k(this,St))==null||s.removeObserver(this),V(this,St,void 0),le(this,Wn,io).call(this),le(this,Wn,Fu).call(this)}mutate(s,r){var a;return V(this,Un,r),(a=k(this,St))==null||a.removeObserver(this),V(this,St,k(this,$n).getMutationCache().build(k(this,$n),this.options)),k(this,St).addObserver(this),k(this,St).execute(s)}},$n=new WeakMap,bs=new WeakMap,St=new WeakMap,Un=new WeakMap,Wn=new WeakSet,io=function(){var r;const s=((r=k(this,St))==null?void 0:r.state)??gg();V(this,bs,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},Fu=function(s){Ve.batch(()=>{var r,a,i,l,o,c,u,x;if(k(this,Un)&&this.hasListeners()){const f=k(this,bs).variables,g=k(this,bs).context,v={client:k(this,$n),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(a=(r=k(this,Un)).onSuccess)==null||a.call(r,s.data,f,g,v)}catch(y){Promise.reject(y)}try{(l=(i=k(this,Un)).onSettled)==null||l.call(i,s.data,null,f,g,v)}catch(y){Promise.reject(y)}}else if((s==null?void 0:s.type)==="error"){try{(c=(o=k(this,Un)).onError)==null||c.call(o,s.error,f,g,v)}catch(y){Promise.reject(y)}try{(x=(u=k(this,Un)).onSettled)==null||x.call(u,void 0,s.error,f,g,v)}catch(y){Promise.reject(y)}}}this.listeners.forEach(f=>{f(k(this,bs))})})},Df),vn,Lf,Vj=(Lf=class extends Ha{constructor(t={}){super();Z(this,vn);this.config=t,V(this,vn,new Map)}build(t,s,r){const a=s.queryKey,i=s.queryHash??em(a,s);let l=this.get(i);return l||(l=new _j({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){k(this,vn).has(t.queryHash)||(k(this,vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=k(this,vn).get(t.queryHash);s&&(t.destroy(),s===t&&k(this,vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ve.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,vn).get(t)}getAll(){return[...k(this,vn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Bh(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>Bh(t,r)):s}notify(t){Ve.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){Ve.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ve.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vn=new WeakMap,Lf),Fe,vs,js,ka,Sa,Ns,Ca,Ea,Af,Qj=(Af=class{constructor(e={}){Z(this,Fe);Z(this,vs);Z(this,js);Z(this,ka);Z(this,Sa);Z(this,Ns);Z(this,Ca);Z(this,Ea);V(this,Fe,e.queryCache||new Vj),V(this,vs,e.mutationCache||new Kj),V(this,js,e.defaultOptions||{}),V(this,ka,new Map),V(this,Sa,new Map),V(this,Ns,0)}mount(){vl(this,Ns)._++,k(this,Ns)===1&&(V(this,Ca,Zx.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Fe).onFocus())})),V(this,Ea,Io.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Fe).onOnline())})))}unmount(){var e,t;vl(this,Ns)._--,k(this,Ns)===0&&((e=k(this,Ca))==null||e.call(this),V(this,Ca,void 0),(t=k(this,Ea))==null||t.call(this),V(this,Ea,void 0))}isFetching(e){return k(this,Fe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,vs).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=k(this,Fe).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=k(this,Fe).build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Ls(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return k(this,Fe).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),a=k(this,Fe).get(r.queryHash),i=a==null?void 0:a.state.data,l=zj(t,i);if(l!==void 0)return k(this,Fe).build(this,r).setData(l,{...s,manual:!0})}setQueriesData(e,t,s){return Ve.batch(()=>k(this,Fe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=k(this,Fe).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=k(this,Fe);Ve.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=k(this,Fe);return Ve.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=Ve.batch(()=>k(this,Fe).findAll(e).map(a=>a.cancel(s)));return Promise.all(r).then(gt).catch(gt)}invalidateQueries(e,t={}){return Ve.batch(()=>(k(this,Fe).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=Ve.batch(()=>k(this,Fe).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,s);return s.throwOnError||(i=i.catch(gt)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(gt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=k(this,Fe).build(this,t);return s.isStaleByTime(Ls(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gt).catch(gt)}fetchInfiniteQuery(e){return e.behavior=Yh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gt).catch(gt)}ensureInfiniteQueryData(e){return e.behavior=Yh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Io.isOnline()?k(this,vs).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,Fe)}getMutationCache(){return k(this,vs)}getDefaultOptions(){return k(this,js)}setDefaultOptions(e){V(this,js,e)}setQueryDefaults(e,t){k(this,ka).set(kr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,ka).values()],s={};return t.forEach(r=>{Vi(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){k(this,Sa).set(kr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Sa).values()],s={};return t.forEach(r=>{Vi(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,js).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=em(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===tm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,js).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,Fe).clear(),k(this,vs).clear()}},Fe=new WeakMap,vs=new WeakMap,js=new WeakMap,ka=new WeakMap,Sa=new WeakMap,Ns=new WeakMap,Ca=new WeakMap,Ea=new WeakMap,Af),yg=m.createContext(void 0),ie=e=>{const t=m.useContext(yg);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Gj=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(yg.Provider,{value:e,children:t})),bg=m.createContext(!1),Yj=()=>m.useContext(bg);bg.Provider;function Jj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xj=m.createContext(Jj()),Zj=()=>m.useContext(Xj),e2=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?nm(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},t2=e=>{m.useEffect(()=>{e.clearReset()},[e])},n2=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||nm(s,[e.error,r])),s2=e=>{if(e.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>s(r(...a)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},r2=(e,t)=>e.isLoading&&e.isFetching&&!t,a2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Xh=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function i2(e,t,s){var g,v,y,j;const r=Yj(),a=Zj(),i=ie(),l=i.defaultQueryOptions(e);(v=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||v.call(g,l);const o=i.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",s2(l),e2(l,a,o),t2(a);const c=!i.getQueryCache().get(l.queryHash),[u]=m.useState(()=>new t(i,l)),x=u.getOptimisticResult(l),f=!r&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(w=>{const h=f?u.subscribe(Ve.batchCalls(w)):gt;return u.updateResult(),h},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),m.useEffect(()=>{u.setOptions(l)},[l,u]),a2(l,x))throw Xh(l,u,a);if(n2({result:x,errorResetBoundary:a,throwOnError:l.throwOnError,query:o,suspense:l.suspense}))throw x.error;if((j=(y=i.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||j.call(y,l,x),l.experimental_prefetchInRender&&!Qi.isServer()&&r2(x,r)){const w=c?Xh(l,u,a):o==null?void 0:o.promise;w==null||w.catch(gt).finally(()=>{u.updateResult()})}return l.notifyOnChangeProps?x:u.trackResult(x)}function ke(e,t){return i2(e,$j)}function Y(e,t){const s=ie(),[r]=m.useState(()=>new Wj(s,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const a=m.useSyncExternalStore(m.useCallback(l=>r.subscribe(Ve.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=m.useCallback((l,o)=>{r.mutate(l,o).catch(gt)},[r]);if(a.error&&nm(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}let l2={data:""},o2=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||l2},c2=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,d2=/\/\*[^]*?\*\/| +/g,Zh=/\n+/g,ms=(e,t)=>{let s="",r="",a="";for(let i in e){let l=e[i];i[0]=="@"?i[1]=="i"?s=i+" "+l+";":r+=i[1]=="f"?ms(l,i):i+"{"+ms(l,i[1]=="k"?"":t)+"}":typeof l=="object"?r+=ms(l,t?t.replace(/([^,])+/g,o=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,o):o?o+" "+c:c)):i):l!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=ms.p?ms.p(i,l):i+":"+l+";")}return s+(t&&a?t+"{"+a+"}":a)+r},On={},vg=e=>{if(typeof e=="object"){let t="";for(let s in e)t+=s+vg(e[s]);return t}return e},u2=(e,t,s,r,a)=>{let i=vg(e),l=On[i]||(On[i]=(c=>{let u=0,x=11;for(;u<c.length;)x=101*x+c.charCodeAt(u++)>>>0;return"go"+x})(i));if(!On[l]){let c=i!==e?e:(u=>{let x,f,g=[{}];for(;x=c2.exec(u.replace(d2,""));)x[4]?g.shift():x[3]?(f=x[3].replace(Zh," ").trim(),g.unshift(g[0][f]=g[0][f]||{})):g[0][x[1]]=x[2].replace(Zh," ").trim();return g[0]})(e);On[l]=ms(a?{["@keyframes "+l]:c}:c,s?"":"."+l)}let o=s&&On.g?On.g:null;return s&&(On.g=On[l]),((c,u,x,f)=>{f?u.data=u.data.replace(f,c):u.data.indexOf(c)===-1&&(u.data=x?c+u.data:u.data+c)})(On[l],t,r,o),l},x2=(e,t,s)=>e.reduce((r,a,i)=>{let l=t[i];if(l&&l.call){let o=l(s),c=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=c?"."+c:o&&typeof o=="object"?o.props?"":ms(o,""):o===!1?"":o}return r+a+(l??"")},"");function hc(e){let t=this||{},s=e.call?e(t.p):e;return u2(s.unshift?s.raw?x2(s,[].slice.call(arguments,1),t.p):s.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):s,o2(t.target),t.g,t.o,t.k)}let jg,Iu,_u;hc.bind({g:1});let Jn=hc.bind({k:1});function m2(e,t,s,r){ms.p=t,jg=e,Iu=s,_u=r}function Ks(e,t){let s=this||{};return function(){let r=arguments;function a(i,l){let o=Object.assign({},i),c=o.className||a.className;s.p=Object.assign({theme:Iu&&Iu()},o),s.o=/ *go\d+/.test(c),o.className=hc.apply(s,r)+(c?" "+c:"");let u=e;return e[0]&&(u=o.as||e,delete o.as),_u&&u[0]&&_u(o),jg(u,o)}return a}}var h2=e=>typeof e=="function",_o=(e,t)=>h2(e)?e(t):e,f2=(()=>{let e=0;return()=>(++e).toString()})(),Ng=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),p2=20,rm="default",wg=(e,t)=>{let{toastLimit:s}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,s)};case 1:return{...e,toasts:e.toasts.map(l=>l.id===t.toast.id?{...l,...t.toast}:l)};case 2:let{toast:r}=t;return wg(e,{type:e.toasts.find(l=>l.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(l=>l.id===a||a===void 0?{...l,dismissed:!0,visible:!1}:l)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(l=>l.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(l=>({...l,pauseDuration:l.pauseDuration+i}))}}},lo=[],kg={toasts:[],pausedAt:void 0,settings:{toastLimit:p2}},Nn={},Sg=(e,t=rm)=>{Nn[t]=wg(Nn[t]||kg,e),lo.forEach(([s,r])=>{s===t&&r(Nn[t])})},Cg=e=>Object.keys(Nn).forEach(t=>Sg(e,t)),g2=e=>Object.keys(Nn).find(t=>Nn[t].toasts.some(s=>s.id===e)),fc=(e=rm)=>t=>{Sg(t,e)},y2={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},b2=(e={},t=rm)=>{let[s,r]=m.useState(Nn[t]||kg),a=m.useRef(Nn[t]);m.useEffect(()=>(a.current!==Nn[t]&&r(Nn[t]),lo.push([t,r]),()=>{let l=lo.findIndex(([o])=>o===t);l>-1&&lo.splice(l,1)}),[t]);let i=s.toasts.map(l=>{var o,c,u;return{...e,...e[l.type],...l,removeDelay:l.removeDelay||((o=e[l.type])==null?void 0:o.removeDelay)||(e==null?void 0:e.removeDelay),duration:l.duration||((c=e[l.type])==null?void 0:c.duration)||(e==null?void 0:e.duration)||y2[l.type],style:{...e.style,...(u=e[l.type])==null?void 0:u.style,...l.style}}});return{...s,toasts:i}},v2=(e,t="blank",s)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...s,id:(s==null?void 0:s.id)||f2()}),hl=e=>(t,s)=>{let r=v2(t,e,s);return fc(r.toasterId||g2(r.id))({type:2,toast:r}),r.id},Qe=(e,t)=>hl("blank")(e,t);Qe.error=hl("error");Qe.success=hl("success");Qe.loading=hl("loading");Qe.custom=hl("custom");Qe.dismiss=(e,t)=>{let s={type:3,toastId:e};t?fc(t)(s):Cg(s)};Qe.dismissAll=e=>Qe.dismiss(void 0,e);Qe.remove=(e,t)=>{let s={type:4,toastId:e};t?fc(t)(s):Cg(s)};Qe.removeAll=e=>Qe.remove(void 0,e);Qe.promise=(e,t,s)=>{let r=Qe.loading(t.loading,{...s,...s==null?void 0:s.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let i=t.success?_o(t.success,a):void 0;return i?Qe.success(i,{id:r,...s,...s==null?void 0:s.success}):Qe.dismiss(r),a}).catch(a=>{let i=t.error?_o(t.error,a):void 0;i?Qe.error(i,{id:r,...s,...s==null?void 0:s.error}):Qe.dismiss(r)}),e};var j2=1e3,N2=(e,t="default")=>{let{toasts:s,pausedAt:r}=b2(e,t),a=m.useRef(new Map).current,i=m.useCallback((f,g=j2)=>{if(a.has(f))return;let v=setTimeout(()=>{a.delete(f),l({type:4,toastId:f})},g);a.set(f,v)},[]);m.useEffect(()=>{if(r)return;let f=Date.now(),g=s.map(v=>{if(v.duration===1/0)return;let y=(v.duration||0)+v.pauseDuration-(f-v.createdAt);if(y<0){v.visible&&Qe.dismiss(v.id);return}return setTimeout(()=>Qe.dismiss(v.id,t),y)});return()=>{g.forEach(v=>v&&clearTimeout(v))}},[s,r,t]);let l=m.useCallback(fc(t),[t]),o=m.useCallback(()=>{l({type:5,time:Date.now()})},[l]),c=m.useCallback((f,g)=>{l({type:1,toast:{id:f,height:g}})},[l]),u=m.useCallback(()=>{r&&l({type:6,time:Date.now()})},[r,l]),x=m.useCallback((f,g)=>{let{reverseOrder:v=!1,gutter:y=8,defaultPosition:j}=g||{},w=s.filter(p=>(p.position||j)===(f.position||j)&&p.height),h=w.findIndex(p=>p.id===f.id),d=w.filter((p,b)=>b<h&&p.visible).length;return w.filter(p=>p.visible).slice(...v?[d+1]:[0,d]).reduce((p,b)=>p+(b.height||0)+y,0)},[s]);return m.useEffect(()=>{s.forEach(f=>{if(f.dismissed)i(f.id,f.removeDelay);else{let g=a.get(f.id);g&&(clearTimeout(g),a.delete(f.id))}})},[s,i]),{toasts:s,handlers:{updateHeight:c,startPause:o,endPause:u,calculateOffset:x}}},w2=Jn`
|
|
68
|
+
from {
|
|
69
|
+
transform: scale(0) rotate(45deg);
|
|
70
|
+
opacity: 0;
|
|
71
|
+
}
|
|
72
|
+
to {
|
|
73
|
+
transform: scale(1) rotate(45deg);
|
|
74
|
+
opacity: 1;
|
|
75
|
+
}`,k2=Jn`
|
|
76
|
+
from {
|
|
77
|
+
transform: scale(0);
|
|
78
|
+
opacity: 0;
|
|
79
|
+
}
|
|
80
|
+
to {
|
|
81
|
+
transform: scale(1);
|
|
82
|
+
opacity: 1;
|
|
83
|
+
}`,S2=Jn`
|
|
84
|
+
from {
|
|
85
|
+
transform: scale(0) rotate(90deg);
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
to {
|
|
89
|
+
transform: scale(1) rotate(90deg);
|
|
90
|
+
opacity: 1;
|
|
91
|
+
}`,C2=Ks("div")`
|
|
92
|
+
width: 20px;
|
|
93
|
+
opacity: 0;
|
|
94
|
+
height: 20px;
|
|
95
|
+
border-radius: 10px;
|
|
96
|
+
background: ${e=>e.primary||"#ff4b4b"};
|
|
97
|
+
position: relative;
|
|
98
|
+
transform: rotate(45deg);
|
|
99
|
+
|
|
100
|
+
animation: ${w2} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
101
|
+
forwards;
|
|
102
|
+
animation-delay: 100ms;
|
|
103
|
+
|
|
104
|
+
&:after,
|
|
105
|
+
&:before {
|
|
106
|
+
content: '';
|
|
107
|
+
animation: ${k2} 0.15s ease-out forwards;
|
|
108
|
+
animation-delay: 150ms;
|
|
109
|
+
position: absolute;
|
|
110
|
+
border-radius: 3px;
|
|
111
|
+
opacity: 0;
|
|
112
|
+
background: ${e=>e.secondary||"#fff"};
|
|
113
|
+
bottom: 9px;
|
|
114
|
+
left: 4px;
|
|
115
|
+
height: 2px;
|
|
116
|
+
width: 12px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:before {
|
|
120
|
+
animation: ${S2} 0.15s ease-out forwards;
|
|
121
|
+
animation-delay: 180ms;
|
|
122
|
+
transform: rotate(90deg);
|
|
123
|
+
}
|
|
124
|
+
`,E2=Jn`
|
|
125
|
+
from {
|
|
126
|
+
transform: rotate(0deg);
|
|
127
|
+
}
|
|
128
|
+
to {
|
|
129
|
+
transform: rotate(360deg);
|
|
130
|
+
}
|
|
131
|
+
`,P2=Ks("div")`
|
|
132
|
+
width: 12px;
|
|
133
|
+
height: 12px;
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
border: 2px solid;
|
|
136
|
+
border-radius: 100%;
|
|
137
|
+
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
138
|
+
border-right-color: ${e=>e.primary||"#616161"};
|
|
139
|
+
animation: ${E2} 1s linear infinite;
|
|
140
|
+
`,z2=Jn`
|
|
141
|
+
from {
|
|
142
|
+
transform: scale(0) rotate(45deg);
|
|
143
|
+
opacity: 0;
|
|
144
|
+
}
|
|
145
|
+
to {
|
|
146
|
+
transform: scale(1) rotate(45deg);
|
|
147
|
+
opacity: 1;
|
|
148
|
+
}`,M2=Jn`
|
|
149
|
+
0% {
|
|
150
|
+
height: 0;
|
|
151
|
+
width: 0;
|
|
152
|
+
opacity: 0;
|
|
153
|
+
}
|
|
154
|
+
40% {
|
|
155
|
+
height: 0;
|
|
156
|
+
width: 6px;
|
|
157
|
+
opacity: 1;
|
|
158
|
+
}
|
|
159
|
+
100% {
|
|
160
|
+
opacity: 1;
|
|
161
|
+
height: 10px;
|
|
162
|
+
}`,T2=Ks("div")`
|
|
163
|
+
width: 20px;
|
|
164
|
+
opacity: 0;
|
|
165
|
+
height: 20px;
|
|
166
|
+
border-radius: 10px;
|
|
167
|
+
background: ${e=>e.primary||"#61d345"};
|
|
168
|
+
position: relative;
|
|
169
|
+
transform: rotate(45deg);
|
|
170
|
+
|
|
171
|
+
animation: ${z2} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
172
|
+
forwards;
|
|
173
|
+
animation-delay: 100ms;
|
|
174
|
+
&:after {
|
|
175
|
+
content: '';
|
|
176
|
+
box-sizing: border-box;
|
|
177
|
+
animation: ${M2} 0.2s ease-out forwards;
|
|
178
|
+
opacity: 0;
|
|
179
|
+
animation-delay: 200ms;
|
|
180
|
+
position: absolute;
|
|
181
|
+
border-right: 2px solid;
|
|
182
|
+
border-bottom: 2px solid;
|
|
183
|
+
border-color: ${e=>e.secondary||"#fff"};
|
|
184
|
+
bottom: 6px;
|
|
185
|
+
left: 6px;
|
|
186
|
+
height: 10px;
|
|
187
|
+
width: 6px;
|
|
188
|
+
}
|
|
189
|
+
`,R2=Ks("div")`
|
|
190
|
+
position: absolute;
|
|
191
|
+
`,O2=Ks("div")`
|
|
192
|
+
position: relative;
|
|
193
|
+
display: flex;
|
|
194
|
+
justify-content: center;
|
|
195
|
+
align-items: center;
|
|
196
|
+
min-width: 20px;
|
|
197
|
+
min-height: 20px;
|
|
198
|
+
`,D2=Jn`
|
|
199
|
+
from {
|
|
200
|
+
transform: scale(0.6);
|
|
201
|
+
opacity: 0.4;
|
|
202
|
+
}
|
|
203
|
+
to {
|
|
204
|
+
transform: scale(1);
|
|
205
|
+
opacity: 1;
|
|
206
|
+
}`,L2=Ks("div")`
|
|
207
|
+
position: relative;
|
|
208
|
+
transform: scale(0.6);
|
|
209
|
+
opacity: 0.4;
|
|
210
|
+
min-width: 20px;
|
|
211
|
+
animation: ${D2} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
212
|
+
forwards;
|
|
213
|
+
`,A2=({toast:e})=>{let{icon:t,type:s,iconTheme:r}=e;return t!==void 0?typeof t=="string"?m.createElement(L2,null,t):t:s==="blank"?null:m.createElement(O2,null,m.createElement(P2,{...r}),s!=="loading"&&m.createElement(R2,null,s==="error"?m.createElement(C2,{...r}):m.createElement(T2,{...r})))},F2=e=>`
|
|
214
|
+
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
215
|
+
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
216
|
+
`,I2=e=>`
|
|
217
|
+
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
218
|
+
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
219
|
+
`,_2="0%{opacity:0;} 100%{opacity:1;}",$2="0%{opacity:1;} 100%{opacity:0;}",U2=Ks("div")`
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
background: #fff;
|
|
223
|
+
color: #363636;
|
|
224
|
+
line-height: 1.3;
|
|
225
|
+
will-change: transform;
|
|
226
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
227
|
+
max-width: 350px;
|
|
228
|
+
pointer-events: auto;
|
|
229
|
+
padding: 8px 10px;
|
|
230
|
+
border-radius: 8px;
|
|
231
|
+
`,B2=Ks("div")`
|
|
232
|
+
display: flex;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
margin: 4px 10px;
|
|
235
|
+
color: inherit;
|
|
236
|
+
flex: 1 1 auto;
|
|
237
|
+
white-space: pre-line;
|
|
238
|
+
`,H2=(e,t)=>{let s=e.includes("top")?1:-1,[r,a]=Ng()?[_2,$2]:[F2(s),I2(s)];return{animation:t?`${Jn(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Jn(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},q2=m.memo(({toast:e,position:t,style:s,children:r})=>{let a=e.height?H2(e.position||t||"top-center",e.visible):{opacity:0},i=m.createElement(A2,{toast:e}),l=m.createElement(B2,{...e.ariaProps},_o(e.message,e));return m.createElement(U2,{className:e.className,style:{...a,...s,...e.style}},typeof r=="function"?r({icon:i,message:l}):m.createElement(m.Fragment,null,i,l))});m2(m.createElement);var K2=({id:e,className:t,style:s,onHeightUpdate:r,children:a})=>{let i=m.useCallback(l=>{if(l){let o=()=>{let c=l.getBoundingClientRect().height;r(e,c)};o(),new MutationObserver(o).observe(l,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return m.createElement("div",{ref:i,className:t,style:s},a)},W2=(e,t)=>{let s=e.includes("top"),r=s?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Ng()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(s?1:-1)}px)`,...r,...a}},V2=hc`
|
|
239
|
+
z-index: 9999;
|
|
240
|
+
> * {
|
|
241
|
+
pointer-events: auto;
|
|
242
|
+
}
|
|
243
|
+
`,_l=16,Q2=({reverseOrder:e,position:t="top-center",toastOptions:s,gutter:r,children:a,toasterId:i,containerStyle:l,containerClassName:o})=>{let{toasts:c,handlers:u}=N2(s,i);return m.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:_l,left:_l,right:_l,bottom:_l,pointerEvents:"none",...l},className:o,onMouseEnter:u.startPause,onMouseLeave:u.endPause},c.map(x=>{let f=x.position||t,g=u.calculateOffset(x,{reverseOrder:e,gutter:r,defaultPosition:t}),v=W2(f,g);return m.createElement(K2,{id:x.id,key:x.id,onHeightUpdate:u.updateHeight,className:x.visible?V2:"",style:v},x.type==="custom"?_o(x.message,x):a?a(x):m.createElement(q2,{toast:x,position:f}))}))},O=Qe;/**
|
|
244
|
+
* @license lucide-react v0.451.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const G2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eg=(...e)=>e.filter((t,s,r)=>!!t&&r.indexOf(t)===s).join(" ");/**
|
|
249
|
+
* @license lucide-react v0.451.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/var Y2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
254
|
+
* @license lucide-react v0.451.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const J2=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...o},c)=>m.createElement("svg",{ref:c,...Y2,width:t,height:t,stroke:e,strokeWidth:r?Number(s)*24/Number(t):s,className:Eg("lucide",a),...o},[...l.map(([u,x])=>m.createElement(u,x)),...Array.isArray(i)?i:[i]]));/**
|
|
259
|
+
* @license lucide-react v0.451.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const A=(e,t)=>{const s=m.forwardRef(({className:r,...a},i)=>m.createElement(J2,{ref:i,iconNode:t,className:Eg(`lucide-${G2(e)}`,r),...a}));return s.displayName=`${e}`,s};/**
|
|
264
|
+
* @license lucide-react v0.451.0 - ISC
|
|
265
|
+
*
|
|
266
|
+
* This source code is licensed under the ISC license.
|
|
267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
+
*/const $u=A("Accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]);/**
|
|
269
|
+
* @license lucide-react v0.451.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the ISC license.
|
|
272
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/const X2=A("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
274
|
+
* @license lucide-react v0.451.0 - ISC
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the ISC license.
|
|
277
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/const Pg=A("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
|
|
279
|
+
* @license lucide-react v0.451.0 - ISC
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the ISC license.
|
|
282
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/const ar=A("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
284
|
+
* @license lucide-react v0.451.0 - ISC
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the ISC license.
|
|
287
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/const zg=A("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
|
|
289
|
+
* @license lucide-react v0.451.0 - ISC
|
|
290
|
+
*
|
|
291
|
+
* This source code is licensed under the ISC license.
|
|
292
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
+
*/const Z2=A("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
294
|
+
* @license lucide-react v0.451.0 - ISC
|
|
295
|
+
*
|
|
296
|
+
* This source code is licensed under the ISC license.
|
|
297
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
+
*/const Uu=A("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
|
299
|
+
* @license lucide-react v0.451.0 - ISC
|
|
300
|
+
*
|
|
301
|
+
* This source code is licensed under the ISC license.
|
|
302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
+
*/const Gi=A("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
304
|
+
* @license lucide-react v0.451.0 - ISC
|
|
305
|
+
*
|
|
306
|
+
* This source code is licensed under the ISC license.
|
|
307
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
+
*/const eN=A("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
309
|
+
* @license lucide-react v0.451.0 - ISC
|
|
310
|
+
*
|
|
311
|
+
* This source code is licensed under the ISC license.
|
|
312
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
313
|
+
*/const tN=A("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
|
|
314
|
+
* @license lucide-react v0.451.0 - ISC
|
|
315
|
+
*
|
|
316
|
+
* This source code is licensed under the ISC license.
|
|
317
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
318
|
+
*/const Sr=A("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
|
|
319
|
+
* @license lucide-react v0.451.0 - ISC
|
|
320
|
+
*
|
|
321
|
+
* This source code is licensed under the ISC license.
|
|
322
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
+
*/const nN=A("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
324
|
+
* @license lucide-react v0.451.0 - ISC
|
|
325
|
+
*
|
|
326
|
+
* This source code is licensed under the ISC license.
|
|
327
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
+
*/const Sn=A("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
|
|
329
|
+
* @license lucide-react v0.451.0 - ISC
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the ISC license.
|
|
332
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/const Mg=A("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/**
|
|
334
|
+
* @license lucide-react v0.451.0 - ISC
|
|
335
|
+
*
|
|
336
|
+
* This source code is licensed under the ISC license.
|
|
337
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
+
*/const He=A("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
339
|
+
* @license lucide-react v0.451.0 - ISC
|
|
340
|
+
*
|
|
341
|
+
* This source code is licensed under the ISC license.
|
|
342
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
343
|
+
*/const Tt=A("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
344
|
+
* @license lucide-react v0.451.0 - ISC
|
|
345
|
+
*
|
|
346
|
+
* This source code is licensed under the ISC license.
|
|
347
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
348
|
+
*/const sN=A("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
349
|
+
* @license lucide-react v0.451.0 - ISC
|
|
350
|
+
*
|
|
351
|
+
* This source code is licensed under the ISC license.
|
|
352
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
+
*/const Zt=A("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
354
|
+
* @license lucide-react v0.451.0 - ISC
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the ISC license.
|
|
357
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/const rN=A("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
359
|
+
* @license lucide-react v0.451.0 - ISC
|
|
360
|
+
*
|
|
361
|
+
* This source code is licensed under the ISC license.
|
|
362
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
363
|
+
*/const Ue=A("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
364
|
+
* @license lucide-react v0.451.0 - ISC
|
|
365
|
+
*
|
|
366
|
+
* This source code is licensed under the ISC license.
|
|
367
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
368
|
+
*/const aN=A("CircleMinus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);/**
|
|
369
|
+
* @license lucide-react v0.451.0 - ISC
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the ISC license.
|
|
372
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/const iN=A("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
374
|
+
* @license lucide-react v0.451.0 - ISC
|
|
375
|
+
*
|
|
376
|
+
* This source code is licensed under the ISC license.
|
|
377
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
+
*/const lN=A("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
379
|
+
* @license lucide-react v0.451.0 - ISC
|
|
380
|
+
*
|
|
381
|
+
* This source code is licensed under the ISC license.
|
|
382
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
383
|
+
*/const ut=A("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
384
|
+
* @license lucide-react v0.451.0 - ISC
|
|
385
|
+
*
|
|
386
|
+
* This source code is licensed under the ISC license.
|
|
387
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
388
|
+
*/const Tr=A("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
389
|
+
* @license lucide-react v0.451.0 - ISC
|
|
390
|
+
*
|
|
391
|
+
* This source code is licensed under the ISC license.
|
|
392
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
393
|
+
*/const nd=A("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/**
|
|
394
|
+
* @license lucide-react v0.451.0 - ISC
|
|
395
|
+
*
|
|
396
|
+
* This source code is licensed under the ISC license.
|
|
397
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
398
|
+
*/const Tg=A("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
399
|
+
* @license lucide-react v0.451.0 - ISC
|
|
400
|
+
*
|
|
401
|
+
* This source code is licensed under the ISC license.
|
|
402
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
403
|
+
*/const am=A("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
404
|
+
* @license lucide-react v0.451.0 - ISC
|
|
405
|
+
*
|
|
406
|
+
* This source code is licensed under the ISC license.
|
|
407
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
408
|
+
*/const oN=A("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
409
|
+
* @license lucide-react v0.451.0 - ISC
|
|
410
|
+
*
|
|
411
|
+
* This source code is licensed under the ISC license.
|
|
412
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
413
|
+
*/const Rg=A("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
414
|
+
* @license lucide-react v0.451.0 - ISC
|
|
415
|
+
*
|
|
416
|
+
* This source code is licensed under the ISC license.
|
|
417
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
418
|
+
*/const pc=A("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
419
|
+
* @license lucide-react v0.451.0 - ISC
|
|
420
|
+
*
|
|
421
|
+
* This source code is licensed under the ISC license.
|
|
422
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
423
|
+
*/const qa=A("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
424
|
+
* @license lucide-react v0.451.0 - ISC
|
|
425
|
+
*
|
|
426
|
+
* This source code is licensed under the ISC license.
|
|
427
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
428
|
+
*/const cN=A("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
429
|
+
* @license lucide-react v0.451.0 - ISC
|
|
430
|
+
*
|
|
431
|
+
* This source code is licensed under the ISC license.
|
|
432
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
433
|
+
*/const Og=A("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
434
|
+
* @license lucide-react v0.451.0 - ISC
|
|
435
|
+
*
|
|
436
|
+
* This source code is licensed under the ISC license.
|
|
437
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
438
|
+
*/const Dg=A("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);/**
|
|
439
|
+
* @license lucide-react v0.451.0 - ISC
|
|
440
|
+
*
|
|
441
|
+
* This source code is licensed under the ISC license.
|
|
442
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
443
|
+
*/const Lg=A("FileMinus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);/**
|
|
444
|
+
* @license lucide-react v0.451.0 - ISC
|
|
445
|
+
*
|
|
446
|
+
* This source code is licensed under the ISC license.
|
|
447
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
448
|
+
*/const Ag=A("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
|
|
449
|
+
* @license lucide-react v0.451.0 - ISC
|
|
450
|
+
*
|
|
451
|
+
* This source code is licensed under the ISC license.
|
|
452
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
453
|
+
*/const Fg=A("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
|
|
454
|
+
* @license lucide-react v0.451.0 - ISC
|
|
455
|
+
*
|
|
456
|
+
* This source code is licensed under the ISC license.
|
|
457
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
458
|
+
*/const Ig=A("FileQuestion",[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);/**
|
|
459
|
+
* @license lucide-react v0.451.0 - ISC
|
|
460
|
+
*
|
|
461
|
+
* This source code is licensed under the ISC license.
|
|
462
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
463
|
+
*/const mn=A("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
464
|
+
* @license lucide-react v0.451.0 - ISC
|
|
465
|
+
*
|
|
466
|
+
* This source code is licensed under the ISC license.
|
|
467
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
468
|
+
*/const _g=A("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
469
|
+
* @license lucide-react v0.451.0 - ISC
|
|
470
|
+
*
|
|
471
|
+
* This source code is licensed under the ISC license.
|
|
472
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
473
|
+
*/const $g=A("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
474
|
+
* @license lucide-react v0.451.0 - ISC
|
|
475
|
+
*
|
|
476
|
+
* This source code is licensed under the ISC license.
|
|
477
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
478
|
+
*/const Yi=A("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
|
|
479
|
+
* @license lucide-react v0.451.0 - ISC
|
|
480
|
+
*
|
|
481
|
+
* This source code is licensed under the ISC license.
|
|
482
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
483
|
+
*/const Ug=A("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
484
|
+
* @license lucide-react v0.451.0 - ISC
|
|
485
|
+
*
|
|
486
|
+
* This source code is licensed under the ISC license.
|
|
487
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
488
|
+
*/const dN=A("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
489
|
+
* @license lucide-react v0.451.0 - ISC
|
|
490
|
+
*
|
|
491
|
+
* This source code is licensed under the ISC license.
|
|
492
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
493
|
+
*/const Cr=A("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
494
|
+
* @license lucide-react v0.451.0 - ISC
|
|
495
|
+
*
|
|
496
|
+
* This source code is licensed under the ISC license.
|
|
497
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
498
|
+
*/const fa=A("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
|
499
|
+
* @license lucide-react v0.451.0 - ISC
|
|
500
|
+
*
|
|
501
|
+
* This source code is licensed under the ISC license.
|
|
502
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
503
|
+
*/const Er=A("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
504
|
+
* @license lucide-react v0.451.0 - ISC
|
|
505
|
+
*
|
|
506
|
+
* This source code is licensed under the ISC license.
|
|
507
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
508
|
+
*/const uN=A("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]);/**
|
|
509
|
+
* @license lucide-react v0.451.0 - ISC
|
|
510
|
+
*
|
|
511
|
+
* This source code is licensed under the ISC license.
|
|
512
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
513
|
+
*/const gc=A("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
514
|
+
* @license lucide-react v0.451.0 - ISC
|
|
515
|
+
*
|
|
516
|
+
* This source code is licensed under the ISC license.
|
|
517
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
518
|
+
*/const Bg=A("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
519
|
+
* @license lucide-react v0.451.0 - ISC
|
|
520
|
+
*
|
|
521
|
+
* This source code is licensed under the ISC license.
|
|
522
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
523
|
+
*/const $o=A("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
|
|
524
|
+
* @license lucide-react v0.451.0 - ISC
|
|
525
|
+
*
|
|
526
|
+
* This source code is licensed under the ISC license.
|
|
527
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
528
|
+
*/const ef=A("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
529
|
+
* @license lucide-react v0.451.0 - ISC
|
|
530
|
+
*
|
|
531
|
+
* This source code is licensed under the ISC license.
|
|
532
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
533
|
+
*/const tf=A("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
534
|
+
* @license lucide-react v0.451.0 - ISC
|
|
535
|
+
*
|
|
536
|
+
* This source code is licensed under the ISC license.
|
|
537
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
538
|
+
*/const fl=A("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
539
|
+
* @license lucide-react v0.451.0 - ISC
|
|
540
|
+
*
|
|
541
|
+
* This source code is licensed under the ISC license.
|
|
542
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
543
|
+
*/const xN=A("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
544
|
+
* @license lucide-react v0.451.0 - ISC
|
|
545
|
+
*
|
|
546
|
+
* This source code is licensed under the ISC license.
|
|
547
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
548
|
+
*/const mN=A("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
|
|
549
|
+
* @license lucide-react v0.451.0 - ISC
|
|
550
|
+
*
|
|
551
|
+
* This source code is licensed under the ISC license.
|
|
552
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
553
|
+
*/const nf=A("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
554
|
+
* @license lucide-react v0.451.0 - ISC
|
|
555
|
+
*
|
|
556
|
+
* This source code is licensed under the ISC license.
|
|
557
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
558
|
+
*/const hN=A("ListOrdered",[["line",{x1:"10",x2:"21",y1:"6",y2:"6",key:"76qw6h"}],["line",{x1:"10",x2:"21",y1:"12",y2:"12",key:"16nom4"}],["line",{x1:"10",x2:"21",y1:"18",y2:"18",key:"u3jurt"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
559
|
+
* @license lucide-react v0.451.0 - ISC
|
|
560
|
+
*
|
|
561
|
+
* This source code is licensed under the ISC license.
|
|
562
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
563
|
+
*/const ce=A("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
564
|
+
* @license lucide-react v0.451.0 - ISC
|
|
565
|
+
*
|
|
566
|
+
* This source code is licensed under the ISC license.
|
|
567
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
568
|
+
*/const sd=A("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
569
|
+
* @license lucide-react v0.451.0 - ISC
|
|
570
|
+
*
|
|
571
|
+
* This source code is licensed under the ISC license.
|
|
572
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
573
|
+
*/const im=A("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
574
|
+
* @license lucide-react v0.451.0 - ISC
|
|
575
|
+
*
|
|
576
|
+
* This source code is licensed under the ISC license.
|
|
577
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
578
|
+
*/const fN=A("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
579
|
+
* @license lucide-react v0.451.0 - ISC
|
|
580
|
+
*
|
|
581
|
+
* This source code is licensed under the ISC license.
|
|
582
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
583
|
+
*/const pN=A("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
584
|
+
* @license lucide-react v0.451.0 - ISC
|
|
585
|
+
*
|
|
586
|
+
* This source code is licensed under the ISC license.
|
|
587
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
588
|
+
*/const Hg=A("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
589
|
+
* @license lucide-react v0.451.0 - ISC
|
|
590
|
+
*
|
|
591
|
+
* This source code is licensed under the ISC license.
|
|
592
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
593
|
+
*/const la=A("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
594
|
+
* @license lucide-react v0.451.0 - ISC
|
|
595
|
+
*
|
|
596
|
+
* This source code is licensed under the ISC license.
|
|
597
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
598
|
+
*/const gN=A("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
599
|
+
* @license lucide-react v0.451.0 - ISC
|
|
600
|
+
*
|
|
601
|
+
* This source code is licensed under the ISC license.
|
|
602
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
603
|
+
*/const yN=A("MoveRight",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/**
|
|
604
|
+
* @license lucide-react v0.451.0 - ISC
|
|
605
|
+
*
|
|
606
|
+
* This source code is licensed under the ISC license.
|
|
607
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
608
|
+
*/const Rr=A("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
609
|
+
* @license lucide-react v0.451.0 - ISC
|
|
610
|
+
*
|
|
611
|
+
* This source code is licensed under the ISC license.
|
|
612
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
613
|
+
*/const Rt=A("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
614
|
+
* @license lucide-react v0.451.0 - ISC
|
|
615
|
+
*
|
|
616
|
+
* This source code is licensed under the ISC license.
|
|
617
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
618
|
+
*/const bN=A("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
619
|
+
* @license lucide-react v0.451.0 - ISC
|
|
620
|
+
*
|
|
621
|
+
* This source code is licensed under the ISC license.
|
|
622
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
623
|
+
*/const Cn=A("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
624
|
+
* @license lucide-react v0.451.0 - ISC
|
|
625
|
+
*
|
|
626
|
+
* This source code is licensed under the ISC license.
|
|
627
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
628
|
+
*/const lm=A("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
629
|
+
* @license lucide-react v0.451.0 - ISC
|
|
630
|
+
*
|
|
631
|
+
* This source code is licensed under the ISC license.
|
|
632
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
633
|
+
*/const qg=A("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
|
|
634
|
+
* @license lucide-react v0.451.0 - ISC
|
|
635
|
+
*
|
|
636
|
+
* This source code is licensed under the ISC license.
|
|
637
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
638
|
+
*/const yc=A("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
639
|
+
* @license lucide-react v0.451.0 - ISC
|
|
640
|
+
*
|
|
641
|
+
* This source code is licensed under the ISC license.
|
|
642
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
643
|
+
*/const Kg=A("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
644
|
+
* @license lucide-react v0.451.0 - ISC
|
|
645
|
+
*
|
|
646
|
+
* This source code is licensed under the ISC license.
|
|
647
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
648
|
+
*/const Wg=A("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
|
|
649
|
+
* @license lucide-react v0.451.0 - ISC
|
|
650
|
+
*
|
|
651
|
+
* This source code is licensed under the ISC license.
|
|
652
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
653
|
+
*/const Pr=A("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
654
|
+
* @license lucide-react v0.451.0 - ISC
|
|
655
|
+
*
|
|
656
|
+
* This source code is licensed under the ISC license.
|
|
657
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
658
|
+
*/const vN=A("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
659
|
+
* @license lucide-react v0.451.0 - ISC
|
|
660
|
+
*
|
|
661
|
+
* This source code is licensed under the ISC license.
|
|
662
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
663
|
+
*/const Aa=A("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
664
|
+
* @license lucide-react v0.451.0 - ISC
|
|
665
|
+
*
|
|
666
|
+
* This source code is licensed under the ISC license.
|
|
667
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
668
|
+
*/const Bu=A("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
669
|
+
* @license lucide-react v0.451.0 - ISC
|
|
670
|
+
*
|
|
671
|
+
* This source code is licensed under the ISC license.
|
|
672
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
673
|
+
*/const om=A("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
674
|
+
* @license lucide-react v0.451.0 - ISC
|
|
675
|
+
*
|
|
676
|
+
* This source code is licensed under the ISC license.
|
|
677
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
678
|
+
*/const jN=A("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/**
|
|
679
|
+
* @license lucide-react v0.451.0 - ISC
|
|
680
|
+
*
|
|
681
|
+
* This source code is licensed under the ISC license.
|
|
682
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
683
|
+
*/const bc=A("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
|
|
684
|
+
* @license lucide-react v0.451.0 - ISC
|
|
685
|
+
*
|
|
686
|
+
* This source code is licensed under the ISC license.
|
|
687
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
688
|
+
*/const NN=A("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
689
|
+
* @license lucide-react v0.451.0 - ISC
|
|
690
|
+
*
|
|
691
|
+
* This source code is licensed under the ISC license.
|
|
692
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
693
|
+
*/const pi=A("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
694
|
+
* @license lucide-react v0.451.0 - ISC
|
|
695
|
+
*
|
|
696
|
+
* This source code is licensed under the ISC license.
|
|
697
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
698
|
+
*/const Gt=A("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
699
|
+
* @license lucide-react v0.451.0 - ISC
|
|
700
|
+
*
|
|
701
|
+
* This source code is licensed under the ISC license.
|
|
702
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
703
|
+
*/const wN=A("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
704
|
+
* @license lucide-react v0.451.0 - ISC
|
|
705
|
+
*
|
|
706
|
+
* This source code is licensed under the ISC license.
|
|
707
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
708
|
+
*/const kN=A("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
709
|
+
* @license lucide-react v0.451.0 - ISC
|
|
710
|
+
*
|
|
711
|
+
* This source code is licensed under the ISC license.
|
|
712
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
713
|
+
*/const oo=A("Tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);/**
|
|
714
|
+
* @license lucide-react v0.451.0 - ISC
|
|
715
|
+
*
|
|
716
|
+
* This source code is licensed under the ISC license.
|
|
717
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
718
|
+
*/const Vg=A("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
719
|
+
* @license lucide-react v0.451.0 - ISC
|
|
720
|
+
*
|
|
721
|
+
* This source code is licensed under the ISC license.
|
|
722
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
723
|
+
*/const vc=A("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
724
|
+
* @license lucide-react v0.451.0 - ISC
|
|
725
|
+
*
|
|
726
|
+
* This source code is licensed under the ISC license.
|
|
727
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
728
|
+
*/const sf=A("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
|
|
729
|
+
* @license lucide-react v0.451.0 - ISC
|
|
730
|
+
*
|
|
731
|
+
* This source code is licensed under the ISC license.
|
|
732
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
733
|
+
*/const fn=A("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
734
|
+
* @license lucide-react v0.451.0 - ISC
|
|
735
|
+
*
|
|
736
|
+
* This source code is licensed under the ISC license.
|
|
737
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
738
|
+
*/const SN=A("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/**
|
|
739
|
+
* @license lucide-react v0.451.0 - ISC
|
|
740
|
+
*
|
|
741
|
+
* This source code is licensed under the ISC license.
|
|
742
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
743
|
+
*/const CN=A("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
744
|
+
* @license lucide-react v0.451.0 - ISC
|
|
745
|
+
*
|
|
746
|
+
* This source code is licensed under the ISC license.
|
|
747
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
748
|
+
*/const Yt=A("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
749
|
+
* @license lucide-react v0.451.0 - ISC
|
|
750
|
+
*
|
|
751
|
+
* This source code is licensed under the ISC license.
|
|
752
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
753
|
+
*/const cm=A("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
754
|
+
* @license lucide-react v0.451.0 - ISC
|
|
755
|
+
*
|
|
756
|
+
* This source code is licensed under the ISC license.
|
|
757
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
758
|
+
*/const Qg=A("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
759
|
+
* @license lucide-react v0.451.0 - ISC
|
|
760
|
+
*
|
|
761
|
+
* This source code is licensed under the ISC license.
|
|
762
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
763
|
+
*/const jc=A("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
764
|
+
* @license lucide-react v0.451.0 - ISC
|
|
765
|
+
*
|
|
766
|
+
* This source code is licensed under the ISC license.
|
|
767
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
768
|
+
*/const Fa=A("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
|
|
769
|
+
* @license lucide-react v0.451.0 - ISC
|
|
770
|
+
*
|
|
771
|
+
* This source code is licensed under the ISC license.
|
|
772
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
773
|
+
*/const Se=A("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
774
|
+
* @license lucide-react v0.451.0 - ISC
|
|
775
|
+
*
|
|
776
|
+
* This source code is licensed under the ISC license.
|
|
777
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
778
|
+
*/const Be=A("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Gg(e){var t,s,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(s=Gg(e[t]))&&(r&&(r+=" "),r+=s)}else for(s in e)e[s]&&(r&&(r+=" "),r+=s);return r}function S(){for(var e,t,s=0,r="",a=arguments.length;s<a;s++)(e=arguments[s])&&(t=Gg(e))&&(r&&(r+=" "),r+=t);return r}function Yg({size:e=40}){const t=`am-bg-${e}`;return n.jsxs("svg",{viewBox:"0 0 40 40",width:e,height:e,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{flexShrink:0},children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"40",y2:"40",gradientUnits:"userSpaceOnUse",children:[n.jsx("stop",{stopColor:"#312e81"})," ",n.jsx("stop",{offset:"0.50",stopColor:"#6366f1"})," ",n.jsx("stop",{offset:"1",stopColor:"#7c3aed"})," "]})}),n.jsx("rect",{width:"40",height:"40",rx:"9",fill:`url(#${t})`}),n.jsx("rect",{x:"3",y:"1.5",width:"34",height:"9",rx:"4.5",fill:"white",fillOpacity:"0.07"}),n.jsx("line",{x1:"5.5",y1:"34",x2:"20",y2:"12",stroke:"white",strokeWidth:"4.5",strokeLinecap:"round",strokeOpacity:"0.93"}),n.jsx("line",{x1:"34.5",y1:"34",x2:"20",y2:"12",stroke:"white",strokeWidth:"4.5",strokeLinecap:"round",strokeOpacity:"0.93"}),n.jsx("line",{x1:"12.5",y1:"24",x2:"27.5",y2:"24",stroke:"white",strokeWidth:"3.5",strokeLinecap:"round",strokeOpacity:"0.93"}),n.jsx("line",{x1:"20",y1:"11",x2:"20",y2:"5.5",stroke:"white",strokeWidth:"2.0",strokeLinecap:"round",strokeOpacity:"0.82"}),n.jsx("line",{x1:"20",y1:"11",x2:"15.8",y2:"7.2",stroke:"white",strokeWidth:"1.6",strokeLinecap:"round",strokeOpacity:"0.68"}),n.jsx("line",{x1:"20",y1:"11",x2:"24.2",y2:"7.2",stroke:"white",strokeWidth:"1.6",strokeLinecap:"round",strokeOpacity:"0.68"}),n.jsx("circle",{cx:"20",cy:"11",r:"4.5",fill:"white",fillOpacity:"0.10"}),n.jsx("circle",{cx:"20",cy:"11",r:"3.0",fill:"white",fillOpacity:"0.28"}),n.jsx("circle",{cx:"20",cy:"11",r:"1.8",fill:"white",fillOpacity:"0.96"})]})}function EN(){return n.jsxs("div",{className:"flex items-center gap-3 select-none min-w-0",children:[n.jsx(Yg,{size:46}),n.jsxs("div",{className:"flex flex-col justify-center leading-none min-w-0",children:[n.jsx("span",{className:"text-[20px] font-bold text-white truncate",style:{letterSpacing:"-0.03em"},children:"Assuremind"}),n.jsx("span",{className:"text-[9.5px] font-semibold text-slate-300 uppercase mt-1",style:{letterSpacing:"0.18em"},children:"Studio"})]})]})}function PN(){return n.jsxs("div",{className:"flex flex-col items-center gap-1.5 select-none",children:[n.jsx(Yg,{size:36}),n.jsx("span",{className:"text-[9px] font-bold text-white/80 whitespace-nowrap",style:{letterSpacing:"-0.01em"},children:"Assuremind"})]})}const zN=[{to:"/",icon:xN,label:"Dashboard"},{to:"/story",icon:Gt,label:"Smart Tests"},{to:"/tests",icon:Yi,label:"Test Editor"},{to:"/run",icon:Rt,label:"Run Config"},{to:"/reports",icon:nN,label:"Reports"},{to:"/variables",icon:NN,label:"Variables"},{to:"/healing",icon:$o,label:"Self-Healing"},{to:"/git",icon:Cr,label:"Git Control Center"},{to:"/library",icon:mN,label:"Step Library"},{to:"/docs",icon:Gi,label:"Docs"},{to:"/settings",icon:Bu,label:"Settings"}];function MN({collapsed:e=!1,onToggle:t,mobileOpen:s=!1}){return n.jsxs(n.Fragment,{children:[s&&n.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-20 lg:hidden",onClick:t}),n.jsxs("aside",{className:S("fixed lg:relative z-30 flex flex-col h-full bg-sidebar text-white transition-all duration-300 ease-in-out flex-shrink-0",e?"w-[84px]":"w-[248px]",s?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:[n.jsx("div",{className:S("flex items-center border-b border-white/[0.06] flex-shrink-0",e?"justify-center px-2 py-3":"px-5 py-3"),children:e?n.jsx(PN,{}):n.jsx(EN,{})}),n.jsx("nav",{className:"flex-1 overflow-hidden py-1.5 px-2.5 space-y-0.5",children:zN.map(({to:r,icon:a,label:i})=>n.jsxs(vj,{to:r,end:r==="/",className:({isActive:l})=>S("sidebar-item",l&&"active",e&&"justify-center !px-0"),title:e?i:void 0,children:[n.jsx(a,{size:18,className:"flex-shrink-0",strokeWidth:1.8}),!e&&n.jsx("span",{className:"truncate",children:i})]},r))}),n.jsx("button",{type:"button",onClick:t,className:S("hidden lg:flex items-center justify-center py-3.5","border-t border-white/[0.06] text-white/30 hover:text-white/70 transition-colors duration-200"),title:e?"Expand sidebar":"Collapse sidebar",children:e?n.jsx(Zt,{size:16}):n.jsx(sN,{size:16})})]})]})}function TN(){const[e,t]=m.useState(!1),[s,r]=m.useState(!1);return{collapsed:e,mobileOpen:s,toggle:()=>{t(i=>!i),r(i=>!i)}}}const dm="/api",RN=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws`,Jg=["chromium","firefox","webkit"];async function $(e,t){const s=(t==null?void 0:t.body)!==void 0,r=await fetch(`${dm}${e}`,{headers:{...s?{"Content-Type":"application/json"}:{},...t==null?void 0:t.headers},...t});if(!r.ok){const a=await r.text();throw new Error(`API ${(t==null?void 0:t.method)??"GET"} ${e} → ${r.status}: ${a}`)}if(r.status!==204)return r.json()}const Ia={get:()=>$("/config"),update:e=>$("/config",{method:"PUT",body:JSON.stringify(e)}),getAiProvider:()=>$("/ai-provider")},Or={list:e=>$(`/suites${e?`?type=${e}`:""}`),get:e=>$(`/suites/${e}`),create:e=>$("/suites",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>$(`/suites/${e}`,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>$(`/suites/${e}`,{method:"DELETE"})},Is={list:e=>$(`/suites/${e}/cases`),get:(e,t)=>$(`/suites/${e}/cases/${t}`),create:(e,t)=>$(`/suites/${e}/cases`,{method:"POST",body:JSON.stringify(t)}),update:(e,t,s)=>$(`/suites/${e}/cases/${t}`,{method:"PATCH",body:JSON.stringify(s)}),delete:(e,t)=>$(`/suites/${e}/cases/${t}`,{method:"DELETE"}),bulkDelete:(e,t)=>$(`/suites/${e}/cases/bulk-delete`,{method:"POST",body:JSON.stringify({ids:t})}),bulkMove:(e,t,s)=>$(`/suites/${e}/cases/bulk-move`,{method:"POST",body:JSON.stringify({ids:t,targetSuiteId:s})})},Dr={add:(e,t,s)=>$(`/suites/${e}/cases/${t}/steps`,{method:"POST",body:JSON.stringify(s)}),update:(e,t,s,r)=>$(`/suites/${e}/cases/${t}/steps/${s}`,{method:"PATCH",body:JSON.stringify(r)}),delete:(e,t,s)=>$(`/suites/${e}/cases/${t}/steps/${s}`,{method:"DELETE"}),generate:(e,t,s)=>$(`/suites/${e}/cases/${t}/steps/${s}/generate`,{method:"POST"}),generateAll:(e,t)=>$(`/suites/${e}/cases/${t}/steps/generate-all`,{method:"POST"}),reorder:(e,t,s)=>$(`/suites/${e}/cases/${t}/steps/reorder`,{method:"PATCH",body:JSON.stringify({stepIds:s})})},Lr={get:e=>$(`/suites/${e}/hooks`),addStep:(e,t,s)=>$(`/suites/${e}/hooks/${t}/steps`,{method:"POST",body:JSON.stringify(s)}),updateStep:(e,t,s,r)=>$(`/suites/${e}/hooks/${t}/steps/${s}`,{method:"PATCH",body:JSON.stringify(r)}),deleteStep:(e,t,s)=>$(`/suites/${e}/hooks/${t}/steps/${s}`,{method:"DELETE"}),reorderSteps:(e,t,s)=>$(`/suites/${e}/hooks/${t}/steps/reorder`,{method:"PATCH",body:JSON.stringify({stepIds:s})}),generateStep:(e,t,s)=>$(`/suites/${e}/hooks/${t}/steps/${s}/generate`,{method:"POST"}),generateAll:(e,t)=>$(`/suites/${e}/hooks/${t}/steps/generate-all`,{method:"POST"})},rd={getAll:()=>$("/variables"),getEnv:e=>$(`/variables/env/${e}`),set:(e,t)=>$(`/variables/${e}`,{method:"PUT",body:JSON.stringify({value:t})}),delete:e=>$(`/variables/${e}`,{method:"DELETE"})},Bn={list:()=>$("/healing"),pending:()=>$("/healing/pending"),stats:()=>$("/healing/stats"),accept:e=>$(`/healing/${e}/accept`,{method:"PATCH"}),reject:e=>$(`/healing/${e}/reject`,{method:"PATCH"}),acceptAll:()=>$("/healing/accept-all",{method:"POST"}),delete:e=>$(`/healing/${e}`,{method:"DELETE"}),deleteBulk:e=>$("/healing/delete-bulk",{method:"POST",body:JSON.stringify({ids:e})}),deleteAll:()=>$("/healing/clear-all",{method:"POST"})},Ji={start:e=>$("/run",{method:"POST",body:JSON.stringify(e)}),list:e=>$(`/run${e!==void 0?`?limit=${e}`:""}`),get:e=>$(`/run/${e}`)},Uo={list:e=>$(`/report${e!==void 0?`?limit=${e}`:""}`),get:e=>$(`/report/${e}`),delete:e=>$(`/report/${e}`,{method:"DELETE"})},$r={generate:(e,t,s)=>$("/story/generate",{method:"POST",body:JSON.stringify({story:e,suiteName:t,jiraUrl:s})}),generateBulk:(e,t=3)=>$("/story/generate-bulk",{method:"POST",body:JSON.stringify({stories:e,concurrency:t})}),fetchJira:e=>$("/story/fetch-jira",{method:"POST",body:JSON.stringify({jiraUrl:e})}),swaggerPreview:e=>$("/story/swagger-preview",{method:"POST",body:JSON.stringify({specUrl:e})}),generateFromSwagger:(e,t,s,r)=>$("/story/generate-from-swagger",{method:"POST",body:JSON.stringify({specUrl:e,suiteName:t,tags:s,requirements:r||void 0})})},Ar={enabled:()=>$("/xray/enabled"),status:()=>$("/xray/status"),suiteStatus:e=>$(`/xray/status/${e}`),createAll:()=>$("/xray/create-all",{method:"POST"}),createSuite:e=>$(`/xray/create/suite/${e}`,{method:"POST"}),createCase:(e,t)=>$(`/xray/create/case/${e}/${t}`,{method:"POST"}),syncAll:()=>$("/xray/sync-all",{method:"POST"}),syncSuite:e=>$(`/xray/sync/suite/${e}`,{method:"POST"}),syncCase:(e,t)=>$(`/xray/sync/case/${e}/${t}`,{method:"POST"}),validate:()=>$("/xray/validate")},Ur={list:()=>$("/data-files"),get:e=>$(`/data-files/${encodeURIComponent(e)}`),upload:(e,t)=>$("/data-files/upload",{method:"POST",body:JSON.stringify({filename:e,content:t})}),update:(e,t)=>$(`/data-files/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({content:t})}),delete:e=>$(`/data-files/${encodeURIComponent(e)}`,{method:"DELETE"})},Ke={status:()=>$("/git/status"),branches:()=>$("/git/branches"),checkout:e=>$("/git/checkout",{method:"POST",body:JSON.stringify({branch:e})}),commit:e=>$("/git/commit",{method:"POST",body:JSON.stringify({message:e})}),pull:e=>$("/git/pull",{method:"POST",body:JSON.stringify({rebase:e})}),push:()=>$("/git/push",{method:"POST"}),fullSync:e=>$("/git/full-sync",{method:"POST",body:JSON.stringify({message:e})}),log:e=>$(`/git/log${e?`?count=${e}`:""}`),diff:e=>$(`/git/diff${e?"?staged=true":""}`),conflictContent:e=>$(`/git/conflict-content/${encodeURIComponent(e)}`),resolveConflict:(e,t)=>$("/git/resolve-conflict",{method:"POST",body:JSON.stringify({filePath:e,content:t})}),continueRebase:()=>$("/git/continue-rebase",{method:"POST"}),abortRebase:()=>$("/git/abort-rebase",{method:"POST"}),generateCommitMessage:()=>$("/git/generate-commit-message",{method:"POST"}),resolveConflictAI:(e,t,s)=>$("/git/resolve-conflict-ai",{method:"POST",body:JSON.stringify({filePath:e,ours:t,theirs:s})}),impact:()=>$("/git/impact")};function Ka(e,t){const s=t.replace(/\\/g,"/").split("/").pop()??t;return`${dm}/results/${e}/${encodeURIComponent(s)}`}function ON(e){return`${dm}/results/baselines/${encodeURIComponent(e)}.png`}const DN={search:e=>$(`/search?q=${encodeURIComponent(e)}`)},LN={generate:e=>$("/ci-config",{method:"POST",body:JSON.stringify(e)})},AN={list:()=>$("/templates")},FN={get:(e,t)=>{const s=new URLSearchParams;return e&&s.set("suiteId",e),t&&s.set("caseId",t),$(`/flakiness?${s}`)}},oa={list:()=>$("/step-library"),create:e=>$("/step-library",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>$(`/step-library/${e}`,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>$(`/step-library/${e}`,{method:"DELETE"})},rf={capture:(e,t)=>$(`/baselines/${e}/capture`,{method:"POST",body:JSON.stringify({screenshotPath:t})}),get:e=>$(`/baselines/${e}`)};let ti=!1,ad=null;const Br=[];let id=!1,ld=[];const Hu=new Set;function Dn(){for(const e of Hu)e()}const Pe={subscribe(e){return Hu.add(e),()=>{Hu.delete(e)}},getSnapshot(){return{panelOpen:ti,operationInProgress:ad,logSteps:[...Br],hasConflict:id,conflictFiles:[...ld]}},togglePanel(){ti=!ti,Dn()},openPanel(){ti=!0,Dn()},closePanel(){ti=!1,Dn()},startOperation(e){ad=e,Br.length=0,Dn()},finishOperation(){ad=null,Dn()},addLogStep(e){const t=Br.findIndex(s=>s.step===e.step&&s.status==="running");t>=0&&e.status!=="running"?Br[t]=e:t<0&&Br.push(e),Dn()},clearLogs(){Br.length=0,Dn()},setConflict(e){id=e.length>0,ld=e,Dn()},clearConflict(){id=!1,ld=[],Dn()}};function Nc(){const[e,t]=m.useState(()=>Pe.getSnapshot());return m.useEffect(()=>Pe.subscribe(()=>t(Pe.getSnapshot())),[]),e}function um(){return ke({queryKey:["git","status"],queryFn:Ke.status,refetchInterval:5e3,retry:1})}function Xg(){return ke({queryKey:["git","branches"],queryFn:Ke.branches,staleTime:3e4,retry:1})}function Zg(e){return ke({queryKey:["git","log",e],queryFn:()=>Ke.log(e),staleTime:1e4,retry:1})}function ey(){const e=ie();return Y({mutationFn:t=>Ke.checkout(t),onSuccess:(t,s)=>{e.invalidateQueries({queryKey:["git"]}),O.success(`Switched to ${s}`)},onError:t=>O.error(`Checkout failed: ${t.message}`)})}function ty(){const e=ie();return Y({mutationFn:t=>(Pe.startOperation("commit"),Ke.commit(t)),onSuccess:t=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),O.success(`Committed: ${t.hash}`)},onError:t=>{Pe.finishOperation(),O.error(`Commit failed: ${t.message}`)}})}function ny(){const e=ie();return Y({mutationFn:t=>(Pe.startOperation("pull"),Ke.pull(t)),onSuccess:()=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),O.success("Pull successful")},onError:t=>{Pe.finishOperation(),O.error(`Pull failed: ${t.message}`)}})}function sy(){const e=ie();return Y({mutationFn:()=>(Pe.startOperation("push"),Ke.push()),onSuccess:()=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),O.success("Pushed to remote")},onError:t=>{Pe.finishOperation(),O.error(`Push failed: ${t.message}`)}})}function ry(){const e=ie();return Y({mutationFn:t=>(Pe.startOperation("full-sync"),Ke.fullSync(t)),onSuccess:()=>{Pe.finishOperation(),e.invalidateQueries({queryKey:["git"]}),O.success("Full sync complete")},onError:t=>{Pe.finishOperation(),O.error(`Sync failed: ${t.message}`)}})}function ay(){return Y({mutationFn:()=>Ke.generateCommitMessage(),onError:e=>O.error(`AI generation failed: ${e.message}`)})}function iy(){const e=ie();return Y({mutationFn:({filePath:t,content:s})=>Ke.resolveConflict(t,s),onSuccess:()=>{e.invalidateQueries({queryKey:["git"]}),O.success("Conflict resolved")},onError:t=>O.error(`Resolve failed: ${t.message}`)})}function ly(){return Y({mutationFn:({filePath:e,ours:t,theirs:s})=>Ke.resolveConflictAI(e,t,s),onError:e=>O.error(`AI resolve failed: ${e.message}`)})}function oy(){const e=ie();return Y({mutationFn:()=>Ke.continueRebase(),onSuccess:()=>{Pe.clearConflict(),e.invalidateQueries({queryKey:["git"]}),O.success("Rebase continued")},onError:t=>O.error(`Continue rebase failed: ${t.message}`)})}function cy(){const e=ie();return Y({mutationFn:()=>Ke.abortRebase(),onSuccess:()=>{Pe.clearConflict(),e.invalidateQueries({queryKey:["git"]}),O.success("Rebase aborted")},onError:t=>O.error(`Abort rebase failed: ${t.message}`)})}const dy="assuremind-theme";function IN(){var t;const e=localStorage.getItem(dy);return e==="dark"||e==="light"?e:(t=window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}let Qr=IN();const qu=new Set;function uy(e){const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")}uy(Qr);function _N(){for(const e of qu)e()}const od={subscribe(e){return qu.add(e),()=>{qu.delete(e)}},getSnapshot(){return Qr},toggle(){Qr=Qr==="light"?"dark":"light",localStorage.setItem(dy,Qr),uy(Qr),_N()}};function $N(){return{theme:m.useSyncExternalStore(od.subscribe,od.getSnapshot),toggle:od.toggle}}const xy=6048e5,UN=864e5,$l=43200,af=1440,lf=Symbol.for("constructDateFrom");function Xn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&lf in e?e[lf](t):e instanceof Date?new e.constructor(t):new Date(t)}function et(e,t){return Xn(t||e,e)}let BN={};function pl(){return BN}function Xi(e,t){var o,c,u,x;const s=pl(),r=(t==null?void 0:t.weekStartsOn)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??s.weekStartsOn??((x=(u=s.locale)==null?void 0:u.options)==null?void 0:x.weekStartsOn)??0,a=et(e,t==null?void 0:t.in),i=a.getDay(),l=(i<r?7:0)+i-r;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Bo(e,t){return Xi(e,{...t,weekStartsOn:1})}function my(e,t){const s=et(e,t==null?void 0:t.in),r=s.getFullYear(),a=Xn(s,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=Bo(a),l=Xn(s,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const o=Bo(l);return s.getTime()>=i.getTime()?r+1:s.getTime()>=o.getTime()?r:r-1}function Ho(e){const t=et(e),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+e-+s}function wc(e,...t){const s=Xn.bind(null,e||t.find(r=>typeof r=="object"));return t.map(s)}function of(e,t){const s=et(e,t==null?void 0:t.in);return s.setHours(0,0,0,0),s}function HN(e,t,s){const[r,a]=wc(s==null?void 0:s.in,e,t),i=of(r),l=of(a),o=+i-Ho(i),c=+l-Ho(l);return Math.round((o-c)/UN)}function qN(e,t){const s=my(e,t),r=Xn(e,0);return r.setFullYear(s,0,4),r.setHours(0,0,0,0),Bo(r)}function co(e,t){const s=+et(e)-+et(t);return s<0?-1:s>0?1:s}function KN(e){return Xn(e,Date.now())}function WN(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VN(e){return!(!WN(e)&&typeof e!="number"||isNaN(+et(e)))}function QN(e,t,s){const[r,a]=wc(s==null?void 0:s.in,e,t),i=r.getFullYear()-a.getFullYear(),l=r.getMonth()-a.getMonth();return i*12+l}function GN(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function YN(e,t){return+et(e)-+et(t)}function JN(e,t){const s=et(e,t==null?void 0:t.in);return s.setHours(23,59,59,999),s}function XN(e,t){const s=et(e,t==null?void 0:t.in),r=s.getMonth();return s.setFullYear(s.getFullYear(),r+1,0),s.setHours(23,59,59,999),s}function ZN(e,t){const s=et(e,t==null?void 0:t.in);return+JN(s,t)==+XN(s,t)}function ew(e,t,s){const[r,a,i]=wc(s==null?void 0:s.in,e,e,t),l=co(a,i),o=Math.abs(QN(a,i));if(o<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-l*o);let c=co(a,i)===-l;ZN(r)&&o===1&&co(r,i)===1&&(c=!1);const u=l*(o-+c);return u===0?0:u}function tw(e,t,s){const r=YN(e,t)/1e3;return GN(s==null?void 0:s.roundingMethod)(r)}function nw(e,t){const s=et(e,t==null?void 0:t.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const sw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rw=(e,t,s)=>{let r;const a=sw[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+r:r+" ago":r};function cd(e){return(t={})=>{const s=t.width?String(t.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const aw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ow={date:cd({formats:aw,defaultWidth:"full"}),time:cd({formats:iw,defaultWidth:"full"}),dateTime:cd({formats:lw,defaultWidth:"full"})},cw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dw=(e,t,s,r)=>cw[e];function ni(e){return(t,s)=>{const r=s!=null&&s.context?String(s.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,o=s!=null&&s.width?String(s.width):l;a=e.formattingValues[o]||e.formattingValues[l]}else{const l=e.defaultWidth,o=s!=null&&s.width?String(s.width):e.defaultWidth;a=e.values[o]||e.values[l]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const uw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},hw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},fw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},pw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gw=(e,t)=>{const s=Number(e),r=s%100;if(r>20||r<10)switch(r%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},yw={ordinalNumber:gw,era:ni({values:uw,defaultWidth:"wide"}),quarter:ni({values:xw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ni({values:mw,defaultWidth:"wide"}),day:ni({values:hw,defaultWidth:"wide"}),dayPeriod:ni({values:fw,defaultWidth:"wide",formattingValues:pw,defaultFormattingWidth:"wide"})};function si(e){return(t,s={})=>{const r=s.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const l=i[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?vw(o,f=>f.test(l)):bw(o,f=>f.test(l));let u;u=e.valueCallback?e.valueCallback(c):c,u=s.valueCallback?s.valueCallback(u):u;const x=t.slice(l.length);return{value:u,rest:x}}}function bw(e,t){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return s}function vw(e,t){for(let s=0;s<e.length;s++)if(t(e[s]))return s}function jw(e){return(t,s={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let l=e.valueCallback?e.valueCallback(i[0]):i[0];l=s.valueCallback?s.valueCallback(l):l;const o=t.slice(a.length);return{value:l,rest:o}}}const Nw=/^(\d+)(th|st|nd|rd)?/i,ww=/\d+/i,kw={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Sw={any:[/^b/i,/^(a|c)/i]},Cw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ew={any:[/1/i,/2/i,/3/i,/4/i]},Pw={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zw={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Mw={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Tw={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Rw={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ow={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dw={ordinalNumber:jw({matchPattern:Nw,parsePattern:ww,valueCallback:e=>parseInt(e,10)}),era:si({matchPatterns:kw,defaultMatchWidth:"wide",parsePatterns:Sw,defaultParseWidth:"any"}),quarter:si({matchPatterns:Cw,defaultMatchWidth:"wide",parsePatterns:Ew,defaultParseWidth:"any",valueCallback:e=>e+1}),month:si({matchPatterns:Pw,defaultMatchWidth:"wide",parsePatterns:zw,defaultParseWidth:"any"}),day:si({matchPatterns:Mw,defaultMatchWidth:"wide",parsePatterns:Tw,defaultParseWidth:"any"}),dayPeriod:si({matchPatterns:Rw,defaultMatchWidth:"any",parsePatterns:Ow,defaultParseWidth:"any"})},hy={code:"en-US",formatDistance:rw,formatLong:ow,formatRelative:dw,localize:yw,match:Dw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lw(e,t){const s=et(e,t==null?void 0:t.in);return HN(s,nw(s))+1}function Aw(e,t){const s=et(e,t==null?void 0:t.in),r=+Bo(s)-+qN(s);return Math.round(r/xy)+1}function fy(e,t){var x,f,g,v;const s=et(e,t==null?void 0:t.in),r=s.getFullYear(),a=pl(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(x=t==null?void 0:t.locale)==null?void 0:x.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(g=a.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??1,l=Xn((t==null?void 0:t.in)||e,0);l.setFullYear(r+1,0,i),l.setHours(0,0,0,0);const o=Xi(l,t),c=Xn((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=Xi(c,t);return+s>=+o?r+1:+s>=+u?r:r-1}function Fw(e,t){var o,c,u,x;const s=pl(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??s.firstWeekContainsDate??((x=(u=s.locale)==null?void 0:u.options)==null?void 0:x.firstWeekContainsDate)??1,a=fy(e,t),i=Xn((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),Xi(i,t)}function Iw(e,t){const s=et(e,t==null?void 0:t.in),r=+Xi(s,t)-+Fw(s,t);return Math.round(r/xy)+1}function Ne(e,t){const s=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return s+r}const rs={y(e,t){const s=e.getFullYear(),r=s>0?s:1-s;return Ne(t==="yy"?r%100:r,t.length)},M(e,t){const s=e.getMonth();return t==="M"?String(s+1):Ne(s+1,2)},d(e,t){return Ne(e.getDate(),t.length)},a(e,t){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h(e,t){return Ne(e.getHours()%12||12,t.length)},H(e,t){return Ne(e.getHours(),t.length)},m(e,t){return Ne(e.getMinutes(),t.length)},s(e,t){return Ne(e.getSeconds(),t.length)},S(e,t){const s=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,s-3));return Ne(a,t.length)}},Hr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cf={G:function(e,t,s){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})}},y:function(e,t,s){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return s.ordinalNumber(a,{unit:"year"})}return rs.y(e,t)},Y:function(e,t,s,r){const a=fy(e,r),i=a>0?a:1-a;if(t==="YY"){const l=i%100;return Ne(l,2)}return t==="Yo"?s.ordinalNumber(i,{unit:"year"}):Ne(i,t.length)},R:function(e,t){const s=my(e);return Ne(s,t.length)},u:function(e,t){const s=e.getFullYear();return Ne(s,t.length)},Q:function(e,t,s){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ne(r,2);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,s){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ne(r,2);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,s){const r=e.getMonth();switch(t){case"M":case"MM":return rs.M(e,t);case"Mo":return s.ordinalNumber(r+1,{unit:"month"});case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,s){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ne(r+1,2);case"Lo":return s.ordinalNumber(r+1,{unit:"month"});case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,s,r){const a=Iw(e,r);return t==="wo"?s.ordinalNumber(a,{unit:"week"}):Ne(a,t.length)},I:function(e,t,s){const r=Aw(e);return t==="Io"?s.ordinalNumber(r,{unit:"week"}):Ne(r,t.length)},d:function(e,t,s){return t==="do"?s.ordinalNumber(e.getDate(),{unit:"date"}):rs.d(e,t)},D:function(e,t,s){const r=Lw(e);return t==="Do"?s.ordinalNumber(r,{unit:"dayOfYear"}):Ne(r,t.length)},E:function(e,t,s){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,s,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ne(i,2);case"eo":return s.ordinalNumber(i,{unit:"day"});case"eee":return s.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(a,{width:"short",context:"formatting"});case"eeee":default:return s.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,s,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ne(i,t.length);case"co":return s.ordinalNumber(i,{unit:"day"});case"ccc":return s.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(a,{width:"narrow",context:"standalone"});case"cccccc":return s.day(a,{width:"short",context:"standalone"});case"cccc":default:return s.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,s){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Ne(a,t.length);case"io":return s.ordinalNumber(a,{unit:"day"});case"iii":return s.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(r,{width:"short",context:"formatting"});case"iiii":default:return s.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,s){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,s){const r=e.getHours();let a;switch(r===12?a=Hr.noon:r===0?a=Hr.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,s){const r=e.getHours();let a;switch(r>=17?a=Hr.evening:r>=12?a=Hr.afternoon:r>=4?a=Hr.morning:a=Hr.night,t){case"B":case"BB":case"BBB":return s.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,s){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),s.ordinalNumber(r,{unit:"hour"})}return rs.h(e,t)},H:function(e,t,s){return t==="Ho"?s.ordinalNumber(e.getHours(),{unit:"hour"}):rs.H(e,t)},K:function(e,t,s){const r=e.getHours()%12;return t==="Ko"?s.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},k:function(e,t,s){let r=e.getHours();return r===0&&(r=24),t==="ko"?s.ordinalNumber(r,{unit:"hour"}):Ne(r,t.length)},m:function(e,t,s){return t==="mo"?s.ordinalNumber(e.getMinutes(),{unit:"minute"}):rs.m(e,t)},s:function(e,t,s){return t==="so"?s.ordinalNumber(e.getSeconds(),{unit:"second"}):rs.s(e,t)},S:function(e,t){return rs.S(e,t)},X:function(e,t,s){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return uf(r);case"XXXX":case"XX":return er(r);case"XXXXX":case"XXX":default:return er(r,":")}},x:function(e,t,s){const r=e.getTimezoneOffset();switch(t){case"x":return uf(r);case"xxxx":case"xx":return er(r);case"xxxxx":case"xxx":default:return er(r,":")}},O:function(e,t,s){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+df(r,":");case"OOOO":default:return"GMT"+er(r,":")}},z:function(e,t,s){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+df(r,":");case"zzzz":default:return"GMT"+er(r,":")}},t:function(e,t,s){const r=Math.trunc(+e/1e3);return Ne(r,t.length)},T:function(e,t,s){return Ne(+e,t.length)}};function df(e,t=""){const s=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?s+String(a):s+String(a)+t+Ne(i,2)}function uf(e,t){return e%60===0?(e>0?"-":"+")+Ne(Math.abs(e)/60,2):er(e,t)}function er(e,t=""){const s=e>0?"-":"+",r=Math.abs(e),a=Ne(Math.trunc(r/60),2),i=Ne(r%60,2);return s+a+t+i}const xf=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},py=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},_w=(e,t)=>{const s=e.match(/(P+)(p+)?/)||[],r=s[1],a=s[2];if(!a)return xf(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",xf(r,t)).replace("{{time}}",py(a,t))},$w={p:py,P:_w},Uw=/^D+$/,Bw=/^Y+$/,Hw=["D","DD","YY","YYYY"];function qw(e){return Uw.test(e)}function Kw(e){return Bw.test(e)}function Ww(e,t,s){const r=Vw(e,t,s);if(console.warn(r),Hw.includes(e))throw new RangeError(r)}function Vw(e,t,s){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yw=/^'([^]*?)'?$/,Jw=/''/g,Xw=/[a-zA-Z]/;function Zw(e,t,s){var x,f,g,v;const r=pl(),a=r.locale??hy,i=r.firstWeekContainsDate??((f=(x=r.locale)==null?void 0:x.options)==null?void 0:f.firstWeekContainsDate)??1,l=r.weekStartsOn??((v=(g=r.locale)==null?void 0:g.options)==null?void 0:v.weekStartsOn)??0,o=et(e,s==null?void 0:s.in);if(!VN(o))throw new RangeError("Invalid time value");let c=t.match(Gw).map(y=>{const j=y[0];if(j==="p"||j==="P"){const w=$w[j];return w(y,a.formatLong)}return y}).join("").match(Qw).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const j=y[0];if(j==="'")return{isToken:!1,value:ek(y)};if(cf[j])return{isToken:!0,value:y};if(j.match(Xw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(c=a.localize.preprocessor(o,c));const u={firstWeekContainsDate:i,weekStartsOn:l,locale:a};return c.map(y=>{if(!y.isToken)return y.value;const j=y.value;(Kw(j)||qw(j))&&Ww(j,t,String(e));const w=cf[j[0]];return w(o,j,a.localize,u)}).join("")}function ek(e){const t=e.match(Yw);return t?t[1].replace(Jw,"'"):e}function tk(e,t,s){const r=pl(),a=(s==null?void 0:s.locale)??r.locale??hy,i=2520,l=co(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const o=Object.assign({},s,{addSuffix:s==null?void 0:s.addSuffix,comparison:l}),[c,u]=wc(s==null?void 0:s.in,...l>0?[t,e]:[e,t]),x=tw(u,c),f=(Ho(u)-Ho(c))/1e3,g=Math.round((x-f)/60);let v;if(g<2)return s!=null&&s.includeSeconds?x<5?a.formatDistance("lessThanXSeconds",5,o):x<10?a.formatDistance("lessThanXSeconds",10,o):x<20?a.formatDistance("lessThanXSeconds",20,o):x<40?a.formatDistance("halfAMinute",0,o):x<60?a.formatDistance("lessThanXMinutes",1,o):a.formatDistance("xMinutes",1,o):g===0?a.formatDistance("lessThanXMinutes",1,o):a.formatDistance("xMinutes",g,o);if(g<45)return a.formatDistance("xMinutes",g,o);if(g<90)return a.formatDistance("aboutXHours",1,o);if(g<af){const y=Math.round(g/60);return a.formatDistance("aboutXHours",y,o)}else{if(g<i)return a.formatDistance("xDays",1,o);if(g<$l){const y=Math.round(g/af);return a.formatDistance("xDays",y,o)}else if(g<$l*2)return v=Math.round(g/$l),a.formatDistance("aboutXMonths",v,o)}if(v=ew(u,c),v<12){const y=Math.round(g/$l);return a.formatDistance("xMonths",y,o)}else{const y=v%12,j=Math.trunc(v/12);return y<3?a.formatDistance("aboutXYears",j,o):y<9?a.formatDistance("overXYears",j,o):a.formatDistance("almostXYears",j+1,o)}}function qo(e,t){return tk(e,KN(e),t)}let Ys=[];const Ku=new Set;function dd(){Ku.forEach(e=>e())}const gr={subscribe(e){return Ku.add(e),()=>{Ku.delete(e)}},getSnapshot(){return{notifications:Ys,unreadCount:Ys.filter(e=>!e.read).length}},push(e){Ys=[e,...Ys].slice(0,20),dd()},markAllRead(){Ys=Ys.map(e=>({...e,read:!0})),dd()},clear(){Ys=[],dd()}};function nk(){const[e,t]=m.useState(()=>gr.getSnapshot());return m.useEffect(()=>gr.subscribe(()=>t(gr.getSnapshot())),[]),e}function sk({type:e}){switch(e){case"run-complete":return n.jsx(Ue,{size:13,className:"text-emerald-500 flex-shrink-0"});case"run-error":return n.jsx(ut,{size:13,className:"text-red-500 flex-shrink-0"});case"healing":return n.jsx(Be,{size:13,className:"text-amber-500 flex-shrink-0"});case"git":return n.jsx(Cr,{size:13,className:"text-blue-500 flex-shrink-0"});default:return n.jsx(Uu,{size:13,className:"text-content-tertiary flex-shrink-0"})}}function rk(){const[e,t]=m.useState(!1),{notifications:s,unreadCount:r}=nk(),a=m.useRef(null),i=En();return m.useEffect(()=>{if(!e)return;function l(o){a.current&&!a.current.contains(o.target)&&t(!1)}return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[e]),n.jsxs("div",{className:"relative",ref:a,children:[n.jsxs("button",{type:"button",onClick:()=>t(l=>!l),className:S("relative p-2 rounded-lg transition-all duration-200",e?"bg-accent-muted text-accent":"text-content-tertiary hover:bg-surface-inset hover:text-content-secondary"),"aria-label":"Notifications",title:"Notifications",children:[n.jsx(Uu,{size:16}),r>0&&n.jsx("span",{className:"absolute -top-1 -right-1 w-4 h-4 rounded-full bg-red-500 text-white text-[9px] font-bold flex items-center justify-center ring-2 ring-surface",children:r>9?"9+":r})]}),e&&n.jsxs("div",{className:"absolute right-0 top-full mt-2 w-80 bg-surface border border-border rounded-xl shadow-modal z-50 overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border bg-surface-inset/50",children:[n.jsx("span",{className:"text-xs font-semibold text-content",children:"Notifications"}),n.jsxs("div",{className:"flex items-center gap-1",children:[r>0&&n.jsx("button",{type:"button",onClick:()=>gr.markAllRead(),className:"p-1 rounded text-content-tertiary hover:text-content hover:bg-surface-inset transition-colors",title:"Mark all read",children:n.jsx(Mg,{size:12})}),n.jsx("button",{type:"button",onClick:()=>gr.clear(),className:"p-1 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors",title:"Clear all",children:n.jsx(fn,{size:12})})]})]}),n.jsx("div",{className:"max-h-80 overflow-y-auto divide-y divide-border/50",children:s.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-2",children:[n.jsx(Uu,{size:20,className:"text-content-tertiary/40"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No notifications"})]}):s.map(l=>n.jsxs("div",{className:S("flex items-start gap-2.5 px-3 py-2.5 transition-colors",!l.read&&"bg-accent-muted/20",l.link&&"cursor-pointer hover:bg-surface-inset/50"),onClick:()=>{l.link&&(t(!1),i(l.link))},children:[n.jsx("div",{className:"mt-0.5",children:n.jsx(sk,{type:l.type})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:S("text-xs leading-relaxed",l.read?"text-content-secondary":"text-content font-medium"),children:l.message}),n.jsx("p",{className:"text-[9px] text-content-tertiary mt-0.5",children:qo(new Date(l.timestamp),{addSuffix:!0})})]}),l.link&&n.jsx(qa,{size:10,className:"text-content-tertiary/60 flex-shrink-0 mt-0.5"}),!l.read&&n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent flex-shrink-0 mt-1.5"})]},l.id))})]})]})}function ak(){const e=ie(),t=En(),[s,r]=m.useState(!1),a=m.useRef(null),{data:i}=ke({queryKey:["config"],queryFn:()=>Ia.get(),staleTime:3e4}),l=Y({mutationFn:u=>{var f;const x=(f=i==null?void 0:i.profiles)==null?void 0:f.find(g=>g.name===u);if(!x)throw new Error("Profile not found");return Ia.update({activeProfile:x.name,environment:x.environment,baseUrl:x.baseUrl,browsers:x.browsers,...x.headless!==void 0?{headless:x.headless}:{}})},onSuccess:()=>{e.invalidateQueries({queryKey:["config"]}),r(!1)}});m.useEffect(()=>{const u=x=>{a.current&&!a.current.contains(x.target)&&r(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const o=(i==null?void 0:i.profiles)??[];if(o.length===0)return null;const c=(i==null?void 0:i.activeProfile)??(i==null?void 0:i.environment)??"env";return n.jsxs("div",{ref:a,className:"relative",children:[n.jsxs("button",{type:"button",onClick:()=>r(u=>!u),className:"flex items-center gap-1.5 text-xs border border-border rounded-lg px-2.5 py-1.5 text-content-secondary hover:bg-surface-inset transition-colors",children:[n.jsx(Er,{size:12,className:"text-accent flex-shrink-0"}),n.jsx("span",{className:"hidden sm:inline max-w-[100px] truncate",children:c}),n.jsx(Tt,{size:11,className:"text-content-tertiary"})]}),s&&n.jsxs("div",{className:"absolute right-0 top-full mt-1 w-52 bg-surface border border-border rounded-xl shadow-elevated z-50 overflow-hidden",children:[n.jsx("div",{className:"px-3 py-2 border-b border-border",children:n.jsx("p",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Environment Profiles"})}),n.jsx("div",{className:"py-1",children:o.map(u=>n.jsxs("button",{type:"button",onClick:()=>l.mutate(u.name),className:S("w-full text-left px-3 py-2 text-xs hover:bg-surface-inset transition-colors flex items-center justify-between gap-2",(i==null?void 0:i.activeProfile)===u.name&&"text-accent font-semibold"),children:[n.jsx("span",{className:"truncate",children:u.name}),n.jsx("span",{className:"text-[9px] text-content-tertiary flex-shrink-0",children:u.environment})]},u.name))}),n.jsx("div",{className:"border-t border-border px-3 py-2",children:n.jsxs("button",{type:"button",onClick:()=>{r(!1),t("/settings#profiles")},className:"flex items-center gap-1 text-[10px] text-content-tertiary hover:text-accent transition-colors",children:[n.jsx(Aa,{size:10})," Manage profiles"]})})]})]})}const ik={anthropic:"Anthropic",bedrock:"Bedrock",openai:"OpenAI",google:"Google","azure-openai":"Azure OpenAI",ollama:"Ollama",unknown:"AI"};function lk({title:e,onMenuClick:t}){const{data:s}=ke({queryKey:["ai-provider"],queryFn:()=>Ia.getAiProvider(),staleTime:6e4,retry:!1}),{panelOpen:r}=Nc(),{data:a}=um(),{theme:i,toggle:l}=$N(),o=ik[(s==null?void 0:s.provider)??""]??(s==null?void 0:s.provider)??"...",c=(s==null?void 0:s.model)??"...",u=((a==null?void 0:a.modified.length)??0)+((a==null?void 0:a.added.length)??0)+((a==null?void 0:a.deleted.length)??0)+((a==null?void 0:a.untracked.length)??0);return n.jsxs("header",{className:"h-14 bg-surface border-b border-border flex items-center px-5 gap-3 flex-shrink-0",children:[n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg hover:bg-surface-inset text-content-tertiary lg:hidden transition-colors","aria-label":"Toggle sidebar",children:n.jsx(fN,{size:18})}),n.jsx("h1",{className:"text-sm font-semibold text-content tracking-tight flex-1",children:e}),s&&n.jsxs("div",{className:"hidden sm:flex items-center gap-1.5 text-xs bg-surface-inset border border-border rounded-lg px-3 py-1.5",children:[n.jsx(eN,{size:13,className:"text-accent flex-shrink-0"}),n.jsx("span",{className:"font-medium text-content-secondary",children:o}),n.jsx("span",{className:"text-content-tertiary/50",children:"/"}),n.jsx("span",{className:"text-content-tertiary truncate max-w-[140px]",children:c})]}),n.jsx(ak,{}),n.jsx(rk,{}),n.jsx("button",{type:"button",onClick:l,className:S("p-2 rounded-lg transition-all duration-200",i==="dark"?"bg-surface-inset text-amber-400 hover:bg-surface-overlay":"text-content-tertiary hover:bg-surface-inset hover:text-content-secondary"),"aria-label":i==="dark"?"Switch to light mode":"Switch to dark mode",title:i==="dark"?"Light mode":"Dark mode",children:i==="dark"?n.jsx(kN,{size:16}):n.jsx(gN,{size:16})}),n.jsxs("button",{type:"button",onClick:()=>Pe.togglePanel(),className:S("relative flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-200",r?"bg-accent-muted text-accent border border-accent/20":"text-content-tertiary hover:bg-surface-inset hover:text-content-secondary border border-transparent"),"aria-label":"Toggle Git panel",title:"Git Control Center",children:[n.jsx(Cr,{size:14}),n.jsx("span",{className:"hidden sm:inline",children:"Git"}),u>0&&n.jsx("span",{className:"absolute -top-1.5 -right-1.5 w-4 h-4 rounded-full bg-amber-500 text-white text-[9px] font-bold flex items-center justify-center ring-2 ring-surface",children:u>9?"9+":u})]})]})}function se({variant:e="primary",size:t="md",loading:s=!1,children:r,className:a,disabled:i,...l}){return n.jsxs("button",{...l,disabled:i||s,className:S("inline-flex items-center justify-center gap-2 font-medium rounded-lg transition-all duration-150","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",{"bg-gradient-to-b from-accent to-accent-dark text-white shadow-sm hover:shadow-md hover:brightness-110 focus-visible:ring-accent":e==="primary","bg-surface border border-border text-content-secondary hover:bg-surface-inset hover:text-content hover:border-border-strong focus-visible:ring-accent":e==="secondary","text-content-secondary hover:bg-surface-inset hover:text-content focus-visible:ring-accent/40":e==="ghost","bg-gradient-to-b from-red-500 to-red-600 text-white shadow-sm hover:shadow-md hover:brightness-110 focus-visible:ring-red-500":e==="danger","px-2.5 py-1.5 text-xs gap-1.5":t==="sm","px-4 py-2 text-sm":t==="md","px-5 py-2.5 text-sm":t==="lg","opacity-40 cursor-not-allowed pointer-events-none":i||s},a),children:[s&&n.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",children:[n.jsx("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),n.jsx("path",{className:"opacity-80",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),r]})}function Wa(e){const t=m.useRef(null),s=m.useRef(e);s.current=e;const r=m.useCallback(()=>{var i;if(((i=t.current)==null?void 0:i.readyState)===WebSocket.OPEN)return;const a=new WebSocket(RN);t.current=a,a.onmessage=l=>{try{const o=JSON.parse(l.data),c=s.current[o.event];c&&c(o.data)}catch{}},a.onclose=()=>{setTimeout(r,3e3)},a.onerror=()=>{a.close()}},[]);m.useEffect(()=>(r(),()=>{var a;(a=t.current)==null||a.close()}),[r])}let Ko={isRunning:!1,runId:null,currentBrowser:null,currentCase:null,currentStep:null,completed:null,error:null,activeCases:new Map};const Wu=new Set;function gy(){Wu.forEach(e=>e())}function ri(e){Ko=e(Ko),gy()}const ud={subscribe(e){return Wu.add(e),()=>{Wu.delete(e)}},getSnapshot(){return Ko},reset(){Ko={isRunning:!1,runId:null,currentBrowser:null,currentCase:null,currentStep:null,completed:null,error:null,activeCases:new Map},gy()}};function xm(){const e=m.useSyncExternalStore(ud.subscribe,ud.getSnapshot),t=m.useCallback(o=>{const c=o;ri(()=>({isRunning:!0,runId:c.runId,currentBrowser:null,currentCase:null,currentStep:null,completed:null,error:null,activeCases:new Map}))},[]),s=m.useCallback(o=>{const c=o;ri(u=>{const x=new Map(u.activeCases);return x.set(c.caseId,c.caseName),{...u,isRunning:!0,currentBrowser:c.browser??u.currentBrowser,currentCase:c,currentStep:null,activeCases:x}})},[]),r=m.useCallback(o=>{ri(c=>({...c,isRunning:!0,currentStep:o}))},[]),a=m.useCallback(o=>{ri(c=>({...c,isRunning:!1,completed:o,currentCase:null,currentStep:null}))},[]),i=m.useCallback(o=>{const c=o;ri(u=>({...u,isRunning:!1,error:c.error}))},[]);Wa({"run:start":t,"run:case":s,"run:step":r,"run:complete":a,"run:error":i});const l=m.useCallback(()=>{ud.reset()},[]);return{...e,reset:l}}function xd(e,t){Wa({[e]:t})}function mf({data:e,maxHeight:t=32}){const s=Math.max(...e.map(r=>r.value),1);return n.jsx("div",{className:"flex items-end gap-[3px]",style:{height:t},children:e.map((r,a)=>n.jsx("div",{className:S("w-[6px] rounded-full transition-all duration-500",r.color),style:{height:`${Math.max(r.value/s*100,6)}%`}},a))})}function ok({rate:e,hasData:t=!1,size:s=80}){const a=(s-6)/2,i=2*Math.PI*a,l=i-e/100*i,o=t?"#ef4444":"var(--color-border)";return n.jsxs("div",{className:"relative",style:{width:s,height:s},children:[n.jsxs("svg",{width:s,height:s,className:"-rotate-90",children:[n.jsx("circle",{cx:s/2,cy:s/2,r:a,fill:"none",stroke:o,strokeWidth:6}),n.jsx("circle",{cx:s/2,cy:s/2,r:a,fill:"none",stroke:"#10b981",strokeWidth:6,strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:l,className:"transition-all duration-1000 ease-out"})]}),n.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:n.jsxs("span",{className:"text-lg font-bold text-content tabular-nums",children:[e,"%"]})})]})}function ck({status:e}){const t={passed:"bg-emerald-500",failed:"bg-red-500",partial:"bg-amber-500",running:"bg-blue-500 animate-pulse",skipped:"bg-slate-400"};return n.jsx("span",{className:S("w-2 h-2 rounded-full flex-shrink-0",t[e]??"bg-slate-400")})}function dk(e,t){return e.filter(s=>{var r;return(r=s.suiteIds)==null?void 0:r.includes(t)}).slice(-7).map(s=>({value:s.totalTests>0?Math.round(s.passed/s.totalTests*100):0,color:s.failed>0?"bg-red-400":"bg-emerald-400"}))}function uk(){const e=En(),{data:t=[],isLoading:s}=ke({queryKey:["reports"],queryFn:()=>Uo.list(20)}),{data:r=[],isLoading:a}=ke({queryKey:["suites"],queryFn:()=>Or.list()}),{data:i}=ke({queryKey:["healing-stats"],queryFn:()=>Bn.stats(),staleTime:3e4,retry:!1}),l=xm(),o=s||a,c=t[0],u=r.reduce((N,C)=>N+(C.caseCount??0),0),x=r.filter(N=>(N.type??"ui")==="ui"),f=r.filter(N=>(N.type??"ui")==="api"),g=x.reduce((N,C)=>N+(C.caseCount??0),0),v=f.reduce((N,C)=>N+(C.caseCount??0),0),y=t.reduce((N,C)=>N+C.passed,0),j=t.reduce((N,C)=>N+C.failed,0),w=t.reduce((N,C)=>N+C.skipped,0),h=y+j>0?Math.round(y/(y+j)*100):0,d=y+j+w,p=t.filter(N=>N.duration).length>0?Math.round(t.filter(N=>N.duration).reduce((N,C)=>N+(C.duration??0),0)/t.filter(N=>N.duration).length/1e3):0,b=[...t].reverse().map(N=>({value:N.passed+N.failed+N.skipped,color:N.status==="passed"?"bg-emerald-400":N.status==="failed"?"bg-red-400":"bg-amber-400"}));return o?n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 px-8 pt-6 pb-4",children:[n.jsx("div",{className:"h-7 w-48 rounded-lg skeleton-shimmer"}),n.jsx("div",{className:"h-4 w-72 rounded-lg skeleton-shimmer mt-2"})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-8 pb-8",children:[n.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[1,2,3,4].map(N=>n.jsx("div",{className:"h-28 rounded-2xl skeleton-shimmer"},N))}),n.jsx("div",{className:"grid grid-cols-3 gap-4",children:[1,2,3].map(N=>n.jsx("div",{className:"h-64 rounded-2xl skeleton-shimmer"},N))})]})]}):n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 px-8 pt-6 pb-4 flex items-end justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-content tracking-tight",children:"Dashboard"}),n.jsx("p",{className:"text-sm text-content-tertiary mt-0.5",children:"Test automation health at a glance"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(se,{size:"sm",variant:"secondary",onClick:()=>e("/run"),children:[n.jsx(Rt,{size:13})," Run Tests"]}),n.jsxs(se,{size:"sm",onClick:()=>e("/story"),children:[n.jsx(Gt,{size:13})," Generate"]})]})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-8 pb-8 space-y-5",children:[l.isRunning&&n.jsx("div",{className:"rounded-2xl border border-accent/25 bg-gradient-to-r from-accent/[0.06] via-accent/[0.03] to-transparent p-4 animate-fade-in",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"relative w-8 h-8 flex-shrink-0",children:[n.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-accent/20"}),n.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-transparent border-t-accent animate-spin"})]}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"text-sm font-semibold text-content",children:"Run in progress..."}),l.currentCase&&n.jsxs("p",{className:"text-xs text-content-secondary truncate mt-0.5",children:[l.currentCase.caseName,l.currentStep&&` › ${l.currentStep.instruction}`]})]}),n.jsxs(se,{size:"sm",variant:"ghost",onClick:()=>e("/run"),children:["View ",n.jsx(ar,{size:12})]})]})}),l.completed&&!l.isRunning&&(()=>{const N=l.completed,C=N.failed===0&&N.passed>0,R=N.failed>0,P=C?{border:"border-emerald-200/50",bg:"bg-gradient-to-r from-emerald-50/80 to-transparent",icon:"text-emerald-500",title:"text-emerald-800",subtitle:"text-emerald-600",label:"All tests passed"}:R?{border:"border-red-200/50",bg:"bg-gradient-to-r from-red-50/80 to-transparent",icon:"text-red-500",title:"text-red-800",subtitle:"text-red-600",label:"Completed with failures"}:{border:"border-amber-200/50",bg:"bg-gradient-to-r from-amber-50/80 to-transparent",icon:"text-amber-500",title:"text-amber-800",subtitle:"text-amber-600",label:"Run completed"},_=C?Ue:R?ut:Yt;return n.jsx("div",{className:S("rounded-2xl border p-4 animate-fade-in",P.border,P.bg),children:n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(_,{size:20,className:S(P.icon,"flex-shrink-0")}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-sm font-semibold",P.title),children:P.label}),n.jsxs("p",{className:S("text-xs mt-0.5",P.subtitle),children:[N.passed," passed / ",N.failed," failed / ",N.skipped," skipped"]})]})]}),n.jsx(se,{variant:"secondary",size:"sm",onClick:()=>e("/reports"),children:"View Report"})]})})})(),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col justify-between",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-50 border border-indigo-100 flex items-center justify-center",children:n.jsx(fl,{size:18,className:"text-indigo-500"})}),n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Coverage"})]}),n.jsxs("div",{className:"mt-4",children:[n.jsx("p",{className:"text-3xl font-extrabold text-content tabular-nums tracking-tight",children:r.length}),n.jsx("p",{className:"text-xs text-content-tertiary mt-0.5",children:"test suites"})]}),n.jsxs("div",{className:"mt-3 pt-3 border-t border-border-muted flex items-center gap-4",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(la,{size:11,className:"text-blue-500"}),n.jsxs("span",{className:"text-[11px] text-content-secondary font-medium",children:[x.length," UI"]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:["(",g,")"]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(bN,{size:11,className:"text-purple-500"}),n.jsxs("span",{className:"text-[11px] text-content-secondary font-medium",children:[f.length," API"]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:["(",v,")"]})]})]})]}),n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col items-center justify-center",children:[n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider mb-3",children:"Pass Rate"}),n.jsx(ok,{rate:t.length>0?h:0,hasData:y+j>0}),n.jsx("p",{className:"text-[11px] text-content-tertiary mt-2",children:y+j>0?`${y} of ${y+j} cases passed`:"no runs yet"})]}),n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col justify-between",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-teal-50 border border-teal-100 flex items-center justify-center",children:n.jsx(X2,{size:18,className:"text-teal-500"})}),n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Execution"})]}),n.jsxs("div",{className:"mt-4",children:[n.jsx("p",{className:"text-3xl font-extrabold text-content tabular-nums tracking-tight",children:d}),n.jsx("p",{className:"text-xs text-content-tertiary mt-0.5",children:"tests executed"})]}),n.jsxs("div",{className:"mt-3 pt-3 border-t border-border-muted grid grid-cols-3 gap-2",children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Ue,{size:10,className:"text-emerald-500"}),n.jsx("span",{className:"text-[11px] font-semibold text-emerald-600 tabular-nums",children:y})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(ut,{size:10,className:"text-red-500"}),n.jsx("span",{className:"text-[11px] font-semibold text-red-500 tabular-nums",children:j})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(bc,{size:10,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[11px] font-semibold text-content-tertiary tabular-nums",children:w})]})]})]}),n.jsxs("div",{className:"rounded-2xl border border-border bg-surface p-5 flex flex-col justify-between",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-amber-50 border border-amber-100 flex items-center justify-center",children:n.jsx(Be,{size:18,className:"text-amber-500"})}),n.jsx("span",{className:"text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Insights"})]}),n.jsxs("div",{className:"mt-4 space-y-2.5",children:[n.jsx("div",{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[11px] text-content-tertiary",children:"Avg Duration"}),n.jsx("span",{className:"text-sm font-bold text-content tabular-nums",children:p>0?`${p}s`:"—"})]})}),n.jsx("div",{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[11px] text-content-tertiary",children:"Self-Healed"}),n.jsx("span",{className:"text-sm font-bold text-emerald-600 tabular-nums",children:(i==null?void 0:i.accepted)??0})]})}),n.jsx("div",{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[11px] text-content-tertiary",children:"Pending Review"}),n.jsx("span",{className:S("text-sm font-bold tabular-nums",((i==null?void 0:i.pending)??0)>0?"text-amber-500":"text-content-tertiary"),children:(i==null?void 0:i.pending)??0})]})})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[n.jsxs("div",{className:"lg:col-span-2 rounded-2xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-accent-muted flex items-center justify-center",children:n.jsx(CN,{size:14,className:"text-accent"})}),n.jsx("h2",{className:"text-sm font-semibold text-content",children:"Recent Runs"})]}),t.length>0&&n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(mf,{data:b,maxHeight:24}),n.jsxs("button",{onClick:()=>e("/reports"),className:"text-xs text-accent font-medium hover:underline flex items-center gap-0.5",children:["View all ",n.jsx(ar,{size:11})]})]})]}),t.length===0?n.jsxs("div",{className:"px-5 py-12 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-2xl bg-surface-inset flex items-center justify-center mx-auto mb-3",children:n.jsx(Sn,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-sm font-medium text-content-secondary",children:"No runs yet"}),n.jsx("p",{className:"text-xs text-content-tertiary mt-1 mb-4",children:"Execute your first test run to see results here"}),n.jsxs(se,{size:"sm",onClick:()=>e("/run"),children:[n.jsx(Rt,{size:12})," Start a Run"]})]}):n.jsxs("div",{className:"divide-y divide-border-muted",children:[n.jsxs("div",{className:"grid grid-cols-[1fr_100px_140px_80px_60px] px-5 py-2 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:[n.jsx("span",{children:"Run ID"}),n.jsx("span",{children:"Status"}),n.jsx("span",{children:"Results"}),n.jsx("span",{children:"Duration"}),n.jsx("span",{className:"text-right",children:"Time"})]}),t.slice(0,6).map(N=>{const C=N.passed+N.failed+N.skipped,R=C>0?Math.round(N.passed/C*100):0;return n.jsxs("div",{onClick:()=>e("/reports"),className:"grid grid-cols-[1fr_100px_140px_80px_60px] items-center px-5 py-3 hover:bg-surface-inset cursor-pointer transition-colors group",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx(ck,{status:N.status}),n.jsx("span",{className:"text-xs font-mono text-content-secondary truncate",children:N.runId.slice(0,10)})]}),n.jsx("div",{children:n.jsx("span",{className:S("text-[10px] font-semibold px-2 py-0.5 rounded-md uppercase tracking-wide",N.status==="passed"?"bg-emerald-50 text-emerald-700":N.status==="failed"?"bg-red-50 text-red-700":"bg-amber-50 text-amber-700"),children:N.status})}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"flex-1 h-1.5 bg-surface-inset rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-emerald-400 rounded-full transition-all duration-500",style:{width:`${R}%`}})}),n.jsxs("span",{className:"text-[11px] text-content-secondary tabular-nums w-12 text-right",children:[N.passed,"/",C]})]}),n.jsx("span",{className:"text-[11px] text-content-tertiary tabular-nums",children:N.duration?`${(N.duration/1e3).toFixed(1)}s`:"—"}),n.jsx("span",{className:"text-[10px] text-content-tertiary text-right",children:qo(new Date(N.startedAt),{addSuffix:!1})})]},N.runId)})]})]}),n.jsxs("div",{className:"flex flex-col gap-4",children:[n.jsxs("div",{className:"rounded-2xl border border-border bg-surface overflow-hidden flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-indigo-50 border border-indigo-100 flex items-center justify-center",children:n.jsx(Yi,{size:14,className:"text-indigo-500"})}),n.jsx("h2",{className:"text-sm font-semibold text-content",children:"Test Suites"})]}),n.jsxs("span",{className:"text-[10px] font-semibold text-content-tertiary bg-surface-inset px-2 py-0.5 rounded-md",children:[u," cases"]})]}),r.length===0?n.jsxs("div",{className:"px-5 py-8 text-center",children:[n.jsx("p",{className:"text-sm text-content-tertiary mb-3",children:"No suites yet"}),n.jsx(se,{size:"sm",onClick:()=>e("/tests"),children:"Create Suite"})]}):n.jsx("ul",{className:"divide-y divide-border-muted max-h-[200px] overflow-y-auto",children:r.map(N=>n.jsxs("li",{onClick:()=>e("/tests"),className:"flex items-center justify-between px-5 py-2.5 hover:bg-surface-inset cursor-pointer transition-colors group",children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("p",{className:"text-sm text-content font-medium truncate",children:N.name}),n.jsx("span",{className:S("text-[9px] px-1.5 py-0.5 rounded font-bold uppercase flex-shrink-0",(N.type??"ui")==="api"?"bg-purple-50 text-purple-600":"bg-blue-50 text-blue-600"),children:(N.type??"ui").toUpperCase()})]}),n.jsxs("p",{className:"text-[11px] text-content-tertiary mt-0.5",children:[N.caseCount??0," cases"]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[n.jsx(mf,{data:dk(t,N.id),maxHeight:24}),n.jsx(ar,{size:13,className:"text-content-tertiary opacity-0 group-hover:opacity-100 transition-opacity"})]})]},N.id))})]}),n.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:[{label:"Smart Tests",icon:Gt,to:"/story",gradient:"from-violet-500 to-indigo-600"},{label:"Self-Healing",icon:$o,to:"/healing",gradient:"from-rose-500 to-pink-600"},{label:"Variables",icon:om,to:"/variables",gradient:"from-teal-500 to-cyan-600"},{label:"Reports",icon:Sn,to:"/reports",gradient:"from-amber-500 to-orange-600"}].map(({label:N,icon:C,to:R,gradient:P})=>n.jsxs("button",{type:"button",onClick:()=>e(R),className:"group relative overflow-hidden rounded-xl border border-border bg-surface px-3.5 py-3 hover:border-border-strong hover:shadow-card transition-all duration-200 flex items-center gap-3",children:[n.jsx("div",{className:S("w-8 h-8 rounded-lg bg-gradient-to-br flex items-center justify-center flex-shrink-0",P),children:n.jsx(C,{size:14,className:"text-white"})}),n.jsx("p",{className:"text-xs font-semibold text-content group-hover:text-accent transition-colors",children:N})]},R))})]})]}),c&&n.jsx("div",{className:"rounded-2xl border border-border bg-surface px-6 py-4",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:S("w-10 h-10 rounded-xl flex items-center justify-center",c.status==="passed"?"bg-emerald-50 border border-emerald-100":c.status==="failed"?"bg-red-50 border border-red-100":"bg-amber-50 border border-amber-100"),children:c.status==="passed"?n.jsx(Ue,{size:18,className:"text-emerald-500"}):c.status==="failed"?n.jsx(Yt,{size:18,className:"text-red-500"}):n.jsx(sf,{size:18,className:"text-amber-500"})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-content-secondary uppercase tracking-wider",children:"Last Run"}),n.jsxs("p",{className:"text-sm font-bold text-content mt-0.5",children:[c.passed," passed, ",c.failed," failed",c.skipped>0&&`, ${c.skipped} skipped`]})]})]}),n.jsxs("div",{className:"flex items-center gap-6 text-xs text-content-tertiary",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Tr,{size:12}),n.jsx("span",{children:qo(new Date(c.startedAt),{addSuffix:!0})})]}),c.duration&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(sf,{size:12}),n.jsxs("span",{children:[(c.duration/1e3).toFixed(1),"s"]})]}),n.jsx("div",{className:"flex items-center gap-1.5 font-mono",children:n.jsxs("span",{children:["#",c.runId.slice(0,8)]})}),n.jsxs(se,{size:"sm",variant:"ghost",onClick:()=>e("/reports"),children:["Details ",n.jsx(ar,{size:11})]})]})]})})]})]})}function Pn({open:e,title:t="Confirm Delete",message:s,confirmLabel:r="Delete",onConfirm:a,onCancel:i}){return m.useEffect(()=>{if(!e)return;const l=o=>{o.key==="Escape"&&i(),o.key==="Enter"&&(o.preventDefault(),a())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,i]),e?n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center animate-fade-in",children:[n.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:i}),n.jsxs("div",{className:"relative bg-surface rounded-2xl shadow-modal w-full max-w-sm mx-4 p-6 animate-scale-in border border-border",children:[n.jsxs("div",{className:"flex items-start gap-3.5",children:[n.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl bg-red-50 border border-red-200/50 flex items-center justify-center",children:n.jsx(Yt,{size:18,className:"text-red-500"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("h3",{className:"text-sm font-semibold text-content",children:t}),n.jsx("p",{className:"mt-1 text-sm text-content-secondary leading-relaxed",children:s})]})]}),n.jsxs("div",{className:"mt-6 flex items-center justify-end gap-2.5",children:[n.jsx(se,{variant:"secondary",size:"sm",onClick:i,children:"Cancel"}),n.jsx(se,{variant:"danger",size:"sm",onClick:a,children:r})]})]})]}):null}function zn(){const[e,t]=m.useState({open:!1,message:"",onConfirm:()=>{}}),s=m.useCallback((i,l)=>{t({open:!0,message:i,onConfirm:l})},[]),r=m.useCallback(()=>{t(i=>({...i,open:!1}))},[]),a=m.useCallback(()=>{e.onConfirm(),t(i=>({...i,open:!1}))},[e.onConfirm]);return{modalProps:{open:e.open,message:e.message,onConfirm:a,onCancel:r},confirmDelete:s}}const xk=[{id:"all",label:"All"},{id:"auth",label:"Auth"},{id:"crud",label:"CRUD"},{id:"navigation",label:"Navigation"},{id:"form",label:"Form"},{id:"api",label:"API"}],mk={auth:"bg-violet-50 text-violet-600",crud:"bg-blue-50 text-blue-600",navigation:"bg-teal-50 text-teal-600",form:"bg-orange-50 text-orange-600",api:"bg-purple-50 text-purple-600"};function hk({open:e,onClose:t,suiteId:s,onCreated:r}){const[a,i]=m.useState("all"),[l,o]=m.useState(null),{data:c=[],isLoading:u}=ke({queryKey:["templates"],queryFn:()=>AN.list(),enabled:e}),x=Y({mutationFn:v=>Is.create(s,{name:v.name,description:v.description,steps:v.steps.map((y,j)=>({...y,id:crypto.randomUUID(),order:j+1}))}),onSuccess:()=>{O.success("Test case created from template"),r(),t()},onError:v=>{O.error(v.message),o(null)}}),f=v=>{o(v.id),x.mutate(v)},g=a==="all"?c:c.filter(v=>v.category===a);return e?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-2xl mx-4 overflow-hidden flex flex-col max-h-[85vh]",onClick:v=>v.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-bold text-content",children:"Test Case Templates"}),n.jsx("p",{className:"text-[11px] text-content-tertiary mt-0.5",children:"Start from a pre-built template"})]}),n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset hover:text-content transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"flex gap-1 px-5 py-2.5 border-b border-border flex-shrink-0 overflow-x-auto",children:xk.map(v=>n.jsx("button",{type:"button",onClick:()=>i(v.id),className:S("px-3 py-1.5 rounded-lg text-xs font-semibold transition-colors flex-shrink-0",a===v.id?"bg-accent text-white":"text-content-secondary hover:bg-surface-inset"),children:v.label},v.id))}),n.jsx("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:u?n.jsx("div",{className:"grid grid-cols-2 gap-3",children:[1,2,3,4].map(v=>n.jsx("div",{className:"h-28 rounded-xl skeleton-shimmer"},v))}):g.length===0?n.jsx("div",{className:"py-12 text-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"No templates in this category"})}):n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:g.map(v=>n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-4 flex flex-col gap-3 hover:border-border-strong hover:shadow-card transition-all",children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-surface-inset flex items-center justify-center flex-shrink-0",children:n.jsx(mn,{size:13,className:"text-content-secondary"})}),n.jsx("div",{className:"min-w-0",children:n.jsx("p",{className:"text-sm font-bold text-content truncate",children:v.name})})]}),n.jsx("span",{className:S("text-[9px] px-1.5 py-0.5 rounded font-bold uppercase flex-shrink-0",mk[v.category]??"bg-surface-inset text-content-tertiary"),children:v.category})]}),n.jsx("p",{className:"text-xs text-content-secondary leading-relaxed",children:v.description}),n.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:[v.steps.length," step",v.steps.length!==1?"s":""]}),n.jsx("button",{type:"button",onClick:()=>f(v),disabled:x.isPending,className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-colors",l===v.id?"bg-emerald-50 text-emerald-600 border border-emerald-200":"bg-accent/10 text-accent hover:bg-accent/20",x.isPending&&"opacity-50 cursor-not-allowed"),children:l===v.id?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{size:11})," Creating..."]}):"Use Template"})]})]},v.id))})})]})}):null}function yy(){return ke({queryKey:["suites"],queryFn:()=>Or.list()})}function fk(){const e=ie();return Y({mutationFn:Or.create,onSuccess:()=>{e.invalidateQueries({queryKey:["suites"]}),O.success("Suite created")},onError:t=>O.error(t.message)})}function by(){const e=ie();return Y({mutationFn:({id:t,data:s})=>Or.update(t,s),onSuccess:()=>{e.invalidateQueries({queryKey:["suites"]}),O.success("Suite updated")},onError:t=>O.error(t.message)})}function pk(){const e=ie();return Y({mutationFn:Or.delete,onSuccess:()=>{e.invalidateQueries({queryKey:["suites"]}),O.success("Suite deleted")},onError:t=>O.error(t.message)})}function gk(e){return ke({queryKey:["cases",e],queryFn:()=>Is.list(e),enabled:!!e})}function yk(e,t){return ke({queryKey:["cases",e,t],queryFn:()=>Is.get(e,t),enabled:!!e&&!!t})}function hf(e){const t=ie();return Y({mutationFn:s=>Is.create(e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["cases",e]}),O.success("Test case created")},onError:s=>O.error(s.message)})}function bk(e){const t=ie();return Y({mutationFn:({caseId:s,data:r})=>Is.update(e,s,r),onSuccess:(s,{caseId:r})=>{t.invalidateQueries({queryKey:["cases",e]}),t.invalidateQueries({queryKey:["cases",e,r]}),O.success("Test case updated")},onError:s=>O.error(s.message)})}function vk(e){const t=ie();return Y({mutationFn:s=>Is.delete(e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["cases",e]}),O.success("Test case deleted")},onError:s=>O.error(s.message)})}function jk(e,t){const s=ie();return Y({mutationFn:r=>Dr.add(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>O.error(r.message)})}function Nk(e,t){const s=ie();return Y({mutationFn:({stepId:r,instruction:a,timeout:i,stepType:l,retries:o,mockUrl:c,mockResponse:u,mockStatus:x,runAudit:f})=>Dr.update(e,t,r,{instruction:a,timeout:i,stepType:l,retries:o,mockUrl:c,mockResponse:u,mockStatus:x,runAudit:f}),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>O.error(r.message)})}function wk(e,t){const s=ie();return Y({mutationFn:r=>Dr.reorder(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>O.error(r.message)})}function kk(e,t){const s=ie();return Y({mutationFn:r=>Dr.delete(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]})},onError:r=>O.error(r.message)})}function Sk(e,t){const s=ie();return Y({mutationFn:r=>Dr.generate(e,t,r),onSuccess:()=>{s.invalidateQueries({queryKey:["cases",e,t]}),O.success("Code generated")},onError:r=>O.error(r.message)})}function Ck(e,t){const s=ie();return Y({mutationFn:()=>Dr.generateAll(e,t),onSuccess:r=>{s.invalidateQueries({queryKey:["cases",e,t]}),O.success(`Generated code for ${r.generated} step(s)`)},onError:r=>O.error(r.message)})}const Zi=new Map,Vu=new Set;function vy(){for(const e of Vu)e()}function md(){return"all"}function hd(e){return`suite:${e}`}function fd(e,t){return`case:${e}:${t}`}function pd(e,t){Zi.set(e,{op:t,startedAt:Date.now()}),vy()}function gd(e){Zi.delete(e),vy()}function yd(e){var t;return((t=Zi.get(e))==null?void 0:t.op)??null}function Ek(){const e=new Map,t=new Map;let s=null;for(const[r,a]of Zi)r==="all"?s=a.op:r.startsWith("suite:")?e.set(r.slice(6),a.op):r.startsWith("case:")&&t.set(r.slice(5),a.op);return{allOp:s,busySuites:e,busyCases:t,activeCount:Zi.size}}function Pk(e){return Vu.add(e),()=>{Vu.delete(e)}}const Ze={startAll:e=>pd(md(),e),finishAll:()=>gd(md()),startSuite:(e,t)=>pd(hd(e),t),finishSuite:e=>gd(hd(e)),startCase:(e,t,s)=>pd(fd(e,t),s),finishCase:(e,t)=>gd(fd(e,t)),isAllBusy:()=>yd(md()),isSuiteBusy:e=>yd(hd(e)),isCaseBusy:(e,t)=>yd(fd(e,t)),getSnapshot:Ek,subscribe:Pk};function gl(e,t){var s;if(e.failed>0){const r=e.results.filter(a=>a.action==="failed");O.error(`${t}: ${e.failed} failed — ${((s=r[0])==null?void 0:s.error)??"Unknown error"}`)}else if(e.created>0||e.synced>0){const r=[];e.created>0&&r.push(`${e.created} created`),e.synced>0&&r.push(`${e.synced} synced`),e.skipped>0&&r.push(`${e.skipped} skipped`),O.success(`Xray: ${r.join(", ")}`)}else e.skipped>0&&O.success(`Xray: ${e.skipped} already up to date`)}function zk(){return ke({queryKey:["xray","status"],queryFn:()=>Ar.status(),retry:1,staleTime:1e4})}function jy(e){return ke({queryKey:["xray","status",e],queryFn:()=>Ar.suiteStatus(e),enabled:!!e,retry:1,staleTime:1e4})}function Mk(){const e=ie();return Y({mutationFn:()=>(Ze.startAll("create"),Ar.createAll()),onSuccess:t=>{Ze.finishAll(),e.invalidateQueries({queryKey:["xray"]}),gl(t,"Create in Xray")},onError:t=>{Ze.finishAll(),O.error(`Xray create failed: ${t.message}`)}})}function Ny(){const e=ie();return Y({mutationFn:t=>(Ze.startSuite(t,"create"),Ar.createSuite(t)),onSuccess:(t,s)=>{Ze.finishSuite(s),e.invalidateQueries({queryKey:["xray"]}),gl(t,"Create Suite")},onError:(t,s)=>{Ze.finishSuite(s),O.error(`Xray create failed: ${t.message}`)}})}function wy(){const e=ie();return Y({mutationFn:({suiteId:t,caseId:s})=>(Ze.startCase(t,s,"create"),Ar.createCase(t,s)),onSuccess:(t,{suiteId:s,caseId:r})=>{Ze.finishCase(s,r),e.invalidateQueries({queryKey:["xray"]}),gl(t,"Create Case")},onError:(t,{suiteId:s,caseId:r})=>{Ze.finishCase(s,r),O.error(`Xray create failed: ${t.message}`)}})}function Tk(){const e=ie();return Y({mutationFn:t=>(Ze.startSuite(t,"sync"),Ar.syncSuite(t)),onSuccess:(t,s)=>{Ze.finishSuite(s),e.invalidateQueries({queryKey:["xray"]}),gl(t,"Sync Suite")},onError:(t,s)=>{Ze.finishSuite(s),O.error(`Xray sync failed: ${t.message}`)}})}function ky(){const e=ie();return Y({mutationFn:({suiteId:t,caseId:s})=>(Ze.startCase(t,s,"sync"),Ar.syncCase(t,s)),onSuccess:(t,{suiteId:s,caseId:r})=>{Ze.finishCase(s,r),e.invalidateQueries({queryKey:["xray"]}),gl(t,"Sync Case")},onError:(t,{suiteId:s,caseId:r})=>{Ze.finishCase(s,r),O.error(`Xray sync failed: ${t.message}`)}})}function Sy({code:e,maxLines:t,className:s}){const[r,a]=m.useState(!1),i=async()=>{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),1500)},l=!e.trim();return n.jsxs("div",{className:S("relative rounded-xl bg-[#0d1117] text-slate-300 ring-1 ring-white/5 overflow-hidden",s),children:[!l&&n.jsx("button",{type:"button",onClick:()=>void i(),className:S("absolute top-2.5 right-2.5 p-1.5 rounded-md transition-all duration-150",r?"bg-emerald-500/20 text-emerald-400":"text-slate-500 hover:text-slate-300 hover:bg-white/10"),title:"Copy code",children:r?n.jsx(He,{size:13}):n.jsx(am,{size:13})}),n.jsx("pre",{className:S("p-4 text-xs font-mono leading-relaxed overflow-x-auto",t&&`line-clamp-${t}`),style:t?{maxHeight:`${t*1.5}rem`,overflow:"auto"}:void 0,children:n.jsx("code",{children:l?"// No code generated yet":e})})]})}const Rk={"not-created":{bg:"bg-surface-inset",text:"text-content-tertiary",dot:"bg-content-tertiary",border:"border-border",label:"Not Created"},created:{bg:"bg-emerald-50",text:"text-emerald-700",dot:"bg-emerald-500",border:"border-emerald-200/60",label:"Created"},synced:{bg:"bg-emerald-50/60",text:"text-emerald-600",dot:"bg-emerald-400",border:"border-emerald-200/60",label:"Synced"},"update-pending":{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500",border:"border-amber-200/60",label:"Update Pending"}};function mm({status:e,xrayKey:t}){const s=Rk[e];return n.jsxs("span",{className:S("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-[10px] font-semibold whitespace-nowrap border tracking-wide",s.bg,s.text,s.border),children:[n.jsx("span",{className:S("w-1.5 h-1.5 rounded-full flex-shrink-0",s.dot)}),s.label,t&&n.jsxs("span",{className:"text-[9px] opacity-60 truncate max-w-[80px]",title:t,children:["(",t,")"]})]})}const Ok={"not-created":{icon:cm,label:"Push to Xray",title:"Create in Xray",btnClass:"bg-gradient-to-b from-emerald-500 to-emerald-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-emerald-600",iconHover:"hover:bg-emerald-50"},"update-pending":{icon:lm,label:"Sync Xray",title:"Sync changes to Xray",btnClass:"bg-gradient-to-b from-amber-500 to-amber-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-amber-500",iconHover:"hover:bg-amber-50"},created:{icon:Ue,label:"Synced with Xray",title:"Up to date -- click to re-sync",btnClass:"bg-gradient-to-b from-emerald-500 to-emerald-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-emerald-500",iconHover:"hover:bg-emerald-50"},synced:{icon:Ue,label:"Synced with Xray",title:"Up to date -- click to re-sync",btnClass:"bg-gradient-to-b from-emerald-500 to-emerald-600 hover:brightness-110 text-white shadow-sm",iconClass:"text-emerald-500",iconHover:"hover:bg-emerald-50"}};function el({status:e,onClick:t,busy:s=!1,variant:r="full",label:a}){const i=Ok[e],l=i.icon,o=a??i.label;return r==="icon"?n.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),t()},title:s?"Processing...":i.title,className:S("p-1.5 rounded-lg transition-all duration-150",s?"cursor-wait opacity-50":S(i.iconClass,i.iconHover)),children:s?n.jsx(ce,{size:14,className:"animate-spin text-accent"}):n.jsx(l,{size:14})}):n.jsxs("button",{type:"button",onClick:()=>t(),title:s?"Processing...":i.title,className:S("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-150",s?"bg-surface-inset text-content-tertiary cursor-wait":i.btnClass),children:[s?n.jsx(ce,{size:13,className:"animate-spin"}):n.jsx(l,{size:13}),s?"Processing...":o]})}function Dk(e){return ke({queryKey:["hooks",e],queryFn:()=>Lr.get(e),enabled:!!e})}function Lk(e){const t=ie();return Y({mutationFn:({hookType:s,instruction:r,order:a})=>Lr.addStep(e,s,{instruction:r,order:a}),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>O.error(s.message)})}function Ak(e){const t=ie();return Y({mutationFn:({hookType:s,stepId:r,instruction:a,timeout:i})=>Lr.updateStep(e,s,r,{instruction:a,timeout:i}),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>O.error(s.message)})}function Fk(e){const t=ie();return Y({mutationFn:({hookType:s,stepId:r})=>Lr.deleteStep(e,s,r),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>O.error(s.message)})}function Ik(e){const t=ie();return Y({mutationFn:({hookType:s,stepIds:r})=>Lr.reorderSteps(e,s,r),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]})},onError:s=>O.error(s.message)})}function _k(e){const t=ie();return Y({mutationFn:({hookType:s,stepId:r})=>Lr.generateStep(e,s,r),onSuccess:()=>{t.invalidateQueries({queryKey:["hooks",e]}),O.success("Hook step code generated")},onError:s=>O.error(s.message)})}function $k(e){const t=ie();return Y({mutationFn:s=>Lr.generateAll(e,s),onSuccess:s=>{t.invalidateQueries({queryKey:["hooks",e]}),O.success(`Generated code for ${s.generated} hook step(s)`)},onError:s=>O.error(s.message)})}const Uk=[{type:"before_all",label:"Before All",desc:"Runs once before all test cases in the suite",icon:n.jsx(iN,{size:16}),color:"text-emerald-600"},{type:"before_each",label:"Before Each",desc:"Runs before every test case",icon:n.jsx(bc,{size:16}),color:"text-blue-600"},{type:"after_each",label:"After Each",desc:"Runs after every test case",icon:n.jsx(jN,{size:16}),color:"text-amber-600"},{type:"after_all",label:"After All",desc:"Runs once after all test cases in the suite",icon:n.jsx(lN,{size:16}),color:"text-red-500"}];function Bk({suiteId:e,open:t,onClose:s}){const{data:r,isLoading:a}=Dk(e);return t?n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[n.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:s}),n.jsxs("div",{className:"relative w-full max-w-3xl max-h-[85vh] bg-surface rounded-xl shadow-2xl flex flex-col overflow-hidden mx-4",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border bg-gradient-to-r from-slate-50 to-white",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Suite Hooks"}),n.jsx("p",{className:"text-xs text-content-tertiary mt-0.5",children:"Lifecycle hooks run setup/teardown around your test cases (Playwright hooks)"})]}),n.jsx("button",{onClick:s,className:"p-1.5 rounded-lg hover:bg-surface-inset transition-colors text-content-tertiary hover:text-content-secondary",children:n.jsx(Se,{size:18})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-4",children:a?n.jsx("div",{className:"flex items-center justify-center py-16",children:n.jsx(ce,{size:24,className:"animate-spin text-accent"})}):Uk.map(i=>n.jsx(Hk,{suiteId:e,hookType:i.type,label:i.label,description:i.desc,icon:i.icon,color:i.color,steps:(r==null?void 0:r[i.type])??[]},i.type))})]})]}):null}function Hk({suiteId:e,hookType:t,label:s,description:r,icon:a,color:i,steps:l}){const[o,c]=m.useState(l.length>0),[u,x]=m.useState(""),[f,g]=m.useState(""),[v,y]=m.useState(null),[j,w]=m.useState(""),[h,d]=m.useState(new Set),[p,b]=m.useState(null),[N,C]=m.useState(null),R=Lk(e),P=Fk(e),{modalProps:_,confirmDelete:D}=zn(),G=Ik(e),J=Ak(e),ne=_k(e),z=$k(e),I=()=>{u.trim()&&(R.mutate({hookType:t,instruction:u.trim()}),x(""))},ee=L=>{g(L),ne.mutate({hookType:t,stepId:L},{onSettled:()=>g("")})},ae=()=>{z.mutate(t)},E=L=>{if(!p||p===L){b(null),C(null);return}const te=l.map(xe=>xe.id),B=te.indexOf(p),de=te.indexOf(L);B<0||de<0||(te.splice(B,1),te.splice(de,0,p),G.mutate({hookType:t,stepIds:te}),b(null),C(null))},K=L=>{y(L.id),w(L.instruction)},M=L=>{var te;j.trim()&&j!==((te=l.find(B=>B.id===L))==null?void 0:te.instruction)&&J.mutate({hookType:t,stepId:L,instruction:j.trim()}),y(null)},W=l.filter(L=>{var te;return!((te=L.generatedCode)!=null&&te.trim())}).length;return n.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(!o),className:"w-full flex items-center gap-3 px-4 py-3 bg-surface-inset hover:bg-surface-inset transition-colors text-left",children:[o?n.jsx(Tt,{size:14,className:"text-content-tertiary"}):n.jsx(Zt,{size:14,className:"text-content-tertiary"}),n.jsx("span",{className:S("flex-shrink-0",i),children:a}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("span",{className:"text-sm font-semibold text-content-secondary",children:s}),n.jsx("span",{className:"text-[10px] text-content-tertiary ml-2",children:r})]}),n.jsxs("span",{className:S("text-[10px] font-semibold px-2 py-0.5 rounded-full",l.length>0?"bg-accent/10 text-accent":"bg-slate-200 text-content-tertiary"),children:[l.length," step",l.length!==1?"s":""]})]}),o&&n.jsxs("div",{className:"border-t border-border bg-surface",children:[l.length===0?n.jsx("div",{className:"px-4 py-6 text-center",children:n.jsx("p",{className:"text-xs text-content-tertiary",children:"No steps yet — add one below"})}):n.jsx("div",{className:"divide-y divide-slate-100",children:l.map((L,te)=>n.jsxs("div",{draggable:!0,onDragStart:()=>b(L.id),onDragOver:B=>{B.preventDefault(),C(L.id)},onDragLeave:()=>C(null),onDrop:()=>E(L.id),onDragEnd:()=>{b(null),C(null)},className:S("flex items-start gap-2 px-4 py-2.5 group transition-colors",N===L.id&&"bg-accent/5 border-l-2 border-accent",p===L.id&&"opacity-40"),children:[n.jsx("div",{className:"pt-0.5 cursor-grab text-content-tertiary opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(gc,{size:12})}),n.jsx("span",{className:"text-[10px] font-bold text-content-tertiary pt-0.5 w-4 flex-shrink-0",children:te+1}),n.jsxs("div",{className:"flex-1 min-w-0",children:[v===L.id?n.jsx("input",{autoFocus:!0,className:"w-full text-xs border border-accent rounded px-2 py-1 focus:outline-none focus:ring-1 focus:ring-accent",value:j,onChange:B=>w(B.target.value),onBlur:()=>M(L.id),onKeyDown:B=>{B.key==="Enter"&&M(L.id),B.key==="Escape"&&y(null)}}):n.jsxs("p",{className:"text-xs text-content-secondary cursor-pointer hover:text-accent transition-colors flex items-center gap-1.5",onClick:()=>K(L),title:"Click to edit",children:[L.instruction,L.generatedCode&&!h.has(L.id)&&n.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-green-400 flex-shrink-0",title:"Code generated"})]}),L.generatedCode&&h.has(L.id)&&n.jsx("div",{className:"mt-1",children:n.jsx(Sy,{code:L.generatedCode,maxLines:6})})]}),n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[L.generatedCode&&n.jsx("button",{title:h.has(L.id)?"Hide code":"Show code",onClick:()=>d(B=>{const de=new Set(B);return de.has(L.id)?de.delete(L.id):de.add(L.id),de}),className:S("p-1 rounded transition-colors",h.has(L.id)?"text-content-secondary bg-slate-100":"text-content-tertiary hover:bg-surface-inset"),children:n.jsx(Tg,{size:12})}),n.jsx("button",{title:"Generate code",onClick:()=>ee(L.id),disabled:f===L.id,className:"p-1 rounded hover:bg-purple-50 text-purple-500 transition-colors",children:f===L.id?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Fa,{size:12})}),n.jsx("button",{title:"Delete step",onClick:()=>D("Delete this hook step? This cannot be undone.",()=>P.mutate({hookType:t,stepId:L.id})),className:"p-1 rounded hover:bg-red-50 text-red-400 transition-colors",children:n.jsx(fn,{size:12})})]})]},L.id))}),n.jsxs("div",{className:"px-4 py-3 border-t border-slate-100 bg-surface-inset/50 flex items-center gap-2",children:[n.jsx("input",{className:"flex-1 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent placeholder:text-content-tertiary",value:u,onChange:L=>x(L.target.value),onKeyDown:L=>{L.key==="Enter"&&I()},placeholder:"Add a step (e.g. Navigate to login page)"}),n.jsxs("button",{type:"button",onClick:I,disabled:!u.trim()||R.isPending,className:S("inline-flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors",u.trim()?"bg-accent text-white hover:bg-accent/90":"bg-slate-200 text-content-tertiary cursor-not-allowed"),children:[R.isPending?n.jsx(ce,{size:11,className:"animate-spin"}):n.jsx(Cn,{size:11}),"Add"]}),l.length>0&&W>0&&n.jsxs("button",{type:"button",onClick:ae,disabled:z.isPending,className:"inline-flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-xs font-medium bg-purple-600 text-white hover:bg-purple-700 transition-colors",children:[z.isPending?n.jsx(ce,{size:11,className:"animate-spin"}):n.jsx(Fa,{size:11}),"Generate All (",W,")"]})]})]}),n.jsx(Pn,{..._})]})}const qk=[{token:"{{FAKE_FIRST_NAME}}",label:"First Name",example:"Alice"},{token:"{{FAKE_LAST_NAME}}",label:"Last Name",example:"Smith"},{token:"{{FAKE_AGE}}",label:"Age (18–80)",example:"34"},{token:"{{FAKE_EMAIL}}",label:"Email Address",example:"alice.smith123@example.com"},{token:"{{FAKE_PHONE}}",label:"Phone Number",example:"415-782-3901"},{token:"{{FAKE_PASSWORD}}",label:"Password",example:"Xk9#mP2$qL"}];function Kk({onInsert:e}){const[t,s]=m.useState(!1),[r,a]=m.useState("6"),i=m.useRef(null);m.useEffect(()=>{if(!t)return;const c=u=>{i.current&&!i.current.contains(u.target)&&s(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[t]);const l=c=>{e(c),s(!1)},o=()=>{const c=Math.max(1,Math.min(20,parseInt(r,10)||6));l(`{{FAKE_NUMBER_${c}}}`)};return n.jsxs("div",{ref:i,className:"relative flex-shrink-0",children:[n.jsxs("button",{type:"button",onClick:()=>s(c=>!c),title:"Insert dynamic data token",className:S("inline-flex items-center justify-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-medium border transition-all duration-150 focus:outline-none",t?"bg-violet-600 text-white border-violet-700 ring-2 ring-violet-400 shadow-md":"bg-gradient-to-b from-violet-500 to-violet-600 text-white border-violet-700 shadow-sm hover:brightness-110 hover:shadow-md"),children:[n.jsx(Gt,{size:12}),n.jsx("span",{className:"hidden sm:inline",children:"Fake Data"}),n.jsx(Tt,{size:10,className:S("transition-transform",t&&"rotate-180")})]}),t&&n.jsxs("div",{className:"absolute top-full left-0 mt-1.5 z-50 w-72 rounded-xl border border-border bg-surface shadow-lg shadow-black/8 overflow-hidden animate-fade-in",children:[n.jsxs("div",{className:"px-3 py-2 bg-gradient-to-r from-violet-50 to-indigo-50 border-b border-border flex items-center gap-2",children:[n.jsx(Gt,{size:11,className:"text-violet-500"}),n.jsx("span",{className:"text-[10px] font-bold text-violet-700 uppercase tracking-wider",children:"Dynamic Data Tokens"})]}),n.jsxs("div",{className:"p-2",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest px-1 mb-1.5",children:"Person Details"}),n.jsx("div",{className:"space-y-0.5 max-h-[114px] overflow-y-auto",children:qk.map(({token:c,label:u,example:x})=>n.jsxs("button",{type:"button",onClick:()=>l(c),className:"w-full flex items-center justify-between gap-2 px-2 py-1.5 rounded-lg hover:bg-violet-50 transition-colors group text-left",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-[11px] font-medium text-content group-hover:text-violet-700 truncate",children:u}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-mono truncate",children:c})]}),n.jsx("span",{className:"text-[9px] text-content-tertiary bg-surface-inset px-1.5 py-0.5 rounded font-mono flex-shrink-0",children:x})]},c))})]}),n.jsx("div",{className:"border-t border-border mx-2"}),n.jsxs("div",{className:"p-2",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest px-1 mb-1.5 flex items-center gap-1",children:[n.jsx(Bg,{size:9})," Random Number"]}),n.jsxs("div",{className:"flex items-center gap-2 px-1",children:[n.jsxs("div",{className:"flex items-center gap-1.5 flex-1 bg-surface-inset rounded-lg px-2 py-1.5 border border-border",children:[n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"Digits:"}),n.jsx("input",{type:"number",min:1,max:20,value:r,onChange:c=>a(c.target.value),onKeyDown:c=>c.key==="Enter"&&o(),className:"w-10 text-[11px] bg-transparent outline-none text-content font-mono tabular-nums"})]}),n.jsx("button",{type:"button",onClick:o,className:"flex-shrink-0 px-2.5 py-1.5 rounded-lg bg-violet-600 hover:bg-violet-700 text-white text-[10px] font-semibold transition-colors",children:"Insert"})]}),n.jsx("p",{className:"text-[9px] text-content-tertiary px-1 mt-1.5 font-mono",children:`→ {{FAKE_NUMBER_${Math.max(1,parseInt(r,10)||6)}}}`})]}),n.jsx("div",{className:"px-3 py-1.5 bg-surface-inset/60 border-t border-border",children:n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Tokens resolve to fresh random values on every test run."})})]})]})}function Wk({selectedIds:e,suiteId:t,suites:s,onClear:r,onDeleted:a,onMoved:i}){const l=ie(),{modalProps:o,confirmDelete:c}=zn(),[u,x]=m.useState(""),f=Y({mutationFn:()=>Is.bulkDelete(t,Array.from(e)),onSuccess:j=>{O.success(`Deleted ${j.deleted} case${j.deleted!==1?"s":""}`),l.invalidateQueries({queryKey:["cases",t]}),a(),r()},onError:j=>O.error(j.message)}),g=Y({mutationFn:j=>Is.bulkMove(t,Array.from(e),j),onSuccess:j=>{O.success(`Moved ${j.moved} case${j.moved!==1?"s":""}`),l.invalidateQueries({queryKey:["cases",t]}),i(),r(),x("")},onError:j=>O.error(j.message)}),v=s.filter(j=>j.id!==t),y=e.size;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"fixed bottom-0 left-[248px] right-0 z-30 bg-surface border-t border-border shadow-elevated px-5 py-3 flex items-center gap-3",children:[n.jsxs("span",{className:"text-sm font-semibold text-content flex-shrink-0",children:[y," case",y!==1?"s":""," selected"]}),n.jsx("button",{type:"button",onClick:()=>O("Coming soon",{icon:"🔜"}),className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border border-border text-content-secondary hover:bg-surface-inset transition-colors",children:"Run Selected"}),n.jsxs("button",{type:"button",onClick:()=>c(`Delete ${y} selected case${y!==1?"s":""}? This cannot be undone.`,()=>f.mutate()),disabled:f.isPending,className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border border-red-200 text-red-600 bg-red-50 hover:bg-red-100 transition-colors disabled:opacity-50",children:[n.jsx(fn,{size:12})," Delete Selected"]}),v.length>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(yN,{size:13,className:"text-content-tertiary flex-shrink-0"}),n.jsxs("select",{className:"text-xs border border-border rounded-lg px-2 py-1.5 bg-surface text-content-secondary focus:outline-none focus:ring-1 focus:ring-accent/30",value:u,onChange:j=>x(j.target.value),children:[n.jsx("option",{value:"",children:"Move to suite…"}),v.map(j=>n.jsx("option",{value:j.id,children:j.name},j.id))]}),u&&n.jsx("button",{type:"button",onClick:()=>g.mutate(u),disabled:g.isPending,className:"text-xs px-3 py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:"Move"})]}),n.jsx("div",{className:"flex-1"}),n.jsx("button",{type:"button",onClick:r,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx(Pn,{...o})]})}function Vk({passRate:e,runs:t,flaky:s}){if(!s||t<3||e===1)return null;const r=Math.round(e*100);return n.jsx("span",{title:`Flaky: ${r}% pass rate over ${t} runs`,className:"inline-flex items-center gap-0.5 text-[8px] font-semibold px-1.5 py-0.5 rounded bg-amber-50 text-amber-600 ring-1 ring-amber-200 flex-shrink-0",children:"~flaky"})}function Qk({open:e,onClose:t,suiteId:s,caseId:r,onInserted:a}){const i=ie(),[l,o]=m.useState(""),[c,u]=m.useState(!1),[x,f]=m.useState(""),[g,v]=m.useState(""),{data:y=[]}=ke({queryKey:["step-library"],queryFn:()=>oa.list()}),j=Y({mutationFn:d=>Dr.add(s,r,{instruction:d}),onSuccess:()=>{i.invalidateQueries({queryKey:["case",s,r]}),O.success("Step inserted"),a()},onError:d=>O.error(d.message)}),w=Y({mutationFn:()=>oa.create({name:x,instruction:g}),onSuccess:()=>{i.invalidateQueries({queryKey:["step-library"]}),O.success("Step saved to library"),u(!1),f(""),v("")},onError:d=>O.error(d.message)}),h=y.filter(d=>!l||d.name.toLowerCase().includes(l.toLowerCase())||d.instruction.toLowerCase().includes(l.toLowerCase())||d.tags.some(p=>p.toLowerCase().includes(l.toLowerCase())));return e?n.jsxs("div",{className:"fixed right-0 top-0 bottom-0 w-80 bg-surface border-l border-border shadow-xl z-40 flex flex-col",children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Gi,{size:14,className:"text-accent"}),n.jsx("span",{className:"text-sm font-semibold text-content",children:"Step Library"})]}),n.jsx("button",{type:"button",onClick:t,className:"p-1 rounded text-content-tertiary hover:text-content hover:bg-surface-inset",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"px-3 py-2 border-b border-border flex-shrink-0",children:n.jsxs("div",{className:"relative",children:[n.jsx(Pr,{size:12,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary"}),n.jsx("input",{type:"text",placeholder:"Search steps…",value:l,onChange:d=>o(d.target.value),className:"w-full pl-7 pr-3 py-1.5 text-xs border border-border rounded-lg bg-surface-inset focus:outline-none focus:ring-1 focus:ring-accent/30"})]})}),n.jsxs("div",{className:"flex-1 overflow-y-auto py-2 px-2 space-y-1",children:[h.length===0&&n.jsx("p",{className:"text-[11px] text-content-tertiary text-center py-6",children:y.length===0?"No steps in library yet":"No results"}),h.map(d=>n.jsx("div",{className:"border border-border rounded-lg p-2.5 hover:border-accent/30 hover:bg-surface-inset/50 transition-colors",children:n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-xs font-semibold text-content truncate",children:d.name}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5 line-clamp-2",children:d.instruction}),d.tags.length>0&&n.jsx("div",{className:"flex flex-wrap gap-0.5 mt-1",children:d.tags.map(p=>n.jsx("span",{className:"text-[8px] px-1 py-px rounded bg-accent/8 text-accent ring-1 ring-accent/15",children:p},p))})]}),n.jsx("button",{type:"button",onClick:()=>j.mutate(d.instruction),disabled:j.isPending,className:"flex-shrink-0 text-[10px] px-2 py-1 rounded bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:"Insert"})]})},d.id))]}),n.jsx("div",{className:"border-t border-border p-3 flex-shrink-0",children:c?n.jsxs("div",{className:"space-y-2",children:[n.jsx("input",{type:"text",placeholder:"Step name",value:x,onChange:d=>f(d.target.value),className:"w-full px-2 py-1.5 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30"}),n.jsx("textarea",{placeholder:"Step instruction",value:g,onChange:d=>v(d.target.value),rows:2,className:"w-full px-2 py-1.5 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30 resize-none"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button",onClick:()=>w.mutate(),disabled:!x.trim()||!g.trim()||w.isPending,className:"flex-1 text-xs py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:"Save"}),n.jsx("button",{type:"button",onClick:()=>u(!1),className:"text-xs px-3 py-1.5 rounded-lg border border-border text-content-secondary hover:bg-surface-inset",children:"Cancel"})]})]}):n.jsxs("button",{type:"button",onClick:()=>u(!0),className:"w-full flex items-center justify-center gap-1.5 text-xs py-2 rounded-lg border border-dashed border-border text-content-tertiary hover:text-content hover:border-accent/40 transition-colors",children:[n.jsx(Cn,{size:12})," Save current step to library"]})})]}):null}const ai=new Set,qr=new Map;let as=null,ii=null,li=null;const Kr=new Map,oi=new Map,Qu=new Set;function Wr(){Qu.forEach(e=>e())}const yt={subscribe(e){return Qu.add(e),()=>Qu.delete(e)},getSnapshot(){return{runningCaseIds:ai,runningSuiteId:as,caseLastRun:Kr,suiteLastRun:oi}},startCase(e){ai.add(e),Wr()},startSuite(e){li=e,as=e,Wr()},onRunStart(e){li&&(ii=e,li=null)},onCaseRunning(e,t){qr.has(e)||qr.set(e,t)},onCaseDone(e,t,s){const r=e===ii,a=Kr.get(t),i=r?(a==null?void 0:a.allureRunId)??e:e;Kr.set(t,{status:s,runId:e,allureRunId:i}),Wr()},onComplete(e,t){const s=qr.get(e);s&&(ai.delete(s),qr.delete(e)),ai.clear(),qr.clear(),e===ii&&as?oi.set(as,{...t,runId:e}):as&&oi.set(as,{...t,runId:e}),as=null,ii=null,li=null,Wr()},seedFromHistory(e){for(const t of e)for(const s of t.suites){oi.has(s.suiteId)||oi.set(s.suiteId,{passed:t.passed,failed:t.failed,skipped:t.skipped,runId:t.runId});const a=t.suites.reduce((i,l)=>i+l.cases.length,0)===1;for(const i of s.cases){const l=Kr.get(i.caseId);l?a&&!l.allureRunId&&Kr.set(i.caseId,{...l,allureRunId:t.runId}):Kr.set(i.caseId,{status:i.status,runId:t.runId,allureRunId:t.runId})}}Wr()},clear(){ai.clear(),qr.clear(),as=null,ii=null,li=null,Wr()}};function kc(){const[e,t]=m.useState(()=>yt.getSnapshot());return m.useEffect(()=>yt.subscribe(()=>t(yt.getSnapshot())),[]),e}function hm(){const[e,t]=m.useState(()=>Ze.getSnapshot());return m.useEffect(()=>Ze.subscribe(()=>t(Ze.getSnapshot())),[]),e}const Cy=["critical","high","medium","low"],Gu={critical:"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 ring-red-500/20 dark:ring-red-500/30",high:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 ring-orange-500/20 dark:ring-orange-500/30",medium:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-500/20 dark:ring-blue-500/30",low:"bg-surface-inset text-content-secondary ring-border"};function tl({tags:e,editable:t=!1,onAdd:s,onRemove:r}){const[a,i]=m.useState(""),l=()=>{const o=a.trim().toLowerCase().replace(/\s+/g,"-");if(!o||e.includes(o)){i("");return}s==null||s(o),i("")};return n.jsxs("div",{className:"flex flex-wrap gap-0.5 items-center",children:[e.map(o=>n.jsxs("span",{className:"inline-flex items-center gap-px px-1.5 py-px rounded bg-accent/8 text-accent text-[9px] font-medium ring-1 ring-accent/15 leading-tight",children:[o,t&&n.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(o),children:n.jsx(Se,{size:8,className:"hover:text-red-500"})})]},o)),t&&n.jsx("input",{className:"text-[9px] border border-dashed border-border rounded bg-transparent outline-none w-14 px-1.5 py-px placeholder-content-tertiary focus:border-accent focus:ring-1 focus:ring-accent/20 transition-colors",placeholder:"+ tag",value:a,onChange:o=>i(o.target.value),onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),l())},onBlur:l}),!t&&e.length===0&&n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"—"})]})}function bd(){const e=qs(),t=En(),{suiteId:s="",caseId:r=""}=Wv(),a=r?"case-editor":s?"suite-detail":"suites",[i,l]=m.useState(""),[o,c]=m.useState("ui"),[u,x]=m.useState(""),{modalProps:f,confirmDelete:g}=zn(),[v,y]=m.useState(""),[j,w]=m.useState(""),[h,d]=m.useState(""),{data:p=[],isLoading:b}=yy();m.useEffect(()=>{var W;const M=(W=e.state)==null?void 0:W.openSuiteId;M&&p.length>0&&p.find(te=>te.id===M)&&t(`/tests/${M}`,{replace:!0})},[e.state,p]);const N=m.useMemo(()=>{const M=new Set;return p.forEach(W=>(W.tags??[]).forEach(L=>M.add(L))),Array.from(M).sort()},[p]),C=m.useMemo(()=>p.filter(M=>{const W=!v||M.name.toLowerCase().includes(v.toLowerCase())||(M.description??"").toLowerCase().includes(v.toLowerCase()),L=!j||(M.tags??[]).includes(j),te=M.type==="performance"?"audit":M.type??"ui";return W&&L&&(!h||te===h)}),[p,v,j,h]),R=p.find(M=>M.id===s),P=fk(),_=pk(),{data:D=[]}=zk(),G=Mk(),J=Ny(),ne=hm(),z=Y({mutationFn:M=>Ji.start({test:M}),onError:M=>{yt.clear(),O.error(M.message)}}),I=Y({mutationFn:M=>Ji.start({suite:M}),onError:M=>{yt.clear(),O.error(M.message)}}),ee=M=>{yt.startCase(M),z.mutate(M),t("/run")},ae=M=>{yt.startSuite(M),I.mutate(M),t("/run")},E=()=>{i.trim()&&(P.mutate({name:i,type:o}),l(""))};if(b)return n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(ce,{size:20,className:"animate-spin text-accent"})});let K=null;if(a==="suites"){const M=p.filter(B=>(B.type??"ui")==="ui").length,W=p.filter(B=>(B.type??"ui")==="api").length,L=p.filter(B=>B.type==="audit"||B.type==="performance").length,te=p.reduce((B,de)=>B+(de.caseCount??0),0);K=n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-violet-600 flex items-center justify-center shadow-sm shadow-indigo-500/20",children:n.jsx(Yi,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Test Suites"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Manage and organize your test automation"})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center gap-1.5",children:[{label:"Total",val:p.length,color:"bg-indigo-50 dark:bg-indigo-900/20 text-indigo-600 dark:text-indigo-400 ring-indigo-200 dark:ring-indigo-800"},{label:"UI",val:M,color:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"},{label:"API",val:W,color:"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800"},...L>0?[{label:"Audit",val:L,color:"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"}]:[],{label:"Cases",val:te,color:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800"}].map(B=>n.jsxs("span",{className:S("inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1",B.color),children:[B.val," ",n.jsx("span",{className:"opacity-60 font-normal",children:B.label})]},B.label))}),n.jsx(el,{status:"not-created",variant:"full",label:"Sync All",onClick:()=>G.mutate(),busy:ne.allOp==="create"||ne.allOp==="sync"})]})]}),n.jsxs("div",{className:"px-4 py-2 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsx("div",{className:"flex gap-0.5 flex-shrink-0 bg-surface-inset rounded-lg p-0.5",children:[["","All",p.length],["ui","UI",M],["api","API",W],...L>0?[["audit","⚡ Audit",L]]:[]].map(([B,de,xe])=>n.jsxs("button",{type:"button",onClick:()=>d(B),className:S("px-2 py-1 rounded-md text-[10px] font-semibold transition-all",h===B?"bg-surface text-accent shadow-sm ring-1 ring-border":"text-content-tertiary hover:text-content-secondary"),children:[de," ",n.jsx("span",{className:"opacity-60 ml-0.5",children:xe})]},B))}),n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsx(Pr,{size:11,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40 bg-surface placeholder-content-tertiary",placeholder:"Search suites…",value:v,onChange:B=>y(B.target.value)})]}),N.length>0&&n.jsxs("select",{value:j,onChange:B=>w(B.target.value),className:"text-xs border border-border rounded-lg px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent bg-surface min-w-[90px]",children:[n.jsx("option",{value:"",children:"All Tags"}),N.map(B=>n.jsx("option",{value:B,children:B},B))]}),(v||j||h)&&n.jsx("button",{type:"button",onClick:()=>{y(""),w(""),d("")},className:"p-1 rounded-lg text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:12})}),n.jsx("div",{className:"w-px h-4 bg-border"}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[n.jsx("div",{className:"flex gap-0 bg-surface-inset rounded-lg p-0.5 ring-1 ring-border",children:["ui","api","audit"].map(B=>n.jsx("button",{type:"button",onClick:()=>c(B),className:S("px-2 py-1 rounded-md text-[9px] font-bold uppercase transition-all",o===B?B==="api"?"bg-violet-500 text-white shadow-sm":B==="audit"?"bg-amber-500 text-white shadow-sm":"bg-blue-500 text-white shadow-sm":"text-content-tertiary hover:text-content-secondary"),children:B==="audit"?"⚡":B},B))}),n.jsx("input",{className:"w-36 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"New suite name…",value:i,onChange:B=>l(B.target.value),onKeyDown:B=>B.key==="Enter"&&E()}),n.jsxs(se,{size:"sm",onClick:E,disabled:P.isPending,children:[n.jsx(Cn,{size:11})," Add"]})]})]})]}),p.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(fl,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No suites yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Create your first test suite using the toolbar above"})]}):C.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-10 gap-2",children:[n.jsx($g,{size:16,className:"text-content-tertiary"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No suites match filters"}),n.jsx("button",{onClick:()=>{y(""),w(""),d("")},className:"text-[10px] text-accent hover:underline",children:"Clear filters"})]}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2.5",children:C.map(B=>{var de,xe;return n.jsx(Gk,{suite:B,xrayStatus:((de=D.find(ue=>ue.suiteId===B.id))==null?void 0:de.status)??"not-created",xrayKey:((xe=D.find(ue=>ue.suiteId===B.id))==null?void 0:xe.xrayTestSetId)??null,onOpen:()=>t(`/tests/${B.id}`),onRun:()=>ae(B.id),onDelete:()=>g(`Delete suite "${B.name}"? All cases and steps will be lost.`,()=>_.mutate(B.id)),onXrayAction:()=>J.mutate(B.id),isXrayBusy:ne.busySuites.get(B.id)==="create"||ne.busySuites.get(B.id)==="sync"||ne.allOp==="create"||ne.allOp==="sync"},B.id)})})]})})})}return a==="suite-detail"&&s&&(K=n.jsx(Yk,{suiteId:s,suite:R,suites:p,newCaseName:u,onNewCaseNameChange:x,onOpenCase:M=>t(`/tests/${s}/cases/${M}`),onRunCase:M=>ee(M),onRunSuite:()=>ae(s),onBack:()=>t("/tests")})),a==="case-editor"&&s&&r&&(K=n.jsx(Jk,{suiteId:s,caseId:r,suiteName:(R==null?void 0:R.name)??"",suiteType:(R==null?void 0:R.type)??"ui",onBack:()=>t(`/tests/${s}`),onRunCase:()=>ee(r)})),n.jsxs("div",{className:"flex-1 overflow-hidden relative flex flex-col",children:[K,n.jsx(Pn,{...f})]})}function Gk({suite:e,onOpen:t,onRun:s,onDelete:r,xrayStatus:a="not-created",xrayKey:i=null,onXrayAction:l,isXrayBusy:o=!1}){const{runningCaseIds:c,runningSuiteId:u,suiteLastRun:x}=kc(),f=u===e.id,g=x.get(e.id),[v,y]=m.useState(!1),[j,w]=m.useState(e.name),[h,d]=m.useState(e.description??""),[p,b]=m.useState(e.tags??[]),[N,C]=m.useState(e.timeout?String(e.timeout):""),R=by(),P=m.useRef(null),_=(e.type??"ui")==="api",D=e.type==="audit"||e.type==="performance";m.useEffect(()=>{var I;v&&((I=P.current)==null||I.focus())},[v]);const G=I=>{I.stopPropagation(),y(!0)},J=I=>{I==null||I.stopPropagation(),w(e.name),d(e.description??""),b(e.tags??[]),C(e.timeout?String(e.timeout):""),y(!1)},ne=I=>{I==null||I.stopPropagation();const ee=N?parseInt(N,10):void 0;R.mutate({id:e.id,data:{name:j.trim()||e.name,description:h,tags:p,timeout:ee}},{onSuccess:()=>y(!1)})},z=I=>{I.key==="Enter"&&(I.preventDefault(),ne()),I.key==="Escape"&&J()};return v?n.jsxs("div",{className:"rounded-xl border-2 border-accent/30 bg-accent/[0.02] p-3.5 space-y-2.5",onClick:I=>I.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:S("w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0",_?"bg-violet-100":"bg-blue-100"),children:n.jsx(mn,{size:11,className:_?"text-violet-600":"text-blue-600"})}),n.jsx("input",{ref:P,className:"flex-1 text-xs font-semibold border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",value:j,onChange:I=>w(I.target.value),onKeyDown:z,placeholder:"Suite name"})]}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:h,onChange:I=>d(I.target.value),onKeyDown:z,placeholder:"Description (optional)"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"number",min:1e3,step:1e3,className:"w-32 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:N,onChange:I=>C(I.target.value),onKeyDown:z,placeholder:"Timeout (ms)"}),n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"ms timeout"}),n.jsx("div",{className:"ml-auto",children:n.jsx(tl,{tags:p,editable:!0,onAdd:I=>b(ee=>[...ee,I]),onRemove:I=>b(ee=>ee.filter(ae=>ae!==I))})})]}),n.jsxs("div",{className:"flex gap-1.5 justify-end pt-0.5",children:[n.jsxs(se,{size:"sm",variant:"secondary",onClick:J,children:[n.jsx(Se,{size:10})," Cancel"]}),n.jsxs(se,{size:"sm",onClick:ne,loading:R.isPending,children:[n.jsx(He,{size:10})," Save"]})]})]}):n.jsxs("div",{className:"group rounded-xl border border-border bg-surface hover:border-accent/30 hover:shadow-sm hover:shadow-accent/5 cursor-pointer transition-all",onClick:t,children:[n.jsx("div",{className:"px-3.5 pt-3 pb-2",children:n.jsxs("div",{className:"flex items-start gap-2.5",children:[n.jsx("div",{className:S("w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 mt-0.5",_?"bg-gradient-to-br from-violet-100 to-purple-100 dark:from-violet-900/40 dark:to-purple-900/40":D?"bg-gradient-to-br from-amber-100 to-orange-100 dark:from-amber-900/40 dark:to-orange-900/40":"bg-gradient-to-br from-blue-100 to-indigo-100 dark:from-blue-900/40 dark:to-indigo-900/40"),children:n.jsx(mn,{size:14,className:_?"text-violet-600 dark:text-violet-400":D?"text-amber-600 dark:text-amber-400":"text-blue-600 dark:text-blue-400"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("p",{className:"text-xs font-bold text-content truncate",children:e.name}),D?n.jsxs("span",{className:"text-[7px] px-1 py-px rounded font-bold flex items-center gap-0.5 flex-shrink-0 ring-1 bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800",children:[n.jsx(Be,{size:7})," Audit"]}):n.jsx("span",{className:S("text-[7px] px-1 py-px rounded font-bold uppercase flex-shrink-0 ring-1",_?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"),children:_?"API":"UI"})]}),e.description&&n.jsx("p",{className:"text-[10px] text-content-tertiary truncate mt-0.5 leading-tight",children:e.description})]}),n.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",onClick:I=>I.stopPropagation(),children:[n.jsx("button",{type:"button",onClick:G,title:"Edit",className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",children:n.jsx(Rr,{size:11})}),n.jsx("button",{type:"button",onClick:I=>{I.stopPropagation(),r()},title:"Delete",className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(fn,{size:11})})]})]})}),n.jsxs("div",{className:"px-3.5 py-2 border-t border-border/50 bg-surface-inset/30 rounded-b-xl flex items-center gap-2",onClick:I=>I.stopPropagation(),children:[n.jsxs("span",{className:"text-[9px] font-medium text-content-secondary tabular-nums",children:[e.caseCount??0," case",(e.caseCount??0)!==1?"s":""]}),(e.tags??[]).length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"w-px h-3 bg-border"}),n.jsx(tl,{tags:e.tags??[]})]}),n.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[n.jsx(mm,{status:a,xrayKey:i}),n.jsx(el,{variant:"icon",status:a,onClick:()=>l==null?void 0:l(),busy:o})]}),n.jsx("div",{className:"w-px h-3 bg-border"}),f?n.jsxs("span",{className:"flex items-center gap-1 text-[9px] text-teal-600 dark:text-teal-400 font-medium",children:[n.jsx(ce,{size:10,className:"animate-spin"})," Running"]}):n.jsxs("button",{type:"button",onClick:I=>{I.stopPropagation(),s()},className:"flex items-center gap-0.5 px-1.5 py-0.5 rounded-md text-[9px] font-medium text-teal-600 dark:text-teal-400 hover:bg-teal-50 dark:hover:bg-teal-900/20 transition-colors",title:"Run suite",children:[n.jsx(Rt,{size:10,strokeWidth:2.5})," Run"]}),n.jsx("button",{type:"button",disabled:!g,onClick:I=>{I.stopPropagation(),g&&window.open(`/allure/${g.runId}`,"_blank")},title:g?`Report: ${g.passed}p / ${g.failed}f`:"No report",className:S("p-1 rounded-md transition-colors",g?"text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20":"text-content-tertiary/50 cursor-not-allowed"),children:n.jsx(Sn,{size:11})}),n.jsx(Zt,{size:11,className:"text-content-tertiary/50"})]})]})}function Yk({suiteId:e,suite:t,suites:s,newCaseName:r,onNewCaseNameChange:a,onOpenCase:i,onRunCase:l,onRunSuite:o,onBack:c}){const{runningCaseIds:u,runningSuiteId:x,caseLastRun:f}=kc(),g=x===e,{data:v=[],isLoading:y}=gk(e),j=hf(e),w=vk(e),h=hf(e),[d,p]=m.useState(!1),[b,N]=m.useState(!1),{modalProps:C,confirmDelete:R}=zn(),[P,_]=m.useState(new Set),D=m.useRef(-1),{data:G}=ke({queryKey:["flakiness",e],queryFn:()=>FN.get(e),staleTime:6e4});m.useEffect(()=>{_(new Set),D.current=-1},[e]);const{data:J}=jy(e),ne=Ny(),z=wy(),I=Tk(),ee=ky(),ae=hm(),E=()=>{((J==null?void 0:J.status)??"not-created")==="not-created"?ne.mutate(e):I.mutate(e)},K=H=>{var fe;(((fe=J==null?void 0:J.cases.find(Re=>Re.caseId===H))==null?void 0:fe.status)??"not-created")==="not-created"?z.mutate({suiteId:e,caseId:H}):ee.mutate({suiteId:e,caseId:H})};m.useEffect(()=>{Ji.list(20).then(async H=>{const oe=await Promise.all(H.slice(0,10).map(fe=>Ji.get(fe.runId).catch(()=>null)));yt.seedFromHistory(oe.filter(fe=>fe!==null).map(fe=>({runId:fe.runId,passed:fe.passed,failed:fe.failed,skipped:fe.skipped,suites:fe.suites.map(Re=>({suiteId:Re.suiteId,cases:Re.cases.map(it=>({caseId:it.caseId,status:it.status}))}))})))}).catch(()=>{})},[e]);const[M,W]=m.useState(""),[L,te]=m.useState(new Set),[B,de]=m.useState(""),xe=L.size===0,ue=m.useMemo(()=>{const H=new Set;return v.forEach(oe=>(oe.tags??[]).forEach(fe=>H.add(fe))),Array.from(H).sort()},[v]),Ce=m.useMemo(()=>v.filter(H=>{const oe=!M||H.name.toLowerCase().includes(M.toLowerCase()),fe=L.size===0||(H.tags??[]).some(it=>L.has(it)),Re=!B||H.priority===B;return oe&&fe&&Re}),[v,M,L,B]),tt=!!(M||L.size>0||B),[en,mt]=m.useState(!1),[Ut,q]=m.useState((t==null?void 0:t.name)??""),[ht,Mn]=m.useState((t==null?void 0:t.description)??""),[at,tn]=m.useState((t==null?void 0:t.tags)??[]),[Ws,Vs]=m.useState(t!=null&&t.timeout?String(t.timeout):""),T=by();m.useEffect(()=>{q((t==null?void 0:t.name)??""),Mn((t==null?void 0:t.description)??""),tn((t==null?void 0:t.tags)??[]),Vs(t!=null&&t.timeout?String(t.timeout):"")},[t==null?void 0:t.id]);const X=()=>{const H=Ws?parseInt(Ws,10):void 0;T.mutate({id:e,data:{name:Ut.trim()||(t==null?void 0:t.name),description:ht,tags:at,timeout:H}},{onSuccess:()=>mt(!1)})},be=H=>{H.key==="Enter"&&(H.preventDefault(),X()),H.key==="Escape"&&mt(!1)},Tn=()=>{r.trim()&&(j.mutate({name:r}),a(""))},Nt=H=>{h.mutate({name:`${H.name} (copy)`,description:H.description,priority:H.priority,tags:H.tags,steps:(H.steps??[]).map(oe=>({instruction:oe.instruction}))})},Rn=H=>`TC-${((t==null?void 0:t.name)??"TC").replace(/[^a-zA-Z]/g,"").slice(0,3).toUpperCase()||"TC"}-${String(H+1).padStart(3,"0")}`,nn=((t==null?void 0:t.type)??"ui")==="api",Qs=(t==null?void 0:t.type)==="audit"||(t==null?void 0:t.type)==="performance";return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsx("div",{className:"px-4 py-1.5 bg-surface-inset/30 border-b border-border/50",children:n.jsxs("nav",{className:"flex items-center gap-1.5 text-[10px] text-content-tertiary",children:[n.jsxs("button",{onClick:c,className:"hover:text-accent transition-colors flex items-center gap-1",children:[n.jsx(Ug,{size:10})," Suites"]}),n.jsx(Zt,{size:9}),n.jsx("span",{className:"text-content-secondary font-semibold",children:t==null?void 0:t.name})]})}),en?n.jsxs("div",{className:"px-4 py-3.5 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",nn?"bg-gradient-to-br from-violet-500 to-purple-600":"bg-gradient-to-br from-blue-500 to-indigo-600"),children:n.jsx(Yi,{size:13,className:"text-white"})}),n.jsx("input",{className:"flex-1 text-sm font-bold border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",value:Ut,onChange:H=>q(H.target.value),onKeyDown:be,placeholder:"Suite name",autoFocus:!0})]}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:ht,onChange:H=>Mn(H.target.value),onKeyDown:be,placeholder:"Description"}),n.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Tr,{size:10,className:"text-content-tertiary"}),n.jsx("input",{type:"number",min:1e3,step:1e3,className:"w-28 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface",value:Ws,onChange:H=>Vs(H.target.value),onKeyDown:be,placeholder:"Timeout ms"})]}),n.jsx("div",{className:"flex-1",children:n.jsx(tl,{tags:at,editable:!0,onAdd:H=>tn(oe=>[...oe,H]),onRemove:H=>tn(oe=>oe.filter(fe=>fe!==H))})}),n.jsxs("div",{className:"flex gap-1.5",children:[n.jsxs(se,{size:"sm",variant:"secondary",onClick:()=>mt(!1),children:[n.jsx(Se,{size:10})," Cancel"]}),n.jsxs(se,{size:"sm",onClick:X,loading:T.isPending,children:[n.jsx(He,{size:10})," Save"]})]})]})]}):n.jsxs("div",{className:"px-4 py-3 flex items-center gap-3 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[n.jsx("div",{className:S("w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0 shadow-sm",nn?"bg-gradient-to-br from-violet-500 to-purple-600 shadow-violet-500/20":Qs?"bg-gradient-to-br from-amber-500 to-orange-600 shadow-amber-500/20":"bg-gradient-to-br from-blue-500 to-indigo-600 shadow-blue-500/20"),children:n.jsx(Yi,{size:16,className:"text-white"})}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("h1",{className:"text-sm font-bold text-content truncate",children:t==null?void 0:t.name}),Qs?n.jsxs("span",{className:"text-[7px] px-1.5 py-px rounded font-bold flex items-center gap-0.5 ring-1 bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800",children:[n.jsx(Be,{size:7})," Audit"]}):n.jsx("button",{type:"button",onClick:H=>{H.stopPropagation();const oe=nn?"ui":"api";T.mutate({id:e,data:{type:oe}})},title:"Toggle type",className:S("text-[7px] px-1.5 py-px rounded font-bold uppercase ring-1 cursor-pointer transition-colors",nn?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800 hover:bg-violet-100 dark:hover:bg-violet-900/30":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"),children:nn?"API":"UI"}),n.jsx("button",{type:"button",onClick:()=>mt(!0),className:"p-0.5 rounded text-content-tertiary hover:text-accent transition-colors",children:n.jsx(Rr,{size:10})})]}),ht&&n.jsx("p",{className:"text-[10px] text-content-tertiary truncate mt-0.5 leading-tight max-w-md",children:ht})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[g?n.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-teal-600 dark:text-teal-400 font-medium px-2 py-1 rounded-lg bg-teal-50 dark:bg-teal-900/20 ring-1 ring-teal-200 dark:ring-teal-800",children:[n.jsx(ce,{size:11,className:"animate-spin"})," Running…"]}):n.jsxs(se,{size:"sm",onClick:o,className:"bg-teal-600 hover:bg-teal-700 text-white border-teal-600",children:[n.jsx(Rt,{size:10})," Run Suite"]}),n.jsxs(se,{size:"sm",onClick:()=>p(!0),className:"bg-indigo-600 hover:bg-indigo-700 text-white border-indigo-600",children:[n.jsx(Aa,{size:10})," Hooks"]}),n.jsx(el,{variant:"full",status:(J==null?void 0:J.status)??"not-created",label:"Sync",onClick:E,busy:ae.busySuites.get(e)==="create"||ae.busySuites.get(e)==="sync"||ae.allOp==="create"||ae.allOp==="sync"})]})]}),ue.length>0&&n.jsxs("div",{className:"px-4 py-1.5 border-t border-border/50 flex items-center gap-1.5 flex-wrap",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mr-0.5",children:"Tags"}),n.jsx("button",{type:"button",onClick:()=>te(new Set),className:S("text-[9px] px-2 py-0.5 rounded-md font-medium transition-all",xe?"bg-accent text-white shadow-sm shadow-accent/20":"text-content-tertiary hover:text-content-secondary bg-surface-inset hover:bg-surface-inset/80 ring-1 ring-border"),children:"All"}),ue.map(H=>{const oe=L.has(H);return n.jsx("button",{type:"button",onClick:()=>{te(fe=>{const Re=new Set(fe);return oe?Re.delete(H):Re.add(H),Re})},className:S("text-[9px] px-2 py-0.5 rounded-md font-medium transition-all",oe||xe?"bg-accent/10 text-accent ring-1 ring-accent/30":"text-content-tertiary bg-surface-inset ring-1 ring-border hover:text-content-secondary"),children:H},H)})]}),n.jsxs("div",{className:"px-4 py-2 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1 min-w-[120px]",children:[n.jsx(Pr,{size:11,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{className:"w-full text-xs border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"Search tests…",value:M,onChange:H=>W(H.target.value)})]}),n.jsxs("select",{value:B,onChange:H=>de(H.target.value),className:"text-xs border border-border rounded-lg px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-accent bg-surface min-w-[90px]",children:[n.jsx("option",{value:"",children:"All Priority"}),Cy.map(H=>n.jsx("option",{value:H,className:"capitalize",children:H.charAt(0).toUpperCase()+H.slice(1)},H))]}),tt&&n.jsx("button",{type:"button",onClick:()=>{W(""),te(new Set),de("")},className:"p-1 rounded-lg text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})}),n.jsx("div",{className:"w-px h-4 bg-border"}),n.jsx("input",{className:"w-36 text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"New test case…",value:r,onChange:H=>a(H.target.value),onKeyDown:H=>H.key==="Enter"&&Tn()}),n.jsxs(se,{size:"sm",onClick:Tn,disabled:j.isPending,children:[n.jsx(Cn,{size:10})," Add"]}),n.jsx(se,{size:"sm",variant:"secondary",onClick:()=>N(!0),children:"From Template"}),n.jsx("span",{className:"text-[9px] text-content-tertiary ml-1 tabular-nums flex-shrink-0",children:tt?`${Ce.length}/${v.length}`:`${v.length} test${v.length!==1?"s":""}`})]})]}),y?n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}):v.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(fl,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No test cases yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Add your first test case using the toolbar above"})]}):Ce.length===0?n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-10 gap-2",children:[n.jsx($g,{size:16,className:"text-content-tertiary"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No tests match filters"}),n.jsx("button",{onClick:()=>{W(""),te(new Set),de("")},className:"text-[10px] text-accent hover:underline",children:"Clear filters"})]}):n.jsxs("div",{className:"space-y-1.5",children:[Ce.length>0&&n.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-1",children:[n.jsx("input",{type:"checkbox",className:"rounded border-border text-accent cursor-pointer",checked:P.size===Ce.length&&Ce.length>0,onChange:H=>{H.target.checked?_(new Set(Ce.map(oe=>oe.id))):_(new Set)}}),n.jsx("span",{className:"text-[9px] text-content-tertiary",children:"Select all"})]}),Ce.map((H,oe)=>{const fe=H.steps.some(ve=>ve.stepType==="api"),Re=f.get(H.id),it=J==null?void 0:J.cases.find(ve=>ve.caseId===H.id),Fr=(it==null?void 0:it.status)??"not-created",yl=ae.busyCases.get(`${e}:${H.id}`)==="create"||ae.busyCases.get(`${e}:${H.id}`)==="sync"||ae.busySuites.get(e)==="create"||ae.busySuites.get(e)==="sync"||ae.allOp==="create"||ae.allOp==="sync",es=P.has(H.id),ts=G==null?void 0:G.cases.find(ve=>ve.caseId===H.id);return n.jsx("div",{className:S("group rounded-xl border bg-surface hover:border-accent/30 hover:shadow-sm hover:shadow-accent/5 cursor-pointer transition-all",es?"border-accent/40 bg-accent/[0.02]":"border-border"),onClick:()=>i(H.id),children:n.jsxs("div",{className:"px-3.5 py-2.5 flex items-center gap-3",children:[n.jsx("input",{type:"checkbox",className:"rounded border-border text-accent cursor-pointer flex-shrink-0",checked:es,onClick:ve=>ve.stopPropagation(),onChange:ve=>{ve.stopPropagation(),_(Gs=>{const Ae=new Set(Gs);return ve.target.checked?Ae.add(H.id):Ae.delete(H.id),D.current=oe,Ae})},onClickCapture:ve=>{if(ve.shiftKey&&D.current>=0){ve.preventDefault();const Gs=Math.min(D.current,oe),Ae=Math.max(D.current,oe);_(Cc=>{const bl=new Set(Cc);return Ce.slice(Gs,Ae+1).forEach(Ir=>bl.add(Ir.id)),bl})}D.current=oe}}),n.jsx(gc,{size:11,className:"text-content-tertiary/40 group-hover:text-content-tertiary cursor-grab flex-shrink-0 transition-colors"}),n.jsx("span",{className:"text-[9px] font-mono text-accent font-semibold bg-accent/5 px-1.5 py-0.5 rounded ring-1 ring-accent/10 flex-shrink-0 tabular-nums",children:Rn(oe)}),n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[n.jsx("span",{className:"text-xs font-medium text-content truncate",children:H.name}),n.jsx("span",{className:S("text-[7px] px-1 py-px rounded font-bold uppercase flex-shrink-0 ring-1",fe?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":Qs?"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"),children:fe?"API":Qs?"Audit":"UI"}),ts&&n.jsx(Vk,{passRate:ts.passRate,runs:ts.runs,flaky:ts.flaky})]}),n.jsxs("span",{className:"text-[9px] text-content-tertiary tabular-nums flex-shrink-0",children:[H.steps.length," step",H.steps.length!==1?"s":""]}),n.jsx("span",{className:S("text-[8px] px-1.5 py-0.5 rounded capitalize ring-1 flex-shrink-0 font-medium",Gu[H.priority]??Gu.low),children:H.priority}),(H.tags??[]).length>0&&n.jsx("div",{className:"flex-shrink-0",onClick:ve=>ve.stopPropagation(),children:n.jsx(tl,{tags:H.tags})}),(()=>{if(!Re)return n.jsx("span",{className:"text-[8px] px-1.5 py-0.5 rounded ring-1 ring-border text-content-tertiary/60 flex-shrink-0",children:"Never"});const ve={passed:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800",failed:"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 ring-red-200 dark:ring-red-800",skipped:"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"};return n.jsx("span",{className:S("text-[8px] px-1.5 py-0.5 rounded capitalize ring-1 flex-shrink-0 font-medium",ve[Re.status]??"ring-border text-content-tertiary"),children:Re.status})})(),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",onClick:ve=>ve.stopPropagation(),children:[n.jsx(mm,{status:Fr,xrayKey:it==null?void 0:it.xrayTestId}),n.jsx(el,{variant:"icon",status:Fr,onClick:()=>K(H.id),busy:yl})]}),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",onClick:ve=>ve.stopPropagation(),children:[u.has(H.id)?n.jsx(ce,{size:11,className:"animate-spin text-teal-600 dark:text-teal-400"}):n.jsx("button",{type:"button",onClick:()=>l(H.id),title:"Run",className:"p-1 rounded-md text-teal-600 dark:text-teal-400 hover:bg-teal-50 dark:hover:bg-teal-900/20 transition-colors",children:n.jsx(Rt,{size:11})}),n.jsx("button",{type:"button",disabled:!Re,onClick:()=>{Re&&window.open(`/allure/${Re.allureRunId}`,"_blank")},title:"Report",className:S("p-1 rounded-md transition-colors",Re?"text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20":"text-content-tertiary/40 cursor-not-allowed"),children:n.jsx(Sn,{size:11})}),n.jsx("button",{type:"button",onClick:ve=>{ve.stopPropagation(),Nt(H)},title:"Duplicate",className:"p-1 rounded-md text-content-tertiary hover:text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-colors",children:n.jsx(am,{size:11})}),n.jsx("button",{type:"button",onClick:ve=>{ve.stopPropagation(),R(`Delete "${H.name}"?`,()=>w.mutate(H.id))},title:"Delete",className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(fn,{size:10})})]}),n.jsx(Zt,{size:11,className:"text-content-tertiary/40 flex-shrink-0"})]})},H.id)})]})]})}),n.jsx(Bk,{suiteId:e,open:d,onClose:()=>p(!1)}),n.jsx(hk,{open:b,onClose:()=>N(!1),suiteId:e,onCreated:()=>{}}),n.jsx(Pn,{...C}),P.size>0&&n.jsx(Wk,{selectedIds:P,suiteId:e,suites:s,onClear:()=>_(new Set),onDeleted:()=>_(new Set),onMoved:()=>_(new Set)})]})}function Jk({suiteId:e,caseId:t,suiteName:s,suiteType:r,onBack:a,onRunCase:i}){const{runningCaseIds:l,caseLastRun:o}=kc(),c=l.has(t),u=o.get(t),{data:x,isLoading:f}=yk(e,t),g=bk(e),v=jk(e,t),y=Nk(e,t),j=kk(e,t),{modalProps:w,confirmDelete:h}=zn(),d=wk(e,t),p=Sk(e,t),b=Ck(e,t),{data:N}=jy(e),C=wy(),R=ky(),P=N==null?void 0:N.cases.find(F=>F.caseId===t),_=hm(),D=()=>{((P==null?void 0:P.status)??"not-created")==="not-created"?C.mutate({suiteId:e,caseId:t}):R.mutate({suiteId:e,caseId:t})},[G,J]=m.useState(""),[ne,z]=m.useState(!1),[I,ee]=m.useState(""),[ae,E]=m.useState("medium"),[K,M]=m.useState([]),[W,L]=m.useState(""),[te,B]=m.useState("none"),[de,xe]=m.useState(""),[ue,Ce]=m.useState(""),[tt,en]=m.useState(!1),[mt,Ut]=m.useState(!1),q=m.useRef(null),[ht,Mn]=m.useState(!1),[at,tn]=m.useState(""),[Ws,Vs]=m.useState(""),T=m.useRef(null),[X,be]=m.useState(null),[Tn,Nt]=m.useState(null),[Rn,nn]=m.useState("steps"),[Qs,H]=m.useState(!1),[oe,fe]=m.useState([]),[Re,it]=m.useState([]),[Fr,yl]=m.useState(["performance","accessibility","seo"]),[es,ts]=m.useState(""),[ve,Gs]=m.useState("");m.useEffect(()=>{var he,re;if(!x)return;J(x.name),ee(x.description??""),E(x.priority??"medium"),M([...x.tags]),L(x.timeout?String(x.timeout):"");const F=x.dataSource;F?(B(F.type??"none"),xe(F.path??""),Ce(F.data?JSON.stringify(F.data,null,2):"")):(B("none"),xe(""),Ce("")),fe(((he=x.caseHooks)==null?void 0:he.before.map(pe=>({id:pe.id,instruction:pe.instruction})))??[]),it(((re=x.caseHooks)==null?void 0:re.after.map(pe=>({id:pe.id,instruction:pe.instruction})))??[]),yl(x.lighthouseCategories??["performance","accessibility","seo"]),Ut(!1),Mn(!1)},[x==null?void 0:x.id]);const Ae=()=>{Ut(!0),Mn(!1)},Cc=F=>{F.key==="Enter"&&(F.preventDefault(),Ir())},bl=F=>{const he=T.current;if(!he){tn(Ec=>Ec+F);return}const re=he.selectionStart??at.length,pe=he.selectionEnd??at.length,Ot=at.slice(0,re)+F+at.slice(pe);tn(Ot),setTimeout(()=>{he.focus(),he.setSelectionRange(re+F.length,re+F.length)},0)},Ir=async()=>{const F=W?parseInt(W,10):void 0;let he;if(te!=="none")if(he={type:te},te==="inline")try{he.data=JSON.parse(ue)}catch{}else he.path=de;const re={before:oe.map((pe,Ot)=>({...pe,order:Ot})),after:Re.map((pe,Ot)=>({...pe,order:Ot}))};await g.mutateAsync({caseId:t,data:{name:G,description:I,priority:ae,tags:K,timeout:F,dataSource:he,caseHooks:re,lighthouseCategories:Fr}}),Ut(!1),Mn(!0)},_y=async()=>{mt&&await Ir(),i()},jm=()=>{at.trim()&&(v.mutate({instruction:at}),tn(""))},$y=async F=>{Vs(F),await p.mutateAsync(F).finally(()=>Vs(""))},Nm=x?`TC-${(x.name||"").replace(/[^a-zA-Z]/g,"").slice(0,3).toUpperCase()||"TST"}-001`:"…";if(f||!x)return n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})});const ns=[...x.steps].sort((F,he)=>F.order-he.order),Uy=ns.some(F=>F.stepType==="api"),wm=r==="audit"||r==="performance";return n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 bg-surface border-b border-border z-10",children:[n.jsxs("div",{className:"flex items-center gap-1.5 px-5 pt-2 pb-1 text-[10px] text-content-tertiary",children:[n.jsxs("button",{onClick:()=>window.location.assign("/tests"),className:"hover:text-accent flex items-center gap-1",children:[n.jsx(Ug,{size:10})," Suites"]}),n.jsx(Zt,{size:9}),n.jsx("button",{onClick:a,className:"hover:text-accent",children:s}),n.jsx(Zt,{size:9}),n.jsx("span",{className:"text-content-secondary font-semibold font-mono",children:Nm})]}),n.jsxs("div",{className:"px-5 pb-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:ne?n.jsx("input",{ref:q,className:"flex-1 text-sm font-bold text-content bg-transparent border-b-2 border-accent outline-none p-0 pb-px",value:G,onChange:F=>{J(F.target.value),Ae()},onBlur:()=>z(!1),onKeyDown:F=>{F.key==="Enter"&&z(!1),F.key==="Escape"&&(J((x==null?void 0:x.name)??""),z(!1))},autoFocus:!0}):n.jsxs("div",{className:"flex items-center gap-1.5 group min-w-0",children:[n.jsx("h1",{className:"text-sm font-bold text-content truncate",children:G||"Untitled Test Case"}),n.jsx("button",{type:"button",onClick:()=>{z(!0),setTimeout(()=>{var F;return(F=q.current)==null?void 0:F.focus()},0)},className:"p-0.5 rounded text-content-tertiary opacity-0 group-hover:opacity-100 hover:bg-surface-inset transition-all",children:n.jsx(Rr,{size:10})})]})}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[n.jsx(el,{variant:"full",status:(P==null?void 0:P.status)??"not-created",onClick:D,busy:_.busyCases.get(`${e}:${t}`)==="create"||_.busyCases.get(`${e}:${t}`)==="sync"||_.busySuites.get(e)==="create"||_.busySuites.get(e)==="sync"||_.allOp==="create"||_.allOp==="sync"}),n.jsxs(se,{variant:"secondary",size:"sm",onClick:Ir,loading:g.isPending,disabled:!mt,children:[n.jsx(Kg,{size:10})," Save"]}),n.jsxs(se,{size:"sm",onClick:_y,loading:c,disabled:c,children:[!c&&n.jsx(Rt,{size:10})," ",c?"Running…":"Save & Run"]})]})]}),n.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[n.jsx("span",{className:"px-1.5 py-px rounded text-[9px] font-mono font-bold bg-teal-50 dark:bg-teal-900/20 text-teal-700 dark:text-teal-400 ring-1 ring-teal-200 dark:ring-teal-800",children:Nm}),c?n.jsxs("span",{className:"flex items-center gap-1 text-[9px] text-teal-600 dark:text-teal-400 font-medium",children:[n.jsx(ce,{size:9,className:"animate-spin"})," Running"]}):(()=>{if(!u)return n.jsx("span",{className:"text-[8px] px-1.5 py-px rounded ring-1 ring-border text-content-tertiary",children:"Never run"});const F={passed:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800",failed:"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 ring-red-200 dark:ring-red-800",skipped:"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"};return n.jsx("span",{className:S("text-[8px] px-1.5 py-px rounded capitalize ring-1",F[u.status]??"ring-border text-content-tertiary"),children:u.status})})(),n.jsx("button",{type:"button",disabled:!u,onClick:()=>{u&&window.open(`/allure/${u.allureRunId}`,"_blank")},className:S("p-0.5 rounded transition-colors",u?"text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20":"text-content-tertiary cursor-not-allowed"),children:n.jsx(Sn,{size:11})}),n.jsx(mm,{status:(P==null?void 0:P.status)??"not-created",xrayKey:P==null?void 0:P.xrayTestId}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsx("div",{className:"flex items-center gap-1",children:Cy.map(F=>n.jsx("button",{type:"button",onClick:()=>{E(F),Ae()},className:S("px-1.5 py-px rounded text-[8px] capitalize font-bold transition-all ring-1",ae===F?Gu[F]:"ring-transparent text-content-tertiary hover:ring-border"),children:F},F))}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsx(tl,{tags:K,editable:!0,onAdd:F=>{M(he=>[...he,F]),Ae()},onRemove:F=>{M(he=>he.filter(re=>re!==F)),Ae()}}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Tr,{size:9,className:"text-content-tertiary"}),n.jsx("input",{type:"number",min:1e3,step:1e3,className:"w-16 text-[9px] bg-transparent border-b border-dashed border-border px-1 py-px text-content-secondary placeholder:text-content-tertiary focus:outline-none focus:border-accent tabular-nums",placeholder:"30000",value:W,onChange:F=>{L(F.target.value),Ae()},onKeyDown:Cc}),n.jsx("span",{className:"text-[8px] text-content-tertiary",children:"ms"})]}),n.jsx("div",{className:"w-px h-3.5 bg-border"}),n.jsxs("button",{type:"button",onClick:()=>en(F=>!F),className:S("flex items-center gap-1 text-[9px] font-medium px-1.5 py-0.5 rounded transition-colors",tt?"text-accent bg-accent/5":"text-content-tertiary hover:text-content-secondary hover:bg-surface-inset"),children:[n.jsx(Aa,{size:9})," ",tt?"Less":"More",n.jsx(Tt,{size:8,className:S("transition-transform",tt&&"rotate-180")})]}),mt&&n.jsx("span",{className:"text-[8px] text-amber-500 dark:text-amber-400 font-bold ml-auto",children:"● Unsaved"}),ht&&!mt&&n.jsx("span",{className:"text-[8px] text-emerald-500 dark:text-emerald-400 font-bold ml-auto",children:"✓ Saved"})]})]}),tt&&n.jsxs("div",{className:"px-5 pb-3 pt-1 border-t border-border bg-surface-inset/30 animate-fade-in",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Description"}),n.jsx("textarea",{rows:2,className:"w-full text-xs text-content-secondary bg-surface rounded-lg border border-border outline-none resize-none focus:ring-2 focus:ring-accent/30 px-2.5 py-1.5",placeholder:"Add a description…",value:I,onChange:F=>{ee(F.target.value),Ae()},onKeyDown:F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),Ir())}})]}),n.jsx("div",{children:n.jsx(Xk,{type:te,filePath:de,inlineData:ue,onTypeChange:F=>{B(F),Ae()},onFilePathChange:F=>{xe(F),Ae()},onInlineChange:F=>{Ce(F),Ae()}})})]}),wm&&n.jsxs("div",{className:"mt-3 pt-3 border-t border-border/50",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-2 flex items-center gap-1.5",children:[n.jsx(Be,{size:9,className:"text-amber-500 dark:text-amber-400"})," Non-Functional Checks (Lighthouse)"]}),n.jsxs("div",{className:"flex items-center gap-4",children:[["performance","accessibility","seo"].map(F=>{const he={performance:"⚡ Performance",accessibility:"♿ Accessibility",seo:"🔍 SEO"},re=Fr.includes(F);return n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[n.jsx("input",{type:"checkbox",checked:re,onChange:()=>{yl(pe=>re?pe.filter(Ot=>Ot!==F):[...pe,F]),Ae()},className:"w-3 h-3 rounded accent-amber-600 cursor-pointer"}),n.jsx("span",{className:"text-[10px] text-content-secondary",children:he[F]})]},F)}),Fr.length===0&&n.jsx("span",{className:"text-[9px] text-amber-600",children:"⚠ No checks selected — Lighthouse will be skipped"})]})]})]})]}),n.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 px-5 pt-2 pb-0 border-b border-border bg-surface",children:[n.jsx("button",{type:"button",onClick:()=>nn("steps"),className:S("px-3 py-1.5 text-xs font-semibold rounded-t-lg transition-colors border-b-2",Rn==="steps"?"border-accent text-accent":"border-transparent text-content-tertiary hover:text-content-secondary"),children:"Steps"}),n.jsxs("button",{type:"button",onClick:()=>nn("hooks"),className:S("px-3 py-1.5 text-xs font-semibold rounded-t-lg transition-colors border-b-2",Rn==="hooks"?"border-accent text-accent":"border-transparent text-content-tertiary hover:text-content-secondary"),children:["Hooks",oe.length+Re.length>0&&n.jsx("span",{className:"ml-1 text-[9px] bg-accent/10 text-accent rounded px-1",children:oe.length+Re.length})]}),n.jsx("div",{className:"flex-1"}),n.jsxs("button",{type:"button",onClick:()=>H(!0),title:"Step Library",className:"flex items-center gap-1.5 text-[10px] text-content-tertiary hover:text-accent hover:bg-accent/5 px-2 py-1 rounded-lg transition-colors mb-1",children:[n.jsx(Gi,{size:11})," Library"]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto bg-surface-inset/20",children:n.jsxs("div",{className:"max-w-4xl mx-auto px-5 py-3",children:[Rn==="hooks"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2 border-b border-border bg-surface-inset/30",children:[n.jsx("h3",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest",children:"Before Hooks"}),n.jsx("p",{className:"text-[9px] text-content-tertiary mt-0.5",children:"Run before all steps"})]}),n.jsxs("div",{className:"p-3 space-y-1.5",children:[oe.map((F,he)=>n.jsxs("div",{className:"flex items-center gap-2 text-xs bg-surface-inset/50 rounded-lg px-3 py-2 border border-border",children:[n.jsx("span",{className:"text-content-tertiary font-mono text-[9px] w-4",children:he+1}),n.jsx("span",{className:"flex-1 text-content-secondary",children:F.instruction}),n.jsx("button",{type:"button",onClick:()=>{fe(re=>re.filter((pe,Ot)=>Ot!==he)),Ae()},className:"p-0.5 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})})]},F.id)),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("input",{className:"flex-1 text-xs border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"Add before-hook instruction…",value:es,onChange:F=>ts(F.target.value),onKeyDown:F=>{F.key==="Enter"&&es.trim()&&(fe(he=>[...he,{id:crypto.randomUUID(),instruction:es.trim()}]),ts(""),Ae())}}),n.jsxs(se,{size:"sm",onClick:()=>{es.trim()&&(fe(F=>[...F,{id:crypto.randomUUID(),instruction:es.trim()}]),ts(""),Ae())},children:[n.jsx(Cn,{size:11})," Add"]})]})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2 border-b border-border bg-surface-inset/30",children:[n.jsx("h3",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest",children:"After Hooks"}),n.jsx("p",{className:"text-[9px] text-content-tertiary mt-0.5",children:"Run after all steps (always)"})]}),n.jsxs("div",{className:"p-3 space-y-1.5",children:[Re.map((F,he)=>n.jsxs("div",{className:"flex items-center gap-2 text-xs bg-surface-inset/50 rounded-lg px-3 py-2 border border-border",children:[n.jsx("span",{className:"text-content-tertiary font-mono text-[9px] w-4",children:he+1}),n.jsx("span",{className:"flex-1 text-content-secondary",children:F.instruction}),n.jsx("button",{type:"button",onClick:()=>{it(re=>re.filter((pe,Ot)=>Ot!==he)),Ae()},className:"p-0.5 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})})]},F.id)),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("input",{className:"flex-1 text-xs border border-border rounded-lg px-3 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"Add after-hook instruction…",value:ve,onChange:F=>Gs(F.target.value),onKeyDown:F=>{F.key==="Enter"&&ve.trim()&&(it(he=>[...he,{id:crypto.randomUUID(),instruction:ve.trim()}]),Gs(""),Ae())}}),n.jsxs(se,{size:"sm",onClick:()=>{ve.trim()&&(it(F=>[...F,{id:crypto.randomUUID(),instruction:ve.trim()}]),Gs(""),Ae())},children:[n.jsx(Cn,{size:11})," Add"]})]})]})]})]}),Rn==="steps"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex gap-2 mb-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Be,{size:12,className:"absolute left-3 top-1/2 -translate-y-1/2 text-accent/50 pointer-events-none"}),n.jsx("input",{ref:T,className:"w-full text-xs border border-border rounded-lg pl-8 pr-3 py-2 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary shadow-xs",placeholder:"Describe a step in plain English and press Enter…",value:at,onChange:F=>tn(F.target.value),onKeyDown:F=>F.key==="Enter"&&jm()})]}),n.jsx(Kk,{onInsert:bl}),n.jsxs(se,{size:"sm",onClick:jm,disabled:v.isPending,className:"border border-transparent",children:[n.jsx(Cn,{size:11})," Add Step"]}),n.jsxs(se,{size:"sm",loading:b.isPending,onClick:()=>b.mutate(),className:"border border-transparent bg-gradient-to-b from-emerald-500 to-emerald-600 text-white hover:brightness-110 shadow-sm hover:shadow-md focus-visible:ring-emerald-500",children:[n.jsx(Fa,{size:11})," Generate All"]})]}),n.jsx("div",{className:"space-y-1.5",children:ns.length===0?n.jsxs("div",{className:"border border-dashed border-border rounded-xl py-10 text-center bg-surface",children:[n.jsx(Be,{size:20,className:"mx-auto text-content-tertiary/40 mb-2"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No steps yet — type an instruction above and press Enter"}),n.jsxs("p",{className:"text-[10px] text-content-tertiary mt-1",children:["Or click ",n.jsx("span",{className:"font-semibold",children:"Generate All"})," to let AI write all steps"]})]}):ns.map((F,he)=>n.jsx(Zk,{step:F,index:he,suiteId:e,caseId:t,caseIsApi:Uy,suiteIsAudit:wm,generating:Ws===F.id,isDragging:X===F.id,isDragOver:Tn===F.id,onDragStart:()=>be(F.id),onDragOver:()=>Nt(F.id),onDrop:()=>{if(!X||X===F.id){be(null),Nt(null);return}const re=ns.map(Ec=>Ec.id),pe=re.indexOf(X),Ot=re.indexOf(F.id);re.splice(pe,1),re.splice(Ot,0,X),d.mutate(re),be(null),Nt(null)},onDragEnd:()=>{be(null),Nt(null)},onDelete:re=>h("Delete this step?",()=>j.mutate(re)),onGenerate:re=>void $y(re),onSaveInstruction:(re,pe)=>y.mutate({stepId:re,instruction:pe}),onSaveTimeout:(re,pe)=>y.mutate({stepId:re,timeout:pe}),onSaveRetries:(re,pe)=>y.mutate({stepId:re,retries:pe??void 0}),onSaveStepType:(re,pe)=>y.mutate({stepId:re,stepType:pe}),onSaveMockUrl:(re,pe)=>y.mutate({stepId:re,mockUrl:pe}),onSaveMockResponse:(re,pe)=>y.mutate({stepId:re,mockResponse:pe}),onSaveMockStatus:(re,pe)=>y.mutate({stepId:re,mockStatus:pe}),onSaveRunAudit:(re,pe)=>y.mutate({stepId:re,runAudit:pe},{onSuccess:()=>O.success(pe?"⚡ Audit checkpoint set":"Audit checkpoint removed")})},F.id))}),ns.length>0&&n.jsxs("p",{className:"text-[9px] text-content-tertiary text-center mt-3",children:[ns.length," step",ns.length!==1?"s":""," · ",ns.filter(F=>{var he;return!!((he=F.generatedCode)!=null&&he.trim())}).length," with code"]})]})]})}),n.jsx(Pn,{...w}),n.jsx(Qk,{open:Qs,onClose:()=>H(!1),suiteId:e,caseId:t,onInserted:()=>H(!1)})]})}function Xk({type:e,filePath:t,inlineData:s,onTypeChange:r,onFilePathChange:a,onInlineChange:i}){const[l,o]=m.useState([]),[c,u]=m.useState([]),[x,f]=m.useState(!1),[g,v]=m.useState(""),[y,j]=m.useState(!1),w=m.useRef(null);m.useEffect(()=>{Ur.list().then(o).catch(()=>{})},[]),m.useEffect(()=>{if((e==="json-file"||e==="csv-file")&&t){const b=t.replace(/^data\//,"");Ur.get(b).then(N=>{u(N.rows),v(N.raw)}).catch(()=>u([]))}else if(e==="inline"&&s)try{u(JSON.parse(s))}catch{u([])}else u([])},[e,t,s]);const h=async b=>{var C;const N=(C=b.target.files)==null?void 0:C[0];if(N){j(!0);try{const R=await N.text(),P=await Ur.upload(N.name,R);a(P.path),r(N.name.endsWith(".csv")?"csv-file":"json-file");const _=await Ur.list();o(_),O.success(`Uploaded ${N.name} (${P.rowCount} rows)`)}catch(R){O.error(R instanceof Error?R.message:"Upload failed")}finally{j(!1),b.target.value=""}}},d=async()=>{if((e==="json-file"||e==="csv-file")&&t){const b=t.replace(/^data\//,"");try{await Ur.update(b,g);const N=await Ur.get(b);u(N.rows),f(!1),O.success("Data file saved")}catch(N){O.error(N instanceof Error?N.message:"Save failed")}}else if(e==="inline"){i(g);try{u(JSON.parse(g))}catch{u([])}f(!1)}},p=c.length>0?Object.keys(c[0]):[];return n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1.5 flex items-center gap-1",children:[n.jsx(Rg,{size:9})," Data-Driven"]}),n.jsxs("div",{className:"flex items-center gap-1.5 mb-2 flex-wrap",children:[["none","inline","json-file","csv-file"].map(b=>n.jsx("button",{type:"button",onClick:()=>r(b),className:S("px-2 py-0.5 rounded-md text-[9px] font-semibold transition-all ring-1",e===b?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":"ring-border text-content-tertiary hover:bg-surface-inset"),children:b==="none"?"Off":b==="inline"?"Inline":b==="json-file"?"JSON":"CSV"},b)),(e==="json-file"||e==="csv-file")&&n.jsxs("select",{className:"max-w-[160px] text-[10px] border border-border rounded-md px-1.5 py-0.5 focus:outline-none focus:ring-1 focus:ring-accent bg-surface-inset/50",value:t,onChange:b=>a(b.target.value),children:[n.jsx("option",{value:"",children:"Select file…"}),l.filter(b=>e==="csv-file"?b.type==="csv":b.type==="json").map(b=>n.jsx("option",{value:b.path,children:b.name},b.name))]}),e!=="none"&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",onClick:()=>{var b;return(b=w.current)==null?void 0:b.click()},className:"flex items-center gap-0.5 px-1.5 py-0.5 rounded-md ring-1 ring-dashed ring-violet-300 dark:ring-violet-700 text-[9px] font-semibold text-violet-600 dark:text-violet-400 hover:bg-violet-50 dark:hover:bg-violet-900/20 transition-colors",children:[y?n.jsx(ce,{size:9,className:"animate-spin"}):n.jsx(cm,{size:9})," Upload"]}),n.jsx("input",{ref:w,type:"file",accept:".json,.csv",onChange:h,className:"hidden"})]})]}),e==="inline"&&!x&&n.jsx("textarea",{className:"w-full h-14 text-[10px] font-mono border border-border rounded-lg px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 mb-2 bg-surface-inset/50",placeholder:'[{"email":"user1@test.com","password":"pass1"}]',value:s,onChange:b=>i(b.target.value)}),e!=="none"&&c.length>0&&!x&&n.jsxs("div",{className:"mb-2",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsxs("span",{className:"text-[9px] text-content-tertiary",children:[c.length," row",c.length!==1?"s":""]}),n.jsxs("button",{type:"button",onClick:()=>{e==="inline"&&v(s),f(!0)},className:"text-[9px] text-violet-600 dark:text-violet-400 hover:text-violet-800 dark:hover:text-violet-300 font-semibold flex items-center gap-0.5",children:[n.jsx(Rr,{size:8})," Edit"]})]}),n.jsx("div",{className:"overflow-x-auto border border-border rounded-lg",children:n.jsxs("table",{className:"w-full text-[10px]",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-surface-inset border-b border-border",children:[n.jsx("th",{className:"px-2 py-1 text-left font-bold text-content-tertiary w-6",children:"#"}),p.map(b=>n.jsx("th",{className:"px-2 py-1 text-left font-bold text-violet-600 dark:text-violet-400",children:`{{${b}}}`},b))]})}),n.jsxs("tbody",{children:[c.slice(0,8).map((b,N)=>n.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-surface-inset/50",children:[n.jsx("td",{className:"px-2 py-0.5 text-content-tertiary tabular-nums",children:N+1}),p.map(C=>n.jsx("td",{className:"px-2 py-0.5 text-content-secondary font-mono",children:b[C]},C))]},N)),c.length>8&&n.jsx("tr",{children:n.jsxs("td",{colSpan:p.length+1,className:"px-2 py-1 text-center text-content-tertiary text-[9px] italic",children:["+",c.length-8," more"]})})]})]})})]}),x&&n.jsxs("div",{className:"mb-2",children:[n.jsx("textarea",{className:"w-full h-32 text-[10px] font-mono border border-violet-300 dark:border-violet-700 rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-violet-300 dark:focus:ring-violet-700 bg-violet-50/20 dark:bg-violet-900/10 text-content",value:g,onChange:b=>v(b.target.value)}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5",children:[n.jsxs("button",{type:"button",onClick:d,className:"flex items-center gap-0.5 px-2.5 py-1 rounded-lg bg-violet-600 text-white text-[10px] font-semibold hover:bg-violet-700",children:[n.jsx(He,{size:10})," Save"]}),n.jsxs("button",{type:"button",onClick:()=>f(!1),className:"flex items-center gap-0.5 px-2.5 py-1 rounded-lg border border-border text-[10px] text-content-secondary hover:bg-surface-inset",children:[n.jsx(Se,{size:10})," Cancel"]})]})]})]})}function Zk({step:e,index:t,caseIsApi:s,suiteIsAudit:r,generating:a,isDragging:i,isDragOver:l,onDragStart:o,onDragOver:c,onDrop:u,onDragEnd:x,onDelete:f,onGenerate:g,onSaveInstruction:v,onSaveTimeout:y,onSaveRetries:j,onSaveStepType:w,onSaveMockUrl:h,onSaveMockResponse:d,onSaveMockStatus:p,onSaveRunAudit:b}){var Ut;const[N,C]=m.useState(!1),[R,P]=m.useState(!1),[_,D]=m.useState(e.instruction),[G,J]=m.useState(e.timeout?String(e.timeout):""),[ne,z]=m.useState(e.retries!=null?String(e.retries):""),[I,ee]=m.useState(e.mockUrl??""),[ae,E]=m.useState(e.mockResponse??""),[K,M]=m.useState(e.mockStatus?String(e.mockStatus):"200"),W=m.useRef(null),[L,te]=m.useState(void 0),B=!!((Ut=e.generatedCode)!=null&&Ut.trim()),de=e.stepType==="mock",xe=!!e.runAudit,ue=L!==void 0?L:xe,Ce=L!==void 0&&L!==xe,tt=()=>{L!==void 0&&(b==null||b(e.id,L),te(void 0))},en=()=>te(void 0);m.useEffect(()=>{de&&C(!0)},[de]),m.useEffect(()=>{J(e.timeout?String(e.timeout):"")},[e.timeout]),m.useEffect(()=>{D(e.instruction)},[e.instruction]),m.useEffect(()=>{var q;R&&((q=W.current)==null||q.focus())},[R]);const mt=()=>{const q=_.trim();q&&q!==e.instruction&&v(e.id,q),P(!1)};return n.jsxs("div",{draggable:!0,onDragStart:q=>{q.dataTransfer.effectAllowed="move",o()},onDragOver:q=>{q.preventDefault(),c()},onDrop:q=>{q.preventDefault(),u()},onDragEnd:x,className:S("rounded-lg overflow-hidden transition-all",i?"opacity-40 ring-2 ring-accent":"ring-1 ring-border",l?"ring-2 ring-accent shadow-sm":""),children:[n.jsxs("div",{className:"flex items-start gap-2 px-3 py-2",children:[n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 pt-0.5",children:[n.jsx(gc,{size:11,className:"text-content-tertiary hover:text-content-secondary cursor-grab active:cursor-grabbing"}),n.jsx("span",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-accent to-accent-dark text-white text-[9px] font-bold flex items-center justify-center",children:t+1})]}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-start gap-1.5 flex-wrap",children:[R?n.jsx("input",{ref:W,className:"flex-1 text-xs text-content border border-accent/40 rounded-md px-2 py-0.5 focus:outline-none focus:ring-1 focus:ring-accent/30 min-w-0 bg-surface-inset/50",value:_,onChange:q=>D(q.target.value),onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),mt()),q.key==="Escape"&&(D(e.instruction),P(!1))},onBlur:mt}):n.jsx("span",{className:"text-xs text-content font-medium flex-1",children:e.instruction}),n.jsx("span",{className:S("text-[8px] px-1 py-px rounded font-bold uppercase flex-shrink-0 ring-1",de?"bg-purple-50 dark:bg-purple-900/20 text-purple-600 dark:text-purple-400 ring-purple-200 dark:ring-purple-800":e.stepType==="api"||s?"bg-violet-50 dark:bg-violet-900/20 text-violet-600 dark:text-violet-400 ring-violet-200 dark:ring-violet-800":r?"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800":"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 ring-blue-200 dark:ring-blue-800"),children:de?"Mock":e.stepType==="api"||s?"API":r?"Audit":"UI"}),ue&&n.jsxs("span",{className:S("text-[8px] px-1 py-px rounded font-bold flex items-center gap-0.5 ring-1",Ce?"bg-amber-50 dark:bg-amber-900/20 text-amber-500 dark:text-amber-400 ring-amber-200 dark:ring-amber-800 opacity-60":"bg-amber-50 dark:bg-amber-900/20 text-amber-600 dark:text-amber-400 ring-amber-200 dark:ring-amber-800"),children:[n.jsx(Be,{size:7}),Ce?"Audit*":"Audit"]}),e.lastHealed&&n.jsx("span",{className:"text-[8px] px-1 py-px rounded bg-amber-50 text-amber-600 ring-1 ring-amber-200 font-bold",children:"healed"})]}),B&&!R&&n.jsx("p",{className:"text-[10px] text-content-tertiary mt-px",children:"Code generated ✓"})]}),n.jsxs("select",{value:e.stepType??"ui",onChange:q=>{q.target.value==="mock"&&C(!0),w==null||w(e.id,q.target.value)},className:"text-[10px] border border-border rounded-md px-1 py-0.5 bg-surface-inset/50 text-content-secondary focus:outline-none focus:border-accent flex-shrink-0",children:[n.jsx("option",{value:"ui",children:"UI"}),n.jsx("option",{value:"api",children:"API"}),n.jsx("option",{value:"mock",children:"Mock"})]}),n.jsx("input",{type:"number",min:0,max:5,step:1,className:"w-10 text-[10px] border border-border rounded-md px-1.5 py-0.5 text-content-secondary placeholder:text-content-tertiary focus:outline-none focus:border-accent flex-shrink-0 bg-surface-inset/50",placeholder:"×",title:"Retries",value:ne,onChange:q=>z(q.target.value),onBlur:()=>{const q=ne.trim()?parseInt(ne,10):null,ht=e.retries??null;q!==ht&&(j==null||j(e.id,q!=null&&q>=0?q:null))},onKeyDown:q=>{q.key==="Enter"&&q.target.blur()}}),n.jsx("input",{type:"number",min:100,step:100,className:"w-16 text-[10px] border border-border rounded-md px-1.5 py-0.5 text-content-secondary placeholder:text-content-tertiary focus:outline-none focus:border-accent flex-shrink-0 bg-surface-inset/50",placeholder:"ms",value:G,onChange:q=>J(q.target.value),onBlur:()=>{const q=G.trim()?parseInt(G,10):null,ht=e.timeout??null;q!==ht&&y(e.id,q&&q>0?q:null)},onKeyDown:q=>{q.key==="Enter"&&q.target.blur()}}),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[R?n.jsx("button",{type:"button",onClick:mt,className:"p-1 rounded-md text-emerald-500 hover:bg-emerald-50 dark:hover:bg-emerald-900/20 transition-colors",children:n.jsx(He,{size:12})}):n.jsx("button",{type:"button",onClick:()=>P(!0),className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",children:n.jsx(Rr,{size:11})}),r&&!s&&e.stepType!=="api"&&e.stepType!=="mock"&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",title:ue?"Remove Lighthouse audit checkpoint":"Mark as Lighthouse audit checkpoint",onClick:q=>{q.stopPropagation(),te(!ue)},onMouseDown:q=>q.stopPropagation(),className:S("flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-bold transition-all cursor-pointer select-none",ue?"text-amber-700 dark:text-amber-400 bg-amber-100 dark:bg-amber-900/30 hover:bg-amber-200 dark:hover:bg-amber-900/40 ring-1 ring-amber-300 dark:ring-amber-700":"text-content-tertiary hover:text-amber-600 dark:hover:text-amber-400 hover:bg-amber-50 dark:hover:bg-amber-900/20 ring-1 ring-transparent hover:ring-amber-200 dark:hover:ring-amber-800"),children:[n.jsx(Be,{size:9}),n.jsx("span",{children:"Audit"})]}),Ce&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:"Save audit change",onClick:q=>{q.stopPropagation(),tt()},onMouseDown:q=>q.stopPropagation(),className:"p-1 rounded-md text-emerald-600 hover:bg-emerald-50 dark:hover:bg-emerald-900/20 transition-colors",children:n.jsx(He,{size:11})}),n.jsx("button",{type:"button",title:"Cancel",onClick:q=>{q.stopPropagation(),en()},onMouseDown:q=>q.stopPropagation(),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(Se,{size:11})})]})]}),n.jsx("button",{type:"button",onClick:()=>g(e.id),disabled:a,className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors disabled:opacity-40",children:a?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Fa,{size:12})}),n.jsx("button",{type:"button",onClick:()=>f(e.id),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",children:n.jsx(fn,{size:11})}),n.jsx("button",{type:"button",onClick:()=>C(q=>!q),className:"p-1 rounded-md text-content-tertiary hover:text-content-secondary hover:bg-surface-inset transition-colors",children:N?n.jsx(Tt,{size:12}):n.jsx(Zt,{size:12})})]})]}),N&&n.jsxs("div",{className:"border-t border-border",children:[de&&n.jsxs("div",{className:"px-3 py-2.5 bg-violet-50/50 dark:bg-violet-900/10 space-y-1.5 border-b border-border",children:[n.jsx("p",{className:"text-[9px] font-bold text-violet-600 dark:text-violet-400 uppercase tracking-widest",children:"Mock Route"}),n.jsxs("div",{className:"flex gap-2 items-center",children:[n.jsx("input",{className:"flex-1 text-[10px] border border-border rounded px-2 py-1 bg-surface focus:outline-none focus:border-violet-400",placeholder:"URL pattern, e.g. **/api/users",value:I,onChange:q=>ee(q.target.value),onBlur:()=>{I!==(e.mockUrl??"")&&(h==null||h(e.id,I))}}),n.jsx("input",{type:"number",className:"w-16 text-[10px] border border-border rounded px-2 py-1 bg-surface focus:outline-none focus:border-violet-400",placeholder:"Status",value:K,onChange:q=>M(q.target.value),onBlur:()=>{const q=parseInt(K,10);!isNaN(q)&&q!==(e.mockStatus??200)&&(p==null||p(e.id,q))}})]}),n.jsx("textarea",{rows:3,className:"w-full text-[10px] border border-border rounded px-2 py-1 bg-surface focus:outline-none focus:border-violet-400 font-mono resize-none",placeholder:'{"key":"value"}',value:ae,onChange:q=>E(q.target.value),onBlur:()=>{ae!==(e.mockResponse??"")&&(d==null||d(e.id,ae))}})]}),B?n.jsx(Sy,{code:e.generatedCode,maxLines:12,className:"rounded-none"}):n.jsxs("div",{className:"px-3 py-2.5 text-[10px] text-content-tertiary italic bg-surface-inset/30",children:["No code yet — click ",n.jsx(Fa,{size:9,className:"inline mb-0.5"})," to generate"]})]})]})}let Bt=null,ci=!1;const Yu=new Set;function di(){Yu.forEach(e=>e())}const dn={subscribe(e){return Yu.add(e),()=>{Yu.delete(e)}},getSnapshot(){return{job:Bt,showPopup:ci}},start(e,t){const s=`gen-${Date.now()}`;return Bt={id:s,tab:e,label:t,status:"running",startedAt:Date.now()},ci=!1,di(),s},done(e,t){Bt&&(Bt={...Bt,status:"done",suiteId:e,suiteName:t},ci=!0,di())},error(e){Bt&&(Bt={...Bt,status:"error",error:e},di())},dismissPopup(){ci=!1,di()},clear(){Bt=null,ci=!1,di()},isRunning(){return(Bt==null?void 0:Bt.status)==="running"}};function Ey(){const[e,t]=m.useState(()=>dn.getSnapshot());return m.useEffect(()=>dn.subscribe(()=>t(dn.getSnapshot())),[]),e}const e5=[{title:"Login Flow",story:"User logs in with valid credentials, navigates to the dashboard, and verifies that the welcome message is displayed."},{title:"E-Commerce Checkout",story:"User searches for a product, adds it to the cart, proceeds to checkout, and completes the purchase."},{title:"Admin Management",story:"Admin user creates a new account, assigns roles, and verifies the account appears in the user list."}],t5=/^(https?:\/\/.+\/(browse|issue)\/[A-Z][A-Z0-9_]+-\d+|https?:\/\/.+selectedIssue=[A-Z][A-Z0-9_]+-\d+|[A-Z][A-Z0-9_]+-\d+)$/i;function ff(e){return e.trim()?t5.test(e.trim()):!0}function pf(e){const t=e.trim();if(!t)return null;const s=t.match(/([A-Z][A-Z0-9_]+-\d+)/i);return s?s[1].toUpperCase():null}function n5(e){const t=e.trim();if(!t)return[];if(t.startsWith("["))try{const i=JSON.parse(t).map(l=>{if(typeof l=="string")return{story:l.trim()};if(typeof l=="object"&&l!==null&&"story"in l){const o=l;return{story:String(o.story).trim(),suiteName:o.suiteName,jiraUrl:o.jiraUrl}}return null}).filter(l=>l!==null&&l.story.length>=10);if(i.length>0)return i}catch{}const s=t.split(/\n\s*---+\s*\n/).map(a=>a.trim()).filter(Boolean);if(s.length>1)return s.map(a=>a.replace(/^\d+\.\s*/,"").trim()).filter(a=>a.length>=10).map(a=>({story:a}));const r=t.split(`
|
|
779
|
+
`).filter(a=>/^\d+[\.\)]\s/.test(a.trim()));return r.length>1?r.map(a=>a.replace(/^\d+[\.\)]\s*/,"").trim()).filter(a=>a.length>=10).map(a=>({story:a})):t.length>=10?[{story:t}]:[]}function vd({icon:e,title:t,desc:s,tag:r,active:a,gradient:i,onClick:l}){return n.jsxs("button",{type:"button",onClick:l,className:S("relative flex items-start gap-2.5 p-3 rounded-xl border-2 text-left transition-all duration-200 group flex-1 min-w-0",a?"border-accent bg-accent/[0.04] shadow-sm":"border-transparent bg-surface hover:bg-surface-inset/50 hover:border-border"),children:[a&&n.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 -translate-y-px w-8 h-[3px] rounded-full bg-gradient-to-r from-accent to-accent-light"}),n.jsx("div",{className:S("w-5 h-5 rounded flex items-center justify-center transition-all flex-shrink-0",a?i:"bg-surface-inset"),children:n.jsx(e,{size:14,className:a?"text-white":"text-content-tertiary",strokeWidth:1.8})}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:S("text-xs font-semibold transition-colors",a?"text-content":"text-content-secondary"),children:t}),r&&n.jsx("span",{className:S("text-[8px] font-bold uppercase tracking-wider px-1 py-px rounded",a?"bg-accent/10 text-accent":"bg-surface-inset text-content-tertiary"),children:r})]}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-px leading-snug truncate",children:s})]})]})}function gf({title:e,icon:t,children:s,defaultOpen:r=!1}){const[a,i]=m.useState(r);return n.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>i(l=>!l),className:"w-full flex items-center justify-between px-4 py-3 bg-surface-inset/50 hover:bg-surface-inset transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(t,{size:13,className:"text-content-tertiary"}),n.jsx("span",{className:"text-xs font-semibold text-content-secondary",children:e})]}),n.jsx(Tt,{size:13,className:S("text-content-tertiary transition-transform duration-200",a&&"rotate-180")})]}),a&&n.jsx("div",{className:"px-4 py-3 border-t border-border bg-surface",children:s})]})}function s5({content:e,onClose:t}){const[s,r]=m.useState(!1);return n.jsxs("div",{className:S("rounded-xl border overflow-hidden transition-all animate-fade-in","border-indigo-200/50 bg-gradient-to-br from-indigo-50/40 via-surface to-violet-50/20"),children:[n.jsxs("div",{className:"px-3 pt-3 pb-1.5 space-y-1.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-indigo-100/80 text-indigo-700 text-xs font-bold",children:[n.jsx(qa,{size:11})," ",e.issueKey]}),n.jsx("span",{className:"px-2 py-0.5 rounded-md bg-surface-inset text-content-secondary text-[10px] font-semibold border border-border",children:e.issueType}),n.jsx("span",{className:"px-2 py-0.5 rounded-md bg-surface-inset text-content-secondary text-[10px] font-semibold border border-border",children:e.status}),n.jsx("span",{className:"px-2 py-0.5 rounded-md bg-amber-50 text-amber-700 text-[10px] font-semibold border border-amber-200/50",children:e.priority})]}),n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[n.jsx("button",{type:"button",onClick:()=>r(a=>!a),className:"text-indigo-500 hover:text-indigo-700 text-[10px] font-semibold px-2 py-1 rounded-md hover:bg-indigo-50 transition-colors",children:s?"Less":"More"}),n.jsx("button",{type:"button",onClick:t,className:"p-1 rounded-md text-content-tertiary hover:text-content-secondary hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:13})})]})]}),n.jsx("p",{className:"font-semibold text-content text-xs leading-relaxed",children:e.summary})]}),n.jsxs("div",{className:S("px-3 pb-3 space-y-1.5",s?"overflow-y-auto max-h-[200px]":""),children:[e.description&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Description"}),n.jsx("p",{className:S("text-xs text-content-secondary leading-relaxed whitespace-pre-wrap",!s&&"line-clamp-3"),children:e.description})]}),e.acceptanceCriteria&&s&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Acceptance Criteria"}),n.jsx("p",{className:"text-xs text-content-secondary leading-relaxed whitespace-pre-wrap",children:e.acceptanceCriteria})]}),e.comments.length>0&&s&&n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:["Comments (",e.comments.length,")"]}),e.comments.map((a,i)=>n.jsx("p",{className:"text-xs text-content-secondary italic mt-1 whitespace-pre-wrap",children:a},i))]}),e.labels.length>0&&n.jsx("div",{className:"flex items-center gap-1 flex-wrap pt-1",children:e.labels.map(a=>n.jsx("span",{className:"px-2 py-0.5 rounded-full bg-surface-inset text-content-tertiary text-[9px] font-medium border border-border",children:a},a))})]})]})}function r5({pct:e,size:t=64,stroke:s=5}){const r=(t-s)/2,a=2*Math.PI*r,i=a-e/100*a;return n.jsxs("svg",{width:t,height:t,className:"-rotate-90",children:[n.jsx("circle",{cx:t/2,cy:t/2,r,fill:"none",stroke:"currentColor",strokeWidth:s,className:"text-surface-inset"}),n.jsx("circle",{cx:t/2,cy:t/2,r,fill:"none",stroke:"url(#prog-grad)",strokeWidth:s,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:i,className:"transition-all duration-700 ease-out"}),n.jsx("defs",{children:n.jsxs("linearGradient",{id:"prog-grad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"var(--color-accent)"}),n.jsx("stop",{offset:"100%",stopColor:"var(--color-accent-light, #818cf8)"})]})})]})}const a5={GET:"bg-blue-500/10 text-blue-600 ring-blue-500/20",POST:"bg-emerald-500/10 text-emerald-600 ring-emerald-500/20",PUT:"bg-amber-500/10 text-amber-600 ring-amber-500/20",DELETE:"bg-red-500/10 text-red-600 ring-red-500/20",PATCH:"bg-violet-500/10 text-violet-600 ring-violet-500/20"},i5=[{icon:Hg,label:"--- separator",example:`Story one
|
|
780
|
+
---
|
|
781
|
+
Story two`},{icon:hN,label:"Numbered",example:`1. Story one
|
|
782
|
+
2. Story two`},{icon:tN,label:"JSON",example:'[{"story":"…","suiteName":"Auth"}]'},{icon:mn,label:"CSV Upload",example:`story,suiteName
|
|
783
|
+
"Story","Auth"`}];function l5(){const[e,t]=m.useState("single"),s=En(),[r,a]=m.useState(""),[i,l]=m.useState(""),[,o]=m.useState(!1),[c,u]=m.useState(""),[x,f]=m.useState(null),[g,v]=m.useState(!0),[y,j]=m.useState(""),[w,h]=m.useState(3),[d,p]=m.useState([]),[b,N]=m.useState(null),[C,R]=m.useState(null),[P,_]=m.useState(null),[D,G]=m.useState(""),[J,ne]=m.useState([]),z=m.useRef(null);m.useEffect(()=>{const T=n5(y),X=J.map(be=>({story:[be.summary,be.description,be.acceptanceCriteria].filter(Boolean).join(`
|
|
784
|
+
`),suiteName:be.summary,jiraUrl:be.issueKey}));p([...X,...T])},[y,J]);const[I,ee]=m.useState(""),[ae,E]=m.useState(""),[K,M]=m.useState(""),[W,L]=m.useState(null),[te,B]=m.useState(""),de=Y({mutationFn:T=>$r.fetchJira(T),onSuccess:T=>{f(T),v(!0),O.success(`Fetched ${T.issueKey}: ${T.summary}`)},onError:T=>{f(null),O.error(T.message)}}),xe=Y({mutationFn:T=>$r.fetchJira(T),onSuccess:T=>{if(J.some(X=>X.issueKey===T.issueKey)){O.error(`${T.issueKey} already added`);return}ne(X=>[...X,T]),G(""),O.success(`Added ${T.issueKey}`)},onError:T=>{O.error(T.message)}}),ue=Y({mutationFn:()=>(dn.start("single",i||"Test Suite"),$r.generate(r,i||void 0,c||void 0)),onSuccess:T=>{o(!0),dn.done(T.suiteId,T.suiteName)},onError:T=>{dn.error(T.message),O.error(T.message)}}),Ce=Y({mutationFn:()=>$r.generateBulk(d,w),onSuccess:T=>O.success(`Processing ${T.total} stories…`),onError:T=>O.error(T.message)}),tt=Y({mutationFn:()=>$r.swaggerPreview(I),onSuccess:T=>{L(T),E(T.title?`${T.title} API Tests`:""),O.success(`Found ${T.totalEndpoints} endpoints`)},onError:T=>{L(null),O.error(T.message)}}),en=Y({mutationFn:()=>{dn.start("swagger",ae||"API Tests");const T=K.trim()?K.split(",").map(X=>X.trim()).filter(Boolean):void 0;return $r.generateFromSwagger(I,ae||void 0,T,te)},onSuccess:T=>{dn.done(T.suiteId,T.suiteName),O.success(`Generated ${T.endpointsFound} endpoint tests`)},onError:T=>{dn.error(T.message),O.error(T.message)}});xd("story:bulk-start",T=>{const X=T;_(X.jobId),N({jobId:X.jobId,total:X.total,completed:0,failed:0,currentIndex:0,currentStory:""}),R(null)}),xd("story:bulk-progress",T=>{const X=T;X.jobId===P&&N(X)}),xd("story:bulk-done",T=>{const X=T;X.jobId===P&&(R(X),N(null),X.failed===0?O.success(`All ${X.completed} suites generated!`):O.success(`${X.completed} done, ${X.failed} failed`))});const mt=T=>{var Tn;const X=(Tn=T.target.files)==null?void 0:Tn[0];if(!X)return;const be=new FileReader;be.onload=Nt=>{var nn;const Rn=(nn=Nt.target)==null?void 0:nn.result;if(X.name.endsWith(".csv")){const H=Rn.split(`
|
|
785
|
+
`).slice(1).map(oe=>oe.split(",").map(fe=>fe.replace(/^"|"$/g,"").trim())).filter(oe=>{var fe;return((fe=oe[0])==null?void 0:fe.length)>=10}).map(oe=>({story:oe[0],suiteName:oe[1]||void 0}));j(H.map((oe,fe)=>`${fe+1}. ${oe.story}`).join(`
|
|
786
|
+
`))}else j(Rn)},be.readAsText(X),T.target.value=""},Ut=b?Math.round((b.completed+b.failed)/b.total*100):0,q=Ce.isPending||b!==null&&C===null,ht=ff(c),Mn=pf(c),at=ff(D),tn=pf(D),Ws=T=>ne(X=>X.filter(be=>be.issueKey!==T)),Vs=r.trim().length>=10||!!x&&!!c.trim();return n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-br from-violet-500 via-indigo-500 to-blue-600 flex items-center justify-center shadow-sm shadow-indigo-500/20",children:n.jsx(Gt,{size:16,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-base font-bold text-content tracking-tight",children:"Smart Tests"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"AI-powered test generation from stories, Jira, or API specs"})]})]})}),n.jsxs("div",{className:"grid grid-cols-3 gap-2 p-1 rounded-xl bg-surface border border-border shadow-xs",children:[n.jsx(vd,{icon:Fa,title:"Single Story",desc:"Describe one user journey — AI creates the full test suite",active:e==="single",gradient:"bg-gradient-to-br from-violet-500 to-indigo-600",onClick:()=>t("single")}),n.jsx(vd,{icon:fl,title:"Bulk Import",desc:"Generate multiple suites at once from text, JSON, CSV, or Jira",tag:"batch",active:e==="bulk",gradient:"bg-gradient-to-br from-amber-500 to-orange-600",onClick:()=>t("bulk")}),n.jsx(vd,{icon:Tg,title:"API Import",desc:"Import OpenAPI / Swagger specs to auto-generate API tests",tag:"api",active:e==="swagger",gradient:"bg-gradient-to-br from-emerald-500 to-teal-600",onClick:()=>t("swagger")})]}),e==="single"&&n.jsxs("div",{className:"grid grid-cols-5 gap-3 animate-fade-in",children:[n.jsxs("div",{className:"col-span-3 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-indigo-100 flex items-center justify-center",children:n.jsx(nf,{size:14,className:"text-indigo-600"})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Jira Integration"}),n.jsx("span",{className:"ml-2 text-[10px] text-content-tertiary font-medium",children:"Optional"})]})]}),x&&!g&&n.jsxs("button",{type:"button",onClick:()=>v(!0),className:"flex items-center gap-1 text-[10px] text-indigo-600 hover:text-indigo-700 font-semibold",children:[n.jsx(Og,{size:10})," Show ",x.issueKey]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{className:S("w-full rounded-xl px-3 py-2 text-xs transition-all border focus:outline-none focus:ring-2 placeholder-content-tertiary",c.trim()?ht?"border-indigo-300 focus:ring-indigo-300 bg-indigo-50/20":"border-red-300 focus:ring-red-300 bg-red-50/20":"border-border bg-surface-inset/50 focus:ring-accent/30 focus:border-accent/50"),placeholder:"PROJ-123 or paste full Jira URL",value:c,onChange:T=>{u(T.target.value),T.target.value.trim()||f(null)}}),Mn&&ht&&n.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-[10px] font-mono font-bold text-indigo-600 bg-indigo-100 px-2 py-0.5 rounded-md",children:Mn})]}),n.jsxs(se,{variant:"secondary",size:"sm",onClick:()=>de.mutate(c),loading:de.isPending,disabled:!c.trim()||!ht||de.isPending,children:[n.jsx(nd,{size:14})," Fetch"]})]}),c.trim()&&!ht&&n.jsxs("p",{className:"text-[10px] text-red-500 flex items-center gap-1",children:[n.jsx(Yt,{size:10})," Invalid format — use PROJ-123 or full Jira URL"]}),x&&g&&n.jsx(s5,{content:x,onClose:()=>v(!1)})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-violet-100 flex items-center justify-center",children:n.jsx(mn,{size:14,className:"text-violet-600"})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[11px] font-bold text-content",children:"User Story"}),x?n.jsx("span",{className:"ml-2 text-[10px] text-content-tertiary font-medium",children:"Optional — Jira content used"}):n.jsx("span",{className:"ml-1 text-red-400 text-xs",children:"*"})]})]}),n.jsx("textarea",{className:"w-full rounded-xl border border-border bg-surface-inset/50 p-4 text-sm text-content leading-relaxed focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50 resize-vertical min-h-[80px] placeholder-content-tertiary transition-all",rows:x?3:5,placeholder:x?"Add extra context or leave blank — Jira content is enough":`Describe the user journey you want to automate…
|
|
787
|
+
|
|
788
|
+
Example: User logs in with valid credentials, navigates to the dashboard, and verifies that the welcome message is displayed.`,value:r,onChange:T=>{a(T.target.value),o(!1)}})]}),n.jsx("div",{className:"rounded-xl border border-border bg-surface p-3.5",children:n.jsxs("div",{className:"flex items-end gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("label",{className:"text-[11px] font-bold text-content mb-2 block",children:["Suite Name ",n.jsx("span",{className:"text-content-tertiary font-normal text-[10px]",children:"(AI auto-suggests if blank)"})]}),n.jsx("input",{className:"w-full rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50 placeholder-content-tertiary transition-all",placeholder:x?`e.g. ${x.summary}`:"e.g. Authentication Tests",value:i,onChange:T=>l(T.target.value)})]}),n.jsxs(se,{onClick:()=>ue.mutate(),loading:ue.isPending,disabled:!Vs,children:[n.jsx(Gt,{size:14})," Generate Suite"]})]})})]}),n.jsxs("div",{className:"col-span-2 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{size:13,className:"text-amber-500"}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Quick Start"})]}),n.jsx("div",{className:"space-y-2",children:e5.map((T,X)=>n.jsxs("button",{type:"button",onClick:()=>{a(T.story),o(!1)},className:"w-full text-left px-3 py-2 rounded-lg border border-border bg-surface-inset/30 hover:bg-accent/[0.04] hover:border-accent/30 transition-all group",children:[n.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[n.jsx("span",{className:"text-[10px] font-bold text-content group-hover:text-accent transition-colors",children:T.title}),n.jsx(Z2,{size:11,className:"text-content-tertiary group-hover:text-accent transition-colors"})]}),n.jsx("p",{className:"text-[10px] text-content-tertiary leading-snug line-clamp-2",children:T.story})]},X))})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ef,{size:13,className:"text-accent"}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Pro Tips"})]}),n.jsx("div",{className:"space-y-2",children:["Paste a Jira link to auto-fetch story details","Write in plain English — describe the full journey","Include expected outcomes for better assertions","Combine Jira + extra context for best results"].map((T,X)=>n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(ar,{size:9,className:"text-accent flex-shrink-0 mt-1"}),n.jsx("span",{className:"text-[11px] text-content-tertiary leading-relaxed",children:T})]},X))})]})]})]}),e==="bulk"&&n.jsxs("div",{className:"space-y-3 animate-fade-in",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-indigo-100 flex items-center justify-center",children:n.jsx(nf,{size:14,className:"text-indigo-600"})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Fetch from Jira"}),n.jsx("span",{className:"ml-2 text-[10px] text-content-tertiary",children:"Paste URL → Fetch → repeat"})]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{className:S("w-full rounded-xl px-3.5 py-2 text-sm border transition-all focus:outline-none focus:ring-2 placeholder-content-tertiary",D.trim()?at?"border-indigo-300 focus:ring-indigo-300 bg-indigo-50/20":"border-red-300 focus:ring-red-300 bg-red-50/20":"border-border bg-surface-inset/50 focus:ring-accent/30"),placeholder:"PROJ-123 or Jira URL",value:D,onChange:T=>G(T.target.value),onKeyDown:T=>{T.key==="Enter"&&D.trim()&&at&&!xe.isPending&&!q&&xe.mutate(D)},disabled:q}),tn&&at&&n.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-[10px] font-mono font-bold text-indigo-600 bg-indigo-100 px-2 py-0.5 rounded-md",children:tn})]}),n.jsxs(se,{variant:"secondary",size:"sm",onClick:()=>xe.mutate(D),loading:xe.isPending,disabled:!D.trim()||!at||xe.isPending||q,children:[n.jsx(nd,{size:14})," Fetch"]})]}),D.trim()&&!at&&n.jsxs("p",{className:"text-[10px] text-red-500 flex items-center gap-1",children:[n.jsx(Yt,{size:10})," Invalid Jira URL format"]}),J.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1.5 pt-1",children:J.map(T=>n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-indigo-50 border border-indigo-200/60 text-xs text-indigo-700 transition-all hover:shadow-sm",title:T.summary,children:[n.jsx(qa,{size:9,className:"text-indigo-400"}),n.jsx("span",{className:"font-mono font-bold text-[10px]",children:T.issueKey}),n.jsx("span",{className:"max-w-[120px] truncate text-[10px]",children:T.summary}),!q&&n.jsx("button",{type:"button",onClick:()=>Ws(T.issueKey),className:"text-indigo-300 hover:text-red-500 transition-colors",children:n.jsx(Se,{size:10})})]},T.issueKey))})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-amber-100 flex items-center justify-center",children:n.jsx(mn,{size:14,className:"text-amber-600"})}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Supported Formats"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-2",children:i5.map(({icon:T,label:X,example:be})=>n.jsxs("div",{className:"p-2.5 rounded-xl bg-surface-inset/50 border border-border",children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[n.jsx(T,{size:10,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[10px] font-bold text-content-secondary",children:X})]}),n.jsx("pre",{className:"text-[9px] text-content-tertiary font-mono leading-relaxed whitespace-pre-wrap line-clamp-2",children:be})]},X))})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 bg-surface-inset/30 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("span",{className:"text-xs text-content-secondary",children:d.length>0?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-bold text-accent tabular-nums",children:d.length})," stories",J.length>0&&n.jsxs("span",{className:"text-content-tertiary ml-1",children:["(",J.length," Jira",d.length-J.length>0?` + ${d.length-J.length} manual`:"",")"]})]}):n.jsx("span",{className:"text-content-tertiary",children:"No stories yet"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Parallel"}),n.jsx("select",{className:"text-xs border border-border rounded-lg px-2 py-1 bg-surface focus:outline-none focus:ring-2 focus:ring-accent/30",value:w,onChange:T=>h(Number(T.target.value)),disabled:q,children:[1,2,3,4,5].map(T=>n.jsxs("option",{value:T,children:[T,"×"]},T))})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{ref:z,type:"file",accept:".txt,.csv,.json",className:"hidden",onChange:mt}),n.jsxs(se,{variant:"secondary",size:"sm",onClick:()=>{var T;return(T=z.current)==null?void 0:T.click()},disabled:q,children:[n.jsx(cm,{size:12})," Upload"]}),n.jsxs(se,{size:"sm",onClick:()=>{R(null),Ce.mutate()},loading:Ce.isPending,disabled:d.length===0||q,children:[n.jsx(Be,{size:13})," Generate ",d.length>0?d.length:""," Suites"]})]})]}),n.jsxs("div",{className:"min-h-[220px]",children:[!q&&!C&&n.jsx("textarea",{className:"w-full h-[220px] p-4 text-xs text-content leading-relaxed focus:outline-none resize-none font-mono placeholder-content-tertiary bg-transparent",placeholder:`Paste your stories here…
|
|
789
|
+
|
|
790
|
+
Use --- separators, numbered lists, or JSON array format.
|
|
791
|
+
Or fetch from Jira above.`,value:y,onChange:T=>j(T.target.value),disabled:q}),q&&b&&n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-4",children:[n.jsxs("div",{className:"relative",children:[n.jsx(r5,{pct:Ut,size:72,stroke:5}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsxs("span",{className:"text-sm font-bold text-content tabular-nums",children:[Ut,"%"]})})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:"text-sm font-semibold text-content",children:"Generating suites…"}),n.jsxs("p",{className:"text-xs text-content-tertiary mt-1",children:[b.completed+b.failed," of ",b.total," complete"]})]}),n.jsx("div",{className:"flex gap-5",children:[["Total",b.total,"text-content"],["Done",b.completed,"text-emerald-600"],["Failed",b.failed,"text-red-500"]].map(([T,X,be])=>n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:`text-lg font-bold tabular-nums ${be}`,children:X}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-semibold uppercase tracking-wider",children:T})]},String(T)))}),b.currentStory&&n.jsxs("div",{className:"max-w-md mx-auto flex items-start gap-2 p-3 bg-accent/5 rounded-xl border border-accent/10",children:[n.jsx(Be,{size:12,className:"text-accent flex-shrink-0 mt-0.5"}),n.jsxs("p",{className:"text-[11px] text-content-secondary line-clamp-2",children:[n.jsxs("span",{className:"font-semibold",children:["#",b.currentIndex+1,":"]})," ",b.currentStory]})]})]}),C&&n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-4",children:[n.jsx("div",{className:S("w-10 h-10 rounded-xl flex items-center justify-center",C.failed===0?"bg-emerald-100":"bg-amber-100"),children:C.failed===0?n.jsx(Ue,{size:20,className:"text-emerald-600"}):n.jsx(Yt,{size:20,className:"text-amber-600"})}),n.jsxs("div",{className:"text-center",children:[n.jsxs("p",{className:"text-sm font-bold text-content",children:[C.completed," suites generated",C.failed>0?`, ${C.failed} failed`:" successfully"]}),n.jsx("p",{className:"text-xs text-content-tertiary mt-1",children:"Ready in Test Editor"})]}),n.jsx("div",{className:"flex gap-5",children:[["Total",C.total,"text-content"],["Generated",C.completed,"text-emerald-600"],["Failed",C.failed,"text-red-500"]].map(([T,X,be])=>n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:`text-lg font-bold tabular-nums ${be}`,children:X}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-semibold uppercase tracking-wider",children:T})]},String(T)))}),C.failedItems.length>0&&n.jsx("div",{className:"w-full max-w-lg space-y-1.5 max-h-[140px] overflow-y-auto px-4",children:C.failedItems.map(T=>n.jsxs("div",{className:"flex items-start gap-2 p-2.5 bg-red-50/60 rounded-xl border border-red-200/40",children:[n.jsx(ut,{size:12,className:"text-red-500 flex-shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] text-red-700 font-medium line-clamp-1",children:T.story}),n.jsx("p",{className:"text-[10px] text-red-400 mt-0.5",children:T.error})]})]},T.index))}),n.jsxs("div",{className:"flex gap-2 pt-2",children:[n.jsxs(se,{size:"sm",onClick:()=>s("/tests"),children:["Open Test Editor ",n.jsx(Zt,{size:13})]}),n.jsxs(se,{variant:"secondary",size:"sm",onClick:()=>{R(null),j(""),ne([])},children:[n.jsx(Se,{size:13})," Start Over"]})]})]})]})]})]}),e==="swagger"&&n.jsxs("div",{className:"space-y-3 animate-fade-in",children:[n.jsx("div",{className:"flex items-center gap-2.5 px-1",children:[{n:1,label:"Fetch Spec",done:!!W},{n:2,label:"Configure",done:!1},{n:3,label:"Generate",done:!1}].map((T,X,be)=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:S("w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold transition-all",T.done?"bg-emerald-500 text-white":"bg-surface-inset text-content-tertiary border border-border"),children:T.done?n.jsx(Ue,{size:12}):T.n}),n.jsx("span",{className:S("text-xs font-semibold",T.done?"text-emerald-600":"text-content-tertiary"),children:T.label})]}),X<be.length-1&&n.jsx("div",{className:S("w-12 h-px",T.done?"bg-emerald-300":"bg-border")})]},T.n))}),n.jsxs("div",{className:"grid grid-cols-5 gap-3",children:[n.jsxs("div",{className:"col-span-3 rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-emerald-100 flex items-center justify-center",children:n.jsx(Er,{size:14,className:"text-emerald-600"})}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"API Specification URL"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{className:"flex-1 rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50 placeholder-content-tertiary transition-all",placeholder:"https://api.example.com/v2/api-docs",value:I,onChange:T=>{ee(T.target.value),L(null)}}),n.jsxs(se,{variant:"secondary",size:"sm",onClick:()=>tt.mutate(),loading:tt.isPending,disabled:!I.trim()||tt.isPending,children:[n.jsx(nd,{size:14})," Fetch & Parse"]})]}),tt.isError&&n.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-xl bg-red-50/60 border border-red-200/40 text-xs text-red-600",children:[n.jsx(ut,{size:13,className:"flex-shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"font-medium",children:tt.error.message}),n.jsx("p",{className:"text-[10px] text-red-400 mt-0.5",children:"Tip: Use the direct spec URL, not a portal page. Check DevTools → Network."})]})]})]}),n.jsxs("div",{className:"col-span-2 rounded-xl border border-border bg-surface p-3.5 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-5 h-5 rounded bg-violet-100 flex items-center justify-center",children:n.jsx(mn,{size:14,className:"text-violet-600"})}),n.jsx("span",{className:"text-[11px] font-bold text-content",children:"Extra Requirements"}),n.jsx("span",{className:"text-[10px] text-content-tertiary",children:"Optional"})]}),n.jsx("textarea",{className:"w-full rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 resize-none placeholder-content-tertiary leading-relaxed",rows:3,placeholder:"e.g. Include Bearer auth, test 400/401/404 errors, validate response schemas…",value:te,onChange:T=>B(T.target.value)})]})]}),W&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"rounded-xl border border-emerald-200/50 bg-gradient-to-r from-emerald-50/40 via-surface to-teal-50/20 p-3.5 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-6 h-6 rounded-lg bg-emerald-500 flex items-center justify-center",children:n.jsx(Ue,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-bold text-content",children:W.title}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5",children:W.baseUrl})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"text-center px-3",children:[n.jsx("p",{className:"text-base font-bold text-emerald-600 tabular-nums",children:W.totalEndpoints}),n.jsx("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest",children:"Endpoints"})]}),n.jsx("div",{className:"w-px h-6 bg-border"}),n.jsxs("div",{className:"text-center px-2",children:[n.jsx("p",{className:"text-base font-bold text-teal-600 tabular-nums",children:W.tags.length}),n.jsx("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest",children:"Tags"})]})]})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx(Vg,{size:11,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest",children:"Filter by tag"}),K.trim()&&n.jsx("button",{type:"button",onClick:()=>M(""),className:"text-[9px] text-accent hover:text-accent-dark font-semibold ml-1",children:"Clear all"})]}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:W.tags.map(T=>{const X=K.split(",").map(Nt=>Nt.trim()).filter(Boolean),be=X.includes(T),Tn=W.endpoints.filter(Nt=>Nt.tag===T).length;return n.jsxs("button",{type:"button",onClick:()=>{M(be?X.filter(Nt=>Nt!==T).join(", "):[...X,T].join(", "))},className:S("inline-flex items-center gap-1.5 text-[10px] px-2.5 py-1.5 rounded-lg border font-semibold transition-all",be?"bg-accent text-white border-accent shadow-sm shadow-accent/20":"bg-surface text-content-secondary border-border hover:border-accent/40"),children:[T,n.jsx("span",{className:S("text-[9px] px-1 py-px rounded font-bold",be?"bg-white/20 text-white":"bg-surface-inset text-content-tertiary"),children:Tn})]},T)})})]})]}),n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsx("div",{className:"max-h-[220px] overflow-y-auto",children:n.jsxs("table",{className:"w-full text-xs",children:[n.jsx("thead",{className:"bg-surface-inset/50 sticky top-0 border-b border-border",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest w-20",children:"Method"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Path"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Summary"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest w-16",children:"Tag"})]})}),n.jsx("tbody",{children:W.endpoints.filter(T=>K.trim()?K.split(",").map(X=>X.trim()).filter(Boolean).includes(T.tag):!0).map((T,X)=>n.jsxs("tr",{className:"border-t border-border-muted hover:bg-surface-inset/30 transition-colors",children:[n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:S("font-mono font-bold text-[10px] px-2 py-0.5 rounded-md ring-1",a5[T.method]||"bg-surface-inset text-content-secondary ring-border"),children:T.method})}),n.jsx("td",{className:"px-4 py-2.5 font-mono text-content-secondary text-[11px]",children:T.path}),n.jsx("td",{className:"px-4 py-2.5 text-content-tertiary truncate max-w-[240px]",children:T.summary}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-[9px] text-content-tertiary bg-surface-inset px-1.5 py-0.5 rounded",children:T.tag})})]},X))})]})})}),n.jsx("div",{className:"rounded-xl border border-border bg-surface p-3.5",children:n.jsxs("div",{className:"flex items-end gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-bold text-content mb-2 block",children:"Suite Name"}),n.jsx("input",{className:"w-full rounded-xl border border-border bg-surface-inset/50 px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-accent/30 placeholder-content-tertiary",placeholder:"e.g. Payment API Tests",value:ae,onChange:T=>E(T.target.value)})]}),n.jsxs(se,{onClick:()=>en.mutate(),loading:en.isPending,disabled:en.isPending,children:[n.jsx(Gt,{size:14})," Generate Suite"]})]})})]}),en.isError&&n.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-red-50/60 border border-red-200/40 text-xs text-red-600",children:[n.jsx(ut,{size:14,className:"flex-shrink-0 mt-0.5"}),n.jsx("span",{className:"font-medium",children:en.error.message})]}),!W&&n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(gf,{title:"Supported Formats",icon:ef,defaultOpen:!0,children:n.jsx("div",{className:"space-y-1.5",children:["OpenAPI 3.x (JSON / YAML)","Swagger 2.0 (JSON / YAML)","Direct URL, Swagger UI, or /api-docs"].map(T=>n.jsxs("div",{className:"flex items-center gap-2 text-xs text-content-secondary",children:[n.jsx(Ue,{size:10,className:"text-emerald-500 flex-shrink-0"}),T]},T))})}),n.jsx(gf,{title:"Pro Tips",icon:Be,defaultOpen:!0,children:n.jsx("div",{className:"space-y-1.5",children:["Use the raw spec URL, not a portal page","Filter by tags to import only relevant endpoints","Generated steps use page.request API","Chained tests use context.setVariable"].map(T=>n.jsxs("div",{className:"flex items-start gap-2 text-xs text-content-secondary",children:[n.jsx(ar,{size:9,className:"text-accent flex-shrink-0 mt-0.5"}),T]},T))})})]})]})]})})})}function Wo({checked:e,onChange:t,label:s,disabled:r}){return n.jsxs("label",{className:S("inline-flex items-center gap-2.5 cursor-pointer select-none",r&&"opacity-40 cursor-not-allowed"),children:[n.jsx("button",{type:"button",role:"switch","aria-checked":e,disabled:r,onClick:()=>t(!e),className:S("relative inline-flex h-[22px] w-10 items-center rounded-full transition-all duration-200","focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus:outline-none",e?"bg-gradient-to-r from-accent to-accent-dark":"bg-slate-200"),children:n.jsx("span",{className:S("inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform duration-200",e?"translate-x-[21px]":"translate-x-[3px]")})}),s&&n.jsx("span",{className:"text-sm text-content-secondary",children:s})]})}const o5=[{id:"github",label:"GitHub Actions"},{id:"gitlab",label:"GitLab CI"},{id:"jenkins",label:"Jenkins"}];function c5({open:e,onClose:t,runConfig:s}){var x,f,g,v;const[r,a]=m.useState("github"),[i,l]=m.useState(!1),o=Y({mutationFn:y=>LN.generate({platform:y,browsers:(s==null?void 0:s.browsers)??["chromium"],parallel:(s==null?void 0:s.parallel)??2,device:(s==null?void 0:s.device)||void 0}),onError:y=>O.error(y.message)});m.useEffect(()=>{e&&o.mutate(r)},[e,r]);const c=()=>{var y;(y=o.data)!=null&&y.yaml&&navigator.clipboard.writeText(o.data.yaml).then(()=>{l(!0),O.success("Copied to clipboard"),setTimeout(()=>l(!1),2e3)})},u=()=>{var h;if(!((h=o.data)!=null&&h.yaml))return;const y=new Blob([o.data.yaml],{type:"text/plain"}),j=URL.createObjectURL(y),w=document.createElement("a");w.href=j,w.download=o.data.filename??`${r}-ci.yml`,document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(j)};return e?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-2xl mx-4 overflow-hidden flex flex-col max-h-[85vh]",onClick:y=>y.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-sm font-bold text-content",children:"CI Config Generator"}),n.jsx("p",{className:"text-[11px] text-content-tertiary mt-0.5",children:"Generate configuration for your CI/CD pipeline"})]}),n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset hover:text-content transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"flex border-b border-border px-5 flex-shrink-0",children:o5.map(y=>n.jsx("button",{type:"button",onClick:()=>a(y.id),className:S("px-4 py-2.5 text-xs font-semibold border-b-2 transition-colors -mb-px",r===y.id?"border-accent text-accent":"border-transparent text-content-secondary hover:text-content"),children:y.label},y.id))}),n.jsx("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:o.isPending?n.jsx("div",{className:"h-48 flex items-center justify-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"Generating..."})}):(x=o.data)!=null&&x.yaml?n.jsx("pre",{className:"bg-[#1e1e2e] text-[#cdd6f4] text-xs font-mono p-4 rounded-xl overflow-auto whitespace-pre leading-relaxed",children:o.data.yaml}):n.jsx("div",{className:"h-48 flex items-center justify-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"No config generated yet"})})}),n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border bg-surface-inset/30 flex-shrink-0",children:[((f=o.data)==null?void 0:f.filename)&&n.jsx("span",{className:"text-[11px] text-content-tertiary font-mono",children:o.data.filename}),n.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[n.jsxs("button",{type:"button",onClick:c,disabled:!((g=o.data)!=null&&g.yaml),className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors","border-border text-content-secondary hover:bg-surface-inset disabled:opacity-40"),children:[i?n.jsx(He,{size:12,className:"text-emerald-500"}):n.jsx(am,{size:12}),i?"Copied!":"Copy"]}),n.jsxs("button",{type:"button",onClick:u,disabled:!((v=o.data)!=null&&v.yaml),className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors","bg-accent text-white hover:brightness-110 disabled:opacity-40"),children:[n.jsx(pc,{size:12}),"Download"]})]})]})]})}):null}const yf=500;let Vo=new Map,nl=new Map,yr=[],fm=0;const Ju=new Set;function Xu(){fm++,Ju.forEach(e=>e())}let Qo={screenshot:null,screenshots:new Map,consoleLogs:[],consoleLogsByCase:new Map,activeCaseIds:[],_v:-1};function d5(){const e=yr[yr.length-1],t=e?Vo.get(e)??null:null,s=Array.from(nl.values()).flat().sort((r,a)=>r.timestamp-a.timestamp);return Qo={screenshot:t,screenshots:new Map(Vo),consoleLogs:s,consoleLogsByCase:new Map(nl),activeCaseIds:[...yr],_v:fm},Qo}const jd={subscribe(e){return Ju.add(e),()=>{Ju.delete(e)}},getSnapshot(){return Qo._v!==fm?d5():Qo},reset(){Vo=new Map,nl=new Map,yr=[],Xu()}};function Py(){const e=m.useSyncExternalStore(jd.subscribe,jd.getSnapshot),t=m.useCallback(a=>{const i=a;Vo.set(i.caseId,i.image),yr.includes(i.caseId)||(yr=[...yr,i.caseId]),Xu()},[]),s=m.useCallback(a=>{const i=a,o=[...nl.get(i.caseId)??[],...i.logs];o.length>yf&&o.splice(0,o.length-yf),nl.set(i.caseId,o),Xu()},[]);Wa({"run:screenshot":t,"run:console":s});const r=m.useCallback(()=>{jd.reset()},[]);return{screenshot:e.screenshot,screenshots:e.screenshots,consoleLogs:e.consoleLogs,consoleLogsByCase:e.consoleLogsByCase,activeCaseIds:e.activeCaseIds,reset:r}}let cs=[],Zu=0;const ex=new Set;function tx(){Zu++,ex.forEach(e=>e())}let Nd={steps:[],_v:-1};const wd={subscribe(e){return ex.add(e),()=>{ex.delete(e)}},getSnapshot(){return Nd._v!==Zu&&(Nd={steps:cs,_v:Zu}),Nd},reset(){cs=[],tx()}};function zy(){const e=m.useSyncExternalStore(wd.subscribe,wd.getSnapshot),t=m.useCallback(a=>{const i=a;i.status!=="running"&&(cs=[...cs,{...i,timestamp:Date.now()}],cs.length>200&&(cs=cs.slice(-200)),tx())},[]),s=m.useCallback(()=>{cs=[],tx()},[]);Wa({"run:step":t,"run:start":s});const r=m.useCallback(()=>{wd.reset()},[]);return{stepLogs:e.steps,reset:r}}function My(e){const[t,s]=m.useState(0),r=m.useRef(null);m.useEffect(()=>(e?(s(0),r.current=setInterval(()=>s(l=>l+1),1e3)):r.current&&(clearInterval(r.current),r.current=null),()=>{r.current&&clearInterval(r.current)}),[e]);const a=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${a}:${i}`}function Sc({browser:e,size:t=16,className:s=""}){const r=(e??"").toLowerCase();return r.includes("chromium")||r.includes("chrome")?n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",fill:"#4285F4"}),n.jsx("path",{d:"M24 14.4h16.97A22 22 0 0 0 24 2 22 22 0 0 0 5.56 33.6L14.08 19A11.6 11.6 0 0 1 24 14.4z",fill:"#EA4335"}),n.jsx("path",{d:"M14.08 19L5.56 33.6A22 22 0 0 0 24 46a22 22 0 0 0 8.52-1.7L24 30.4A11.6 11.6 0 0 1 14.08 19z",fill:"#34A853"}),n.jsx("path",{d:"M24 30.4l8.52 13.9A22 22 0 0 0 40.97 14.4H24a11.6 11.6 0 0 1 8.52 16z",fill:"#FBBC05"}),n.jsx("circle",{cx:"24",cy:"24",r:"8",fill:"white"}),n.jsx("circle",{cx:"24",cy:"24",r:"5.5",fill:"#4285F4"})]}):r.includes("firefox")?n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",fill:"#FF9500"}),n.jsx("path",{d:"M38 16c-1-3-3.5-5.5-5-6.5.8 2 1 3.5.5 5-1-3-3-5-5.5-7.5-.5-.5-1-1-1-1.5 0-.2 0-.3-.2-.3-.1 0-.2.1-.2.2-3 5-1 9 .5 12-2-1-4.5-1-6.5 0-1-2-1-4.5 0-6.5-3 2-5 5-6 8-.2-.5-.3-1.5-.3-2-1.5 1.5-2.5 3.5-3 5.5A18 18 0 0 0 8 30c0 9 7.5 16 16 16s16-7 16-16c0-5-1-10-2-14z",fill:"#FF4500"}),n.jsx("path",{d:"M30 34c-1.5 1.5-4 2.5-6 2.5s-5-1-6.5-3A8 8 0 0 1 16 28c0-2.5 1.5-5 4-6 3-1.5 6-.5 8 1 2 1.5 3 4 3 6.5 0 1.5-.5 3-1 4.5z",fill:"#FFDC00"})]}):r.includes("webkit")||r.includes("safari")?n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",fill:"url(#safari-grad)"}),n.jsx("circle",{cx:"24",cy:"24",r:"18",fill:"white",fillOpacity:"0.15"}),n.jsx("circle",{cx:"24",cy:"24",r:"17",stroke:"white",strokeOpacity:"0.3",strokeWidth:"0.5",fill:"none"}),n.jsx("polygon",{points:"24,8 26,24 24,40 22,24",fill:"white",fillOpacity:"0.9"}),n.jsx("polygon",{points:"24,8 26,24 24,24",fill:"#FF3B30"}),n.jsx("polygon",{points:"24,40 22,24 24,24",fill:"#FF3B30"}),n.jsx("circle",{cx:"24",cy:"24",r:"2.5",fill:"white"}),n.jsx("defs",{children:n.jsxs("linearGradient",{id:"safari-grad",x1:"0",y1:"0",x2:"48",y2:"48",children:[n.jsx("stop",{offset:"0%",stopColor:"#00D4FF"}),n.jsx("stop",{offset:"100%",stopColor:"#0066FF"})]})})]}):n.jsxs("svg",{width:t,height:t,viewBox:"0 0 48 48",className:s,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("circle",{cx:"24",cy:"24",r:"22",stroke:"#94a3b8",strokeWidth:"2",fill:"none"}),n.jsx("ellipse",{cx:"24",cy:"24",rx:"10",ry:"22",stroke:"#94a3b8",strokeWidth:"1.5",fill:"none"}),n.jsx("line",{x1:"2",y1:"24",x2:"46",y2:"24",stroke:"#94a3b8",strokeWidth:"1.5"}),n.jsx("line",{x1:"24",y1:"2",x2:"24",y2:"46",stroke:"#94a3b8",strokeWidth:"1.5"})]})}function pm(e){const t=(e??"").toLowerCase();return t.includes("chromium")||t.includes("chrome")?"Chromium":t.includes("firefox")?"Firefox":t.includes("webkit")||t.includes("safari")?"WebKit":e??"Browser"}const Ty=[{id:"desktop-1920",name:"Full HD (1920×1080)",category:"desktop",viewport:{width:1920,height:1080}},{id:"desktop-1440",name:"QHD (1440×900)",category:"desktop",viewport:{width:1440,height:900}},{id:"desktop-1366",name:"Laptop (1366×768)",category:"desktop",viewport:{width:1366,height:768}},{id:"desktop-1280",name:"Default (1280×720)",category:"desktop",viewport:{width:1280,height:720}},{id:"desktop-768",name:"Small Laptop (1024×768)",category:"desktop",viewport:{width:1024,height:768}}],Ry=[{id:"iphone-15-pro",name:"iPhone 15 Pro",category:"mobile",viewport:{width:393,height:852},playwrightDevice:"iPhone 15 Pro",recommendedBrowser:"webkit",dpr:3},{id:"iphone-15",name:"iPhone 15",category:"mobile",viewport:{width:390,height:844},playwrightDevice:"iPhone 15",recommendedBrowser:"webkit",dpr:3},{id:"iphone-14",name:"iPhone 14",category:"mobile",viewport:{width:390,height:844},playwrightDevice:"iPhone 14",recommendedBrowser:"webkit",dpr:3},{id:"iphone-se",name:"iPhone SE",category:"mobile",viewport:{width:375,height:667},playwrightDevice:"iPhone SE",recommendedBrowser:"webkit",dpr:2},{id:"pixel-7",name:"Pixel 7",category:"mobile",viewport:{width:412,height:915},playwrightDevice:"Pixel 7",recommendedBrowser:"chromium",dpr:2.625},{id:"pixel-5",name:"Pixel 5",category:"mobile",viewport:{width:393,height:851},playwrightDevice:"Pixel 5",recommendedBrowser:"chromium",dpr:2.75},{id:"galaxy-s9",name:"Galaxy S9+",category:"mobile",viewport:{width:320,height:658},playwrightDevice:"Galaxy S9+",recommendedBrowser:"chromium",dpr:4.5},{id:"galaxy-s8",name:"Galaxy S8",category:"mobile",viewport:{width:360,height:740},playwrightDevice:"Galaxy S8",recommendedBrowser:"chromium",dpr:3}],Oy=[{id:"ipad-pro-11",name:'iPad Pro 11"',category:"tablet",viewport:{width:834,height:1194},playwrightDevice:"iPad Pro 11",recommendedBrowser:"webkit",dpr:2},{id:"ipad-gen7",name:"iPad (gen 7)",category:"tablet",viewport:{width:810,height:1080},playwrightDevice:"iPad (gen 7)",recommendedBrowser:"webkit",dpr:2},{id:"ipad-mini",name:"iPad Mini",category:"tablet",viewport:{width:768,height:1024},playwrightDevice:"iPad Mini",recommendedBrowser:"webkit",dpr:2},{id:"galaxy-tab-s4",name:"Galaxy Tab S4",category:"tablet",viewport:{width:712,height:1138},playwrightDevice:"Galaxy Tab S4",recommendedBrowser:"chromium",dpr:2.25}],nx=[...Ty,...Ry,...Oy];function Dy(e){if(e)return nx.find(t=>t.playwrightDevice===e)??nx.find(t=>t.id===e)}const u5=[{mode:"all",label:"All Tests",desc:"Every suite & case",icon:wN},{mode:"suite",label:"By Suite",desc:"Specific test suite",icon:mn},{mode:"tag",label:"By Tag",desc:"Match by tag",icon:Vg},{mode:"test",label:"Single Test",desc:"One test by name",icon:mn}];function x5(e=60){const[t,s]=m.useState(e),r=m.useRef(!1),a=m.useCallback(i=>{i.preventDefault(),r.current=!0;const l=c=>{if(!r.current)return;const x=i.target.parentElement.getBoundingClientRect(),f=(c.clientX-x.left)/x.width*100;s(Math.max(30,Math.min(80,f)))},o=()=>{r.current=!1,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",l),window.addEventListener("mouseup",o)},[]);return{leftPct:t,onMouseDown:a}}function m5(e=55){const[t,s]=m.useState(e),r=m.useRef(!1),a=m.useCallback(i=>{i.preventDefault(),r.current=!0;const l=c=>{if(!r.current)return;const x=i.target.parentElement.getBoundingClientRect(),f=(c.clientY-x.top)/x.height*100;s(Math.max(25,Math.min(75,f)))},o=()=>{r.current=!1,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",l),window.addEventListener("mouseup",o)},[]);return{topPct:t,onMouseDown:a}}const bf={log:"text-slate-300",info:"text-blue-400",warn:"text-amber-400",error:"text-red-400",debug:"text-slate-500",default:"text-slate-400"},vf={log:"text-slate-500",info:"text-blue-500",warn:"text-amber-500",error:"text-red-500",debug:"text-slate-600"};function h5(){const[e,t]=m.useState("all"),[s,r]=m.useState(""),[a,i]=m.useState(""),[l,o]=m.useState(""),[c,u]=m.useState(["chromium"]),[x,f]=m.useState(!0),[g,v]=m.useState(!1),[y,j]=m.useState(2),[w,h]=m.useState("only-on-failure"),[d,p]=m.useState("off"),[b,N]=m.useState("off"),[C,R]=m.useState(""),[P,_]=m.useState(!1),[D,G]=m.useState(!0),[J,ne]=m.useState(!1),{data:z=[]}=ke({queryKey:["suites"],queryFn:()=>Or.list()}),I=xm(),ee=Py(),ae=kc(),E=ae.runningSuiteId!==null||ae.runningCaseIds.size>0,K=P||I.isRunning||E,M=My(K),W=K||I.completed;m.useEffect(()=>{P&&(I.isRunning||I.completed)&&_(!1)},[P,I.isRunning,I.completed]);const L=Y({mutationFn:ue=>Ji.start(ue),onError:ue=>{_(!1),O.error(ue.message)}}),te=ue=>{u(Ce=>Ce.includes(ue)?Ce.length>1?Ce.filter(tt=>tt!==ue):Ce:[...Ce,ue])},B=()=>{I.reset(),ee.reset(),yt.clear(),_(!0);const ue={browsers:c,headed:x,noHealing:g,parallel:y,screenshot:w,video:d,trace:b};e==="all"&&(ue.all=!0),e==="suite"&&s&&(ue.suite=s),e==="tag"&&a&&(ue.tag=a),e==="test"&&l&&(ue.test=l),C&&(ue.device=C),L.mutate(ue)},de=()=>{I.reset(),ee.reset(),yt.clear()},xe=()=>{O.success("Browser is running in headed mode — check your taskbar")};return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[W?n.jsx(p5,{progress:I,live:ee,elapsed:M,runActive:K,onRunAgain:de,onOpenExternal:xe}):n.jsx(f5,{mode:e,setMode:t,suiteId:s,setSuiteId:r,tag:a,setTag:i,testName:l,setTestName:o,browsers:c,toggleBrowser:te,headed:x,setHeaded:f,noHealing:g,setNoHealing:v,parallel:y,setParallel:j,screenshot:w,setScreenshot:h,video:d,setVideo:p,trace:b,setTrace:N,device:C,setDevice:R,suites:z,runActive:K,optionsOpen:D,setOptionsOpen:G,onRun:B,submitting:P,onCiConfig:()=>ne(!0)}),n.jsx(c5,{open:J,onClose:()=>ne(!1),runConfig:{browsers:c,parallel:y,device:C||void 0}})]})}function f5(e){const{mode:t,setMode:s,suiteId:r,setSuiteId:a,tag:i,setTag:l,testName:o,setTestName:c,browsers:u,toggleBrowser:x,headed:f,setHeaded:g,noHealing:v,setNoHealing:y,parallel:j,setParallel:w,screenshot:h,setScreenshot:d,video:p,setVideo:b,trace:N,setTrace:C,device:R,setDevice:P,suites:_,runActive:D,onRun:G,submitting:J,onCiConfig:ne}=e,[z,I]=m.useState("all"),ee=Dy(R||void 0),E=((ee==null?void 0:ee.category)==="mobile"||(ee==null?void 0:ee.category)==="tablet")&&!u.includes("chromium"),K=z==="all"?nx:z==="desktop"?Ty:z==="mobile"?Ry:Oy;return n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-emerald-500 to-cyan-600 flex items-center justify-center shadow-sm shadow-emerald-500/20",children:n.jsx(Rt,{size:17,className:"text-white translate-x-0.5"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Run Configuration"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Configure and launch your test run"})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(se,{size:"sm",variant:"secondary",onClick:ne,children:"CI Config"}),n.jsxs(se,{size:"sm",onClick:G,loading:J,disabled:D,children:[n.jsx(Rt,{size:10})," Start Run"]})]})]})}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-3",children:[n.jsxs("div",{className:"lg:col-span-3 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center",children:n.jsx(Be,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Run Mode"})]}),n.jsxs("div",{className:"p-3 space-y-2.5",children:[n.jsx("div",{className:"grid grid-cols-2 gap-2",children:u5.map(({mode:M,label:W,desc:L,icon:te})=>n.jsxs("button",{type:"button",onClick:()=>!D&&s(M),disabled:D,className:S("flex items-start gap-2 p-2.5 rounded-lg border text-left transition-all",D&&"opacity-50 cursor-not-allowed",t===M?"border-accent bg-accent/5 ring-1 ring-accent/20":"border-border hover:border-slate-300 hover:bg-surface-inset/30"),children:[n.jsx(te,{size:12,className:S("flex-shrink-0 mt-0.5",t===M?"text-accent":"text-content-tertiary")}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-[11px] font-semibold",t===M?"text-accent":"text-content-secondary"),children:W}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:L})]})]},M))}),t==="suite"&&!D&&n.jsxs("select",{value:r,onChange:M=>a(M.target.value),className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",children:[n.jsx("option",{value:"",children:"Select a suite..."}),_.map(M=>n.jsx("option",{value:M.name,children:M.name},M.id))]}),t==="tag"&&!D&&n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"e.g. smoke",value:i,onChange:M=>l(M.target.value)}),t==="test"&&!D&&n.jsx("input",{className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"e.g. Login with valid credentials",value:o,onChange:M=>c(M.target.value)})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center",children:n.jsx(Er,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Browsers"})]}),n.jsx("div",{className:"p-3",children:n.jsx("div",{className:"flex gap-2 flex-wrap",children:Jg.map(M=>n.jsxs("button",{type:"button",onClick:()=>!D&&x(M),disabled:D,className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg border text-[11px] capitalize transition-all font-medium",D&&"opacity-50 cursor-not-allowed",u.includes(M)?"border-accent bg-accent/10 text-accent ring-1 ring-accent/20":"border-border text-content-secondary hover:border-slate-300"),children:[n.jsx(Sc,{browser:M,size:14}),pm(M)]},M))})})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-teal-500 to-cyan-600 flex items-center justify-center",children:n.jsx(pi,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Device Emulation"}),ee&&n.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-teal-50 text-teal-600 ring-1 ring-teal-200 text-[9px] font-semibold",children:[ee.category==="mobile"?n.jsx(pi,{size:8}):ee.category==="tablet"?n.jsx(oo,{size:8}):n.jsx(la,{size:8}),ee.name]})]}),ee&&n.jsx("button",{type:"button",onClick:()=>P(""),disabled:D,className:"text-content-tertiary hover:text-content-secondary transition-colors disabled:opacity-50",title:"Clear device",children:n.jsx(Se,{size:12})})]}),n.jsxs("div",{className:"p-3 space-y-2.5",children:[E&&n.jsxs("div",{className:"flex items-start gap-2 px-2.5 py-2 rounded-lg bg-amber-50 border border-amber-200",children:[n.jsx(Yt,{size:12,className:"text-amber-500 flex-shrink-0 mt-0.5"}),n.jsxs("p",{className:"text-[10px] text-amber-700 leading-relaxed",children:["Mobile/tablet emulation works best with ",n.jsx("strong",{children:"Chromium"}),". Touch events and mobile UA may not work correctly in Firefox or WebKit."]})]}),n.jsx("div",{className:"flex gap-1 p-0.5 bg-surface-inset rounded-lg",children:[{id:"all",label:"All",icon:null},{id:"desktop",label:"Desktop",icon:la},{id:"mobile",label:"Mobile",icon:pi},{id:"tablet",label:"Tablet",icon:oo}].map(({id:M,label:W,icon:L})=>n.jsxs("button",{type:"button",onClick:()=>I(M),disabled:D,className:S("flex-1 flex items-center justify-center gap-1 py-1 rounded-md text-[9px] font-semibold transition-all disabled:opacity-50",z===M?"bg-surface shadow-sm text-content":"text-content-tertiary hover:text-content-secondary"),children:[L&&n.jsx(L,{size:9}),W]},M))}),n.jsxs("div",{className:"grid grid-cols-2 gap-1.5 max-h-44 overflow-y-auto pr-0.5",children:[(z==="all"||z==="desktop")&&n.jsxs("button",{type:"button",onClick:()=>!D&&P(""),disabled:D,className:S("flex flex-col items-start gap-0.5 p-2 rounded-lg border text-left transition-all disabled:opacity-50",R?"border-border hover:border-slate-300 hover:bg-surface-inset/30":"border-teal-400 bg-teal-50 ring-1 ring-teal-300"),children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(la,{size:10,className:R?"text-content-tertiary":"text-teal-500"}),n.jsx("span",{className:S("text-[10px] font-semibold",R?"text-content-secondary":"text-teal-600"),children:"No Emulation"})]}),n.jsx("span",{className:"text-[9px] text-content-tertiary",children:"Use config viewport"})]}),K.map(M=>{const W=R===(M.playwrightDevice??M.id),L=M.category==="mobile"?pi:M.category==="tablet"?oo:la;return n.jsxs("button",{type:"button",onClick:()=>!D&&P(M.playwrightDevice??M.id),disabled:D,className:S("flex flex-col items-start gap-0.5 p-2 rounded-lg border text-left transition-all disabled:opacity-50",W?"border-teal-400 bg-teal-50 ring-1 ring-teal-300":"border-border hover:border-slate-300 hover:bg-surface-inset/30"),children:[n.jsxs("div",{className:"flex items-center gap-1 w-full",children:[n.jsx(L,{size:10,className:W?"text-teal-500":"text-content-tertiary"}),n.jsx("span",{className:S("text-[10px] font-semibold truncate flex-1",W?"text-teal-600":"text-content-secondary"),children:M.name}),M.recommendedBrowser&&M.category!=="desktop"&&n.jsx("span",{className:S("text-[8px] px-1 py-0.5 rounded font-medium flex-shrink-0",M.recommendedBrowser==="webkit"?"bg-slate-100 text-slate-500":"bg-blue-50 text-blue-500"),children:M.recommendedBrowser==="webkit"?"Safari":"Chrome"})]}),n.jsxs("span",{className:"text-[9px] text-content-tertiary",children:[M.viewport.width,"×",M.viewport.height,M.dpr?` @${M.dpr}x`:""]})]},M.id)})]})]})]})]}),n.jsxs("div",{className:"lg:col-span-2 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-slate-500 to-slate-700 flex items-center justify-center",children:n.jsx(Aa,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Options"})]}),n.jsxs("div",{className:"p-3 space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-medium text-content-secondary",children:"Headed mode"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Show browser window"})]}),n.jsx(Wo,{checked:f,onChange:g,disabled:D})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(om,{size:10,className:"text-amber-500"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-medium text-content-secondary",children:"Disable self-healing"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Skip AI healing"})]})]}),n.jsx(Wo,{checked:v,onChange:y,disabled:D})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(oN,{size:10,className:"text-blue-500"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-medium text-content-secondary",children:"Parallel workers"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Concurrent cases"})]})]}),n.jsx("input",{type:"number",min:1,max:10,value:j,disabled:D,onChange:M=>w(Number(M.target.value)),className:"w-12 text-xs border border-border rounded-lg px-1.5 py-1 text-center focus:outline-none focus:ring-2 focus:ring-accent/30 disabled:opacity-50 bg-surface"})]})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2 bg-surface-inset/50 border-b border-border flex items-center gap-2",children:[n.jsx("div",{className:"w-5 h-5 rounded-md bg-gradient-to-br from-pink-500 to-rose-600 flex items-center justify-center",children:n.jsx(Sr,{size:10,className:"text-white"})}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Capture"})]}),n.jsx("div",{className:"p-3 space-y-2",children:[{label:"Screenshot",icon:Sr,cls:"text-blue-400",val:h,set:d,opts:[["off","Off"],["on","Every test"],["only-on-failure","On failure"]]},{label:"Video",icon:jc,cls:"text-purple-400",val:p,set:b,opts:[["off","Off"],["on","Every test"],["on-first-retry","1st retry"],["retain-on-failure","On failure"]]},{label:"Trace",icon:Wg,cls:"text-emerald-400",val:N,set:C,opts:[["off","Off"],["on","Every test"],["on-first-retry","1st retry"],["retain-on-failure","On failure"]]}].map(({label:M,icon:W,cls:L,val:te,set:B,opts:de})=>n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-content-secondary min-w-0 flex-shrink-0 font-medium",children:[n.jsx(W,{size:11,className:L}),M]}),n.jsx("select",{value:te,disabled:D,onChange:xe=>B(xe.target.value),className:"flex-1 border border-border rounded-lg px-2 py-1 text-[10px] focus:outline-none focus:ring-1 focus:ring-accent/30 bg-surface disabled:opacity-50 min-w-0",children:de.map(([xe,ue])=>n.jsx("option",{value:xe,children:ue},xe))})]},M))})]}),n.jsxs(se,{size:"lg",onClick:G,loading:J,disabled:D,className:"w-full",children:[n.jsx(Rt,{size:14})," Start Test Run"]})]})]})]})})}function p5({progress:e,live:t,elapsed:s,runActive:r,onRunAgain:a,onOpenExternal:i}){const{leftPct:l,onMouseDown:o}=x5(60),{topPct:c,onMouseDown:u}=m5(55),x=m.useRef(null),[f,g]=m.useState("steps"),{stepLogs:v}=zy(),[y,j]=m.useState(null),w=t.activeCaseIds.length>1;m.useEffect(()=>{t.activeCaseIds.length>0&&!y&&j(t.activeCaseIds[0])},[t.activeCaseIds,y]);const h=w&&y?v.filter(p=>p.caseId===y):v,d=w&&y?t.consoleLogsByCase.get(y)??[]:t.consoleLogs;return m.useEffect(()=>{var p;(p=x.current)==null||p.scrollIntoView({behavior:"smooth"})},[h.length,d.length]),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[n.jsx(g5,{elapsed:s,runActive:r,progress:e,onRunAgain:a}),w?n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative",style:{minHeight:0},children:[n.jsxs("div",{className:"overflow-y-auto bg-slate-900 flex flex-col",style:{height:`${c}%`},children:[n.jsxs("div",{className:"flex-shrink-0 h-8 bg-slate-800 border-b border-slate-700 flex items-center justify-between px-3",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500/80"}),n.jsxs("span",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider ml-2",children:["Browser Previews — ",t.activeCaseIds.length," running"]})]}),n.jsx("button",{type:"button",onClick:i,title:"Open in external browser",className:"p-1 rounded text-slate-400 hover:text-white hover:bg-slate-700 transition-colors",children:n.jsx(qa,{size:11})})]}),n.jsx("div",{className:"flex flex-col gap-0 flex-1",children:t.activeCaseIds.map((p,b)=>{const N=t.screenshots.get(p),C=e.activeCases.get(p)??p.slice(0,8),R=y===p,P=b===t.activeCaseIds.length-1;return n.jsxs("div",{className:S("flex flex-col cursor-pointer transition-all",!P&&"border-b border-slate-700",R&&"ring-inset ring-2 ring-accent"),onClick:()=>j(p),children:[n.jsxs("div",{className:S("flex items-center justify-between px-3 py-1.5 flex-shrink-0",R?"bg-accent/10 border-b border-accent/30":"bg-slate-800/60 border-b border-slate-700"),children:[n.jsxs("div",{className:"flex items-center gap-2",children:[e.currentBrowser&&n.jsx(Sc,{browser:e.currentBrowser,size:12}),n.jsx("span",{className:"text-[10px] font-mono text-slate-300 truncate max-w-xs",children:C})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[R&&n.jsx("span",{className:"text-[8px] font-semibold text-accent uppercase tracking-wider",children:"Selected"}),r&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"})]})]}),n.jsx("div",{className:"relative bg-slate-950 flex-1",children:N?n.jsx("img",{src:`data:image/jpeg;base64,${N}`,alt:C,className:"w-full h-auto object-contain"}):n.jsxs("div",{className:"h-32 flex items-center justify-center gap-2",children:[n.jsx(ce,{size:14,className:"text-slate-600 animate-spin"}),n.jsx("span",{className:"text-[10px] text-slate-600",children:"Waiting for screenshot..."})]})})]},p)})})]}),n.jsxs("div",{className:"flex-shrink-0 h-1.5 bg-slate-700 hover:bg-accent cursor-row-resize flex items-center justify-center transition-colors group relative",onMouseDown:u,children:[n.jsx("div",{className:"absolute inset-x-0 -top-1.5 -bottom-1.5"}),n.jsx("div",{className:"flex gap-0.5",children:n.jsx("div",{className:"w-4 h-0.5 rounded-full bg-slate-500 group-hover:bg-white transition-colors"})})]}),n.jsxs("div",{className:"flex flex-col bg-[#1a1b26] overflow-hidden",style:{height:`${100-c}%`},children:[n.jsx("div",{className:"flex-shrink-0 flex items-center gap-1 px-2 py-1 bg-[#16172a] border-b border-slate-700 overflow-x-auto",children:t.activeCaseIds.map(p=>{const b=e.activeCases.get(p)??p.slice(0,8),N=y===p;return n.jsx("button",{type:"button",onClick:()=>j(p),className:S("px-2 py-0.5 rounded text-[8px] font-mono truncate max-w-[160px] transition-colors flex-shrink-0",N?"bg-accent/20 text-accent ring-1 ring-accent/30":"text-slate-500 hover:text-slate-300 hover:bg-slate-800"),children:b},p)})}),n.jsx(Nf,{tab:f,setTab:g,stepCount:h.length,logCount:d.length}),n.jsx(wf,{tab:f,stepLogs:h,consoleLogs:d,endRef:x}),e.completed&&!r&&n.jsx("div",{className:"flex-shrink-0 border-t border-slate-700 p-3",children:n.jsx(jf,{completed:e.completed,onRunAgain:a})})]})]}):n.jsxs("div",{className:"flex flex-1 overflow-hidden relative",style:{minHeight:0},children:[n.jsxs("div",{className:"flex flex-col bg-slate-900 overflow-hidden",style:{width:`${l}%`},children:[n.jsx(y5,{onOpenExternal:i,browser:e.currentBrowser}),n.jsxs("div",{className:"flex-1 relative overflow-hidden flex items-center justify-center",children:[t.screenshot?n.jsx("img",{src:`data:image/jpeg;base64,${t.screenshot}`,alt:"Browser",className:S("max-w-full max-h-full object-contain",e.completed&&!r&&"opacity-30")}):r?n.jsx(b5,{progress:e}):null,e.completed&&!r&&n.jsx("div",{className:S("w-full",t.screenshot?"absolute inset-0 flex items-center justify-center bg-black/50 backdrop-blur-sm":"p-6"),children:n.jsx(jf,{completed:e.completed,onRunAgain:a})}),n.jsx(v5,{step:e.currentStep})]})]}),n.jsx(j5,{onMouseDown:o}),n.jsxs("div",{className:"flex flex-col bg-[#1a1b26] overflow-hidden",style:{width:`${100-l}%`},children:[n.jsx(Nf,{tab:f,setTab:g,stepCount:h.length,logCount:d.length}),n.jsx(wf,{tab:f,stepLogs:h,consoleLogs:d,endRef:x})]})]})]})}function jf({completed:e,onRunAgain:t}){const s=e.failed===0;return n.jsxs("div",{className:S("w-full max-w-sm rounded-2xl border p-5 shadow-lg",s?"border-emerald-500/30 bg-emerald-950/80":"border-red-500/30 bg-red-950/80"),children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s?n.jsx(Ue,{size:22,className:"text-emerald-400 flex-shrink-0"}):n.jsx(ut,{size:22,className:"text-red-400 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-sm font-bold",s?"text-emerald-300":"text-red-300"),children:s?"All tests passed!":"Run completed with failures"}),n.jsxs("p",{className:S("text-[10px]",s?"text-emerald-400/70":"text-red-400/70"),children:["Finished in ",Math.round(e.duration/1e3),"s"]})]})]}),n.jsx("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[{label:"Passed",value:e.passed,color:"text-emerald-400",bg:"bg-emerald-500/10 ring-emerald-500/20"},{label:"Failed",value:e.failed,color:"text-red-400",bg:"bg-red-500/10 ring-red-500/20"},{label:"Skipped",value:e.skipped,color:"text-slate-400",bg:"bg-slate-500/10 ring-slate-500/20"}].map(({label:r,value:a,color:i,bg:l})=>n.jsxs("div",{className:S("rounded-xl p-2.5 text-center ring-1",l),children:[n.jsx("p",{className:S("text-lg font-bold tabular-nums",i),children:a}),n.jsx("p",{className:"text-[8px] text-slate-400 uppercase tracking-wider",children:r})]},r))}),n.jsxs("button",{type:"button",onClick:t,className:"w-full flex items-center justify-center gap-2 py-2 rounded-xl ring-1 ring-slate-600 bg-slate-800 hover:bg-slate-700 transition-all text-xs font-medium text-slate-300 hover:text-white",children:[n.jsx(yc,{size:11})," Run Again"]})]})}function g5({elapsed:e,runActive:t,progress:s,onRunAgain:r}){var a;return n.jsxs("div",{className:"flex-shrink-0 px-4 py-2 bg-surface border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center",t?"bg-gradient-to-br from-emerald-500 to-cyan-600":(a=s.completed)!=null&&a.failed?"bg-gradient-to-br from-red-500 to-rose-600":"bg-gradient-to-br from-emerald-500 to-green-600"),children:t?n.jsx(ce,{size:13,className:"text-white animate-spin"}):n.jsx(Ue,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("p",{className:"text-xs font-bold text-content",children:t?"Running Tests":"Run Complete"}),t&&n.jsx("span",{className:"inline-flex items-center gap-1 text-[8px] font-semibold px-1.5 py-0.5 rounded-md ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200 animate-pulse",children:"LIVE"})]}),s.currentCase&&t&&n.jsx("p",{className:"text-[9px] text-content-tertiary truncate max-w-xs",children:s.currentCase.caseName})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[!t&&s.completed&&n.jsxs("div",{className:"flex items-center gap-1.5 mr-2",children:[n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[9px] font-semibold px-1.5 py-0.5 rounded ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200",children:[n.jsx(Ue,{size:8})," ",s.completed.passed]}),s.completed.failed>0&&n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[9px] font-semibold px-1.5 py-0.5 rounded ring-1 bg-red-50 text-red-600 ring-red-200",children:[n.jsx(ut,{size:8})," ",s.completed.failed]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 text-content-tertiary",children:[n.jsx(Tr,{size:10}),n.jsx("p",{className:"text-xs font-mono font-bold text-content-secondary",children:e})]}),!t&&n.jsxs("button",{type:"button",onClick:r,className:"text-[10px] font-medium text-accent hover:text-accent-dark flex items-center gap-1 ml-1",children:[n.jsx(yc,{size:10})," New Run"]})]})]})}function y5({onOpenExternal:e,onToggleFullscreen:t,fullscreen:s,browser:r}){return n.jsxs("div",{className:"flex-shrink-0 h-8 bg-slate-800 border-b border-slate-700 flex items-center justify-between px-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500/80"})]}),r?n.jsxs("div",{className:"flex items-center gap-1.5 ml-2",children:[n.jsx(Sc,{browser:r,size:14}),n.jsx("span",{className:"text-[10px] font-semibold text-slate-300 uppercase tracking-wider",children:pm(r)})]}):n.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider ml-2",children:"Browser Preview"})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[t&&n.jsx("button",{type:"button",onClick:t,title:s?"Exit fullscreen":"Fullscreen",className:"p-1 rounded text-slate-400 hover:text-white hover:bg-slate-700 transition-colors",children:s?n.jsx(pN,{size:11}):n.jsx(im,{size:11})}),n.jsx("button",{type:"button",onClick:e,title:"Open in external browser",className:"p-1 rounded text-slate-400 hover:text-white hover:bg-slate-700 transition-colors",children:n.jsx(qa,{size:11})})]})]})}function b5({progress:e}){return n.jsxs("div",{className:"flex flex-col items-center gap-4 p-8 max-w-xs",children:[n.jsxs("div",{className:"w-48 h-32 rounded-xl bg-slate-800 border border-slate-700 overflow-hidden relative",children:[n.jsxs("div",{className:"h-5 bg-slate-750 border-b border-slate-700 flex items-center px-2 gap-1.5",children:[n.jsxs("div",{className:"flex gap-1",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500/50"}),n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500/50"}),n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500/50"})]}),n.jsx("div",{className:"flex-1 h-2.5 rounded bg-slate-700 ml-1"})]}),n.jsxs("div",{className:"p-2 space-y-1.5",children:[n.jsx("div",{className:"h-2 bg-slate-700 rounded w-3/4 animate-pulse"}),n.jsx("div",{className:"h-2 bg-slate-700 rounded w-1/2 animate-pulse",style:{animationDelay:"200ms"}}),n.jsx("div",{className:"h-2 bg-slate-700 rounded w-5/6 animate-pulse",style:{animationDelay:"400ms"}}),n.jsx("div",{className:"h-6 bg-accent/10 rounded mt-2 animate-pulse border border-accent/20",style:{animationDelay:"600ms"}})]}),n.jsx("div",{className:"absolute inset-x-0 h-0.5 bg-gradient-to-r from-transparent via-accent to-transparent opacity-60",style:{animation:"scan-line 2s ease-in-out infinite",top:"30%"}})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("p",{className:"text-xs font-semibold text-slate-300",children:e.currentCase?"Executing test...":"Launching browser..."}),e.currentCase&&n.jsx("p",{className:"text-[10px] text-slate-500 mt-1 truncate max-w-[200px]",children:e.currentCase.caseName})]}),n.jsx("div",{className:"flex items-center gap-1.5",children:[0,160,320].map(t=>n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent animate-bounce",style:{animationDelay:`${t}ms`}},t))}),n.jsx("style",{children:`
|
|
792
|
+
@keyframes scan-line {
|
|
793
|
+
0%, 100% { top: 20%; opacity: 0; }
|
|
794
|
+
50% { top: 80%; opacity: 0.6; }
|
|
795
|
+
}
|
|
796
|
+
`})]})}function v5({step:e}){return e?n.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent px-4 py-3",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse flex-shrink-0"}),n.jsx("p",{className:"text-[10px] text-white/80 truncate font-mono",children:e.instruction})]})}):null}function j5({onMouseDown:e}){return n.jsxs("div",{className:"flex-shrink-0 w-1.5 bg-slate-700 hover:bg-accent cursor-col-resize flex items-center justify-center transition-colors group relative",onMouseDown:e,children:[n.jsx("div",{className:"absolute inset-y-0 -left-1.5 -right-1.5"})," ",n.jsx(gc,{size:10,className:"text-slate-500 group-hover:text-white"})]})}function Nf({tab:e,setTab:t,stepCount:s,logCount:r}){return n.jsxs("div",{className:"flex-shrink-0 h-8 bg-[#1e1f2e] border-b border-slate-700 flex items-center px-1",children:[n.jsxs("button",{type:"button",onClick:()=>t("steps"),className:S("flex items-center gap-1.5 px-3 h-full text-[10px] font-semibold uppercase tracking-wider border-b-2 transition-colors",e==="steps"?"text-accent border-accent":"text-slate-500 border-transparent hover:text-slate-300"),children:[n.jsx(Rt,{size:9})," Steps",s>0&&n.jsx("span",{className:"text-[8px] ml-0.5 opacity-60",children:s})]}),n.jsxs("button",{type:"button",onClick:()=>t("console"),className:S("flex items-center gap-1.5 px-3 h-full text-[10px] font-semibold uppercase tracking-wider border-b-2 transition-colors",e==="console"?"text-accent border-accent":"text-slate-500 border-transparent hover:text-slate-300"),children:[n.jsx(vc,{size:9})," Console",r>0&&n.jsx("span",{className:"text-[8px] ml-0.5 opacity-60",children:r})]})]})}function wf({tab:e,stepLogs:t,consoleLogs:s,endRef:r}){return e==="steps"?n.jsxs("div",{className:"flex-1 overflow-y-auto text-[10px] px-3 py-2 space-y-0.5",children:[t.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-2 text-slate-600",children:[n.jsx(Rt,{size:18}),n.jsx("p",{className:"text-[10px]",children:"Steps will appear as they execute..."})]}):t.map((a,i)=>n.jsxs("div",{className:"flex items-start gap-2 py-1 px-2 rounded hover:bg-white/[0.02] -mx-1",children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:a.status==="passed"?n.jsx(Ue,{size:11,className:"text-emerald-400"}):a.status==="failed"?n.jsx(ut,{size:11,className:"text-red-400"}):n.jsx(bc,{size:11,className:"text-slate-500"})}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("p",{className:S("font-mono truncate",a.status==="passed"?"text-slate-300":a.status==="failed"?"text-red-300":"text-slate-500"),children:a.instruction})}),n.jsxs("span",{className:"text-slate-600 flex-shrink-0 tabular-nums",children:[a.duration,"ms"]})]},`${a.stepId}-${i}`)),n.jsx("div",{ref:r})]}):n.jsxs("div",{className:"flex-1 overflow-y-auto font-mono text-[10px] px-3 py-2 space-y-px",children:[s.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-2 text-slate-600",children:[n.jsx(vc,{size:18}),n.jsx("p",{className:"text-[10px]",children:"Console logs will appear here..."})]}):s.map((a,i)=>{const l=bf[a.type]??bf.default,o=vf[a.type]??vf.debug,c=new Date(a.timestamp).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return n.jsxs("div",{className:"flex items-start gap-2 py-0.5 hover:bg-white/[0.02] rounded px-1 -mx-1",children:[n.jsx("span",{className:"text-slate-600 flex-shrink-0 tabular-nums",children:c}),n.jsx("span",{className:S("flex-shrink-0 uppercase text-[8px] font-bold w-9",o),children:a.type.slice(0,5)}),n.jsx("span",{className:S("break-all",l),children:a.text})]},i)}),n.jsx("div",{ref:r})]})}function Ly({label:e,color:t,className:s}){return n.jsx("span",{className:S("inline-flex items-center px-2 py-0.5 rounded-md text-[11px] font-semibold tracking-wide",t??"bg-surface-inset text-content-secondary",s),children:e})}function gm({status:e}){const t={passed:"bg-emerald-50 text-emerald-700 border border-emerald-200/60",failed:"bg-red-50 text-red-700 border border-red-200/60",running:"bg-blue-50 text-blue-700 border border-blue-200/60",pending:"bg-slate-50 text-slate-600 border border-slate-200/60",skipped:"bg-amber-50 text-amber-700 border border-amber-200/60",partial:"bg-orange-50 text-orange-700 border border-orange-200/60"};return n.jsx(Ly,{label:e,color:t[e]??"bg-slate-100 text-slate-600"})}function N5(e){switch(e){case"passed":return"bg-emerald-500";case"failed":return"bg-red-500";case"skipped":return"bg-slate-500";case"healed":return"bg-amber-500";default:return"bg-slate-400"}}function w5({steps:e,onSelect:t}){const s=e.filter(r=>r.screenshotPath);return s.length<2?null:n.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",style:{scrollbarWidth:"thin"},children:s.map((r,a)=>{const i=Ka("screenshots",r.screenshotPath),l=r.healed?"healed":r.status;return n.jsxs("button",{type:"button",onClick:()=>t(i),className:"relative flex-shrink-0 rounded overflow-hidden border border-border hover:border-accent/50 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",style:{width:80,height:60},title:r.instruction,children:[n.jsx("img",{src:i,alt:`Step ${a+1}`,className:"w-full h-full object-cover"}),n.jsx("span",{className:"absolute top-0.5 left-0.5 bg-black/60 text-white text-[8px] font-bold px-1 py-px rounded leading-none",children:a+1}),n.jsx("span",{className:S("absolute bottom-1 right-1 w-2 h-2 rounded-full ring-1 ring-white/50",N5(l))})]},r.stepId)})})}function k5(e){if(e.healed)return"bg-amber-500";switch(e.status){case"passed":return"bg-emerald-500";case"failed":return"bg-red-500";case"skipped":return"bg-slate-500";default:return"bg-slate-400"}}function S5({steps:e}){const[t,s]=m.useState(null),r=e.reduce((i,l)=>i+(l.duration??0),0);if(r===0||e.length===0)return null;let a=0;return n.jsxs("div",{className:"px-3 py-2 border-t border-border bg-surface-inset/20",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-wider mb-2",children:"Execution Timeline"}),n.jsx("div",{className:"relative h-5 bg-surface-inset rounded overflow-hidden",children:e.map((i,l)=>{const o=i.duration/r*100,c=a/r*100;return a+=i.duration,n.jsx("div",{className:S("absolute top-0 h-full transition-opacity hover:opacity-80 cursor-default",k5(i)),style:{left:`${c}%`,width:`${Math.max(o,.5)}%`},onMouseEnter:()=>s(`${i.instruction} — ${i.duration}ms`),onMouseLeave:()=>s(null)},i.stepId??l)})}),t&&n.jsx("p",{className:"text-[9px] text-content-secondary mt-1 truncate",children:t}),n.jsx("div",{className:"flex mt-1 relative",style:{height:14},children:(()=>{let i=0;return e.map((l,o)=>{const c=l.duration/r*100,u=i/r*100;i+=l.duration;const x=(l.instruction??"").slice(0,8);return n.jsx("div",{className:"absolute text-[8px] text-content-tertiary truncate overflow-hidden",style:{left:`${u}%`,width:`${Math.max(c,2)}%`,top:0},title:l.instruction,children:x},l.stepId??o)})})()})]})}function C5({stepId:e,currentScreenshotPath:t}){const{data:s,refetch:r}=ke({queryKey:["baseline",e],queryFn:()=>rf.get(e),enabled:!!e}),a=Y({mutationFn:()=>{if(!t)throw new Error("No screenshot available");return rf.capture(e,t)},onSuccess:()=>{O.success("Baseline saved"),r()},onError:o=>O.error(o.message)}),i=t?Ka("screenshots",t):null,l=s!=null&&s.hasBaseline?`${ON(e)}?t=${s.capturedAt??Date.now()}`:null;return n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Visual Regression"}),n.jsxs("div",{className:"flex items-center gap-2",children:[(s==null?void 0:s.hasBaseline)&&n.jsx("span",{className:"text-[8px] px-1.5 py-0.5 rounded bg-emerald-50 text-emerald-600 ring-1 ring-emerald-200 font-semibold",children:"Baseline set"}),t&&n.jsxs("button",{type:"button",onClick:()=>a.mutate(),disabled:a.isPending,className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:[n.jsx(Sr,{size:9})," Set as Baseline"]})]})]}),n.jsxs("div",{className:"flex gap-3",children:[i&&n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-[8px] text-content-tertiary mb-1",children:"Current"}),n.jsx("img",{src:i,alt:"Current screenshot",className:"rounded border border-border max-h-32 object-contain"})]}),l&&n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-[8px] text-content-tertiary mb-1",children:"Baseline"}),n.jsx("img",{src:l,alt:"Baseline screenshot",className:"rounded border border-border max-h-32 object-contain"})]}),!l&&i&&n.jsx("div",{className:"flex-1 flex items-center justify-center border border-dashed border-border rounded-lg min-h-[80px]",children:n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No baseline set"})})]})]})}function ym(e,t){if(t==null)return"na";switch(e){case"fcp":return t<1800?"good":t<3e3?"needs-improvement":"poor";case"lcp":return t<2500?"good":t<4e3?"needs-improvement":"poor";case"cls":return t<.1?"good":t<.25?"needs-improvement":"poor";case"ttfb":return t<800?"good":t<1800?"needs-improvement":"poor";case"tbt":return t<200?"good":t<600?"needs-improvement":"poor";case"si":return t<3400?"good":t<5800?"needs-improvement":"poor";case"tti":return t<3800?"good":t<7300?"needs-improvement":"poor";case"inp":return t<200?"good":t<500?"needs-improvement":"poor"}}const E5={good:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-700 dark:text-emerald-400 ring-emerald-200 dark:ring-emerald-800","needs-improvement":"bg-amber-50 dark:bg-amber-900/20 text-amber-700 dark:text-amber-400 ring-amber-200 dark:ring-amber-800",poor:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 ring-red-200 dark:ring-red-800",na:"bg-surface-inset text-content-tertiary ring-border"};function P5(e,t){return t==null?"—":e==="cls"?t.toFixed(3):t<1e3?`${Math.round(t)}ms`:`${(t/1e3).toFixed(2)}s`}function bm(e){return e==null?{ring:"ring-border",text:"text-content-tertiary",bg:"bg-surface-inset",label:"—"}:e>=90?{ring:"ring-emerald-300 dark:ring-emerald-700",text:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-900/20",label:"Good"}:e>=50?{ring:"ring-amber-300 dark:ring-amber-700",text:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-900/20",label:"Needs Work"}:{ring:"ring-red-300 dark:ring-red-700",text:"text-red-600 dark:text-red-400",bg:"bg-red-50 dark:bg-red-900/20",label:"Poor"}}const vm=[{key:"fcp",label:"FCP",desc:"First Contentful Paint"},{key:"lcp",label:"LCP",desc:"Largest Contentful Paint"},{key:"cls",label:"CLS",desc:"Cumulative Layout Shift"},{key:"ttfb",label:"TTFB",desc:"Time to First Byte"},{key:"tbt",label:"TBT",desc:"Total Blocking Time"},{key:"si",label:"SI",desc:"Speed Index"},{key:"tti",label:"TTI",desc:"Time to Interactive"},{key:"inp",label:"INP",desc:"Interaction to Next Paint"}];function kf({metricKey:e,value:t}){const s=ym(e,t),r=vm.find(a=>a.key===e);return n.jsxs("div",{className:S("rounded-lg px-2 py-2 ring-1 text-center flex-1 min-w-[70px]",E5[s]),children:[n.jsx("p",{className:"text-[8px] font-bold uppercase tracking-widest opacity-60 mb-0.5",children:r.label}),n.jsx("p",{className:"text-xs font-bold tabular-nums leading-tight",children:P5(e,t)})]})}function kd({score:e,label:t}){const s=bm(e),r=24,a=2*Math.PI*r,i=e!=null?e/100*a:0;return n.jsxs("div",{className:S("flex flex-col items-center justify-center rounded-xl px-3 py-2.5 ring-2 flex-1",s.bg,s.ring),children:[n.jsxs("div",{className:"relative w-14 h-14",children:[n.jsxs("svg",{className:"w-14 h-14 -rotate-90",viewBox:"0 0 60 60",children:[n.jsx("circle",{cx:"30",cy:"30",r,fill:"none",stroke:"currentColor",strokeWidth:"5",className:"opacity-10"}),n.jsx("circle",{cx:"30",cy:"30",r,fill:"none",stroke:"currentColor",strokeWidth:"5",strokeDasharray:a,strokeDashoffset:a-i,strokeLinecap:"round",className:s.text})]}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsx("span",{className:S("text-base font-black tabular-nums",s.text),children:e??"—"})})]}),n.jsx("p",{className:S("text-[8px] font-bold mt-1 leading-tight",s.text),children:s.label}),n.jsx("p",{className:"text-[8px] text-content-tertiary mt-px text-center leading-tight",children:t})]})}function Sf({audits:e,label:t,score:s}){if(!e||e.length===0)return null;const r=e.filter(c=>!c.passed&&!c.partial&&!c.na),a=e.filter(c=>!!c.partial),i=e.filter(c=>c.passed),l=e.filter(c=>!!c.na),o=bm(s);return n.jsxs("div",{className:"mt-2 space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[n.jsxs("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest flex-1",children:[t," Audits"]}),s!=null&&n.jsx("span",{className:S("text-[9px] font-black px-1.5 py-0.5 rounded-md ring-1",o.bg,o.text,o.ring),children:s})]}),n.jsxs("div",{className:"space-y-0.5 max-h-48 overflow-y-auto pr-1",children:[r.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-red-600 dark:text-red-400 font-medium",children:[n.jsx(ut,{size:9,className:"text-red-500 flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id)),a.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-amber-600 dark:text-amber-400 font-medium",children:[n.jsx(Yt,{size:9,className:"text-amber-500 flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id)),l.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-content-tertiary",children:[n.jsx(aN,{size:9,className:"text-content-tertiary flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id)),i.map(c=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] text-emerald-600 dark:text-emerald-400",children:[n.jsx(Ue,{size:9,className:"text-emerald-500 flex-shrink-0 mt-px"}),n.jsx("span",{className:"leading-tight",children:c.title})]},c.id))]})]})}function z5(e,t){let s=0,r=0,a=0;if(t==="performance")for(const i of e)for(const{key:l}of vm){const o=ym(l,i[l]);o==="good"?s++:o==="needs-improvement"?r++:o==="poor"&&a++}else{const i=t==="accessibility"?"a11yAudits":"seoAudits",l=t==="accessibility"?"a11yScore":"seoScore";for(const o of e){const c=o[i]??[];s+=c.filter(x=>x.passed).length,r+=c.filter(x=>!!x.partial).length,a+=c.filter(x=>!x.passed&&!x.partial&&!x.na).length;const u=bm(o[l]);u.label==="Good"?s++:u.label==="Needs Work"?r++:u.label==="Poor"&&a++}}return{good:s,warn:r,poor:a}}function M5({caseName:e,pageLoads:t,focus:s="performance",onClose:r}){const[a,i]=m.useState(s),l=z5(t,a),o=a==="performance"?"metrics":a==="accessibility"?"a11y checks":"seo checks",c=[{key:"performance",label:"Performance",icon:n.jsx(Be,{size:10}),color:"text-violet-600 dark:text-violet-400",activeColor:"bg-violet-50 dark:bg-violet-900/20 text-violet-700 dark:text-violet-300 ring-violet-200 dark:ring-violet-700"},{key:"accessibility",label:"Accessibility",icon:n.jsx($u,{size:10}),color:"text-blue-600 dark:text-blue-400",activeColor:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 ring-blue-200 dark:ring-blue-700"},{key:"seo",label:"SEO",icon:n.jsx(Pr,{size:10}),color:"text-emerald-600 dark:text-emerald-400",activeColor:"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-700 dark:text-emerald-300 ring-emerald-200 dark:ring-emerald-700"}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 bg-black/30 z-40",onClick:r}),n.jsxs("div",{className:"fixed right-0 top-0 h-full w-[560px] max-w-full bg-surface shadow-2xl z-50 flex flex-col border-l border-border",children:[n.jsxs("div",{className:"border-b border-border bg-gradient-to-r from-violet-50 to-indigo-50 dark:from-violet-900/20 dark:to-indigo-900/20 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-3 px-5 py-3",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0",a==="performance"?"bg-violet-500":a==="accessibility"?"bg-blue-500":"bg-emerald-500"),children:a==="performance"?n.jsx(Be,{size:13,className:"text-white"}):a==="accessibility"?n.jsx($u,{size:13,className:"text-white"}):n.jsx(Pr,{size:13,className:"text-white"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-xs font-bold text-content",children:"Lighthouse Audit"}),n.jsx("p",{className:"text-[10px] text-content-tertiary truncate",children:e})]}),n.jsx("button",{type:"button",onClick:r,className:"p-1.5 rounded-lg text-content-tertiary hover:text-content hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"flex gap-1 px-5 pb-0",children:c.map(u=>n.jsxs("button",{type:"button",onClick:()=>i(u.key),className:S("flex items-center gap-1.5 px-3 py-1.5 text-[10px] font-semibold rounded-t-lg border-b-2 transition-colors",a===u.key?"border-current "+u.color+" bg-surface/80":"border-transparent text-content-tertiary hover:text-content-secondary"),children:[u.icon," ",u.label]},u.key))})]}),l.good+l.warn+l.poor>0&&n.jsxs("div",{className:"px-5 py-2.5 border-b border-border bg-surface-inset/40 flex items-center gap-4 flex-shrink-0",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest flex-shrink-0",children:["Overall ",n.jsxs("span",{className:"normal-case font-normal opacity-60",children:["(",o,")"]})]}),n.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[l.good>0&&n.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-700 dark:text-emerald-400 font-semibold",children:[n.jsx("span",{className:"text-emerald-500 text-[11px] leading-none",children:"●"}),l.good," ",a==="performance"?"Good":"Passed"]}),l.warn>0&&n.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-amber-700 dark:text-amber-400 font-semibold",children:[n.jsx("span",{className:"text-amber-400 text-[11px] leading-none",children:"●"}),l.warn," Needs Work"]}),l.poor>0&&n.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-red-700 dark:text-red-400 font-semibold",children:[n.jsx("span",{className:"text-red-500 text-[11px] leading-none",children:"●"}),l.poor," ",a==="performance"?"Poor":"Failed"]})]}),n.jsxs("p",{className:"text-[9px] text-content-tertiary",children:[t.length," page",t.length!==1?"s":""]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:t.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-40 text-center",children:[n.jsx(Be,{size:24,className:"text-content-tertiary mb-2 opacity-40"}),n.jsx("p",{className:"text-xs text-content-tertiary",children:"No page navigations recorded"}),n.jsx("p",{className:"text-[10px] text-content-tertiary mt-1 opacity-60",children:"Only available for Chromium browser runs"})]}):t.map((u,x)=>{var f,g;return n.jsxs("div",{className:"rounded-xl border border-border bg-surface shadow-sm overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset/50 border-b border-border",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-0.5",children:["Step ",u.stepIndex+1]}),n.jsx("p",{className:"text-[10px] text-content-secondary truncate mb-1",title:u.stepInstruction,children:u.stepInstruction}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Er,{size:9,className:"text-indigo-400 dark:text-indigo-500 flex-shrink-0"}),n.jsx("p",{className:"text-[10px] font-mono text-indigo-600 dark:text-indigo-400 truncate font-medium",title:u.url,children:u.url})]})]}),u.lighthouseError?n.jsxs("div",{className:"px-4 py-3 flex items-start gap-2",children:[n.jsx(Yt,{size:12,className:"text-amber-500 flex-shrink-0 mt-0.5"}),n.jsx("p",{className:"text-[10px] text-amber-700 dark:text-amber-400",children:u.lighthouseError})]}):n.jsxs("div",{className:"px-4 py-3 space-y-3",children:[a==="performance"&&n.jsxs(n.Fragment,{children:[n.jsx(kd,{score:u.score,label:"Performance"}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("p",{className:"text-[8px] font-bold text-content-tertiary uppercase tracking-widest",children:"Core Web Vitals"}),n.jsx("div",{className:"flex gap-1.5 flex-wrap",children:["fcp","lcp","cls","ttfb"].map(v=>n.jsx(kf,{metricKey:v,value:u[v]},v))}),n.jsx("div",{className:"flex gap-1.5 flex-wrap",children:["tbt","si","tti","inp"].map(v=>n.jsx(kf,{metricKey:v,value:u[v]},v))})]}),n.jsx("div",{className:"pt-1 border-t border-border/50 grid grid-cols-2 gap-x-4 gap-y-0.5",children:vm.map(({key:v,label:y,desc:j})=>{const w=ym(v,u[v]);return n.jsxs("div",{className:"flex items-center gap-1.5 text-[8px] text-content-tertiary",children:[n.jsx("span",{className:S("text-[10px] leading-none flex-shrink-0",w==="good"?"text-emerald-500":w==="needs-improvement"?"text-amber-400":w==="poor"?"text-red-500":"text-slate-300"),children:"●"}),n.jsx("span",{className:"font-medium",children:y}),n.jsx("span",{className:"opacity-60 truncate",children:j})]},v)})})]}),a==="accessibility"&&n.jsxs(n.Fragment,{children:[n.jsx(kd,{score:u.a11yScore,label:"Accessibility"}),(((f=u.a11yAudits)==null?void 0:f.length)??0)>0?n.jsx(Sf,{audits:u.a11yAudits,label:"Accessibility",score:u.a11yScore}):n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No accessibility audit data available."})]}),a==="seo"&&n.jsxs(n.Fragment,{children:[n.jsx(kd,{score:u.seoScore,label:"SEO"}),(((g=u.seoAudits)==null?void 0:g.length)??0)>0?n.jsx(Sf,{audits:u.seoAudits,label:"SEO",score:u.seoScore}):n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No SEO audit data available."})]})]})]},x)})}),n.jsx("div",{className:"px-5 py-2.5 border-t border-border bg-surface-inset/30 flex-shrink-0",children:n.jsx("p",{className:"text-[9px] text-content-tertiary text-center",children:"Powered by Google Lighthouse · Desktop preset · Chromium only"})})]})]})}function T5({src:e,onClose:t}){return n.jsxs("div",{className:"fixed inset-0 bg-black/80 z-50 flex flex-col items-center justify-center p-4",onClick:t,children:[n.jsxs("div",{className:"absolute top-4 right-4 flex items-center gap-2",children:[n.jsx("a",{href:e,download:!0,onClick:s=>s.stopPropagation(),title:"Download",className:"text-white/70 hover:text-white p-2 rounded-lg bg-surface/10 hover:bg-surface/20",children:n.jsx(pc,{size:14})}),n.jsx("button",{type:"button",onClick:t,className:"text-white/70 hover:text-white p-2 rounded-lg bg-surface/10 hover:bg-surface/20",children:n.jsx(Se,{size:14})})]}),n.jsx("img",{src:e,alt:"Screenshot",className:"max-w-full max-h-full rounded-lg shadow-2xl object-contain",onClick:s=>s.stopPropagation()}),n.jsx("p",{className:"text-white/40 text-[10px] mt-2",children:"Click outside to close"})]})}function R5({step:e,onScreenshot:t}){const[s,r]=m.useState(e.status==="failed"),a=e.screenshotPath?Ka("screenshots",e.screenshotPath):null,i=e.status==="passed"?n.jsx(Ue,{size:11,className:"text-emerald-500 flex-shrink-0"}):e.status==="failed"?n.jsx(ut,{size:11,className:"text-red-500 flex-shrink-0"}):n.jsx(bc,{size:11,className:"text-content-tertiary flex-shrink-0"});return n.jsxs("div",{className:"border-t border-border/50 first:border-0",children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 cursor-pointer hover:bg-surface-inset/50 text-[10px] select-none transition-colors",onClick:()=>r(l=>!l),children:[i,n.jsx("span",{className:S("text-[8px] px-1 py-px rounded font-bold uppercase ring-1 flex-shrink-0",e.stepType==="api"?"bg-violet-50 text-violet-600 ring-violet-200":"bg-blue-50 text-blue-600 ring-blue-200"),children:e.stepType==="api"?"API":"UI"}),n.jsx("span",{className:S("flex-1 truncate text-[10px]",e.status==="failed"?"text-red-700 font-medium":"text-content-secondary"),children:e.instruction}),e.healed&&n.jsx("span",{className:"text-[8px] bg-amber-50 text-amber-600 px-1.5 py-0.5 rounded font-semibold ring-1 ring-amber-200 flex-shrink-0",children:"✦ healed"}),a&&n.jsx("button",{type:"button",title:"View screenshot",className:"text-content-tertiary hover:text-accent flex-shrink-0 p-0.5",onClick:l=>{l.stopPropagation(),t(a)},children:n.jsx(Sr,{size:10})}),n.jsxs("span",{className:"text-content-tertiary w-10 text-right flex-shrink-0 tabular-nums text-[9px]",children:[e.duration,"ms"]}),s?n.jsx(rN,{size:10,className:"text-content-tertiary flex-shrink-0"}):n.jsx(Tt,{size:10,className:"text-content-tertiary flex-shrink-0"})]}),s&&n.jsxs("div",{className:"px-3 pb-2.5 pt-1 space-y-2 bg-surface-inset/30",children:[e.code&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Code"}),n.jsx("pre",{className:"text-[10px] font-mono bg-slate-900 text-slate-100 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed",children:e.code})]}),e.error&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-red-500 uppercase tracking-widest mb-1",children:"Error"}),n.jsx("pre",{className:"text-[10px] text-red-700 bg-red-50 border border-red-100 rounded-lg p-2.5 font-mono whitespace-pre-wrap leading-relaxed",children:e.error})]}),e.healed&&e.healedCode&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-amber-600 uppercase tracking-widest mb-1",children:"Healed Code"}),n.jsx("pre",{className:"text-[10px] font-mono bg-amber-50 border border-amber-200 text-amber-900 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed",children:e.healedCode})]}),e.apiRequest&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-violet-500 uppercase tracking-widest mb-1",children:"API Request"}),n.jsx("pre",{className:"text-[10px] font-mono bg-violet-50 border border-violet-100 text-violet-900 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed",children:`${e.apiRequest.method} ${e.apiRequest.url}${e.apiRequest.headers?`
|
|
797
|
+
Headers: `+JSON.stringify(e.apiRequest.headers,null,2):""}${e.apiRequest.body?`
|
|
798
|
+
Body: `+e.apiRequest.body:""}`})]}),e.apiResponse&&n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-indigo-500 uppercase tracking-widest mb-1",children:["API Response — ",e.apiResponse.status," ",e.apiResponse.statusText," (",e.apiResponse.duration,"ms)"]}),n.jsx("pre",{className:"text-[10px] font-mono bg-indigo-50 border border-indigo-100 text-indigo-900 rounded-lg p-2.5 overflow-x-auto whitespace-pre-wrap leading-relaxed max-h-48 overflow-y-auto",children:e.apiResponse.body?e.apiResponse.body.slice(0,2e3):"(empty body)"})]}),a&&n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:"Screenshot"}),n.jsxs("div",{className:"relative group inline-block",children:[n.jsx("img",{src:a,alt:"Step screenshot",className:"rounded-lg border border-border max-w-full max-h-40 object-contain cursor-zoom-in hover:opacity-95 transition-opacity",onClick:()=>t(a)}),n.jsx("button",{type:"button",onClick:()=>t(a),title:"Fullscreen",className:"absolute top-1.5 right-1.5 bg-black/50 text-white p-1 rounded opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(im,{size:10})})]}),n.jsx("div",{className:"mt-2",children:n.jsx(C5,{stepId:e.stepId,currentScreenshotPath:e.screenshotPath})})]})]})]})}function O5({videoPath:e}){const t=Ka("videos",e);return n.jsxs("div",{className:"border-t border-border bg-black",children:[n.jsxs("div",{className:"px-3 pt-2 pb-1 flex items-center justify-between",children:[n.jsxs("p",{className:"text-[10px] font-medium text-content-tertiary flex items-center gap-1.5",children:[n.jsx(jc,{size:10})," Recording"]}),n.jsxs("a",{href:t,download:!0,title:"Download video",className:"text-[10px] text-content-tertiary hover:text-accent flex items-center gap-1",children:[n.jsx(pc,{size:10})," Download"]})]}),n.jsx("video",{src:t,controls:!0,playsInline:!0,className:"w-full max-h-64 bg-black"})]})}function D5({tracePath:e}){const t=e.replace(/\\/g,"/").split("/").pop()??"",s=Ka("traces",e),r=`/trace/index.html?trace=${encodeURIComponent(`${window.location.origin}${s}`)}`;return n.jsxs("div",{className:"border-t border-border px-3 py-2 flex items-center justify-between bg-violet-50/30",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Dg,{size:12,className:"text-violet-500 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[10px] font-semibold text-content-secondary",children:"Playwright Trace"}),n.jsx("p",{className:"text-[9px] text-content-tertiary font-mono truncate max-w-[200px]",children:t})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[n.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] bg-violet-600 hover:bg-violet-700 text-white px-2 py-1 rounded-lg font-semibold transition-colors",children:[n.jsx(Rt,{size:9})," Open Viewer"]}),n.jsxs("a",{href:s,download:!0,title:"Download .zip",className:"inline-flex items-center gap-0.5 text-[10px] text-content-secondary hover:text-content px-1.5 py-1 border border-border rounded-lg hover:border-border transition-colors",children:[n.jsx(pc,{size:9})," .zip"]})]})]})}function L5({tc:e,suiteType:t,onScreenshot:s}){var v;const[r,a]=m.useState(e.status==="failed"),[i,l]=m.useState(!1),[o,c]=m.useState(null),u=e.steps.filter(y=>y.screenshotPath).length,x=e.steps.filter(y=>y.screenshotPath),g=(t==="audit"||t==="performance")&&(e.pageLoads??[]).some(y=>!y.lighthouseError&&(y.score!=null&&y.score<50||y.a11yScore!=null&&y.a11yScore<50||y.seoScore!=null&&y.seoScore<50));return n.jsxs("div",{className:S("border-t",g?"border-red-300 bg-red-50/30":"border-border/50"),children:[n.jsxs("div",{className:S("flex items-center gap-2 px-3 py-2 cursor-pointer select-none transition-colors",g?"hover:bg-red-50/50":"hover:bg-surface-inset/50"),onClick:()=>a(y=>!y),children:[r?n.jsx(Tt,{size:11,className:"text-content-tertiary flex-shrink-0"}):n.jsx(Zt,{size:11,className:"text-content-tertiary flex-shrink-0"}),n.jsx(gm,{status:e.status}),n.jsx("span",{className:"text-xs text-content font-medium flex-1 truncate",children:e.caseName}),n.jsxs("div",{className:"flex items-center gap-1.5",onClick:y=>y.stopPropagation(),children:[n.jsxs("button",{type:"button",title:"Toggle execution timeline",onClick:()=>l(y=>!y),className:S("flex items-center gap-0.5 text-[8px] px-1.5 py-0.5 rounded ring-1 transition-colors",i?"bg-indigo-100 text-indigo-600 ring-indigo-200":"bg-surface-inset text-content-tertiary ring-border hover:text-content-secondary"),children:[n.jsx(Sn,{size:8})," timeline"]}),(((v=e.pageLoads)==null?void 0:v.length)??0)>0&&(()=>{const y=e.pageLoads,j=y.some(d=>d.score!=null||d.fcp!=null),w=y.some(d=>{var p;return d.a11yScore!=null||(((p=d.a11yAudits)==null?void 0:p.length)??0)>0}),h=y.some(d=>{var p;return d.seoScore!=null||(((p=d.seoAudits)==null?void 0:p.length)??0)>0});return n.jsxs(n.Fragment,{children:[j&&n.jsxs("button",{type:"button",onClick:d=>{d.stopPropagation(),c("performance")},title:"Page Speed (Lighthouse)",className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded-lg bg-violet-50 text-violet-600 hover:bg-violet-100 ring-1 ring-violet-200 font-semibold transition-colors flex-shrink-0",children:[n.jsx(Be,{size:9})," Speed"]}),w&&n.jsxs("button",{type:"button",onClick:d=>{d.stopPropagation(),c("accessibility")},title:"Accessibility (Lighthouse)",className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100 ring-1 ring-blue-200 font-semibold transition-colors flex-shrink-0",children:[n.jsx($u,{size:9})," A11y"]}),h&&n.jsxs("button",{type:"button",onClick:d=>{d.stopPropagation(),c("seo")},title:"SEO (Lighthouse)",className:"inline-flex items-center gap-1 text-[9px] px-2 py-0.5 rounded-lg bg-emerald-50 text-emerald-600 hover:bg-emerald-100 ring-1 ring-emerald-200 font-semibold transition-colors flex-shrink-0",children:[n.jsx(Pr,{size:9})," SEO"]})]})})(),e.device&&(()=>{const y=Dy(e.device),j=(y==null?void 0:y.category)==="mobile"?pi:(y==null?void 0:y.category)==="tablet"?oo:la,w=(y==null?void 0:y.name)??e.device;return n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-teal-600 bg-teal-50 px-1.5 py-0.5 rounded ring-1 ring-teal-200 max-w-[90px] truncate",title:w,children:[n.jsx(j,{size:8})," ",w]})})(),u>0&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-content-secondary bg-surface-inset px-1.5 py-0.5 rounded ring-1 ring-border",children:[n.jsx(Sr,{size:8})," ",u]}),e.videoPath&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-blue-600 bg-blue-50 px-1.5 py-0.5 rounded ring-1 ring-blue-200",children:[n.jsx(jc,{size:8})," video"]}),e.tracePath&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-violet-600 bg-violet-50 px-1.5 py-0.5 rounded ring-1 ring-violet-200",children:[n.jsx(Dg,{size:8})," trace"]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary tabular-nums",children:[(e.duration/1e3).toFixed(1),"s"]})]})]}),r&&n.jsxs("div",{className:"bg-surface",children:[x.length>=2&&n.jsxs("div",{className:"px-4 py-3 border-b border-border",children:[n.jsx("p",{className:"text-[10px] text-content-tertiary uppercase tracking-wider mb-2",children:"Screenshot Filmstrip"}),n.jsx(w5,{steps:e.steps,onSelect:s})]}),i&&n.jsx(S5,{steps:e.steps}),e.steps.map(y=>n.jsx(R5,{step:y,onScreenshot:s},y.stepId)),e.videoPath&&n.jsx(O5,{videoPath:e.videoPath}),e.tracePath&&n.jsx(D5,{tracePath:e.tracePath})]}),o&&n.jsx(M5,{caseName:e.caseName,pageLoads:e.pageLoads??[],focus:o,onClose:()=>c(null)})]})}function A5({runId:e}){const[t,s]=m.useState(null),{data:r,isLoading:a}=ke({queryKey:["report",e],queryFn:()=>Uo.get(e)});return a?n.jsx("div",{className:"flex items-center justify-center py-6",children:n.jsx(ce,{size:14,className:"animate-spin text-accent"})}):r?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-3.5 pb-3 space-y-2",children:r.suites.map(i=>n.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-surface-inset/50 border-b border-border",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(gm,{status:i.status}),n.jsx("span",{className:"text-xs font-semibold text-content",children:i.suiteName}),n.jsxs("span",{className:"text-[10px] text-content-tertiary",children:["· ",i.browser]})]}),n.jsxs("span",{className:"text-[10px] text-content-tertiary tabular-nums",children:[(i.duration/1e3).toFixed(1),"s"]})]}),i.cases.map(l=>n.jsx(L5,{tc:l,suiteType:i.suiteType,onScreenshot:s},l.caseId))]},i.suiteId))}),t&&n.jsx(T5,{src:t,onClose:()=>s(null)})]}):null}function F5(){const[e,t]=m.useState(""),{modalProps:s,confirmDelete:r}=zn(),a=ie(),{data:i=[],isLoading:l}=ke({queryKey:["reports"],queryFn:()=>Uo.list(30)}),o=Y({mutationFn:Uo.delete,onSuccess:()=>{a.invalidateQueries({queryKey:["reports"]}),O.success("Report deleted")},onError:f=>O.error(f.message)}),c=i.reduce((f,g)=>f+g.passed,0),u=i.reduce((f,g)=>f+g.failed,0),x=i.reduce((f,g)=>f+g.skipped,0);return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-sm shadow-blue-500/20",children:n.jsx(Sn,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Reports"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Screenshots · Video · Trace Viewer · Run Logs"})]})]}),n.jsx("div",{className:"flex items-center gap-2",children:i.length>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-surface-inset text-content-tertiary ring-border",children:[i.length," ",n.jsx("span",{className:"opacity-60 font-normal",children:"runs"})]}),n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200",children:[c," ",n.jsx("span",{className:"opacity-60 font-normal",children:"passed"})]}),n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-red-50 text-red-600 ring-red-200",children:[u," ",n.jsx("span",{className:"opacity-60 font-normal",children:"failed"})]}),x>0&&n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-amber-50 text-amber-600 ring-amber-200",children:[x," ",n.jsx("span",{className:"opacity-60 font-normal",children:"skip"})]})]})})]})}),l&&n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}),!l&&i.length===0&&n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(Sn,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No runs yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Configure and start a run first. Enable screenshot, video, and trace in Settings."})]}),n.jsx("div",{className:"space-y-2",children:i.map(f=>{const g=e===f.runId;return n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden hover:border-accent/20 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 py-2.5 cursor-pointer hover:bg-surface-inset/30 select-none transition-colors",onClick:()=>t(v=>v===f.runId?"":f.runId),children:[g?n.jsx(Tt,{size:12,className:"text-content-tertiary flex-shrink-0"}):n.jsx(Zt,{size:12,className:"text-content-tertiary flex-shrink-0"}),n.jsx(gm,{status:f.status}),f.environment&&n.jsx("span",{className:"text-[8px] px-1.5 py-0.5 rounded font-bold uppercase ring-1 bg-emerald-50 text-emerald-600 ring-emerald-200 flex-shrink-0",children:f.environment}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("p",{className:"text-[10px] font-mono text-content-secondary",children:[f.runId.slice(0,12),"…"]}),n.jsxs("p",{className:"text-[9px] text-content-tertiary flex items-center gap-1 mt-0.5",children:[n.jsx(Tr,{size:8}),Zw(new Date(f.startedAt),"MMM d, HH:mm")," · ",qo(new Date(f.startedAt),{addSuffix:!0})]})]}),n.jsxs("div",{className:"flex items-center gap-2 text-[10px] flex-shrink-0",children:[n.jsxs("span",{className:"text-emerald-600 font-semibold tabular-nums",children:[f.passed,"✓"]}),n.jsxs("span",{className:"text-red-500 font-semibold tabular-nums",children:[f.failed,"✗"]}),f.skipped>0&&n.jsxs("span",{className:"text-content-tertiary tabular-nums",children:[f.skipped,"skip"]}),n.jsx("div",{className:"w-px h-3 bg-border"}),n.jsx("span",{className:"text-content-tertiary tabular-nums",children:f.duration!=null?(f.duration/1e3).toFixed(1)+"s":"—"})]}),n.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",onClick:v=>v.stopPropagation(),children:[f.logFilePath&&n.jsx("a",{href:Ka("logs",f.logFilePath),target:"_blank",rel:"noopener noreferrer",title:"Run Log",className:"p-1 rounded-md text-emerald-500 hover:bg-emerald-50 transition-colors",children:n.jsx(mn,{size:13})}),n.jsx("a",{href:`/allure/${f.runId}`,target:"_blank",rel:"noopener noreferrer",title:"Allure Report",className:"p-1 rounded-md text-blue-500 hover:bg-blue-50 transition-colors",children:n.jsx(Sn,{size:13})}),n.jsx("button",{type:"button",title:"Delete",onClick:()=>r("Delete this report? This cannot be undone.",()=>o.mutate(f.runId)),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors",children:n.jsx(fn,{size:12})})]})]}),g&&n.jsx(A5,{runId:f.runId})]},f.runId)})})]})}),n.jsx(Pn,{...s})]})}function I5(){const[e,t]=m.useState(""),[s,r]=m.useState(""),[a,i]=m.useState(!1),[l,o]=m.useState(new Set),[c,u]=m.useState(null),[x,f]=m.useState(""),[g,v]=m.useState(!1),{modalProps:y,confirmDelete:j}=zn(),w=ie(),{data:h={},isLoading:d}=ke({queryKey:["variables"],queryFn:()=>rd.getAll()}),p=Y({mutationFn:({key:z,value:I,secret:ee})=>rd.set(z,ee?{value:I,secret:!0}:I),onSuccess:()=>{w.invalidateQueries({queryKey:["variables"]}),t(""),r(""),i(!1),u(null),O.success("Variable saved")},onError:z=>O.error(z.message)}),b=Y({mutationFn:rd.delete,onSuccess:()=>{w.invalidateQueries({queryKey:["variables"]}),O.success("Variable deleted")},onError:z=>O.error(z.message)}),N=h._system,C=Object.entries(h).filter(([z])=>z!=="_system").map(([z,I])=>typeof I=="string"?{key:z,value:I,secret:!1}:{key:z,value:I.value,secret:!0}),R=C.filter(z=>z.secret).length,P=C.filter(z=>{var I;return(I=N==null?void 0:N[z.key])==null?void 0:I.readOnly}).length,_=z=>{o(I=>{const ee=new Set(I);return ee.has(z)?ee.delete(z):ee.add(z),ee})},D=()=>{if(e.trim()){if(e.trim()==="BASE_URL"){O.error("BASE_URL is managed in Settings → Environment");return}p.mutate({key:e.trim(),value:s,secret:a})}},G=z=>{u(z.key),f(z.value),v(z.secret)},J=()=>{c&&p.mutate({key:c,value:x,secret:g})},ne=()=>{u(null),f(""),v(!1)};return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-teal-500 to-emerald-600 flex items-center justify-center shadow-sm shadow-teal-500/20",children:n.jsx(Rg,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Variables"}),n.jsxs("p",{className:"text-[10px] text-content-tertiary",children:["Global variables available in all tests as ","{{VARIABLE_NAME}}"]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-surface-inset text-content-tertiary ring-border",children:[C.length," ",n.jsx("span",{className:"opacity-60 font-normal",children:"total"})]}),R>0&&n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-amber-50 text-amber-600 ring-amber-200",children:[n.jsx(sd,{size:7})," ",R," ",n.jsx("span",{className:"opacity-60 font-normal",children:"secret"})]}),P>0&&n.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-semibold px-2 py-0.5 rounded-md ring-1 bg-blue-50 text-blue-600 ring-blue-200",children:[n.jsx(Bu,{size:7})," ",P," ",n.jsx("span",{className:"opacity-60 font-normal",children:"system"})]})]})]}),n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsxs("div",{className:"relative",children:[n.jsx(tf,{size:10,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{className:"w-full text-xs font-mono uppercase tracking-wide border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"VARIABLE_NAME",value:e,onChange:z=>t(z.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,"_")),onKeyDown:z=>z.key==="Enter"&&D()})]})}),n.jsx("div",{className:"flex-[2] min-w-0",children:n.jsx("input",{type:a?"password":"text",className:"w-full text-xs border border-border rounded-lg px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface placeholder-content-tertiary",placeholder:"variable value",value:s,onChange:z=>r(z.target.value),onKeyDown:z=>z.key==="Enter"&&D()})}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[n.jsxs("label",{className:"flex items-center gap-1.5 text-[9px] text-content-tertiary cursor-pointer select-none",children:[n.jsx(Wo,{checked:a,onChange:i}),n.jsx(sd,{size:9})]}),n.jsxs(se,{size:"sm",onClick:D,loading:p.isPending&&!c,disabled:!e.trim(),children:[n.jsx(Cn,{size:10})," Add"]})]})]})]}),n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:d?n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}):C.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx("div",{className:"w-11 h-11 rounded-xl bg-surface-inset flex items-center justify-center",children:n.jsx(tf,{size:20,className:"text-content-tertiary"})}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No variables yet"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Add your first variable using the toolbar above"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-[1fr_2fr_80px_80px] gap-2 px-3.5 py-2 bg-surface-inset/50 border-b border-border",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Key"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Value"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest text-center",children:"Type"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest text-center",children:"Actions"})]}),n.jsx("div",{className:"max-h-[500px] overflow-y-auto divide-y divide-border/50",children:C.map(z=>{var E,K,M;const I=((E=N==null?void 0:N[z.key])==null?void 0:E.readOnly)===!0,ee=(M=(K=N==null?void 0:N[z.key])==null?void 0:K.environment)==null?void 0:M.toUpperCase(),ae=c===z.key;return n.jsxs("div",{className:S("grid grid-cols-[1fr_2fr_80px_80px] gap-2 px-3.5 py-2 items-center transition-colors",ae?"bg-accent/[0.02]":"hover:bg-surface-inset/40"),children:[n.jsx("span",{className:"text-[10px] font-mono text-accent font-medium truncate",children:`{{${z.key}}}`}),n.jsx("div",{className:"min-w-0",children:ae?n.jsx("input",{type:g?"password":"text",className:"w-full text-[10px] font-mono border border-accent/40 rounded-lg px-2 py-1 focus:outline-none focus:ring-2 focus:ring-accent/30 bg-surface",value:x,onChange:W=>f(W.target.value),onKeyDown:W=>{W.key==="Enter"&&J(),W.key==="Escape"&&ne()},autoFocus:!0}):n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("span",{className:"text-[10px] font-mono text-content-secondary truncate",children:z.secret&&!l.has(z.key)?"••••••••":z.value}),z.secret&&n.jsx("button",{type:"button",onClick:()=>_(z.key),className:"text-content-tertiary hover:text-content-secondary flex-shrink-0 p-0.5",children:l.has(z.key)?n.jsx(cN,{size:9}):n.jsx(Og,{size:9})})]})}),n.jsx("div",{className:"text-center",children:I?n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[8px] bg-blue-50 text-blue-600 px-1.5 py-0.5 rounded ring-1 ring-blue-200 font-medium",children:[n.jsx(Bu,{size:7})," ",ee??"sys"]}):z.secret?n.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[8px] bg-amber-50 text-amber-600 px-1.5 py-0.5 rounded ring-1 ring-amber-200 font-medium",children:[n.jsx(sd,{size:7})," secret"]}):n.jsx("span",{className:"text-[8px] text-content-tertiary",children:"plain"})}),n.jsx("div",{className:"flex items-center gap-0.5 justify-center",children:I?n.jsx("span",{className:"text-[8px] text-content-tertiary italic",children:"read-only"}):ae?n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:J,title:"Save",className:"p-1 rounded-md text-emerald-500 hover:bg-emerald-50 transition-colors",children:n.jsx(He,{size:11})}),n.jsx("button",{type:"button",onClick:ne,title:"Cancel",className:"p-1 rounded-md text-content-tertiary hover:bg-surface-inset transition-colors",children:n.jsx(Se,{size:11})})]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:()=>G(z),title:"Edit",className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",children:n.jsx(Rr,{size:10})}),n.jsx("button",{type:"button",title:"Delete",onClick:()=>j(`Delete "${z.key}"?`,()=>b.mutate(z.key)),className:"p-1 rounded-md text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors",children:n.jsx(fn,{size:10})})]})})]},z.key)})})]})})]})}),n.jsx(Pn,{...y})]})}function Ay({children:e,className:t,padding:s=!0}){return n.jsx("div",{className:S("bg-surface rounded-xl border border-border shadow-card transition-shadow duration-200",s&&"p-5",t),children:e})}const _5={blue:{bg:"bg-blue-50",border:"border-blue-200/60",value:"text-blue-600",icon:"text-blue-500",glow:"shadow-blue-100/50"},teal:{bg:"bg-teal-50",border:"border-teal-200/60",value:"text-teal-600",icon:"text-teal-500",glow:"shadow-teal-100/50"},green:{bg:"bg-green-50",border:"border-green-200/60",value:"text-green-600",icon:"text-green-500",glow:"shadow-green-100/50"},orange:{bg:"bg-orange-50",border:"border-orange-200/60",value:"text-orange-600",icon:"text-orange-500",glow:"shadow-orange-100/50"},rose:{bg:"bg-rose-50",border:"border-rose-200/60",value:"text-rose-500",icon:"text-rose-400",glow:"shadow-rose-100/50"},red:{bg:"bg-red-50",border:"border-red-200/60",value:"text-red-600",icon:"text-red-500",glow:"shadow-red-100/50"},purple:{bg:"bg-purple-50",border:"border-purple-200/60",value:"text-purple-600",icon:"text-purple-500",glow:"shadow-purple-100/50"}};function Ul({label:e,value:t,sub:s,color:r,icon:a}){const i=r?_5[r]:null;return n.jsxs("div",{className:S("rounded-xl border px-4 py-3.5 flex items-center gap-3.5 transition-all duration-200",i?`${i.bg} ${i.border}`:"bg-surface border-border"),children:[a&&n.jsx("div",{className:S("flex items-center justify-center w-9 h-9 rounded-lg flex-shrink-0",i?`${i.bg} ${i.icon}`:"bg-surface-inset text-content-tertiary"),children:a}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-content-tertiary leading-none",children:e}),n.jsx("p",{className:S("font-bold mt-1.5 leading-none",typeof t=="string"&&t.length>3?"text-sm":"text-lg",i?i.value:"text-content"),children:t}),s&&n.jsx("p",{className:"text-[11px] text-content-tertiary mt-1",children:s})]})]})}const $5={1:"Smart Retry",2:"AI Regeneration",3:"Multi-Selector",4:"Visual/SoM",5:"Decompose",6:"Manual"};function U5({event:e}){const t=ie(),{modalProps:s,confirmDelete:r}=zn(),a=Y({mutationFn:()=>Bn.accept(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:["healing"]}),O.success("Healing accepted — test file updated")},onError:o=>O.error(o.message)}),i=Y({mutationFn:()=>Bn.reject(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:["healing"]}),O("Healing rejected")},onError:o=>O.error(o.message)}),l=Y({mutationFn:()=>Bn.delete(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:["healing"]}),O.success("Event deleted")},onError:o=>O.error(o.message)});return n.jsxs(n.Fragment,{children:[n.jsxs(Ay,{className:"overflow-hidden",padding:!1,children:[n.jsxs("div",{className:"px-4 py-3 border-b border-border bg-surface-inset flex items-center gap-3",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-content-secondary truncate",children:e.instruction}),n.jsxs("p",{className:"text-xs text-content-tertiary mt-0.5",children:["Case: ",e.caseId," · Level ",e.level,": ",$5[e.level]??"Unknown"]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[n.jsx(Ly,{label:e.status,color:e.status==="pending"?"bg-yellow-100 text-yellow-700":e.status==="accepted"?"bg-green-100 text-green-700":"bg-slate-100 text-content-secondary"}),n.jsx("button",{type:"button",onClick:()=>r("Delete this healing event? This cannot be undone.",()=>l.mutate()),disabled:l.isPending,className:"p-1 text-content-tertiary hover:text-red-500 transition-colors",title:"Delete event",children:n.jsx(fn,{size:13})})]})]}),n.jsxs("div",{className:"grid grid-cols-2 divide-x divide-border-muted",children:[n.jsxs("div",{className:"p-3",children:[n.jsx("p",{className:"text-xs font-semibold text-red-500 mb-1",children:"Before (failed)"}),n.jsx("pre",{className:"text-xs font-mono text-content-secondary bg-red-50 rounded p-2 overflow-x-auto whitespace-pre-wrap break-all max-h-32",children:e.failedCode||"// (no code)"})]}),n.jsxs("div",{className:"p-3",children:[n.jsx("p",{className:"text-xs font-semibold text-green-600 mb-1",children:"After (healed)"}),n.jsx("pre",{className:"text-xs font-mono text-content-secondary bg-green-50 rounded p-2 overflow-x-auto whitespace-pre-wrap break-all max-h-32",children:e.healedCode})]})]}),e.status==="pending"&&n.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-t border-border bg-surface-inset",children:[n.jsxs(se,{size:"sm",onClick:()=>a.mutate(),loading:a.isPending,children:[n.jsx(He,{size:13})," Accept & Update File"]}),n.jsxs(se,{variant:"secondary",size:"sm",onClick:()=>i.mutate(),loading:i.isPending,children:[n.jsx(Se,{size:13})," Reject"]})]})]}),n.jsx(Pn,{...s})]})}function Sd({title:e,events:t}){return n.jsxs("div",{className:"mb-8",children:[n.jsxs("h2",{className:"text-sm font-semibold text-content-secondary mb-3",children:[e," (",t.length,")"]}),n.jsx("div",{className:"space-y-3 max-h-[680px] overflow-y-auto pr-1",children:t.map(s=>n.jsx(U5,{event:s},s.id))})]})}function B5(){const e=ie(),{modalProps:t,confirmDelete:s}=zn(),{data:r=[],isLoading:a}=ke({queryKey:["healing","pending"],queryFn:()=>Bn.pending()}),{data:i}=ke({queryKey:["healing","stats"],queryFn:()=>Bn.stats()}),{data:l=[]}=ke({queryKey:["healing"],queryFn:()=>Bn.list()}),o=Y({mutationFn:Bn.acceptAll,onSuccess:y=>{e.invalidateQueries({queryKey:["healing"]}),O.success(`Accepted ${y.accepted} heal(s)`)},onError:y=>O.error(y.message)}),c=Y({mutationFn:Bn.deleteAll,onSuccess:y=>{e.invalidateQueries({queryKey:["healing"]}),O.success(`Cleared ${y.deleted} event(s)`)},onError:y=>O.error(y.message)}),u=(y,j)=>y.createdAt<j.createdAt?1:-1,x=[...r].sort(u),f=[...l.filter(y=>y.status==="accepted")].sort(u),g=[...l.filter(y=>y.status==="rejected")].sort(u),v=()=>{s("Delete all healing events? This cannot be undone.",()=>c.mutate())};return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsxs("div",{className:"flex-shrink-0 px-6 py-4 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h1",{className:"text-xl font-bold text-content flex items-center gap-2",children:[n.jsx($o,{size:20,className:"text-accent"})," Self-Healing"]}),n.jsx("p",{className:"text-sm text-content-tertiary mt-0.5",children:"Review AI-generated fixes for broken test steps"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[l.length>0&&n.jsxs(se,{variant:"secondary",onClick:v,loading:c.isPending,children:[n.jsx(SN,{size:14})," Delete All"]}),r.length>0&&n.jsxs(se,{onClick:()=>o.mutate(),loading:o.isPending,children:[n.jsx(Mg,{size:15})," Accept All (",r.length,")"]})]})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[i&&n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(Ul,{label:"Total Events",value:i.total,color:"blue"}),n.jsx(Ul,{label:"Pending Review",value:i.pending,color:"orange"}),n.jsx(Ul,{label:"Accepted",value:i.accepted,color:"green"}),n.jsx(Ul,{label:"Rejected",value:i.rejected,color:"purple"})]}),a&&n.jsx("p",{className:"text-sm text-content-tertiary text-center py-12",children:"Loading…"}),x.length>0&&n.jsx(Sd,{title:"Pending Review",events:x}),!a&&r.length===0&&n.jsxs(Ay,{className:"text-center py-12 mb-6",children:[n.jsx($o,{size:32,className:"text-slate-200 mx-auto mb-3"}),n.jsx("p",{className:"text-content-secondary font-medium",children:"No pending heals"}),n.jsx("p",{className:"text-content-tertiary text-sm mt-1",children:"Self-healing events appear here when tests fail and AI generates a fix"})]}),f.length>0&&n.jsx(Sd,{title:"Accepted",events:f}),g.length>0&&n.jsx(Sd,{title:"Rejected",events:g})]}),n.jsx(Pn,{...t})]})}function rn({label:e,hint:t,children:s}){return n.jsxs("div",{className:"flex items-start gap-4 py-2.5 border-b border-border/50 last:border-0",children:[n.jsxs("div",{className:"w-40 flex-shrink-0 pt-0.5",children:[n.jsx("p",{className:"text-[11px] font-semibold text-content-secondary",children:e}),t&&n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5 leading-relaxed",children:t})]}),n.jsx("div",{className:"flex-1 min-w-0",children:s})]})}function Vr({label:e,hint:t,checked:s,onChange:r}){return n.jsxs("div",{className:"flex items-start gap-3 py-2.5 border-b border-border/50 last:border-0",children:[n.jsx("div",{className:"pt-0.5 flex-shrink-0",children:n.jsx(Wo,{checked:s,onChange:r})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[11px] font-semibold text-content-secondary",children:e}),t&&n.jsx("p",{className:"text-[10px] text-content-tertiary mt-0.5",children:t})]})]})}function Js({icon:e,iconBg:t,title:s,desc:r,children:a}){return n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2.5 border-b border-border flex items-center gap-2.5",children:[n.jsx("div",{className:S("w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 shadow-sm",t),children:n.jsx(e,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-xs font-bold text-content",children:s}),r&&n.jsx("p",{className:"text-[9px] text-content-tertiary",children:r})]})]}),n.jsx("div",{className:"px-4 py-1",children:a})]})}function ds(e){return n.jsx("input",{...e,className:S("border border-border rounded-lg px-2.5 py-1.5 text-xs bg-surface text-content-secondary","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40",e.className)})}function gi({value:e,onChange:t,options:s,className:r}){return n.jsx("select",{value:e,onChange:a=>t(a.target.value),className:S("border border-border rounded-lg px-2.5 py-1.5 text-xs bg-surface text-content-secondary","focus:outline-none focus:ring-2 focus:ring-accent/30",r),children:s.map(a=>n.jsx("option",{value:a.value,children:a.label},a.value))})}const Cd=[{label:"Standard (1280×720)",width:1280,height:720},{label:"Laptop (1366×768)",width:1366,height:768},{label:"Full HD (1920×1080)",width:1920,height:1080},{label:"Mobile (390×844)",width:390,height:844},{label:"Tablet (768×1024)",width:768,height:1024},{label:"Custom",width:0,height:0}];function H5({viewport:e,onChange:t}){const s=Cd.find(i=>i.width===e.width&&i.height===e.height),r=(s==null?void 0:s.label)??"Custom",a=i=>{const l=Cd.find(o=>o.label===i);l&&l.width!==0&&t({width:l.width,height:l.height})};return n.jsx(rn,{label:"Viewport",hint:"Browser window size",children:n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx(gi,{className:"w-44",value:r,onChange:a,options:Cd.map(i=>({value:i.label,label:i.label}))}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(ds,{type:"number",className:"w-16",value:e.width,min:320,onChange:i=>t({...e,width:Number(i.target.value)})}),n.jsx("span",{className:"text-content-tertiary text-[10px]",children:"×"}),n.jsx(ds,{type:"number",className:"w-16",value:e.height,min:240,onChange:i=>t({...e,height:Number(i.target.value)})}),n.jsx("span",{className:"text-[9px] text-content-tertiary",children:"px"})]})]})})}function q5(){var g,v,y,j,w,h;const e=ie(),{data:t,isLoading:s}=ke({queryKey:["config"],queryFn:()=>Ia.get()}),[r,a]=m.useState({}),[i,l]=m.useState(!1),[o,c]=m.useState({name:"",environment:"stage",baseUrl:"",browsers:["chromium"]});m.useEffect(()=>{t&&a(t)},[t]);const u=Y({mutationFn:()=>Ia.update(r),onSuccess:()=>{e.invalidateQueries({queryKey:["config"]}),O.success("Settings saved")},onError:d=>O.error(d.message)}),x=(d,p)=>a(b=>({...b,[d]:p})),f=d=>{const p=r.browsers??[];x("browsers",p.includes(d)?p.length>1?p.filter(b=>b!==d):p:[...p,d])};return s||!r.healing||!r.reporting?n.jsx("div",{className:"flex h-full items-center justify-center",children:n.jsx(ce,{size:20,className:"animate-spin text-accent"})}):n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-violet-600 flex items-center justify-center shadow-sm shadow-indigo-500/20",children:n.jsx(Aa,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Settings"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Configure Assuremind Studio"})]})]}),n.jsxs(se,{size:"sm",onClick:()=>u.mutate(),loading:u.isPending,children:[n.jsx(Kg,{size:11})," Save Settings"]})]})}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[n.jsxs("div",{className:"space-y-3",children:[n.jsxs(Js,{icon:vN,iconBg:"bg-gradient-to-br from-indigo-500 to-violet-600 shadow-indigo-500/20",title:"Environment",desc:"Target environment & URLs",children:[n.jsx(rn,{label:"Active Environment",hint:"Where tests run against",children:n.jsx("div",{className:"flex gap-1 flex-wrap",children:["dev","stage","test","prod"].map(d=>n.jsx("button",{type:"button",onClick:()=>{var b;x("environment",d);const p=(b=r.environmentUrls)==null?void 0:b[d];p&&x("baseUrl",p)},className:S("px-2.5 py-1 rounded-lg text-[10px] font-semibold uppercase tracking-wide transition-all",r.environment===d?"bg-accent text-white shadow-sm shadow-accent/20":"text-content-tertiary hover:text-content-secondary bg-surface-inset ring-1 ring-border"),children:d},d))})}),n.jsx(rn,{label:"Environment URLs",hint:"Base URL per environment",children:n.jsx("div",{className:"space-y-1.5",children:["dev","stage","test","prod"].map(d=>{var p;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:S("w-11 text-[9px] font-bold uppercase text-center py-0.5 rounded",r.environment===d?"bg-accent/10 text-accent ring-1 ring-accent/20":"bg-surface-inset text-content-tertiary ring-1 ring-border"),children:d}),n.jsx(ds,{className:"flex-1",placeholder:`https://${d}.example.com`,value:((p=r.environmentUrls)==null?void 0:p[d])??"",onChange:b=>{const N={...r.environmentUrls??{dev:"",stage:"",test:"",prod:""},[d]:b.target.value};x("environmentUrls",N),r.environment===d&&x("baseUrl",b.target.value)}})]},d)})})}),n.jsx(rn,{label:"Base URL",hint:"Auto-resolved from active env",children:n.jsx(ds,{className:"w-full bg-surface-inset/50 text-content-tertiary cursor-not-allowed",placeholder:"http://localhost:3000",value:r.baseUrl??"",readOnly:!0,disabled:!0})})]}),n.jsxs(Js,{icon:Aa,iconBg:"bg-gradient-to-br from-slate-500 to-slate-700 shadow-slate-500/20",title:"Execution",desc:"Timeouts, retries & parallelism",children:[n.jsx(rn,{label:"Timeouts & Workers",hint:"Per-test limits",children:n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] text-content-tertiary mb-0.5",children:"Timeout (ms)"}),n.jsx(ds,{type:"number",className:"w-24",value:r.timeout??3e4,onChange:d=>x("timeout",Number(d.target.value))})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] text-content-tertiary mb-0.5",children:"Retries"}),n.jsx(ds,{type:"number",min:0,max:5,className:"w-16",value:r.retries??1,onChange:d=>x("retries",Number(d.target.value))})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[9px] text-content-tertiary mb-0.5",children:"Workers"}),n.jsx(ds,{type:"number",min:1,max:10,className:"w-16",value:r.parallel??2,onChange:d=>x("parallel",Number(d.target.value))})]})]})}),n.jsx(rn,{label:"Page load strategy",hint:"Playwright wait after each step",children:n.jsx(gi,{className:"w-full",value:r.pageLoad??"domcontentloaded",onChange:d=>x("pageLoad",d),options:[{value:"commit",label:"commit — first network response"},{value:"domcontentloaded",label:"domcontentloaded — DOM ready"},{value:"load",label:"load — full page load event"},{value:"networkidle",label:"networkidle — no network 500ms"}]})})]}),n.jsxs(Js,{icon:om,iconBg:"bg-gradient-to-br from-amber-500 to-orange-600 shadow-amber-500/20",title:"Self-Healing",desc:"AI-powered selector recovery",children:[n.jsx(Vr,{label:"Enable self-healing",hint:"Auto-fix broken selectors during runs",checked:((g=r.healing)==null?void 0:g.enabled)??!0,onChange:d=>x("healing",{...r.healing,enabled:d})}),n.jsx(rn,{label:"Max healing level",hint:"1 = smart retry · 6 = full AI visual",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ds,{type:"number",min:1,max:6,className:"w-16",value:((v=r.healing)==null?void 0:v.maxLevel)??6,onChange:d=>x("healing",{...r.healing,maxLevel:Number(d.target.value)})}),n.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5,6].map(d=>{var p;return n.jsx("div",{className:S("w-4 h-1.5 rounded-full transition-colors",d<=(((p=r.healing)==null?void 0:p.maxLevel)??6)?"bg-amber-400":"bg-surface-inset")},d)})})]})}),n.jsx(Vr,{label:"Auto-PR on CI heal",hint:"GitHub PR when selector healed in CI",checked:((y=r.healing)==null?void 0:y.autoPR)??!1,onChange:d=>x("healing",{...r.healing,autoPR:d})})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs(Js,{icon:Er,iconBg:"bg-gradient-to-br from-blue-500 to-cyan-600 shadow-blue-500/20",title:"General",desc:"Browser & display settings",children:[n.jsx(rn,{label:"Browsers",hint:"One or more browsers",children:n.jsx("div",{className:"flex gap-1 flex-wrap",children:Jg.map(d=>n.jsx("button",{type:"button",onClick:()=>f(d),className:S("px-2.5 py-1 rounded-lg text-[10px] font-semibold capitalize transition-all",(r.browsers??[]).includes(d)?"bg-accent/10 text-accent ring-1 ring-accent/30":"text-content-tertiary bg-surface-inset ring-1 ring-border hover:text-content-secondary"),children:d},d))})}),n.jsx(Vr,{label:"Headless mode",hint:"Run browsers without visible window",checked:r.headless??!0,onChange:d=>x("headless",d)}),n.jsx(H5,{viewport:r.viewport??{width:1280,height:720},onChange:d=>x("viewport",d)})]}),n.jsxs(Js,{icon:Sr,iconBg:"bg-gradient-to-br from-pink-500 to-rose-600 shadow-pink-500/20",title:"Capture",desc:"Screenshots, video & traces",children:[n.jsx(rn,{label:"Screenshot",hint:"When to capture screenshots",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Sr,{size:11,className:"text-pink-400 flex-shrink-0"}),n.jsx(gi,{className:"w-40",value:r.screenshot??"only-on-failure",onChange:d=>x("screenshot",d),options:[{value:"off",label:"Off"},{value:"on",label:"Every test"},{value:"only-on-failure",label:"On failure only"}]})]})}),n.jsx(rn,{label:"Video",hint:"When to record video",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(jc,{size:11,className:"text-violet-400 flex-shrink-0"}),n.jsx(gi,{className:"w-40",value:r.video??"off",onChange:d=>x("video",d),options:[{value:"off",label:"Off"},{value:"on",label:"Every test"},{value:"on-first-retry",label:"On first retry"},{value:"retain-on-failure",label:"On failure only"}]})]})}),n.jsx(rn,{label:"Trace",hint:"Playwright trace for debugging",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Wg,{size:11,className:"text-emerald-400 flex-shrink-0"}),n.jsx(gi,{className:"w-40",value:r.trace??"on-first-retry",onChange:d=>x("trace",d),options:[{value:"off",label:"Off"},{value:"on",label:"Every test"},{value:"on-first-retry",label:"On first retry"},{value:"retain-on-failure",label:"On failure only"}]})]})})]}),n.jsx(Js,{icon:Er,iconBg:"bg-gradient-to-br from-teal-500 to-cyan-600 shadow-teal-500/20",title:"Environment Profiles",desc:"Quick-switch presets for different environments",children:n.jsxs("div",{id:"profiles",className:"space-y-2",children:[(r.profiles??[]).length===0&&n.jsx("p",{className:"text-[10px] text-content-tertiary py-2",children:"No profiles defined. Add one below."}),(r.profiles??[]).map((d,p)=>n.jsxs("div",{className:"flex items-center gap-2 py-1.5 border-b border-border/40 last:border-0",children:[n.jsx("span",{className:"text-xs font-medium text-content w-24 truncate",children:d.name}),n.jsx("span",{className:"text-[10px] text-content-tertiary w-14",children:d.environment}),n.jsx("span",{className:"text-[10px] text-content-tertiary flex-1 truncate",children:d.baseUrl}),n.jsx("button",{type:"button",onClick:()=>{const b=(r.profiles??[]).filter((N,C)=>C!==p);x("profiles",b)},className:"p-1 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50 transition-colors flex-shrink-0",children:n.jsx(fn,{size:11})})]},p)),i?n.jsxs("div",{className:"mt-2 p-3 rounded-lg border border-border bg-surface-alt space-y-2",children:[n.jsx("p",{className:"text-[10px] font-semibold text-content-secondary",children:"New Profile"}),n.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Name"}),n.jsx("input",{type:"text",value:o.name,onChange:d=>c(p=>({...p,name:d.target.value})),placeholder:"e.g. Staging",className:"w-full mt-0.5 px-2 py-1 text-[11px] rounded border border-border bg-surface focus:outline-none focus:ring-1 focus:ring-accent"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Environment"}),n.jsxs("select",{value:o.environment,onChange:d=>c(p=>({...p,environment:d.target.value})),className:"w-full mt-0.5 px-2 py-1 text-[11px] rounded border border-border bg-surface focus:outline-none focus:ring-1 focus:ring-accent",children:[n.jsx("option",{value:"dev",children:"dev"}),n.jsx("option",{value:"stage",children:"stage"}),n.jsx("option",{value:"test",children:"test"}),n.jsx("option",{value:"prod",children:"prod"})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Base URL"}),n.jsx("input",{type:"url",value:o.baseUrl,onChange:d=>c(p=>({...p,baseUrl:d.target.value})),placeholder:"https://your-app.com",className:"w-full mt-0.5 px-2 py-1 text-[11px] rounded border border-border bg-surface focus:outline-none focus:ring-1 focus:ring-accent"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] text-content-tertiary uppercase tracking-wide",children:"Browsers"}),n.jsx("div",{className:"flex gap-3 mt-1",children:["chromium","firefox","webkit"].map(d=>n.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-content-secondary cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:o.browsers.includes(d),onChange:p=>c(b=>({...b,browsers:p.target.checked?[...b.browsers,d]:b.browsers.filter(N=>N!==d)})),className:"rounded"}),d]},d))})]}),n.jsxs("div",{className:"flex gap-2 pt-1",children:[n.jsx("button",{type:"button",onClick:()=>{if(!o.name.trim()){O.error("Profile name is required");return}if(!o.baseUrl.startsWith("http")){O.error("Base URL must start with http:// or https://");return}if(o.browsers.length===0){O.error("Select at least one browser");return}x("profiles",[...r.profiles??[],{name:o.name.trim(),environment:o.environment,baseUrl:o.baseUrl,browsers:o.browsers}]),c({name:"",environment:"stage",baseUrl:"",browsers:["chromium"]}),l(!1)},className:"px-2.5 py-1 text-[10px] font-medium rounded bg-accent text-white hover:bg-accent-dark transition-colors",children:"Add"}),n.jsx("button",{type:"button",onClick:()=>{l(!1),c({name:"",environment:"stage",baseUrl:"",browsers:["chromium"]})},className:"px-2.5 py-1 text-[10px] rounded border border-border text-content-secondary hover:bg-surface-alt transition-colors",children:"Cancel"})]})]}):n.jsxs("button",{type:"button",onClick:()=>l(!0),className:"inline-flex items-center gap-1 text-[10px] text-accent hover:text-accent-dark py-1 transition-colors",children:[n.jsx(Cn,{size:11})," Add Profile"]})]})}),n.jsxs(Js,{icon:Sn,iconBg:"bg-gradient-to-br from-indigo-500 to-blue-600 shadow-indigo-500/20",title:"Reporting",desc:"Output format & destinations",children:[n.jsx(Vr,{label:"Allure report",hint:"Interactive HTML report with history & trends",checked:((j=r.reporting)==null?void 0:j.allure)??!0,onChange:d=>x("reporting",{...r.reporting,allure:d})}),n.jsx(Vr,{label:"HTML report",hint:"Standalone summary saved to results/",checked:((w=r.reporting)==null?void 0:w.html)??!0,onChange:d=>x("reporting",{...r.reporting,html:d})}),n.jsx(Vr,{label:"JSON report",hint:"Machine-readable run data",checked:((h=r.reporting)==null?void 0:h.json)??!0,onChange:d=>x("reporting",{...r.reporting,json:d})})]})]})]})]})})})}function K5(){const e=ie(),{modalProps:t,confirmDelete:s}=zn(),[r,a]=m.useState(!1),[i,l]=m.useState(""),[o,c]=m.useState(""),[u,x]=m.useState(""),[f,g]=m.useState(null),[v,y]=m.useState({}),{data:j=[],isLoading:w}=ke({queryKey:["step-library"],queryFn:()=>oa.list()}),h=Y({mutationFn:()=>oa.create({name:i.trim(),instruction:o.trim(),tags:u.split(",").map(b=>b.trim()).filter(Boolean)}),onSuccess:()=>{e.invalidateQueries({queryKey:["step-library"]}),O.success("Step created"),a(!1),l(""),c(""),x("")},onError:b=>O.error(b.message)}),d=Y({mutationFn:({id:b,data:N})=>oa.update(b,N),onSuccess:()=>{e.invalidateQueries({queryKey:["step-library"]}),O.success("Step updated"),g(null)},onError:b=>O.error(b.message)}),p=Y({mutationFn:b=>oa.delete(b),onSuccess:()=>{e.invalidateQueries({queryKey:["step-library"]}),O.success("Step deleted")},onError:b=>O.error(b.message)});return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:[n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-4xl mx-auto px-5 py-4 space-y-3",children:[n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center shadow-sm shadow-violet-500/20",children:n.jsx(Gi,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Step Library"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Reusable step templates for your test cases"})]})]}),n.jsxs("button",{type:"button",onClick:()=>a(b=>!b),className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors",children:[n.jsx(Cn,{size:13})," Add Step"]})]})}),r&&n.jsxs("div",{className:"rounded-xl border border-accent/30 bg-surface p-4 space-y-2.5",children:[n.jsx("p",{className:"text-xs font-semibold text-content",children:"New Library Step"}),n.jsx("input",{type:"text",placeholder:"Name (e.g. Login as admin)",value:i,onChange:b=>l(b.target.value),className:"w-full px-3 py-2 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30"}),n.jsx("textarea",{placeholder:"Instruction (e.g. Click the login button and fill in admin credentials)",value:o,onChange:b=>c(b.target.value),rows:3,className:"w-full px-3 py-2 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30 resize-none"}),n.jsx("input",{type:"text",placeholder:"Tags (comma-separated, optional)",value:u,onChange:b=>x(b.target.value),className:"w-full px-3 py-2 text-xs border border-border rounded-lg focus:outline-none focus:ring-1 focus:ring-accent/30"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button",onClick:()=>h.mutate(),disabled:!i.trim()||!o.trim()||h.isPending,className:"text-xs px-4 py-1.5 rounded-lg bg-accent text-white hover:brightness-110 transition-colors disabled:opacity-50",children:h.isPending?"Saving…":"Save"}),n.jsx("button",{type:"button",onClick:()=>a(!1),className:"text-xs px-3 py-1.5 rounded-lg border border-border text-content-secondary hover:bg-surface-inset",children:"Cancel"})]})]}),w&&n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(ce,{size:18,className:"animate-spin text-accent"})}),!w&&j.length===0&&!r&&n.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-surface flex flex-col items-center justify-center py-14 gap-2.5",children:[n.jsx(Gi,{size:24,className:"text-content-tertiary"}),n.jsx("p",{className:"text-xs font-medium text-content-secondary",children:"No steps in library"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:'Click "Add Step" to create your first reusable step template.'})]}),j.length>0&&n.jsx("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:n.jsxs("table",{className:"w-full text-xs",children:[n.jsx("thead",{className:"bg-surface-inset/50 border-b border-border",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left px-4 py-2.5 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Name"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Instruction"}),n.jsx("th",{className:"text-left px-4 py-2.5 text-[10px] font-semibold text-content-tertiary uppercase tracking-wider",children:"Tags"}),n.jsx("th",{className:"px-4 py-2.5 w-20"})]})}),n.jsx("tbody",{className:"divide-y divide-border",children:j.map(b=>n.jsxs("tr",{className:"hover:bg-surface-inset/30 transition-colors",children:[n.jsx("td",{className:"px-4 py-2.5 font-medium text-content",children:f===b.id?n.jsx("input",{type:"text",value:v.name??b.name,onChange:N=>y(C=>({...C,name:N.target.value})),className:"w-full px-2 py-1 border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-accent/30"}):b.name}),n.jsx("td",{className:"px-4 py-2.5 text-content-secondary max-w-xs",children:f===b.id?n.jsx("textarea",{value:v.instruction??b.instruction,onChange:N=>y(C=>({...C,instruction:N.target.value})),rows:2,className:"w-full px-2 py-1 border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-accent/30 resize-none"}):n.jsx("span",{className:"line-clamp-2",children:b.instruction})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"flex flex-wrap gap-0.5",children:b.tags.map(N=>n.jsx("span",{className:"text-[8px] px-1 py-px rounded bg-accent/8 text-accent ring-1 ring-accent/15",children:N},N))})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"flex items-center gap-1",children:f===b.id?n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:()=>d.mutate({id:b.id,data:v}),className:"p-1 rounded text-emerald-600 hover:bg-emerald-50",children:n.jsx(He,{size:12})}),n.jsx("button",{type:"button",onClick:()=>g(null),className:"p-1 rounded text-content-tertiary hover:bg-surface-inset",children:n.jsx(Se,{size:12})})]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:()=>{g(b.id),y({name:b.name,instruction:b.instruction,tags:b.tags})},className:"p-1 rounded text-content-tertiary hover:text-content hover:bg-surface-inset",children:n.jsx(Rr,{size:12})}),n.jsx("button",{type:"button",onClick:()=>s(`Delete "${b.name}"?`,()=>p.mutate(b.id)),className:"p-1 rounded text-content-tertiary hover:text-red-500 hover:bg-red-50",children:n.jsx(fn,{size:12})})]})})})]},b.id))})]})})]})}),n.jsx(Pn,{...t})]})}const yi=[{id:"getting-started",title:"Getting Started",category:"Getting Started",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Assuremind Studio is an AI-powered test automation platform for web applications. It lets you describe tests in plain English, generate Playwright code automatically, and run them in the cloud or locally."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Prerequisites"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Node.js 18+"}),n.jsx("li",{children:"An AI provider API key (Anthropic, OpenAI, Google, or Azure)"}),n.jsx("li",{children:"A test target application URL"})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Quick Setup"}),n.jsx("pre",{className:"text-[11px] bg-surface-inset rounded-lg px-4 py-3 overflow-x-auto border border-border font-mono",children:`npm install
|
|
799
|
+
npm run build
|
|
800
|
+
npm start`}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open ",n.jsx("code",{className:"text-accent",children:"http://localhost:4000"})," to access the Studio UI. The first run triggers the onboarding wizard."]})]})},{id:"configuration",title:"Configuration",category:"Getting Started",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Configuration is stored in ",n.jsx("code",{className:"text-accent",children:"tests/autotest.config.json"})," and editable from the Settings page."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Key Settings"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Field"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Description"})]})}),n.jsx("tbody",{className:"text-content-secondary",children:[["baseUrl","Default URL for all test cases"],["environment","Active environment: dev | stage | test | prod"],["browsers","List of browsers: chromium, firefox, webkit"],["headless","Run browsers without a visible window"],["timeout","Global step timeout in ms (default 30000)"],["retries","Global retry count per step (default 0)"],["parallel","Number of parallel workers"],["screenshot","Screenshot mode: always | on-failure | never"]].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4 font-mono text-accent",children:e}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})})]})},{id:"test-suites",title:"Test Suites",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Test Suites group related test cases. Each suite has a type (",n.jsx("strong",{children:"UI"}),", ",n.jsx("strong",{children:"API"}),", or ",n.jsx("strong",{children:"Audit"}),"), tags, and an optional timeout override."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Suite Types"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Type"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Description"})]})}),n.jsx("tbody",{className:"text-content-secondary",children:[["UI",'Standard Playwright browser automation. Steps show a blue "UI" badge. No Lighthouse.'],["API","API-only tests using HTTP request and assertion steps."],["Audit",'Full Playwright automation with Lighthouse non-functional checks (Performance, Accessibility, SEO). Steps show an amber "Audit" badge. Screenshot, video, and trace are disabled by default. Files stored in tests/audit/.']].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4 font-mono text-accent",children:e}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Creating a Suite"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Go to ",n.jsx("strong",{children:"Test Suites"})," in the sidebar."]}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"+ New Suite"})," and enter a name."]}),n.jsxs("li",{children:["Select the suite type: ",n.jsx("strong",{children:"UI"}),", ",n.jsx("strong",{children:"API"}),", or ",n.jsx("strong",{children:"Audit"}),"."]}),n.jsx("li",{children:"Optionally set tags and timeout."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Suite Actions"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Each suite supports inline rename, duplicate, delete, and direct run via the Run Configuration page."})]})},{id:"audit-suites",title:"Audit Suites",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Audit suites run exactly like UI suites (full Playwright automation) but add non-functional quality checks via Google Lighthouse for Performance, Accessibility, and SEO."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"⚡ Audit Flag on Steps"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["In Audit suites, each step has a ",n.jsx("strong",{children:"⚡ Audit"})," button. Clicking it marks that step as a Lighthouse checkpoint — when the step runs, Lighthouse audits ",n.jsx("code",{className:"text-accent",children:"page.url()"})," at that point. Confirm with ",n.jsx("strong",{children:"✓"})," to save or ",n.jsx("strong",{children:"✗"})," to cancel. If no steps are marked, Lighthouse is skipped entirely."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Non-Functional Checks"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Each test case in an Audit suite has a ",n.jsx("strong",{children:"Non-Functional Checks"})," section with three checkboxes:"]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"⚡ Performance"})," — Lighthouse Performance score"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"♿ Accessibility"})," — Lighthouse Accessibility score"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"🔍 SEO"})," — Lighthouse SEO score"]})]}),n.jsx("p",{className:"text-sm text-content-secondary",children:"If all three are unchecked, Lighthouse is skipped for that case. A warning is shown if none are selected."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Score Thresholds"}),n.jsxs("div",{className:"flex gap-4 text-sm",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-emerald-500 inline-block"})," Good (90–100)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-amber-400 inline-block"})," Needs Work (50–89)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-red-500 inline-block"})," Poor (0–49) — test FAILS"]})]})]})},{id:"test-cases",title:"Test Cases",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Test cases contain steps written in plain English. Each case has priority, tags, timeout, and optional data-driven configuration."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Writing Steps"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open a case, type a step instruction in the input bar (e.g. ",n.jsx("em",{children:'"Click the Login button"'}),"), and press Enter. The step is saved immediately. Click ",n.jsx("strong",{children:"Generate All"})," to generate Playwright code for all steps at once."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Step Types"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"UI"})," — Playwright browser actions"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"API"})," — HTTP request/assertion steps"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Mock"})," — Intercept and stub network requests"]})]})]})},{id:"ai-generation",title:"AI Code Generation",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Assuremind uses your configured AI provider to convert natural-language instructions into executable Playwright code."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Write a step instruction in plain English."}),n.jsxs("li",{children:["Click the wand icon or ",n.jsx("strong",{children:"Generate All"}),"."]}),n.jsx("li",{children:"The AI generates strategy-specific Playwright code."}),n.jsx("li",{children:"Review the code by expanding the step row."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Supported Providers"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Anthropic Claude, OpenAI GPT-4, Google Gemini, AWS Bedrock, Azure OpenAI, and Ollama (local). Configure via Settings → AI Provider."})]})},{id:"run-configuration",title:"Run Configuration",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Run Configuration page lets you select suites, browsers, and settings before executing a test run."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Options"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Select one or more suites to run"}),n.jsx("li",{children:"Override browsers, headless mode, and parallel count"}),n.jsx("li",{children:"Enable/disable video recording and tracing"}),n.jsx("li",{children:"Set retries and screenshot mode per run"})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Device Emulation"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["The ",n.jsx("strong",{children:"Device Emulation"})," section lets you emulate real mobile and tablet devices using Playwright's built-in device descriptors. Selecting a device applies the correct viewport, user-agent, device pixel ratio, and touch/mobile flags automatically."]}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2 mt-1",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Desktop"})," — Viewport-only presets (1920×1080, 1440×900, 1366×768, 1280×720, 1024×768). No mobile emulation."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Mobile"})," — iPhone 15 Pro/15/14/SE, Pixel 7/5, Galaxy S9+/S8. Full Playwright device descriptor including touch events and mobile UA. Chromium is recommended."]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Tablet"})," — iPad Pro 11″, iPad (gen 7), iPad Mini, Galaxy Tab S4. Use WebKit or Chromium for best results."]})]}),n.jsx("p",{className:"text-sm text-content-secondary mt-1",children:"A teal device badge appears on each case in the Reports page when the run used device emulation, making it easy to identify mobile vs desktop results at a glance."}),n.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg px-3 py-2 text-[11px] text-amber-700 mt-1",children:["⚠ Mobile and tablet device descriptors work best with ",n.jsx("strong",{children:"Chromium"}),". Firefox and WebKit do not fully support Playwright's mobile emulation flags."]}),n.jsx("h4",{className:"text-sm font-semibold text-content mt-2",children:"Live Progress"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Run progress is streamed via WebSocket. Status updates appear in real time on the case list and via toast notifications."}),n.jsx("h4",{className:"text-sm font-semibold text-content mt-2",children:"Running from CI/CD (CLI)"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Every option available in the UI is also available as a CLI flag:"}),n.jsx("pre",{className:"bg-[#1e1e2e] text-[#cdd6f4] text-[10px] font-mono p-3 rounded-lg overflow-x-auto leading-relaxed mt-1",children:`# Run all tests in CI (headless, exit 1 on failure)
|
|
801
|
+
npx assuremind run --all --ci
|
|
802
|
+
|
|
803
|
+
# Filter by type, suite, tag, or test name
|
|
804
|
+
npx assuremind run --type ui --tag smoke
|
|
805
|
+
npx assuremind run --suite "Login Tests" --browser chromium firefox
|
|
806
|
+
|
|
807
|
+
# Device emulation in CI
|
|
808
|
+
npx assuremind run --all --device "iPhone 15 Pro" --browser chromium --ci
|
|
809
|
+
npx assuremind run --tag smoke --device "Pixel 7" --browser chromium --ci
|
|
810
|
+
npx assuremind run --all --device "iPad Pro 11" --browser webkit --ci`})]})},{id:"reports",title:"Reports",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Reports show step-level results with screenshots, error messages, Lighthouse scores (Audit suites), and visual regression baselines."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Report Features"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Per-step pass/fail status and error details"}),n.jsx("li",{children:"Screenshot filmstrip — click any thumbnail to enlarge"}),n.jsx("li",{children:"Execution timeline (Gantt view) per case"}),n.jsx("li",{children:"Visual baseline comparison with diff overlay"}),n.jsx("li",{children:"Allure integration for full HTML reports"})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Lighthouse Results (Audit Suites)"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["For Audit suite cases with Lighthouse data, three tab buttons appear on the case row: ",n.jsx("strong",{children:"⚡ Speed"})," (Performance), ",n.jsx("strong",{children:"♿ A11y"})," (Accessibility), and ",n.jsx("strong",{children:"🔍 SEO"}),". Case rows are highlighted red when any score is Poor (< 50)."]}),n.jsxs("div",{className:"flex gap-4 text-sm mt-1",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-emerald-500 inline-block"})," Good (90+)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-amber-400 inline-block"})," Needs Work (50–89)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-red-500 inline-block"})," Poor (< 50) — case FAILS"]})]}),n.jsx("p",{className:"text-sm text-content-secondary mt-1",children:"Allure reports for Audit cases include three separate HTML attachments: Performance Report, Accessibility Report, and SEO Report. The Allure test status is set to FAILED if any score is below 50."})]})},{id:"self-healing",title:"Self-Healing",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Self-healing automatically fixes broken selectors when UI changes cause test failures. Failed steps are re-generated using AI with updated selectors."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Configuration"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Max Level"})," — Healing aggressiveness (1–5)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Daily Budget"})," — Max AI calls per day for healing"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Auto PR"})," — Automatically open a Git PR for healed steps"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Healed Steps"}),n.jsx("p",{className:"text-sm text-content-secondary",children:'Steps that were healed show an amber "healed" badge in the case editor. View the full healing log in the Self-Healing page.'})]})},{id:"variables",title:"Variables",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Variables let you inject dynamic data into step instructions using ",n.jsx("code",{className:"text-accent",children:"{{variableName}}"})," tokens."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Types of Variables"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Static"})," — Fixed string values (e.g. credentials)"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Environment"})," — Per-environment overrides"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Faker"})," — Randomly generated test data (e.g. fake email)"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Dynamic Data Picker"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Click the data picker icon next to the step input to insert variables, faker tokens, or environment values at the cursor position."})]})},{id:"git-control",title:"Git Control Center",category:"Core Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Git Control Center provides a visual interface for all Git operations — commit, push, pull, branch switching, and conflict resolution."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Key Operations"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Commit"})," — Stage and commit all changes with a message"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"AI Message"})," — Generate a commit message using AI"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Full Sync"})," — Commit + push in one click"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"Conflict Resolution"})," — Visual diff and AI-assisted merge"]})]})]})},{id:"bulk-actions",title:"Bulk Actions",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Select multiple test cases and perform batch operations including delete and move-to-suite."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How to Use"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Click the checkbox to the left of any test case row."}),n.jsxs("li",{children:["Hold ",n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-surface-inset border border-border text-[10px]",children:"Shift"})," and click another row to select a range."]}),n.jsx("li",{children:"The Bulk Action Bar appears at the bottom of the screen."}),n.jsxs("li",{children:["Choose ",n.jsx("strong",{children:"Delete"})," or ",n.jsx("strong",{children:"Move to Suite"}),"."]})]})]})},{id:"flakiness-tracker",title:"Flakiness Tracker",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Flakiness Tracker analyzes the last 20 runs for each test case and flags cases that intermittently pass and fail."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Flaky Badge"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Cases with a pass rate between 0% and 100% (and at least 3 runs) show an amber ",n.jsx("strong",{children:"~flaky"})," badge in the case list. Hover to see the exact pass rate."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Thresholds"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"A case is considered flaky when it has at least 3 recorded runs and its historical pass rate is between 1% and 99%."})]})},{id:"step-library",title:"Step Library",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"The Step Library stores reusable step templates that can be inserted into any test case with a single click."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Managing the Library"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Go to ",n.jsx("strong",{children:"Step Library"})," in the sidebar. Add steps with a name, instruction, and optional tags. Library steps are stored in ",n.jsx("code",{className:"text-accent",children:"tests/.step-library.json"}),"."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Inserting Steps"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open a test case, click the ",n.jsx("strong",{children:"Library"})," button in the top-right of the steps area. Search for a step template and click ",n.jsx("strong",{children:"Insert"})," to add it to the current case."]})]})},{id:"environment-profiles",title:"Environment Profiles",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Environment Profiles let you save and switch between different test configurations (URL, browsers, environment) without manually editing settings."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Creating Profiles"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Go to ",n.jsx("strong",{children:"Settings → Environment Profiles"})," and click ",n.jsx("strong",{children:"Add Profile"}),". Enter a name, then configure the profile in the list."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Switching Profiles"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"The profile picker appears in the top bar. Click a profile name to instantly apply it, overriding the active environment and base URL for the next run."})]})},{id:"per-step-retry",title:"Per-Step Retry",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Individual steps can be configured to retry on failure, independent of the global retry setting."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Configuration"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["In the case editor, each step row shows a small ",n.jsx("strong",{children:"×"})," number input next to the timeout. Enter a value from 0–5 to set the retry count for that step. The step-level value overrides the global setting."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Retry Behavior"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"On failure, the step is re-executed up to N times. If any attempt passes, the step is marked as passed. All retry attempts are logged in the step result."})]})},{id:"case-hooks",title:"Case-Level Hooks",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Before and After hooks run additional steps around a test case's main step sequence."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Hooks Tab"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Open a test case and click the ",n.jsx("strong",{children:"Hooks"})," tab (next to Steps). Add before-hooks that run before any steps, and after-hooks that always run even if steps fail."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Use Cases"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Before hook: Login, seed test data, navigate to start URL"}),n.jsx("li",{children:"After hook: Logout, clean up created records, capture diagnostics"})]})]})},{id:"network-mocking",title:"Network Mocking",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Mock steps intercept HTTP requests matching a URL pattern and return a custom response — without touching the real backend."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Creating a Mock Step"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["In the case editor, change the step type dropdown to ",n.jsx("strong",{children:"Mock"}),"."]}),n.jsx("li",{children:"Expand the step to reveal the Mock Route fields."}),n.jsxs("li",{children:["Enter the URL pattern (e.g. ",n.jsx("code",{className:"text-accent",children:"**/api/users"}),"), status code, and JSON body."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Behavior"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"The mock route is active for the duration of that step and is removed immediately after. Subsequent steps run against the real network."})]})},{id:"audit-lighthouse",title:"Audit & Lighthouse",category:"New Features",content:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("p",{children:[n.jsx("strong",{children:"Audit suites"})," run full Playwright automation and trigger Google Lighthouse at steps explicitly marked with the ",n.jsx("strong",{children:"⚡ Audit"})," flag. Three categories are measured: Performance, Accessibility, and SEO."]}),n.jsxs("div",{className:"rounded-lg bg-violet-50 border border-violet-200 px-4 py-3 text-sm text-violet-800",children:[n.jsx("strong",{children:"Chromium only"}),' — Lighthouse uses Chrome DevTools Protocol (CDP). Firefox and WebKit runs will show a "not available" notice instead.']}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Create an ",n.jsx("strong",{children:"Audit"})," suite in the Test Editor."]}),n.jsxs("li",{children:["Mark one or more steps with the ",n.jsx("strong",{children:"⚡ Audit"})," button to designate Lighthouse checkpoints."]}),n.jsxs("li",{children:["In the ",n.jsx("strong",{children:"Non-Functional Checks"})," section on each case, tick ⚡ Performance, ♿ Accessibility, and/or 🔍 SEO."]}),n.jsxs("li",{children:["Run the suite — Lighthouse audits ",n.jsx("code",{className:"text-accent",children:"page.url()"})," at each marked step."]}),n.jsx("li",{children:"Results are saved to the run report with color-coded scores."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Collected Metrics"}),n.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{label:"Performance Score",range:"0–100",good:"≥ 90",desc:"Overall Lighthouse score"},{label:"FCP",range:"ms",good:"< 1.8s",desc:"First Contentful Paint"},{label:"LCP",range:"ms",good:"< 2.5s",desc:"Largest Contentful Paint"},{label:"CLS",range:"score",good:"< 0.1",desc:"Cumulative Layout Shift"},{label:"TTFB",range:"ms",good:"< 800ms",desc:"Time to First Byte"},{label:"TBT",range:"ms",good:"< 200ms",desc:"Total Blocking Time"},{label:"Speed Index",range:"ms",good:"< 3.4s",desc:"Visual load speed"},{label:"TTI",range:"ms",good:"< 3.8s",desc:"Time to Interactive"},{label:"INP",range:"ms",good:"< 200ms",desc:"Interaction to Next Paint"}].map(e=>n.jsxs("div",{className:"rounded-lg border border-border bg-surface-inset/40 px-3 py-2",children:[n.jsx("p",{className:"text-xs font-bold text-content",children:e.label}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:e.desc}),n.jsxs("p",{className:"text-[10px] text-emerald-600 font-medium mt-0.5",children:["Good: ",e.good]})]},e.label))}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Viewing in Reports"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Open the Reports page and expand a completed Audit run."}),n.jsxs("li",{children:["Case rows with Lighthouse data show three tab buttons: ",n.jsx("strong",{children:"⚡ Speed"}),", ",n.jsx("strong",{children:"♿ A11y"}),", ",n.jsx("strong",{children:"🔍 SEO"}),"."]}),n.jsx("li",{children:"Click a tab to view the score and metrics for that category."}),n.jsx("li",{children:"Case rows are highlighted red when any score is Poor (< 50)."})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Allure Attachments"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Each Audit case produces three separate HTML attachments in the Allure report: Performance Report, Accessibility Report, and SEO Report. The Allure test status is set to FAILED if any score is below 50."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Color Thresholds"}),n.jsxs("div",{className:"flex gap-4 text-sm",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-emerald-500 inline-block"})," Good (90–100)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-amber-400 inline-block"})," Needs Work (50–89)"]}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-3 h-3 rounded-full bg-red-500 inline-block"})," Poor (0–49) — test FAILS"]})]})]})},{id:"visual-regression",title:"Visual Regression",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Visual regression testing compares step screenshots against saved baselines to detect unintended UI changes."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Setting a Baseline"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsx("li",{children:"Run a test case until steps have screenshots."}),n.jsx("li",{children:"Open the Reports page and expand a step."}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"Set as Baseline"})," in the Baseline Panel."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Comparing"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["After setting a baseline, subsequent runs show both the current screenshot and the baseline side-by-side. Baselines are stored in ",n.jsx("code",{className:"text-accent",children:"results/baselines/"}),"."]})]})},{id:"test-impact",title:"Test Impact Analysis",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Test Impact Analysis identifies which test cases might be affected by the current set of uncommitted file changes."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Running Analysis"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Open the ",n.jsx("strong",{children:"Git Control Center"}),"."]}),n.jsxs("li",{children:["Expand the ",n.jsx("strong",{children:"Test Impact Analysis"})," section."]}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"Analyze Impact"}),"."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"How It Works"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"Changed file names and paths are compared against test case names, step instructions, and suite names. Matched cases are listed with the matched file as the reason."})]})},{id:"device-emulation",title:"Device Emulation",category:"New Features",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Device Emulation lets you test your application as it appears on real mobile phones and tablets, using Playwright's built-in device descriptor registry. No manual viewport tuning needed — the correct user-agent, device pixel ratio, viewport, touch events, and ",n.jsx("code",{className:"text-[10px] bg-surface-inset px-1 py-0.5 rounded",children:"isMobile"})," flag are all applied automatically."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Using in Studio (Run Config)"}),n.jsxs("ol",{className:"list-decimal list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:["Go to the ",n.jsx("strong",{children:"Run Config"})," page."]}),n.jsxs("li",{children:["Find the ",n.jsx("strong",{children:"Device Emulation"})," card below the Browsers card."]}),n.jsxs("li",{children:["Use the tabs to filter by ",n.jsx("strong",{children:"All / Desktop / Mobile / Tablet"}),"."]}),n.jsx("li",{children:"Click a device card to select it — it highlights in teal."}),n.jsxs("li",{children:["Click ",n.jsx("strong",{children:"Start Run"})," — the device is applied to every case in the run."]}),n.jsxs("li",{children:["To clear, click the ",n.jsx("strong",{children:"×"})," in the card header or select ",n.jsx("strong",{children:"No Emulation"}),"."]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Using from CLI / CI"}),n.jsx("pre",{className:"bg-[#1e1e2e] text-[#cdd6f4] text-[10px] font-mono p-3 rounded-lg overflow-x-auto leading-relaxed",children:`# Mobile
|
|
811
|
+
npx assuremind run --all --device "iPhone 15 Pro" --browser chromium --ci
|
|
812
|
+
npx assuremind run --tag smoke --device "Pixel 7" --browser chromium --ci
|
|
813
|
+
|
|
814
|
+
# Tablet
|
|
815
|
+
npx assuremind run --all --device "iPad Pro 11" --browser webkit --ci
|
|
816
|
+
npx assuremind run --suite "Mobile" --device "Galaxy Tab S4" --browser chromium --ci
|
|
817
|
+
|
|
818
|
+
# Permanent default in autotest.config.ts
|
|
819
|
+
device: 'iPhone 15 Pro'`}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Available Devices"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Device"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Category"}),n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Viewport"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Best Browser"})]})}),n.jsx("tbody",{className:"text-content-secondary divide-y divide-border/50",children:[["iPhone 15 Pro","Mobile","393×852","Chromium / WebKit"],["iPhone 15","Mobile","390×844","Chromium / WebKit"],["iPhone 14","Mobile","390×844","Chromium / WebKit"],["iPhone SE","Mobile","375×667","Chromium / WebKit"],["Pixel 7","Mobile","412×915","Chromium"],["Pixel 5","Mobile","393×851","Chromium"],["Galaxy S9+","Mobile","320×658","Chromium"],["Galaxy S8","Mobile","360×740","Chromium"],["iPad Pro 11","Tablet","834×1194","WebKit / Chromium"],["iPad (gen 7)","Tablet","810×1080","WebKit / Chromium"],["iPad Mini","Tablet","768×1024","WebKit / Chromium"],["Galaxy Tab S4","Tablet","712×1138","Chromium"]].map(([e,t,s,r])=>n.jsxs("tr",{children:[n.jsx("td",{className:"py-1.5 pr-4 font-mono text-[10px]",children:e}),n.jsx("td",{className:"py-1.5 pr-4",children:t}),n.jsx("td",{className:"py-1.5 pr-4",children:s}),n.jsx("td",{className:"py-1.5",children:r})]},e))})]})}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"In Reports"}),n.jsx("p",{className:"text-sm text-content-secondary",children:"When a run uses device emulation, each case row in Reports shows a teal device badge (📱 phone / tablet icon) with the device name, so you can instantly tell mobile runs from desktop runs."}),n.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg px-3 py-2 text-[11px] text-amber-700",children:["⚠ Mobile and tablet device descriptors work best with ",n.jsx("strong",{children:"Chromium"}),". Firefox and WebKit do not fully support Playwright's mobile emulation flags (touch events, mobile UA)."]})]})},{id:"keyboard-shortcuts",title:"Keyboard Shortcuts",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Press ",n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-surface-inset border border-border text-[10px]",children:"?"})," anywhere in the app to open the shortcuts modal."]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Shortcut"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Action"})]})}),n.jsx("tbody",{className:"text-content-secondary",children:[["?","Show keyboard shortcuts"],["Ctrl+K / Cmd+K","Open search palette"],["Escape","Close modal / dialog"],["Enter (step input)","Add new step"],["Enter (case name)","Save case"],["Shift+Click (case row)","Range-select cases"]].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4",children:n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-surface-inset border border-border text-[10px] font-mono",children:e})}),n.jsx("td",{className:"py-1.5",children:t})]},e))})]})})]})},{id:"data-driven",title:"Data-Driven Testing",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Test cases support data-driven execution — running the same case multiple times with different input data."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Data Sources"}),n.jsxs("ul",{className:"list-disc list-inside text-sm text-content-secondary space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{children:"Inline JSON"})," — Enter an array of objects directly in the editor"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"JSON File"})," — Reference a ",n.jsx("code",{className:"text-accent",children:".json"})," file in your project"]}),n.jsxs("li",{children:[n.jsx("strong",{children:"CSV File"})," — Reference a ",n.jsx("code",{className:"text-accent",children:".csv"})," file with headers"]})]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Accessing Data"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Use ",n.jsx("code",{className:"text-accent",children:"{{row.fieldName}}"})," in step instructions to reference data columns. The case runs once per row."]})]})},{id:"faker-data",title:"Faker / Dynamic Data",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsx("p",{children:"Faker tokens generate random, realistic test data at runtime. Use them to avoid hardcoded values in test steps."}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Available Tokens"}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:["faker.email","faker.name","faker.phone","faker.company","faker.uuid","faker.date","faker.number","faker.word"].map(e=>n.jsx("code",{className:"text-[10px] bg-surface-inset rounded px-2 py-0.5 border border-border text-accent font-mono",children:`{{${e}}}`},e))}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Usage"}),n.jsxs("p",{className:"text-sm text-content-secondary",children:["Type the token directly in a step instruction, or use the ",n.jsx("strong",{children:"Dynamic Data Picker"})," button next to the step input to insert tokens at the cursor position."]})]})},{id:"api-reference",title:"API Reference",category:"Reference",content:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{children:["Assuremind exposes a REST API at ",n.jsx("code",{className:"text-accent",children:"http://localhost:4000/api"})," for programmatic access."]}),n.jsx("h4",{className:"text-sm font-semibold text-content",children:"Key Endpoints"}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-border",children:[n.jsx("th",{className:"text-left py-1.5 pr-4 font-semibold text-content-secondary",children:"Endpoint"}),n.jsx("th",{className:"text-left py-1.5 font-semibold text-content-secondary",children:"Description"})]})}),n.jsx("tbody",{className:"text-content-secondary font-mono",children:[["GET /suites","List all test suites"],["POST /suites","Create a suite"],["GET /suites/:id/cases","List cases in a suite"],["POST /suites/:id/cases","Create a test case"],["POST /run","Start a test run"],["GET /results","List run results"],["GET /flakiness","Get flakiness report"],["GET /step-library","List library steps"],["GET /git/impact","Run test impact analysis"]].map(([e,t])=>n.jsxs("tr",{className:"border-b border-border/50",children:[n.jsx("td",{className:"py-1.5 pr-4 text-accent text-[10px]",children:e}),n.jsx("td",{className:"py-1.5 font-sans",children:t})]},e))})]})})]})}],W5=Array.from(new Set(yi.map(e=>e.category)));function V5(){const[e,t]=m.useState(yi[0].id),s=m.useRef({}),r=m.useRef(null);m.useEffect(()=>{const i=[];return yi.forEach(l=>{const o=s.current[l.id];if(!o)return;const c=new IntersectionObserver(([u])=>{u.isIntersecting&&t(l.id)},{root:r.current,rootMargin:"-20% 0px -60% 0px",threshold:0});c.observe(o),i.push(c)}),()=>i.forEach(l=>l.disconnect())},[]);const a=i=>{const l=s.current[i];if(l&&r.current){const o=r.current,c=l.offsetTop-24;o.scrollTo({top:c,behavior:"smooth"})}};return n.jsxs("div",{className:"flex h-full overflow-hidden bg-background",children:[n.jsx("aside",{className:"w-56 flex-shrink-0 border-r border-border bg-surface overflow-y-auto hidden lg:block",children:n.jsxs("div",{className:"px-4 py-4",children:[n.jsx("h2",{className:"text-[10px] font-bold text-content-tertiary uppercase tracking-widest mb-3",children:"Documentation"}),n.jsx("nav",{className:"space-y-0.5",children:W5.map(i=>n.jsxs("div",{className:"mb-3",children:[n.jsx("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest px-2 py-1",children:i}),yi.filter(l=>l.category===i).map(l=>n.jsx("button",{type:"button",onClick:()=>a(l.id),className:S("w-full text-left px-2 py-1.5 rounded-lg text-xs transition-colors",e===l.id?"bg-accent/8 text-accent font-semibold":"text-content-secondary hover:text-content hover:bg-surface-inset"),children:l.title},l.id))]},i))})]})}),n.jsx("div",{ref:r,className:"flex-1 overflow-y-auto",children:n.jsx("div",{className:"max-w-2xl mx-auto px-6 py-6 space-y-0",children:yi.map(i=>n.jsxs("section",{id:i.id,ref:l=>{l&&(s.current[i.id]=l)},className:"mb-10 scroll-mt-6",children:[n.jsxs("div",{className:"mb-4",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:i.category}),n.jsx("h2",{className:"text-base font-bold text-content mt-0.5",children:i.title})]}),n.jsx("div",{className:"text-sm text-content-secondary leading-relaxed",children:i.content}),n.jsx("div",{className:"mt-8 border-b border-border"})]},i.id))})})]})}function Q5(e){const t=new Date(e),s=Math.floor((Date.now()-t.getTime())/1e3);if(s<60)return`${s}s ago`;const r=Math.floor(s/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}const G5={M:{icon:Ag,color:"text-blue-500",bg:"bg-blue-50",ring:"ring-blue-200",label:"Modified"},A:{icon:Fg,color:"text-emerald-500",bg:"bg-emerald-50",ring:"ring-emerald-200",label:"Added"},D:{icon:Lg,color:"text-red-500",bg:"bg-red-50",ring:"ring-red-200",label:"Deleted"},"?":{icon:Ig,color:"text-content-tertiary",bg:"bg-surface-inset",ring:"ring-border",label:"Untracked"}};function Y5(){const{operationInProgress:e,logSteps:t,hasConflict:s,conflictFiles:r}=Nc(),{data:a,isLoading:i}=um(),{data:l}=Xg(),{data:o,refetch:c}=Zg(20),u=ey(),x=ty(),f=ny(),g=sy(),v=ry(),y=ay(),[j,w]=m.useState(""),[h,d]=m.useState(!0),[p,b]=m.useState(!1),[N,C]=m.useState(!0),[R,P]=m.useState(!1),[_,D]=m.useState(!1),{data:G,isFetching:J,refetch:ne}=ke({queryKey:["git-impact"],queryFn:()=>Ke.impact(),enabled:_,staleTime:0}),z=m.useRef(null),I=!!e,ee=((a==null?void 0:a.modified.length)??0)+((a==null?void 0:a.added.length)??0)+((a==null?void 0:a.deleted.length)??0)+((a==null?void 0:a.untracked.length)??0);m.useEffect(()=>{var E;(E=z.current)==null||E.scrollIntoView({behavior:"smooth"})},[t.length]);const ae=()=>{j.trim()?v.mutate(j):y.mutate(void 0,{onSuccess:E=>{w(E.message),v.mutate(E.message)}})};return n.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-surface-inset/30",children:n.jsx("div",{className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center gap-3 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[n.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-orange-500 to-rose-600 flex items-center justify-center shadow-sm shadow-orange-500/20",children:n.jsx(Cr,{size:17,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-sm font-bold text-content",children:"Git Control Center"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Commit, push, pull and resolve conflicts"})]})]}),n.jsx("div",{className:"flex-1"}),n.jsxs("div",{className:"relative flex-shrink-0",children:[n.jsxs("button",{onClick:()=>b(!p),className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-surface-inset hover:bg-surface-inset/80 border border-border text-xs font-medium text-content-secondary transition-colors",children:[n.jsx(Cr,{size:12,className:"text-accent flex-shrink-0"}),n.jsx("span",{className:"max-w-[160px] truncate",children:(a==null?void 0:a.branch)??"..."}),n.jsx(Tt,{size:11,className:S("transition-transform text-content-tertiary",p&&"rotate-180")})]}),p&&l&&n.jsxs("div",{className:"absolute top-full right-0 mt-1 w-56 bg-surface border border-border rounded-xl shadow-lg z-20 max-h-56 overflow-y-auto",children:[n.jsx("div",{className:"px-3 py-1.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Local"}),l.all.map(E=>n.jsx("button",{onClick:()=>{b(!1),E!==(a==null?void 0:a.branch)&&u.mutate(E)},className:S("w-full text-left px-3 py-1.5 text-xs hover:bg-surface-inset transition-colors",E===(a==null?void 0:a.branch)&&"font-semibold text-accent bg-accent/5"),children:E},E)),l.remote.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-3 py-1.5 text-[9px] font-bold text-content-tertiary uppercase tracking-widest border-t border-border",children:"Remote"}),l.remote.map(E=>n.jsx("button",{onClick:()=>{b(!1),u.mutate(E.replace(/^origin\//,""))},className:"w-full text-left px-3 py-1.5 text-xs text-content-secondary hover:bg-surface-inset",children:E},E))]})]})]}),n.jsxs("span",{className:S("inline-flex items-center gap-1.5 text-[10px] px-2.5 py-1 rounded-lg font-semibold ring-1",a!=null&&a.conflicted.length?"bg-red-50 text-red-600 ring-red-200":a!=null&&a.isClean?"bg-emerald-50 text-emerald-600 ring-emerald-200":"bg-amber-50 text-amber-600 ring-amber-200"),children:[n.jsx("span",{className:S("w-1.5 h-1.5 rounded-full",a!=null&&a.conflicted.length?"bg-red-500":a!=null&&a.isClean?"bg-emerald-500":"bg-amber-500")}),i?"Loading…":a!=null&&a.conflicted.length?"Conflict":a!=null&&a.isClean?"Clean":`${ee} pending`]}),a&&(a.ahead>0||a.behind>0)&&n.jsxs("span",{className:"text-[10px] text-content-tertiary font-mono tabular-nums",children:[a.ahead>0&&n.jsxs("span",{className:"text-emerald-600",children:["↑",a.ahead]}),a.ahead>0&&a.behind>0&&" ",a.behind>0&&n.jsxs("span",{className:"text-amber-600",children:["↓",a.behind]})]})]}),n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset/40 border-t border-border flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsx(fa,{size:11,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{type:"text",value:j,onChange:E=>w(E.target.value),placeholder:"Commit message…",className:"w-full text-xs border border-border rounded-lg pl-7 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40 bg-surface placeholder-content-tertiary",onKeyDown:E=>{E.key==="Enter"&&j.trim()&&x.mutate(j)}})]}),n.jsx("button",{onClick:()=>y.mutate(void 0,{onSuccess:E=>w(E.message)}),disabled:y.isPending,title:"AI commit message",className:"p-1.5 rounded-lg border border-border bg-surface text-violet-500 hover:bg-violet-50 hover:border-violet-200 transition-colors flex-shrink-0 disabled:opacity-50",children:y.isPending?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Gt,{size:12})}),n.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-content-tertiary cursor-pointer select-none flex-shrink-0",children:[n.jsx("input",{type:"checkbox",checked:h,onChange:E=>d(E.target.checked),className:"rounded border-border text-accent focus:ring-accent w-3 h-3"}),"Rebase"]}),n.jsx("div",{className:"w-px h-5 bg-border"}),n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[n.jsx(Hl,{icon:n.jsx(fa,{size:11}),label:"Commit",onClick:()=>j.trim()&&x.mutate(j),disabled:I||!j.trim(),loading:e==="commit"}),n.jsx(Hl,{icon:n.jsx(zg,{size:11}),label:"Push",onClick:()=>g.mutate(),disabled:I,loading:e==="push"}),n.jsx(Hl,{icon:n.jsx(Pg,{size:11}),label:"Pull",onClick:()=>f.mutate(h),disabled:I,loading:e==="pull"}),n.jsx(Hl,{icon:n.jsx(qg,{size:11}),label:"Full Sync",onClick:ae,disabled:I,loading:e==="full-sync",primary:!0})]})]})]}),s&&n.jsx(J5,{conflictFiles:r}),!s&&n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-3",children:[n.jsxs("div",{className:"lg:col-span-2 rounded-xl border border-border bg-surface overflow-hidden flex flex-col",children:[n.jsxs("div",{className:"px-3.5 py-2 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Changes"}),ee>0&&n.jsx("span",{className:"text-[9px] font-bold text-accent bg-accent/8 px-1.5 py-px rounded ring-1 ring-accent/15",children:ee})]}),ee>0&&n.jsx("div",{className:"flex items-center gap-2",children:[{type:"M",count:(a==null?void 0:a.modified.length)??0,color:"text-blue-500"},{type:"A",count:(a==null?void 0:a.added.length)??0,color:"text-emerald-500"},{type:"D",count:(a==null?void 0:a.deleted.length)??0,color:"text-red-500"},{type:"?",count:(a==null?void 0:a.untracked.length)??0,color:"text-content-tertiary"}].filter(E=>E.count>0).map(E=>n.jsxs("span",{className:S("text-[9px] font-mono font-bold",E.color),children:[E.type,E.count]},E.type))})]}),n.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:ee===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-10 gap-1.5",children:[n.jsx(He,{size:18,className:"text-emerald-400"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Working tree clean"})]}):n.jsxs("div",{className:"px-1.5 py-1",children:[a==null?void 0:a.modified.map(E=>n.jsx(Bl,{file:E,type:"M"},`M-${E}`)),a==null?void 0:a.added.map(E=>n.jsx(Bl,{file:E,type:"A"},`A-${E}`)),a==null?void 0:a.deleted.map(E=>n.jsx(Bl,{file:E,type:"D"},`D-${E}`)),a==null?void 0:a.untracked.map(E=>n.jsx(Bl,{file:E,type:"?"},`?-${E}`))]})})]}),n.jsxs("div",{className:"lg:col-span-3 rounded-xl border border-border bg-surface overflow-hidden flex flex-col",children:[n.jsxs("div",{className:"px-3.5 py-2 border-b border-border flex items-center justify-between",children:[n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Commit History"}),n.jsx("button",{onClick:()=>c(),className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",title:"Refresh",children:n.jsx(lm,{size:11})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:!o||o.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center py-10 gap-1.5",children:[n.jsx(fa,{size:18,className:"text-content-tertiary/40"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No commits yet"})]}):n.jsxs("div",{className:"relative px-3.5 py-2",children:[n.jsx("div",{className:"absolute left-[22px] top-4 bottom-4 w-px bg-border"}),n.jsx("div",{className:"space-y-0.5",children:o.map((E,K)=>n.jsxs("div",{className:"flex items-start gap-2.5 relative group py-1.5 rounded-lg hover:bg-surface-inset/50 px-1 -mx-1 transition-colors",children:[n.jsx("div",{className:S("mt-1 w-3 h-3 rounded-full border-2 flex-shrink-0 z-[1]",K===0?"border-accent bg-accent/20":"border-border bg-surface")}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-xs text-content font-medium leading-snug truncate",title:E.message,children:E.message}),n.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-content-tertiary mt-0.5",children:[n.jsx("code",{className:"font-mono text-accent/70 text-[9px]",children:E.shortHash}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(Qg,{size:8})," ",E.author]}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(Tr,{size:8})," ",Q5(E.date)]})]})]})]},E.hash))})]})})]})]}),n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("button",{onClick:()=>P(!R),className:"w-full px-3.5 py-2 flex items-center justify-between hover:bg-surface-inset/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{size:12,className:"text-amber-500"}),n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Test Impact Analysis"}),G&&G.impactedCases.length>0&&n.jsxs("span",{className:"text-[9px] font-bold text-amber-600 bg-amber-50 px-1.5 py-px rounded ring-1 ring-amber-200",children:[G.impactedCases.length," impacted"]})]}),n.jsx(Tt,{size:11,className:S("text-content-tertiary transition-transform",R&&"rotate-180")})]}),R&&n.jsxs("div",{className:"border-t border-border px-3.5 py-3",children:[n.jsx("p",{className:"text-[10px] text-content-tertiary mb-3",children:"Finds test cases that may be affected by uncommitted file changes."}),n.jsxs("button",{onClick:()=>{D(!0),setTimeout(()=>ne(),0)},disabled:J,className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg bg-amber-500 text-white hover:bg-amber-600 transition-colors disabled:opacity-50 mb-3",children:[J?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(Be,{size:12}),"Analyze Impact"]}),G&&n.jsxs(n.Fragment,{children:[G.changedFiles.length>0&&n.jsxs("div",{className:"mb-3",children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:["Changed Files (",G.changedFiles.length,")"]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:G.changedFiles.map(E=>n.jsx("span",{className:"text-[9px] font-mono bg-surface-inset px-2 py-0.5 rounded border border-border text-content-secondary",children:E},E))})]}),G.impactedCases.length===0?n.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-emerald-600 bg-emerald-50 rounded-lg px-3 py-2",children:[n.jsx(He,{size:12})," No test cases appear to be impacted by current changes."]}):n.jsxs("div",{children:[n.jsxs("p",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest mb-1",children:["Impacted Cases (",G.impactedCases.length,")"]}),n.jsx("div",{className:"space-y-1",children:G.impactedCases.map(E=>n.jsxs("div",{className:"flex items-start gap-2 text-[10px] bg-amber-50 rounded-lg px-3 py-2 border border-amber-200",children:[n.jsx(Yt,{size:11,className:"text-amber-500 mt-px flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"font-semibold text-content",children:E.caseName}),n.jsxs("p",{className:"text-content-tertiary",children:[E.suiteName," · ",E.reason]})]})]},E.caseId))})]})]})]})]}),t.length>0&&n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("button",{onClick:()=>C(!N),className:"w-full px-3.5 py-2 border-b border-border flex items-center justify-between hover:bg-surface-inset/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vc,{size:12,className:"text-content-tertiary"}),n.jsx("h2",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Execution Log"}),n.jsxs("span",{className:"text-[9px] font-medium text-content-tertiary bg-surface-inset px-1.5 py-px rounded ring-1 ring-border",children:[t.length," step",t.length!==1?"s":""]}),e&&n.jsxs("span",{className:"flex items-center gap-1 text-[9px] text-blue-500 font-medium",children:[n.jsx(ce,{size:9,className:"animate-spin"})," ",e]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:E=>{E.stopPropagation(),Pe.clearLogs()},className:"text-[9px] text-content-tertiary hover:text-red-500 px-1.5 py-0.5 rounded hover:bg-red-50 transition-colors",children:"Clear"}),n.jsx(Tt,{size:11,className:S("text-content-tertiary transition-transform",N&&"rotate-180")})]})]}),N&&n.jsx("div",{className:"px-3.5 py-2 max-h-[200px] overflow-y-auto bg-surface-inset/20",children:n.jsxs("div",{className:"space-y-1",children:[t.map((E,K)=>n.jsxs("div",{className:"flex items-start gap-2 text-[10px] py-0.5",children:[E.status==="running"&&n.jsx(ce,{size:11,className:"mt-px text-blue-500 animate-spin flex-shrink-0"}),E.status==="done"&&n.jsx(He,{size:11,className:"mt-px text-emerald-500 flex-shrink-0"}),E.status==="error"&&n.jsx(ut,{size:11,className:"mt-px text-red-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("span",{className:S("font-medium",E.status==="error"?"text-red-600":"text-content-secondary"),children:E.step}),E.message&&n.jsxs("span",{className:S("ml-1.5 font-normal",E.status==="error"?"text-red-400":"text-content-tertiary"),children:["— ",E.message]})]})]},K)),n.jsx("div",{ref:z})]})})]})]})})})}function J5({conflictFiles:e}){const t=iy(),s=ly(),r=oy(),a=cy(),[i,l]=m.useState({}),o=h=>i[h]??{mode:"none",ours:"",theirs:"",merged:"",resolved:!1,loading:!1},c=(h,d)=>l(p=>({...p,[h]:{...o(h),...d}})),u=async h=>{c(h,{loading:!0});try{const d=await Ke.conflictContent(h);c(h,{ours:d.ours,theirs:d.theirs,merged:d.ours,loading:!1})}catch{c(h,{ours:"(error)",theirs:"(error)",loading:!1})}},x=async h=>{let p=o(h).ours;p||(p=(await Ke.conflictContent(h)).ours),c(h,{loading:!0}),t.mutate({filePath:h,content:p},{onSuccess:()=>c(h,{resolved:!0,loading:!1})})},f=async h=>{let p=o(h).theirs;p||(p=(await Ke.conflictContent(h)).theirs),c(h,{loading:!0}),t.mutate({filePath:h,content:p},{onSuccess:()=>c(h,{resolved:!0,loading:!1})})},g=async h=>{let d=o(h);d.ours||(await u(h),d=o(h)),c(h,{mode:"ai",loading:!0}),s.mutate({filePath:h,ours:d.ours,theirs:d.theirs},{onSuccess:p=>c(h,{merged:p.resolved,loading:!1}),onError:()=>c(h,{loading:!1})})},v=async h=>{o(h).ours||await u(h),c(h,{mode:"manual"})},y=h=>{const d=o(h);c(h,{loading:!0}),t.mutate({filePath:h,content:d.merged},{onSuccess:()=>c(h,{resolved:!0,loading:!1,mode:"none"})})},j=e.every(h=>o(h).resolved),w=e.filter(h=>o(h).resolved).length;return n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50/80 overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg bg-red-100 flex items-center justify-center flex-shrink-0",children:n.jsx(Yt,{size:15,className:"text-red-500"})}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-xs font-bold text-red-800",children:"Merge Conflict Detected"}),n.jsxs("p",{className:"text-[10px] text-red-600",children:[w,"/",e.length," file",e.length>1?"s":""," resolved"]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("button",{onClick:()=>a.mutate(),disabled:a.isPending,className:"flex items-center gap-1 px-2.5 py-1.5 text-[10px] font-medium text-red-600 bg-surface border border-red-200 rounded-lg hover:bg-red-50 transition-colors disabled:opacity-50",children:[n.jsx(yc,{size:10}),a.isPending?"Aborting…":"Abort"]}),n.jsxs("button",{onClick:()=>r.mutate(),disabled:!j||r.isPending,className:S("flex items-center gap-1 px-3 py-1.5 text-[10px] font-semibold rounded-lg transition-colors",j?"bg-emerald-600 hover:bg-emerald-700 text-white shadow-sm shadow-emerald-500/20":"bg-surface-inset text-content-tertiary cursor-not-allowed ring-1 ring-border"),children:[n.jsx(He,{size:10}),r.isPending?"Continuing…":"Continue Rebase"]})]})]}),n.jsx("div",{className:"h-0.5 bg-red-100",children:n.jsx("div",{className:"h-full bg-emerald-500 transition-all",style:{width:`${e.length>0?w/e.length*100:0}%`}})})]}),e.map(h=>{const d=o(h);return n.jsxs("div",{className:"rounded-xl border border-border bg-surface overflow-hidden",children:[n.jsxs("div",{className:"px-3.5 py-2.5 border-b border-border flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(_g,{size:13,className:d.resolved?"text-emerald-500":"text-amber-500"}),n.jsx("code",{className:"text-xs font-mono text-content-secondary",children:h}),d.resolved&&n.jsxs("span",{className:"text-[9px] text-emerald-600 bg-emerald-50 px-1.5 py-0.5 rounded-md flex items-center gap-0.5 font-semibold ring-1 ring-emerald-200",children:[n.jsx(He,{size:9})," Resolved"]})]}),!d.resolved&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(ql,{label:"Keep Local",onClick:()=>x(h),loading:d.loading&&d.mode==="none"}),n.jsx(ql,{label:"Accept Incoming",onClick:()=>f(h),loading:d.loading&&d.mode==="none"}),n.jsx(ql,{label:"Manual",onClick:()=>v(h)}),n.jsx(ql,{label:"AI Resolve",onClick:()=>g(h),loading:d.loading&&d.mode==="ai",icon:n.jsx(Gt,{size:9}),accent:!0})]})]}),d.mode!=="none"&&!d.resolved&&n.jsx("div",{className:"p-3.5",children:d.loading&&!d.ours?n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(ce,{size:16,className:"animate-spin text-content-tertiary"})}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-blue-600 uppercase tracking-widest mb-1 block",children:"Local (Ours)"}),n.jsx("textarea",{value:d.ours,readOnly:!0,rows:12,className:"w-full text-[10px] font-mono p-2.5 border border-blue-200 rounded-lg bg-blue-50/50 resize-y focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-orange-600 uppercase tracking-widest mb-1 block",children:"Incoming (Theirs)"}),n.jsx("textarea",{value:d.theirs,readOnly:!0,rows:12,className:"w-full text-[10px] font-mono p-2.5 border border-orange-200 rounded-lg bg-orange-50/50 resize-y focus:outline-none"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-emerald-600 uppercase tracking-widest mb-1 block",children:"Merged Output (editable)"}),n.jsx("textarea",{value:d.merged,onChange:p=>c(h,{merged:p.target.value}),rows:12,className:"w-full text-[10px] font-mono p-2.5 border border-emerald-200 rounded-lg bg-emerald-50/50 resize-y focus:outline-none focus:ring-2 focus:ring-emerald-300"})]}),n.jsx("div",{className:"flex justify-end mt-2.5",children:n.jsxs("button",{onClick:()=>y(h),disabled:d.loading,className:"flex items-center gap-1 px-3 py-1.5 bg-emerald-600 hover:bg-emerald-700 text-white text-[10px] font-semibold rounded-lg transition-colors disabled:opacity-50 shadow-sm shadow-emerald-500/20",children:[d.loading?n.jsx(ce,{size:10,className:"animate-spin"}):n.jsx(He,{size:10}),"Mark as Resolved"]})})]})})]},h)})]})}function Bl({file:e,type:t}){const s=G5[t],r=s.icon;return n.jsxs("div",{className:"flex items-center gap-2 py-1 px-2 rounded-lg hover:bg-surface-inset/60 group transition-colors",children:[n.jsx("div",{className:S("w-5 h-5 rounded flex items-center justify-center flex-shrink-0",s.bg),children:n.jsx(r,{size:10,className:s.color})}),n.jsx("span",{className:S("text-[10px] font-mono truncate flex-1",s.color),title:e,children:e}),n.jsx("span",{className:S("text-[8px] px-1.5 py-px rounded font-medium ring-1",s.bg,s.color,s.ring),children:s.label})]})}function Hl({icon:e,label:t,onClick:s,disabled:r,loading:a,primary:i}){return n.jsxs("button",{onClick:s,disabled:r,className:S("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[10px] font-semibold transition-all",i?"bg-accent hover:bg-accent-dark text-white shadow-sm shadow-accent/20":"bg-surface hover:bg-surface-inset text-content-secondary border border-border",r&&"opacity-50 cursor-not-allowed",a&&"cursor-wait"),children:[a?n.jsx(ce,{size:11,className:"animate-spin"}):e,t]})}function ql({label:e,onClick:t,loading:s,icon:r,accent:a}){return n.jsxs("button",{onClick:t,disabled:s,className:S("flex items-center gap-0.5 px-2 py-1 text-[9px] font-medium rounded-lg transition-colors",a?"bg-violet-50 text-violet-600 hover:bg-violet-100 ring-1 ring-violet-200":"bg-surface-inset text-content-secondary hover:bg-surface-inset/80 ring-1 ring-border",s&&"opacity-60 cursor-wait"),children:[s?n.jsx(ce,{size:9,className:"animate-spin"}):r,e]})}function X5(e){const t=new Date(e),s=Math.floor((Date.now()-t.getTime())/1e3);if(s<60)return`${s}s ago`;const r=Math.floor(s/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}const Z5={M:{icon:Ag,color:"text-blue-500",bg:"bg-blue-50",label:"M"},A:{icon:Fg,color:"text-emerald-500",bg:"bg-emerald-50",label:"A"},D:{icon:Lg,color:"text-red-500",bg:"bg-red-50",label:"D"},"?":{icon:Ig,color:"text-content-tertiary",bg:"bg-surface-inset",label:"?"}};function eS(){var G,J,ne;const{panelOpen:e,operationInProgress:t,logSteps:s,hasConflict:r}=Nc(),{data:a,isLoading:i}=um(),{data:l}=Xg(),{data:o,refetch:c}=Zg(15),u=ey(),x=ty(),f=ny(),g=sy(),v=ry(),y=ay(),[j,w]=m.useState(""),[h,d]=m.useState(!0),[p,b]=m.useState(!1),[N,C]=m.useState(!0),R=m.useRef(null),P=!!t,_=((a==null?void 0:a.modified.length)??0)+((a==null?void 0:a.added.length)??0)+((a==null?void 0:a.deleted.length)??0)+((a==null?void 0:a.untracked.length)??0);m.useEffect(()=>{var z;(z=R.current)==null||z.scrollIntoView({behavior:"smooth"})},[s.length]);const D=()=>{j.trim()?v.mutate(j):y.mutate(void 0,{onSuccess:z=>{w(z.message),v.mutate(z.message)}})};return n.jsxs(n.Fragment,{children:[e&&n.jsx("div",{className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-[1px] transition-opacity",onClick:()=>Pe.closePanel()}),n.jsxs("div",{className:S("fixed top-0 right-0 h-full z-50 w-[400px] max-w-[90vw] bg-surface border-l border-border shadow-2xl","flex flex-col transition-transform duration-300 ease-in-out",e?"translate-x-0":"translate-x-full"),children:[n.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5 border-b border-border bg-surface flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg bg-gradient-to-br from-orange-500 to-rose-600 flex items-center justify-center shadow-sm shadow-orange-500/20",children:n.jsx(Cr,{size:13,className:"text-white"})}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-xs font-bold text-content",children:"Git Control"}),n.jsx("p",{className:"text-[9px] text-content-tertiary",children:"Quick operations"})]})]}),n.jsx("button",{onClick:()=>Pe.closePanel(),className:"p-1 rounded-lg hover:bg-surface-inset text-content-tertiary hover:text-content-secondary transition-colors",children:n.jsx(Se,{size:14})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto",children:[r&&n.jsxs("div",{className:"mx-3 mt-3 px-3 py-2 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 flex-shrink-0"}),n.jsx("span",{className:"text-[10px] text-red-700 font-medium",children:"Merge conflict — open full Git page to resolve"})]}),n.jsx("div",{className:"px-3.5 py-2.5 border-b border-border",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsxs("button",{onClick:()=>b(!p),className:"w-full flex items-center justify-between gap-2 px-2.5 py-1.5 rounded-lg bg-surface-inset hover:bg-surface-inset/80 border border-border text-xs font-medium text-content-secondary transition-colors",children:[n.jsxs("span",{className:"flex items-center gap-1.5 truncate",children:[n.jsx(Cr,{size:11,className:"text-accent flex-shrink-0"}),(a==null?void 0:a.branch)??"..."]}),n.jsx(Tt,{size:10,className:S("transition-transform text-content-tertiary",p&&"rotate-180")})]}),p&&l&&n.jsxs("div",{className:"absolute top-full left-0 right-0 mt-1 bg-surface border border-border rounded-xl shadow-lg z-10 max-h-48 overflow-y-auto",children:[n.jsx("div",{className:"px-2.5 py-1 text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Local"}),l.all.map(z=>n.jsx("button",{onClick:()=>{b(!1),z!==(a==null?void 0:a.branch)&&u.mutate(z)},className:S("w-full text-left px-2.5 py-1.5 text-[10px] hover:bg-surface-inset transition-colors",z===(a==null?void 0:a.branch)&&"font-semibold text-accent bg-accent/5"),children:z},z)),l.remote.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-2.5 py-1 text-[9px] font-bold text-content-tertiary uppercase tracking-widest border-t border-border",children:"Remote"}),l.remote.map(z=>n.jsx("button",{onClick:()=>{b(!1),u.mutate(z.replace(/^origin\//,""))},className:"w-full text-left px-2.5 py-1.5 text-[10px] text-content-secondary hover:bg-surface-inset",children:z},z))]})]})]}),n.jsxs("span",{className:S("inline-flex items-center gap-1.5 text-[9px] px-2 py-1 rounded-lg font-semibold ring-1 flex-shrink-0",(G=a==null?void 0:a.conflicted)!=null&&G.length?"bg-red-50 text-red-600 ring-red-200":a!=null&&a.isClean?"bg-emerald-50 text-emerald-600 ring-emerald-200":"bg-amber-50 text-amber-600 ring-amber-200"),children:[n.jsx("span",{className:S("w-1.5 h-1.5 rounded-full",(J=a==null?void 0:a.conflicted)!=null&&J.length?"bg-red-500":a!=null&&a.isClean?"bg-emerald-500":"bg-amber-500")}),i?"…":(ne=a==null?void 0:a.conflicted)!=null&&ne.length?"Conflict":a!=null&&a.isClean?"Clean":`${_} pending`]}),a&&(a.ahead>0||a.behind>0)&&n.jsxs("span",{className:"text-[9px] text-content-tertiary font-mono tabular-nums flex-shrink-0",children:[a.ahead>0&&n.jsxs("span",{className:"text-emerald-600",children:["↑",a.ahead]}),a.behind>0&&n.jsxs("span",{className:"text-amber-600 ml-0.5",children:["↓",a.behind]})]})]})}),n.jsxs("div",{className:"px-3.5 py-2.5 border-b border-border",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Changes"}),_>0&&n.jsx("span",{className:"text-[9px] font-bold text-accent bg-accent/8 px-1.5 py-px rounded ring-1 ring-accent/15",children:_})]}),_>0&&n.jsx("div",{className:"flex items-center gap-1.5",children:[{type:"M",count:(a==null?void 0:a.modified.length)??0,color:"text-blue-500"},{type:"A",count:(a==null?void 0:a.added.length)??0,color:"text-emerald-500"},{type:"D",count:(a==null?void 0:a.deleted.length)??0,color:"text-red-500"},{type:"?",count:(a==null?void 0:a.untracked.length)??0,color:"text-content-tertiary"}].filter(z=>z.count>0).map(z=>n.jsxs("span",{className:S("text-[8px] font-mono font-bold",z.color),children:[z.type,z.count]},z.type))})]}),_===0?n.jsxs("div",{className:"flex items-center gap-1.5 py-2",children:[n.jsx(He,{size:12,className:"text-emerald-400"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"Working tree clean"})]}):n.jsxs("div",{className:"space-y-px max-h-[150px] overflow-y-auto",children:[a==null?void 0:a.modified.map(z=>n.jsx(Kl,{file:z,type:"M"},`M-${z}`)),a==null?void 0:a.added.map(z=>n.jsx(Kl,{file:z,type:"A"},`A-${z}`)),a==null?void 0:a.deleted.map(z=>n.jsx(Kl,{file:z,type:"D"},`D-${z}`)),a==null?void 0:a.untracked.map(z=>n.jsx(Kl,{file:z,type:"?"},`?-${z}`))]})]}),n.jsxs("div",{className:"px-3.5 py-2.5 border-b border-border space-y-2.5",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsxs("div",{className:"relative flex-1 min-w-0",children:[n.jsx(fa,{size:10,className:"absolute left-2 top-1/2 -translate-y-1/2 text-content-tertiary pointer-events-none"}),n.jsx("input",{type:"text",value:j,onChange:z=>w(z.target.value),placeholder:"Commit message…",className:"w-full text-[10px] border border-border rounded-lg pl-6 pr-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/40 bg-surface-inset/50 placeholder-content-tertiary",onKeyDown:z=>{z.key==="Enter"&&j.trim()&&x.mutate(j)}})]}),n.jsx("button",{onClick:()=>y.mutate(void 0,{onSuccess:z=>w(z.message)}),disabled:y.isPending,title:"AI commit message",className:"p-1.5 rounded-lg border border-border bg-surface text-violet-500 hover:bg-violet-50 hover:border-violet-200 transition-colors flex-shrink-0 disabled:opacity-50",children:y.isPending?n.jsx(ce,{size:10,className:"animate-spin"}):n.jsx(Gt,{size:10})})]}),n.jsxs("label",{className:"flex items-center gap-1.5 text-[9px] text-content-tertiary cursor-pointer select-none",children:[n.jsx("input",{type:"checkbox",checked:h,onChange:z=>d(z.target.checked),className:"rounded border-border text-accent focus:ring-accent w-3 h-3"}),"Pull latest (rebase) before commit"]}),n.jsxs("div",{className:"grid grid-cols-4 gap-1",children:[n.jsx(Wl,{icon:n.jsx(fa,{size:10}),label:"Commit",onClick:()=>j.trim()&&x.mutate(j),disabled:P||!j.trim(),loading:t==="commit"}),n.jsx(Wl,{icon:n.jsx(zg,{size:10}),label:"Push",onClick:()=>g.mutate(),disabled:P,loading:t==="push"}),n.jsx(Wl,{icon:n.jsx(Pg,{size:10}),label:"Pull",onClick:()=>f.mutate(h),disabled:P,loading:t==="pull"}),n.jsx(Wl,{icon:n.jsx(qg,{size:10}),label:"Sync",onClick:D,disabled:P,loading:t==="full-sync",primary:!0})]}),n.jsx("p",{className:"text-[8px] text-content-tertiary text-center",children:"Sync: pull --rebase → stage → commit → push"})]}),s.length>0&&n.jsxs("div",{className:"border-b border-border",children:[n.jsxs("button",{onClick:()=>C(!N),className:"w-full px-3.5 py-2 flex items-center justify-between hover:bg-surface-inset/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(vc,{size:10,className:"text-content-tertiary"}),n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"Log"}),n.jsx("span",{className:"text-[8px] font-medium text-content-tertiary bg-surface-inset px-1.5 py-px rounded ring-1 ring-border",children:s.length}),t&&n.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] text-blue-500 font-medium",children:[n.jsx(ce,{size:8,className:"animate-spin"})," ",t]})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{onClick:z=>{z.stopPropagation(),Pe.clearLogs()},className:"text-[8px] text-content-tertiary hover:text-red-500 px-1 py-0.5 rounded hover:bg-red-50 transition-colors",children:"Clear"}),n.jsx(Tt,{size:10,className:S("text-content-tertiary transition-transform",N&&"rotate-180")})]})]}),N&&n.jsx("div",{className:"px-3.5 pb-2.5 max-h-[150px] overflow-y-auto",children:n.jsxs("div",{className:"space-y-0.5",children:[s.map((z,I)=>n.jsxs("div",{className:"flex items-start gap-1.5 text-[9px] py-0.5",children:[z.status==="running"&&n.jsx(ce,{size:9,className:"mt-px text-blue-500 animate-spin flex-shrink-0"}),z.status==="done"&&n.jsx(He,{size:9,className:"mt-px text-emerald-500 flex-shrink-0"}),z.status==="error"&&n.jsx(ut,{size:9,className:"mt-px text-red-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("span",{className:S("font-medium",z.status==="error"?"text-red-600":"text-content-secondary"),children:z.step}),z.message&&n.jsxs("span",{className:S("ml-1 font-normal",z.status==="error"?"text-red-400":"text-content-tertiary"),children:["— ",z.message]})]})]},I)),n.jsx("div",{ref:R})]})})]}),n.jsxs("div",{className:"px-3.5 py-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-[9px] font-bold text-content-tertiary uppercase tracking-widest",children:"History"}),n.jsx("button",{onClick:()=>c(),className:"p-1 rounded-md text-content-tertiary hover:text-accent hover:bg-accent/5 transition-colors",title:"Refresh",children:n.jsx(lm,{size:10})})]}),!o||o.length===0?n.jsxs("div",{className:"flex items-center gap-1.5 py-3",children:[n.jsx(fa,{size:12,className:"text-content-tertiary/40"}),n.jsx("p",{className:"text-[10px] text-content-tertiary",children:"No commits yet"})]}):n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"absolute left-[5px] top-2 bottom-2 w-px bg-border"}),n.jsx("div",{className:"space-y-0.5",children:o.map((z,I)=>n.jsxs("div",{className:"flex items-start gap-2 relative py-1 rounded-lg hover:bg-surface-inset/50 px-0.5 -mx-0.5 transition-colors",children:[n.jsx("div",{className:S("mt-1.5 w-[9px] h-[9px] rounded-full border-[1.5px] flex-shrink-0 z-[1]",I===0?"border-accent bg-accent/20":"border-border bg-surface")}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-[10px] text-content font-medium leading-snug truncate",title:z.message,children:z.message}),n.jsxs("div",{className:"flex items-center gap-1.5 text-[8px] text-content-tertiary mt-0.5",children:[n.jsx("code",{className:"font-mono text-accent/70",children:z.shortHash}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(Qg,{size:7})," ",z.author]}),n.jsxs("span",{className:"flex items-center gap-0.5",children:[n.jsx(Tr,{size:7})," ",X5(z.date)]})]})]})]},z.hash))})]})]})]})]})]})}function Kl({file:e,type:t}){const s=Z5[t],r=s.icon;return n.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 px-1.5 rounded-md hover:bg-surface-inset/60 transition-colors",children:[n.jsx("div",{className:S("w-4 h-4 rounded flex items-center justify-center flex-shrink-0",s.bg),children:n.jsx(r,{size:9,className:s.color})}),n.jsx("span",{className:S("text-[9px] font-mono truncate flex-1",s.color),title:e,children:e})]})}function Wl({icon:e,label:t,onClick:s,disabled:r,loading:a,primary:i}){return n.jsxs("button",{onClick:s,disabled:r,className:S("flex flex-col items-center justify-center gap-0.5 px-2 py-1.5 rounded-lg text-[9px] font-semibold transition-all",i?"bg-accent hover:bg-accent-dark text-white shadow-sm shadow-accent/20":"bg-surface hover:bg-surface-inset text-content-secondary border border-border",r&&"opacity-50 cursor-not-allowed",a&&"cursor-wait"),children:[a?n.jsx(ce,{size:10,className:"animate-spin"}):e,t]})}function tS(){const e=En(),t=qs(),s=xm(),r=Py(),{stepLogs:a}=zy(),i=s.isRunning,l=My(i),[o,c]=m.useState(!1),[u,x]=m.useState(!1),[f,g]=m.useState(!1),v=t.pathname==="/run";m.useEffect(()=>{i&&!f&&(c(!0),x(!1))},[i,f]),m.useEffect(()=>{i&&g(!1)},[s.runId]);const y=()=>{c(!1),g(!0)},j=()=>{c(!1),g(!0),e("/run")};return!o&&!i&&!s.completed||!o||v?null:u?n.jsx(nS,{runActive:i,elapsed:l,completed:s.completed,onExpand:()=>x(!1),onClose:y}):n.jsx(sS,{progress:s,live:r,elapsed:l,runActive:i,stepLogs:a,onMinimise:()=>x(!0),onClose:y,onGoToRunConfig:j})}function nS({runActive:e,elapsed:t,completed:s,onExpand:r,onClose:a}){return n.jsxs("div",{className:"fixed bottom-4 right-4 z-[9999] flex items-center gap-2 bg-slate-900 rounded-full px-3 py-1.5 shadow-2xl border border-slate-700 cursor-pointer hover:bg-slate-800 transition-colors",onClick:r,children:[e?n.jsxs(n.Fragment,{children:[n.jsx(ce,{size:12,className:"text-emerald-400 animate-spin"}),n.jsx("span",{className:"text-[10px] font-semibold text-white",children:"Running"}),n.jsx("span",{className:"text-[9px] font-mono text-slate-400",children:t})]}):s?n.jsxs(n.Fragment,{children:[s.failed>0?n.jsx(ut,{size:12,className:"text-red-400"}):n.jsx(Ue,{size:12,className:"text-emerald-400"}),n.jsxs("span",{className:"text-[10px] font-semibold text-white",children:[s.passed,"✓ ",s.failed>0&&`${s.failed}✗`]})]}):null,n.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),a()},className:"p-0.5 rounded-full hover:bg-slate-700 text-slate-500 hover:text-white transition-colors",children:n.jsx(Se,{size:10})})]})}function sS({progress:e,live:t,elapsed:s,runActive:r,stepLogs:a,onMinimise:i,onClose:l,onGoToRunConfig:o}){var h;const c=m.useRef(null),[u,x]=m.useState(null),f=m.useRef(!1),g=m.useRef({x:0,y:0}),v=m.useRef(null);m.useEffect(()=>{var d;(d=v.current)==null||d.scrollIntoView({behavior:"smooth"})},[a.length]);const y=m.useCallback(d=>{d.preventDefault(),f.current=!0;const p=c.current,b=(u==null?void 0:u.x)??(p?p.getBoundingClientRect().left:window.innerWidth-400),N=(u==null?void 0:u.y)??(p?p.getBoundingClientRect().top:window.innerHeight-400);g.current={x:d.clientX-b,y:d.clientY-N};const C=P=>{f.current&&x({x:Math.max(0,Math.min(window.innerWidth-200,P.clientX-g.current.x)),y:Math.max(0,Math.min(window.innerHeight-60,P.clientY-g.current.y))})},R=()=>{f.current=!1,window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",R)};window.addEventListener("mousemove",C),window.addEventListener("mouseup",R)},[u]),j=!!t.screenshot,w=e.completed;return n.jsxs("div",{ref:c,className:"fixed z-[9999] w-[340px] rounded-xl bg-slate-900 border border-slate-700 shadow-2xl overflow-hidden flex flex-col",style:u?{left:u.x,top:u.y,maxHeight:420}:{bottom:16,right:16,maxHeight:420},children:[n.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-3 py-2 bg-slate-800 border-b border-slate-700 cursor-move select-none",onMouseDown:y,children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(uN,{size:12,className:"text-slate-500"}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500/80"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500/80"})]}),e.currentBrowser&&n.jsx(Sc,{browser:e.currentBrowser,size:14,className:"ml-1"}),n.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider ml-1",children:e.currentBrowser?pm(e.currentBrowser):r?"Browser Preview":"Run Complete"}),r&&n.jsx("span",{className:"text-[8px] font-bold px-1.5 py-0.5 rounded bg-emerald-500/20 text-emerald-400 animate-pulse",children:"LIVE"})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),o()},title:"Open in Run Config (full view)",className:"p-1.5 rounded text-slate-300 hover:text-accent hover:bg-slate-600 transition-colors",onMouseDown:d=>d.stopPropagation(),children:n.jsx(im,{size:14})}),n.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),i()},title:"Minimise",className:"p-1.5 rounded text-slate-300 hover:text-white hover:bg-slate-600 transition-colors",onMouseDown:d=>d.stopPropagation(),children:n.jsx(Hg,{size:14})}),n.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),l()},title:"Close",className:"p-1.5 rounded text-slate-300 hover:text-red-400 hover:bg-slate-600 transition-colors",onMouseDown:d=>d.stopPropagation(),children:n.jsx(Se,{size:14})})]})]}),n.jsxs("div",{className:"relative bg-slate-950 flex items-center justify-center overflow-hidden",style:{minHeight:120,maxHeight:180},children:[j&&n.jsx("img",{src:`data:image/jpeg;base64,${t.screenshot}`,alt:"Browser",className:S("w-full h-auto object-contain",w&&!r&&"opacity-30"),style:{maxHeight:180}}),!j&&r&&n.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[n.jsxs("div",{className:"w-12 h-8 rounded-lg bg-slate-800 border border-slate-700 overflow-hidden relative",children:[n.jsxs("div",{className:"h-2 bg-slate-750 border-b border-slate-700 flex items-center px-1 gap-0.5",children:[n.jsx("div",{className:"w-1 h-1 rounded-full bg-red-500/50"}),n.jsx("div",{className:"w-1 h-1 rounded-full bg-amber-500/50"}),n.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500/50"})]}),n.jsxs("div",{className:"p-1 space-y-0.5",children:[n.jsx("div",{className:"h-0.5 bg-slate-700 rounded w-3/4 animate-pulse"}),n.jsx("div",{className:"h-0.5 bg-slate-700 rounded w-1/2 animate-pulse"})]})]}),n.jsx("p",{className:"text-[9px] text-slate-500",children:"Waiting for screenshots..."}),n.jsx("div",{className:"flex gap-1",children:[0,120,240].map(d=>n.jsx("div",{className:"w-1 h-1 rounded-full bg-accent animate-bounce",style:{animationDelay:`${d}ms`}},d))})]}),w&&!r&&n.jsx("div",{className:S("w-full",j?"absolute inset-0 flex items-center justify-center bg-black/50 backdrop-blur-sm":"py-4 px-6"),children:n.jsxs("div",{className:S(j?"px-5 py-4":""),children:[n.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[w.failed===0?n.jsx(Ue,{size:18,className:"text-emerald-400"}):n.jsx(ut,{size:18,className:"text-red-400"}),n.jsxs("div",{children:[n.jsx("p",{className:S("text-xs font-bold",w.failed===0?"text-emerald-300":"text-red-300"),children:w.failed===0?"All tests passed!":"Completed with failures"}),n.jsxs("p",{className:"text-[9px] text-slate-400",children:[Math.round(w.duration/1e3),"s elapsed"]})]})]}),n.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:[{label:"Passed",v:w.passed,c:"text-emerald-400 bg-emerald-500/10 ring-emerald-500/20"},{label:"Failed",v:w.failed,c:"text-red-400 bg-red-500/10 ring-red-500/20"},{label:"Skipped",v:w.skipped,c:"text-slate-400 bg-slate-500/10 ring-slate-500/20"}].map(({label:d,v:p,c:b})=>n.jsxs("div",{className:S("rounded-lg p-2 text-center ring-1",b),children:[n.jsx("p",{className:"text-sm font-bold tabular-nums",children:p}),n.jsx("p",{className:"text-[7px] uppercase tracking-wider text-slate-500",children:d})]},d))})]})}),r&&e.currentStep&&n.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/90 to-transparent px-3 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-400 animate-pulse flex-shrink-0"}),n.jsx("p",{className:"text-[8px] text-white/70 truncate font-mono",children:e.currentStep.instruction})]})})]}),n.jsxs("div",{className:"flex-shrink-0 border-t border-slate-700",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-1 bg-slate-800/50",children:[n.jsx("div",{className:"flex items-center gap-2",children:r?n.jsxs(n.Fragment,{children:[n.jsx(ce,{size:9,className:"text-emerald-400 animate-spin"}),n.jsx("span",{className:"text-[9px] text-slate-300 font-medium truncate max-w-[180px]",children:((h=e.currentCase)==null?void 0:h.caseName)??"Starting..."})]}):n.jsxs("span",{className:"text-[9px] text-slate-400",children:[a.length," step",a.length!==1&&"s"," executed"]})}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[9px] font-mono text-slate-500",children:s}),n.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-[8px] font-semibold text-accent hover:text-accent-light transition-colors",title:"Open full view in Run Config",children:[n.jsx(qa,{size:8})," Full View"]})]})]}),a.length>0&&n.jsxs("div",{className:"max-h-[72px] overflow-y-auto px-2 py-1 space-y-px",children:[a.slice(-5).map((d,p)=>n.jsxs("div",{className:"flex items-center gap-1.5 py-px text-[8px]",children:[d.status==="passed"?n.jsx(Ue,{size:8,className:"text-emerald-400 flex-shrink-0"}):d.status==="failed"?n.jsx(ut,{size:8,className:"text-red-400 flex-shrink-0"}):n.jsx(Rt,{size:8,className:"text-slate-600 flex-shrink-0"}),n.jsx("span",{className:S("truncate flex-1 font-mono",d.status==="passed"?"text-slate-400":d.status==="failed"?"text-red-300":"text-slate-600"),children:d.instruction}),n.jsxs("span",{className:"text-slate-600 tabular-nums flex-shrink-0",children:[d.duration,"ms"]})]},`${d.stepId}-${p}`)),n.jsx("div",{ref:v})]})]})]})}function rS(){const{hasConflict:e,conflictFiles:t}=Nc(),s=iy(),r=ly(),a=oy(),i=cy(),[l,o]=m.useState({});if(!e||t.length===0)return null;const c=h=>l[h]??{mode:"none",ours:"",theirs:"",merged:"",resolved:!1,loading:!1},u=(h,d)=>o(p=>({...p,[h]:{...c(h),...d}})),x=async h=>{u(h,{loading:!0});try{const d=await Ke.conflictContent(h);u(h,{ours:d.ours,theirs:d.theirs,merged:d.ours,loading:!1})}catch{u(h,{ours:"(error loading)",theirs:"(error loading)",loading:!1})}},f=async h=>{let p=c(h).ours;p||(p=(await Ke.conflictContent(h)).ours),u(h,{loading:!0}),s.mutate({filePath:h,content:p},{onSuccess:()=>u(h,{resolved:!0,loading:!1})})},g=async h=>{let p=c(h).theirs;p||(p=(await Ke.conflictContent(h)).theirs),u(h,{loading:!0}),s.mutate({filePath:h,content:p},{onSuccess:()=>u(h,{resolved:!0,loading:!1})})},v=async h=>{let d=c(h);d.ours||(await x(h),d=c(h)),u(h,{mode:"ai",loading:!0}),r.mutate({filePath:h,ours:d.ours,theirs:d.theirs},{onSuccess:p=>u(h,{merged:p.resolved,loading:!1}),onError:()=>u(h,{loading:!1})})},y=async h=>{c(h).ours||await x(h),u(h,{mode:"manual"})},j=h=>{const d=c(h);u(h,{loading:!0}),s.mutate({filePath:h,content:d.merged},{onSuccess:()=>u(h,{resolved:!0,loading:!1,mode:"none"})})},w=t.every(h=>c(h).resolved);return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-surface rounded-2xl shadow-2xl w-full max-w-4xl mx-4 max-h-[90vh] flex flex-col overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-100 bg-red-50 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Yt,{size:20,className:"text-red-500"}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-bold text-red-800",children:"Merge Conflict Detected"}),n.jsxs("p",{className:"text-xs text-red-600",children:[t.length," file",t.length>1?"s":""," with conflicts"]})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{onClick:()=>i.mutate(),disabled:i.isPending,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-red-600 bg-surface border border-red-200 rounded-lg hover:bg-red-50 transition-colors disabled:opacity-50",children:[n.jsx(yc,{size:11}),i.isPending?"Aborting...":"Abort Rebase"]}),n.jsxs("button",{onClick:()=>a.mutate(),disabled:!w||a.isPending,className:S("flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium rounded-lg transition-colors",w?"bg-green-600 hover:bg-green-700 text-white":"bg-slate-200 text-content-tertiary cursor-not-allowed"),children:[n.jsx(He,{size:11}),a.isPending?"Continuing...":"Continue Rebase"]}),n.jsx("button",{onClick:()=>Pe.clearConflict(),className:"p-1.5 rounded hover:bg-red-100 text-red-400 transition-colors",children:n.jsx(Se,{size:16})})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-4",children:t.map(h=>{const d=c(h);return n.jsxs("div",{className:"border border-slate-200 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2.5 bg-surface-inset border-b border-slate-100 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(_g,{size:14,className:d.resolved?"text-green-500":"text-amber-500"}),n.jsx("code",{className:"text-xs font-mono text-content-secondary",children:h}),d.resolved&&n.jsxs("span",{className:"text-[10px] text-green-600 bg-green-100 px-2 py-0.5 rounded-full flex items-center gap-1 font-medium",children:[n.jsx(He,{size:9})," Resolved"]})]}),!d.resolved&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(Vl,{label:"Keep Local",onClick:()=>f(h),loading:d.loading&&d.mode==="none"}),n.jsx(Vl,{label:"Accept Incoming",onClick:()=>g(h),loading:d.loading&&d.mode==="none"}),n.jsx(Vl,{label:"Manual",onClick:()=>y(h)}),n.jsx(Vl,{label:"AI Resolve",onClick:()=>v(h),loading:d.loading&&d.mode==="ai",icon:n.jsx(Gt,{size:9}),accent:!0})]})]}),d.mode!=="none"&&!d.resolved&&n.jsx("div",{className:"p-4",children:d.loading&&!d.ours?n.jsx("div",{className:"flex items-center justify-center py-6",children:n.jsx(ce,{size:18,className:"animate-spin text-content-tertiary"})}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-blue-600 uppercase tracking-wider mb-1 block",children:"Local (Ours)"}),n.jsx("textarea",{value:d.ours,readOnly:!0,rows:10,className:"w-full text-[11px] font-mono p-2.5 border border-blue-200 rounded-lg bg-blue-50/50 resize-y focus:outline-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-orange-600 uppercase tracking-wider mb-1 block",children:"Incoming (Theirs)"}),n.jsx("textarea",{value:d.theirs,readOnly:!0,rows:10,className:"w-full text-[11px] font-mono p-2.5 border border-orange-200 rounded-lg bg-orange-50/50 resize-y focus:outline-none"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[9px] font-bold text-green-600 uppercase tracking-wider mb-1 block",children:"Merged Output (editable)"}),n.jsx("textarea",{value:d.merged,onChange:p=>u(h,{merged:p.target.value}),rows:10,className:"w-full text-[11px] font-mono p-2.5 border border-green-200 rounded-lg bg-green-50/50 resize-y focus:outline-none focus:ring-2 focus:ring-green-300"})]}),n.jsx("div",{className:"flex justify-end mt-2",children:n.jsxs("button",{onClick:()=>j(h),disabled:d.loading,className:"flex items-center gap-1.5 px-4 py-1.5 bg-green-600 hover:bg-green-700 text-white text-xs font-medium rounded-lg transition-colors disabled:opacity-50",children:[d.loading?n.jsx(ce,{size:12,className:"animate-spin"}):n.jsx(He,{size:12}),"Mark as Resolved"]})})]})})]},h)})})]})})}function Vl({label:e,onClick:t,loading:s,icon:r,accent:a}){return n.jsxs("button",{onClick:t,disabled:s,className:S("flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-lg transition-colors",a?"bg-purple-100 text-purple-700 hover:bg-purple-200":"bg-slate-100 text-content-secondary hover:bg-slate-200",s&&"opacity-60 cursor-wait"),children:[s?n.jsx(ce,{size:9,className:"animate-spin"}):r,e]})}function aS(e){m.useEffect(()=>{function t(s){const r=s.target;if(!(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement))for(const a of e){const i=s.key===a.key,l=!!a.ctrl,o=!!a.meta,c=!!a.shift,u=l?s.ctrlKey:!s.ctrlKey,x=o?s.metaKey:!s.metaKey,f=c?s.shiftKey:!s.shiftKey,g=(()=>{if(l||o){const v=l?s.ctrlKey:!0,y=o?s.metaKey:!0,j=c?s.shiftKey:!s.shiftKey;return l&&!o&&s.metaKey||o&&!l&&s.ctrlKey?!1:v&&y&&j}return u&&x&&f})();if(i&&g){s.preventDefault(),a.action();return}}}return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e])}const iS=[{keys:["?"],description:"Show keyboard shortcuts"},{keys:["Ctrl","K"],description:"Search (Cmd+K)"},{keys:["Esc"],description:"Close modal / cancel"}];function lS({open:e,onClose:t}){return m.useEffect(()=>{if(!e)return;function s(r){r.key==="Escape"&&t()}return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e?n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-lg mx-4 overflow-hidden",onClick:s=>s.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[n.jsx("h2",{className:"text-sm font-bold text-content",children:"Keyboard Shortcuts"}),n.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-lg text-content-tertiary hover:bg-surface-inset hover:text-content transition-colors","aria-label":"Close",children:n.jsx(Se,{size:14})})]}),n.jsx("div",{className:"px-5 py-4 grid grid-cols-2 gap-x-6 gap-y-3",children:iS.map(s=>n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsx("span",{className:"text-xs text-content-secondary",children:s.description}),n.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:s.keys.map(r=>n.jsx("kbd",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded text-[10px] font-mono font-semibold bg-surface-inset border border-border text-content-secondary min-w-[22px]",children:r},r))})]},s.description))}),n.jsx("div",{className:"px-5 py-3 border-t border-border bg-surface-inset/30",children:n.jsxs("p",{className:"text-[10px] text-content-tertiary",children:["Press ",n.jsx("kbd",{className:"inline-flex items-center justify-center px-1 py-px rounded text-[9px] font-mono bg-surface-inset border border-border text-content-tertiary",children:"Esc"})," or click outside to close"]})})]})}):null}const oS={suite:"Suites",case:"Cases",step:"Steps"},cS={name:"name",description:"description",tag:"tag",instruction:"instruction"};function dS({type:e}){return e==="suite"?n.jsx(fl,{size:13,className:"text-indigo-500 flex-shrink-0"}):e==="case"?n.jsx(mn,{size:13,className:"text-blue-500 flex-shrink-0"}):n.jsx(Bg,{size:13,className:"text-teal-500 flex-shrink-0"})}function uS({open:e,onClose:t}){const s=En(),[r,a]=m.useState(""),[i,l]=m.useState(""),[o,c]=m.useState(-1),u=m.useRef(null);m.useEffect(()=>{const w=setTimeout(()=>l(r),300);return()=>clearTimeout(w)},[r]),m.useEffect(()=>{e&&(a(""),l(""),c(-1),setTimeout(()=>{var w;return(w=u.current)==null?void 0:w.focus()},50))},[e]);const{data:x=[]}=ke({queryKey:["search",i],queryFn:()=>DN.search(i),enabled:i.trim().length>1,staleTime:0}),f={suite:x.filter(w=>w.type==="suite"),case:x.filter(w=>w.type==="case"),step:x.filter(w=>w.type==="step")},g=x,v=w=>{w.type==="suite"?s(`/tests/${w.suiteId}`):w.type==="case"?s(`/tests/${w.suiteId}/cases/${w.caseId}`):s(`/tests/${w.suiteId}/cases/${w.caseId}`),t()},y=w=>{w.key==="ArrowDown"?(w.preventDefault(),c(h=>Math.min(h+1,g.length-1))):w.key==="ArrowUp"?(w.preventDefault(),c(h=>Math.max(h-1,-1))):w.key==="Enter"&&o>=0&&g[o]?(w.preventDefault(),v(g[o])):w.key==="Escape"&&t()};if(!e)return null;let j=-1;return n.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 backdrop-blur-sm pt-[15vh]",onClick:t,children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-xl mx-4 overflow-hidden",onClick:w=>w.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border",children:[n.jsx(Pr,{size:15,className:"text-content-tertiary flex-shrink-0"}),n.jsx("input",{ref:u,type:"text",placeholder:"Search suites, cases, steps...",value:r,onChange:w=>{a(w.target.value),c(-1)},onKeyDown:y,className:"flex-1 text-sm bg-transparent text-content placeholder-content-tertiary outline-none"}),r&&n.jsx("button",{type:"button",onClick:()=>{a(""),l("")},className:"p-1 rounded text-content-tertiary hover:text-content transition-colors",children:n.jsx(Se,{size:13})}),n.jsx("kbd",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded border border-border bg-surface-inset text-content-tertiary",children:"Esc"})]}),n.jsx("div",{className:"overflow-y-auto max-h-[50vh]",children:i.trim().length<2?n.jsx("div",{className:"px-5 py-8 text-center",children:n.jsx("p",{className:"text-sm text-content-tertiary",children:"Type at least 2 characters to search"})}):x.length===0?n.jsx("div",{className:"px-5 py-8 text-center",children:n.jsxs("p",{className:"text-sm text-content-tertiary",children:['No results for "',i,'"']})}):n.jsx("div",{className:"py-1",children:["suite","case","step"].map(w=>{const h=f[w];return h.length===0?null:n.jsxs("div",{children:[n.jsx("div",{className:"px-4 py-1.5 text-[10px] font-bold text-content-tertiary uppercase tracking-wider bg-surface-inset/50",children:oS[w]}),h.map(d=>{j++;const b=o===j;return n.jsxs("button",{type:"button",onClick:()=>v(d),className:S("w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors",b?"bg-accent/10":"hover:bg-surface-inset"),children:[n.jsx(dS,{type:d.type}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm font-medium text-content truncate",children:d.type==="step"?d.instruction:d.type==="case"?d.caseName:d.suiteName}),n.jsx("span",{className:S("text-[9px] px-1.5 py-0.5 rounded font-semibold uppercase flex-shrink-0",d.matchedOn==="name"?"bg-accent/10 text-accent":d.matchedOn==="tag"?"bg-purple-50 text-purple-600":"bg-surface-inset text-content-tertiary"),children:cS[d.matchedOn]})]}),n.jsxs("p",{className:"text-[11px] text-content-tertiary truncate mt-0.5",children:[d.type!=="suite"&&`${d.suiteName}`,d.type==="step"&&d.caseName&&` › ${d.caseName}`]})]}),n.jsx(ar,{size:11,className:S("text-content-tertiary transition-opacity flex-shrink-0",b?"opacity-100":"opacity-0")})]},`${d.suiteId}-${d.caseId??""}-${d.stepId??""}`)})]},w)})})}),x.length>0&&n.jsxs("div",{className:"px-4 py-2.5 border-t border-border bg-surface-inset/30 flex items-center gap-3 text-[10px] text-content-tertiary",children:[n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("kbd",{className:"px-1 py-px rounded border border-border bg-surface font-mono",children:"↑↓"})," navigate"]}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("kbd",{className:"px-1 py-px rounded border border-border bg-surface font-mono",children:"↵"})," select"]})]})]})})}const Fy="assuremind_onboarding_done";function Ed(){localStorage.setItem(Fy,"true")}function xS(){const{data:e=[],isLoading:t}=yy(),[s,r]=m.useState(0),[a,i]=m.useState(""),[l,o]=m.useState(""),c=En(),u=!!localStorage.getItem(Fy),x=Y({mutationFn:v=>Ia.update({baseUrl:v}),onError:v=>O.error(v.message)}),f=Y({mutationFn:v=>Or.create({name:v,type:"ui"}),onSuccess:()=>{Ed(),c("/tests")},onError:v=>O.error(v.message)});if(t||e.length>0||u)return null;const g=[0,1,2].map(v=>n.jsx("span",{className:`w-2 h-2 rounded-full transition-colors ${v===s?"bg-accent":"bg-border"}`},v));return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-surface rounded-2xl border border-border shadow-modal w-full max-w-md mx-4 overflow-hidden",children:[s===0&&n.jsxs("div",{className:"flex flex-col items-center px-8 py-8 gap-4",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-accent to-accent-dark flex items-center justify-center shadow-lg",children:n.jsx(Be,{size:28,className:"text-white"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Welcome to Assuremind Studio"}),n.jsx("p",{className:"text-sm text-content-secondary mt-2 leading-relaxed",children:"AI-powered test automation that writes, runs, and self-heals your tests. Let's get you set up in just a few steps."})]}),n.jsx("div",{className:"flex items-center gap-2 mt-2",children:g}),n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n.jsx(se,{onClick:()=>r(1),className:"w-full",children:"Get Started"}),n.jsx("button",{type:"button",onClick:()=>{Ed()},className:"text-xs text-content-tertiary hover:text-content-secondary transition-colors py-1",children:"Skip for now"})]})]}),s===1&&n.jsxs("div",{className:"flex flex-col items-center px-8 py-8 gap-4",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg",children:n.jsx(Er,{size:28,className:"text-white"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Set your Base URL"}),n.jsx("p",{className:"text-sm text-content-secondary mt-2 leading-relaxed",children:"This is the URL of the application you want to test."})]}),n.jsx("input",{type:"url",placeholder:"https://your-app.example.com",value:a,onChange:v=>i(v.target.value),className:"w-full px-3 py-2 rounded-lg border border-border bg-surface-inset text-sm text-content placeholder:text-content-tertiary outline-none focus:ring-2 focus:ring-accent/40 focus:border-accent transition-all"}),n.jsx("div",{className:"flex items-center gap-2",children:g}),n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n.jsx(se,{onClick:async()=>{a&&await x.mutateAsync(a),r(2)},loading:x.isPending,className:"w-full",children:"Next"}),n.jsx("button",{type:"button",onClick:()=>{Ed()},className:"text-xs text-content-tertiary hover:text-content-secondary transition-colors py-1",children:"Skip for now"})]})]}),s===2&&n.jsxs("div",{className:"flex flex-col items-center px-8 py-8 gap-4",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center shadow-lg",children:n.jsx(dN,{size:28,className:"text-white"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-lg font-bold text-content",children:"Create your first test suite"}),n.jsx("p",{className:"text-sm text-content-secondary mt-2 leading-relaxed",children:"Give your first test suite a name. You can add test cases to it right after."})]}),n.jsx("input",{type:"text",placeholder:"e.g. Login flow",value:l,onChange:v=>o(v.target.value),className:"w-full px-3 py-2 rounded-lg border border-border bg-surface-inset text-sm text-content placeholder:text-content-tertiary outline-none focus:ring-2 focus:ring-accent/40 focus:border-accent transition-all",onKeyDown:v=>{v.key==="Enter"&&l.trim()&&f.mutate(l.trim())}}),n.jsx("div",{className:"flex items-center gap-2",children:g}),n.jsx(se,{onClick:()=>{l.trim()&&f.mutate(l.trim())},loading:f.isPending,disabled:!l.trim(),className:"w-full",children:"Create Suite & Continue"})]})]})})}function mS(){const{job:e,showPopup:t}=Ey(),s=En();return!t||!e||e.status!=="done"?null:n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm animate-fade-in",children:n.jsxs("div",{className:"bg-surface rounded-2xl shadow-modal w-full max-w-sm mx-4 overflow-hidden border border-border animate-scale-in",children:[n.jsxs("div",{className:"flex flex-col items-center pt-8 pb-5 px-6 bg-gradient-to-b from-emerald-50/80 to-surface",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl bg-emerald-100 border border-emerald-200/50 flex items-center justify-center mb-3",children:n.jsx(Ue,{size:28,className:"text-emerald-500"})}),n.jsx("h2",{className:"text-lg font-bold text-content",children:"Suite Generated!"}),e.suiteName&&n.jsx("span",{className:"mt-2 px-3 py-1 rounded-lg bg-accent-muted text-accent text-xs font-semibold",children:e.suiteName}),n.jsx("p",{className:"text-sm text-content-secondary text-center mt-2.5 leading-relaxed",children:"Your test suite has been created. Open the Test Editor to review and run the generated test cases."})]}),n.jsxs("div",{className:"flex flex-col gap-2.5 px-6 pb-6",children:[n.jsxs("button",{type:"button",onClick:()=>{dn.dismissPopup(),s("/tests",{state:{openSuiteId:e.suiteId}})},className:"w-full py-2.5 rounded-xl bg-gradient-to-b from-accent to-accent-dark text-white font-semibold text-sm hover:brightness-110 transition-all flex items-center justify-center gap-2 shadow-sm",children:[n.jsx(Zt,{size:16})," Open Test Cases"]}),n.jsx("button",{type:"button",onClick:()=>dn.dismissPopup(),className:"w-full py-2.5 rounded-xl border border-border text-content-secondary font-medium text-sm hover:bg-surface-inset transition-colors",children:"Stay on this page"})]})]})})}function hS(){const{job:e}=Ey(),[t,s]=m.useState(null),r=m.useRef(null),a=m.useRef(null);m.useEffect(()=>{(e==null?void 0:e.status)==="running"&&s(null)},[e==null?void 0:e.id]);const i=m.useCallback(u=>{u.preventDefault();const x=a.current;if(!x)return;x.setPointerCapture(u.pointerId);const f=x.getBoundingClientRect();r.current={startX:u.clientX,startY:u.clientY,origX:f.left,origY:f.top}},[]),l=m.useCallback(u=>{if(!r.current)return;const x=a.current;if(!x)return;const f=u.clientX-r.current.startX,g=u.clientY-r.current.startY,v=r.current.origX+f,y=r.current.origY+g,j=window.innerWidth-x.offsetWidth,w=window.innerHeight-x.offsetHeight;s({x:Math.max(0,Math.min(v,j)),y:Math.max(0,Math.min(y,w))})},[]),o=m.useCallback(()=>{r.current=null},[]);if(!e||e.status!=="running")return null;const c=t?{left:t.x,top:t.y,right:"auto",bottom:"auto"}:{right:24,bottom:80};return n.jsxs("div",{ref:a,onPointerDown:i,onPointerMove:l,onPointerUp:o,style:{...c,position:"fixed",zIndex:40,touchAction:"none",cursor:"grab",userSelect:"none"},className:"flex items-center gap-2.5 px-4 py-2.5 rounded-xl bg-gradient-to-r from-accent to-accent-dark text-white shadow-elevated text-xs font-semibold animate-pulse",children:[n.jsx(ce,{size:14,className:"animate-spin"}),"Generating: ",e.label]})}function fS(){return Wa({"run:start":e=>{yt.onRunStart(e.runId)},"run:case":e=>{const t=e;t.status==="running"&&yt.onCaseRunning(t.runId,t.caseId)},"run:case:done":e=>{const t=e;yt.onCaseDone(t.runId,t.caseId,t.status)},"run:complete":e=>{const t=e;yt.onComplete(t.runId,{passed:t.passed,failed:t.failed,skipped:t.skipped});const s=t.passed+t.failed+t.skipped;t.failed>0?O.error(`Run complete — ${t.passed}/${s} passed, ${t.failed} failed`):O.success(`Run complete — ${t.passed}/${s} passed`),gr.push({id:crypto.randomUUID(),type:"run-complete",message:`Run complete — ${t.passed} passed, ${t.failed} failed`,timestamp:Date.now(),read:!1,link:"/reports"})},"run:error":e=>{const t=e;yt.clear(),O.error(`Run error: ${t.error??"unknown"}`),gr.push({id:crypto.randomUUID(),type:"run-error",message:`Run error: ${t.error??"unknown"}`,timestamp:Date.now(),read:!1,link:"/reports"})}}),null}function pS(){return Wa({"git:log":e=>{Pe.addLogStep(e)},"git:conflict":e=>{const t=e;Pe.setConflict(t.files)},"git:operation-done":()=>{Pe.finishOperation()}}),null}const gS={"/":"Dashboard","/tests":"Test Suites","/story":"Smart Tests","/run":"Run Configuration","/reports":"Reports","/variables":"Variables","/healing":"Self-Healing","/git":"Git Control Center","/settings":"Settings","/library":"Step Library","/docs":"Documentation"};function yS(){const e=qs();return e.pathname.startsWith("/tests")?"Test Suites":gS[e.pathname]??"Assuremind Studio"}function bS(){const{collapsed:e,mobileOpen:t,toggle:s}=TN(),r=yS(),[a,i]=m.useState(!1),[l,o]=m.useState(!1);return aS([{key:"?",description:"Show shortcuts",action:()=>i(!0)},{key:"Escape",description:"Close modal",action:()=>{i(!1),o(!1)}},{key:"k",ctrl:!0,description:"Search (Cmd+K)",action:()=>o(!0)},{key:"k",meta:!0,description:"Search (Cmd+K)",action:()=>o(!0)}]),n.jsxs("div",{className:"flex h-full overflow-hidden",children:[n.jsx(fS,{}),n.jsx(pS,{}),n.jsx(MN,{collapsed:e,onToggle:s,mobileOpen:t}),n.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[n.jsx(lk,{title:r,onMenuClick:s}),n.jsx("main",{className:"flex flex-col flex-1 overflow-hidden bg-background",children:n.jsxs(oj,{children:[n.jsx(wt,{path:"/",element:n.jsx(uk,{})}),n.jsx(wt,{path:"/tests",element:n.jsx(bd,{})}),n.jsx(wt,{path:"/tests/:suiteId",element:n.jsx(bd,{})}),n.jsx(wt,{path:"/tests/:suiteId/cases/:caseId",element:n.jsx(bd,{})}),n.jsx(wt,{path:"/story",element:n.jsx(l5,{})}),n.jsx(wt,{path:"/run",element:n.jsx(h5,{})}),n.jsx(wt,{path:"/reports",element:n.jsx(F5,{})}),n.jsx(wt,{path:"/variables",element:n.jsx(I5,{})}),n.jsx(wt,{path:"/healing",element:n.jsx(B5,{})}),n.jsx(wt,{path:"/git",element:n.jsx(Y5,{})}),n.jsx(wt,{path:"/settings",element:n.jsx(q5,{})}),n.jsx(wt,{path:"/library",element:n.jsx(K5,{})}),n.jsx(wt,{path:"/docs",element:n.jsx(V5,{})})]})})]}),n.jsx(lS,{open:a,onClose:()=>i(!1)}),n.jsx(uS,{open:l,onClose:()=>o(!1)})]})}function vS(){return n.jsxs(n.Fragment,{children:[n.jsx(bS,{}),n.jsx(eS,{}),n.jsx(rS,{}),n.jsx(mS,{}),n.jsx(hS,{}),n.jsx(tS,{}),n.jsx(xS,{}),n.jsx(Q2,{position:"bottom-right",toastOptions:{style:{fontSize:"13px",borderRadius:"12px",padding:"10px 16px",boxShadow:"0 4px 16px -2px rgb(0 0 0 / 0.08), 0 2px 6px -2px rgb(0 0 0 / 0.04)"}}})]})}const jS=new Qj({defaultOptions:{queries:{retry:1,staleTime:1e4,refetchOnWindowFocus:!1}}}),Iy=document.getElementById("root");if(!Iy)throw new Error("Root element not found");G0(Iy).render(n.jsx(m.StrictMode,{children:n.jsx(pj,{children:n.jsx(Gj,{client:jS,children:n.jsx(vS,{})})})}));
|