lazyscout 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,39 +1,39 @@
1
- (function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(c){if(c.ep)return;c.ep=!0;const u=l(c);fetch(c.href,u)}})();var mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pv(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Qu={exports:{}},Ei={};var tg;function r0(){if(tg)return Ei;tg=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,c,u){var f=null;if(u!==void 0&&(f=""+u),c.key!==void 0&&(f=""+c.key),"key"in c){u={};for(var p in c)p!=="key"&&(u[p]=c[p])}else u=c;return c=u.ref,{$$typeof:a,type:o,key:f,ref:c!==void 0?c:null,props:u}}return Ei.Fragment=s,Ei.jsx=l,Ei.jsxs=l,Ei}var ng;function s0(){return ng||(ng=1,Qu.exports=r0()),Qu.exports}var n=s0(),Ju={exports:{}},Xe={};var ag;function i0(){if(ag)return Xe;ag=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),j=Symbol.iterator;function b(x){return x===null||typeof x!="object"?null:(x=j&&x[j]||x["@@iterator"],typeof x=="function"?x:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,A={};function w(x,C,q){this.props=x,this.context=C,this.refs=A,this.updater=q||E}w.prototype.isReactComponent={},w.prototype.setState=function(x,C){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,C,"setState")},w.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function S(){}S.prototype=w.prototype;function O(x,C,q){this.props=x,this.context=C,this.refs=A,this.updater=q||E}var D=O.prototype=new S;D.constructor=O,N(D,w.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function F(){}var X={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function $(x,C,q){var I=q.ref;return{$$typeof:a,type:x,key:C,ref:I!==void 0?I:null,props:q}}function B(x,C){return $(x.type,C,x.props)}function J(x){return typeof x=="object"&&x!==null&&x.$$typeof===a}function z(x){var C={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(q){return C[q]})}var H=/\/+/g;function T(x,C){return typeof x=="object"&&x!==null&&x.key!=null?z(""+x.key):C.toString(36)}function K(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(F,F):(x.status="pending",x.then(function(C){x.status==="pending"&&(x.status="fulfilled",x.value=C)},function(C){x.status==="pending"&&(x.status="rejected",x.reason=C)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function V(x,C,q,I,ee){var he=typeof x;(he==="undefined"||he==="boolean")&&(x=null);var _e=!1;if(x===null)_e=!0;else switch(he){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(x.$$typeof){case a:case s:_e=!0;break;case v:return _e=x._init,V(_e(x._payload),C,q,I,ee)}}if(_e)return ee=ee(x),_e=I===""?"."+T(x,0):I,M(ee)?(q="",_e!=null&&(q=_e.replace(H,"$&/")+"/"),V(ee,C,q,"",function(Ce){return Ce})):ee!=null&&(J(ee)&&(ee=B(ee,q+(ee.key==null||x&&x.key===ee.key?"":(""+ee.key).replace(H,"$&/")+"/")+_e)),C.push(ee)),1;_e=0;var Ne=I===""?".":I+":";if(M(x))for(var le=0;le<x.length;le++)I=x[le],he=Ne+T(I,le),_e+=V(I,C,q,he,ee);else if(le=b(x),typeof le=="function")for(x=le.call(x),le=0;!(I=x.next()).done;)I=I.value,he=Ne+T(I,le++),_e+=V(I,C,q,he,ee);else if(he==="object"){if(typeof x.then=="function")return V(K(x),C,q,I,ee);throw C=String(x),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return _e}function Q(x,C,q){if(x==null)return x;var I=[],ee=0;return V(x,I,"","",function(he){return C.call(q,he,ee++)}),I}function W(x){if(x._status===-1){var C=x._result;C=C(),C.then(function(q){(x._status===0||x._status===-1)&&(x._status=1,x._result=q)},function(q){(x._status===0||x._status===-1)&&(x._status=2,x._result=q)}),x._status===-1&&(x._status=0,x._result=C)}if(x._status===1)return x._result.default;throw x._result}var R=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},Y={map:Q,forEach:function(x,C,q){Q(x,function(){C.apply(this,arguments)},q)},count:function(x){var C=0;return Q(x,function(){C++}),C},toArray:function(x){return Q(x,function(C){return C})||[]},only:function(x){if(!J(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Xe.Activity=y,Xe.Children=Y,Xe.Component=w,Xe.Fragment=l,Xe.Profiler=c,Xe.PureComponent=O,Xe.StrictMode=o,Xe.Suspense=m,Xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,Xe.__COMPILER_RUNTIME={__proto__:null,c:function(x){return X.H.useMemoCache(x)}},Xe.cache=function(x){return function(){return x.apply(null,arguments)}},Xe.cacheSignal=function(){return null},Xe.cloneElement=function(x,C,q){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var I=N({},x.props),ee=x.key;if(C!=null)for(he in C.key!==void 0&&(ee=""+C.key),C)!Z.call(C,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&C.ref===void 0||(I[he]=C[he]);var he=arguments.length-2;if(he===1)I.children=q;else if(1<he){for(var _e=Array(he),Ne=0;Ne<he;Ne++)_e[Ne]=arguments[Ne+2];I.children=_e}return $(x.type,ee,I)},Xe.createContext=function(x){return x={$$typeof:f,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:u,_context:x},x},Xe.createElement=function(x,C,q){var I,ee={},he=null;if(C!=null)for(I in C.key!==void 0&&(he=""+C.key),C)Z.call(C,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ee[I]=C[I]);var _e=arguments.length-2;if(_e===1)ee.children=q;else if(1<_e){for(var Ne=Array(_e),le=0;le<_e;le++)Ne[le]=arguments[le+2];ee.children=Ne}if(x&&x.defaultProps)for(I in _e=x.defaultProps,_e)ee[I]===void 0&&(ee[I]=_e[I]);return $(x,he,ee)},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(x){return{$$typeof:p,render:x}},Xe.isValidElement=J,Xe.lazy=function(x){return{$$typeof:v,_payload:{_status:-1,_result:x},_init:W}},Xe.memo=function(x,C){return{$$typeof:g,type:x,compare:C===void 0?null:C}},Xe.startTransition=function(x){var C=X.T,q={};X.T=q;try{var I=x(),ee=X.S;ee!==null&&ee(q,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(F,R)}catch(he){R(he)}finally{C!==null&&q.types!==null&&(C.types=q.types),X.T=C}},Xe.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},Xe.use=function(x){return X.H.use(x)},Xe.useActionState=function(x,C,q){return X.H.useActionState(x,C,q)},Xe.useCallback=function(x,C){return X.H.useCallback(x,C)},Xe.useContext=function(x){return X.H.useContext(x)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(x,C){return X.H.useDeferredValue(x,C)},Xe.useEffect=function(x,C){return X.H.useEffect(x,C)},Xe.useEffectEvent=function(x){return X.H.useEffectEvent(x)},Xe.useId=function(){return X.H.useId()},Xe.useImperativeHandle=function(x,C,q){return X.H.useImperativeHandle(x,C,q)},Xe.useInsertionEffect=function(x,C){return X.H.useInsertionEffect(x,C)},Xe.useLayoutEffect=function(x,C){return X.H.useLayoutEffect(x,C)},Xe.useMemo=function(x,C){return X.H.useMemo(x,C)},Xe.useOptimistic=function(x,C){return X.H.useOptimistic(x,C)},Xe.useReducer=function(x,C,q){return X.H.useReducer(x,C,q)},Xe.useRef=function(x){return X.H.useRef(x)},Xe.useState=function(x){return X.H.useState(x)},Xe.useSyncExternalStore=function(x,C,q){return X.H.useSyncExternalStore(x,C,q)},Xe.useTransition=function(){return X.H.useTransition()},Xe.version="19.2.8",Xe}var rg;function df(){return rg||(rg=1,Ju.exports=i0()),Ju.exports}var L=df();const Rs=Pv(L);var Wu={exports:{}},ki={},ed={exports:{}},td={};var sg;function l0(){return sg||(sg=1,(function(a){function s(V,Q){var W=V.length;V.push(Q);e:for(;0<W;){var R=W-1>>>1,Y=V[R];if(0<c(Y,Q))V[R]=Q,V[W]=Y,W=R;else break e}}function l(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var Q=V[0],W=V.pop();if(W!==Q){V[0]=W;e:for(var R=0,Y=V.length,x=Y>>>1;R<x;){var C=2*(R+1)-1,q=V[C],I=C+1,ee=V[I];if(0>c(q,W))I<Y&&0>c(ee,q)?(V[R]=ee,V[I]=W,R=I):(V[R]=q,V[C]=W,R=C);else if(I<Y&&0>c(ee,W))V[R]=ee,V[I]=W,R=I;else break e}}return Q}function c(V,Q){var W=V.sortIndex-Q.sortIndex;return W!==0?W:V.id-Q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;a.unstable_now=function(){return u.now()}}else{var f=Date,p=f.now();a.unstable_now=function(){return f.now()-p}}var m=[],g=[],v=1,y=null,j=3,b=!1,E=!1,N=!1,A=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(V){for(var Q=l(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=V)o(g),Q.sortIndex=Q.expirationTime,s(m,Q);else break;Q=l(g)}}function M(V){if(N=!1,D(V),!E)if(l(m)!==null)E=!0,F||(F=!0,z());else{var Q=l(g);Q!==null&&K(M,Q.startTime-V)}}var F=!1,X=-1,Z=5,$=-1;function B(){return A?!0:!(a.unstable_now()-$<Z)}function J(){if(A=!1,F){var V=a.unstable_now();$=V;var Q=!0;try{e:{E=!1,N&&(N=!1,S(X),X=-1),b=!0;var W=j;try{t:{for(D(V),y=l(m);y!==null&&!(y.expirationTime>V&&B());){var R=y.callback;if(typeof R=="function"){y.callback=null,j=y.priorityLevel;var Y=R(y.expirationTime<=V);if(V=a.unstable_now(),typeof Y=="function"){y.callback=Y,D(V),Q=!0;break t}y===l(m)&&o(m),D(V)}else o(m);y=l(m)}if(y!==null)Q=!0;else{var x=l(g);x!==null&&K(M,x.startTime-V),Q=!1}}break e}finally{y=null,j=W,b=!1}Q=void 0}}finally{Q?z():F=!1}}}var z;if(typeof O=="function")z=function(){O(J)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,T=H.port2;H.port1.onmessage=J,z=function(){T.postMessage(null)}}else z=function(){w(J,0)};function K(V,Q){X=w(function(){V(a.unstable_now())},Q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(V){V.callback=null},a.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<V?Math.floor(1e3/V):5},a.unstable_getCurrentPriorityLevel=function(){return j},a.unstable_next=function(V){switch(j){case 1:case 2:case 3:var Q=3;break;default:Q=j}var W=j;j=Q;try{return V()}finally{j=W}},a.unstable_requestPaint=function(){A=!0},a.unstable_runWithPriority=function(V,Q){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var W=j;j=V;try{return Q()}finally{j=W}},a.unstable_scheduleCallback=function(V,Q,W){var R=a.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?R+W:R):W=R,V){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=W+Y,V={id:v++,callback:Q,priorityLevel:V,startTime:W,expirationTime:Y,sortIndex:-1},W>R?(V.sortIndex=W,s(g,V),l(m)===null&&V===l(g)&&(N?(S(X),X=-1):N=!0,K(M,W-R))):(V.sortIndex=Y,s(m,V),E||b||(E=!0,F||(F=!0,z()))),V},a.unstable_shouldYield=B,a.unstable_wrapCallback=function(V){var Q=j;return function(){var W=j;j=Q;try{return V.apply(this,arguments)}finally{j=W}}}})(td)),td}var ig;function o0(){return ig||(ig=1,ed.exports=l0()),ed.exports}var nd={exports:{}},dn={};var lg;function c0(){if(lg)return dn;lg=1;var a=df();function s(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(s(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(m,g,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:y==null?null:""+y,children:m,containerInfo:g,implementation:v}}var f=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,dn.createPortal=function(m,g){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return u(m,g,null,v)},dn.flushSync=function(m){var g=f.T,v=o.p;try{if(f.T=null,o.p=2,m)return m()}finally{f.T=g,o.p=v,o.d.f()}},dn.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},dn.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},dn.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var v=g.as,y=p(v,g.crossOrigin),j=typeof g.integrity=="string"?g.integrity:void 0,b=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:j,fetchPriority:b}):v==="script"&&o.d.X(m,{crossOrigin:y,integrity:j,fetchPriority:b,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},dn.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=p(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},dn.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,y=p(v,g.crossOrigin);o.d.L(m,v,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},dn.preloadModule=function(m,g){if(typeof m=="string")if(g){var v=p(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},dn.requestFormReset=function(m){o.d.r(m)},dn.unstable_batchedUpdates=function(m,g){return m(g)},dn.useFormState=function(m,g,v){return f.H.useFormState(m,g,v)},dn.useFormStatus=function(){return f.H.useHostTransitionStatus()},dn.version="19.2.8",dn}var og;function u0(){if(og)return nd.exports;og=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),nd.exports=c0(),nd.exports}var cg;function d0(){if(cg)return ki;cg=1;var a=o0(),s=df(),l=u0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function f(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 p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,i=t;;){var d=r.return;if(d===null)break;var h=d.alternate;if(h===null){if(i=d.return,i!==null){r=i;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===r)return m(d),e;if(h===i)return m(d),t;h=h.sibling}throw Error(o(188))}if(r.return!==i.return)r=d,i=h;else{for(var _=!1,U=d.child;U;){if(U===r){_=!0,r=d,i=h;break}if(U===i){_=!0,i=d,r=h;break}U=U.sibling}if(!_){for(U=h.child;U;){if(U===r){_=!0,r=h,i=d;break}if(U===i){_=!0,i=h,r=d;break}U=U.sibling}if(!_)throw Error(o(189))}}if(r.alternate!==i)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,j=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),O=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var H=Symbol.for("react.client.reference");function T(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===H?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case w:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case F:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case O:return e.displayName||"Context";case S:return(e._context.displayName||"Context")+".Consumer";case D:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:T(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return T(e(t))}catch{}}return null}var K=Array.isArray,V=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},R=[],Y=-1;function x(e){return{current:e}}function C(e){0>Y||(e.current=R[Y],R[Y]=null,Y--)}function q(e,t){Y++,R[Y]=e.current,e.current=t}var I=x(null),ee=x(null),he=x(null),_e=x(null);function Ne(e,t){switch(q(he,t),q(ee,e),q(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Nm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Nm(t),e=Cm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(I),q(I,e)}function le(){C(I),C(ee),C(he)}function Ce(e){e.memoizedState!==null&&q(_e,e);var t=I.current,r=Cm(t,e.type);t!==r&&(q(ee,e),q(I,r))}function ye(e){ee.current===e&&(C(I),C(ee)),_e.current===e&&(C(_e),Ni._currentValue=W)}var Fe,Ue;function k(e){if(Fe===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Fe=t&&t[1]||"",Ue=-1<r.stack.indexOf(`
1
+ (function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(c){if(c.ep)return;c.ep=!0;const u=l(c);fetch(c.href,u)}})();var go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $v(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ju={exports:{}},Ei={};var tg;function s0(){if(tg)return Ei;tg=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,c,u){var f=null;if(u!==void 0&&(f=""+u),c.key!==void 0&&(f=""+c.key),"key"in c){u={};for(var p in c)p!=="key"&&(u[p]=c[p])}else u=c;return c=u.ref,{$$typeof:a,type:o,key:f,ref:c!==void 0?c:null,props:u}}return Ei.Fragment=s,Ei.jsx=l,Ei.jsxs=l,Ei}var ng;function i0(){return ng||(ng=1,Ju.exports=s0()),Ju.exports}var n=i0(),Wu={exports:{}},Ze={};var ag;function l0(){if(ag)return Ze;ag=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function b(x){return x===null||typeof x!="object"?null:(x=S&&x[S]||x["@@iterator"],typeof x=="function"?x:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,A={};function w(x,C,q){this.props=x,this.context=C,this.refs=A,this.updater=q||E}w.prototype.isReactComponent={},w.prototype.setState=function(x,C){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,C,"setState")},w.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function j(){}j.prototype=w.prototype;function R(x,C,q){this.props=x,this.context=C,this.refs=A,this.updater=q||E}var O=R.prototype=new j;O.constructor=R,N(O,w.prototype),O.isPureReactComponent=!0;var M=Array.isArray;function F(){}var X={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function $(x,C,q){var I=q.ref;return{$$typeof:a,type:x,key:C,ref:I!==void 0?I:null,props:q}}function B(x,C){return $(x.type,C,x.props)}function J(x){return typeof x=="object"&&x!==null&&x.$$typeof===a}function z(x){var C={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(q){return C[q]})}var H=/\/+/g;function T(x,C){return typeof x=="object"&&x!==null&&x.key!=null?z(""+x.key):C.toString(36)}function K(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(F,F):(x.status="pending",x.then(function(C){x.status==="pending"&&(x.status="fulfilled",x.value=C)},function(C){x.status==="pending"&&(x.status="rejected",x.reason=C)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function V(x,C,q,I,ee){var he=typeof x;(he==="undefined"||he==="boolean")&&(x=null);var _e=!1;if(x===null)_e=!0;else switch(he){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(x.$$typeof){case a:case s:_e=!0;break;case v:return _e=x._init,V(_e(x._payload),C,q,I,ee)}}if(_e)return ee=ee(x),_e=I===""?"."+T(x,0):I,M(ee)?(q="",_e!=null&&(q=_e.replace(H,"$&/")+"/"),V(ee,C,q,"",function(Ce){return Ce})):ee!=null&&(J(ee)&&(ee=B(ee,q+(ee.key==null||x&&x.key===ee.key?"":(""+ee.key).replace(H,"$&/")+"/")+_e)),C.push(ee)),1;_e=0;var Ne=I===""?".":I+":";if(M(x))for(var le=0;le<x.length;le++)I=x[le],he=Ne+T(I,le),_e+=V(I,C,q,he,ee);else if(le=b(x),typeof le=="function")for(x=le.call(x),le=0;!(I=x.next()).done;)I=I.value,he=Ne+T(I,le++),_e+=V(I,C,q,he,ee);else if(he==="object"){if(typeof x.then=="function")return V(K(x),C,q,I,ee);throw C=String(x),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return _e}function Q(x,C,q){if(x==null)return x;var I=[],ee=0;return V(x,I,"","",function(he){return C.call(q,he,ee++)}),I}function W(x){if(x._status===-1){var C=x._result;C=C(),C.then(function(q){(x._status===0||x._status===-1)&&(x._status=1,x._result=q)},function(q){(x._status===0||x._status===-1)&&(x._status=2,x._result=q)}),x._status===-1&&(x._status=0,x._result=C)}if(x._status===1)return x._result.default;throw x._result}var D=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},Y={map:Q,forEach:function(x,C,q){Q(x,function(){C.apply(this,arguments)},q)},count:function(x){var C=0;return Q(x,function(){C++}),C},toArray:function(x){return Q(x,function(C){return C})||[]},only:function(x){if(!J(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Ze.Activity=y,Ze.Children=Y,Ze.Component=w,Ze.Fragment=l,Ze.Profiler=c,Ze.PureComponent=R,Ze.StrictMode=o,Ze.Suspense=m,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(x){return X.H.useMemoCache(x)}},Ze.cache=function(x){return function(){return x.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cloneElement=function(x,C,q){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var I=N({},x.props),ee=x.key;if(C!=null)for(he in C.key!==void 0&&(ee=""+C.key),C)!Z.call(C,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&C.ref===void 0||(I[he]=C[he]);var he=arguments.length-2;if(he===1)I.children=q;else if(1<he){for(var _e=Array(he),Ne=0;Ne<he;Ne++)_e[Ne]=arguments[Ne+2];I.children=_e}return $(x.type,ee,I)},Ze.createContext=function(x){return x={$$typeof:f,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:u,_context:x},x},Ze.createElement=function(x,C,q){var I,ee={},he=null;if(C!=null)for(I in C.key!==void 0&&(he=""+C.key),C)Z.call(C,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ee[I]=C[I]);var _e=arguments.length-2;if(_e===1)ee.children=q;else if(1<_e){for(var Ne=Array(_e),le=0;le<_e;le++)Ne[le]=arguments[le+2];ee.children=Ne}if(x&&x.defaultProps)for(I in _e=x.defaultProps,_e)ee[I]===void 0&&(ee[I]=_e[I]);return $(x,he,ee)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(x){return{$$typeof:p,render:x}},Ze.isValidElement=J,Ze.lazy=function(x){return{$$typeof:v,_payload:{_status:-1,_result:x},_init:W}},Ze.memo=function(x,C){return{$$typeof:g,type:x,compare:C===void 0?null:C}},Ze.startTransition=function(x){var C=X.T,q={};X.T=q;try{var I=x(),ee=X.S;ee!==null&&ee(q,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(F,D)}catch(he){D(he)}finally{C!==null&&q.types!==null&&(C.types=q.types),X.T=C}},Ze.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},Ze.use=function(x){return X.H.use(x)},Ze.useActionState=function(x,C,q){return X.H.useActionState(x,C,q)},Ze.useCallback=function(x,C){return X.H.useCallback(x,C)},Ze.useContext=function(x){return X.H.useContext(x)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(x,C){return X.H.useDeferredValue(x,C)},Ze.useEffect=function(x,C){return X.H.useEffect(x,C)},Ze.useEffectEvent=function(x){return X.H.useEffectEvent(x)},Ze.useId=function(){return X.H.useId()},Ze.useImperativeHandle=function(x,C,q){return X.H.useImperativeHandle(x,C,q)},Ze.useInsertionEffect=function(x,C){return X.H.useInsertionEffect(x,C)},Ze.useLayoutEffect=function(x,C){return X.H.useLayoutEffect(x,C)},Ze.useMemo=function(x,C){return X.H.useMemo(x,C)},Ze.useOptimistic=function(x,C){return X.H.useOptimistic(x,C)},Ze.useReducer=function(x,C,q){return X.H.useReducer(x,C,q)},Ze.useRef=function(x){return X.H.useRef(x)},Ze.useState=function(x){return X.H.useState(x)},Ze.useSyncExternalStore=function(x,C,q){return X.H.useSyncExternalStore(x,C,q)},Ze.useTransition=function(){return X.H.useTransition()},Ze.version="19.2.8",Ze}var rg;function ff(){return rg||(rg=1,Wu.exports=l0()),Wu.exports}var L=ff();const Rs=$v(L);var ed={exports:{}},ki={},td={exports:{}},nd={};var sg;function o0(){return sg||(sg=1,(function(a){function s(V,Q){var W=V.length;V.push(Q);e:for(;0<W;){var D=W-1>>>1,Y=V[D];if(0<c(Y,Q))V[D]=Q,V[W]=Y,W=D;else break e}}function l(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var Q=V[0],W=V.pop();if(W!==Q){V[0]=W;e:for(var D=0,Y=V.length,x=Y>>>1;D<x;){var C=2*(D+1)-1,q=V[C],I=C+1,ee=V[I];if(0>c(q,W))I<Y&&0>c(ee,q)?(V[D]=ee,V[I]=W,D=I):(V[D]=q,V[C]=W,D=C);else if(I<Y&&0>c(ee,W))V[D]=ee,V[I]=W,D=I;else break e}}return Q}function c(V,Q){var W=V.sortIndex-Q.sortIndex;return W!==0?W:V.id-Q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;a.unstable_now=function(){return u.now()}}else{var f=Date,p=f.now();a.unstable_now=function(){return f.now()-p}}var m=[],g=[],v=1,y=null,S=3,b=!1,E=!1,N=!1,A=!1,w=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function O(V){for(var Q=l(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=V)o(g),Q.sortIndex=Q.expirationTime,s(m,Q);else break;Q=l(g)}}function M(V){if(N=!1,O(V),!E)if(l(m)!==null)E=!0,F||(F=!0,z());else{var Q=l(g);Q!==null&&K(M,Q.startTime-V)}}var F=!1,X=-1,Z=5,$=-1;function B(){return A?!0:!(a.unstable_now()-$<Z)}function J(){if(A=!1,F){var V=a.unstable_now();$=V;var Q=!0;try{e:{E=!1,N&&(N=!1,j(X),X=-1),b=!0;var W=S;try{t:{for(O(V),y=l(m);y!==null&&!(y.expirationTime>V&&B());){var D=y.callback;if(typeof D=="function"){y.callback=null,S=y.priorityLevel;var Y=D(y.expirationTime<=V);if(V=a.unstable_now(),typeof Y=="function"){y.callback=Y,O(V),Q=!0;break t}y===l(m)&&o(m),O(V)}else o(m);y=l(m)}if(y!==null)Q=!0;else{var x=l(g);x!==null&&K(M,x.startTime-V),Q=!1}}break e}finally{y=null,S=W,b=!1}Q=void 0}}finally{Q?z():F=!1}}}var z;if(typeof R=="function")z=function(){R(J)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,T=H.port2;H.port1.onmessage=J,z=function(){T.postMessage(null)}}else z=function(){w(J,0)};function K(V,Q){X=w(function(){V(a.unstable_now())},Q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(V){V.callback=null},a.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<V?Math.floor(1e3/V):5},a.unstable_getCurrentPriorityLevel=function(){return S},a.unstable_next=function(V){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var W=S;S=Q;try{return V()}finally{S=W}},a.unstable_requestPaint=function(){A=!0},a.unstable_runWithPriority=function(V,Q){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var W=S;S=V;try{return Q()}finally{S=W}},a.unstable_scheduleCallback=function(V,Q,W){var D=a.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?D+W:D):W=D,V){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=W+Y,V={id:v++,callback:Q,priorityLevel:V,startTime:W,expirationTime:Y,sortIndex:-1},W>D?(V.sortIndex=W,s(g,V),l(m)===null&&V===l(g)&&(N?(j(X),X=-1):N=!0,K(M,W-D))):(V.sortIndex=Y,s(m,V),E||b||(E=!0,F||(F=!0,z()))),V},a.unstable_shouldYield=B,a.unstable_wrapCallback=function(V){var Q=S;return function(){var W=S;S=Q;try{return V.apply(this,arguments)}finally{S=W}}}})(nd)),nd}var ig;function c0(){return ig||(ig=1,td.exports=o0()),td.exports}var ad={exports:{}},dn={};var lg;function u0(){if(lg)return dn;lg=1;var a=ff();function s(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(s(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(m,g,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:y==null?null:""+y,children:m,containerInfo:g,implementation:v}}var f=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,dn.createPortal=function(m,g){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return u(m,g,null,v)},dn.flushSync=function(m){var g=f.T,v=o.p;try{if(f.T=null,o.p=2,m)return m()}finally{f.T=g,o.p=v,o.d.f()}},dn.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},dn.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},dn.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var v=g.as,y=p(v,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,b=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:b}):v==="script"&&o.d.X(m,{crossOrigin:y,integrity:S,fetchPriority:b,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},dn.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=p(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},dn.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,y=p(v,g.crossOrigin);o.d.L(m,v,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},dn.preloadModule=function(m,g){if(typeof m=="string")if(g){var v=p(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},dn.requestFormReset=function(m){o.d.r(m)},dn.unstable_batchedUpdates=function(m,g){return m(g)},dn.useFormState=function(m,g,v){return f.H.useFormState(m,g,v)},dn.useFormStatus=function(){return f.H.useHostTransitionStatus()},dn.version="19.2.8",dn}var og;function d0(){if(og)return ad.exports;og=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),ad.exports=u0(),ad.exports}var cg;function f0(){if(cg)return ki;cg=1;var a=c0(),s=ff(),l=d0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function f(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 p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,i=t;;){var d=r.return;if(d===null)break;var h=d.alternate;if(h===null){if(i=d.return,i!==null){r=i;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===r)return m(d),e;if(h===i)return m(d),t;h=h.sibling}throw Error(o(188))}if(r.return!==i.return)r=d,i=h;else{for(var _=!1,U=d.child;U;){if(U===r){_=!0,r=d,i=h;break}if(U===i){_=!0,i=d,r=h;break}U=U.sibling}if(!_){for(U=h.child;U;){if(U===r){_=!0,r=h,i=d;break}if(U===i){_=!0,i=h,r=d;break}U=U.sibling}if(!_)throw Error(o(189))}}if(r.alternate!==i)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),R=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var H=Symbol.for("react.client.reference");function T(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===H?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case w:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case F:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case R:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case O:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:T(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return T(e(t))}catch{}}return null}var K=Array.isArray,V=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},D=[],Y=-1;function x(e){return{current:e}}function C(e){0>Y||(e.current=D[Y],D[Y]=null,Y--)}function q(e,t){Y++,D[Y]=e.current,e.current=t}var I=x(null),ee=x(null),he=x(null),_e=x(null);function Ne(e,t){switch(q(he,t),q(ee,e),q(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Nm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Nm(t),e=Cm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(I),q(I,e)}function le(){C(I),C(ee),C(he)}function Ce(e){e.memoizedState!==null&&q(_e,e);var t=I.current,r=Cm(t,e.type);t!==r&&(q(ee,e),q(I,r))}function ye(e){ee.current===e&&(C(I),C(ee)),_e.current===e&&(C(_e),Ni._currentValue=W)}var Ge,Me;function k(e){if(Ge===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Ge=t&&t[1]||"",Me=-1<r.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Fe+e+Ue}var pe=!1;function ce(e,t){if(!e||pe)return"";pe=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(me){var de=me}Reflect.construct(e,[],Se)}else{try{Se.call()}catch(me){de=me}e.call(Se.prototype)}}else{try{throw Error()}catch(me){de=me}(Se=e())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(me){if(me&&de&&typeof me.stack=="string")return[me.stack,de.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=i.DetermineComponentFrameRoot(),_=h[0],U=h[1];if(_&&U){var te=_.split(`
3
+ `+Ge+e+Me}var pe=!1;function ce(e,t){if(!e||pe)return"";pe=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(me){var de=me}Reflect.construct(e,[],Se)}else{try{Se.call()}catch(me){de=me}e.call(Se.prototype)}}else{try{throw Error()}catch(me){de=me}(Se=e())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(me){if(me&&de&&typeof me.stack=="string")return[me.stack,de.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=i.DetermineComponentFrameRoot(),_=h[0],U=h[1];if(_&&U){var te=_.split(`
4
4
  `),ue=U.split(`
5
5
  `);for(d=i=0;i<te.length&&!te[i].includes("DetermineComponentFrameRoot");)i++;for(;d<ue.length&&!ue[d].includes("DetermineComponentFrameRoot");)d++;if(i===te.length||d===ue.length)for(i=te.length-1,d=ue.length-1;1<=i&&0<=d&&te[i]!==ue[d];)d--;for(;1<=i&&0<=d;i--,d--)if(te[i]!==ue[d]){if(i!==1||d!==1)do if(i--,d--,0>d||te[i]!==ue[d]){var be=`
6
6
  `+te[i].replace(" at new "," at ");return e.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",e.displayName)),be}while(1<=i&&0<=d);break}}}finally{pe=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?k(r):""}function G(e,t){switch(e.tag){case 26:case 27:case 5:return k(e.type);case 16:return k("Lazy");case 13:return e.child!==t&&t!==null?k("Suspense Fallback"):k("Suspense");case 19:return k("SuspenseList");case 0:case 15:return ce(e.type,!1);case 11:return ce(e.type.render,!1);case 1:return ce(e.type,!0);case 31:return k("Activity");default:return""}}function P(e){try{var t="",r=null;do t+=G(e,r),r=e,e=e.return;while(e);return t}catch(i){return`
7
7
  Error generating stack: `+i.message+`
8
- `+i.stack}}var ne=Object.prototype.hasOwnProperty,xe=a.unstable_scheduleCallback,ge=a.unstable_cancelCallback,se=a.unstable_shouldYield,Te=a.unstable_requestPaint,Ee=a.unstable_now,we=a.unstable_getCurrentPriorityLevel,ke=a.unstable_ImmediatePriority,qe=a.unstable_UserBlockingPriority,fe=a.unstable_NormalPriority,ze=a.unstable_LowPriority,$e=a.unstable_IdlePriority,Ve=a.log,rt=a.unstable_setDisableYieldValue,et=null,ht=null;function pt(e){if(typeof Ve=="function"&&rt(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(et,e)}catch{}}var Oe=Math.clz32?Math.clz32:Ze,Et=Math.log,Tt=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Et(e)/Tt|0)|0}var dt=256,st=262144,Ut=4194304;function mt(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function zt(e,t,r){var i=e.pendingLanes;if(i===0)return 0;var d=0,h=e.suspendedLanes,_=e.pingedLanes;e=e.warmLanes;var U=i&134217727;return U!==0?(i=U&~h,i!==0?d=mt(i):(_&=U,_!==0?d=mt(_):r||(r=U&~e,r!==0&&(d=mt(r))))):(U=i&~h,U!==0?d=mt(U):_!==0?d=mt(_):r||(r=i&~e,r!==0&&(d=mt(r)))),d===0?0:t!==0&&t!==d&&(t&h)===0&&(h=d&-d,r=t&-t,h>=r||h===32&&(r&4194048)!==0)?t:d}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xt(){var e=Ut;return Ut<<=1,(Ut&62914560)===0&&(Ut=4194304),e}function tt(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ge(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ie(e,t,r,i,d,h){var _=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var U=e.entanglements,te=e.expirationTimes,ue=e.hiddenUpdates;for(r=_&~r;0<r;){var be=31-Oe(r),Se=1<<be;U[be]=0,te[be]=-1;var de=ue[be];if(de!==null)for(ue[be]=null,be=0;be<de.length;be++){var me=de[be];me!==null&&(me.lane&=-536870913)}r&=~Se}i!==0&&Ye(e,i,0),h!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=h&~(_&~t))}function Ye(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Oe(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|r&261930}function $n(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Oe(r),d=1<<i;d&t|e[i]&t&&(e[i]|=t),r&=~d}}function qn(e,t){var r=t&-t;return r=(r&42)!==0?1:Bt(r),(r&(e.suspendedLanes|t))!==0?0:r}function Bt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Zt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ma(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Xm(e.type))}function ln(e,t){var r=Q.p;try{return Q.p=e,t()}finally{Q.p=r}}var Kt=Math.random().toString(36).slice(2),jt="__reactFiber$"+Kt,Qt="__reactProps$"+Kt,Jt="__reactContainer$"+Kt,Ua="__reactEvents$"+Kt,on="__reactListeners$"+Kt,Hn="__reactHandles$"+Kt,pn="__reactResources$"+Kt,En="__reactMarker$"+Kt;function bn(e){delete e[jt],delete e[Qt],delete e[Ua],delete e[on],delete e[Hn]}function tn(e){var t=e[jt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Jt]||r[jt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Rm(e);e!==null;){if(r=e[jt])return r;e=Rm(e)}return t}e=r,r=e.parentNode}return null}function Gn(e){if(e=e[jt]||e[Jt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ga(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ot(e){var t=e[pn];return t||(t=e[pn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[En]=!0}var xr=new Set,jr={};function kn(e,t){Fn(e,t),Fn(e+"Capture",t)}function Fn(e,t){for(jr[e]=t,e=0;e<t.length;e++)xr.add(t[e])}var Sr=RegExp("^[: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]*$"),An={},va={};function Us(e){return ne.call(va,e)?!0:ne.call(An,e)?!1:Sr.test(e)?va[e]=!0:(An[e]=!0,!1)}function za(e,t,r){if(Us(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function Ba(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function mn(e,t,r,i){if(i===null)e.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+i)}}function re(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $t(e,t,r){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,h=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(_){r=""+_,h.call(this,_)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return r},setValue:function(_){r=""+_},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Ae(e)?"checked":"value";e._valueTracker=$t(e,t,""+e[t])}}function Yr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ae(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Xr(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}}var Zo=/[\n"\\]/g;function xn(e){return e.replace(Zo,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zs(e,t,r,i,d,h,_,U){e.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.type=_:e.removeAttribute("type"),t!=null?_==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+re(t)):e.value!==""+re(t)&&(e.value=""+re(t)):_!=="submit"&&_!=="reset"||e.removeAttribute("value"),t!=null?wr(e,_,re(t)):r!=null?wr(e,_,re(r)):i!=null&&e.removeAttribute("value"),d==null&&h!=null&&(e.defaultChecked=!!h),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+re(U):e.removeAttribute("name")}function sl(e,t,r,i,d,h,_,U){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||t!=null)){Dt(e);return}r=r!=null?""+re(r):"",t=t!=null?""+re(t):r,U||t===e.value||(e.value=t),e.defaultValue=t}i=i??d,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=U?e.checked:!!i,e.defaultChecked=!!i,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.name=_),Dt(e)}function wr(e,t,r){t==="number"&&Xr(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Ia(e,t,r,i){if(e=e.options,t){t={};for(var d=0;d<r.length;d++)t["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=t.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&i&&(e[r].defaultSelected=!0)}else{for(r=""+re(r),t=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,i&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function Bs(e,t,r){if(t!=null&&(t=""+re(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+re(r):""}function Is(e,t,r,i){if(t==null){if(i!=null){if(r!=null)throw Error(o(92));if(K(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),t=r}r=re(t),e.defaultValue=r,i=e.textContent,i===r&&i!==""&&i!==null&&(e.value=i),Dt(e)}function Pa(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ko=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ve(e,t,r){var i=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,r):typeof r!="number"||r===0||Ko.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Re(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var i in r)!r.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var d in t)i=t[d],t.hasOwnProperty(d)&&r[d]!==i&&ve(e,d,i)}else for(var h in t)t.hasOwnProperty(h)&&ve(e,h,t[h])}function Ke(e){if(e.indexOf("-")===-1)return!1;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 kt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Lt(e){return cn.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function un(){}var Ps=null;function $s(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $a=null,jn=null;function Zr(e){var t=Gn(e);if(t&&(e=t.stateNode)){var r=e[Qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(zs(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+xn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var d=i[Qt]||null;if(!d)throw Error(o(90));zs(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<r.length;t++)i=r[t],i.form===e.form&&Yr(i)}break e;case"textarea":Bs(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Ia(e,!!r.multiple,t,!1)}}}var qa=!1;function On(e,t,r){if(qa)return e(t,r);qa=!0;try{var i=e(t);return i}finally{if(qa=!1,($a!==null||jn!==null)&&(Vl(),$a&&(t=$a,e=jn,jn=$a=null,Zr(t),e)))for(t=0;t<e.length;t++)Zr(e[t])}}function Nr(e,t){var r=e.stateNode;if(r===null)return null;var i=r[Qt]||null;if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var na=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qo=!1;if(na)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){Qo=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{Qo=!1}var Ha=null,Jo=null,il=null;function Cf(){if(il)return il;var e,t=Jo,r=t.length,i,d="value"in Ha?Ha.value:Ha.textContent,h=d.length;for(e=0;e<r&&t[e]===d[e];e++);var _=r-e;for(i=1;i<=_&&t[r-i]===d[h-i];i++);return il=d.slice(e,1<i?1-i:void 0)}function ll(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 ol(){return!0}function Tf(){return!1}function Sn(e){function t(r,i,d,h,_){this._reactName=r,this._targetInst=d,this.type=i,this.nativeEvent=h,this.target=_,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(r=e[U],this[U]=r?r(h):h[U]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ol:Tf,this.isPropagationStopped=Tf,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ol)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ol)},persist:function(){},isPersistent:ol}),t}var Cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=Sn(Cr),Hs=y({},Cr,{view:0,detail:0}),nb=Sn(Hs),Wo,ec,Gs,ul=y({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nc,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!==Gs&&(Gs&&e.type==="mousemove"?(Wo=e.screenX-Gs.screenX,ec=e.screenY-Gs.screenY):ec=Wo=0,Gs=e),Wo)},movementY:function(e){return"movementY"in e?e.movementY:ec}}),_f=Sn(ul),ab=y({},ul,{dataTransfer:0}),rb=Sn(ab),sb=y({},Hs,{relatedTarget:0}),tc=Sn(sb),ib=y({},Cr,{animationName:0,elapsedTime:0,pseudoElement:0}),lb=Sn(ib),ob=y({},Cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cb=Sn(ob),ub=y({},Cr,{data:0}),Ef=Sn(ub),db={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fb={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"},hb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hb[e])?!!t[e]:!1}function nc(){return pb}var mb=y({},Hs,{key:function(e){if(e.key){var t=db[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nc,charCode:function(e){return e.type==="keypress"?ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gb=Sn(mb),vb=y({},ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kf=Sn(vb),yb=y({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nc}),bb=Sn(yb),xb=y({},Cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),jb=Sn(xb),Sb=y({},ul,{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}),wb=Sn(Sb),Nb=y({},Cr,{newState:0,oldState:0}),Cb=Sn(Nb),Tb=[9,13,27,32],ac=na&&"CompositionEvent"in window,Fs=null;na&&"documentMode"in document&&(Fs=document.documentMode);var _b=na&&"TextEvent"in window&&!Fs,Af=na&&(!ac||Fs&&8<Fs&&11>=Fs),Of=" ",Rf=!1;function Df(e,t){switch(e){case"keyup":return Tb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kr=!1;function Eb(e,t){switch(e){case"compositionend":return Lf(t);case"keypress":return t.which!==32?null:(Rf=!0,Of);case"textInput":return e=t.data,e===Of&&Rf?null:e;default:return null}}function kb(e,t){if(Kr)return e==="compositionend"||!ac&&Df(e,t)?(e=Cf(),il=Jo=Ha=null,Kr=!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 Af&&t.locale!=="ko"?null:t.data;default:return null}}var Ab={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 Mf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ab[e.type]:t==="textarea"}function Uf(e,t,r,i){$a?jn?jn.push(i):jn=[i]:$a=i,t=Wl(t,"onChange"),0<t.length&&(r=new cl("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Vs=null,Ys=null;function Ob(e){ym(e,0)}function dl(e){var t=ga(e);if(Yr(t))return e}function zf(e,t){if(e==="change")return t}var Bf=!1;if(na){var rc;if(na){var sc="oninput"in document;if(!sc){var If=document.createElement("div");If.setAttribute("oninput","return;"),sc=typeof If.oninput=="function"}rc=sc}else rc=!1;Bf=rc&&(!document.documentMode||9<document.documentMode)}function Pf(){Vs&&(Vs.detachEvent("onpropertychange",$f),Ys=Vs=null)}function $f(e){if(e.propertyName==="value"&&dl(Ys)){var t=[];Uf(t,Ys,e,$s(e)),On(Ob,t)}}function Rb(e,t,r){e==="focusin"?(Pf(),Vs=t,Ys=r,Vs.attachEvent("onpropertychange",$f)):e==="focusout"&&Pf()}function Db(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return dl(Ys)}function Lb(e,t){if(e==="click")return dl(t)}function Mb(e,t){if(e==="input"||e==="change")return dl(t)}function Ub(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rn=typeof Object.is=="function"?Object.is:Ub;function Xs(e,t){if(Rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var d=r[i];if(!ne.call(t,d)||!Rn(e[d],t[d]))return!1}return!0}function qf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hf(e,t){var r=qf(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qf(r)}}function Gf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ff(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xr(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Xr(e.document)}return t}function ic(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")}var zb=na&&"documentMode"in document&&11>=document.documentMode,Qr=null,lc=null,Zs=null,oc=!1;function Vf(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;oc||Qr==null||Qr!==Xr(i)||(i=Qr,"selectionStart"in i&&ic(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Zs&&Xs(Zs,i)||(Zs=i,i=Wl(lc,"onSelect"),0<i.length&&(t=new cl("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=Qr)))}function Tr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Jr={animationend:Tr("Animation","AnimationEnd"),animationiteration:Tr("Animation","AnimationIteration"),animationstart:Tr("Animation","AnimationStart"),transitionrun:Tr("Transition","TransitionRun"),transitionstart:Tr("Transition","TransitionStart"),transitioncancel:Tr("Transition","TransitionCancel"),transitionend:Tr("Transition","TransitionEnd")},cc={},Yf={};na&&(Yf=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function _r(e){if(cc[e])return cc[e];if(!Jr[e])return e;var t=Jr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Yf)return cc[e]=t[r];return e}var Xf=_r("animationend"),Zf=_r("animationiteration"),Kf=_r("animationstart"),Bb=_r("transitionrun"),Ib=_r("transitionstart"),Pb=_r("transitioncancel"),Qf=_r("transitionend"),Jf=new Map,uc="abort auxClick beforeToggle 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(" ");uc.push("scrollEnd");function aa(e,t){Jf.set(e,t),kn(t,[e])}var fl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Vn=[],Wr=0,dc=0;function hl(){for(var e=Wr,t=dc=Wr=0;t<e;){var r=Vn[t];Vn[t++]=null;var i=Vn[t];Vn[t++]=null;var d=Vn[t];Vn[t++]=null;var h=Vn[t];if(Vn[t++]=null,i!==null&&d!==null){var _=i.pending;_===null?d.next=d:(d.next=_.next,_.next=d),i.pending=d}h!==0&&Wf(r,d,h)}}function pl(e,t,r,i){Vn[Wr++]=e,Vn[Wr++]=t,Vn[Wr++]=r,Vn[Wr++]=i,dc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function fc(e,t,r,i){return pl(e,t,r,i),ml(e)}function Er(e,t){return pl(e,null,null,t),ml(e)}function Wf(e,t,r){e.lanes|=r;var i=e.alternate;i!==null&&(i.lanes|=r);for(var d=!1,h=e.return;h!==null;)h.childLanes|=r,i=h.alternate,i!==null&&(i.childLanes|=r),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(d=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,d&&t!==null&&(d=31-Oe(r),e=h.hiddenUpdates,i=e[d],i===null?e[d]=[t]:i.push(t),t.lane=r|536870912),h):null}function ml(e){if(50<vi)throw vi=0,ju=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var es={};function $b(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(e,t,r,i){return new $b(e,t,r,i)}function hc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ya(e,t){var r=e.alternate;return r===null?(r=Dn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function eh(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gl(e,t,r,i,d,h){var _=0;if(i=e,typeof e=="function")hc(e)&&(_=1);else if(typeof e=="string")_=Vx(e,r,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=Dn(31,r,t,d),e.elementType=$,e.lanes=h,e;case N:return kr(r.children,d,h,t);case A:_=8,d|=24;break;case w:return e=Dn(12,r,t,d|2),e.elementType=w,e.lanes=h,e;case M:return e=Dn(13,r,t,d),e.elementType=M,e.lanes=h,e;case F:return e=Dn(19,r,t,d),e.elementType=F,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:_=10;break e;case S:_=9;break e;case D:_=11;break e;case X:_=14;break e;case Z:_=16,i=null;break e}_=29,r=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=Dn(_,r,t,d),t.elementType=e,t.type=i,t.lanes=h,t}function kr(e,t,r,i){return e=Dn(7,e,i,t),e.lanes=r,e}function pc(e,t,r){return e=Dn(6,e,null,t),e.lanes=r,e}function th(e){var t=Dn(18,null,null,0);return t.stateNode=e,t}function mc(e,t,r){return t=Dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var nh=new WeakMap;function Yn(e,t){if(typeof e=="object"&&e!==null){var r=nh.get(e);return r!==void 0?r:(t={value:e,source:t,stack:P(t)},nh.set(e,t),t)}return{value:e,source:t,stack:P(t)}}var ts=[],ns=0,vl=null,Ks=0,Xn=[],Zn=0,Ga=null,ca=1,ua="";function ba(e,t){ts[ns++]=Ks,ts[ns++]=vl,vl=e,Ks=t}function ah(e,t,r){Xn[Zn++]=ca,Xn[Zn++]=ua,Xn[Zn++]=Ga,Ga=e;var i=ca;e=ua;var d=32-Oe(i)-1;i&=~(1<<d),r+=1;var h=32-Oe(t)+d;if(30<h){var _=d-d%5;h=(i&(1<<_)-1).toString(32),i>>=_,d-=_,ca=1<<32-Oe(t)+d|r<<d|i,ua=h+e}else ca=1<<h|r<<d|i,ua=e}function gc(e){e.return!==null&&(ba(e,1),ah(e,1,0))}function vc(e){for(;e===vl;)vl=ts[--ns],ts[ns]=null,Ks=ts[--ns],ts[ns]=null;for(;e===Ga;)Ga=Xn[--Zn],Xn[Zn]=null,ua=Xn[--Zn],Xn[Zn]=null,ca=Xn[--Zn],Xn[Zn]=null}function rh(e,t){Xn[Zn++]=ca,Xn[Zn++]=ua,Xn[Zn++]=Ga,ca=t.id,ua=t.overflow,Ga=e}var nn=null,At=null,ft=!1,Fa=null,Kn=!1,yc=Error(o(519));function Va(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qs(Yn(t,e)),yc}function sh(e){var t=e.stateNode,r=e.type,i=e.memoizedProps;switch(t[jt]=e,t[Qt]=i,r){case"dialog":lt("cancel",t),lt("close",t);break;case"iframe":case"object":case"embed":lt("load",t);break;case"video":case"audio":for(r=0;r<bi.length;r++)lt(bi[r],t);break;case"source":lt("error",t);break;case"img":case"image":case"link":lt("error",t),lt("load",t);break;case"details":lt("toggle",t);break;case"input":lt("invalid",t),sl(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":lt("invalid",t);break;case"textarea":lt("invalid",t),Is(t,i.value,i.defaultValue,i.children)}r=i.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||i.suppressHydrationWarning===!0||Sm(t.textContent,r)?(i.popover!=null&&(lt("beforetoggle",t),lt("toggle",t)),i.onScroll!=null&&lt("scroll",t),i.onScrollEnd!=null&&lt("scrollend",t),i.onClick!=null&&(t.onclick=un),t=!0):t=!1,t||Va(e,!0)}function ih(e){for(nn=e.return;nn;)switch(nn.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:nn=nn.return}}function as(e){if(e!==nn)return!1;if(!ft)return ih(e),ft=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Uu(e.type,e.memoizedProps)),r=!r),r&&At&&Va(e),ih(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));At=Om(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));At=Om(e)}else t===27?(t=At,ir(e.type)?(e=$u,$u=null,At=e):At=t):At=nn?Jn(e.stateNode.nextSibling):null;return!0}function Ar(){At=nn=null,ft=!1}function bc(){var e=Fa;return e!==null&&(Tn===null?Tn=e:Tn.push.apply(Tn,e),Fa=null),e}function Qs(e){Fa===null?Fa=[e]:Fa.push(e)}var xc=x(null),Or=null,xa=null;function Ya(e,t,r){q(xc,t._currentValue),t._currentValue=r}function ja(e){e._currentValue=xc.current,C(xc)}function jc(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function Sc(e,t,r,i){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var h=d.dependencies;if(h!==null){var _=d.child;h=h.firstContext;e:for(;h!==null;){var U=h;h=d;for(var te=0;te<t.length;te++)if(U.context===t[te]){h.lanes|=r,U=h.alternate,U!==null&&(U.lanes|=r),jc(h.return,r,e),i||(_=null);break e}h=U.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error(o(341));_.lanes|=r,h=_.alternate,h!==null&&(h.lanes|=r),jc(_,r,e),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===e){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function rs(e,t,r,i){e=null;for(var d=t,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error(o(387));if(_=_.memoizedProps,_!==null){var U=d.type;Rn(d.pendingProps.value,_.value)||(e!==null?e.push(U):e=[U])}}else if(d===_e.current){if(_=d.alternate,_===null)throw Error(o(387));_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Ni):e=[Ni])}d=d.return}e!==null&&Sc(t,e,r,i),t.flags|=262144}function yl(e){for(e=e.firstContext;e!==null;){if(!Rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rr(e){Or=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function an(e){return lh(Or,e)}function bl(e,t){return Or===null&&Rr(e),lh(e,t)}function lh(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},xa===null){if(e===null)throw Error(o(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return r}var qb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Hb=a.unstable_scheduleCallback,Gb=a.unstable_NormalPriority,Gt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wc(){return{controller:new qb,data:new Map,refCount:0}}function Js(e){e.refCount--,e.refCount===0&&Hb(Gb,function(){e.controller.abort()})}var Ws=null,Nc=0,ss=0,is=null;function Fb(e,t){if(Ws===null){var r=Ws=[];Nc=0,ss=_u(),is={status:"pending",value:void 0,then:function(i){r.push(i)}}}return Nc++,t.then(oh,oh),t}function oh(){if(--Nc===0&&Ws!==null){is!==null&&(is.status="fulfilled");var e=Ws;Ws=null,ss=0,is=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vb(e,t){var r=[],i={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var d=0;d<r.length;d++)(0,r[d])(t)},function(d){for(i.status="rejected",i.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),i}var ch=V.S;V.S=function(e,t){Vp=Ee(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fb(e,t),ch!==null&&ch(e,t)};var Dr=x(null);function Cc(){var e=Dr.current;return e!==null?e:Ct.pooledCache}function xl(e,t){t===null?q(Dr,Dr.current):q(Dr,t.pool)}function uh(){var e=Cc();return e===null?null:{parent:Gt._currentValue,pool:e}}var ls=Error(o(460)),Tc=Error(o(474)),jl=Error(o(542)),Sl={then:function(){}};function dh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function fh(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(un,un),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ph(e),e;default:if(typeof t.status=="string")t.then(un,un);else{if(e=Ct,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=i}},function(i){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ph(e),e}throw Mr=t,ls}}function Lr(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Mr=r,ls):r}}var Mr=null;function hh(){if(Mr===null)throw Error(o(459));var e=Mr;return Mr=null,e}function ph(e){if(e===ls||e===jl)throw Error(o(483))}var os=null,ei=0;function wl(e){var t=ei;return ei+=1,os===null&&(os=[]),fh(os,e,t)}function ti(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nl(e,t){throw t.$$typeof===j?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function mh(e){function t(ie,ae){if(e){var oe=ie.deletions;oe===null?(ie.deletions=[ae],ie.flags|=16):oe.push(ae)}}function r(ie,ae){if(!e)return null;for(;ae!==null;)t(ie,ae),ae=ae.sibling;return null}function i(ie){for(var ae=new Map;ie!==null;)ie.key!==null?ae.set(ie.key,ie):ae.set(ie.index,ie),ie=ie.sibling;return ae}function d(ie,ae){return ie=ya(ie,ae),ie.index=0,ie.sibling=null,ie}function h(ie,ae,oe){return ie.index=oe,e?(oe=ie.alternate,oe!==null?(oe=oe.index,oe<ae?(ie.flags|=67108866,ae):oe):(ie.flags|=67108866,ae)):(ie.flags|=1048576,ae)}function _(ie){return e&&ie.alternate===null&&(ie.flags|=67108866),ie}function U(ie,ae,oe,je){return ae===null||ae.tag!==6?(ae=pc(oe,ie.mode,je),ae.return=ie,ae):(ae=d(ae,oe),ae.return=ie,ae)}function te(ie,ae,oe,je){var Be=oe.type;return Be===N?be(ie,ae,oe.props.children,je,oe.key):ae!==null&&(ae.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Z&&Lr(Be)===ae.type)?(ae=d(ae,oe.props),ti(ae,oe),ae.return=ie,ae):(ae=gl(oe.type,oe.key,oe.props,null,ie.mode,je),ti(ae,oe),ae.return=ie,ae)}function ue(ie,ae,oe,je){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==oe.containerInfo||ae.stateNode.implementation!==oe.implementation?(ae=mc(oe,ie.mode,je),ae.return=ie,ae):(ae=d(ae,oe.children||[]),ae.return=ie,ae)}function be(ie,ae,oe,je,Be){return ae===null||ae.tag!==7?(ae=kr(oe,ie.mode,je,Be),ae.return=ie,ae):(ae=d(ae,oe),ae.return=ie,ae)}function Se(ie,ae,oe){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=pc(""+ae,ie.mode,oe),ae.return=ie,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return oe=gl(ae.type,ae.key,ae.props,null,ie.mode,oe),ti(oe,ae),oe.return=ie,oe;case E:return ae=mc(ae,ie.mode,oe),ae.return=ie,ae;case Z:return ae=Lr(ae),Se(ie,ae,oe)}if(K(ae)||z(ae))return ae=kr(ae,ie.mode,oe,null),ae.return=ie,ae;if(typeof ae.then=="function")return Se(ie,wl(ae),oe);if(ae.$$typeof===O)return Se(ie,bl(ie,ae),oe);Nl(ie,ae)}return null}function de(ie,ae,oe,je){var Be=ae!==null?ae.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Be!==null?null:U(ie,ae,""+oe,je);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return oe.key===Be?te(ie,ae,oe,je):null;case E:return oe.key===Be?ue(ie,ae,oe,je):null;case Z:return oe=Lr(oe),de(ie,ae,oe,je)}if(K(oe)||z(oe))return Be!==null?null:be(ie,ae,oe,je,null);if(typeof oe.then=="function")return de(ie,ae,wl(oe),je);if(oe.$$typeof===O)return de(ie,ae,bl(ie,oe),je);Nl(ie,oe)}return null}function me(ie,ae,oe,je,Be){if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return ie=ie.get(oe)||null,U(ae,ie,""+je,Be);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case b:return ie=ie.get(je.key===null?oe:je.key)||null,te(ae,ie,je,Be);case E:return ie=ie.get(je.key===null?oe:je.key)||null,ue(ae,ie,je,Be);case Z:return je=Lr(je),me(ie,ae,oe,je,Be)}if(K(je)||z(je))return ie=ie.get(oe)||null,be(ae,ie,je,Be,null);if(typeof je.then=="function")return me(ie,ae,oe,wl(je),Be);if(je.$$typeof===O)return me(ie,ae,oe,bl(ae,je),Be);Nl(ae,je)}return null}function De(ie,ae,oe,je){for(var Be=null,gt=null,Me=ae,We=ae=0,ut=null;Me!==null&&We<oe.length;We++){Me.index>We?(ut=Me,Me=null):ut=Me.sibling;var vt=de(ie,Me,oe[We],je);if(vt===null){Me===null&&(Me=ut);break}e&&Me&&vt.alternate===null&&t(ie,Me),ae=h(vt,ae,We),gt===null?Be=vt:gt.sibling=vt,gt=vt,Me=ut}if(We===oe.length)return r(ie,Me),ft&&ba(ie,We),Be;if(Me===null){for(;We<oe.length;We++)Me=Se(ie,oe[We],je),Me!==null&&(ae=h(Me,ae,We),gt===null?Be=Me:gt.sibling=Me,gt=Me);return ft&&ba(ie,We),Be}for(Me=i(Me);We<oe.length;We++)ut=me(Me,ie,We,oe[We],je),ut!==null&&(e&&ut.alternate!==null&&Me.delete(ut.key===null?We:ut.key),ae=h(ut,ae,We),gt===null?Be=ut:gt.sibling=ut,gt=ut);return e&&Me.forEach(function(dr){return t(ie,dr)}),ft&&ba(ie,We),Be}function Pe(ie,ae,oe,je){if(oe==null)throw Error(o(151));for(var Be=null,gt=null,Me=ae,We=ae=0,ut=null,vt=oe.next();Me!==null&&!vt.done;We++,vt=oe.next()){Me.index>We?(ut=Me,Me=null):ut=Me.sibling;var dr=de(ie,Me,vt.value,je);if(dr===null){Me===null&&(Me=ut);break}e&&Me&&dr.alternate===null&&t(ie,Me),ae=h(dr,ae,We),gt===null?Be=dr:gt.sibling=dr,gt=dr,Me=ut}if(vt.done)return r(ie,Me),ft&&ba(ie,We),Be;if(Me===null){for(;!vt.done;We++,vt=oe.next())vt=Se(ie,vt.value,je),vt!==null&&(ae=h(vt,ae,We),gt===null?Be=vt:gt.sibling=vt,gt=vt);return ft&&ba(ie,We),Be}for(Me=i(Me);!vt.done;We++,vt=oe.next())vt=me(Me,ie,We,vt.value,je),vt!==null&&(e&&vt.alternate!==null&&Me.delete(vt.key===null?We:vt.key),ae=h(vt,ae,We),gt===null?Be=vt:gt.sibling=vt,gt=vt);return e&&Me.forEach(function(a0){return t(ie,a0)}),ft&&ba(ie,We),Be}function Nt(ie,ae,oe,je){if(typeof oe=="object"&&oe!==null&&oe.type===N&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:e:{for(var Be=oe.key;ae!==null;){if(ae.key===Be){if(Be=oe.type,Be===N){if(ae.tag===7){r(ie,ae.sibling),je=d(ae,oe.props.children),je.return=ie,ie=je;break e}}else if(ae.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Z&&Lr(Be)===ae.type){r(ie,ae.sibling),je=d(ae,oe.props),ti(je,oe),je.return=ie,ie=je;break e}r(ie,ae);break}else t(ie,ae);ae=ae.sibling}oe.type===N?(je=kr(oe.props.children,ie.mode,je,oe.key),je.return=ie,ie=je):(je=gl(oe.type,oe.key,oe.props,null,ie.mode,je),ti(je,oe),je.return=ie,ie=je)}return _(ie);case E:e:{for(Be=oe.key;ae!==null;){if(ae.key===Be)if(ae.tag===4&&ae.stateNode.containerInfo===oe.containerInfo&&ae.stateNode.implementation===oe.implementation){r(ie,ae.sibling),je=d(ae,oe.children||[]),je.return=ie,ie=je;break e}else{r(ie,ae);break}else t(ie,ae);ae=ae.sibling}je=mc(oe,ie.mode,je),je.return=ie,ie=je}return _(ie);case Z:return oe=Lr(oe),Nt(ie,ae,oe,je)}if(K(oe))return De(ie,ae,oe,je);if(z(oe)){if(Be=z(oe),typeof Be!="function")throw Error(o(150));return oe=Be.call(oe),Pe(ie,ae,oe,je)}if(typeof oe.then=="function")return Nt(ie,ae,wl(oe),je);if(oe.$$typeof===O)return Nt(ie,ae,bl(ie,oe),je);Nl(ie,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,ae!==null&&ae.tag===6?(r(ie,ae.sibling),je=d(ae,oe),je.return=ie,ie=je):(r(ie,ae),je=pc(oe,ie.mode,je),je.return=ie,ie=je),_(ie)):r(ie,ae)}return function(ie,ae,oe,je){try{ei=0;var Be=Nt(ie,ae,oe,je);return os=null,Be}catch(Me){if(Me===ls||Me===jl)throw Me;var gt=Dn(29,Me,null,ie.mode);return gt.lanes=je,gt.return=ie,gt}}}var Ur=mh(!0),gh=mh(!1),Xa=!1;function _c(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ec(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(yt&2)!==0){var d=i.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),i.pending=t,t=ml(e),Wf(e,null,r),t}return pl(e,i,t,r),ml(e)}function ni(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,$n(e,r)}}function kc(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var d=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var _={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};h===null?d=h=_:h=h.next=_,r=r.next}while(r!==null);h===null?d=h=t:h=h.next=t}else d=h=t;r={baseState:i.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:i.shared,callbacks:i.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Ac=!1;function ai(){if(Ac){var e=is;if(e!==null)throw e}}function ri(e,t,r,i){Ac=!1;var d=e.updateQueue;Xa=!1;var h=d.firstBaseUpdate,_=d.lastBaseUpdate,U=d.shared.pending;if(U!==null){d.shared.pending=null;var te=U,ue=te.next;te.next=null,_===null?h=ue:_.next=ue,_=te;var be=e.alternate;be!==null&&(be=be.updateQueue,U=be.lastBaseUpdate,U!==_&&(U===null?be.firstBaseUpdate=ue:U.next=ue,be.lastBaseUpdate=te))}if(h!==null){var Se=d.baseState;_=0,be=ue=te=null,U=h;do{var de=U.lane&-536870913,me=de!==U.lane;if(me?(ct&de)===de:(i&de)===de){de!==0&&de===ss&&(Ac=!0),be!==null&&(be=be.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var De=e,Pe=U;de=t;var Nt=r;switch(Pe.tag){case 1:if(De=Pe.payload,typeof De=="function"){Se=De.call(Nt,Se,de);break e}Se=De;break e;case 3:De.flags=De.flags&-65537|128;case 0:if(De=Pe.payload,de=typeof De=="function"?De.call(Nt,Se,de):De,de==null)break e;Se=y({},Se,de);break e;case 2:Xa=!0}}de=U.callback,de!==null&&(e.flags|=64,me&&(e.flags|=8192),me=d.callbacks,me===null?d.callbacks=[de]:me.push(de))}else me={lane:de,tag:U.tag,payload:U.payload,callback:U.callback,next:null},be===null?(ue=be=me,te=Se):be=be.next=me,_|=de;if(U=U.next,U===null){if(U=d.shared.pending,U===null)break;me=U,U=me.next,me.next=null,d.lastBaseUpdate=me,d.shared.pending=null}}while(!0);be===null&&(te=Se),d.baseState=te,d.firstBaseUpdate=ue,d.lastBaseUpdate=be,h===null&&(d.shared.lanes=0),tr|=_,e.lanes=_,e.memoizedState=Se}}function vh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function yh(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)vh(r[e],t)}var cs=x(null),Cl=x(0);function bh(e,t){e=Aa,q(Cl,e),q(cs,t),Aa=e|t.baseLanes}function Oc(){q(Cl,Aa),q(cs,cs.current)}function Rc(){Aa=Cl.current,C(cs),C(Cl)}var Ln=x(null),Qn=null;function Qa(e){var t=e.alternate;q(qt,qt.current&1),q(Ln,e),Qn===null&&(t===null||cs.current!==null||t.memoizedState!==null)&&(Qn=e)}function Dc(e){q(qt,qt.current),q(Ln,e),Qn===null&&(Qn=e)}function xh(e){e.tag===22?(q(qt,qt.current),q(Ln,e),Qn===null&&(Qn=e)):Ja()}function Ja(){q(qt,qt.current),q(Ln,Ln.current)}function Mn(e){C(Ln),Qn===e&&(Qn=null),C(qt)}var qt=x(0);function Tl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Iu(r)||Pu(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sa=0,Je=null,St=null,Ft=null,_l=!1,us=!1,zr=!1,El=0,si=0,ds=null,Yb=0;function It(){throw Error(o(321))}function Lc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Rn(e[r],t[r]))return!1;return!0}function Mc(e,t,r,i,d,h){return Sa=h,Je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?ap:Kc,zr=!1,h=r(i,d),zr=!1,us&&(h=Sh(t,r,i,d)),jh(e),h}function jh(e){V.H=oi;var t=St!==null&&St.next!==null;if(Sa=0,Ft=St=Je=null,_l=!1,si=0,ds=null,t)throw Error(o(300));e===null||Vt||(e=e.dependencies,e!==null&&yl(e)&&(Vt=!0))}function Sh(e,t,r,i){Je=e;var d=0;do{if(us&&(ds=null),si=0,us=!1,25<=d)throw Error(o(301));if(d+=1,Ft=St=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}V.H=rp,h=t(r,i)}while(us);return h}function Xb(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?ii(t):t,e=e.useState()[0],(St!==null?St.memoizedState:null)!==e&&(Je.flags|=1024),t}function Uc(){var e=El!==0;return El=0,e}function zc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Bc(e){if(_l){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_l=!1}Sa=0,Ft=St=Je=null,us=!1,si=El=0,ds=null}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ft===null?Je.memoizedState=Ft=e:Ft=Ft.next=e,Ft}function Ht(){if(St===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=St.next;var t=Ft===null?Je.memoizedState:Ft.next;if(t!==null)Ft=t,St=e;else{if(e===null)throw Je.alternate===null?Error(o(467)):Error(o(310));St=e,e={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Ft===null?Je.memoizedState=Ft=e:Ft=Ft.next=e}return Ft}function kl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ii(e){var t=si;return si+=1,ds===null&&(ds=[]),e=fh(ds,e,t),t=Je,(Ft===null?t.memoizedState:Ft.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?ap:Kc),e}function Al(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ii(e);if(e.$$typeof===O)return an(e)}throw Error(o(438,String(e)))}function Ic(e){var t=null,r=Je.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var i=Je.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=kl(),Je.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),i=0;i<e;i++)r[i]=B;return t.index++,r}function wa(e,t){return typeof t=="function"?t(e):t}function Ol(e){var t=Ht();return Pc(t,St,e)}function Pc(e,t,r){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=r;var d=e.baseQueue,h=i.pending;if(h!==null){if(d!==null){var _=d.next;d.next=h.next,h.next=_}t.baseQueue=d=h,i.pending=null}if(h=e.baseState,d===null)e.memoizedState=h;else{t=d.next;var U=_=null,te=null,ue=t,be=!1;do{var Se=ue.lane&-536870913;if(Se!==ue.lane?(ct&Se)===Se:(Sa&Se)===Se){var de=ue.revertLane;if(de===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),Se===ss&&(be=!0);else if((Sa&de)===de){ue=ue.next,de===ss&&(be=!0);continue}else Se={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},te===null?(U=te=Se,_=h):te=te.next=Se,Je.lanes|=de,tr|=de;Se=ue.action,zr&&r(h,Se),h=ue.hasEagerState?ue.eagerState:r(h,Se)}else de={lane:Se,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},te===null?(U=te=de,_=h):te=te.next=de,Je.lanes|=Se,tr|=Se;ue=ue.next}while(ue!==null&&ue!==t);if(te===null?_=h:te.next=U,!Rn(h,e.memoizedState)&&(Vt=!0,be&&(r=is,r!==null)))throw r;e.memoizedState=h,e.baseState=_,e.baseQueue=te,i.lastRenderedState=h}return d===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function $c(e){var t=Ht(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var i=r.dispatch,d=r.pending,h=t.memoizedState;if(d!==null){r.pending=null;var _=d=d.next;do h=e(h,_.action),_=_.next;while(_!==d);Rn(h,t.memoizedState)||(Vt=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,i]}function wh(e,t,r){var i=Je,d=Ht(),h=ft;if(h){if(r===void 0)throw Error(o(407));r=r()}else r=t();var _=!Rn((St||d).memoizedState,r);if(_&&(d.memoizedState=r,Vt=!0),d=d.queue,Gc(Th.bind(null,i,d,e),[e]),d.getSnapshot!==t||_||Ft!==null&&Ft.memoizedState.tag&1){if(i.flags|=2048,fs(9,{destroy:void 0},Ch.bind(null,i,d,r,t),null),Ct===null)throw Error(o(349));h||(Sa&127)!==0||Nh(i,t,r)}return r}function Nh(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Je.updateQueue,t===null?(t=kl(),Je.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Ch(e,t,r,i){t.value=r,t.getSnapshot=i,_h(t)&&Eh(e)}function Th(e,t,r){return r(function(){_h(t)&&Eh(e)})}function _h(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Rn(e,r)}catch{return!0}}function Eh(e){var t=Er(e,2);t!==null&&_n(t,e,2)}function qc(e){var t=gn();if(typeof e=="function"){var r=e;if(e=r(),zr){pt(!0);try{r()}finally{pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t}function kh(e,t,r,i){return e.baseState=r,Pc(e,St,typeof i=="function"?i:wa)}function Zb(e,t,r,i,d){if(Ll(e))throw Error(o(485));if(e=t.action,e!==null){var h={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){h.listeners.push(_)}};V.T!==null?r(!0):h.isTransition=!1,i(h),r=t.pending,r===null?(h.next=t.pending=h,Ah(t,h)):(h.next=r.next,t.pending=r.next=h)}}function Ah(e,t){var r=t.action,i=t.payload,d=e.state;if(t.isTransition){var h=V.T,_={};V.T=_;try{var U=r(d,i),te=V.S;te!==null&&te(_,U),Oh(e,t,U)}catch(ue){Hc(e,t,ue)}finally{h!==null&&_.types!==null&&(h.types=_.types),V.T=h}}else try{h=r(d,i),Oh(e,t,h)}catch(ue){Hc(e,t,ue)}}function Oh(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(i){Rh(e,t,i)},function(i){return Hc(e,t,i)}):Rh(e,t,r)}function Rh(e,t,r){t.status="fulfilled",t.value=r,Dh(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,Ah(e,r)))}function Hc(e,t,r){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=r,Dh(t),t=t.next;while(t!==i)}e.action=null}function Dh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lh(e,t){return t}function Mh(e,t){if(ft){var r=Ct.formState;if(r!==null){e:{var i=Je;if(ft){if(At){t:{for(var d=At,h=Kn;d.nodeType!==8;){if(!h){d=null;break t}if(d=Jn(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){At=Jn(d.nextSibling),i=d.data==="F!";break e}}Va(i)}i=!1}i&&(t=r[0])}}return r=gn(),r.memoizedState=r.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lh,lastRenderedState:t},r.queue=i,r=ep.bind(null,Je,i),i.dispatch=r,i=qc(!1),h=Zc.bind(null,Je,!1,i.queue),i=gn(),d={state:t,dispatch:null,action:e,pending:null},i.queue=d,r=Zb.bind(null,Je,d,h,r),d.dispatch=r,i.memoizedState=e,[t,r,!1]}function Uh(e){var t=Ht();return zh(t,St,e)}function zh(e,t,r){if(t=Pc(e,t,Lh)[0],e=Ol(wa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=ii(t)}catch(_){throw _===ls?jl:_}else i=t;t=Ht();var d=t.queue,h=d.dispatch;return r!==t.memoizedState&&(Je.flags|=2048,fs(9,{destroy:void 0},Kb.bind(null,d,r),null)),[i,h,e]}function Kb(e,t){e.action=t}function Bh(e){var t=Ht(),r=St;if(r!==null)return zh(t,r,e);Ht(),t=t.memoizedState,r=Ht();var i=r.queue.dispatch;return r.memoizedState=e,[t,i,!1]}function fs(e,t,r,i){return e={tag:e,create:r,deps:i,inst:t,next:null},t=Je.updateQueue,t===null&&(t=kl(),Je.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e),e}function Ih(){return Ht().memoizedState}function Rl(e,t,r,i){var d=gn();Je.flags|=e,d.memoizedState=fs(1|t,{destroy:void 0},r,i===void 0?null:i)}function Dl(e,t,r,i){var d=Ht();i=i===void 0?null:i;var h=d.memoizedState.inst;St!==null&&i!==null&&Lc(i,St.memoizedState.deps)?d.memoizedState=fs(t,h,r,i):(Je.flags|=e,d.memoizedState=fs(1|t,h,r,i))}function Ph(e,t){Rl(8390656,8,e,t)}function Gc(e,t){Dl(2048,8,e,t)}function Qb(e){Je.flags|=4;var t=Je.updateQueue;if(t===null)t=kl(),Je.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function $h(e){var t=Ht().memoizedState;return Qb({ref:t,nextImpl:e}),function(){if((yt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function qh(e,t){return Dl(4,2,e,t)}function Hh(e,t){return Dl(4,4,e,t)}function Gh(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Fh(e,t,r){r=r!=null?r.concat([e]):null,Dl(4,4,Gh.bind(null,t,e),r)}function Fc(){}function Vh(e,t){var r=Ht();t=t===void 0?null:t;var i=r.memoizedState;return t!==null&&Lc(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function Yh(e,t){var r=Ht();t=t===void 0?null:t;var i=r.memoizedState;if(t!==null&&Lc(t,i[1]))return i[0];if(i=e(),zr){pt(!0);try{e()}finally{pt(!1)}}return r.memoizedState=[i,t],i}function Vc(e,t,r){return r===void 0||(Sa&1073741824)!==0&&(ct&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=Xp(),Je.lanes|=e,tr|=e,r)}function Xh(e,t,r,i){return Rn(r,t)?r:cs.current!==null?(e=Vc(e,r,i),Rn(e,t)||(Vt=!0),e):(Sa&42)===0||(Sa&1073741824)!==0&&(ct&261930)===0?(Vt=!0,e.memoizedState=r):(e=Xp(),Je.lanes|=e,tr|=e,t)}function Zh(e,t,r,i,d){var h=Q.p;Q.p=h!==0&&8>h?h:8;var _=V.T,U={};V.T=U,Zc(e,!1,t,r);try{var te=d(),ue=V.S;if(ue!==null&&ue(U,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var be=Vb(te,i);li(e,t,be,Bn(e))}else li(e,t,i,Bn(e))}catch(Se){li(e,t,{then:function(){},status:"rejected",reason:Se},Bn())}finally{Q.p=h,_!==null&&U.types!==null&&(_.types=U.types),V.T=_}}function Jb(){}function Yc(e,t,r,i){if(e.tag!==5)throw Error(o(476));var d=Kh(e).queue;Zh(e,d,t,W,r===null?Jb:function(){return Qh(e),r(i)})}function Kh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:W},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Qh(e){var t=Kh(e);t.next===null&&(t=e.alternate.memoizedState),li(e,t.next.queue,{},Bn())}function Xc(){return an(Ni)}function Jh(){return Ht().memoizedState}function Wh(){return Ht().memoizedState}function Wb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=Bn();e=Za(r);var i=Ka(t,e,r);i!==null&&(_n(i,t,r),ni(i,t,r)),t={cache:wc()},e.payload=t;return}t=t.return}}function ex(e,t,r){var i=Bn();r={lane:i,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ll(e)?tp(t,r):(r=fc(e,t,r,i),r!==null&&(_n(r,e,i),np(r,t,i)))}function ep(e,t,r){var i=Bn();li(e,t,r,i)}function li(e,t,r,i){var d={lane:i,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ll(e))tp(t,d);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var _=t.lastRenderedState,U=h(_,r);if(d.hasEagerState=!0,d.eagerState=U,Rn(U,_))return pl(e,t,d,0),Ct===null&&hl(),!1}catch{}if(r=fc(e,t,d,i),r!==null)return _n(r,e,i),np(r,t,i),!0}return!1}function Zc(e,t,r,i){if(i={lane:2,revertLane:_u(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ll(e)){if(t)throw Error(o(479))}else t=fc(e,r,i,2),t!==null&&_n(t,e,2)}function Ll(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function tp(e,t){us=_l=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function np(e,t,r){if((r&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,$n(e,r)}}var oi={readContext:an,use:Al,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useLayoutEffect:It,useInsertionEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useSyncExternalStore:It,useId:It,useHostTransitionStatus:It,useFormState:It,useActionState:It,useOptimistic:It,useMemoCache:It,useCacheRefresh:It};oi.useEffectEvent=It;var ap={readContext:an,use:Al,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:Ph,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Rl(4194308,4,Gh.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Rl(4194308,4,e,t)},useInsertionEffect:function(e,t){Rl(4,2,e,t)},useMemo:function(e,t){var r=gn();t=t===void 0?null:t;var i=e();if(zr){pt(!0);try{e()}finally{pt(!1)}}return r.memoizedState=[i,t],i},useReducer:function(e,t,r){var i=gn();if(r!==void 0){var d=r(t);if(zr){pt(!0);try{r(t)}finally{pt(!1)}}}else d=t;return i.memoizedState=i.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},i.queue=e,e=e.dispatch=ex.bind(null,Je,e),[i.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:function(e){e=qc(e);var t=e.queue,r=ep.bind(null,Je,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Fc,useDeferredValue:function(e,t){var r=gn();return Vc(r,e,t)},useTransition:function(){var e=qc(!1);return e=Zh.bind(null,Je,e.queue,!0,!1),gn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var i=Je,d=gn();if(ft){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),Ct===null)throw Error(o(349));(ct&127)!==0||Nh(i,t,r)}d.memoizedState=r;var h={value:r,getSnapshot:t};return d.queue=h,Ph(Th.bind(null,i,h,e),[e]),i.flags|=2048,fs(9,{destroy:void 0},Ch.bind(null,i,h,r,t),null),r},useId:function(){var e=gn(),t=Ct.identifierPrefix;if(ft){var r=ua,i=ca;r=(i&~(1<<32-Oe(i)-1)).toString(32)+r,t="_"+t+"R_"+r,r=El++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=Yb++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xc,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=gn();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Zc.bind(null,Je,!0,r),r.dispatch=t,[e,t]},useMemoCache:Ic,useCacheRefresh:function(){return gn().memoizedState=Wb.bind(null,Je)},useEffectEvent:function(e){var t=gn(),r={impl:e};return t.memoizedState=r,function(){if((yt&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Kc={readContext:an,use:Al,useCallback:Vh,useContext:an,useEffect:Gc,useImperativeHandle:Fh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:Ol,useRef:Ih,useState:function(){return Ol(wa)},useDebugValue:Fc,useDeferredValue:function(e,t){var r=Ht();return Xh(r,St.memoizedState,e,t)},useTransition:function(){var e=Ol(wa)[0],t=Ht().memoizedState;return[typeof e=="boolean"?e:ii(e),t]},useSyncExternalStore:wh,useId:Jh,useHostTransitionStatus:Xc,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,t){var r=Ht();return kh(r,St,e,t)},useMemoCache:Ic,useCacheRefresh:Wh};Kc.useEffectEvent=$h;var rp={readContext:an,use:Al,useCallback:Vh,useContext:an,useEffect:Gc,useImperativeHandle:Fh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:$c,useRef:Ih,useState:function(){return $c(wa)},useDebugValue:Fc,useDeferredValue:function(e,t){var r=Ht();return St===null?Vc(r,e,t):Xh(r,St.memoizedState,e,t)},useTransition:function(){var e=$c(wa)[0],t=Ht().memoizedState;return[typeof e=="boolean"?e:ii(e),t]},useSyncExternalStore:wh,useId:Jh,useHostTransitionStatus:Xc,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var r=Ht();return St!==null?kh(r,St,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Ic,useCacheRefresh:Wh};rp.useEffectEvent=$h;function Qc(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Jc={enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Bn(),d=Za(i);d.payload=t,r!=null&&(d.callback=r),t=Ka(e,d,i),t!==null&&(_n(t,e,i),ni(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Bn(),d=Za(i);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=Ka(e,d,i),t!==null&&(_n(t,e,i),ni(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Bn(),i=Za(r);i.tag=2,t!=null&&(i.callback=t),t=Ka(e,i,r),t!==null&&(_n(t,e,r),ni(t,e,r))}};function sp(e,t,r,i,d,h,_){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,h,_):t.prototype&&t.prototype.isPureReactComponent?!Xs(r,i)||!Xs(d,h):!0}function ip(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Jc.enqueueReplaceState(t,t.state,null)}function Br(e,t){var r=t;if("ref"in t){r={};for(var i in t)i!=="ref"&&(r[i]=t[i])}if(e=e.defaultProps){r===t&&(r=y({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function lp(e){fl(e)}function op(e){console.error(e)}function cp(e){fl(e)}function Ml(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function up(e,t,r){try{var i=e.onCaughtError;i(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Wc(e,t,r){return r=Za(r),r.tag=3,r.payload={element:null},r.callback=function(){Ml(e,t)},r}function dp(e){return e=Za(e),e.tag=3,e}function fp(e,t,r,i){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var h=i.value;e.payload=function(){return d(h)},e.callback=function(){up(t,r,i)}}var _=r.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(e.callback=function(){up(t,r,i),typeof d!="function"&&(nr===null?nr=new Set([this]):nr.add(this));var U=i.stack;this.componentDidCatch(i.value,{componentStack:U!==null?U:""})})}function tx(e,t,r,i,d){if(r.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=r.alternate,t!==null&&rs(t,r,d,!0),r=Ln.current,r!==null){switch(r.tag){case 31:case 13:return Qn===null?Yl():r.alternate===null&&Pt===0&&(Pt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,i===Sl?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([i]):t.add(i),Nu(e,i,d)),!1;case 22:return r.flags|=65536,i===Sl?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([i]):r.add(i)),Nu(e,i,d)),!1}throw Error(o(435,r.tag))}return Nu(e,i,d),Yl(),!1}if(ft)return t=Ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,i!==yc&&(e=Error(o(422),{cause:i}),Qs(Yn(e,r)))):(i!==yc&&(t=Error(o(423),{cause:i}),Qs(Yn(t,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,i=Yn(i,r),d=Wc(e.stateNode,i,d),kc(e,d),Pt!==4&&(Pt=2)),!1;var h=Error(o(520),{cause:i});if(h=Yn(h,r),gi===null?gi=[h]:gi.push(h),Pt!==4&&(Pt=2),t===null)return!0;i=Yn(i,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=Wc(r.stateNode,i,e),kc(r,e),!1;case 1:if(t=r.type,h=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(nr===null||!nr.has(h))))return r.flags|=65536,d&=-d,r.lanes|=d,d=dp(d),fp(d,e,r,i),kc(r,d),!1}r=r.return}while(r!==null);return!1}var eu=Error(o(461)),Vt=!1;function rn(e,t,r,i){t.child=e===null?gh(t,null,r,i):Ur(t,e.child,r,i)}function hp(e,t,r,i,d){r=r.render;var h=t.ref;if("ref"in i){var _={};for(var U in i)U!=="ref"&&(_[U]=i[U])}else _=i;return Rr(t),i=Mc(e,t,r,_,h,d),U=Uc(),e!==null&&!Vt?(zc(e,t,d),Na(e,t,d)):(ft&&U&&gc(t),t.flags|=1,rn(e,t,i,d),t.child)}function pp(e,t,r,i,d){if(e===null){var h=r.type;return typeof h=="function"&&!hc(h)&&h.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=h,mp(e,t,h,i,d)):(e=gl(r.type,null,i,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!ou(e,d)){var _=h.memoizedProps;if(r=r.compare,r=r!==null?r:Xs,r(_,i)&&e.ref===t.ref)return Na(e,t,d)}return t.flags|=1,e=ya(h,i),e.ref=t.ref,e.return=t,t.child=e}function mp(e,t,r,i,d){if(e!==null){var h=e.memoizedProps;if(Xs(h,i)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=i=h,ou(e,d))(e.flags&131072)!==0&&(Vt=!0);else return t.lanes=e.lanes,Na(e,t,d)}return tu(e,t,r,i,d)}function gp(e,t,r,i){var d=i.children,h=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(h=h!==null?h.baseLanes|r:r,e!==null){for(i=t.child=e.child,d=0;i!==null;)d=d|i.lanes|i.childLanes,i=i.sibling;i=d&~h}else i=0,t.child=null;return vp(e,t,h,r,i)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xl(t,h!==null?h.cachePool:null),h!==null?bh(t,h):Oc(),xh(t);else return i=t.lanes=536870912,vp(e,t,h!==null?h.baseLanes|r:r,r,i)}else h!==null?(xl(t,h.cachePool),bh(t,h),Ja(),t.memoizedState=null):(e!==null&&xl(t,null),Oc(),Ja());return rn(e,t,d,r),t.child}function ci(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vp(e,t,r,i,d){var h=Cc();return h=h===null?null:{parent:Gt._currentValue,pool:h},t.memoizedState={baseLanes:r,cachePool:h},e!==null&&xl(t,null),Oc(),xh(t),e!==null&&rs(e,t,i,!0),t.childLanes=d,null}function Ul(e,t){return t=Bl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function yp(e,t,r){return Ur(t,e.child,null,r),e=Ul(t,t.pendingProps),e.flags|=2,Mn(t),t.memoizedState=null,e}function nx(e,t,r){var i=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ft){if(i.mode==="hidden")return e=Ul(t,i),t.lanes=536870912,ci(null,e);if(Dc(t),(e=At)?(e=Am(e,Kn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:ca,overflow:ua}:null,retryLane:536870912,hydrationErrors:null},r=th(e),r.return=t,t.child=r,nn=t,At=null)):e=null,e===null)throw Va(t);return t.lanes=536870912,null}return Ul(t,i)}var h=e.memoizedState;if(h!==null){var _=h.dehydrated;if(Dc(t),d)if(t.flags&256)t.flags&=-257,t=yp(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Vt||rs(e,t,r,!1),d=(r&e.childLanes)!==0,Vt||d){if(i=Ct,i!==null&&(_=qn(i,r),_!==0&&_!==h.retryLane))throw h.retryLane=_,Er(e,_),_n(i,e,_),eu;Yl(),t=yp(e,t,r)}else e=h.treeContext,At=Jn(_.nextSibling),nn=t,ft=!0,Fa=null,Kn=!1,e!==null&&rh(t,e),t=Ul(t,i),t.flags|=4096;return t}return e=ya(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zl(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function tu(e,t,r,i,d){return Rr(t),r=Mc(e,t,r,i,void 0,d),i=Uc(),e!==null&&!Vt?(zc(e,t,d),Na(e,t,d)):(ft&&i&&gc(t),t.flags|=1,rn(e,t,r,d),t.child)}function bp(e,t,r,i,d,h){return Rr(t),t.updateQueue=null,r=Sh(t,i,r,d),jh(e),i=Uc(),e!==null&&!Vt?(zc(e,t,h),Na(e,t,h)):(ft&&i&&gc(t),t.flags|=1,rn(e,t,r,h),t.child)}function xp(e,t,r,i,d){if(Rr(t),t.stateNode===null){var h=es,_=r.contextType;typeof _=="object"&&_!==null&&(h=an(_)),h=new r(i,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Jc,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=i,h.state=t.memoizedState,h.refs={},_c(t),_=r.contextType,h.context=typeof _=="object"&&_!==null?an(_):es,h.state=t.memoizedState,_=r.getDerivedStateFromProps,typeof _=="function"&&(Qc(t,r,_,i),h.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(_=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),_!==h.state&&Jc.enqueueReplaceState(h,h.state,null),ri(t,i,h,d),ai(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){h=t.stateNode;var U=t.memoizedProps,te=Br(r,U);h.props=te;var ue=h.context,be=r.contextType;_=es,typeof be=="object"&&be!==null&&(_=an(be));var Se=r.getDerivedStateFromProps;be=typeof Se=="function"||typeof h.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,be||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(U||ue!==_)&&ip(t,h,i,_),Xa=!1;var de=t.memoizedState;h.state=de,ri(t,i,h,d),ai(),ue=t.memoizedState,U||de!==ue||Xa?(typeof Se=="function"&&(Qc(t,r,Se,i),ue=t.memoizedState),(te=Xa||sp(t,r,te,i,de,ue,_))?(be||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=ue),h.props=i,h.state=ue,h.context=_,i=te):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{h=t.stateNode,Ec(e,t),_=t.memoizedProps,be=Br(r,_),h.props=be,Se=t.pendingProps,de=h.context,ue=r.contextType,te=es,typeof ue=="object"&&ue!==null&&(te=an(ue)),U=r.getDerivedStateFromProps,(ue=typeof U=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(_!==Se||de!==te)&&ip(t,h,i,te),Xa=!1,de=t.memoizedState,h.state=de,ri(t,i,h,d),ai();var me=t.memoizedState;_!==Se||de!==me||Xa||e!==null&&e.dependencies!==null&&yl(e.dependencies)?(typeof U=="function"&&(Qc(t,r,U,i),me=t.memoizedState),(be=Xa||sp(t,r,be,i,de,me,te)||e!==null&&e.dependencies!==null&&yl(e.dependencies))?(ue||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(i,me,te),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(i,me,te)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=me),h.props=i,h.state=me,h.context=te,i=be):(typeof h.componentDidUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),i=!1)}return h=i,zl(e,t),i=(t.flags&128)!==0,h||i?(h=t.stateNode,r=i&&typeof r.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&i?(t.child=Ur(t,e.child,null,d),t.child=Ur(t,null,r,d)):rn(e,t,r,d),t.memoizedState=h.state,e=t.child):e=Na(e,t,d),e}function jp(e,t,r,i){return Ar(),t.flags|=256,rn(e,t,r,i),t.child}var nu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function au(e){return{baseLanes:e,cachePool:uh()}}function ru(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=zn),e}function Sp(e,t,r){var i=t.pendingProps,d=!1,h=(t.flags&128)!==0,_;if((_=h)||(_=e!==null&&e.memoizedState===null?!1:(qt.current&2)!==0),_&&(d=!0,t.flags&=-129),_=(t.flags&32)!==0,t.flags&=-33,e===null){if(ft){if(d?Qa(t):Ja(),(e=At)?(e=Am(e,Kn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:ca,overflow:ua}:null,retryLane:536870912,hydrationErrors:null},r=th(e),r.return=t,t.child=r,nn=t,At=null)):e=null,e===null)throw Va(t);return Pu(e)?t.lanes=32:t.lanes=536870912,null}var U=i.children;return i=i.fallback,d?(Ja(),d=t.mode,U=Bl({mode:"hidden",children:U},d),i=kr(i,d,r,null),U.return=t,i.return=t,U.sibling=i,t.child=U,i=t.child,i.memoizedState=au(r),i.childLanes=ru(e,_,r),t.memoizedState=nu,ci(null,i)):(Qa(t),su(t,U))}var te=e.memoizedState;if(te!==null&&(U=te.dehydrated,U!==null)){if(h)t.flags&256?(Qa(t),t.flags&=-257,t=iu(e,t,r)):t.memoizedState!==null?(Ja(),t.child=e.child,t.flags|=128,t=null):(Ja(),U=i.fallback,d=t.mode,i=Bl({mode:"visible",children:i.children},d),U=kr(U,d,r,null),U.flags|=2,i.return=t,U.return=t,i.sibling=U,t.child=i,Ur(t,e.child,null,r),i=t.child,i.memoizedState=au(r),i.childLanes=ru(e,_,r),t.memoizedState=nu,t=ci(null,i));else if(Qa(t),Pu(U)){if(_=U.nextSibling&&U.nextSibling.dataset,_)var ue=_.dgst;_=ue,i=Error(o(419)),i.stack="",i.digest=_,Qs({value:i,source:null,stack:null}),t=iu(e,t,r)}else if(Vt||rs(e,t,r,!1),_=(r&e.childLanes)!==0,Vt||_){if(_=Ct,_!==null&&(i=qn(_,r),i!==0&&i!==te.retryLane))throw te.retryLane=i,Er(e,i),_n(_,e,i),eu;Iu(U)||Yl(),t=iu(e,t,r)}else Iu(U)?(t.flags|=192,t.child=e.child,t=null):(e=te.treeContext,At=Jn(U.nextSibling),nn=t,ft=!0,Fa=null,Kn=!1,e!==null&&rh(t,e),t=su(t,i.children),t.flags|=4096);return t}return d?(Ja(),U=i.fallback,d=t.mode,te=e.child,ue=te.sibling,i=ya(te,{mode:"hidden",children:i.children}),i.subtreeFlags=te.subtreeFlags&65011712,ue!==null?U=ya(ue,U):(U=kr(U,d,r,null),U.flags|=2),U.return=t,i.return=t,i.sibling=U,t.child=i,ci(null,i),i=t.child,U=e.child.memoizedState,U===null?U=au(r):(d=U.cachePool,d!==null?(te=Gt._currentValue,d=d.parent!==te?{parent:te,pool:te}:d):d=uh(),U={baseLanes:U.baseLanes|r,cachePool:d}),i.memoizedState=U,i.childLanes=ru(e,_,r),t.memoizedState=nu,ci(e.child,i)):(Qa(t),r=e.child,e=r.sibling,r=ya(r,{mode:"visible",children:i.children}),r.return=t,r.sibling=null,e!==null&&(_=t.deletions,_===null?(t.deletions=[e],t.flags|=16):_.push(e)),t.child=r,t.memoizedState=null,r)}function su(e,t){return t=Bl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bl(e,t){return e=Dn(22,e,null,t),e.lanes=0,e}function iu(e,t,r){return Ur(t,e.child,null,r),e=su(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wp(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),jc(e.return,t,r)}function lu(e,t,r,i,d,h){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:d,treeForkCount:h}:(_.isBackwards=t,_.rendering=null,_.renderingStartTime=0,_.last=i,_.tail=r,_.tailMode=d,_.treeForkCount=h)}function Np(e,t,r){var i=t.pendingProps,d=i.revealOrder,h=i.tail;i=i.children;var _=qt.current,U=(_&2)!==0;if(U?(_=_&1|2,t.flags|=128):_&=1,q(qt,_),rn(e,t,i,r),i=ft?Ks:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wp(e,r,t);else if(e.tag===19)wp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=t.child,d=null;r!==null;)e=r.alternate,e!==null&&Tl(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=t.child,t.child=null):(d=r.sibling,r.sibling=null),lu(t,!1,d,r,h,i);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&Tl(e)===null){t.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}lu(t,!0,r,null,h,i);break;case"together":lu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Na(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),tr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(rs(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,r=ya(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ya(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function ou(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yl(e)))}function ax(e,t,r){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Ya(t,Gt,e.memoizedState.cache),Ar();break;case 27:case 5:Ce(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Dc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Qa(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Sp(e,t,r):(Qa(t),e=Na(e,t,r),e!==null?e.sibling:null);Qa(t);break;case 19:var d=(e.flags&128)!==0;if(i=(r&t.childLanes)!==0,i||(rs(e,t,r,!1),i=(r&t.childLanes)!==0),d){if(i)return Np(e,t,r);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),q(qt,qt.current),i)break;return null;case 22:return t.lanes=0,gp(e,t,r,t.pendingProps);case 24:Ya(t,Gt,e.memoizedState.cache)}return Na(e,t,r)}function Cp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Vt=!0;else{if(!ou(e,r)&&(t.flags&128)===0)return Vt=!1,ax(e,t,r);Vt=(e.flags&131072)!==0}else Vt=!1,ft&&(t.flags&1048576)!==0&&ah(t,Ks,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Lr(t.elementType),t.type=e,typeof e=="function")hc(e)?(i=Br(e,i),t.tag=1,t=xp(null,t,e,i,r)):(t.tag=0,t=tu(null,t,e,i,r));else{if(e!=null){var d=e.$$typeof;if(d===D){t.tag=11,t=hp(null,t,e,i,r);break e}else if(d===X){t.tag=14,t=pp(null,t,e,i,r);break e}}throw t=T(e)||e,Error(o(306,t,""))}}return t;case 0:return tu(e,t,t.type,t.pendingProps,r);case 1:return i=t.type,d=Br(i,t.pendingProps),xp(e,t,i,d,r);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var h=t.memoizedState;d=h.element,Ec(e,t),ri(t,i,null,r);var _=t.memoizedState;if(i=_.cache,Ya(t,Gt,i),i!==h.cache&&Sc(t,[Gt],r,!0),ai(),i=_.element,h.isDehydrated)if(h={element:i,isDehydrated:!1,cache:_.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=jp(e,t,i,r);break e}else if(i!==d){d=Yn(Error(o(424)),t),Qs(d),t=jp(e,t,i,r);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,At=Jn(e.firstChild),nn=t,ft=!0,Fa=null,Kn=!0,r=gh(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ar(),i===d){t=Na(e,t,r);break e}rn(e,t,i,r)}t=t.child}return t;case 26:return zl(e,t),e===null?(r=Um(t.type,null,t.pendingProps,null))?t.memoizedState=r:ft||(r=t.type,e=t.pendingProps,i=eo(he.current).createElement(r),i[jt]=t,i[Qt]=e,sn(i,r,e),_t(i),t.stateNode=i):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&ft&&(i=t.stateNode=Dm(t.type,t.pendingProps,he.current),nn=t,Kn=!0,d=At,ir(t.type)?($u=d,At=Jn(i.firstChild)):At=d),rn(e,t,t.pendingProps.children,r),zl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ft&&((d=i=At)&&(i=Dx(i,t.type,t.pendingProps,Kn),i!==null?(t.stateNode=i,nn=t,At=Jn(i.firstChild),Kn=!1,d=!0):d=!1),d||Va(t)),Ce(t),d=t.type,h=t.pendingProps,_=e!==null?e.memoizedProps:null,i=h.children,Uu(d,h)?i=null:_!==null&&Uu(d,_)&&(t.flags|=32),t.memoizedState!==null&&(d=Mc(e,t,Xb,null,null,r),Ni._currentValue=d),zl(e,t),rn(e,t,i,r),t.child;case 6:return e===null&&ft&&((e=r=At)&&(r=Lx(r,t.pendingProps,Kn),r!==null?(t.stateNode=r,nn=t,At=null,e=!0):e=!1),e||Va(t)),null;case 13:return Sp(e,t,r);case 4:return Ne(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ur(t,null,i,r):rn(e,t,i,r),t.child;case 11:return hp(e,t,t.type,t.pendingProps,r);case 7:return rn(e,t,t.pendingProps,r),t.child;case 8:return rn(e,t,t.pendingProps.children,r),t.child;case 12:return rn(e,t,t.pendingProps.children,r),t.child;case 10:return i=t.pendingProps,Ya(t,t.type,i.value),rn(e,t,i.children,r),t.child;case 9:return d=t.type._context,i=t.pendingProps.children,Rr(t),d=an(d),i=i(d),t.flags|=1,rn(e,t,i,r),t.child;case 14:return pp(e,t,t.type,t.pendingProps,r);case 15:return mp(e,t,t.type,t.pendingProps,r);case 19:return Np(e,t,r);case 31:return nx(e,t,r);case 22:return gp(e,t,r,t.pendingProps);case 24:return Rr(t),i=an(Gt),e===null?(d=Cc(),d===null&&(d=Ct,h=wc(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=r),d=h),t.memoizedState={parent:i,cache:d},_c(t),Ya(t,Gt,d)):((e.lanes&r)!==0&&(Ec(e,t),ri(t,null,null,r),ai()),d=e.memoizedState,h=t.memoizedState,d.parent!==i?(d={parent:i,cache:i},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Ya(t,Gt,i)):(i=h.cache,Ya(t,Gt,i),i!==d.cache&&Sc(t,[Gt],r,!0))),rn(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Ca(e){e.flags|=4}function cu(e,t,r,i,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Jp())e.flags|=8192;else throw Mr=Sl,Tc}else e.flags&=-16777217}function Tp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$m(t))if(Jp())e.flags|=8192;else throw Mr=Sl,Tc}function Il(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xt():536870912,e.lanes|=t,gs|=t)}function ui(e,t){if(!ft)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags&65011712,i|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags,i|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function rx(e,t,r){var i=t.pendingProps;switch(vc(t),t.tag){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 Ot(t),null;case 3:return r=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ja(Gt),le(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(as(t)?Ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,bc())),Ot(t),null;case 26:var d=t.type,h=t.memoizedState;return e===null?(Ca(t),h!==null?(Ot(t),Tp(t,h)):(Ot(t),cu(t,d,null,i,r))):h?h!==e.memoizedState?(Ca(t),Ot(t),Tp(t,h)):(Ot(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Ca(t),Ot(t),cu(t,d,e,i,r)),null;case 27:if(ye(t),r=he.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ca(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Ot(t),null}e=I.current,as(t)?sh(t):(e=Dm(d,i,r),t.stateNode=e,Ca(t))}return Ot(t),null;case 5:if(ye(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ca(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Ot(t),null}if(h=I.current,as(t))sh(t);else{var _=eo(he.current);switch(h){case 1:h=_.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=_.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=_.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof i.is=="string"?_.createElement("select",{is:i.is}):_.createElement("select"),i.multiple?h.multiple=!0:i.size&&(h.size=i.size);break;default:h=typeof i.is=="string"?_.createElement(d,{is:i.is}):_.createElement(d)}}h[jt]=t,h[Qt]=i;e:for(_=t.child;_!==null;){if(_.tag===5||_.tag===6)h.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===t)break e;for(;_.sibling===null;){if(_.return===null||_.return===t)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}t.stateNode=h;e:switch(sn(h,d,i),d){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ca(t)}}return Ot(t),cu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Ca(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=he.current,as(t)){if(e=t.stateNode,r=t.memoizedProps,i=null,d=nn,d!==null)switch(d.tag){case 27:case 5:i=d.memoizedProps}e[jt]=t,e=!!(e.nodeValue===r||i!==null&&i.suppressHydrationWarning===!0||Sm(e.nodeValue,r)),e||Va(t,!0)}else e=eo(e).createTextNode(i),e[jt]=t,t.stateNode=e}return Ot(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(i=as(t),r!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[jt]=t}else Ar(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ot(t),e=!1}else r=bc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(Mn(t),t):(Mn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ot(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=as(t),i!==null&&i.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[jt]=t}else Ar(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ot(t),d=!1}else d=bc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(Mn(t),t):(Mn(t),null)}return Mn(t),(t.flags&128)!==0?(t.lanes=r,t):(r=i!==null,e=e!==null&&e.memoizedState!==null,r&&(i=t.child,d=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(d=i.alternate.memoizedState.cachePool.pool),h=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),h!==d&&(i.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Il(t,t.updateQueue),Ot(t),null);case 4:return le(),e===null&&Ou(t.stateNode.containerInfo),Ot(t),null;case 10:return ja(t.type),Ot(t),null;case 19:if(C(qt),i=t.memoizedState,i===null)return Ot(t),null;if(d=(t.flags&128)!==0,h=i.rendering,h===null)if(d)ui(i,!1);else{if(Pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=Tl(e),h!==null){for(t.flags|=128,ui(i,!1),e=h.updateQueue,t.updateQueue=e,Il(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)eh(r,e),r=r.sibling;return q(qt,qt.current&1|2),ft&&ba(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Ee()>Gl&&(t.flags|=128,d=!0,ui(i,!1),t.lanes=4194304)}else{if(!d)if(e=Tl(h),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Il(t,e),ui(i,!0),i.tail===null&&i.tailMode==="hidden"&&!h.alternate&&!ft)return Ot(t),null}else 2*Ee()-i.renderingStartTime>Gl&&r!==536870912&&(t.flags|=128,d=!0,ui(i,!1),t.lanes=4194304);i.isBackwards?(h.sibling=t.child,t.child=h):(e=i.last,e!==null?e.sibling=h:t.child=h,i.last=h)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ee(),e.sibling=null,r=qt.current,q(qt,d?r&1|2:r&1),ft&&ba(t,i.treeForkCount),e):(Ot(t),null);case 22:case 23:return Mn(t),Rc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(r&536870912)!==0&&(t.flags&128)===0&&(Ot(t),t.subtreeFlags&6&&(t.flags|=8192)):Ot(t),r=t.updateQueue,r!==null&&Il(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==r&&(t.flags|=2048),e!==null&&C(Dr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ja(Gt),Ot(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function sx(e,t){switch(vc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ja(Gt),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(Mn(t),t.alternate===null)throw Error(o(340));Ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(qt),null;case 4:return le(),null;case 10:return ja(t.type),null;case 22:case 23:return Mn(t),Rc(),e!==null&&C(Dr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ja(Gt),null;case 25:return null;default:return null}}function _p(e,t){switch(vc(t),t.tag){case 3:ja(Gt),le();break;case 26:case 27:case 5:ye(t);break;case 4:le();break;case 31:t.memoizedState!==null&&Mn(t);break;case 13:Mn(t);break;case 19:C(qt);break;case 10:ja(t.type);break;case 22:case 23:Mn(t),Rc(),e!==null&&C(Dr);break;case 24:ja(Gt)}}function di(e,t){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var d=i.next;r=d;do{if((r.tag&e)===e){i=void 0;var h=r.create,_=r.inst;i=h(),_.destroy=i}r=r.next}while(r!==d)}}catch(U){xt(t,t.return,U)}}function Wa(e,t,r){try{var i=t.updateQueue,d=i!==null?i.lastEffect:null;if(d!==null){var h=d.next;i=h;do{if((i.tag&e)===e){var _=i.inst,U=_.destroy;if(U!==void 0){_.destroy=void 0,d=t;var te=r,ue=U;try{ue()}catch(be){xt(d,te,be)}}}i=i.next}while(i!==h)}}catch(be){xt(t,t.return,be)}}function Ep(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{yh(t,r)}catch(i){xt(e,e.return,i)}}}function kp(e,t,r){r.props=Br(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(i){xt(e,t,i)}}function fi(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof r=="function"?e.refCleanup=r(i):r.current=i}}catch(d){xt(e,t,d)}}function da(e,t){var r=e.ref,i=e.refCleanup;if(r!==null)if(typeof i=="function")try{i()}catch(d){xt(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){xt(e,t,d)}else r.current=null}function Ap(e){var t=e.type,r=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&i.focus();break e;case"img":r.src?i.src=r.src:r.srcSet&&(i.srcset=r.srcSet)}}catch(d){xt(e,e.return,d)}}function uu(e,t,r){try{var i=e.stateNode;_x(i,e.type,r,t),i[Qt]=t}catch(d){xt(e,e.return,d)}}function Op(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ir(e.type)||e.tag===4}function du(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Op(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.tag===27&&ir(e.type)||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 fu(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=un));else if(i!==4&&(i===27&&ir(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(fu(e,t,r),e=e.sibling;e!==null;)fu(e,t,r),e=e.sibling}function Pl(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(i===27&&ir(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Pl(e,t,r),e=e.sibling;e!==null;)Pl(e,t,r),e=e.sibling}function Rp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var i=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);sn(t,i,r),t[jt]=e,t[Qt]=r}catch(h){xt(e,e.return,h)}}var Ta=!1,Yt=!1,hu=!1,Dp=typeof WeakSet=="function"?WeakSet:Set,en=null;function ix(e,t){if(e=e.containerInfo,Lu=lo,e=Ff(e),ic(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var d=i.anchorOffset,h=i.focusNode;i=i.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var _=0,U=-1,te=-1,ue=0,be=0,Se=e,de=null;t:for(;;){for(var me;Se!==r||d!==0&&Se.nodeType!==3||(U=_+d),Se!==h||i!==0&&Se.nodeType!==3||(te=_+i),Se.nodeType===3&&(_+=Se.nodeValue.length),(me=Se.firstChild)!==null;)de=Se,Se=me;for(;;){if(Se===e)break t;if(de===r&&++ue===d&&(U=_),de===h&&++be===i&&(te=_),(me=Se.nextSibling)!==null)break;Se=de,de=Se.parentNode}Se=me}r=U===-1||te===-1?null:{start:U,end:te}}else r=null}r=r||{start:0,end:0}}else r=null;for(Mu={focusedElem:e,selectionRange:r},lo=!1,en=t;en!==null;)if(t=en,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,en=e;else for(;en!==null;){switch(t=en,h=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,r=t,d=h.memoizedProps,h=h.memoizedState,i=r.stateNode;try{var De=Br(r.type,d);e=i.getSnapshotBeforeUpdate(De,h),i.__reactInternalSnapshotBeforeUpdate=e}catch(Pe){xt(r,r.return,Pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Bu(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Bu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,en=e;break}en=t.return}}function Lp(e,t,r){var i=r.flags;switch(r.tag){case 0:case 11:case 15:Ea(e,r),i&4&&di(5,r);break;case 1:if(Ea(e,r),i&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(_){xt(r,r.return,_)}else{var d=Br(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(_){xt(r,r.return,_)}}i&64&&Ep(r),i&512&&fi(r,r.return);break;case 3:if(Ea(e,r),i&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{yh(e,t)}catch(_){xt(r,r.return,_)}}break;case 27:t===null&&i&4&&Rp(r);case 26:case 5:Ea(e,r),t===null&&i&4&&Ap(r),i&512&&fi(r,r.return);break;case 12:Ea(e,r);break;case 31:Ea(e,r),i&4&&zp(e,r);break;case 13:Ea(e,r),i&4&&Bp(e,r),i&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=mx.bind(null,r),Mx(e,r))));break;case 22:if(i=r.memoizedState!==null||Ta,!i){t=t!==null&&t.memoizedState!==null||Yt,d=Ta;var h=Yt;Ta=i,(Yt=t)&&!h?ka(e,r,(r.subtreeFlags&8772)!==0):Ea(e,r),Ta=d,Yt=h}break;case 30:break;default:Ea(e,r)}}function Mp(e){var t=e.alternate;t!==null&&(e.alternate=null,Mp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bn(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Mt=null,wn=!1;function _a(e,t,r){for(r=r.child;r!==null;)Up(e,t,r),r=r.sibling}function Up(e,t,r){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(et,r)}catch{}switch(r.tag){case 26:Yt||da(r,t),_a(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Yt||da(r,t);var i=Mt,d=wn;ir(r.type)&&(Mt=r.stateNode,wn=!1),_a(e,t,r),ji(r.stateNode),Mt=i,wn=d;break;case 5:Yt||da(r,t);case 6:if(i=Mt,d=wn,Mt=null,_a(e,t,r),Mt=i,wn=d,Mt!==null)if(wn)try{(Mt.nodeType===9?Mt.body:Mt.nodeName==="HTML"?Mt.ownerDocument.body:Mt).removeChild(r.stateNode)}catch(h){xt(r,t,h)}else try{Mt.removeChild(r.stateNode)}catch(h){xt(r,t,h)}break;case 18:Mt!==null&&(wn?(e=Mt,Em(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Ns(e)):Em(Mt,r.stateNode));break;case 4:i=Mt,d=wn,Mt=r.stateNode.containerInfo,wn=!0,_a(e,t,r),Mt=i,wn=d;break;case 0:case 11:case 14:case 15:Wa(2,r,t),Yt||Wa(4,r,t),_a(e,t,r);break;case 1:Yt||(da(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"&&kp(r,t,i)),_a(e,t,r);break;case 21:_a(e,t,r);break;case 22:Yt=(i=Yt)||r.memoizedState!==null,_a(e,t,r),Yt=i;break;default:_a(e,t,r)}}function zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ns(e)}catch(r){xt(t,t.return,r)}}}function Bp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ns(e)}catch(r){xt(t,t.return,r)}}function lx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dp),t;default:throw Error(o(435,e.tag))}}function $l(e,t){var r=lx(e);t.forEach(function(i){if(!r.has(i)){r.add(i);var d=gx.bind(null,e,i);i.then(d,d)}})}function Nn(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var d=r[i],h=e,_=t,U=_;e:for(;U!==null;){switch(U.tag){case 27:if(ir(U.type)){Mt=U.stateNode,wn=!1;break e}break;case 5:Mt=U.stateNode,wn=!1;break e;case 3:case 4:Mt=U.stateNode.containerInfo,wn=!0;break e}U=U.return}if(Mt===null)throw Error(o(160));Up(h,_,d),Mt=null,wn=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ip(t,e),t=t.sibling}var ra=null;function Ip(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Nn(t,e),Cn(e),i&4&&(Wa(3,e,e.return),di(3,e),Wa(5,e,e.return));break;case 1:Nn(t,e),Cn(e),i&512&&(Yt||r===null||da(r,r.return)),i&64&&Ta&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?i:r.concat(i))));break;case 26:var d=ra;if(Nn(t,e),Cn(e),i&512&&(Yt||r===null||da(r,r.return)),i&4){var h=r!==null?r.memoizedState:null;if(i=e.memoizedState,r===null)if(i===null)if(e.stateNode===null){e:{i=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(i){case"title":h=d.getElementsByTagName("title")[0],(!h||h[En]||h[jt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(i),d.head.insertBefore(h,d.querySelector("head > title"))),sn(h,i,r),h[jt]=e,_t(h),i=h;break e;case"link":var _=Im("link","href",d).get(i+(r.href||""));if(_){for(var U=0;U<_.length;U++)if(h=_[U],h.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&h.getAttribute("rel")===(r.rel==null?null:r.rel)&&h.getAttribute("title")===(r.title==null?null:r.title)&&h.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){_.splice(U,1);break t}}h=d.createElement(i),sn(h,i,r),d.head.appendChild(h);break;case"meta":if(_=Im("meta","content",d).get(i+(r.content||""))){for(U=0;U<_.length;U++)if(h=_[U],h.getAttribute("content")===(r.content==null?null:""+r.content)&&h.getAttribute("name")===(r.name==null?null:r.name)&&h.getAttribute("property")===(r.property==null?null:r.property)&&h.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&h.getAttribute("charset")===(r.charSet==null?null:r.charSet)){_.splice(U,1);break t}}h=d.createElement(i),sn(h,i,r),d.head.appendChild(h);break;default:throw Error(o(468,i))}h[jt]=e,_t(h),i=h}e.stateNode=i}else Pm(d,e.type,e.stateNode);else e.stateNode=Bm(d,i,e.memoizedProps);else h!==i?(h===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):h.count--,i===null?Pm(d,e.type,e.stateNode):Bm(d,i,e.memoizedProps)):i===null&&e.stateNode!==null&&uu(e,e.memoizedProps,r.memoizedProps)}break;case 27:Nn(t,e),Cn(e),i&512&&(Yt||r===null||da(r,r.return)),r!==null&&i&4&&uu(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Nn(t,e),Cn(e),i&512&&(Yt||r===null||da(r,r.return)),e.flags&32){d=e.stateNode;try{Pa(d,"")}catch(De){xt(e,e.return,De)}}i&4&&e.stateNode!=null&&(d=e.memoizedProps,uu(e,d,r!==null?r.memoizedProps:d)),i&1024&&(hu=!0);break;case 6:if(Nn(t,e),Cn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,r=e.stateNode;try{r.nodeValue=i}catch(De){xt(e,e.return,De)}}break;case 3:if(ao=null,d=ra,ra=to(t.containerInfo),Nn(t,e),ra=d,Cn(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Ns(t.containerInfo)}catch(De){xt(e,e.return,De)}hu&&(hu=!1,Pp(e));break;case 4:i=ra,ra=to(e.stateNode.containerInfo),Nn(t,e),Cn(e),ra=i;break;case 12:Nn(t,e),Cn(e);break;case 31:Nn(t,e),Cn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,$l(e,i)));break;case 13:Nn(t,e),Cn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Hl=Ee()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,$l(e,i)));break;case 22:d=e.memoizedState!==null;var te=r!==null&&r.memoizedState!==null,ue=Ta,be=Yt;if(Ta=ue||d,Yt=be||te,Nn(t,e),Yt=be,Ta=ue,Cn(e),i&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(r===null||te||Ta||Yt||Ir(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){te=r=t;try{if(h=te.stateNode,d)_=h.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{U=te.stateNode;var Se=te.memoizedProps.style,de=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;U.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(De){xt(te,te.return,De)}}}else if(t.tag===6){if(r===null){te=t;try{te.stateNode.nodeValue=d?"":te.memoizedProps}catch(De){xt(te,te.return,De)}}}else if(t.tag===18){if(r===null){te=t;try{var me=te.stateNode;d?km(me,!0):km(te.stateNode,!1)}catch(De){xt(te,te.return,De)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(r=i.retryQueue,r!==null&&(i.retryQueue=null,$l(e,r))));break;case 19:Nn(t,e),Cn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,$l(e,i)));break;case 30:break;case 21:break;default:Nn(t,e),Cn(e)}}function Cn(e){var t=e.flags;if(t&2){try{for(var r,i=e.return;i!==null;){if(Op(i)){r=i;break}i=i.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,h=du(e);Pl(e,h,d);break;case 5:var _=r.stateNode;r.flags&32&&(Pa(_,""),r.flags&=-33);var U=du(e);Pl(e,U,_);break;case 3:case 4:var te=r.stateNode.containerInfo,ue=du(e);fu(e,ue,te);break;default:throw Error(o(161))}}catch(be){xt(e,e.return,be)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ea(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Lp(e,t.alternate,t),t=t.sibling}function Ir(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wa(4,t,t.return),Ir(t);break;case 1:da(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&kp(t,t.return,r),Ir(t);break;case 27:ji(t.stateNode);case 26:case 5:da(t,t.return),Ir(t);break;case 22:t.memoizedState===null&&Ir(t);break;case 30:Ir(t);break;default:Ir(t)}e=e.sibling}}function ka(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,d=e,h=t,_=h.flags;switch(h.tag){case 0:case 11:case 15:ka(d,h,r),di(4,h);break;case 1:if(ka(d,h,r),i=h,d=i.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ue){xt(i,i.return,ue)}if(i=h,d=i.updateQueue,d!==null){var U=i.stateNode;try{var te=d.shared.hiddenCallbacks;if(te!==null)for(d.shared.hiddenCallbacks=null,d=0;d<te.length;d++)vh(te[d],U)}catch(ue){xt(i,i.return,ue)}}r&&_&64&&Ep(h),fi(h,h.return);break;case 27:Rp(h);case 26:case 5:ka(d,h,r),r&&i===null&&_&4&&Ap(h),fi(h,h.return);break;case 12:ka(d,h,r);break;case 31:ka(d,h,r),r&&_&4&&zp(d,h);break;case 13:ka(d,h,r),r&&_&4&&Bp(d,h);break;case 22:h.memoizedState===null&&ka(d,h,r),fi(h,h.return);break;case 30:break;default:ka(d,h,r)}t=t.sibling}}function pu(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Js(r))}function mu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Js(e))}function sa(e,t,r,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$p(e,t,r,i),t=t.sibling}function $p(e,t,r,i){var d=t.flags;switch(t.tag){case 0:case 11:case 15:sa(e,t,r,i),d&2048&&di(9,t);break;case 1:sa(e,t,r,i);break;case 3:sa(e,t,r,i),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Js(e)));break;case 12:if(d&2048){sa(e,t,r,i),e=t.stateNode;try{var h=t.memoizedProps,_=h.id,U=h.onPostCommit;typeof U=="function"&&U(_,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(te){xt(t,t.return,te)}}else sa(e,t,r,i);break;case 31:sa(e,t,r,i);break;case 13:sa(e,t,r,i);break;case 23:break;case 22:h=t.stateNode,_=t.alternate,t.memoizedState!==null?h._visibility&2?sa(e,t,r,i):hi(e,t):h._visibility&2?sa(e,t,r,i):(h._visibility|=2,hs(e,t,r,i,(t.subtreeFlags&10256)!==0||!1)),d&2048&&pu(_,t);break;case 24:sa(e,t,r,i),d&2048&&mu(t.alternate,t);break;default:sa(e,t,r,i)}}function hs(e,t,r,i,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var h=e,_=t,U=r,te=i,ue=_.flags;switch(_.tag){case 0:case 11:case 15:hs(h,_,U,te,d),di(8,_);break;case 23:break;case 22:var be=_.stateNode;_.memoizedState!==null?be._visibility&2?hs(h,_,U,te,d):hi(h,_):(be._visibility|=2,hs(h,_,U,te,d)),d&&ue&2048&&pu(_.alternate,_);break;case 24:hs(h,_,U,te,d),d&&ue&2048&&mu(_.alternate,_);break;default:hs(h,_,U,te,d)}t=t.sibling}}function hi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,i=t,d=i.flags;switch(i.tag){case 22:hi(r,i),d&2048&&pu(i.alternate,i);break;case 24:hi(r,i),d&2048&&mu(i.alternate,i);break;default:hi(r,i)}t=t.sibling}}var pi=8192;function ps(e,t,r){if(e.subtreeFlags&pi)for(e=e.child;e!==null;)qp(e,t,r),e=e.sibling}function qp(e,t,r){switch(e.tag){case 26:ps(e,t,r),e.flags&pi&&e.memoizedState!==null&&Yx(r,ra,e.memoizedState,e.memoizedProps);break;case 5:ps(e,t,r);break;case 3:case 4:var i=ra;ra=to(e.stateNode.containerInfo),ps(e,t,r),ra=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=pi,pi=16777216,ps(e,t,r),pi=i):ps(e,t,r));break;default:ps(e,t,r)}}function Hp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];en=i,Fp(i,e)}Hp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gp(e),e=e.sibling}function Gp(e){switch(e.tag){case 0:case 11:case 15:mi(e),e.flags&2048&&Wa(9,e,e.return);break;case 3:mi(e);break;case 12:mi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ql(e)):mi(e);break;default:mi(e)}}function ql(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];en=i,Fp(i,e)}Hp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wa(8,t,t.return),ql(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,ql(t));break;default:ql(t)}e=e.sibling}}function Fp(e,t){for(;en!==null;){var r=en;switch(r.tag){case 0:case 11:case 15:Wa(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var i=r.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Js(r.memoizedState.cache)}if(i=r.child,i!==null)i.return=r,en=i;else e:for(r=e;en!==null;){i=en;var d=i.sibling,h=i.return;if(Mp(i),i===r){en=null;break e}if(d!==null){d.return=h,en=d;break e}en=h}}}var ox={getCacheForType:function(e){var t=an(Gt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return an(Gt).controller.signal}},cx=typeof WeakMap=="function"?WeakMap:Map,yt=0,Ct=null,it=null,ct=0,bt=0,Un=null,er=!1,ms=!1,gu=!1,Aa=0,Pt=0,tr=0,Pr=0,vu=0,zn=0,gs=0,gi=null,Tn=null,yu=!1,Hl=0,Vp=0,Gl=1/0,Fl=null,nr=null,Wt=0,ar=null,vs=null,Oa=0,bu=0,xu=null,Yp=null,vi=0,ju=null;function Bn(){return(yt&2)!==0&&ct!==0?ct&-ct:V.T!==null?_u():Ma()}function Xp(){if(zn===0)if((ct&536870912)===0||ft){var e=st;st<<=1,(st&3932160)===0&&(st=262144),zn=e}else zn=536870912;return e=Ln.current,e!==null&&(e.flags|=32),zn}function _n(e,t,r){(e===Ct&&(bt===2||bt===9)||e.cancelPendingCommit!==null)&&(ys(e,0),rr(e,ct,zn,!1)),Ge(e,r),((yt&2)===0||e!==Ct)&&(e===Ct&&((yt&2)===0&&(Pr|=r),Pt===4&&rr(e,ct,zn,!1)),fa(e))}function Zp(e,t,r){if((yt&6)!==0)throw Error(o(327));var i=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Qe(e,t),d=i?fx(e,t):wu(e,t,!0),h=i;do{if(d===0){ms&&!i&&rr(e,t,0,!1);break}else{if(r=e.current.alternate,h&&!ux(r)){d=wu(e,t,!1),h=!1;continue}if(d===2){if(h=t,e.errorRecoveryDisabledLanes&h)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){t=_;e:{var U=e;d=gi;var te=U.current.memoizedState.isDehydrated;if(te&&(ys(U,_).flags|=256),_=wu(U,_,!1),_!==2){if(gu&&!te){U.errorRecoveryDisabledLanes|=h,Pr|=h,d=4;break e}h=Tn,Tn=d,h!==null&&(Tn===null?Tn=h:Tn.push.apply(Tn,h))}d=_}if(h=!1,d!==2)continue}}if(d===1){ys(e,0),rr(e,t,0,!0);break}e:{switch(i=e,h=d,h){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:rr(i,t,zn,!er);break e;case 2:Tn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=Hl+300-Ee(),10<d)){if(rr(i,t,zn,!er),zt(i,0,!0)!==0)break e;Oa=t,i.timeoutHandle=Tm(Kp.bind(null,i,r,Tn,Fl,yu,t,zn,Pr,gs,er,h,"Throttled",-0,0),d);break e}Kp(i,r,Tn,Fl,yu,t,zn,Pr,gs,er,h,null,-0,0)}}break}while(!0);fa(e)}function Kp(e,t,r,i,d,h,_,U,te,ue,be,Se,de,me){if(e.timeoutHandle=-1,Se=t.subtreeFlags,Se&8192||(Se&16785408)===16785408){Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},qp(t,h,Se);var De=(h&62914560)===h?Hl-Ee():(h&4194048)===h?Vp-Ee():0;if(De=Xx(Se,De),De!==null){Oa=h,e.cancelPendingCommit=De(rm.bind(null,e,t,h,r,i,d,_,U,te,be,Se,null,de,me)),rr(e,h,_,!ue);return}}rm(e,t,h,r,i,d,_,U,te)}function ux(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var i=0;i<r.length;i++){var d=r[i],h=d.getSnapshot;d=d.value;try{if(!Rn(h(),d))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function rr(e,t,r,i){t&=~vu,t&=~Pr,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var d=t;0<d;){var h=31-Oe(d),_=1<<h;i[h]=-1,d&=~_}r!==0&&Ye(e,r,t)}function Vl(){return(yt&6)===0?(yi(0),!1):!0}function Su(){if(it!==null){if(bt===0)var e=it.return;else e=it,xa=Or=null,Bc(e),os=null,ei=0,e=it;for(;e!==null;)_p(e.alternate,e),e=e.return;it=null}}function ys(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,Ax(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Oa=0,Su(),Ct=e,it=r=ya(e.current,null),ct=t,bt=0,Un=null,er=!1,ms=Qe(e,t),gu=!1,gs=zn=vu=Pr=tr=Pt=0,Tn=gi=null,yu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var d=31-Oe(i),h=1<<d;t|=e[d],i&=~h}return Aa=t,hl(),r}function Qp(e,t){Je=null,V.H=oi,t===ls||t===jl?(t=hh(),bt=3):t===Tc?(t=hh(),bt=4):bt=t===eu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Un=t,it===null&&(Pt=1,Ml(e,Yn(t,e.current)))}function Jp(){var e=Ln.current;return e===null?!0:(ct&4194048)===ct?Qn===null:(ct&62914560)===ct||(ct&536870912)!==0?e===Qn:!1}function Wp(){var e=V.H;return V.H=oi,e===null?oi:e}function em(){var e=V.A;return V.A=ox,e}function Yl(){Pt=4,er||(ct&4194048)!==ct&&Ln.current!==null||(ms=!0),(tr&134217727)===0&&(Pr&134217727)===0||Ct===null||rr(Ct,ct,zn,!1)}function wu(e,t,r){var i=yt;yt|=2;var d=Wp(),h=em();(Ct!==e||ct!==t)&&(Fl=null,ys(e,t)),t=!1;var _=Pt;e:do try{if(bt!==0&&it!==null){var U=it,te=Un;switch(bt){case 8:Su(),_=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var ue=bt;if(bt=0,Un=null,bs(e,U,te,ue),r&&ms){_=0;break e}break;default:ue=bt,bt=0,Un=null,bs(e,U,te,ue)}}dx(),_=Pt;break}catch(be){Qp(e,be)}while(!0);return t&&e.shellSuspendCounter++,xa=Or=null,yt=i,V.H=d,V.A=h,it===null&&(Ct=null,ct=0,hl()),_}function dx(){for(;it!==null;)tm(it)}function fx(e,t){var r=yt;yt|=2;var i=Wp(),d=em();Ct!==e||ct!==t?(Fl=null,Gl=Ee()+500,ys(e,t)):ms=Qe(e,t);e:do try{if(bt!==0&&it!==null){t=it;var h=Un;t:switch(bt){case 1:bt=0,Un=null,bs(e,t,h,1);break;case 2:case 9:if(dh(h)){bt=0,Un=null,nm(t);break}t=function(){bt!==2&&bt!==9||Ct!==e||(bt=7),fa(e)},h.then(t,t);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:dh(h)?(bt=0,Un=null,nm(t)):(bt=0,Un=null,bs(e,t,h,7));break;case 5:var _=null;switch(it.tag){case 26:_=it.memoizedState;case 5:case 27:var U=it;if(_?$m(_):U.stateNode.complete){bt=0,Un=null;var te=U.sibling;if(te!==null)it=te;else{var ue=U.return;ue!==null?(it=ue,Xl(ue)):it=null}break t}}bt=0,Un=null,bs(e,t,h,5);break;case 6:bt=0,Un=null,bs(e,t,h,6);break;case 8:Su(),Pt=6;break e;default:throw Error(o(462))}}hx();break}catch(be){Qp(e,be)}while(!0);return xa=Or=null,V.H=i,V.A=d,yt=r,it!==null?0:(Ct=null,ct=0,hl(),Pt)}function hx(){for(;it!==null&&!se();)tm(it)}function tm(e){var t=Cp(e.alternate,e,Aa);e.memoizedProps=e.pendingProps,t===null?Xl(e):it=t}function nm(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=bp(r,t,t.pendingProps,t.type,void 0,ct);break;case 11:t=bp(r,t,t.pendingProps,t.type.render,t.ref,ct);break;case 5:Bc(t);default:_p(r,t),t=it=eh(t,Aa),t=Cp(r,t,Aa)}e.memoizedProps=e.pendingProps,t===null?Xl(e):it=t}function bs(e,t,r,i){xa=Or=null,Bc(t),os=null,ei=0;var d=t.return;try{if(tx(e,d,t,r,ct)){Pt=1,Ml(e,Yn(r,e.current)),it=null;return}}catch(h){if(d!==null)throw it=d,h;Pt=1,Ml(e,Yn(r,e.current)),it=null;return}t.flags&32768?(ft||i===1?e=!0:ms||(ct&536870912)!==0?e=!1:(er=e=!0,(i===2||i===9||i===3||i===6)&&(i=Ln.current,i!==null&&i.tag===13&&(i.flags|=16384))),am(t,e)):Xl(t)}function Xl(e){var t=e;do{if((t.flags&32768)!==0){am(t,er);return}e=t.return;var r=rx(t.alternate,t,Aa);if(r!==null){it=r;return}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);Pt===0&&(Pt=5)}function am(e,t){do{var r=sx(e.alternate,e);if(r!==null){r.flags&=32767,it=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){it=e;return}it=e=r}while(e!==null);Pt=6,it=null}function rm(e,t,r,i,d,h,_,U,te){e.cancelPendingCommit=null;do Zl();while(Wt!==0);if((yt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(h=t.lanes|t.childLanes,h|=dc,Ie(e,r,h,_,U,te),e===Ct&&(it=Ct=null,ct=0),vs=t,ar=e,Oa=r,bu=h,xu=d,Yp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,vx(fe,function(){return cm(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null,d=Q.p,Q.p=2,_=yt,yt|=4;try{ix(e,t,r)}finally{yt=_,Q.p=d,V.T=i}}Wt=1,sm(),im(),lm()}}function sm(){if(Wt===1){Wt=0;var e=ar,t=vs,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=V.T,V.T=null;var i=Q.p;Q.p=2;var d=yt;yt|=4;try{Ip(t,e);var h=Mu,_=Ff(e.containerInfo),U=h.focusedElem,te=h.selectionRange;if(_!==U&&U&&U.ownerDocument&&Gf(U.ownerDocument.documentElement,U)){if(te!==null&&ic(U)){var ue=te.start,be=te.end;if(be===void 0&&(be=ue),"selectionStart"in U)U.selectionStart=ue,U.selectionEnd=Math.min(be,U.value.length);else{var Se=U.ownerDocument||document,de=Se&&Se.defaultView||window;if(de.getSelection){var me=de.getSelection(),De=U.textContent.length,Pe=Math.min(te.start,De),Nt=te.end===void 0?Pe:Math.min(te.end,De);!me.extend&&Pe>Nt&&(_=Nt,Nt=Pe,Pe=_);var ie=Hf(U,Pe),ae=Hf(U,Nt);if(ie&&ae&&(me.rangeCount!==1||me.anchorNode!==ie.node||me.anchorOffset!==ie.offset||me.focusNode!==ae.node||me.focusOffset!==ae.offset)){var oe=Se.createRange();oe.setStart(ie.node,ie.offset),me.removeAllRanges(),Pe>Nt?(me.addRange(oe),me.extend(ae.node,ae.offset)):(oe.setEnd(ae.node,ae.offset),me.addRange(oe))}}}}for(Se=[],me=U;me=me.parentNode;)me.nodeType===1&&Se.push({element:me,left:me.scrollLeft,top:me.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<Se.length;U++){var je=Se[U];je.element.scrollLeft=je.left,je.element.scrollTop=je.top}}lo=!!Lu,Mu=Lu=null}finally{yt=d,Q.p=i,V.T=r}}e.current=t,Wt=2}}function im(){if(Wt===2){Wt=0;var e=ar,t=vs,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=V.T,V.T=null;var i=Q.p;Q.p=2;var d=yt;yt|=4;try{Lp(e,t.alternate,t)}finally{yt=d,Q.p=i,V.T=r}}Wt=3}}function lm(){if(Wt===4||Wt===3){Wt=0,Te();var e=ar,t=vs,r=Oa,i=Yp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Wt=5:(Wt=0,vs=ar=null,om(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(nr=null),Zt(r),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(et,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=V.T,d=Q.p,Q.p=2,V.T=null;try{for(var h=e.onRecoverableError,_=0;_<i.length;_++){var U=i[_];h(U.value,{componentStack:U.stack})}}finally{V.T=t,Q.p=d}}(Oa&3)!==0&&Zl(),fa(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===ju?vi++:(vi=0,ju=e):vi=0,yi(0)}}function om(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Js(t)))}function Zl(){return sm(),im(),lm(),cm()}function cm(){if(Wt!==5)return!1;var e=ar,t=bu;bu=0;var r=Zt(Oa),i=V.T,d=Q.p;try{Q.p=32>r?32:r,V.T=null,r=xu,xu=null;var h=ar,_=Oa;if(Wt=0,vs=ar=null,Oa=0,(yt&6)!==0)throw Error(o(331));var U=yt;if(yt|=4,Gp(h.current),$p(h,h.current,_,r),yt=U,yi(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(et,h)}catch{}return!0}finally{Q.p=d,V.T=i,om(e,t)}}function um(e,t,r){t=Yn(r,t),t=Wc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(Ge(e,2),fa(e))}function xt(e,t,r){if(e.tag===3)um(e,e,r);else for(;t!==null;){if(t.tag===3){um(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(nr===null||!nr.has(i))){e=Yn(r,e),r=dp(2),i=Ka(t,r,2),i!==null&&(fp(r,i,t,e),Ge(i,2),fa(i));break}}t=t.return}}function Nu(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new cx;var d=new Set;i.set(t,d)}else d=i.get(t),d===void 0&&(d=new Set,i.set(t,d));d.has(r)||(gu=!0,d.add(r),e=px.bind(null,e,t,r),t.then(e,e))}function px(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Ct===e&&(ct&r)===r&&(Pt===4||Pt===3&&(ct&62914560)===ct&&300>Ee()-Hl?(yt&2)===0&&ys(e,0):vu|=r,gs===ct&&(gs=0)),fa(e)}function dm(e,t){t===0&&(t=Xt()),e=Er(e,t),e!==null&&(Ge(e,t),fa(e))}function mx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),dm(e,r)}function gx(e,t){var r=0;switch(e.tag){case 31:case 13:var i=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),dm(e,r)}function vx(e,t){return xe(e,t)}var Kl=null,xs=null,Cu=!1,Ql=!1,Tu=!1,sr=0;function fa(e){e!==xs&&e.next===null&&(xs===null?Kl=xs=e:xs=xs.next=e),Ql=!0,Cu||(Cu=!0,bx())}function yi(e,t){if(!Tu&&Ql){Tu=!0;do for(var r=!1,i=Kl;i!==null;){if(e!==0){var d=i.pendingLanes;if(d===0)var h=0;else{var _=i.suspendedLanes,U=i.pingedLanes;h=(1<<31-Oe(42|e)+1)-1,h&=d&~(_&~U),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(r=!0,mm(i,h))}else h=ct,h=zt(i,i===Ct?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(h&3)===0||Qe(i,h)||(r=!0,mm(i,h));i=i.next}while(r);Tu=!1}}function yx(){fm()}function fm(){Ql=Cu=!1;var e=0;sr!==0&&kx()&&(e=sr);for(var t=Ee(),r=null,i=Kl;i!==null;){var d=i.next,h=hm(i,t);h===0?(i.next=null,r===null?Kl=d:r.next=d,d===null&&(xs=r)):(r=i,(e!==0||(h&3)!==0)&&(Ql=!0)),i=d}Wt!==0&&Wt!==5||yi(e),sr!==0&&(sr=0)}function hm(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,d=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var _=31-Oe(h),U=1<<_,te=d[_];te===-1?((U&r)===0||(U&i)!==0)&&(d[_]=He(U,t)):te<=t&&(e.expiredLanes|=U),h&=~U}if(t=Ct,r=ct,r=zt(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,r===0||e===t&&(bt===2||bt===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&ge(i),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Qe(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(i!==null&&ge(i),Zt(r)){case 2:case 8:r=qe;break;case 32:r=fe;break;case 268435456:r=$e;break;default:r=fe}return i=pm.bind(null,e),r=xe(r,i),e.callbackPriority=t,e.callbackNode=r,t}return i!==null&&i!==null&&ge(i),e.callbackPriority=2,e.callbackNode=null,2}function pm(e,t){if(Wt!==0&&Wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Zl()&&e.callbackNode!==r)return null;var i=ct;return i=zt(e,e===Ct?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Zp(e,i,t),hm(e,Ee()),e.callbackNode!=null&&e.callbackNode===r?pm.bind(null,e):null)}function mm(e,t){if(Zl())return null;Zp(e,t,!0)}function bx(){Ox(function(){(yt&6)!==0?xe(ke,yx):fm()})}function _u(){if(sr===0){var e=ss;e===0&&(e=dt,dt<<=1,(dt&261888)===0&&(dt=256)),sr=e}return sr}function gm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Lt(""+e)}function vm(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function xx(e,t,r,i,d){if(t==="submit"&&r&&r.stateNode===d){var h=gm((d[Qt]||null).action),_=i.submitter;_&&(t=(t=_[Qt]||null)?gm(t.formAction):_.getAttribute("formAction"),t!==null&&(h=t,_=null));var U=new cl("action","action",null,i,d);e.push({event:U,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(sr!==0){var te=_?vm(d,_):new FormData(d);Yc(r,{pending:!0,data:te,method:d.method,action:h},null,te)}}else typeof h=="function"&&(U.preventDefault(),te=_?vm(d,_):new FormData(d),Yc(r,{pending:!0,data:te,method:d.method,action:h},h,te))},currentTarget:d}]})}}for(var Eu=0;Eu<uc.length;Eu++){var ku=uc[Eu],jx=ku.toLowerCase(),Sx=ku[0].toUpperCase()+ku.slice(1);aa(jx,"on"+Sx)}aa(Xf,"onAnimationEnd"),aa(Zf,"onAnimationIteration"),aa(Kf,"onAnimationStart"),aa("dblclick","onDoubleClick"),aa("focusin","onFocus"),aa("focusout","onBlur"),aa(Bb,"onTransitionRun"),aa(Ib,"onTransitionStart"),aa(Pb,"onTransitionCancel"),aa(Qf,"onTransitionEnd"),Fn("onMouseEnter",["mouseout","mouseover"]),Fn("onMouseLeave",["mouseout","mouseover"]),Fn("onPointerEnter",["pointerout","pointerover"]),Fn("onPointerLeave",["pointerout","pointerover"]),kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bi="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(" "),wx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bi));function ym(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],d=i.event;i=i.listeners;e:{var h=void 0;if(t)for(var _=i.length-1;0<=_;_--){var U=i[_],te=U.instance,ue=U.currentTarget;if(U=U.listener,te!==h&&d.isPropagationStopped())break e;h=U,d.currentTarget=ue;try{h(d)}catch(be){fl(be)}d.currentTarget=null,h=te}else for(_=0;_<i.length;_++){if(U=i[_],te=U.instance,ue=U.currentTarget,U=U.listener,te!==h&&d.isPropagationStopped())break e;h=U,d.currentTarget=ue;try{h(d)}catch(be){fl(be)}d.currentTarget=null,h=te}}}}function lt(e,t){var r=t[Ua];r===void 0&&(r=t[Ua]=new Set);var i=e+"__bubble";r.has(i)||(bm(t,e,2,!1),r.add(i))}function Au(e,t,r){var i=0;t&&(i|=4),bm(r,e,i,t)}var Jl="_reactListening"+Math.random().toString(36).slice(2);function Ou(e){if(!e[Jl]){e[Jl]=!0,xr.forEach(function(r){r!=="selectionchange"&&(wx.has(r)||Au(r,!1,e),Au(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jl]||(t[Jl]=!0,Au("selectionchange",!1,t))}}function bm(e,t,r,i){switch(Xm(t)){case 2:var d=Qx;break;case 8:d=Jx;break;default:d=Vu}r=d.bind(null,t,r,e),d=void 0,!Qo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),i?d!==void 0?e.addEventListener(t,r,{capture:!0,passive:d}):e.addEventListener(t,r,!0):d!==void 0?e.addEventListener(t,r,{passive:d}):e.addEventListener(t,r,!1)}function Ru(e,t,r,i,d){var h=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var _=i.tag;if(_===3||_===4){var U=i.stateNode.containerInfo;if(U===d)break;if(_===4)for(_=i.return;_!==null;){var te=_.tag;if((te===3||te===4)&&_.stateNode.containerInfo===d)return;_=_.return}for(;U!==null;){if(_=tn(U),_===null)return;if(te=_.tag,te===5||te===6||te===26||te===27){i=h=_;continue e}U=U.parentNode}}i=i.return}On(function(){var ue=h,be=$s(r),Se=[];e:{var de=Jf.get(e);if(de!==void 0){var me=cl,De=e;switch(e){case"keypress":if(ll(r)===0)break e;case"keydown":case"keyup":me=gb;break;case"focusin":De="focus",me=tc;break;case"focusout":De="blur",me=tc;break;case"beforeblur":case"afterblur":me=tc;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=_f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=rb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=bb;break;case Xf:case Zf:case Kf:me=lb;break;case Qf:me=jb;break;case"scroll":case"scrollend":me=nb;break;case"wheel":me=wb;break;case"copy":case"cut":case"paste":me=cb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=kf;break;case"toggle":case"beforetoggle":me=Cb}var Pe=(t&4)!==0,Nt=!Pe&&(e==="scroll"||e==="scrollend"),ie=Pe?de!==null?de+"Capture":null:de;Pe=[];for(var ae=ue,oe;ae!==null;){var je=ae;if(oe=je.stateNode,je=je.tag,je!==5&&je!==26&&je!==27||oe===null||ie===null||(je=Nr(ae,ie),je!=null&&Pe.push(xi(ae,je,oe))),Nt)break;ae=ae.return}0<Pe.length&&(de=new me(de,De,null,r,be),Se.push({event:de,listeners:Pe}))}}if((t&7)===0){e:{if(de=e==="mouseover"||e==="pointerover",me=e==="mouseout"||e==="pointerout",de&&r!==Ps&&(De=r.relatedTarget||r.fromElement)&&(tn(De)||De[Jt]))break e;if((me||de)&&(de=be.window===be?be:(de=be.ownerDocument)?de.defaultView||de.parentWindow:window,me?(De=r.relatedTarget||r.toElement,me=ue,De=De?tn(De):null,De!==null&&(Nt=u(De),Pe=De.tag,De!==Nt||Pe!==5&&Pe!==27&&Pe!==6)&&(De=null)):(me=null,De=ue),me!==De)){if(Pe=_f,je="onMouseLeave",ie="onMouseEnter",ae="mouse",(e==="pointerout"||e==="pointerover")&&(Pe=kf,je="onPointerLeave",ie="onPointerEnter",ae="pointer"),Nt=me==null?de:ga(me),oe=De==null?de:ga(De),de=new Pe(je,ae+"leave",me,r,be),de.target=Nt,de.relatedTarget=oe,je=null,tn(be)===ue&&(Pe=new Pe(ie,ae+"enter",De,r,be),Pe.target=oe,Pe.relatedTarget=Nt,je=Pe),Nt=je,me&&De)t:{for(Pe=Nx,ie=me,ae=De,oe=0,je=ie;je;je=Pe(je))oe++;je=0;for(var Be=ae;Be;Be=Pe(Be))je++;for(;0<oe-je;)ie=Pe(ie),oe--;for(;0<je-oe;)ae=Pe(ae),je--;for(;oe--;){if(ie===ae||ae!==null&&ie===ae.alternate){Pe=ie;break t}ie=Pe(ie),ae=Pe(ae)}Pe=null}else Pe=null;me!==null&&xm(Se,de,me,Pe,!1),De!==null&&Nt!==null&&xm(Se,Nt,De,Pe,!0)}}e:{if(de=ue?ga(ue):window,me=de.nodeName&&de.nodeName.toLowerCase(),me==="select"||me==="input"&&de.type==="file")var gt=zf;else if(Mf(de))if(Bf)gt=Mb;else{gt=Db;var Me=Rb}else me=de.nodeName,!me||me.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ue&&Ke(ue.elementType)&&(gt=zf):gt=Lb;if(gt&&(gt=gt(e,ue))){Uf(Se,gt,r,be);break e}Me&&Me(e,de,ue),e==="focusout"&&ue&&de.type==="number"&&ue.memoizedProps.value!=null&&wr(de,"number",de.value)}switch(Me=ue?ga(ue):window,e){case"focusin":(Mf(Me)||Me.contentEditable==="true")&&(Qr=Me,lc=ue,Zs=null);break;case"focusout":Zs=lc=Qr=null;break;case"mousedown":oc=!0;break;case"contextmenu":case"mouseup":case"dragend":oc=!1,Vf(Se,r,be);break;case"selectionchange":if(zb)break;case"keydown":case"keyup":Vf(Se,r,be)}var We;if(ac)e:{switch(e){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else Kr?Df(e,r)&&(ut="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ut="onCompositionStart");ut&&(Af&&r.locale!=="ko"&&(Kr||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Kr&&(We=Cf()):(Ha=be,Jo="value"in Ha?Ha.value:Ha.textContent,Kr=!0)),Me=Wl(ue,ut),0<Me.length&&(ut=new Ef(ut,e,null,r,be),Se.push({event:ut,listeners:Me}),We?ut.data=We:(We=Lf(r),We!==null&&(ut.data=We)))),(We=_b?Eb(e,r):kb(e,r))&&(ut=Wl(ue,"onBeforeInput"),0<ut.length&&(Me=new Ef("onBeforeInput","beforeinput",null,r,be),Se.push({event:Me,listeners:ut}),Me.data=We)),xx(Se,e,ue,r,be)}ym(Se,t)})}function xi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Wl(e,t){for(var r=t+"Capture",i=[];e!==null;){var d=e,h=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=Nr(e,r),d!=null&&i.unshift(xi(e,d,h)),d=Nr(e,t),d!=null&&i.push(xi(e,d,h))),e.tag===3)return i;e=e.return}return[]}function Nx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xm(e,t,r,i,d){for(var h=t._reactName,_=[];r!==null&&r!==i;){var U=r,te=U.alternate,ue=U.stateNode;if(U=U.tag,te!==null&&te===i)break;U!==5&&U!==26&&U!==27||ue===null||(te=ue,d?(ue=Nr(r,h),ue!=null&&_.unshift(xi(r,ue,te))):d||(ue=Nr(r,h),ue!=null&&_.push(xi(r,ue,te)))),r=r.return}_.length!==0&&e.push({event:t,listeners:_})}var Cx=/\r\n?/g,Tx=/\u0000|\uFFFD/g;function jm(e){return(typeof e=="string"?e:""+e).replace(Cx,`
9
- `).replace(Tx,"")}function Sm(e,t){return t=jm(t),jm(e)===t}function wt(e,t,r,i,d,h){switch(r){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Pa(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Pa(e,""+i);break;case"className":Ba(e,"class",i);break;case"tabIndex":Ba(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ba(e,r,i);break;case"style":Re(e,i,h);break;case"data":if(t!=="object"){Ba(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Lt(""+i),e.setAttribute(r,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(r==="formAction"?(t!=="input"&&wt(e,t,"name",d.name,d,null),wt(e,t,"formEncType",d.formEncType,d,null),wt(e,t,"formMethod",d.formMethod,d,null),wt(e,t,"formTarget",d.formTarget,d,null)):(wt(e,t,"encType",d.encType,d,null),wt(e,t,"method",d.method,d,null),wt(e,t,"target",d.target,d,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Lt(""+i),e.setAttribute(r,i);break;case"onClick":i!=null&&(e.onclick=un);break;case"onScroll":i!=null&&lt("scroll",e);break;case"onScrollEnd":i!=null&&lt("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}r=Lt(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""+i):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":i===!0?e.setAttribute(r,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,i):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(r,i):e.removeAttribute(r);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(r):e.setAttribute(r,i);break;case"popover":lt("beforetoggle",e),lt("toggle",e),za(e,"popover",i);break;case"xlinkActuate":mn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":mn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":mn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":mn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":mn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":mn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":mn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":mn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":mn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":za(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=kt.get(r)||r,za(e,r,i))}}function Du(e,t,r,i,d,h){switch(r){case"style":Re(e,i,h);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof i=="string"?Pa(e,i):(typeof i=="number"||typeof i=="bigint")&&Pa(e,""+i);break;case"onScroll":i!=null&&lt("scroll",e);break;case"onScrollEnd":i!=null&&lt("scrollend",e);break;case"onClick":i!=null&&(e.onclick=un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jr.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),t=r.slice(2,d?r.length-7:void 0),h=e[Qt]||null,h=h!=null?h[r]:null,typeof h=="function"&&e.removeEventListener(t,h,d),typeof i=="function")){typeof h!="function"&&h!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,i,d);break e}r in e?e[r]=i:i===!0?e.setAttribute(r,""):za(e,r,i)}}}function sn(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",e),lt("load",e);var i=!1,d=!1,h;for(h in r)if(r.hasOwnProperty(h)){var _=r[h];if(_!=null)switch(h){case"src":i=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:wt(e,t,h,_,r,null)}}d&&wt(e,t,"srcSet",r.srcSet,r,null),i&&wt(e,t,"src",r.src,r,null);return;case"input":lt("invalid",e);var U=h=_=d=null,te=null,ue=null;for(i in r)if(r.hasOwnProperty(i)){var be=r[i];if(be!=null)switch(i){case"name":d=be;break;case"type":_=be;break;case"checked":te=be;break;case"defaultChecked":ue=be;break;case"value":h=be;break;case"defaultValue":U=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(o(137,t));break;default:wt(e,t,i,be,r,null)}}sl(e,h,U,te,ue,_,d,!1);return;case"select":lt("invalid",e),i=_=h=null;for(d in r)if(r.hasOwnProperty(d)&&(U=r[d],U!=null))switch(d){case"value":h=U;break;case"defaultValue":_=U;break;case"multiple":i=U;default:wt(e,t,d,U,r,null)}t=h,r=_,e.multiple=!!i,t!=null?Ia(e,!!i,t,!1):r!=null&&Ia(e,!!i,r,!0);return;case"textarea":lt("invalid",e),h=d=i=null;for(_ in r)if(r.hasOwnProperty(_)&&(U=r[_],U!=null))switch(_){case"value":i=U;break;case"defaultValue":d=U;break;case"children":h=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:wt(e,t,_,U,r,null)}Is(e,i,d,h);return;case"option":for(te in r)r.hasOwnProperty(te)&&(i=r[te],i!=null)&&(te==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":wt(e,t,te,i,r,null));return;case"dialog":lt("beforetoggle",e),lt("toggle",e),lt("cancel",e),lt("close",e);break;case"iframe":case"object":lt("load",e);break;case"video":case"audio":for(i=0;i<bi.length;i++)lt(bi[i],e);break;case"image":lt("error",e),lt("load",e);break;case"details":lt("toggle",e);break;case"embed":case"source":case"link":lt("error",e),lt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in r)if(r.hasOwnProperty(ue)&&(i=r[ue],i!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:wt(e,t,ue,i,r,null)}return;default:if(Ke(t)){for(be in r)r.hasOwnProperty(be)&&(i=r[be],i!==void 0&&Du(e,t,be,i,r,void 0));return}}for(U in r)r.hasOwnProperty(U)&&(i=r[U],i!=null&&wt(e,t,U,i,r,null))}function _x(e,t,r,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,_=null,U=null,te=null,ue=null,be=null;for(me in r){var Se=r[me];if(r.hasOwnProperty(me)&&Se!=null)switch(me){case"checked":break;case"value":break;case"defaultValue":te=Se;default:i.hasOwnProperty(me)||wt(e,t,me,null,i,Se)}}for(var de in i){var me=i[de];if(Se=r[de],i.hasOwnProperty(de)&&(me!=null||Se!=null))switch(de){case"type":h=me;break;case"name":d=me;break;case"checked":ue=me;break;case"defaultChecked":be=me;break;case"value":_=me;break;case"defaultValue":U=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(o(137,t));break;default:me!==Se&&wt(e,t,de,me,i,Se)}}zs(e,_,U,te,ue,be,h,d);return;case"select":me=_=U=de=null;for(h in r)if(te=r[h],r.hasOwnProperty(h)&&te!=null)switch(h){case"value":break;case"multiple":me=te;default:i.hasOwnProperty(h)||wt(e,t,h,null,i,te)}for(d in i)if(h=i[d],te=r[d],i.hasOwnProperty(d)&&(h!=null||te!=null))switch(d){case"value":de=h;break;case"defaultValue":U=h;break;case"multiple":_=h;default:h!==te&&wt(e,t,d,h,i,te)}t=U,r=_,i=me,de!=null?Ia(e,!!r,de,!1):!!i!=!!r&&(t!=null?Ia(e,!!r,t,!0):Ia(e,!!r,r?[]:"",!1));return;case"textarea":me=de=null;for(U in r)if(d=r[U],r.hasOwnProperty(U)&&d!=null&&!i.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:wt(e,t,U,null,i,d)}for(_ in i)if(d=i[_],h=r[_],i.hasOwnProperty(_)&&(d!=null||h!=null))switch(_){case"value":de=d;break;case"defaultValue":me=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==h&&wt(e,t,_,d,i,h)}Bs(e,de,me);return;case"option":for(var De in r)de=r[De],r.hasOwnProperty(De)&&de!=null&&!i.hasOwnProperty(De)&&(De==="selected"?e.selected=!1:wt(e,t,De,null,i,de));for(te in i)de=i[te],me=r[te],i.hasOwnProperty(te)&&de!==me&&(de!=null||me!=null)&&(te==="selected"?e.selected=de&&typeof de!="function"&&typeof de!="symbol":wt(e,t,te,de,i,me));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Pe in r)de=r[Pe],r.hasOwnProperty(Pe)&&de!=null&&!i.hasOwnProperty(Pe)&&wt(e,t,Pe,null,i,de);for(ue in i)if(de=i[ue],me=r[ue],i.hasOwnProperty(ue)&&de!==me&&(de!=null||me!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:wt(e,t,ue,de,i,me)}return;default:if(Ke(t)){for(var Nt in r)de=r[Nt],r.hasOwnProperty(Nt)&&de!==void 0&&!i.hasOwnProperty(Nt)&&Du(e,t,Nt,void 0,i,de);for(be in i)de=i[be],me=r[be],!i.hasOwnProperty(be)||de===me||de===void 0&&me===void 0||Du(e,t,be,de,i,me);return}}for(var ie in r)de=r[ie],r.hasOwnProperty(ie)&&de!=null&&!i.hasOwnProperty(ie)&&wt(e,t,ie,null,i,de);for(Se in i)de=i[Se],me=r[Se],!i.hasOwnProperty(Se)||de===me||de==null&&me==null||wt(e,t,Se,de,i,me)}function wm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ex(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),i=0;i<r.length;i++){var d=r[i],h=d.transferSize,_=d.initiatorType,U=d.duration;if(h&&U&&wm(_)){for(_=0,U=d.responseEnd,i+=1;i<r.length;i++){var te=r[i],ue=te.startTime;if(ue>U)break;var be=te.transferSize,Se=te.initiatorType;be&&wm(Se)&&(te=te.responseEnd,_+=be*(te<U?1:(U-ue)/(te-ue)))}if(--i,t+=8*(h+_)/(d.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Lu=null,Mu=null;function eo(e){return e.nodeType===9?e:e.ownerDocument}function Nm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Uu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zu=null;function kx(){var e=window.event;return e&&e.type==="popstate"?e===zu?!1:(zu=e,!0):(zu=null,!1)}var Tm=typeof setTimeout=="function"?setTimeout:void 0,Ax=typeof clearTimeout=="function"?clearTimeout:void 0,_m=typeof Promise=="function"?Promise:void 0,Ox=typeof queueMicrotask=="function"?queueMicrotask:typeof _m<"u"?function(e){return _m.resolve(null).then(e).catch(Rx)}:Tm;function Rx(e){setTimeout(function(){throw e})}function ir(e){return e==="head"}function Em(e,t){var r=t,i=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(i===0){e.removeChild(d),Ns(t);return}i--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")i++;else if(r==="html")ji(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,ji(r);for(var h=r.firstChild;h;){var _=h.nextSibling,U=h.nodeName;h[En]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&h.rel.toLowerCase()==="stylesheet"||r.removeChild(h),h=_}}else r==="body"&&ji(e.ownerDocument.body);r=d}while(r);Ns(t)}function km(e,t){var r=e;e=0;do{var i=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=i}while(r)}function Bu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Bu(r),bn(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Dx(e,t,r,i){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[En])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Jn(e.nextSibling),e===null)break}return null}function Lx(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Jn(e.nextSibling),e===null))return null;return e}function Am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jn(e.nextSibling),e===null))return null;return e}function Iu(e){return e.data==="$?"||e.data==="$~"}function Pu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Mx(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var i=function(){t(),r.removeEventListener("DOMContentLoaded",i)};r.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Jn(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var $u=null;function Om(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Jn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function Rm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function Dm(e,t,r){switch(t=eo(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ji(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bn(e)}var Wn=new Map,Lm=new Set;function to(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ra=Q.d;Q.d={f:Ux,r:zx,D:Bx,C:Ix,L:Px,m:$x,X:Hx,S:qx,M:Gx};function Ux(){var e=Ra.f(),t=Vl();return e||t}function zx(e){var t=Gn(e);t!==null&&t.tag===5&&t.type==="form"?Qh(t):Ra.r(e)}var js=typeof document>"u"?null:document;function Mm(e,t,r){var i=js;if(i&&typeof t=="string"&&t){var d=xn(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),Lm.has(d)||(Lm.add(d),e={rel:e,crossOrigin:r,href:t},i.querySelector(d)===null&&(t=i.createElement("link"),sn(t,"link",e),_t(t),i.head.appendChild(t)))}}function Bx(e){Ra.D(e),Mm("dns-prefetch",e,null)}function Ix(e,t){Ra.C(e,t),Mm("preconnect",e,t)}function Px(e,t,r){Ra.L(e,t,r);var i=js;if(i&&e&&t){var d='link[rel="preload"][as="'+xn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+xn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+xn(r.imageSizes)+'"]')):d+='[href="'+xn(e)+'"]';var h=d;switch(t){case"style":h=Ss(e);break;case"script":h=ws(e)}Wn.has(h)||(e=y({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Wn.set(h,e),i.querySelector(d)!==null||t==="style"&&i.querySelector(Si(h))||t==="script"&&i.querySelector(wi(h))||(t=i.createElement("link"),sn(t,"link",e),_t(t),i.head.appendChild(t)))}}function $x(e,t){Ra.m(e,t);var r=js;if(r&&e){var i=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+xn(i)+'"][href="'+xn(e)+'"]',h=d;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=ws(e)}if(!Wn.has(h)&&(e=y({rel:"modulepreload",href:e},t),Wn.set(h,e),r.querySelector(d)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(wi(h)))return}i=r.createElement("link"),sn(i,"link",e),_t(i),r.head.appendChild(i)}}}function qx(e,t,r){Ra.S(e,t,r);var i=js;if(i&&e){var d=ot(i).hoistableStyles,h=Ss(e);t=t||"default";var _=d.get(h);if(!_){var U={loading:0,preload:null};if(_=i.querySelector(Si(h)))U.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Wn.get(h))&&qu(e,r);var te=_=i.createElement("link");_t(te),sn(te,"link",e),te._p=new Promise(function(ue,be){te.onload=ue,te.onerror=be}),te.addEventListener("load",function(){U.loading|=1}),te.addEventListener("error",function(){U.loading|=2}),U.loading|=4,no(_,t,i)}_={type:"stylesheet",instance:_,count:1,state:U},d.set(h,_)}}}function Hx(e,t){Ra.X(e,t);var r=js;if(r&&e){var i=ot(r).hoistableScripts,d=ws(e),h=i.get(d);h||(h=r.querySelector(wi(d)),h||(e=y({src:e,async:!0},t),(t=Wn.get(d))&&Hu(e,t),h=r.createElement("script"),_t(h),sn(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(d,h))}}function Gx(e,t){Ra.M(e,t);var r=js;if(r&&e){var i=ot(r).hoistableScripts,d=ws(e),h=i.get(d);h||(h=r.querySelector(wi(d)),h||(e=y({src:e,async:!0,type:"module"},t),(t=Wn.get(d))&&Hu(e,t),h=r.createElement("script"),_t(h),sn(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(d,h))}}function Um(e,t,r,i){var d=(d=he.current)?to(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Ss(r.href),r=ot(d).hoistableStyles,i=r.get(t),i||(i={type:"style",instance:null,count:0,state:null},r.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Ss(r.href);var h=ot(d).hoistableStyles,_=h.get(e);if(_||(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,_),(h=d.querySelector(Si(e)))&&!h._p&&(_.instance=h,_.state.loading=5),Wn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Wn.set(e,r),h||Fx(d,e,r,_.state))),t&&i===null)throw Error(o(528,""));return _}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ws(r),r=ot(d).hoistableScripts,i=r.get(t),i||(i={type:"script",instance:null,count:0,state:null},r.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ss(e){return'href="'+xn(e)+'"'}function Si(e){return'link[rel="stylesheet"]['+e+"]"}function zm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Fx(e,t,r,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),sn(t,"link",r),_t(t),e.head.appendChild(t))}function ws(e){return'[src="'+xn(e)+'"]'}function wi(e){return"script[async]"+e}function Bm(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+xn(r.href)+'"]');if(i)return t.instance=i,_t(i),i;var d=y({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),_t(i),sn(i,"style",d),no(i,r.precedence,e),t.instance=i;case"stylesheet":d=Ss(r.href);var h=e.querySelector(Si(d));if(h)return t.state.loading|=4,t.instance=h,_t(h),h;i=zm(r),(d=Wn.get(d))&&qu(i,d),h=(e.ownerDocument||e).createElement("link"),_t(h);var _=h;return _._p=new Promise(function(U,te){_.onload=U,_.onerror=te}),sn(h,"link",i),t.state.loading|=4,no(h,r.precedence,e),t.instance=h;case"script":return h=ws(r.src),(d=e.querySelector(wi(h)))?(t.instance=d,_t(d),d):(i=r,(d=Wn.get(h))&&(i=y({},r),Hu(i,d)),e=e.ownerDocument||e,d=e.createElement("script"),_t(d),sn(d,"link",i),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,no(i,r.precedence,e));return t.instance}function no(e,t,r){for(var i=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=i.length?i[i.length-1]:null,h=d,_=0;_<i.length;_++){var U=i[_];if(U.dataset.precedence===t)h=U;else if(h!==d)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function qu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Hu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ao=null;function Im(e,t,r){if(ao===null){var i=new Map,d=ao=new Map;d.set(r,i)}else d=ao,i=d.get(r),i||(i=new Map,d.set(r,i));if(i.has(e))return i;for(i.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var h=r[d];if(!(h[En]||h[jt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var _=h.getAttribute(t)||"";_=e+_;var U=i.get(_);U?U.push(h):i.set(_,[h])}}return i}function Pm(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function Vx(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function $m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Yx(e,t,r,i){if(r.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=Ss(i.href),h=t.querySelector(Si(d));if(h){t=h._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ro.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=h,_t(h);return}h=t.ownerDocument||t,i=zm(i),(d=Wn.get(d))&&qu(i,d),h=h.createElement("link"),_t(h);var _=h;_._p=new Promise(function(U,te){_.onload=U,_.onerror=te}),sn(h,"link",i),r.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=ro.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Gu=0;function Xx(e,t){return e.stylesheets&&e.count===0&&io(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var i=setTimeout(function(){if(e.stylesheets&&io(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+t);0<e.imgBytes&&Gu===0&&(Gu=62500*Ex());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&io(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>Gu?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(d)}}:null}function ro(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)io(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var so=null;function io(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,so=new Map,t.forEach(Zx,e),so=null,ro.call(e))}function Zx(e,t){if(!(t.state.loading&4)){var r=so.get(e);if(r)var i=r.get(null);else{r=new Map,so.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var _=d[h];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(r.set(_.dataset.precedence,_),i=_)}i&&r.set(null,i)}d=t.instance,_=d.getAttribute("data-precedence"),h=r.get(_)||i,h===i&&r.set(null,d),r.set(_,d),this.count++,i=ro.bind(this),d.addEventListener("load",i),d.addEventListener("error",i),h?h.parentNode.insertBefore(d,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var Ni={$$typeof:O,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Kx(e,t,r,i,d,h,_,U,te){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=tt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tt(0),this.hiddenUpdates=tt(null),this.identifierPrefix=i,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function qm(e,t,r,i,d,h,_,U,te,ue,be,Se){return e=new Kx(e,t,r,_,te,ue,be,Se,U),t=1,h===!0&&(t|=24),h=Dn(3,null,null,t),e.current=h,h.stateNode=e,t=wc(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:i,isDehydrated:r,cache:t},_c(h),e}function Hm(e){return e?(e=es,e):es}function Gm(e,t,r,i,d,h){d=Hm(d),i.context===null?i.context=d:i.pendingContext=d,i=Za(t),i.payload={element:r},h=h===void 0?null:h,h!==null&&(i.callback=h),r=Ka(e,i,t),r!==null&&(_n(r,e,t),ni(r,e,t))}function Fm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Fu(e,t){Fm(e,t),(e=e.alternate)&&Fm(e,t)}function Vm(e){if(e.tag===13||e.tag===31){var t=Er(e,67108864);t!==null&&_n(t,e,67108864),Fu(e,67108864)}}function Ym(e){if(e.tag===13||e.tag===31){var t=Bn();t=Bt(t);var r=Er(e,t);r!==null&&_n(r,e,t),Fu(e,t)}}var lo=!0;function Qx(e,t,r,i){var d=V.T;V.T=null;var h=Q.p;try{Q.p=2,Vu(e,t,r,i)}finally{Q.p=h,V.T=d}}function Jx(e,t,r,i){var d=V.T;V.T=null;var h=Q.p;try{Q.p=8,Vu(e,t,r,i)}finally{Q.p=h,V.T=d}}function Vu(e,t,r,i){if(lo){var d=Yu(i);if(d===null)Ru(e,t,i,oo,r),Zm(e,i);else if(e0(d,e,t,r,i))i.stopPropagation();else if(Zm(e,i),t&4&&-1<Wx.indexOf(e)){for(;d!==null;){var h=Gn(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var _=mt(h.pendingLanes);if(_!==0){var U=h;for(U.pendingLanes|=2,U.entangledLanes|=2;_;){var te=1<<31-Oe(_);U.entanglements[1]|=te,_&=~te}fa(h),(yt&6)===0&&(Gl=Ee()+500,yi(0))}}break;case 31:case 13:U=Er(h,2),U!==null&&_n(U,h,2),Vl(),Fu(h,2)}if(h=Yu(i),h===null&&Ru(e,t,i,oo,r),h===d)break;d=h}d!==null&&i.stopPropagation()}else Ru(e,t,i,null,r)}}function Yu(e){return e=$s(e),Xu(e)}var oo=null;function Xu(e){if(oo=null,e=tn(e),e!==null){var t=u(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===31){if(e=p(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return oo=e,null}function Xm(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(we()){case ke:return 2;case qe:return 8;case fe:case ze:return 32;case $e:return 268435456;default:return 32}default:return 32}}var Zu=!1,lr=null,or=null,cr=null,Ci=new Map,Ti=new Map,ur=[],Wx="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".split(" ");function Zm(e,t){switch(e){case"focusin":case"focusout":lr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":Ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ti.delete(t.pointerId)}}function _i(e,t,r,i,d,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:h,targetContainers:[d]},t!==null&&(t=Gn(t),t!==null&&Vm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function e0(e,t,r,i,d){switch(t){case"focusin":return lr=_i(lr,e,t,r,i,d),!0;case"dragenter":return or=_i(or,e,t,r,i,d),!0;case"mouseover":return cr=_i(cr,e,t,r,i,d),!0;case"pointerover":var h=d.pointerId;return Ci.set(h,_i(Ci.get(h)||null,e,t,r,i,d)),!0;case"gotpointercapture":return h=d.pointerId,Ti.set(h,_i(Ti.get(h)||null,e,t,r,i,d)),!0}return!1}function Km(e){var t=tn(e.target);if(t!==null){var r=u(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,ln(e.priority,function(){Ym(r)});return}}else if(t===31){if(t=p(r),t!==null){e.blockedOn=t,ln(e.priority,function(){Ym(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function co(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Yu(e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Ps=i,r.target.dispatchEvent(i),Ps=null}else return t=Gn(r),t!==null&&Vm(t),e.blockedOn=r,!1;t.shift()}return!0}function Qm(e,t,r){co(e)&&r.delete(t)}function t0(){Zu=!1,lr!==null&&co(lr)&&(lr=null),or!==null&&co(or)&&(or=null),cr!==null&&co(cr)&&(cr=null),Ci.forEach(Qm),Ti.forEach(Qm)}function uo(e,t){e.blockedOn===t&&(e.blockedOn=null,Zu||(Zu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,t0)))}var fo=null;function Jm(e){fo!==e&&(fo=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){fo===e&&(fo=null);for(var t=0;t<e.length;t+=3){var r=e[t],i=e[t+1],d=e[t+2];if(typeof i!="function"){if(Xu(i||r)===null)continue;break}var h=Gn(r);h!==null&&(e.splice(t,3),t-=3,Yc(h,{pending:!0,data:d,method:r.method,action:i},i,d))}}))}function Ns(e){function t(te){return uo(te,e)}lr!==null&&uo(lr,e),or!==null&&uo(or,e),cr!==null&&uo(cr,e),Ci.forEach(t),Ti.forEach(t);for(var r=0;r<ur.length;r++){var i=ur[r];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ur.length&&(r=ur[0],r.blockedOn===null);)Km(r),r.blockedOn===null&&ur.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(i=0;i<r.length;i+=3){var d=r[i],h=r[i+1],_=d[Qt]||null;if(typeof h=="function")_||Jm(r);else if(_){var U=null;if(h&&h.hasAttribute("formAction")){if(d=h,_=h[Qt]||null)U=_.formAction;else if(Xu(d)!==null)continue}else U=_.action;typeof U=="function"?r[i+1]=U:(r.splice(i,3),i-=3),Jm(r)}}}function Wm(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(_){return d=_})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),i||setTimeout(r,20)}function r(){if(!i&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Ku(e){this._internalRoot=e}ho.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,i=Bn();Gm(r,i,e,t,null,null)},ho.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gm(e.current,2,null,e,null,null),Vl(),t[Jt]=null}};function ho(e){this._internalRoot=e}ho.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ma();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ur.length&&t!==0&&t<ur[r].priority;r++);ur.splice(r,0,e),r===0&&Km(e)}};var eg=s.version;if(eg!=="19.2.8")throw Error(o(527,eg,"19.2.8"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var n0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!po.isDisabled&&po.supportsFiber)try{et=po.inject(n0),ht=po}catch{}}return ki.createRoot=function(e,t){if(!c(e))throw Error(o(299));var r=!1,i="",d=lp,h=op,_=cp;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(_=t.onRecoverableError)),t=qm(e,1,!1,null,null,r,i,null,d,h,_,Wm),e[Jt]=t.current,Ou(e),new Ku(t)},ki.hydrateRoot=function(e,t,r){if(!c(e))throw Error(o(299));var i=!1,d="",h=lp,_=op,U=cp,te=null;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(_=r.onCaughtError),r.onRecoverableError!==void 0&&(U=r.onRecoverableError),r.formState!==void 0&&(te=r.formState)),t=qm(e,1,!0,t,r??null,i,d,te,h,_,U,Wm),t.context=Hm(null),r=t.current,i=Bn(),i=Bt(i),d=Za(i),d.callback=null,Ka(r,d,i),r=i,t.current.lanes=r,Ge(t,r),fa(t),e[Jt]=t.current,Ou(e),new ho(t)},ki.version="19.2.8",ki}var ug;function f0(){if(ug)return Wu.exports;ug=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),Wu.exports=d0(),Wu.exports}var h0=f0();const dg={"Invalid JSON. Check the file and try again.":"รูปแบบ JSON ไม่ถูกต้อง ตรวจไฟล์แล้วลองนำเข้าอีกครั้ง","A JSON test step could not be read. Give it a description or use a Scout step.":"อ่านขั้นตอนใน JSON ไม่สำเร็จ ใส่คำอธิบายขั้นตอนหรือใช้ขั้นตอนที่ส่งออกจาก Scout","Open page":"เปิดหน้าเว็บ","Fill field":"กรอกข้อมูล","Click button":"กดปุ่ม","Check page text":"ตรวจข้อความบนหน้า","Manual note":"บันทึกช่วยจำ","Step description":"คำอธิบายขั้นตอน","Field name on the page":"ชื่อช่องกรอกบนหน้าเว็บ","Button name on the page":"ชื่อปุ่มบนหน้าเว็บ","Fill with":"ใช้ข้อมูลจาก","Text I enter":"ข้อความที่ระบุเอง","Value to enter":"ค่าที่จะกรอก","Text that must appear":"ข้อความที่ต้องเห็น","Next action":"ขั้นตอนที่จะเพิ่ม","Project username":"ชื่อผู้ใช้ของโปรเจกต์","Project password":"รหัสผ่านของโปรเจกต์","Project email":"อีเมลของโปรเจกต์","Move up":"เลื่อนขึ้น","Move down":"เลื่อนลง","Edit steps":"แก้ไขขั้นตอน","Run log":"บันทึกการรัน","Page URL":"URL ของหน้าเว็บ","Add an action or a check to run this case.":"เพิ่มขั้นตอนหรือเงื่อนไขตรวจสอบเพื่อรันเคสนี้","Case details and tags":"รายละเอียดเคสและแท็ก","Enter a title and a unique case ID.":"กรอกชื่อเคสและรหัสเคสที่ไม่ซ้ำ","Enter a valid page URL.":"กรอก URL ของหน้าเว็บให้ถูกต้อง","Complete the control name or expected text in each step.":"กรอกชื่อปุ่ม ชื่อช่องกรอก หรือข้อความที่ต้องเห็นให้ครบ","Back to Test Cases":"กลับไปหน้าเคสทดสอบ","Selected cases":"เคสที่เลือก","Review selected cases":"เปิดเคสที่เลือกในหน้ารัน","Open this case in the runner":"เปิดเคสนี้ในหน้ารัน","Save and open runner":"บันทึกและเปิดหน้ารัน","Run this case":"รันเฉพาะเคสนี้","Could not load saved code.":"โหลดโค้ดที่บันทึกไว้ไม่สำเร็จ","Could not save the code. Please try again.":"บันทึกโค้ดไม่สำเร็จ ลองกดบันทึกอีกครั้ง","Loading saved code…":"กำลังโหลดโค้ดที่บันทึกไว้…",Retry:"ลองอีกครั้ง","Export Cypress code to run it with Cypress.":"กดบันทึกไฟล์เพื่อนำโค้ดไปรันด้วย Cypress","Could not load OCR. Check the connection and try again, or enter the text manually.":"โหลดเครื่องมืออ่านข้อความไม่สำเร็จ ตรวจการเชื่อมต่อแล้วลองอีกครั้ง หรือพิมพ์ข้อความจากภาพเองได้","OCR failed. Try a clearer image or enter the text manually.":"อ่านภาพไม่สำเร็จ ลองใช้ภาพที่ชัดขึ้น หรือพิมพ์ข้อความจากภาพเองได้","could not open the page — navigation failed":"เปิดหน้าเว็บเป้าหมายไม่สำเร็จ","could not connect — connection refused":"เว็บไซต์เป้าหมายปฏิเสธการเชื่อมต่อ ตรวจว่าเว็บเปิดอยู่และใช้พอร์ตถูกต้อง","could not resolve domain name — check the URL":"ค้นหาชื่อโดเมนไม่พบ ตรวจ URL ของเว็บไซต์เป้าหมาย","the SSL certificate of the website is invalid":"ใบรับรองความปลอดภัยของเว็บไซต์เป้าหมายไม่ถูกต้อง","could not open the page — timeout":"หมดเวลารอหน้าเว็บเป้าหมาย","could not connect — connection timeout":"หมดเวลารอเชื่อมต่อเว็บไซต์เป้าหมาย","could not open the page — page crash":"หน้าเว็บเป้าหมายหยุดทำงานขณะเปิด","could not open the page — navigation aborted":"การเปิดหน้าเว็บเป้าหมายถูกยกเลิก","Could not reach the LazyScout API.":"เชื่อมต่อ LazyScout บนเครื่องนี้ไม่ได้","Check that LazyScout is running on this device, then try again.":"ตรวจว่าเปิด LazyScout อยู่บนเครื่องนี้ แล้วลองอีกครั้ง","Check that the URL is correct and the website is available.":"ตรวจ URL และลองเปิดเว็บไซต์เป้าหมายในเบราว์เซอร์อีกครั้ง","Install a local Ollama text model, then check the connection again.":"ยังไม่มีโมเดล Ollama ที่ใช้ในเครื่องได้ ให้ติดตั้งโมเดลสร้างข้อความ แล้วกดทดสอบการเชื่อมต่ออีกครั้ง","The selected model does not support text generation.":"โมเดลที่เลือกสร้างข้อความไม่ได้ เลือกโมเดลสำหรับแชตแล้วทดสอบการเชื่อมต่ออีกครั้ง","Select an installed Ollama model that runs locally.":"เลือกโมเดล Ollama ที่ติดตั้งและทำงานบนเครื่องนี้ แล้วลองอีกครั้ง","The AI provider could not be reached or returned an unreadable response.":"ติดต่อผู้ให้บริการ AI ไม่ได้หรืออ่านคำตอบไม่ได้ ตรวจว่าเปิดบริการแล้วและ URL ถูกต้อง จากนั้นลองอีกครั้ง","The AI provider is temporarily unavailable.":"บริการ AI ไม่พร้อมใช้งานชั่วคราว กรุณาลองอีกครั้งภายหลัง","The AI provider rate limit was reached.":"ใช้บริการ AI ถึงขีดจำกัดแล้ว รอสักครู่หรือตรวจโควตาของบัญชีก่อนลองอีกครั้ง","This model requires available credits or billing.":"โมเดลนี้ต้องใช้เครดิต ตรวจยอดเครดิตและการเรียกเก็บเงินของบัญชี หรือเลือกโมเดลอื่น","The AI provider did not respond in time.":"หมดเวลารอคำตอบจากผู้ให้บริการ AI ตรวจการเชื่อมต่อแล้วลองอีกครั้ง","The AI provider timed out.":"ผู้ให้บริการ AI ตอบกลับไม่ทันเวลา กรุณาลองอีกครั้ง","The model or endpoint was not found.":"ไม่พบโมเดลหรือปลายทางที่ระบุ ตรวจ URL และเลือกโมเดลที่ติดตั้งอยู่ แล้วลองอีกครั้ง","The AI provider returned invalid JSON.":"ผู้ให้บริการตอบกลับในรูปแบบที่อ่านไม่ได้ ตรวจว่า URL เป็นปลายทาง API ของผู้ให้บริการที่เลือก","The provider did not return a model list.":"คำตอบจากผู้ให้บริการไม่มีรายการโมเดล ตรวจ URL ของ API แล้วลองอีกครั้ง","The AI provider refused authentication.":"ผู้ให้บริการยืนยันตัวตนไม่สำเร็จ ตรวจคีย์ API ของบัญชีแล้วลองอีกครั้ง","Access denied. Check whether this account can access the requested endpoint or model.":"บัญชีนี้ไม่มีสิทธิ์เข้าถึง ตรวจสิทธิ์ของบัญชีสำหรับ API หรือโมเดลที่เลือก","Cannot reach LazyScout. Check that it is running on this device, then try again.":"เชื่อมต่อ LazyScout บนเครื่องนี้ไม่ได้ ตรวจว่าโปรแกรมยังเปิดอยู่ แล้วลองอีกครั้ง","Enter the provider API key in AI Scout or configure it on the server.":"กรอกคีย์ API ใน AI Scout หรือตั้งค่าคีย์บนเซิร์ฟเวอร์ แล้วลองอีกครั้ง","The API key for this project and provider has expired or is unavailable.":"คีย์ที่บันทึกไว้ในโปรเจกต์นี้หมดอายุหรือใช้งานไม่ได้ กรอกคีย์อีกครั้ง","Use a loopback address for the local model server.":"กรอก URL ของบริการในเครื่อง เช่น http://localhost:11434 สำหรับ Ollama","Enter a valid API key without spaces.":"กรอกคีย์ API ที่ถูกต้องโดยไม่เว้นวรรค","Enter a valid provider base URL.":"กรอก URL ของบริการ AI ให้ถูกต้อง","The rule-based plan is ready to review.":"ระบบใช้กฎบนเครื่องสร้างแผนแทนแล้ว ตรวจแผนก่อนเริ่มทดสอบ","The AI provider could not finish the plan.":"ผู้ให้บริการ AI สร้างแผนไม่สำเร็จ","Codex is unavailable. Install or update Codex CLI, then try again.":"ติดต่อ Codex บนเครื่องนี้ไม่ได้ ติดตั้งหรืออัปเดต Codex CLI แล้วลองเชื่อมต่ออีกครั้ง","Connect your ChatGPT account before loading Codex models.":"ลงชื่อเข้าใช้ ChatGPT ผ่าน Codex ก่อนโหลดโมเดล","Codex returned no available models. Check your ChatGPT account and refresh the model list.":"บัญชี ChatGPT นี้ยังไม่มีโมเดลให้เลือก ตรวจบัญชีแล้วโหลดรายการโมเดลอีกครั้ง","Codex did not return its model list.":"Codex ไม่ได้ส่งรายการโมเดลกลับมา ลองโหลดรายการอีกครั้ง","Could not load models from Codex.":"โหลดรายการโมเดลจาก Codex ไม่สำเร็จ ลองอีกครั้ง","The sign-in code expired. Start a new attempt.":"รหัสลงชื่อเข้าใช้หมดอายุ กดเชื่อมต่ออีกครั้งเพื่อขอรหัสใหม่","ChatGPT sign-in did not finish. Start a new attempt.":"การลงชื่อเข้าใช้ ChatGPT ยังไม่สำเร็จ กรุณาเริ่มใหม่","Codex did not respond in time.":"Codex ตอบกลับไม่ทันเวลา ลองอีกครั้ง","The AI provider returned an empty response.":"ผู้ให้บริการ AI ส่งคำตอบว่างกลับมา กรุณาลองอีกครั้ง","The AI answer did not match the required JSON structure.":"คำตอบของ AI มีรูปแบบไม่ตรงกับที่ต้องใช้ ลองอีกครั้งหรือเลือกโมเดลอื่น","The AI provider returned no complete answer.":"AI ตอบกลับมาไม่ครบ ลองอีกครั้งหรือเลือกโมเดลอื่น","The AI provider returned an invalid result.":"อ่านผลลัพธ์จาก AI ไม่ได้ ลองอีกครั้งหรือเลือกโมเดลอื่น","OpenRouter Free accepts openrouter/free or a model ending in :free.":"เลือก openrouter/free หรือโมเดลที่ลงท้ายด้วย :free สำหรับ OpenRouter Free","LazyScout version":"เวอร์ชัน LazyScout","Choose your LazyScout version":"เลือกเวอร์ชัน LazyScout","Check again":"ตรวจสอบอีกครั้ง",Unavailable:"ไม่มีข้อมูล","Update available":"มีรุ่นใหม่","Up to date":"เป็นรุ่นล่าสุดแล้ว",Copied:"คัดลอกแล้ว","Copy command":"คัดลอกคำสั่ง",Current:"รุ่นปัจจุบัน","Installing…":"กำลังติดตั้ง…","Published on npm":"เผยแพร่บน npm","Could not check npm versions.":"ตรวจสอบเวอร์ชันบน npm ไม่สำเร็จ","Could not install this version.":"ติดตั้งเวอร์ชันนี้ไม่สำเร็จ","Visual check":"เทียบภาพ","Compare text, colors and layout with the image":"เปรียบเทียบข้อความ สี และการจัดวางกับภาพอ้างอิง","Text check":"ตรวจข้อความ","Create steps for text read from the image":"สร้างขั้นตอนตรวจสอบจากข้อความที่อ่านได้ในภาพ","Manual checklist":"รายการตรวจด้วยตนเอง","Create a checklist for a Tester to review":"สร้างรายการให้ผู้ทดสอบตรวจทีละข้อ","Ready to read the image.":"พร้อมอ่านข้อความจากภาพ","Reading Thai and English from the image…":"กำลังอ่านข้อความภาษาไทยและอังกฤษจากภาพ…","Reading complete. Review and edit the text before creating Test Cases.":"อ่านเสร็จแล้ว ตรวจและแก้ไขข้อความก่อนสร้างเคส","OCR failed.":"อ่านข้อความจากภาพไม่สำเร็จ",page:"หน้าเว็บ",dialog:"กล่องโต้ตอบ",tab:"แท็บ",accordion:"ส่วนพับได้",dropdown:"รายการแบบเลื่อนลง",drawer:"แผงเลื่อน",popover:"กล่องข้อมูลลอย",loading:"กำลังโหลด",success:"สำเร็จ",error:"ข้อผิดพลาด",unknown:"ไม่ทราบ",navigate:"เปิดหน้า",click:"คลิก",fill:"กรอกข้อมูล",select:"เลือก",check:"เลือกช่องทำเครื่องหมาย",wait:"รอ",assert:"ตรวจเงื่อนไข",assertText:"ตรวจข้อความ",assertUrl:"ตรวจ URL",assertVisible:"ตรวจว่ามองเห็น",assertInvalid:"ตรวจค่าที่ไม่ถูกต้อง",assertValidation:"ตรวจการแจ้งเตือนในฟอร์ม",openModal:"เปิดหน้าต่างโต้ตอบ",closeDialog:"ปิดกล่องโต้ตอบ",selectTab:"เลือกแท็บ",expandAccordion:"ขยายส่วนที่พับไว้",openDropdown:"เปิดรายการแบบเลื่อนลง",openDrawer:"เปิดแผงเลื่อน",expandMenu:"ขยายเมนู",breadcrumb:"ลิงก์ลำดับหน้า",pagination:"เปลี่ยนหน้า",other:"อื่น ๆ","Could not check the sign-in. Start again.":"ตรวจสอบการเข้าสู่ระบบไม่สำเร็จ กรุณาลองอีกครั้ง","The key could not be saved. This connection is available in the current tab.":"บันทึกคีย์ไม่สำเร็จ ใช้การเชื่อมต่อนี้ต่อได้ในแท็บปัจจุบัน","Could not remove the saved key.":"ล้างคีย์ที่บันทึกไว้ไม่สำเร็จ","Signed out of Codex on this device.":"ออกจากบัญชี Codex บนเครื่องนี้แล้ว","Code copied":"คัดลอกรหัสแล้ว","Select and copy the code above.":"เลือกและคัดลอกรหัสที่แสดงด้านบน","Could not connect.":"เชื่อมต่อไม่สำเร็จ","UI Coverage":"ความครอบคลุมของหน้าเว็บ","Playwright Automation":"สคริปต์ Playwright","Cypress Automation":"สคริปต์ Cypress","Bug Report Draft":"ร่างรายงานปัญหา","Recorded Test Execution":"ผลการทดสอบที่บันทึกไว้","Test Summary":"สรุปการทดสอบ",Summary:"สรุป","Coverage Gaps":"ส่วนที่ยังไม่ได้ทดสอบ","Execution Results":"ผลการทดสอบ","Free on this device":"ใช้ฟรีบนเครื่องนี้","Cloud with a free tier":"บริการคลาวด์ที่มีโควตาฟรี","Cloud · billing depends on your plan":"บริการคลาวด์ · คิดค่าบริการตามแพ็กเกจ","Other endpoints":"บริการอื่น","No AI / rules":"ใช้กฎบนเครื่อง (ไม่ใช้ AI)","ChatGPT / Codex (sign in)":"ChatGPT / Codex (ลงชื่อเข้าใช้)","Refresh Codex models":"โหลดรายการโมเดล Codex ใหม่","Test connection & load models":"ทดสอบการเชื่อมต่อและโหลดโมเดล",passed:"ผ่าน",failed:"ไม่ผ่าน",pending:"รอทดสอบ",queued:"อยู่ในคิว",completed:"เสร็จสิ้น",cancelled:"ยกเลิกแล้ว",stopped:"หยุดแล้ว",none:"ไม่มี",", not the whole HTML tag.":"โดยไม่ต้องใส่แท็ก HTML ทั้งบรรทัด",". Do not put real credentials in Value.":"และเว้นข้อมูลลับจริงออกจากช่องค่า",". If it is a named button, choose":"หากเป็นปุ่มที่มีชื่อ ให้เลือก","… and":"… และอีก","· Limit:":"· จำกัด","· Scope:":"· ขอบเขต","· Start:":"· จุดเริ่มต้น","›_ CLI Terminal":"›_ เทอร์มินัล CLI","(no title)":"(ไม่มีชื่อ)","/50 saved":"/50 ภาพที่บันทึก","+ Add Bug Report":"+ เพิ่มรายงานปัญหา","+ Add Row":"+ เพิ่มแถว","+ Add step":"+ เพิ่มขั้นตอน","+ Add Step":"+ เพิ่มขั้นตอน","+ New Flow":"+ สร้างชุดขั้นตอน","▶ Run again":"▶ รันอีกครั้ง","▶ Start Load Test":"▶ เริ่มทดสอบโหลด","◉ Event Stream":"◉ เหตุการณ์","○ Recorder idle":"○ พร้อมบันทึก","◎ Pick from page":"◎ เลือกจากหน้าเว็บ","● Recording":"● กำลังบันทึก","1 visual comparison case":"1 เคสสำหรับเปรียบเทียบภาพ","1. Open…\n2. Click…\n3. Observe…":`1. เปิด…
8
+ `+i.stack}}var ne=Object.prototype.hasOwnProperty,xe=a.unstable_scheduleCallback,ge=a.unstable_cancelCallback,se=a.unstable_shouldYield,Te=a.unstable_requestPaint,Ee=a.unstable_now,we=a.unstable_getCurrentPriorityLevel,ke=a.unstable_ImmediatePriority,qe=a.unstable_UserBlockingPriority,fe=a.unstable_NormalPriority,ze=a.unstable_LowPriority,$e=a.unstable_IdlePriority,Ve=a.log,rt=a.unstable_setDisableYieldValue,tt=null,ft=null;function pt(e){if(typeof Ve=="function"&&rt(e),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(tt,e)}catch{}}var Re=Math.clz32?Math.clz32:Ke,kt=Math.log,_t=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(kt(e)/_t|0)|0}var ut=256,st=262144,Ut=4194304;function mt(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function zt(e,t,r){var i=e.pendingLanes;if(i===0)return 0;var d=0,h=e.suspendedLanes,_=e.pingedLanes;e=e.warmLanes;var U=i&134217727;return U!==0?(i=U&~h,i!==0?d=mt(i):(_&=U,_!==0?d=mt(_):r||(r=U&~e,r!==0&&(d=mt(r))))):(U=i&~h,U!==0?d=mt(U):_!==0?d=mt(_):r||(r=i&~e,r!==0&&(d=mt(r)))),d===0?0:t!==0&&t!==d&&(t&h)===0&&(h=d&-d,r=t&-t,h>=r||h===32&&(r&4194048)!==0)?t:d}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Yt(){var e=Ut;return Ut<<=1,(Ut&62914560)===0&&(Ut=4194304),e}function nt(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Fe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ie(e,t,r,i,d,h){var _=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var U=e.entanglements,te=e.expirationTimes,ue=e.hiddenUpdates;for(r=_&~r;0<r;){var be=31-Re(r),Se=1<<be;U[be]=0,te[be]=-1;var de=ue[be];if(de!==null)for(ue[be]=null,be=0;be<de.length;be++){var me=de[be];me!==null&&(me.lane&=-536870913)}r&=~Se}i!==0&&Ye(e,i,0),h!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=h&~(_&~t))}function Ye(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Re(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|r&261930}function In(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Re(r),d=1<<i;d&t|e[i]&t&&(e[i]|=t),r&=~d}}function Pn(e,t){var r=t&-t;return r=(r&42)!==0?1:Bt(r),(r&(e.suspendedLanes|t))!==0?0:r}function Bt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function za(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Xm(e.type))}function on(e,t){var r=Q.p;try{return Q.p=e,t()}finally{Q.p=r}}var Zt=Math.random().toString(36).slice(2),Et="__reactFiber$"+Zt,Kt="__reactProps$"+Zt,tn="__reactContainer$"+Zt,Ba="__reactEvents$"+Zt,cn="__reactListeners$"+Zt,$n="__reactHandles$"+Zt,pn="__reactResources$"+Zt,_n="__reactMarker$"+Zt;function bn(e){delete e[Et],delete e[Kt],delete e[Ba],delete e[cn],delete e[$n]}function nn(e){var t=e[Et];if(t)return t;for(var r=e.parentNode;r;){if(t=r[tn]||r[Et]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Rm(e);e!==null;){if(r=e[Et])return r;e=Rm(e)}return t}e=r,r=e.parentNode}return null}function qn(e){if(e=e[Et]||e[tn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function va(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ht(e){var t=e[pn];return t||(t=e[pn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ct(e){e[_n]=!0}var xr=new Set,jr={};function En(e,t){Hn(e,t),Hn(e+"Capture",t)}function Hn(e,t){for(jr[e]=t,e=0;e<t.length;e++)xr.add(t[e])}var Sr=RegExp("^[: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]*$"),kn={},ya={};function Us(e){return ne.call(ya,e)?!0:ne.call(kn,e)?!1:Sr.test(e)?ya[e]=!0:(kn[e]=!0,!1)}function Ia(e,t,r){if(Us(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function Pa(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function mn(e,t,r,i){if(i===null)e.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+i)}}function re(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qt(e,t,r){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,h=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(_){r=""+_,h.call(this,_)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return r},setValue:function(_){r=""+_},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lt(e){if(!e._valueTracker){var t=Ae(e)?"checked":"value";e._valueTracker=Qt(e,t,""+e[t])}}function Yr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ae(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Xr(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}}var Qo=/[\n"\\]/g;function xn(e){return e.replace(Qo,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zs(e,t,r,i,d,h,_,U){e.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.type=_:e.removeAttribute("type"),t!=null?_==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+re(t)):e.value!==""+re(t)&&(e.value=""+re(t)):_!=="submit"&&_!=="reset"||e.removeAttribute("value"),t!=null?Bs(e,_,re(t)):r!=null?Bs(e,_,re(r)):i!=null&&e.removeAttribute("value"),d==null&&h!=null&&(e.defaultChecked=!!h),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+re(U):e.removeAttribute("name")}function Zr(e,t,r,i,d,h,_,U){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||t!=null)){Lt(e);return}r=r!=null?""+re(r):"",t=t!=null?""+re(t):r,U||t===e.value||(e.value=t),e.defaultValue=t}i=i??d,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=U?e.checked:!!i,e.defaultChecked=!!i,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.name=_),Lt(e)}function Bs(e,t,r){t==="number"&&Xr(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function la(e,t,r,i){if(e=e.options,t){t={};for(var d=0;d<r.length;d++)t["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=t.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&i&&(e[r].defaultSelected=!0)}else{for(r=""+re(r),t=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,i&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function sl(e,t,r){if(t!=null&&(t=""+re(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+re(r):""}function Is(e,t,r,i){if(t==null){if(i!=null){if(r!=null)throw Error(o(92));if(K(i)){if(1<i.length)throw Error(o(93));i=i[0]}r=i}r==null&&(r=""),t=r}r=re(t),e.defaultValue=r,i=e.textContent,i===r&&i!==""&&i!==null&&(e.value=i),Lt(e)}function ba(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Jo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function il(e,t,r){var i=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,r):typeof r!="number"||r===0||Jo.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function ve(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var i in r)!r.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var d in t)i=t[d],t.hasOwnProperty(d)&&r[d]!==i&&il(e,d,i)}else for(var h in t)t.hasOwnProperty(h)&&il(e,h,t[h])}function Oe(e){if(e.indexOf("-")===-1)return!1;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 Xe=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),At=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Jt(e){return At.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function bt(){}var oa=null;function Ps(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $a=null,qa=null;function ca(e){var t=qn(e);if(t&&(e=t.stateNode)){var r=e[Kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(zs(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+xn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var d=i[Kt]||null;if(!d)throw Error(o(90));zs(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<r.length;t++)i=r[t],i.form===e.form&&Yr(i)}break e;case"textarea":sl(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&la(e,!!r.multiple,t,!1)}}}var wr=!1;function Nr(e,t,r){if(wr)return e(t,r);wr=!0;try{var i=e(t);return i}finally{if(wr=!1,($a!==null||qa!==null)&&(Yl(),$a&&(t=$a,e=qa,qa=$a=null,ca(t),e)))for(t=0;t<e.length;t++)ca(e[t])}}function un(e,t){var r=e.stateNode;if(r===null)return null;var i=r[Kt]||null;if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$s=!1;if(ea)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){$s=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{$s=!1}var Ha=null,Wo=null,ll=null;function Cf(){if(ll)return ll;var e,t=Wo,r=t.length,i,d="value"in Ha?Ha.value:Ha.textContent,h=d.length;for(e=0;e<r&&t[e]===d[e];e++);var _=r-e;for(i=1;i<=_&&t[r-i]===d[h-i];i++);return ll=d.slice(e,1<i?1-i:void 0)}function ol(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 cl(){return!0}function Tf(){return!1}function jn(e){function t(r,i,d,h,_){this._reactName=r,this._targetInst=d,this.type=i,this.nativeEvent=h,this.target=_,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(r=e[U],this[U]=r?r(h):h[U]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?cl:Tf,this.isPropagationStopped=Tf,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=cl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=cl)},persist:function(){},isPersistent:cl}),t}var Cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ul=jn(Cr),Hs=y({},Cr,{view:0,detail:0}),ab=jn(Hs),ec,tc,Gs,dl=y({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ac,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!==Gs&&(Gs&&e.type==="mousemove"?(ec=e.screenX-Gs.screenX,tc=e.screenY-Gs.screenY):tc=ec=0,Gs=e),ec)},movementY:function(e){return"movementY"in e?e.movementY:tc}}),_f=jn(dl),rb=y({},dl,{dataTransfer:0}),sb=jn(rb),ib=y({},Hs,{relatedTarget:0}),nc=jn(ib),lb=y({},Cr,{animationName:0,elapsedTime:0,pseudoElement:0}),ob=jn(lb),cb=y({},Cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ub=jn(cb),db=y({},Cr,{data:0}),Ef=jn(db),fb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hb={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"},pb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pb[e])?!!t[e]:!1}function ac(){return mb}var gb=y({},Hs,{key:function(e){if(e.key){var t=fb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ac,charCode:function(e){return e.type==="keypress"?ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vb=jn(gb),yb=y({},dl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kf=jn(yb),bb=y({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ac}),xb=jn(bb),jb=y({},Cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sb=jn(jb),wb=y({},dl,{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}),Nb=jn(wb),Cb=y({},Cr,{newState:0,oldState:0}),Tb=jn(Cb),_b=[9,13,27,32],rc=ea&&"CompositionEvent"in window,Fs=null;ea&&"documentMode"in document&&(Fs=document.documentMode);var Eb=ea&&"TextEvent"in window&&!Fs,Af=ea&&(!rc||Fs&&8<Fs&&11>=Fs),Of=" ",Rf=!1;function Df(e,t){switch(e){case"keyup":return _b.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kr=!1;function kb(e,t){switch(e){case"compositionend":return Lf(t);case"keypress":return t.which!==32?null:(Rf=!0,Of);case"textInput":return e=t.data,e===Of&&Rf?null:e;default:return null}}function Ab(e,t){if(Kr)return e==="compositionend"||!rc&&Df(e,t)?(e=Cf(),ll=Wo=Ha=null,Kr=!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 Af&&t.locale!=="ko"?null:t.data;default:return null}}var Ob={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 Mf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ob[e.type]:t==="textarea"}function Uf(e,t,r,i){$a?qa?qa.push(i):qa=[i]:$a=i,t=eo(t,"onChange"),0<t.length&&(r=new ul("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Vs=null,Ys=null;function Rb(e){ym(e,0)}function fl(e){var t=va(e);if(Yr(t))return e}function zf(e,t){if(e==="change")return t}var Bf=!1;if(ea){var sc;if(ea){var ic="oninput"in document;if(!ic){var If=document.createElement("div");If.setAttribute("oninput","return;"),ic=typeof If.oninput=="function"}sc=ic}else sc=!1;Bf=sc&&(!document.documentMode||9<document.documentMode)}function Pf(){Vs&&(Vs.detachEvent("onpropertychange",$f),Ys=Vs=null)}function $f(e){if(e.propertyName==="value"&&fl(Ys)){var t=[];Uf(t,Ys,e,Ps(e)),Nr(Rb,t)}}function Db(e,t,r){e==="focusin"?(Pf(),Vs=t,Ys=r,Vs.attachEvent("onpropertychange",$f)):e==="focusout"&&Pf()}function Lb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fl(Ys)}function Mb(e,t){if(e==="click")return fl(t)}function Ub(e,t){if(e==="input"||e==="change")return fl(t)}function zb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var An=typeof Object.is=="function"?Object.is:zb;function Xs(e,t){if(An(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var d=r[i];if(!ne.call(t,d)||!An(e[d],t[d]))return!1}return!0}function qf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hf(e,t){var r=qf(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qf(r)}}function Gf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ff(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xr(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Xr(e.document)}return t}function lc(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")}var Bb=ea&&"documentMode"in document&&11>=document.documentMode,Qr=null,oc=null,Zs=null,cc=!1;function Vf(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;cc||Qr==null||Qr!==Xr(i)||(i=Qr,"selectionStart"in i&&lc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Zs&&Xs(Zs,i)||(Zs=i,i=eo(oc,"onSelect"),0<i.length&&(t=new ul("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=Qr)))}function Tr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Jr={animationend:Tr("Animation","AnimationEnd"),animationiteration:Tr("Animation","AnimationIteration"),animationstart:Tr("Animation","AnimationStart"),transitionrun:Tr("Transition","TransitionRun"),transitionstart:Tr("Transition","TransitionStart"),transitioncancel:Tr("Transition","TransitionCancel"),transitionend:Tr("Transition","TransitionEnd")},uc={},Yf={};ea&&(Yf=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function _r(e){if(uc[e])return uc[e];if(!Jr[e])return e;var t=Jr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Yf)return uc[e]=t[r];return e}var Xf=_r("animationend"),Zf=_r("animationiteration"),Kf=_r("animationstart"),Ib=_r("transitionrun"),Pb=_r("transitionstart"),$b=_r("transitioncancel"),Qf=_r("transitionend"),Jf=new Map,dc="abort auxClick beforeToggle 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(" ");dc.push("scrollEnd");function ta(e,t){Jf.set(e,t),En(t,[e])}var hl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Gn=[],Wr=0,fc=0;function pl(){for(var e=Wr,t=fc=Wr=0;t<e;){var r=Gn[t];Gn[t++]=null;var i=Gn[t];Gn[t++]=null;var d=Gn[t];Gn[t++]=null;var h=Gn[t];if(Gn[t++]=null,i!==null&&d!==null){var _=i.pending;_===null?d.next=d:(d.next=_.next,_.next=d),i.pending=d}h!==0&&Wf(r,d,h)}}function ml(e,t,r,i){Gn[Wr++]=e,Gn[Wr++]=t,Gn[Wr++]=r,Gn[Wr++]=i,fc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function hc(e,t,r,i){return ml(e,t,r,i),gl(e)}function Er(e,t){return ml(e,null,null,t),gl(e)}function Wf(e,t,r){e.lanes|=r;var i=e.alternate;i!==null&&(i.lanes|=r);for(var d=!1,h=e.return;h!==null;)h.childLanes|=r,i=h.alternate,i!==null&&(i.childLanes|=r),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(d=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,d&&t!==null&&(d=31-Re(r),e=h.hiddenUpdates,i=e[d],i===null?e[d]=[t]:i.push(t),t.lane=r|536870912),h):null}function gl(e){if(50<vi)throw vi=0,Su=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var es={};function qb(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,r,i){return new qb(e,t,r,i)}function pc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xa(e,t){var r=e.alternate;return r===null?(r=On(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function eh(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vl(e,t,r,i,d,h){var _=0;if(i=e,typeof e=="function")pc(e)&&(_=1);else if(typeof e=="string")_=Yx(e,r,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=On(31,r,t,d),e.elementType=$,e.lanes=h,e;case N:return kr(r.children,d,h,t);case A:_=8,d|=24;break;case w:return e=On(12,r,t,d|2),e.elementType=w,e.lanes=h,e;case M:return e=On(13,r,t,d),e.elementType=M,e.lanes=h,e;case F:return e=On(19,r,t,d),e.elementType=F,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:_=10;break e;case j:_=9;break e;case O:_=11;break e;case X:_=14;break e;case Z:_=16,i=null;break e}_=29,r=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=On(_,r,t,d),t.elementType=e,t.type=i,t.lanes=h,t}function kr(e,t,r,i){return e=On(7,e,i,t),e.lanes=r,e}function mc(e,t,r){return e=On(6,e,null,t),e.lanes=r,e}function th(e){var t=On(18,null,null,0);return t.stateNode=e,t}function gc(e,t,r){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var nh=new WeakMap;function Fn(e,t){if(typeof e=="object"&&e!==null){var r=nh.get(e);return r!==void 0?r:(t={value:e,source:t,stack:P(t)},nh.set(e,t),t)}return{value:e,source:t,stack:P(t)}}var ts=[],ns=0,yl=null,Ks=0,Vn=[],Yn=0,Ga=null,ua=1,da="";function ja(e,t){ts[ns++]=Ks,ts[ns++]=yl,yl=e,Ks=t}function ah(e,t,r){Vn[Yn++]=ua,Vn[Yn++]=da,Vn[Yn++]=Ga,Ga=e;var i=ua;e=da;var d=32-Re(i)-1;i&=~(1<<d),r+=1;var h=32-Re(t)+d;if(30<h){var _=d-d%5;h=(i&(1<<_)-1).toString(32),i>>=_,d-=_,ua=1<<32-Re(t)+d|r<<d|i,da=h+e}else ua=1<<h|r<<d|i,da=e}function vc(e){e.return!==null&&(ja(e,1),ah(e,1,0))}function yc(e){for(;e===yl;)yl=ts[--ns],ts[ns]=null,Ks=ts[--ns],ts[ns]=null;for(;e===Ga;)Ga=Vn[--Yn],Vn[Yn]=null,da=Vn[--Yn],Vn[Yn]=null,ua=Vn[--Yn],Vn[Yn]=null}function rh(e,t){Vn[Yn++]=ua,Vn[Yn++]=da,Vn[Yn++]=Ga,ua=t.id,da=t.overflow,Ga=e}var an=null,Ot=null,dt=!1,Fa=null,Xn=!1,bc=Error(o(519));function Va(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qs(Fn(t,e)),bc}function sh(e){var t=e.stateNode,r=e.type,i=e.memoizedProps;switch(t[Et]=e,t[Kt]=i,r){case"dialog":lt("cancel",t),lt("close",t);break;case"iframe":case"object":case"embed":lt("load",t);break;case"video":case"audio":for(r=0;r<bi.length;r++)lt(bi[r],t);break;case"source":lt("error",t);break;case"img":case"image":case"link":lt("error",t),lt("load",t);break;case"details":lt("toggle",t);break;case"input":lt("invalid",t),Zr(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":lt("invalid",t);break;case"textarea":lt("invalid",t),Is(t,i.value,i.defaultValue,i.children)}r=i.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||i.suppressHydrationWarning===!0||Sm(t.textContent,r)?(i.popover!=null&&(lt("beforetoggle",t),lt("toggle",t)),i.onScroll!=null&&lt("scroll",t),i.onScrollEnd!=null&&lt("scrollend",t),i.onClick!=null&&(t.onclick=bt),t=!0):t=!1,t||Va(e,!0)}function ih(e){for(an=e.return;an;)switch(an.tag){case 5:case 31:case 13:Xn=!1;return;case 27:case 3:Xn=!0;return;default:an=an.return}}function as(e){if(e!==an)return!1;if(!dt)return ih(e),dt=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||zu(e.type,e.memoizedProps)),r=!r),r&&Ot&&Va(e),ih(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ot=Om(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ot=Om(e)}else t===27?(t=Ot,ir(e.type)?(e=qu,qu=null,Ot=e):Ot=t):Ot=an?Kn(e.stateNode.nextSibling):null;return!0}function Ar(){Ot=an=null,dt=!1}function xc(){var e=Fa;return e!==null&&(Cn===null?Cn=e:Cn.push.apply(Cn,e),Fa=null),e}function Qs(e){Fa===null?Fa=[e]:Fa.push(e)}var jc=x(null),Or=null,Sa=null;function Ya(e,t,r){q(jc,t._currentValue),t._currentValue=r}function wa(e){e._currentValue=jc.current,C(jc)}function Sc(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function wc(e,t,r,i){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var h=d.dependencies;if(h!==null){var _=d.child;h=h.firstContext;e:for(;h!==null;){var U=h;h=d;for(var te=0;te<t.length;te++)if(U.context===t[te]){h.lanes|=r,U=h.alternate,U!==null&&(U.lanes|=r),Sc(h.return,r,e),i||(_=null);break e}h=U.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error(o(341));_.lanes|=r,h=_.alternate,h!==null&&(h.lanes|=r),Sc(_,r,e),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===e){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function rs(e,t,r,i){e=null;for(var d=t,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error(o(387));if(_=_.memoizedProps,_!==null){var U=d.type;An(d.pendingProps.value,_.value)||(e!==null?e.push(U):e=[U])}}else if(d===_e.current){if(_=d.alternate,_===null)throw Error(o(387));_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Ni):e=[Ni])}d=d.return}e!==null&&wc(t,e,r,i),t.flags|=262144}function bl(e){for(e=e.firstContext;e!==null;){if(!An(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rr(e){Or=e,Sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rn(e){return lh(Or,e)}function xl(e,t){return Or===null&&Rr(e),lh(e,t)}function lh(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Sa===null){if(e===null)throw Error(o(308));Sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sa=Sa.next=t;return r}var Hb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Gb=a.unstable_scheduleCallback,Fb=a.unstable_NormalPriority,Ht={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nc(){return{controller:new Hb,data:new Map,refCount:0}}function Js(e){e.refCount--,e.refCount===0&&Gb(Fb,function(){e.controller.abort()})}var Ws=null,Cc=0,ss=0,is=null;function Vb(e,t){if(Ws===null){var r=Ws=[];Cc=0,ss=Eu(),is={status:"pending",value:void 0,then:function(i){r.push(i)}}}return Cc++,t.then(oh,oh),t}function oh(){if(--Cc===0&&Ws!==null){is!==null&&(is.status="fulfilled");var e=Ws;Ws=null,ss=0,is=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Yb(e,t){var r=[],i={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var d=0;d<r.length;d++)(0,r[d])(t)},function(d){for(i.status="rejected",i.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),i}var ch=V.S;V.S=function(e,t){Vp=Ee(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Vb(e,t),ch!==null&&ch(e,t)};var Dr=x(null);function Tc(){var e=Dr.current;return e!==null?e:Tt.pooledCache}function jl(e,t){t===null?q(Dr,Dr.current):q(Dr,t.pool)}function uh(){var e=Tc();return e===null?null:{parent:Ht._currentValue,pool:e}}var ls=Error(o(460)),_c=Error(o(474)),Sl=Error(o(542)),wl={then:function(){}};function dh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function fh(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(bt,bt),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ph(e),e;default:if(typeof t.status=="string")t.then(bt,bt);else{if(e=Tt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=i}},function(i){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ph(e),e}throw Mr=t,ls}}function Lr(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Mr=r,ls):r}}var Mr=null;function hh(){if(Mr===null)throw Error(o(459));var e=Mr;return Mr=null,e}function ph(e){if(e===ls||e===Sl)throw Error(o(483))}var os=null,ei=0;function Nl(e){var t=ei;return ei+=1,os===null&&(os=[]),fh(os,e,t)}function ti(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cl(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function mh(e){function t(ie,ae){if(e){var oe=ie.deletions;oe===null?(ie.deletions=[ae],ie.flags|=16):oe.push(ae)}}function r(ie,ae){if(!e)return null;for(;ae!==null;)t(ie,ae),ae=ae.sibling;return null}function i(ie){for(var ae=new Map;ie!==null;)ie.key!==null?ae.set(ie.key,ie):ae.set(ie.index,ie),ie=ie.sibling;return ae}function d(ie,ae){return ie=xa(ie,ae),ie.index=0,ie.sibling=null,ie}function h(ie,ae,oe){return ie.index=oe,e?(oe=ie.alternate,oe!==null?(oe=oe.index,oe<ae?(ie.flags|=67108866,ae):oe):(ie.flags|=67108866,ae)):(ie.flags|=1048576,ae)}function _(ie){return e&&ie.alternate===null&&(ie.flags|=67108866),ie}function U(ie,ae,oe,je){return ae===null||ae.tag!==6?(ae=mc(oe,ie.mode,je),ae.return=ie,ae):(ae=d(ae,oe),ae.return=ie,ae)}function te(ie,ae,oe,je){var Be=oe.type;return Be===N?be(ie,ae,oe.props.children,je,oe.key):ae!==null&&(ae.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Z&&Lr(Be)===ae.type)?(ae=d(ae,oe.props),ti(ae,oe),ae.return=ie,ae):(ae=vl(oe.type,oe.key,oe.props,null,ie.mode,je),ti(ae,oe),ae.return=ie,ae)}function ue(ie,ae,oe,je){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==oe.containerInfo||ae.stateNode.implementation!==oe.implementation?(ae=gc(oe,ie.mode,je),ae.return=ie,ae):(ae=d(ae,oe.children||[]),ae.return=ie,ae)}function be(ie,ae,oe,je,Be){return ae===null||ae.tag!==7?(ae=kr(oe,ie.mode,je,Be),ae.return=ie,ae):(ae=d(ae,oe),ae.return=ie,ae)}function Se(ie,ae,oe){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=mc(""+ae,ie.mode,oe),ae.return=ie,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return oe=vl(ae.type,ae.key,ae.props,null,ie.mode,oe),ti(oe,ae),oe.return=ie,oe;case E:return ae=gc(ae,ie.mode,oe),ae.return=ie,ae;case Z:return ae=Lr(ae),Se(ie,ae,oe)}if(K(ae)||z(ae))return ae=kr(ae,ie.mode,oe,null),ae.return=ie,ae;if(typeof ae.then=="function")return Se(ie,Nl(ae),oe);if(ae.$$typeof===R)return Se(ie,xl(ie,ae),oe);Cl(ie,ae)}return null}function de(ie,ae,oe,je){var Be=ae!==null?ae.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Be!==null?null:U(ie,ae,""+oe,je);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return oe.key===Be?te(ie,ae,oe,je):null;case E:return oe.key===Be?ue(ie,ae,oe,je):null;case Z:return oe=Lr(oe),de(ie,ae,oe,je)}if(K(oe)||z(oe))return Be!==null?null:be(ie,ae,oe,je,null);if(typeof oe.then=="function")return de(ie,ae,Nl(oe),je);if(oe.$$typeof===R)return de(ie,ae,xl(ie,oe),je);Cl(ie,oe)}return null}function me(ie,ae,oe,je,Be){if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return ie=ie.get(oe)||null,U(ae,ie,""+je,Be);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case b:return ie=ie.get(je.key===null?oe:je.key)||null,te(ae,ie,je,Be);case E:return ie=ie.get(je.key===null?oe:je.key)||null,ue(ae,ie,je,Be);case Z:return je=Lr(je),me(ie,ae,oe,je,Be)}if(K(je)||z(je))return ie=ie.get(oe)||null,be(ae,ie,je,Be,null);if(typeof je.then=="function")return me(ie,ae,oe,Nl(je),Be);if(je.$$typeof===R)return me(ie,ae,oe,xl(ae,je),Be);Cl(ae,je)}return null}function De(ie,ae,oe,je){for(var Be=null,gt=null,Ue=ae,et=ae=0,ct=null;Ue!==null&&et<oe.length;et++){Ue.index>et?(ct=Ue,Ue=null):ct=Ue.sibling;var vt=de(ie,Ue,oe[et],je);if(vt===null){Ue===null&&(Ue=ct);break}e&&Ue&&vt.alternate===null&&t(ie,Ue),ae=h(vt,ae,et),gt===null?Be=vt:gt.sibling=vt,gt=vt,Ue=ct}if(et===oe.length)return r(ie,Ue),dt&&ja(ie,et),Be;if(Ue===null){for(;et<oe.length;et++)Ue=Se(ie,oe[et],je),Ue!==null&&(ae=h(Ue,ae,et),gt===null?Be=Ue:gt.sibling=Ue,gt=Ue);return dt&&ja(ie,et),Be}for(Ue=i(Ue);et<oe.length;et++)ct=me(Ue,ie,et,oe[et],je),ct!==null&&(e&&ct.alternate!==null&&Ue.delete(ct.key===null?et:ct.key),ae=h(ct,ae,et),gt===null?Be=ct:gt.sibling=ct,gt=ct);return e&&Ue.forEach(function(dr){return t(ie,dr)}),dt&&ja(ie,et),Be}function Pe(ie,ae,oe,je){if(oe==null)throw Error(o(151));for(var Be=null,gt=null,Ue=ae,et=ae=0,ct=null,vt=oe.next();Ue!==null&&!vt.done;et++,vt=oe.next()){Ue.index>et?(ct=Ue,Ue=null):ct=Ue.sibling;var dr=de(ie,Ue,vt.value,je);if(dr===null){Ue===null&&(Ue=ct);break}e&&Ue&&dr.alternate===null&&t(ie,Ue),ae=h(dr,ae,et),gt===null?Be=dr:gt.sibling=dr,gt=dr,Ue=ct}if(vt.done)return r(ie,Ue),dt&&ja(ie,et),Be;if(Ue===null){for(;!vt.done;et++,vt=oe.next())vt=Se(ie,vt.value,je),vt!==null&&(ae=h(vt,ae,et),gt===null?Be=vt:gt.sibling=vt,gt=vt);return dt&&ja(ie,et),Be}for(Ue=i(Ue);!vt.done;et++,vt=oe.next())vt=me(Ue,ie,et,vt.value,je),vt!==null&&(e&&vt.alternate!==null&&Ue.delete(vt.key===null?et:vt.key),ae=h(vt,ae,et),gt===null?Be=vt:gt.sibling=vt,gt=vt);return e&&Ue.forEach(function(r0){return t(ie,r0)}),dt&&ja(ie,et),Be}function Nt(ie,ae,oe,je){if(typeof oe=="object"&&oe!==null&&oe.type===N&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:e:{for(var Be=oe.key;ae!==null;){if(ae.key===Be){if(Be=oe.type,Be===N){if(ae.tag===7){r(ie,ae.sibling),je=d(ae,oe.props.children),je.return=ie,ie=je;break e}}else if(ae.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Z&&Lr(Be)===ae.type){r(ie,ae.sibling),je=d(ae,oe.props),ti(je,oe),je.return=ie,ie=je;break e}r(ie,ae);break}else t(ie,ae);ae=ae.sibling}oe.type===N?(je=kr(oe.props.children,ie.mode,je,oe.key),je.return=ie,ie=je):(je=vl(oe.type,oe.key,oe.props,null,ie.mode,je),ti(je,oe),je.return=ie,ie=je)}return _(ie);case E:e:{for(Be=oe.key;ae!==null;){if(ae.key===Be)if(ae.tag===4&&ae.stateNode.containerInfo===oe.containerInfo&&ae.stateNode.implementation===oe.implementation){r(ie,ae.sibling),je=d(ae,oe.children||[]),je.return=ie,ie=je;break e}else{r(ie,ae);break}else t(ie,ae);ae=ae.sibling}je=gc(oe,ie.mode,je),je.return=ie,ie=je}return _(ie);case Z:return oe=Lr(oe),Nt(ie,ae,oe,je)}if(K(oe))return De(ie,ae,oe,je);if(z(oe)){if(Be=z(oe),typeof Be!="function")throw Error(o(150));return oe=Be.call(oe),Pe(ie,ae,oe,je)}if(typeof oe.then=="function")return Nt(ie,ae,Nl(oe),je);if(oe.$$typeof===R)return Nt(ie,ae,xl(ie,oe),je);Cl(ie,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,ae!==null&&ae.tag===6?(r(ie,ae.sibling),je=d(ae,oe),je.return=ie,ie=je):(r(ie,ae),je=mc(oe,ie.mode,je),je.return=ie,ie=je),_(ie)):r(ie,ae)}return function(ie,ae,oe,je){try{ei=0;var Be=Nt(ie,ae,oe,je);return os=null,Be}catch(Ue){if(Ue===ls||Ue===Sl)throw Ue;var gt=On(29,Ue,null,ie.mode);return gt.lanes=je,gt.return=ie,gt}}}var Ur=mh(!0),gh=mh(!1),Xa=!1;function Ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(yt&2)!==0){var d=i.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),i.pending=t,t=gl(e),Wf(e,null,r),t}return ml(e,i,t,r),gl(e)}function ni(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,In(e,r)}}function Ac(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var d=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var _={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};h===null?d=h=_:h=h.next=_,r=r.next}while(r!==null);h===null?d=h=t:h=h.next=t}else d=h=t;r={baseState:i.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:i.shared,callbacks:i.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Oc=!1;function ai(){if(Oc){var e=is;if(e!==null)throw e}}function ri(e,t,r,i){Oc=!1;var d=e.updateQueue;Xa=!1;var h=d.firstBaseUpdate,_=d.lastBaseUpdate,U=d.shared.pending;if(U!==null){d.shared.pending=null;var te=U,ue=te.next;te.next=null,_===null?h=ue:_.next=ue,_=te;var be=e.alternate;be!==null&&(be=be.updateQueue,U=be.lastBaseUpdate,U!==_&&(U===null?be.firstBaseUpdate=ue:U.next=ue,be.lastBaseUpdate=te))}if(h!==null){var Se=d.baseState;_=0,be=ue=te=null,U=h;do{var de=U.lane&-536870913,me=de!==U.lane;if(me?(ot&de)===de:(i&de)===de){de!==0&&de===ss&&(Oc=!0),be!==null&&(be=be.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var De=e,Pe=U;de=t;var Nt=r;switch(Pe.tag){case 1:if(De=Pe.payload,typeof De=="function"){Se=De.call(Nt,Se,de);break e}Se=De;break e;case 3:De.flags=De.flags&-65537|128;case 0:if(De=Pe.payload,de=typeof De=="function"?De.call(Nt,Se,de):De,de==null)break e;Se=y({},Se,de);break e;case 2:Xa=!0}}de=U.callback,de!==null&&(e.flags|=64,me&&(e.flags|=8192),me=d.callbacks,me===null?d.callbacks=[de]:me.push(de))}else me={lane:de,tag:U.tag,payload:U.payload,callback:U.callback,next:null},be===null?(ue=be=me,te=Se):be=be.next=me,_|=de;if(U=U.next,U===null){if(U=d.shared.pending,U===null)break;me=U,U=me.next,me.next=null,d.lastBaseUpdate=me,d.shared.pending=null}}while(!0);be===null&&(te=Se),d.baseState=te,d.firstBaseUpdate=ue,d.lastBaseUpdate=be,h===null&&(d.shared.lanes=0),tr|=_,e.lanes=_,e.memoizedState=Se}}function vh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function yh(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)vh(r[e],t)}var cs=x(null),Tl=x(0);function bh(e,t){e=Ra,q(Tl,e),q(cs,t),Ra=e|t.baseLanes}function Rc(){q(Tl,Ra),q(cs,cs.current)}function Dc(){Ra=Tl.current,C(cs),C(Tl)}var Rn=x(null),Zn=null;function Qa(e){var t=e.alternate;q($t,$t.current&1),q(Rn,e),Zn===null&&(t===null||cs.current!==null||t.memoizedState!==null)&&(Zn=e)}function Lc(e){q($t,$t.current),q(Rn,e),Zn===null&&(Zn=e)}function xh(e){e.tag===22?(q($t,$t.current),q(Rn,e),Zn===null&&(Zn=e)):Ja()}function Ja(){q($t,$t.current),q(Rn,Rn.current)}function Dn(e){C(Rn),Zn===e&&(Zn=null),C($t)}var $t=x(0);function _l(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Pu(r)||$u(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Na=0,We=null,St=null,Gt=null,El=!1,us=!1,zr=!1,kl=0,si=0,ds=null,Xb=0;function It(){throw Error(o(321))}function Mc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!An(e[r],t[r]))return!1;return!0}function Uc(e,t,r,i,d,h){return Na=h,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?ap:Qc,zr=!1,h=r(i,d),zr=!1,us&&(h=Sh(t,r,i,d)),jh(e),h}function jh(e){V.H=oi;var t=St!==null&&St.next!==null;if(Na=0,Gt=St=We=null,El=!1,si=0,ds=null,t)throw Error(o(300));e===null||Ft||(e=e.dependencies,e!==null&&bl(e)&&(Ft=!0))}function Sh(e,t,r,i){We=e;var d=0;do{if(us&&(ds=null),si=0,us=!1,25<=d)throw Error(o(301));if(d+=1,Gt=St=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}V.H=rp,h=t(r,i)}while(us);return h}function Zb(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?ii(t):t,e=e.useState()[0],(St!==null?St.memoizedState:null)!==e&&(We.flags|=1024),t}function zc(){var e=kl!==0;return kl=0,e}function Bc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Ic(e){if(El){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}El=!1}Na=0,Gt=St=We=null,us=!1,si=kl=0,ds=null}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?We.memoizedState=Gt=e:Gt=Gt.next=e,Gt}function qt(){if(St===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=St.next;var t=Gt===null?We.memoizedState:Gt.next;if(t!==null)Gt=t,St=e;else{if(e===null)throw We.alternate===null?Error(o(467)):Error(o(310));St=e,e={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Gt===null?We.memoizedState=Gt=e:Gt=Gt.next=e}return Gt}function Al(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ii(e){var t=si;return si+=1,ds===null&&(ds=[]),e=fh(ds,e,t),t=We,(Gt===null?t.memoizedState:Gt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?ap:Qc),e}function Ol(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ii(e);if(e.$$typeof===R)return rn(e)}throw Error(o(438,String(e)))}function Pc(e){var t=null,r=We.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var i=We.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Al(),We.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),i=0;i<e;i++)r[i]=B;return t.index++,r}function Ca(e,t){return typeof t=="function"?t(e):t}function Rl(e){var t=qt();return $c(t,St,e)}function $c(e,t,r){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=r;var d=e.baseQueue,h=i.pending;if(h!==null){if(d!==null){var _=d.next;d.next=h.next,h.next=_}t.baseQueue=d=h,i.pending=null}if(h=e.baseState,d===null)e.memoizedState=h;else{t=d.next;var U=_=null,te=null,ue=t,be=!1;do{var Se=ue.lane&-536870913;if(Se!==ue.lane?(ot&Se)===Se:(Na&Se)===Se){var de=ue.revertLane;if(de===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),Se===ss&&(be=!0);else if((Na&de)===de){ue=ue.next,de===ss&&(be=!0);continue}else Se={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},te===null?(U=te=Se,_=h):te=te.next=Se,We.lanes|=de,tr|=de;Se=ue.action,zr&&r(h,Se),h=ue.hasEagerState?ue.eagerState:r(h,Se)}else de={lane:Se,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},te===null?(U=te=de,_=h):te=te.next=de,We.lanes|=Se,tr|=Se;ue=ue.next}while(ue!==null&&ue!==t);if(te===null?_=h:te.next=U,!An(h,e.memoizedState)&&(Ft=!0,be&&(r=is,r!==null)))throw r;e.memoizedState=h,e.baseState=_,e.baseQueue=te,i.lastRenderedState=h}return d===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function qc(e){var t=qt(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var i=r.dispatch,d=r.pending,h=t.memoizedState;if(d!==null){r.pending=null;var _=d=d.next;do h=e(h,_.action),_=_.next;while(_!==d);An(h,t.memoizedState)||(Ft=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,i]}function wh(e,t,r){var i=We,d=qt(),h=dt;if(h){if(r===void 0)throw Error(o(407));r=r()}else r=t();var _=!An((St||d).memoizedState,r);if(_&&(d.memoizedState=r,Ft=!0),d=d.queue,Fc(Th.bind(null,i,d,e),[e]),d.getSnapshot!==t||_||Gt!==null&&Gt.memoizedState.tag&1){if(i.flags|=2048,fs(9,{destroy:void 0},Ch.bind(null,i,d,r,t),null),Tt===null)throw Error(o(349));h||(Na&127)!==0||Nh(i,t,r)}return r}function Nh(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=We.updateQueue,t===null?(t=Al(),We.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Ch(e,t,r,i){t.value=r,t.getSnapshot=i,_h(t)&&Eh(e)}function Th(e,t,r){return r(function(){_h(t)&&Eh(e)})}function _h(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!An(e,r)}catch{return!0}}function Eh(e){var t=Er(e,2);t!==null&&Tn(t,e,2)}function Hc(e){var t=gn();if(typeof e=="function"){var r=e;if(e=r(),zr){pt(!0);try{r()}finally{pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t}function kh(e,t,r,i){return e.baseState=r,$c(e,St,typeof i=="function"?i:Ca)}function Kb(e,t,r,i,d){if(Ml(e))throw Error(o(485));if(e=t.action,e!==null){var h={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){h.listeners.push(_)}};V.T!==null?r(!0):h.isTransition=!1,i(h),r=t.pending,r===null?(h.next=t.pending=h,Ah(t,h)):(h.next=r.next,t.pending=r.next=h)}}function Ah(e,t){var r=t.action,i=t.payload,d=e.state;if(t.isTransition){var h=V.T,_={};V.T=_;try{var U=r(d,i),te=V.S;te!==null&&te(_,U),Oh(e,t,U)}catch(ue){Gc(e,t,ue)}finally{h!==null&&_.types!==null&&(h.types=_.types),V.T=h}}else try{h=r(d,i),Oh(e,t,h)}catch(ue){Gc(e,t,ue)}}function Oh(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(i){Rh(e,t,i)},function(i){return Gc(e,t,i)}):Rh(e,t,r)}function Rh(e,t,r){t.status="fulfilled",t.value=r,Dh(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,Ah(e,r)))}function Gc(e,t,r){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=r,Dh(t),t=t.next;while(t!==i)}e.action=null}function Dh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lh(e,t){return t}function Mh(e,t){if(dt){var r=Tt.formState;if(r!==null){e:{var i=We;if(dt){if(Ot){t:{for(var d=Ot,h=Xn;d.nodeType!==8;){if(!h){d=null;break t}if(d=Kn(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){Ot=Kn(d.nextSibling),i=d.data==="F!";break e}}Va(i)}i=!1}i&&(t=r[0])}}return r=gn(),r.memoizedState=r.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lh,lastRenderedState:t},r.queue=i,r=ep.bind(null,We,i),i.dispatch=r,i=Hc(!1),h=Kc.bind(null,We,!1,i.queue),i=gn(),d={state:t,dispatch:null,action:e,pending:null},i.queue=d,r=Kb.bind(null,We,d,h,r),d.dispatch=r,i.memoizedState=e,[t,r,!1]}function Uh(e){var t=qt();return zh(t,St,e)}function zh(e,t,r){if(t=$c(e,t,Lh)[0],e=Rl(Ca)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=ii(t)}catch(_){throw _===ls?Sl:_}else i=t;t=qt();var d=t.queue,h=d.dispatch;return r!==t.memoizedState&&(We.flags|=2048,fs(9,{destroy:void 0},Qb.bind(null,d,r),null)),[i,h,e]}function Qb(e,t){e.action=t}function Bh(e){var t=qt(),r=St;if(r!==null)return zh(t,r,e);qt(),t=t.memoizedState,r=qt();var i=r.queue.dispatch;return r.memoizedState=e,[t,i,!1]}function fs(e,t,r,i){return e={tag:e,create:r,deps:i,inst:t,next:null},t=We.updateQueue,t===null&&(t=Al(),We.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e),e}function Ih(){return qt().memoizedState}function Dl(e,t,r,i){var d=gn();We.flags|=e,d.memoizedState=fs(1|t,{destroy:void 0},r,i===void 0?null:i)}function Ll(e,t,r,i){var d=qt();i=i===void 0?null:i;var h=d.memoizedState.inst;St!==null&&i!==null&&Mc(i,St.memoizedState.deps)?d.memoizedState=fs(t,h,r,i):(We.flags|=e,d.memoizedState=fs(1|t,h,r,i))}function Ph(e,t){Dl(8390656,8,e,t)}function Fc(e,t){Ll(2048,8,e,t)}function Jb(e){We.flags|=4;var t=We.updateQueue;if(t===null)t=Al(),We.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function $h(e){var t=qt().memoizedState;return Jb({ref:t,nextImpl:e}),function(){if((yt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function qh(e,t){return Ll(4,2,e,t)}function Hh(e,t){return Ll(4,4,e,t)}function Gh(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Fh(e,t,r){r=r!=null?r.concat([e]):null,Ll(4,4,Gh.bind(null,t,e),r)}function Vc(){}function Vh(e,t){var r=qt();t=t===void 0?null:t;var i=r.memoizedState;return t!==null&&Mc(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function Yh(e,t){var r=qt();t=t===void 0?null:t;var i=r.memoizedState;if(t!==null&&Mc(t,i[1]))return i[0];if(i=e(),zr){pt(!0);try{e()}finally{pt(!1)}}return r.memoizedState=[i,t],i}function Yc(e,t,r){return r===void 0||(Na&1073741824)!==0&&(ot&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=Xp(),We.lanes|=e,tr|=e,r)}function Xh(e,t,r,i){return An(r,t)?r:cs.current!==null?(e=Yc(e,r,i),An(e,t)||(Ft=!0),e):(Na&42)===0||(Na&1073741824)!==0&&(ot&261930)===0?(Ft=!0,e.memoizedState=r):(e=Xp(),We.lanes|=e,tr|=e,t)}function Zh(e,t,r,i,d){var h=Q.p;Q.p=h!==0&&8>h?h:8;var _=V.T,U={};V.T=U,Kc(e,!1,t,r);try{var te=d(),ue=V.S;if(ue!==null&&ue(U,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var be=Yb(te,i);li(e,t,be,Un(e))}else li(e,t,i,Un(e))}catch(Se){li(e,t,{then:function(){},status:"rejected",reason:Se},Un())}finally{Q.p=h,_!==null&&U.types!==null&&(_.types=U.types),V.T=_}}function Wb(){}function Xc(e,t,r,i){if(e.tag!==5)throw Error(o(476));var d=Kh(e).queue;Zh(e,d,t,W,r===null?Wb:function(){return Qh(e),r(i)})}function Kh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:W},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Qh(e){var t=Kh(e);t.next===null&&(t=e.alternate.memoizedState),li(e,t.next.queue,{},Un())}function Zc(){return rn(Ni)}function Jh(){return qt().memoizedState}function Wh(){return qt().memoizedState}function ex(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=Un();e=Za(r);var i=Ka(t,e,r);i!==null&&(Tn(i,t,r),ni(i,t,r)),t={cache:Nc()},e.payload=t;return}t=t.return}}function tx(e,t,r){var i=Un();r={lane:i,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ml(e)?tp(t,r):(r=hc(e,t,r,i),r!==null&&(Tn(r,e,i),np(r,t,i)))}function ep(e,t,r){var i=Un();li(e,t,r,i)}function li(e,t,r,i){var d={lane:i,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ml(e))tp(t,d);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var _=t.lastRenderedState,U=h(_,r);if(d.hasEagerState=!0,d.eagerState=U,An(U,_))return ml(e,t,d,0),Tt===null&&pl(),!1}catch{}if(r=hc(e,t,d,i),r!==null)return Tn(r,e,i),np(r,t,i),!0}return!1}function Kc(e,t,r,i){if(i={lane:2,revertLane:Eu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ml(e)){if(t)throw Error(o(479))}else t=hc(e,r,i,2),t!==null&&Tn(t,e,2)}function Ml(e){var t=e.alternate;return e===We||t!==null&&t===We}function tp(e,t){us=El=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function np(e,t,r){if((r&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,In(e,r)}}var oi={readContext:rn,use:Ol,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useLayoutEffect:It,useInsertionEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useSyncExternalStore:It,useId:It,useHostTransitionStatus:It,useFormState:It,useActionState:It,useOptimistic:It,useMemoCache:It,useCacheRefresh:It};oi.useEffectEvent=It;var ap={readContext:rn,use:Ol,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:rn,useEffect:Ph,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Dl(4194308,4,Gh.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){Dl(4,2,e,t)},useMemo:function(e,t){var r=gn();t=t===void 0?null:t;var i=e();if(zr){pt(!0);try{e()}finally{pt(!1)}}return r.memoizedState=[i,t],i},useReducer:function(e,t,r){var i=gn();if(r!==void 0){var d=r(t);if(zr){pt(!0);try{r(t)}finally{pt(!1)}}}else d=t;return i.memoizedState=i.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},i.queue=e,e=e.dispatch=tx.bind(null,We,e),[i.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:function(e){e=Hc(e);var t=e.queue,r=ep.bind(null,We,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Vc,useDeferredValue:function(e,t){var r=gn();return Yc(r,e,t)},useTransition:function(){var e=Hc(!1);return e=Zh.bind(null,We,e.queue,!0,!1),gn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var i=We,d=gn();if(dt){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),Tt===null)throw Error(o(349));(ot&127)!==0||Nh(i,t,r)}d.memoizedState=r;var h={value:r,getSnapshot:t};return d.queue=h,Ph(Th.bind(null,i,h,e),[e]),i.flags|=2048,fs(9,{destroy:void 0},Ch.bind(null,i,h,r,t),null),r},useId:function(){var e=gn(),t=Tt.identifierPrefix;if(dt){var r=da,i=ua;r=(i&~(1<<32-Re(i)-1)).toString(32)+r,t="_"+t+"R_"+r,r=kl++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=Xb++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zc,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=gn();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Kc.bind(null,We,!0,r),r.dispatch=t,[e,t]},useMemoCache:Pc,useCacheRefresh:function(){return gn().memoizedState=ex.bind(null,We)},useEffectEvent:function(e){var t=gn(),r={impl:e};return t.memoizedState=r,function(){if((yt&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Qc={readContext:rn,use:Ol,useCallback:Vh,useContext:rn,useEffect:Fc,useImperativeHandle:Fh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:Rl,useRef:Ih,useState:function(){return Rl(Ca)},useDebugValue:Vc,useDeferredValue:function(e,t){var r=qt();return Xh(r,St.memoizedState,e,t)},useTransition:function(){var e=Rl(Ca)[0],t=qt().memoizedState;return[typeof e=="boolean"?e:ii(e),t]},useSyncExternalStore:wh,useId:Jh,useHostTransitionStatus:Zc,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,t){var r=qt();return kh(r,St,e,t)},useMemoCache:Pc,useCacheRefresh:Wh};Qc.useEffectEvent=$h;var rp={readContext:rn,use:Ol,useCallback:Vh,useContext:rn,useEffect:Fc,useImperativeHandle:Fh,useInsertionEffect:qh,useLayoutEffect:Hh,useMemo:Yh,useReducer:qc,useRef:Ih,useState:function(){return qc(Ca)},useDebugValue:Vc,useDeferredValue:function(e,t){var r=qt();return St===null?Yc(r,e,t):Xh(r,St.memoizedState,e,t)},useTransition:function(){var e=qc(Ca)[0],t=qt().memoizedState;return[typeof e=="boolean"?e:ii(e),t]},useSyncExternalStore:wh,useId:Jh,useHostTransitionStatus:Zc,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var r=qt();return St!==null?kh(r,St,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Pc,useCacheRefresh:Wh};rp.useEffectEvent=$h;function Jc(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Wc={enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Un(),d=Za(i);d.payload=t,r!=null&&(d.callback=r),t=Ka(e,d,i),t!==null&&(Tn(t,e,i),ni(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Un(),d=Za(i);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=Ka(e,d,i),t!==null&&(Tn(t,e,i),ni(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Un(),i=Za(r);i.tag=2,t!=null&&(i.callback=t),t=Ka(e,i,r),t!==null&&(Tn(t,e,r),ni(t,e,r))}};function sp(e,t,r,i,d,h,_){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,h,_):t.prototype&&t.prototype.isPureReactComponent?!Xs(r,i)||!Xs(d,h):!0}function ip(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Wc.enqueueReplaceState(t,t.state,null)}function Br(e,t){var r=t;if("ref"in t){r={};for(var i in t)i!=="ref"&&(r[i]=t[i])}if(e=e.defaultProps){r===t&&(r=y({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function lp(e){hl(e)}function op(e){console.error(e)}function cp(e){hl(e)}function Ul(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function up(e,t,r){try{var i=e.onCaughtError;i(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function eu(e,t,r){return r=Za(r),r.tag=3,r.payload={element:null},r.callback=function(){Ul(e,t)},r}function dp(e){return e=Za(e),e.tag=3,e}function fp(e,t,r,i){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var h=i.value;e.payload=function(){return d(h)},e.callback=function(){up(t,r,i)}}var _=r.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(e.callback=function(){up(t,r,i),typeof d!="function"&&(nr===null?nr=new Set([this]):nr.add(this));var U=i.stack;this.componentDidCatch(i.value,{componentStack:U!==null?U:""})})}function nx(e,t,r,i,d){if(r.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=r.alternate,t!==null&&rs(t,r,d,!0),r=Rn.current,r!==null){switch(r.tag){case 31:case 13:return Zn===null?Xl():r.alternate===null&&Pt===0&&(Pt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,i===wl?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([i]):t.add(i),Cu(e,i,d)),!1;case 22:return r.flags|=65536,i===wl?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([i]):r.add(i)),Cu(e,i,d)),!1}throw Error(o(435,r.tag))}return Cu(e,i,d),Xl(),!1}if(dt)return t=Rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,i!==bc&&(e=Error(o(422),{cause:i}),Qs(Fn(e,r)))):(i!==bc&&(t=Error(o(423),{cause:i}),Qs(Fn(t,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,i=Fn(i,r),d=eu(e.stateNode,i,d),Ac(e,d),Pt!==4&&(Pt=2)),!1;var h=Error(o(520),{cause:i});if(h=Fn(h,r),gi===null?gi=[h]:gi.push(h),Pt!==4&&(Pt=2),t===null)return!0;i=Fn(i,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=eu(r.stateNode,i,e),Ac(r,e),!1;case 1:if(t=r.type,h=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(nr===null||!nr.has(h))))return r.flags|=65536,d&=-d,r.lanes|=d,d=dp(d),fp(d,e,r,i),Ac(r,d),!1}r=r.return}while(r!==null);return!1}var tu=Error(o(461)),Ft=!1;function sn(e,t,r,i){t.child=e===null?gh(t,null,r,i):Ur(t,e.child,r,i)}function hp(e,t,r,i,d){r=r.render;var h=t.ref;if("ref"in i){var _={};for(var U in i)U!=="ref"&&(_[U]=i[U])}else _=i;return Rr(t),i=Uc(e,t,r,_,h,d),U=zc(),e!==null&&!Ft?(Bc(e,t,d),Ta(e,t,d)):(dt&&U&&vc(t),t.flags|=1,sn(e,t,i,d),t.child)}function pp(e,t,r,i,d){if(e===null){var h=r.type;return typeof h=="function"&&!pc(h)&&h.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=h,mp(e,t,h,i,d)):(e=vl(r.type,null,i,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!cu(e,d)){var _=h.memoizedProps;if(r=r.compare,r=r!==null?r:Xs,r(_,i)&&e.ref===t.ref)return Ta(e,t,d)}return t.flags|=1,e=xa(h,i),e.ref=t.ref,e.return=t,t.child=e}function mp(e,t,r,i,d){if(e!==null){var h=e.memoizedProps;if(Xs(h,i)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=i=h,cu(e,d))(e.flags&131072)!==0&&(Ft=!0);else return t.lanes=e.lanes,Ta(e,t,d)}return nu(e,t,r,i,d)}function gp(e,t,r,i){var d=i.children,h=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(h=h!==null?h.baseLanes|r:r,e!==null){for(i=t.child=e.child,d=0;i!==null;)d=d|i.lanes|i.childLanes,i=i.sibling;i=d&~h}else i=0,t.child=null;return vp(e,t,h,r,i)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&jl(t,h!==null?h.cachePool:null),h!==null?bh(t,h):Rc(),xh(t);else return i=t.lanes=536870912,vp(e,t,h!==null?h.baseLanes|r:r,r,i)}else h!==null?(jl(t,h.cachePool),bh(t,h),Ja(),t.memoizedState=null):(e!==null&&jl(t,null),Rc(),Ja());return sn(e,t,d,r),t.child}function ci(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vp(e,t,r,i,d){var h=Tc();return h=h===null?null:{parent:Ht._currentValue,pool:h},t.memoizedState={baseLanes:r,cachePool:h},e!==null&&jl(t,null),Rc(),xh(t),e!==null&&rs(e,t,i,!0),t.childLanes=d,null}function zl(e,t){return t=Il({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function yp(e,t,r){return Ur(t,e.child,null,r),e=zl(t,t.pendingProps),e.flags|=2,Dn(t),t.memoizedState=null,e}function ax(e,t,r){var i=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(dt){if(i.mode==="hidden")return e=zl(t,i),t.lanes=536870912,ci(null,e);if(Lc(t),(e=Ot)?(e=Am(e,Xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:ua,overflow:da}:null,retryLane:536870912,hydrationErrors:null},r=th(e),r.return=t,t.child=r,an=t,Ot=null)):e=null,e===null)throw Va(t);return t.lanes=536870912,null}return zl(t,i)}var h=e.memoizedState;if(h!==null){var _=h.dehydrated;if(Lc(t),d)if(t.flags&256)t.flags&=-257,t=yp(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ft||rs(e,t,r,!1),d=(r&e.childLanes)!==0,Ft||d){if(i=Tt,i!==null&&(_=Pn(i,r),_!==0&&_!==h.retryLane))throw h.retryLane=_,Er(e,_),Tn(i,e,_),tu;Xl(),t=yp(e,t,r)}else e=h.treeContext,Ot=Kn(_.nextSibling),an=t,dt=!0,Fa=null,Xn=!1,e!==null&&rh(t,e),t=zl(t,i),t.flags|=4096;return t}return e=xa(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bl(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function nu(e,t,r,i,d){return Rr(t),r=Uc(e,t,r,i,void 0,d),i=zc(),e!==null&&!Ft?(Bc(e,t,d),Ta(e,t,d)):(dt&&i&&vc(t),t.flags|=1,sn(e,t,r,d),t.child)}function bp(e,t,r,i,d,h){return Rr(t),t.updateQueue=null,r=Sh(t,i,r,d),jh(e),i=zc(),e!==null&&!Ft?(Bc(e,t,h),Ta(e,t,h)):(dt&&i&&vc(t),t.flags|=1,sn(e,t,r,h),t.child)}function xp(e,t,r,i,d){if(Rr(t),t.stateNode===null){var h=es,_=r.contextType;typeof _=="object"&&_!==null&&(h=rn(_)),h=new r(i,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Wc,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=i,h.state=t.memoizedState,h.refs={},Ec(t),_=r.contextType,h.context=typeof _=="object"&&_!==null?rn(_):es,h.state=t.memoizedState,_=r.getDerivedStateFromProps,typeof _=="function"&&(Jc(t,r,_,i),h.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(_=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),_!==h.state&&Wc.enqueueReplaceState(h,h.state,null),ri(t,i,h,d),ai(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){h=t.stateNode;var U=t.memoizedProps,te=Br(r,U);h.props=te;var ue=h.context,be=r.contextType;_=es,typeof be=="object"&&be!==null&&(_=rn(be));var Se=r.getDerivedStateFromProps;be=typeof Se=="function"||typeof h.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,be||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(U||ue!==_)&&ip(t,h,i,_),Xa=!1;var de=t.memoizedState;h.state=de,ri(t,i,h,d),ai(),ue=t.memoizedState,U||de!==ue||Xa?(typeof Se=="function"&&(Jc(t,r,Se,i),ue=t.memoizedState),(te=Xa||sp(t,r,te,i,de,ue,_))?(be||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=ue),h.props=i,h.state=ue,h.context=_,i=te):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{h=t.stateNode,kc(e,t),_=t.memoizedProps,be=Br(r,_),h.props=be,Se=t.pendingProps,de=h.context,ue=r.contextType,te=es,typeof ue=="object"&&ue!==null&&(te=rn(ue)),U=r.getDerivedStateFromProps,(ue=typeof U=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(_!==Se||de!==te)&&ip(t,h,i,te),Xa=!1,de=t.memoizedState,h.state=de,ri(t,i,h,d),ai();var me=t.memoizedState;_!==Se||de!==me||Xa||e!==null&&e.dependencies!==null&&bl(e.dependencies)?(typeof U=="function"&&(Jc(t,r,U,i),me=t.memoizedState),(be=Xa||sp(t,r,be,i,de,me,te)||e!==null&&e.dependencies!==null&&bl(e.dependencies))?(ue||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(i,me,te),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(i,me,te)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=me),h.props=i,h.state=me,h.context=te,i=be):(typeof h.componentDidUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),i=!1)}return h=i,Bl(e,t),i=(t.flags&128)!==0,h||i?(h=t.stateNode,r=i&&typeof r.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&i?(t.child=Ur(t,e.child,null,d),t.child=Ur(t,null,r,d)):sn(e,t,r,d),t.memoizedState=h.state,e=t.child):e=Ta(e,t,d),e}function jp(e,t,r,i){return Ar(),t.flags|=256,sn(e,t,r,i),t.child}var au={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ru(e){return{baseLanes:e,cachePool:uh()}}function su(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=Mn),e}function Sp(e,t,r){var i=t.pendingProps,d=!1,h=(t.flags&128)!==0,_;if((_=h)||(_=e!==null&&e.memoizedState===null?!1:($t.current&2)!==0),_&&(d=!0,t.flags&=-129),_=(t.flags&32)!==0,t.flags&=-33,e===null){if(dt){if(d?Qa(t):Ja(),(e=Ot)?(e=Am(e,Xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:ua,overflow:da}:null,retryLane:536870912,hydrationErrors:null},r=th(e),r.return=t,t.child=r,an=t,Ot=null)):e=null,e===null)throw Va(t);return $u(e)?t.lanes=32:t.lanes=536870912,null}var U=i.children;return i=i.fallback,d?(Ja(),d=t.mode,U=Il({mode:"hidden",children:U},d),i=kr(i,d,r,null),U.return=t,i.return=t,U.sibling=i,t.child=U,i=t.child,i.memoizedState=ru(r),i.childLanes=su(e,_,r),t.memoizedState=au,ci(null,i)):(Qa(t),iu(t,U))}var te=e.memoizedState;if(te!==null&&(U=te.dehydrated,U!==null)){if(h)t.flags&256?(Qa(t),t.flags&=-257,t=lu(e,t,r)):t.memoizedState!==null?(Ja(),t.child=e.child,t.flags|=128,t=null):(Ja(),U=i.fallback,d=t.mode,i=Il({mode:"visible",children:i.children},d),U=kr(U,d,r,null),U.flags|=2,i.return=t,U.return=t,i.sibling=U,t.child=i,Ur(t,e.child,null,r),i=t.child,i.memoizedState=ru(r),i.childLanes=su(e,_,r),t.memoizedState=au,t=ci(null,i));else if(Qa(t),$u(U)){if(_=U.nextSibling&&U.nextSibling.dataset,_)var ue=_.dgst;_=ue,i=Error(o(419)),i.stack="",i.digest=_,Qs({value:i,source:null,stack:null}),t=lu(e,t,r)}else if(Ft||rs(e,t,r,!1),_=(r&e.childLanes)!==0,Ft||_){if(_=Tt,_!==null&&(i=Pn(_,r),i!==0&&i!==te.retryLane))throw te.retryLane=i,Er(e,i),Tn(_,e,i),tu;Pu(U)||Xl(),t=lu(e,t,r)}else Pu(U)?(t.flags|=192,t.child=e.child,t=null):(e=te.treeContext,Ot=Kn(U.nextSibling),an=t,dt=!0,Fa=null,Xn=!1,e!==null&&rh(t,e),t=iu(t,i.children),t.flags|=4096);return t}return d?(Ja(),U=i.fallback,d=t.mode,te=e.child,ue=te.sibling,i=xa(te,{mode:"hidden",children:i.children}),i.subtreeFlags=te.subtreeFlags&65011712,ue!==null?U=xa(ue,U):(U=kr(U,d,r,null),U.flags|=2),U.return=t,i.return=t,i.sibling=U,t.child=i,ci(null,i),i=t.child,U=e.child.memoizedState,U===null?U=ru(r):(d=U.cachePool,d!==null?(te=Ht._currentValue,d=d.parent!==te?{parent:te,pool:te}:d):d=uh(),U={baseLanes:U.baseLanes|r,cachePool:d}),i.memoizedState=U,i.childLanes=su(e,_,r),t.memoizedState=au,ci(e.child,i)):(Qa(t),r=e.child,e=r.sibling,r=xa(r,{mode:"visible",children:i.children}),r.return=t,r.sibling=null,e!==null&&(_=t.deletions,_===null?(t.deletions=[e],t.flags|=16):_.push(e)),t.child=r,t.memoizedState=null,r)}function iu(e,t){return t=Il({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Il(e,t){return e=On(22,e,null,t),e.lanes=0,e}function lu(e,t,r){return Ur(t,e.child,null,r),e=iu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wp(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Sc(e.return,t,r)}function ou(e,t,r,i,d,h){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:d,treeForkCount:h}:(_.isBackwards=t,_.rendering=null,_.renderingStartTime=0,_.last=i,_.tail=r,_.tailMode=d,_.treeForkCount=h)}function Np(e,t,r){var i=t.pendingProps,d=i.revealOrder,h=i.tail;i=i.children;var _=$t.current,U=(_&2)!==0;if(U?(_=_&1|2,t.flags|=128):_&=1,q($t,_),sn(e,t,i,r),i=dt?Ks:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wp(e,r,t);else if(e.tag===19)wp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=t.child,d=null;r!==null;)e=r.alternate,e!==null&&_l(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=t.child,t.child=null):(d=r.sibling,r.sibling=null),ou(t,!1,d,r,h,i);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&_l(e)===null){t.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}ou(t,!0,r,null,h,i);break;case"together":ou(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Ta(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),tr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(rs(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,r=xa(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=xa(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function cu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bl(e)))}function rx(e,t,r){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Ya(t,Ht,e.memoizedState.cache),Ar();break;case 27:case 5:Ce(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Lc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Qa(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Sp(e,t,r):(Qa(t),e=Ta(e,t,r),e!==null?e.sibling:null);Qa(t);break;case 19:var d=(e.flags&128)!==0;if(i=(r&t.childLanes)!==0,i||(rs(e,t,r,!1),i=(r&t.childLanes)!==0),d){if(i)return Np(e,t,r);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),q($t,$t.current),i)break;return null;case 22:return t.lanes=0,gp(e,t,r,t.pendingProps);case 24:Ya(t,Ht,e.memoizedState.cache)}return Ta(e,t,r)}function Cp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ft=!0;else{if(!cu(e,r)&&(t.flags&128)===0)return Ft=!1,rx(e,t,r);Ft=(e.flags&131072)!==0}else Ft=!1,dt&&(t.flags&1048576)!==0&&ah(t,Ks,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Lr(t.elementType),t.type=e,typeof e=="function")pc(e)?(i=Br(e,i),t.tag=1,t=xp(null,t,e,i,r)):(t.tag=0,t=nu(null,t,e,i,r));else{if(e!=null){var d=e.$$typeof;if(d===O){t.tag=11,t=hp(null,t,e,i,r);break e}else if(d===X){t.tag=14,t=pp(null,t,e,i,r);break e}}throw t=T(e)||e,Error(o(306,t,""))}}return t;case 0:return nu(e,t,t.type,t.pendingProps,r);case 1:return i=t.type,d=Br(i,t.pendingProps),xp(e,t,i,d,r);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var h=t.memoizedState;d=h.element,kc(e,t),ri(t,i,null,r);var _=t.memoizedState;if(i=_.cache,Ya(t,Ht,i),i!==h.cache&&wc(t,[Ht],r,!0),ai(),i=_.element,h.isDehydrated)if(h={element:i,isDehydrated:!1,cache:_.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=jp(e,t,i,r);break e}else if(i!==d){d=Fn(Error(o(424)),t),Qs(d),t=jp(e,t,i,r);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ot=Kn(e.firstChild),an=t,dt=!0,Fa=null,Xn=!0,r=gh(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ar(),i===d){t=Ta(e,t,r);break e}sn(e,t,i,r)}t=t.child}return t;case 26:return Bl(e,t),e===null?(r=Um(t.type,null,t.pendingProps,null))?t.memoizedState=r:dt||(r=t.type,e=t.pendingProps,i=to(he.current).createElement(r),i[Et]=t,i[Kt]=e,ln(i,r,e),Ct(i),t.stateNode=i):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&dt&&(i=t.stateNode=Dm(t.type,t.pendingProps,he.current),an=t,Xn=!0,d=Ot,ir(t.type)?(qu=d,Ot=Kn(i.firstChild)):Ot=d),sn(e,t,t.pendingProps.children,r),Bl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&dt&&((d=i=Ot)&&(i=Lx(i,t.type,t.pendingProps,Xn),i!==null?(t.stateNode=i,an=t,Ot=Kn(i.firstChild),Xn=!1,d=!0):d=!1),d||Va(t)),Ce(t),d=t.type,h=t.pendingProps,_=e!==null?e.memoizedProps:null,i=h.children,zu(d,h)?i=null:_!==null&&zu(d,_)&&(t.flags|=32),t.memoizedState!==null&&(d=Uc(e,t,Zb,null,null,r),Ni._currentValue=d),Bl(e,t),sn(e,t,i,r),t.child;case 6:return e===null&&dt&&((e=r=Ot)&&(r=Mx(r,t.pendingProps,Xn),r!==null?(t.stateNode=r,an=t,Ot=null,e=!0):e=!1),e||Va(t)),null;case 13:return Sp(e,t,r);case 4:return Ne(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ur(t,null,i,r):sn(e,t,i,r),t.child;case 11:return hp(e,t,t.type,t.pendingProps,r);case 7:return sn(e,t,t.pendingProps,r),t.child;case 8:return sn(e,t,t.pendingProps.children,r),t.child;case 12:return sn(e,t,t.pendingProps.children,r),t.child;case 10:return i=t.pendingProps,Ya(t,t.type,i.value),sn(e,t,i.children,r),t.child;case 9:return d=t.type._context,i=t.pendingProps.children,Rr(t),d=rn(d),i=i(d),t.flags|=1,sn(e,t,i,r),t.child;case 14:return pp(e,t,t.type,t.pendingProps,r);case 15:return mp(e,t,t.type,t.pendingProps,r);case 19:return Np(e,t,r);case 31:return ax(e,t,r);case 22:return gp(e,t,r,t.pendingProps);case 24:return Rr(t),i=rn(Ht),e===null?(d=Tc(),d===null&&(d=Tt,h=Nc(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=r),d=h),t.memoizedState={parent:i,cache:d},Ec(t),Ya(t,Ht,d)):((e.lanes&r)!==0&&(kc(e,t),ri(t,null,null,r),ai()),d=e.memoizedState,h=t.memoizedState,d.parent!==i?(d={parent:i,cache:i},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Ya(t,Ht,i)):(i=h.cache,Ya(t,Ht,i),i!==d.cache&&wc(t,[Ht],r,!0))),sn(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function _a(e){e.flags|=4}function uu(e,t,r,i,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Jp())e.flags|=8192;else throw Mr=wl,_c}else e.flags&=-16777217}function Tp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$m(t))if(Jp())e.flags|=8192;else throw Mr=wl,_c}function Pl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yt():536870912,e.lanes|=t,gs|=t)}function ui(e,t){if(!dt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags&65011712,i|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,i|=d.subtreeFlags,i|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function sx(e,t,r){var i=t.pendingProps;switch(yc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(t),null;case 1:return Rt(t),null;case 3:return r=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),wa(Ht),le(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(as(t)?_a(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xc())),Rt(t),null;case 26:var d=t.type,h=t.memoizedState;return e===null?(_a(t),h!==null?(Rt(t),Tp(t,h)):(Rt(t),uu(t,d,null,i,r))):h?h!==e.memoizedState?(_a(t),Rt(t),Tp(t,h)):(Rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&_a(t),Rt(t),uu(t,d,e,i,r)),null;case 27:if(ye(t),r=he.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Rt(t),null}e=I.current,as(t)?sh(t):(e=Dm(d,i,r),t.stateNode=e,_a(t))}return Rt(t),null;case 5:if(ye(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Rt(t),null}if(h=I.current,as(t))sh(t);else{var _=to(he.current);switch(h){case 1:h=_.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=_.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=_.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof i.is=="string"?_.createElement("select",{is:i.is}):_.createElement("select"),i.multiple?h.multiple=!0:i.size&&(h.size=i.size);break;default:h=typeof i.is=="string"?_.createElement(d,{is:i.is}):_.createElement(d)}}h[Et]=t,h[Kt]=i;e:for(_=t.child;_!==null;){if(_.tag===5||_.tag===6)h.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===t)break e;for(;_.sibling===null;){if(_.return===null||_.return===t)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}t.stateNode=h;e:switch(ln(h,d,i),d){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&_a(t)}}return Rt(t),uu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=he.current,as(t)){if(e=t.stateNode,r=t.memoizedProps,i=null,d=an,d!==null)switch(d.tag){case 27:case 5:i=d.memoizedProps}e[Et]=t,e=!!(e.nodeValue===r||i!==null&&i.suppressHydrationWarning===!0||Sm(e.nodeValue,r)),e||Va(t,!0)}else e=to(e).createTextNode(i),e[Et]=t,t.stateNode=e}return Rt(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(i=as(t),r!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Et]=t}else Ar(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Rt(t),e=!1}else r=xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(Dn(t),t):(Dn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Rt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=as(t),i!==null&&i.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[Et]=t}else Ar(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Rt(t),d=!1}else d=xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(Dn(t),t):(Dn(t),null)}return Dn(t),(t.flags&128)!==0?(t.lanes=r,t):(r=i!==null,e=e!==null&&e.memoizedState!==null,r&&(i=t.child,d=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(d=i.alternate.memoizedState.cachePool.pool),h=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),h!==d&&(i.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Pl(t,t.updateQueue),Rt(t),null);case 4:return le(),e===null&&Ru(t.stateNode.containerInfo),Rt(t),null;case 10:return wa(t.type),Rt(t),null;case 19:if(C($t),i=t.memoizedState,i===null)return Rt(t),null;if(d=(t.flags&128)!==0,h=i.rendering,h===null)if(d)ui(i,!1);else{if(Pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=_l(e),h!==null){for(t.flags|=128,ui(i,!1),e=h.updateQueue,t.updateQueue=e,Pl(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)eh(r,e),r=r.sibling;return q($t,$t.current&1|2),dt&&ja(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Ee()>Fl&&(t.flags|=128,d=!0,ui(i,!1),t.lanes=4194304)}else{if(!d)if(e=_l(h),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Pl(t,e),ui(i,!0),i.tail===null&&i.tailMode==="hidden"&&!h.alternate&&!dt)return Rt(t),null}else 2*Ee()-i.renderingStartTime>Fl&&r!==536870912&&(t.flags|=128,d=!0,ui(i,!1),t.lanes=4194304);i.isBackwards?(h.sibling=t.child,t.child=h):(e=i.last,e!==null?e.sibling=h:t.child=h,i.last=h)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ee(),e.sibling=null,r=$t.current,q($t,d?r&1|2:r&1),dt&&ja(t,i.treeForkCount),e):(Rt(t),null);case 22:case 23:return Dn(t),Dc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(r&536870912)!==0&&(t.flags&128)===0&&(Rt(t),t.subtreeFlags&6&&(t.flags|=8192)):Rt(t),r=t.updateQueue,r!==null&&Pl(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==r&&(t.flags|=2048),e!==null&&C(Dr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),wa(Ht),Rt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function ix(e,t){switch(yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wa(Ht),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(Dn(t),t.alternate===null)throw Error(o(340));Ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Dn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C($t),null;case 4:return le(),null;case 10:return wa(t.type),null;case 22:case 23:return Dn(t),Dc(),e!==null&&C(Dr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return wa(Ht),null;case 25:return null;default:return null}}function _p(e,t){switch(yc(t),t.tag){case 3:wa(Ht),le();break;case 26:case 27:case 5:ye(t);break;case 4:le();break;case 31:t.memoizedState!==null&&Dn(t);break;case 13:Dn(t);break;case 19:C($t);break;case 10:wa(t.type);break;case 22:case 23:Dn(t),Dc(),e!==null&&C(Dr);break;case 24:wa(Ht)}}function di(e,t){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var d=i.next;r=d;do{if((r.tag&e)===e){i=void 0;var h=r.create,_=r.inst;i=h(),_.destroy=i}r=r.next}while(r!==d)}}catch(U){jt(t,t.return,U)}}function Wa(e,t,r){try{var i=t.updateQueue,d=i!==null?i.lastEffect:null;if(d!==null){var h=d.next;i=h;do{if((i.tag&e)===e){var _=i.inst,U=_.destroy;if(U!==void 0){_.destroy=void 0,d=t;var te=r,ue=U;try{ue()}catch(be){jt(d,te,be)}}}i=i.next}while(i!==h)}}catch(be){jt(t,t.return,be)}}function Ep(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{yh(t,r)}catch(i){jt(e,e.return,i)}}}function kp(e,t,r){r.props=Br(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(i){jt(e,t,i)}}function fi(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof r=="function"?e.refCleanup=r(i):r.current=i}}catch(d){jt(e,t,d)}}function fa(e,t){var r=e.ref,i=e.refCleanup;if(r!==null)if(typeof i=="function")try{i()}catch(d){jt(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){jt(e,t,d)}else r.current=null}function Ap(e){var t=e.type,r=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&i.focus();break e;case"img":r.src?i.src=r.src:r.srcSet&&(i.srcset=r.srcSet)}}catch(d){jt(e,e.return,d)}}function du(e,t,r){try{var i=e.stateNode;Ex(i,e.type,r,t),i[Kt]=t}catch(d){jt(e,e.return,d)}}function Op(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ir(e.type)||e.tag===4}function fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Op(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.tag===27&&ir(e.type)||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,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=bt));else if(i!==4&&(i===27&&ir(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(hu(e,t,r),e=e.sibling;e!==null;)hu(e,t,r),e=e.sibling}function $l(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(i===27&&ir(e.type)&&(r=e.stateNode),e=e.child,e!==null))for($l(e,t,r),e=e.sibling;e!==null;)$l(e,t,r),e=e.sibling}function Rp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var i=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);ln(t,i,r),t[Et]=e,t[Kt]=r}catch(h){jt(e,e.return,h)}}var Ea=!1,Vt=!1,pu=!1,Dp=typeof WeakSet=="function"?WeakSet:Set,en=null;function lx(e,t){if(e=e.containerInfo,Mu=oo,e=Ff(e),lc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var d=i.anchorOffset,h=i.focusNode;i=i.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var _=0,U=-1,te=-1,ue=0,be=0,Se=e,de=null;t:for(;;){for(var me;Se!==r||d!==0&&Se.nodeType!==3||(U=_+d),Se!==h||i!==0&&Se.nodeType!==3||(te=_+i),Se.nodeType===3&&(_+=Se.nodeValue.length),(me=Se.firstChild)!==null;)de=Se,Se=me;for(;;){if(Se===e)break t;if(de===r&&++ue===d&&(U=_),de===h&&++be===i&&(te=_),(me=Se.nextSibling)!==null)break;Se=de,de=Se.parentNode}Se=me}r=U===-1||te===-1?null:{start:U,end:te}}else r=null}r=r||{start:0,end:0}}else r=null;for(Uu={focusedElem:e,selectionRange:r},oo=!1,en=t;en!==null;)if(t=en,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,en=e;else for(;en!==null;){switch(t=en,h=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,r=t,d=h.memoizedProps,h=h.memoizedState,i=r.stateNode;try{var De=Br(r.type,d);e=i.getSnapshotBeforeUpdate(De,h),i.__reactInternalSnapshotBeforeUpdate=e}catch(Pe){jt(r,r.return,Pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Iu(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Iu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,en=e;break}en=t.return}}function Lp(e,t,r){var i=r.flags;switch(r.tag){case 0:case 11:case 15:Aa(e,r),i&4&&di(5,r);break;case 1:if(Aa(e,r),i&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(_){jt(r,r.return,_)}else{var d=Br(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(_){jt(r,r.return,_)}}i&64&&Ep(r),i&512&&fi(r,r.return);break;case 3:if(Aa(e,r),i&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{yh(e,t)}catch(_){jt(r,r.return,_)}}break;case 27:t===null&&i&4&&Rp(r);case 26:case 5:Aa(e,r),t===null&&i&4&&Ap(r),i&512&&fi(r,r.return);break;case 12:Aa(e,r);break;case 31:Aa(e,r),i&4&&zp(e,r);break;case 13:Aa(e,r),i&4&&Bp(e,r),i&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=gx.bind(null,r),Ux(e,r))));break;case 22:if(i=r.memoizedState!==null||Ea,!i){t=t!==null&&t.memoizedState!==null||Vt,d=Ea;var h=Vt;Ea=i,(Vt=t)&&!h?Oa(e,r,(r.subtreeFlags&8772)!==0):Aa(e,r),Ea=d,Vt=h}break;case 30:break;default:Aa(e,r)}}function Mp(e){var t=e.alternate;t!==null&&(e.alternate=null,Mp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bn(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Mt=null,Sn=!1;function ka(e,t,r){for(r=r.child;r!==null;)Up(e,t,r),r=r.sibling}function Up(e,t,r){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(tt,r)}catch{}switch(r.tag){case 26:Vt||fa(r,t),ka(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Vt||fa(r,t);var i=Mt,d=Sn;ir(r.type)&&(Mt=r.stateNode,Sn=!1),ka(e,t,r),ji(r.stateNode),Mt=i,Sn=d;break;case 5:Vt||fa(r,t);case 6:if(i=Mt,d=Sn,Mt=null,ka(e,t,r),Mt=i,Sn=d,Mt!==null)if(Sn)try{(Mt.nodeType===9?Mt.body:Mt.nodeName==="HTML"?Mt.ownerDocument.body:Mt).removeChild(r.stateNode)}catch(h){jt(r,t,h)}else try{Mt.removeChild(r.stateNode)}catch(h){jt(r,t,h)}break;case 18:Mt!==null&&(Sn?(e=Mt,Em(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Ns(e)):Em(Mt,r.stateNode));break;case 4:i=Mt,d=Sn,Mt=r.stateNode.containerInfo,Sn=!0,ka(e,t,r),Mt=i,Sn=d;break;case 0:case 11:case 14:case 15:Wa(2,r,t),Vt||Wa(4,r,t),ka(e,t,r);break;case 1:Vt||(fa(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"&&kp(r,t,i)),ka(e,t,r);break;case 21:ka(e,t,r);break;case 22:Vt=(i=Vt)||r.memoizedState!==null,ka(e,t,r),Vt=i;break;default:ka(e,t,r)}}function zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ns(e)}catch(r){jt(t,t.return,r)}}}function Bp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ns(e)}catch(r){jt(t,t.return,r)}}function ox(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dp),t;default:throw Error(o(435,e.tag))}}function ql(e,t){var r=ox(e);t.forEach(function(i){if(!r.has(i)){r.add(i);var d=vx.bind(null,e,i);i.then(d,d)}})}function wn(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var d=r[i],h=e,_=t,U=_;e:for(;U!==null;){switch(U.tag){case 27:if(ir(U.type)){Mt=U.stateNode,Sn=!1;break e}break;case 5:Mt=U.stateNode,Sn=!1;break e;case 3:case 4:Mt=U.stateNode.containerInfo,Sn=!0;break e}U=U.return}if(Mt===null)throw Error(o(160));Up(h,_,d),Mt=null,Sn=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ip(t,e),t=t.sibling}var na=null;function Ip(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wn(t,e),Nn(e),i&4&&(Wa(3,e,e.return),di(3,e),Wa(5,e,e.return));break;case 1:wn(t,e),Nn(e),i&512&&(Vt||r===null||fa(r,r.return)),i&64&&Ea&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?i:r.concat(i))));break;case 26:var d=na;if(wn(t,e),Nn(e),i&512&&(Vt||r===null||fa(r,r.return)),i&4){var h=r!==null?r.memoizedState:null;if(i=e.memoizedState,r===null)if(i===null)if(e.stateNode===null){e:{i=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(i){case"title":h=d.getElementsByTagName("title")[0],(!h||h[_n]||h[Et]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(i),d.head.insertBefore(h,d.querySelector("head > title"))),ln(h,i,r),h[Et]=e,Ct(h),i=h;break e;case"link":var _=Im("link","href",d).get(i+(r.href||""));if(_){for(var U=0;U<_.length;U++)if(h=_[U],h.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&h.getAttribute("rel")===(r.rel==null?null:r.rel)&&h.getAttribute("title")===(r.title==null?null:r.title)&&h.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){_.splice(U,1);break t}}h=d.createElement(i),ln(h,i,r),d.head.appendChild(h);break;case"meta":if(_=Im("meta","content",d).get(i+(r.content||""))){for(U=0;U<_.length;U++)if(h=_[U],h.getAttribute("content")===(r.content==null?null:""+r.content)&&h.getAttribute("name")===(r.name==null?null:r.name)&&h.getAttribute("property")===(r.property==null?null:r.property)&&h.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&h.getAttribute("charset")===(r.charSet==null?null:r.charSet)){_.splice(U,1);break t}}h=d.createElement(i),ln(h,i,r),d.head.appendChild(h);break;default:throw Error(o(468,i))}h[Et]=e,Ct(h),i=h}e.stateNode=i}else Pm(d,e.type,e.stateNode);else e.stateNode=Bm(d,i,e.memoizedProps);else h!==i?(h===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):h.count--,i===null?Pm(d,e.type,e.stateNode):Bm(d,i,e.memoizedProps)):i===null&&e.stateNode!==null&&du(e,e.memoizedProps,r.memoizedProps)}break;case 27:wn(t,e),Nn(e),i&512&&(Vt||r===null||fa(r,r.return)),r!==null&&i&4&&du(e,e.memoizedProps,r.memoizedProps);break;case 5:if(wn(t,e),Nn(e),i&512&&(Vt||r===null||fa(r,r.return)),e.flags&32){d=e.stateNode;try{ba(d,"")}catch(De){jt(e,e.return,De)}}i&4&&e.stateNode!=null&&(d=e.memoizedProps,du(e,d,r!==null?r.memoizedProps:d)),i&1024&&(pu=!0);break;case 6:if(wn(t,e),Nn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,r=e.stateNode;try{r.nodeValue=i}catch(De){jt(e,e.return,De)}}break;case 3:if(ro=null,d=na,na=no(t.containerInfo),wn(t,e),na=d,Nn(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Ns(t.containerInfo)}catch(De){jt(e,e.return,De)}pu&&(pu=!1,Pp(e));break;case 4:i=na,na=no(e.stateNode.containerInfo),wn(t,e),Nn(e),na=i;break;case 12:wn(t,e),Nn(e);break;case 31:wn(t,e),Nn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ql(e,i)));break;case 13:wn(t,e),Nn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Gl=Ee()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ql(e,i)));break;case 22:d=e.memoizedState!==null;var te=r!==null&&r.memoizedState!==null,ue=Ea,be=Vt;if(Ea=ue||d,Vt=be||te,wn(t,e),Vt=be,Ea=ue,Nn(e),i&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(r===null||te||Ea||Vt||Ir(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){te=r=t;try{if(h=te.stateNode,d)_=h.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{U=te.stateNode;var Se=te.memoizedProps.style,de=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;U.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(De){jt(te,te.return,De)}}}else if(t.tag===6){if(r===null){te=t;try{te.stateNode.nodeValue=d?"":te.memoizedProps}catch(De){jt(te,te.return,De)}}}else if(t.tag===18){if(r===null){te=t;try{var me=te.stateNode;d?km(me,!0):km(te.stateNode,!1)}catch(De){jt(te,te.return,De)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(r=i.retryQueue,r!==null&&(i.retryQueue=null,ql(e,r))));break;case 19:wn(t,e),Nn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ql(e,i)));break;case 30:break;case 21:break;default:wn(t,e),Nn(e)}}function Nn(e){var t=e.flags;if(t&2){try{for(var r,i=e.return;i!==null;){if(Op(i)){r=i;break}i=i.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,h=fu(e);$l(e,h,d);break;case 5:var _=r.stateNode;r.flags&32&&(ba(_,""),r.flags&=-33);var U=fu(e);$l(e,U,_);break;case 3:case 4:var te=r.stateNode.containerInfo,ue=fu(e);hu(e,ue,te);break;default:throw Error(o(161))}}catch(be){jt(e,e.return,be)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Aa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Lp(e,t.alternate,t),t=t.sibling}function Ir(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wa(4,t,t.return),Ir(t);break;case 1:fa(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&kp(t,t.return,r),Ir(t);break;case 27:ji(t.stateNode);case 26:case 5:fa(t,t.return),Ir(t);break;case 22:t.memoizedState===null&&Ir(t);break;case 30:Ir(t);break;default:Ir(t)}e=e.sibling}}function Oa(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,d=e,h=t,_=h.flags;switch(h.tag){case 0:case 11:case 15:Oa(d,h,r),di(4,h);break;case 1:if(Oa(d,h,r),i=h,d=i.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ue){jt(i,i.return,ue)}if(i=h,d=i.updateQueue,d!==null){var U=i.stateNode;try{var te=d.shared.hiddenCallbacks;if(te!==null)for(d.shared.hiddenCallbacks=null,d=0;d<te.length;d++)vh(te[d],U)}catch(ue){jt(i,i.return,ue)}}r&&_&64&&Ep(h),fi(h,h.return);break;case 27:Rp(h);case 26:case 5:Oa(d,h,r),r&&i===null&&_&4&&Ap(h),fi(h,h.return);break;case 12:Oa(d,h,r);break;case 31:Oa(d,h,r),r&&_&4&&zp(d,h);break;case 13:Oa(d,h,r),r&&_&4&&Bp(d,h);break;case 22:h.memoizedState===null&&Oa(d,h,r),fi(h,h.return);break;case 30:break;default:Oa(d,h,r)}t=t.sibling}}function mu(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Js(r))}function gu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Js(e))}function aa(e,t,r,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$p(e,t,r,i),t=t.sibling}function $p(e,t,r,i){var d=t.flags;switch(t.tag){case 0:case 11:case 15:aa(e,t,r,i),d&2048&&di(9,t);break;case 1:aa(e,t,r,i);break;case 3:aa(e,t,r,i),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Js(e)));break;case 12:if(d&2048){aa(e,t,r,i),e=t.stateNode;try{var h=t.memoizedProps,_=h.id,U=h.onPostCommit;typeof U=="function"&&U(_,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(te){jt(t,t.return,te)}}else aa(e,t,r,i);break;case 31:aa(e,t,r,i);break;case 13:aa(e,t,r,i);break;case 23:break;case 22:h=t.stateNode,_=t.alternate,t.memoizedState!==null?h._visibility&2?aa(e,t,r,i):hi(e,t):h._visibility&2?aa(e,t,r,i):(h._visibility|=2,hs(e,t,r,i,(t.subtreeFlags&10256)!==0||!1)),d&2048&&mu(_,t);break;case 24:aa(e,t,r,i),d&2048&&gu(t.alternate,t);break;default:aa(e,t,r,i)}}function hs(e,t,r,i,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var h=e,_=t,U=r,te=i,ue=_.flags;switch(_.tag){case 0:case 11:case 15:hs(h,_,U,te,d),di(8,_);break;case 23:break;case 22:var be=_.stateNode;_.memoizedState!==null?be._visibility&2?hs(h,_,U,te,d):hi(h,_):(be._visibility|=2,hs(h,_,U,te,d)),d&&ue&2048&&mu(_.alternate,_);break;case 24:hs(h,_,U,te,d),d&&ue&2048&&gu(_.alternate,_);break;default:hs(h,_,U,te,d)}t=t.sibling}}function hi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,i=t,d=i.flags;switch(i.tag){case 22:hi(r,i),d&2048&&mu(i.alternate,i);break;case 24:hi(r,i),d&2048&&gu(i.alternate,i);break;default:hi(r,i)}t=t.sibling}}var pi=8192;function ps(e,t,r){if(e.subtreeFlags&pi)for(e=e.child;e!==null;)qp(e,t,r),e=e.sibling}function qp(e,t,r){switch(e.tag){case 26:ps(e,t,r),e.flags&pi&&e.memoizedState!==null&&Xx(r,na,e.memoizedState,e.memoizedProps);break;case 5:ps(e,t,r);break;case 3:case 4:var i=na;na=no(e.stateNode.containerInfo),ps(e,t,r),na=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=pi,pi=16777216,ps(e,t,r),pi=i):ps(e,t,r));break;default:ps(e,t,r)}}function Hp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];en=i,Fp(i,e)}Hp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gp(e),e=e.sibling}function Gp(e){switch(e.tag){case 0:case 11:case 15:mi(e),e.flags&2048&&Wa(9,e,e.return);break;case 3:mi(e);break;case 12:mi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):mi(e);break;default:mi(e)}}function Hl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];en=i,Fp(i,e)}Hp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wa(8,t,t.return),Hl(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Fp(e,t){for(;en!==null;){var r=en;switch(r.tag){case 0:case 11:case 15:Wa(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var i=r.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Js(r.memoizedState.cache)}if(i=r.child,i!==null)i.return=r,en=i;else e:for(r=e;en!==null;){i=en;var d=i.sibling,h=i.return;if(Mp(i),i===r){en=null;break e}if(d!==null){d.return=h,en=d;break e}en=h}}}var cx={getCacheForType:function(e){var t=rn(Ht),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return rn(Ht).controller.signal}},ux=typeof WeakMap=="function"?WeakMap:Map,yt=0,Tt=null,it=null,ot=0,xt=0,Ln=null,er=!1,ms=!1,vu=!1,Ra=0,Pt=0,tr=0,Pr=0,yu=0,Mn=0,gs=0,gi=null,Cn=null,bu=!1,Gl=0,Vp=0,Fl=1/0,Vl=null,nr=null,Wt=0,ar=null,vs=null,Da=0,xu=0,ju=null,Yp=null,vi=0,Su=null;function Un(){return(yt&2)!==0&&ot!==0?ot&-ot:V.T!==null?Eu():za()}function Xp(){if(Mn===0)if((ot&536870912)===0||dt){var e=st;st<<=1,(st&3932160)===0&&(st=262144),Mn=e}else Mn=536870912;return e=Rn.current,e!==null&&(e.flags|=32),Mn}function Tn(e,t,r){(e===Tt&&(xt===2||xt===9)||e.cancelPendingCommit!==null)&&(ys(e,0),rr(e,ot,Mn,!1)),Fe(e,r),((yt&2)===0||e!==Tt)&&(e===Tt&&((yt&2)===0&&(Pr|=r),Pt===4&&rr(e,ot,Mn,!1)),ha(e))}function Zp(e,t,r){if((yt&6)!==0)throw Error(o(327));var i=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Je(e,t),d=i?hx(e,t):Nu(e,t,!0),h=i;do{if(d===0){ms&&!i&&rr(e,t,0,!1);break}else{if(r=e.current.alternate,h&&!dx(r)){d=Nu(e,t,!1),h=!1;continue}if(d===2){if(h=t,e.errorRecoveryDisabledLanes&h)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){t=_;e:{var U=e;d=gi;var te=U.current.memoizedState.isDehydrated;if(te&&(ys(U,_).flags|=256),_=Nu(U,_,!1),_!==2){if(vu&&!te){U.errorRecoveryDisabledLanes|=h,Pr|=h,d=4;break e}h=Cn,Cn=d,h!==null&&(Cn===null?Cn=h:Cn.push.apply(Cn,h))}d=_}if(h=!1,d!==2)continue}}if(d===1){ys(e,0),rr(e,t,0,!0);break}e:{switch(i=e,h=d,h){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:rr(i,t,Mn,!er);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=Gl+300-Ee(),10<d)){if(rr(i,t,Mn,!er),zt(i,0,!0)!==0)break e;Da=t,i.timeoutHandle=Tm(Kp.bind(null,i,r,Cn,Vl,bu,t,Mn,Pr,gs,er,h,"Throttled",-0,0),d);break e}Kp(i,r,Cn,Vl,bu,t,Mn,Pr,gs,er,h,null,-0,0)}}break}while(!0);ha(e)}function Kp(e,t,r,i,d,h,_,U,te,ue,be,Se,de,me){if(e.timeoutHandle=-1,Se=t.subtreeFlags,Se&8192||(Se&16785408)===16785408){Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bt},qp(t,h,Se);var De=(h&62914560)===h?Gl-Ee():(h&4194048)===h?Vp-Ee():0;if(De=Zx(Se,De),De!==null){Da=h,e.cancelPendingCommit=De(rm.bind(null,e,t,h,r,i,d,_,U,te,be,Se,null,de,me)),rr(e,h,_,!ue);return}}rm(e,t,h,r,i,d,_,U,te)}function dx(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var i=0;i<r.length;i++){var d=r[i],h=d.getSnapshot;d=d.value;try{if(!An(h(),d))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function rr(e,t,r,i){t&=~yu,t&=~Pr,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var d=t;0<d;){var h=31-Re(d),_=1<<h;i[h]=-1,d&=~_}r!==0&&Ye(e,r,t)}function Yl(){return(yt&6)===0?(yi(0),!1):!0}function wu(){if(it!==null){if(xt===0)var e=it.return;else e=it,Sa=Or=null,Ic(e),os=null,ei=0,e=it;for(;e!==null;)_p(e.alternate,e),e=e.return;it=null}}function ys(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,Ox(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Da=0,wu(),Tt=e,it=r=xa(e.current,null),ot=t,xt=0,Ln=null,er=!1,ms=Je(e,t),vu=!1,gs=Mn=yu=Pr=tr=Pt=0,Cn=gi=null,bu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var d=31-Re(i),h=1<<d;t|=e[d],i&=~h}return Ra=t,pl(),r}function Qp(e,t){We=null,V.H=oi,t===ls||t===Sl?(t=hh(),xt=3):t===_c?(t=hh(),xt=4):xt=t===tu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ln=t,it===null&&(Pt=1,Ul(e,Fn(t,e.current)))}function Jp(){var e=Rn.current;return e===null?!0:(ot&4194048)===ot?Zn===null:(ot&62914560)===ot||(ot&536870912)!==0?e===Zn:!1}function Wp(){var e=V.H;return V.H=oi,e===null?oi:e}function em(){var e=V.A;return V.A=cx,e}function Xl(){Pt=4,er||(ot&4194048)!==ot&&Rn.current!==null||(ms=!0),(tr&134217727)===0&&(Pr&134217727)===0||Tt===null||rr(Tt,ot,Mn,!1)}function Nu(e,t,r){var i=yt;yt|=2;var d=Wp(),h=em();(Tt!==e||ot!==t)&&(Vl=null,ys(e,t)),t=!1;var _=Pt;e:do try{if(xt!==0&&it!==null){var U=it,te=Ln;switch(xt){case 8:wu(),_=6;break e;case 3:case 2:case 9:case 6:Rn.current===null&&(t=!0);var ue=xt;if(xt=0,Ln=null,bs(e,U,te,ue),r&&ms){_=0;break e}break;default:ue=xt,xt=0,Ln=null,bs(e,U,te,ue)}}fx(),_=Pt;break}catch(be){Qp(e,be)}while(!0);return t&&e.shellSuspendCounter++,Sa=Or=null,yt=i,V.H=d,V.A=h,it===null&&(Tt=null,ot=0,pl()),_}function fx(){for(;it!==null;)tm(it)}function hx(e,t){var r=yt;yt|=2;var i=Wp(),d=em();Tt!==e||ot!==t?(Vl=null,Fl=Ee()+500,ys(e,t)):ms=Je(e,t);e:do try{if(xt!==0&&it!==null){t=it;var h=Ln;t:switch(xt){case 1:xt=0,Ln=null,bs(e,t,h,1);break;case 2:case 9:if(dh(h)){xt=0,Ln=null,nm(t);break}t=function(){xt!==2&&xt!==9||Tt!==e||(xt=7),ha(e)},h.then(t,t);break e;case 3:xt=7;break e;case 4:xt=5;break e;case 7:dh(h)?(xt=0,Ln=null,nm(t)):(xt=0,Ln=null,bs(e,t,h,7));break;case 5:var _=null;switch(it.tag){case 26:_=it.memoizedState;case 5:case 27:var U=it;if(_?$m(_):U.stateNode.complete){xt=0,Ln=null;var te=U.sibling;if(te!==null)it=te;else{var ue=U.return;ue!==null?(it=ue,Zl(ue)):it=null}break t}}xt=0,Ln=null,bs(e,t,h,5);break;case 6:xt=0,Ln=null,bs(e,t,h,6);break;case 8:wu(),Pt=6;break e;default:throw Error(o(462))}}px();break}catch(be){Qp(e,be)}while(!0);return Sa=Or=null,V.H=i,V.A=d,yt=r,it!==null?0:(Tt=null,ot=0,pl(),Pt)}function px(){for(;it!==null&&!se();)tm(it)}function tm(e){var t=Cp(e.alternate,e,Ra);e.memoizedProps=e.pendingProps,t===null?Zl(e):it=t}function nm(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=bp(r,t,t.pendingProps,t.type,void 0,ot);break;case 11:t=bp(r,t,t.pendingProps,t.type.render,t.ref,ot);break;case 5:Ic(t);default:_p(r,t),t=it=eh(t,Ra),t=Cp(r,t,Ra)}e.memoizedProps=e.pendingProps,t===null?Zl(e):it=t}function bs(e,t,r,i){Sa=Or=null,Ic(t),os=null,ei=0;var d=t.return;try{if(nx(e,d,t,r,ot)){Pt=1,Ul(e,Fn(r,e.current)),it=null;return}}catch(h){if(d!==null)throw it=d,h;Pt=1,Ul(e,Fn(r,e.current)),it=null;return}t.flags&32768?(dt||i===1?e=!0:ms||(ot&536870912)!==0?e=!1:(er=e=!0,(i===2||i===9||i===3||i===6)&&(i=Rn.current,i!==null&&i.tag===13&&(i.flags|=16384))),am(t,e)):Zl(t)}function Zl(e){var t=e;do{if((t.flags&32768)!==0){am(t,er);return}e=t.return;var r=sx(t.alternate,t,Ra);if(r!==null){it=r;return}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);Pt===0&&(Pt=5)}function am(e,t){do{var r=ix(e.alternate,e);if(r!==null){r.flags&=32767,it=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){it=e;return}it=e=r}while(e!==null);Pt=6,it=null}function rm(e,t,r,i,d,h,_,U,te){e.cancelPendingCommit=null;do Kl();while(Wt!==0);if((yt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(h=t.lanes|t.childLanes,h|=fc,Ie(e,r,h,_,U,te),e===Tt&&(it=Tt=null,ot=0),vs=t,ar=e,Da=r,xu=h,ju=d,Yp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,yx(fe,function(){return cm(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null,d=Q.p,Q.p=2,_=yt,yt|=4;try{lx(e,t,r)}finally{yt=_,Q.p=d,V.T=i}}Wt=1,sm(),im(),lm()}}function sm(){if(Wt===1){Wt=0;var e=ar,t=vs,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=V.T,V.T=null;var i=Q.p;Q.p=2;var d=yt;yt|=4;try{Ip(t,e);var h=Uu,_=Ff(e.containerInfo),U=h.focusedElem,te=h.selectionRange;if(_!==U&&U&&U.ownerDocument&&Gf(U.ownerDocument.documentElement,U)){if(te!==null&&lc(U)){var ue=te.start,be=te.end;if(be===void 0&&(be=ue),"selectionStart"in U)U.selectionStart=ue,U.selectionEnd=Math.min(be,U.value.length);else{var Se=U.ownerDocument||document,de=Se&&Se.defaultView||window;if(de.getSelection){var me=de.getSelection(),De=U.textContent.length,Pe=Math.min(te.start,De),Nt=te.end===void 0?Pe:Math.min(te.end,De);!me.extend&&Pe>Nt&&(_=Nt,Nt=Pe,Pe=_);var ie=Hf(U,Pe),ae=Hf(U,Nt);if(ie&&ae&&(me.rangeCount!==1||me.anchorNode!==ie.node||me.anchorOffset!==ie.offset||me.focusNode!==ae.node||me.focusOffset!==ae.offset)){var oe=Se.createRange();oe.setStart(ie.node,ie.offset),me.removeAllRanges(),Pe>Nt?(me.addRange(oe),me.extend(ae.node,ae.offset)):(oe.setEnd(ae.node,ae.offset),me.addRange(oe))}}}}for(Se=[],me=U;me=me.parentNode;)me.nodeType===1&&Se.push({element:me,left:me.scrollLeft,top:me.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<Se.length;U++){var je=Se[U];je.element.scrollLeft=je.left,je.element.scrollTop=je.top}}oo=!!Mu,Uu=Mu=null}finally{yt=d,Q.p=i,V.T=r}}e.current=t,Wt=2}}function im(){if(Wt===2){Wt=0;var e=ar,t=vs,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=V.T,V.T=null;var i=Q.p;Q.p=2;var d=yt;yt|=4;try{Lp(e,t.alternate,t)}finally{yt=d,Q.p=i,V.T=r}}Wt=3}}function lm(){if(Wt===4||Wt===3){Wt=0,Te();var e=ar,t=vs,r=Da,i=Yp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Wt=5:(Wt=0,vs=ar=null,om(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(nr=null),Xt(r),t=t.stateNode,ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(tt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=V.T,d=Q.p,Q.p=2,V.T=null;try{for(var h=e.onRecoverableError,_=0;_<i.length;_++){var U=i[_];h(U.value,{componentStack:U.stack})}}finally{V.T=t,Q.p=d}}(Da&3)!==0&&Kl(),ha(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===Su?vi++:(vi=0,Su=e):vi=0,yi(0)}}function om(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Js(t)))}function Kl(){return sm(),im(),lm(),cm()}function cm(){if(Wt!==5)return!1;var e=ar,t=xu;xu=0;var r=Xt(Da),i=V.T,d=Q.p;try{Q.p=32>r?32:r,V.T=null,r=ju,ju=null;var h=ar,_=Da;if(Wt=0,vs=ar=null,Da=0,(yt&6)!==0)throw Error(o(331));var U=yt;if(yt|=4,Gp(h.current),$p(h,h.current,_,r),yt=U,yi(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(tt,h)}catch{}return!0}finally{Q.p=d,V.T=i,om(e,t)}}function um(e,t,r){t=Fn(r,t),t=eu(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(Fe(e,2),ha(e))}function jt(e,t,r){if(e.tag===3)um(e,e,r);else for(;t!==null;){if(t.tag===3){um(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(nr===null||!nr.has(i))){e=Fn(r,e),r=dp(2),i=Ka(t,r,2),i!==null&&(fp(r,i,t,e),Fe(i,2),ha(i));break}}t=t.return}}function Cu(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new ux;var d=new Set;i.set(t,d)}else d=i.get(t),d===void 0&&(d=new Set,i.set(t,d));d.has(r)||(vu=!0,d.add(r),e=mx.bind(null,e,t,r),t.then(e,e))}function mx(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Tt===e&&(ot&r)===r&&(Pt===4||Pt===3&&(ot&62914560)===ot&&300>Ee()-Gl?(yt&2)===0&&ys(e,0):yu|=r,gs===ot&&(gs=0)),ha(e)}function dm(e,t){t===0&&(t=Yt()),e=Er(e,t),e!==null&&(Fe(e,t),ha(e))}function gx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),dm(e,r)}function vx(e,t){var r=0;switch(e.tag){case 31:case 13:var i=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),dm(e,r)}function yx(e,t){return xe(e,t)}var Ql=null,xs=null,Tu=!1,Jl=!1,_u=!1,sr=0;function ha(e){e!==xs&&e.next===null&&(xs===null?Ql=xs=e:xs=xs.next=e),Jl=!0,Tu||(Tu=!0,xx())}function yi(e,t){if(!_u&&Jl){_u=!0;do for(var r=!1,i=Ql;i!==null;){if(e!==0){var d=i.pendingLanes;if(d===0)var h=0;else{var _=i.suspendedLanes,U=i.pingedLanes;h=(1<<31-Re(42|e)+1)-1,h&=d&~(_&~U),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(r=!0,mm(i,h))}else h=ot,h=zt(i,i===Tt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(h&3)===0||Je(i,h)||(r=!0,mm(i,h));i=i.next}while(r);_u=!1}}function bx(){fm()}function fm(){Jl=Tu=!1;var e=0;sr!==0&&Ax()&&(e=sr);for(var t=Ee(),r=null,i=Ql;i!==null;){var d=i.next,h=hm(i,t);h===0?(i.next=null,r===null?Ql=d:r.next=d,d===null&&(xs=r)):(r=i,(e!==0||(h&3)!==0)&&(Jl=!0)),i=d}Wt!==0&&Wt!==5||yi(e),sr!==0&&(sr=0)}function hm(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,d=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var _=31-Re(h),U=1<<_,te=d[_];te===-1?((U&r)===0||(U&i)!==0)&&(d[_]=He(U,t)):te<=t&&(e.expiredLanes|=U),h&=~U}if(t=Tt,r=ot,r=zt(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,r===0||e===t&&(xt===2||xt===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&ge(i),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Je(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(i!==null&&ge(i),Xt(r)){case 2:case 8:r=qe;break;case 32:r=fe;break;case 268435456:r=$e;break;default:r=fe}return i=pm.bind(null,e),r=xe(r,i),e.callbackPriority=t,e.callbackNode=r,t}return i!==null&&i!==null&&ge(i),e.callbackPriority=2,e.callbackNode=null,2}function pm(e,t){if(Wt!==0&&Wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Kl()&&e.callbackNode!==r)return null;var i=ot;return i=zt(e,e===Tt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Zp(e,i,t),hm(e,Ee()),e.callbackNode!=null&&e.callbackNode===r?pm.bind(null,e):null)}function mm(e,t){if(Kl())return null;Zp(e,t,!0)}function xx(){Rx(function(){(yt&6)!==0?xe(ke,bx):fm()})}function Eu(){if(sr===0){var e=ss;e===0&&(e=ut,ut<<=1,(ut&261888)===0&&(ut=256)),sr=e}return sr}function gm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jt(""+e)}function vm(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function jx(e,t,r,i,d){if(t==="submit"&&r&&r.stateNode===d){var h=gm((d[Kt]||null).action),_=i.submitter;_&&(t=(t=_[Kt]||null)?gm(t.formAction):_.getAttribute("formAction"),t!==null&&(h=t,_=null));var U=new ul("action","action",null,i,d);e.push({event:U,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(sr!==0){var te=_?vm(d,_):new FormData(d);Xc(r,{pending:!0,data:te,method:d.method,action:h},null,te)}}else typeof h=="function"&&(U.preventDefault(),te=_?vm(d,_):new FormData(d),Xc(r,{pending:!0,data:te,method:d.method,action:h},h,te))},currentTarget:d}]})}}for(var ku=0;ku<dc.length;ku++){var Au=dc[ku],Sx=Au.toLowerCase(),wx=Au[0].toUpperCase()+Au.slice(1);ta(Sx,"on"+wx)}ta(Xf,"onAnimationEnd"),ta(Zf,"onAnimationIteration"),ta(Kf,"onAnimationStart"),ta("dblclick","onDoubleClick"),ta("focusin","onFocus"),ta("focusout","onBlur"),ta(Ib,"onTransitionRun"),ta(Pb,"onTransitionStart"),ta($b,"onTransitionCancel"),ta(Qf,"onTransitionEnd"),Hn("onMouseEnter",["mouseout","mouseover"]),Hn("onMouseLeave",["mouseout","mouseover"]),Hn("onPointerEnter",["pointerout","pointerover"]),Hn("onPointerLeave",["pointerout","pointerover"]),En("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),En("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),En("onBeforeInput",["compositionend","keypress","textInput","paste"]),En("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),En("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),En("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bi="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(" "),Nx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bi));function ym(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],d=i.event;i=i.listeners;e:{var h=void 0;if(t)for(var _=i.length-1;0<=_;_--){var U=i[_],te=U.instance,ue=U.currentTarget;if(U=U.listener,te!==h&&d.isPropagationStopped())break e;h=U,d.currentTarget=ue;try{h(d)}catch(be){hl(be)}d.currentTarget=null,h=te}else for(_=0;_<i.length;_++){if(U=i[_],te=U.instance,ue=U.currentTarget,U=U.listener,te!==h&&d.isPropagationStopped())break e;h=U,d.currentTarget=ue;try{h(d)}catch(be){hl(be)}d.currentTarget=null,h=te}}}}function lt(e,t){var r=t[Ba];r===void 0&&(r=t[Ba]=new Set);var i=e+"__bubble";r.has(i)||(bm(t,e,2,!1),r.add(i))}function Ou(e,t,r){var i=0;t&&(i|=4),bm(r,e,i,t)}var Wl="_reactListening"+Math.random().toString(36).slice(2);function Ru(e){if(!e[Wl]){e[Wl]=!0,xr.forEach(function(r){r!=="selectionchange"&&(Nx.has(r)||Ou(r,!1,e),Ou(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wl]||(t[Wl]=!0,Ou("selectionchange",!1,t))}}function bm(e,t,r,i){switch(Xm(t)){case 2:var d=Jx;break;case 8:d=Wx;break;default:d=Yu}r=d.bind(null,t,r,e),d=void 0,!$s||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),i?d!==void 0?e.addEventListener(t,r,{capture:!0,passive:d}):e.addEventListener(t,r,!0):d!==void 0?e.addEventListener(t,r,{passive:d}):e.addEventListener(t,r,!1)}function Du(e,t,r,i,d){var h=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var _=i.tag;if(_===3||_===4){var U=i.stateNode.containerInfo;if(U===d)break;if(_===4)for(_=i.return;_!==null;){var te=_.tag;if((te===3||te===4)&&_.stateNode.containerInfo===d)return;_=_.return}for(;U!==null;){if(_=nn(U),_===null)return;if(te=_.tag,te===5||te===6||te===26||te===27){i=h=_;continue e}U=U.parentNode}}i=i.return}Nr(function(){var ue=h,be=Ps(r),Se=[];e:{var de=Jf.get(e);if(de!==void 0){var me=ul,De=e;switch(e){case"keypress":if(ol(r)===0)break e;case"keydown":case"keyup":me=vb;break;case"focusin":De="focus",me=nc;break;case"focusout":De="blur",me=nc;break;case"beforeblur":case"afterblur":me=nc;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=_f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=sb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=xb;break;case Xf:case Zf:case Kf:me=ob;break;case Qf:me=Sb;break;case"scroll":case"scrollend":me=ab;break;case"wheel":me=Nb;break;case"copy":case"cut":case"paste":me=ub;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=kf;break;case"toggle":case"beforetoggle":me=Tb}var Pe=(t&4)!==0,Nt=!Pe&&(e==="scroll"||e==="scrollend"),ie=Pe?de!==null?de+"Capture":null:de;Pe=[];for(var ae=ue,oe;ae!==null;){var je=ae;if(oe=je.stateNode,je=je.tag,je!==5&&je!==26&&je!==27||oe===null||ie===null||(je=un(ae,ie),je!=null&&Pe.push(xi(ae,je,oe))),Nt)break;ae=ae.return}0<Pe.length&&(de=new me(de,De,null,r,be),Se.push({event:de,listeners:Pe}))}}if((t&7)===0){e:{if(de=e==="mouseover"||e==="pointerover",me=e==="mouseout"||e==="pointerout",de&&r!==oa&&(De=r.relatedTarget||r.fromElement)&&(nn(De)||De[tn]))break e;if((me||de)&&(de=be.window===be?be:(de=be.ownerDocument)?de.defaultView||de.parentWindow:window,me?(De=r.relatedTarget||r.toElement,me=ue,De=De?nn(De):null,De!==null&&(Nt=u(De),Pe=De.tag,De!==Nt||Pe!==5&&Pe!==27&&Pe!==6)&&(De=null)):(me=null,De=ue),me!==De)){if(Pe=_f,je="onMouseLeave",ie="onMouseEnter",ae="mouse",(e==="pointerout"||e==="pointerover")&&(Pe=kf,je="onPointerLeave",ie="onPointerEnter",ae="pointer"),Nt=me==null?de:va(me),oe=De==null?de:va(De),de=new Pe(je,ae+"leave",me,r,be),de.target=Nt,de.relatedTarget=oe,je=null,nn(be)===ue&&(Pe=new Pe(ie,ae+"enter",De,r,be),Pe.target=oe,Pe.relatedTarget=Nt,je=Pe),Nt=je,me&&De)t:{for(Pe=Cx,ie=me,ae=De,oe=0,je=ie;je;je=Pe(je))oe++;je=0;for(var Be=ae;Be;Be=Pe(Be))je++;for(;0<oe-je;)ie=Pe(ie),oe--;for(;0<je-oe;)ae=Pe(ae),je--;for(;oe--;){if(ie===ae||ae!==null&&ie===ae.alternate){Pe=ie;break t}ie=Pe(ie),ae=Pe(ae)}Pe=null}else Pe=null;me!==null&&xm(Se,de,me,Pe,!1),De!==null&&Nt!==null&&xm(Se,Nt,De,Pe,!0)}}e:{if(de=ue?va(ue):window,me=de.nodeName&&de.nodeName.toLowerCase(),me==="select"||me==="input"&&de.type==="file")var gt=zf;else if(Mf(de))if(Bf)gt=Ub;else{gt=Lb;var Ue=Db}else me=de.nodeName,!me||me.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ue&&Oe(ue.elementType)&&(gt=zf):gt=Mb;if(gt&&(gt=gt(e,ue))){Uf(Se,gt,r,be);break e}Ue&&Ue(e,de,ue),e==="focusout"&&ue&&de.type==="number"&&ue.memoizedProps.value!=null&&Bs(de,"number",de.value)}switch(Ue=ue?va(ue):window,e){case"focusin":(Mf(Ue)||Ue.contentEditable==="true")&&(Qr=Ue,oc=ue,Zs=null);break;case"focusout":Zs=oc=Qr=null;break;case"mousedown":cc=!0;break;case"contextmenu":case"mouseup":case"dragend":cc=!1,Vf(Se,r,be);break;case"selectionchange":if(Bb)break;case"keydown":case"keyup":Vf(Se,r,be)}var et;if(rc)e:{switch(e){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else Kr?Df(e,r)&&(ct="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ct="onCompositionStart");ct&&(Af&&r.locale!=="ko"&&(Kr||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&Kr&&(et=Cf()):(Ha=be,Wo="value"in Ha?Ha.value:Ha.textContent,Kr=!0)),Ue=eo(ue,ct),0<Ue.length&&(ct=new Ef(ct,e,null,r,be),Se.push({event:ct,listeners:Ue}),et?ct.data=et:(et=Lf(r),et!==null&&(ct.data=et)))),(et=Eb?kb(e,r):Ab(e,r))&&(ct=eo(ue,"onBeforeInput"),0<ct.length&&(Ue=new Ef("onBeforeInput","beforeinput",null,r,be),Se.push({event:Ue,listeners:ct}),Ue.data=et)),jx(Se,e,ue,r,be)}ym(Se,t)})}function xi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function eo(e,t){for(var r=t+"Capture",i=[];e!==null;){var d=e,h=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=un(e,r),d!=null&&i.unshift(xi(e,d,h)),d=un(e,t),d!=null&&i.push(xi(e,d,h))),e.tag===3)return i;e=e.return}return[]}function Cx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xm(e,t,r,i,d){for(var h=t._reactName,_=[];r!==null&&r!==i;){var U=r,te=U.alternate,ue=U.stateNode;if(U=U.tag,te!==null&&te===i)break;U!==5&&U!==26&&U!==27||ue===null||(te=ue,d?(ue=un(r,h),ue!=null&&_.unshift(xi(r,ue,te))):d||(ue=un(r,h),ue!=null&&_.push(xi(r,ue,te)))),r=r.return}_.length!==0&&e.push({event:t,listeners:_})}var Tx=/\r\n?/g,_x=/\u0000|\uFFFD/g;function jm(e){return(typeof e=="string"?e:""+e).replace(Tx,`
9
+ `).replace(_x,"")}function Sm(e,t){return t=jm(t),jm(e)===t}function wt(e,t,r,i,d,h){switch(r){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||ba(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&ba(e,""+i);break;case"className":Pa(e,"class",i);break;case"tabIndex":Pa(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Pa(e,r,i);break;case"style":ve(e,i,h);break;case"data":if(t!=="object"){Pa(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Jt(""+i),e.setAttribute(r,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(r==="formAction"?(t!=="input"&&wt(e,t,"name",d.name,d,null),wt(e,t,"formEncType",d.formEncType,d,null),wt(e,t,"formMethod",d.formMethod,d,null),wt(e,t,"formTarget",d.formTarget,d,null)):(wt(e,t,"encType",d.encType,d,null),wt(e,t,"method",d.method,d,null),wt(e,t,"target",d.target,d,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(r);break}i=Jt(""+i),e.setAttribute(r,i);break;case"onClick":i!=null&&(e.onclick=bt);break;case"onScroll":i!=null&&lt("scroll",e);break;case"onScrollEnd":i!=null&&lt("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}r=Jt(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""+i):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":i===!0?e.setAttribute(r,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(r,i):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(r,i):e.removeAttribute(r);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(r):e.setAttribute(r,i);break;case"popover":lt("beforetoggle",e),lt("toggle",e),Ia(e,"popover",i);break;case"xlinkActuate":mn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":mn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":mn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":mn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":mn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":mn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":mn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":mn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":mn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Ia(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Xe.get(r)||r,Ia(e,r,i))}}function Lu(e,t,r,i,d,h){switch(r){case"style":ve(e,i,h);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(r=i.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof i=="string"?ba(e,i):(typeof i=="number"||typeof i=="bigint")&&ba(e,""+i);break;case"onScroll":i!=null&&lt("scroll",e);break;case"onScrollEnd":i!=null&&lt("scrollend",e);break;case"onClick":i!=null&&(e.onclick=bt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jr.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),t=r.slice(2,d?r.length-7:void 0),h=e[Kt]||null,h=h!=null?h[r]:null,typeof h=="function"&&e.removeEventListener(t,h,d),typeof i=="function")){typeof h!="function"&&h!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,i,d);break e}r in e?e[r]=i:i===!0?e.setAttribute(r,""):Ia(e,r,i)}}}function ln(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",e),lt("load",e);var i=!1,d=!1,h;for(h in r)if(r.hasOwnProperty(h)){var _=r[h];if(_!=null)switch(h){case"src":i=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:wt(e,t,h,_,r,null)}}d&&wt(e,t,"srcSet",r.srcSet,r,null),i&&wt(e,t,"src",r.src,r,null);return;case"input":lt("invalid",e);var U=h=_=d=null,te=null,ue=null;for(i in r)if(r.hasOwnProperty(i)){var be=r[i];if(be!=null)switch(i){case"name":d=be;break;case"type":_=be;break;case"checked":te=be;break;case"defaultChecked":ue=be;break;case"value":h=be;break;case"defaultValue":U=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(o(137,t));break;default:wt(e,t,i,be,r,null)}}Zr(e,h,U,te,ue,_,d,!1);return;case"select":lt("invalid",e),i=_=h=null;for(d in r)if(r.hasOwnProperty(d)&&(U=r[d],U!=null))switch(d){case"value":h=U;break;case"defaultValue":_=U;break;case"multiple":i=U;default:wt(e,t,d,U,r,null)}t=h,r=_,e.multiple=!!i,t!=null?la(e,!!i,t,!1):r!=null&&la(e,!!i,r,!0);return;case"textarea":lt("invalid",e),h=d=i=null;for(_ in r)if(r.hasOwnProperty(_)&&(U=r[_],U!=null))switch(_){case"value":i=U;break;case"defaultValue":d=U;break;case"children":h=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:wt(e,t,_,U,r,null)}Is(e,i,d,h);return;case"option":for(te in r)r.hasOwnProperty(te)&&(i=r[te],i!=null)&&(te==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":wt(e,t,te,i,r,null));return;case"dialog":lt("beforetoggle",e),lt("toggle",e),lt("cancel",e),lt("close",e);break;case"iframe":case"object":lt("load",e);break;case"video":case"audio":for(i=0;i<bi.length;i++)lt(bi[i],e);break;case"image":lt("error",e),lt("load",e);break;case"details":lt("toggle",e);break;case"embed":case"source":case"link":lt("error",e),lt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in r)if(r.hasOwnProperty(ue)&&(i=r[ue],i!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:wt(e,t,ue,i,r,null)}return;default:if(Oe(t)){for(be in r)r.hasOwnProperty(be)&&(i=r[be],i!==void 0&&Lu(e,t,be,i,r,void 0));return}}for(U in r)r.hasOwnProperty(U)&&(i=r[U],i!=null&&wt(e,t,U,i,r,null))}function Ex(e,t,r,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,_=null,U=null,te=null,ue=null,be=null;for(me in r){var Se=r[me];if(r.hasOwnProperty(me)&&Se!=null)switch(me){case"checked":break;case"value":break;case"defaultValue":te=Se;default:i.hasOwnProperty(me)||wt(e,t,me,null,i,Se)}}for(var de in i){var me=i[de];if(Se=r[de],i.hasOwnProperty(de)&&(me!=null||Se!=null))switch(de){case"type":h=me;break;case"name":d=me;break;case"checked":ue=me;break;case"defaultChecked":be=me;break;case"value":_=me;break;case"defaultValue":U=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(o(137,t));break;default:me!==Se&&wt(e,t,de,me,i,Se)}}zs(e,_,U,te,ue,be,h,d);return;case"select":me=_=U=de=null;for(h in r)if(te=r[h],r.hasOwnProperty(h)&&te!=null)switch(h){case"value":break;case"multiple":me=te;default:i.hasOwnProperty(h)||wt(e,t,h,null,i,te)}for(d in i)if(h=i[d],te=r[d],i.hasOwnProperty(d)&&(h!=null||te!=null))switch(d){case"value":de=h;break;case"defaultValue":U=h;break;case"multiple":_=h;default:h!==te&&wt(e,t,d,h,i,te)}t=U,r=_,i=me,de!=null?la(e,!!r,de,!1):!!i!=!!r&&(t!=null?la(e,!!r,t,!0):la(e,!!r,r?[]:"",!1));return;case"textarea":me=de=null;for(U in r)if(d=r[U],r.hasOwnProperty(U)&&d!=null&&!i.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:wt(e,t,U,null,i,d)}for(_ in i)if(d=i[_],h=r[_],i.hasOwnProperty(_)&&(d!=null||h!=null))switch(_){case"value":de=d;break;case"defaultValue":me=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==h&&wt(e,t,_,d,i,h)}sl(e,de,me);return;case"option":for(var De in r)de=r[De],r.hasOwnProperty(De)&&de!=null&&!i.hasOwnProperty(De)&&(De==="selected"?e.selected=!1:wt(e,t,De,null,i,de));for(te in i)de=i[te],me=r[te],i.hasOwnProperty(te)&&de!==me&&(de!=null||me!=null)&&(te==="selected"?e.selected=de&&typeof de!="function"&&typeof de!="symbol":wt(e,t,te,de,i,me));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Pe in r)de=r[Pe],r.hasOwnProperty(Pe)&&de!=null&&!i.hasOwnProperty(Pe)&&wt(e,t,Pe,null,i,de);for(ue in i)if(de=i[ue],me=r[ue],i.hasOwnProperty(ue)&&de!==me&&(de!=null||me!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:wt(e,t,ue,de,i,me)}return;default:if(Oe(t)){for(var Nt in r)de=r[Nt],r.hasOwnProperty(Nt)&&de!==void 0&&!i.hasOwnProperty(Nt)&&Lu(e,t,Nt,void 0,i,de);for(be in i)de=i[be],me=r[be],!i.hasOwnProperty(be)||de===me||de===void 0&&me===void 0||Lu(e,t,be,de,i,me);return}}for(var ie in r)de=r[ie],r.hasOwnProperty(ie)&&de!=null&&!i.hasOwnProperty(ie)&&wt(e,t,ie,null,i,de);for(Se in i)de=i[Se],me=r[Se],!i.hasOwnProperty(Se)||de===me||de==null&&me==null||wt(e,t,Se,de,i,me)}function wm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),i=0;i<r.length;i++){var d=r[i],h=d.transferSize,_=d.initiatorType,U=d.duration;if(h&&U&&wm(_)){for(_=0,U=d.responseEnd,i+=1;i<r.length;i++){var te=r[i],ue=te.startTime;if(ue>U)break;var be=te.transferSize,Se=te.initiatorType;be&&wm(Se)&&(te=te.responseEnd,_+=be*(te<U?1:(U-ue)/(te-ue)))}if(--i,t+=8*(h+_)/(d.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Mu=null,Uu=null;function to(e){return e.nodeType===9?e:e.ownerDocument}function Nm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function zu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bu=null;function Ax(){var e=window.event;return e&&e.type==="popstate"?e===Bu?!1:(Bu=e,!0):(Bu=null,!1)}var Tm=typeof setTimeout=="function"?setTimeout:void 0,Ox=typeof clearTimeout=="function"?clearTimeout:void 0,_m=typeof Promise=="function"?Promise:void 0,Rx=typeof queueMicrotask=="function"?queueMicrotask:typeof _m<"u"?function(e){return _m.resolve(null).then(e).catch(Dx)}:Tm;function Dx(e){setTimeout(function(){throw e})}function ir(e){return e==="head"}function Em(e,t){var r=t,i=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(i===0){e.removeChild(d),Ns(t);return}i--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")i++;else if(r==="html")ji(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,ji(r);for(var h=r.firstChild;h;){var _=h.nextSibling,U=h.nodeName;h[_n]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&h.rel.toLowerCase()==="stylesheet"||r.removeChild(h),h=_}}else r==="body"&&ji(e.ownerDocument.body);r=d}while(r);Ns(t)}function km(e,t){var r=e;e=0;do{var i=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=i}while(r)}function Iu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Iu(r),bn(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Lx(e,t,r,i){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[_n])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Kn(e.nextSibling),e===null)break}return null}function Mx(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Kn(e.nextSibling),e===null))return null;return e}function Am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kn(e.nextSibling),e===null))return null;return e}function Pu(e){return e.data==="$?"||e.data==="$~"}function $u(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ux(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var i=function(){t(),r.removeEventListener("DOMContentLoaded",i)};r.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Kn(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var qu=null;function Om(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Kn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function Rm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function Dm(e,t,r){switch(t=to(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ji(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bn(e)}var Qn=new Map,Lm=new Set;function no(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var La=Q.d;Q.d={f:zx,r:Bx,D:Ix,C:Px,L:$x,m:qx,X:Gx,S:Hx,M:Fx};function zx(){var e=La.f(),t=Yl();return e||t}function Bx(e){var t=qn(e);t!==null&&t.tag===5&&t.type==="form"?Qh(t):La.r(e)}var js=typeof document>"u"?null:document;function Mm(e,t,r){var i=js;if(i&&typeof t=="string"&&t){var d=xn(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),Lm.has(d)||(Lm.add(d),e={rel:e,crossOrigin:r,href:t},i.querySelector(d)===null&&(t=i.createElement("link"),ln(t,"link",e),Ct(t),i.head.appendChild(t)))}}function Ix(e){La.D(e),Mm("dns-prefetch",e,null)}function Px(e,t){La.C(e,t),Mm("preconnect",e,t)}function $x(e,t,r){La.L(e,t,r);var i=js;if(i&&e&&t){var d='link[rel="preload"][as="'+xn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+xn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+xn(r.imageSizes)+'"]')):d+='[href="'+xn(e)+'"]';var h=d;switch(t){case"style":h=Ss(e);break;case"script":h=ws(e)}Qn.has(h)||(e=y({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Qn.set(h,e),i.querySelector(d)!==null||t==="style"&&i.querySelector(Si(h))||t==="script"&&i.querySelector(wi(h))||(t=i.createElement("link"),ln(t,"link",e),Ct(t),i.head.appendChild(t)))}}function qx(e,t){La.m(e,t);var r=js;if(r&&e){var i=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+xn(i)+'"][href="'+xn(e)+'"]',h=d;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=ws(e)}if(!Qn.has(h)&&(e=y({rel:"modulepreload",href:e},t),Qn.set(h,e),r.querySelector(d)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(wi(h)))return}i=r.createElement("link"),ln(i,"link",e),Ct(i),r.head.appendChild(i)}}}function Hx(e,t,r){La.S(e,t,r);var i=js;if(i&&e){var d=ht(i).hoistableStyles,h=Ss(e);t=t||"default";var _=d.get(h);if(!_){var U={loading:0,preload:null};if(_=i.querySelector(Si(h)))U.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Qn.get(h))&&Hu(e,r);var te=_=i.createElement("link");Ct(te),ln(te,"link",e),te._p=new Promise(function(ue,be){te.onload=ue,te.onerror=be}),te.addEventListener("load",function(){U.loading|=1}),te.addEventListener("error",function(){U.loading|=2}),U.loading|=4,ao(_,t,i)}_={type:"stylesheet",instance:_,count:1,state:U},d.set(h,_)}}}function Gx(e,t){La.X(e,t);var r=js;if(r&&e){var i=ht(r).hoistableScripts,d=ws(e),h=i.get(d);h||(h=r.querySelector(wi(d)),h||(e=y({src:e,async:!0},t),(t=Qn.get(d))&&Gu(e,t),h=r.createElement("script"),Ct(h),ln(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(d,h))}}function Fx(e,t){La.M(e,t);var r=js;if(r&&e){var i=ht(r).hoistableScripts,d=ws(e),h=i.get(d);h||(h=r.querySelector(wi(d)),h||(e=y({src:e,async:!0,type:"module"},t),(t=Qn.get(d))&&Gu(e,t),h=r.createElement("script"),Ct(h),ln(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(d,h))}}function Um(e,t,r,i){var d=(d=he.current)?no(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Ss(r.href),r=ht(d).hoistableStyles,i=r.get(t),i||(i={type:"style",instance:null,count:0,state:null},r.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Ss(r.href);var h=ht(d).hoistableStyles,_=h.get(e);if(_||(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,_),(h=d.querySelector(Si(e)))&&!h._p&&(_.instance=h,_.state.loading=5),Qn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Qn.set(e,r),h||Vx(d,e,r,_.state))),t&&i===null)throw Error(o(528,""));return _}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ws(r),r=ht(d).hoistableScripts,i=r.get(t),i||(i={type:"script",instance:null,count:0,state:null},r.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ss(e){return'href="'+xn(e)+'"'}function Si(e){return'link[rel="stylesheet"]['+e+"]"}function zm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Vx(e,t,r,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),ln(t,"link",r),Ct(t),e.head.appendChild(t))}function ws(e){return'[src="'+xn(e)+'"]'}function wi(e){return"script[async]"+e}function Bm(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+xn(r.href)+'"]');if(i)return t.instance=i,Ct(i),i;var d=y({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ct(i),ln(i,"style",d),ao(i,r.precedence,e),t.instance=i;case"stylesheet":d=Ss(r.href);var h=e.querySelector(Si(d));if(h)return t.state.loading|=4,t.instance=h,Ct(h),h;i=zm(r),(d=Qn.get(d))&&Hu(i,d),h=(e.ownerDocument||e).createElement("link"),Ct(h);var _=h;return _._p=new Promise(function(U,te){_.onload=U,_.onerror=te}),ln(h,"link",i),t.state.loading|=4,ao(h,r.precedence,e),t.instance=h;case"script":return h=ws(r.src),(d=e.querySelector(wi(h)))?(t.instance=d,Ct(d),d):(i=r,(d=Qn.get(h))&&(i=y({},r),Gu(i,d)),e=e.ownerDocument||e,d=e.createElement("script"),Ct(d),ln(d,"link",i),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,ao(i,r.precedence,e));return t.instance}function ao(e,t,r){for(var i=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=i.length?i[i.length-1]:null,h=d,_=0;_<i.length;_++){var U=i[_];if(U.dataset.precedence===t)h=U;else if(h!==d)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Hu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ro=null;function Im(e,t,r){if(ro===null){var i=new Map,d=ro=new Map;d.set(r,i)}else d=ro,i=d.get(r),i||(i=new Map,d.set(r,i));if(i.has(e))return i;for(i.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var h=r[d];if(!(h[_n]||h[Et]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var _=h.getAttribute(t)||"";_=e+_;var U=i.get(_);U?U.push(h):i.set(_,[h])}}return i}function Pm(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function Yx(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function $m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Xx(e,t,r,i){if(r.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=Ss(i.href),h=t.querySelector(Si(d));if(h){t=h._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=so.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=h,Ct(h);return}h=t.ownerDocument||t,i=zm(i),(d=Qn.get(d))&&Hu(i,d),h=h.createElement("link"),Ct(h);var _=h;_._p=new Promise(function(U,te){_.onload=U,_.onerror=te}),ln(h,"link",i),r.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=so.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Fu=0;function Zx(e,t){return e.stylesheets&&e.count===0&&lo(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var i=setTimeout(function(){if(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+t);0<e.imgBytes&&Fu===0&&(Fu=62500*kx());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>Fu?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(d)}}:null}function so(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var io=null;function lo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,io=new Map,t.forEach(Kx,e),io=null,so.call(e))}function Kx(e,t){if(!(t.state.loading&4)){var r=io.get(e);if(r)var i=r.get(null);else{r=new Map,io.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var _=d[h];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(r.set(_.dataset.precedence,_),i=_)}i&&r.set(null,i)}d=t.instance,_=d.getAttribute("data-precedence"),h=r.get(_)||i,h===i&&r.set(null,d),r.set(_,d),this.count++,i=so.bind(this),d.addEventListener("load",i),d.addEventListener("error",i),h?h.parentNode.insertBefore(d,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var Ni={$$typeof:R,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Qx(e,t,r,i,d,h,_,U,te){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nt(0),this.hiddenUpdates=nt(null),this.identifierPrefix=i,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function qm(e,t,r,i,d,h,_,U,te,ue,be,Se){return e=new Qx(e,t,r,_,te,ue,be,Se,U),t=1,h===!0&&(t|=24),h=On(3,null,null,t),e.current=h,h.stateNode=e,t=Nc(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:i,isDehydrated:r,cache:t},Ec(h),e}function Hm(e){return e?(e=es,e):es}function Gm(e,t,r,i,d,h){d=Hm(d),i.context===null?i.context=d:i.pendingContext=d,i=Za(t),i.payload={element:r},h=h===void 0?null:h,h!==null&&(i.callback=h),r=Ka(e,i,t),r!==null&&(Tn(r,e,t),ni(r,e,t))}function Fm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Vu(e,t){Fm(e,t),(e=e.alternate)&&Fm(e,t)}function Vm(e){if(e.tag===13||e.tag===31){var t=Er(e,67108864);t!==null&&Tn(t,e,67108864),Vu(e,67108864)}}function Ym(e){if(e.tag===13||e.tag===31){var t=Un();t=Bt(t);var r=Er(e,t);r!==null&&Tn(r,e,t),Vu(e,t)}}var oo=!0;function Jx(e,t,r,i){var d=V.T;V.T=null;var h=Q.p;try{Q.p=2,Yu(e,t,r,i)}finally{Q.p=h,V.T=d}}function Wx(e,t,r,i){var d=V.T;V.T=null;var h=Q.p;try{Q.p=8,Yu(e,t,r,i)}finally{Q.p=h,V.T=d}}function Yu(e,t,r,i){if(oo){var d=Xu(i);if(d===null)Du(e,t,i,co,r),Zm(e,i);else if(t0(d,e,t,r,i))i.stopPropagation();else if(Zm(e,i),t&4&&-1<e0.indexOf(e)){for(;d!==null;){var h=qn(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var _=mt(h.pendingLanes);if(_!==0){var U=h;for(U.pendingLanes|=2,U.entangledLanes|=2;_;){var te=1<<31-Re(_);U.entanglements[1]|=te,_&=~te}ha(h),(yt&6)===0&&(Fl=Ee()+500,yi(0))}}break;case 31:case 13:U=Er(h,2),U!==null&&Tn(U,h,2),Yl(),Vu(h,2)}if(h=Xu(i),h===null&&Du(e,t,i,co,r),h===d)break;d=h}d!==null&&i.stopPropagation()}else Du(e,t,i,null,r)}}function Xu(e){return e=Ps(e),Zu(e)}var co=null;function Zu(e){if(co=null,e=nn(e),e!==null){var t=u(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===31){if(e=p(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return co=e,null}function Xm(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(we()){case ke:return 2;case qe:return 8;case fe:case ze:return 32;case $e:return 268435456;default:return 32}default:return 32}}var Ku=!1,lr=null,or=null,cr=null,Ci=new Map,Ti=new Map,ur=[],e0="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".split(" ");function Zm(e,t){switch(e){case"focusin":case"focusout":lr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":Ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ti.delete(t.pointerId)}}function _i(e,t,r,i,d,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:h,targetContainers:[d]},t!==null&&(t=qn(t),t!==null&&Vm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function t0(e,t,r,i,d){switch(t){case"focusin":return lr=_i(lr,e,t,r,i,d),!0;case"dragenter":return or=_i(or,e,t,r,i,d),!0;case"mouseover":return cr=_i(cr,e,t,r,i,d),!0;case"pointerover":var h=d.pointerId;return Ci.set(h,_i(Ci.get(h)||null,e,t,r,i,d)),!0;case"gotpointercapture":return h=d.pointerId,Ti.set(h,_i(Ti.get(h)||null,e,t,r,i,d)),!0}return!1}function Km(e){var t=nn(e.target);if(t!==null){var r=u(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,on(e.priority,function(){Ym(r)});return}}else if(t===31){if(t=p(r),t!==null){e.blockedOn=t,on(e.priority,function(){Ym(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Xu(e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);oa=i,r.target.dispatchEvent(i),oa=null}else return t=qn(r),t!==null&&Vm(t),e.blockedOn=r,!1;t.shift()}return!0}function Qm(e,t,r){uo(e)&&r.delete(t)}function n0(){Ku=!1,lr!==null&&uo(lr)&&(lr=null),or!==null&&uo(or)&&(or=null),cr!==null&&uo(cr)&&(cr=null),Ci.forEach(Qm),Ti.forEach(Qm)}function fo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ku||(Ku=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,n0)))}var ho=null;function Jm(e){ho!==e&&(ho=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){ho===e&&(ho=null);for(var t=0;t<e.length;t+=3){var r=e[t],i=e[t+1],d=e[t+2];if(typeof i!="function"){if(Zu(i||r)===null)continue;break}var h=qn(r);h!==null&&(e.splice(t,3),t-=3,Xc(h,{pending:!0,data:d,method:r.method,action:i},i,d))}}))}function Ns(e){function t(te){return fo(te,e)}lr!==null&&fo(lr,e),or!==null&&fo(or,e),cr!==null&&fo(cr,e),Ci.forEach(t),Ti.forEach(t);for(var r=0;r<ur.length;r++){var i=ur[r];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ur.length&&(r=ur[0],r.blockedOn===null);)Km(r),r.blockedOn===null&&ur.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(i=0;i<r.length;i+=3){var d=r[i],h=r[i+1],_=d[Kt]||null;if(typeof h=="function")_||Jm(r);else if(_){var U=null;if(h&&h.hasAttribute("formAction")){if(d=h,_=h[Kt]||null)U=_.formAction;else if(Zu(d)!==null)continue}else U=_.action;typeof U=="function"?r[i+1]=U:(r.splice(i,3),i-=3),Jm(r)}}}function Wm(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(_){return d=_})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),i||setTimeout(r,20)}function r(){if(!i&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Qu(e){this._internalRoot=e}po.prototype.render=Qu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,i=Un();Gm(r,i,e,t,null,null)},po.prototype.unmount=Qu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gm(e.current,2,null,e,null,null),Yl(),t[tn]=null}};function po(e){this._internalRoot=e}po.prototype.unstable_scheduleHydration=function(e){if(e){var t=za();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ur.length&&t!==0&&t<ur[r].priority;r++);ur.splice(r,0,e),r===0&&Km(e)}};var eg=s.version;if(eg!=="19.2.8")throw Error(o(527,eg,"19.2.8"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var a0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mo.isDisabled&&mo.supportsFiber)try{tt=mo.inject(a0),ft=mo}catch{}}return ki.createRoot=function(e,t){if(!c(e))throw Error(o(299));var r=!1,i="",d=lp,h=op,_=cp;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(_=t.onRecoverableError)),t=qm(e,1,!1,null,null,r,i,null,d,h,_,Wm),e[tn]=t.current,Ru(e),new Qu(t)},ki.hydrateRoot=function(e,t,r){if(!c(e))throw Error(o(299));var i=!1,d="",h=lp,_=op,U=cp,te=null;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(_=r.onCaughtError),r.onRecoverableError!==void 0&&(U=r.onRecoverableError),r.formState!==void 0&&(te=r.formState)),t=qm(e,1,!0,t,r??null,i,d,te,h,_,U,Wm),t.context=Hm(null),r=t.current,i=Un(),i=Bt(i),d=Za(i),d.callback=null,Ka(r,d,i),r=i,t.current.lanes=r,Fe(t,r),ha(t),e[tn]=t.current,Ru(e),new po(t)},ki.version="19.2.8",ki}var ug;function h0(){if(ug)return ed.exports;ug=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),ed.exports=f0(),ed.exports}var p0=h0();const dg={"Invalid JSON. Check the file and try again.":"รูปแบบ JSON ไม่ถูกต้อง ตรวจไฟล์แล้วลองนำเข้าอีกครั้ง","A JSON test step could not be read. Give it a description or use a Scout step.":"อ่านขั้นตอนใน JSON ไม่สำเร็จ ใส่คำอธิบายขั้นตอนหรือใช้ขั้นตอนที่ส่งออกจาก Scout","Open page":"เปิดหน้าเว็บ","Fill field":"กรอกข้อมูล","Click button":"กดปุ่ม","Check page text":"ตรวจข้อความบนหน้า","Manual note":"บันทึกช่วยจำ","Step description":"คำอธิบายขั้นตอน","Field name on the page":"ชื่อช่องกรอกบนหน้าเว็บ","Button name on the page":"ชื่อปุ่มบนหน้าเว็บ","Fill with":"ใช้ข้อมูลจาก","Text I enter":"ข้อความที่ระบุเอง","Value to enter":"ค่าที่จะกรอก","Text that must appear":"ข้อความที่ต้องเห็น","Next action":"ขั้นตอนที่จะเพิ่ม","Project username":"ชื่อผู้ใช้ของโปรเจกต์","Project password":"รหัสผ่านของโปรเจกต์","Project email":"อีเมลของโปรเจกต์","Move up":"เลื่อนขึ้น","Move down":"เลื่อนลง","Edit steps":"แก้ไขขั้นตอน","Run log":"บันทึกการรัน","Page URL":"URL ของหน้าเว็บ","Add an action or a check to run this case.":"เพิ่มขั้นตอนหรือเงื่อนไขตรวจสอบเพื่อรันเคสนี้","Case details and tags":"รายละเอียดเคสและแท็ก","Enter a title and a unique case ID.":"กรอกชื่อเคสและรหัสเคสที่ไม่ซ้ำ","Enter a valid page URL.":"กรอก URL ของหน้าเว็บให้ถูกต้อง","Complete the control name or expected text in each step.":"กรอกชื่อปุ่ม ชื่อช่องกรอก หรือข้อความที่ต้องเห็นให้ครบ","Back to Test Cases":"กลับไปหน้าเคสทดสอบ","Selected cases":"เคสที่เลือก","Review selected cases":"เปิดเคสที่เลือกในหน้ารัน","Open this case in the runner":"เปิดเคสนี้ในหน้ารัน","Save and open runner":"บันทึกและเปิดหน้ารัน","Run this case":"รันเฉพาะเคสนี้","Could not load saved code.":"โหลดโค้ดที่บันทึกไว้ไม่สำเร็จ","Could not save the code. Please try again.":"บันทึกโค้ดไม่สำเร็จ ลองกดบันทึกอีกครั้ง","Loading saved code…":"กำลังโหลดโค้ดที่บันทึกไว้…",Retry:"ลองอีกครั้ง","Export Cypress code to run it with Cypress.":"กดบันทึกไฟล์เพื่อนำโค้ดไปรันด้วย Cypress","Could not load OCR. Check the connection and try again, or enter the text manually.":"โหลดเครื่องมืออ่านข้อความไม่สำเร็จ ตรวจการเชื่อมต่อแล้วลองอีกครั้ง หรือพิมพ์ข้อความจากภาพเองได้","OCR failed. Try a clearer image or enter the text manually.":"อ่านภาพไม่สำเร็จ ลองใช้ภาพที่ชัดขึ้น หรือพิมพ์ข้อความจากภาพเองได้","could not open the page — navigation failed":"เปิดหน้าเว็บเป้าหมายไม่สำเร็จ","could not connect — connection refused":"เว็บไซต์เป้าหมายปฏิเสธการเชื่อมต่อ ตรวจว่าเว็บเปิดอยู่และใช้พอร์ตถูกต้อง","could not resolve domain name — check the URL":"ค้นหาชื่อโดเมนไม่พบ ตรวจ URL ของเว็บไซต์เป้าหมาย","the SSL certificate of the website is invalid":"ใบรับรองความปลอดภัยของเว็บไซต์เป้าหมายไม่ถูกต้อง","could not open the page — timeout":"หมดเวลารอหน้าเว็บเป้าหมาย","could not connect — connection timeout":"หมดเวลารอเชื่อมต่อเว็บไซต์เป้าหมาย","could not open the page — page crash":"หน้าเว็บเป้าหมายหยุดทำงานขณะเปิด","could not open the page — navigation aborted":"การเปิดหน้าเว็บเป้าหมายถูกยกเลิก","Could not reach the LazyScout API.":"เชื่อมต่อ LazyScout บนเครื่องนี้ไม่ได้","Check that LazyScout is running on this device, then try again.":"ตรวจว่าเปิด LazyScout อยู่บนเครื่องนี้ แล้วลองอีกครั้ง","Check that the URL is correct and the website is available.":"ตรวจ URL และลองเปิดเว็บไซต์เป้าหมายในเบราว์เซอร์อีกครั้ง","Install a local Ollama text model, then check the connection again.":"ยังไม่มีโมเดล Ollama ที่ใช้ในเครื่องได้ ให้ติดตั้งโมเดลสร้างข้อความ แล้วกดทดสอบการเชื่อมต่ออีกครั้ง","The selected model does not support text generation.":"โมเดลที่เลือกสร้างข้อความไม่ได้ เลือกโมเดลสำหรับแชตแล้วทดสอบการเชื่อมต่ออีกครั้ง","Select an installed Ollama model that runs locally.":"เลือกโมเดล Ollama ที่ติดตั้งและทำงานบนเครื่องนี้ แล้วลองอีกครั้ง","The AI provider could not be reached or returned an unreadable response.":"ติดต่อผู้ให้บริการ AI ไม่ได้หรืออ่านคำตอบไม่ได้ ตรวจว่าเปิดบริการแล้วและ URL ถูกต้อง จากนั้นลองอีกครั้ง","The AI provider is temporarily unavailable.":"บริการ AI ไม่พร้อมใช้งานชั่วคราว กรุณาลองอีกครั้งภายหลัง","The AI provider rate limit was reached.":"ใช้บริการ AI ถึงขีดจำกัดแล้ว รอสักครู่หรือตรวจโควตาของบัญชีก่อนลองอีกครั้ง","This model requires available credits or billing.":"โมเดลนี้ต้องใช้เครดิต ตรวจยอดเครดิตและการเรียกเก็บเงินของบัญชี หรือเลือกโมเดลอื่น","The AI provider did not respond in time.":"หมดเวลารอคำตอบจากผู้ให้บริการ AI ตรวจการเชื่อมต่อแล้วลองอีกครั้ง","The AI provider timed out.":"ผู้ให้บริการ AI ตอบกลับไม่ทันเวลา กรุณาลองอีกครั้ง","The model or endpoint was not found.":"ไม่พบโมเดลหรือปลายทางที่ระบุ ตรวจ URL และเลือกโมเดลที่ติดตั้งอยู่ แล้วลองอีกครั้ง","The AI provider returned invalid JSON.":"ผู้ให้บริการตอบกลับในรูปแบบที่อ่านไม่ได้ ตรวจว่า URL เป็นปลายทาง API ของผู้ให้บริการที่เลือก","The provider did not return a model list.":"คำตอบจากผู้ให้บริการไม่มีรายการโมเดล ตรวจ URL ของ API แล้วลองอีกครั้ง","The AI provider refused authentication.":"ผู้ให้บริการยืนยันตัวตนไม่สำเร็จ ตรวจคีย์ API ของบัญชีแล้วลองอีกครั้ง","Access denied. Check whether this account can access the requested endpoint or model.":"บัญชีนี้ไม่มีสิทธิ์เข้าถึง ตรวจสิทธิ์ของบัญชีสำหรับ API หรือโมเดลที่เลือก","Cannot reach LazyScout. Check that it is running on this device, then try again.":"เชื่อมต่อ LazyScout บนเครื่องนี้ไม่ได้ ตรวจว่าโปรแกรมยังเปิดอยู่ แล้วลองอีกครั้ง","Enter the provider API key in AI Scout or configure it on the server.":"กรอกคีย์ API ใน AI Scout หรือตั้งค่าคีย์บนเซิร์ฟเวอร์ แล้วลองอีกครั้ง","The API key for this project and provider has expired or is unavailable.":"คีย์ที่บันทึกไว้ในโปรเจกต์นี้หมดอายุหรือใช้งานไม่ได้ กรอกคีย์อีกครั้ง","Use a loopback address for the local model server.":"กรอก URL ของบริการในเครื่อง เช่น http://localhost:11434 สำหรับ Ollama","Enter a valid API key without spaces.":"กรอกคีย์ API ที่ถูกต้องโดยไม่เว้นวรรค","Enter a valid provider base URL.":"กรอก URL ของบริการ AI ให้ถูกต้อง","The rule-based plan is ready to review.":"ระบบใช้กฎบนเครื่องสร้างแผนแทนแล้ว ตรวจแผนก่อนเริ่มทดสอบ","The AI provider could not finish the plan.":"ผู้ให้บริการ AI สร้างแผนไม่สำเร็จ","Codex is unavailable. Install or update Codex CLI, then try again.":"ติดต่อ Codex บนเครื่องนี้ไม่ได้ ติดตั้งหรืออัปเดต Codex CLI แล้วลองเชื่อมต่ออีกครั้ง","Connect your ChatGPT account before loading Codex models.":"ลงชื่อเข้าใช้ ChatGPT ผ่าน Codex ก่อนโหลดโมเดล","Codex returned no available models. Check your ChatGPT account and refresh the model list.":"บัญชี ChatGPT นี้ยังไม่มีโมเดลให้เลือก ตรวจบัญชีแล้วโหลดรายการโมเดลอีกครั้ง","Codex did not return its model list.":"Codex ไม่ได้ส่งรายการโมเดลกลับมา ลองโหลดรายการอีกครั้ง","Could not load models from Codex.":"โหลดรายการโมเดลจาก Codex ไม่สำเร็จ ลองอีกครั้ง","The sign-in code expired. Start a new attempt.":"รหัสลงชื่อเข้าใช้หมดอายุ กดเชื่อมต่ออีกครั้งเพื่อขอรหัสใหม่","ChatGPT sign-in did not finish. Start a new attempt.":"การลงชื่อเข้าใช้ ChatGPT ยังไม่สำเร็จ กรุณาเริ่มใหม่","Codex did not respond in time.":"Codex ตอบกลับไม่ทันเวลา ลองอีกครั้ง","The AI provider returned an empty response.":"ผู้ให้บริการ AI ส่งคำตอบว่างกลับมา กรุณาลองอีกครั้ง","The AI answer did not match the required JSON structure.":"คำตอบของ AI มีรูปแบบไม่ตรงกับที่ต้องใช้ ลองอีกครั้งหรือเลือกโมเดลอื่น","The AI provider returned no complete answer.":"AI ตอบกลับมาไม่ครบ ลองอีกครั้งหรือเลือกโมเดลอื่น","The AI provider returned an invalid result.":"อ่านผลลัพธ์จาก AI ไม่ได้ ลองอีกครั้งหรือเลือกโมเดลอื่น","OpenRouter Free accepts openrouter/free or a model ending in :free.":"เลือก openrouter/free หรือโมเดลที่ลงท้ายด้วย :free สำหรับ OpenRouter Free","LazyScout version":"เวอร์ชัน LazyScout","Choose your LazyScout version":"เลือกเวอร์ชัน LazyScout","Check again":"ตรวจสอบอีกครั้ง",Unavailable:"ไม่มีข้อมูล","Update available":"มีรุ่นใหม่","Up to date":"เป็นรุ่นล่าสุดแล้ว",Copied:"คัดลอกแล้ว","Copy command":"คัดลอกคำสั่ง",Current:"รุ่นปัจจุบัน","Installing…":"กำลังติดตั้ง…","Published on npm":"เผยแพร่บน npm","Could not check npm versions.":"ตรวจสอบเวอร์ชันบน npm ไม่สำเร็จ","Could not install this version.":"ติดตั้งเวอร์ชันนี้ไม่สำเร็จ","Visual check":"เทียบภาพ","Compare text, colors and layout with the image":"เปรียบเทียบข้อความ สี และการจัดวางกับภาพอ้างอิง","Text check":"ตรวจข้อความ","Create steps for text read from the image":"สร้างขั้นตอนตรวจสอบจากข้อความที่อ่านได้ในภาพ","Manual checklist":"รายการตรวจด้วยตนเอง","Create a checklist for a Tester to review":"สร้างรายการให้ผู้ทดสอบตรวจทีละข้อ","Ready to read the image.":"พร้อมอ่านข้อความจากภาพ","Reading Thai and English from the image…":"กำลังอ่านข้อความภาษาไทยและอังกฤษจากภาพ…","Reading complete. Review and edit the text before creating Test Cases.":"อ่านเสร็จแล้ว ตรวจและแก้ไขข้อความก่อนสร้างเคส","OCR failed.":"อ่านข้อความจากภาพไม่สำเร็จ",page:"หน้าเว็บ",dialog:"กล่องโต้ตอบ",tab:"แท็บ",accordion:"ส่วนพับได้",dropdown:"รายการแบบเลื่อนลง",drawer:"แผงเลื่อน",popover:"กล่องข้อมูลลอย",loading:"กำลังโหลด",success:"สำเร็จ",error:"ข้อผิดพลาด",unknown:"ไม่ทราบ",navigate:"เปิดหน้า",click:"คลิก",fill:"กรอกข้อมูล",select:"เลือก",check:"เลือกช่องทำเครื่องหมาย",wait:"รอ",assert:"ตรวจเงื่อนไข",assertText:"ตรวจข้อความ",assertUrl:"ตรวจ URL",assertVisible:"ตรวจว่ามองเห็น",assertInvalid:"ตรวจค่าที่ไม่ถูกต้อง",assertValidation:"ตรวจการแจ้งเตือนในฟอร์ม",openModal:"เปิดหน้าต่างโต้ตอบ",closeDialog:"ปิดกล่องโต้ตอบ",selectTab:"เลือกแท็บ",expandAccordion:"ขยายส่วนที่พับไว้",openDropdown:"เปิดรายการแบบเลื่อนลง",openDrawer:"เปิดแผงเลื่อน",expandMenu:"ขยายเมนู",breadcrumb:"ลิงก์ลำดับหน้า",pagination:"เปลี่ยนหน้า",other:"อื่น ๆ","Could not check the sign-in. Start again.":"ตรวจสอบการเข้าสู่ระบบไม่สำเร็จ กรุณาลองอีกครั้ง","The key could not be saved. This connection is available in the current tab.":"บันทึกคีย์ไม่สำเร็จ ใช้การเชื่อมต่อนี้ต่อได้ในแท็บปัจจุบัน","Could not remove the saved key.":"ล้างคีย์ที่บันทึกไว้ไม่สำเร็จ","Signed out of Codex on this device.":"ออกจากบัญชี Codex บนเครื่องนี้แล้ว","Code copied":"คัดลอกรหัสแล้ว","Select and copy the code above.":"เลือกและคัดลอกรหัสที่แสดงด้านบน","Could not connect.":"เชื่อมต่อไม่สำเร็จ","UI Coverage":"ความครอบคลุมของหน้าเว็บ","Playwright Automation":"สคริปต์ Playwright","Cypress Automation":"สคริปต์ Cypress","Bug Report Draft":"ร่างรายงานปัญหา","Recorded Test Execution":"ผลการทดสอบที่บันทึกไว้","Test Summary":"สรุปการทดสอบ",Summary:"สรุป","Coverage Gaps":"ส่วนที่ยังไม่ได้ทดสอบ","Execution Results":"ผลการทดสอบ","Free on this device":"ใช้ฟรีบนเครื่องนี้","Cloud with a free tier":"บริการคลาวด์ที่มีโควตาฟรี","Cloud · billing depends on your plan":"บริการคลาวด์ · คิดค่าบริการตามแพ็กเกจ","Other endpoints":"บริการอื่น","No AI / rules":"ใช้กฎบนเครื่อง (ไม่ใช้ AI)","ChatGPT / Codex (sign in)":"ChatGPT / Codex (ลงชื่อเข้าใช้)","Refresh Codex models":"โหลดรายการโมเดล Codex ใหม่","Test connection & load models":"ทดสอบการเชื่อมต่อและโหลดโมเดล",passed:"ผ่าน",failed:"ไม่ผ่าน",pending:"รอทดสอบ",queued:"อยู่ในคิว",completed:"เสร็จสิ้น",cancelled:"ยกเลิกแล้ว",stopped:"หยุดแล้ว",none:"ไม่มี",", not the whole HTML tag.":"โดยไม่ต้องใส่แท็ก HTML ทั้งบรรทัด",". Do not put real credentials in Value.":"และเว้นข้อมูลลับจริงออกจากช่องค่า",". If it is a named button, choose":"หากเป็นปุ่มที่มีชื่อ ให้เลือก","… and":"… และอีก","· Limit:":"· จำกัด","· Scope:":"· ขอบเขต","· Start:":"· จุดเริ่มต้น","›_ CLI Terminal":"›_ เทอร์มินัล CLI","(no title)":"(ไม่มีชื่อ)","/50 saved":"/50 ภาพที่บันทึก","+ Add Bug Report":"+ เพิ่มรายงานปัญหา","+ Add Row":"+ เพิ่มแถว","+ Add step":"+ เพิ่มขั้นตอน","+ Add Step":"+ เพิ่มขั้นตอน","+ New Flow":"+ สร้างชุดขั้นตอน","▶ Run again":"▶ รันอีกครั้ง","▶ Start Load Test":"▶ เริ่มทดสอบโหลด","◉ Event Stream":"◉ เหตุการณ์","○ Recorder idle":"○ พร้อมบันทึก","◎ Pick from page":"◎ เลือกจากหน้าเว็บ","● Recording":"● กำลังบันทึก","1 visual comparison case":"1 เคสสำหรับเปรียบเทียบภาพ","1. Open…\n2. Click…\n3. Observe…":`1. เปิด…
10
10
  2. คลิก…
11
- 3. สังเกต…`,accessibility:"การเข้าถึง","Accessible name":"ชื่อสำหรับโปรแกรมอ่านหน้าจอ","Accessible name:":"ชื่อสำหรับโปรแกรมอ่านหน้าจอ","Action type":"ประเภทการกระทำ",Actions:"จัดการ","actions,":"การกระทำ,","Actual Result":"ผลที่เกิดขึ้นจริง","Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here.":"เพิ่มรหัส Jira, ลิงก์ GitLab, ทิกเก็ต หรือลิงก์ข้อกำหนดในเคสทดสอบเพื่อติดตามความครอบคลุมที่นี่","Add page.screenshot() to edited Playwright code, save it, then run that Test Case.":"เพิ่ม page.screenshot() ในโค้ด Playwright บันทึกแล้วรันเคสนั้นเพื่อเก็บภาพ","Add suggested words":"เพิ่มคำที่แนะนำ","Add to Guided Flow":"เพิ่มในขั้นตอนทดสอบ","Advanced settings":"ตั้งค่าขั้นสูง","Agent execution":"การทำงานของเอเจนต์","AI Scout workspace":"พื้นที่ทำงาน AI Scout","AI tokens:":"โทเคน AI",All:"ทั้งหมด","All folders and tags":"ทุกโฟลเดอร์และแท็ก","All requests passed":"ทุกคำขอผ่าน","API key":"คีย์ API","API token":"โทเคน API","API Token":"โทเคน API","Approve and start":"ยืนยันและเริ่ม",Assertion:"เงื่อนไขตรวจสอบ","Authorized target":"สิทธิ์ในการทดสอบ","Auto Scout":"สำรวจอัตโนมัติ","Auto Scout finds the paths. Guided Scout follows yours.":"เลือกสำรวจอัตโนมัติเพื่อค้นหาเส้นทาง หรือกำหนดขั้นตอนให้ระบบทำตาม",Automation:"รันทดสอบ","Automation readiness":"ความพร้อมในการรันอัตโนมัติ","Automation source":"โค้ดทดสอบอัตโนมัติ","Automation Status":"สถานะการทดสอบอัตโนมัติ","Automation workspace":"พื้นที่รันทดสอบ",Average:"เฉลี่ย",Back:"ย้อนกลับ","Bar chart":"กราฟแท่งแนวนอน","Base URL":"URL เริ่มต้น","Beginner guide":"คู่มือเริ่มต้น","Block controls whose label contains one of these words":"ข้ามปุ่มหรือลิงก์ที่มีคำเหล่านี้",blocked:"ถูกบล็อก",Blocked:"ถูกบล็อก","Bring an existing suite into LazyScout":"นำชุดทดสอบเดิมมาใช้ใน LazyScout","Browser address":"ที่อยู่เว็บ","Bug ID":"รหัสปัญหา","Bug Report":"รายงานปัญหา","Bug Reports":"รายงานปัญหา","Bug Reports (":"รายงานปัญหา (",Buttons:"ปุ่ม","buttons ·":"ปุ่ม ·",Cancel:"ยกเลิก","Capture reproducible issues and keep screenshots with the local project.":"บันทึกปัญหาที่พบพร้อมขั้นตอนทำซ้ำและภาพหน้าจอไว้ในโปรเจกต์นี้",case:"เคส","Case coverage":"ความครอบคลุมของเคส",cases:"เคส",Cases:"เคส","cases linked":"เคสที่เชื่อมโยง",Chart:"กราฟ","ChatGPT connection":"การเชื่อมต่อ ChatGPT","Check that the LazyScout workspace is writable.":"ตรวจสอบว่าสามารถบันทึกไฟล์ลงในพื้นที่ทำงาน LazyScout ได้",Checked:"เลือกแล้ว","Checking npm Registry…":"กำลังตรวจสอบ npm Registry…","Checking…":"กำลังตรวจสอบ…","Choose a CSV, XLSX or JSON file":"เลือกไฟล์ CSV, XLSX หรือ JSON","Choose a Test Case pattern":"เลือกรูปแบบเคสทดสอบ","Choose OCR lines to create assertions (":"เลือกบรรทัดจากภาพที่จะใช้ตรวจสอบ (","Clear list":"ล้างรายการ","CLI output":"ผลลัพธ์จาก CLI","Click a node to view observed UI. Click a line to inspect the action that created it.":"คลิกจุดเพื่อดูสิ่งที่พบในหน้าเว็บ หรือคลิกเส้นเชื่อมเพื่อดูว่าการกระทำใดทำให้สถานะเปลี่ยน","Click safeguards":"ป้องกันการคลิกที่เสี่ยง","Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly.":"คลิก พิมพ์ วางข้อความ หรือเลื่อนหน้าเว็บที่นี่เพื่อส่งการกระทำให้ Playwright","Click to choose an image":"คลิกเพื่อเลือกภาพ",Close:"ปิด","Close editor":"ปิดตัวแก้ไข","Close explorer":"ปิดหน้าสำรวจ","Close generated code":"ปิดโค้ดที่สร้าง","Close recorder workspace":"ปิดเครื่องมือบันทึก","Close the current LazyScout terminal and run `lazyscout` again to switch versions.":"ปิดเทอร์มินัล LazyScout แล้วรัน `lazyscout` อีกครั้งเพื่อเปลี่ยนเวอร์ชัน","Close workspace":"ปิดพื้นที่ทำงาน",code:"โค้ด","Collapse Explorer":"พับตัวสำรวจ","Collapse sidebar":"พับแถบด้านข้าง","Collecting pages and controls":"กำลังเก็บข้อมูลหน้าเว็บและส่วนควบคุม","Collecting pages, controls and event logs.":"กำลังรวบรวมหน้าเว็บ ส่วนควบคุม และบันทึกเหตุการณ์","Column chart":"กราฟแท่งแนวตั้ง",Comparison:"เปรียบเทียบ",Complete:"เสร็จสิ้น",COMPLETED:"เสร็จสิ้น",Composition:"สัดส่วน","Control the recorder from the left and preview the target page on the right. Your clicks and typing become Test Steps. Passwords are never read and are saved as":"ใช้แผงด้านซ้ายควบคุมการบันทึกและดูหน้าเว็บทางด้านขวา การคลิกและการพิมพ์จะกลายเป็นขั้นตอนทดสอบ ระบบจะไม่อ่านรหัสผ่าน และจะบันทึกเป็น","Controlled traffic":"ปริมาณคำขอ",Copy:"คัดลอก","Copy Codex command":"คัดลอกคำสั่ง Codex","Copy locator":"คัดลอกตัวระบุ","Copy MCP settings":"คัดลอกการตั้งค่า MCP","Coverage and readiness for":"ความครอบคลุมและความพร้อมของ","Coverage at a glance":"ภาพรวมความครอบคลุม","Create a flow to define a deterministic path.":"สร้างชุดขั้นตอนเพื่อกำหนดเส้นทางทดสอบ","Create Draft Test Cases":"สร้างเคสฉบับร่าง","Create first Bug Report":"สร้างรายงานปัญหาแรก","Create Guided Flow":"สร้างชุดขั้นตอนทดสอบ","Create Test Cases from an image":"สร้างเคสทดสอบจากภาพ","Creating ZIP…":"กำลังสร้าง ZIP…",critical:"วิกฤต","CSS selector":"ตัวเลือก CSS","CSV, XLSX and JSON are supported. Fields are mapped automatically.":"รองรับ CSV, XLSX และ JSON ระบบจะจับคู่ช่องข้อมูลให้อัตโนมัติ","Cumulative Scout discovery trend":"แนวโน้มจำนวนรายการที่พบสะสม","Current Workspace":"พื้นที่ทำงานปัจจุบัน",Customize:"ปรับแต่ง","Dashboard layout":"จัดวางแดชบอร์ด","Defect tracking":"ติดตามข้อบกพร่อง","Define a path and LazyScout will follow it only.":"กำหนดเส้นทางที่ต้องการให้ LazyScout ทดสอบ",Delete:"ลบ","Delete Flow":"ลบชุดขั้นตอน","Delete project":"ลบโปรเจกต์","Delete this Flow?":"ลบชุดขั้นตอนนี้หรือไม่?",depth:"ระดับความลึก","Describe the defect so another person can reproduce it quickly.":"อธิบายปัญหาให้ผู้อื่นทำตามแล้วพบอาการเดียวกันได้",Description:"คำอธิบาย","Destructive actions blocked":"บล็อกการกระทำที่อาจทำให้ข้อมูลเสียหาย",Discard:"ทิ้ง",Discovered:"พบเมื่อ",discoveries:"รายการที่พบ",Dismiss:"ปิด","Dismiss notice":"ปิดแจ้งเตือน",DONE:"เสร็จสิ้น","Donut chart":"กราฟโดนัท","Double-click to edit":"ดับเบิลคลิกเพื่อแก้ไข",Download:"ดาวน์โหลด","Draft preview":"ตัวอย่างฉบับร่าง","draft test cases":"เคสฉบับร่าง","Drag to reorder":"ลากเพื่อจัดลำดับ",Duplicate:"ทำสำเนา","Duplicate IDs are replaced with a new TC-IMPORT ID.":"ระบบจะสร้างรหัส TC-IMPORT ใหม่สำหรับรหัสที่ซ้ำ",duration:"ระยะเวลา",Edit:"แก้ไข","Edit code":"แก้ไขโค้ด","Edit Test Case":"แก้ไขเคสทดสอบ","Edit the generated file per Test Case, then run one case or selected cases.":"เลือกเคสเพื่อดูหรือแก้ไขสคริปต์ แล้วรันทีละเคสหรือรันพร้อมกัน","Edit value":"แก้ไขค่า","Element visible":"มองเห็นองค์ประกอบ",Email:"อีเมล","enabled to collect the API requests used by the page.":"เพื่อเก็บคำขอ API ที่หน้าเว็บใช้",English:"อังกฤษ","Enter only the selector value, for example":"กรอกเฉพาะค่าที่ใช้ค้นหา เช่น",Evidence:"หลักฐาน","Evidence screenshots":"ภาพหลักฐาน","Example:":"ตัวอย่าง","Example: Storefront regression":"เช่น ทดสอบหน้าร้าน","Execute only the steps defined here.":"รันเฉพาะขั้นตอนที่ระบุไว้ที่นี่","Execution result":"ผลการทดสอบ","Execution status":"สถานะการทดสอบ","Execution:":"การทำงาน","Expand Explorer":"ขยายตัวสำรวจ","Expand sidebar":"ขยายแถบด้านข้าง","Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result":"ช่องข้อมูลที่รองรับ ได้แก่ TC_ID, Title, Module, Folder, Tags, Requirements, Steps และ Expected Result","Expected Result":"ผลที่คาดหวัง","Expected value":"ค่าที่คาดหวัง",Explorer:"ตัวสำรวจ","Explorer mode":"โหมดสำรวจ","Explorer ready":"พร้อมสำรวจ","Explorer view":"มุมมองการสำรวจ","Export CSV":"ส่งออก CSV","Export PDF":"ส่งออก PDF","Export ZIP + images":"ส่งออก ZIP พร้อมภาพ","Exporting…":"กำลังส่งออก…","External custom URLs must also be configured on the LazyScout server.":"หากใช้ URL ภายนอกที่กำหนดเอง ให้ตั้งค่าบนเซิร์ฟเวอร์ LazyScout ด้วย",FAIL:"ไม่ผ่าน",Failed:"ไม่ผ่าน",FAILED:"ไม่ผ่าน","failed ·":"ไม่ผ่าน ·",Field:"ช่องข้อมูล","Fill credentials and verify the next URL":"กรอกข้อมูลเข้าสู่ระบบแล้วตรวจสอบ URL ถัดไป",Filtered:"ตามตัวกรอง",Fingerprint:"ลายนิ้วมือสถานะ","First time using Guided Flow?":"เพิ่งเริ่มทดสอบตามขั้นตอนใช่ไหม?",Fit:"พอดีจอ","Flow name":"ชื่อชุดขั้นตอน","Flow Steps":"ขั้นตอนทดสอบ",Folder:"โฟลเดอร์","Folder / Module":"โฟลเดอร์ / โมดูล","Folder coverage":"ความครอบคลุมตามโฟลเดอร์","Folder treemap":"แผนภูมิต้นไม้ตามโฟลเดอร์","Follow three steps to create Draft Test Cases for review.":"ทำตาม 3 ขั้นตอนเพื่อสร้างเคสฉบับร่างไว้ตรวจทาน","For uploads, create a draft first and choose a safe test file before running.":"สำหรับการอัปโหลด ให้สร้างฉบับร่างและเลือกไฟล์ทดสอบที่ปลอดภัยก่อนรัน","For usernames and passwords, leave Value empty and use":"สำหรับชื่อผู้ใช้และรหัสผ่าน ให้เว้นช่องค่าแล้วเลือก","Forms:":"ฟอร์ม",Forward:"ถัดไป",From:"จาก","Generate Cypress":"สร้างสคริปต์ Cypress","Generate Playwright":"สร้างสคริปต์ Playwright","Generate Test Case":"สร้างเคสทดสอบ","generated source":"โค้ดที่สร้าง","Generated Tests":"สคริปต์ทดสอบ","GET only · Local runner":"เฉพาะ GET · รันบนเครื่องนี้","globally? Restart LazyScout after installation to use it.":"ทั่วทั้งเครื่องหรือไม่? หลังติดตั้งให้เปิด LazyScout ใหม่",Go:"ไป",Guide:"คู่มือ","Guided Flow":"ทดสอบตามขั้นตอน","Guided Flow Guide":"คู่มือการทดสอบตามขั้นตอน","Guided Flows":"ชุดขั้นตอนทดสอบ","Headings (":"หัวเรื่อง (",Hierarchy:"โครงสร้าง",high:"สูง",High:"สูง","Hover preview":"ตัวอย่างเมื่อชี้เมาส์","Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock.":"เลื่อนเมาส์เพื่อดูตัวอย่าง คลิกเพื่อเลือกองค์ประกอบ คลิกองค์ประกอบอื่นเพื่อเปลี่ยน หรือคลิกพื้นที่ว่างเพื่อยกเลิก","HTML report":"รายงาน HTML","HTTP performance workspace":"ทดสอบประสิทธิภาพ HTTP","HTTP Request Results":"ผลคำขอ HTTP",Huge:"ใหญ่มาก","I own this target or have permission to run a load test.":"ฉันเป็นเจ้าของเว็บไซต์นี้หรือได้รับอนุญาตให้ทดสอบโหลด","ID:":"รหัส","id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child":"มี id หรือ name ใช้ CSS · มีชื่อปุ่มหรือลิงก์ใช้บทบาท · มี label ใช้ป้ายกำกับ · มี data-testid ใช้ Test ID · หากไม่มีค่าคงที่ ใช้ CSS ขององค์ประกอบแม่และลูก","If it has an id, choose":"หากมี id ให้เลือก",Import:"นำเข้า","Import Test Cases":"นำเข้าเคสทดสอบ","in a Test Case. Values are passed to the runner only while it runs.":"ในเคสทดสอบ ค่าจะถูกส่งให้ตัวรันเฉพาะตอนที่รันเท่านั้น","in-progress":"กำลังแก้ไข","Include API checks from XHR/fetch":"รวมการตรวจสอบ API จาก XHR/fetch","Input Type":"ชนิดข้อมูล","input,":"ขาเข้า,",Inputs:"ช่องกรอก","inputs ·":"ช่องกรอก ·","Inputs without a label":"ช่องกรอกที่ไม่มีป้ายกำกับ","Inspect element":"ตรวจองค์ประกอบ","Inspecting element":"กำลังตรวจองค์ประกอบ",Install:"ติดตั้ง","Install the latest release or switch to an earlier published version before opening a workspace.":"ติดตั้งรุ่นล่าสุดหรือเลือกรุ่นที่เคยเผยแพร่ก่อนเปิดพื้นที่ทำงาน","Install v":"ติดตั้งรุ่น","installed.":"ติดตั้งแล้ว","Interact with the browser window opened by LazyScout. This modal controls the same recording session and prevents the target page from being opened a second time.":"โต้ตอบกับหน้าต่างเบราว์เซอร์ที่ LazyScout เปิดไว้ แผงนี้ควบคุมการบันทึกเดียวกัน",interaction:"การโต้ตอบ","interactions explored ·":"การโต้ตอบที่สำรวจ ·","Interactive Playwright browser":"เบราว์เซอร์ Playwright สำหรับโต้ตอบ",Interval:"ช่วงห่าง","Invalid Value":"ค่าที่ไม่ถูกต้อง","Keep running":"ทดสอบต่อ",Label:"ป้ายกำกับ",Labels:"ป้ายกำกับ",Large:"ใหญ่","Latest release":"รุ่นล่าสุด","Launching Playwright runner":"กำลังเปิด Playwright","LazyScout does not capture automatically. Add":"เมื่อต้องการเก็บภาพ ให้เพิ่ม","LazyScout v":"LazyScout รุ่น","Line chart":"กราฟเส้น","Linked cases":"เคสที่เชื่อมโยง",links:"ลิงก์",Links:"ลิงก์","Live Playwright browser":"เบราว์เซอร์ Playwright แบบสด","Load Test":"ทดสอบโหลด","Load test is running":"กำลังทดสอบโหลด",Locator:"ตัวระบุตำแหน่ง",Locked:"เลือกค้างไว้","Login example":"ตัวอย่างการเข้าสู่ระบบ","Login success":"เข้าสู่ระบบสำเร็จ","Login validation":"ตรวจสอบการเข้าสู่ระบบ",low:"ต่ำ",Low:"ต่ำ",manual:"ทดสอบด้วยตนเอง",Manual:"ทดสอบด้วยตนเอง","Manual suite":"ชุดทดสอบด้วยตนเอง","Match the instruction":"ใช้ภาษาเดียวกับคำสั่ง","Maximum 100 per user":"สูงสุด 100 คำขอต่อคน","Maximum 20 concurrent users":"พร้อมกันได้สูงสุด 20 คน","Maximum pages":"จำนวนหน้าสูงสุด","Maximum total requests":"คำขอทั้งหมดสูงสุด","Maximum virtual users":"ผู้ใช้จำลองสูงสุด",medium:"ปานกลาง",Medium:"ปานกลาง",Method:"วิธีส่ง","Min / Max":"ต่ำสุด / สูงสุด",Model:"โมเดล",Module:"โมดูล",more:"รายการ","more requirements":"ข้อกำหนดเพิ่มเติม",ms:"มิลลิวินาที","Name:":"ชื่อ",navigation:"การนำทาง","Need Review":"รอตรวจทาน","Needs data":"รอข้อมูล","Needs review":"รอตรวจทาน","needs-data":"รอข้อมูล","needs-review":"รอตรวจทาน",negative:"กรณีผิดพลาด",Negative:"กรณีผิดพลาด","Network validation":"ตรวจสอบคำขอเครือข่าย","No Bug Reports yet":"ยังไม่มีรายงานปัญหา","No folders found.":"ยังไม่มีโฟลเดอร์","No Guided Flow selected":"ยังไม่ได้เลือกชุดขั้นตอน","No headings recorded":"ยังไม่มีหัวเรื่องที่บันทึก","No screenshots yet":"ยังไม่มีภาพหน้าจอ","No steps were recorded. Start again and interact with the page.":"ยังไม่มีขั้นตอนที่บันทึก ลองเริ่มใหม่แล้วคลิกหรือพิมพ์ในหน้าเว็บ","No steps yet.":"ยังไม่มีขั้นตอน","No Test Cases are available to generate.":"ยังไม่มีเคสสำหรับสร้างสคริปต์","No Test Cases match the current filters.":"ไม่มีเคสที่ตรงกับตัวกรอง","No Test Data matches the current filters.":"ไม่มีข้อมูลทดสอบที่ตรงกับตัวกรอง",Normal:"ปกติ","Not clicked (destructive)":"ข้ามการคลิกที่อาจทำให้ข้อมูลเสียหาย","Not linked":"ยังไม่ได้เชื่อมโยง","Not observed":"ยังไม่พบ","Not sure which locator to choose?":"ควรเลือกตัวระบุแบบไหน?",Note:"หมายเหตุ",Notes:"หมายเหตุ","Notes from Generator":"หมายเหตุจากตัวสร้างเคส","npm Registry is unavailable.":"เชื่อมต่อ npm Registry ไม่ได้",observed:"รายการที่พบ","Observed state":"สถานะที่พบ","Observed UI":"สิ่งที่พบบนหน้าเว็บ",of:"จาก",OFF:"ปิด",ON:"เปิด","once?":"หนึ่งครั้งหรือไม่?","One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control.":"ใส่หนึ่งคำต่อบรรทัด ระบบตรวจจากป้ายกำกับ ชื่อ รหัส และ URL โดยไม่แยกตัวพิมพ์เล็กหรือใหญ่","Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data.":"LazyScout ส่งเฉพาะ HTTP GET โดยจะไม่ส่งฟอร์ม เข้าสู่ระบบ หรือแก้ไขข้อมูลเป้าหมาย",open:"เปิด","Open AI Scout workspace":"เปิดพื้นที่ทำงาน AI Scout","Open LazyScout Guide":"เปิดคู่มือ LazyScout","Open recorder workspace":"เปิดเครื่องมือบันทึก","Open the target page in your browser and inspect the element you want to test.":"เปิดหน้าเป้าหมายในเบราว์เซอร์แล้วตรวจดูองค์ประกอบที่ต้องการทดสอบ","Open the visual Guided Flow guide":"เปิดคู่มือภาพการทดสอบตามขั้นตอน","Open visual Guided Flow guide":"เปิดคู่มือภาพการทดสอบตามขั้นตอน","Opening target URL":"กำลังเปิดเว็บไซต์เป้าหมาย","Opening workspace":"กำลังเปิดพื้นที่ทำงาน",Option:"ตัวเลือก",or:"หรือ","or drop a file here":"หรือลากไฟล์มาวางที่นี่",output:"ขาออก","Outputs:":"ผลลัพธ์",pages:"หน้า","pages ·":"หน้า ·","pages discovered":"หน้าที่พบ","pages explored":"หน้าที่สำรวจ","Pages that could not be opened (":"หน้าที่เปิดไม่ได้ (","pages,":"หน้า,",Pass:"ผ่าน",PASS:"ผ่าน",Passed:"ผ่าน",PASSED:"ผ่าน",Password:"รหัสผ่าน",Path:"เส้นทาง","Pause between each request":"ระยะพักระหว่างคำขอ",Pending:"รอทดสอบ",PENDING:"รอทดสอบ","pending execution":"รอรันทดสอบ","Pick the pattern that matches what you need to check.":"เลือกรูปแบบที่ตรงกับสิ่งที่ต้องการตรวจสอบ",Placeholder:"ข้อความตัวอย่างในช่อง","Plan preview":"ตรวจทานแผน","Playwright CLI output":"ผลลัพธ์จาก Playwright CLI","Playwright evidence":"หลักฐานจาก Playwright","Playwright is opening the website and collecting page data… This can take a few moments.":"Playwright กำลังเปิดเว็บไซต์และเก็บข้อมูลหน้าเว็บ อาจใช้เวลาสักครู่","Playwright locator":"ตัวระบุตำแหน่ง Playwright","Playwright Scout Log":"บันทึกการสำรวจด้วย Playwright","Please wait until Scout finishes.":"กรุณารอให้สำรวจเสร็จ","PNG, JPG and WEBP are supported.":"รองรับไฟล์ PNG, JPG และ WEBP",positive:"กรณีปกติ",Positive:"กรณีปกติ",Preconditions:"เงื่อนไขก่อนทดสอบ","Preconditions (one per line)":"เงื่อนไขก่อนทดสอบ (บรรทัดละข้อ)","Prefer Role + accessible name, or CSS when the button has a stable id.":"เลือกบทบาทและชื่อที่โปรแกรมอ่านหน้าจอใช้ หรือใช้ CSS หากปุ่มมี id ที่คงที่","Preparing MCP settings…":"กำลังเตรียมการตั้งค่า MCP…","Preparing your local QA tools…":"กำลังเตรียมเครื่องมือทดสอบ…","Previewing 10 of":"แสดงตัวอย่าง 10 จาก","Previous scan":"ผลการสำรวจครั้งก่อน",Priority:"ความสำคัญ","Priority comparison":"เปรียบเทียบความสำคัญ","Project actions":"จัดการโปรเจกต์","Project dashboard":"แดชบอร์ดโปรเจกต์","Project settings sections":"หมวดการตั้งค่าโปรเจกต์","Protected API action":"ยืนยันการส่งคำขอ API",Provider:"ผู้ให้บริการ","Published LazyScout versions":"รุ่น LazyScout ที่เผยแพร่","QA workspace":"พื้นที่ทำงาน QA","Quality overview":"ภาพรวมคุณภาพ","Read text from image":"อ่านข้อความจากภาพ","Read text from the image, or type it yourself":"อ่านข้อความจากภาพหรือพิมพ์เอง","Reading file…":"กำลังอ่านไฟล์…","Could not save the imported cases. Check that LazyScout is running and try again.":"บันทึกเคสที่นำเข้าไม่สำเร็จ ตรวจว่า LazyScout ยังเปิดอยู่ แล้วกดนำเข้าอีกครั้ง","Could not read the file.":"อ่านไฟล์ไม่สำเร็จ","No valid Test Cases were found. Check that the file contains TC_ID or Title.":"ไม่พบเคสทดสอบในไฟล์ ตรวจว่ามีคอลัมน์ TC_ID หรือ Title","Supported formats are CSV, XLSX and JSON.":"เลือกไฟล์ CSV, XLSX หรือ JSON","CSV contains an unclosed quoted value.":"ในไฟล์ CSV มีช่องที่ใส่เครื่องหมายคำพูดเปิดไว้โดยไม่ได้ปิด","Reading…":"กำลังอ่าน…",ready:"พร้อมทดสอบ",Ready:"พร้อมทดสอบ","Record a flow":"บันทึกขั้นตอนทดสอบ","Record and inspect":"บันทึกและตรวจสอบ","Record Flow · Planned":"บันทึกขั้นตอน · เร็ว ๆ นี้","Record Flow is planned for a future release":"การบันทึกขั้นตอนจะเพิ่มในรุ่นถัดไป","Recorded login":"บันทึกการเข้าสู่ระบบ","Recorded steps:":"ขั้นตอนที่บันทึก","Recording stopped. Save the Test Case from the left panel.":"หยุดบันทึกแล้ว กดบันทึกเป็นเคสทดสอบในแผงด้านซ้าย","Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases.":"การรีเฟรชจะปิด Playwright และยกเลิกเคสที่ยังไม่ได้รัน",Regenerate:"สร้างใหม่","Related Test Case":"เคสทดสอบที่เกี่ยวข้อง",Reload:"โหลดใหม่","Remove “":"ลบ “","Remove Guided Flow":"ลบชุดขั้นตอน",Rename:"เปลี่ยนชื่อ","Report sections":"ส่วนของรายงาน","Request settings":"การส่งคำขอ","Request URL":"URL ของคำขอ","Requested outputs":"ผลลัพธ์ที่ต้องการ",requests:"คำขอ","Requests / user":"คำขอต่อผู้ใช้","Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured.":"คำขอ XHR/fetch ที่พบระหว่างสำรวจ เมื่อกดรัน เซิร์ฟเวอร์จะส่งคำขอโดยใช้โทเคนของโปรเจกต์หากตั้งค่าไว้","requests…":"คำขอ…","Requests/sec":"คำขอต่อวินาที",required:"จำเป็น",Required:"จำเป็น",requirements:"ข้อกำหนด",Requirements:"ข้อกำหนด","Requirements / Tickets":"ข้อกำหนด / ทิกเก็ต","Requirements traceability":"การเชื่อมโยงข้อกำหนด",resolved:"แก้ไขแล้ว",Result:"ผลลัพธ์","Results are marked":"เคสที่สร้างจะมีสถานะ","Reuse existing observations where possible":"ใช้ข้อมูลที่เคยสำรวจเมื่อทำได้",review:"รอตรวจทาน","Review Test Cases":"ตรวจทานเคสทดสอบ","Review text and create cases":"ตรวจข้อความแล้วสร้างเคส",Role:"บทบาท","Role:":"บทบาท","rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together.":"แถว · ค่าที่สร้างเป็นเพียงตัวอย่าง ให้แทนด้วยข้อมูลทดสอบก่อนใช้ เมื่อส่งออก CSV จะรวมเคสและข้อมูลทดสอบไว้ด้วยกัน",Run:"รัน","Run Analyze with":"เริ่มสำรวจโดยเปิดตัวเลือก","Run API":"ทดสอบ API","Run Flow":"รันตามขั้นตอน","Run once":"รันหนึ่งครั้ง","Run report":"รายงานการทดสอบ","Run result:":"ผลการรัน","Run selected cases":"รันเคสที่เลือก",running:"กำลังใช้งาน",Running:"กำลังรัน",RUNNING:"กำลังรัน","Running now":"รุ่นที่กำลังใช้งาน","Running tests":"กำลังรันทดสอบ","Running…":"กำลังรัน…","Safe action":"การกระทำที่ปลอดภัย","Safe exploration only":"สำรวจเฉพาะการกระทำที่ปลอดภัย","Safe limits":"ขีดจำกัดการทดสอบ",Safety:"ความปลอดภัย",Save:"บันทึก","Save as Test Case":"บันทึกเป็นเคสทดสอบ","Save Bug Report":"บันทึกรายงานปัญหา","Save code":"บันทึกโค้ด","Save file":"ดาวน์โหลดไฟล์","Save Flow":"บันทึกขั้นตอน","Save Guided Flow":"บันทึกชุดขั้นตอน","Save the Flow, run it, then use the CLI error to adjust only the failing step.":"บันทึกขั้นตอนแล้วลองรัน หากพบข้อผิดพลาด ให้ดูข้อความจาก CLI แล้วแก้เฉพาะขั้นที่มีปัญหา","Save your changes?":"บันทึกการเปลี่ยนแปลงหรือไม่?","Saving…":"กำลังบันทึก…","scan complete":"สำรวจเสร็จแล้ว","Scope path":"เส้นทางในขอบเขต","Scout completed · Playwright events captured":"สำรวจเสร็จแล้ว · บันทึกเหตุการณ์ Playwright แล้ว","Scout discovery":"ผลการสำรวจ","Scout Log":"บันทึกการสำรวจ","Scout trend":"แนวโน้มการสำรวจ","Scouting website with Playwright":"กำลังสำรวจเว็บไซต์ด้วย Playwright","Screen name":"ชื่อหน้าจอ",screenshot:"ภาพหน้าจอ","Screenshot → Test Case":"สร้างเคสจากภาพหน้าจอ","Screenshot preview":"ตัวอย่างภาพหน้าจอ",Screenshots:"ภาพหน้าจอ","Screenshots (":"ภาพหน้าจอ (",Search:"ค้นหา","Search field, value or note":"ค้นหาช่องข้อมูล ค่า หรือหมายเหตุ","Search ID, title, expected result, steps, tags or requirements":"ค้นหารหัส ชื่อ ผลที่คาดหวัง ขั้นตอน แท็ก หรือข้อกำหนด","Search or select folder":"ค้นหาหรือเลือกโฟลเดอร์",seconds:"วินาที","Select a state or transition":"เลือกสถานะหรือเส้นเชื่อม","Select all":"เลือกทั้งหมด",selected:"รายการที่เลือก","Selected element":"องค์ประกอบที่เลือก","selected)":"รายการที่เลือก)","Send controlled GET traffic, compare response times, and inspect every HTTP response.":"ส่งคำขอ GET ตามจำนวนที่กำหนด เปรียบเทียบเวลาตอบสนอง และดูผลของแต่ละคำขอ","Set project target":"ตั้งเว็บไซต์เป้าหมาย",Severity:"ความรุนแรง","Show or hide charts":"เลือกกราฟที่ต้องการแสดง",Showing:"แสดง","Site Map":"แผนที่เว็บ",Size:"ขนาด",skipped:"ข้าม",Small:"เล็ก","Source URL":"URL ต้นทาง",Start:"เริ่ม","Start path":"เส้นทางเริ่มต้น","Start recording":"เริ่มบันทึก","Start the Cypress-style workspace to record clicks, typing, and element locators.":"เปิดเครื่องมือบันทึกเพื่อเก็บการคลิก การพิมพ์ และตำแหน่งองค์ประกอบ","Starting Playwright browser…":"กำลังเปิดเบราว์เซอร์ Playwright…","Starting…":"กำลังเริ่ม…","State detail":"รายละเอียดสถานะ","State Flow":"เส้นทางการเปลี่ยนสถานะ","State Tree":"โครงสร้างสถานะ",states:"สถานะ","states ·":"สถานะ ·",Status:"สถานะ",Step:"ขั้นตอน",steps:"ขั้นตอน",Steps:"ขั้นตอน","Steps to reproduce":"ขั้นตอนทำซ้ำ",Stop:"หยุด","Stop and refresh":"หยุดและรีเฟรช","Stop recording":"หยุดบันทึก","Stop run":"หยุดทดสอบ","Stop tests and refresh?":"หยุดทดสอบแล้วรีเฟรชหรือไม่?","Stop the running tests?":"หยุดการทดสอบที่กำลังรันอยู่หรือไม่?",STOPPED:"หยุดแล้ว","Stopping…":"กำลังหยุด…","Suggested destructive actions are blocked by default. Explorer skips them and an Automation run stops instead of clicking. Logout and sign-out actions remain available for QA testing.":"ระบบจะข้ามปุ่มที่อาจทำให้ข้อมูลเสียหายขณะสำรวจ และหยุดเมื่อพบระหว่างรันทดสอบ ส่วนปุ่มออกจากระบบยังทดสอบได้","Switch language":"เปลี่ยนภาษา","Switch to English (US)":"เปลี่ยนเป็นภาษาอังกฤษ (US)",Tag:"แท็ก",Tags:"แท็ก","Tags (comma separated)":"แท็ก (คั่นด้วยจุลภาค)","Target element":"องค์ประกอบเป้าหมาย","Target URL":"URL เป้าหมาย","Target:":"เป้าหมาย","TC ID":"รหัสเคส","TD ID":"รหัสข้อมูล","Test API":"ทดสอบ API","Test API (":"ทดสอบ API (","Test Case":"เคสทดสอบ","Test Case detail":"รายละเอียดเคสทดสอบ","Test Case language":"ภาษาของเคสทดสอบ","Test Case Review":"ตรวจทานเคสทดสอบ","Test Case table columns":"คอลัมน์ในตารางเคสทดสอบ","Test Case title":"ชื่อเคสทดสอบ","test cases":"เคสทดสอบ","Test Cases":"เคสทดสอบ","Test Cases (":"เคสทดสอบ (","Test Cases ready to import":"เคสพร้อมนำเข้า","Test Cases.":"เคสทดสอบ","Test configuration":"ตั้งค่าการทดสอบ","Test Data":"ข้อมูลทดสอบ","Test Data (":"ข้อมูลทดสอบ (","Test email":"อีเมลทดสอบ","Test files (":"ไฟล์ทดสอบ (","Test password":"รหัสผ่านทดสอบ","Test type":"ประเภทการทดสอบ","Test type comparison":"เปรียบเทียบประเภทการทดสอบ","Test username":"ชื่อผู้ใช้ทดสอบ",Tester:"ผู้ทดสอบ","Tester decision needed":"รอผู้ทดสอบตัดสินใจ","Tester-defined execution":"รันตามขั้นตอนที่กำหนด","Testing instruction":"สิ่งที่ต้องการทดสอบ",Text:"ข้อความ","Text color":"สีตัวอักษร","Text detected":"ข้อความที่พบ","Text size":"ขนาดตัวอักษร","Text visible":"มองเห็นข้อความ",Thai:"ไทย","The active Playwright session will be closed. Remaining selected Test Cases will not run.":"ระบบจะปิด Playwright และยกเลิกเคสที่เหลือในรอบนี้","The page is intentionally not embedded in an iframe.":"ดูหน้าเว็บในหน้าต่างเบราว์เซอร์ที่เปิดแยกไว้","The project will be removed from this local workspace. You can undo immediately afterward.":"โปรเจกต์จะถูกลบออกจากพื้นที่ทำงานนี้ คุณสามารถกดเลิกทำได้ทันทีหลังลบ","This request can create, update, or delete data. LazyScout will send it only once for this run.":"คำขอนี้อาจสร้าง แก้ไข หรือลบข้อมูล LazyScout จะส่งเพียงครั้งเดียวในรอบนี้",Time:"เวลา","Timeout per request":"ระยะหมดเวลาต่อคำขอ",Title:"ชื่อเรื่อง",To:"ไปยัง","to edited Playwright code when evidence is needed.":"ในสคริปต์ Playwright แล้วรันเคส",Total:"ทั้งหมด","Transition detail":"รายละเอียดการเปลี่ยนสถานะ",transitions:"การเปลี่ยนสถานะ",Treemap:"แผนภูมิต้นไม้",Trend:"แนวโน้ม","Try an invalid password and assert the alert":"ลองใช้รหัสผ่านผิดแล้วตรวจสอบข้อความแจ้งเตือน",Type:"ประเภท","UI State Explorer":"สำรวจสถานะหน้าเว็บ","UI state flow graph":"กราฟการเปลี่ยนสถานะหน้าเว็บ","UI states observed":"สถานะที่พบ",Undo:"เลิกทำ","unsafe actions blocked":"การกระทำที่ถูกบล็อก","Untitled bug":"ปัญหาที่ยังไม่มีชื่อ","Upload a Screenshot":"อัปโหลดภาพหน้าจอ","Upload up to 5 images at a time. Images are included in ZIP export.":"อัปโหลดได้ครั้งละ 5 ภาพ ภาพจะรวมอยู่ในไฟล์ ZIP ที่ส่งออก","URL contains":"URL มีข้อความนี้",Use:"ใช้","Use a Project Settings variable such as":"ใช้ตัวแปรจากการตั้งค่าโปรเจกต์ เช่น","Use a template, then replace labels and expected results with what you observed.":"เลือกตัวอย่างแล้วปรับชื่อและผลที่คาดหวังให้ตรงกับสิ่งที่พบบนหน้าเว็บ","Use CSS with a stable id or name. Example:":"ใช้ CSS ที่อ้างอิง id หรือ name ที่คงที่ เช่น","Use Label when the input has a real HTML label. It is also useful for validation checks.":"เลือกป้ายกำกับเมื่อช่องกรอกมี label ใน HTML วิธีนี้ใช้ตรวจสอบผลได้ด้วย","Use this element":"ใช้องค์ประกอบนี้",User:"ผู้ใช้",Username:"ชื่อผู้ใช้","Valid Value":"ค่าที่ถูกต้อง",validation:"ตรวจสอบข้อมูล",Validation:"ตรวจสอบข้อมูล","Validation:":"การตรวจสอบข้อมูล",Value:"ค่า","Value reference":"ตัวแปรอ้างอิง","Version Center":"จัดการเวอร์ชัน","View Test Case":"ดูเคสทดสอบ","Virtual users":"ผู้ใช้จำลอง","VS Code style editor · Ctrl+Space for suggestions.":"กด Ctrl+Space เพื่อดูคำแนะนำขณะเขียนโค้ด","Wait for element visible":"รอให้องค์ประกอบปรากฏ","Wait for text":"รอข้อความ","Wait for timeout":"รอตามเวลาที่กำหนด","Wait for URL":"รอ URL","Wait type":"รูปแบบการรอ","Waiting for all virtual users to complete their request budget…":"กำลังรอให้ผู้ใช้จำลองทุกคนส่งคำขอครบ…","Website exploration results":"ผลการสำรวจเว็บไซต์","Website explorer":"สำรวจเว็บไซต์","Website UI State Explorer":"สำรวจหน้าและสถานะของเว็บไซต์","What should I add next?":"เพิ่มอะไรต่อดี?","What went wrong?":"พบปัญหาอะไร?","When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here.":"เมื่อทดสอบไม่ผ่าน ให้บันทึกผลที่เกิดขึ้น ผลที่คาดหวัง ขั้นตอนทำซ้ำ และภาพหน้าจอที่นี่","Without requirement":"เคสที่ยังไม่มีข้อกำหนด","Working…":"กำลังดำเนินการ…","You can edit OCR text before importing.":"คุณแก้ไขข้อความที่อ่านจากภาพได้ก่อนนำเข้า"},p0={en:{overview:"Overview",testCases:"Test Cases",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"New project",projects:"Projects",files:"Files",settings:"Project settings",localWorkspace:"Local workspace",storedHere:"Projects are stored on this device",activeTarget:"Active project target",savedProject:"Saved project",newWorkspace:"New local workspace",scoutWebsite:"Scout a website",targetUrl:"Target URL",startPath:"Start Path",scopePath:"Scope Path",maxPages:"Max pages",maxDepth:"Max depth",language:"Test Case Language",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"Limit exploration to a specific page or path.",startPathHelp:"The page path where exploration should begin, such as /admin/users.",scopePathHelp:"Keep exploration under this path, such as /admin.",startPathHint:"Where to continue exploring after login",scopePathHint:"Limits exploration to this section",explore:"Explore",currentPageOnly:"Current page only",thisSection:"This section",entireSite:"Entire site",targetedGuideTitle:"How to use Targeted Exploration",targetedGuideTargetUrl:"Enter the main URL of the system you want LazyScout to explore.",targetedGuideStartPath:"Enter the path where exploration should begin, such as",targetedGuideScopePath:"Set a boundary such as",targetedGuideScopePathEnd:"so the flow does not move to other areas.",targetedGuideCurrentPage:"explores one page",targetedGuideThisSection:"explores only the scope",targetedGuideEntireSite:"explores the whole website",targetedGuideExample:"Example: Target URL = your system, Start Path = /admin/users, Scope Path = /admin, choose This section.",search:"Search",addCase:"Add Test Case",screenshot:"Screenshot",delete:"Delete",export:"Export CSV",activeProjectTarget:"Active project target",currentProject:"Current project",scoutDescription:"Enter a URL and let Playwright discover pages, controls, forms and UI states automatically.",scouting:"Scouting…",optional:"optional",targetUrlHelp:"The main website URL that LazyScout should open and explore, such as https://example.com.",maxPagesHelp:"Maximum number of pages Scout will inspect. Higher values may take longer.",maxDepthHelp:"Link depth from the starting page. 0 means one page; 1 means pages linked from it.",testLanguageHelp:"Language used for generated Test Case titles and details.",maxPagesDescription:"Maximum number of pages to inspect",maxDepthDescription:"Link depth to follow from the target page",testLanguageDescription:"Language used for generated Test Case details",safetyNotice:"Playwright stays within the same origin and avoids actions that can change or delete data.",includeApiChecks:"Include API checks from XHR/fetch",validationMatrix:"Full validation matrix included",validationMatrixHelp:"Generates required, invalid format, length, range, password policy, and failed-login Test Cases from detected form rules.",validationMatrixSafety:"Scout only discovers and generates these cases. Failed-login and server validation cases run once only when you start Automation.",waitAfterNavigation:"Wait after navigation",debugMode:"Debug mode",scoutAgain:"Scout again",regenerateProject:"Regenerate this project?",regenerateWarning:"Scout Site will replace the current discovered pages and generated Test Cases for this project.",regenerateHint:"Export any Test Cases you want to keep before confirming. Project Settings will remain unchanged.",cancel:"Cancel",expandScout:"Expand Scout form",collapseScout:"Collapse Scout form",help:"Help"},th:{overview:"ภาพรวม",testCases:"เคสทดสอบ",automation:"รันทดสอบ",scoutLog:"บันทึกการสำรวจ",explorer:"ตัวสำรวจ",newProject:"โปรเจกต์ใหม่",projects:"โปรเจกต์",files:"ไฟล์",settings:"ตั้งค่าโปรเจกต์",localWorkspace:"พื้นที่ทำงานในเครื่อง",storedHere:"โปรเจกต์ถูกเก็บไว้ในอุปกรณ์นี้",activeTarget:"เว็บไซต์ของโปรเจกต์",savedProject:"บันทึกแล้ว",newWorkspace:"พื้นที่ทำงานใหม่",scoutWebsite:"สำรวจเว็บไซต์",targetUrl:"URL เป้าหมาย",startPath:"เส้นทางเริ่มต้น",scopePath:"เส้นทางในขอบเขต",maxPages:"จำนวนหน้าสูงสุด",maxDepth:"ระดับความลึก",language:"ภาษาของเคสทดสอบ",english:"อังกฤษ",thai:"ไทย",scoutSite:"สำรวจเว็บไซต์",targetedExploration:"กำหนดขอบเขตการสำรวจ",targetedExplorationHelp:"เลือกหน้าหรือส่วนของเว็บไซต์ที่ต้องการสำรวจ",startPathHelp:"หน้าเริ่มต้นภายในเว็บไซต์ เช่น /admin/users ใช้เมื่ออยากเริ่มจากหน้าลึก ๆ",scopePathHelp:"สำรวจเฉพาะหน้าภายใต้เส้นทางนี้ เช่น /admin",startPathHint:"หน้าที่ต้องการให้เริ่มสำรวจหลังเข้าสู่ระบบ",scopePathHint:"จำกัดการสำรวจให้อยู่ในส่วนนี้",explore:"ขอบเขตการสำรวจ",currentPageOnly:"สำรวจหน้าเดียว",thisSection:"สำรวจเฉพาะส่วนนี้",entireSite:"สำรวจทั้งเว็บไซต์",targetedGuideTitle:"วิธีกำหนดขอบเขตการสำรวจ",targetedGuideTargetUrl:"ใส่ URL หลักของระบบที่ต้องการให้ LazyScout สำรวจ",targetedGuideStartPath:"ใส่เส้นทางที่ต้องการเริ่มสำรวจ เช่น",targetedGuideScopePath:"ใส่ขอบเขต เช่น",targetedGuideScopePathEnd:"เพื่อสำรวจเฉพาะส่วนที่ต้องการ",targetedGuideCurrentPage:"สำรวจเพียงหน้าเดียว",targetedGuideThisSection:"สำรวจเฉพาะส่วนที่กำหนด",targetedGuideEntireSite:"สำรวจทั้งเว็บไซต์",targetedGuideExample:"ตัวอย่าง หากต้องการสำรวจส่วนผู้ดูแลระบบ ให้ใส่ URL ของเว็บไซต์ กำหนดเส้นทางเริ่มต้นเป็น /admin/users กำหนดขอบเขตเป็น /admin แล้วเลือก “สำรวจเฉพาะส่วนนี้”",search:"ค้นหา",addCase:"เพิ่มเคสทดสอบ",screenshot:"ภาพหน้าจอ",delete:"ลบ",export:"ส่งออก CSV",activeProjectTarget:"เว็บไซต์เป้าหมายของโปรเจกต์",currentProject:"โปรเจกต์ปัจจุบัน",scoutDescription:"ใส่ URL แล้วให้ Playwright ค้นหาหน้า ปุ่ม ฟอร์ม และสถานะ UI โดยอัตโนมัติ",scouting:"กำลังสำรวจ…",optional:"ไม่บังคับ",targetUrlHelp:"URL หลักของเว็บไซต์ที่ต้องการให้ LazyScout เปิดและสำรวจ เช่น https://example.com",maxPagesHelp:"จำนวนหน้าสูงสุดที่ Scout จะสำรวจ ค่ายิ่งมากอาจใช้เวลานานขึ้น",maxDepthHelp:"ระดับความลึกของลิงก์จากหน้าเริ่มต้น 0 คือหน้าเดียว และ 1 คือหน้าที่ลิงก์จากหน้านั้น",testLanguageHelp:"ภาษาที่ใช้สร้างชื่อและรายละเอียดของเคสทดสอบ",maxPagesDescription:"จำนวนหน้าสูงสุดที่จะสำรวจ",maxDepthDescription:"ระดับความลึกของลิงก์จากหน้าเป้าหมาย",testLanguageDescription:"ภาษาสำหรับรายละเอียดเคสที่สร้างใหม่",safetyNotice:"Playwright จะอยู่ภายใน origin เดียวกัน และหลีกเลี่ยงการกระทำที่อาจเปลี่ยนแปลงหรือลบข้อมูล",includeApiChecks:"รวมการตรวจสอบ API จาก XHR/fetch",validationMatrix:"สร้างเคสตรวจสอบข้อมูลในฟอร์ม",validationMatrixHelp:"สร้างเคสทดสอบช่องบังคับ รูปแบบ ความยาว ช่วงตัวเลข นโยบายรหัสผ่าน และการเข้าสู่ระบบไม่สำเร็จตามกฎที่พบในฟอร์ม",validationMatrixSafety:"ขั้นสำรวจจะสร้างเคสไว้ก่อน เคสที่ทดสอบการเข้าสู่ระบบไม่สำเร็จหรือตรวจสอบข้อมูลฝั่งเซิร์ฟเวอร์จะทำงานครั้งเดียวเมื่อคุณกดรันทดสอบ",waitAfterNavigation:"รอหลังเปลี่ยนหน้า",debugMode:"โหมดแก้จุดบกพร่อง",scoutAgain:"สำรวจอีกครั้ง",regenerateProject:"ต้องการสร้างข้อมูลของโปรเจกต์นี้ใหม่หรือไม่?",regenerateWarning:"การสำรวจรอบใหม่จะเขียนทับหน้าที่พบและเคสที่ระบบสร้างไว้ในโปรเจกต์นี้",regenerateHint:"ส่งออกเคสที่ต้องการเก็บไว้ก่อนยืนยัน การตั้งค่าโปรเจกต์จะคงเดิม",cancel:"ยกเลิก",expandScout:"ขยายฟอร์มสำรวจเว็บไซต์",collapseScout:"พับฟอร์มสำรวจเว็บไซต์",help:"คำอธิบาย"}},$v=L.createContext(null);function m0({children:a}){const[s,l]=L.useState(()=>localStorage.getItem("lazyscout-language")==="th"?"th":"en");L.useEffect(()=>{localStorage.setItem("lazyscout-language",s),document.documentElement.lang=s},[s]);const o=L.useMemo(()=>({language:s,setLanguage:l,ui:c=>s==="th"&&Object.hasOwn(dg,c)?dg[c]:c,toggleLanguage:()=>l(c=>c==="en"?"th":"en"),t:c=>p0[s][c]}),[s]);return n.jsx($v.Provider,{value:o,children:a})}function Le(){const a=L.useContext($v);if(!a)throw new Error("useLanguage must be used inside LanguageProvider");return a}const qv="lazyscout-test-case-language";function g0(){const a=localStorage.getItem(qv);return a==="th"||a==="en"?a:"en"}function $r({text:a}){const{t:s}=Le(),[l,o]=L.useState(!1);return n.jsxs("span",{className:`help-tip ${l?"is-open":""}`,children:[n.jsx("button",{type:"button","aria-label":s("help"),"aria-expanded":l,title:a,onClick:c=>{c.preventDefault(),c.stopPropagation(),o(u=>!u)},children:"?"}),n.jsx("span",{className:"help-tip-popover",role:"tooltip",children:a})]})}function v0({ref:a,hidden:s,loading:l,initialUrl:o="",hasExistingData:c=!1,initialLanguage:u,onLanguageChange:f,onOpenAiScout:p,onAnalyze:m}){const{ui:g,t:v,language:y}=Le(),[j,b]=L.useState(o),[E,N]=L.useState(20),[A,w]=L.useState(3),[S,O]=L.useState(u??g0),[D,M]=L.useState(!1),[F,X]=L.useState(750),[Z,$]=L.useState(""),[B,J]=L.useState(""),[z,H]=L.useState("site"),[T,K]=L.useState(!1),[V,Q]=L.useState(!1),W=L.useRef(null);L.useImperativeHandle(a,()=>({expand:()=>Q(!1),focusUrl(){Q(!1),requestAnimationFrame(()=>W.current?.focus())}}),[]);const[R,Y]=L.useState(!1),x=(()=>{try{return new URL(o).hostname}catch{return"Current project"}})();function C(I){if(I.preventDefault(),!(!j.trim()||l)){if(c){Y(!0);return}q()}}function q(){const I=Math.min(100,Math.max(1,E===""?20:E)),ee=Math.min(10,Math.max(0,A===""?3:A));m(j.trim(),I,ee,S,D,F,Z.trim()||void 0,B.trim()||void 0,z,T),Y(!1)}return n.jsxs("form",{hidden:s,onSubmit:C,className:o?"project-scout-card":"new-project-card",children:[o&&n.jsxs("div",{className:"project-target-heading",children:[n.jsx("span",{className:"target-glow",children:"◎"}),n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v("activeProjectTarget")}),n.jsx("h2",{title:x,children:x}),n.jsx("span",{children:o})]}),n.jsxs("span",{className:"target-status",children:[n.jsx("i",{})," ",v("savedProject")]}),n.jsx("button",{type:"button",className:`scout-collapse-btn ${V?"is-collapsed":""}`,onClick:()=>Q(I=>!I),"aria-expanded":!V,"aria-controls":"scout-form-options","aria-label":v(V?"expandScout":"collapseScout"),title:v(V?"expandScout":"collapseScout"),children:n.jsx("span",{children:"⌃"})})]}),!o&&n.jsxs("div",{className:"new-project-hero",children:[n.jsx("span",{className:"scout-orbit",children:"✦"}),n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v("localWorkspace")}),n.jsx("h2",{children:v("scoutWebsite")}),n.jsx("p",{children:v("scoutDescription")})]}),n.jsx("button",{type:"button",className:`scout-collapse-btn ${V?"is-collapsed":""}`,onClick:()=>Q(I=>!I),"aria-expanded":!V,"aria-controls":"scout-form-options","aria-label":v(V?"expandScout":"collapseScout"),title:v(V?"expandScout":"collapseScout"),children:n.jsx("span",{children:"⌃"})})]}),n.jsxs("div",{id:"scout-form-options",inert:V,className:`scout-form-body ${V?"is-collapsed":""}`,children:[n.jsxs("div",{className:"scout-form-grid",children:[n.jsxs("div",{className:"scout-url-field",children:[n.jsxs("label",{className:"field-label",htmlFor:"target-url",children:[v("targetUrl"),n.jsx($r,{text:v("targetUrlHelp")})]}),n.jsx("input",{id:"target-url",ref:W,className:"field",value:j,onChange:I=>b(I.target.value),placeholder:"https://example.com",autoComplete:"off",disabled:l})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label",htmlFor:"max-pages",children:[v("maxPages"),n.jsx($r,{text:v("maxPagesHelp")})]}),n.jsx("input",{id:"max-pages",className:"field",type:"number",min:1,max:100,value:E,onChange:I=>N(I.target.value===""?"":Math.min(100,Math.max(1,Number(I.target.value)))),disabled:l})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label",htmlFor:"max-depth",children:[v("maxDepth"),n.jsx($r,{text:v("maxDepthHelp")})]}),n.jsx("input",{id:"max-depth",className:"field",type:"number",min:0,max:10,value:A,onChange:I=>w(I.target.value===""?"":Math.min(10,Math.max(0,Number(I.target.value)))),disabled:l})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label",htmlFor:"test-language",children:[v("language"),n.jsx($r,{text:v("testLanguageHelp")})]}),n.jsxs("select",{id:"test-language",className:"field",value:S,onChange:I=>{const ee=I.target.value;O(ee),localStorage.setItem(qv,ee),f?.(ee)},disabled:l,children:[n.jsx("option",{value:"en",children:g("English")}),n.jsx("option",{value:"th",children:"ไทย"})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:flex-col md:items-stretch xl:flex-row xl:items-center",children:[n.jsx("button",{type:"submit",className:"btn btn-primary scout-submit",disabled:l||!j.trim(),children:v(l?"scouting":"scoutSite")}),p&&n.jsxs("button",{type:"button",disabled:l,onClick:p,"aria-label":g("Open AI Scout workspace"),title:y==="th"?"เชื่อม ChatGPT, เลือกโมเดล และตั้งค่า MCP":"Connect AI, choose a model and set up MCP",className:"inline-flex min-h-[38px] items-center justify-center gap-2 rounded-lg bg-indigo-700 px-3 text-sm font-semibold whitespace-nowrap text-white shadow-sm transition-colors hover:bg-indigo-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:opacity-50",children:[n.jsx("span",{"aria-hidden":"true",children:"✦"})," AI Scout",n.jsx("span",{"aria-hidden":"true",className:"rounded bg-white/15 px-1.5 py-0.5 text-[10px] tracking-wide",children:"MCP"})]})]})]}),!o&&n.jsxs("div",{className:"scout-options-help",children:[n.jsxs("span",{children:[n.jsx("b",{children:v("maxPages")})," ",v("maxPagesDescription")]}),n.jsxs("span",{children:[n.jsx("b",{children:v("maxDepth")})," ",v("maxDepthDescription")]}),n.jsxs("span",{children:[n.jsx("b",{children:v("language")})," ",v("testLanguageDescription")]})]}),n.jsxs("details",{className:"scout-advanced",children:[n.jsxs("summary",{children:[y==="th"?"ขอบเขตและตัวเลือกขั้นสูง":"Scope and advanced options",n.jsx("span",{children:v(z==="site"?"entireSite":z==="scope"?"thisSection":"currentPageOnly")})]}),n.jsxs("div",{className:"mt-3 border-t border-slate-100 pt-3",children:[n.jsxs("p",{className:"text-xs font-semibold text-slate-700 mb-2",children:[v("targetedExploration")," ",n.jsx($r,{text:v("targetedExplorationHelp")})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"field-label text-xs",htmlFor:"start-path",children:[v("startPath"),n.jsx($r,{text:v("startPathHelp")}),n.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",v("optional"),")"]})]}),n.jsx("input",{id:"start-path",className:"field text-sm",value:Z,onChange:I=>$(I.target.value),placeholder:"/admin/users",autoComplete:"off",disabled:l}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:v("startPathHint")})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label text-xs",htmlFor:"scope-path",children:[v("scopePath"),n.jsx($r,{text:v("scopePathHelp")}),n.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",v("optional"),")"]})]}),n.jsx("input",{id:"scope-path",className:"field text-sm",value:B,onChange:I=>J(I.target.value),placeholder:"/admin",autoComplete:"off",disabled:l}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:v("scopePathHint")})]})]}),n.jsxs("div",{className:"mt-3",children:[n.jsx("label",{className:"field-label text-xs",children:v("explore")}),n.jsxs("div",{className:"flex flex-wrap gap-4 mt-1",children:[n.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[n.jsx("input",{type:"radio",name:"explore-mode",value:"current-page",checked:z==="current-page",onChange:()=>H("current-page"),disabled:l}),v("currentPageOnly")]}),n.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[n.jsx("input",{type:"radio",name:"explore-mode",value:"scope",checked:z==="scope",onChange:()=>H("scope"),disabled:l}),v("thisSection")]}),n.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[n.jsx("input",{type:"radio",name:"explore-mode",value:"site",checked:z==="site",onChange:()=>H("site"),disabled:l}),v("entireSite")]})]})]})]}),n.jsxs("details",{className:"scout-guide",children:[n.jsx("summary",{children:v("targetedGuideTitle")}),n.jsxs("div",{className:"scout-guide-body",children:[n.jsx("img",{src:"/lazyscout-icon-v2.png",width:"40",height:"40",loading:"lazy",alt:"LazyScout"}),n.jsxs("div",{children:[n.jsxs("p",{children:[n.jsx("b",{children:v("targetUrl")})," ",v("targetedGuideTargetUrl")]}),n.jsxs("p",{children:[n.jsx("b",{children:v("startPath")})," ",v("targetedGuideStartPath")," ",n.jsx("code",{children:"/admin/users"})]}),n.jsxs("p",{children:[n.jsx("b",{children:v("scopePath")})," ",v("targetedGuideScopePath")," ",n.jsx("code",{children:"/admin"})," ",v("targetedGuideScopePathEnd")]}),n.jsxs("p",{children:[n.jsx("b",{children:v("currentPageOnly")})," ",v("targetedGuideCurrentPage")," · ",n.jsx("b",{children:v("thisSection")})," ",v("targetedGuideThisSection")," · ",n.jsx("b",{children:v("entireSite")})," ",v("targetedGuideEntireSite")]}),n.jsx("p",{className:"text-slate-500",children:v("targetedGuideExample")})]})]})]}),n.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-4 border-t border-slate-100 pt-3 text-xs text-slate-600",children:[n.jsxs("label",{className:"m-0 flex items-center gap-2",children:[n.jsx("input",{type:"checkbox",checked:D,onChange:I=>M(I.target.checked),className:"h-4 w-4",disabled:l})," ",v("includeApiChecks")]}),n.jsxs("label",{className:"m-0 flex items-center gap-2",children:[v("waitAfterNavigation")," ",n.jsx("input",{className:"field w-24",type:"number",min:0,max:5e3,step:250,value:F,onChange:I=>X(I.target.value===""?0:Number(I.target.value)),disabled:l})," ",g("ms")]}),n.jsxs("label",{className:"m-0 flex items-center gap-2",children:[n.jsx("input",{type:"checkbox",checked:T,onChange:I=>K(I.target.checked),className:"h-4 w-4",disabled:l})," ",v("debugMode")]})]})]})]}),R&&n.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal scout-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"scout-confirm-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v("scoutAgain")}),n.jsx("h2",{id:"scout-confirm-title",children:v("regenerateProject")})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>Y(!1),"aria-label":g("Close"),children:"×"})]}),n.jsxs("div",{className:"modal-body",children:[n.jsx("p",{children:v("regenerateWarning")}),n.jsx("p",{className:"text-sm text-slate-500",children:v("regenerateHint")})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Y(!1),children:v("cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:q,children:v("scoutSite")})]})]})})]})}function Hr(a){if(!/[<&]/.test(a))return a;const s=document.createElement("template");return s.innerHTML=a,s.content.textContent||a}function qr(a,s){try{const l=new URL(a,s);return!["https:","http:"].includes(l.protocol)||l.username||l.password?void 0:l}catch{return}}function y0(a,s,l){const o=new Map,c=new Map,u=new Set;for(const m of a?.pages??[]){const g=qr(m.finalUrl||m.url);g&&u.add(g.href)}for(const m of a?.pages??[]){const g=qr(m.finalUrl),v=qr(m.url);if(!v||!g||u.has(v.href))continue;const y=c.get(v.href);c.set(v.href,y&&y!==g.href?v.href:g.href)}function f(m){const g=qr(m);if(!g)return;const v=c.get(g.href)??g.href;let y=o.get(v);if(!y){const j=new URL(v);y={url:v,path:j.pathname+j.search+j.hash,title:"",cases:[],controls:new Set,links:new Set},o.set(v,y)}return y}f(s||a?.startUrl||"");for(const m of a?.pages??[]){const g=f(m.finalUrl||m.url);if(g){g.title||=m.title;for(const v of[...m.buttons,...m.inputs,...m.selects,...m.textareas]){const y=v.accessibleName||v.placeholder||v.text;y&&g.controls.add(y)}for(const v of m.links){const y=v.href&&qr(v.href,g.url);y&&g.links.add(c.get(y.href)??y.href)}}}for(const m of l)f(m.sourceUrl)?.cases.push(m);const p=new Map(a?.actionGraph.states.map(m=>[m.id,m.url]));for(const m of a?.actionGraph.edges??[]){if(!m.toStateId||m.status!=="visited")continue;const g=qr(p.get(m.fromStateId)??"")?.href,v=qr(p.get(m.toStateId)??"")?.href;g&&v&&o.get(c.get(g)??g)?.links.add(c.get(v)??v)}return[...o.values()]}const b0={help:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.5 9a2.5 2.5 0 1 1 4 2c-1.1.7-1.5 1.2-1.5 2.5M12 16.5h.01",overview:"M3 3h7v7H3z M14 3h7v7h-7z M3 14h7v7H3z M14 14h7v7h-7z",documents:"M6 3h8l4 4v14H6z M14 3v5h4 M9 12h6 M9 16h6",activity:"M3 12h4l3-7 4 14 3-7h4",gauge:"M4 18a9 9 0 1 1 16 0H4z M12 14l5-5",map:"M12 8v4M5 16v-4h14v4 M9 3h6v5H9z M2 16h6v5H2z M16 16h6v5h-6z",globe:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM3 12h18M12 3c5 5 5 13 0 18-5-5-5-13 0-18Z",page:"M3 5h18v14H3z M3 9h18 M6 7h.1 M9 7h.1",cases:"M8 5H5v16h14V5h-3M9 3h6v4H9z M8 12h8M8 16h6",eye:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12ZM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",play:"m8 4 12 8-12 8z",stack:"m12 3 10 5-10 5L2 8z M2 12l10 5 10-5 M2 16l10 5 10-5",external:"M13 4h7v7 M20 4 10 14 M10 5H5v15h15v-5",spark:"M12 3c0 5-4 9-9 9 5 0 9 4 9 9 0-5 4-9 9-9-5 0-9-4-9-9Z",plus:"M12 5v14M5 12h14",check:"m4 12 5 5L20 6",down:"m6 9 6 6 6-6",back:"m14 6-6 6 6 6",next:"m10 6 6 6-6 6",close:"m6 6 12 12M18 6 6 18",grip:"M9 6h.1M15 6h.1M9 12h.1M15 12h.1M9 18h.1M15 18h.1",queue:"M3 5h12M3 10h10M3 15h7 M15 12l6 4-6 4z"};function nt({name:a}){return n.jsx("svg",{className:"map-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:a==="grip"?3:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("path",{d:b0[a]})})}const ad="application/x-lazyscout-selection",fg=50,fr=(a,s)=>(a+.5)*320/s;function x0({projectId:a,projectName:s,target:l,result:o,cases:c,queue:u,onQueue:f,onReview:p,onCase:m,onScout:g,onWrite:v}){const y=Le().language==="th",j=L.useMemo(()=>y0(o,l,c),[o,l,c]),[b,E]=L.useState(""),[N,A]=L.useState("map"),[w,S]=L.useState(!1),[O,D]=L.useState(),M={full:y?"คิวเต็มแล้ว ใส่ได้ครั้งละ 50 เคส":"Queue full. Review up to 50 cases per run.",empty:y?"หน้านี้ยังไม่มีเคสให้ใส่คิว":"This page has no cases to queue yet.",duplicate:y?"เคสที่เลือกอยู่ในคิวแล้ว":"These cases are already in the queue."},F=j.find(x=>x.url===b)??j[0],X=L.useMemo(()=>new Map(c.map(x=>[x.id,x])),[c]),Z=u.filter(x=>X.has(x)),$=x=>{E(x),D(void 0)};function B(x){const C=[...new Set([...Z,...x])];f(C.slice(0,fg)),C.length>fg?D("full"):x.length?C.length===Z.length?D("duplicate"):D(C.length-Z.length):D("empty")}function J(x,C){x.dataTransfer.setData(ad,JSON.stringify({projectId:a,...C})),x.dataTransfer.effectAllowed="copy"}function z(x){x.preventDefault(),S(!1);try{const C=JSON.parse(x.dataTransfer.getData(ad));if(C.projectId!==a)return;if(C.kind==="page"){const q=j.find(I=>I.url===C.value);q&&B(q.cases.map(I=>I.id))}else C.kind==="case"&&X.has(C.value)&&B([C.value])}catch{}}const H=F&&new URL(F.url).host,T=Math.max(0,j.indexOf(F)),K=Math.floor(T/3)*3,V=j.slice(K,K+3),Q=F?j.filter(x=>x!==F&&F.links.has(x.url)).slice(0,2):[],W=[...Q.map(x=>({kind:"page",value:x.url,title:x.path})),...F?.cases.slice(0,3-Q.length).map(x=>({kind:"case",value:x.id,title:Hr(x.title)}))??[]],R=N==="map"?y?"แผนที่เว็บไซต์":"Page map":y?"ตัวอย่างเว็บไซต์":"Website preview";function Y(x,C){return n.jsxs("button",{type:"button",className:"map-node route-node"+(x===F?" selected-node":""),style:{top:fr(C,V.length)/3.2+"%"},"aria-pressed":x===F,title:x.url,draggable:!0,onDragStart:q=>J(q,{kind:"page",value:x.url}),onClick:()=>$(x.url),children:[n.jsx(nt,{name:"page"}),n.jsxs("span",{children:[n.jsx("small",{children:y?"หน้าเว็บ":"Page"}),n.jsx("b",{children:x.path})]}),n.jsx(nt,{name:"grip"})]},x.url)}return n.jsxs("section",{className:"map-studio","aria-label":R,children:[n.jsxs("div",{className:"studio-heading",children:[n.jsxs("div",{children:[n.jsx("h1",{children:R}),n.jsx("p",{children:N==="map"?y?"เลือกหน้าเว็บ แล้วลากหน้าหรือเคสที่อยากทดสอบลงคิว":"Select a page, then drag pages or test cases into your run queue.":y?"เปิดหน้าที่เลือก แล้วเทียบกับเคสที่บันทึกไว้ด้านข้าง":"Explore the selected page alongside its saved test cases."})]}),n.jsxs("button",{className:"studio-button",onClick:g,children:[n.jsx(nt,{name:"map"}),y?"สำรวจเว็บไซต์":"Scout website"]})]}),n.jsxs("div",{className:"studio-layout",children:[n.jsxs("div",{className:"map-workbench",children:[n.jsxs("div",{className:"map-toolbar",children:[n.jsxs("div",{className:"map-segments",role:"group","aria-label":y?"มุมมอง":"View",children:[n.jsxs("button",{"aria-pressed":N==="map",onClick:()=>A("map"),children:[n.jsx(nt,{name:"map"}),y?"แผนที่":"Map"]}),n.jsxs("button",{"aria-pressed":N==="preview",disabled:!F,onClick:()=>A("preview"),children:[n.jsx(nt,{name:"eye"}),y?"ตัวอย่างเว็บ":"Web preview"]})]}),F&&n.jsxs("label",{className:"page-picker",children:[n.jsx("span",{children:y?"หน้า":"Page"}),n.jsx("select",{"aria-label":y?"เลือกหน้าเว็บ":"Select page",value:F.url,onChange:x=>$(x.target.value),children:j.map(x=>n.jsxs("option",{value:x.url,children:[x.path," · ",new URL(x.url).host]},x.url))})]})]}),F?N==="preview"?n.jsxs("div",{className:"live-preview",children:[n.jsxs("div",{className:"preview-address",children:[n.jsx(nt,{name:"globe"}),n.jsx("code",{title:F.url,children:F.url}),n.jsxs("a",{href:F.url,target:"_blank",rel:"noopener noreferrer",children:[y?"เปิดแท็บใหม่":"Open in new tab"," ",n.jsx(nt,{name:"external"})]})]}),new URL(F.url).origin!==window.location.origin&&n.jsx("iframe",{title:y?"ตัวอย่างหน้าเว็บที่เลือก":"Selected website preview",src:F.url,sandbox:"allow-scripts",referrerPolicy:"no-referrer"},F.url),n.jsx("p",{children:y?"ถ้าเว็บต้องล็อกอินหรือไม่แสดงในกรอบ ให้เปิดในแท็บใหม่":"If the site needs sign-in or blocks embedding, open it in a new tab."})]}):n.jsxs("div",{className:"map-canvas",children:[n.jsxs("div",{className:"canvas-meta",children:[n.jsxs("span",{children:[n.jsx("i",{}),y?"แผนที่โปรเจกต์":"Project map"]}),n.jsxs("span",{children:[j.length," ",y?"หน้า":j.length===1?"page":"pages"]})]}),n.jsx("div",{className:"graph-scroll",tabIndex:0,"aria-label":y?"แผนผังหน้าเว็บ":"Page diagram",children:n.jsxs("div",{className:"route-graph",children:[n.jsxs("svg",{className:"map-lines",viewBox:"0 0 1000 320",preserveAspectRatio:"none","aria-hidden":"true",children:[V.map((x,C)=>n.jsx("path",{d:`M 250 160 C 295 160, 295 ${fr(C,V.length)}, 340 ${fr(C,V.length)}`},x.url)),W.map((x,C)=>n.jsx("path",{d:`M 615 ${fr(T-K,V.length)} C 650 ${fr(T-K,V.length)}, 650 ${fr(C,W.length)}, 694 ${fr(C,W.length)}`},x.value))]}),n.jsxs("div",{className:"map-node root-node",children:[n.jsx(nt,{name:"globe"}),n.jsxs("span",{children:[n.jsx("small",{children:y?"โปรเจกต์":"Project"}),n.jsx("b",{title:s,children:s})]})]}),V.map(Y),W.map((x,C)=>n.jsxs("button",{type:"button",className:"map-node leaf-node",style:{top:fr(C,W.length)/3.2+"%"},title:x.title,draggable:!0,onDragStart:q=>J(q,x),onClick:()=>x.kind==="case"?m(x.value):$(x.value),children:[n.jsx(nt,{name:x.kind==="case"?"cases":"page"}),n.jsxs("span",{children:[n.jsx("small",{children:x.kind==="case"?x.value:y?"ลิงก์ไปยัง":"Links to"}),n.jsx("b",{children:x.title})]}),n.jsx(nt,{name:"grip"})]},x.value))]})}),n.jsxs("div",{className:"canvas-footer",children:[n.jsxs("span",{children:[n.jsx("i",{}),y?"หน้าที่เลือก":"Selected page"]}),n.jsx("code",{title:H,children:H})]})]}):n.jsxs("div",{className:"map-empty",children:[n.jsx(nt,{name:"map"}),n.jsx("h2",{children:y?"เริ่มแผนที่ของโปรเจกต์นี้":"Build your first page map"}),n.jsx("p",{children:y?"ใส่ URL ที่ต้องการสำรวจ หรือเริ่มเขียนเคสด้วยตัวเอง":"Scout a website to map its pages, or start by writing a case."}),n.jsxs("button",{className:"studio-button orange",onClick:g,children:[y?"ตั้งค่าเว็บไซต์":"Set up website"," ",n.jsx(nt,{name:"next"})]})]})]}),n.jsxs("aside",{className:"page-inspector",children:[n.jsxs("header",{children:[n.jsx("span",{className:"studio-icon",children:n.jsx(nt,{name:"page"})}),n.jsx("span",{children:y?"รายละเอียดหน้าเว็บ":"Page inspector"})]}),F?n.jsxs(n.Fragment,{children:[n.jsx("h2",{title:F.url,children:F.path}),n.jsx("p",{className:"page-subtitle",children:F.title||H}),n.jsxs("button",{className:"studio-button preview-action",onClick:()=>A(N==="map"?"preview":"map"),children:[n.jsx(nt,{name:N==="map"?"eye":"map"}),N==="map"?y?"เปิดตัวอย่างเว็บ":"Preview website":y?"กลับไปแผนที่":"Back to map"]}),N==="preview"&&F.controls.size>0&&n.jsxs("details",{className:"inspector-controls",children:[n.jsxs("summary",{children:[y?"ปุ่มและช่องกรอกที่สำรวจพบ":"Recorded controls"," (",F.controls.size,")"]}),n.jsx("ul",{children:[...F.controls].map(x=>n.jsx("li",{children:x},x))})]}),n.jsxs("div",{className:"linked-head",children:[n.jsx("h3",{children:y?"เคสของหน้านี้":"Linked cases"}),n.jsx("span",{children:F.cases.length})]}),F.cases.length?n.jsx("ul",{className:"linked-list",children:F.cases.map(x=>n.jsxs("li",{draggable:!0,onDragStart:C=>J(C,{kind:"case",value:x.id}),children:[n.jsx(nt,{name:"grip"}),n.jsxs("button",{className:"linked-title",title:Hr(x.title),onClick:()=>m(x.id),children:[n.jsx("small",{children:x.id}),n.jsx("b",{children:Hr(x.title)})]}),n.jsx("button",{className:"icon-button","aria-label":(y?"เพิ่มเข้าคิว ":"Queue ")+x.id,disabled:Z.includes(x.id),onClick:()=>B([x.id]),children:n.jsx(nt,{name:Z.includes(x.id)?"check":"plus"})})]},x.id))}):n.jsx("p",{className:"inspector-note",children:y?"ยังไม่มีเคสของหน้านี้ สำรวจเว็บหรือสร้างเคสเพื่อเริ่มทดสอบ":"No cases for this page yet. Scout the website or write a case to get started."}),F.cases.length?n.jsxs("button",{className:"studio-button orange",onClick:()=>B(F.cases.map(x=>x.id)),children:[n.jsx(nt,{name:"plus"}),y?"เพิ่มเคสของหน้านี้ลงคิว":"Queue page cases"]}):n.jsx("button",{className:"studio-button",onClick:()=>v(F.url),children:y?"เขียนเคส":"Write a case"})]}):n.jsx("button",{className:"studio-button",onClick:()=>v(),children:y?"เขียนเคส":"Write a case"})]}),n.jsxs("section",{className:"test-queue"+(w?" drag-over":""),onDragOver:x=>{x.dataTransfer.types.includes(ad)&&(x.preventDefault(),x.dataTransfer.dropEffect="copy",S(!0))},onDragLeave:x=>{x.currentTarget.contains(x.relatedTarget)||S(!1)},onDrop:z,children:[n.jsxs("div",{className:"queue-head",children:[n.jsxs("div",{children:[n.jsx("span",{className:"studio-icon",children:n.jsx(nt,{name:"queue"})}),n.jsx("h2",{children:y?"คิวทดสอบ":"Run queue"}),n.jsx("span",{className:"queue-count",children:Z.length})]}),n.jsxs("button",{className:"studio-button orange",disabled:!Z.length,onClick:p,children:[n.jsx(nt,{name:"play"}),y?"ตรวจคิวและรัน":"Review & run"]})]}),n.jsxs("div",{className:"queue-drop",children:[n.jsx(nt,{name:"stack"}),n.jsx("span",{children:y?"ลากหน้าเว็บหรือเคสมาวางที่นี่":"Drop a page or test case here"})]}),!!Z.length&&n.jsx("ol",{children:Z.map((x,C)=>n.jsxs("li",{children:[n.jsx("span",{children:C+1}),n.jsx("button",{onClick:()=>m(x),children:Hr(X.get(x).title)}),n.jsx("button",{className:"icon-button","aria-label":(y?"เอาออก ":"Remove ")+x,onClick:()=>{f(Z.filter(q=>q!==x)),D(void 0)},children:n.jsx(nt,{name:"close"})})]},x))}),n.jsx("p",{role:"status",className:"queue-feedback",children:typeof O=="number"?y?`เพิ่มแล้ว ${O} เคส`:`Added ${O} to the queue.`:O&&M[O]})]})]})]})}class yn extends Error{code;hint;constructor(s,l,o){super(l),this.name="ApiError",this.code=s,this.hint=o}}async function br(a){try{const s=await a.json();if(s?.error?.message)return new yn(s.error.code,s.error.message,s.error.hint)}catch{}return new yn("unknown",`The server returned status ${a.status}.`)}async function j0(a,s,l,o){let c;try{c=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json",Accept:s||o?"application/x-ndjson":"application/json",...o?{"X-LazyScout-Preview":"1"}:{}},signal:l,body:JSON.stringify(a)})}catch{throw new yn("server-unreachable","Could not reach the LazyScout API.","Check that LazyScout is running on this device, then try again.")}if(!c.ok)throw await br(c);if(!c.headers.get("content-type")?.includes("application/x-ndjson"))return c.json();const u=c.body?.pipeThrough(new TextDecoderStream).getReader();if(!u)throw new yn("stream-ended","The Scout connection closed before results arrived.");const f=[];try{for(;;){const{done:p,value:m}=await u.read();if(p)break;const g=m.split(`
12
- `);for(const v of g.slice(0,-1)){f.push(v);const y=JSON.parse(f.join(""));if(f.length=0,y.type==="step"&&s?.(y.step),y.type==="preview"&&o?.(y.frame),y.type==="result")return y.result;if(y.type==="error")throw new yn(y.error.code,y.error.message,y.error.hint)}f.push(g[g.length-1])}}finally{await u.cancel().catch(()=>{}),u.releaseLock()}throw new yn("stream-ended","The Scout connection closed before results arrived.")}async function S0(){const a=await fetch("/api/versions");if(!a.ok)throw await br(a);return await a.json()}async function w0(a){const s=await fetch("/api/versions/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:a})});if(!s.ok)throw await br(s);return await s.json()}async function N0(a,s=[]){const l=await fetch("/api/export/csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:a,testData:s})});await ff(l,`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.csv`)}async function ff(a,s){if(!a.ok)throw await br(a);const l=await a.blob(),o=URL.createObjectURL(l),c=document.createElement("a");c.href=o,c.download=s,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(o)}async function C0(a,s="playwright",l,o,c,u,f,p){const m=await fetch("/api/automation/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:a,framework:s,code:l,secrets:o,runId:c,projectId:u,blockedKeywords:f}),signal:p});if(!m.ok)throw await br(m);return await m.json()}async function hg(){return at("/api/workspace")}async function rd(a){await at(`/api/workspace/projects/${encodeURIComponent(a.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}async function T0(a){await at(`/api/workspace/projects/${encodeURIComponent(a)}`,{method:"DELETE"})}async function _0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:s})})}async function E0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/status`)}async function k0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/capture`,{method:"POST"})}async function A0(a){await at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/login-browser`,{method:"DELETE"})}async function O0(a,s){return at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/verify`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:s})})}async function R0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/guided-flows`)}async function D0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/guided-flows`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({flows:s})})}async function L0(a,s,l,o){return at("/api/guided-flows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flow:a,projectId:s,secrets:l,runId:o})})}async function M0(a){return at("/api/guided-flows/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:a})})}async function U0(a){await at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session`,{method:"DELETE"})}async function z0(a,s){return at(`/api/recorder/${encodeURIComponent(a)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:s})})}async function pg(a){return at(`/api/recorder/${encodeURIComponent(a)}`)}async function B0(a){return at(`/api/recorder/${encodeURIComponent(a)}/stop`,{method:"POST"})}async function I0(a,s){return at(`/api/recorder/${encodeURIComponent(a)}/inspect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:s})})}function P0(a,s){return`/api/recorder/${encodeURIComponent(a)}/frame?v=${s}`}async function $0(a,s){return at(`/api/recorder/${encodeURIComponent(a)}/interact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function mg(a){return at(`/api/recorder/${encodeURIComponent(a)}`,{method:"DELETE"})}async function q0(){await at("/api/workspace/open",{method:"POST"})}async function H0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots`)}async function gg(a,s){return at(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function G0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots/${encodeURIComponent(s)}`,{method:"DELETE"})}async function F0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/automation`)}async function vg(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/automation`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function V0(a,s,l){await at(`/api/workspace/projects/${encodeURIComponent(a)}/reports`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,html:l})})}async function Y0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/bugs`)}async function yg(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/bugs/${encodeURIComponent(s.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function X0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/bugs/${encodeURIComponent(s)}`,{method:"DELETE"})}async function at(a,s){const l=await fetch(a,s).catch(o=>{throw o instanceof TypeError&&!s?.signal?.aborted?new yn("network-error","Cannot reach LazyScout. Check that it is running on this device, then try again."):o});if(!l.ok)throw await br(l);return await l.json()}async function bg(a){await fetch("/api/automation/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:a}),keepalive:!0})}async function Z0(a){const s=await fetch("/api/load-test/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok)throw await br(s);return await s.json()}async function K0(a,s,l=!1){const o=await fetch("/api/api-check/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiCheck:a,secrets:s,allowUnsafe:l})});if(!o.ok)throw await br(o);return await o.json()}const ma=(a,s)=>at(a,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),Q0=a=>ma("/api/qa/plans",a),J0=a=>ma("/api/qa/instruction-draft",a),xg=(a,s,l)=>ma("/api/qa/provider/status",{provider:a,allowExternal:s,...l}),W0=a=>ma("/api/qa/provider/credentials",{kind:a}),hf=a=>`/api/qa/connection/${encodeURIComponent(a)}`,ej=a=>at(hf(a),{cache:"no-store"}),tj=(a,s,l)=>at(hf(a),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:s,apiKey:l})}),nj=a=>at(hf(a),{method:"DELETE"}),aj=()=>ma("/api/qa/codex/login",{}),jg=a=>ma("/api/qa/codex/status",{loginId:a}),sd=a=>ma("/api/qa/codex/cancel",{loginId:a}),rj=()=>ma("/api/qa/codex/logout",{confirmed:!0}),sj=a=>at(`/api/qa/mcp/setup/${encodeURIComponent(a)}`),ij=(a,s)=>ma(`/api/qa/mcp/setup/${encodeURIComponent(a)}`,{confirmed:!0,write:s}),lj=(a,s)=>ma("/api/qa/runs",{projectId:a,planId:s,confirmed:!0}),pf=(a,s)=>`/api/qa/runs/${encodeURIComponent(a)}/${encodeURIComponent(s)}`,oj=(a,s)=>at(pf(a,s)),cj=(a,s)=>at(pf(a,s),{method:"DELETE"}),uj=(a,s,l,o)=>at(`${pf(a,s)}/summary`,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l,confirmed:!0}),signal:o}),No=(a,s,l)=>`/api/qa/report/${encodeURIComponent(a)}?format=${s}&sheets=${encodeURIComponent(l.join(","))}`;async function dj(a){const s=await fetch(No(a,"xlsx",["Test Cases"]),{cache:"no-store"});await ff(s,`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.xlsx`)}const mf=(a,s)=>`/api/qa/artifact/${encodeURIComponent(a)}/${encodeURIComponent(s)}`,fj=(a,s)=>at(`/api/qa/artifacts/${encodeURIComponent(a)}`,{signal:s,cache:"no-store"}),hj=/^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;function pj(a){const s={},l={},o=a(),c=a.toString(),u=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).split(",").map(p=>p.trim());for(const p of u)if(!hj.test(p))throw new Error(`Invalid dependency name: ${p}`);let f=0;for(;f<o.length;){let p=u[f],m=o[f];typeof m=="function"?s[p]=mj(m,p):l[p]=m,f++}return{functions:s,variables:l}}function mj(a,s){const l=a.toString();if(a.prototype)if(l.indexOf("[native code]")>=0){const o=l.indexOf(" ",8)+1,c=l.indexOf("(",o);return l.slice(o,c)}else{let o=l;for(const c in a.prototype)o+=";"+s+".prototype."+c+"="+a.prototype[c].toString();return o}else return l}function gj(a,s,l,o,c,u){let f=!1,p;const m=()=>{p.stop()},g=(y,j)=>{try{p.ingest(y,j)}catch(b){throw m(),b}};return{start:(y,j)=>{if(f)throw new Error("Was started");f=!0;const b=c(),E=b&&b._,N=E||bj(s,y);E||u({_:N});const[A,w]=N;p=a(A,()=>{const D=c();if(D)return D.other},D=>{u(Object.assign(Object.assign({},c()),{other:D}))},l,o),w&&g(w,j)},stop:m,ingest:g}}const vj="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",yj=")(postMessage)}";function bj(a,s){const[l,o]=xj(s);return[l+";"+vj+a.toString()+yj,o]}function xj(a){let s={},l={};for(const c of a){const{functions:u,variables:f}=pj(c);s=Object.assign(Object.assign({},s),u),l=Object.assign(Object.assign({},l),f)}return[Object.keys(s).map(c=>c+"="+s[c]).join(";"),l]}function jj(a,s,l,o,c,u){let f=!1,p=!1,m=[];const g=void 0;let v=()=>[],y=()=>[],j,b;const E=K=>Sg[K],N=(K,V)=>{Sg[K]=V},A=()=>{if(!f)throw new Error("Not started")},w=()=>{if(f)throw new Error("Was started")},S=()=>{if(p)throw new Error("Was stopped")},O=()=>{if(j)throw new Error("Has alias")},D=K=>{if(typeof K!="function")throw new TypeError("Argument must be a function")};let M;if(typeof s=="string"){if(j=s,b=E(j),!b||!b.$)throw new Error("Not found");M=b.$[0],m=b.$[1],v=b.$[2],y=b.$[3],b.$[4]}else M=s;D(M);let F;const X=K=>{S(),w(),D(K),m.push(K)},Z=()=>{S(),w(),X(()=>[M,y,o]),f=!0,F.start(m,g)},$=()=>{p=!0,F.stop()},B=K=>{F.ingest([Date.now(),K],v(...K))};let J;const z=Object.assign({inputLatency:J,outputLatency:J,addDependencies(K){O(),X(K)},inputTransferList:K=>{S(),w(),O(),D(K),v=K},outputTransferList:K=>{S(),w(),O(),D(K),y=K},alias(K){S(),w(),O(),j=K,N(j,{$:[M,m,v,y]})},start:Z,stop:$},l(Z,$,f,p,B,A,w,S));return F=gj(a,K=>{let V=-1,Q=-1;const R=o(M,Y=>{K([V,Q,Date.now(),Y],y(Y))});return([Y,x])=>(V=Y,Q=Date.now(),R(x))},K=>{p||c(K)},([K,V,Q,W])=>{p||(K!==-1&&(z.inputLatency=V-K),z.outputLatency=Date.now()-Q,u(W))},()=>{if(j){const K=E(j);if(K)return K.other}},K=>{j&&N(j,Object.assign(Object.assign({},E(j)),{other:K}))}),z}const Sg={};function Sj(a,s){let l,o;return jj(a,s,(m,g,v,y,j,b,E,N)=>({call(...A){if(N(),b(),l||o)throw new Error("Previous call not finished");return new Promise((w,S)=>{l=w,o=S,j(A)})},callOnce(...A){return m(),this.call(...A).finally(g)}}),(m,g)=>{const v=y=>y!==null&&typeof y=="object"&&typeof y.then=="function";return y=>{const j=m(...y);v(j)?j.then(g):g(j)}},m=>{if(o)o(m),l=void 0,o=void 0;else throw new Error("`reject` callback not found")},m=>{if(l)l(m),l=void 0,o=void 0;else throw new Error("`resolve` callback not found")})}function wj(a,s,l,o,c){let u=s();u||(u=Nj(a),l(u));const f=new Worker(u);return f.onmessage=p=>{const m=p.data,g=m?m[Hv]:void 0;if(g){const v=new Error(g[0]);v.stack=g[1];let y=2;for(;y<g.length;)v[g[y][0]]=g[y][1],y++;o(v),f.terminate()}else c(m)},{stop:f.terminate.bind(f),ingest:f.postMessage.bind(f)}}function Nj(a){return URL.createObjectURL(new Blob([a+";"+Cj],{type:"text/javascript"}))}const Hv="$err$",Cj="self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({"+Hv+':[err.message,err.stack].concat(Object.keys(err).map(function(k){return[k,err[k]]}))})};var postMessage = self.postMessage;addEventListener("error",function(evt) {onErr(evt.error, evt.message)});addEventListener("unhandledrejection",function(evt) {evt.preventDefault();onErr(evt.reason, String(evt.reason))})';function Gv(a){return Sj(wj,a)}function Fd(a){"@babel/helpers - typeof";return Fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Fd(a)}function Tj(a){var s=String.fromCharCode,l=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,c={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(c).forEach(function(S){c[S.toUpperCase()]=c[S]});function u(S,O,D,M){return M?l.call(c,M)?c[M]:"&"+M+";":s(O||parseInt(D,16))}function f(S){return S.length>3&&S.indexOf("&")!==-1?S.replace(o,u):S}var p="non-whitespace outside of root node";function m(S){return new Error(S)}function g(S){return"missing namespace for prefix <"+S+">"}function v(S){return{get:S,enumerable:!0}}function y(S){var O={},D;for(D in S)O[D]=S[D];return O}var j=Symbol("nameCache");function b(S){return S+"$uri"}function E(S){var O={},D,M;for(D in S)M=S[D],O[M]=M,O[b(M)]=D;return O}function N(){return{line:0,column:0}}function A(S){throw S}function w(S){if(!this)return new w(S);var O=S&&S.proxy,D,M,F,X,Z=A,$,B,J,z,H=N,T=!1,K=!1,V="",Q=!1,W=!1,R=null,Y=!1,x,C,q,I;function ee(le){le instanceof Error||(le=m(le)),R=le,Z(le,H)}function he(le){$&&(le instanceof Error||(le=m(le)),$(le,H))}this.on=function(le,Ce){if(typeof Ce!="function")throw m("required args <name, cb>");switch(le){case"openTag":M=Ce;break;case"text":D=Ce;break;case"closeTag":F=Ce;break;case"error":Z=Ce;break;case"warn":$=Ce;break;case"cdata":X=Ce;break;case"attention":z=Ce;break;case"question":J=Ce;break;case"comment":B=Ce;break;default:throw m("unsupported event: "+le)}return this},this.ns=function(le){if(typeof le>"u"&&(le={}),Fd(le)!=="object")throw m("required args <nsMap={}>");var Ce={},ye;for(ye in le)Ce[ye]=le[ye];return W=!0,I=Ce,this};function _e(){x=W?[]:null,C=W?E(I):null,q=[],H=N,Y=!1,R=null,K=!1,V=""}this.parse=function(le){if(typeof le!="string")throw m("required args <xml=string>");if(T)throw m("parse during stream; call end() first");return _e(),Ne(le),H=N,Y=!1,R},this.write=function(le){if(typeof le!="string")throw m("required args <xml=string>");return T||(_e(),T=!0),R||(V=Ne(V+le,!0)||""),this},this.end=function(){return T||_e(),T=!1,R||Ne(V),V="",H=N,Y=!1,R},this.stop=function(){Y=!0};function Ne(le){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=null,Fe=null,Ue,k=0,pe=!1,ce=!1,G=0,P=0,ne,xe,ge,se,Te,Ee,we,ke,qe,fe="",ze=0,$e;function Ve(pt,Oe){var Et=pt.indexOf(":");if(Et===-1)return pt;var Tt=C[pt.substring(0,Et)];return Tt?Oe===Tt?pt.substr(Et+1):Tt+pt.substr(Et):(he(g(pt.substring(0,Et))),null)}function rt(){if($e!==null)return $e;var pt,Oe,Et=W&&C.xmlns,Tt=W&&Q?[]:null,Ze=ze,dt=fe,st=dt.length,Ut,mt,zt,Qe,He,Xt={},tt=new Set,Ge,Ie,Ye;e:for(;Ze<st;Ze++)if(Ge=!1,Ie=dt.charCodeAt(Ze),!(Ie===32||Ie<14&&Ie>8)){for((Ie<65||Ie>122||Ie>90&&Ie<97)&&Ie!==95&&Ie!==58&&(he("illegal first char attribute name"),Ge=!0),Ye=Ze+1;Ye<st;Ye++)if(Ie=dt.charCodeAt(Ye),!(Ie>96&&Ie<123||Ie>64&&Ie<91||Ie>47&&Ie<59||Ie===46||Ie===45||Ie===95)){if(Ie===32||Ie<14&&Ie>8){he("missing attribute value"),Ze=Ye;continue e}if(Ie===61)break;he("illegal attribute name char"),Ge=!0}if(He=dt.substring(Ze,Ye),He==="xmlns:xmlns"&&(he("illegal declaration of xmlns"),Ge=!0),Ie=dt.charCodeAt(Ye+1),Ie===34)Ye=dt.indexOf('"',Ze=Ye+2),Ye===-1&&(Ye=dt.indexOf("'",Ze),Ye!==-1&&(he("attribute value quote missmatch"),Ge=!0));else if(Ie===39)Ye=dt.indexOf("'",Ze=Ye+2),Ye===-1&&(Ye=dt.indexOf('"',Ze),Ye!==-1&&(he("attribute value quote missmatch"),Ge=!0));else for(he("missing attribute value quotes"),Ge=!0,Ye=Ye+1;Ye<st&&(Ie=dt.charCodeAt(Ye+1),!(Ie===32||Ie<14&&Ie>8));Ye++);for(Ye===-1&&(he("missing closing quotes"),Ye=st,Ge=!0),Ge||(zt=dt.substring(Ze,Ye)),Ze=Ye;Ye+1<st&&(Ie=dt.charCodeAt(Ye+1),!(Ie===32||Ie<14&&Ie>8));Ye++)Ze===Ye&&(he("illegal character after attribute end"),Ge=!0);if(Ze=Ye+1,Ge)continue e;if(tt.has(He)){he("attribute <"+He+"> already defined");continue}if(tt.add(He),!W){Xt[He]=zt;continue}if(Q){if(mt=He==="xmlns"?"xmlns":He.charCodeAt(0)===120&&He.substr(0,6)==="xmlns:"?He.substr(6):null,mt!==null){if(pt=f(zt),Oe=b(mt),Qe=I[pt],!Qe){if(mt==="xmlns"||Oe in C&&C[Oe]!==pt)do Qe="ns"+k++;while(typeof C[Qe]<"u");else Qe=mt;I[pt]=Qe}C[mt]!==Qe&&(Ut||(C=y(C),Ut=!0),C[mt]=Qe,mt==="xmlns"&&(C[b(Qe)]=pt,Et=Qe),C[Oe]=pt),Xt[He]=zt;continue}Tt.push(He,zt);continue}He=Ve(He,Et),He!==null&&(Xt[He]=zt)}if(Q)for(Ze=0,st=Tt.length;Ze<st;Ze++)He=Ve(Tt[Ze++],Et),zt=Tt[Ze],He!==null&&(Xt[He]=zt);return $e=Xt}function et(){for(var pt=/(\r\n|\r|\n)/g,Oe=0,Et=0,Tt=0,Ze=P,dt,st;G>=Tt&&(dt=pt.exec(le),!(!dt||(Ze=dt[0].length+dt.index,Ze>G)));)Oe+=1,Tt=Ze;return G==-1?(Et=Ze,st=le.substring(P)):P===0?st=le.substring(P,G):(Et=G-Tt,st=P==-1?le.substring(G):le.substring(G,P+1)),{data:st,line:Oe,column:Et}}for(H=et,O&&(qe=Object.create({},{name:v(function(){return we}),originalName:v(function(){return ke}),attrs:v(rt),ns:v(function(){return C})}));P!==-1;){if(le.charCodeAt(P)===60?G=P:G=le.indexOf("<",P),G===-1){if(Ce)return le.substring(P);if(q.length)return ee("unexpected end of file");if(!K)return ee("missing start tag");P<le.length&&le.substring(P).trim()&&he(p);return}if(K||(K=!0),P!==G){if(q.length){if(D&&(D(le.substring(P,G),f,H),Y))return}else if(le.substring(P,G).trim()&&(he(p),Y))return}if(se=le.charCodeAt(G+1),se===33){if(ge=le.charCodeAt(G+2),ge===91&&le.substr(G+3,6)==="CDATA["){if(P=le.indexOf("]]>",G),P===-1)return Ce?le.substring(G):ee("unclosed cdata");if(X&&(X(le.substring(G+9,P),H),Y))return;P+=3;continue}if(ge===45&&le.charCodeAt(G+3)===45){if(P=le.indexOf("-->",G),P===-1)return Ce?le.substring(G):ee("unclosed comment");if(B&&(B(le.substring(G+4,P),f,H),Y))return;P+=3;continue}}if(se===63){if(P=le.indexOf("?>",G),P===-1)return Ce?le.substring(G):ee("unclosed question");if(J&&(J(le.substring(G,P+2),H),Y))return;P+=2;continue}for(ne=G+1;;ne++){if(Te=le.charCodeAt(ne),isNaN(Te))return Ce?le.substring(G):(P=-1,ee("unclosed tag"));if(Te===34)ge=le.indexOf('"',ne+1),ne=ge!==-1?ge:ne;else if(Te===39)ge=le.indexOf("'",ne+1),ne=ge!==-1?ge:ne;else if(Te===62){P=ne;break}}if(se===33){if(z&&(z(le.substring(G,P+1),f,H),Y))return;P+=1;continue}if($e={},se===47){if(pe=!1,ce=!0,!q.length)return ee("missing open tag");if(ne=we=q.pop(),ge=G+2+ne.length,le.substring(G+2,ge)!==ne)return ee("closing tag mismatch");for(;ge<P;ge++)if(se=le.charCodeAt(ge),!(se===32||se>8&&se<14))return ee("close tag")}else{if(le.charCodeAt(P-1)===47?(ne=we=le.substring(G+1,P-1),pe=!0,ce=!0):(ne=we=le.substring(G+1,P),pe=!0,ce=!1),!(se>96&&se<123||se>64&&se<91||se===95||se===58))return ee("illegal first char nodeName");for(ge=1,xe=ne.length;ge<xe;ge++)if(se=ne.charCodeAt(ge),!(se>96&&se<123||se>64&&se<91||se>47&&se<59||se===45||se===95||se==46)){if(se===32||se<14&&se>8){we=ne.substring(0,ge),$e=null;break}return ee("invalid nodeName")}ce||q.push(we)}if(W){Ue=C,pe&&(ce||x.push(Ue),$e===null&&(Q=ne.indexOf("xmlns",ge)!==-1)&&(ze=ge,fe=ne,rt(),Q=!1)),ke=we,Fe!==C&&(ye=C[j],ye===void 0&&(ye=C[j]={}),Fe=C);var ht=ye[we];if(ht!==void 0)we=ht;else{if(se=we.indexOf(":"),se!==-1){if(Ee=C[we.substring(0,se)],!Ee)return ee("missing namespace on <"+ke+">");we=we.substr(se+1)}else Ee=C.xmlns;Ee&&(we=Ee+":"+we),ye[ke]=we}}if(pe&&(ze=ge,fe=ne,M&&(O?M(qe,f,ce,H):M(we,rt,f,ce,H),Y)))return;if(ce){if(F&&(F(O?qe:we,f,pe,H),Y))return;W&&(pe?C=Ue:C=x.pop())}P+=1}}}return new w(a)}function _j(a,s,l,o){var c=!1,u=function(){if(c)throw new Error("Errored")},f,p=new Tj,m=function(j){u(),p.write(j)},g=function(){u(),p.end(),f()},v=new Promise(function(y,j){f=y;var b=function(S){throw c=!0,S},E=function(S,O){o&&o(O(S),a)},N=function(S,O,D,M,F){if(s){var X=O();for(var Z in X)X[id(Z,!0)]=D(X[Z]);s(id(S),X,a)}},A=function(S){l&&l(id(S),a)};p.on("error",b),p.on("text",E),p.on("openTag",N),p.on("closeTag",A)});return{promise:v,write:m,end:g}}function id(a,s){for(var l=0;l<a.length;){if(a[l]===":"&&!(s&&l===5&&a.slice(0,5)==="xmlns"))return a.slice(l+1);l++}return a}function Vd(a){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Vd(a)}function Ej(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function kj(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function Aj(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Hi(a,s)}function Oj(a){var s=Fv();return function(){var o=Gi(a),c;if(s){var u=Gi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return Rj(this,c)}}function Rj(a,s){if(s&&(Vd(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dj(a)}function Dj(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Yd(a){var s=typeof Map=="function"?new Map:void 0;return Yd=function(o){if(o===null||!Lj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return Co(o,arguments,Gi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Hi(c,o)},Yd(a)}function Co(a,s,l){return Fv()?Co=Reflect.construct.bind():Co=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Hi(g,f.prototype),g},Co.apply(null,arguments)}function Fv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lj(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Hi(a,s){return Hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Hi(a,s)}function Gi(a){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Gi(a)}var $i=(function(a){Aj(l,a);var s=Oj(l);function l(o){var c;return kj(this,l),c=s.call(this,o),c.name="InvalidSpreadsheetError",c}return Ej(l)})(Yd(Error));function Vv(a,s,l,o,c,u){var f=_j(s,l,o,c);return u?p(f,a,u):(f.write(a),f.end()),f.promise.then(function(m){return m},function(m){var g=new $i(m.message);throw g.stack=m.stack,g.cause=m,g});function p(m,g,v,y){var j=7,b=64*1024,E=b,N=function(){var S=Date.now();if(g.length>E){m.write(g.slice(0,E)),v&&v(!1),g=g.slice(E);var O=Date.now()-S;return O<j*.5?E*=2:O>j&&(E/=2),!0}else return m.write(g),m.end(),v&&v(!0),!1},A=function w(){N()&&w()};A()}}var wg={},Mj=(function(a,s,l,o,c){var u=new Worker(wg[s]||(wg[s]=URL.createObjectURL(new Blob([a+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return u.onmessage=function(f){var p=f.data,m=p.$e$;if(m){var g=new Error(m[0]);g.code=m[1],g.stack=m[2],c(g,null)}else c(null,p)},u.postMessage(l,o),u}),vn=Uint8Array,Gr=Uint16Array,Yv=Int32Array,gf=new vn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),vf=new vn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Xv=new vn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zv=function(a,s){for(var l=new Gr(31),o=0;o<31;++o)l[o]=s+=1<<a[o-1];for(var c=new Yv(l[30]),o=1;o<30;++o)for(var u=l[o];u<l[o+1];++u)c[u]=u-l[o]<<5|o;return{b:l,r:c}},Kv=Zv(gf,2),yf=Kv.b,Uj=Kv.r;yf[28]=258,Uj[258]=28;var zj=Zv(vf,0),Qv=zj.b,Uo=new Gr(32768);for(var Rt=0;Rt<32768;++Rt){var hr=(Rt&43690)>>1|(Rt&21845)<<1;hr=(hr&52428)>>2|(hr&13107)<<2,hr=(hr&61680)>>4|(hr&3855)<<4,Uo[Rt]=((hr&65280)>>8|(hr&255)<<8)>>1}var Ds=(function(a,s,l){for(var o=a.length,c=0,u=new Gr(s);c<o;++c)a[c]&&++u[a[c]-1];var f=new Gr(s);for(c=1;c<s;++c)f[c]=f[c-1]+u[c-1]<<1;var p;if(l){p=new Gr(1<<s);var m=15-s;for(c=0;c<o;++c)if(a[c])for(var g=c<<4|a[c],v=s-a[c],y=f[a[c]-1]++<<v,j=y|(1<<v)-1;y<=j;++y)p[Uo[y]>>m]=g}else for(p=new Gr(o),c=0;c<o;++c)a[c]&&(p[c]=Uo[f[a[c]-1]++]>>15-a[c]);return p}),al=new vn(288);for(var Rt=0;Rt<144;++Rt)al[Rt]=8;for(var Rt=144;Rt<256;++Rt)al[Rt]=9;for(var Rt=256;Rt<280;++Rt)al[Rt]=7;for(var Rt=280;Rt<288;++Rt)al[Rt]=8;var Jv=new vn(32);for(var Rt=0;Rt<32;++Rt)Jv[Rt]=5;var Wv=Ds(al,9,1),ey=Ds(Jv,5,1),To=function(a){for(var s=a[0],l=1;l<a.length;++l)a[l]>s&&(s=a[l]);return s},ea=function(a,s,l){var o=s/8|0;return(a[o]|a[o+1]<<8)>>(s&7)&l},_o=function(a,s){var l=s/8|0;return(a[l]|a[l+1]<<8|a[l+2]<<16)>>(s&7)},ty=function(a){return(a+7)/8|0},Vo=function(a,s,l){return(s==null||s<0)&&(s=0),(l==null||l>a.length)&&(l=a.length),new vn(a.subarray(s,l))},ny=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],fn=function(a,s,l){var o=new Error(s||ny[a]);if(o.code=a,Error.captureStackTrace&&Error.captureStackTrace(o,fn),!l)throw o;return o},ay=function(a,s,l,o){var c=a.length,u=o?o.length:0;if(!c||s.f&&!s.l)return l||new vn(0);var f=!l,p=f||s.i!=2,m=s.i;f&&(l=new vn(c*3));var g=function(ye){var Fe=l.length;if(ye>Fe){var Ue=new vn(Math.max(Fe*2,ye));Ue.set(l),l=Ue}},v=s.f||0,y=s.p||0,j=s.b||0,b=s.l,E=s.d,N=s.m,A=s.n,w=c*8;do{if(!b){v=ea(a,y,1);var S=ea(a,y+1,3);if(y+=3,S)if(S==1)b=Wv,E=ey,N=9,A=5;else if(S==2){var F=ea(a,y,31)+257,X=ea(a,y+10,15)+4,Z=F+ea(a,y+5,31)+1;y+=14;for(var $=new vn(Z),B=new vn(19),J=0;J<X;++J)B[Xv[J]]=ea(a,y+J*3,7);y+=X*3;for(var z=To(B),H=(1<<z)-1,T=Ds(B,z,1),J=0;J<Z;){var K=T[ea(a,y,H)];y+=K&15;var O=K>>4;if(O<16)$[J++]=O;else{var V=0,Q=0;for(O==16?(Q=3+ea(a,y,3),y+=2,V=$[J-1]):O==17?(Q=3+ea(a,y,7),y+=3):O==18&&(Q=11+ea(a,y,127),y+=7);Q--;)$[J++]=V}}var W=$.subarray(0,F),R=$.subarray(F);N=To(W),A=To(R),b=Ds(W,N,1),E=Ds(R,A,1)}else fn(1);else{var O=ty(y)+4,D=a[O-4]|a[O-3]<<8,M=O+D;if(M>c){m&&fn(0);break}p&&g(j+D),l.set(a.subarray(O,M),j),s.b=j+=D,s.p=y=M*8,s.f=v;continue}if(y>w){m&&fn(0);break}}p&&g(j+131072);for(var Y=(1<<N)-1,x=(1<<A)-1,C=y;;C=y){var V=b[_o(a,y)&Y],q=V>>4;if(y+=V&15,y>w){m&&fn(0);break}if(V||fn(2),q<256)l[j++]=q;else if(q==256){C=y,b=null;break}else{var I=q-254;if(q>264){var J=q-257,ee=gf[J];I=ea(a,y,(1<<ee)-1)+yf[J],y+=ee}var he=E[_o(a,y)&x],_e=he>>4;he||fn(3),y+=he&15;var R=Qv[_e];if(_e>3){var ee=vf[_e];R+=_o(a,y)&(1<<ee)-1,y+=ee}if(y>w){m&&fn(0);break}p&&g(j+131072);var Ne=j+I;if(j<R){var le=u-R,Ce=Math.min(R,Ne);for(le+j<0&&fn(3);j<Ce;++j)l[j]=o[le+j]}for(;j<Ne;++j)l[j]=l[j-R]}}s.l=b,s.p=C,s.b=j,s.f=v,b&&(v=1,s.m=N,s.d=E,s.n=A)}while(!v);return j!=l.length&&f?Vo(l,0,j):l.subarray(0,j)},Bj=new vn(0),Ij=function(a,s){var l={};for(var o in a)l[o]=a[o];for(var o in s)l[o]=s[o];return l},Ng=function(a,s,l){for(var o=a(),c=a.toString(),u=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).replace(/\s+/g,"").split(","),f=0;f<o.length;++f){var p=o[f],m=u[f];if(typeof p=="function"){s+=";"+m+"=";var g=p.toString();if(p.prototype)if(g.indexOf("[native code]")!=-1){var v=g.indexOf(" ",8)+1;s+=g.slice(v,g.indexOf("(",v))}else{s+=g;for(var y in p.prototype)s+=";"+m+".prototype."+y+"="+p.prototype[y].toString()}else s+=g}else l[m]=p}return s},go=[],Pj=function(a){var s=[];for(var l in a)a[l].buffer&&s.push((a[l]=new a[l].constructor(a[l])).buffer);return s},$j=function(a,s,l,o){if(!go[l]){for(var c="",u={},f=a.length-1,p=0;p<f;++p)c=Ng(a[p],c,u);go[l]={c:Ng(a[f],c,u),e:u}}var m=Ij({},go[l].e);return Mj(go[l].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+s.toString()+"}",l,m,Pj(m),o)},qj=function(){return[vn,Gr,Yv,gf,vf,Xv,yf,Qv,Wv,ey,Uo,ny,Ds,To,ea,_o,ty,Vo,fn,ay,bf,ry,sy]},ry=function(a){return postMessage(a,[a.buffer])},sy=function(a){return a&&{out:a.size&&new vn(a.size),dictionary:a.dictionary}},Hj=function(a,s,l,o,c,u){var f=$j(l,o,c,function(p,m){f.terminate(),u(p,m)});return f.postMessage([a,s],s.consume?[a.buffer]:[]),function(){f.terminate()}},ha=function(a,s){return a[s]|a[s+1]<<8},ta=function(a,s){return(a[s]|a[s+1]<<8|a[s+2]<<16|a[s+3]<<24)>>>0},ld=function(a,s){return ta(a,s)+ta(a,s+4)*4294967296};function Gj(a,s,l){return l||(l=s,s={}),typeof l!="function"&&fn(7),Hj(a,s,[qj],function(o){return ry(bf(o.data[0],sy(o.data[1])))},1,l)}function bf(a,s){return ay(a,{i:2},s&&s.out,s&&s.dictionary)}var Xd=typeof TextDecoder<"u"&&new TextDecoder,Fj=0;try{Xd.decode(Bj,{stream:!0}),Fj=1}catch{}var Vj=function(a){for(var s="",l=0;;){var o=a[l++],c=(o>127)+(o>223)+(o>239);if(l+c>a.length)return{s,r:Vo(a,l-1)};c?c==3?(o=((o&15)<<18|(a[l++]&63)<<12|(a[l++]&63)<<6|a[l++]&63)-65536,s+=String.fromCharCode(55296|o>>10,56320|o&1023)):c&1?s+=String.fromCharCode((o&31)<<6|a[l++]&63):s+=String.fromCharCode((o&15)<<12|(a[l++]&63)<<6|a[l++]&63):s+=String.fromCharCode(o)}};function iy(a,s){if(s){for(var l="",o=0;o<a.length;o+=16384)l+=String.fromCharCode.apply(null,a.subarray(o,o+16384));return l}else{if(Xd)return Xd.decode(a);var c=Vj(a),u=c.s,l=c.r;return l.length&&fn(8),u}}var Yj=function(a,s){return s+30+ha(a,s+26)+ha(a,s+28)},Xj=function(a,s,l){var o=ha(a,s+28),c=ha(a,s+30),u=iy(a.subarray(s+46,s+46+o),!(ha(a,s+8)&2048)),f=s+46+o,p=Zj(a,f,c,l,ta(a,s+20),ta(a,s+24),ta(a,s+42)),m=p[0],g=p[1],v=p[2];return[ha(a,s+10),m,g,u,f+c+ha(a,s+32),v]},Zj=function(a,s,l,o,c,u,f){var p=c==4294967295,m=u==4294967295,g=f==4294967295,v=s+l,y=p+m+g;if(o&&y){for(;s+4<v;s+=4+ha(a,s+2))if(ha(a,s)==1)return[p?ld(a,s+4+8*m):c,m?ld(a,s+4):u,g?ld(a,s+4+8*(m+p)):f,1];o<2&&fn(13)}return[c,u,f,0]},Cg=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(a){a()};function Kj(a,s,l){l||(l=s,s={}),typeof l!="function"&&fn(7);var o=[],c=function(){for(var A=0;A<o.length;++A)o[A]()},u={},f=function(A,w){Cg(function(){l(A,w)})};Cg(function(){f=l});for(var p=a.length-22;ta(a,p)!=101010256;--p)if(!p||a.length-p>65558)return f(fn(13,0,1),null),c;var m=ha(a,p+8);if(m){var g=m,v=ta(a,p+16),y=ta(a,p-20)==117853008;if(y){var j=ta(a,p-12);y=ta(a,j)==101075792,y&&(g=m=ta(a,j+32),v=ta(a,j+48))}for(var b=s&&s.filter,E=function(A){var w=Xj(a,v,y),S=w[0],O=w[1],D=w[2],M=w[3],F=w[4],X=w[5],Z=Yj(a,X);v=F;var $=function(J,z){J?(c(),f(J,null)):(z&&(u[M]=z),--m||f(null,u))};if(!b||b({name:M,size:O,originalSize:D,compression:S}))if(!S)$(null,Vo(a,Z,Z+O));else if(S==8){var B=a.subarray(Z,Z+O);if(D<524288||O>.8*D)try{$(null,bf(B,{out:new vn(D)}))}catch(J){$(J,null)}else o.push(Gj(B,{size:D},$))}else $(fn(14,"unknown compression type "+S,1),null);else $(null,null)},N=0;N<g;++N)E(N)}else f(null,{});return c}function Zd(a){"@babel/helpers - typeof";return Zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Zd(a)}function Qj(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function Jj(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function Wj(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Fi(a,s)}function eS(a){var s=ly();return function(){var o=Vi(a),c;if(s){var u=Vi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return tS(this,c)}}function tS(a,s){if(s&&(Zd(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nS(a)}function nS(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Kd(a){var s=typeof Map=="function"?new Map:void 0;return Kd=function(o){if(o===null||!aS(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return Eo(o,arguments,Vi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Fi(c,o)},Kd(a)}function Eo(a,s,l){return ly()?Eo=Reflect.construct.bind():Eo=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Fi(g,f.prototype),g},Eo.apply(null,arguments)}function ly(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function aS(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Fi(a,s){return Fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Fi(a,s)}function Vi(a){return Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Vi(a)}var oy=(function(a){Wj(l,a);var s=eS(l);function l(){return Jj(this,l),s.apply(this,arguments)}return Qj(l)})(Kd(Error));function cy(a){var s=new oy(a.message);return a.stack&&(s.stack=a.stack),Error.captureStackTrace&&Error.captureStackTrace(s,cy),s.cause=a,s}function rS(a,s){return sS(a,s,iS,!0)}function sS(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=s.filter,o=arguments.length>2?arguments[2]:void 0;return o(new Uint8Array(a),{filter:function(u){return l?l({path:u.name}):!0}}).then(function(c){return c},function(c){throw lS(c)?cy(c):c})}function iS(a){return new Promise(function(s,l){Kj(a,function(o,c){o?l(o):s(c)})})}function lS(a){return typeof a.code=="number"}function Qd(a){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Qd(a)}function oS(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function cS(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function uS(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Yi(a,s)}function dS(a){var s=uy();return function(){var o=Xi(a),c;if(s){var u=Xi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return fS(this,c)}}function fS(a,s){if(s&&(Qd(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hS(a)}function hS(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Jd(a){var s=typeof Map=="function"?new Map:void 0;return Jd=function(o){if(o===null||!pS(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return ko(o,arguments,Xi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Yi(c,o)},Jd(a)}function ko(a,s,l){return uy()?ko=Reflect.construct.bind():ko=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Yi(g,f.prototype),g},ko.apply(null,arguments)}function uy(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pS(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Yi(a,s){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Yi(a,s)}function Xi(a){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Xi(a)}var mS={XLS_FILE_NOT_SUPPORTED:"You passed a legacy `.xls` file. Only `.xlsx` files are supported",FILE_NOT_SUPPORTED:"Doesn't look like an `.xlsx` file",INVALID_ZIP:"Couldn't unzip `.xlsx` file contents",NO_DATA:"No data"},zo=(function(a){uS(l,a);var s=dS(l);function l(o,c){var u;return cS(this,l),u=s.call(this,mS[o]||o),u.code=o,u.name="InvalidInputError",u.cause=c,u}return oS(l)})(Jd(Error));function gS(a){var s=a.path;return s.endsWith(".xml")||s.endsWith(".xml.rels")}var vS=[80,75],dy=[208,207,17,224],Ao=[vS,dy],yS=Ao.indexOf(dy);function bS(){var a,s=xS(Ao),l=0;return function(o){if(isNaN(a)){var c;s=s.filter(function(u){if(o===Ao[u][l])return Ao[u].length===l+1&&(c=u),!0}),s.length===1?a=c:s.length===0&&(a=-1)}return l++,a}}function xS(a){for(var s=[],l=0;l<a.length;)s.push(l),l++;return s}function jS(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=SS(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
13
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SS(a,s){if(a){if(typeof a=="string")return Tg(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Tg(a,s)}}function Tg(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}function wS(a){for(var s=bS(),l=jS(a),o;!(o=l()).done;){var c=o.value;if(NS(c,s))return}CS(a.length)}function NS(a,s){var l=s(a);if(l!==void 0){if(l===yS)throw new zo("XLS_FILE_NOT_SUPPORTED");if(l<0)throw new zo("FILE_NOT_SUPPORTED");return!0}}function CS(a){throw new zo(a===0?"NO_DATA":"FILE_NOT_SUPPORTED")}var Oo;function vr(a){var s=Date.now(),l=typeof global<"u"?!!global.READ_EXCEL_FILE_CHECKPOINTS:typeof window<"u"?!!window.READ_EXCEL_FILE_CHECKPOINTS:!1;l&&(Oo&&console.log(" -",s-Oo,"ms"),console.log("*",a)),Oo=s}function TS(){Oo=void 0}function fy(a){return TS(),vr("unpack files"),a instanceof File||a instanceof Blob?a.arrayBuffer().then(_g):Promise.resolve(a).then(_g)}function _g(a){return wS(new Uint8Array(a)),rS(a,{filter:gS}).then(function(s){return s},function(s){throw s instanceof oy?new zo("INVALID_ZIP",s.cause):s})}function _S(a,s){var l=o();return s(a,l,u,null,null).then(function(){return c(l)});function o(){return{workbookPr:void 0,sheets:[]}}function c(f){return{epoch1904:f.workbookPr?f.workbookPr.epoch1904:!1,sheets:f.sheets}}function u(f,p,m){f==="workbookPr"?m.workbookPr||(m.workbookPr={epoch1904:p.date1904==="1"}):f==="sheet"&&p.name&&m.sheets.push({id:Number(p.sheetId),name:p.name,relationId:p.id})}}function ES(a,s){var l="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",o="http://purl.oclc.org/ooxml/officeDocument/relationships/",c=u();return s(a,c,p,null,null).then(function(){return c});function u(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function f(v){return v}function p(v,y,j){v==="Relationship"&&m(j,y.Id,y.Type,y.Target)}function m(v,y,j,b){switch(j){case l+"styles":case o+"styles":v.styles=g(b);break;case l+"sharedStrings":case o+"sharedStrings":v.sharedStrings=g(b);break;case l+"worksheet":case o+"worksheet":v.sheets[y]=g(b);break}}function g(v){return v[0]==="/"?v.slice(1):"xl/"+v}}function Zi(a){"@babel/helpers - typeof";return Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Zi(a)}var kS=["xfId"];function Eg(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function kg(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?Eg(Object(l),!0).forEach(function(o){AS(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):Eg(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function AS(a,s,l){return s=OS(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function OS(a){var s=RS(a,"string");return Zi(s)==="symbol"?s:String(s)}function RS(a,s){if(Zi(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(Zi(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function DS(a,s){if(a==null)return{};var l=LS(a,s),o,c;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(a);for(c=0;c<u.length;c++)o=u[c],!(s.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(l[o]=a[o])}return l}function LS(a,s){if(a==null)return{};var l={},o=Object.keys(a),c,u;for(u=0;u<o.length;u++)c=o[u],!(s.indexOf(c)>=0)&&(l[c]=a[c]);return l}function MS(a,s){var l=o();return s(a,l,u,f,null).then(function(){return c(l)});function o(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function c(m){return m.styles.map(function(g){if(g.xfId){var v=g.xfId,y=DS(g,kS);return kg(kg({},m.baseStyles[v]),y)}else return g})}function u(m,g,v){if(m==="numFmt")v.numberFormats[g.numFmtId]={id:Number(g.numFmtId),template:g.formatCode};else if(m==="cellStyleXfs")v.cellStyleXfs=!0;else if(m==="cellXfs")v.cellXfs=!0;else if(m==="xf"){if(v.cellStyleXfs)v.baseStyles.push(p(g));else if(v.cellXfs){var y=p(g,v.numberFormats);g.xfId&&(y.xfId=Number(g.xfId)),v.styles.push(y)}}}function f(m,g){m==="cellStyleXfs"?g.cellStyleXfs=!1:m==="cellXfs"&&(g.cellXfs=!1)}function p(m,g){var v={},y=m.numFmtId;return y&&(g&&g[y]?v.numberFormat=g[y]:v.numberFormat={id:Number(y)}),v}}function US(a,s){var l=o();return s(a,l,u,f,p).then(function(){return c(l)});function o(){return{si:void 0,strings:[]}}function c(j){return j.strings}function u(j,b,E){j==="si"?E.si=m():E.si&&g(j,b,E.si)}function f(j,b){j==="si"?(b.strings.push(b.si.string),b.si=void 0):b.si&&v(j,b.si)}function p(j,b){b.si&&y(j,b.si)}function m(){return{t:!1,r:!1,rPh:!1,string:""}}function g(j,b,E){j==="t"?E.t=!0:j==="r"?E.r=!0:j==="rPh"&&(E.rPh=!0)}function v(j,b){j==="t"?b.t=!1:j==="r"?b.r=!1:j==="rPh"&&(b.rPh=!1)}function y(j,b){b.rPh||b.t&&(b.r?b.string+=j:b.string=j)}}function zS(a,s){var l=17,o=1,c=1,u=1440*60*1e3,f=365;s&&(a+=4*f+o+c);var p=o+c+70*f+l;return Math.floor((a-p)*u)}var BS=/^\[\$-[^\]]+\]/,IS=/;@$/,od={};function PS(a){if(a in od)return od[a];a=a.toLowerCase(),a=a.replace(BS,""),a=a.replace(IS,"");var s=a.split(/\W+/),l=s.length===0?!1:s.every(function(o){return $S.indexOf(o)>=0});return od[a]=l,l}var $S=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function qS(a,s,l){return a.numberFormat?!!(FS.indexOf(a.numberFormat.id)>=0||s&&a.numberFormat.template===s||l&&a.numberFormat.template&&PS(a.numberFormat.template)):!1}var HS=[14,15,16,17,18,19,20,21,22,45,46,47],cd=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Ag=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],GS=[71,72,73,74,75,76,77,78,79,80,81],FS=HS.concat(cd).concat(Ag.filter(function(a){return cd.indexOf(a)<0})).concat(GS.filter(function(a){return cd.indexOf(a)<0}).filter(function(a){return Ag.indexOf(a)<0}));function VS(a,s){return KS(a)||ZS(a,s)||XS(a,s)||YS()}function YS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
14
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XS(a,s){if(a){if(typeof a=="string")return Og(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Og(a,s)}}function Og(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}function ZS(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function KS(a){if(Array.isArray(a))return a}var QS=null,Ls=[null,QS];function JS(a,s,l,o,c){var u=VS(c,6),f=u[0],p=u[1],m=u[2],g=u[3],v=u[4],y=u[5];switch(a||"n"){case"str":return l===void 0?"VALUE_MISSING":l?["s",l]:Ls;case"inlineStr":return o===void 0?"VALUE_MISSING":["s",o];case"s":if(!l)return"VALUE_MISSING";var j=Number(l);return isNaN(j)||f[j]===void 0?"VALUE_INVALID":["s",f[j]];case"b":return l?l==="1"?["b",!0]:l==="0"?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return l?["e",l]:"VALUE_MISSING";case"d":if(!l)return Ls;var b=new Date(l);return isNaN(b.valueOf())?"VALUE_INVALID":["d",b.getTime()];case"n":if(!l)return Ls;if(s){var E=Number(s);if(isNaN(E)||p[E]===void 0)return"FORMAT_INVALID";if(qS(p[E],g,v)){var N=Number(l);return isNaN(N)?"VALUE_INVALID":["d",zS(N,m)]}}if(y)return["n",l];var A=Number(l);return isNaN(A)?"VALUE_INVALID":["n",A];default:return"TYPE_INVALID"}}function Rg(a){for(var s=0,l=0;l<a.length;){var o=a.charCodeAt(l);if(o>=48&&o<=57){var c=Number(a.slice(l));return isNaN(c)&&Dg(a),[c,s]}s*=26,s+=a.charCodeAt(l)-64,l++}Dg(a)}function Dg(a){throw new Error('<c r="'.concat(a,'">'))}function WS(a,s){return nw(a)||tw(a,s)||hy(a,s)||ew()}function ew(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tw(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function nw(a){if(Array.isArray(a))return a}function aw(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=hy(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
16
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hy(a,s){if(a){if(typeof a=="string")return Lg(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Lg(a,s)}}function Lg(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}var ud=null;function rw(a,s,l){var o=l.sharedStrings,c=l.styles,u=l.epoch1904,f=l.options,p=[o,c,u,f.dateFormat,f.smartDateParser!==!1,f.parseNumber],m=[],g=[],v=y();return s(a,v,S,O,D,w).then(function(){var W=v.sheetData,R=W.rowCount,Y=W.columnCount,x=W.dataRowCount,C=W.dataColumnCount;if(x<R&&(m=m.slice(0,x)),C<Y)for(var q=0;q<m.length;)m[q].length>C&&(m[q]=m[q].slice(0,C)),q++;for(var I=aw(m),ee;!(ee=I()).done;)for(var he=ee.value;he.length<C;)he.push(ud);return m});function y(){return{dimension:void 0,sheetData:void 0}}function j(W){return W.sheetData.rows}function b(W,R){W.sheetData.rowIndexShift+=W.sheetData.rows.length-R.length,W.sheetData.rows=R}function E(W){return W.sheetData.errors}function N(W,R){W.sheetData.errors=R}function A(W){var R=W.row,Y=W.column,x=W.error;throw new $i("<c/> at row ".concat(R,", col ").concat(Y,": ").concat(x))}function w(W){var R=j(v),Y=E(v);if(W)m=m.concat(R),g=g.concat(Y),g.length>0&&A(g[0]);else if(R.length>1){var x=R.slice(0,-1);m=m.concat(x),g=g.concat(Y),b(v,R.slice(-1)),N(v,[])}}function S(W,R,Y){W==="dimension"?Y.dimension=M(R.ref):W==="sheetData"?Y.sheetData=F():Y.sheetData&&X(W,R,Y.sheetData)}function O(W,R){R.sheetData&&Z(W,R.sheetData)}function D(W,R){R.sheetData&&$(W,R.sheetData)}function M(W){var R=W.split(":").map(Rg);return R.length===1&&(R=[R[0],R[0]]),R}function F(){return{c:void 0,rows:[],row:void 0,rowNumber:void 0,rowIndexShift:0,cursor:[0,0],rowCount:0,columnCount:0,dataRowCount:0,dataColumnCount:0,errors:[]}}function X(W,R,Y){W==="row"?(R.r&&(Y.rowNumber=Number(R.r)),Y.row=[]):W==="c"?(Y.c=T(),Y.c.attributes=R):Y.c&&K(W,R,Y.c)}function Z(W,R){if(W==="row"){if(R.rowNumber){var Y=R.rowIndexShift+R.rows.length;if(R.rowNumber<=Y)throw new $i("Out-of-place <row/> number ".concat(R.rowNumber," follows <row/> number ").concat(Y));for(;R.rowNumber>R.rowIndexShift+R.rows.length+1;)R.rows.push([])}R.rows.push(R.row),R.row.length>0&&(R.dataRowCount=R.rowNumber),R.rowNumber>R.rowCount&&(R.rowCount=R.rowNumber),R.row=void 0,R.rowNumber=void 0}else if(W==="c"){var x=B(R.c);if(x.row<R.cursor[0]||x.row===R.cursor[0]&&x.column<=R.cursor[1])throw new $i("Out-of-place <c/> at row ".concat(x.row," col ").concat(x.column," follows <c/> at row ").concat(R.cursor[0]," col ").concat(R.cursor[1]));if(R.cursor[0]=x.row,R.cursor[1]=x.column,R.rowNumber||(R.rowNumber=x.row),x.error)A(x),R.errors.push(x);else if(x.value!==ud){for(;x.column>R.row.length+1;)R.row.push(ud);R.row.push(x.value),x.column>R.dataColumnCount&&(R.dataColumnCount=x.column)}x.column>R.columnCount&&(R.columnCount=x.column),R.c=void 0}else R.c&&V(W,R.c)}function $(W,R){R.c&&Q(W,R.c)}function B(W){var R=W.attributes,Y=W.inlineString,x=W.vText,C=Rg(R.r),q=WS(C,2),I=q[0],ee=q[1],he=J(R.t,R.s,x,Y,p,f.trim!==!1);return typeof he=="string"?{row:I,column:ee,error:he}:{row:I,column:ee,value:H(he[1],he[0])}}function J(W,R,Y,x,C,q){var I=z(W,R,Y,x,C);return Array.isArray(I)&&I[0]==="s"&&(q&&(I[1]=I[1].trim()),I[1]==="")?Ls:I}function z(W,R,Y,x,C){var q=JS(W,R,Y,x,C);if(q==="VALUE_MISSING")switch(W||"n"){case"str":case"inlineStr":case"s":case"b":return Ls}return W==="e"?Ls:q}function H(W,R){return R==="n"?f.parseNumber?f.parseNumber(W):W:R==="d"?new Date(W):W}function T(){return{v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0}}function K(W,R,Y){W==="v"?Y.v=!0:W==="is"?(Y.is=!0,Y.inlineString=""):W==="t"?Y.t=!0:W==="r"?Y.r=!0:W==="rPh"&&(Y.rPh=!0)}function V(W,R){W==="v"?(R.v=!1,R.vText||(R.vText="")):W==="is"?R.is=!1:W==="t"?R.t=!1:W==="r"?R.r=!1:W==="rPh"&&(R.rPh=!1)}function Q(W,R){R.v?R.vText=W:R.is&&(R.rPh||R.t&&(R.r?R.inlineString+=W:R.inlineString=W))}}function sw(a){vr("convert files to strings");for(var s={},l=0,o=Object.keys(a);l<o.length;l++){var c=o[l];s[c]=iw(a[c])}return s}function iw(a){return typeof TextDecoder<"u"?new TextDecoder().decode(a):iy(a)}function Wd(a){"@babel/helpers - typeof";return Wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Wd(a)}function lw(a){return Wd(a)==="object"&&typeof a.then=="function"}function ef(a){"@babel/helpers - typeof";return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},ef(a)}function ow(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function cw(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function uw(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Ki(a,s)}function dw(a){var s=py();return function(){var o=Qi(a),c;if(s){var u=Qi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return fw(this,c)}}function fw(a,s){if(s&&(ef(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hw(a)}function hw(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function tf(a){var s=typeof Map=="function"?new Map:void 0;return tf=function(o){if(o===null||!pw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return Ro(o,arguments,Qi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Ki(c,o)},tf(a)}function Ro(a,s,l){return py()?Ro=Reflect.construct.bind():Ro=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Ki(g,f.prototype),g},Ro.apply(null,arguments)}function py(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pw(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Ki(a,s){return Ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Ki(a,s)}function Qi(a){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Qi(a)}var Mg=(function(a){uw(l,a);var s=dw(l);function l(o){var c;return cw(this,l),c=s.call(this,o),c.name="SheetNotFoundError",c}return ow(l)})(tf(Error));function Ji(a){"@babel/helpers - typeof";return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Ji(a)}function my(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=mw(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
17
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mw(a,s){if(a){if(typeof a=="string")return Ug(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ug(a,s)}}function Ug(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}function zg(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function Bo(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?zg(Object(l),!0).forEach(function(o){Io(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):zg(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function Io(a,s,l){return s=gw(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function gw(a){var s=vw(a,"string");return Ji(s)==="symbol"?s:String(s)}function vw(a,s){if(Ji(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(Ji(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function yw(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=sw(s);return vr("parse spreadsheet info and file paths"),dd(jw(),o,a).then(function(c){var u=c.spreadsheetInfo,f=c.filePaths;return vr('parse "shared strings" and "styles"'),dd(Sw(f),o,a).then(function(p){var m=p.sharedStrings,g=p.styles,v=l.sheets?l.sheets.map(function(y){return bw(y,u.sheets)}):u.sheets.map(function(y){return y.relationId});return vr("parse sheet".concat(v.length===1?"":"s"," data")),dd(ww(f,v,{sharedStrings:m,styles:g,epoch1904:u.epoch1904,options:l}),o,a).then(function(y){return vr("end"),v.map(function(j){return{sheet:xw(j,u.sheets),data:y[j]}})})})})}function gy(a,s,l,o){return o&&o.parseNumber||(o=Bo(Bo({},o),{},{parseNumber:null})),yw(s,l,o)}function bw(a,s){if(typeof a=="string"){for(var l=my(s),o;!(o=l()).done;){var c=o.value;if(c.name===a)return c.relationId}throw new Mg('Sheet "'.concat(a,'" not found. Available sheets: ').concat(s.map(function(u){var f=u.name;return'"'.concat(f,'"')}).join(", ")))}else{if(a<=s.length)return s[a-1].relationId;throw new Mg("Sheet number out of bounds: ".concat(a,". Available sheets count: ").concat(s.length))}}function xw(a,s){for(var l=my(s),o;!(o=l()).done;){var c=o.value;if(c.relationId===a)return c.name}throw new Error("Sheet relation ID not found: ".concat(a))}function jw(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:ES},"xl/workbook.xml":{name:"spreadsheetInfo",parse:_S}}}function Sw(a){var s;return s={},Io(s,a.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:US,fallback:[]}),Io(s,a.styles||"xl/styles.xml",{name:"styles",parse:MS,fallback:{}}),s}function ww(a,s,l){return Object.keys(a.sheets).filter(function(o){return s.includes(o)}).reduce(function(o,c){return Bo(Bo({},o),{},Io({},a.sheets[c],{name:c,parse:function(f,p){return rw(f,p,l)}}))},{})}function dd(a,s,l){for(var o={},c=function(){var j=f[u],b=a[j];o[b.name]=s[j]===void 0?b.fallback===void 0?(function(){throw new $i('"'.concat(j,'" file not found inside the `.xlsx` file'))})():b.fallback:b.parse(s[j],l)},u=0,f=Object.keys(a);u<f.length;u++)c();for(var p=[],m=function(){var j=v[g];lw(o[j])&&p.push(o[j].then(function(b){o[j]=b}))},g=0,v=Object.keys(o);g<v.length;g++)m();return p.length>0?Promise.all(p).then(function(){return o}):o}function Nw(a,s){return fy(a).then(function(l){return gy(Gv,Vv,l,s)})}function nf(a){"@babel/helpers - typeof";return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},nf(a)}function Cw(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function Tw(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function _w(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Wi(a,s)}function Ew(a){var s=vy();return function(){var o=el(a),c;if(s){var u=el(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return kw(this,c)}}function kw(a,s){if(s&&(nf(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aw(a)}function Aw(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function af(a){var s=typeof Map=="function"?new Map:void 0;return af=function(o){if(o===null||!Ow(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return Do(o,arguments,el(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Wi(c,o)},af(a)}function Do(a,s,l){return vy()?Do=Reflect.construct.bind():Do=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Wi(g,f.prototype),g},Do.apply(null,arguments)}function vy(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ow(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Wi(a,s){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Wi(a,s)}function el(a){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},el(a)}var pa=(function(a){_w(l,a);var s=Ew(l);function l(o){var c;return Tw(this,l),c=s.call(this,"invalid"),c.reason=o,c}return Cw(l)})(af(Error));function Rw(a){if(typeof a=="string"){var s=a;if(a=Number(a),String(a)!==s)throw new pa("not_a_number")}if(typeof a!="number")throw new pa("not_a_number");if(isNaN(a))throw new pa("invalid_number");if(!isFinite(a))throw new pa("out_of_bounds");return a}function Dw(a){if(typeof a=="string")return a;if(typeof a=="number"){if(isNaN(a))throw new pa("invalid_number");if(!isFinite(a))throw new pa("out_of_bounds");return String(a)}throw new pa("not_a_string")}function Lw(a){if(typeof a=="boolean")return a;throw new pa("not_a_boolean")}function Mw(a){if(a instanceof Date){if(isNaN(a.valueOf()))throw new pa("out_of_bounds");return a}throw new pa("not_a_date")}var Uw={}.constructor;function yy(a){return a!=null&&a.constructor===Uw}function Ms(a){"@babel/helpers - typeof";return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Ms(a)}function zw(a,s){return xy(a)||Bw(a,s)||xf(a,s)||by()}function Bw(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function Iw(a){return xy(a)||Pw(a)||xf(a)||by()}function by(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pw(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function xy(a){if(Array.isArray(a))return a}function Bg(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function Po(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?Bg(Object(l),!0).forEach(function(o){$w(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):Bg(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function $w(a,s,l){return s=qw(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function qw(a){var s=Hw(a,"string");return Ms(s)==="symbol"?s:String(s)}function Hw(a,s){if(Ms(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(Ms(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function jy(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=xf(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xf(a,s){if(a){if(typeof a=="string")return Ig(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ig(a,s)}}function Ig(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}var $o=null;function Gw(a,s,l){vr("parse sheet data using schema");for(var o=[],c=[],u=Fw(a,s),f=0,p=jy(u),m;!(m=p()).done;){var g=m.value,v=g.object,y=g.errors;y?c=c.concat(y.map(function(j){return Po(Po({},j),{},{row:f+1})})):o.push(v),f++}return vr("end"),c.length>0?{errors:c}:{objects:o}}function Fw(a,s,l){n1(s);var o=s1(),c=Iw(a),u=c[0],f=c.slice(1);return f.map(function(p){return Vw(p,s,u,o)})}function Vw(a,s,l,o){var c={schema:s},u=Sy(a,c,void 0,l,o),f=u.value,p=u.isEmptyValue,m=u.errors,g=u.children,v={value:i1,isEmptyValue:p,errors:m,isRequired:void 0},y=Cy(c,f,p,m,g,v.isRequired,v.value,v.isEmptyValue,v.errors,l);return m||y?{errors:(m||[]).concat(y||[])}:{object:Ny(f,p,void 0,o)}}function Yw(a,s,l,o,c){for(var u={},f=!0,p=[],m=[],g=0,v=Object.keys(s);g<v.length;g++){var y=v[g],j=Sy(a,s[y],Pg(y,l),o,c);j.errors?p=p.concat(j.errors):(u[y]=Ny(j.value,j.isEmptyValue,Pg(y,l),c),f&&!j.isEmptyValue&&(f=!1)),m.push(Po(Po({},j),{},{schemaEntry:s[y]}))}return p.length>0?{errors:p,children:m}:{value:u,isEmptyValue:f,children:m}}function Sy(a,s,l,o,c){var u=s.column?o.indexOf(s.column):void 0,f=s.column?u<0:void 0,p=s.column?f?{value:c.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:Xw(a[u],s,u,c):Yw(a,s.schema,l,o,c),m=p.value,g=p.isEmptyValue,v=p.errors,y=p.children;return v?{errors:v,children:y}:{value:m,isEmptyValue:g,children:y}}function Xw(a,s,l,o){var c=Zw(a,s,o),u=c.value,f=c.isEmptyValue,p=c.error,m=c.reason;if(p){var g=Ty({error:p,reason:m,column:s.column,columnIndex:l,valueType:s.type,value:a});return{errors:[g]}}return{value:u,isEmptyValue:f}}function Zw(a,s,l){return a===void 0?{value:l.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:a===$o?{value:l.propertyValueWhenCellIsEmpty,isEmptyValue:!0}:Array.isArray(s.type)?Kw(a,s,l):wy(a,s)}function Kw(a,s,l){if(typeof a!="string")return{error:"not_a_string"};var o=!0,c=[],u=[],f=e1(a,l.separatorCharacter).map(function(p){if(!(c.length>0)){if(!p){c.push("invalid"),u.push("syntax");return}var m=wy(p,s),g=m.value,v=m.isEmptyValue,y=m.error,j=m.reason;if(y){c.push(y),u.push(j);return}return o&&!v&&(o=!1),g}});return c.length>0?{error:c[0],reason:u[0]}:{value:f,isEmptyValue:o}}function wy(a,s,l){if(a===$o)return{value:a,isEmptyValue:!0};var o;if(s.type?o=Jw(a,Array.isArray(s.type)?s.type[0]:s.type):o={value:a},o.error)return o;if(a===$o)return{value:a,isEmptyValue:!0};if(s.oneOf){var c=Qw(o.value,s.oneOf);if(c)return c}if(s.validate)try{s.validate(o.value)}catch(u){return{error:u.message}}return{value:o.value,isEmptyValue:a1(o.value)}}function Qw(a,s){if(s.indexOf(a)<0)return{error:"invalid",reason:"unknown"}}function Jw(a,s){switch(s){case String:return Ai(a,Dw);case Number:return Ai(a,Rw);case Date:return Ai(a,Mw);case Boolean:return Ai(a,Lw);default:if(typeof s!="function")throw new Error("Unsupported schema `type`: ".concat(s&&s.name||s));return Ai(a,s)}}function Ai(a,s){try{var l=s(a);return l===void 0?{value:$o}:{value:l}}catch(c){var o={error:c.message};return c.reason&&(o.reason=c.reason),o}}function Ww(a,s,l){for(var o=0,c="";l+o<a.length;){var u=a[l+o];if(u===s)return[c,o];c+=u,o++}return[c,o]}function e1(a,s){for(var l=[],o=0;o<a.length;){var c=Ww(a,s,o),u=zw(c,2),f=u[0],p=u[1];o+=p+s.length,l.push(f.trim())}return l}function Ny(a,s,l,o){if(s){if(yy(a))return o.transformEmptyObject(a,{path:l});if(Array.isArray(a))return o.transformEmptyArray(a,{path:l})}return a}function Pg(a,s){return"".concat(s?s+".":"").concat(a)}function Cy(a,s,l,o,c,u,f,p,m,g){var v=[],y=t1(a,u,f,p,m);if(y&&l&&v.push(Ty({error:"required",column:a.column,columnIndex:g.indexOf(a.column),valueType:a.type,value:s})),c)for(var j=jy(c),b;!(b=j()).done;){var E=b.value,N=Cy(E.schemaEntry,E.value,E.isEmptyValue,E.errors,E.children,y,s,l,o,g);N&&(v=v.concat(N))}if(v.length>0)return v}function t1(a,s,l,o,c){return s===!1&&(o||c)?!1:a.required&&(typeof a.required=="boolean"?a.required:c?!1:a.required(l))}function Ty(a){var s=a.column,l=a.columnIndex,o=a.valueType,c=a.value,u=a.error,f=a.reason,p={error:u,column:s,columnIndex:l,value:c};return f&&(p.reason=f),o&&(p.type=o),p}function n1(a){for(var s=0,l=Object.keys(a);s<l.length;s++){var o=l[s],c=a[o];if(Ms(c.type)==="object"&&!Array.isArray(c.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!c.schema&&!c.column)throw new Error('"column" not defined for schema entry "'.concat(o,'".'))}_y(a,void 0)}function _y(a,s){if(s!==void 0&&s!==!1)throw new Error("In a schema, a nested object can have a `required` property but the only allowed value is `undefined` or `false`. Otherwise, a \"required\" error for a nested object would have to include a specific `column` title and a nested object doesn't have one. You've specified the following `required`: ".concat(s));for(var l=0,o=Object.keys(a);l<o.length;l++){var c=o[l];if(yy(a[c].schema)){if(a[c].column)throw new Error("In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: ".concat(c,`. Schema:
20
- `).concat(JSON.stringify(a[c],null,2)));_y(a[c].schema,a[c].required)}}}function a1(a){return a==null}var r1={propertyValueWhenColumnIsMissing:void 0,propertyValueWhenCellIsEmpty:null,transformEmptyObject:function(){return null},transformEmptyArray:function(){return null},separatorCharacter:","};function s1(a){return r1}var i1={};function tl(a){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},tl(a)}var l1=["schema"];function $g(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function qg(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?$g(Object(l),!0).forEach(function(o){o1(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):$g(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function o1(a,s,l){return s=c1(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function c1(a){var s=u1(a,"string");return tl(s)==="symbol"?s:String(s)}function u1(a,s){if(tl(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(tl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function d1(a,s){if(a==null)return{};var l=f1(a,s),o,c;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(a);for(c=0;c<u.length;c++)o=u[c],!(s.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(l[o]=a[o])}return l}function f1(a,s){if(a==null)return{};var l={},o=Object.keys(a),c,u;for(u=0;u<o.length;u++)c=o[u],!(s.indexOf(c)>=0)&&(l[c]=a[c]);return l}function h1(a,s,l,o,c){var u={},f=u.schema,p=d1(u,l1);return gy(a,s,l,qg(qg({},p),{},{sheets:[1]})).then(function(m){var g=m[0].data;return f?Gw(g,f):g})}function p1(a,s,l){return fy(a).then(function(o){return h1(Gv,Vv,o)})}function Ey(a){const s=[];let l=[],o="",c=!1;const u=a.replace(/^\uFEFF/,"");for(let f=0;f<u.length;f++){const p=u[f];p==='"'?c&&u[f+1]==='"'?(o+='"',f++):c=!c:p===","&&!c?(l.push(o),o=""):(p===`
11
+ 3. สังเกต…`,accessibility:"การเข้าถึง","Accessible name":"ชื่อสำหรับโปรแกรมอ่านหน้าจอ","Accessible name:":"ชื่อสำหรับโปรแกรมอ่านหน้าจอ","Action type":"ประเภทการกระทำ",Actions:"จัดการ","actions,":"การกระทำ,","Actual Result":"ผลที่เกิดขึ้นจริง","Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here.":"เพิ่มรหัส Jira, ลิงก์ GitLab, ทิกเก็ต หรือลิงก์ข้อกำหนดในเคสทดสอบเพื่อติดตามความครอบคลุมที่นี่","Add page.screenshot() to edited Playwright code, save it, then run that Test Case.":"เพิ่ม page.screenshot() ในโค้ด Playwright บันทึกแล้วรันเคสนั้นเพื่อเก็บภาพ","Add suggested words":"เพิ่มคำที่แนะนำ","Add to Guided Flow":"เพิ่มในขั้นตอนทดสอบ","Advanced settings":"ตั้งค่าขั้นสูง","Agent execution":"การทำงานของเอเจนต์","AI Scout workspace":"พื้นที่ทำงาน AI Scout","AI tokens:":"โทเคน AI",All:"ทั้งหมด","All folders and tags":"ทุกโฟลเดอร์และแท็ก","All requests passed":"ทุกคำขอผ่าน","API key":"คีย์ API","API token":"โทเคน API","API Token":"โทเคน API","Approve and start":"ยืนยันและเริ่ม",Assertion:"เงื่อนไขตรวจสอบ","Authorized target":"สิทธิ์ในการทดสอบ","Auto Scout":"สำรวจอัตโนมัติ","Auto Scout finds the paths. Guided Scout follows yours.":"เลือกสำรวจอัตโนมัติเพื่อค้นหาเส้นทาง หรือกำหนดขั้นตอนให้ระบบทำตาม",Automation:"รันทดสอบ","Automation readiness":"ความพร้อมในการรันอัตโนมัติ","Automation source":"โค้ดทดสอบอัตโนมัติ","Automation Status":"สถานะการทดสอบอัตโนมัติ","Automation workspace":"พื้นที่รันทดสอบ",Average:"เฉลี่ย",Back:"ย้อนกลับ","Bar chart":"กราฟแท่งแนวนอน","Base URL":"URL เริ่มต้น","Beginner guide":"คู่มือเริ่มต้น","Block controls whose label contains one of these words":"ข้ามปุ่มหรือลิงก์ที่มีคำเหล่านี้",blocked:"ถูกบล็อก",Blocked:"ถูกบล็อก","Bring an existing suite into LazyScout":"นำชุดทดสอบเดิมมาใช้ใน LazyScout","Browser address":"ที่อยู่เว็บ","Bug ID":"รหัสปัญหา","Bug Report":"รายงานปัญหา","Bug Reports":"รายงานปัญหา","Bug Reports (":"รายงานปัญหา (",Buttons:"ปุ่ม","buttons ·":"ปุ่ม ·",Cancel:"ยกเลิก","Capture reproducible issues and keep screenshots with the local project.":"บันทึกปัญหาที่พบพร้อมขั้นตอนทำซ้ำและภาพหน้าจอไว้ในโปรเจกต์นี้",case:"เคส","Case coverage":"ความครอบคลุมของเคส",cases:"เคส",Cases:"เคส","cases linked":"เคสที่เชื่อมโยง",Chart:"กราฟ","ChatGPT connection":"การเชื่อมต่อ ChatGPT","Check that the LazyScout workspace is writable.":"ตรวจสอบว่าสามารถบันทึกไฟล์ลงในพื้นที่ทำงาน LazyScout ได้",Checked:"เลือกแล้ว","Checking npm Registry…":"กำลังตรวจสอบ npm Registry…","Checking…":"กำลังตรวจสอบ…","Choose a CSV, XLSX or JSON file":"เลือกไฟล์ CSV, XLSX หรือ JSON","Choose a Test Case pattern":"เลือกรูปแบบเคสทดสอบ","Choose OCR lines to create assertions (":"เลือกบรรทัดจากภาพที่จะใช้ตรวจสอบ (","Clear list":"ล้างรายการ","CLI output":"ผลลัพธ์จาก CLI","Click a node to view observed UI. Click a line to inspect the action that created it.":"คลิกจุดเพื่อดูสิ่งที่พบในหน้าเว็บ หรือคลิกเส้นเชื่อมเพื่อดูว่าการกระทำใดทำให้สถานะเปลี่ยน","Click safeguards":"ป้องกันการคลิกที่เสี่ยง","Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly.":"คลิก พิมพ์ วางข้อความ หรือเลื่อนหน้าเว็บที่นี่เพื่อส่งการกระทำให้ Playwright","Click to choose an image":"คลิกเพื่อเลือกภาพ",Close:"ปิด","Close editor":"ปิดตัวแก้ไข","Close explorer":"ปิดหน้าสำรวจ","Close generated code":"ปิดโค้ดที่สร้าง","Close recorder workspace":"ปิดเครื่องมือบันทึก","Close the current LazyScout terminal and run `lazyscout` again to switch versions.":"ปิดเทอร์มินัล LazyScout แล้วรัน `lazyscout` อีกครั้งเพื่อเปลี่ยนเวอร์ชัน","Close workspace":"ปิดพื้นที่ทำงาน",code:"โค้ด","Collapse Explorer":"พับตัวสำรวจ","Collapse sidebar":"พับแถบด้านข้าง","Collecting pages and controls":"กำลังเก็บข้อมูลหน้าเว็บและส่วนควบคุม","Collecting pages, controls and event logs.":"กำลังรวบรวมหน้าเว็บ ส่วนควบคุม และบันทึกเหตุการณ์","Column chart":"กราฟแท่งแนวตั้ง",Comparison:"เปรียบเทียบ",Complete:"เสร็จสิ้น",COMPLETED:"เสร็จสิ้น",Composition:"สัดส่วน","Control the recorder from the left and preview the target page on the right. Your clicks and typing become Test Steps. Passwords are never read and are saved as":"ใช้แผงด้านซ้ายควบคุมการบันทึกและดูหน้าเว็บทางด้านขวา การคลิกและการพิมพ์จะกลายเป็นขั้นตอนทดสอบ ระบบจะไม่อ่านรหัสผ่าน และจะบันทึกเป็น","Controlled traffic":"ปริมาณคำขอ",Copy:"คัดลอก","Copy Codex command":"คัดลอกคำสั่ง Codex","Copy locator":"คัดลอกตัวระบุ","Copy MCP settings":"คัดลอกการตั้งค่า MCP","Coverage and readiness for":"ความครอบคลุมและความพร้อมของ","Coverage at a glance":"ภาพรวมความครอบคลุม","Create a flow to define a deterministic path.":"สร้างชุดขั้นตอนเพื่อกำหนดเส้นทางทดสอบ","Create Draft Test Cases":"สร้างเคสฉบับร่าง","Create first Bug Report":"สร้างรายงานปัญหาแรก","Create Guided Flow":"สร้างชุดขั้นตอนทดสอบ","Create Test Cases from an image":"สร้างเคสทดสอบจากภาพ","Creating ZIP…":"กำลังสร้าง ZIP…",critical:"วิกฤต","CSS selector":"ตัวเลือก CSS","CSV, XLSX and JSON are supported. Fields are mapped automatically.":"รองรับ CSV, XLSX และ JSON ระบบจะจับคู่ช่องข้อมูลให้อัตโนมัติ","Cumulative Scout discovery trend":"แนวโน้มจำนวนรายการที่พบสะสม","Current Workspace":"พื้นที่ทำงานปัจจุบัน",Customize:"ปรับแต่ง","Dashboard layout":"จัดวางแดชบอร์ด","Defect tracking":"ติดตามข้อบกพร่อง","Define a path and LazyScout will follow it only.":"กำหนดเส้นทางที่ต้องการให้ LazyScout ทดสอบ",Delete:"ลบ","Delete Flow":"ลบชุดขั้นตอน","Delete project":"ลบโปรเจกต์","Delete this Flow?":"ลบชุดขั้นตอนนี้หรือไม่?",depth:"ระดับความลึก","Describe the defect so another person can reproduce it quickly.":"อธิบายปัญหาให้ผู้อื่นทำตามแล้วพบอาการเดียวกันได้",Description:"คำอธิบาย","Destructive actions blocked":"บล็อกการกระทำที่อาจทำให้ข้อมูลเสียหาย",Discard:"ทิ้ง",Discovered:"พบเมื่อ",discoveries:"รายการที่พบ",Dismiss:"ปิด","Dismiss notice":"ปิดแจ้งเตือน",DONE:"เสร็จสิ้น","Donut chart":"กราฟโดนัท","Double-click to edit":"ดับเบิลคลิกเพื่อแก้ไข",Download:"ดาวน์โหลด","Draft preview":"ตัวอย่างฉบับร่าง","draft test cases":"เคสฉบับร่าง","Drag to reorder":"ลากเพื่อจัดลำดับ",Duplicate:"ทำสำเนา","Duplicate IDs are replaced with a new TC-IMPORT ID.":"ระบบจะสร้างรหัส TC-IMPORT ใหม่สำหรับรหัสที่ซ้ำ",duration:"ระยะเวลา",Edit:"แก้ไข","Edit code":"แก้ไขโค้ด","Edit Test Case":"แก้ไขเคสทดสอบ","Edit the generated file per Test Case, then run one case or selected cases.":"เลือกเคสเพื่อดูหรือแก้ไขสคริปต์ แล้วรันทีละเคสหรือรันพร้อมกัน","Edit value":"แก้ไขค่า","Element visible":"มองเห็นองค์ประกอบ",Email:"อีเมล","enabled to collect the API requests used by the page.":"เพื่อเก็บคำขอ API ที่หน้าเว็บใช้",English:"อังกฤษ","Enter only the selector value, for example":"กรอกเฉพาะค่าที่ใช้ค้นหา เช่น",Evidence:"หลักฐาน","Evidence screenshots":"ภาพหลักฐาน","Example:":"ตัวอย่าง","Example: Storefront regression":"เช่น ทดสอบหน้าร้าน","Execute only the steps defined here.":"รันเฉพาะขั้นตอนที่ระบุไว้ที่นี่","Execution result":"ผลการทดสอบ","Execution status":"สถานะการทดสอบ","Execution:":"การทำงาน","Expand Explorer":"ขยายตัวสำรวจ","Expand sidebar":"ขยายแถบด้านข้าง","Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result":"ช่องข้อมูลที่รองรับ ได้แก่ TC_ID, Title, Module, Folder, Tags, Requirements, Steps และ Expected Result","Expected Result":"ผลที่คาดหวัง","Expected value":"ค่าที่คาดหวัง",Explorer:"ตัวสำรวจ","Explorer mode":"โหมดสำรวจ","Explorer ready":"พร้อมสำรวจ","Explorer view":"มุมมองการสำรวจ","Export CSV":"ส่งออก CSV","Export PDF":"ส่งออก PDF","Export ZIP + images":"ส่งออก ZIP พร้อมภาพ","Exporting…":"กำลังส่งออก…","External custom URLs must also be configured on the LazyScout server.":"หากใช้ URL ภายนอกที่กำหนดเอง ให้ตั้งค่าบนเซิร์ฟเวอร์ LazyScout ด้วย",FAIL:"ไม่ผ่าน",Failed:"ไม่ผ่าน",FAILED:"ไม่ผ่าน","failed ·":"ไม่ผ่าน ·",Field:"ช่องข้อมูล","Fill credentials and verify the next URL":"กรอกข้อมูลเข้าสู่ระบบแล้วตรวจสอบ URL ถัดไป",Filtered:"ตามตัวกรอง",Fingerprint:"ลายนิ้วมือสถานะ","First time using Guided Flow?":"เพิ่งเริ่มทดสอบตามขั้นตอนใช่ไหม?",Fit:"พอดีจอ","Flow name":"ชื่อชุดขั้นตอน","Flow Steps":"ขั้นตอนทดสอบ",Folder:"โฟลเดอร์","Folder / Module":"โฟลเดอร์ / โมดูล","Folder coverage":"ความครอบคลุมตามโฟลเดอร์","Folder treemap":"แผนภูมิต้นไม้ตามโฟลเดอร์","Follow three steps to create Draft Test Cases for review.":"ทำตาม 3 ขั้นตอนเพื่อสร้างเคสฉบับร่างไว้ตรวจทาน","For uploads, create a draft first and choose a safe test file before running.":"สำหรับการอัปโหลด ให้สร้างฉบับร่างและเลือกไฟล์ทดสอบที่ปลอดภัยก่อนรัน","For usernames and passwords, leave Value empty and use":"สำหรับชื่อผู้ใช้และรหัสผ่าน ให้เว้นช่องค่าแล้วเลือก","Forms:":"ฟอร์ม",Forward:"ถัดไป",From:"จาก","Generate Cypress":"สร้างสคริปต์ Cypress","Generate Playwright":"สร้างสคริปต์ Playwright","Generate Test Case":"สร้างเคสทดสอบ","generated source":"โค้ดที่สร้าง","Generated Tests":"สคริปต์ทดสอบ","GET only · Local runner":"เฉพาะ GET · รันบนเครื่องนี้","globally? Restart LazyScout after installation to use it.":"ทั่วทั้งเครื่องหรือไม่? หลังติดตั้งให้เปิด LazyScout ใหม่",Go:"ไป",Guide:"คู่มือ","Guided Flow":"ทดสอบตามขั้นตอน","Guided Flow Guide":"คู่มือการทดสอบตามขั้นตอน","Guided Flows":"ชุดขั้นตอนทดสอบ","Headings (":"หัวเรื่อง (",Hierarchy:"โครงสร้าง",high:"สูง",High:"สูง","Hover preview":"ตัวอย่างเมื่อชี้เมาส์","Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock.":"เลื่อนเมาส์เพื่อดูตัวอย่าง คลิกเพื่อเลือกองค์ประกอบ คลิกองค์ประกอบอื่นเพื่อเปลี่ยน หรือคลิกพื้นที่ว่างเพื่อยกเลิก","HTML report":"รายงาน HTML","HTTP performance workspace":"ทดสอบประสิทธิภาพ HTTP","HTTP Request Results":"ผลคำขอ HTTP",Huge:"ใหญ่มาก","I own this target or have permission to run a load test.":"ฉันเป็นเจ้าของเว็บไซต์นี้หรือได้รับอนุญาตให้ทดสอบโหลด","ID:":"รหัส","id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child":"มี id หรือ name ใช้ CSS · มีชื่อปุ่มหรือลิงก์ใช้บทบาท · มี label ใช้ป้ายกำกับ · มี data-testid ใช้ Test ID · หากไม่มีค่าคงที่ ใช้ CSS ขององค์ประกอบแม่และลูก","If it has an id, choose":"หากมี id ให้เลือก",Import:"นำเข้า","Import Test Cases":"นำเข้าเคสทดสอบ","in a Test Case. Values are passed to the runner only while it runs.":"ในเคสทดสอบ ค่าจะถูกส่งให้ตัวรันเฉพาะตอนที่รันเท่านั้น","in-progress":"กำลังแก้ไข","Include API checks from XHR/fetch":"รวมการตรวจสอบ API จาก XHR/fetch","Input Type":"ชนิดข้อมูล","input,":"ขาเข้า,",Inputs:"ช่องกรอก","inputs ·":"ช่องกรอก ·","Inputs without a label":"ช่องกรอกที่ไม่มีป้ายกำกับ","Inspect element":"ตรวจองค์ประกอบ","Inspecting element":"กำลังตรวจองค์ประกอบ",Install:"ติดตั้ง","Install the latest release or switch to an earlier published version before opening a workspace.":"ติดตั้งรุ่นล่าสุดหรือเลือกรุ่นที่เคยเผยแพร่ก่อนเปิดพื้นที่ทำงาน","Install v":"ติดตั้งรุ่น","installed.":"ติดตั้งแล้ว","Interact with the browser window opened by LazyScout. This modal controls the same recording session and prevents the target page from being opened a second time.":"โต้ตอบกับหน้าต่างเบราว์เซอร์ที่ LazyScout เปิดไว้ แผงนี้ควบคุมการบันทึกเดียวกัน",interaction:"การโต้ตอบ","interactions explored ·":"การโต้ตอบที่สำรวจ ·","Interactive Playwright browser":"เบราว์เซอร์ Playwright สำหรับโต้ตอบ",Interval:"ช่วงห่าง","Invalid Value":"ค่าที่ไม่ถูกต้อง","Keep running":"ทดสอบต่อ",Label:"ป้ายกำกับ",Labels:"ป้ายกำกับ",Large:"ใหญ่","Latest release":"รุ่นล่าสุด","Launching Playwright runner":"กำลังเปิด Playwright","LazyScout does not capture automatically. Add":"เมื่อต้องการเก็บภาพ ให้เพิ่ม","LazyScout v":"LazyScout รุ่น","Line chart":"กราฟเส้น","Linked cases":"เคสที่เชื่อมโยง",links:"ลิงก์",Links:"ลิงก์","Live Playwright browser":"เบราว์เซอร์ Playwright แบบสด","Load Test":"ทดสอบโหลด","Load test is running":"กำลังทดสอบโหลด",Locator:"ตัวระบุตำแหน่ง",Locked:"เลือกค้างไว้","Login example":"ตัวอย่างการเข้าสู่ระบบ","Login success":"เข้าสู่ระบบสำเร็จ","Login validation":"ตรวจสอบการเข้าสู่ระบบ",low:"ต่ำ",Low:"ต่ำ",manual:"ทดสอบด้วยตนเอง",Manual:"ทดสอบด้วยตนเอง","Manual suite":"ชุดทดสอบด้วยตนเอง","Match the instruction":"ใช้ภาษาเดียวกับคำสั่ง","Maximum 100 per user":"สูงสุด 100 คำขอต่อคน","Maximum 20 concurrent users":"พร้อมกันได้สูงสุด 20 คน","Maximum pages":"จำนวนหน้าสูงสุด","Maximum total requests":"คำขอทั้งหมดสูงสุด","Maximum virtual users":"ผู้ใช้จำลองสูงสุด",medium:"ปานกลาง",Medium:"ปานกลาง",Method:"วิธีส่ง","Min / Max":"ต่ำสุด / สูงสุด",Model:"โมเดล",Module:"โมดูล",more:"รายการ","more requirements":"ข้อกำหนดเพิ่มเติม",ms:"มิลลิวินาที","Name:":"ชื่อ",navigation:"การนำทาง","Need Review":"รอตรวจทาน","Needs data":"รอข้อมูล","Needs review":"รอตรวจทาน","needs-data":"รอข้อมูล","needs-review":"รอตรวจทาน",negative:"กรณีผิดพลาด",Negative:"กรณีผิดพลาด","Network validation":"ตรวจสอบคำขอเครือข่าย","No Bug Reports yet":"ยังไม่มีรายงานปัญหา","No folders found.":"ยังไม่มีโฟลเดอร์","No Guided Flow selected":"ยังไม่ได้เลือกชุดขั้นตอน","No headings recorded":"ยังไม่มีหัวเรื่องที่บันทึก","No screenshots yet":"ยังไม่มีภาพหน้าจอ","No steps were recorded. Start again and interact with the page.":"ยังไม่มีขั้นตอนที่บันทึก ลองเริ่มใหม่แล้วคลิกหรือพิมพ์ในหน้าเว็บ","No steps yet.":"ยังไม่มีขั้นตอน","No Test Cases are available to generate.":"ยังไม่มีเคสสำหรับสร้างสคริปต์","No Test Cases match the current filters.":"ไม่มีเคสที่ตรงกับตัวกรอง","No Test Data matches the current filters.":"ไม่มีข้อมูลทดสอบที่ตรงกับตัวกรอง",Normal:"ปกติ","Not clicked (destructive)":"ข้ามการคลิกที่อาจทำให้ข้อมูลเสียหาย","Not linked":"ยังไม่ได้เชื่อมโยง","Not observed":"ยังไม่พบ","Not sure which locator to choose?":"ควรเลือกตัวระบุแบบไหน?",Note:"หมายเหตุ",Notes:"หมายเหตุ","Notes from Generator":"หมายเหตุจากตัวสร้างเคส","npm Registry is unavailable.":"เชื่อมต่อ npm Registry ไม่ได้",observed:"รายการที่พบ","Observed state":"สถานะที่พบ","Observed UI":"สิ่งที่พบบนหน้าเว็บ",of:"จาก",OFF:"ปิด",ON:"เปิด","once?":"หนึ่งครั้งหรือไม่?","One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control.":"ใส่หนึ่งคำต่อบรรทัด ระบบตรวจจากป้ายกำกับ ชื่อ รหัส และ URL โดยไม่แยกตัวพิมพ์เล็กหรือใหญ่","Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data.":"LazyScout ส่งเฉพาะ HTTP GET โดยจะไม่ส่งฟอร์ม เข้าสู่ระบบ หรือแก้ไขข้อมูลเป้าหมาย",open:"เปิด","Open AI Scout workspace":"เปิดพื้นที่ทำงาน AI Scout","Open LazyScout Guide":"เปิดคู่มือ LazyScout","Open recorder workspace":"เปิดเครื่องมือบันทึก","Open the target page in your browser and inspect the element you want to test.":"เปิดหน้าเป้าหมายในเบราว์เซอร์แล้วตรวจดูองค์ประกอบที่ต้องการทดสอบ","Open the visual Guided Flow guide":"เปิดคู่มือภาพการทดสอบตามขั้นตอน","Open visual Guided Flow guide":"เปิดคู่มือภาพการทดสอบตามขั้นตอน","Opening target URL":"กำลังเปิดเว็บไซต์เป้าหมาย","Opening workspace":"กำลังเปิดพื้นที่ทำงาน",Option:"ตัวเลือก",or:"หรือ","or drop a file here":"หรือลากไฟล์มาวางที่นี่",output:"ขาออก","Outputs:":"ผลลัพธ์",pages:"หน้า","pages ·":"หน้า ·","pages discovered":"หน้าที่พบ","pages explored":"หน้าที่สำรวจ","Pages that could not be opened (":"หน้าที่เปิดไม่ได้ (","pages,":"หน้า,",Pass:"ผ่าน",PASS:"ผ่าน",Passed:"ผ่าน",PASSED:"ผ่าน",Password:"รหัสผ่าน",Path:"เส้นทาง","Pause between each request":"ระยะพักระหว่างคำขอ",Pending:"รอทดสอบ",PENDING:"รอทดสอบ","pending execution":"รอรันทดสอบ","Pick the pattern that matches what you need to check.":"เลือกรูปแบบที่ตรงกับสิ่งที่ต้องการตรวจสอบ",Placeholder:"ข้อความตัวอย่างในช่อง","Plan preview":"ตรวจทานแผน","Playwright CLI output":"ผลลัพธ์จาก Playwright CLI","Playwright evidence":"หลักฐานจาก Playwright","Playwright is opening the website and collecting page data… This can take a few moments.":"Playwright กำลังเปิดเว็บไซต์และเก็บข้อมูลหน้าเว็บ อาจใช้เวลาสักครู่","Playwright locator":"ตัวระบุตำแหน่ง Playwright","Playwright Scout Log":"บันทึกการสำรวจด้วย Playwright","Please wait until Scout finishes.":"กรุณารอให้สำรวจเสร็จ","PNG, JPG and WEBP are supported.":"รองรับไฟล์ PNG, JPG และ WEBP",positive:"กรณีปกติ",Positive:"กรณีปกติ",Preconditions:"เงื่อนไขก่อนทดสอบ","Preconditions (one per line)":"เงื่อนไขก่อนทดสอบ (บรรทัดละข้อ)","Prefer Role + accessible name, or CSS when the button has a stable id.":"เลือกบทบาทและชื่อที่โปรแกรมอ่านหน้าจอใช้ หรือใช้ CSS หากปุ่มมี id ที่คงที่","Preparing MCP settings…":"กำลังเตรียมการตั้งค่า MCP…","Preparing your local QA tools…":"กำลังเตรียมเครื่องมือทดสอบ…","Previewing 10 of":"แสดงตัวอย่าง 10 จาก","Previous scan":"ผลการสำรวจครั้งก่อน",Priority:"ความสำคัญ","Priority comparison":"เปรียบเทียบความสำคัญ","Project actions":"จัดการโปรเจกต์","Project dashboard":"แดชบอร์ดโปรเจกต์","Project settings sections":"หมวดการตั้งค่าโปรเจกต์","Protected API action":"ยืนยันการส่งคำขอ API",Provider:"ผู้ให้บริการ","Published LazyScout versions":"รุ่น LazyScout ที่เผยแพร่","QA workspace":"พื้นที่ทำงาน QA","Quality overview":"ภาพรวมคุณภาพ","Read text from image":"อ่านข้อความจากภาพ","Read text from the image, or type it yourself":"อ่านข้อความจากภาพหรือพิมพ์เอง","Reading file…":"กำลังอ่านไฟล์…","Could not save the imported cases. Check that LazyScout is running and try again.":"บันทึกเคสที่นำเข้าไม่สำเร็จ ตรวจว่า LazyScout ยังเปิดอยู่ แล้วกดนำเข้าอีกครั้ง","Could not read the file.":"อ่านไฟล์ไม่สำเร็จ","No valid Test Cases were found. Check that the file contains TC_ID or Title.":"ไม่พบเคสทดสอบในไฟล์ ตรวจว่ามีคอลัมน์ TC_ID หรือ Title","Supported formats are CSV, XLSX and JSON.":"เลือกไฟล์ CSV, XLSX หรือ JSON","CSV contains an unclosed quoted value.":"ในไฟล์ CSV มีช่องที่ใส่เครื่องหมายคำพูดเปิดไว้โดยไม่ได้ปิด","Reading…":"กำลังอ่าน…",ready:"พร้อมทดสอบ",Ready:"พร้อมทดสอบ","Record a flow":"บันทึกขั้นตอนทดสอบ","Record and inspect":"บันทึกและตรวจสอบ","Record Flow · Planned":"บันทึกขั้นตอน · เร็ว ๆ นี้","Record Flow is planned for a future release":"การบันทึกขั้นตอนจะเพิ่มในรุ่นถัดไป","Recorded login":"บันทึกการเข้าสู่ระบบ","Recorded steps:":"ขั้นตอนที่บันทึก","Recording stopped. Save the Test Case from the left panel.":"หยุดบันทึกแล้ว กดบันทึกเป็นเคสทดสอบในแผงด้านซ้าย","Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases.":"การรีเฟรชจะปิด Playwright และยกเลิกเคสที่ยังไม่ได้รัน",Regenerate:"สร้างใหม่","Related Test Case":"เคสทดสอบที่เกี่ยวข้อง",Reload:"โหลดใหม่","Remove “":"ลบ “","Remove Guided Flow":"ลบชุดขั้นตอน",Rename:"เปลี่ยนชื่อ","Report sections":"ส่วนของรายงาน","Request settings":"การส่งคำขอ","Request URL":"URL ของคำขอ","Requested outputs":"ผลลัพธ์ที่ต้องการ",requests:"คำขอ","Requests / user":"คำขอต่อผู้ใช้","Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured.":"คำขอ XHR/fetch ที่พบระหว่างสำรวจ เมื่อกดรัน เซิร์ฟเวอร์จะส่งคำขอโดยใช้โทเคนของโปรเจกต์หากตั้งค่าไว้","requests…":"คำขอ…","Requests/sec":"คำขอต่อวินาที",required:"จำเป็น",Required:"จำเป็น",requirements:"ข้อกำหนด",Requirements:"ข้อกำหนด","Requirements / Tickets":"ข้อกำหนด / ทิกเก็ต","Requirements traceability":"การเชื่อมโยงข้อกำหนด",resolved:"แก้ไขแล้ว",Result:"ผลลัพธ์","Results are marked":"เคสที่สร้างจะมีสถานะ","Reuse existing observations where possible":"ใช้ข้อมูลที่เคยสำรวจเมื่อทำได้",review:"รอตรวจทาน","Review Test Cases":"ตรวจทานเคสทดสอบ","Review text and create cases":"ตรวจข้อความแล้วสร้างเคส",Role:"บทบาท","Role:":"บทบาท","rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together.":"แถว · ค่าที่สร้างเป็นเพียงตัวอย่าง ให้แทนด้วยข้อมูลทดสอบก่อนใช้ เมื่อส่งออก CSV จะรวมเคสและข้อมูลทดสอบไว้ด้วยกัน",Run:"รัน","Run Analyze with":"เริ่มสำรวจโดยเปิดตัวเลือก","Run API":"ทดสอบ API","Run Flow":"รันตามขั้นตอน","Run once":"รันหนึ่งครั้ง","Run report":"รายงานการทดสอบ","Run result:":"ผลการรัน","Run selected cases":"รันเคสที่เลือก",running:"กำลังใช้งาน",Running:"กำลังรัน",RUNNING:"กำลังรัน","Running now":"รุ่นที่กำลังใช้งาน","Running tests":"กำลังรันทดสอบ","Running…":"กำลังรัน…","Safe action":"การกระทำที่ปลอดภัย","Safe exploration only":"สำรวจเฉพาะการกระทำที่ปลอดภัย","Safe limits":"ขีดจำกัดการทดสอบ",Safety:"ความปลอดภัย",Save:"บันทึก","Save as Test Case":"บันทึกเป็นเคสทดสอบ","Save Bug Report":"บันทึกรายงานปัญหา","Save code":"บันทึกโค้ด","Save file":"ดาวน์โหลดไฟล์","Save Flow":"บันทึกขั้นตอน","Save Guided Flow":"บันทึกชุดขั้นตอน","Save the Flow, run it, then use the CLI error to adjust only the failing step.":"บันทึกขั้นตอนแล้วลองรัน หากพบข้อผิดพลาด ให้ดูข้อความจาก CLI แล้วแก้เฉพาะขั้นที่มีปัญหา","Save your changes?":"บันทึกการเปลี่ยนแปลงหรือไม่?","Saving…":"กำลังบันทึก…","scan complete":"สำรวจเสร็จแล้ว","Scope path":"เส้นทางในขอบเขต","Scout completed · Playwright events captured":"สำรวจเสร็จแล้ว · บันทึกเหตุการณ์ Playwright แล้ว","Scout discovery":"ผลการสำรวจ","Scout Log":"บันทึกการสำรวจ","Scout trend":"แนวโน้มการสำรวจ","Scouting website with Playwright":"กำลังสำรวจเว็บไซต์ด้วย Playwright","Screen name":"ชื่อหน้าจอ",screenshot:"ภาพหน้าจอ","Screenshot → Test Case":"สร้างเคสจากภาพหน้าจอ","Screenshot preview":"ตัวอย่างภาพหน้าจอ",Screenshots:"ภาพหน้าจอ","Screenshots (":"ภาพหน้าจอ (",Search:"ค้นหา","Search field, value or note":"ค้นหาช่องข้อมูล ค่า หรือหมายเหตุ","Search ID, title, expected result, steps, tags or requirements":"ค้นหารหัส ชื่อ ผลที่คาดหวัง ขั้นตอน แท็ก หรือข้อกำหนด","Search or select folder":"ค้นหาหรือเลือกโฟลเดอร์",seconds:"วินาที","Select a state or transition":"เลือกสถานะหรือเส้นเชื่อม","Select all":"เลือกทั้งหมด",selected:"รายการที่เลือก","Selected element":"องค์ประกอบที่เลือก","selected)":"รายการที่เลือก)","Send controlled GET traffic, compare response times, and inspect every HTTP response.":"ส่งคำขอ GET ตามจำนวนที่กำหนด เปรียบเทียบเวลาตอบสนอง และดูผลของแต่ละคำขอ","Set project target":"ตั้งเว็บไซต์เป้าหมาย",Severity:"ความรุนแรง","Show or hide charts":"เลือกกราฟที่ต้องการแสดง",Showing:"แสดง","Site Map":"แผนที่เว็บ",Size:"ขนาด",skipped:"ข้าม",Small:"เล็ก","Source URL":"URL ต้นทาง",Start:"เริ่ม","Start path":"เส้นทางเริ่มต้น","Start recording":"เริ่มบันทึก","Start the Cypress-style workspace to record clicks, typing, and element locators.":"เปิดเครื่องมือบันทึกเพื่อเก็บการคลิก การพิมพ์ และตำแหน่งองค์ประกอบ","Starting Playwright browser…":"กำลังเปิดเบราว์เซอร์ Playwright…","Starting…":"กำลังเริ่ม…","State detail":"รายละเอียดสถานะ","State Flow":"เส้นทางการเปลี่ยนสถานะ","State Tree":"โครงสร้างสถานะ",states:"สถานะ","states ·":"สถานะ ·",Status:"สถานะ",Step:"ขั้นตอน",steps:"ขั้นตอน",Steps:"ขั้นตอน","Steps to reproduce":"ขั้นตอนทำซ้ำ",Stop:"หยุด","Stop and refresh":"หยุดและรีเฟรช","Stop recording":"หยุดบันทึก","Stop run":"หยุดทดสอบ","Stop tests and refresh?":"หยุดทดสอบแล้วรีเฟรชหรือไม่?","Stop the running tests?":"หยุดการทดสอบที่กำลังรันอยู่หรือไม่?",STOPPED:"หยุดแล้ว","Stopping…":"กำลังหยุด…","Suggested destructive actions are blocked by default. Explorer skips them and an Automation run stops instead of clicking. Logout and sign-out actions remain available for QA testing.":"ระบบจะข้ามปุ่มที่อาจทำให้ข้อมูลเสียหายขณะสำรวจ และหยุดเมื่อพบระหว่างรันทดสอบ ส่วนปุ่มออกจากระบบยังทดสอบได้","Switch language":"เปลี่ยนภาษา","Switch to English (US)":"เปลี่ยนเป็นภาษาอังกฤษ (US)",Tag:"แท็ก",Tags:"แท็ก","Tags (comma separated)":"แท็ก (คั่นด้วยจุลภาค)","Target element":"องค์ประกอบเป้าหมาย","Target URL":"URL เป้าหมาย","Target:":"เป้าหมาย","TC ID":"รหัสเคส","TD ID":"รหัสข้อมูล","Test API":"ทดสอบ API","Test API (":"ทดสอบ API (","Test Case":"เคสทดสอบ","Test Case detail":"รายละเอียดเคสทดสอบ","Test Case language":"ภาษาของเคสทดสอบ","Test Case Review":"ตรวจทานเคสทดสอบ","Test Case table columns":"คอลัมน์ในตารางเคสทดสอบ","Test Case title":"ชื่อเคสทดสอบ","test cases":"เคสทดสอบ","Test Cases":"เคสทดสอบ","Test Cases (":"เคสทดสอบ (","Test Cases ready to import":"เคสพร้อมนำเข้า","Test Cases.":"เคสทดสอบ","Test configuration":"ตั้งค่าการทดสอบ","Test Data":"ข้อมูลทดสอบ","Test Data (":"ข้อมูลทดสอบ (","Test email":"อีเมลทดสอบ","Test files (":"ไฟล์ทดสอบ (","Test password":"รหัสผ่านทดสอบ","Test type":"ประเภทการทดสอบ","Test type comparison":"เปรียบเทียบประเภทการทดสอบ","Test username":"ชื่อผู้ใช้ทดสอบ",Tester:"ผู้ทดสอบ","Tester decision needed":"รอผู้ทดสอบตัดสินใจ","Tester-defined execution":"รันตามขั้นตอนที่กำหนด","Testing instruction":"สิ่งที่ต้องการทดสอบ",Text:"ข้อความ","Text color":"สีตัวอักษร","Text detected":"ข้อความที่พบ","Text size":"ขนาดตัวอักษร","Text visible":"มองเห็นข้อความ",Thai:"ไทย","The active Playwright session will be closed. Remaining selected Test Cases will not run.":"ระบบจะปิด Playwright และยกเลิกเคสที่เหลือในรอบนี้","The page is intentionally not embedded in an iframe.":"ดูหน้าเว็บในหน้าต่างเบราว์เซอร์ที่เปิดแยกไว้","The project will be removed from this local workspace. You can undo immediately afterward.":"โปรเจกต์จะถูกลบออกจากพื้นที่ทำงานนี้ คุณสามารถกดเลิกทำได้ทันทีหลังลบ","This request can create, update, or delete data. LazyScout will send it only once for this run.":"คำขอนี้อาจสร้าง แก้ไข หรือลบข้อมูล LazyScout จะส่งเพียงครั้งเดียวในรอบนี้",Time:"เวลา","Timeout per request":"ระยะหมดเวลาต่อคำขอ",Title:"ชื่อเรื่อง",To:"ไปยัง","to edited Playwright code when evidence is needed.":"ในสคริปต์ Playwright แล้วรันเคส",Total:"ทั้งหมด","Transition detail":"รายละเอียดการเปลี่ยนสถานะ",transitions:"การเปลี่ยนสถานะ",Treemap:"แผนภูมิต้นไม้",Trend:"แนวโน้ม","Try an invalid password and assert the alert":"ลองใช้รหัสผ่านผิดแล้วตรวจสอบข้อความแจ้งเตือน",Type:"ประเภท","UI State Explorer":"สำรวจสถานะหน้าเว็บ","UI state flow graph":"กราฟการเปลี่ยนสถานะหน้าเว็บ","UI states observed":"สถานะที่พบ",Undo:"เลิกทำ","unsafe actions blocked":"การกระทำที่ถูกบล็อก","Untitled bug":"ปัญหาที่ยังไม่มีชื่อ","Upload a Screenshot":"อัปโหลดภาพหน้าจอ","Upload up to 5 images at a time. Images are included in ZIP export.":"อัปโหลดได้ครั้งละ 5 ภาพ ภาพจะรวมอยู่ในไฟล์ ZIP ที่ส่งออก","URL contains":"URL มีข้อความนี้",Use:"ใช้","Use a Project Settings variable such as":"ใช้ตัวแปรจากการตั้งค่าโปรเจกต์ เช่น","Use a template, then replace labels and expected results with what you observed.":"เลือกตัวอย่างแล้วปรับชื่อและผลที่คาดหวังให้ตรงกับสิ่งที่พบบนหน้าเว็บ","Use CSS with a stable id or name. Example:":"ใช้ CSS ที่อ้างอิง id หรือ name ที่คงที่ เช่น","Use Label when the input has a real HTML label. It is also useful for validation checks.":"เลือกป้ายกำกับเมื่อช่องกรอกมี label ใน HTML วิธีนี้ใช้ตรวจสอบผลได้ด้วย","Use this element":"ใช้องค์ประกอบนี้",User:"ผู้ใช้",Username:"ชื่อผู้ใช้","Valid Value":"ค่าที่ถูกต้อง",validation:"ตรวจสอบข้อมูล",Validation:"ตรวจสอบข้อมูล","Validation:":"การตรวจสอบข้อมูล",Value:"ค่า","Value reference":"ตัวแปรอ้างอิง","Version Center":"จัดการเวอร์ชัน","View Test Case":"ดูเคสทดสอบ","Virtual users":"ผู้ใช้จำลอง","VS Code style editor · Ctrl+Space for suggestions.":"กด Ctrl+Space เพื่อดูคำแนะนำขณะเขียนโค้ด","Wait for element visible":"รอให้องค์ประกอบปรากฏ","Wait for text":"รอข้อความ","Wait for timeout":"รอตามเวลาที่กำหนด","Wait for URL":"รอ URL","Wait type":"รูปแบบการรอ","Waiting for all virtual users to complete their request budget…":"กำลังรอให้ผู้ใช้จำลองทุกคนส่งคำขอครบ…","Website exploration results":"ผลการสำรวจเว็บไซต์","Website explorer":"สำรวจเว็บไซต์","Website UI State Explorer":"สำรวจหน้าและสถานะของเว็บไซต์","What should I add next?":"เพิ่มอะไรต่อดี?","What went wrong?":"พบปัญหาอะไร?","When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here.":"เมื่อทดสอบไม่ผ่าน ให้บันทึกผลที่เกิดขึ้น ผลที่คาดหวัง ขั้นตอนทำซ้ำ และภาพหน้าจอที่นี่","Without requirement":"เคสที่ยังไม่มีข้อกำหนด","Working…":"กำลังดำเนินการ…","You can edit OCR text before importing.":"คุณแก้ไขข้อความที่อ่านจากภาพได้ก่อนนำเข้า"},m0={en:{overview:"Overview",testCases:"Test Cases",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"New project",projects:"Projects",files:"Files",settings:"Project settings",localWorkspace:"Local workspace",storedHere:"Projects are stored on this device",activeTarget:"Active project target",savedProject:"Saved project",newWorkspace:"New local workspace",scoutWebsite:"Scout a website",targetUrl:"Target URL",startPath:"Start Path",scopePath:"Scope Path",maxPages:"Max pages",maxDepth:"Max depth",language:"Test Case Language",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"Limit exploration to a specific page or path.",startPathHelp:"The page path where exploration should begin, such as /admin/users.",scopePathHelp:"Keep exploration under this path, such as /admin.",startPathHint:"Where to continue exploring after login",scopePathHint:"Limits exploration to this section",explore:"Explore",currentPageOnly:"Current page only",thisSection:"This section",entireSite:"Entire site",targetedGuideTitle:"How to use Targeted Exploration",targetedGuideTargetUrl:"Enter the main URL of the system you want LazyScout to explore.",targetedGuideStartPath:"Enter the path where exploration should begin, such as",targetedGuideScopePath:"Set a boundary such as",targetedGuideScopePathEnd:"so the flow does not move to other areas.",targetedGuideCurrentPage:"explores one page",targetedGuideThisSection:"explores only the scope",targetedGuideEntireSite:"explores the whole website",targetedGuideExample:"Example: Target URL = your system, Start Path = /admin/users, Scope Path = /admin, choose This section.",search:"Search",addCase:"Add Test Case",screenshot:"Screenshot",delete:"Delete",export:"Export CSV",activeProjectTarget:"Active project target",currentProject:"Current project",scoutDescription:"Enter a URL and let Playwright discover pages, controls, forms and UI states automatically.",scouting:"Scouting…",optional:"optional",targetUrlHelp:"The main website URL that LazyScout should open and explore, such as https://example.com.",maxPagesHelp:"Maximum number of pages Scout will inspect. Higher values may take longer.",maxDepthHelp:"Link depth from the starting page. 0 means one page; 1 means pages linked from it.",testLanguageHelp:"Language used for generated Test Case titles and details.",maxPagesDescription:"Maximum number of pages to inspect",maxDepthDescription:"Link depth to follow from the target page",testLanguageDescription:"Language used for generated Test Case details",safetyNotice:"Playwright stays within the same origin and avoids actions that can change or delete data.",includeApiChecks:"Include API checks from XHR/fetch",validationMatrix:"Full validation matrix included",validationMatrixHelp:"Generates required, invalid format, length, range, password policy, and failed-login Test Cases from detected form rules.",validationMatrixSafety:"Scout only discovers and generates these cases. Failed-login and server validation cases run once only when you start Automation.",waitAfterNavigation:"Wait after navigation",debugMode:"Debug mode",scoutAgain:"Scout again",regenerateProject:"Regenerate this project?",regenerateWarning:"Scout Site will replace the pages, Test Cases (including manually added cases), and test data in this project.",regenerateHint:"Export any Test Cases you want to keep before confirming. Project Settings will remain unchanged.",cancel:"Cancel",expandScout:"Expand Scout form",collapseScout:"Collapse Scout form",help:"Help"},th:{overview:"ภาพรวม",testCases:"เคสทดสอบ",automation:"รันทดสอบ",scoutLog:"บันทึกการสำรวจ",explorer:"ตัวสำรวจ",newProject:"โปรเจกต์ใหม่",projects:"โปรเจกต์",files:"ไฟล์",settings:"ตั้งค่าโปรเจกต์",localWorkspace:"พื้นที่ทำงานในเครื่อง",storedHere:"โปรเจกต์ถูกเก็บไว้ในอุปกรณ์นี้",activeTarget:"เว็บไซต์ของโปรเจกต์",savedProject:"บันทึกแล้ว",newWorkspace:"พื้นที่ทำงานใหม่",scoutWebsite:"สำรวจเว็บไซต์",targetUrl:"URL เป้าหมาย",startPath:"เส้นทางเริ่มต้น",scopePath:"เส้นทางในขอบเขต",maxPages:"จำนวนหน้าสูงสุด",maxDepth:"ระดับความลึก",language:"ภาษาของเคสทดสอบ",english:"อังกฤษ",thai:"ไทย",scoutSite:"สำรวจเว็บไซต์",targetedExploration:"กำหนดขอบเขตการสำรวจ",targetedExplorationHelp:"เลือกหน้าหรือส่วนของเว็บไซต์ที่ต้องการสำรวจ",startPathHelp:"หน้าเริ่มต้นภายในเว็บไซต์ เช่น /admin/users ใช้เมื่ออยากเริ่มจากหน้าลึก ๆ",scopePathHelp:"สำรวจเฉพาะหน้าภายใต้เส้นทางนี้ เช่น /admin",startPathHint:"หน้าที่ต้องการให้เริ่มสำรวจหลังเข้าสู่ระบบ",scopePathHint:"จำกัดการสำรวจให้อยู่ในส่วนนี้",explore:"ขอบเขตการสำรวจ",currentPageOnly:"สำรวจหน้าเดียว",thisSection:"สำรวจเฉพาะส่วนนี้",entireSite:"สำรวจทั้งเว็บไซต์",targetedGuideTitle:"วิธีกำหนดขอบเขตการสำรวจ",targetedGuideTargetUrl:"ใส่ URL หลักของระบบที่ต้องการให้ LazyScout สำรวจ",targetedGuideStartPath:"ใส่เส้นทางที่ต้องการเริ่มสำรวจ เช่น",targetedGuideScopePath:"ใส่ขอบเขต เช่น",targetedGuideScopePathEnd:"เพื่อสำรวจเฉพาะส่วนที่ต้องการ",targetedGuideCurrentPage:"สำรวจเพียงหน้าเดียว",targetedGuideThisSection:"สำรวจเฉพาะส่วนที่กำหนด",targetedGuideEntireSite:"สำรวจทั้งเว็บไซต์",targetedGuideExample:"ตัวอย่าง หากต้องการสำรวจส่วนผู้ดูแลระบบ ให้ใส่ URL ของเว็บไซต์ กำหนดเส้นทางเริ่มต้นเป็น /admin/users กำหนดขอบเขตเป็น /admin แล้วเลือก “สำรวจเฉพาะส่วนนี้”",search:"ค้นหา",addCase:"เพิ่มเคสทดสอบ",screenshot:"ภาพหน้าจอ",delete:"ลบ",export:"ส่งออก CSV",activeProjectTarget:"เว็บไซต์เป้าหมายของโปรเจกต์",currentProject:"โปรเจกต์ปัจจุบัน",scoutDescription:"ใส่ URL แล้วให้ Playwright ค้นหาหน้า ปุ่ม ฟอร์ม และสถานะ UI โดยอัตโนมัติ",scouting:"กำลังสำรวจ…",optional:"ไม่บังคับ",targetUrlHelp:"URL หลักของเว็บไซต์ที่ต้องการให้ LazyScout เปิดและสำรวจ เช่น https://example.com",maxPagesHelp:"จำนวนหน้าสูงสุดที่ Scout จะสำรวจ ค่ายิ่งมากอาจใช้เวลานานขึ้น",maxDepthHelp:"ระดับความลึกของลิงก์จากหน้าเริ่มต้น 0 คือหน้าเดียว และ 1 คือหน้าที่ลิงก์จากหน้านั้น",testLanguageHelp:"ภาษาที่ใช้สร้างชื่อและรายละเอียดของเคสทดสอบ",maxPagesDescription:"จำนวนหน้าสูงสุดที่จะสำรวจ",maxDepthDescription:"ระดับความลึกของลิงก์จากหน้าเป้าหมาย",testLanguageDescription:"ภาษาสำหรับรายละเอียดเคสที่สร้างใหม่",safetyNotice:"Playwright จะอยู่ภายใน origin เดียวกัน และหลีกเลี่ยงการกระทำที่อาจเปลี่ยนแปลงหรือลบข้อมูล",includeApiChecks:"รวมการตรวจสอบ API จาก XHR/fetch",validationMatrix:"สร้างเคสตรวจสอบข้อมูลในฟอร์ม",validationMatrixHelp:"สร้างเคสทดสอบช่องบังคับ รูปแบบ ความยาว ช่วงตัวเลข นโยบายรหัสผ่าน และการเข้าสู่ระบบไม่สำเร็จตามกฎที่พบในฟอร์ม",validationMatrixSafety:"ขั้นสำรวจจะสร้างเคสไว้ก่อน เคสที่ทดสอบการเข้าสู่ระบบไม่สำเร็จหรือตรวจสอบข้อมูลฝั่งเซิร์ฟเวอร์จะทำงานครั้งเดียวเมื่อคุณกดรันทดสอบ",waitAfterNavigation:"รอหลังเปลี่ยนหน้า",debugMode:"โหมดแก้จุดบกพร่อง",scoutAgain:"สำรวจอีกครั้ง",regenerateProject:"ต้องการสร้างข้อมูลของโปรเจกต์นี้ใหม่หรือไม่?",regenerateWarning:"การสำรวจจะเขียนทับหน้าเว็บ เคสทดสอบ (รวมถึงเคสที่เพิ่มเอง) และข้อมูลทดสอบในโปรเจกต์นี้",regenerateHint:"ส่งออกเคสที่ต้องการเก็บไว้ก่อนยืนยัน การตั้งค่าโปรเจกต์จะคงเดิม",cancel:"ยกเลิก",expandScout:"ขยายฟอร์มสำรวจเว็บไซต์",collapseScout:"พับฟอร์มสำรวจเว็บไซต์",help:"คำอธิบาย"}},qv=L.createContext(null);function g0({children:a}){const[s,l]=L.useState(()=>localStorage.getItem("lazyscout-language")==="th"?"th":"en");L.useEffect(()=>{localStorage.setItem("lazyscout-language",s),document.documentElement.lang=s},[s]);const o=L.useMemo(()=>({language:s,setLanguage:l,ui:c=>s==="th"&&Object.hasOwn(dg,c)?dg[c]:c,toggleLanguage:()=>l(c=>c==="en"?"th":"en"),t:c=>m0[s][c]}),[s]);return n.jsx(qv.Provider,{value:o,children:a})}function Le(){const a=L.useContext(qv);if(!a)throw new Error("useLanguage must be used inside LanguageProvider");return a}const Hv="lazyscout-test-case-language";function v0(){const a=localStorage.getItem(Hv);return a==="th"||a==="en"?a:"en"}function $r({text:a}){const{t:s}=Le(),[l,o]=L.useState(!1);return n.jsxs("span",{className:`help-tip ${l?"is-open":""}`,children:[n.jsx("button",{type:"button","aria-label":s("help"),"aria-expanded":l,title:a,onClick:c=>{c.preventDefault(),c.stopPropagation(),o(u=>!u)},children:"?"}),n.jsx("span",{className:"help-tip-popover",role:"tooltip",children:a})]})}function y0({ref:a,hidden:s,loading:l,initialUrl:o="",hasExistingData:c=!1,initialLanguage:u,onLanguageChange:f,onOpenAiScout:p,onAnalyze:m}){const{ui:g,t:v,language:y}=Le(),[S,b]=L.useState(o),[E,N]=L.useState(20),[A,w]=L.useState(3),[j,R]=L.useState(u??v0),[O,M]=L.useState(!1),[F,X]=L.useState(750),[Z,$]=L.useState(""),[B,J]=L.useState(""),[z,H]=L.useState("site"),[T,K]=L.useState(!1),[V,Q]=L.useState(!1),W=L.useRef(null);L.useEffect(()=>{b(o)},[o]),L.useImperativeHandle(a,()=>({expand:()=>Q(!1),focusUrl(){Q(!1),requestAnimationFrame(()=>W.current?.focus())}}),[]);const[D,Y]=L.useState(!1),x=(()=>{try{return new URL(o).hostname}catch{return"Current project"}})();function C(I){if(I.preventDefault(),!(!S.trim()||l)){if(c){Y(!0);return}q()}}function q(){const I=Math.min(100,Math.max(1,E===""?20:E)),ee=Math.min(10,Math.max(0,A===""?3:A));m(S.trim(),I,ee,j,O,F,Z.trim()||void 0,B.trim()||void 0,z,T),Y(!1)}return n.jsxs("form",{hidden:s,onSubmit:C,className:o?"project-scout-card":"new-project-card",children:[o&&n.jsxs("div",{className:"project-target-heading",children:[n.jsx("span",{className:"target-glow",children:"◎"}),n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v("activeProjectTarget")}),n.jsx("h2",{title:x,children:x}),n.jsx("span",{children:o})]}),n.jsxs("span",{className:"target-status",children:[n.jsx("i",{})," ",v("savedProject")]}),n.jsx("button",{type:"button",className:`scout-collapse-btn ${V?"is-collapsed":""}`,onClick:()=>Q(I=>!I),"aria-expanded":!V,"aria-controls":"scout-form-options","aria-label":v(V?"expandScout":"collapseScout"),title:v(V?"expandScout":"collapseScout"),children:n.jsx("span",{children:"⌃"})})]}),!o&&n.jsxs("div",{className:"new-project-hero",children:[n.jsx("span",{className:"scout-orbit",children:"✦"}),n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v("localWorkspace")}),n.jsx("h2",{children:v("scoutWebsite")}),n.jsx("p",{children:v("scoutDescription")})]}),n.jsx("button",{type:"button",className:`scout-collapse-btn ${V?"is-collapsed":""}`,onClick:()=>Q(I=>!I),"aria-expanded":!V,"aria-controls":"scout-form-options","aria-label":v(V?"expandScout":"collapseScout"),title:v(V?"expandScout":"collapseScout"),children:n.jsx("span",{children:"⌃"})})]}),n.jsxs("div",{id:"scout-form-options",inert:V,className:`scout-form-body ${V?"is-collapsed":""}`,children:[n.jsxs("div",{className:"scout-form-grid",children:[n.jsxs("div",{className:"scout-url-field",children:[n.jsxs("label",{className:"field-label",htmlFor:"target-url",children:[v("targetUrl"),n.jsx($r,{text:v("targetUrlHelp")})]}),n.jsx("input",{id:"target-url",ref:W,className:"field",value:S,onChange:I=>b(I.target.value),placeholder:"https://example.com",autoComplete:"off",disabled:l})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label",htmlFor:"max-pages",children:[v("maxPages"),n.jsx($r,{text:v("maxPagesHelp")})]}),n.jsx("input",{id:"max-pages",className:"field",type:"number",min:1,max:100,value:E,onChange:I=>N(I.target.value===""?"":Math.min(100,Math.max(1,Number(I.target.value)))),disabled:l})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label",htmlFor:"max-depth",children:[v("maxDepth"),n.jsx($r,{text:v("maxDepthHelp")})]}),n.jsx("input",{id:"max-depth",className:"field",type:"number",min:0,max:10,value:A,onChange:I=>w(I.target.value===""?"":Math.min(10,Math.max(0,Number(I.target.value)))),disabled:l})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label",htmlFor:"test-language",children:[v("language"),n.jsx($r,{text:v("testLanguageHelp")})]}),n.jsxs("select",{id:"test-language",className:"field",value:j,onChange:I=>{const ee=I.target.value;R(ee),localStorage.setItem(Hv,ee),f?.(ee)},disabled:l,children:[n.jsx("option",{value:"en",children:g("English")}),n.jsx("option",{value:"th",children:"ไทย"})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:flex-col md:items-stretch xl:flex-row xl:items-center",children:[n.jsx("button",{type:"submit",className:"btn btn-primary scout-submit",disabled:l||!S.trim(),children:v(l?"scouting":"scoutSite")}),p&&n.jsxs("button",{type:"button",disabled:l,onClick:p,"aria-label":g("Open AI Scout workspace"),title:y==="th"?"เชื่อม ChatGPT, เลือกโมเดล และตั้งค่า MCP":"Connect AI, choose a model and set up MCP",className:"inline-flex min-h-[38px] items-center justify-center gap-2 rounded-lg bg-indigo-700 px-3 text-sm font-semibold whitespace-nowrap text-white shadow-sm transition-colors hover:bg-indigo-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:opacity-50",children:[n.jsx("span",{"aria-hidden":"true",children:"✦"})," AI Scout",n.jsx("span",{"aria-hidden":"true",className:"rounded bg-white/15 px-1.5 py-0.5 text-[10px] tracking-wide",children:"MCP"})]})]})]}),!o&&n.jsxs("div",{className:"scout-options-help",children:[n.jsxs("span",{children:[n.jsx("b",{children:v("maxPages")})," ",v("maxPagesDescription")]}),n.jsxs("span",{children:[n.jsx("b",{children:v("maxDepth")})," ",v("maxDepthDescription")]}),n.jsxs("span",{children:[n.jsx("b",{children:v("language")})," ",v("testLanguageDescription")]})]}),n.jsxs("details",{className:"scout-advanced",children:[n.jsxs("summary",{children:[y==="th"?"ขอบเขตและตัวเลือกขั้นสูง":"Scope and advanced options",n.jsx("span",{children:v(z==="site"?"entireSite":z==="scope"?"thisSection":"currentPageOnly")})]}),n.jsxs("div",{className:"mt-3 border-t border-slate-100 pt-3",children:[n.jsxs("p",{className:"text-xs font-semibold text-slate-700 mb-2",children:[v("targetedExploration")," ",n.jsx($r,{text:v("targetedExplorationHelp")})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"field-label text-xs",htmlFor:"start-path",children:[v("startPath"),n.jsx($r,{text:v("startPathHelp")}),n.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",v("optional"),")"]})]}),n.jsx("input",{id:"start-path",className:"field text-sm",value:Z,onChange:I=>$(I.target.value),placeholder:"/admin/users",autoComplete:"off",disabled:l}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:v("startPathHint")})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"field-label text-xs",htmlFor:"scope-path",children:[v("scopePath"),n.jsx($r,{text:v("scopePathHelp")}),n.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",v("optional"),")"]})]}),n.jsx("input",{id:"scope-path",className:"field text-sm",value:B,onChange:I=>J(I.target.value),placeholder:"/admin",autoComplete:"off",disabled:l}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:v("scopePathHint")})]})]}),n.jsxs("div",{className:"mt-3",children:[n.jsx("label",{className:"field-label text-xs",children:v("explore")}),n.jsxs("div",{className:"flex flex-wrap gap-4 mt-1",children:[n.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[n.jsx("input",{type:"radio",name:"explore-mode",value:"current-page",checked:z==="current-page",onChange:()=>H("current-page"),disabled:l}),v("currentPageOnly")]}),n.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[n.jsx("input",{type:"radio",name:"explore-mode",value:"scope",checked:z==="scope",onChange:()=>H("scope"),disabled:l}),v("thisSection")]}),n.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[n.jsx("input",{type:"radio",name:"explore-mode",value:"site",checked:z==="site",onChange:()=>H("site"),disabled:l}),v("entireSite")]})]})]})]}),n.jsxs("details",{className:"scout-guide",children:[n.jsx("summary",{children:v("targetedGuideTitle")}),n.jsxs("div",{className:"scout-guide-body",children:[n.jsx("img",{src:"/lazyscout-icon-v2.png",width:"40",height:"40",loading:"lazy",alt:"LazyScout"}),n.jsxs("div",{children:[n.jsxs("p",{children:[n.jsx("b",{children:v("targetUrl")})," ",v("targetedGuideTargetUrl")]}),n.jsxs("p",{children:[n.jsx("b",{children:v("startPath")})," ",v("targetedGuideStartPath")," ",n.jsx("code",{children:"/admin/users"})]}),n.jsxs("p",{children:[n.jsx("b",{children:v("scopePath")})," ",v("targetedGuideScopePath")," ",n.jsx("code",{children:"/admin"})," ",v("targetedGuideScopePathEnd")]}),n.jsxs("p",{children:[n.jsx("b",{children:v("currentPageOnly")})," ",v("targetedGuideCurrentPage")," · ",n.jsx("b",{children:v("thisSection")})," ",v("targetedGuideThisSection")," · ",n.jsx("b",{children:v("entireSite")})," ",v("targetedGuideEntireSite")]}),n.jsx("p",{className:"text-slate-500",children:v("targetedGuideExample")})]})]})]}),n.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-4 border-t border-slate-100 pt-3 text-xs text-slate-600",children:[n.jsxs("label",{className:"m-0 flex items-center gap-2",children:[n.jsx("input",{type:"checkbox",checked:O,onChange:I=>M(I.target.checked),className:"h-4 w-4",disabled:l})," ",v("includeApiChecks")]}),n.jsxs("label",{className:"m-0 flex items-center gap-2",children:[v("waitAfterNavigation")," ",n.jsx("input",{className:"field w-24",type:"number",min:0,max:5e3,step:250,value:F,onChange:I=>X(I.target.value===""?0:Number(I.target.value)),disabled:l})," ",g("ms")]}),n.jsxs("label",{className:"m-0 flex items-center gap-2",children:[n.jsx("input",{type:"checkbox",checked:T,onChange:I=>K(I.target.checked),className:"h-4 w-4",disabled:l})," ",v("debugMode")]})]})]})]}),D&&n.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal scout-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"scout-confirm-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v("scoutAgain")}),n.jsx("h2",{id:"scout-confirm-title",children:v("regenerateProject")})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>Y(!1),"aria-label":g("Close"),children:"×"})]}),n.jsxs("div",{className:"modal-body",children:[n.jsx("p",{children:v("regenerateWarning")}),n.jsx("p",{className:"text-sm text-slate-500",children:v("regenerateHint")})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Y(!1),children:v("cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:q,children:v("scoutSite")})]})]})})]})}function Hr(a){if(!/[<&]/.test(a))return a;const s=document.createElement("template");return s.innerHTML=a,s.content.textContent||a}function qr(a,s){try{const l=new URL(a,s);return!["https:","http:"].includes(l.protocol)||l.username||l.password?void 0:l}catch{return}}function b0(a,s,l){const o=new Map,c=new Map,u=new Set;for(const m of a?.pages??[]){const g=qr(m.finalUrl||m.url);g&&u.add(g.href)}for(const m of a?.pages??[]){const g=qr(m.finalUrl),v=qr(m.url);if(!v||!g||u.has(v.href))continue;const y=c.get(v.href);c.set(v.href,y&&y!==g.href?v.href:g.href)}function f(m){const g=qr(m);if(!g)return;const v=c.get(g.href)??g.href;let y=o.get(v);if(!y){const S=new URL(v);y={url:v,path:S.pathname+S.search+S.hash,title:"",cases:[],controls:new Set,links:new Set},o.set(v,y)}return y}f(s||a?.startUrl||"");for(const m of a?.pages??[]){const g=f(m.finalUrl||m.url);if(g){g.title||=m.title;for(const v of[...m.buttons,...m.inputs,...m.selects,...m.textareas]){const y=v.accessibleName||v.placeholder||v.text;y&&g.controls.add(y)}for(const v of m.links){const y=v.href&&qr(v.href,g.url);y&&g.links.add(c.get(y.href)??y.href)}}}for(const m of l)f(m.sourceUrl)?.cases.push(m);const p=new Map(a?.actionGraph.states.map(m=>[m.id,m.url]));for(const m of a?.actionGraph.edges??[]){if(!m.toStateId||m.status!=="visited")continue;const g=qr(p.get(m.fromStateId)??"")?.href,v=qr(p.get(m.toStateId)??"")?.href;g&&v&&o.get(c.get(g)??g)?.links.add(c.get(v)??v)}return[...o.values()]}const x0={help:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.5 9a2.5 2.5 0 1 1 4 2c-1.1.7-1.5 1.2-1.5 2.5M12 16.5h.01",overview:"M3 3h7v7H3z M14 3h7v7h-7z M3 14h7v7H3z M14 14h7v7h-7z",documents:"M6 3h8l4 4v14H6z M14 3v5h4 M9 12h6 M9 16h6",activity:"M3 12h4l3-7 4 14 3-7h4",gauge:"M4 18a9 9 0 1 1 16 0H4z M12 14l5-5",map:"M12 8v4M5 16v-4h14v4 M9 3h6v5H9z M2 16h6v5H2z M16 16h6v5h-6z",globe:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM3 12h18M12 3c5 5 5 13 0 18-5-5-5-13 0-18Z",page:"M3 5h18v14H3z M3 9h18 M6 7h.1 M9 7h.1",cases:"M8 5H5v16h14V5h-3M9 3h6v4H9z M8 12h8M8 16h6",eye:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12ZM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",play:"m8 4 12 8-12 8z",stack:"m12 3 10 5-10 5L2 8z M2 12l10 5 10-5 M2 16l10 5 10-5",external:"M13 4h7v7 M20 4 10 14 M10 5H5v15h15v-5",spark:"M12 3c0 5-4 9-9 9 5 0 9 4 9 9 0-5 4-9 9-9-5 0-9-4-9-9Z",plus:"M12 5v14M5 12h14",check:"m4 12 5 5L20 6",down:"m6 9 6 6 6-6",back:"m14 6-6 6 6 6",next:"m10 6 6 6-6 6",close:"m6 6 12 12M18 6 6 18",grip:"M9 6h.1M15 6h.1M9 12h.1M15 12h.1M9 18h.1M15 18h.1",queue:"M3 5h12M3 10h10M3 15h7 M15 12l6 4-6 4z"};function Qe({name:a}){return n.jsx("svg",{className:"map-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:a==="grip"?3:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("path",{d:x0[a]})})}const rd="application/x-lazyscout-selection",fg=50,fr=(a,s)=>(a+.5)*320/s;function j0({projectId:a,projectName:s,target:l,result:o,cases:c,queue:u,onQueue:f,onReview:p,onCase:m,onScout:g,onWrite:v}){const y=Le().language==="th",S=L.useMemo(()=>b0(o,l,c),[o,l,c]),[b,E]=L.useState(""),[N,A]=L.useState("map"),[w,j]=L.useState(!1),[R,O]=L.useState(),M={full:y?"คิวเต็มแล้ว ใส่ได้ครั้งละ 50 เคส":"Queue full. Review up to 50 cases per run.",empty:y?"หน้านี้ยังไม่มีเคสให้ใส่คิว":"This page has no cases to queue yet.",duplicate:y?"เคสที่เลือกอยู่ในคิวแล้ว":"These cases are already in the queue."},F=S.find(x=>x.url===b)??S[0],X=L.useMemo(()=>new Map(c.map(x=>[x.id,x])),[c]),Z=u.filter(x=>X.has(x)),$=x=>{E(x),O(void 0)};function B(x){const C=[...new Set([...Z,...x])];f(C.slice(0,fg)),C.length>fg?O("full"):x.length?C.length===Z.length?O("duplicate"):O(C.length-Z.length):O("empty")}function J(x,C){x.dataTransfer.setData(rd,JSON.stringify({projectId:a,...C})),x.dataTransfer.effectAllowed="copy"}function z(x){x.preventDefault(),j(!1);try{const C=JSON.parse(x.dataTransfer.getData(rd));if(C.projectId!==a)return;if(C.kind==="page"){const q=S.find(I=>I.url===C.value);q&&B(q.cases.map(I=>I.id))}else C.kind==="case"&&X.has(C.value)&&B([C.value])}catch{}}const H=F&&new URL(F.url).host,T=Math.max(0,S.indexOf(F)),K=Math.floor(T/3)*3,V=S.slice(K,K+3),Q=F?S.filter(x=>x!==F&&F.links.has(x.url)).slice(0,2):[],W=[...Q.map(x=>({kind:"page",value:x.url,title:x.path})),...F?.cases.slice(0,3-Q.length).map(x=>({kind:"case",value:x.id,title:Hr(x.title)}))??[]],D=N==="map"?y?"แผนที่เว็บไซต์":"Page map":y?"ตัวอย่างเว็บไซต์":"Website preview";function Y(x,C){return n.jsxs("button",{type:"button",className:"map-node route-node"+(x===F?" selected-node":""),style:{top:fr(C,V.length)/3.2+"%"},"aria-pressed":x===F,title:x.url,draggable:!0,onDragStart:q=>J(q,{kind:"page",value:x.url}),onClick:()=>$(x.url),children:[n.jsx(Qe,{name:"page"}),n.jsxs("span",{children:[n.jsx("small",{children:y?"หน้าเว็บ":"Page"}),n.jsx("b",{children:x.path})]}),n.jsx(Qe,{name:"grip"})]},x.url)}return n.jsxs("section",{className:"map-studio","aria-label":D,children:[n.jsxs("div",{className:"studio-heading",children:[n.jsxs("div",{children:[n.jsx("h1",{children:D}),n.jsx("p",{children:N==="map"?y?"เลือกหน้าเว็บ แล้วลากหน้าหรือเคสที่อยากทดสอบลงคิว":"Select a page, then drag pages or test cases into your run queue.":y?"เปิดหน้าที่เลือก แล้วเทียบกับเคสที่บันทึกไว้ด้านข้าง":"Explore the selected page alongside its saved test cases."})]}),n.jsxs("button",{className:"studio-button",onClick:g,children:[n.jsx(Qe,{name:"map"}),y?"สำรวจเว็บไซต์":"Scout website"]})]}),n.jsxs("div",{className:"studio-layout",children:[n.jsxs("div",{className:"map-workbench",children:[n.jsxs("div",{className:"map-toolbar",children:[n.jsxs("div",{className:"map-segments",role:"group","aria-label":y?"มุมมอง":"View",children:[n.jsxs("button",{"aria-pressed":N==="map",onClick:()=>A("map"),children:[n.jsx(Qe,{name:"map"}),y?"แผนที่":"Map"]}),n.jsxs("button",{"aria-pressed":N==="preview",disabled:!F,onClick:()=>A("preview"),children:[n.jsx(Qe,{name:"eye"}),y?"ตัวอย่างเว็บ":"Web preview"]})]}),F&&n.jsxs("label",{className:"page-picker",children:[n.jsx("span",{children:y?"หน้า":"Page"}),n.jsx("select",{"aria-label":y?"เลือกหน้าเว็บ":"Select page",value:F.url,onChange:x=>$(x.target.value),children:S.map(x=>n.jsxs("option",{value:x.url,children:[x.path," · ",new URL(x.url).host]},x.url))})]})]}),F?N==="preview"?n.jsxs("div",{className:"live-preview",children:[n.jsxs("div",{className:"preview-address",children:[n.jsx(Qe,{name:"globe"}),n.jsx("code",{title:F.url,children:F.url}),n.jsxs("a",{href:F.url,target:"_blank",rel:"noopener noreferrer",children:[y?"เปิดแท็บใหม่":"Open in new tab"," ",n.jsx(Qe,{name:"external"})]})]}),new URL(F.url).origin!==window.location.origin&&n.jsx("iframe",{title:y?"ตัวอย่างหน้าเว็บที่เลือก":"Selected website preview",src:F.url,sandbox:"allow-scripts",referrerPolicy:"no-referrer"},F.url),n.jsx("p",{children:y?"ถ้าเว็บต้องล็อกอินหรือไม่แสดงในกรอบ ให้เปิดในแท็บใหม่":"If the site needs sign-in or blocks embedding, open it in a new tab."})]}):n.jsxs("div",{className:"map-canvas",children:[n.jsxs("div",{className:"canvas-meta",children:[n.jsxs("span",{children:[n.jsx("i",{}),y?"แผนที่โปรเจกต์":"Project map"]}),n.jsxs("span",{children:[S.length," ",y?"หน้า":S.length===1?"page":"pages"]})]}),n.jsx("div",{className:"graph-scroll",tabIndex:0,"aria-label":y?"แผนผังหน้าเว็บ":"Page diagram",children:n.jsxs("div",{className:"route-graph",children:[n.jsxs("svg",{className:"map-lines",viewBox:"0 0 1000 320",preserveAspectRatio:"none","aria-hidden":"true",children:[V.map((x,C)=>n.jsx("path",{d:`M 250 160 C 295 160, 295 ${fr(C,V.length)}, 340 ${fr(C,V.length)}`},x.url)),W.map((x,C)=>n.jsx("path",{d:`M 615 ${fr(T-K,V.length)} C 650 ${fr(T-K,V.length)}, 650 ${fr(C,W.length)}, 694 ${fr(C,W.length)}`},x.value))]}),n.jsxs("div",{className:"map-node root-node",children:[n.jsx(Qe,{name:"globe"}),n.jsxs("span",{children:[n.jsx("small",{children:y?"โปรเจกต์":"Project"}),n.jsx("b",{title:s,children:s})]})]}),V.map(Y),W.map((x,C)=>n.jsxs("button",{type:"button",className:"map-node leaf-node",style:{top:fr(C,W.length)/3.2+"%"},title:x.title,draggable:!0,onDragStart:q=>J(q,x),onClick:()=>x.kind==="case"?m(x.value):$(x.value),children:[n.jsx(Qe,{name:x.kind==="case"?"cases":"page"}),n.jsxs("span",{children:[n.jsx("small",{children:x.kind==="case"?x.value:y?"ลิงก์ไปยัง":"Links to"}),n.jsx("b",{children:x.title})]}),n.jsx(Qe,{name:"grip"})]},x.value))]})}),n.jsxs("div",{className:"canvas-footer",children:[n.jsxs("span",{children:[n.jsx("i",{}),y?"หน้าที่เลือก":"Selected page"]}),n.jsx("code",{title:H,children:H})]})]}):n.jsxs("div",{className:"map-empty",children:[n.jsx(Qe,{name:"map"}),n.jsx("h2",{children:y?"เริ่มแผนที่ของโปรเจกต์นี้":"Build your first page map"}),n.jsx("p",{children:y?"ใส่ URL ที่ต้องการสำรวจ หรือเริ่มเขียนเคสด้วยตัวเอง":"Scout a website to map its pages, or start by writing a case."}),n.jsxs("button",{className:"studio-button orange",onClick:g,children:[y?"ตั้งค่าเว็บไซต์":"Set up website"," ",n.jsx(Qe,{name:"next"})]})]})]}),n.jsxs("aside",{className:"page-inspector",children:[n.jsxs("header",{children:[n.jsx("span",{className:"studio-icon",children:n.jsx(Qe,{name:"page"})}),n.jsx("span",{children:y?"รายละเอียดหน้าเว็บ":"Page inspector"})]}),F?n.jsxs(n.Fragment,{children:[n.jsx("h2",{title:F.url,children:F.path}),n.jsx("p",{className:"page-subtitle",children:F.title||H}),n.jsxs("button",{className:"studio-button preview-action",onClick:()=>A(N==="map"?"preview":"map"),children:[n.jsx(Qe,{name:N==="map"?"eye":"map"}),N==="map"?y?"เปิดตัวอย่างเว็บ":"Preview website":y?"กลับไปแผนที่":"Back to map"]}),N==="preview"&&F.controls.size>0&&n.jsxs("details",{className:"inspector-controls",children:[n.jsxs("summary",{children:[y?"ปุ่มและช่องกรอกที่สำรวจพบ":"Recorded controls"," (",F.controls.size,")"]}),n.jsx("ul",{children:[...F.controls].map(x=>n.jsx("li",{children:x},x))})]}),n.jsxs("div",{className:"linked-head",children:[n.jsx("h3",{children:y?"เคสของหน้านี้":"Linked cases"}),n.jsx("span",{children:F.cases.length})]}),F.cases.length?n.jsx("ul",{className:"linked-list",children:F.cases.map(x=>n.jsxs("li",{draggable:!0,onDragStart:C=>J(C,{kind:"case",value:x.id}),children:[n.jsx(Qe,{name:"grip"}),n.jsxs("button",{className:"linked-title",title:Hr(x.title),onClick:()=>m(x.id),children:[n.jsx("small",{children:x.id}),n.jsx("b",{children:Hr(x.title)})]}),n.jsx("button",{className:"icon-button","aria-label":(y?"เพิ่มเข้าคิว ":"Queue ")+x.id,disabled:Z.includes(x.id),onClick:()=>B([x.id]),children:n.jsx(Qe,{name:Z.includes(x.id)?"check":"plus"})})]},x.id))}):n.jsx("p",{className:"inspector-note",children:y?"ยังไม่มีเคสของหน้านี้ สำรวจเว็บหรือสร้างเคสเพื่อเริ่มทดสอบ":"No cases for this page yet. Scout the website or write a case to get started."}),F.cases.length?n.jsxs("button",{className:"studio-button orange",onClick:()=>B(F.cases.map(x=>x.id)),children:[n.jsx(Qe,{name:"plus"}),y?"เพิ่มเคสของหน้านี้ลงคิว":"Queue page cases"]}):n.jsx("button",{className:"studio-button",onClick:()=>v(F.url),children:y?"เขียนเคส":"Write a case"})]}):n.jsx("button",{className:"studio-button",onClick:()=>v(),children:y?"เขียนเคส":"Write a case"})]}),n.jsxs("section",{className:"test-queue"+(w?" drag-over":""),onDragOver:x=>{x.dataTransfer.types.includes(rd)&&(x.preventDefault(),x.dataTransfer.dropEffect="copy",j(!0))},onDragLeave:x=>{x.currentTarget.contains(x.relatedTarget)||j(!1)},onDrop:z,children:[n.jsxs("div",{className:"queue-head",children:[n.jsxs("div",{children:[n.jsx("span",{className:"studio-icon",children:n.jsx(Qe,{name:"queue"})}),n.jsx("h2",{children:y?"คิวทดสอบ":"Run queue"}),n.jsx("span",{className:"queue-count",children:Z.length})]}),n.jsxs("button",{className:"studio-button orange",disabled:!Z.length,onClick:p,children:[n.jsx(Qe,{name:"play"}),y?"ตรวจคิวและรัน":"Review & run"]})]}),n.jsxs("div",{className:"queue-drop",children:[n.jsx(Qe,{name:"stack"}),n.jsx("span",{children:y?"ลากหน้าเว็บหรือเคสมาวางที่นี่":"Drop a page or test case here"})]}),!!Z.length&&n.jsx("ol",{children:Z.map((x,C)=>n.jsxs("li",{children:[n.jsx("span",{children:C+1}),n.jsx("button",{onClick:()=>m(x),children:Hr(X.get(x).title)}),n.jsx("button",{className:"icon-button","aria-label":(y?"เอาออก ":"Remove ")+x,onClick:()=>{f(Z.filter(q=>q!==x)),O(void 0)},children:n.jsx(Qe,{name:"close"})})]},x))}),n.jsx("p",{role:"status",className:"queue-feedback",children:typeof R=="number"?y?`เพิ่มแล้ว ${R} เคส`:`Added ${R} to the queue.`:R&&M[R]})]})]})]})}class yn extends Error{code;hint;constructor(s,l,o){super(l),this.name="ApiError",this.code=s,this.hint=o}}async function br(a){try{const s=await a.json();if(s?.error?.message)return new yn(s.error.code,s.error.message,s.error.hint)}catch{}return new yn("unknown",`The server returned status ${a.status}.`)}async function S0(a,s,l,o){let c;try{c=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json",Accept:s||o?"application/x-ndjson":"application/json",...o?{"X-LazyScout-Preview":"1"}:{}},signal:l,body:JSON.stringify(a)})}catch{throw new yn("server-unreachable","Could not reach the LazyScout API.","Check that LazyScout is running on this device, then try again.")}if(!c.ok)throw await br(c);if(!c.headers.get("content-type")?.includes("application/x-ndjson"))return c.json();const u=c.body?.pipeThrough(new TextDecoderStream).getReader();if(!u)throw new yn("stream-ended","The Scout connection closed before results arrived.");const f=[];try{for(;;){const{done:p,value:m}=await u.read();if(p)break;const g=m.split(`
12
+ `);for(const v of g.slice(0,-1)){f.push(v);const y=JSON.parse(f.join(""));if(f.length=0,y.type==="step"&&s?.(y.step),y.type==="preview"&&o?.(y.frame),y.type==="result")return y.result;if(y.type==="error")throw new yn(y.error.code,y.error.message,y.error.hint)}f.push(g[g.length-1])}}finally{await u.cancel().catch(()=>{}),u.releaseLock()}throw new yn("stream-ended","The Scout connection closed before results arrived.")}async function w0(){const a=await fetch("/api/versions");if(!a.ok)throw await br(a);return await a.json()}async function N0(a){const s=await fetch("/api/versions/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:a})});if(!s.ok)throw await br(s);return await s.json()}async function C0(a,s=[]){const l=await fetch("/api/export/csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:a,testData:s})});await hf(l,`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.csv`)}async function hf(a,s){if(!a.ok)throw await br(a);const l=await a.blob(),o=URL.createObjectURL(l),c=document.createElement("a");c.href=o,c.download=s,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(o)}async function T0(a,s="playwright",l,o,c,u,f,p){const m=await fetch("/api/automation/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:a,framework:s,code:l,secrets:o,runId:c,projectId:u,blockedKeywords:f}),signal:p});if(!m.ok)throw await br(m);return await m.json()}async function hg(){return at("/api/workspace")}async function sd(a){await at(`/api/workspace/projects/${encodeURIComponent(a.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}async function _0(a){await at(`/api/workspace/projects/${encodeURIComponent(a)}`,{method:"DELETE"})}async function E0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:s})})}async function k0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/status`)}async function A0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/capture`,{method:"POST"})}async function O0(a){await at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/login-browser`,{method:"DELETE"})}async function R0(a,s){return at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session/verify`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:s})})}async function D0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/guided-flows`)}async function L0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/guided-flows`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({flows:s})})}async function M0(a,s,l,o){return at("/api/guided-flows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flow:a,projectId:s,secrets:l,runId:o})})}async function U0(a){return at("/api/guided-flows/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:a})})}async function z0(a){await at(`/api/workspace/projects/${encodeURIComponent(a)}/auth-session`,{method:"DELETE"})}async function B0(a,s){return at(`/api/recorder/${encodeURIComponent(a)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:s})})}async function pg(a){return at(`/api/recorder/${encodeURIComponent(a)}`)}async function I0(a){return at(`/api/recorder/${encodeURIComponent(a)}/stop`,{method:"POST"})}async function P0(a,s){return at(`/api/recorder/${encodeURIComponent(a)}/inspect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:s})})}function $0(a,s){return`/api/recorder/${encodeURIComponent(a)}/frame?v=${s}`}async function q0(a,s){return at(`/api/recorder/${encodeURIComponent(a)}/interact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function mg(a){return at(`/api/recorder/${encodeURIComponent(a)}`,{method:"DELETE"})}async function H0(){await at("/api/workspace/open",{method:"POST"})}async function G0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots`)}async function gg(a,s){return at(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function F0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/screenshots/${encodeURIComponent(s)}`,{method:"DELETE"})}async function V0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/automation`)}async function vg(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/automation`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function Y0(a,s,l){await at(`/api/workspace/projects/${encodeURIComponent(a)}/reports`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,html:l})})}async function X0(a){return at(`/api/workspace/projects/${encodeURIComponent(a)}/bugs`)}async function yg(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/bugs/${encodeURIComponent(s.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}async function Z0(a,s){await at(`/api/workspace/projects/${encodeURIComponent(a)}/bugs/${encodeURIComponent(s)}`,{method:"DELETE"})}async function at(a,s){const l=await fetch(a,s).catch(o=>{throw o instanceof TypeError&&!s?.signal?.aborted?new yn("network-error","Cannot reach LazyScout. Check that it is running on this device, then try again."):o});if(!l.ok)throw await br(l);return await l.json()}async function bg(a){await fetch("/api/automation/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:a}),keepalive:!0})}async function K0(a){const s=await fetch("/api/load-test/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok)throw await br(s);return await s.json()}async function Q0(a,s,l=!1){const o=await fetch("/api/api-check/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiCheck:a,secrets:s,allowUnsafe:l})});if(!o.ok)throw await br(o);return await o.json()}const ga=(a,s)=>at(a,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),J0=a=>ga("/api/qa/plans",a),W0=a=>ga("/api/qa/instruction-draft",a),xg=(a,s,l)=>ga("/api/qa/provider/status",{provider:a,allowExternal:s,...l}),ej=a=>ga("/api/qa/provider/credentials",{kind:a}),pf=a=>`/api/qa/connection/${encodeURIComponent(a)}`,tj=a=>at(pf(a),{cache:"no-store"}),nj=(a,s,l)=>at(pf(a),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:s,apiKey:l})}),aj=a=>at(pf(a),{method:"DELETE"}),rj=()=>ga("/api/qa/codex/login",{}),jg=a=>ga("/api/qa/codex/status",{loginId:a}),id=a=>ga("/api/qa/codex/cancel",{loginId:a}),sj=()=>ga("/api/qa/codex/logout",{confirmed:!0}),ij=a=>at(`/api/qa/mcp/setup/${encodeURIComponent(a)}`),lj=(a,s)=>ga(`/api/qa/mcp/setup/${encodeURIComponent(a)}`,{confirmed:!0,write:s}),oj=(a,s)=>ga("/api/qa/runs",{projectId:a,planId:s,confirmed:!0}),mf=(a,s)=>`/api/qa/runs/${encodeURIComponent(a)}/${encodeURIComponent(s)}`,cj=(a,s)=>at(mf(a,s)),uj=(a,s)=>at(mf(a,s),{method:"DELETE"}),dj=(a,s,l,o)=>at(`${mf(a,s)}/summary`,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l,confirmed:!0}),signal:o}),Co=(a,s,l)=>`/api/qa/report/${encodeURIComponent(a)}?format=${s}&sheets=${encodeURIComponent(l.join(","))}`;async function fj(a){const s=await fetch(Co(a,"xlsx",["Test Cases"]),{cache:"no-store"});await hf(s,`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.xlsx`)}const gf=(a,s)=>`/api/qa/artifact/${encodeURIComponent(a)}/${encodeURIComponent(s)}`,hj=(a,s)=>at(`/api/qa/artifacts/${encodeURIComponent(a)}`,{signal:s,cache:"no-store"}),pj=/^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;function mj(a){const s={},l={},o=a(),c=a.toString(),u=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).split(",").map(p=>p.trim());for(const p of u)if(!pj.test(p))throw new Error(`Invalid dependency name: ${p}`);let f=0;for(;f<o.length;){let p=u[f],m=o[f];typeof m=="function"?s[p]=gj(m,p):l[p]=m,f++}return{functions:s,variables:l}}function gj(a,s){const l=a.toString();if(a.prototype)if(l.indexOf("[native code]")>=0){const o=l.indexOf(" ",8)+1,c=l.indexOf("(",o);return l.slice(o,c)}else{let o=l;for(const c in a.prototype)o+=";"+s+".prototype."+c+"="+a.prototype[c].toString();return o}else return l}function vj(a,s,l,o,c,u){let f=!1,p;const m=()=>{p.stop()},g=(y,S)=>{try{p.ingest(y,S)}catch(b){throw m(),b}};return{start:(y,S)=>{if(f)throw new Error("Was started");f=!0;const b=c(),E=b&&b._,N=E||xj(s,y);E||u({_:N});const[A,w]=N;p=a(A,()=>{const O=c();if(O)return O.other},O=>{u(Object.assign(Object.assign({},c()),{other:O}))},l,o),w&&g(w,S)},stop:m,ingest:g}}const yj="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",bj=")(postMessage)}";function xj(a,s){const[l,o]=jj(s);return[l+";"+yj+a.toString()+bj,o]}function jj(a){let s={},l={};for(const c of a){const{functions:u,variables:f}=mj(c);s=Object.assign(Object.assign({},s),u),l=Object.assign(Object.assign({},l),f)}return[Object.keys(s).map(c=>c+"="+s[c]).join(";"),l]}function Sj(a,s,l,o,c,u){let f=!1,p=!1,m=[];const g=void 0;let v=()=>[],y=()=>[],S,b;const E=K=>Sg[K],N=(K,V)=>{Sg[K]=V},A=()=>{if(!f)throw new Error("Not started")},w=()=>{if(f)throw new Error("Was started")},j=()=>{if(p)throw new Error("Was stopped")},R=()=>{if(S)throw new Error("Has alias")},O=K=>{if(typeof K!="function")throw new TypeError("Argument must be a function")};let M;if(typeof s=="string"){if(S=s,b=E(S),!b||!b.$)throw new Error("Not found");M=b.$[0],m=b.$[1],v=b.$[2],y=b.$[3],b.$[4]}else M=s;O(M);let F;const X=K=>{j(),w(),O(K),m.push(K)},Z=()=>{j(),w(),X(()=>[M,y,o]),f=!0,F.start(m,g)},$=()=>{p=!0,F.stop()},B=K=>{F.ingest([Date.now(),K],v(...K))};let J;const z=Object.assign({inputLatency:J,outputLatency:J,addDependencies(K){R(),X(K)},inputTransferList:K=>{j(),w(),R(),O(K),v=K},outputTransferList:K=>{j(),w(),R(),O(K),y=K},alias(K){j(),w(),R(),S=K,N(S,{$:[M,m,v,y]})},start:Z,stop:$},l(Z,$,f,p,B,A,w,j));return F=vj(a,K=>{let V=-1,Q=-1;const D=o(M,Y=>{K([V,Q,Date.now(),Y],y(Y))});return([Y,x])=>(V=Y,Q=Date.now(),D(x))},K=>{p||c(K)},([K,V,Q,W])=>{p||(K!==-1&&(z.inputLatency=V-K),z.outputLatency=Date.now()-Q,u(W))},()=>{if(S){const K=E(S);if(K)return K.other}},K=>{S&&N(S,Object.assign(Object.assign({},E(S)),{other:K}))}),z}const Sg={};function wj(a,s){let l,o;return Sj(a,s,(m,g,v,y,S,b,E,N)=>({call(...A){if(N(),b(),l||o)throw new Error("Previous call not finished");return new Promise((w,j)=>{l=w,o=j,S(A)})},callOnce(...A){return m(),this.call(...A).finally(g)}}),(m,g)=>{const v=y=>y!==null&&typeof y=="object"&&typeof y.then=="function";return y=>{const S=m(...y);v(S)?S.then(g):g(S)}},m=>{if(o)o(m),l=void 0,o=void 0;else throw new Error("`reject` callback not found")},m=>{if(l)l(m),l=void 0,o=void 0;else throw new Error("`resolve` callback not found")})}function Nj(a,s,l,o,c){let u=s();u||(u=Cj(a),l(u));const f=new Worker(u);return f.onmessage=p=>{const m=p.data,g=m?m[Gv]:void 0;if(g){const v=new Error(g[0]);v.stack=g[1];let y=2;for(;y<g.length;)v[g[y][0]]=g[y][1],y++;o(v),f.terminate()}else c(m)},{stop:f.terminate.bind(f),ingest:f.postMessage.bind(f)}}function Cj(a){return URL.createObjectURL(new Blob([a+";"+Tj],{type:"text/javascript"}))}const Gv="$err$",Tj="self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({"+Gv+':[err.message,err.stack].concat(Object.keys(err).map(function(k){return[k,err[k]]}))})};var postMessage = self.postMessage;addEventListener("error",function(evt) {onErr(evt.error, evt.message)});addEventListener("unhandledrejection",function(evt) {evt.preventDefault();onErr(evt.reason, String(evt.reason))})';function Fv(a){return wj(Nj,a)}function Vd(a){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Vd(a)}function _j(a){var s=String.fromCharCode,l=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,c={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(c).forEach(function(j){c[j.toUpperCase()]=c[j]});function u(j,R,O,M){return M?l.call(c,M)?c[M]:"&"+M+";":s(R||parseInt(O,16))}function f(j){return j.length>3&&j.indexOf("&")!==-1?j.replace(o,u):j}var p="non-whitespace outside of root node";function m(j){return new Error(j)}function g(j){return"missing namespace for prefix <"+j+">"}function v(j){return{get:j,enumerable:!0}}function y(j){var R={},O;for(O in j)R[O]=j[O];return R}var S=Symbol("nameCache");function b(j){return j+"$uri"}function E(j){var R={},O,M;for(O in j)M=j[O],R[M]=M,R[b(M)]=O;return R}function N(){return{line:0,column:0}}function A(j){throw j}function w(j){if(!this)return new w(j);var R=j&&j.proxy,O,M,F,X,Z=A,$,B,J,z,H=N,T=!1,K=!1,V="",Q=!1,W=!1,D=null,Y=!1,x,C,q,I;function ee(le){le instanceof Error||(le=m(le)),D=le,Z(le,H)}function he(le){$&&(le instanceof Error||(le=m(le)),$(le,H))}this.on=function(le,Ce){if(typeof Ce!="function")throw m("required args <name, cb>");switch(le){case"openTag":M=Ce;break;case"text":O=Ce;break;case"closeTag":F=Ce;break;case"error":Z=Ce;break;case"warn":$=Ce;break;case"cdata":X=Ce;break;case"attention":z=Ce;break;case"question":J=Ce;break;case"comment":B=Ce;break;default:throw m("unsupported event: "+le)}return this},this.ns=function(le){if(typeof le>"u"&&(le={}),Vd(le)!=="object")throw m("required args <nsMap={}>");var Ce={},ye;for(ye in le)Ce[ye]=le[ye];return W=!0,I=Ce,this};function _e(){x=W?[]:null,C=W?E(I):null,q=[],H=N,Y=!1,D=null,K=!1,V=""}this.parse=function(le){if(typeof le!="string")throw m("required args <xml=string>");if(T)throw m("parse during stream; call end() first");return _e(),Ne(le),H=N,Y=!1,D},this.write=function(le){if(typeof le!="string")throw m("required args <xml=string>");return T||(_e(),T=!0),D||(V=Ne(V+le,!0)||""),this},this.end=function(){return T||_e(),T=!1,D||Ne(V),V="",H=N,Y=!1,D},this.stop=function(){Y=!0};function Ne(le){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=null,Ge=null,Me,k=0,pe=!1,ce=!1,G=0,P=0,ne,xe,ge,se,Te,Ee,we,ke,qe,fe="",ze=0,$e;function Ve(pt,Re){var kt=pt.indexOf(":");if(kt===-1)return pt;var _t=C[pt.substring(0,kt)];return _t?Re===_t?pt.substr(kt+1):_t+pt.substr(kt):(he(g(pt.substring(0,kt))),null)}function rt(){if($e!==null)return $e;var pt,Re,kt=W&&C.xmlns,_t=W&&Q?[]:null,Ke=ze,ut=fe,st=ut.length,Ut,mt,zt,Je,He,Yt={},nt=new Set,Fe,Ie,Ye;e:for(;Ke<st;Ke++)if(Fe=!1,Ie=ut.charCodeAt(Ke),!(Ie===32||Ie<14&&Ie>8)){for((Ie<65||Ie>122||Ie>90&&Ie<97)&&Ie!==95&&Ie!==58&&(he("illegal first char attribute name"),Fe=!0),Ye=Ke+1;Ye<st;Ye++)if(Ie=ut.charCodeAt(Ye),!(Ie>96&&Ie<123||Ie>64&&Ie<91||Ie>47&&Ie<59||Ie===46||Ie===45||Ie===95)){if(Ie===32||Ie<14&&Ie>8){he("missing attribute value"),Ke=Ye;continue e}if(Ie===61)break;he("illegal attribute name char"),Fe=!0}if(He=ut.substring(Ke,Ye),He==="xmlns:xmlns"&&(he("illegal declaration of xmlns"),Fe=!0),Ie=ut.charCodeAt(Ye+1),Ie===34)Ye=ut.indexOf('"',Ke=Ye+2),Ye===-1&&(Ye=ut.indexOf("'",Ke),Ye!==-1&&(he("attribute value quote missmatch"),Fe=!0));else if(Ie===39)Ye=ut.indexOf("'",Ke=Ye+2),Ye===-1&&(Ye=ut.indexOf('"',Ke),Ye!==-1&&(he("attribute value quote missmatch"),Fe=!0));else for(he("missing attribute value quotes"),Fe=!0,Ye=Ye+1;Ye<st&&(Ie=ut.charCodeAt(Ye+1),!(Ie===32||Ie<14&&Ie>8));Ye++);for(Ye===-1&&(he("missing closing quotes"),Ye=st,Fe=!0),Fe||(zt=ut.substring(Ke,Ye)),Ke=Ye;Ye+1<st&&(Ie=ut.charCodeAt(Ye+1),!(Ie===32||Ie<14&&Ie>8));Ye++)Ke===Ye&&(he("illegal character after attribute end"),Fe=!0);if(Ke=Ye+1,Fe)continue e;if(nt.has(He)){he("attribute <"+He+"> already defined");continue}if(nt.add(He),!W){Yt[He]=zt;continue}if(Q){if(mt=He==="xmlns"?"xmlns":He.charCodeAt(0)===120&&He.substr(0,6)==="xmlns:"?He.substr(6):null,mt!==null){if(pt=f(zt),Re=b(mt),Je=I[pt],!Je){if(mt==="xmlns"||Re in C&&C[Re]!==pt)do Je="ns"+k++;while(typeof C[Je]<"u");else Je=mt;I[pt]=Je}C[mt]!==Je&&(Ut||(C=y(C),Ut=!0),C[mt]=Je,mt==="xmlns"&&(C[b(Je)]=pt,kt=Je),C[Re]=pt),Yt[He]=zt;continue}_t.push(He,zt);continue}He=Ve(He,kt),He!==null&&(Yt[He]=zt)}if(Q)for(Ke=0,st=_t.length;Ke<st;Ke++)He=Ve(_t[Ke++],kt),zt=_t[Ke],He!==null&&(Yt[He]=zt);return $e=Yt}function tt(){for(var pt=/(\r\n|\r|\n)/g,Re=0,kt=0,_t=0,Ke=P,ut,st;G>=_t&&(ut=pt.exec(le),!(!ut||(Ke=ut[0].length+ut.index,Ke>G)));)Re+=1,_t=Ke;return G==-1?(kt=Ke,st=le.substring(P)):P===0?st=le.substring(P,G):(kt=G-_t,st=P==-1?le.substring(G):le.substring(G,P+1)),{data:st,line:Re,column:kt}}for(H=tt,R&&(qe=Object.create({},{name:v(function(){return we}),originalName:v(function(){return ke}),attrs:v(rt),ns:v(function(){return C})}));P!==-1;){if(le.charCodeAt(P)===60?G=P:G=le.indexOf("<",P),G===-1){if(Ce)return le.substring(P);if(q.length)return ee("unexpected end of file");if(!K)return ee("missing start tag");P<le.length&&le.substring(P).trim()&&he(p);return}if(K||(K=!0),P!==G){if(q.length){if(O&&(O(le.substring(P,G),f,H),Y))return}else if(le.substring(P,G).trim()&&(he(p),Y))return}if(se=le.charCodeAt(G+1),se===33){if(ge=le.charCodeAt(G+2),ge===91&&le.substr(G+3,6)==="CDATA["){if(P=le.indexOf("]]>",G),P===-1)return Ce?le.substring(G):ee("unclosed cdata");if(X&&(X(le.substring(G+9,P),H),Y))return;P+=3;continue}if(ge===45&&le.charCodeAt(G+3)===45){if(P=le.indexOf("-->",G),P===-1)return Ce?le.substring(G):ee("unclosed comment");if(B&&(B(le.substring(G+4,P),f,H),Y))return;P+=3;continue}}if(se===63){if(P=le.indexOf("?>",G),P===-1)return Ce?le.substring(G):ee("unclosed question");if(J&&(J(le.substring(G,P+2),H),Y))return;P+=2;continue}for(ne=G+1;;ne++){if(Te=le.charCodeAt(ne),isNaN(Te))return Ce?le.substring(G):(P=-1,ee("unclosed tag"));if(Te===34)ge=le.indexOf('"',ne+1),ne=ge!==-1?ge:ne;else if(Te===39)ge=le.indexOf("'",ne+1),ne=ge!==-1?ge:ne;else if(Te===62){P=ne;break}}if(se===33){if(z&&(z(le.substring(G,P+1),f,H),Y))return;P+=1;continue}if($e={},se===47){if(pe=!1,ce=!0,!q.length)return ee("missing open tag");if(ne=we=q.pop(),ge=G+2+ne.length,le.substring(G+2,ge)!==ne)return ee("closing tag mismatch");for(;ge<P;ge++)if(se=le.charCodeAt(ge),!(se===32||se>8&&se<14))return ee("close tag")}else{if(le.charCodeAt(P-1)===47?(ne=we=le.substring(G+1,P-1),pe=!0,ce=!0):(ne=we=le.substring(G+1,P),pe=!0,ce=!1),!(se>96&&se<123||se>64&&se<91||se===95||se===58))return ee("illegal first char nodeName");for(ge=1,xe=ne.length;ge<xe;ge++)if(se=ne.charCodeAt(ge),!(se>96&&se<123||se>64&&se<91||se>47&&se<59||se===45||se===95||se==46)){if(se===32||se<14&&se>8){we=ne.substring(0,ge),$e=null;break}return ee("invalid nodeName")}ce||q.push(we)}if(W){Me=C,pe&&(ce||x.push(Me),$e===null&&(Q=ne.indexOf("xmlns",ge)!==-1)&&(ze=ge,fe=ne,rt(),Q=!1)),ke=we,Ge!==C&&(ye=C[S],ye===void 0&&(ye=C[S]={}),Ge=C);var ft=ye[we];if(ft!==void 0)we=ft;else{if(se=we.indexOf(":"),se!==-1){if(Ee=C[we.substring(0,se)],!Ee)return ee("missing namespace on <"+ke+">");we=we.substr(se+1)}else Ee=C.xmlns;Ee&&(we=Ee+":"+we),ye[ke]=we}}if(pe&&(ze=ge,fe=ne,M&&(R?M(qe,f,ce,H):M(we,rt,f,ce,H),Y)))return;if(ce){if(F&&(F(R?qe:we,f,pe,H),Y))return;W&&(pe?C=Me:C=x.pop())}P+=1}}}return new w(a)}function Ej(a,s,l,o){var c=!1,u=function(){if(c)throw new Error("Errored")},f,p=new _j,m=function(S){u(),p.write(S)},g=function(){u(),p.end(),f()},v=new Promise(function(y,S){f=y;var b=function(j){throw c=!0,j},E=function(j,R){o&&o(R(j),a)},N=function(j,R,O,M,F){if(s){var X=R();for(var Z in X)X[ld(Z,!0)]=O(X[Z]);s(ld(j),X,a)}},A=function(j){l&&l(ld(j),a)};p.on("error",b),p.on("text",E),p.on("openTag",N),p.on("closeTag",A)});return{promise:v,write:m,end:g}}function ld(a,s){for(var l=0;l<a.length;){if(a[l]===":"&&!(s&&l===5&&a.slice(0,5)==="xmlns"))return a.slice(l+1);l++}return a}function Yd(a){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Yd(a)}function kj(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function Aj(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function Oj(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Hi(a,s)}function Rj(a){var s=Vv();return function(){var o=Gi(a),c;if(s){var u=Gi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return Dj(this,c)}}function Dj(a,s){if(s&&(Yd(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lj(a)}function Lj(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Xd(a){var s=typeof Map=="function"?new Map:void 0;return Xd=function(o){if(o===null||!Mj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return To(o,arguments,Gi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Hi(c,o)},Xd(a)}function To(a,s,l){return Vv()?To=Reflect.construct.bind():To=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Hi(g,f.prototype),g},To.apply(null,arguments)}function Vv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mj(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Hi(a,s){return Hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Hi(a,s)}function Gi(a){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Gi(a)}var $i=(function(a){Oj(l,a);var s=Rj(l);function l(o){var c;return Aj(this,l),c=s.call(this,o),c.name="InvalidSpreadsheetError",c}return kj(l)})(Xd(Error));function Yv(a,s,l,o,c,u){var f=Ej(s,l,o,c);return u?p(f,a,u):(f.write(a),f.end()),f.promise.then(function(m){return m},function(m){var g=new $i(m.message);throw g.stack=m.stack,g.cause=m,g});function p(m,g,v,y){var S=7,b=64*1024,E=b,N=function(){var j=Date.now();if(g.length>E){m.write(g.slice(0,E)),v&&v(!1),g=g.slice(E);var R=Date.now()-j;return R<S*.5?E*=2:R>S&&(E/=2),!0}else return m.write(g),m.end(),v&&v(!0),!1},A=function w(){N()&&w()};A()}}var wg={},Uj=(function(a,s,l,o,c){var u=new Worker(wg[s]||(wg[s]=URL.createObjectURL(new Blob([a+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return u.onmessage=function(f){var p=f.data,m=p.$e$;if(m){var g=new Error(m[0]);g.code=m[1],g.stack=m[2],c(g,null)}else c(null,p)},u.postMessage(l,o),u}),vn=Uint8Array,Gr=Uint16Array,Xv=Int32Array,vf=new vn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),yf=new vn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Zv=new vn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Kv=function(a,s){for(var l=new Gr(31),o=0;o<31;++o)l[o]=s+=1<<a[o-1];for(var c=new Xv(l[30]),o=1;o<30;++o)for(var u=l[o];u<l[o+1];++u)c[u]=u-l[o]<<5|o;return{b:l,r:c}},Qv=Kv(vf,2),bf=Qv.b,zj=Qv.r;bf[28]=258,zj[258]=28;var Bj=Kv(yf,0),Jv=Bj.b,zo=new Gr(32768);for(var Dt=0;Dt<32768;++Dt){var hr=(Dt&43690)>>1|(Dt&21845)<<1;hr=(hr&52428)>>2|(hr&13107)<<2,hr=(hr&61680)>>4|(hr&3855)<<4,zo[Dt]=((hr&65280)>>8|(hr&255)<<8)>>1}var Ds=(function(a,s,l){for(var o=a.length,c=0,u=new Gr(s);c<o;++c)a[c]&&++u[a[c]-1];var f=new Gr(s);for(c=1;c<s;++c)f[c]=f[c-1]+u[c-1]<<1;var p;if(l){p=new Gr(1<<s);var m=15-s;for(c=0;c<o;++c)if(a[c])for(var g=c<<4|a[c],v=s-a[c],y=f[a[c]-1]++<<v,S=y|(1<<v)-1;y<=S;++y)p[zo[y]>>m]=g}else for(p=new Gr(o),c=0;c<o;++c)a[c]&&(p[c]=zo[f[a[c]-1]++]>>15-a[c]);return p}),al=new vn(288);for(var Dt=0;Dt<144;++Dt)al[Dt]=8;for(var Dt=144;Dt<256;++Dt)al[Dt]=9;for(var Dt=256;Dt<280;++Dt)al[Dt]=7;for(var Dt=280;Dt<288;++Dt)al[Dt]=8;var Wv=new vn(32);for(var Dt=0;Dt<32;++Dt)Wv[Dt]=5;var ey=Ds(al,9,1),ty=Ds(Wv,5,1),_o=function(a){for(var s=a[0],l=1;l<a.length;++l)a[l]>s&&(s=a[l]);return s},Jn=function(a,s,l){var o=s/8|0;return(a[o]|a[o+1]<<8)>>(s&7)&l},Eo=function(a,s){var l=s/8|0;return(a[l]|a[l+1]<<8|a[l+2]<<16)>>(s&7)},ny=function(a){return(a+7)/8|0},Xo=function(a,s,l){return(s==null||s<0)&&(s=0),(l==null||l>a.length)&&(l=a.length),new vn(a.subarray(s,l))},ay=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],fn=function(a,s,l){var o=new Error(s||ay[a]);if(o.code=a,Error.captureStackTrace&&Error.captureStackTrace(o,fn),!l)throw o;return o},ry=function(a,s,l,o){var c=a.length,u=o?o.length:0;if(!c||s.f&&!s.l)return l||new vn(0);var f=!l,p=f||s.i!=2,m=s.i;f&&(l=new vn(c*3));var g=function(ye){var Ge=l.length;if(ye>Ge){var Me=new vn(Math.max(Ge*2,ye));Me.set(l),l=Me}},v=s.f||0,y=s.p||0,S=s.b||0,b=s.l,E=s.d,N=s.m,A=s.n,w=c*8;do{if(!b){v=Jn(a,y,1);var j=Jn(a,y+1,3);if(y+=3,j)if(j==1)b=ey,E=ty,N=9,A=5;else if(j==2){var F=Jn(a,y,31)+257,X=Jn(a,y+10,15)+4,Z=F+Jn(a,y+5,31)+1;y+=14;for(var $=new vn(Z),B=new vn(19),J=0;J<X;++J)B[Zv[J]]=Jn(a,y+J*3,7);y+=X*3;for(var z=_o(B),H=(1<<z)-1,T=Ds(B,z,1),J=0;J<Z;){var K=T[Jn(a,y,H)];y+=K&15;var R=K>>4;if(R<16)$[J++]=R;else{var V=0,Q=0;for(R==16?(Q=3+Jn(a,y,3),y+=2,V=$[J-1]):R==17?(Q=3+Jn(a,y,7),y+=3):R==18&&(Q=11+Jn(a,y,127),y+=7);Q--;)$[J++]=V}}var W=$.subarray(0,F),D=$.subarray(F);N=_o(W),A=_o(D),b=Ds(W,N,1),E=Ds(D,A,1)}else fn(1);else{var R=ny(y)+4,O=a[R-4]|a[R-3]<<8,M=R+O;if(M>c){m&&fn(0);break}p&&g(S+O),l.set(a.subarray(R,M),S),s.b=S+=O,s.p=y=M*8,s.f=v;continue}if(y>w){m&&fn(0);break}}p&&g(S+131072);for(var Y=(1<<N)-1,x=(1<<A)-1,C=y;;C=y){var V=b[Eo(a,y)&Y],q=V>>4;if(y+=V&15,y>w){m&&fn(0);break}if(V||fn(2),q<256)l[S++]=q;else if(q==256){C=y,b=null;break}else{var I=q-254;if(q>264){var J=q-257,ee=vf[J];I=Jn(a,y,(1<<ee)-1)+bf[J],y+=ee}var he=E[Eo(a,y)&x],_e=he>>4;he||fn(3),y+=he&15;var D=Jv[_e];if(_e>3){var ee=yf[_e];D+=Eo(a,y)&(1<<ee)-1,y+=ee}if(y>w){m&&fn(0);break}p&&g(S+131072);var Ne=S+I;if(S<D){var le=u-D,Ce=Math.min(D,Ne);for(le+S<0&&fn(3);S<Ce;++S)l[S]=o[le+S]}for(;S<Ne;++S)l[S]=l[S-D]}}s.l=b,s.p=C,s.b=S,s.f=v,b&&(v=1,s.m=N,s.d=E,s.n=A)}while(!v);return S!=l.length&&f?Xo(l,0,S):l.subarray(0,S)},Ij=new vn(0),Pj=function(a,s){var l={};for(var o in a)l[o]=a[o];for(var o in s)l[o]=s[o];return l},Ng=function(a,s,l){for(var o=a(),c=a.toString(),u=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).replace(/\s+/g,"").split(","),f=0;f<o.length;++f){var p=o[f],m=u[f];if(typeof p=="function"){s+=";"+m+"=";var g=p.toString();if(p.prototype)if(g.indexOf("[native code]")!=-1){var v=g.indexOf(" ",8)+1;s+=g.slice(v,g.indexOf("(",v))}else{s+=g;for(var y in p.prototype)s+=";"+m+".prototype."+y+"="+p.prototype[y].toString()}else s+=g}else l[m]=p}return s},vo=[],$j=function(a){var s=[];for(var l in a)a[l].buffer&&s.push((a[l]=new a[l].constructor(a[l])).buffer);return s},qj=function(a,s,l,o){if(!vo[l]){for(var c="",u={},f=a.length-1,p=0;p<f;++p)c=Ng(a[p],c,u);vo[l]={c:Ng(a[f],c,u),e:u}}var m=Pj({},vo[l].e);return Uj(vo[l].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+s.toString()+"}",l,m,$j(m),o)},Hj=function(){return[vn,Gr,Xv,vf,yf,Zv,bf,Jv,ey,ty,zo,ay,Ds,_o,Jn,Eo,ny,Xo,fn,ry,xf,sy,iy]},sy=function(a){return postMessage(a,[a.buffer])},iy=function(a){return a&&{out:a.size&&new vn(a.size),dictionary:a.dictionary}},Gj=function(a,s,l,o,c,u){var f=qj(l,o,c,function(p,m){f.terminate(),u(p,m)});return f.postMessage([a,s],s.consume?[a.buffer]:[]),function(){f.terminate()}},pa=function(a,s){return a[s]|a[s+1]<<8},Wn=function(a,s){return(a[s]|a[s+1]<<8|a[s+2]<<16|a[s+3]<<24)>>>0},od=function(a,s){return Wn(a,s)+Wn(a,s+4)*4294967296};function Fj(a,s,l){return l||(l=s,s={}),typeof l!="function"&&fn(7),Gj(a,s,[Hj],function(o){return sy(xf(o.data[0],iy(o.data[1])))},1,l)}function xf(a,s){return ry(a,{i:2},s&&s.out,s&&s.dictionary)}var Zd=typeof TextDecoder<"u"&&new TextDecoder,Vj=0;try{Zd.decode(Ij,{stream:!0}),Vj=1}catch{}var Yj=function(a){for(var s="",l=0;;){var o=a[l++],c=(o>127)+(o>223)+(o>239);if(l+c>a.length)return{s,r:Xo(a,l-1)};c?c==3?(o=((o&15)<<18|(a[l++]&63)<<12|(a[l++]&63)<<6|a[l++]&63)-65536,s+=String.fromCharCode(55296|o>>10,56320|o&1023)):c&1?s+=String.fromCharCode((o&31)<<6|a[l++]&63):s+=String.fromCharCode((o&15)<<12|(a[l++]&63)<<6|a[l++]&63):s+=String.fromCharCode(o)}};function ly(a,s){if(s){for(var l="",o=0;o<a.length;o+=16384)l+=String.fromCharCode.apply(null,a.subarray(o,o+16384));return l}else{if(Zd)return Zd.decode(a);var c=Yj(a),u=c.s,l=c.r;return l.length&&fn(8),u}}var Xj=function(a,s){return s+30+pa(a,s+26)+pa(a,s+28)},Zj=function(a,s,l){var o=pa(a,s+28),c=pa(a,s+30),u=ly(a.subarray(s+46,s+46+o),!(pa(a,s+8)&2048)),f=s+46+o,p=Kj(a,f,c,l,Wn(a,s+20),Wn(a,s+24),Wn(a,s+42)),m=p[0],g=p[1],v=p[2];return[pa(a,s+10),m,g,u,f+c+pa(a,s+32),v]},Kj=function(a,s,l,o,c,u,f){var p=c==4294967295,m=u==4294967295,g=f==4294967295,v=s+l,y=p+m+g;if(o&&y){for(;s+4<v;s+=4+pa(a,s+2))if(pa(a,s)==1)return[p?od(a,s+4+8*m):c,m?od(a,s+4):u,g?od(a,s+4+8*(m+p)):f,1];o<2&&fn(13)}return[c,u,f,0]},Cg=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(a){a()};function Qj(a,s,l){l||(l=s,s={}),typeof l!="function"&&fn(7);var o=[],c=function(){for(var A=0;A<o.length;++A)o[A]()},u={},f=function(A,w){Cg(function(){l(A,w)})};Cg(function(){f=l});for(var p=a.length-22;Wn(a,p)!=101010256;--p)if(!p||a.length-p>65558)return f(fn(13,0,1),null),c;var m=pa(a,p+8);if(m){var g=m,v=Wn(a,p+16),y=Wn(a,p-20)==117853008;if(y){var S=Wn(a,p-12);y=Wn(a,S)==101075792,y&&(g=m=Wn(a,S+32),v=Wn(a,S+48))}for(var b=s&&s.filter,E=function(A){var w=Zj(a,v,y),j=w[0],R=w[1],O=w[2],M=w[3],F=w[4],X=w[5],Z=Xj(a,X);v=F;var $=function(J,z){J?(c(),f(J,null)):(z&&(u[M]=z),--m||f(null,u))};if(!b||b({name:M,size:R,originalSize:O,compression:j}))if(!j)$(null,Xo(a,Z,Z+R));else if(j==8){var B=a.subarray(Z,Z+R);if(O<524288||R>.8*O)try{$(null,xf(B,{out:new vn(O)}))}catch(J){$(J,null)}else o.push(Fj(B,{size:O},$))}else $(fn(14,"unknown compression type "+j,1),null);else $(null,null)},N=0;N<g;++N)E(N)}else f(null,{});return c}function Kd(a){"@babel/helpers - typeof";return Kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Kd(a)}function Jj(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function Wj(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function eS(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Fi(a,s)}function tS(a){var s=oy();return function(){var o=Vi(a),c;if(s){var u=Vi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return nS(this,c)}}function nS(a,s){if(s&&(Kd(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aS(a)}function aS(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Qd(a){var s=typeof Map=="function"?new Map:void 0;return Qd=function(o){if(o===null||!rS(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return ko(o,arguments,Vi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Fi(c,o)},Qd(a)}function ko(a,s,l){return oy()?ko=Reflect.construct.bind():ko=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Fi(g,f.prototype),g},ko.apply(null,arguments)}function oy(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rS(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Fi(a,s){return Fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Fi(a,s)}function Vi(a){return Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Vi(a)}var cy=(function(a){eS(l,a);var s=tS(l);function l(){return Wj(this,l),s.apply(this,arguments)}return Jj(l)})(Qd(Error));function uy(a){var s=new cy(a.message);return a.stack&&(s.stack=a.stack),Error.captureStackTrace&&Error.captureStackTrace(s,uy),s.cause=a,s}function sS(a,s){return iS(a,s,lS,!0)}function iS(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=s.filter,o=arguments.length>2?arguments[2]:void 0;return o(new Uint8Array(a),{filter:function(u){return l?l({path:u.name}):!0}}).then(function(c){return c},function(c){throw oS(c)?uy(c):c})}function lS(a){return new Promise(function(s,l){Qj(a,function(o,c){o?l(o):s(c)})})}function oS(a){return typeof a.code=="number"}function Jd(a){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Jd(a)}function cS(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function uS(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function dS(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Yi(a,s)}function fS(a){var s=dy();return function(){var o=Xi(a),c;if(s){var u=Xi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return hS(this,c)}}function hS(a,s){if(s&&(Jd(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pS(a)}function pS(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Wd(a){var s=typeof Map=="function"?new Map:void 0;return Wd=function(o){if(o===null||!mS(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return Ao(o,arguments,Xi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Yi(c,o)},Wd(a)}function Ao(a,s,l){return dy()?Ao=Reflect.construct.bind():Ao=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Yi(g,f.prototype),g},Ao.apply(null,arguments)}function dy(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mS(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Yi(a,s){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Yi(a,s)}function Xi(a){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Xi(a)}var gS={XLS_FILE_NOT_SUPPORTED:"You passed a legacy `.xls` file. Only `.xlsx` files are supported",FILE_NOT_SUPPORTED:"Doesn't look like an `.xlsx` file",INVALID_ZIP:"Couldn't unzip `.xlsx` file contents",NO_DATA:"No data"},Bo=(function(a){dS(l,a);var s=fS(l);function l(o,c){var u;return uS(this,l),u=s.call(this,gS[o]||o),u.code=o,u.name="InvalidInputError",u.cause=c,u}return cS(l)})(Wd(Error));function vS(a){var s=a.path;return s.endsWith(".xml")||s.endsWith(".xml.rels")}var yS=[80,75],fy=[208,207,17,224],Oo=[yS,fy],bS=Oo.indexOf(fy);function xS(){var a,s=jS(Oo),l=0;return function(o){if(isNaN(a)){var c;s=s.filter(function(u){if(o===Oo[u][l])return Oo[u].length===l+1&&(c=u),!0}),s.length===1?a=c:s.length===0&&(a=-1)}return l++,a}}function jS(a){for(var s=[],l=0;l<a.length;)s.push(l),l++;return s}function SS(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=wS(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wS(a,s){if(a){if(typeof a=="string")return Tg(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Tg(a,s)}}function Tg(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}function NS(a){for(var s=xS(),l=SS(a),o;!(o=l()).done;){var c=o.value;if(CS(c,s))return}TS(a.length)}function CS(a,s){var l=s(a);if(l!==void 0){if(l===bS)throw new Bo("XLS_FILE_NOT_SUPPORTED");if(l<0)throw new Bo("FILE_NOT_SUPPORTED");return!0}}function TS(a){throw new Bo(a===0?"NO_DATA":"FILE_NOT_SUPPORTED")}var Ro;function vr(a){var s=Date.now(),l=typeof global<"u"?!!global.READ_EXCEL_FILE_CHECKPOINTS:typeof window<"u"?!!window.READ_EXCEL_FILE_CHECKPOINTS:!1;l&&(Ro&&console.log(" -",s-Ro,"ms"),console.log("*",a)),Ro=s}function _S(){Ro=void 0}function hy(a){return _S(),vr("unpack files"),a instanceof File||a instanceof Blob?a.arrayBuffer().then(_g):Promise.resolve(a).then(_g)}function _g(a){return NS(new Uint8Array(a)),sS(a,{filter:vS}).then(function(s){return s},function(s){throw s instanceof cy?new Bo("INVALID_ZIP",s.cause):s})}function ES(a,s){var l=o();return s(a,l,u,null,null).then(function(){return c(l)});function o(){return{workbookPr:void 0,sheets:[]}}function c(f){return{epoch1904:f.workbookPr?f.workbookPr.epoch1904:!1,sheets:f.sheets}}function u(f,p,m){f==="workbookPr"?m.workbookPr||(m.workbookPr={epoch1904:p.date1904==="1"}):f==="sheet"&&p.name&&m.sheets.push({id:Number(p.sheetId),name:p.name,relationId:p.id})}}function kS(a,s){var l="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",o="http://purl.oclc.org/ooxml/officeDocument/relationships/",c=u();return s(a,c,p,null,null).then(function(){return c});function u(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function f(v){return v}function p(v,y,S){v==="Relationship"&&m(S,y.Id,y.Type,y.Target)}function m(v,y,S,b){switch(S){case l+"styles":case o+"styles":v.styles=g(b);break;case l+"sharedStrings":case o+"sharedStrings":v.sharedStrings=g(b);break;case l+"worksheet":case o+"worksheet":v.sheets[y]=g(b);break}}function g(v){return v[0]==="/"?v.slice(1):"xl/"+v}}function Zi(a){"@babel/helpers - typeof";return Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Zi(a)}var AS=["xfId"];function Eg(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function kg(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?Eg(Object(l),!0).forEach(function(o){OS(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):Eg(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function OS(a,s,l){return s=RS(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function RS(a){var s=DS(a,"string");return Zi(s)==="symbol"?s:String(s)}function DS(a,s){if(Zi(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(Zi(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function LS(a,s){if(a==null)return{};var l=MS(a,s),o,c;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(a);for(c=0;c<u.length;c++)o=u[c],!(s.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(l[o]=a[o])}return l}function MS(a,s){if(a==null)return{};var l={},o=Object.keys(a),c,u;for(u=0;u<o.length;u++)c=o[u],!(s.indexOf(c)>=0)&&(l[c]=a[c]);return l}function US(a,s){var l=o();return s(a,l,u,f,null).then(function(){return c(l)});function o(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function c(m){return m.styles.map(function(g){if(g.xfId){var v=g.xfId,y=LS(g,AS);return kg(kg({},m.baseStyles[v]),y)}else return g})}function u(m,g,v){if(m==="numFmt")v.numberFormats[g.numFmtId]={id:Number(g.numFmtId),template:g.formatCode};else if(m==="cellStyleXfs")v.cellStyleXfs=!0;else if(m==="cellXfs")v.cellXfs=!0;else if(m==="xf"){if(v.cellStyleXfs)v.baseStyles.push(p(g));else if(v.cellXfs){var y=p(g,v.numberFormats);g.xfId&&(y.xfId=Number(g.xfId)),v.styles.push(y)}}}function f(m,g){m==="cellStyleXfs"?g.cellStyleXfs=!1:m==="cellXfs"&&(g.cellXfs=!1)}function p(m,g){var v={},y=m.numFmtId;return y&&(g&&g[y]?v.numberFormat=g[y]:v.numberFormat={id:Number(y)}),v}}function zS(a,s){var l=o();return s(a,l,u,f,p).then(function(){return c(l)});function o(){return{si:void 0,strings:[]}}function c(S){return S.strings}function u(S,b,E){S==="si"?E.si=m():E.si&&g(S,b,E.si)}function f(S,b){S==="si"?(b.strings.push(b.si.string),b.si=void 0):b.si&&v(S,b.si)}function p(S,b){b.si&&y(S,b.si)}function m(){return{t:!1,r:!1,rPh:!1,string:""}}function g(S,b,E){S==="t"?E.t=!0:S==="r"?E.r=!0:S==="rPh"&&(E.rPh=!0)}function v(S,b){S==="t"?b.t=!1:S==="r"?b.r=!1:S==="rPh"&&(b.rPh=!1)}function y(S,b){b.rPh||b.t&&(b.r?b.string+=S:b.string=S)}}function BS(a,s){var l=17,o=1,c=1,u=1440*60*1e3,f=365;s&&(a+=4*f+o+c);var p=o+c+70*f+l;return Math.floor((a-p)*u)}var IS=/^\[\$-[^\]]+\]/,PS=/;@$/,cd={};function $S(a){if(a in cd)return cd[a];a=a.toLowerCase(),a=a.replace(IS,""),a=a.replace(PS,"");var s=a.split(/\W+/),l=s.length===0?!1:s.every(function(o){return qS.indexOf(o)>=0});return cd[a]=l,l}var qS=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function HS(a,s,l){return a.numberFormat?!!(VS.indexOf(a.numberFormat.id)>=0||s&&a.numberFormat.template===s||l&&a.numberFormat.template&&$S(a.numberFormat.template)):!1}var GS=[14,15,16,17,18,19,20,21,22,45,46,47],ud=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Ag=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],FS=[71,72,73,74,75,76,77,78,79,80,81],VS=GS.concat(ud).concat(Ag.filter(function(a){return ud.indexOf(a)<0})).concat(FS.filter(function(a){return ud.indexOf(a)<0}).filter(function(a){return Ag.indexOf(a)<0}));function YS(a,s){return QS(a)||KS(a,s)||ZS(a,s)||XS()}function XS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
14
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZS(a,s){if(a){if(typeof a=="string")return Og(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Og(a,s)}}function Og(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}function KS(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function QS(a){if(Array.isArray(a))return a}var JS=null,Ls=[null,JS];function WS(a,s,l,o,c){var u=YS(c,6),f=u[0],p=u[1],m=u[2],g=u[3],v=u[4],y=u[5];switch(a||"n"){case"str":return l===void 0?"VALUE_MISSING":l?["s",l]:Ls;case"inlineStr":return o===void 0?"VALUE_MISSING":["s",o];case"s":if(!l)return"VALUE_MISSING";var S=Number(l);return isNaN(S)||f[S]===void 0?"VALUE_INVALID":["s",f[S]];case"b":return l?l==="1"?["b",!0]:l==="0"?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return l?["e",l]:"VALUE_MISSING";case"d":if(!l)return Ls;var b=new Date(l);return isNaN(b.valueOf())?"VALUE_INVALID":["d",b.getTime()];case"n":if(!l)return Ls;if(s){var E=Number(s);if(isNaN(E)||p[E]===void 0)return"FORMAT_INVALID";if(HS(p[E],g,v)){var N=Number(l);return isNaN(N)?"VALUE_INVALID":["d",BS(N,m)]}}if(y)return["n",l];var A=Number(l);return isNaN(A)?"VALUE_INVALID":["n",A];default:return"TYPE_INVALID"}}function Rg(a){for(var s=0,l=0;l<a.length;){var o=a.charCodeAt(l);if(o>=48&&o<=57){var c=Number(a.slice(l));return isNaN(c)&&Dg(a),[c,s]}s*=26,s+=a.charCodeAt(l)-64,l++}Dg(a)}function Dg(a){throw new Error('<c r="'.concat(a,'">'))}function ew(a,s){return aw(a)||nw(a,s)||py(a,s)||tw()}function tw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nw(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function aw(a){if(Array.isArray(a))return a}function rw(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=py(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
16
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function py(a,s){if(a){if(typeof a=="string")return Lg(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Lg(a,s)}}function Lg(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}var dd=null;function sw(a,s,l){var o=l.sharedStrings,c=l.styles,u=l.epoch1904,f=l.options,p=[o,c,u,f.dateFormat,f.smartDateParser!==!1,f.parseNumber],m=[],g=[],v=y();return s(a,v,j,R,O,w).then(function(){var W=v.sheetData,D=W.rowCount,Y=W.columnCount,x=W.dataRowCount,C=W.dataColumnCount;if(x<D&&(m=m.slice(0,x)),C<Y)for(var q=0;q<m.length;)m[q].length>C&&(m[q]=m[q].slice(0,C)),q++;for(var I=rw(m),ee;!(ee=I()).done;)for(var he=ee.value;he.length<C;)he.push(dd);return m});function y(){return{dimension:void 0,sheetData:void 0}}function S(W){return W.sheetData.rows}function b(W,D){W.sheetData.rowIndexShift+=W.sheetData.rows.length-D.length,W.sheetData.rows=D}function E(W){return W.sheetData.errors}function N(W,D){W.sheetData.errors=D}function A(W){var D=W.row,Y=W.column,x=W.error;throw new $i("<c/> at row ".concat(D,", col ").concat(Y,": ").concat(x))}function w(W){var D=S(v),Y=E(v);if(W)m=m.concat(D),g=g.concat(Y),g.length>0&&A(g[0]);else if(D.length>1){var x=D.slice(0,-1);m=m.concat(x),g=g.concat(Y),b(v,D.slice(-1)),N(v,[])}}function j(W,D,Y){W==="dimension"?Y.dimension=M(D.ref):W==="sheetData"?Y.sheetData=F():Y.sheetData&&X(W,D,Y.sheetData)}function R(W,D){D.sheetData&&Z(W,D.sheetData)}function O(W,D){D.sheetData&&$(W,D.sheetData)}function M(W){var D=W.split(":").map(Rg);return D.length===1&&(D=[D[0],D[0]]),D}function F(){return{c:void 0,rows:[],row:void 0,rowNumber:void 0,rowIndexShift:0,cursor:[0,0],rowCount:0,columnCount:0,dataRowCount:0,dataColumnCount:0,errors:[]}}function X(W,D,Y){W==="row"?(D.r&&(Y.rowNumber=Number(D.r)),Y.row=[]):W==="c"?(Y.c=T(),Y.c.attributes=D):Y.c&&K(W,D,Y.c)}function Z(W,D){if(W==="row"){if(D.rowNumber){var Y=D.rowIndexShift+D.rows.length;if(D.rowNumber<=Y)throw new $i("Out-of-place <row/> number ".concat(D.rowNumber," follows <row/> number ").concat(Y));for(;D.rowNumber>D.rowIndexShift+D.rows.length+1;)D.rows.push([])}D.rows.push(D.row),D.row.length>0&&(D.dataRowCount=D.rowNumber),D.rowNumber>D.rowCount&&(D.rowCount=D.rowNumber),D.row=void 0,D.rowNumber=void 0}else if(W==="c"){var x=B(D.c);if(x.row<D.cursor[0]||x.row===D.cursor[0]&&x.column<=D.cursor[1])throw new $i("Out-of-place <c/> at row ".concat(x.row," col ").concat(x.column," follows <c/> at row ").concat(D.cursor[0]," col ").concat(D.cursor[1]));if(D.cursor[0]=x.row,D.cursor[1]=x.column,D.rowNumber||(D.rowNumber=x.row),x.error)A(x),D.errors.push(x);else if(x.value!==dd){for(;x.column>D.row.length+1;)D.row.push(dd);D.row.push(x.value),x.column>D.dataColumnCount&&(D.dataColumnCount=x.column)}x.column>D.columnCount&&(D.columnCount=x.column),D.c=void 0}else D.c&&V(W,D.c)}function $(W,D){D.c&&Q(W,D.c)}function B(W){var D=W.attributes,Y=W.inlineString,x=W.vText,C=Rg(D.r),q=ew(C,2),I=q[0],ee=q[1],he=J(D.t,D.s,x,Y,p,f.trim!==!1);return typeof he=="string"?{row:I,column:ee,error:he}:{row:I,column:ee,value:H(he[1],he[0])}}function J(W,D,Y,x,C,q){var I=z(W,D,Y,x,C);return Array.isArray(I)&&I[0]==="s"&&(q&&(I[1]=I[1].trim()),I[1]==="")?Ls:I}function z(W,D,Y,x,C){var q=WS(W,D,Y,x,C);if(q==="VALUE_MISSING")switch(W||"n"){case"str":case"inlineStr":case"s":case"b":return Ls}return W==="e"?Ls:q}function H(W,D){return D==="n"?f.parseNumber?f.parseNumber(W):W:D==="d"?new Date(W):W}function T(){return{v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0}}function K(W,D,Y){W==="v"?Y.v=!0:W==="is"?(Y.is=!0,Y.inlineString=""):W==="t"?Y.t=!0:W==="r"?Y.r=!0:W==="rPh"&&(Y.rPh=!0)}function V(W,D){W==="v"?(D.v=!1,D.vText||(D.vText="")):W==="is"?D.is=!1:W==="t"?D.t=!1:W==="r"?D.r=!1:W==="rPh"&&(D.rPh=!1)}function Q(W,D){D.v?D.vText=W:D.is&&(D.rPh||D.t&&(D.r?D.inlineString+=W:D.inlineString=W))}}function iw(a){vr("convert files to strings");for(var s={},l=0,o=Object.keys(a);l<o.length;l++){var c=o[l];s[c]=lw(a[c])}return s}function lw(a){return typeof TextDecoder<"u"?new TextDecoder().decode(a):ly(a)}function ef(a){"@babel/helpers - typeof";return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},ef(a)}function ow(a){return ef(a)==="object"&&typeof a.then=="function"}function tf(a){"@babel/helpers - typeof";return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},tf(a)}function cw(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function uw(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function dw(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Ki(a,s)}function fw(a){var s=my();return function(){var o=Qi(a),c;if(s){var u=Qi(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return hw(this,c)}}function hw(a,s){if(s&&(tf(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pw(a)}function pw(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function nf(a){var s=typeof Map=="function"?new Map:void 0;return nf=function(o){if(o===null||!mw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return Do(o,arguments,Qi(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Ki(c,o)},nf(a)}function Do(a,s,l){return my()?Do=Reflect.construct.bind():Do=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Ki(g,f.prototype),g},Do.apply(null,arguments)}function my(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mw(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Ki(a,s){return Ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Ki(a,s)}function Qi(a){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Qi(a)}var Mg=(function(a){dw(l,a);var s=fw(l);function l(o){var c;return uw(this,l),c=s.call(this,o),c.name="SheetNotFoundError",c}return cw(l)})(nf(Error));function Ji(a){"@babel/helpers - typeof";return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Ji(a)}function gy(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=gw(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
17
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gw(a,s){if(a){if(typeof a=="string")return Ug(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ug(a,s)}}function Ug(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}function zg(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function Io(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?zg(Object(l),!0).forEach(function(o){Po(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):zg(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function Po(a,s,l){return s=vw(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function vw(a){var s=yw(a,"string");return Ji(s)==="symbol"?s:String(s)}function yw(a,s){if(Ji(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(Ji(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function bw(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=iw(s);return vr("parse spreadsheet info and file paths"),fd(Sw(),o,a).then(function(c){var u=c.spreadsheetInfo,f=c.filePaths;return vr('parse "shared strings" and "styles"'),fd(ww(f),o,a).then(function(p){var m=p.sharedStrings,g=p.styles,v=l.sheets?l.sheets.map(function(y){return xw(y,u.sheets)}):u.sheets.map(function(y){return y.relationId});return vr("parse sheet".concat(v.length===1?"":"s"," data")),fd(Nw(f,v,{sharedStrings:m,styles:g,epoch1904:u.epoch1904,options:l}),o,a).then(function(y){return vr("end"),v.map(function(S){return{sheet:jw(S,u.sheets),data:y[S]}})})})})}function vy(a,s,l,o){return o&&o.parseNumber||(o=Io(Io({},o),{},{parseNumber:null})),bw(s,l,o)}function xw(a,s){if(typeof a=="string"){for(var l=gy(s),o;!(o=l()).done;){var c=o.value;if(c.name===a)return c.relationId}throw new Mg('Sheet "'.concat(a,'" not found. Available sheets: ').concat(s.map(function(u){var f=u.name;return'"'.concat(f,'"')}).join(", ")))}else{if(a<=s.length)return s[a-1].relationId;throw new Mg("Sheet number out of bounds: ".concat(a,". Available sheets count: ").concat(s.length))}}function jw(a,s){for(var l=gy(s),o;!(o=l()).done;){var c=o.value;if(c.relationId===a)return c.name}throw new Error("Sheet relation ID not found: ".concat(a))}function Sw(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:kS},"xl/workbook.xml":{name:"spreadsheetInfo",parse:ES}}}function ww(a){var s;return s={},Po(s,a.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:zS,fallback:[]}),Po(s,a.styles||"xl/styles.xml",{name:"styles",parse:US,fallback:{}}),s}function Nw(a,s,l){return Object.keys(a.sheets).filter(function(o){return s.includes(o)}).reduce(function(o,c){return Io(Io({},o),{},Po({},a.sheets[c],{name:c,parse:function(f,p){return sw(f,p,l)}}))},{})}function fd(a,s,l){for(var o={},c=function(){var S=f[u],b=a[S];o[b.name]=s[S]===void 0?b.fallback===void 0?(function(){throw new $i('"'.concat(S,'" file not found inside the `.xlsx` file'))})():b.fallback:b.parse(s[S],l)},u=0,f=Object.keys(a);u<f.length;u++)c();for(var p=[],m=function(){var S=v[g];ow(o[S])&&p.push(o[S].then(function(b){o[S]=b}))},g=0,v=Object.keys(o);g<v.length;g++)m();return p.length>0?Promise.all(p).then(function(){return o}):o}function Cw(a,s){return hy(a).then(function(l){return vy(Fv,Yv,l,s)})}function af(a){"@babel/helpers - typeof";return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},af(a)}function Tw(a,s,l){return Object.defineProperty(a,"prototype",{writable:!1}),a}function _w(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function Ew(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Wi(a,s)}function kw(a){var s=yy();return function(){var o=el(a),c;if(s){var u=el(this).constructor;c=Reflect.construct(o,arguments,u)}else c=o.apply(this,arguments);return Aw(this,c)}}function Aw(a,s){if(s&&(af(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ow(a)}function Ow(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function rf(a){var s=typeof Map=="function"?new Map:void 0;return rf=function(o){if(o===null||!Rw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s<"u"){if(s.has(o))return s.get(o);s.set(o,c)}function c(){return Lo(o,arguments,el(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Wi(c,o)},rf(a)}function Lo(a,s,l){return yy()?Lo=Reflect.construct.bind():Lo=function(c,u,f){var p=[null];p.push.apply(p,u);var m=Function.bind.apply(c,p),g=new m;return f&&Wi(g,f.prototype),g},Lo.apply(null,arguments)}function yy(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rw(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Wi(a,s){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Wi(a,s)}function el(a){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},el(a)}var ma=(function(a){Ew(l,a);var s=kw(l);function l(o){var c;return _w(this,l),c=s.call(this,"invalid"),c.reason=o,c}return Tw(l)})(rf(Error));function Dw(a){if(typeof a=="string"){var s=a;if(a=Number(a),String(a)!==s)throw new ma("not_a_number")}if(typeof a!="number")throw new ma("not_a_number");if(isNaN(a))throw new ma("invalid_number");if(!isFinite(a))throw new ma("out_of_bounds");return a}function Lw(a){if(typeof a=="string")return a;if(typeof a=="number"){if(isNaN(a))throw new ma("invalid_number");if(!isFinite(a))throw new ma("out_of_bounds");return String(a)}throw new ma("not_a_string")}function Mw(a){if(typeof a=="boolean")return a;throw new ma("not_a_boolean")}function Uw(a){if(a instanceof Date){if(isNaN(a.valueOf()))throw new ma("out_of_bounds");return a}throw new ma("not_a_date")}var zw={}.constructor;function by(a){return a!=null&&a.constructor===zw}function Ms(a){"@babel/helpers - typeof";return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Ms(a)}function Bw(a,s){return jy(a)||Iw(a,s)||jf(a,s)||xy()}function Iw(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function Pw(a){return jy(a)||$w(a)||jf(a)||xy()}function xy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $w(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function jy(a){if(Array.isArray(a))return a}function Bg(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function $o(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?Bg(Object(l),!0).forEach(function(o){qw(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):Bg(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function qw(a,s,l){return s=Hw(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function Hw(a){var s=Gw(a,"string");return Ms(s)==="symbol"?s:String(s)}function Gw(a,s){if(Ms(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(Ms(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function Sy(a,s){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=jf(a))||s){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jf(a,s){if(a){if(typeof a=="string")return Ig(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ig(a,s)}}function Ig(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=a[l];return o}var qo=null;function Fw(a,s,l){vr("parse sheet data using schema");for(var o=[],c=[],u=Vw(a,s),f=0,p=Sy(u),m;!(m=p()).done;){var g=m.value,v=g.object,y=g.errors;y?c=c.concat(y.map(function(S){return $o($o({},S),{},{row:f+1})})):o.push(v),f++}return vr("end"),c.length>0?{errors:c}:{objects:o}}function Vw(a,s,l){a1(s);var o=i1(),c=Pw(a),u=c[0],f=c.slice(1);return f.map(function(p){return Yw(p,s,u,o)})}function Yw(a,s,l,o){var c={schema:s},u=wy(a,c,void 0,l,o),f=u.value,p=u.isEmptyValue,m=u.errors,g=u.children,v={value:l1,isEmptyValue:p,errors:m,isRequired:void 0},y=Ty(c,f,p,m,g,v.isRequired,v.value,v.isEmptyValue,v.errors,l);return m||y?{errors:(m||[]).concat(y||[])}:{object:Cy(f,p,void 0,o)}}function Xw(a,s,l,o,c){for(var u={},f=!0,p=[],m=[],g=0,v=Object.keys(s);g<v.length;g++){var y=v[g],S=wy(a,s[y],Pg(y,l),o,c);S.errors?p=p.concat(S.errors):(u[y]=Cy(S.value,S.isEmptyValue,Pg(y,l),c),f&&!S.isEmptyValue&&(f=!1)),m.push($o($o({},S),{},{schemaEntry:s[y]}))}return p.length>0?{errors:p,children:m}:{value:u,isEmptyValue:f,children:m}}function wy(a,s,l,o,c){var u=s.column?o.indexOf(s.column):void 0,f=s.column?u<0:void 0,p=s.column?f?{value:c.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:Zw(a[u],s,u,c):Xw(a,s.schema,l,o,c),m=p.value,g=p.isEmptyValue,v=p.errors,y=p.children;return v?{errors:v,children:y}:{value:m,isEmptyValue:g,children:y}}function Zw(a,s,l,o){var c=Kw(a,s,o),u=c.value,f=c.isEmptyValue,p=c.error,m=c.reason;if(p){var g=_y({error:p,reason:m,column:s.column,columnIndex:l,valueType:s.type,value:a});return{errors:[g]}}return{value:u,isEmptyValue:f}}function Kw(a,s,l){return a===void 0?{value:l.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:a===qo?{value:l.propertyValueWhenCellIsEmpty,isEmptyValue:!0}:Array.isArray(s.type)?Qw(a,s,l):Ny(a,s)}function Qw(a,s,l){if(typeof a!="string")return{error:"not_a_string"};var o=!0,c=[],u=[],f=t1(a,l.separatorCharacter).map(function(p){if(!(c.length>0)){if(!p){c.push("invalid"),u.push("syntax");return}var m=Ny(p,s),g=m.value,v=m.isEmptyValue,y=m.error,S=m.reason;if(y){c.push(y),u.push(S);return}return o&&!v&&(o=!1),g}});return c.length>0?{error:c[0],reason:u[0]}:{value:f,isEmptyValue:o}}function Ny(a,s,l){if(a===qo)return{value:a,isEmptyValue:!0};var o;if(s.type?o=Ww(a,Array.isArray(s.type)?s.type[0]:s.type):o={value:a},o.error)return o;if(a===qo)return{value:a,isEmptyValue:!0};if(s.oneOf){var c=Jw(o.value,s.oneOf);if(c)return c}if(s.validate)try{s.validate(o.value)}catch(u){return{error:u.message}}return{value:o.value,isEmptyValue:r1(o.value)}}function Jw(a,s){if(s.indexOf(a)<0)return{error:"invalid",reason:"unknown"}}function Ww(a,s){switch(s){case String:return Ai(a,Lw);case Number:return Ai(a,Dw);case Date:return Ai(a,Uw);case Boolean:return Ai(a,Mw);default:if(typeof s!="function")throw new Error("Unsupported schema `type`: ".concat(s&&s.name||s));return Ai(a,s)}}function Ai(a,s){try{var l=s(a);return l===void 0?{value:qo}:{value:l}}catch(c){var o={error:c.message};return c.reason&&(o.reason=c.reason),o}}function e1(a,s,l){for(var o=0,c="";l+o<a.length;){var u=a[l+o];if(u===s)return[c,o];c+=u,o++}return[c,o]}function t1(a,s){for(var l=[],o=0;o<a.length;){var c=e1(a,s,o),u=Bw(c,2),f=u[0],p=u[1];o+=p+s.length,l.push(f.trim())}return l}function Cy(a,s,l,o){if(s){if(by(a))return o.transformEmptyObject(a,{path:l});if(Array.isArray(a))return o.transformEmptyArray(a,{path:l})}return a}function Pg(a,s){return"".concat(s?s+".":"").concat(a)}function Ty(a,s,l,o,c,u,f,p,m,g){var v=[],y=n1(a,u,f,p,m);if(y&&l&&v.push(_y({error:"required",column:a.column,columnIndex:g.indexOf(a.column),valueType:a.type,value:s})),c)for(var S=Sy(c),b;!(b=S()).done;){var E=b.value,N=Ty(E.schemaEntry,E.value,E.isEmptyValue,E.errors,E.children,y,s,l,o,g);N&&(v=v.concat(N))}if(v.length>0)return v}function n1(a,s,l,o,c){return s===!1&&(o||c)?!1:a.required&&(typeof a.required=="boolean"?a.required:c?!1:a.required(l))}function _y(a){var s=a.column,l=a.columnIndex,o=a.valueType,c=a.value,u=a.error,f=a.reason,p={error:u,column:s,columnIndex:l,value:c};return f&&(p.reason=f),o&&(p.type=o),p}function a1(a){for(var s=0,l=Object.keys(a);s<l.length;s++){var o=l[s],c=a[o];if(Ms(c.type)==="object"&&!Array.isArray(c.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!c.schema&&!c.column)throw new Error('"column" not defined for schema entry "'.concat(o,'".'))}Ey(a,void 0)}function Ey(a,s){if(s!==void 0&&s!==!1)throw new Error("In a schema, a nested object can have a `required` property but the only allowed value is `undefined` or `false`. Otherwise, a \"required\" error for a nested object would have to include a specific `column` title and a nested object doesn't have one. You've specified the following `required`: ".concat(s));for(var l=0,o=Object.keys(a);l<o.length;l++){var c=o[l];if(by(a[c].schema)){if(a[c].column)throw new Error("In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: ".concat(c,`. Schema:
20
+ `).concat(JSON.stringify(a[c],null,2)));Ey(a[c].schema,a[c].required)}}}function r1(a){return a==null}var s1={propertyValueWhenColumnIsMissing:void 0,propertyValueWhenCellIsEmpty:null,transformEmptyObject:function(){return null},transformEmptyArray:function(){return null},separatorCharacter:","};function i1(a){return s1}var l1={};function tl(a){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},tl(a)}var o1=["schema"];function $g(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function qg(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?$g(Object(l),!0).forEach(function(o){c1(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):$g(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function c1(a,s,l){return s=u1(s),s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function u1(a){var s=d1(a,"string");return tl(s)==="symbol"?s:String(s)}function d1(a,s){if(tl(a)!=="object"||a===null)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(tl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function f1(a,s){if(a==null)return{};var l=h1(a,s),o,c;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(a);for(c=0;c<u.length;c++)o=u[c],!(s.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(l[o]=a[o])}return l}function h1(a,s){if(a==null)return{};var l={},o=Object.keys(a),c,u;for(u=0;u<o.length;u++)c=o[u],!(s.indexOf(c)>=0)&&(l[c]=a[c]);return l}function p1(a,s,l,o,c){var u={},f=u.schema,p=f1(u,o1);return vy(a,s,l,qg(qg({},p),{},{sheets:[1]})).then(function(m){var g=m[0].data;return f?Fw(g,f):g})}function m1(a,s,l){return hy(a).then(function(o){return p1(Fv,Yv,o)})}function ky(a){const s=[];let l=[],o="",c=!1;const u=a.replace(/^\uFEFF/,"");for(let f=0;f<u.length;f++){const p=u[f];p==='"'?c&&u[f+1]==='"'?(o+='"',f++):c=!c:p===","&&!c?(l.push(o),o=""):(p===`
21
21
  `||p==="\r")&&!c?(p==="\r"&&u[f+1]===`
22
- `&&f++,l.push(o),l.some(m=>m.trim())&&s.push(l),l=[],o=""):o+=p}if(l.push(o),l.some(f=>f.trim())&&s.push(l),c)throw new Error("CSV contains an unclosed quoted value.");return s}const fd=50,Hg=25,Gg=24e3,ky=2e6;function Fg(a,s){return{name:a,rows:s.slice(0,fd).map(l=>l.slice(0,Hg).map(o=>String(o??""))),clipped:s.length>fd||s.slice(0,fd).some(l=>l.length>Hg)}}function m1(a){const s=document.createElement("template");s.innerHTML=a;const l=new Set("style main header section article aside footer div span h1 h2 h3 h4 h5 h6 p strong b em i small code pre hr br ul ol li table caption thead tbody tr th td".split(" "));for(const o of s.content.querySelectorAll("*")){if(o.namespaceURI!=="http://www.w3.org/1999/xhtml"||!l.has(o.localName)){o.remove();continue}for(const c of Array.from(o.attributes))["class","style","colspan","rowspan"].includes(c.name)||o.removeAttribute(c.name)}return`<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"><body>${s.innerHTML}</body>`}async function g1(a,s,l){const o=await fetch(a,{signal:l,cache:"no-store"});if(!o.ok)throw new Error("Document unavailable");const c=await o.blob();if(c.size>ky)throw new Error("Document too large");if(s.endsWith(".xlsx"))return{sheets:(await Nw(c)).map(f=>Fg(f.sheet,f.data))};const u=await c.text();return s.endsWith(".csv")?{sheets:[Fg("CSV",Ey(u))]}:s.endsWith(".html")?{html:m1(u)}:{text:u.slice(0,Gg),clipped:u.length>Gg}}function Ay({rows:a,header:s}){return n.jsxs("table",{className:"w-full border-collapse text-left text-sm",children:[s&&n.jsx("thead",{children:n.jsx("tr",{children:s.map((l,o)=>n.jsx("th",{scope:"col",className:"border border-slate-200 px-2 py-1",children:l},o))})}),n.jsx("tbody",{children:a.map((l,o)=>n.jsx("tr",{children:l.map((c,u)=>n.jsx("td",{className:"min-w-20 whitespace-pre-wrap border border-slate-200 px-2 py-1 align-top",children:c},u))},o))})]})}function Vg(a){return Array.from(a.trim().slice(1).matchAll(/((?:\\.|[^|\\])*)\|/g),([,s])=>s.trim().replace(/\\(.)/g,"$1").replaceAll("<br>",`
23
- `).replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&amp;","&"))}function v1({text:a}){return n.jsx("article",{className:"max-h-96 space-y-3 overflow-auto text-sm",children:a.replaceAll(`\r
22
+ `&&f++,l.push(o),l.some(m=>m.trim())&&s.push(l),l=[],o=""):o+=p}if(l.push(o),l.some(f=>f.trim())&&s.push(l),c)throw new Error("CSV contains an unclosed quoted value.");return s}const hd=50,Hg=25,Gg=24e3,Ay=2e6;function Fg(a,s){return{name:a,rows:s.slice(0,hd).map(l=>l.slice(0,Hg).map(o=>String(o??""))),clipped:s.length>hd||s.slice(0,hd).some(l=>l.length>Hg)}}function g1(a){const s=document.createElement("template");s.innerHTML=a;const l=new Set("style main header section article aside footer div span h1 h2 h3 h4 h5 h6 p strong b em i small code pre hr br ul ol li table caption thead tbody tr th td".split(" "));for(const o of s.content.querySelectorAll("*")){if(o.namespaceURI!=="http://www.w3.org/1999/xhtml"||!l.has(o.localName)){o.remove();continue}for(const c of Array.from(o.attributes))["class","style","colspan","rowspan"].includes(c.name)||o.removeAttribute(c.name)}return`<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"><body>${s.innerHTML}</body>`}async function v1(a,s,l){const o=await fetch(a,{signal:l,cache:"no-store"});if(!o.ok)throw new Error("Document unavailable");const c=await o.blob();if(c.size>Ay)throw new Error("Document too large");if(s.endsWith(".xlsx"))return{sheets:(await Cw(c)).map(f=>Fg(f.sheet,f.data))};const u=await c.text();return s.endsWith(".csv")?{sheets:[Fg("CSV",ky(u))]}:s.endsWith(".html")?{html:g1(u)}:{text:u.slice(0,Gg),clipped:u.length>Gg}}function Oy({rows:a,header:s}){return n.jsxs("table",{className:"w-full border-collapse text-left text-sm",children:[s&&n.jsx("thead",{children:n.jsx("tr",{children:s.map((l,o)=>n.jsx("th",{scope:"col",className:"border border-slate-200 px-2 py-1",children:l},o))})}),n.jsx("tbody",{children:a.map((l,o)=>n.jsx("tr",{children:l.map((c,u)=>n.jsx("td",{className:"min-w-20 whitespace-pre-wrap border border-slate-200 px-2 py-1 align-top",children:c},u))},o))})]})}function Vg(a){return Array.from(a.trim().slice(1).matchAll(/((?:\\.|[^|\\])*)\|/g),([,s])=>s.trim().replace(/\\(.)/g,"$1").replaceAll("<br>",`
23
+ `).replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&amp;","&"))}function y1({text:a}){return n.jsx("article",{className:"max-h-96 space-y-3 overflow-auto text-sm",children:a.replaceAll(`\r
24
24
  `,`
25
25
  `).split(/\n\s*\n/).map((s,l)=>{const o=s.split(`
26
- `);return o.length===1&&/^#{1,6} /.test(s)?n.jsx("h3",{className:"font-semibold",children:s.replace(/^#{1,6} /,"")},l):o[0].startsWith("|")&&/^\|[ :|-]+\|$/.test(o[1]??"")?n.jsx("div",{className:"overflow-x-auto",children:n.jsx(Ay,{header:Vg(o[0]),rows:o.slice(2).map(Vg)})},l):n.jsx("p",{className:"whitespace-pre-wrap break-words",children:s},l)})})}function y1({file:a,projectId:s}){const l=Le().language==="th",[o,c]=L.useState(),[u,f]=L.useState(!1),[p,m]=L.useState(0),g=a.size>ky;L.useEffect(()=>{if(g)return;const j=new AbortController;return g1(mf(s,a.filename),a.filename,j.signal).then(b=>{j.signal.aborted||c(b)}).catch(()=>{j.signal.aborted||f(!0)}),()=>j.abort()},[s,a.filename,g]);const v=l?"ตัวอย่างเอกสาร":"Document preview",y=o&&"sheets"in o?o.sheets[p]:void 0;return n.jsxs("section",{"aria-label":v,className:"mt-3 min-w-0 rounded-lg border border-slate-200 p-3",children:[g?n.jsx("p",{children:l?"ไฟล์นี้มีขนาดเกิน 2 MB กดดาวน์โหลดเพื่อเปิดดูฉบับเต็ม":"This file exceeds 2 MB. Download it to view the full document."}):u?n.jsx("p",{role:"alert",children:l?"เปิดตัวอย่างไม่สำเร็จ ลองรีเฟรชรายการหรือดาวน์โหลดไฟล์":"Could not open the preview. Refresh the list or download the file."}):o?null:n.jsx("p",{role:"status",children:l?"กำลังเปิดตัวอย่าง…":"Opening preview…"}),o&&"html"in o&&n.jsx("iframe",{title:v,sandbox:"",referrerPolicy:"no-referrer",className:"h-96 w-full bg-white",srcDoc:o.html}),o&&"text"in o&&n.jsx(v1,{text:o.text}),o&&"sheets"in o&&o.sheets.length>1&&n.jsxs("label",{className:"mb-3 flex items-center gap-2 text-sm",children:[l?"แผ่นงาน":"Sheet",n.jsx("select",{className:"rounded border p-1",value:p,onChange:j=>m(Number(j.target.value)),children:o.sheets.map((j,b)=>n.jsx("option",{value:b,children:j.name},j.name))})]}),y&&n.jsxs("div",{className:"max-h-96 overflow-auto",children:[n.jsx(Ay,{rows:y.rows}),!y.rows.length&&n.jsx("p",{children:l?"ไม่มีข้อมูลในแผ่นงานนี้":"This sheet is empty."})]}),(y?.clipped||o&&"text"in o&&o.clipped)&&n.jsx("p",{className:"mt-2 text-xs",children:l?"แสดงบางส่วน กดดาวน์โหลดเพื่อดูไฟล์เต็ม":"Showing part of this document. Download the file for the full contents."})]})}function b1({projectId:a,projectName:s}){const{language:l}=Le(),o=l==="th",[c,u]=L.useState([]),[f,p]=L.useState(0),[m,g]=L.useState(!0),[v,y]=L.useState(!1),[j,b]=L.useState(""),[E,N]=L.useState(""),[A,w]=L.useState("");L.useEffect(()=>{const D=()=>p(M=>M+1);return window.addEventListener("focus",D),()=>window.removeEventListener("focus",D)},[]),L.useEffect(()=>{const D=new AbortController;return g(!0),y(!1),fj(a,D.signal).then(({files:M})=>{D.signal.aborted||(u(M),b(F=>M.some(X=>X.filename===F)?F:""))}).catch(()=>{D.signal.aborted||y(!0)}).finally(()=>{D.signal.aborted||g(!1)}),()=>D.abort()},[a,f]);async function S(D){N(D),w("");try{await ff(await fetch(mf(a,D),{cache:"no-store"}),D)}catch{w(D)}finally{N("")}}const O=new Intl.DateTimeFormat(o?"th-TH":"en",{dateStyle:"medium",timeStyle:"short"});return n.jsxs("section",{className:"document-library card p-4 sm:p-6","aria-labelledby":"project-documents-title",children:[n.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{children:[n.jsx("h2",{id:"project-documents-title",className:"text-xl font-bold",children:o?"เอกสาร":"Documents"}),n.jsx("p",{className:"text-sm text-slate-600",children:s})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:m,onClick:()=>p(f+1),children:o?"รีเฟรชรายการ":"Refresh list"})]}),m&&n.jsx("p",{role:"status",className:"mt-4",children:o?"กำลังโหลดรายการเอกสาร…":"Loading documents…"}),v&&n.jsx("p",{role:"alert",className:"mt-4 text-red-700",children:o?"โหลดรายการไม่ได้ ตรวจว่า LazyScout เปิดอยู่ แล้วกดรีเฟรชรายการ":"Could not load documents. Check that LazyScout is running and refresh the list."}),!m&&!v&&!c.length&&n.jsxs("div",{className:"workspace-empty my-5",children:[n.jsx(nt,{name:"documents"}),n.jsx("strong",{children:o?"ยังไม่มีเอกสารในโปรเจกต์นี้":"No saved documents in this project"}),n.jsx("p",{className:"mt-1 text-sm",children:o?"สั่ง Codex ผ่าน LazyScout MCP ว่า “บันทึกรายงาน QA เป็น Excel” แล้วกดรีเฟรชรายการ":"Ask Codex via LazyScout MCP to “save the QA report as Excel”, then refresh the list."})]}),n.jsx("ul",{className:"mt-4 divide-y divide-slate-200",children:c.map(D=>{const{filename:M}=D,F=M.split(".").at(-1)?.toUpperCase(),X=M.endsWith("-bug-draft.md")?o?"ร่างรายงานบั๊ก":"Bug report draft":/-test-cases\.(xlsx|csv|md)$/.test(M)?o?"ชุดเคสทดสอบ":"Test case export":M==="quality-report-print.html"?o?"รายงานคุณภาพสำหรับพิมพ์":"Printable quality report":M==="quality-report.html"?o?"รายงานคุณภาพ":"Quality report":M.startsWith("qa-")?o?"รายงาน QA":"QA report":M,Z=M===j;return n.jsxs("li",{className:"py-3",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[n.jsx("span",{className:"rounded-md border border-slate-200 px-2 py-2 font-mono text-xs font-semibold",children:F}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("strong",{children:X}),n.jsxs("p",{className:"text-xs text-slate-600",children:[n.jsx("time",{dateTime:D.modifiedAt,children:O.format(new Date(D.modifiedAt))})," ·"," ",D.size<1024?D.size+" B":Math.ceil(D.size/1024).toLocaleString(l)+" KB"]}),M!==X&&n.jsx("p",{className:"break-all font-mono text-xs text-slate-500",children:M})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsxs("button",{type:"button",className:"btn btn-secondary","aria-expanded":Z,onClick:()=>b(Z?"":M),children:[n.jsx(nt,{name:"eye"}),Z?o?"ปิดตัวอย่าง":"Close preview":o?"ดูตัวอย่าง":"Preview"]}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!!E,onClick:()=>{S(M)},children:E===M?o?"กำลังดาวน์โหลด…":"Downloading…":o?"ดาวน์โหลด":"Download"})]})]}),A===M&&n.jsx("p",{role:"alert",className:"mt-2 text-red-700",children:o?"ดาวน์โหลดไม่สำเร็จ ลองรีเฟรชรายการแล้วกดดาวน์โหลดอีกครั้ง":"Download failed. Refresh the list and try again."}),Z&&n.jsx(y1,{file:D,projectId:a},M+D.modifiedAt)]},M)})})]})}function vo({message:a,hint:s}){const{ui:l}=Le();return n.jsxs("div",{role:"alert",className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[n.jsx("p",{className:"text-sm font-semibold text-red-700",children:l(a)}),s&&n.jsx("p",{className:"mt-1 text-sm text-red-600",children:l(s)})]})}function x1({result:a,activeUrl:s,onSelect:l}){const{ui:o}=Le(),[c,u]=L.useState(!1),{language:f}=Le(),p=a.pages.reduce((m,g)=>{const v=new URL(g.finalUrl).pathname||"/";return(m[v]??=[]).push(g),m},{});return n.jsxs("aside",{className:`workspace-panel workspace-tree ${c?"is-collapsed":""}`,children:[n.jsxs("div",{className:"workspace-panel-head",children:[n.jsx("button",{type:"button",className:"tree-panel-toggle",onClick:()=>u(m=>!m),"aria-label":c?f==="th"?"ขยาย Explorer":"Expand Explorer":f==="th"?"พับ Explorer":"Collapse Explorer",title:c?f==="th"?"ขยาย Explorer":"Expand Explorer":f==="th"?"พับ Explorer":"Collapse Explorer",children:c?"›":"‹"}),n.jsxs("div",{className:"tree-panel-heading",children:[n.jsx("p",{className:"eyebrow",children:o("Explorer")}),n.jsx("h2",{children:o("State Tree")})]}),n.jsx("span",{className:"status-dot status-pass",title:o("scan complete")})]}),!c&&n.jsxs("div",{className:"tree-meta",children:[n.jsxs("span",{children:[a.pages.length," ",o("pages")]}),n.jsxs("span",{children:[a.actionGraph.states.length," ",o("states")]})]}),!c&&n.jsx("div",{className:"tree-list",children:Object.entries(p).map(([m,g])=>n.jsxs("div",{className:"tree-branch",children:[n.jsxs("div",{className:"tree-path",children:[n.jsx("span",{className:"tree-chevron",children:"⌄"}),n.jsx("span",{className:"tree-folder",children:"●"}),m]}),g.map(v=>n.jsxs("button",{type:"button",onClick:()=>l(v.finalUrl),className:`tree-node ${s===v.finalUrl?"is-active":""}`,children:[n.jsx("span",{className:"tree-node-icon",children:v.state?.visibleDialogs.length?"◈":"◇"}),n.jsx("span",{className:"truncate",children:v.state?.visibleDialogs[0]??(v.title||"Untitled page")}),n.jsx("span",{className:"tree-node-count",children:v.buttons.length})]},v.state?.id??v.finalUrl))]},m))}),!c&&n.jsxs("div",{className:"tree-footer",children:[n.jsx("span",{className:"status-dot status-pass"})," ",o("Safe exploration only"),n.jsx("br",{}),n.jsx("span",{className:"status-dot status-warn"})," ",o("Destructive actions blocked")]})]})}const j1={rules:{label:"No AI / rules",tier:"local",key:"none"},ollama:{label:"Ollama",tier:"local",key:"none",baseUrl:"http://localhost:11434"},"lm-studio":{label:"LM Studio",tier:"local",key:"optional",baseUrl:"http://localhost:1234/v1"},codex:{label:"ChatGPT / Codex (sign in)",tier:"cloud",key:"none"},gemini:{label:"Google Gemini",tier:"free-tier",key:"required",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",keyEnv:"GEMINI_API_KEY",keyUrl:"https://aistudio.google.com/app/apikey"},groq:{label:"Groq",tier:"free-tier",key:"required",baseUrl:"https://api.groq.com/openai/v1",keyEnv:"GROQ_API_KEY",keyUrl:"https://console.groq.com/keys"},"openrouter-free":{label:"OpenRouter Free",tier:"free-tier",key:"required",baseUrl:"https://openrouter.ai/api/v1",keyEnv:"OPENROUTER_API_KEY",defaultModel:"openrouter/free",keyUrl:"https://openrouter.ai/keys"},openai:{label:"OpenAI",tier:"cloud",key:"required",baseUrl:"https://api.openai.com/v1",keyEnv:"OPENAI_API_KEY",keyUrl:"https://platform.openai.com/api-keys"},anthropic:{label:"Anthropic Claude",tier:"cloud",key:"required",baseUrl:"https://api.anthropic.com/v1",keyEnv:"ANTHROPIC_API_KEY",keyUrl:"https://platform.claude.com/settings/keys"},openrouter:{label:"OpenRouter (all models)",tier:"cloud",key:"required",baseUrl:"https://openrouter.ai/api/v1",keyEnv:"OPENROUTER_API_KEY",keyUrl:"https://openrouter.ai/keys"},deepseek:{label:"DeepSeek",tier:"cloud",key:"required",baseUrl:"https://api.deepseek.com",keyEnv:"DEEPSEEK_API_KEY",keyUrl:"https://platform.deepseek.com/api_keys"},mistral:{label:"Mistral AI",tier:"cloud",key:"required",baseUrl:"https://api.mistral.ai/v1",keyEnv:"MISTRAL_API_KEY",keyUrl:"https://console.mistral.ai/api-keys/"},xai:{label:"xAI Grok",tier:"cloud",key:"required",baseUrl:"https://api.x.ai/v1",keyEnv:"XAI_API_KEY",keyUrl:"https://console.x.ai/"},compatible:{label:"Custom OpenAI-compatible",tier:"custom",key:"optional"}},Lo=j1;function S1(a){return typeof a=="string"&&Object.hasOwn(Lo,a)}const Oy=["password","passwd","token","access_token","refresh_token","api_key","apikey","authorization","cookie","set-cookie","secret","client_secret","session","sessionid"];Oy.map(a=>a.replace("-","[-_]?").replace("_","[-_]?")).join("|");Oy.filter(a=>a!=="authorization").map(a=>a.replace("-","[-_]?").replace("_","[-_]?")).join("|");const Ry=["delete","remove","destroy","erase","drop","reset","purchase","buy","checkout","pay","payment","transfer","withdraw","refund","submit order","place order","confirm payment","confirm order","deactivate","disable account","delete account","close account","unsubscribe","cancel subscription","revoke access","reset database","ลบ","ชำระเงิน","จ่าย","โอน","ซื้อ","สั่งซื้อ","ยืนยันการชำระ"],w1=100,N1=80;function Dy(a){if(!Array.isArray(a))return[];const s=a.filter(l=>typeof l=="string").map(l=>l.trim().toLowerCase().slice(0,N1)).filter(Boolean);return[...new Set(s)].slice(0,w1)}function gr(a){const s=a.name||a.label||a.text||a.placeholder;return s&&a.role?`${a.role} "${s}"`:s?`"${s}"`:a.cssSelector?`element (${a.cssSelector})`:"element"}function La(a){if(a.description)return a.description;switch(a.type){case"navigate":return`Navigate to ${a.url}`;case"click":return`Click ${gr(a.target)}`;case"fill":return`Enter "${a.value}" in ${gr(a.target)}`;case"select":return`Select "${a.option}" from ${gr(a.target)}`;case"check":return`${a.checked?"Check":"Uncheck"} ${gr(a.target)}`;case"wait":return`Wait for ${a.mode}: ${a.value}`;case"assertVisible":return`Verify that ${gr(a.target)} is visible`;case"assertText":return a.target?`Verify that ${gr(a.target)} shows "${a.text}"`:`Verify that the page shows "${a.text}"`;case"assertUrl":return`Verify that the URL contains "${a.urlContains}"`;case"assertInvalid":return`Verify that ${gr(a.target)} is invalid and the form remains open`;case"assertValidation":return"Wait for a visible validation or error message";case"manual":return a.description}}function C1(a){return a.map((s,l)=>`${l+1}. ${La(s)}`).join(`
27
- `)}function rf(a,s){return`TC-${a}-${String(s).padStart(3,"0")}`}function sf(a,s){return`TD-${a}-${String(s).padStart(3,"0")}`}function T1(a="MANUAL",s=sf("MANUAL",1),l=""){return{id:s,module:a,sourceUrl:l,field:"",inputType:"text",required:!1,validValue:"",invalidValue:""}}function _1(a="MANUAL",s=rf("MANUAL",1),l=""){return{id:s,module:a,title:"New test case",preconditions:[],steps:[],expectedResult:"",type:"positive",priority:"medium",automationStatus:"manual",status:"pending",sourceUrl:l}}const E1={positive:"bg-emerald-100 text-emerald-800",negative:"bg-rose-100 text-rose-800",validation:"bg-amber-100 text-amber-800",navigation:"bg-sky-100 text-sky-800",interaction:"bg-violet-100 text-violet-800",accessibility:"bg-teal-100 text-teal-800",manual:"bg-slate-200 text-slate-700"},k1={high:"bg-red-100 text-red-800",medium:"bg-blue-100 text-blue-800",low:"bg-slate-100 text-slate-700"},A1={ready:"bg-emerald-100 text-emerald-800","needs-data":"bg-amber-100 text-amber-800","needs-review":"bg-orange-100 text-orange-800",manual:"bg-slate-200 text-slate-700"};function O1({value:a}){const{ui:s}=Le();return n.jsx("span",{className:`badge ${E1[a]}`,children:s(a)})}function R1({value:a}){const{ui:s}=Le();return n.jsx("span",{className:`badge ${k1[a]}`,children:s(a)})}function D1({value:a}){const{ui:s}=Le();return n.jsx("span",{className:`badge ${A1[a]}`,children:s(a)})}function jf({labelledBy:a,onClose:s,children:l}){const o=L.useRef(null);return L.useLayoutEffect(()=>{const c=o.current;return c.showModal(),()=>c.close()},[]),n.jsx("dialog",{ref:o,className:"modern-modal-backdrop native-modal-frame","aria-labelledby":a,onCancel:c=>{c.preventDefault(),s()},onMouseDown:c=>c.target===c.currentTarget&&s(),children:l})}function L1({testCase:a,onEdit:s,onOpenRunner:l,onClose:o}){const{ui:c}=Le();return n.jsx(jf,{labelledBy:"test-case-detail-title",onClose:o,children:n.jsxs("section",{className:"modern-modal test-detail-modal",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsxs("p",{className:"eyebrow",children:[c("Test Case detail")," · ",a.id]}),n.jsx("h2",{id:"test-case-detail-title",children:Hr(a.title)||a.id})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:o,"aria-label":c("Close"),children:"×"})]}),n.jsxs("div",{className:"test-detail-body",children:[n.jsxs("div",{className:"test-detail-meta",children:[n.jsx(O1,{value:a.type}),n.jsx(R1,{value:a.priority}),n.jsx(D1,{value:a.automationStatus}),n.jsx("span",{className:"badge bg-slate-100 text-slate-600",children:a.folder??a.module})]}),!!(a.tags?.length||a.requirements?.length)&&n.jsxs("section",{className:"traceability-meta",children:[a.tags?.length?n.jsxs("div",{children:[n.jsx("h4",{className:"field-label",children:c("Tags")}),a.tags.map(u=>n.jsx("span",{className:"tag-chip",children:u},u))]}):null,a.requirements?.length?n.jsxs("div",{children:[n.jsx("h4",{className:"field-label",children:c("Requirements / Tickets")}),a.requirements.map(u=>n.jsx("span",{className:"requirement-chip",children:u},u))]}):null]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Preconditions")}),a.preconditions.length===0?n.jsx("p",{className:"text-sm text-slate-400",children:"—"}):n.jsx("ul",{className:"list-inside list-disc space-y-1 text-sm text-slate-700",children:a.preconditions.map((u,f)=>n.jsx("li",{children:u},f))})]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Steps")}),a.steps.length===0?n.jsx("p",{className:"text-sm text-slate-400",children:"—"}):n.jsx("ol",{className:"space-y-2 text-sm text-slate-700",children:a.steps.map((u,f)=>n.jsxs("li",{className:"test-detail-step",children:[n.jsx("span",{children:f+1}),n.jsxs("div",{children:[La(u),n.jsxs("small",{children:["[",c(u.type),"]"]})]})]},f))})]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Expected Result")}),n.jsx("p",{className:"text-sm text-slate-700",children:a.expectedResult||"—"})]}),a.notes&&n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Notes from Generator")}),n.jsx("p",{className:"text-sm text-slate-500",children:a.notes})]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Source URL")}),n.jsx("p",{className:"break-all text-xs text-slate-500",children:a.sourceUrl})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:c("Close")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:c("Edit Test Case")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:l,children:c("Open this case in the runner")})]})]})})}const yo={navigate:"Open page",fill:"Fill field",click:"Click button",assertText:"Check page text",manual:"Manual note"},hd=new Map([["{{TEST_USERNAME}}","Project username"],["{{TEST_EMAIL}}","Project email"],["{{TEST_PASSWORD}}","Project password"]]);function M1(a,s){switch(a){case"navigate":return{type:a,url:s};case"fill":return{type:a,target:{label:""},value:""};case"click":return{type:a,target:{role:"button",name:""}};case"assertText":return{type:a,text:""};case"manual":return{type:a,description:""}}}function Fr(a){return a.name||a.label||a.placeholder||a.text||a.testId||a.elementId||a.cssSelector||""}function U1(a,s){if(!s)return La(a);switch(a.type){case"navigate":return"เปิดหน้าเว็บ "+a.url;case"click":return"กด "+Fr(a.target);case"fill":return"กรอก "+Fr(a.target)+" ด้วย "+a.value;case"assertText":return"ตรวจว่ามีข้อความ “"+a.text+"”"+(a.target?" ที่ "+Fr(a.target):"");case"assertUrl":return"ตรวจว่า URL มี "+a.urlContains;case"assertVisible":return"ตรวจว่ามองเห็น "+Fr(a.target);default:return La(a)}}function z1({steps:a,sourceUrl:s,cases:l,onChange:o}){const{ui:c}=Le(),[u,f]=L.useState("click"),p=L.useId();let m=s;return n.jsxs("section",{className:"space-y-2",children:[n.jsx("h3",{className:"field-label",children:c("Steps")}),a.map((g,v)=>{if(g.type==="navigate")try{m=new URL(g.url,s).href}catch{m=s}function y(b){b.type!=="manual"&&delete b.description,o(a.map((E,N)=>N===v?b:E))}const j=new Map;if(g.type==="fill"||g.type==="click")for(const b of l){let E=b.sourceUrl;for(const N of b.steps)N.type==="navigate"&&(E=N.url),E===m&&N.type===g.type&&Fr(N.target)&&j.set(Fr(N.target),N.target)}return n.jsxs("fieldset",{className:"space-y-2 rounded-lg border border-slate-200 p-3",children:[n.jsxs("legend",{className:"px-1 text-sm font-semibold",children:[v+1,". ",c(g.type in yo?yo[g.type]:g.type)]}),g.type==="navigate"&&n.jsxs("label",{className:"block text-sm",children:[c("Page URL"),n.jsx("input",{className:"field",value:g.url,onChange:b=>y({...g,url:b.target.value})})]}),(g.type==="fill"||g.type==="click")&&n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"block text-sm",children:[c(g.type==="fill"?"Field name on the page":"Button name on the page"),n.jsx("input",{className:"field",list:p+v+"-controls",value:Fr(g.target),onChange:b=>{const E=b.target.value;y({...g,target:j.get(E)??(g.type==="fill"?{label:E}:{role:"button",name:E})})}})]}),n.jsx("datalist",{id:p+v+"-controls",children:[...j.keys()].map(b=>n.jsx("option",{value:b},b))}),g.type==="fill"&&n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"block text-sm",children:[c("Fill with"),n.jsxs("select",{className:"field",value:hd.has(g.value)?g.value:"",onChange:b=>y({...g,value:b.target.value}),children:[n.jsx("option",{value:"",children:c("Text I enter")}),[...hd].map(([b,E])=>n.jsx("option",{value:b,children:c(E)},b))]})]}),!hd.has(g.value)&&n.jsxs("label",{className:"block text-sm",children:[c("Value to enter"),n.jsx("input",{className:"field",value:g.value,onChange:b=>y({...g,value:b.target.value})})]})]})]}),g.type==="assertText"&&n.jsxs("label",{className:"block text-sm",children:[c("Text that must appear"),g.target&&" · "+gr(g.target),n.jsx("input",{className:"field",value:g.text,onChange:b=>y({...g,text:b.target.value})})]}),g.type==="manual"&&n.jsxs("label",{className:"block text-sm",children:[c("Manual note"),n.jsx("input",{className:"field",value:g.description,onChange:b=>y({...g,description:b.target.value})})]}),!(g.type in yo)&&n.jsx("input",{className:"field","aria-label":c("Step description"),value:La(g),onChange:b=>o(a.map((E,N)=>N===v?{...E,description:b.target.value}:E))}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:v===0,"aria-label":c("Move up"),onClick:()=>{const b=[...a];[b[v-1],b[v]]=[b[v],b[v-1]],o(b)},children:"↑"}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:v===a.length-1,"aria-label":c("Move down"),onClick:()=>{const b=[...a];[b[v],b[v+1]]=[b[v+1],b[v]],o(b)},children:"↓"}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>o(a.filter((b,E)=>E!==v)),children:c("Delete")})]})]},v)}),n.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[n.jsxs("label",{className:"text-sm",children:[c("Next action"),n.jsx("select",{className:"field",value:u,onChange:g=>f(g.target.value),children:Object.entries(yo).map(([g,v])=>n.jsx("option",{value:g,children:c(v)},g))})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>o([...a,M1(u,s)]),children:c("+ Add step")})]})]})}function B1({testCase:a,cases:s,onSave:l,onCancel:o}){const{ui:c}=Le(),[u,f]=L.useState({...a}),[p,m]=L.useState(""),[g,v]=L.useState(a.preconditions.join(`
28
- `)),[y,j]=L.useState((a.tags??[]).join(", ")),[b,E]=L.useState((a.requirements??[]).join(", "));L.useEffect(()=>{function w(S){S.key==="Escape"&&o()}return document.addEventListener("keydown",w),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=""}},[o]);function N(w){f(S=>({...S,...w}))}function A(w){if(!u.title.trim()||!u.id.trim()||u.id!==a.id&&s.some(O=>O.id===u.id)){m(c("Enter a title and a unique case ID."));return}const S=[];for(const O of u.steps){if(O.type==="navigate")try{if(!O.url.trim())throw new Error;const D=new URL(O.url,u.sourceUrl||void 0);if(!["https:","http:"].includes(D.protocol))throw new Error;S.push({...O,url:D.href});continue}catch{m(c("Enter a valid page URL."));return}if(O.type==="assertText"&&!O.text.trim()||(O.type==="click"||O.type==="fill")&&![O.target.name,O.target.label,O.target.cssSelector,O.target.testId,O.target.placeholder,O.target.text,O.target.elementId,O.target.attributeName].some(D=>D?.trim())){m(c("Complete the control name or expected text in each step."));return}S.push(O)}l({...u,steps:S,preconditions:g.split(`
29
- `).map(O=>O.trim()).filter(Boolean),tags:Yg(y),requirements:Yg(b)},w)}return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:w=>w.target===w.currentTarget&&o(),children:n.jsxs("div",{className:"modern-modal test-case-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"case-editor-title",children:[n.jsxs("div",{className:"card-title flex shrink-0 items-center justify-between",children:[n.jsxs("span",{id:"case-editor-title",children:[c("Edit")," ",u.id]}),n.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:o,"aria-label":c("Close editor"),children:"✕"})]}),n.jsxs("div",{className:"test-case-editor-body",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-title",children:c("Title")}),n.jsx("input",{id:"edit-title",className:"field",value:u.title,onChange:w=>N({title:w.target.value})})]}),n.jsxs("details",{className:"rounded-lg border border-slate-200 p-3",children:[n.jsx("summary",{className:"cursor-pointer text-sm font-semibold",children:c("Case details and tags")}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-module",children:c("Module")}),n.jsx("input",{id:"edit-module",className:"field",value:u.module,onChange:w=>N({module:w.target.value})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-id",children:c("TC ID")}),n.jsx("input",{id:"edit-id",className:"field font-mono",value:u.id,onChange:w=>N({id:w.target.value})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-folder",children:c("Folder")}),n.jsx("input",{id:"edit-folder",className:"field",value:u.folder??u.module,onChange:w=>N({folder:w.target.value})})]})]}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-type",children:c("Type")}),n.jsxs("select",{id:"edit-type",className:"field",value:u.type,onChange:w=>N({type:w.target.value}),children:[n.jsx("option",{value:"positive",children:c("positive")}),n.jsx("option",{value:"negative",children:c("negative")}),n.jsx("option",{value:"validation",children:c("validation")})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-priority",children:c("Priority")}),n.jsxs("select",{id:"edit-priority",className:"field",value:u.priority,onChange:w=>N({priority:w.target.value}),children:[n.jsx("option",{value:"high",children:c("high")}),n.jsx("option",{value:"medium",children:c("medium")}),n.jsx("option",{value:"low",children:c("low")})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-automation",children:c("Automation Status")}),n.jsxs("select",{id:"edit-automation",className:"field",value:u.automationStatus,onChange:w=>N({automationStatus:w.target.value}),children:[n.jsx("option",{value:"ready",children:c("ready")}),n.jsx("option",{value:"needs-data",children:c("needs-data")}),n.jsx("option",{value:"needs-review",children:c("needs-review")}),n.jsx("option",{value:"manual",children:c("manual")})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-preconditions",children:c("Preconditions (one per line)")}),n.jsx("textarea",{id:"edit-preconditions",className:"field h-20",value:g,onChange:w=>v(w.target.value)})]}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-tags",children:c("Tags (comma separated)")}),n.jsx("input",{id:"edit-tags",className:"field",value:y,onChange:w=>j(w.target.value),placeholder:"smoke, regression, critical"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-requirements",children:c("Requirements / Tickets")}),n.jsx("textarea",{id:"edit-requirements",className:"field min-h-10 resize-y leading-5",value:b,onChange:w=>E(w.target.value),placeholder:"JIRA-123, https://tracker.example/456",rows:2})]})]})]}),n.jsx(z1,{steps:u.steps,sourceUrl:u.sourceUrl,cases:s,onChange:w=>N({steps:w})}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-expected",children:c("Expected Result")}),n.jsx("textarea",{id:"edit-expected",className:"field h-20",value:u.expectedResult,onChange:w=>N({expectedResult:w.target.value})})]})]}),n.jsxs("div",{className:"test-case-editor-footer",children:[p&&n.jsx("p",{role:"alert",className:"text-sm text-red-700",children:p}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:c("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>A(!1),children:c("Save")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>A(!0),children:c("Save and open runner")})]})]})})}function Yg(a){return a.split(/[,;\n]/).map(s=>s.trim()).filter(Boolean)}function Cs({value:a,editValue:s=a,options:l,multiline:o=!1,onSave:c}){const{ui:u,language:f}=Le(),[p,m]=L.useState(!1),[g,v]=L.useState(s);if(L.useEffect(()=>{p||v(s)},[p,s]),!p)return n.jsxs("span",{className:"inline-edit-shell",children:[n.jsx("span",{className:"inline-edit-value",title:f==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>m(!0),children:(l?u(a):a)||"—"}),n.jsx("button",{type:"button",onClick:()=>m(!0),"aria-label":f==="th"?"แก้ไขค่า":"Edit value",title:f==="th"?"แก้ไข":"Edit",children:"✎"})]});const y=()=>{m(!1),g!==s&&c(g)},j={autoFocus:!0,value:g,onChange:b=>v(b.target.value),onBlur:y,onKeyDown:b=>{b.key==="Enter"&&y(),b.key==="Escape"&&(v(s),m(!1))},onClick:b=>b.stopPropagation()};return o&&!l?n.jsx("textarea",{...j,className:"inline-edit-textarea",rows:5}):l?n.jsx("select",{...j,className:"inline-edit-input",children:l.map(b=>n.jsx("option",{value:b,children:u(b)},b))}):n.jsx("input",{...j,className:"inline-edit-input"})}function Oi({value:a,onSave:s}){const{ui:l,language:o}=Le(),[c,u]=L.useState(!1),[f,p]=L.useState(a),m=L.useRef(null),g=L.useRef(null);if(L.useEffect(()=>{c||p(a)},[c,a]),!c)return n.jsxs("span",{className:"inline-edit-shell",children:[n.jsx("span",{className:"inline-edit-value",title:o==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>u(!0),dangerouslySetInnerHTML:{__html:a||"—"}}),n.jsx("button",{type:"button",onClick:()=>u(!0),"aria-label":o==="th"?"แก้ไขค่า":"Edit value",title:o==="th"?"แก้ไข":"Edit",children:"✎"})]});const v=()=>{const E=window.getSelection();E?.rangeCount&&(m.current=E.getRangeAt(0).cloneRange())},y=()=>{const E=window.getSelection();m.current&&E&&(E.removeAllRanges(),E.addRange(m.current))},j=(E,N)=>{y(),document.execCommand(E,!1,N),g.current?.focus(),v()},b=E=>{p(E.innerHTML),u(!1),s(E.innerHTML)};return n.jsxs("div",{className:"rich-text-editor",onClick:E=>E.stopPropagation(),children:[n.jsxs("div",{className:"rich-text-toolbar",children:[n.jsx("button",{type:"button",onMouseDown:()=>v(),onClick:()=>j("bold"),children:"B"}),n.jsx("button",{type:"button",onMouseDown:()=>v(),onClick:()=>j("italic"),children:"I"}),n.jsx("input",{type:"color",defaultValue:"#1e293b",onMouseDown:()=>v(),onChange:E=>j("foreColor",E.target.value),"aria-label":l("Text color")}),n.jsxs("select",{defaultValue:"3",onMouseDown:()=>v(),onChange:E=>j("fontSize",E.target.value),"aria-label":l("Text size"),children:[n.jsx("option",{value:"2",children:l("Small")}),n.jsx("option",{value:"3",children:l("Normal")}),n.jsx("option",{value:"5",children:l("Large")}),n.jsx("option",{value:"7",children:l("Huge")})]})]}),n.jsx("div",{className:"rich-text-content",ref:g,contentEditable:!0,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:{__html:f},onBlur:E=>{E.relatedTarget&&g.current?.parentElement?.contains(E.relatedTarget)||b(E.currentTarget)},onMouseUp:v,onKeyUp:v,onKeyDown:E=>{E.key==="Escape"&&(p(a),u(!1))}})]})}function I1({testCases:a,selectedIds:s,activeId:l,onToggleSelect:o,onToggleAll:c,onOpen:u,onEdit:f,onDelete:p,onReorder:m,onUpdateCell:g,executionStatuses:v={}}){const{ui:y,language:j}=Le(),b=j==="th",[E,N]=L.useState(),[A,w]=L.useState(),[S,O]=L.useState(),[D,M]=L.useState("basic"),[F,X]=L.useState({}),Z=L.useRef(null),$=a.length>0&&a.every(B=>s.includes(B.id));return L.useEffect(()=>{function B(z){Z.current&&!Z.current.contains(z.target)&&O(void 0)}function J(z){z.key==="Escape"&&O(void 0)}return document.addEventListener("pointerdown",B),document.addEventListener("keydown",J),()=>{document.removeEventListener("pointerdown",B),document.removeEventListener("keydown",J)}},[]),a.length===0?n.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:b?"ไม่พบ Test Case ที่ตรงกับตัวกรอง":"No Test Cases match the current filters."}):n.jsxs("div",{className:`test-case-table-wrap table-view-${D}`,children:[n.jsxs("div",{className:"test-case-view-bar",children:[n.jsxs("div",{children:[n.jsx("b",{children:b?"คอลัมน์ตาราง":"Table columns"}),n.jsx("span",{children:b?"เริ่มจากข้อมูลพื้นฐาน แล้วแสดงรายละเอียดเมื่อจำเป็น":"Start simple, then show more detail only when you need it."})]}),n.jsxs("div",{role:"group","aria-label":y("Test Case table columns"),children:[n.jsx("button",{type:"button","aria-pressed":D==="basic",className:D==="basic"?"is-active":"",onClick:()=>M("basic"),children:b?"พื้นฐาน":"Basic"}),n.jsx("button",{type:"button","aria-pressed":D==="tester",className:D==="tester"?"is-active":"",onClick:()=>M("tester"),children:y("Tester")}),n.jsx("button",{type:"button","aria-pressed":D==="all",className:D==="all"?"is-active":"",onClick:()=>M("all"),children:b?"ทุกคอลัมน์":"All columns"})]})]}),n.jsx("div",{className:"test-case-table-scroll border border-slate-200",children:n.jsxs("table",{className:"test-case-table border-collapse",children:[n.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"table-head w-10",children:b?"ย้าย":"Move"}),n.jsx("th",{className:"table-head case-select w-10",children:n.jsx("input",{type:"checkbox",checked:$,onChange:()=>c($?[]:a.map(B=>B.id)),"aria-label":y("Select all")})}),n.jsxs("th",{className:"table-head case-identity w-32",children:[n.jsx("span",{className:"case-id-label",children:y("TC ID")}),n.jsx("span",{className:"compact-case-title",children:b?"เคสทดสอบ":"Test case"})]}),n.jsx("th",{className:"table-head w-28",children:y("Folder")}),n.jsx("th",{className:"table-head",children:b?"ชื่อ":"Title"}),n.jsx("th",{className:"table-head w-24 col-tester",children:y("Type")}),n.jsx("th",{className:"table-head w-24",children:y("Priority")}),n.jsx("th",{className:"table-head w-56 col-tester",children:b?"ขั้นตอน":"Steps"}),n.jsx("th",{className:"table-head col-tester",children:y("Expected Result")}),n.jsx("th",{className:"table-head w-32",children:y("Automation")}),n.jsx("th",{className:"table-head w-48 col-all",children:y("Preconditions")}),n.jsx("th",{className:"table-head w-48 col-all",children:y("Notes")}),n.jsx("th",{className:"table-head w-40 col-tester",children:y("Tags")}),n.jsx("th",{className:"table-head w-32",children:y("Status")}),n.jsx("th",{className:"table-head case-row-actions w-28 text-center",children:b?"จัดการ":"Actions"})]})}),n.jsx("tbody",{children:a.map(B=>n.jsxs("tr",{onDragOver:J=>{J.preventDefault(),w(B.id)},onDrop:J=>{J.preventDefault(),E&&m(E,B.id),N(void 0),w(void 0)},onDragEnd:()=>{N(void 0),w(void 0)},className:`border-b border-slate-100 hover:bg-blue-50 ${A===B.id?"bg-indigo-50 ring-2 ring-inset ring-indigo-300":""} ${l===B.id?"bg-blue-50":""}`,children:[n.jsx("td",{className:"table-cell drag-handle",draggable:!0,onDragStart:()=>N(B.id),onClick:J=>J.stopPropagation(),title:y("Drag to reorder"),children:"⠿"}),n.jsx("td",{className:"table-cell case-select",onClick:J=>J.stopPropagation(),children:n.jsx("input",{type:"checkbox",checked:s.includes(B.id),onChange:()=>o(B.id),"aria-label":`${b?"เลือก":"Select"} ${B.id}`})}),n.jsx("td",{className:"table-cell case-identity",children:n.jsxs("button",{type:"button",className:"case-open",onClick:()=>u(B),"aria-label":`${y("View Test Case")} ${B.id} · ${Hr(B.title)}`,children:[n.jsx("span",{className:"compact-case-title",children:Hr(B.title)}),n.jsx("span",{className:"case-code",children:B.id})]})}),n.jsx("td",{className:"table-cell",children:n.jsx(Cs,{value:B.folder??B.module,onSave:J=>g(B.id,"folder",J)})}),n.jsxs("td",{className:"table-cell font-medium text-slate-900",children:[n.jsx(Oi,{value:B.title,onSave:J=>g(B.id,"title",J)}),(B.tags?.length||B.requirements?.length)&&n.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[B.tags?.slice(0,3).map(J=>n.jsx("span",{className:"tag-chip",children:J},J)),B.requirements?.slice(0,2).map(J=>n.jsx("span",{className:"requirement-chip",children:J},J))]})]}),n.jsx("td",{className:"table-cell col-tester",children:n.jsx(Cs,{value:B.type,options:["positive","negative","validation"],onSave:J=>g(B.id,"type",J)})}),n.jsx("td",{className:"table-cell",children:n.jsx(Cs,{value:B.priority,options:["high","medium","low"],onSave:J=>g(B.id,"priority",J)})}),n.jsxs("td",{className:"table-cell min-w-56 col-tester",children:[n.jsx(Oi,{value:B.steps.map((J,z)=>`${z+1}. ${La(J)}`).join(`
26
+ `);return o.length===1&&/^#{1,6} /.test(s)?n.jsx("h3",{className:"font-semibold",children:s.replace(/^#{1,6} /,"")},l):o[0].startsWith("|")&&/^\|[ :|-]+\|$/.test(o[1]??"")?n.jsx("div",{className:"overflow-x-auto",children:n.jsx(Oy,{header:Vg(o[0]),rows:o.slice(2).map(Vg)})},l):n.jsx("p",{className:"whitespace-pre-wrap break-words",children:s},l)})})}function b1({file:a,projectId:s}){const l=Le().language==="th",[o,c]=L.useState(),[u,f]=L.useState(!1),[p,m]=L.useState(0),g=a.size>Ay;L.useEffect(()=>{if(g)return;const S=new AbortController;return v1(gf(s,a.filename),a.filename,S.signal).then(b=>{S.signal.aborted||c(b)}).catch(()=>{S.signal.aborted||f(!0)}),()=>S.abort()},[s,a.filename,g]);const v=l?"ตัวอย่างเอกสาร":"Document preview",y=o&&"sheets"in o?o.sheets[p]:void 0;return n.jsxs("section",{"aria-label":v,className:"mt-3 min-w-0 rounded-lg border border-slate-200 p-3",children:[g?n.jsx("p",{children:l?"ไฟล์นี้มีขนาดเกิน 2 MB กดดาวน์โหลดเพื่อเปิดดูฉบับเต็ม":"This file exceeds 2 MB. Download it to view the full document."}):u?n.jsx("p",{role:"alert",children:l?"เปิดตัวอย่างไม่สำเร็จ ลองรีเฟรชรายการหรือดาวน์โหลดไฟล์":"Could not open the preview. Refresh the list or download the file."}):o?null:n.jsx("p",{role:"status",children:l?"กำลังเปิดตัวอย่าง…":"Opening preview…"}),o&&"html"in o&&n.jsx("iframe",{title:v,sandbox:"",referrerPolicy:"no-referrer",className:"h-96 w-full bg-white",srcDoc:o.html}),o&&"text"in o&&n.jsx(y1,{text:o.text}),o&&"sheets"in o&&o.sheets.length>1&&n.jsxs("label",{className:"mb-3 flex items-center gap-2 text-sm",children:[l?"แผ่นงาน":"Sheet",n.jsx("select",{className:"rounded border p-1",value:p,onChange:S=>m(Number(S.target.value)),children:o.sheets.map((S,b)=>n.jsx("option",{value:b,children:S.name},S.name))})]}),y&&n.jsxs("div",{className:"max-h-96 overflow-auto",children:[n.jsx(Oy,{rows:y.rows}),!y.rows.length&&n.jsx("p",{children:l?"ไม่มีข้อมูลในแผ่นงานนี้":"This sheet is empty."})]}),(y?.clipped||o&&"text"in o&&o.clipped)&&n.jsx("p",{className:"mt-2 text-xs",children:l?"แสดงบางส่วน กดดาวน์โหลดเพื่อดูไฟล์เต็ม":"Showing part of this document. Download the file for the full contents."})]})}function x1({projectId:a,projectName:s}){const{language:l}=Le(),o=l==="th",[c,u]=L.useState([]),[f,p]=L.useState(0),[m,g]=L.useState(!0),[v,y]=L.useState(!1),[S,b]=L.useState(""),[E,N]=L.useState(""),[A,w]=L.useState("");L.useEffect(()=>{const O=()=>p(M=>M+1);return window.addEventListener("focus",O),()=>window.removeEventListener("focus",O)},[]),L.useEffect(()=>{const O=new AbortController;return g(!0),y(!1),hj(a,O.signal).then(({files:M})=>{O.signal.aborted||(u(M),b(F=>M.some(X=>X.filename===F)?F:""))}).catch(()=>{O.signal.aborted||y(!0)}).finally(()=>{O.signal.aborted||g(!1)}),()=>O.abort()},[a,f]);async function j(O){N(O),w("");try{await hf(await fetch(gf(a,O),{cache:"no-store"}),O)}catch{w(O)}finally{N("")}}const R=new Intl.DateTimeFormat(o?"th-TH":"en",{dateStyle:"medium",timeStyle:"short"});return n.jsxs("section",{className:"document-library card p-4 sm:p-6","aria-labelledby":"project-documents-title",children:[n.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{children:[n.jsx("h2",{id:"project-documents-title",className:"text-xl font-bold",children:o?"เอกสาร":"Documents"}),n.jsx("p",{className:"text-sm text-slate-600",children:s})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:m,onClick:()=>p(f+1),children:o?"รีเฟรชรายการ":"Refresh list"})]}),m&&n.jsx("p",{role:"status",className:"mt-4",children:o?"กำลังโหลดรายการเอกสาร…":"Loading documents…"}),v&&n.jsx("p",{role:"alert",className:"mt-4 text-red-700",children:o?"โหลดรายการไม่ได้ ตรวจว่า LazyScout เปิดอยู่ แล้วกดรีเฟรชรายการ":"Could not load documents. Check that LazyScout is running and refresh the list."}),!m&&!v&&!c.length&&n.jsxs("div",{className:"workspace-empty my-5",children:[n.jsx(Qe,{name:"documents"}),n.jsx("strong",{children:o?"ยังไม่มีเอกสารในโปรเจกต์นี้":"No saved documents in this project"}),n.jsx("p",{className:"mt-1 text-sm",children:o?"สั่ง Codex ผ่าน LazyScout MCP ว่า “บันทึกรายงาน QA เป็น Excel” แล้วกดรีเฟรชรายการ":"Ask Codex via LazyScout MCP to “save the QA report as Excel”, then refresh the list."})]}),n.jsx("ul",{className:"mt-4 divide-y divide-slate-200",children:c.map(O=>{const{filename:M}=O,F=M.split(".").at(-1)?.toUpperCase(),X=M.endsWith("-bug-draft.md")?o?"ร่างรายงานบั๊ก":"Bug report draft":/-test-cases\.(xlsx|csv|md)$/.test(M)?o?"ชุดเคสทดสอบ":"Test case export":M==="quality-report-print.html"?o?"รายงานคุณภาพสำหรับพิมพ์":"Printable quality report":M==="quality-report.html"?o?"รายงานคุณภาพ":"Quality report":M.startsWith("qa-")?o?"รายงาน QA":"QA report":M,Z=M===S;return n.jsxs("li",{className:"py-3",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[n.jsx("span",{className:"rounded-md border border-slate-200 px-2 py-2 font-mono text-xs font-semibold",children:F}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("strong",{children:X}),n.jsxs("p",{className:"text-xs text-slate-600",children:[n.jsx("time",{dateTime:O.modifiedAt,children:R.format(new Date(O.modifiedAt))})," ·"," ",O.size<1024?O.size+" B":Math.ceil(O.size/1024).toLocaleString(l)+" KB"]}),M!==X&&n.jsx("p",{className:"break-all font-mono text-xs text-slate-500",children:M})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsxs("button",{type:"button",className:"btn btn-secondary","aria-expanded":Z,onClick:()=>b(Z?"":M),children:[n.jsx(Qe,{name:"eye"}),Z?o?"ปิดตัวอย่าง":"Close preview":o?"ดูตัวอย่าง":"Preview"]}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!!E,onClick:()=>{j(M)},children:E===M?o?"กำลังดาวน์โหลด…":"Downloading…":o?"ดาวน์โหลด":"Download"})]})]}),A===M&&n.jsx("p",{role:"alert",className:"mt-2 text-red-700",children:o?"ดาวน์โหลดไม่สำเร็จ ลองรีเฟรชรายการแล้วกดดาวน์โหลดอีกครั้ง":"Download failed. Refresh the list and try again."}),Z&&n.jsx(b1,{file:O,projectId:a},M+O.modifiedAt)]},M)})})]})}function yo({message:a,hint:s}){const{ui:l}=Le();return n.jsxs("div",{role:"alert",className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[n.jsx("p",{className:"text-sm font-semibold text-red-700",children:l(a)}),s&&n.jsx("p",{className:"mt-1 text-sm text-red-600",children:l(s)})]})}function j1({result:a,activeUrl:s,onSelect:l}){const{ui:o}=Le(),[c,u]=L.useState(!1),{language:f}=Le(),p=a.pages.reduce((m,g)=>{const v=new URL(g.finalUrl).pathname||"/";return(m[v]??=[]).push(g),m},{});return n.jsxs("aside",{className:`workspace-panel workspace-tree ${c?"is-collapsed":""}`,children:[n.jsxs("div",{className:"workspace-panel-head",children:[n.jsx("button",{type:"button",className:"tree-panel-toggle",onClick:()=>u(m=>!m),"aria-label":c?f==="th"?"ขยาย Explorer":"Expand Explorer":f==="th"?"พับ Explorer":"Collapse Explorer",title:c?f==="th"?"ขยาย Explorer":"Expand Explorer":f==="th"?"พับ Explorer":"Collapse Explorer",children:c?"›":"‹"}),n.jsxs("div",{className:"tree-panel-heading",children:[n.jsx("p",{className:"eyebrow",children:o("Explorer")}),n.jsx("h2",{children:o("State Tree")})]}),n.jsx("span",{className:"status-dot status-pass",title:o("scan complete")})]}),!c&&n.jsxs("div",{className:"tree-meta",children:[n.jsxs("span",{children:[a.pages.length," ",o("pages")]}),n.jsxs("span",{children:[a.actionGraph.states.length," ",o("states")]})]}),!c&&n.jsx("div",{className:"tree-list",children:Object.entries(p).map(([m,g])=>n.jsxs("div",{className:"tree-branch",children:[n.jsxs("div",{className:"tree-path",children:[n.jsx("span",{className:"tree-chevron",children:"⌄"}),n.jsx("span",{className:"tree-folder",children:"●"}),m]}),g.map(v=>n.jsxs("button",{type:"button",onClick:()=>l(v.finalUrl),className:`tree-node ${s===v.finalUrl?"is-active":""}`,children:[n.jsx("span",{className:"tree-node-icon",children:v.state?.visibleDialogs.length?"◈":"◇"}),n.jsx("span",{className:"truncate",children:v.state?.visibleDialogs[0]??(v.title||"Untitled page")}),n.jsx("span",{className:"tree-node-count",children:v.buttons.length})]},v.state?.id??v.finalUrl))]},m))}),!c&&n.jsxs("div",{className:"tree-footer",children:[n.jsx("span",{className:"status-dot status-pass"})," ",o("Safe exploration only"),n.jsx("br",{}),n.jsx("span",{className:"status-dot status-warn"})," ",o("Destructive actions blocked")]})]})}const S1={rules:{label:"No AI / rules",tier:"local",key:"none"},ollama:{label:"Ollama",tier:"local",key:"none",baseUrl:"http://localhost:11434"},"lm-studio":{label:"LM Studio",tier:"local",key:"optional",baseUrl:"http://localhost:1234/v1"},codex:{label:"ChatGPT / Codex (sign in)",tier:"cloud",key:"none"},gemini:{label:"Google Gemini",tier:"free-tier",key:"required",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",keyEnv:"GEMINI_API_KEY",keyUrl:"https://aistudio.google.com/app/apikey"},groq:{label:"Groq",tier:"free-tier",key:"required",baseUrl:"https://api.groq.com/openai/v1",keyEnv:"GROQ_API_KEY",keyUrl:"https://console.groq.com/keys"},"openrouter-free":{label:"OpenRouter Free",tier:"free-tier",key:"required",baseUrl:"https://openrouter.ai/api/v1",keyEnv:"OPENROUTER_API_KEY",defaultModel:"openrouter/free",keyUrl:"https://openrouter.ai/keys"},openai:{label:"OpenAI",tier:"cloud",key:"required",baseUrl:"https://api.openai.com/v1",keyEnv:"OPENAI_API_KEY",keyUrl:"https://platform.openai.com/api-keys"},anthropic:{label:"Anthropic Claude",tier:"cloud",key:"required",baseUrl:"https://api.anthropic.com/v1",keyEnv:"ANTHROPIC_API_KEY",keyUrl:"https://platform.claude.com/settings/keys"},openrouter:{label:"OpenRouter (all models)",tier:"cloud",key:"required",baseUrl:"https://openrouter.ai/api/v1",keyEnv:"OPENROUTER_API_KEY",keyUrl:"https://openrouter.ai/keys"},deepseek:{label:"DeepSeek",tier:"cloud",key:"required",baseUrl:"https://api.deepseek.com",keyEnv:"DEEPSEEK_API_KEY",keyUrl:"https://platform.deepseek.com/api_keys"},mistral:{label:"Mistral AI",tier:"cloud",key:"required",baseUrl:"https://api.mistral.ai/v1",keyEnv:"MISTRAL_API_KEY",keyUrl:"https://console.mistral.ai/api-keys/"},xai:{label:"xAI Grok",tier:"cloud",key:"required",baseUrl:"https://api.x.ai/v1",keyEnv:"XAI_API_KEY",keyUrl:"https://console.x.ai/"},compatible:{label:"Custom OpenAI-compatible",tier:"custom",key:"optional"}},Mo=S1;function w1(a){return typeof a=="string"&&Object.hasOwn(Mo,a)}const Ry=["password","passwd","token","access_token","refresh_token","api_key","apikey","authorization","cookie","set-cookie","secret","client_secret","session","sessionid"];Ry.map(a=>a.replace("-","[-_]?").replace("_","[-_]?")).join("|");Ry.filter(a=>a!=="authorization").map(a=>a.replace("-","[-_]?").replace("_","[-_]?")).join("|");const Dy=["delete","remove","destroy","erase","drop","reset","purchase","buy","checkout","pay","payment","transfer","withdraw","refund","submit order","place order","confirm payment","confirm order","deactivate","disable account","delete account","close account","unsubscribe","cancel subscription","revoke access","reset database","ลบ","ชำระเงิน","จ่าย","โอน","ซื้อ","สั่งซื้อ","ยืนยันการชำระ"],N1=100,C1=80;function Ly(a){if(!Array.isArray(a))return[];const s=a.filter(l=>typeof l=="string").map(l=>l.trim().toLowerCase().slice(0,C1)).filter(Boolean);return[...new Set(s)].slice(0,N1)}function gr(a){const s=a.name||a.label||a.text||a.placeholder;return s&&a.role?`${a.role} "${s}"`:s?`"${s}"`:a.cssSelector?`element (${a.cssSelector})`:"element"}function Ua(a){if(a.description)return a.description;switch(a.type){case"navigate":return`Navigate to ${a.url}`;case"click":return`Click ${gr(a.target)}`;case"fill":return`Enter "${a.value}" in ${gr(a.target)}`;case"select":return`Select "${a.option}" from ${gr(a.target)}`;case"check":return`${a.checked?"Check":"Uncheck"} ${gr(a.target)}`;case"wait":return`Wait for ${a.mode}: ${a.value}`;case"assertVisible":return`Verify that ${gr(a.target)} is visible`;case"assertText":return a.target?`Verify that ${gr(a.target)} shows "${a.text}"`:`Verify that the page shows "${a.text}"`;case"assertUrl":return`Verify that the URL contains "${a.urlContains}"`;case"assertInvalid":return`Verify that ${gr(a.target)} is invalid and the form remains open`;case"assertValidation":return"Wait for a visible validation or error message";case"manual":return a.description}}function T1(a){return a.map((s,l)=>`${l+1}. ${Ua(s)}`).join(`
27
+ `)}function sf(a,s){return`TC-${a}-${String(s).padStart(3,"0")}`}function lf(a,s){return`TD-${a}-${String(s).padStart(3,"0")}`}function _1(a="MANUAL",s=lf("MANUAL",1),l=""){return{id:s,module:a,sourceUrl:l,field:"",inputType:"text",required:!1,validValue:"",invalidValue:""}}function E1(a="MANUAL",s=sf("MANUAL",1),l=""){return{id:s,module:a,title:"New test case",preconditions:[],steps:[],expectedResult:"",type:"positive",priority:"medium",automationStatus:"manual",status:"pending",sourceUrl:l}}const k1={positive:"bg-emerald-100 text-emerald-800",negative:"bg-rose-100 text-rose-800",validation:"bg-amber-100 text-amber-800",navigation:"bg-sky-100 text-sky-800",interaction:"bg-violet-100 text-violet-800",accessibility:"bg-teal-100 text-teal-800",manual:"bg-slate-200 text-slate-700"},A1={high:"bg-red-100 text-red-800",medium:"bg-blue-100 text-blue-800",low:"bg-slate-100 text-slate-700"},O1={ready:"bg-emerald-100 text-emerald-800","needs-data":"bg-amber-100 text-amber-800","needs-review":"bg-orange-100 text-orange-800",manual:"bg-slate-200 text-slate-700"};function R1({value:a}){const{ui:s}=Le();return n.jsx("span",{className:`badge ${k1[a]}`,children:s(a)})}function D1({value:a}){const{ui:s}=Le();return n.jsx("span",{className:`badge ${A1[a]}`,children:s(a)})}function L1({value:a}){const{ui:s}=Le();return n.jsx("span",{className:`badge ${O1[a]}`,children:s(a)})}function Ho({labelledBy:a,onClose:s,children:l}){const o=L.useRef(null);return L.useLayoutEffect(()=>{const c=o.current;return c.showModal(),()=>c.close()},[]),n.jsx("dialog",{ref:o,className:"modern-modal-backdrop native-modal-frame","aria-labelledby":a,onCancel:c=>{c.preventDefault(),s()},onMouseDown:c=>c.target===c.currentTarget&&s(),children:l})}function M1({testCase:a,onEdit:s,onOpenRunner:l,onClose:o}){const{ui:c}=Le();return n.jsx(Ho,{labelledBy:"test-case-detail-title",onClose:o,children:n.jsxs("section",{className:"modern-modal test-detail-modal",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsxs("p",{className:"eyebrow",children:[c("Test Case detail")," · ",a.id]}),n.jsx("h2",{id:"test-case-detail-title",children:Hr(a.title)||a.id})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:o,"aria-label":c("Close"),children:"×"})]}),n.jsxs("div",{className:"test-detail-body",children:[n.jsxs("div",{className:"test-detail-meta",children:[n.jsx(R1,{value:a.type}),n.jsx(D1,{value:a.priority}),n.jsx(L1,{value:a.automationStatus}),n.jsx("span",{className:"badge bg-slate-100 text-slate-600",children:a.folder??a.module})]}),!!(a.tags?.length||a.requirements?.length)&&n.jsxs("section",{className:"traceability-meta",children:[a.tags?.length?n.jsxs("div",{children:[n.jsx("h4",{className:"field-label",children:c("Tags")}),a.tags.map(u=>n.jsx("span",{className:"tag-chip",children:u},u))]}):null,a.requirements?.length?n.jsxs("div",{children:[n.jsx("h4",{className:"field-label",children:c("Requirements / Tickets")}),a.requirements.map(u=>n.jsx("span",{className:"requirement-chip",children:u},u))]}):null]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Preconditions")}),a.preconditions.length===0?n.jsx("p",{className:"text-sm text-slate-400",children:"—"}):n.jsx("ul",{className:"list-inside list-disc space-y-1 text-sm text-slate-700",children:a.preconditions.map((u,f)=>n.jsx("li",{children:u},f))})]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Steps")}),a.steps.length===0?n.jsx("p",{className:"text-sm text-slate-400",children:"—"}):n.jsx("ol",{className:"space-y-2 text-sm text-slate-700",children:a.steps.map((u,f)=>n.jsxs("li",{className:"test-detail-step",children:[n.jsx("span",{children:f+1}),n.jsxs("div",{children:[Ua(u),n.jsxs("small",{children:["[",c(u.type),"]"]})]})]},f))})]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Expected Result")}),n.jsx("p",{className:"text-sm text-slate-700",children:a.expectedResult||"—"})]}),a.notes&&n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Notes from Generator")}),n.jsx("p",{className:"text-sm text-slate-500",children:a.notes})]}),n.jsxs("section",{children:[n.jsx("h4",{className:"field-label",children:c("Source URL")}),n.jsx("p",{className:"break-all text-xs text-slate-500",children:a.sourceUrl})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:c("Close")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:c("Edit Test Case")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:l,children:c("Open this case in the runner")})]})]})})}const bo={navigate:"Open page",fill:"Fill field",click:"Click button",assertText:"Check page text",manual:"Manual note"},pd=new Map([["{{TEST_USERNAME}}","Project username"],["{{TEST_EMAIL}}","Project email"],["{{TEST_PASSWORD}}","Project password"]]);function U1(a,s){switch(a){case"navigate":return{type:a,url:s};case"fill":return{type:a,target:{label:""},value:""};case"click":return{type:a,target:{role:"button",name:""}};case"assertText":return{type:a,text:""};case"manual":return{type:a,description:""}}}function Fr(a){return a.name||a.label||a.placeholder||a.text||a.testId||a.elementId||a.cssSelector||""}function z1(a,s){if(!s)return Ua(a);switch(a.type){case"navigate":return"เปิดหน้าเว็บ "+a.url;case"click":return"กด "+Fr(a.target);case"fill":return"กรอก "+Fr(a.target)+" ด้วย "+a.value;case"assertText":return"ตรวจว่ามีข้อความ “"+a.text+"”"+(a.target?" ที่ "+Fr(a.target):"");case"assertUrl":return"ตรวจว่า URL มี "+a.urlContains;case"assertVisible":return"ตรวจว่ามองเห็น "+Fr(a.target);default:return Ua(a)}}function B1({steps:a,sourceUrl:s,cases:l,onChange:o}){const{ui:c}=Le(),[u,f]=L.useState("click"),p=L.useId();let m=s;return n.jsxs("section",{className:"space-y-2",children:[n.jsx("h3",{className:"field-label",children:c("Steps")}),a.map((g,v)=>{if(g.type==="navigate")try{m=new URL(g.url,s).href}catch{m=s}function y(b){b.type!=="manual"&&delete b.description,o(a.map((E,N)=>N===v?b:E))}const S=new Map;if(g.type==="fill"||g.type==="click")for(const b of l){let E=b.sourceUrl;for(const N of b.steps)N.type==="navigate"&&(E=N.url),E===m&&N.type===g.type&&Fr(N.target)&&S.set(Fr(N.target),N.target)}return n.jsxs("fieldset",{className:"space-y-2 rounded-lg border border-slate-200 p-3",children:[n.jsxs("legend",{className:"px-1 text-sm font-semibold",children:[v+1,". ",c(g.type in bo?bo[g.type]:g.type)]}),g.type==="navigate"&&n.jsxs("label",{className:"block text-sm",children:[c("Page URL"),n.jsx("input",{className:"field",value:g.url,onChange:b=>y({...g,url:b.target.value})})]}),(g.type==="fill"||g.type==="click")&&n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"block text-sm",children:[c(g.type==="fill"?"Field name on the page":"Button name on the page"),n.jsx("input",{className:"field",list:p+v+"-controls",value:Fr(g.target),onChange:b=>{const E=b.target.value;y({...g,target:S.get(E)??(g.type==="fill"?{label:E}:{role:"button",name:E})})}})]}),n.jsx("datalist",{id:p+v+"-controls",children:[...S.keys()].map(b=>n.jsx("option",{value:b},b))}),g.type==="fill"&&n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"block text-sm",children:[c("Fill with"),n.jsxs("select",{className:"field",value:pd.has(g.value)?g.value:"",onChange:b=>y({...g,value:b.target.value}),children:[n.jsx("option",{value:"",children:c("Text I enter")}),[...pd].map(([b,E])=>n.jsx("option",{value:b,children:c(E)},b))]})]}),!pd.has(g.value)&&n.jsxs("label",{className:"block text-sm",children:[c("Value to enter"),n.jsx("input",{className:"field",value:g.value,onChange:b=>y({...g,value:b.target.value})})]})]})]}),g.type==="assertText"&&n.jsxs("label",{className:"block text-sm",children:[c("Text that must appear"),g.target&&" · "+gr(g.target),n.jsx("input",{className:"field",value:g.text,onChange:b=>y({...g,text:b.target.value})})]}),g.type==="manual"&&n.jsxs("label",{className:"block text-sm",children:[c("Manual note"),n.jsx("input",{className:"field",value:g.description,onChange:b=>y({...g,description:b.target.value})})]}),!(g.type in bo)&&n.jsx("input",{className:"field","aria-label":c("Step description"),value:Ua(g),onChange:b=>o(a.map((E,N)=>N===v?{...E,description:b.target.value}:E))}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:v===0,"aria-label":c("Move up"),onClick:()=>{const b=[...a];[b[v-1],b[v]]=[b[v],b[v-1]],o(b)},children:"↑"}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:v===a.length-1,"aria-label":c("Move down"),onClick:()=>{const b=[...a];[b[v],b[v+1]]=[b[v+1],b[v]],o(b)},children:"↓"}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>o(a.filter((b,E)=>E!==v)),children:c("Delete")})]})]},v)}),n.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[n.jsxs("label",{className:"text-sm",children:[c("Next action"),n.jsx("select",{className:"field",value:u,onChange:g=>f(g.target.value),children:Object.entries(bo).map(([g,v])=>n.jsx("option",{value:g,children:c(v)},g))})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>o([...a,U1(u,s)]),children:c("+ Add step")})]})]})}function I1({testCase:a,cases:s,onSave:l,onCancel:o}){const{ui:c}=Le(),[u,f]=L.useState({...a}),[p,m]=L.useState(""),[g,v]=L.useState(a.preconditions.join(`
28
+ `)),[y,S]=L.useState((a.tags??[]).join(", ")),[b,E]=L.useState((a.requirements??[]).join(", "));L.useEffect(()=>{function w(j){j.key==="Escape"&&o()}return document.addEventListener("keydown",w),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=""}},[o]);function N(w){f(j=>({...j,...w}))}function A(w){if(!u.title.trim()||!u.id.trim()||u.id!==a.id&&s.some(R=>R.id===u.id)){m(c("Enter a title and a unique case ID."));return}const j=[];for(const R of u.steps){if(R.type==="navigate")try{if(!R.url.trim())throw new Error;const O=new URL(R.url,u.sourceUrl||void 0);if(!["https:","http:"].includes(O.protocol))throw new Error;j.push({...R,url:O.href});continue}catch{m(c("Enter a valid page URL."));return}if(R.type==="assertText"&&!R.text.trim()||(R.type==="click"||R.type==="fill")&&![R.target.name,R.target.label,R.target.cssSelector,R.target.testId,R.target.placeholder,R.target.text,R.target.elementId,R.target.attributeName].some(O=>O?.trim())){m(c("Complete the control name or expected text in each step."));return}j.push(R)}l({...u,steps:j,preconditions:g.split(`
29
+ `).map(R=>R.trim()).filter(Boolean),tags:Yg(y),requirements:Yg(b)},w)}return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:w=>w.target===w.currentTarget&&o(),children:n.jsxs("div",{className:"modern-modal test-case-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"case-editor-title",children:[n.jsxs("div",{className:"card-title flex shrink-0 items-center justify-between",children:[n.jsxs("span",{id:"case-editor-title",children:[c("Edit")," ",u.id]}),n.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:o,"aria-label":c("Close editor"),children:"✕"})]}),n.jsxs("div",{className:"test-case-editor-body",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-title",children:c("Title")}),n.jsx("input",{id:"edit-title",className:"field",value:u.title,onChange:w=>N({title:w.target.value})})]}),n.jsxs("details",{className:"rounded-lg border border-slate-200 p-3",children:[n.jsx("summary",{className:"cursor-pointer text-sm font-semibold",children:c("Case details and tags")}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-module",children:c("Module")}),n.jsx("input",{id:"edit-module",className:"field",value:u.module,onChange:w=>N({module:w.target.value})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-id",children:c("TC ID")}),n.jsx("input",{id:"edit-id",className:"field font-mono",value:u.id,onChange:w=>N({id:w.target.value})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-folder",children:c("Folder")}),n.jsx("input",{id:"edit-folder",className:"field",value:u.folder??u.module,onChange:w=>N({folder:w.target.value})})]})]}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-type",children:c("Type")}),n.jsxs("select",{id:"edit-type",className:"field",value:u.type,onChange:w=>N({type:w.target.value}),children:[n.jsx("option",{value:"positive",children:c("positive")}),n.jsx("option",{value:"negative",children:c("negative")}),n.jsx("option",{value:"validation",children:c("validation")})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-priority",children:c("Priority")}),n.jsxs("select",{id:"edit-priority",className:"field",value:u.priority,onChange:w=>N({priority:w.target.value}),children:[n.jsx("option",{value:"high",children:c("high")}),n.jsx("option",{value:"medium",children:c("medium")}),n.jsx("option",{value:"low",children:c("low")})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-automation",children:c("Automation Status")}),n.jsxs("select",{id:"edit-automation",className:"field",value:u.automationStatus,onChange:w=>N({automationStatus:w.target.value}),children:[n.jsx("option",{value:"ready",children:c("ready")}),n.jsx("option",{value:"needs-data",children:c("needs-data")}),n.jsx("option",{value:"needs-review",children:c("needs-review")}),n.jsx("option",{value:"manual",children:c("manual")})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-preconditions",children:c("Preconditions (one per line)")}),n.jsx("textarea",{id:"edit-preconditions",className:"field h-20",value:g,onChange:w=>v(w.target.value)})]}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-tags",children:c("Tags (comma separated)")}),n.jsx("input",{id:"edit-tags",className:"field",value:y,onChange:w=>S(w.target.value),placeholder:"smoke, regression, critical"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-requirements",children:c("Requirements / Tickets")}),n.jsx("textarea",{id:"edit-requirements",className:"field min-h-10 resize-y leading-5",value:b,onChange:w=>E(w.target.value),placeholder:"JIRA-123, https://tracker.example/456",rows:2})]})]})]}),n.jsx(B1,{steps:u.steps,sourceUrl:u.sourceUrl,cases:s,onChange:w=>N({steps:w})}),n.jsxs("div",{children:[n.jsx("label",{className:"field-label",htmlFor:"edit-expected",children:c("Expected Result")}),n.jsx("textarea",{id:"edit-expected",className:"field h-20",value:u.expectedResult,onChange:w=>N({expectedResult:w.target.value})})]})]}),n.jsxs("div",{className:"test-case-editor-footer",children:[p&&n.jsx("p",{role:"alert",className:"text-sm text-red-700",children:p}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:c("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>A(!1),children:c("Save")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>A(!0),children:c("Save and open runner")})]})]})})}function Yg(a){return a.split(/[,;\n]/).map(s=>s.trim()).filter(Boolean)}function Cs({value:a,editValue:s=a,options:l,multiline:o=!1,onSave:c}){const{ui:u,language:f}=Le(),[p,m]=L.useState(!1),[g,v]=L.useState(s);if(L.useEffect(()=>{p||v(s)},[p,s]),!p)return n.jsxs("span",{className:"inline-edit-shell",children:[n.jsx("span",{className:"inline-edit-value",title:f==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>m(!0),children:(l?u(a):a)||"—"}),n.jsx("button",{type:"button",onClick:()=>m(!0),"aria-label":f==="th"?"แก้ไขค่า":"Edit value",title:f==="th"?"แก้ไข":"Edit",children:"✎"})]});const y=()=>{m(!1),g!==s&&c(g)},S={autoFocus:!0,value:g,onChange:b=>v(b.target.value),onBlur:y,onKeyDown:b=>{b.key==="Enter"&&y(),b.key==="Escape"&&(v(s),m(!1))},onClick:b=>b.stopPropagation()};return o&&!l?n.jsx("textarea",{...S,className:"inline-edit-textarea",rows:5}):l?n.jsx("select",{...S,className:"inline-edit-input",children:l.map(b=>n.jsx("option",{value:b,children:u(b)},b))}):n.jsx("input",{...S,className:"inline-edit-input"})}function Oi({value:a,onSave:s}){const{ui:l,language:o}=Le(),[c,u]=L.useState(!1),[f,p]=L.useState(a),m=L.useRef(null),g=L.useRef(null);if(L.useEffect(()=>{c||p(a)},[c,a]),!c)return n.jsxs("span",{className:"inline-edit-shell",children:[n.jsx("span",{className:"inline-edit-value",title:o==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>u(!0),dangerouslySetInnerHTML:{__html:a||"—"}}),n.jsx("button",{type:"button",onClick:()=>u(!0),"aria-label":o==="th"?"แก้ไขค่า":"Edit value",title:o==="th"?"แก้ไข":"Edit",children:"✎"})]});const v=()=>{const E=window.getSelection();E?.rangeCount&&(m.current=E.getRangeAt(0).cloneRange())},y=()=>{const E=window.getSelection();m.current&&E&&(E.removeAllRanges(),E.addRange(m.current))},S=(E,N)=>{y(),document.execCommand(E,!1,N),g.current?.focus(),v()},b=E=>{p(E.innerHTML),u(!1),s(E.innerHTML)};return n.jsxs("div",{className:"rich-text-editor",onClick:E=>E.stopPropagation(),children:[n.jsxs("div",{className:"rich-text-toolbar",children:[n.jsx("button",{type:"button",onMouseDown:()=>v(),onClick:()=>S("bold"),children:"B"}),n.jsx("button",{type:"button",onMouseDown:()=>v(),onClick:()=>S("italic"),children:"I"}),n.jsx("input",{type:"color",defaultValue:"#1e293b",onMouseDown:()=>v(),onChange:E=>S("foreColor",E.target.value),"aria-label":l("Text color")}),n.jsxs("select",{defaultValue:"3",onMouseDown:()=>v(),onChange:E=>S("fontSize",E.target.value),"aria-label":l("Text size"),children:[n.jsx("option",{value:"2",children:l("Small")}),n.jsx("option",{value:"3",children:l("Normal")}),n.jsx("option",{value:"5",children:l("Large")}),n.jsx("option",{value:"7",children:l("Huge")})]})]}),n.jsx("div",{className:"rich-text-content",ref:g,contentEditable:!0,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:{__html:f},onBlur:E=>{E.relatedTarget&&g.current?.parentElement?.contains(E.relatedTarget)||b(E.currentTarget)},onMouseUp:v,onKeyUp:v,onKeyDown:E=>{E.key==="Escape"&&(p(a),u(!1))}})]})}function P1({testCases:a,selectedIds:s,activeId:l,onToggleSelect:o,onToggleAll:c,onOpen:u,onEdit:f,onDelete:p,onReorder:m,onUpdateCell:g,executionStatuses:v={}}){const{ui:y,language:S}=Le(),b=S==="th",[E,N]=L.useState(),[A,w]=L.useState(),[j,R]=L.useState(),[O,M]=L.useState("basic"),[F,X]=L.useState({}),Z=L.useRef(null),$=a.length>0&&a.every(B=>s.includes(B.id));return L.useEffect(()=>{function B(z){Z.current&&!Z.current.contains(z.target)&&R(void 0)}function J(z){z.key==="Escape"&&R(void 0)}return document.addEventListener("pointerdown",B),document.addEventListener("keydown",J),()=>{document.removeEventListener("pointerdown",B),document.removeEventListener("keydown",J)}},[]),a.length===0?n.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:b?"ไม่พบ Test Case ที่ตรงกับตัวกรอง":"No Test Cases match the current filters."}):n.jsxs("div",{className:`test-case-table-wrap table-view-${O}`,children:[n.jsxs("div",{className:"test-case-view-bar",children:[n.jsxs("div",{children:[n.jsx("b",{children:b?"คอลัมน์ตาราง":"Table columns"}),n.jsx("span",{children:b?"เริ่มจากข้อมูลพื้นฐาน แล้วแสดงรายละเอียดเมื่อจำเป็น":"Start simple, then show more detail only when you need it."})]}),n.jsxs("div",{role:"group","aria-label":y("Test Case table columns"),children:[n.jsx("button",{type:"button","aria-pressed":O==="basic",className:O==="basic"?"is-active":"",onClick:()=>M("basic"),children:b?"พื้นฐาน":"Basic"}),n.jsx("button",{type:"button","aria-pressed":O==="tester",className:O==="tester"?"is-active":"",onClick:()=>M("tester"),children:y("Tester")}),n.jsx("button",{type:"button","aria-pressed":O==="all",className:O==="all"?"is-active":"",onClick:()=>M("all"),children:b?"ทุกคอลัมน์":"All columns"})]})]}),n.jsx("div",{className:"test-case-table-scroll border border-slate-200",children:n.jsxs("table",{className:"test-case-table border-collapse",children:[n.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"table-head w-10",children:b?"ย้าย":"Move"}),n.jsx("th",{className:"table-head case-select w-10",children:n.jsx("input",{type:"checkbox",checked:$,onChange:()=>c($?[]:a.map(B=>B.id)),"aria-label":y("Select all")})}),n.jsxs("th",{className:"table-head case-identity w-32",children:[n.jsx("span",{className:"case-id-label",children:y("TC ID")}),n.jsx("span",{className:"compact-case-title",children:b?"เคสทดสอบ":"Test case"})]}),n.jsx("th",{className:"table-head w-28",children:y("Folder")}),n.jsx("th",{className:"table-head",children:b?"ชื่อ":"Title"}),n.jsx("th",{className:"table-head w-24 col-tester",children:y("Type")}),n.jsx("th",{className:"table-head w-24",children:y("Priority")}),n.jsx("th",{className:"table-head w-56 col-tester",children:b?"ขั้นตอน":"Steps"}),n.jsx("th",{className:"table-head col-tester",children:y("Expected Result")}),n.jsx("th",{className:"table-head w-32",children:y("Automation")}),n.jsx("th",{className:"table-head w-48 col-all",children:y("Preconditions")}),n.jsx("th",{className:"table-head w-48 col-all",children:y("Notes")}),n.jsx("th",{className:"table-head w-40 col-tester",children:y("Tags")}),n.jsx("th",{className:"table-head w-32",children:y("Status")}),n.jsx("th",{className:"table-head case-row-actions w-28 text-center",children:b?"จัดการ":"Actions"})]})}),n.jsx("tbody",{children:a.map(B=>n.jsxs("tr",{onDragOver:J=>{J.preventDefault(),w(B.id)},onDrop:J=>{J.preventDefault(),E&&m(E,B.id),N(void 0),w(void 0)},onDragEnd:()=>{N(void 0),w(void 0)},className:`border-b border-slate-100 hover:bg-blue-50 ${A===B.id?"bg-indigo-50 ring-2 ring-inset ring-indigo-300":""} ${l===B.id?"bg-blue-50":""}`,children:[n.jsx("td",{className:"table-cell drag-handle",draggable:!0,onDragStart:()=>N(B.id),onClick:J=>J.stopPropagation(),title:y("Drag to reorder"),children:"⠿"}),n.jsx("td",{className:"table-cell case-select",onClick:J=>J.stopPropagation(),children:n.jsx("input",{type:"checkbox",checked:s.includes(B.id),onChange:()=>o(B.id),"aria-label":`${b?"เลือก":"Select"} ${B.id}`})}),n.jsx("td",{className:"table-cell case-identity",children:n.jsxs("button",{type:"button",className:"case-open",onClick:()=>u(B),"aria-label":`${y("View Test Case")} ${B.id} · ${Hr(B.title)}`,children:[n.jsx("span",{className:"compact-case-title",children:Hr(B.title)}),n.jsx("span",{className:"case-code",children:B.id})]})}),n.jsx("td",{className:"table-cell",children:n.jsx(Cs,{value:B.folder??B.module,onSave:J=>g(B.id,"folder",J)})}),n.jsxs("td",{className:"table-cell font-medium text-slate-900",children:[n.jsx(Oi,{value:B.title,onSave:J=>g(B.id,"title",J)}),(B.tags?.length||B.requirements?.length)&&n.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[B.tags?.slice(0,3).map(J=>n.jsx("span",{className:"tag-chip",children:J},J)),B.requirements?.slice(0,2).map(J=>n.jsx("span",{className:"requirement-chip",children:J},J))]})]}),n.jsx("td",{className:"table-cell col-tester",children:n.jsx(Cs,{value:B.type,options:["positive","negative","validation"],onSave:J=>g(B.id,"type",J)})}),n.jsx("td",{className:"table-cell",children:n.jsx(Cs,{value:B.priority,options:["high","medium","low"],onSave:J=>g(B.id,"priority",J)})}),n.jsxs("td",{className:"table-cell min-w-56 col-tester",children:[n.jsx(Oi,{value:B.steps.map((J,z)=>`${z+1}. ${Ua(J)}`).join(`
30
30
  `),onSave:J=>g(B.id,"steps",J)}),n.jsx("button",{type:"button",className:"mt-2 rounded border border-indigo-200 bg-indigo-50 px-2 py-1 text-[10px] font-semibold text-indigo-700 hover:bg-indigo-100",onClick:J=>{J.stopPropagation(),u(B)},children:b?"ดูขั้นตอน":"View Steps"})]}),n.jsx("td",{className:"table-cell max-w-md text-slate-600 col-tester",children:n.jsx(Oi,{value:B.expectedResult,onSave:J=>g(B.id,"expectedResult",J)})}),n.jsx("td",{className:"table-cell",children:n.jsx(Cs,{value:B.automationStatus,options:["ready","needs-data","needs-review","manual"],onSave:J=>g(B.id,"automationStatus",J)})}),n.jsx("td",{className:"table-cell min-w-48 col-all",children:n.jsx(Oi,{value:B.preconditions.join(`
31
- `),onSave:J=>g(B.id,"preconditions",J)})}),n.jsx("td",{className:"table-cell min-w-48 col-all",children:n.jsx(Oi,{value:B.notes??"",onSave:J=>g(B.id,"notes",J)})}),n.jsx("td",{className:"table-cell min-w-40 col-tester",children:n.jsx(Cs,{value:(B.tags??[]).join(", "),onSave:J=>g(B.id,"tags",J)})}),n.jsx("td",{className:"table-cell",children:n.jsx(Cs,{value:F[B.id]??v[B.id]??B.status??"pending",options:["pending","passed","failed"],onSave:J=>{const z=J;X(H=>({...H,[B.id]:z})),g(B.id,"status",z)}})}),n.jsx("td",{className:"table-cell case-row-actions text-center",onClick:J=>J.stopPropagation(),children:n.jsxs("div",{className:"action-menu-wrap",ref:S===B.id?Z:void 0,children:[n.jsx("button",{type:"button",className:"action-menu-trigger","aria-label":`${b?"จัดการเคส":"Actions for"} ${B.id}`,"aria-expanded":S===B.id,onClick:()=>O(J=>J===B.id?void 0:B.id),children:"⋯"}),S===B.id&&n.jsxs("div",{className:"action-menu",children:[n.jsx("button",{type:"button",onClick:()=>{u(B),O(void 0)},children:y("View Test Case")}),n.jsx("button",{type:"button",onClick:()=>{f(B),O(void 0)},children:y("Edit")}),n.jsx("button",{type:"button",className:"danger",onClick:()=>{p(B.id),O(void 0)},children:y("Delete")})]})]})})]},B.id))})]})})]})}function P1({filters:a,modules:s,totalCount:l,visibleCount:o,selectedCount:c,onReviewSelection:u,exporting:f,onFiltersChange:p,onAdd:m,onImportScreenshot:g,onImport:v,onRecord:y,onDeleteSelected:j,onExport:b,onExportExcel:E}){const{ui:N,language:A,t:w}=Le(),S=A==="th",O=L.useRef(null);L.useEffect(()=>{const F=window.matchMedia("(min-width: 800px)"),X=()=>{O.current&&(O.current.open=F.matches)};return X(),F.addEventListener("change",X),()=>F.removeEventListener("change",X)},[]);const D=F=>p({...a,...F}),M=[a.module,a.type,a.priority].filter(F=>F!=="all").length;return n.jsxs("div",{className:"case-toolbar",children:[n.jsxs("div",{className:"case-search",children:[n.jsx("label",{className:"field-label",htmlFor:"search",children:w("search")}),n.jsx("input",{id:"search",className:"field",value:a.search,onChange:F=>D({search:F.target.value}),placeholder:S?"ค้นหาด้วยชื่อหรือรหัสเคส":"Search by case title or ID"})]}),n.jsxs("button",{type:"button","data-help":"add-case",className:"btn btn-primary",onClick:m,children:["+ ",w("addCase")]}),n.jsxs("details",{className:"case-tools",ref:O,children:[n.jsxs("summary",{children:[S?"ตัวกรองและเครื่องมือ":"Filters and tools",M>0&&` (${M})`]}),n.jsxs("div",{className:"case-tools-body",children:[n.jsxs("div",{className:"w-48",children:[n.jsx("label",{className:"field-label",htmlFor:"filter-module",children:N("Folder / Module")}),n.jsx("input",{id:"filter-module",className:"field",list:"module-options",value:a.module==="all"?"":a.module,onChange:F=>D({module:F.target.value||"all"}),placeholder:N("Search or select folder")}),n.jsx("datalist",{id:"module-options",children:s.map(F=>n.jsx("option",{value:F},F))})]}),n.jsxs("div",{className:"w-36",children:[n.jsx("label",{className:"field-label",htmlFor:"filter-type",children:N("Type")}),n.jsxs("select",{id:"filter-type",className:"field",value:a.type,onChange:F=>D({type:F.target.value}),children:[n.jsx("option",{value:"all",children:N("All")}),n.jsx("option",{value:"positive",children:N("positive")}),n.jsx("option",{value:"negative",children:N("negative")}),n.jsx("option",{value:"validation",children:N("validation")})]})]}),n.jsxs("div",{className:"w-36",children:[n.jsx("label",{className:"field-label",htmlFor:"filter-priority",children:N("Priority")}),n.jsxs("select",{id:"filter-priority",className:"field",value:a.priority,onChange:F=>D({priority:F.target.value}),children:[n.jsx("option",{value:"all",children:N("All")}),n.jsx("option",{value:"high",children:N("high")}),n.jsx("option",{value:"medium",children:N("medium")}),n.jsx("option",{value:"low",children:N("low")})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:v,children:["⇧ ",S?"นำเข้า":"Import"]}),n.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:g,children:["▣ ",w("screenshot")]}),n.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:y,children:["● ",S?"บันทึกขั้นตอน":"Record Flow"]}),n.jsxs("button",{type:"button",className:"btn btn-danger",onClick:j,disabled:c===0,children:[w("delete")," (",c,")"]})]})]})]}),n.jsxs("div",{className:"case-toolbar-footer",children:[n.jsxs("p",{className:"text-xs text-slate-500",children:[S?"แสดง":"Showing"," ",o," ",S?"จาก":"of"," ",l," ",N("Test Cases"),c>0&&` · ${c} ${S?"รายการที่เลือก":"selected"}`]}),n.jsxs("div",{className:"case-exports",children:[c>0&&n.jsxs("button",{type:"button",className:"btn btn-primary",onClick:u,children:[N("Review selected cases")," (",c,")"]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:b,disabled:f,children:f?S?"กำลังส่งออก…":"Exporting…":w("export")}),E&&n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:E,disabled:f,children:S?"Excel ทั้งโปรเจกต์":"Project Excel"})]})]})]})}function $1({testCases:a}){const{ui:s}=Le(),l=L.useMemo(()=>{const u=new Map;for(const f of a)for(const p of f.requirements??[])u.set(p,[...u.get(p)??[],f]);return[...u.entries()].sort(([f],[p])=>f.localeCompare(p))},[a]),o=a.filter(u=>(u.requirements?.length??0)>0).length,c=a.length-o;return a.length?n.jsxs("section",{className:"traceability-summary",children:[n.jsxs("div",{className:"traceability-summary-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Requirements traceability")}),n.jsx("h3",{children:s("Coverage at a glance")})]}),n.jsxs("span",{children:[l.length," ",s("requirements")]})]}),n.jsxs("div",{className:"traceability-kpis",children:[n.jsxs("div",{children:[n.jsx("b",{children:o}),n.jsx("span",{children:s("Linked cases")})]}),n.jsxs("div",{children:[n.jsx("b",{children:c}),n.jsx("span",{children:s("Without requirement")})]}),n.jsxs("div",{children:[n.jsxs("b",{children:[l.length?Math.round(o/a.length*100):0,"%"]}),n.jsx("span",{children:s("Case coverage")})]})]}),l.length?n.jsxs("div",{className:"traceability-list",children:[l.slice(0,8).map(([u,f])=>n.jsxs("div",{children:[n.jsx("span",{title:u,children:u}),n.jsxs("b",{children:[f.length," ",s("case"),f.length===1?"":"s"]})]},u)),l.length>8&&n.jsxs("small",{children:["+ ",l.length-8," ",s("more requirements")]})]}):n.jsx("p",{className:"traceability-empty",children:s("Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here.")})]}):null}function q1({rows:a,onUpdate:s,onDelete:l}){const{ui:o}=Le();return a.length===0?n.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:o("No Test Data matches the current filters.")}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full border-collapse",children:[n.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"table-head w-32",children:o("TD ID")}),n.jsx("th",{className:"table-head w-28",children:o("Module")}),n.jsx("th",{className:"table-head w-44",children:o("Field")}),n.jsx("th",{className:"table-head w-28",children:o("Input Type")}),n.jsx("th",{className:"table-head w-20",children:o("Required")}),n.jsx("th",{className:"table-head",children:o("Valid Value")}),n.jsx("th",{className:"table-head",children:o("Invalid Value")}),n.jsx("th",{className:"table-head",children:o("Note")}),n.jsx("th",{className:"table-head w-20",children:o("Actions")})]})}),n.jsx("tbody",{children:a.map(c=>n.jsxs("tr",{className:"border-b border-slate-100 hover:bg-slate-50",children:[n.jsx("td",{className:"table-cell font-mono text-xs",children:c.id}),n.jsx("td",{className:"table-cell",children:c.module}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.field,onChange:u=>s(c.id,{...c,field:u.target.value}),"aria-label":`Field for ${c.id}`})}),n.jsx("td",{className:"table-cell font-mono text-xs text-slate-500",children:c.inputType}),n.jsx("td",{className:"table-cell text-center",children:n.jsx("input",{type:"checkbox",checked:c.required,onChange:u=>s(c.id,{...c,required:u.target.checked}),"aria-label":`Required for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.validValue,onChange:u=>s(c.id,{...c,validValue:u.target.value}),"aria-label":`Valid value for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.invalidValue,onChange:u=>s(c.id,{...c,invalidValue:u.target.value}),"aria-label":`Invalid value for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.note??"",onChange:u=>s(c.id,{...c,note:u.target.value}),"aria-label":`Note for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>l(c.id),children:o("Delete")})})]},c.id))})]})})}function H1({search:a,module:s,modules:l,totalCount:o,visibleCount:c,exporting:u,onSearchChange:f,onModuleChange:p,onAdd:m,onExport:g}){const{ui:v}=Le();return n.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[n.jsxs("div",{className:"min-w-56 flex-1",children:[n.jsx("label",{className:"field-label",htmlFor:"data-search",children:v("Search")}),n.jsx("input",{id:"data-search",className:"field",value:a,onChange:y=>f(y.target.value),placeholder:v("Search field, value or note")})]}),n.jsxs("div",{className:"w-40",children:[n.jsx("label",{className:"field-label",htmlFor:"data-module",children:v("Module")}),n.jsxs("select",{id:"data-module",className:"field",value:s,onChange:y=>p(y.target.value),children:[n.jsx("option",{value:"all",children:v("All")}),l.map(y=>n.jsx("option",{value:y,children:y},y))]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:v("+ Add Row")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:g,disabled:u,children:v(u?"Exporting…":"Export CSV")})]}),n.jsxs("p",{className:"w-full text-xs text-slate-500",children:[v("Showing")," ",c," ",v("of")," ",o," ",v("rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together.")]})]})}const G1=/\bdata-v-[0-9a-f]{6,}\b/i,F1=/\d{4,}/,Xg="data-testid";function V1(a){const s=[],l=(o,c)=>{!c||G1.test(c)||s.some(([,u])=>u===c)||s.push([o,c])};return l(...Y1(a)),l("id",a.elementId&&!F1.test(a.elementId)?Bi(K1(a.elementId)):void 0),l("semantic locator",X1(a)),l("name",a.attributeName?Bi(Ly("name",a.attributeName,a.tagName)):void 0),l("recorded CSS",a.cssSelector?Bi(Zg(a.cssSelector)):void 0),s.length===0&&l("recorded CSS",Bi(Zg(a.cssSelector??""))),s}function Y1(a){if(!a.testId)return["test id",void 0];const s=a.testIdAttribute??Xg;return s===Xg?["test id",`page.getByTestId(${Da(a.testId)})`]:[s,Bi(Ly(s,a.testId))]}function X1(a){const s=a.role&&a.name?`page.getByRole(${Da(a.role)}, { name: ${Da(a.name)}, exact: true })`:a.label?`page.getByLabel(${Da(a.label)}, { exact: true })`:a.placeholder?`page.getByPlaceholder(${Da(a.placeholder)})`:a.text?`page.getByText(${Da(a.text)})`:void 0;if(!s)return;const l=a.contextTestId?`page.getByTestId(${Da(a.contextTestId)})`:a.contextSelector?`page.locator(${Da(a.contextSelector)})`:void 0,o=l?a.contextText?`${l}.filter({ hasText: ${Da(a.contextText)} }).${s.slice(5)}`:`${l}.${s.slice(5)}`:s;return a.nth===void 0?o:`${o}.nth(${a.nth})`}function Z1(a){return a.name??a.label??a.placeholder??a.text??a.testId??a.elementId??a.attributeName??a.cssSelector??"target"}function Ly(a,s,l){const o=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return`${l?l.toLowerCase():""}[${a}="${o}"]`}function K1(a){return`#${a.replace(/[^\w-]/g,s=>`\\${s}`)}`}function Bi(a){return`page.locator(${Q1(a)})`}function Zg(a){return a.replace(/\\(["'])/g,"$1")}function Q1(a){return`'${a.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}const Da=a=>JSON.stringify(a);function Kg(a){const s=["import { test, expect } from '@playwright/test'","",...eN(),"",`test(${la(a.title)}, async ({ page }) => {`];for(const l of a.steps)s.push(` ${tN(l)}`);return s.push("})",""),s.join(`
32
- `)}const J1=5e3,W1=100;function eN(){return[`async function resolveTarget(page, candidates, description, timeout = ${J1}) {`," const startedAt = Date.now()"," let attempts = []"," do {"," attempts = []"," for (const [kind, candidate] of candidates) {"," try {"," const count = await candidate.count()"," if (count !== 1) {"," attempts.push('- ' + kind + ': ' + count + ' matches')"," continue"," }"," if (!(await candidate.isVisible())) {"," attempts.push('- ' + kind + ': matched but not visible')"," continue"," }"," console.log('[Locator] ' + description + ' -> ' + kind + ' (' + (Date.now() - startedAt) + 'ms)')"," return candidate"," } catch (error) {"," attempts.push('- ' + kind + ': ' + (error instanceof Error ? error.message : String(error)))"," }"," }",` await page.waitForTimeout(${W1})`," } while (Date.now() - startedAt < timeout)",""," const diagnostics = await page"," .evaluate(() => ({ readyState: document.readyState, title: document.title }))"," .catch(() => ({ readyState: 'unknown', title: 'unknown' }))"," throw new Error(",` 'Could not resolve "' + description + '" after ' + (Date.now() - startedAt) + 'ms.\\n' +`," 'URL: ' + page.url() + '\\n' +"," 'Page title: ' + diagnostics.title + '\\n' +"," 'document.readyState: ' + diagnostics.readyState + '\\n' +"," 'Candidates:\\n' + attempts.join('\\n')"," )","}"]}function pr(a){const s=V1(a);return`resolveTarget(page, [${(a.strategy==="css"?[...s].sort(([c],[u])=>c==="recorded CSS"?-1:u==="recorded CSS"?1:0):s).map(([c,u])=>`[${la(c)}, ${u}]`).join(", ")}], ${la(Z1(a))})`}function tN(a){switch(a.type){case"navigate":return`await page.goto(${la(nN(a.url))})`;case"click":return`await (await ${pr(a.target)}).click()`;case"fill":return`await (await ${pr(a.target)}).fill(${la(a.value)})`;case"select":return`await (await ${pr(a.target)}).selectOption(${la(a.option)})`;case"check":return`await (await ${pr(a.target)}).${a.checked?"check":"uncheck"}()`;case"wait":return a.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(a.value)||0))})`:a.mode==="url"?`await page.waitForURL(new RegExp(${la(a.value)}))`:a.mode==="text"?`await expect(page).toContainText(${la(a.value)})`:`await expect(await ${pr(a.target)}).toBeVisible()`;case"assertVisible":return`await expect(await ${pr(a.target)}).toBeVisible()`;case"assertText":return a.target?`await expect(await ${pr(a.target)}).toContainText(${la(a.text)})`:`await expect(page.locator('body')).toContainText(${la(a.text)})`;case"assertUrl":return`await expect(page).toHaveURL(new RegExp(${la(a.urlContains)}))`;case"assertInvalid":return`expect(await (await ${pr(a.target)}).evaluate((element) => element.matches(':invalid'))).toBe(true)`;case"assertValidation":return`await expect(page.locator('[role="alert"], [aria-invalid="true"], .error, .errors, .invalid-feedback, #error').filter({ visible: true }).first()).toBeVisible()`;case"manual":return`// TODO: ${a.description}`}}const la=a=>JSON.stringify(a);function nN(a){const s=/^\s*\[([^\]]+)\]\(\s*([^)\s]+)\s*\)\s*$/.exec(a);return s?s[2]:a.trim()}function Qg(a){const s=[`describe(${hn(a.module)}, () => {`,` it(${hn(a.title)}, () => {`];for(const l of a.steps)s.push(` ${aN(l)}`);return s.push(" })","})",""),s.join(`
33
- `)}function mr(a){if(a.cssSelector){const l=`cy.get(${hn(a.cssSelector)})`,o=a.role&&a.name||a.label||a.placeholder||a.text;return a.nth!==void 0&&(a.strategy==="css"||!o)?`${l}.eq(${a.nth})`:l}const s=a.role&&a.name?`cy.contains(${hn(a.role)}, ${hn(a.name)})`:a.label?`cy.get('label').contains(${hn(a.label)}).invoke('attr', 'for').then((id) => cy.get('#' + id))`:a.placeholder?`cy.get(${hn(`[placeholder="${a.placeholder}"]`)})`:a.text?`cy.contains(${hn(a.text)})`:"cy.get('')";return a.nth===void 0?s:`${s}.eq(${a.nth})`}function aN(a){switch(a.type){case"navigate":return`cy.visit(${hn(a.url)})`;case"click":return`${mr(a.target)}.click()`;case"fill":return`${mr(a.target)}.clear().type(${hn(a.value)})`;case"select":return`${mr(a.target)}.select(${hn(a.option)})`;case"check":return`${mr(a.target)}.${a.checked?"check":"uncheck"}()`;case"wait":return a.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(a.value)||0))})`:a.mode==="url"?`cy.url().should('include', ${hn(a.value)})`:a.mode==="text"?`cy.contains(${hn(a.value)}).should('be.visible')`:`${mr(a.target)}.should('be.visible')`;case"assertVisible":return`${mr(a.target)}.should('be.visible')`;case"assertText":return a.target?`${mr(a.target)}.should('contain.text', ${hn(a.text)})`:`cy.contains(${hn(a.text)}).should('be.visible')`;case"assertUrl":return`cy.url().should('include', ${hn(a.urlContains)})`;case"assertInvalid":return`${mr(a.target)}.should('be.invalid')`;case"assertValidation":return`cy.get('[role="alert"], [aria-invalid="true"], .error, .errors, .invalid-feedback, #error').filter(':visible').first().should('be.visible')`;case"manual":return`// TODO: ${a.description}`}}const hn=a=>JSON.stringify(a);function rN(a){const s=a.steps.map(c=>sN(a,c)),l=a.steps.find(c=>c.type==="assert"),o=l?.type==="assert"&&l.assertion.type==="text"?`The page shows "${l.assertion.value}".`:l?.type==="assert"&&l.assertion.type==="url"?`The URL contains "${l.assertion.value}".`:l?.type==="assert"?"The expected element is visible.":"Needs Review";return{id:`TC-FLOW-${a.id.slice(-8).toUpperCase()}`,module:"FLOW",title:a.name,preconditions:a.description?[a.description]:[],steps:s,expectedResult:o,type:"positive",priority:"medium",automationStatus:s.length?"ready":"needs-review",status:"pending",sourceUrl:a.baseUrl,notes:l?void 0:"Guided Flow has no assertion — expected result needs review."}}function sN(a,s){switch(s.type){case"navigate":return{type:"navigate",url:new URL(s.path,a.baseUrl).toString()};case"click":return{type:"click",target:s.target};case"fill":return{type:"fill",target:s.target,value:s.valueRef?`{{${s.valueRef}}}`:s.value??""};case"select":return{type:"select",target:s.target,option:s.option};case"check":return{type:"check",target:s.target,checked:s.checked};case"wait":return{type:"wait",mode:s.mode,value:s.value,target:s.target};case"assert":return s.assertion.type==="visible"?{type:"assertVisible",target:s.assertion.target}:s.assertion.type==="text"?{type:"assertText",text:s.assertion.value}:{type:"assertUrl",urlContains:s.assertion.value}}}function iN(a){const s=["import { test, expect } from '@playwright/test'","",`test(${JSON.stringify(a.name)}, async ({ page }) => {`];for(const l of a.steps)s.push(` ${lN(a,l)}`);return s.push("})",""),s.join(`
34
- `)}function lN(a,s){switch(s.type){case"navigate":return`await page.goto(${JSON.stringify(new URL(s.path,a.baseUrl).toString())})`;case"click":return`await ${Ts(s.target)}.click()`;case"fill":return`await ${Ts(s.target)}.fill(${JSON.stringify(s.valueRef?`{{${s.valueRef}}}`:s.value??"")})`;case"select":return`await ${Ts(s.target)}.selectOption(${JSON.stringify(s.option)})`;case"check":return`await ${Ts(s.target)}.${s.checked?"check":"uncheck"}()`;case"wait":return s.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(s.value)||0))})`:s.mode==="url"?`await page.waitForURL(new RegExp(${JSON.stringify(s.value)}))`:s.mode==="text"?`await expect(page).toContainText(${JSON.stringify(s.value)})`:`await expect(${Ts(s.target)}).toBeVisible()`;case"assert":return s.assertion.type==="visible"?`await expect(${Ts(s.assertion.target)}).toBeVisible()`:s.assertion.type==="text"?`await expect(page.getByText(${JSON.stringify(s.assertion.value)})).toBeVisible()`:`await expect(page).toHaveURL(new RegExp(${JSON.stringify(s.assertion.value)}))`}}function Ts(a){if(oN(a))return`page.locator(${pd(Jg(a.cssSelector??a.value??""))})`;if(a.strategy==="role"||a.role&&a.name)return`page.getByRole(${JSON.stringify(a.role??"generic")}, { name: ${JSON.stringify(a.name??a.value??"")}, exact: true })`;if(a.strategy==="label"||a.label)return`page.getByLabel(${JSON.stringify(a.label??a.value??"")}, { exact: true })`;if(a.strategy==="placeholder"||a.placeholder)return`page.getByPlaceholder(${JSON.stringify(a.placeholder??a.value??"")})`;if(a.strategy==="testid"||a.testId){const s=a.testId??a.value??"";return a.testIdAttribute&&a.testIdAttribute!=="data-testid"?`page.locator(${pd(cN(a.testIdAttribute,s))})`:`page.getByTestId(${JSON.stringify(s)})`}return a.strategy==="text"||a.text?`page.getByText(${JSON.stringify(a.text??a.value??"")})`:`page.locator(${pd(Jg(a.cssSelector??a.value??""))})`}function oN(a){return!!(a.cssSelector&&(a.strategy==="css"||a.matchCount!==void 0&&a.matchCount>1&&!a.contextSelector&&!a.contextText))}function cN(a,s){return`[${a}="${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"]`}function Jg(a){return a.replace(/\\(["'])/g,"$1")}function pd(a){return`'${a.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function uN(a){const s=[`describe(${JSON.stringify(a.name)}, () => {`,` it(${JSON.stringify(a.name)}, () => {`];for(const l of a.steps)s.push(` ${dN(a,l)}`);return s.push(" })","})",""),s.join(`
35
- `)}function dN(a,s){switch(s.type){case"navigate":return`cy.visit(${JSON.stringify(new URL(s.path,a.baseUrl).toString())})`;case"click":return`${_s(s.target)}.click()`;case"fill":return`${_s(s.target)}.clear().type(${JSON.stringify(s.valueRef?`{{${s.valueRef}}}`:s.value??"")})`;case"select":return`${_s(s.target)}.select(${JSON.stringify(s.option)})`;case"check":return`${_s(s.target)}.${s.checked?"check":"uncheck"}()`;case"wait":return s.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(s.value)||0))})`:s.mode==="url"?`cy.url().should('include', ${JSON.stringify(s.value)})`:s.mode==="text"?`cy.contains(${JSON.stringify(s.value)}).should('be.visible')`:`${_s(s.target)}.should('be.visible')`;case"assert":return s.assertion.type==="visible"?`${_s(s.assertion.target)}.should('be.visible')`:s.assertion.type==="text"?`cy.contains(${JSON.stringify(s.assertion.value)}).should('be.visible')`:`cy.url().should('include', ${JSON.stringify(s.assertion.value)})`}}function _s(a){return a.strategy==="role"||a.role&&a.name?`cy.contains(${JSON.stringify(a.name??a.value??"")})`:a.strategy==="label"||a.label?`cy.get('label').contains(${JSON.stringify(a.label??a.value??"")})`:a.strategy==="placeholder"||a.placeholder?`cy.get(${JSON.stringify(`[placeholder="${a.placeholder??a.value??""}"]`)})`:a.strategy==="testid"||a.testId?`cy.get(${JSON.stringify(`[data-testid="${a.testId??a.value??""}"]`)})`:a.strategy==="text"||a.text?`cy.contains(${JSON.stringify(a.text??a.value??"")})`:`cy.get(${JSON.stringify(a.cssSelector??a.value??"")})`}function Wg(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=Array(s);l<s;l++)o[l]=a[l];return o}function fN(a){if(Array.isArray(a))return a}function hN(a,s,l){return(s=xN(s))in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function pN(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function mN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
36
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ev(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function tv(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?ev(Object(l),!0).forEach(function(o){hN(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):ev(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function gN(a,s){if(a==null)return{};var l,o,c=vN(a,s);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(a);for(o=0;o<u.length;o++)l=u[o],s.indexOf(l)===-1&&{}.propertyIsEnumerable.call(a,l)&&(c[l]=a[l])}return c}function vN(a,s){if(a==null)return{};var l={};for(var o in a)if({}.hasOwnProperty.call(a,o)){if(s.indexOf(o)!==-1)continue;l[o]=a[o]}return l}function yN(a,s){return fN(a)||pN(a,s)||jN(a,s)||mN()}function bN(a,s){if(typeof a!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function xN(a){var s=bN(a,"string");return typeof s=="symbol"?s:s+""}function jN(a,s){if(a){if(typeof a=="string")return Wg(a,s);var l={}.toString.call(a).slice(8,-1);return l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Wg(a,s):void 0}}function SN(a,s,l){return s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function nv(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function av(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?nv(Object(l),!0).forEach(function(o){SN(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):nv(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function wN(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return function(o){return s.reduceRight(function(c,u){return u(c)},o)}}function Ii(a){return function s(){for(var l=this,o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];return c.length>=a.length?a.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return s.apply(l,[].concat(c,p))}}}function qo(a){return{}.toString.call(a).includes("Object")}function NN(a){return!Object.keys(a).length}function nl(a){return typeof a=="function"}function CN(a,s){return Object.prototype.hasOwnProperty.call(a,s)}function TN(a,s){return qo(s)||yr("changeType"),Object.keys(s).some(function(l){return!CN(a,l)})&&yr("changeField"),s}function _N(a){nl(a)||yr("selectorType")}function EN(a){nl(a)||qo(a)||yr("handlerType"),qo(a)&&Object.values(a).some(function(s){return!nl(s)})&&yr("handlersType")}function kN(a){a||yr("initialIsRequired"),qo(a)||yr("initialType"),NN(a)&&yr("initialContent")}function AN(a,s){throw new Error(a[s]||a.default)}var ON={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},yr=Ii(AN)(ON),bo={changes:TN,selector:_N,handler:EN,initial:kN};function RN(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};bo.initial(a),bo.handler(s);var l={current:a},o=Ii(MN)(l,s),c=Ii(LN)(l),u=Ii(bo.changes)(a),f=Ii(DN)(l);function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return bo.selector(g),g(l.current)}function m(g){wN(o,c,u,f)(g)}return[p,m]}function DN(a,s){return nl(s)?s(a.current):s}function LN(a,s){return a.current=av(av({},a.current),s),s}function MN(a,s,l){return nl(s)?s(a.current):Object.keys(l).forEach(function(o){var c;return(c=s[o])===null||c===void 0?void 0:c.call(s,a.current[o])}),l}var UN={create:RN},zN={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function BN(a){return function s(){for(var l=this,o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];return c.length>=a.length?a.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return s.apply(l,[].concat(c,p))}}}function IN(a){return{}.toString.call(a).includes("Object")}function PN(a){return a||rv("configIsRequired"),IN(a)||rv("configType"),a.urls?($N(),{paths:{vs:a.urls.monacoBase}}):a}function $N(){console.warn(My.deprecation)}function qN(a,s){throw new Error(a[s]||a.default)}var My={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
31
+ `),onSave:J=>g(B.id,"preconditions",J)})}),n.jsx("td",{className:"table-cell min-w-48 col-all",children:n.jsx(Oi,{value:B.notes??"",onSave:J=>g(B.id,"notes",J)})}),n.jsx("td",{className:"table-cell min-w-40 col-tester",children:n.jsx(Cs,{value:(B.tags??[]).join(", "),onSave:J=>g(B.id,"tags",J)})}),n.jsx("td",{className:"table-cell",children:n.jsx(Cs,{value:F[B.id]??v[B.id]??B.status??"pending",options:["pending","passed","failed"],onSave:J=>{const z=J;X(H=>({...H,[B.id]:z})),g(B.id,"status",z)}})}),n.jsx("td",{className:"table-cell case-row-actions text-center",onClick:J=>J.stopPropagation(),children:n.jsxs("div",{className:"action-menu-wrap",ref:j===B.id?Z:void 0,children:[n.jsx("button",{type:"button",className:"action-menu-trigger","aria-label":`${b?"จัดการเคส":"Actions for"} ${B.id}`,"aria-expanded":j===B.id,onClick:()=>R(J=>J===B.id?void 0:B.id),children:"⋯"}),j===B.id&&n.jsxs("div",{className:"action-menu",children:[n.jsx("button",{type:"button",onClick:()=>{u(B),R(void 0)},children:y("View Test Case")}),n.jsx("button",{type:"button",onClick:()=>{f(B),R(void 0)},children:y("Edit")}),n.jsx("button",{type:"button",className:"danger",onClick:()=>{p(B.id),R(void 0)},children:y("Delete")})]})]})})]},B.id))})]})})]})}function $1({filters:a,modules:s,totalCount:l,visibleCount:o,selectedCount:c,onReviewSelection:u,exporting:f,onFiltersChange:p,onAdd:m,onImportScreenshot:g,onImport:v,onRecord:y,onDeleteSelected:S,onExport:b,onExportExcel:E}){const{ui:N,language:A,t:w}=Le(),j=A==="th",R=L.useRef(null);L.useEffect(()=>{const F=window.matchMedia("(min-width: 800px)"),X=()=>{R.current&&(R.current.open=F.matches)};return X(),F.addEventListener("change",X),()=>F.removeEventListener("change",X)},[]);const O=F=>p({...a,...F}),M=[a.module,a.type,a.priority].filter(F=>F!=="all").length;return n.jsxs("div",{className:"case-toolbar",children:[n.jsxs("div",{className:"case-search",children:[n.jsx("label",{className:"field-label",htmlFor:"search",children:w("search")}),n.jsx("input",{id:"search",className:"field",value:a.search,onChange:F=>O({search:F.target.value}),placeholder:j?"ค้นหาด้วยชื่อหรือรหัสเคส":"Search by case title or ID"})]}),n.jsxs("button",{type:"button","data-help":"add-case",className:"btn btn-primary",onClick:m,children:["+ ",w("addCase")]}),n.jsxs("details",{className:"case-tools",ref:R,children:[n.jsxs("summary",{children:[j?"ตัวกรองและเครื่องมือ":"Filters and tools",M>0&&` (${M})`]}),n.jsxs("div",{className:"case-tools-body",children:[n.jsxs("div",{className:"w-48",children:[n.jsx("label",{className:"field-label",htmlFor:"filter-module",children:N("Folder / Module")}),n.jsx("input",{id:"filter-module",className:"field",list:"module-options",value:a.module==="all"?"":a.module,onChange:F=>O({module:F.target.value||"all"}),placeholder:N("Search or select folder")}),n.jsx("datalist",{id:"module-options",children:s.map(F=>n.jsx("option",{value:F},F))})]}),n.jsxs("div",{className:"w-36",children:[n.jsx("label",{className:"field-label",htmlFor:"filter-type",children:N("Type")}),n.jsxs("select",{id:"filter-type",className:"field",value:a.type,onChange:F=>O({type:F.target.value}),children:[n.jsx("option",{value:"all",children:N("All")}),n.jsx("option",{value:"positive",children:N("positive")}),n.jsx("option",{value:"negative",children:N("negative")}),n.jsx("option",{value:"validation",children:N("validation")})]})]}),n.jsxs("div",{className:"w-36",children:[n.jsx("label",{className:"field-label",htmlFor:"filter-priority",children:N("Priority")}),n.jsxs("select",{id:"filter-priority",className:"field",value:a.priority,onChange:F=>O({priority:F.target.value}),children:[n.jsx("option",{value:"all",children:N("All")}),n.jsx("option",{value:"high",children:N("high")}),n.jsx("option",{value:"medium",children:N("medium")}),n.jsx("option",{value:"low",children:N("low")})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:v,children:["⇧ ",j?"นำเข้า":"Import"]}),n.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:g,children:["▣ ",w("screenshot")]}),n.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:y,children:["● ",j?"บันทึกขั้นตอน":"Record Flow"]}),n.jsxs("button",{type:"button",className:"btn btn-danger",onClick:S,disabled:c===0,children:[w("delete")," (",c,")"]})]})]})]}),n.jsxs("div",{className:"case-toolbar-footer",children:[n.jsxs("p",{className:"text-xs text-slate-500",children:[j?"แสดง":"Showing"," ",o," ",j?"จาก":"of"," ",l," ",N("Test Cases"),c>0&&` · ${c} ${j?"รายการที่เลือก":"selected"}`]}),n.jsxs("div",{className:"case-exports",children:[c>0&&n.jsxs("button",{type:"button",className:"btn btn-primary",onClick:u,children:[N("Review selected cases")," (",c,")"]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:b,disabled:f,children:f?j?"กำลังส่งออก…":"Exporting…":w("export")}),E&&n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:E,disabled:f,children:j?"Excel ทั้งโปรเจกต์":"Project Excel"})]})]})]})}function q1({testCases:a}){const{ui:s}=Le(),l=L.useMemo(()=>{const u=new Map;for(const f of a)for(const p of f.requirements??[])u.set(p,[...u.get(p)??[],f]);return[...u.entries()].sort(([f],[p])=>f.localeCompare(p))},[a]),o=a.filter(u=>(u.requirements?.length??0)>0).length,c=a.length-o;return a.length?n.jsxs("section",{className:"traceability-summary",children:[n.jsxs("div",{className:"traceability-summary-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Requirements traceability")}),n.jsx("h3",{children:s("Coverage at a glance")})]}),n.jsxs("span",{children:[l.length," ",s("requirements")]})]}),n.jsxs("div",{className:"traceability-kpis",children:[n.jsxs("div",{children:[n.jsx("b",{children:o}),n.jsx("span",{children:s("Linked cases")})]}),n.jsxs("div",{children:[n.jsx("b",{children:c}),n.jsx("span",{children:s("Without requirement")})]}),n.jsxs("div",{children:[n.jsxs("b",{children:[l.length?Math.round(o/a.length*100):0,"%"]}),n.jsx("span",{children:s("Case coverage")})]})]}),l.length?n.jsxs("div",{className:"traceability-list",children:[l.slice(0,8).map(([u,f])=>n.jsxs("div",{children:[n.jsx("span",{title:u,children:u}),n.jsxs("b",{children:[f.length," ",s("case"),f.length===1?"":"s"]})]},u)),l.length>8&&n.jsxs("small",{children:["+ ",l.length-8," ",s("more requirements")]})]}):n.jsx("p",{className:"traceability-empty",children:s("Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here.")})]}):null}function H1({rows:a,onUpdate:s,onDelete:l}){const{ui:o}=Le();return a.length===0?n.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:o("No Test Data matches the current filters.")}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full border-collapse",children:[n.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"table-head w-32",children:o("TD ID")}),n.jsx("th",{className:"table-head w-28",children:o("Module")}),n.jsx("th",{className:"table-head w-44",children:o("Field")}),n.jsx("th",{className:"table-head w-28",children:o("Input Type")}),n.jsx("th",{className:"table-head w-20",children:o("Required")}),n.jsx("th",{className:"table-head",children:o("Valid Value")}),n.jsx("th",{className:"table-head",children:o("Invalid Value")}),n.jsx("th",{className:"table-head",children:o("Note")}),n.jsx("th",{className:"table-head w-20",children:o("Actions")})]})}),n.jsx("tbody",{children:a.map(c=>n.jsxs("tr",{className:"border-b border-slate-100 hover:bg-slate-50",children:[n.jsx("td",{className:"table-cell font-mono text-xs",children:c.id}),n.jsx("td",{className:"table-cell",children:c.module}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.field,onChange:u=>s(c.id,{...c,field:u.target.value}),"aria-label":`Field for ${c.id}`})}),n.jsx("td",{className:"table-cell font-mono text-xs text-slate-500",children:c.inputType}),n.jsx("td",{className:"table-cell text-center",children:n.jsx("input",{type:"checkbox",checked:c.required,onChange:u=>s(c.id,{...c,required:u.target.checked}),"aria-label":`Required for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.validValue,onChange:u=>s(c.id,{...c,validValue:u.target.value}),"aria-label":`Valid value for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.invalidValue,onChange:u=>s(c.id,{...c,invalidValue:u.target.value}),"aria-label":`Invalid value for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("input",{className:"field px-2 py-1",value:c.note??"",onChange:u=>s(c.id,{...c,note:u.target.value}),"aria-label":`Note for ${c.id}`})}),n.jsx("td",{className:"table-cell",children:n.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>l(c.id),children:o("Delete")})})]},c.id))})]})})}function G1({search:a,module:s,modules:l,totalCount:o,visibleCount:c,exporting:u,onSearchChange:f,onModuleChange:p,onAdd:m,onExport:g}){const{ui:v}=Le();return n.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[n.jsxs("div",{className:"min-w-56 flex-1",children:[n.jsx("label",{className:"field-label",htmlFor:"data-search",children:v("Search")}),n.jsx("input",{id:"data-search",className:"field",value:a,onChange:y=>f(y.target.value),placeholder:v("Search field, value or note")})]}),n.jsxs("div",{className:"w-40",children:[n.jsx("label",{className:"field-label",htmlFor:"data-module",children:v("Module")}),n.jsxs("select",{id:"data-module",className:"field",value:s,onChange:y=>p(y.target.value),children:[n.jsx("option",{value:"all",children:v("All")}),l.map(y=>n.jsx("option",{value:y,children:y},y))]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:v("+ Add Row")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:g,disabled:u,children:v(u?"Exporting…":"Export CSV")})]}),n.jsxs("p",{className:"w-full text-xs text-slate-500",children:[v("Showing")," ",c," ",v("of")," ",o," ",v("rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together.")]})]})}const F1=/\bdata-v-[0-9a-f]{6,}\b/i,V1=/\d{4,}/,Xg="data-testid";function Y1(a){const s=[],l=(o,c)=>{!c||F1.test(c)||s.some(([,u])=>u===c)||s.push([o,c])};return l(...X1(a)),l("id",a.elementId&&!V1.test(a.elementId)?Bi(Q1(a.elementId)):void 0),l("semantic locator",Z1(a)),l("name",a.attributeName?Bi(My("name",a.attributeName,a.tagName)):void 0),l("recorded CSS",a.cssSelector?Bi(Zg(a.cssSelector)):void 0),s.length===0&&l("recorded CSS",Bi(Zg(a.cssSelector??""))),s}function X1(a){if(!a.testId)return["test id",void 0];const s=a.testIdAttribute??Xg;return s===Xg?["test id",`page.getByTestId(${Ma(a.testId)})`]:[s,Bi(My(s,a.testId))]}function Z1(a){const s=a.role&&a.name?`page.getByRole(${Ma(a.role)}, { name: ${Ma(a.name)}, exact: true })`:a.label?`page.getByLabel(${Ma(a.label)}, { exact: true })`:a.placeholder?`page.getByPlaceholder(${Ma(a.placeholder)})`:a.text?`page.getByText(${Ma(a.text)})`:void 0;if(!s)return;const l=a.contextTestId?`page.getByTestId(${Ma(a.contextTestId)})`:a.contextSelector?`page.locator(${Ma(a.contextSelector)})`:void 0,o=l?a.contextText?`${l}.filter({ hasText: ${Ma(a.contextText)} }).${s.slice(5)}`:`${l}.${s.slice(5)}`:s;return a.nth===void 0?o:`${o}.nth(${a.nth})`}function K1(a){return a.name??a.label??a.placeholder??a.text??a.testId??a.elementId??a.attributeName??a.cssSelector??"target"}function My(a,s,l){const o=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return`${l?l.toLowerCase():""}[${a}="${o}"]`}function Q1(a){return`#${a.replace(/[^\w-]/g,s=>`\\${s}`)}`}function Bi(a){return`page.locator(${J1(a)})`}function Zg(a){return a.replace(/\\(["'])/g,"$1")}function J1(a){return`'${a.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}const Ma=a=>JSON.stringify(a);function Kg(a){const s=["import { test, expect } from '@playwright/test'","",...tN(),"",`test(${sa(a.title)}, async ({ page }) => {`];for(const l of a.steps)s.push(` ${nN(l)}`);return s.push("})",""),s.join(`
32
+ `)}const W1=5e3,eN=100;function tN(){return[`async function resolveTarget(page, candidates, description, timeout = ${W1}) {`," const startedAt = Date.now()"," let attempts = []"," do {"," attempts = []"," for (const [kind, candidate] of candidates) {"," try {"," const count = await candidate.count()"," if (count !== 1) {"," attempts.push('- ' + kind + ': ' + count + ' matches')"," continue"," }"," if (!(await candidate.isVisible())) {"," attempts.push('- ' + kind + ': matched but not visible')"," continue"," }"," console.log('[Locator] ' + description + ' -> ' + kind + ' (' + (Date.now() - startedAt) + 'ms)')"," return candidate"," } catch (error) {"," attempts.push('- ' + kind + ': ' + (error instanceof Error ? error.message : String(error)))"," }"," }",` await page.waitForTimeout(${eN})`," } while (Date.now() - startedAt < timeout)",""," const diagnostics = await page"," .evaluate(() => ({ readyState: document.readyState, title: document.title }))"," .catch(() => ({ readyState: 'unknown', title: 'unknown' }))"," throw new Error(",` 'Could not resolve "' + description + '" after ' + (Date.now() - startedAt) + 'ms.\\n' +`," 'URL: ' + page.url() + '\\n' +"," 'Page title: ' + diagnostics.title + '\\n' +"," 'document.readyState: ' + diagnostics.readyState + '\\n' +"," 'Candidates:\\n' + attempts.join('\\n')"," )","}"]}function pr(a){const s=Y1(a);return`resolveTarget(page, [${(a.strategy==="css"?[...s].sort(([c],[u])=>c==="recorded CSS"?-1:u==="recorded CSS"?1:0):s).map(([c,u])=>`[${sa(c)}, ${u}]`).join(", ")}], ${sa(K1(a))})`}function nN(a){switch(a.type){case"navigate":return`await page.goto(${sa(aN(a.url))})`;case"click":return`await (await ${pr(a.target)}).click()`;case"fill":return`await (await ${pr(a.target)}).fill(${sa(a.value)})`;case"select":return`await (await ${pr(a.target)}).selectOption(${sa(a.option)})`;case"check":return`await (await ${pr(a.target)}).${a.checked?"check":"uncheck"}()`;case"wait":return a.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(a.value)||0))})`:a.mode==="url"?`await page.waitForURL(new RegExp(${sa(a.value)}))`:a.mode==="text"?`await expect(page).toContainText(${sa(a.value)})`:`await expect(await ${pr(a.target)}).toBeVisible()`;case"assertVisible":return`await expect(await ${pr(a.target)}).toBeVisible()`;case"assertText":return a.target?`await expect(await ${pr(a.target)}).toContainText(${sa(a.text)})`:`await expect(page.locator('body')).toContainText(${sa(a.text)})`;case"assertUrl":return`await expect(page).toHaveURL(new RegExp(${sa(a.urlContains)}))`;case"assertInvalid":return`expect(await (await ${pr(a.target)}).evaluate((element) => element.matches(':invalid'))).toBe(true)`;case"assertValidation":return`await expect(page.locator('[role="alert"], [aria-invalid="true"], .error, .errors, .invalid-feedback, #error').filter({ visible: true }).first()).toBeVisible()`;case"manual":return`// TODO: ${a.description}`}}const sa=a=>JSON.stringify(a);function aN(a){const s=/^\s*\[([^\]]+)\]\(\s*([^)\s]+)\s*\)\s*$/.exec(a);return s?s[2]:a.trim()}function Qg(a){const s=[`describe(${hn(a.module)}, () => {`,` it(${hn(a.title)}, () => {`];for(const l of a.steps)s.push(` ${rN(l)}`);return s.push(" })","})",""),s.join(`
33
+ `)}function mr(a){if(a.cssSelector){const l=`cy.get(${hn(a.cssSelector)})`,o=a.role&&a.name||a.label||a.placeholder||a.text;return a.nth!==void 0&&(a.strategy==="css"||!o)?`${l}.eq(${a.nth})`:l}const s=a.role&&a.name?`cy.contains(${hn(a.role)}, ${hn(a.name)})`:a.label?`cy.get('label').contains(${hn(a.label)}).invoke('attr', 'for').then((id) => cy.get('#' + id))`:a.placeholder?`cy.get(${hn(`[placeholder="${a.placeholder}"]`)})`:a.text?`cy.contains(${hn(a.text)})`:"cy.get('')";return a.nth===void 0?s:`${s}.eq(${a.nth})`}function rN(a){switch(a.type){case"navigate":return`cy.visit(${hn(a.url)})`;case"click":return`${mr(a.target)}.click()`;case"fill":return`${mr(a.target)}.clear().type(${hn(a.value)})`;case"select":return`${mr(a.target)}.select(${hn(a.option)})`;case"check":return`${mr(a.target)}.${a.checked?"check":"uncheck"}()`;case"wait":return a.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(a.value)||0))})`:a.mode==="url"?`cy.url().should('include', ${hn(a.value)})`:a.mode==="text"?`cy.contains(${hn(a.value)}).should('be.visible')`:`${mr(a.target)}.should('be.visible')`;case"assertVisible":return`${mr(a.target)}.should('be.visible')`;case"assertText":return a.target?`${mr(a.target)}.should('contain.text', ${hn(a.text)})`:`cy.contains(${hn(a.text)}).should('be.visible')`;case"assertUrl":return`cy.url().should('include', ${hn(a.urlContains)})`;case"assertInvalid":return`${mr(a.target)}.should('be.invalid')`;case"assertValidation":return`cy.get('[role="alert"], [aria-invalid="true"], .error, .errors, .invalid-feedback, #error').filter(':visible').first().should('be.visible')`;case"manual":return`// TODO: ${a.description}`}}const hn=a=>JSON.stringify(a);function sN(a){const s=a.steps.map(c=>iN(a,c)),l=a.steps.find(c=>c.type==="assert"),o=l?.type==="assert"&&l.assertion.type==="text"?`The page shows "${l.assertion.value}".`:l?.type==="assert"&&l.assertion.type==="url"?`The URL contains "${l.assertion.value}".`:l?.type==="assert"?"The expected element is visible.":"Needs Review";return{id:`TC-FLOW-${a.id.slice(-8).toUpperCase()}`,module:"FLOW",title:a.name,preconditions:a.description?[a.description]:[],steps:s,expectedResult:o,type:"positive",priority:"medium",automationStatus:s.length?"ready":"needs-review",status:"pending",sourceUrl:a.baseUrl,notes:l?void 0:"Guided Flow has no assertion — expected result needs review."}}function iN(a,s){switch(s.type){case"navigate":return{type:"navigate",url:new URL(s.path,a.baseUrl).toString()};case"click":return{type:"click",target:s.target};case"fill":return{type:"fill",target:s.target,value:s.valueRef?`{{${s.valueRef}}}`:s.value??""};case"select":return{type:"select",target:s.target,option:s.option};case"check":return{type:"check",target:s.target,checked:s.checked};case"wait":return{type:"wait",mode:s.mode,value:s.value,target:s.target};case"assert":return s.assertion.type==="visible"?{type:"assertVisible",target:s.assertion.target}:s.assertion.type==="text"?{type:"assertText",text:s.assertion.value}:{type:"assertUrl",urlContains:s.assertion.value}}}function lN(a){const s=["import { test, expect } from '@playwright/test'","",`test(${JSON.stringify(a.name)}, async ({ page }) => {`];for(const l of a.steps)s.push(` ${oN(a,l)}`);return s.push("})",""),s.join(`
34
+ `)}function oN(a,s){switch(s.type){case"navigate":return`await page.goto(${JSON.stringify(new URL(s.path,a.baseUrl).toString())})`;case"click":return`await ${Ts(s.target)}.click()`;case"fill":return`await ${Ts(s.target)}.fill(${JSON.stringify(s.valueRef?`{{${s.valueRef}}}`:s.value??"")})`;case"select":return`await ${Ts(s.target)}.selectOption(${JSON.stringify(s.option)})`;case"check":return`await ${Ts(s.target)}.${s.checked?"check":"uncheck"}()`;case"wait":return s.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(s.value)||0))})`:s.mode==="url"?`await page.waitForURL(new RegExp(${JSON.stringify(s.value)}))`:s.mode==="text"?`await expect(page).toContainText(${JSON.stringify(s.value)})`:`await expect(${Ts(s.target)}).toBeVisible()`;case"assert":return s.assertion.type==="visible"?`await expect(${Ts(s.assertion.target)}).toBeVisible()`:s.assertion.type==="text"?`await expect(page.getByText(${JSON.stringify(s.assertion.value)})).toBeVisible()`:`await expect(page).toHaveURL(new RegExp(${JSON.stringify(s.assertion.value)}))`}}function Ts(a){if(cN(a))return`page.locator(${md(Jg(a.cssSelector??a.value??""))})`;if(a.strategy==="role"||a.role&&a.name)return`page.getByRole(${JSON.stringify(a.role??"generic")}, { name: ${JSON.stringify(a.name??a.value??"")}, exact: true })`;if(a.strategy==="label"||a.label)return`page.getByLabel(${JSON.stringify(a.label??a.value??"")}, { exact: true })`;if(a.strategy==="placeholder"||a.placeholder)return`page.getByPlaceholder(${JSON.stringify(a.placeholder??a.value??"")})`;if(a.strategy==="testid"||a.testId){const s=a.testId??a.value??"";return a.testIdAttribute&&a.testIdAttribute!=="data-testid"?`page.locator(${md(uN(a.testIdAttribute,s))})`:`page.getByTestId(${JSON.stringify(s)})`}return a.strategy==="text"||a.text?`page.getByText(${JSON.stringify(a.text??a.value??"")})`:`page.locator(${md(Jg(a.cssSelector??a.value??""))})`}function cN(a){return!!(a.cssSelector&&(a.strategy==="css"||a.matchCount!==void 0&&a.matchCount>1&&!a.contextSelector&&!a.contextText))}function uN(a,s){return`[${a}="${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"]`}function Jg(a){return a.replace(/\\(["'])/g,"$1")}function md(a){return`'${a.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function dN(a){const s=[`describe(${JSON.stringify(a.name)}, () => {`,` it(${JSON.stringify(a.name)}, () => {`];for(const l of a.steps)s.push(` ${fN(a,l)}`);return s.push(" })","})",""),s.join(`
35
+ `)}function fN(a,s){switch(s.type){case"navigate":return`cy.visit(${JSON.stringify(new URL(s.path,a.baseUrl).toString())})`;case"click":return`${_s(s.target)}.click()`;case"fill":return`${_s(s.target)}.clear().type(${JSON.stringify(s.valueRef?`{{${s.valueRef}}}`:s.value??"")})`;case"select":return`${_s(s.target)}.select(${JSON.stringify(s.option)})`;case"check":return`${_s(s.target)}.${s.checked?"check":"uncheck"}()`;case"wait":return s.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(s.value)||0))})`:s.mode==="url"?`cy.url().should('include', ${JSON.stringify(s.value)})`:s.mode==="text"?`cy.contains(${JSON.stringify(s.value)}).should('be.visible')`:`${_s(s.target)}.should('be.visible')`;case"assert":return s.assertion.type==="visible"?`${_s(s.assertion.target)}.should('be.visible')`:s.assertion.type==="text"?`cy.contains(${JSON.stringify(s.assertion.value)}).should('be.visible')`:`cy.url().should('include', ${JSON.stringify(s.assertion.value)})`}}function _s(a){return a.strategy==="role"||a.role&&a.name?`cy.contains(${JSON.stringify(a.name??a.value??"")})`:a.strategy==="label"||a.label?`cy.get('label').contains(${JSON.stringify(a.label??a.value??"")})`:a.strategy==="placeholder"||a.placeholder?`cy.get(${JSON.stringify(`[placeholder="${a.placeholder??a.value??""}"]`)})`:a.strategy==="testid"||a.testId?`cy.get(${JSON.stringify(`[data-testid="${a.testId??a.value??""}"]`)})`:a.strategy==="text"||a.text?`cy.contains(${JSON.stringify(a.text??a.value??"")})`:`cy.get(${JSON.stringify(a.cssSelector??a.value??"")})`}function Wg(a,s){(s==null||s>a.length)&&(s=a.length);for(var l=0,o=Array(s);l<s;l++)o[l]=a[l];return o}function hN(a){if(Array.isArray(a))return a}function pN(a,s,l){return(s=jN(s))in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function mN(a,s){var l=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l!=null){var o,c,u,f,p=[],m=!0,g=!1;try{if(u=(l=l.call(a)).next,s!==0)for(;!(m=(o=u.call(l)).done)&&(p.push(o.value),p.length!==s);m=!0);}catch(v){g=!0,c=v}finally{try{if(!m&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}function gN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
36
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ev(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function tv(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?ev(Object(l),!0).forEach(function(o){pN(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):ev(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function vN(a,s){if(a==null)return{};var l,o,c=yN(a,s);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(a);for(o=0;o<u.length;o++)l=u[o],s.indexOf(l)===-1&&{}.propertyIsEnumerable.call(a,l)&&(c[l]=a[l])}return c}function yN(a,s){if(a==null)return{};var l={};for(var o in a)if({}.hasOwnProperty.call(a,o)){if(s.indexOf(o)!==-1)continue;l[o]=a[o]}return l}function bN(a,s){return hN(a)||mN(a,s)||SN(a,s)||gN()}function xN(a,s){if(typeof a!="object"||!a)return a;var l=a[Symbol.toPrimitive];if(l!==void 0){var o=l.call(a,s);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function jN(a){var s=xN(a,"string");return typeof s=="symbol"?s:s+""}function SN(a,s){if(a){if(typeof a=="string")return Wg(a,s);var l={}.toString.call(a).slice(8,-1);return l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set"?Array.from(a):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Wg(a,s):void 0}}function wN(a,s,l){return s in a?Object.defineProperty(a,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[s]=l,a}function nv(a,s){var l=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);s&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),l.push.apply(l,o)}return l}function av(a){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?nv(Object(l),!0).forEach(function(o){wN(a,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):nv(Object(l)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(l,o))})}return a}function NN(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return function(o){return s.reduceRight(function(c,u){return u(c)},o)}}function Ii(a){return function s(){for(var l=this,o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];return c.length>=a.length?a.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return s.apply(l,[].concat(c,p))}}}function Go(a){return{}.toString.call(a).includes("Object")}function CN(a){return!Object.keys(a).length}function nl(a){return typeof a=="function"}function TN(a,s){return Object.prototype.hasOwnProperty.call(a,s)}function _N(a,s){return Go(s)||yr("changeType"),Object.keys(s).some(function(l){return!TN(a,l)})&&yr("changeField"),s}function EN(a){nl(a)||yr("selectorType")}function kN(a){nl(a)||Go(a)||yr("handlerType"),Go(a)&&Object.values(a).some(function(s){return!nl(s)})&&yr("handlersType")}function AN(a){a||yr("initialIsRequired"),Go(a)||yr("initialType"),CN(a)&&yr("initialContent")}function ON(a,s){throw new Error(a[s]||a.default)}var RN={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},yr=Ii(ON)(RN),xo={changes:_N,selector:EN,handler:kN,initial:AN};function DN(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xo.initial(a),xo.handler(s);var l={current:a},o=Ii(UN)(l,s),c=Ii(MN)(l),u=Ii(xo.changes)(a),f=Ii(LN)(l);function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return xo.selector(g),g(l.current)}function m(g){NN(o,c,u,f)(g)}return[p,m]}function LN(a,s){return nl(s)?s(a.current):s}function MN(a,s){return a.current=av(av({},a.current),s),s}function UN(a,s,l){return nl(s)?s(a.current):Object.keys(l).forEach(function(o){var c;return(c=s[o])===null||c===void 0?void 0:c.call(s,a.current[o])}),l}var zN={create:DN},BN={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function IN(a){return function s(){for(var l=this,o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];return c.length>=a.length?a.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return s.apply(l,[].concat(c,p))}}}function PN(a){return{}.toString.call(a).includes("Object")}function $N(a){return a||rv("configIsRequired"),PN(a)||rv("configType"),a.urls?(qN(),{paths:{vs:a.urls.monacoBase}}):a}function qN(){console.warn(Uy.deprecation)}function HN(a,s){throw new Error(a[s]||a.default)}var Uy={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
37
37
  You are using deprecated way of configuration.
38
38
 
39
39
  Instead of using
@@ -42,26 +42,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
42
42
  monaco.config({ paths: { vs: '...' } })
43
43
 
44
44
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
45
- `},rv=BN(qN)(My),HN={config:PN},GN=function(){for(var s=arguments.length,l=new Array(s),o=0;o<s;o++)l[o]=arguments[o];return function(c){return l.reduceRight(function(u,f){return f(u)},c)}};function Uy(a,s){return Object.keys(s).forEach(function(l){s[l]instanceof Object&&a[l]&&Object.assign(s[l],Uy(a[l],s[l]))}),tv(tv({},a),s)}var FN={type:"cancelation",msg:"operation is manually canceled"};function md(a){var s=!1,l=new Promise(function(o,c){a.then(function(u){return s?c(FN):o(u)}),a.catch(c)});return l.cancel=function(){return s=!0},l}var VN=["monaco"],YN=UN.create({config:zN,isInitialized:!1,resolve:null,reject:null,monaco:null}),zy=yN(YN,2),rl=zy[0],Yo=zy[1];function XN(a){var s=HN.config(a),l=s.monaco,o=gN(s,VN);Yo(function(c){return{config:Uy(c.config,o),monaco:l}})}function ZN(){var a=rl(function(s){var l=s.monaco,o=s.isInitialized,c=s.resolve;return{monaco:l,isInitialized:o,resolve:c}});if(!a.isInitialized){if(Yo({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),md(gd);if(window.monaco&&window.monaco.editor)return By(window.monaco),a.resolve(window.monaco),md(gd);GN(KN,JN)(WN)}return md(gd)}function KN(a){return document.body.appendChild(a)}function QN(a){var s=document.createElement("script");return a&&(s.src=a),s}function JN(a){var s=rl(function(o){var c=o.config,u=o.reject;return{config:c,reject:u}}),l=QN("".concat(s.config.paths.vs,"/loader.js"));return l.onload=function(){return a()},l.onerror=s.reject,l}function WN(){var a=rl(function(l){var o=l.config,c=l.resolve,u=l.reject;return{config:o,resolve:c,reject:u}}),s=window.require;s.config(a.config),s(["vs/editor/editor.main"],function(l){var o=l.m||l;By(o),a.resolve(o)},function(l){a.reject(l)})}function By(a){rl().monaco||Yo({monaco:a})}function e2(){return rl(function(a){var s=a.monaco;return s})}var gd=new Promise(function(a,s){return Yo({resolve:a,reject:s})}),Iy={config:XN,init:ZN,__getMonacoInstance:e2},t2={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},vd=t2,n2={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},a2=n2;function r2({children:a}){return Rs.createElement("div",{style:a2.container},a)}var s2=r2,i2=s2;function l2({width:a,height:s,isEditorReady:l,loading:o,_ref:c,className:u,wrapperProps:f}){return Rs.createElement("section",{style:{...vd.wrapper,width:a,height:s},...f},!l&&Rs.createElement(i2,null,o),Rs.createElement("div",{ref:c,style:{...vd.fullWidth,...!l&&vd.hide},className:u}))}var o2=l2,Py=L.memo(o2);function c2(a){L.useEffect(a,[])}var $y=c2;function u2(a,s,l=!0){let o=L.useRef(!0);L.useEffect(o.current||!l?()=>{o.current=!1}:a,s)}var Pn=u2;function qi(){}function Os(a,s,l,o){return d2(a,o)||f2(a,s,l,o)}function d2(a,s){return a.editor.getModel(qy(a,s))}function f2(a,s,l,o){return a.editor.createModel(s,l,o?qy(a,o):void 0)}function qy(a,s){return a.Uri.parse(s)}function h2({original:a,modified:s,language:l,originalLanguage:o,modifiedLanguage:c,originalModelPath:u,modifiedModelPath:f,keepCurrentOriginalModel:p=!1,keepCurrentModifiedModel:m=!1,theme:g="light",loading:v="Loading...",options:y={},height:j="100%",width:b="100%",className:E,wrapperProps:N={},beforeMount:A=qi,onMount:w=qi}){let[S,O]=L.useState(!1),[D,M]=L.useState(!0),F=L.useRef(null),X=L.useRef(null),Z=L.useRef(null),$=L.useRef(w),B=L.useRef(A),J=L.useRef(!1);$y(()=>{let K=Iy.init();return K.then(V=>(X.current=V)&&M(!1)).catch(V=>V?.type!=="cancelation"&&console.error("Monaco initialization: error:",V)),()=>F.current?T():K.cancel()}),Pn(()=>{if(F.current&&X.current){let K=F.current.getOriginalEditor(),V=Os(X.current,a||"",o||l||"text",u||"");V!==K.getModel()&&K.setModel(V)}},[u],S),Pn(()=>{if(F.current&&X.current){let K=F.current.getModifiedEditor(),V=Os(X.current,s||"",c||l||"text",f||"");V!==K.getModel()&&K.setModel(V)}},[f],S),Pn(()=>{let K=F.current.getModifiedEditor();K.getOption(X.current.editor.EditorOption.readOnly)?K.setValue(s||""):s!==K.getValue()&&(K.executeEdits("",[{range:K.getModel().getFullModelRange(),text:s||"",forceMoveMarkers:!0}]),K.pushUndoStop())},[s],S),Pn(()=>{F.current?.getModel()?.original.setValue(a||"")},[a],S),Pn(()=>{let{original:K,modified:V}=F.current.getModel();X.current.editor.setModelLanguage(K,o||l||"text"),X.current.editor.setModelLanguage(V,c||l||"text")},[l,o,c],S),Pn(()=>{X.current?.editor.setTheme(g)},[g],S),Pn(()=>{F.current?.updateOptions(y)},[y],S);let z=L.useCallback(()=>{if(!X.current)return;B.current(X.current);let K=Os(X.current,a||"",o||l||"text",u||""),V=Os(X.current,s||"",c||l||"text",f||"");F.current?.setModel({original:K,modified:V})},[l,s,c,a,o,u,f]),H=L.useCallback(()=>{!J.current&&Z.current&&(F.current=X.current.editor.createDiffEditor(Z.current,{automaticLayout:!0,...y}),z(),X.current?.editor.setTheme(g),O(!0),J.current=!0)},[y,g,z]);L.useEffect(()=>{S&&$.current(F.current,X.current)},[S]),L.useEffect(()=>{!D&&!S&&H()},[D,S,H]);function T(){let K=F.current?.getModel();p||K?.original?.dispose(),m||K?.modified?.dispose(),F.current?.dispose()}return Rs.createElement(Py,{width:b,height:j,isEditorReady:S,loading:v,_ref:Z,className:E,wrapperProps:N})}var p2=h2;L.memo(p2);function m2(a){let s=L.useRef();return L.useEffect(()=>{s.current=a},[a]),s.current}var g2=m2,xo=new Map;function v2({defaultValue:a,defaultLanguage:s,defaultPath:l,value:o,language:c,path:u,theme:f="light",line:p,loading:m="Loading...",options:g={},overrideServices:v={},saveViewState:y=!0,keepCurrentModel:j=!1,width:b="100%",height:E="100%",className:N,wrapperProps:A={},beforeMount:w=qi,onMount:S=qi,onChange:O,onValidate:D=qi}){let[M,F]=L.useState(!1),[X,Z]=L.useState(!0),$=L.useRef(null),B=L.useRef(null),J=L.useRef(null),z=L.useRef(S),H=L.useRef(w),T=L.useRef(),K=L.useRef(o),V=g2(u),Q=L.useRef(!1),W=L.useRef(!1);$y(()=>{let x=Iy.init();return x.then(C=>($.current=C)&&Z(!1)).catch(C=>C?.type!=="cancelation"&&console.error("Monaco initialization: error:",C)),()=>B.current?Y():x.cancel()}),Pn(()=>{let x=Os($.current,a||o||"",s||c||"",u||l||"");x!==B.current?.getModel()&&(y&&xo.set(V,B.current?.saveViewState()),B.current?.setModel(x),y&&B.current?.restoreViewState(xo.get(u)))},[u],M),Pn(()=>{B.current?.updateOptions(g)},[g],M),Pn(()=>{!B.current||o===void 0||(B.current.getOption($.current.editor.EditorOption.readOnly)?B.current.setValue(o):o!==B.current.getValue()&&(W.current=!0,B.current.executeEdits("",[{range:B.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),B.current.pushUndoStop(),W.current=!1))},[o],M),Pn(()=>{let x=B.current?.getModel();x&&c&&$.current?.editor.setModelLanguage(x,c)},[c],M),Pn(()=>{p!==void 0&&B.current?.revealLine(p)},[p],M),Pn(()=>{$.current?.editor.setTheme(f)},[f],M);let R=L.useCallback(()=>{if(!(!J.current||!$.current)&&!Q.current){H.current($.current);let x=u||l,C=Os($.current,o||a||"",s||c||"",x||"");B.current=$.current?.editor.create(J.current,{model:C,automaticLayout:!0,...g},v),y&&B.current.restoreViewState(xo.get(x)),$.current.editor.setTheme(f),p!==void 0&&B.current.revealLine(p),F(!0),Q.current=!0}},[a,s,l,o,c,u,g,v,y,f,p]);L.useEffect(()=>{M&&z.current(B.current,$.current)},[M]),L.useEffect(()=>{!X&&!M&&R()},[X,M,R]),K.current=o,L.useEffect(()=>{M&&O&&(T.current?.dispose(),T.current=B.current?.onDidChangeModelContent(x=>{W.current||O(B.current.getValue(),x)}))},[M,O]),L.useEffect(()=>{if(M){let x=$.current.editor.onDidChangeMarkers(C=>{let q=B.current.getModel()?.uri;if(q&&C.find(I=>I.path===q.path)){let I=$.current.editor.getModelMarkers({resource:q});D?.(I)}});return()=>{x?.dispose()}}return()=>{}},[M,D]);function Y(){T.current?.dispose(),j?y&&xo.set(u,B.current.saveViewState()):B.current.getModel()?.dispose(),B.current.dispose()}return Rs.createElement(Py,{width:b,height:E,isEditorReady:M,loading:m,_ref:J,className:N,wrapperProps:A})}var y2=v2,b2=L.memo(y2),x2=b2;function j2({value:a,framework:s,onChange:l,height:o="calc(100vh - 420px)"}){const{language:c}=Le(),[u,f]=L.useState(!1),[p,m]=L.useState(!1),g=!u||p;function v(y,j){const b="typescript",E=s==="playwright"?["page.goto()","page.getByRole()","page.getByLabel()","page.getByText()","page.locator()","page.waitForTimeout()",'await page.screenshot({ path: "evidence.png", fullPage: true })',"expect(page).toHaveURL()","expect(locator).toBeVisible()","expect(locator).toContainText()"]:["cy.visit()","cy.findByRole()","cy.get()","cy.contains()","cy.wait()","cy.url().should()","locator.should('be.visible')","locator.should('contain.text')"],N=j.languages.registerCompletionItemProvider(b,{triggerCharacters:[".","("],provideCompletionItems:(A,w)=>{const S=A.getWordUntilPosition(w),O=A.getLineContent(w.lineNumber).slice(0,w.column-1).toLowerCase(),D={startLineNumber:w.lineNumber,endLineNumber:w.lineNumber,startColumn:S.startColumn,endColumn:w.column},M=S2(O,s);return{suggestions:[...E.map(F=>({label:F,kind:j.languages.CompletionItemKind.Method,insertText:F,range:D,detail:s==="playwright"?"Playwright API":"Cypress API"})),...M.map(F=>({...F,kind:j.languages.CompletionItemKind.Snippet,range:D}))]}}});y.onDidDispose(()=>N.dispose()),f(!0)}return n.jsxs("div",{className:"source-editor",style:{height:o},children:[g&&n.jsx("textarea",{className:"source-editor-plain","aria-label":c==="th"?"โค้ดทดสอบ":"Test source code",spellCheck:!1,value:a,onFocus:()=>m(!0),onBlur:()=>m(!1),onChange:y=>l(y.target.value)}),n.jsx("div",{className:"source-editor-enhanced",style:{visibility:g?"hidden":"visible"},inert:g,children:n.jsx(x2,{loading:null,height:"100%",theme:"vs-dark",language:"typescript",value:a,onChange:y=>l(y??""),onMount:v,options:{automaticLayout:!0,minimap:{enabled:!0},fontSize:13,lineNumbers:"on",folding:!0,wordWrap:"off",tabSize:2,insertSpaces:!0,scrollBeyondLastLine:!1,smoothScrolling:!0,suggestOnTriggerCharacters:!0,quickSuggestions:!0,padding:{top:16,bottom:16}}})})]})}function S2(a,s){const l=s==="playwright",o=[];return/กรอก|พิมพ์|fill|type|input/i.test(a)&&o.push({label:"Fill an input",insertText:l?"await page.getByLabel('${1:Email}').fill('${2:value}')":"cy.findByLabelText('${1:Email}').type('${2:value}')",detail:"Suggested from a fill or typing instruction"}),/คลิก|กด|click|press|ปุ่ม/i.test(a)&&o.push({label:"Click a button",insertText:l?"await page.getByRole('button', { name: '${1:Login}', exact: true }).click()":"cy.findByRole('button', { name: '${1:Login}' }).click()",detail:"Suggested from a click instruction"}),/เปิดหน้า|ไปที่|navigate|visit|goto/i.test(a)&&o.push({label:"Navigate to a URL",insertText:l?"await page.goto('${1:https://example.com}')":"cy.visit('${1:https://example.com}')",detail:"Suggested from a navigation instruction"}),/ตรวจสอบ|เช็ค|assert|expect|verify|เห็นข้อความ|ข้อความ/i.test(a)&&o.push({label:"Assert visible text",insertText:l?"await expect(page.getByText('${1:Success}')).toBeVisible()":"cy.contains('${1:Success}').should('be.visible')",detail:"Suggested from an assertion instruction"}),o}function w2({sourceUrl:a,onUse:s}){const{ui:l}=Le(),o=a||"https://example.com/login",c=`await page.goto("${o}")
45
+ `},rv=IN(HN)(Uy),GN={config:$N},FN=function(){for(var s=arguments.length,l=new Array(s),o=0;o<s;o++)l[o]=arguments[o];return function(c){return l.reduceRight(function(u,f){return f(u)},c)}};function zy(a,s){return Object.keys(s).forEach(function(l){s[l]instanceof Object&&a[l]&&Object.assign(s[l],zy(a[l],s[l]))}),tv(tv({},a),s)}var VN={type:"cancelation",msg:"operation is manually canceled"};function gd(a){var s=!1,l=new Promise(function(o,c){a.then(function(u){return s?c(VN):o(u)}),a.catch(c)});return l.cancel=function(){return s=!0},l}var YN=["monaco"],XN=zN.create({config:BN,isInitialized:!1,resolve:null,reject:null,monaco:null}),By=bN(XN,2),rl=By[0],Zo=By[1];function ZN(a){var s=GN.config(a),l=s.monaco,o=vN(s,YN);Zo(function(c){return{config:zy(c.config,o),monaco:l}})}function KN(){var a=rl(function(s){var l=s.monaco,o=s.isInitialized,c=s.resolve;return{monaco:l,isInitialized:o,resolve:c}});if(!a.isInitialized){if(Zo({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),gd(vd);if(window.monaco&&window.monaco.editor)return Iy(window.monaco),a.resolve(window.monaco),gd(vd);FN(QN,WN)(e2)}return gd(vd)}function QN(a){return document.body.appendChild(a)}function JN(a){var s=document.createElement("script");return a&&(s.src=a),s}function WN(a){var s=rl(function(o){var c=o.config,u=o.reject;return{config:c,reject:u}}),l=JN("".concat(s.config.paths.vs,"/loader.js"));return l.onload=function(){return a()},l.onerror=s.reject,l}function e2(){var a=rl(function(l){var o=l.config,c=l.resolve,u=l.reject;return{config:o,resolve:c,reject:u}}),s=window.require;s.config(a.config),s(["vs/editor/editor.main"],function(l){var o=l.m||l;Iy(o),a.resolve(o)},function(l){a.reject(l)})}function Iy(a){rl().monaco||Zo({monaco:a})}function t2(){return rl(function(a){var s=a.monaco;return s})}var vd=new Promise(function(a,s){return Zo({resolve:a,reject:s})}),Py={config:ZN,init:KN,__getMonacoInstance:t2},n2={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},yd=n2,a2={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},r2=a2;function s2({children:a}){return Rs.createElement("div",{style:r2.container},a)}var i2=s2,l2=i2;function o2({width:a,height:s,isEditorReady:l,loading:o,_ref:c,className:u,wrapperProps:f}){return Rs.createElement("section",{style:{...yd.wrapper,width:a,height:s},...f},!l&&Rs.createElement(l2,null,o),Rs.createElement("div",{ref:c,style:{...yd.fullWidth,...!l&&yd.hide},className:u}))}var c2=o2,$y=L.memo(c2);function u2(a){L.useEffect(a,[])}var qy=u2;function d2(a,s,l=!0){let o=L.useRef(!0);L.useEffect(o.current||!l?()=>{o.current=!1}:a,s)}var Bn=d2;function qi(){}function Os(a,s,l,o){return f2(a,o)||h2(a,s,l,o)}function f2(a,s){return a.editor.getModel(Hy(a,s))}function h2(a,s,l,o){return a.editor.createModel(s,l,o?Hy(a,o):void 0)}function Hy(a,s){return a.Uri.parse(s)}function p2({original:a,modified:s,language:l,originalLanguage:o,modifiedLanguage:c,originalModelPath:u,modifiedModelPath:f,keepCurrentOriginalModel:p=!1,keepCurrentModifiedModel:m=!1,theme:g="light",loading:v="Loading...",options:y={},height:S="100%",width:b="100%",className:E,wrapperProps:N={},beforeMount:A=qi,onMount:w=qi}){let[j,R]=L.useState(!1),[O,M]=L.useState(!0),F=L.useRef(null),X=L.useRef(null),Z=L.useRef(null),$=L.useRef(w),B=L.useRef(A),J=L.useRef(!1);qy(()=>{let K=Py.init();return K.then(V=>(X.current=V)&&M(!1)).catch(V=>V?.type!=="cancelation"&&console.error("Monaco initialization: error:",V)),()=>F.current?T():K.cancel()}),Bn(()=>{if(F.current&&X.current){let K=F.current.getOriginalEditor(),V=Os(X.current,a||"",o||l||"text",u||"");V!==K.getModel()&&K.setModel(V)}},[u],j),Bn(()=>{if(F.current&&X.current){let K=F.current.getModifiedEditor(),V=Os(X.current,s||"",c||l||"text",f||"");V!==K.getModel()&&K.setModel(V)}},[f],j),Bn(()=>{let K=F.current.getModifiedEditor();K.getOption(X.current.editor.EditorOption.readOnly)?K.setValue(s||""):s!==K.getValue()&&(K.executeEdits("",[{range:K.getModel().getFullModelRange(),text:s||"",forceMoveMarkers:!0}]),K.pushUndoStop())},[s],j),Bn(()=>{F.current?.getModel()?.original.setValue(a||"")},[a],j),Bn(()=>{let{original:K,modified:V}=F.current.getModel();X.current.editor.setModelLanguage(K,o||l||"text"),X.current.editor.setModelLanguage(V,c||l||"text")},[l,o,c],j),Bn(()=>{X.current?.editor.setTheme(g)},[g],j),Bn(()=>{F.current?.updateOptions(y)},[y],j);let z=L.useCallback(()=>{if(!X.current)return;B.current(X.current);let K=Os(X.current,a||"",o||l||"text",u||""),V=Os(X.current,s||"",c||l||"text",f||"");F.current?.setModel({original:K,modified:V})},[l,s,c,a,o,u,f]),H=L.useCallback(()=>{!J.current&&Z.current&&(F.current=X.current.editor.createDiffEditor(Z.current,{automaticLayout:!0,...y}),z(),X.current?.editor.setTheme(g),R(!0),J.current=!0)},[y,g,z]);L.useEffect(()=>{j&&$.current(F.current,X.current)},[j]),L.useEffect(()=>{!O&&!j&&H()},[O,j,H]);function T(){let K=F.current?.getModel();p||K?.original?.dispose(),m||K?.modified?.dispose(),F.current?.dispose()}return Rs.createElement($y,{width:b,height:S,isEditorReady:j,loading:v,_ref:Z,className:E,wrapperProps:N})}var m2=p2;L.memo(m2);function g2(a){let s=L.useRef();return L.useEffect(()=>{s.current=a},[a]),s.current}var v2=g2,jo=new Map;function y2({defaultValue:a,defaultLanguage:s,defaultPath:l,value:o,language:c,path:u,theme:f="light",line:p,loading:m="Loading...",options:g={},overrideServices:v={},saveViewState:y=!0,keepCurrentModel:S=!1,width:b="100%",height:E="100%",className:N,wrapperProps:A={},beforeMount:w=qi,onMount:j=qi,onChange:R,onValidate:O=qi}){let[M,F]=L.useState(!1),[X,Z]=L.useState(!0),$=L.useRef(null),B=L.useRef(null),J=L.useRef(null),z=L.useRef(j),H=L.useRef(w),T=L.useRef(),K=L.useRef(o),V=v2(u),Q=L.useRef(!1),W=L.useRef(!1);qy(()=>{let x=Py.init();return x.then(C=>($.current=C)&&Z(!1)).catch(C=>C?.type!=="cancelation"&&console.error("Monaco initialization: error:",C)),()=>B.current?Y():x.cancel()}),Bn(()=>{let x=Os($.current,a||o||"",s||c||"",u||l||"");x!==B.current?.getModel()&&(y&&jo.set(V,B.current?.saveViewState()),B.current?.setModel(x),y&&B.current?.restoreViewState(jo.get(u)))},[u],M),Bn(()=>{B.current?.updateOptions(g)},[g],M),Bn(()=>{!B.current||o===void 0||(B.current.getOption($.current.editor.EditorOption.readOnly)?B.current.setValue(o):o!==B.current.getValue()&&(W.current=!0,B.current.executeEdits("",[{range:B.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),B.current.pushUndoStop(),W.current=!1))},[o],M),Bn(()=>{let x=B.current?.getModel();x&&c&&$.current?.editor.setModelLanguage(x,c)},[c],M),Bn(()=>{p!==void 0&&B.current?.revealLine(p)},[p],M),Bn(()=>{$.current?.editor.setTheme(f)},[f],M);let D=L.useCallback(()=>{if(!(!J.current||!$.current)&&!Q.current){H.current($.current);let x=u||l,C=Os($.current,o||a||"",s||c||"",x||"");B.current=$.current?.editor.create(J.current,{model:C,automaticLayout:!0,...g},v),y&&B.current.restoreViewState(jo.get(x)),$.current.editor.setTheme(f),p!==void 0&&B.current.revealLine(p),F(!0),Q.current=!0}},[a,s,l,o,c,u,g,v,y,f,p]);L.useEffect(()=>{M&&z.current(B.current,$.current)},[M]),L.useEffect(()=>{!X&&!M&&D()},[X,M,D]),K.current=o,L.useEffect(()=>{M&&R&&(T.current?.dispose(),T.current=B.current?.onDidChangeModelContent(x=>{W.current||R(B.current.getValue(),x)}))},[M,R]),L.useEffect(()=>{if(M){let x=$.current.editor.onDidChangeMarkers(C=>{let q=B.current.getModel()?.uri;if(q&&C.find(I=>I.path===q.path)){let I=$.current.editor.getModelMarkers({resource:q});O?.(I)}});return()=>{x?.dispose()}}return()=>{}},[M,O]);function Y(){T.current?.dispose(),S?y&&jo.set(u,B.current.saveViewState()):B.current.getModel()?.dispose(),B.current.dispose()}return Rs.createElement($y,{width:b,height:E,isEditorReady:M,loading:m,_ref:J,className:N,wrapperProps:A})}var b2=y2,x2=L.memo(b2),j2=x2;function S2({value:a,framework:s,onChange:l,height:o="calc(100vh - 420px)"}){const{language:c}=Le(),[u,f]=L.useState(!1),[p,m]=L.useState(!1),g=!u||p;function v(y,S){const b="typescript",E=s==="playwright"?["page.goto()","page.getByRole()","page.getByLabel()","page.getByText()","page.locator()","page.waitForTimeout()",'await page.screenshot({ path: "evidence.png", fullPage: true })',"expect(page).toHaveURL()","expect(locator).toBeVisible()","expect(locator).toContainText()"]:["cy.visit()","cy.findByRole()","cy.get()","cy.contains()","cy.wait()","cy.url().should()","locator.should('be.visible')","locator.should('contain.text')"],N=S.languages.registerCompletionItemProvider(b,{triggerCharacters:[".","("],provideCompletionItems:(A,w)=>{const j=A.getWordUntilPosition(w),R=A.getLineContent(w.lineNumber).slice(0,w.column-1).toLowerCase(),O={startLineNumber:w.lineNumber,endLineNumber:w.lineNumber,startColumn:j.startColumn,endColumn:w.column},M=w2(R,s);return{suggestions:[...E.map(F=>({label:F,kind:S.languages.CompletionItemKind.Method,insertText:F,range:O,detail:s==="playwright"?"Playwright API":"Cypress API"})),...M.map(F=>({...F,kind:S.languages.CompletionItemKind.Snippet,range:O}))]}}});y.onDidDispose(()=>N.dispose()),f(!0)}return n.jsxs("div",{className:"source-editor",style:{height:o},children:[g&&n.jsx("textarea",{className:"source-editor-plain","aria-label":c==="th"?"โค้ดทดสอบ":"Test source code",spellCheck:!1,value:a,onFocus:()=>m(!0),onBlur:()=>m(!1),onChange:y=>l(y.target.value)}),n.jsx("div",{className:"source-editor-enhanced",style:{visibility:g?"hidden":"visible"},inert:g,children:n.jsx(j2,{loading:null,height:"100%",theme:"vs-dark",language:"typescript",value:a,onChange:y=>l(y??""),onMount:v,options:{automaticLayout:!0,minimap:{enabled:!0},fontSize:13,lineNumbers:"on",folding:!0,wordWrap:"off",tabSize:2,insertSpaces:!0,scrollBeyondLastLine:!1,smoothScrolling:!0,suggestOnTriggerCharacters:!0,quickSuggestions:!0,padding:{top:16,bottom:16}}})})]})}function w2(a,s){const l=s==="playwright",o=[];return/กรอก|พิมพ์|fill|type|input/i.test(a)&&o.push({label:"Fill an input",insertText:l?"await page.getByLabel('${1:Email}').fill('${2:value}')":"cy.findByLabelText('${1:Email}').type('${2:value}')",detail:"Suggested from a fill or typing instruction"}),/คลิก|กด|click|press|ปุ่ม/i.test(a)&&o.push({label:"Click a button",insertText:l?"await page.getByRole('button', { name: '${1:Login}', exact: true }).click()":"cy.findByRole('button', { name: '${1:Login}' }).click()",detail:"Suggested from a click instruction"}),/เปิดหน้า|ไปที่|navigate|visit|goto/i.test(a)&&o.push({label:"Navigate to a URL",insertText:l?"await page.goto('${1:https://example.com}')":"cy.visit('${1:https://example.com}')",detail:"Suggested from a navigation instruction"}),/ตรวจสอบ|เช็ค|assert|expect|verify|เห็นข้อความ|ข้อความ/i.test(a)&&o.push({label:"Assert visible text",insertText:l?"await expect(page.getByText('${1:Success}')).toBeVisible()":"cy.contains('${1:Success}').should('be.visible')",detail:"Suggested from an assertion instruction"}),o}function N2({sourceUrl:a,onUse:s}){const{ui:l}=Le(),o=a||"https://example.com/login",c=`await page.goto("${o}")
46
46
  await page.getByLabel("Email address").fill("{{TEST_EMAIL}}")
47
47
  await page.getByLabel("Password").fill("{{TEST_PASSWORD}}")
48
48
  await page.getByRole("button", { name: "Login", exact: true }).click()
49
49
  await expect(page).toHaveURL(new RegExp("/dashboard"))`,u=`await page.goto("${o}")
50
50
  await page.getByLabel("Password").fill("wrong-password")
51
51
  await page.getByRole("button", { name: "Login", exact: true }).click()
52
- await expect(page.getByRole("alert")).toContainText("Invalid password")`;return n.jsxs("section",{className:"qa-guidance",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Beginner guide")}),n.jsx("h3",{children:l("What should I add next?")}),n.jsx("p",{children:l("Use a template, then replace labels and expected results with what you observed.")})]}),n.jsxs("div",{className:"qa-guidance-actions",children:[n.jsxs("button",{type:"button",onClick:()=>s(c),children:[n.jsx("b",{children:l("Login success")}),n.jsx("span",{children:l("Fill credentials and verify the next URL")})]}),n.jsxs("button",{type:"button",onClick:()=>s(u),children:[n.jsx("b",{children:l("Login validation")}),n.jsx("span",{children:l("Try an invalid password and assert the alert")})]}),n.jsx("span",{children:l("For uploads, create a draft first and choose a safe test file before running.")})]})]})}function N2({stopped:a=!1}){return n.jsx("svg",{className:"run-button-icon",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:a?n.jsx("rect",{x:"5.25",y:"5.25",width:"9.5",height:"9.5",rx:"2",fill:"currentColor"}):n.jsx("path",{d:"M6.2 3.95a1.15 1.15 0 0 1 1.75-.97l7.05 5.03a1.2 1.2 0 0 1 0 1.98l-7.05 5.03a1.15 1.15 0 0 1-1.75-.97V3.95Z",fill:"currentColor"})})}function Ri({children:a,stopped:s=!1,onClick:l,disabled:o=!1}){return n.jsxs("button",{type:"button",className:`btn ${s?"btn-danger":"btn-dark"} run-button`,"data-help":s?void 0:"start-run",onClick:l,disabled:o,children:[n.jsx(N2,{stopped:s}),n.jsx("span",{children:a})]})}function C2({testCases:a,focused:s=!1,onEditSteps:l,projectId:o="active",secrets:c,blockedKeywords:u,onRunStatus:f,onRunResult:p}){const{ui:m,language:g}=Le(),[v,y]=L.useState("playwright"),j=a.find(fe=>/submit|login|sign in|เข้าสู่ระบบ|ล็อกอิน/i.test(`${fe.title} ${fe.module}`))??a[0],[b,E]=L.useState(j?.id??""),[N,A]=L.useState([]),w=s&&a.length===1,[S,O]=L.useState(!1),[D,M]=L.useState(!1),[F,X]=L.useState(""),[Z,$]=L.useState(),[B,J]=L.useState([]),[z,H]=L.useState(!1),[T,K]=L.useState(!1),[V,Q]=L.useState("all"),W=L.useRef(void 0),R=L.useRef(!1),Y=L.useRef(!1);L.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,R.current=!0;const fe=W.current;fe&&(fe.controller.abort(),bg(fe.runId).catch(()=>{}))}),[]);const[x,C]=L.useState({}),[q,I]=L.useState("loading"),[ee,he]=L.useState(""),[_e,Ne]=L.useState(0),le=L.useMemo(()=>[{value:"all",label:m("All folders and tags")},...[...new Set(a.map(fe=>fe.folder??fe.module))].sort().map(fe=>({value:`folder:${fe}`,label:`${m("Folder")}: ${fe}`})),...[...new Set(a.flatMap(fe=>fe.tags??[]))].sort().map(fe=>({value:`tag:${fe}`,label:`${m("Tag")}: ${fe}`}))],[a,m]),Ce=L.useMemo(()=>V==="all"?a:a.filter(fe=>V.startsWith("folder:")?(fe.folder??fe.module)===V.slice(7):(fe.tags??[]).includes(V.slice(4))),[V,a]),ye=Ce.find(fe=>fe.id===b)??Ce[0],Fe=Ce.filter(fe=>!N.includes(fe.id)).length;L.useEffect(()=>{a.some(fe=>fe.id===b)||E(j?.id??"")},[j?.id,b,a]),L.useEffect(()=>{if(s){I("ready");return}let fe=!1;return I("loading"),he(""),C({}),(async()=>{const ze=await F0(o),$e=`lazyscout.automation.${o}`;let Ve={};try{Ve=JSON.parse(localStorage.getItem($e)??"{}")}catch{}const rt={...Ve,...ze};Object.keys(Ve).length&&(await vg(o,rt),localStorage.removeItem($e)),fe||(C(rt),I("ready"))})().catch(()=>{fe||I("error")}),()=>{fe=!0}},[o,_e,s]),L.useEffect(()=>{const fe=$e=>{S&&($e.key==="F5"||($e.ctrlKey||$e.metaKey)&&$e.key.toLowerCase()==="r")&&($e.preventDefault(),K(!0))},ze=$e=>{if(!S)return;const Ve=W.current;Ve&&navigator.sendBeacon("/api/automation/stop",new Blob([JSON.stringify({runId:Ve.runId})],{type:"application/json"})),$e.preventDefault(),$e.returnValue=""};return window.addEventListener("keydown",fe),window.addEventListener("beforeunload",ze),()=>{window.removeEventListener("keydown",fe),window.removeEventListener("beforeunload",ze)}},[S]);const Ue=L.useMemo(()=>ye?v==="playwright"?Kg(ye):Qg(ye):"",[v,ye]),k=ye?`${v}:${ye.id}`:"",pe=x[k]??Ue,ce=ye?.steps.every(fe=>fe.type==="manual")&&(!pe.trim()||pe.trim()===Ue.trim());function G(){X(pe),M(!0)}async function P(fe){if(!(!ye||q!=="ready")){I("saving"),he("");try{await vg(o,fe),Y.current&&(C(fe),M(!1))}catch{Y.current&&he(m("Could not save the code. Please try again."))}finally{Y.current&&I("ready")}}}function ne(){const fe={...x};delete fe[k],P(fe)}function xe(fe){const ze=`${v}:${fe.id}`;return x[ze]??(v==="playwright"?Kg(fe):Qg(fe))}async function ge(fe,ze){const $e=crypto.randomUUID(),Ve=new AbortController;W.current={runId:$e,controller:Ve};try{const rt=await C0(fe,v,ze,c,$e,o,u,Ve.signal);return Y.current&&(f?.(fe.id,rt.status==="passed"?"passed":rt.status==="failed"?"failed":"pending"),p?.(fe.id,rt)),rt}catch(rt){const et=R.current||rt instanceof DOMException&&rt.name==="AbortError",ht={status:et?"stopped":"failed",framework:v,logs:[{timestamp:new Date().toISOString(),level:et?"warn":"fail",message:et?"Run stopped by user.":rt instanceof Error?rt.message:String(rt)}]};return Y.current&&(f?.(fe.id,et?"pending":"failed"),p?.(fe.id,ht)),ht}finally{W.current?.runId===$e&&(W.current=void 0)}}async function se(){R.current=!0;const fe=W.current;fe&&(fe.controller.abort(),bg(fe.runId).catch(()=>{})),H(!1),K(!1),J(ze=>[...ze,{timestamp:new Date().toISOString(),level:"warn",message:"Stop requested. Closing the active Playwright session…"}])}async function Te(){if(!ye||S||q!=="ready")return;R.current=!1,O(!0),$("running"),J([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --case ${ye.id}`},{timestamp:new Date().toISOString(),level:"info",message:`Starting Playwright runner: ${ye.title}`},{timestamp:new Date().toISOString(),level:"info",message:"Preparing browser context and test steps…"},{timestamp:new Date().toISOString(),level:"info",message:"Running generated automation source…"}]);const fe=await ge(ye,pe);$(fe.status),J(ze=>[...ze,...fe.logs]),O(!1)}async function Ee(){if(S||q!=="ready")return;const fe=Ce.filter($e=>!N.includes($e.id)).slice(0,50);if(R.current=!1,O(!0),$("running"),J([{timestamp:new Date().toISOString(),level:"info",message:`Selected cases: ${fe.length}/${Ce.length} in current filter · Run budget: 50 cases`}]),fe.length===0){J($e=>[...$e,{timestamp:new Date().toISOString(),level:"warn",message:"No test cases selected. Nothing to run."}]),$("pending"),O(!1);return}let ze="passed";for(const $e of fe){if(R.current)break;const Ve=await ge($e,xe($e));if((Ve.status==="failed"||ze==="passed")&&(ze=Ve.status),J(rt=>[...rt,...Ve.logs]),Ve.status==="stopped")break}$(R.current?"stopped":ze),O(!1)}function we(){navigator.clipboard?.writeText(pe)}function ke(){const fe=new Blob([pe],{type:"text/plain"}),ze=URL.createObjectURL(fe),$e=document.createElement("a");$e.href=ze,$e.download=`${ye?.id??"lazyscout-test"}.${v==="playwright"?"spec.ts":"cy.ts"}`,$e.click(),URL.revokeObjectURL(ze)}function qe(){se(),window.location.reload()}return n.jsxs("section",{className:"automation-page",children:[n.jsxs("div",{className:"automation-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s?"Scout":m("Automation workspace")}),n.jsx("h2",{children:w?ye?.title:m(s?"Selected cases":"Generated Tests")}),n.jsx("p",{children:w?ye?.id:!s&&m("Edit the generated file per Test Case, then run one case or selected cases.")})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[!w&&n.jsxs(n.Fragment,{children:[n.jsx("select",{className:"automation-run-filter",value:V,disabled:S,onChange:fe=>Q(fe.target.value),children:le.map(fe=>n.jsx("option",{value:fe.value,children:fe.label},fe.value))}),n.jsxs("span",{className:"automation-selected-count",children:[Fe,"/",Ce.length," ",m("selected")]})]}),S?n.jsx(Ri,{stopped:!0,onClick:()=>H(!0),children:m("Stop run")}):w?n.jsx(Ri,{onClick:Te,disabled:q!=="ready"||v!=="playwright"||!ye||ce,children:m("Run this case")}):n.jsx(Ri,{onClick:Ee,disabled:!Fe||q!=="ready"||v!=="playwright",children:m("Run selected cases")})]})]}),q==="error"&&n.jsxs("p",{className:"p-3",role:"alert",children:[m("Could not load saved code.")," ",n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Ne(fe=>fe+1),children:m("Retry")})]}),ee&&!D&&n.jsx("p",{className:"p-3",role:"alert",children:ee}),!s&&ye&&v==="playwright"&&q==="ready"&&!S&&n.jsx(w2,{sourceUrl:ye?.sourceUrl,onUse:fe=>{X(fe),M(!0)}}),n.jsxs("div",{className:w?"block":"automation-layout",children:[!w&&n.jsxs("aside",{className:"automation-case-list",children:[n.jsxs("div",{className:"automation-filter-head",children:[n.jsxs("span",{className:"field-label",children:[m("Test files ("),Ce.length,"/",a.length,")"]}),n.jsx("span",{children:m(V==="all"?"All":"Filtered")})]}),Ce.map(fe=>n.jsxs("button",{type:"button",className:ye?.id===fe.id?"selected":"",onClick:()=>{E(fe.id),M(!1)},children:[n.jsx("input",{type:"checkbox",checked:!N.includes(fe.id),onChange:ze=>{ze.stopPropagation();const $e=ze.target.checked;A(Ve=>$e?Ve.filter(rt=>rt!==fe.id):[...Ve,fe.id])},onClick:ze=>ze.stopPropagation(),"aria-label":`${m("Run")} ${fe.id}`}),n.jsx("span",{className:"case-file-icon",children:x[`playwright:${fe.id}`]||x[`cypress:${fe.id}`]?"●":"○"}),n.jsxs("span",{children:[n.jsx("b",{children:fe.id}),n.jsx("small",{children:fe.title}),fe.tags?.length?n.jsx("em",{className:"automation-tag",children:fe.tags.slice(0,2).join(" · ")}):null]})]},fe.id))]}),n.jsxs("div",{className:s?"min-w-0 bg-white p-4 sm:p-6":"automation-editor",children:[s?ye&&n.jsxs("section",{className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsx("h3",{className:"font-semibold",children:w?m("Steps"):ye.title}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:S,onClick:()=>l?.(ye),children:m("Edit steps")})]}),ye.steps.length>0&&n.jsx("ol",{className:"list-decimal space-y-2 ps-6 text-sm",children:ye.steps.map((fe,ze)=>n.jsx("li",{className:"break-words",children:U1(fe,g==="th")},ze))}),ce&&n.jsx("p",{className:"text-sm",children:m("Add an action or a check to run this case.")}),ye.expectedResult&&n.jsxs("p",{className:"text-sm",children:[n.jsx("b",{children:m("Expected Result")})," · ",ye.expectedResult]}),!w&&n.jsx(Ri,{onClick:Te,disabled:S||ce,children:m("Run this case")})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"automation-toolbar",children:[n.jsxs("select",{className:"field",value:v,onChange:fe=>y(fe.target.value),disabled:S,children:[n.jsx("option",{value:"playwright",children:"Playwright"}),n.jsx("option",{value:"cypress",children:"Cypress"})]}),n.jsx("span",{className:"automation-source",children:ye?.sourceUrl}),n.jsxs("div",{className:"ml-auto flex gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:G,disabled:D||S||!ye||q!=="ready",children:m("Edit code")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:ne,disabled:S||!ye||q!=="ready",children:m("Regenerate")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:we,children:m("Copy")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:ke,children:m("Save file")}),!w&&n.jsx(Ri,{onClick:Te,disabled:S||!ye||q!=="ready"||v!=="playwright",children:m("Run this case")})]})]}),v==="cypress"&&n.jsx("p",{className:"px-4 py-2 text-sm text-white",children:m("Export Cypress code to run it with Cypress.")}),n.jsx("pre",{className:"automation-code",children:q==="loading"?m("Loading saved code…"):q==="error"?"":pe||m("No Test Cases are available to generate.")})]}),Z&&n.jsxs("div",{className:"terminal-panel",children:[n.jsxs("div",{className:"terminal-head",children:[n.jsxs("span",{children:[n.jsx("i",{})," ",m(s?"Run log":"CLI output")]}),n.jsx("b",{className:Z==="passed"?"terminal-pass":Z==="failed"?"terminal-fail":"terminal-warn",children:m(Z.toUpperCase())})]}),n.jsx("div",{className:"terminal-body",children:B.map((fe,ze)=>n.jsxs("div",{className:`terminal-line terminal-${fe.level}`,children:[n.jsx("span",{children:new Date(fe.timestamp).toLocaleTimeString()}),fe.message,fe.durationMs!==void 0&&n.jsxs("em",{children:[fe.durationMs,m("ms")]})]},`${fe.timestamp}-${ze}`))})]})]})]}),z&&n.jsx(sv,{title:m("Stop the running tests?"),message:m("The active Playwright session will be closed. Remaining selected Test Cases will not run."),confirmLabel:m("Stop run"),onCancel:()=>H(!1),onConfirm:()=>{se()}}),T&&n.jsx(sv,{title:m("Stop tests and refresh?"),message:m("Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases."),confirmLabel:m("Stop and refresh"),onCancel:()=>K(!1),onConfirm:qe}),D&&n.jsx("div",{className:"modern-modal-backdrop code-editor-backdrop",children:n.jsxs("section",{className:"modern-modal code-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"code-editor-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:m("Automation source")}),n.jsxs("h2",{id:"code-editor-title",children:[g==="th"?"แก้ไขโค้ด":"Edit"," ",v==="playwright"?"Playwright":"Cypress",g==="en"&&" code"]}),n.jsxs("p",{children:[ye?.id," · ",ye?.title]})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":m("Close editor"),onClick:()=>M(!1),children:"×"})]}),n.jsx("div",{className:"code-editor-modal-body",children:n.jsx(j2,{value:F,framework:v,onChange:X,height:"100%"})}),n.jsxs("footer",{className:"modal-footer code-editor-modal-footer",children:[ee&&n.jsx("span",{role:"alert",children:ee}),n.jsx("span",{className:"muted",children:m("VS Code style editor · Ctrl+Space for suggestions.")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>M(!1),children:m("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:q!=="ready"||!F.trim(),onClick:()=>{P({...x,[k]:F})},children:m("Save code")})]})]})})]})}function sv({title:a,message:s,confirmLabel:l,onCancel:o,onConfirm:c}){const{ui:u}=Le();return n.jsx("div",{className:"modern-modal-backdrop",children:n.jsxs("section",{className:"modern-modal run-confirm-modal",role:"dialog","aria-modal":"true",children:[n.jsx("div",{className:"modal-header",children:n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:u("Running tests")}),n.jsx("h2",{children:a}),n.jsx("p",{children:s})]})}),n.jsxs("div",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:u("Keep running")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:c,children:l})]})]})})}const T2={"not-found":["หาองค์ประกอบนี้ไม่พบ","No matching element"],"not-visible":["องค์ประกอบยังไม่ปรากฏบนหน้าจอ","Element is not visible"],disabled:["ปุ่มยังไม่เปิดให้กด","Control is disabled"],covered:["มีองค์ประกอบอื่นบังตำแหน่งคลิก","Another element intercepted the click"],detached:["องค์ประกอบถูกนำออกจากหน้าระหว่างคลิก","Element was detached"],unstable:["องค์ประกอบยังขยับอยู่","Element did not become stable"],timeout:["หมดเวลารอ","Timed out"],closed:["หน้าเว็บหรือเบราว์เซอร์ปิดลง","Page or browser closed"],"connection-refused":["เซิร์ฟเวอร์ปฏิเสธการเชื่อมต่อ","Connection refused"],"dns-error":["หาโดเมนไม่พบ","Domain lookup failed"],"ssl-error":["ตรวจสอบใบรับรองเว็บไซต์ไม่สำเร็จ","TLS certificate error"],"no-response":["ไม่ได้รับคำตอบจากหน้าเว็บ","No page response"],"navigation-failed":["เปิดหน้าเว็บไม่สำเร็จ","Navigation failed"],"action-failed":["ทำคำสั่งไม่สำเร็จ","Action failed"],"http-error":["หน้าเว็บตอบกลับด้วยข้อผิดพลาด","Page returned an HTTP error"]},_2={filtered:["ตัวกรองคลิกของโปรเจกต์","Project click filter"],"session-ending":["การกระทำนี้จะจบเซสชัน","Session-ending action"],"outside-scope":["อยู่นอกขอบเขตที่เลือก","Outside the selected scope"],disabled:["ปุ่มยังไม่เปิดให้กด","Control is disabled"]},E2={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",422:"Unprocessable Content",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"};function yd(a){return[a,E2[a]].filter(Boolean).join(" ")}function Hy(a){return a.state==="failed"||(a.status??0)>=400}function lf(a){return a.kind==="open"||a.kind==="reload"?a.path:a.name}const k2=L.memo(function({item:s,th:l,live:o,expanded:c,statusLabel:u,onToggle:f}){const p=s.kind==="open"?"goto":s.kind,m=s.failure?T2[s.failure]?.[l?0:1]:s.skipReason?_2[s.skipReason]?.[l?0:1]:void 0;return n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",className:"trace-step trace-command","aria-expanded":c,onClick:()=>f(s.id),children:[n.jsx("span",{className:"console-number",children:String(s.id).padStart(2,"0")}),n.jsxs("span",{className:"console-command-text",children:[n.jsx("b",{children:p})," ",s.kind==="click"?JSON.stringify(lf(s)):lf(s),s.afterPath&&s.afterPath!==s.path&&n.jsxs(n.Fragment,{children:[" → ",s.afterPath]}),(s.attempt??0)>1&&n.jsxs("small",{children:[" ","· ",l?"ครั้งที่":"attempt"," ",s.attempt]}),s.httpStatus!==void 0&&n.jsxs(n.Fragment,{children:[" · HTTP ",yd(s.httpStatus)]}),m&&n.jsxs("small",{className:s.status==="failed"?"console-fail":"",children:[" · ",m]})]}),n.jsxs("span",{className:"console-result console-"+s.status,children:[s.status==="done"?"✓ ":s.status==="failed"?"× ":"",u]})]}),s.navigation&&n.jsxs("div",{className:"trace-api-line",children:[n.jsx("span",{"aria-hidden":"true",children:"↳"}),n.jsxs("span",{children:[n.jsx("b",{children:"document"})," ",s.navigation.path," · HTTP ",yd(s.navigation.status)]}),n.jsx("span",{className:"console-result "+(s.navigation.status>=400?"console-fail":"console-number"),children:s.navigation.status>=400?l?"× ไม่ผ่าน":"× FAIL":""})]}),s.requests.map((g,v)=>{const y=Hy(g),j=g.state==="response"&&g.status!==void 0&&g.status>=200&&g.status<300,b=y?l?"× ไม่ผ่าน":"× FAIL":j?l?"✓ ผ่าน":"✓ PASS":g.status!==void 0?l?"ได้รับคำตอบ":"RESPONSE":o?l?"รอผล":"WAIT":l?"ยังไม่มีผล":"NO RESULT";return n.jsxs("div",{className:"trace-api-line",children:[n.jsx("span",{"aria-hidden":"true",children:"↳"}),n.jsxs("span",{children:[n.jsx("b",{children:g.method})," ",g.path,g.status!==void 0&&" · HTTP "+yd(g.status),g.state==="failed"&&" · "+(g.networkError||(l?"คำขอเครือข่ายล้มเหลว":"Network request failed"))]}),n.jsx("span",{className:"console-result "+(y?"console-fail":j?"console-done":"console-running"),children:b})]},v)}),s.requestsLimited&&n.jsx("small",{children:l?"แสดง 24 คำขอแรกของขั้นนี้":"Showing the first 24 requests for this step."})]})}),Gy=L.memo(function({steps:s,live:l=!1,runError:o,issues:c}){const{language:u}=Le(),f=u==="th",[p,m]=L.useState(),[g,v]=L.useState(!0),y=L.useRef(null),j=s.find(S=>S.id===p),b=L.useCallback(S=>{m(O=>O===S?void 0:S),v(!1)},[]),E=S=>S.status==="failed"?f?"ไม่ผ่าน":"FAIL":S.status==="skipped"?f?"ข้าม":"SKIP":S.status==="done"?f?"ผ่าน":"PASS":l?f?"กำลังรัน":"RUNNING":f?"ยังไม่จบ":"INCOMPLETE",N=s.reduce((S,O)=>S+ +(O.status==="failed")+ +((O.navigation?.status??0)>=400)+O.requests.filter(Hy).length,0),A=[...new Set([o,...(c??[]).map(S=>S.message)].filter(S=>!!S))];L.useLayoutEffect(()=>{l&&g&&y.current&&(y.current.scrollTop=y.current.scrollHeight)},[s,l,g]),L.useLayoutEffect(()=>{const S=y.current,O=S?.querySelector(".trace-inspector"),D=O?.parentElement;if(!S||!O||!D)return;const M=S.getBoundingClientRect(),F=O.getBoundingClientRect().bottom-M.bottom;F>0&&(S.scrollTop+=Math.max(0,Math.min(F,D.getBoundingClientRect().top-M.top)))},[p]),L.useLayoutEffect(()=>{const S=y.current;if(!l||!g||!S)return;const O=new ResizeObserver(()=>{S.clientHeight&&(S.scrollTop=S.scrollHeight)});return O.observe(S),()=>O.disconnect()},[l,g]);const w=j&&n.jsxs("section",{className:"trace-inspector","aria-label":f?"รายละเอียดขั้นตอน":"Step details",children:[n.jsxs("header",{children:[n.jsxs("div",{children:[n.jsxs("small",{children:[f?"ขั้นที่":"Step"," ",j.id]}),n.jsx("h3",{children:lf(j)})]}),n.jsxs("span",{className:"trace-status trace-"+j.status,children:[E(j),j.durationMs!==void 0&&" · "+j.durationMs+" ms"]})]}),n.jsxs("p",{className:"trace-path",children:[n.jsx(nt,{name:"globe"}),n.jsxs("code",{children:[j.path,j.afterPath&&j.afterPath!==j.path&&" → "+j.afterPath]})]}),j.kind==="click"&&n.jsxs("div",{className:"trace-detail",children:[n.jsx("h4",{children:f?"องค์ประกอบที่เลือก":"Target element"}),j.html?n.jsxs(n.Fragment,{children:[n.jsx("pre",{children:j.html}),n.jsx("small",{children:f?"ตัวเลือก CSS":"CSS selector"}),n.jsx("code",{children:j.selector})]}):n.jsx("p",{children:j.status==="running"?f?"กำลังหาปุ่มบนหน้าเว็บ…":"Locating the control…":f?"อ่าน HTML ขององค์ประกอบนี้ไม่ได้":"Element HTML unavailable."})]}),n.jsxs("div",{className:"trace-detail",children:[n.jsx("h4",{children:j.kind==="open"?f?"ข้อมูลที่พบบนหน้า":"Observed on the page":f?"สิ่งที่เปลี่ยนบนหน้า":"Page changes"}),j.changes?.length?n.jsx("ul",{children:j.changes.map(S=>n.jsx("li",{children:S},S))}):n.jsx("p",{children:j.status==="running"?f?"กำลังสังเกตหน้าเว็บ…":"Observing the page…":j.changes?f?"ไม่พบหัวข้อ กล่องโต้ตอบ หรือข้อความสถานะใหม่":"No new heading, dialog or status message observed.":f?"ไม่มีผลการอ่านหน้าสำหรับขั้นนี้":"No page observation for this step."})]}),n.jsxs("div",{className:"trace-detail",children:[n.jsx("h4",{children:f?"API ของเว็บที่พบในช่วงนี้":"Site API requests during this step"}),j.requests.length?n.jsx("ul",{className:"trace-requests",children:j.requests.map((S,O)=>n.jsxs("li",{children:[n.jsxs("div",{children:[n.jsx("b",{children:S.method})," ",n.jsx("code",{children:S.path})," ",n.jsx("span",{className:S.state==="failed"||(S.status??0)>=400?"trace-http-error":"trace-http-status",children:S.state==="failed"?f?"เชื่อมต่อไม่สำเร็จ":"Request failed":S.status??(f?"ยังไม่เห็นคำตอบ":"No response yet")})]}),(S.durationMs!==void 0||S.contentType)&&n.jsx("small",{children:[S.contentType,S.durationMs!==void 0?S.durationMs+" ms":void 0].filter(Boolean).join(" · ")}),S.itemCount!==void 0&&n.jsxs("small",{children:[S.itemCount," ",f?"รายการ":"items"]}),!!S.jsonFields?.length&&n.jsxs("small",{children:[f?"ฟิลด์":"Fields"," · ",S.jsonFields.join(", ")]})]},O))}):n.jsx("p",{children:f?"ยังไม่พบคำขอ XHR หรือ fetch ของเว็บนี้ในช่วงนี้":"No same-origin XHR or fetch observed during this step."}),j.requestsLimited&&n.jsx("small",{children:f?"แสดง 24 คำขอแรกของขั้นนี้":"Showing the first 24 requests for this step."})]})]});return n.jsx("div",{className:"trace-console-view",children:n.jsxs("section",{className:"trace-console","aria-label":f?"เทอร์มินัล Scout":"Scout terminal",children:[n.jsxs("header",{className:"trace-console-head",children:[n.jsxs("h3",{children:[n.jsx("span",{"aria-hidden":"true",children:"›_"})," ",f?"เทอร์มินัล Scout":"Scout terminal"]}),n.jsx("span",{role:"status",className:N?"console-fail":"",children:N>0&&(f?"ข้อผิดพลาด ":"Errors: ")+N}),l&&!g&&n.jsx("button",{type:"button",onClick:()=>{v(!0),m(void 0)},children:f?"ติดตามขั้นล่าสุด":"Follow latest"})]}),n.jsxs("div",{className:"trace-console-output",ref:y,tabIndex:0,"aria-label":f?"รายการคำสั่ง":"Command output",onScroll:S=>{const O=S.currentTarget;l&&g&&O.clientHeight&&O.scrollTop+O.clientHeight<O.scrollHeight-4&&v(!1)},children:[!s.length&&!A.length&&n.jsx("p",{role:"status",children:l?f?"กำลังเปิดเบราว์เซอร์…":"Opening the browser…":f?"ยังไม่มีคำสั่งที่บันทึกไว้":"No recorded commands."}),s.map((S,O)=>n.jsxs("div",{className:"trace-command-group","data-tail":l&&O===s.length-1||void 0,children:[n.jsx(k2,{item:S,th:f,live:l,expanded:p===S.id,statusLabel:E(S),onToggle:b}),S.id===p&&w]},S.id)),A.map(S=>n.jsxs("p",{className:"console-fail",role:"status",children:["× ERROR · ",S]},S))]})]})})});function A2({result:a}){const{ui:s,language:l}=Le(),[o,c]=L.useState(a.scoutTrace?.length?"trace":"events"),[u,f]=L.useState(!1),[p,m]=L.useState(a.runEvents);async function g(){if(!u){c("terminal"),f(!0),m([]);for(const y of a.runEvents)await new Promise(j=>window.setTimeout(j,120)),m(j=>[...j,y]);f(!1)}}const v=u||p.length<a.runEvents.length?p:a.runEvents;return!a.runEvents.length&&!a.stats.pagesVisited?n.jsxs("section",{className:"scout-log-card",children:[n.jsx("div",{className:"workspace-panel-head",children:n.jsx("h2",{children:s("Scout Log")})}),n.jsxs("div",{className:"workspace-empty",children:[n.jsx(nt,{name:"activity"}),n.jsx("strong",{children:l==="th"?"ยังไม่มีบันทึกการสำรวจ":"No Scout activity yet"}),n.jsx("p",{children:l==="th"?"เริ่มสำรวจเว็บไซต์จากหน้าภาพรวม แล้วกลับมาดูหน้าที่พบและเหตุการณ์ระหว่างการสำรวจที่นี่":"Scout a website from Overview to see the pages visited and events recorded here."})]})]}):n.jsxs("section",{className:"scout-log-card",children:[n.jsxs("div",{className:"workspace-panel-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Playwright Scout Log")}),n.jsx("h2",{children:s("Scout Log")})]}),n.jsxs("span",{className:"run-live",children:[n.jsx("i",{})," ",s("DONE")]})]}),n.jsxs("div",{className:"scout-log-tabs",children:[!!a.scoutTrace?.length&&n.jsx("button",{type:"button",className:o==="trace"?"active":"",onClick:()=>c("trace"),children:l==="th"?"เทอร์มินัล Scout":"Scout terminal"}),n.jsx("button",{type:"button",className:o==="events"?"active":"",onClick:()=>c("events"),children:s("◉ Event Stream")}),!a.scoutTrace?.length&&n.jsx("button",{type:"button",className:o==="terminal"?"active":"",onClick:()=>c("terminal"),children:s("›_ CLI Terminal")})]}),n.jsxs("div",{className:"run-summary",children:[n.jsxs("div",{children:[n.jsxs("strong",{children:[a.stats.durationMs,s("ms")]}),n.jsx("span",{children:s("duration")})]}),n.jsxs("div",{children:[n.jsx("strong",{children:a.stats.pagesVisited}),n.jsx("span",{children:s("pages")})]}),n.jsxs("div",{children:[n.jsx("strong",{className:a.stats.urlsSkipped?"text-amber-600":"",children:a.stats.urlsSkipped}),n.jsx("span",{children:s("skipped")})]})]}),o==="trace"&&a.scoutTrace?n.jsx(Gy,{steps:a.scoutTrace,issues:a.issues}):o==="terminal"?n.jsxs("div",{className:"scout-cli-terminal",children:[n.jsxs("div",{className:"scout-cli-head",children:[n.jsxs("span",{children:[n.jsx("i",{})," ",s("Playwright CLI output")]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("b",{children:s(u?"RUNNING":"COMPLETED")}),n.jsx("button",{type:"button",className:"cli-run-button",onClick:g,disabled:u,children:u?s("Running…"):l==="th"?"เล่นบันทึกซ้ำ":"Replay log"})]})]}),n.jsxs("div",{className:"scout-cli-body",children:[n.jsxs("div",{children:[n.jsx("em",{children:"$"})," npx playwright scout ",a.startUrl]}),v.map((y,j)=>n.jsxs("div",{className:y.result==="failed"?"cli-fail":y.result==="warning"||y.result==="blocked"?"cli-warn":"cli-pass",children:[n.jsx("em",{children:"›"})," ",y.message]},`cli-${y.timestamp}-${j}`)),u&&n.jsx("div",{className:"cli-cursor",children:"▌"})]})]}):n.jsx("div",{className:"run-events",children:a.runEvents.map((y,j)=>n.jsxs("div",{className:"run-event",children:[n.jsx("div",{className:`event-marker event-${y.result}`}),n.jsxs("div",{className:"run-event-body",children:[n.jsxs("div",{className:"run-event-top",children:[n.jsx("span",{children:new Date(y.timestamp).toLocaleTimeString()}),n.jsx("b",{children:y.eventType})]}),n.jsx("p",{children:y.message}),y.currentUrl&&n.jsx("small",{children:new URL(y.currentUrl).pathname})]})]},`${y.timestamp}-${j}`))}),n.jsxs("div",{className:"inspector-foot",children:[n.jsx("span",{className:"status-dot status-pass"})," ",s("Scout completed · Playwright events captured")]})]})}const O2=L.memo(function({frame:s}){const l=Le().language==="th",[o,c]=L.useState(),u=o?.frame??s,f=o?.index??u?.targetIndex,p=f===void 0?void 0:u?.elements[f],m=u?.targetIndex===void 0?void 0:u.elements[u.targetIndex];function g(v){u&&c({frame:u,index:v})}return n.jsxs("section",{className:"scout-preview","aria-label":l?"ภาพจากเบราว์เซอร์":"Browser preview",children:[n.jsxs("header",{children:[n.jsx(nt,{name:"globe"}),n.jsx("h3",{children:l?"ภาพจากเบราว์เซอร์":"Browser preview"}),u&&n.jsxs("span",{children:["#",u.stepId]})]}),u?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"scout-preview-location",children:[n.jsx("span",{"aria-hidden":"true",children:"● ● ●"}),n.jsx("code",{children:u.path})]}),n.jsxs("div",{className:"scout-preview-screen",style:{aspectRatio:u.width+" / "+u.height},children:[n.jsx("img",{src:"data:image/jpeg;base64,"+u.jpeg,alt:l?"หน้าเว็บในขั้นตอนนี้":"Website at this step",draggable:!1}),u.elements.map((v,y)=>n.jsx("button",{type:"button",tabIndex:-1,className:"scout-preview-hit"+(y===f?" is-selected":""),"aria-label":v.label,onClick:()=>g(y),style:{left:100*v.x/u.width+"%",top:100*v.y/u.height+"%",width:100*v.width/u.width+"%",height:100*v.height/u.height+"%",zIndex:Math.max(1,1e3-Math.round(999*v.width*v.height/(u.width*u.height)))}},y)),m&&!o&&n.jsx("span",{className:"scout-click-pointer","aria-hidden":"true",style:{left:100*(m.x+m.width/2)/u.width+"%",top:100*(m.y+m.height/2)/u.height+"%"},children:n.jsx("svg",{viewBox:"0 0 20 24",width:"19",height:"23",children:n.jsx("path",{d:"M2 2 17 13l-7 .7-3.4 7.1Z",fill:"currentColor",stroke:"white",strokeWidth:"1.6",strokeLinejoin:"round"})})},u.stepId)]}),n.jsxs("div",{className:"scout-preview-inspect",children:[n.jsxs("label",{children:[n.jsx("span",{children:l?"ตรวจองค์ประกอบในภาพ":"Inspect an element"}),n.jsxs("select",{value:o?.index??"",onChange:v=>v.target.value===""?c(void 0):g(Number(v.target.value)),children:[n.jsx("option",{value:"",children:l?"กดที่ปุ่มในภาพ หรือเลือกจากรายการ":"Click a control in the image or select one"}),u.elements.map((v,y)=>n.jsxs("option",{value:y,children:[v.tag," · ",v.label]},y))]})]}),p&&n.jsxs("div",{className:"scout-preview-element",children:[n.jsx("small",{children:o?l?"องค์ประกอบที่เลือก":"Selected element":l?"เป้าหมายคลิกของ Scout":"Scout click target"}),n.jsx("strong",{children:p.label}),n.jsx("code",{children:p.html})]}),o&&n.jsxs("button",{type:"button",onClick:()=>c(void 0),children:[l?"กลับไปดูภาพล่าสุด":"Resume live preview"," →"]})]})]}):n.jsxs("div",{className:"scout-preview-wait",children:[n.jsx(nt,{name:"globe"}),n.jsx("p",{children:l?"รอภาพจากหน้าเว็บที่กำลังสำรวจ…":"Waiting for a view of the site…"})]})]})});function R2({checks:a,secrets:s}){const{ui:l}=Le(),[o,c]=L.useState(),[u,f]=L.useState({}),[p,m]=L.useState();async function g(v,y=!1){c(v.id);try{const j=await K0(v,s,y);f(b=>({...b,[v.id]:`${j.status.toUpperCase()} · ${j.message}`}))}catch(j){f(b=>({...b,[v.id]:j instanceof Error?j.message:String(j)}))}finally{c(void 0)}}return n.jsxs("div",{className:"api-checks",children:[n.jsxs("div",{className:"api-checks-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Network validation")}),n.jsx("h3",{children:l("Test API")}),n.jsx("p",{children:l("Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured.")})]}),n.jsxs("span",{className:"status-badge status-badge-pass",children:[a.length," ",l("observed")]})]}),a.length===0?n.jsxs("div",{className:"empty-state",children:[l("Run Analyze with")," ",n.jsx("b",{children:l("Include API checks from XHR/fetch")})," ",l("enabled to collect the API requests used by the page.")]}):n.jsx("div",{className:"api-table",children:a.map(v=>n.jsxs("div",{className:"api-row",children:[n.jsx("span",{className:"api-method",children:v.method}),n.jsxs("div",{children:[n.jsx("b",{children:v.id}),n.jsx("p",{children:v.url}),n.jsx("small",{children:v.note??`Observed HTTP ${v.observedStatus??"—"} · ${v.durationMs??0}ms`})]}),n.jsx("span",{className:`status-badge ${v.status==="observed"?"status-badge-pass":"status-badge-warn"}`,children:v.status}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>["GET","HEAD","OPTIONS"].includes(v.method.toUpperCase())?void g(v):m(v),disabled:o===v.id,children:o===v.id?l("Checking…"):l("Run API")}),u[v.id]&&n.jsx("div",{className:"api-result",children:u[v.id]})]},v.id))}),p&&n.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal",role:"dialog","aria-modal":"true","aria-labelledby":"unsafe-api-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Protected API action")}),n.jsxs("h2",{id:"unsafe-api-title",children:[l("Run")," ",p.method.toUpperCase()," ",l("once?")]})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>m(void 0),"aria-label":l("Close"),children:"×"})]}),n.jsxs("div",{className:"modal-body",children:[n.jsx("p",{children:l("This request can create, update, or delete data. LazyScout will send it only once for this run.")}),n.jsx("code",{className:"block break-all",children:p.url})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>m(void 0),children:l("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{m(void 0),g(p,!0)},children:l("Run once")})]})]})})]})}function D2({view:a,onChange:s,counts:l}){const{t:o,language:c,ui:u}=Le(),f=a==="queue"?"map":a==="case-run"?"automation":a,p=c==="th"?"หน้าในโปรเจกต์":"Project views",m=[["overview",o("overview"),"overview"],["qa","AI Scout","spark"],["testcases",o("testCases"),"cases",l.cases],["map",c==="th"?"แผนที่เว็บ":"Page map","map"],["automation",o("automation"),"play"],["documents",c==="th"?"เอกสาร":"Documents","documents"],["scoutlog",o("scoutLog"),"activity"],["explorer",o("explorer"),"globe",l.states],["loadtest",u("Load Test"),"gauge"]];return n.jsxs("nav",{className:"workspace-nav","aria-label":p,children:[n.jsxs("label",{className:"view-picker",children:[n.jsx("span",{children:p}),n.jsx("select",{value:f,onChange:g=>s(g.target.value),children:m.map(([g,v,,y])=>n.jsxs("option",{value:g,children:[v,y!==void 0?` (${y})`:""]},g))})]}),m.map(([g,v,y,j])=>n.jsxs("button",{type:"button","aria-label":j===void 0?v:`${v} ${j}`,"aria-current":f===g?"page":void 0,"aria-haspopup":g==="explorer"?"dialog":void 0,className:[f===g?"is-active":"",g==="qa"?"ai-workspace-nav-tab":""].filter(Boolean).join(" "),onClick:()=>s(g),children:[n.jsx(nt,{name:y}),v,j!==void 0&&n.jsx("small",{children:j})]},g))]})}function L2(a,s,l,o){const c=(p,m)=>a?p:m,u={selector:'[data-help="project-name"]',title:c("ตั้งชื่อโปรเจกต์","Name the project"),body:c("ใช้ชื่อเว็บหรือชุดงานที่จำได้ง่าย เว้นว่างได้ถ้าอยากเริ่มเลย","Use a site or suite name you will recognise, or leave it blank to get started.")};if(s)return[{title:c("ลองโปรเจกต์ตัวอย่าง","Try the sample project"),icon:"cases",steps:[{selector:'[data-help="sample"]',title:c("เปิดเคสที่เตรียมไว้","Open the sample cases"),body:c("กดปุ่มที่สว่างเพื่อเปิดรายการ แล้วแตะชื่อเคสเพื่ออ่านขั้นตอนการทดสอบล็อกอิน","Choose the highlighted button to open the list, then select a case to read its login steps.")}]},{title:c("เริ่มจากเว็บไซต์ของฉัน","Start with my website"),icon:"globe",steps:[u,{selector:'[data-help="new-scout"]',title:c("เลือกสำรวจเว็บไซต์","Choose Scout a website"),body:c("เปิดพื้นที่ทำงานสำหรับกรอก URL จากนั้นคุณเลือกได้ว่าจะเริ่มสำรวจเมื่อไร","Open a workspace to enter your URL. You choose when to start the Scout.")}]},{title:c("สร้างชุดเคสเปล่า","Create an empty suite"),icon:"plus",steps:[u,{selector:'[data-help="empty-project"]',title:c("สร้างโปรเจกต์เปล่า","Create the empty project"),body:c("เริ่มจากรายการว่างเพื่อเขียนเคสเอง หรือนำเข้าชุดเคสจากไฟล์","Start with an empty list and write your own cases or import a file.")}]}];const f=[];return l&&f.push({page:"overview",icon:"globe",title:c("สำรวจเว็บไซต์","Scout a website"),steps:[{selector:"#target-url",title:c("ใส่ URL ที่จะทดสอบ","Enter the target URL"),body:c("ใส่ที่อยู่เต็มของหน้าแรกที่ต้องการให้ Scout เปิด เช่น https://example.com/shop","Enter the full address of the first page for Scout to visit, such as https://example.com/shop.")},{selector:"#max-pages",title:c("กำหนดจำนวนหน้า","Set a page limit"),body:c("ถ้าลองครั้งแรก ใช้จำนวนน้อยก่อนเพื่อให้ตรวจผลได้เร็ว","For a first run, use a small limit so you can review the results quickly.")},{selector:".scout-submit",title:c("เริ่มสำรวจเมื่อพร้อม","Start when ready"),body:c("ปุ่มนี้เริ่มสำรวจตาม URL และขอบเขตที่เลือก กดจบคำแนะนำเพื่อกลับไปตรวจค่าก่อนได้","This button starts Scout with your URL and scope. Finish the tour to review your settings first.")}]}),o&&f.push({page:"testcases",icon:"cases",title:c("ค้นหาและเปิดเคสทดสอบ","Find and open test cases"),steps:[{selector:"#search",title:c("ค้นหาจากชื่อหรือรหัส","Find a case"),body:c("พิมพ์ชื่อหรือรหัสเพื่อลดรายการที่เห็น ลบคำค้นเพื่อดูทุกเคสอีกครั้ง","Type a title or case ID to narrow the list. Clear the search to see all cases again.")},{selector:".case-open",optional:!0,title:c("เปิดอ่านเคส","Read a case"),body:c("แตะชื่อหรือรหัสเพื่อดูขั้นตอนและผลที่คาดหวัง กด Escape หรือปิดเพื่อกลับมารายการเดิม","Select the title or ID to see the steps and expected result. Close the detail to return to this list.")},{selector:'[data-help="add-case"]',title:c("เพิ่มเคสของคุณ","Add your own case"),body:c("เปิดแบบฟอร์มเพื่อเขียนเคสใหม่ แล้วกดบันทึกเมื่อกรอกเสร็จ","Open a draft to write a new case. Save it when you are ready.")},{selector:".case-tools summary",title:c("ใช้เครื่องมือของชุดเคส","Use the case tools"),body:c("เปิดส่วนนี้เพื่อกรองเคส นำเข้าไฟล์ หรือบันทึกขั้นตอน ปุ่มส่งออกอยู่ถัดลงมาข้างจำนวนเคส","Expand this section to filter cases, import a file or record a flow. The export buttons are beside the case count below.")}]}),f.push({page:"qa",icon:"spark",title:c("เชื่อม AI Scout","Connect AI Scout"),steps:[{selector:'[data-help="provider"]',title:c("เลือกผู้ให้บริการ","Choose a provider"),body:c("เลือกกฎบนเครื่องเพื่อเริ่มทันที หรือเลือกผู้ให้บริการ AI แล้วทำตามขั้นตอนเชื่อมต่อที่ปรากฏ","Choose local rules to start immediately, or select an AI provider and follow its connection steps.")},{selector:'[data-help="mcp"]',title:c("ตั้งค่า MCP สำหรับ Codex","Set up MCP for Codex"),body:c("เปิดส่วนนี้ถ้าต้องการใช้ Codex กับโปรเจกต์นี้ คุณเลือกสิทธิ์ได้ตอนตั้งค่า","Open this section to use Codex with this project and choose its permissions during setup.")}]},{page:"map",icon:"map",title:c("ดูแผนที่และตัวอย่างเว็บ","Explore the page map"),steps:[{selector:".page-picker select",optional:!0,title:c("เลือกหน้าในแผนที่","Pick a page"),body:c("เลือก URL ที่สนใจเพื่อดูเคสของหน้านั้น","Select a URL to see the cases linked to that page.")},{selector:".map-segments button:last-child",optional:!0,title:c("เปิดตัวอย่างเว็บ","Preview the page"),body:c("สลับจากแผนที่ไปยังหน้าเว็บ ถ้าเว็บบล็อกการแสดงตัวอย่าง ให้ใช้ปุ่มเปิดแท็บใหม่","Switch from the map to the page preview. If the site blocks embedding, use Open in new tab.")},{selector:".map-empty button",optional:!0,title:c("เพิ่มเว็บให้แผนที่","Set up the first page"),body:c("แผนที่ยังว่าง เริ่มจากตั้งค่าเว็บไซต์ที่จะทดสอบ","The map is empty. Start by setting up the site you want to test.")}]},{page:"documents",icon:"documents",title:c("หาเอกสารของโปรเจกต์","Find project documents"),steps:[{selector:".document-library header button",title:c("อัปเดตรายการเอกสาร","Refresh the document list"),body:c("หลังบันทึกรายงานผ่าน MCP ให้กดรีเฟรช แล้วเลือกดูตัวอย่างหรือดาวน์โหลดไฟล์ที่ต้องการ","After saving a report through MCP, refresh the list, then preview or download the file.")}]}),o&&f.push({page:"automation",icon:"play",title:c("เลือกและรันเคสทดสอบ","Select and run test cases"),steps:[{selector:".automation-case-list button",optional:!0,title:c("ตรวจเคสก่อนรัน","Review the case"),body:c("เลือกชื่อเคสเพื่อดูสคริปต์ ใช้ช่องทำเครื่องหมายข้างชื่อเพื่อเลือกเคสที่จะรัน","Choose a case to inspect its script. The checkboxes beside the names select which cases to run.")},{selector:'.automation-header [data-help="start-run"]',title:c("รันเคสที่เลือก","Run the selection"),body:c("ตรวจจำนวนเคสที่เลือกก่อนกดปุ่มรัน ถ้าแค่อยากดูวิธีใช้ ให้กดจบคำแนะนำ","Check the selected case count before activating Run. Choose Finish to leave the tour without starting a run.")}]}),f}function Es(a){return Array.from(document.querySelectorAll(a.selector)).find(s=>s.getClientRects().length>0&&!s.closest("[hidden], [inert]")&&!(a.optional&&s.matches(":disabled")))}const iv=420;function M2(a){const s=[];for(let l=a.parentElement;l;l=l.parentElement)(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)&&s.push({el:l,x:l.scrollLeft,y:l.scrollTop});return s}function U2(a,s,l){const c=(j,b,E)=>Math.max(b,Math.min(j,E)),u=c(a.left,12,innerWidth-s-12),f=a.top+a.height+12,p=a.top-12;if(f+l<=innerHeight-12)return{left:u,top:f};if(p-l>=12)return{left:u,top:p-l};const m=a.left+a.width+12,g=c(a.top,12,innerHeight-l-12);if(m+s<=innerWidth-12)return{left:m,top:g};if(a.left-s-12>=12)return{left:a.left-s-12,top:g};const v=innerHeight-f>=p,y=Math.max(1,v?innerHeight-f-12:p-12);return{left:u,top:v?f:Math.max(12,p-l),maxHeight:y}}function Fy({welcome:a=!1,scout:s=!1,cases:l=!1,onNavigate:o}){const{language:c}=Le(),u=c==="th",[f,p]=L.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",className:"guide-link help-launch","aria-label":u?"ช่วยเหลือแบบทีละขั้น":"Step-by-step help","aria-haspopup":"dialog",onClick:()=>p(!0),children:[n.jsx(nt,{name:"help"}),u?"ช่วยเหลือ":"Help"]}),f&&n.jsx(z2,{topics:L2(u,a,s,l),th:u,onNavigate:o,onClose:()=>p(!1)})]})}function z2({topics:a,th:s,onNavigate:l,onClose:o}){const c=L.useRef(null),u=L.useRef(null),f=L.useRef(null),[p,m]=L.useState(),[g,v]=L.useState([]),[{index:y,backwards:j},b]=L.useState({index:0,backwards:!1}),[E,N]=L.useState(),A=L.useRef(void 0),[w,S]=L.useState(!1),[O,D]=L.useState({width:320,height:190}),M=g[y];L.useLayoutEffect(()=>{const Z=c.current;return Z.showModal(),()=>Z.close()},[]),L.useLayoutEffect(()=>{b({index:0,backwards:!1}),v(p?.steps.filter(Z=>!Z.optional||Es(Z))??[])},[p]),L.useLayoutEffect(()=>{const Z=A.current;if(A.current=M,!M){N(void 0),S(!1);return}const $=window.matchMedia("(prefers-reduced-motion: reduce)");let B=0,J=!1;const z=()=>{const W=Es(M);if(!W){N(void 0);return}const R=W.getBoundingClientRect(),Y=Math.max(2,R.left-4),x=Math.max(2,R.top-4),C=Math.min(innerWidth-2,R.right+4),q=Math.min(innerHeight-2,R.bottom+4);N(C>Y&&q>x?{left:Y,top:x,width:C-Y,height:q-x}:void 0)},H=()=>{cancelAnimationFrame(B),J=!1,S(!1),Es(M)?.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),z()},T=Es(M);if(T&&Z&&Z!==M&&!$.matches){const W=M2(T);T.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"}),z();const R=W.map(({el:C,x:q,y:I})=>({el:C,x:q,y:I,dx:C.scrollLeft-q,dy:C.scrollTop-I})).filter(({dx:C,dy:q})=>C||q);for(const{el:C,x:q,y:I}of R)C.scrollTo({left:q,top:I,behavior:"instant"});J=!0,S(!0);const Y=performance.now(),x=C=>{const q=Math.min(1,Math.max(0,(C-Y)/iv)),I=q*q*(3-2*q);for(const{el:ee,x:he,y:_e,dx:Ne,dy:le}of R)ee.scrollTo({left:he+Ne*I,top:_e+le*I,behavior:"instant"});q<1?B=requestAnimationFrame(x):(J=!1,S(!1),z())};B=requestAnimationFrame(x)}else H();f.current?.focus({preventScroll:!0});const K=()=>{J||z()},V=new ResizeObserver(K);T&&V.observe(T),V.observe(document.documentElement);const Q=new MutationObserver(W=>{W.some(R=>!c.current?.contains(R.target))&&K()});return Q.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("scroll",K,!0),window.addEventListener("resize",H),$.addEventListener("change",H),()=>{cancelAnimationFrame(B),V.disconnect(),Q.disconnect(),document.removeEventListener("scroll",K,!0),window.removeEventListener("resize",H),$.removeEventListener("change",H)}},[M]),L.useLayoutEffect(()=>{const Z=u.current;if(!Z)return;const $=()=>D({width:Z.parentElement.offsetWidth,height:Z.offsetHeight+2});$();const B=new ResizeObserver($);return B.observe(Z),()=>B.disconnect()},[p,M]);function F(){const Z=M&&Es(M);if(!(w||!Z||Z.matches(":disabled")))if(c.current?.close(),o(),Z.focus({preventScroll:!0}),Z instanceof HTMLSelectElement)try{Z.showPicker()}catch{}else!(Z instanceof HTMLInputElement)&&!(Z instanceof HTMLTextAreaElement)&&Z.click()}const X=E?U2(E,O.width,O.height):void 0;return n.jsx("dialog",{ref:c,className:"help-dialog"+(p&&E?" has-highlight":""),"data-sliding":w,style:{"--help-slide-duration":`${iv}ms`},"aria-label":s?"ช่วยเหลือ LazyScout":"LazyScout help",onCancel:Z=>{Z.preventDefault(),Z.stopPropagation(),o()},onClick:Z=>{Z.target===Z.currentTarget&&o()},children:p?n.jsxs(n.Fragment,{children:[E&&n.jsx("button",{type:"button",className:"help-hotspot",style:{transform:`translate3d(${E.left}px, ${E.top}px, 0)`,width:E.width,height:E.height},disabled:w||!M||Es(M)?.matches(":disabled"),"aria-label":s?`ลองใช้: ${M?.title}`:`Try: ${M?.title}`,onClick:F}),n.jsx("section",{className:"help-card"+(X?"":" is-centered"),style:X&&{transform:`translate3d(${X.left}px, ${X.top}px, 0)`,height:Math.min(O.height,X.maxHeight??innerHeight-24)},children:n.jsxs("div",{ref:u,className:"help-card-body",children:[n.jsxs("header",{children:[n.jsxs("button",{type:"button",className:"help-topics-back",onClick:()=>m(void 0),children:[n.jsx(nt,{name:"back"}),s?"เลือกหัวข้อ":"Topics"]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":s?"ปิดคำแนะนำ":"Close tour",onClick:o,children:n.jsx(nt,{name:"close"})})]}),n.jsxs("div",{className:"help-step-copy","data-backwards":j,"aria-live":"polite",children:[M&&n.jsxs("small",{children:[p.title," · ",y+1,"/",g.length]}),n.jsx("h2",{ref:f,tabIndex:-1,children:M?.title??p.title}),n.jsx("p",{children:E&&M?M.body:s?"ปุ่มนี้ยังไม่พร้อมในหน้าปัจจุบัน เลือกขั้นถัดไปหรือกลับไปเลือกหัวข้อได้":"This control is unavailable in the current view. Continue or choose another topic."})]},M?.selector),n.jsxs("footer",{children:[y>0&&n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>b({index:y-1,backwards:!0}),children:s?"ย้อนกลับ":"Back"}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>y+1<g.length?b({index:y+1,backwards:!1}):o(),children:y+1<g.length?s?"ถัดไป":"Next":s?"จบคำแนะนำ":"Finish"})]})]})})]}):n.jsxs("section",{className:"help-menu",children:[n.jsxs("header",{children:[n.jsx("h2",{children:s?"อยากทำอะไร?":"What would you like to do?"}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":s?"ปิด":"Close",onClick:o,children:n.jsx(nt,{name:"close"})})]}),n.jsx("p",{children:s?"เลือกงาน แล้วแตะปุ่มที่สว่างเพื่อลองใช้ หรือกดถัดไปเพื่อดูก่อน":"Choose a task. Select the highlighted control to use it, or choose Next to look ahead."}),n.jsx("div",{className:"help-topics",children:a.map(Z=>n.jsxs("button",{type:"button",onClick:()=>{Z.page&&l?.(Z.page),m(Z)},children:[n.jsx(nt,{name:Z.icon}),n.jsx("span",{children:Z.title}),n.jsx(nt,{name:"next"})]},Z.title))}),n.jsxs("a",{href:`/guide/index.html?lang=${s?"th":"en"}`,target:"_blank",rel:"noreferrer",children:[s?"อ่านคู่มือฉบับเต็ม":"Read the full guide"," ",n.jsx(nt,{name:"external"})]})]})})}function B2({projectId:a,detailsRef:s}){const{ui:l,language:o}=Le(),c=o==="th",[u,f]=L.useState(),[p,m]=L.useState(!1),[g,v]=L.useState(""),[y,j]=L.useState(!1),[b,E]=L.useState(!1),[N,A]=L.useState("");async function w(){if(!(u||y)){j(!0),v("");try{f(await sj(a))}catch(B){v(B instanceof Error?B.message:"Could not prepare MCP settings.")}finally{j(!1)}}}const S=u?.command,O=u?.names[p?"run":"read"],D=u?[...u.args,...p?["--allow-qa-write"]:[]]:[],M=S&&O?`[mcp_servers.${O}]
53
- command = ${JSON.stringify(S)}
54
- args = ${JSON.stringify(D)}`:void 0,F=B=>`'${B.replaceAll("'",u?.platform==="win32"?"''":`'"'"'`)}'`,X=S&&O?`codex mcp add ${O} -- ${[S,...D].map(F).join(" ")}`:void 0;async function Z(){E(!0),A(""),v("");try{const B=await ij(a,p);v(c?`ตั้งค่า ${B.name} แล้ว เปิด Codex ใหม่เพื่อโหลด MCP`:`Configured ${B.name}. Reopen Codex to load the MCP server.`)}catch(B){A(B instanceof Error?B.message:"Could not connect Codex MCP.")}finally{E(!1)}}function $(B){if(!navigator.clipboard){v("Select and copy the settings above.");return}navigator.clipboard.writeText(B).then(()=>v("Copied.")).catch(()=>v("Select and copy the settings above."))}return n.jsxs("details",{ref:s,id:"local-mcp",className:"scroll-mt-6 rounded-2xl border border-indigo-200 bg-indigo-50/75 p-5 text-slate-900",onToggle:B=>{B.currentTarget.open&&w()},children:[n.jsx("summary",{className:"cursor-pointer font-semibold text-indigo-950",children:c?"เชื่อม MCP บนเครื่อง":"Connect a local MCP client"}),n.jsx("p",{className:"mt-2 text-sm text-slate-600",children:c?"ให้ Codex อ่านข้อมูลจากโปรเจกต์นี้ผ่าน MCP บนเครื่อง เลือกเพิ่มสิทธิ์รัน Scout ได้ด้านล่าง":"Give Codex read access to this project over local MCP. Optionally allow Scout runs below."}),y&&n.jsx("p",{role:"status",children:l("Preparing MCP settings…")}),M&&n.jsxs("div",{className:"mt-4 grid gap-3",children:[n.jsxs("label",{className:"flex items-start gap-2 text-sm",children:[n.jsx("input",{type:"checkbox",checked:p,disabled:b,onChange:B=>{m(B.target.checked),v("")}})," ",c?"อนุญาตให้รัน Scout และสร้างรายงานในโปรเจกต์นี้":"Allow Scout runs and report creation in this project"]}),n.jsx("button",{type:"button",disabled:b,onClick:()=>{Z()},className:"justify-self-start rounded-xl bg-indigo-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-indigo-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:opacity-60",children:b?c?"กำลังเชื่อม…":"Connecting…":c?"ตั้งค่า Codex MCP อัตโนมัติ":"Set up Codex MCP automatically"}),n.jsxs("details",{className:"rounded-xl border border-indigo-100 bg-white p-3",children:[n.jsx("summary",{className:"cursor-pointer text-sm font-medium text-indigo-800",children:c?"ตั้งค่าเองหรือใช้ MCP client อื่น":"Manual setup or another MCP client"}),n.jsx("pre",{className:"mt-3 overflow-auto whitespace-pre-wrap break-all rounded-lg bg-slate-950 p-3 text-xs text-slate-100",children:M}),n.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[X&&n.jsx("button",{type:"button",className:"btn",onClick:()=>$(X),children:l("Copy Codex command")}),n.jsx("button",{type:"button",className:"btn",onClick:()=>$(M),children:l("Copy MCP settings")})]})]})]}),N&&n.jsx("p",{role:"alert",className:"mt-3 text-sm font-medium text-red-800",children:N}),g&&n.jsx("p",{role:"status",className:"mt-3 text-sm font-medium text-emerald-800",children:g})]})}const I2={"failed-interactions":{en:"Check the failed interactions and confirm their expected behavior.",th:"ตรวจการโต้ตอบที่ล้มเหลวและยืนยันว่าพฤติกรรมที่คาดไว้คืออะไร"},"blocked-interactions":{en:"Review why some interactions were blocked and which need a manual check.",th:"ดูสาเหตุที่การโต้ตอบถูกบล็อกและเลือกรายการที่ต้องตรวจด้วยตัวเอง"},"unexplored-interactions":{en:"Review discovered interactions that Scout has yet to explore.",th:"ตรวจการโต้ตอบที่พบแต่ Scout ยังไม่ได้สำรวจ"},"review-test-cases":{en:"Review the drafted Test Cases and confirm their assertions.",th:"ทบทวน Test Case ที่ร่างไว้และยืนยันเงื่อนไขที่ต้องตรวจ"},"review-scope":{en:"Compare the approved scope and observed pages with your testing goals.",th:"เทียบขอบเขตที่อนุมัติและหน้าที่สำรวจกับเป้าหมายการทดสอบ"}};function P2({providerLabel:a,external:s,request:l}){const{language:o}=Le(),c=o==="th",u=L.useRef(null),[f,p]=L.useState(!1),[m,g]=L.useState(""),[v,y]=L.useState();L.useEffect(()=>()=>u.current?.abort(),[]);async function j(){if(u.current)return;const b=new AbortController;u.current=b,p(!0),g("");try{y(await l(b.signal))}catch(E){b.signal.aborted||g(E instanceof Error?E.message:c?"ขอคำแนะนำไม่สำเร็จ":"Could not review the run.")}finally{u.current=null,b.signal.aborted||p(!1)}}return n.jsxs("section",{className:"grid gap-3 rounded-2xl border border-indigo-100 bg-indigo-50/55 p-4 text-sm text-slate-800",children:[n.jsx("h3",{className:"font-semibold text-indigo-950",children:c?"ให้ AI ช่วยจัดลำดับการตรวจต่อ":"AI review priorities"}),v?n.jsxs(n.Fragment,{children:[n.jsx("ol",{className:"list-decimal space-y-1 pl-5","aria-live":"polite",children:v.priorities.map(b=>n.jsx("li",{children:I2[b][o]},b))}),n.jsx("p",{className:"text-xs text-slate-600",children:c?"คำแนะนำสำหรับตรวจต่อ ผลทดสอบจริงอยู่ในรายงาน":"Review suggestions. Recorded test outcomes are in the report."}),v.usage&&n.jsx("p",{className:"text-xs text-slate-600",children:c?`โทเคนเข้า ${v.usage.inputTokens??"—"} · ออก ${v.usage.outputTokens??"—"}`:`AI tokens · ${v.usage.inputTokens??"—"} input · ${v.usage.outputTokens??"—"} output`})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{children:s?c?`ปุ่มนี้จะส่งเฉพาะจำนวนหน้า สถานะ UI การโต้ตอบ และ Test Case ไปยัง ${a}`:`This sends only page, UI state, interaction, and Test Case counts to ${a}.`:c?`วิเคราะห์ตัวเลขสรุปของรอบนี้ด้วย ${a} บนเครื่อง`:`Review this run's aggregate counts with ${a} on this device.`}),n.jsx("button",{type:"button",className:"qa-button justify-self-start border border-indigo-200 bg-white text-indigo-800 hover:bg-indigo-50",disabled:f,onClick:()=>{j()},children:f?c?"กำลังจัดลำดับ…":"Reviewing…":s?c?"ส่งตัวเลขให้ AI วิเคราะห์":"Send counts for AI review":c?"วิเคราะห์บนเครื่อง":"Review counts locally"}),m&&n.jsx("p",{role:"alert",className:"text-red-800",children:m})]})]})}const lv=[["test-cases","Test Cases"],["coverage","UI Coverage"],["playwright","Playwright Automation"],["cypress","Cypress Automation"],["bug-draft","Bug Report Draft"],["execution-report","Recorded Test Execution"],["summary","Test Summary"],["excel","Excel"]],ov=["Summary","Test Cases","UI Coverage","Coverage Gaps","Execution Results","Bug Reports"],$2=[["local","Free on this device"],["free-tier","Cloud with a free tier"],["cloud","Cloud · billing depends on your plan"],["custom","Other endpoints"]],Di="min-w-0 rounded-2xl border border-slate-200 bg-white p-5 shadow-sm sm:p-6",Li="qa-button bg-indigo-700 text-white shadow-sm hover:bg-indigo-800",In="qa-button border border-indigo-200 bg-white text-indigo-800 hover:bg-indigo-50",jo="__manual__",q2={prepare:"กำลังตรวจโปรเจกต์และขอบเขตที่อนุมัติ","verify-session":"ยืนยันว่าพร้อมใช้เซสชันของโปรเจกต์แล้ว","reuse-observations":"กำลังใช้ผลสำรวจที่บันทึกไว้",scout:"กำลังสำรวจหน้าที่อนุมัติและลองการโต้ตอบที่ปลอดภัย","draft-test-cases":"กำลังร่างเคสทดสอบจากผลสำรวจ","analyze-coverage":"กำลังวิเคราะห์ความครอบคลุมของการสำรวจ","prepare-outputs":"กำลังบันทึกผลและไฟล์ที่เลือก"};function bd({step:a,title:s,hint:l}){return n.jsxs("header",{className:"mb-4 flex items-start gap-3",children:[n.jsx("span",{"aria-hidden":"true",className:"grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-indigo-100 text-sm font-bold text-indigo-800",children:a}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-base font-bold text-slate-950",children:s}),n.jsx("p",{className:"mt-0.5 text-sm text-slate-600",children:l})]})]})}function H2(a){try{return["localhost","127.0.0.1","[::1]"].includes(new URL(a??"").hostname)}catch{return!1}}function G2({projectId:a,targetUrl:s,onComplete:l,onSetTarget:o,onOpenSessionSettings:c}){const{ui:u,language:f}=Le(),p=f==="th",m=L.useRef(null),g=L.useRef(null),[v,y]=L.useState(""),[j,b]=L.useState(!1),[E,N]=L.useState(!1),[A,w]=L.useState(""),[S,O]=L.useState(""),[D,M]=L.useState(""),[F,X]=L.useState(""),[Z,$]=L.useState("auto"),[B,J]=L.useState({kind:"rules"}),[z,H]=L.useState(!1),[T,K]=L.useState(""),[V,Q]=L.useState(),[W,R]=L.useState(!0),[Y,x]=L.useState(""),[C,q]=L.useState(!1),[I,ee]=L.useState(""),[he,_e]=L.useState({state:"disconnected"}),[Ne,le]=L.useState(!1),[Ce,ye]=L.useState(!1),[Fe,Ue]=L.useState(!1),[k,pe]=L.useState(""),[ce,G]=L.useState(""),[P,ne]=L.useState(!1),[xe,ge]=L.useState(!1),[se,Te]=L.useState(20),[Ee,we]=L.useState(["test-cases","coverage"]),[ke,qe]=L.useState(),[fe,ze]=L.useState(),[$e,Ve]=L.useState([]),[rt,et]=L.useState(!1),[ht,pt]=L.useState(ov),[Oe,Et]=L.useState(),[Tt,Ze]=L.useState(""),[dt,st]=L.useState(""),[Ut,mt]=L.useState(!1),[zt,Qe]=L.useState(!1),He=Lo[B.kind],Xt=He.tier==="free-tier"||He.tier==="cloud"||He.tier==="custom"&&!H2(B.baseUrl),tt=B.kind!=="rules"&&!(B.model?.trim()||!rt&&He.defaultModel),Ge=B.kind==="codex",Ie=he.state==="pending"&&"loginId"in he?he:void 0,Ye=Oe?.status==="queued"||Oe?.status==="running",$n=Ye?Oe.events.at(-1):void 0,qn=Ye?Oe.progress:void 0,Bt=zt||j||Ye||!V,Zt=Xt&&!P,Ma=Ge&&he.state!=="connected",ln=V?.connection,Kt=!!(ln&&ln.provider.kind===B.kind&&(ln.provider.baseUrl??"")===(B.baseUrl?.trim()??"")&&Date.parse(ln.expiresAt)>Date.now()),jt=He.key==="required"&&!C&&!Kt&&!T.trim(),Qt=z&&!tt&&!Zt&&!Ma&&!jt,Jt=!Bt&&Qt,Ua=Jt&&!!(s&&v.trim()),on=B.kind==="rules",Hn=Ge?"ChatGPT / Codex":He.label,pn=He.key==="none"?void 0:T.trim()||void 0,En={projectId:a,apiKey:pn,useSavedKey:Kt&&!pn},bn=Array.from(new Set([...He.defaultModel?[He.defaultModel]:[],...$e])),tn=B.model??He.defaultModel??"",Gn=rt||!bn.length||!!(tn&&!bn.includes(tn)),ga=Ut||Oe?.error?.code==="auth-not-ready";L.useEffect(()=>{let re=!1;return ej(a).then(Ae=>{re||(Q(Ae),Ae.connection&&J(Ae.connection.provider))}).catch(()=>{re||Q({supported:!1})}),()=>{re=!0}},[a]),L.useEffect(()=>{if(!ln)return;const re=window.setTimeout(()=>{Q(Ae=>Ae?.connection?.expiresAt===ln.expiresAt?{supported:Ae.supported}:Ae),Kt&&!pn&&H(!1)},Math.max(0,Date.parse(ln.expiresAt)-Date.now()));return()=>window.clearTimeout(re)},[ln?.expiresAt,Kt,pn]),L.useEffect(()=>{if(He.key!=="required"||Zt)return;let re=!1;return W0(B.kind).then(({configured:Ae})=>{re||q(Ae)}).catch(()=>{re||q(!1)}),()=>{re=!0}},[B.kind,He.key,Zt]),L.useEffect(()=>{if(!Oe||!Ye)return;let re=!1,Ae=!1;const $t=window.setInterval(()=>{Ae||(Ae=!0,oj(a,Oe.id).then(async Dt=>{re||(Et(Dt),Dt.status==="completed"&&await l(a))}).catch(Dt=>{re||st(Dt instanceof Error?Dt.message:String(Dt))}).finally(()=>{Ae=!1}))},1500);return()=>{re=!0,window.clearInterval($t)}},[a,Oe?.id,Ye]),L.useEffect(()=>{if(!Ge||Zt)return;let re=!1;return le(!0),jg().then(Ae=>{re||(_e(Ae),Ae.state==="connected"&&An())}).catch(Ae=>{re||_e({state:"failed",message:Ae instanceof Error?Ae.message:String(Ae)})}).finally(()=>{re||le(!1)}),()=>{re=!0}},[Ge,Zt]),L.useEffect(()=>{if(Zt||he.state!=="pending")return;let re=!1,Ae=!1;const $t=window.setInterval(()=>{Ae||(Ae=!0,jg(Ie?.loginId).then(Dt=>{re||Dt.state==="pending"||(_e(Dt),Dt.state==="connected"&&An())}).catch(()=>{re||_e({state:"failed",message:"Could not check the sign-in. Start again."})}).finally(()=>{Ae=!1}))},1800);return()=>{re=!0,window.clearInterval($t)}},[he.state,Zt,Ie?.loginId]);function ot(){qe(void 0),ze(void 0),Ze(""),st(""),w(""),ee("")}function _t(re){return!(re instanceof yn)||!["missing-api-key","invalid-api-key","access-denied"].includes(re.code)?!1:(H(!1),re.code==="missing-api-key"&&En.useSavedKey&&Q(Ae=>Ae&&{supported:Ae.supported}),ee(re.message),!0)}async function xr(){if(!Jt)return;b(!0),w(""),ee("");const re=Z==="auto"?new RegExp("\\p{Script=Thai}","u").test(v)?"th":f:Z;try{const Ae=await J0({topic:v,language:re,provider:B,...En,allowExternal:P});ot(),y(Ae.instruction)}catch(Ae){_t(Ae)||w(Ae instanceof Error?Ae.message:String(Ae))}finally{b(!1)}}async function jr(){if(Ua){Qe(!0),st(""),ee(""),mt(!1),Ze(""),qe(void 0),Et(void 0);try{const re=await Q0({instruction:v,startPath:D||void 0,scopePath:F||void 0,language:Z==="auto"?void 0:Z,outputs:Ee,provider:B,...En,allowExternal:P,reuseObservations:xe,maxPages:se});qe(re.plan),ze(re.usage),re.providerWarningReason?Ze({rulePlanReason:re.providerWarningReason}):re.providerWarning&&Ze(re.providerWarning)}catch(re){_t(re)||st(re instanceof Error?re.message:String(re))}finally{Qe(!1)}}}async function kn(){Qe(!0),st("");try{await o(a,S)}catch(re){st(re instanceof Error?re.message:String(re))}finally{Qe(!1)}}async function Fn(){Qe(!0),ot(),x("");try{const re=await xg(B,P,En);if(Ve(re.models),H(re.available),re.available){const Ae={...B,model:B.model?.trim()||He.defaultModel||re.models[0]};if(J(Ae),W&&V?.supported&&pn)try{Q(await tj(a,Ae,pn)),K("")}catch{x("The key could not be saved. This connection is available in the current tab.")}Ze({en:`Connected (${re.local?"local":"external"}). Models available: ${re.models.length}.`,th:`เชื่อมต่อ${re.local?"บริการในเครื่อง":"บริการภายนอก"}แล้ว พบ ${re.models.length} โมเดล`})}else(!re.error||!_t(new yn(re.error.code,re.error.message)))&&ee(re.error?.message??"Could not connect.")}catch(re){H(!1),_t(re)||ee(re instanceof Error?re.message:String(re))}finally{Qe(!1)}}async function Sr(){Qe(!0),x("");try{await nj(a),Q(re=>re&&{supported:re.supported}),pn||H(!1),ot()}catch{x("Could not remove the saved key.")}finally{Qe(!1)}}async function An(){Qe(!0),ot();try{const re=await xg({kind:"codex"},P);if(Ve(re.models),H(re.available),!re.available){ee(re.error?.message??"Could not load models from Codex.");return}J(Ae=>Ae.kind==="codex"?{...Ae,model:Ae.model??re.models[0]}:Ae),Ze({en:`ChatGPT connected. Models available: ${re.models.length}.`,th:`เชื่อมต่อ ChatGPT แล้ว พบ ${re.models.length} โมเดล`})}catch(re){H(!1),ee(re instanceof Error?re.message:String(re))}finally{Qe(!1)}}async function va(){if(!Zt){ot(),G(""),Qe(!0),ye(!0);try{const re=await aj();_e(re),re.state==="connected"&&await An()}catch(re){_e({state:"failed",message:re instanceof Error?re.message:String(re)})}finally{ye(!1),Qe(!1)}}}async function Us(){if(Ie){Qe(!0);try{_e(await sd(Ie.loginId))}catch(re){st(re instanceof Error?re.message:String(re))}finally{Qe(!1)}}}async function za(){Qe(!0),pe("");try{const re=await rj();ot(),_e(re),H(!1),J({kind:"codex"}),Ve([]),et(!1),Ue(!1),Ze("Signed out of Codex on this device.")}catch(re){pe(re instanceof Error?re.message:String(re))}finally{Qe(!1)}}async function Ba(){if(!(!ke||zt)){Qe(!0),N(!0),st(""),mt(!1);try{Et(await lj(a,ke.id))}catch(re){re instanceof yn&&re.code==="auth-not-ready"?mt(!0):st(re instanceof Error?re.message:String(re))}finally{N(!1),Qe(!1)}}}async function mn(){if(Oe){Qe(!0),st("");try{Et(await cj(a,Oe.id))}catch(re){st(re instanceof Error?re.message:String(re))}finally{Qe(!1)}}}return n.jsxs("section",{className:"grid min-w-0 grid-cols-1 gap-4","aria-label":u("AI Scout workspace"),children:[n.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-5 rounded-2xl border border-indigo-200 bg-linear-to-br from-indigo-950 via-indigo-900 to-indigo-700 p-6 text-white shadow-sm sm:p-7",children:[n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("span",{"aria-hidden":"true",className:"grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-white/15 text-xl",children:"✦"}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold tracking-tight sm:text-3xl",children:"AI Scout"}),n.jsx("p",{className:"mt-1 text-sm text-indigo-100",children:p?"เชื่อมผู้ให้บริการ AI หรือใช้กฎบนเครื่อง จากนั้นเขียนงาน QA และตรวจแผนก่อนรัน":"Connect an AI provider or use local rules. Describe the QA task and review its plan before running."})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("a",{href:"#local-mcp",onClick:()=>{m.current&&(m.current.open=!0)},"data-help":"mcp",className:"qa-button bg-white text-indigo-950 hover:bg-indigo-50",children:p?"ตั้งค่า MCP":"Set up MCP"}),n.jsxs("a",{href:`/guide/index.html?lang=${f}`,target:"_blank",rel:"noreferrer",className:"qa-button border border-white/30 text-white hover:bg-white/10",children:[p?"คู่มือ 5 ขั้น":"5-step guide"," ",n.jsx("span",{"aria-hidden":"true",children:"↗"})]})]})]}),n.jsxs("form",{onSubmit:re=>{re.preventDefault(),jr()},className:"qa-workspace-form grid grid-cols-1 items-start gap-4 lg:grid-cols-[minmax(0,0.84fr)_minmax(0,1.16fr)]",children:[n.jsxs("section",{className:Di,children:[n.jsx(bd,{step:1,title:p?"เชื่อม AI และเลือกโมเดล":"Connect AI & choose a model",hint:p?"เริ่มด้วยกฎบนเครื่องได้ทันที หรือเลือกผู้ให้บริการด้านล่าง":"Start with local rules or connect a provider below."}),n.jsxs("div",{className:"grid min-w-0 gap-3",children:[n.jsxs("label",{children:[u("Provider"),n.jsx("select",{"data-help":"provider","aria-label":u("Provider"),value:B.kind,disabled:Bt,onChange:re=>{const Ae=re.target.value;S1(Ae)&&(Ie&&sd(Ie.loginId).catch(()=>{}),_e({state:"disconnected"}),le(!1),Ue(!1),pe(""),G(""),ot(),H(!1),ne(!1),K(""),x(""),q(!1),Ve([]),et(!1),J({kind:Ae,model:Lo[Ae].defaultModel}))},children:$2.map(([re,Ae])=>n.jsx("optgroup",{label:u(Ae),children:Object.entries(Lo).filter(([,$t])=>$t.tier===re).map(([$t,Dt])=>n.jsx("option",{value:$t,children:u(Dt.label)},$t))},re))})]}),on&&n.jsx("button",{type:"button",className:In,disabled:Bt||z,onClick:()=>H(!0),children:z?p?"พร้อมใช้กฎบนเครื่อง":"Local rules ready":p?"ใช้กฎบนเครื่อง":"Use local rules"}),(He.tier==="custom"||He.tier==="local"&&!on)&&n.jsxs("label",{children:[u("Base URL"),n.jsx("input",{value:B.baseUrl??"",disabled:Bt,onChange:re=>{ot(),H(!1),ne(!1),Ve([]),K(""),J({...B,baseUrl:re.target.value})},placeholder:He.baseUrl??"http://localhost:8080/v1"})]}),Xt&&n.jsxs("fieldset",{className:"grid min-w-0 gap-2 rounded-xl border border-slate-200 bg-slate-50 p-3",children:[n.jsx("legend",{className:"px-1 text-sm font-semibold text-slate-900",children:p?"1. อนุญาตการเชื่อมต่อ":"1. Allow the connection"}),n.jsxs("label",{className:"qa-check",children:[n.jsx("input",{type:"checkbox",checked:P,disabled:Bt,onChange:re=>{const Ae=re.target.checked;ot(),ne(Ae),Ae||H(!1),Ge&&(Ae||(Ie&&sd(Ie.loginId).catch(()=>{}),_e({state:"disconnected"}),Ue(!1),pe(""),G("")),le(Ae))}}),p?"อนุญาตให้เชื่อมต่อผู้ให้บริการนี้และส่งข้อความเมื่อเจนคำหรือสร้างแผน":"I approve connecting to this provider and sending my text when drafting a prompt or creating a plan."]})]}),Ge&&!Zt&&n.jsxs("section",{className:"grid gap-2 rounded-xl border border-indigo-100 bg-indigo-50 p-3 text-sm text-indigo-950","aria-label":u("ChatGPT connection"),children:[n.jsx("h4",{className:"font-semibold",children:p?"2. ลงชื่อเข้าใช้ ChatGPT":"2. Sign in to ChatGPT"}),Ie?n.jsxs(n.Fragment,{children:[n.jsx("p",{children:p?"กรอกรหัสนี้ที่หน้า OpenAI แล้วกลับมาที่ LazyScout":"Enter this code on the OpenAI page, then return to LazyScout."}),n.jsx("p",{className:"flex w-fit items-center gap-2 rounded-lg border border-indigo-200 bg-white px-3 py-2 font-semibold tracking-widest",children:n.jsx("code",{children:Ie.userCode})}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:In,onClick:async()=>{try{await navigator.clipboard.writeText(Ie.userCode),G("Code copied")}catch{G("Select and copy the code above.")}},children:p?"คัดลอกรหัส":"Copy code"}),n.jsx("a",{className:Li,href:Ie.verificationUrl,target:"_blank",rel:"noreferrer",children:p?"กรอกรหัสที่ OpenAI":"Enter code on OpenAI"})]}),ce&&n.jsx("p",{role:"status",children:u(ce)}),n.jsx("p",{role:"status",children:p?"กำลังรอให้ยืนยันการลงชื่อเข้าใช้…":"Waiting for you to confirm sign-in…"}),n.jsx("button",{type:"button",className:In,disabled:zt,onClick:()=>{Us()},children:p?"ยกเลิกการลงชื่อเข้าใช้":"Cancel sign-in"})]}):he.state==="connected"?n.jsxs(n.Fragment,{children:[n.jsx("p",{role:"status",className:"font-semibold text-emerald-800",children:p?"เชื่อมบัญชี ChatGPT จาก Codex บนเครื่องแล้ว":"ChatGPT connected using the Codex sign-in on this device."}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("a",{className:In,href:"https://chatgpt.com/",target:"_blank",rel:"noreferrer",children:p?"เปิด ChatGPT":"Open ChatGPT"}),!Fe&&n.jsx("button",{type:"button",className:"btn btn-danger",disabled:Bt,onClick:()=>Ue(!0),children:p?"ออกจากบัญชี":"Sign out"})]}),Fe&&n.jsxs("div",{className:"grid gap-2 rounded-lg border border-red-200 bg-white p-3 text-red-950",children:[n.jsx("p",{children:p?"การยืนยันจะออกจากบัญชี ChatGPT ที่ Codex และ LazyScout ใช้ร่วมกันบนเครื่องนี้":"This signs out the ChatGPT account that Codex and LazyScout share on this device."}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-danger",disabled:Bt,onClick:()=>{za()},children:p?"ยืนยันออกจากบัญชี":"Confirm sign out"}),n.jsx("button",{type:"button",className:In,disabled:Bt,onClick:()=>{Ue(!1),pe("")},children:p?"ยกเลิก":"Cancel"})]}),k&&n.jsx("p",{role:"alert",children:k})]})]}):Ne||Ce||he.state==="pending"?n.jsx("p",{role:"status",children:he.state==="pending"?p?"กำลังรอให้ยืนยันการลงชื่อเข้าใช้จากแท็บเดิม…":"Waiting for sign-in from the original tab…":Ce?p?"กำลังขอรหัสลงชื่อเข้าใช้…":"Getting your sign-in code…":p?"กำลังตรวจบัญชี ChatGPT ที่เชื่อมกับ Codex บนเครื่อง…":"Checking the ChatGPT sign-in on this device…"}):n.jsxs(n.Fragment,{children:[he.state==="failed"&&n.jsx("p",{role:"alert",children:he.message&&u(he.message)}),n.jsx("p",{children:p?"ลงชื่อเข้าใช้ที่หน้า OpenAI ด้วยรหัสที่จะขึ้นใน LazyScout":"Sign in on OpenAI with the code shown here."}),n.jsx("button",{type:"button",className:Li,disabled:Bt,onClick:()=>{va()},children:p?"เชื่อม ChatGPT":"Connect ChatGPT"})]})]}),!on&&!Zt&&n.jsxs(n.Fragment,{children:[He.key!=="none"&&n.jsxs("section",{className:"grid gap-2 rounded-xl border border-indigo-200 bg-indigo-50 p-3",children:[He.key==="required"&&n.jsx("h4",{className:"text-sm font-semibold text-indigo-950",children:p?`2. เชื่อม ${Hn} ด้วย API key`:`2. Connect ${Hn} with an API key`}),n.jsxs("label",{children:[u("API key"),He.key==="optional"?p?" (ไม่บังคับ)":" (optional)":"",n.jsx("input",{type:"password",autoComplete:"off",spellCheck:!1,maxLength:1024,disabled:Bt,"aria-describedby":"qa-api-key-help","aria-required":He.key==="required"&&!C&&!Kt,placeholder:p?"วาง API key ที่นี่":"Paste your API key here",value:T,onChange:re=>{ot(),Ve([]),H(!1),K(re.target.value)}})]}),n.jsx("small",{id:"qa-api-key-help",className:"text-slate-600",children:Kt?p?"เว้นว่างเพื่อใช้ API key ที่บันทึกไว้ในโปรเจกต์นี้":"Leave this blank to use the API key saved for this project.":C?p?"เครื่องนี้มี API key ตั้งไว้แล้ว เว้นช่องว่างเพื่อใช้คีย์เดิม หรือกรอกคีย์อื่นแทน":"A key is configured on this device. Leave this blank to use it or paste another key.":He.key==="required"?p?"สร้างคีย์จากบัญชีผู้ให้บริการ แล้วนำมาวางในช่องนี้":"Create a key in your provider account and paste it here.":p?"กรอกเฉพาะเมื่อเซิร์ฟเวอร์นี้ขอ API key":"Enter a key if this server requires one."}),He.keyUrl&&n.jsx("a",{className:"justify-self-start text-sm font-semibold text-indigo-800 underline underline-offset-4",href:He.keyUrl,target:"_blank",rel:"noreferrer",children:p?`เปิดหน้าสร้าง API key ของ ${Hn}`:`Get a ${Hn} API key`}),V?.supported&&n.jsxs("label",{className:"qa-check",children:[n.jsx("input",{type:"checkbox",checked:W,disabled:Bt,onChange:re=>R(re.target.checked)}),p?"จำ API key ในโปรเจกต์นี้ 24 ชั่วโมง":"Remember the API key for this project for 24 hours"]}),Kt&&n.jsx("button",{type:"button",className:In,disabled:Bt,onClick:()=>{Sr()},children:p?"ล้างคีย์ที่บันทึกไว้":"Forget saved key"}),Y&&n.jsx("p",{role:"status",className:"text-xs text-indigo-900",children:u(Y)})]}),He.tier==="free-tier"&&n.jsx("small",{className:"text-slate-600",children:B.kind==="openrouter-free"?"Uses free models only. The provider applies rate limits.":"Free quota depends on the model, region and account plan. Check your provider before running."}),B.kind==="compatible"&&n.jsx("small",{className:"text-slate-600",children:u("External custom URLs must also be configured on the LazyScout server.")}),!jt&&!Ma&&n.jsxs("div",{className:"grid min-w-0 gap-3",children:[Xt&&n.jsx("h4",{className:"text-sm font-semibold text-slate-900",children:p?"3. เลือกโมเดล":"3. Choose a model"}),n.jsx("button",{type:"button",className:In,disabled:Bt||(Ge?Ma:Zt||jt),onClick:()=>{Ge?An():Fn()},children:u(Ge?"Refresh Codex models":"Test connection & load models")}),bn.length>0&&n.jsxs("label",{children:[u("Model"),n.jsxs("select",{"aria-label":u("Model"),disabled:Bt,value:Gn?jo:tn,onChange:re=>{const Ae=re.target.value;ot(),B.kind==="ollama"&&H(!1),et(Ae===jo),J({...B,model:Ae===jo?"":Ae})},children:[n.jsx("option",{value:"",disabled:!0,children:p?"เลือกโมเดล":"Select a model"}),bn.map(re=>n.jsx("option",{value:re,children:re},re)),n.jsx("option",{value:jo,children:p?"กรอก Model ID เอง":"Enter model ID manually"})]})]}),Gn&&n.jsxs("label",{children:[bn.length?"Model ID":u("Model"),n.jsx("input",{"aria-label":bn.length?"Model ID":u("Model"),value:tn,placeholder:p?"กรอก Model ID หรือโหลดรายการด้านบน":"Enter a model ID or load the list above",disabled:Bt,onChange:re=>{ot(),B.kind==="ollama"&&H(!1),J({...B,model:re.target.value})}})]}),bn.length>0&&n.jsx("p",{className:"break-all text-xs text-slate-600","aria-live":"polite",children:tn&&n.jsxs(n.Fragment,{children:[n.jsx("strong",{className:"text-indigo-800",children:p?"เลือกแล้ว":"Selected"})," · ",tn]})})]}),I&&n.jsx("p",{role:"alert",className:"text-sm text-red-800",children:u(I)})]})]})]}),n.jsxs("section",{className:Di,children:[n.jsx(bd,{step:2,title:p?"กำหนดงานทดสอบ":"Describe the test",hint:p?"ตรวจ URL ระบุสิ่งที่อยากทดสอบ และเลือกผลลัพธ์ที่ต้องการ":"Confirm the URL, describe what to test, and choose your outputs."}),Qt?n.jsxs("div",{className:"grid min-w-0 gap-4",children:[n.jsxs("label",{children:[u("Target URL"),n.jsx("input",{type:"url",value:s||S,readOnly:!!s,onChange:re=>O(re.target.value),placeholder:"https://example.com"})]}),!s&&n.jsx("button",{type:"button",className:In,disabled:zt||!S.trim(),onClick:()=>{kn()},children:u("Set project target")}),n.jsxs("div",{className:"grid min-w-0 gap-2",children:[n.jsx("label",{htmlFor:"qa-testing-instruction",children:u("Testing instruction")}),n.jsx("div",{className:"overflow-hidden rounded-xl","aria-busy":j,children:n.jsx("textarea",{id:"qa-testing-instruction",ref:g,className:j?"block blur-[2px]":"block",required:!0,rows:4,maxLength:2e3,value:v,disabled:j,onChange:re=>{ot(),y(re.target.value)},placeholder:p?"เช่น ตรวจช่องค้นหาและตัวกรองในหน้าสมาชิก แล้วสร้างเคสทดสอบภาษาไทย":"Example: Check Search and Filter on the Members page and create English test cases."})})]}),n.jsxs("div",{className:"grid gap-2 rounded-xl border border-indigo-100 bg-indigo-50 p-3",children:[n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsxs("button",{type:"button",className:In,disabled:!Jt,onClick:()=>{xr()},children:[n.jsx("span",{"aria-hidden":"true",children:"✦"})," ",j?p?"กำลังเจนคำ…":"Generating…":on?p?"ช่วยร่างคำ":"Draft with rules":p?"เจนคำ":"Generate prompt"]}),n.jsx("button",{type:"submit",className:Li,disabled:!Ua,children:on?p?"สร้างแผน":"Create plan":p?`ถาม ${Hn}`:`Ask ${Hn}`})]}),n.jsx("p",{className:"text-xs text-slate-700","aria-live":"polite",children:on?p?"ร่างจากตัวอย่างด้วยกฎบนเครื่อง ใช้ได้ทันที":"Draft from a template using local rules.":`${Hn}${tn?` · ${tn}`:""}`}),A&&n.jsxs("div",{role:"alert",className:"grid gap-1 text-xs text-red-900",children:[n.jsx("p",{children:u(A)}),n.jsx("p",{children:n.jsx("a",{className:"font-semibold underline underline-offset-2",href:`/guide/index.html?lang=${f}#${f}-3`,target:"_blank",rel:"noreferrer",children:p?"ดูวิธีเชื่อมผู้ให้บริการ":"Provider setup guide"})})]})]}),n.jsxs("fieldset",{children:[n.jsx("legend",{className:"mb-2 font-semibold text-slate-900",children:u("Requested outputs")}),n.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:lv.map(([re,Ae])=>n.jsxs("label",{className:"qa-check rounded-lg border border-slate-200 p-2.5 has-checked:border-indigo-300 has-checked:bg-indigo-50",children:[n.jsx("input",{type:"checkbox",checked:Ee.includes(re),onChange:$t=>{ot(),we($t.target.checked?[...Ee,re]:Ee.filter(Dt=>Dt!==re))}})," ",u(Ae)]},re))})]}),n.jsxs("details",{className:"rounded-xl border border-slate-200 bg-slate-50 p-3",children:[n.jsx("summary",{className:"cursor-pointer font-semibold text-slate-800",children:u("Advanced settings")}),n.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[n.jsxs("label",{children:[u("Start path"),n.jsx("input",{value:D,onChange:re=>{ot(),M(re.target.value)},placeholder:"/users"})]}),n.jsxs("label",{children:[u("Scope path"),n.jsx("input",{value:F,onChange:re=>{ot(),X(re.target.value)},placeholder:"/users"})]}),n.jsxs("label",{children:[u("Test Case language"),n.jsxs("select",{value:Z,onChange:re=>{ot(),$(re.target.value)},children:[n.jsx("option",{value:"auto",children:u("Match the instruction")}),n.jsx("option",{value:"th",children:u("Thai")}),n.jsx("option",{value:"en",children:u("English")})]})]}),n.jsxs("label",{children:[u("Maximum pages"),n.jsx("input",{type:"number",min:"1",max:"20",value:se,onChange:re=>{ot(),Te(Number(re.target.value))}})]}),n.jsxs("label",{className:"qa-check sm:col-span-2",children:[n.jsx("input",{type:"checkbox",checked:xe,onChange:re=>{ot(),ge(re.target.checked)}})," ",u("Reuse existing observations where possible")]})]})]}),s&&n.jsx("button",{type:"button",onClick:c,className:"justify-self-start text-xs font-semibold text-indigo-800 underline underline-offset-4",children:p?"ตั้งค่าเซสชันของเว็บทดสอบ":"Website browser session settings"})]}):n.jsx("p",{className:"rounded-xl border border-dashed border-indigo-200 bg-indigo-50/60 p-4 text-sm text-slate-700",children:p?"เชื่อม AI และเลือกโมเดลให้พร้อมเพื่อเปิดส่วนนี้ หรือเลือกใช้กฎบนเครื่อง":"Connect a provider and choose a model, or activate local rules to open this section."})]})]}),Tt&&n.jsx("p",{role:"status",className:"rounded-xl border border-indigo-200 bg-indigo-50 px-4 py-3 text-sm text-indigo-950",children:typeof Tt=="string"?u(Tt):"rulePlanReason"in Tt?`${u(Tt.rulePlanReason)} ${u("The rule-based plan is ready to review.")}`:Tt[f]}),ga&&n.jsxs("div",{className:"grid gap-2 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-950",children:[n.jsx("p",{role:"alert",children:p?"ก่อนเริ่มสำรวจ ให้ตรวจสอบเซสชันของเว็บทดสอบ เมื่อเซสชันพร้อมใช้ ให้กลับมากดอนุมัติแผน":"Verify the test website session before scouting. Once it is ready, return and approve the plan."}),n.jsx("button",{type:"button",className:In,onClick:c,children:p?"เปิดการตั้งค่าเซสชัน":"Open Browser Session"})]}),dt&&n.jsx("p",{role:"alert",className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-900",children:u(dt)}),ke&&n.jsxs("section",{className:`${Di} grid gap-3 text-sm`,"aria-label":u("Plan preview"),children:[n.jsx(bd,{step:3,title:p?"ตรวจแผนก่อนเริ่ม":"Plan preview",hint:p?"ตรวจ URL, เส้นทาง และงานที่ระบบจะทำก่อนกดอนุมัติ":"Check the target, paths, and proposed steps before you approve."}),n.jsxs("p",{children:[u("Target:")," ",ke.targetUrl," ",u("· Scope:")," ",ke.scopePath||"/"," ",u("· Start:")," ",ke.startPath||"/"]}),n.jsx("ol",{className:"list-decimal space-y-1 pl-5",children:ke.steps.map((re,Ae)=>n.jsx("li",{children:re},Ae))}),n.jsx("ul",{className:"list-disc space-y-1 pl-5",children:ke.objectives.map(re=>n.jsx("li",{children:re},re))}),fe&&n.jsxs("p",{children:[u("AI tokens:")," ",fe.inputTokens??"—"," ",u("input,")," ",fe.outputTokens??"—"," ",u("output")]}),n.jsxs("p",{children:[u("Outputs:")," ",ke.outputs.map(re=>u(lv.find(([Ae])=>Ae===re)?.[1]??re)).join(", ")||u("none")," ",u("· Limit:")," ",ke.limits.maxPages," ",u("pages,")," ",ke.limits.maxActions," ",u("actions,")," ",ke.limits.timeoutMs," ",u("ms")]}),n.jsx("button",{className:Li,disabled:zt||!!Oe,onClick:()=>{Ba()},children:u("Approve and start")})]}),Oe&&n.jsxs("section",{className:`${Di} grid gap-3 text-sm`,"aria-label":u("Agent execution"),children:[n.jsxs("h3",{className:"font-bold text-slate-950",children:[u("Execution:")," ",u(Oe.status)]}),Oe.error&&Oe.error.code!=="auth-not-ready"&&n.jsx("p",{role:"alert",children:Oe.error.message}),n.jsx("ol",{className:"max-h-52 list-decimal space-y-1 overflow-y-auto rounded-xl bg-slate-50 py-3 pr-3 pl-8",children:Oe.events.map((re,Ae)=>n.jsxs("li",{children:[re.step,": ",re.message]},`${re.at}-${Ae}`))}),Oe.summary&&n.jsxs(n.Fragment,{children:[n.jsxs("p",{children:[Oe.summary.pages," ",u("pages ·")," ",Oe.summary.states," ",u("states ·")," ",Oe.summary.testCases," ",u("test cases")]}),n.jsxs("p",{children:[Oe.summary.exploredActions," ",u("of")," ",Oe.summary.discoveredInteractions," ",u("interactions explored ·")," ",Oe.summary.failedActions," ",u("failed ·")," ",Oe.summary.blockedActions," ",u("blocked")]}),Oe.summary.artifacts.length>0&&n.jsx("ul",{children:Oe.summary.artifacts.map(re=>n.jsx("li",{children:n.jsx("a",{className:"font-semibold text-indigo-800 underline underline-offset-4",href:mf(a,re),children:re.endsWith("-bug-draft.md")?"Download bug draft":"Download run report"})},re))})]})]}),Oe?.status==="completed"&&n.jsxs("section",{className:`${Di} grid gap-4`,children:[Jt&&n.jsx("button",{type:"button",className:`${In} justify-self-start`,onClick:()=>{ot(),ge(!0),g.current?.focus()},children:p?"ทำงานต่อจากผลสำรวจเดิม":"Follow up using saved observations"}),Jt&&!on&&!Ge&&Oe.summary&&n.jsx(P2,{providerLabel:Hn,external:Xt,request:re=>uj(a,Oe.id,{provider:B,allowExternal:P,...En},re)},JSON.stringify([Oe.id,B.kind,B.model,B.baseUrl])),n.jsxs("fieldset",{children:[n.jsx("legend",{className:"mb-3 font-bold text-slate-950",children:u("Report sections")}),n.jsx("div",{className:"flex flex-wrap gap-2",children:ov.map(re=>n.jsxs("label",{className:"qa-check rounded-lg border border-slate-200 p-2.5 has-checked:bg-indigo-50",children:[n.jsx("input",{type:"checkbox",checked:ht.includes(re),onChange:Ae=>pt($t=>Ae.target.checked?[...$t,re]:$t.filter(Dt=>Dt!==re))})," ",u(re)]},u(re)))}),ht.length>0&&n.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[n.jsx("a",{className:Li,href:No(a,"xlsx",ht),children:"Excel"}),n.jsx("a",{className:In,href:No(a,"csv",ht),children:"CSV"}),n.jsx("a",{className:In,href:No(a,"markdown",ht),children:"Markdown"})]})]})]}),(j||E||Ye)&&n.jsx("dialog",{ref:re=>{re&&!re.open&&re.showModal()},onCancel:re=>re.preventDefault(),className:"fixed inset-0 m-auto max-h-[calc(100dvh_-_2rem)] w-[calc(100%_-_2rem)] max-w-sm overflow-y-auto rounded-3xl border border-indigo-200/20 bg-slate-950 text-slate-100 shadow-2xl backdrop:bg-slate-950/55 backdrop:backdrop-blur-sm","aria-labelledby":"qa-scout-progress-title",children:n.jsxs("div",{className:"grid justify-items-center gap-5 bg-linear-to-b from-indigo-950/85 to-slate-950 px-6 py-8 text-center",children:[n.jsxs("div",{className:"relative grid size-20 place-items-center rounded-full bg-indigo-400/10 ring-8 ring-indigo-400/5","aria-hidden":"true",children:[n.jsx("span",{className:"absolute inset-0 rounded-full border-3 border-indigo-300/15 border-t-cyan-300 border-r-indigo-400 motion-safe:animate-spin"}),n.jsx("span",{className:"grid size-12 place-items-center rounded-2xl bg-indigo-400/15 text-2xl text-indigo-100 motion-safe:animate-[spin_1.8s_linear_infinite_reverse]",children:"✦"})]}),n.jsxs("div",{className:"grid gap-2",role:"status",children:[n.jsx("h2",{id:"qa-scout-progress-title",className:"text-lg font-semibold text-white",children:j?p?"กำลังเจนคำสั่งทดสอบ…":"Drafting the testing instruction…":E||Oe?.status==="queued"?p?"กำลังเตรียม Scout…":"Preparing Scout…":p?"AI Scout กำลังสำรวจ…":"AI Scout is running…"}),!j&&n.jsx("p",{className:"text-sm text-slate-300",children:$n?p?q2[$n.step]??$n.message:$n.message:p?"กำลังเตรียมงานตามแผนที่อนุมัติ":"Preparing the approved plan."})]}),!j&&qn&&n.jsx("dl",{className:"flex w-full flex-wrap justify-center gap-x-4 gap-y-2 rounded-2xl bg-white/5 px-3 py-3",children:[{label:p?"หน้า":"Pages",value:qn.pages},{label:p?"สถานะ UI":"UI states",value:qn.states},{label:p?"ลองทำ":"Attempted",value:qn.actions},{label:p?"ล้มเหลว":"Failed",value:qn.failed},{label:p?"ถูกบล็อก":"Blocked",value:qn.blocked}].map(({label:re,value:Ae})=>n.jsxs("div",{className:"flex flex-col",children:[n.jsx("dt",{className:"order-2 text-xs text-slate-300",children:re}),n.jsx("dd",{className:"font-semibold text-white tabular-nums",children:Ae})]},re))}),!j&&dt&&n.jsx("p",{role:"alert",className:"text-sm text-red-200",children:u(dt)}),!j&&Ye&&n.jsx("button",{type:"button",className:"rounded-lg border border-slate-600 px-4 py-2 text-sm font-medium text-slate-100 transition-colors hover:bg-slate-800 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-indigo-300 disabled:opacity-60",disabled:zt,onClick:()=>{mn()},children:p?"หยุดการรัน":"Cancel run"})]})}),n.jsx(B2,{projectId:a,detailsRef:m})]})}function F2({projects:a,activeProjectId:s,result:l,collapsed:o,onToggleCollapsed:c,onSelect:u,onNew:f,onDelete:p,onRename:m,onSettings:g,workspaceRoot:v,onOpenWorkspace:y}){const{ui:j,language:b,toggleLanguage:E,t:N}=Le(),[A,w]=L.useState(),[S,O]=L.useState(),[D,M]=L.useState(""),[F,X]=L.useState(!1);return n.jsxs("aside",{className:`workspace-sidebar ${o?"is-collapsed":""}`,"data-mobile-open":F,children:[n.jsxs("div",{className:"sidebar-brand",children:[n.jsx("span",{className:"brand-mark",children:"LS"}),n.jsx("b",{children:"LazyScout"}),n.jsxs("button",{type:"button",className:"mobile-project-toggle","aria-expanded":F,"aria-controls":"sidebar-projects",onClick:()=>X(!F),children:[N("projects")," ",n.jsx("span",{"aria-hidden":"true",children:F?"▴":"▾"})]}),n.jsx("button",{type:"button",className:"sidebar-collapse",onClick:c,title:j(o?"Expand sidebar":"Collapse sidebar"),children:o?"›":"‹"})]}),n.jsxs("button",{type:"button",className:"new-project-btn",onClick:()=>{X(!1),f()},title:N("newProject"),children:[n.jsx("span",{children:"+"}),n.jsx("em",{children:N("newProject")})]}),n.jsxs("div",{className:"sidebar-label",children:[n.jsx("span",{children:N("projects")}),n.jsx("b",{children:a.length})]}),n.jsx("div",{className:"project-list",id:"sidebar-projects",children:a.map(Z=>n.jsx("div",{className:`project-item ${Z.id===s?"active":""}`,children:S===Z.id?n.jsxs("form",{className:"project-rename",onSubmit:$=>{$.preventDefault(),m(Z.id,D),O(void 0)},children:[n.jsx("input",{autoFocus:!0,value:D,onChange:$=>M($.target.value),onKeyDown:$=>{$.key==="Escape"&&O(void 0)}}),n.jsx("button",{type:"submit",children:j("Save")}),n.jsx("button",{type:"button",onClick:()=>O(void 0),children:"×"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",onClick:()=>{X(!1),u(Z.id)},title:Z.targetUrl?`${Z.name}
55
- ${Z.targetUrl}`:Z.name,children:[n.jsx("span",{className:"project-icon",children:"◈"}),n.jsxs("span",{className:"project-copy",children:[n.jsx("b",{children:Z.name}),n.jsx("small",{children:Z.targetUrl||j("Manual suite")})]})]}),n.jsxs("div",{className:"project-actions",children:[n.jsx("button",{type:"button",className:"project-more",title:j("Project actions"),onClick:()=>w($=>$===Z.id?void 0:Z.id),children:"⋯"}),A===Z.id&&n.jsxs("div",{className:"project-action-menu",children:[n.jsx("button",{type:"button",onClick:()=>{O(Z.id),M(Z.name),w(void 0)},children:j("Rename")}),n.jsx("button",{type:"button",className:"danger",onClick:()=>{p(Z.id),w(void 0)},children:j("Delete")})]})]})]})},Z.id))}),l&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"sidebar-label",children:[n.jsx("span",{children:N("files")}),n.jsx("b",{children:l.pages.length})]}),n.jsx("div",{className:"file-list",children:l.pages.map(Z=>n.jsxs("div",{className:"file-item",title:Z.finalUrl,children:[n.jsx("span",{children:"◫"}),n.jsx("span",{className:"file-name",children:new URL(Z.finalUrl).pathname==="/"?"index":new URL(Z.finalUrl).pathname.slice(1)}),n.jsx("small",{children:Z.state?.fingerprint.slice(-4)})]},Z.finalUrl))})]}),s&&n.jsxs("button",{type:"button",className:"sidebar-settings",onClick:()=>{X(!1),g()},title:N("settings"),children:[n.jsx("span",{children:"⚙"}),n.jsx("em",{children:N("settings")})]}),n.jsx("div",{className:"sidebar-bottom",children:n.jsxs("div",{className:"workspace-language-row",children:[n.jsxs("button",{type:"button",className:"workspace-copy",onClick:y,title:v,children:[n.jsx("span",{className:"status-dot status-pass"})," ",n.jsx("b",{children:N("localWorkspace")}),n.jsx("small",{children:v||N("storedHere")})]}),n.jsx("button",{type:"button",className:"language-circle",onClick:E,title:b==="en"?"Switch to Thai":j("Switch to English (US)"),"aria-label":j("Switch language"),children:b==="en"?"EN":"TH"})]})})]})}function V2(a){return Vy(a,!0)}function Y2(a){return Vy(a,!1)}function Vy(a,s){const l=`<!doctype html><html><head><meta charset="utf-8"><title>LazyScout Quality Report</title><style>${K2}</style></head><body>${X2(a)}</body></html>`,o=window.open("","_blank","width=1100,height=820");return o&&(o.document.open(),o.document.write(l),o.document.close(),s&&window.setTimeout(()=>{o.focus(),o.print()},350)),l}function X2(a){const s=[["Test Cases",a.testCases,`${a.pages} pages explored`],["Pass",a.passed,"Execution result"],["Failed",a.failed,"Execution result"],["Requirements",a.requirementCount,`${a.linkedCases}/${a.testCases} cases linked`]],l=a.failedCases.length?`<section class="failures"><div class="head"><div><p>FOLLOW-UP</p><h2>Failed Test Cases & logs</h2></div><em>${a.failedCases.length} failed</em></div>${a.failedCases.map(o=>`<article><div><b>${oa(o.id)} · ${oa(o.title)}</b><small>${oa(o.folder||"UNASSIGNED")}</small></div><pre>${o.logs.length?oa(o.logs.join(`
56
- `)):"No run log was captured for this case."}</pre></article>`).join("")}</section>`:"";return`<main><header><div><div class="brand">LS <span>LazyScout</span></div><p>QUALITY REPORT</p><h1>Quality overview</h1><small>${oa(a.origin)} · Generated ${oa(a.generatedAt)}</small></div><div class="report-state">${a.pending} pending execution</div></header><section class="metrics">${s.map(([o,c,u])=>`<article><span>${o}</span><b>${c}</b><small>${u}</small></article>`).join("")}</section><section class="grid"><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Execution status</h2></div><em>Donut chart</em></div>${cv(a.status,"Test Cases")}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Priority</h2></div><em>Column chart</em></div>${Z2(a.priority)}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Test type</h2></div><em>Bar chart</em></div>${uv(a.testType)}</article><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Automation readiness</h2></div><em>Donut chart</em></div>${cv(a.readiness,"Cases")}</article><article class="card wide"><div class="head"><div><p>HIERARCHY</p><h2>Folder coverage</h2></div><em>Top 10</em></div>${uv(a.modules)}</article></section>${l}<footer>LazyScout · Local QA workspace</footer></main>`}function cv(a,s){const l=a.reduce((u,f)=>u+f.value,0);let o=0;return`<div class="donut-wrap"><div class="donut" style="background:conic-gradient(${a.map(u=>{const f=l?o/l*100:0;o+=u.value;const p=l?o/l*100:0;return`${u.color} ${f}% ${p}%`}).join(", ")||"#e2e8f0 0 100%"})"><div><b>${l}</b><span>${s}</span></div></div><div class="legend">${a.map(u=>`<div><i style="background:${u.color}"></i><span title="${oa(u.label)}">${oa(Sf(u.label))}</span><b>${u.value}</b></div>`).join("")}</div></div>`}function Z2(a){const s=Math.max(...a.map(o=>o.value),1),l=a.reduce((o,c)=>o+c.value,0)||1;return`<div class="columns"><div class="axis"><span>100%</span><span>75%</span><span>50%</span><span>25%</span><span>0%</span></div><div class="column-area" style="grid-template-columns:repeat(${Math.max(a.length,1)},minmax(0,1fr))">${a.map(o=>`<div class="column"><div class="column-track"><i style="height:${o.value/s*100}%;background:${o.color}"></i></div><b>${o.value} <small>${Math.round(o.value/l*100)}%</small></b><span>${oa(Sf(o.label))}</span></div>`).join("")}</div></div>`}function uv(a){const s=Math.max(...a.map(l=>l.value),1);return`<div class="bars">${a.map(l=>`<div><span title="${oa(l.label)}">${oa(Sf(l.label))}</span><section><i style="width:${l.value/s*100}%;background:${l.color}"></i></section><b>${l.value}</b></div>`).join("")}</div>`}function Sf(a){return a.length>10?`${a.slice(0,10)}...`:a}function oa(a){return String(a).replace(/[&<>'"]/g,s=>({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"})[s]??s)}const K2="@page{size:A4 landscape;margin:12mm}*{box-sizing:border-box}body{margin:0;color:#182238;font:12px Inter,Arial,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact}main{max-width:1120px;margin:auto}header{display:flex;justify-content:space-between;align-items:start;padding-bottom:18px;border-bottom:1px solid #e2e8f0}.brand{font-size:18px;font-weight:800;color:#fff;background:#2563eb;border-radius:7px;display:inline-flex;gap:9px;align-items:center;padding:6px 9px}.brand span{color:#182238}header p{margin:15px 0 3px;font-size:9px;letter-spacing:1.4px;color:#64748b;font-weight:700}h1{margin:0;font-size:26px}header small{display:block;margin-top:6px;color:#64748b}.report-state{border-radius:999px;padding:7px 10px;background:#fffbeb;color:#b45309;font-weight:700}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.metrics article,.card,.failures{border:1px solid #e2e8f0;border-radius:10px;background:#fff}.metrics article{padding:13px}.metrics span,.metrics small{display:block;color:#64748b}.metrics b{display:block;margin:8px 0 2px;font-size:27px}.metrics small{font-size:10px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.card{padding:15px;min-height:230px}.card.wide{grid-column:1/3;min-height:180px}.head{display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #f1f5f9;padding-bottom:10px}.head p{margin:0;color:#64748b;font-size:9px;font-weight:700;letter-spacing:1px}.head h2{margin:4px 0 0;font-size:14px}.head em{font-style:normal;background:#f1f5f9;border-radius:999px;padding:4px 7px;color:#64748b;font-size:9px}.donut-wrap{height:165px;display:flex;align-items:center;justify-content:center;gap:30px}.donut{width:124px;height:124px;border-radius:50%;display:flex;align-items:center;justify-content:center}.donut>div{width:68px;height:68px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut b{font-size:21px}.donut span{font-size:9px;color:#64748b}.legend{min-width:140px}.legend div{display:grid;grid-template-columns:9px 1fr auto;gap:7px;align-items:center;margin:8px 0}.legend i{width:8px;height:8px;border-radius:50%}.legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.columns{display:grid;grid-template-columns:34px 1fr;gap:5px;height:165px;margin-top:10px}.axis{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:25px;text-align:right;font-size:8px;color:#94a3b8}.column-area{display:grid;gap:6px;align-items:end;border-bottom:1px solid #cbd5e1;background:repeating-linear-gradient(to bottom,transparent 0 calc(25% - 1px),#e2e8f0 calc(25% - 1px) 25%)}.column{min-width:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:3px}.column-track{height:112px;width:100%;max-width:34px;background:#f1f5f9;display:flex;align-items:end;border-radius:4px 4px 0 0}.column-track i{width:100%;display:block;border-radius:4px 4px 0 0}.column b{font-size:10px;white-space:nowrap}.column small{font-size:8px;color:#94a3b8}.column>span{width:100%;font-size:8px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.bars{margin-top:18px}.bars>div{display:grid;grid-template-columns:85px 1fr 28px;gap:9px;align-items:center;margin:9px 0}.bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.bars section{height:9px;border-radius:99px;background:#f1f5f9;overflow:hidden}.bars i{display:block;height:100%;border-radius:99px}.bars b{text-align:right}.failures{margin-top:12px;padding:15px}.failures article{padding:10px 0;border-bottom:1px solid #f1f5f9}.failures article:last-child{border:0}.failures b,.failures small{display:block}.failures small{margin-top:3px;color:#64748b;font-size:10px}.failures pre{margin:8px 0 0;max-height:110px;overflow:auto;white-space:pre-wrap;border-radius:6px;background:#0b1120;padding:9px;color:#dbeafe;font:9px ui-monospace,monospace}footer{margin-top:18px;border-top:1px solid #e2e8f0;padding-top:10px;color:#94a3b8;font-size:10px}";function Q2({result:a,testCases:s,executionStatuses:l={},runResults:o={},projectId:c}){const{ui:u}=Le(),[f,p]=L.useState(!1),[m,g]=L.useState({status:!0,priority:!0,type:!0,automation:!0,modules:!0,trend:!0}),[v,y]=L.useState({status:"donut",priority:"column",type:"bar",automation:"donut",modules:"treemap",trend:"line"}),j=T=>l[T.id]??T.status??"pending",b={passed:s.filter(T=>j(T)==="passed").length,failed:s.filter(T=>j(T)==="failed").length,pending:s.filter(T=>j(T)==="pending").length},E=So(s,T=>T.priority),N=So(s,T=>T.type),A=So(s,T=>T.automationStatus),w=So(s,T=>(T.folder??T.module)||"UNASSIGNED"),S=L.useMemo(()=>rC(a),[a]),O=[{label:u("Pass"),value:b.passed,color:"#10b981"},{label:u("Failed"),value:b.failed,color:"#ef4444"},{label:u("Pending"),value:b.pending,color:"#f59e0b"}],D=[{label:u("High"),value:E.high??0,color:"#ef4444"},{label:u("Medium"),value:E.medium??0,color:"#f59e0b"},{label:u("Low"),value:E.low??0,color:"#3b82f6"}],M=[{label:u("Positive"),value:N.positive??0,color:"#10b981"},{label:u("Negative"),value:N.negative??0,color:"#ef4444"},{label:u("Validation"),value:N.validation??0,color:"#6366f1"}],F=[{label:u("Ready"),value:A.ready??0,color:"#3b82f6"},{label:u("Needs review"),value:A["needs-review"]??0,color:"#f59e0b"},{label:u("Needs data"),value:A["needs-data"]??0,color:"#8b5cf6"},{label:u("Manual"),value:A.manual??0,color:"#64748b"}],X=Object.entries(w).map(([T,K],V)=>({label:T,value:K,color:dv[V%dv.length]})),Z=s.filter(T=>(T.requirements?.length??0)>0).length,$=new Set(s.flatMap(T=>T.requirements??[])).size,B={origin:a.origin,generatedAt:new Date().toLocaleString(),pages:a.pages.length,testCases:s.length,passed:b.passed,failed:b.failed,pending:b.pending,needsReview:A["needs-review"]??0,linkedCases:Z,requirementCount:$,status:O,priority:D,testType:M,readiness:F,modules:Xy(X),failedCases:s.filter(T=>j(T)==="failed").map(T=>({id:T.id,title:T.title,folder:T.folder??T.module,logs:(o[T.id]?.logs??[]).slice(-8).map(K=>`${new Date(K.timestamp).toLocaleTimeString()} ${K.message}`)}))},J=T=>g(K=>({...K,[T]:!K[T]})),z=(T,K)=>y(V=>({...V,[T]:K})),H=T=>{const K=T?V2(B):Y2(B);c&&V0(c,T?"quality-report-print.html":"quality-report.html",K)};return n.jsxs("div",{className:"dashboard-view",children:[n.jsxs("div",{className:"dashboard-title",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:u("Project dashboard")}),n.jsx("h2",{children:u("Quality overview")}),n.jsxs("p",{children:[u("Coverage and readiness for")," ",n.jsx("b",{children:a.origin})]})]}),n.jsxs("div",{className:"dashboard-actions",children:[n.jsxs("span",{className:"status-badge status-badge-warn",children:[b.pending," ",u("pending execution")]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(T=>!T),children:u("Customize")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>H(!1),children:u("HTML report")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>H(!0),children:u("Export PDF")})]})]}),f&&n.jsxs("div",{className:"dashboard-customize",children:[n.jsx("b",{children:u("Dashboard layout")}),n.jsx("span",{children:u("Show or hide charts")}),["status","priority","type","automation","modules","trend"].map(T=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:m[T],onChange:()=>J(T)})," ",u(J2(T))]},T))]}),n.jsxs("div",{className:"dashboard-metrics",children:[n.jsx(Mi,{label:u("Test Cases"),value:s.length,hint:`${a.pages.length} ${u("pages explored")}`,tone:"blue"}),n.jsx(Mi,{label:u("Pass"),value:b.passed,hint:u("Execution result"),tone:"green"}),n.jsx(Mi,{label:u("Failed"),value:b.failed,hint:u("Execution result"),tone:"red"}),n.jsx(Mi,{label:u("Need Review"),value:A["needs-review"]??0,hint:u("Tester decision needed"),tone:"amber"}),n.jsx(Mi,{label:u("Requirements"),value:$,hint:`${Z}/${s.length} ${u("cases linked")}`,tone:"blue"})]}),n.jsxs("div",{className:"dashboard-columns",children:[m.status&&n.jsx(ks,{eyebrow:u("Composition"),title:u("Execution status"),panel:"status",kind:v.status,onChange:z,children:Ui(v.status,O,u("Test Cases"))}),m.priority&&n.jsx(ks,{eyebrow:u("Comparison"),title:u("Priority"),panel:"priority",kind:v.priority,onChange:z,children:Ui(v.priority,D,u("Cases"))})]}),n.jsxs("div",{className:"dashboard-columns",children:[m.type&&n.jsx(ks,{eyebrow:u("Comparison"),title:u("Test type"),panel:"type",kind:v.type,onChange:z,children:Ui(v.type,M,u("Cases"))}),m.automation&&n.jsx(ks,{eyebrow:u("Composition"),title:u("Automation readiness"),panel:"automation",kind:v.automation,onChange:z,children:Ui(v.automation,F,u("Cases"))})]}),n.jsxs("div",{className:"dashboard-columns",children:[m.modules&&n.jsx(ks,{eyebrow:u("Hierarchy"),title:u("Folder coverage"),panel:"modules",kind:v.modules,onChange:z,children:Ui(v.modules,X,u("Cases"))}),m.trend&&n.jsx(ks,{eyebrow:u("Trend"),title:u("Scout discovery"),panel:"trend",kind:v.trend,onChange:z,children:v.trend==="line"?n.jsx(aC,{points:S.slice(-of)}):n.jsx(Yy,{items:S.slice(-of).map((T,K)=>({label:`${u("Step")} ${K+1}`,value:T,color:"#4f46e5"}))})})]})]})}function ks({eyebrow:a,title:s,panel:l,kind:o,onChange:c,children:u}){const{ui:f}=Le();return n.jsxs("section",{className:"dashboard-card",children:[n.jsxs("div",{className:"dashboard-card-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:a}),n.jsx("h3",{children:s})]}),n.jsxs("label",{className:"chart-selector",children:[n.jsx("span",{children:f("Chart")}),n.jsx("select",{value:o,onChange:p=>c(l,p.target.value),children:sC[l].map(p=>n.jsx("option",{value:p,children:f(W2(p))},p))})]})]}),u]})}function Mi({label:a,value:s,hint:l,tone:o}){return n.jsxs("div",{className:`dashboard-metric tone-${o}`,children:[n.jsx("span",{children:a}),n.jsx("strong",{children:s}),n.jsx("small",{children:l})]})}function So(a,s){return a.reduce((l,o)=>{const c=s(o);return l[c]=(l[c]??0)+1,l},{})}function J2(a){return{status:"Execution status",priority:"Priority comparison",type:"Test type comparison",automation:"Automation readiness",modules:"Folder treemap",trend:"Scout trend"}[a]}function W2(a){return{bar:"Bar chart",column:"Column chart",donut:"Donut chart",treemap:"Treemap",line:"Line chart"}[a]}function Ui(a,s,l){const o=Xy(s);return a==="donut"?n.jsx(eC,{slices:o,totalLabel:l,compact:o.length>3}):a==="column"?n.jsx(Yy,{items:o}):a==="treemap"?n.jsx(nC,{items:o}):n.jsx(tC,{items:o})}function eC({slices:a,totalLabel:s,compact:l=!1}){const o=a.reduce((f,p)=>f+p.value,0);let c=0;const u=a.map(f=>{const p=o?c/o*100:0;c+=f.value;const m=o?c/o*100:0;return`${f.color} ${p}% ${m}%`}).join(", ");return n.jsxs("div",{className:`donut-chart ${l?"is-compact":""}`,children:[n.jsx("div",{className:"donut-ring",style:{background:o?`conic-gradient(${u})`:"#e2e8f0"},children:n.jsxs("div",{children:[n.jsx("b",{children:o}),n.jsx("span",{children:s})]})}),n.jsx("div",{className:"donut-legend",children:a.map(f=>n.jsxs("div",{children:[n.jsx("i",{style:{background:f.color}}),n.jsx("span",{title:f.label,children:Xo(f.label)}),n.jsx("b",{children:f.value})]},f.label))})]})}function Yy({items:a}){const s=Math.max(...a.map(o=>o.value),1),l=a.reduce((o,c)=>o+c.value,0)||1;return n.jsxs("div",{className:"column-chart-wrap",children:[n.jsxs("div",{className:"column-axis","aria-hidden":"true",children:[n.jsx("span",{children:"100%"}),n.jsx("span",{children:"75%"}),n.jsx("span",{children:"50%"}),n.jsx("span",{children:"25%"}),n.jsx("span",{children:"0%"})]}),n.jsxs("div",{className:"column-chart",style:{gridTemplateColumns:`repeat(${Math.max(a.length,1)}, minmax(0, 1fr))`},children:[n.jsx("div",{className:"column-grid","aria-hidden":"true"}),a.map(o=>n.jsxs("div",{className:"column-item",title:o.label,children:[n.jsx("div",{className:"column-track",children:n.jsx("i",{style:{height:`${o.value/s*100}%`,background:o.color}})}),n.jsxs("div",{className:"column-value",children:[n.jsx("b",{children:o.value}),n.jsxs("small",{children:[Math.round(o.value/l*100),"%"]})]}),n.jsx("span",{children:Xo(o.label)})]},o.label))]})]})}function tC({items:a}){const s=Math.max(...a.map(l=>l.value),1);return n.jsx("div",{className:"bar-chart",children:a.map(l=>n.jsxs("div",{className:"bar-row",children:[n.jsx("span",{title:l.label,children:Xo(l.label)}),n.jsx("div",{children:n.jsx("i",{style:{width:`${l.value/s*100}%`,background:l.color}})}),n.jsx("b",{children:l.value})]},l.label))})}function nC({items:a}){const{ui:s}=Le();return n.jsx("div",{className:"treemap",children:a.length?a.map(l=>n.jsxs("div",{style:{flexGrow:l.value,background:l.color},title:`${l.label}: ${l.value}`,children:[n.jsx("b",{children:Xo(l.label)}),n.jsxs("span",{children:[l.value," ",s("cases")]})]},l.label)):n.jsx("p",{children:s("No folders found.")})})}function aC({points:a}){const{ui:s}=Le(),l=Math.max(...a,1),o=Math.max(a.length-1,1),c=a.map((u,f)=>`${f/o*100},${100-u/l*82-9}`).join(" ");return n.jsxs("div",{className:"line-chart",children:[n.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",role:"img","aria-label":s("Cumulative Scout discovery trend"),children:[n.jsx("line",{x1:"0",y1:"91",x2:"100",y2:"91"}),n.jsx("polyline",{points:c})]}),n.jsxs("div",{className:"line-chart-meta",children:[n.jsx("span",{children:s("Start")}),n.jsxs("b",{children:[a[a.length-1]??0," ",s("discoveries")]}),n.jsx("span",{children:s("Complete")})]})]})}function rC(a){let s=0;const l=[0];for(const o of a.runEvents)(o.eventType==="page-discovered"||o.eventType==="state-discovered"||o.eventType==="action-discovered")&&(s++,l.push(s));return l.length>1?l:[0,a.pages.length]}const dv=["#2563eb","#7c3aed","#0891b2","#059669","#d97706","#db2777","#475569"],sC={status:["donut","bar","column"],priority:["column","bar","donut"],type:["bar","column","donut"],automation:["donut","bar","column"],modules:["treemap","bar","column","donut"],trend:["line","column"]},of=10;function Xy(a){return[...a].sort((s,l)=>l.value-s.value).slice(0,of)}function Xo(a){return a.length>10?`${a.slice(0,10)}...`:a}function iC({pages:a,testCases:s,recordedCases:l,completedRuns:o,onScout:c,onReview:u,onRecord:f,onRun:p,onExport:m}){const{language:g}=Le(),v=g==="th",y=[{label:v?"สำรวจเว็บไซต์":"Scout the website",description:a?v?`ค้นพบ ${a} หน้า`:`${a} pages discovered`:v?"ใส่ URL แล้วให้ LazyScout สร้างเคสทดสอบชุดแรก":"Enter a URL and let LazyScout discover the first Test Cases.",complete:a>0,action:a?v?"สำรวจอีกครั้ง":"Scout again":v?"เริ่มสำรวจ":"Start Scout",onClick:c},{label:v?"ตรวจทานเคสทดสอบ":"Review Test Cases",description:s?v?`มี ${s} เคสพร้อมให้ตรวจทาน`:`${s} Test Cases are ready to review.`:v?"ตรวจชื่อ ขั้นตอน และผลลัพธ์ที่คาดหวัง":"Review titles, steps, and expected results.",complete:s>0,action:v?"เปิดเคสทดสอบ":"Open Test Cases",onClick:u},{label:v?"บันทึกขั้นตอนที่ยังขาด":"Record missing flows",description:l?v?`บันทึกแล้ว ${l} ชุดขั้นตอน`:`${l} recorded flow${l===1?"":"s"} saved.`:v?"บันทึกการเข้าสู่ระบบหรือขั้นตอนที่ยังสำรวจไม่พบ":"Record login or business actions that Scout cannot infer.",complete:l>0,action:v?"บันทึกขั้นตอน":"Record Flow",onClick:f},{label:v?"รันทดสอบ":"Run Automation",description:o?v?`รันแล้ว ${o} เคส`:`${o} Test Case${o===1?"":"s"} executed.`:v?"รันเคสที่เลือกด้วย Playwright CLI":"Run selected Test Cases with the Playwright CLI.",complete:o>0,action:v?"เปิดหน้ารันทดสอบ":"Open Automation",onClick:p},{label:v?"ส่งเคสทดสอบให้ทีม":"Share the Test Cases",description:v?"ส่งออกเคสที่ตรวจแล้วเป็นไฟล์ CSV ให้ทีม":"Export the reviewed Test Cases as a CSV file for your team.",complete:!1,action:v?"ส่งออก CSV":"Export CSV",onClick:m}];return n.jsxs("section",{className:"journey-card","aria-labelledby":"journey-title",children:[n.jsxs("header",{children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v?"ขั้นตอนที่แนะนำ":"Recommended workflow"}),n.jsx("h3",{id:"journey-title",children:v?"ต่อไปควรทำอะไร?":"What should I do next?"})]}),n.jsxs("span",{children:[y.filter(j=>j.complete).length,"/4 ",v?"ขั้นตอนพร้อมแล้ว":"setup steps complete"]})]}),n.jsx("div",{className:"journey-steps",children:y.map((j,b)=>n.jsxs("article",{className:j.complete?"is-complete":"",children:[n.jsx("span",{className:"journey-number",children:j.complete?"✓":b+1}),n.jsxs("div",{children:[n.jsx("b",{children:j.label}),n.jsx("small",{children:j.description})]}),n.jsxs("button",{type:"button",onClick:j.onClick,children:[j.action," ",n.jsx("span",{children:"→"})]})]},j.label))})]})}const lC=1e3,oC=3,xd=a=>({projectId:a,status:"idle",startUrl:"",startedAt:"",steps:[]});function cC(a){const[s,l]=L.useState(()=>xd(a??"")),[o,c]=L.useState(!1),[u,f]=L.useState(),[p,m]=L.useState(!1),[g,v]=L.useState(!1);L.useEffect(()=>{if(!a)return;let w=!0;return l(xd(a)),f(void 0),m(!1),v(!1),pg(a).then(S=>{if(S.status==="stopped"){mg(a).catch(()=>{});return}w&&S.status==="recording"&&l(S)}).catch(()=>{}),()=>{w=!1}},[a]);const y=s.status==="recording"&&!p;L.useEffect(()=>{if(!a||!y)return;let w=!0,S=!1,O=0;const D=setInterval(()=>{S||(S=!0,pg(a).then(M=>{O=0,w&&l(M)}).catch(()=>{O+=1,O>=oC&&w&&(f("Lost contact with the recorder. Stop and start it again."),m(!0))}).finally(()=>{S=!1}))},lC);return()=>{w=!1,clearInterval(D)}},[a,y]);const j=L.useCallback(async w=>{if(a){c(!0),f(void 0),m(!1),v(!1);try{l(await z0(a,w))}catch(S){f(S instanceof Error?S.message:"The recorder could not be started.")}finally{c(!1)}}},[a]),b=L.useCallback(async()=>{if(a){c(!0);try{l(await B0(a))}catch(w){f(w instanceof Error?w.message:"The recorder could not be stopped.")}finally{c(!1)}}},[a]),E=L.useCallback(async()=>{if(!a||!y)return;const w=!g;try{const S=await I0(a,w);l(S),v(w)}catch(S){f(S instanceof Error?S.message:"The inspect mode could not be changed.")}},[g,a,y]),N=L.useCallback(async w=>{if(!(!a||!y))try{l(await $0(a,w))}catch(S){f(S instanceof Error?S.message:"The browser interaction failed.")}},[a,y]),A=L.useCallback(()=>{l(xd(a??"")),f(void 0),m(!1),v(!1),a&&mg(a).catch(()=>{})},[a]);return{state:s,recording:y,busy:o,error:u,start:j,stop:b,reset:A,inspectMode:g,toggleInspectMode:E,interact:N}}const uC="{{TEST_PASSWORD}}",fv="Recorded login",dC=160;function Zy({projectId:a,targetUrl:s,onSaveRecording:l,onPickTarget:o}){const{ui:c}=Le(),{state:u,recording:f,busy:p,error:m,start:g,stop:v,reset:y,inspectMode:j,toggleInspectMode:b,interact:E}=cC(a),[N,A]=L.useState(fv),[w,S]=L.useState(!1),[O,D]=L.useState(0),[M,F]=L.useState(s),[X,Z]=L.useState(!1),$=L.useRef(0),B=L.useRef(void 0),J=u.steps,z=u.status==="stopped"&&J.length>0;L.useEffect(()=>{!X&&u.currentUrl&&F(u.currentUrl)},[X,u.currentUrl]),L.useEffect(()=>{if(!(!w||!f))return D(Date.now()),()=>{B.current!==void 0&&window.clearTimeout(B.current)}},[f,w]);const H=()=>{B.current!==void 0&&window.clearTimeout(B.current),B.current=window.setTimeout(()=>D(Date.now()),dC)},T=async C=>{await E(C),D(Date.now())};L.useEffect(()=>{if(!w)return;const C=document.body,q=document.documentElement,I=C.style.overflow,ee=C.style.paddingRight,he=q.style.overflow,_e=window.innerWidth-q.clientWidth;return C.style.overflow="hidden",q.style.overflow="hidden",_e>0&&(C.style.paddingRight=`${_e}px`),()=>{C.style.overflow=I,C.style.paddingRight=ee,q.style.overflow=he}},[w]);const K=C=>{const q=C.currentTarget.getBoundingClientRect();return{x:(C.clientX-q.left)/q.width*C.currentTarget.naturalWidth,y:(C.clientY-q.top)/q.height*C.currentTarget.naturalHeight}},V=C=>{if(C.nativeEvent.isComposing||["Shift","Control","Alt","Meta"].includes(C.key))return;if(C.preventDefault(),C.key.length===1&&!C.ctrlKey&&!C.altKey&&!C.metaKey){T({type:"text",text:C.key});return}const q=[C.ctrlKey&&"Control",C.altKey&&"Alt",C.metaKey&&"Meta",C.shiftKey&&"Shift"].filter(Boolean).join("+");T({type:"key",key:q?`${q}+${C.key}`:C.key})},Q=C=>{C.preventDefault(),C.stopPropagation(),T({type:"scroll",deltaX:C.deltaX,deltaY:C.deltaY})},W=()=>{const C=M.trim();if(!C||!f)return;let q=C;try{q=new URL(C,u.currentUrl||s).toString()}catch{return}T({type:"navigate",url:q})},R=()=>{y(),A(fv),S(!1)},Y=()=>{l(J,N.trim()||"Recorded flow",u.startUrl||s),R()},x=async C=>{if(!o)return;const q=fC(C);await v(),y(),S(!1),o(q)};return n.jsxs("div",{className:"settings-notice settings-notice-stacked recorder-panel",children:[n.jsx("b",{children:c("Record a flow")}),n.jsx("span",{children:c("Start the Cypress-style workspace to record clicks, typing, and element locators.")}),m&&n.jsx("p",{className:"recorder-error",children:m}),!f&&!z&&n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:p,onClick:()=>{S(!0),g(s)},children:c(p?"Starting…":"Start recording")}),f&&!w&&n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>S(!0),children:c("Open recorder workspace")}),!w&&f&&u.inspection&&n.jsxs("div",{className:"recorder-inspection","aria-live":"polite",children:[n.jsxs("div",{className:"recorder-inspection-heading",children:[n.jsx("b",{children:c("Selected element")}),n.jsxs("code",{children:["<",u.inspection.tagName,">"]})]}),u.inspection.accessibleName&&n.jsxs("span",{children:[c("Accessible name:")," ",u.inspection.accessibleName]}),u.inspection.role&&n.jsxs("span",{children:[c("Role:")," ",u.inspection.role]}),u.inspection.id&&n.jsxs("span",{children:[c("ID:")," ",u.inspection.id]}),u.inspection.name&&n.jsxs("span",{children:[c("Name:")," ",u.inspection.name]}),n.jsxs("label",{children:[c("CSS selector"),n.jsx("code",{children:u.inspection.cssSelector})]}),n.jsxs("label",{children:[c("Playwright locator"),n.jsx("code",{children:u.inspection.playwrightLocator})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:c("Copy locator")})]}),!w&&J.length>0&&n.jsx("ol",{className:"recorder-steps",children:J.map((C,q)=>n.jsxs("li",{children:[n.jsx("span",{className:"recorder-step-index",children:q+1}),n.jsx("span",{children:La(C)})]},`${q}-${C.type}`))}),!w&&z&&n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"recorder-title",children:[n.jsx("span",{children:c("Test Case title")}),n.jsx("input",{value:N,onChange:C=>A(C.target.value),placeholder:c("Recorded login")})]}),n.jsxs("div",{className:"recorder-actions",children:[n.jsx("button",{type:"button",className:"btn btn-primary",onClick:Y,children:c("Save as Test Case")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:R,children:c("Discard")})]})]}),u.status==="stopped"&&J.length===0&&n.jsx("p",{className:"recorder-status",children:c("No steps were recorded. Start again and interact with the page.")}),w&&n.jsx("div",{className:"modern-modal-backdrop recorder-workspace-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal recorder-workspace-modal",role:"dialog","aria-modal":"true","aria-labelledby":"recorder-workspace-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("h2",{id:"recorder-workspace-title",children:c("Record and inspect")}),n.jsxs("p",{children:[c("Control the recorder from the left and preview the target page on the right. Your clicks and typing become Test Steps. Passwords are never read and are saved as")," ",n.jsx("code",{children:uC}),"."]})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":c("Close recorder workspace"),onClick:()=>S(!1),children:"×"})]}),n.jsxs("div",{className:"recorder-workspace-body",children:[n.jsxs("aside",{className:"recorder-workspace-sidebar",children:[n.jsx("span",{className:"recorder-workspace-status",children:c(f?"● Recording":"○ Recorder idle")}),n.jsx("button",{type:"button",className:"btn btn-danger",disabled:!f||p,onClick:()=>{v()},children:c(p?"Stopping…":"Stop recording")}),n.jsx("button",{type:"button",className:j?"btn btn-primary":"btn btn-secondary",disabled:!f||p,onClick:()=>{b()},children:c(j?"Inspecting element":"Inspect element")}),n.jsx("p",{className:"recorder-workspace-help",children:c("Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock.")}),u.inspection&&n.jsxs("div",{className:"recorder-workspace-selection",children:[n.jsxs("div",{className:"recorder-inspection-lock-row",children:[n.jsx("b",{children:c("Selected element")}),n.jsx("span",{className:u.inspection.locked?"is-locked":"",children:u.inspection.locked?c("Locked"):c("Hover preview")})]}),n.jsxs("code",{children:["<",u.inspection.tagName,">"]}),u.inspection.accessibleName&&n.jsx("span",{children:u.inspection.accessibleName}),n.jsx("code",{children:u.inspection.playwrightLocator}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:c("Copy locator")}),o&&u.inspection.locked&&n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{x(u.inspection)},children:c("Use this element")})]}),J.length>0&&n.jsx("ol",{className:"recorder-workspace-steps",children:J.map((C,q)=>n.jsxs("li",{children:[n.jsx("span",{children:q+1}),n.jsx("p",{children:La(C)})]},`${q}-${C.type}`))}),z&&n.jsxs("div",{className:"recorder-workspace-save",children:[n.jsxs("label",{children:[c("Test Case title"),n.jsx("input",{value:N,onChange:C=>A(C.target.value)})]}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:Y,children:c("Save as Test Case")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:R,children:c("Discard")})]}),n.jsxs("span",{className:"recorder-workspace-count",children:[c("Recorded steps:")," ",J.length]})]}),n.jsxs("main",{className:"recorder-workspace-preview",children:[n.jsxs("div",{className:"recorder-workspace-browser-bar",children:[n.jsx("button",{type:"button","aria-label":c("Back"),disabled:!f,onClick:()=>{T({type:"back"})},children:"←"}),n.jsx("button",{type:"button","aria-label":c("Forward"),disabled:!f,onClick:()=>{T({type:"forward"})},children:"→"}),n.jsx("button",{type:"button","aria-label":c("Reload"),disabled:!f,onClick:()=>{T({type:"reload"})},children:"↻"}),n.jsxs("form",{className:"recorder-workspace-address-form",onSubmit:C=>{C.preventDefault(),W()},children:[n.jsx("input",{className:"recorder-workspace-url",value:M,disabled:!f,"aria-label":c("Browser address"),spellCheck:!1,onFocus:()=>Z(!0),onBlur:()=>Z(!1),onChange:C=>F(C.target.value)}),n.jsx("button",{type:"submit",className:"recorder-address-go",disabled:!f||!M.trim(),children:c("Go")})]})]}),n.jsx("div",{className:"recorder-browser-viewport",style:{cursor:u.pointerCursor??"default"},role:"application",tabIndex:0,"aria-label":c("Interactive Playwright browser"),onKeyDown:V,onCompositionEnd:C=>{T({type:"text",text:C.data})},onPaste:C=>{C.preventDefault(),T({type:"text",text:C.clipboardData.getData("text")})},onWheel:Q,children:f?n.jsx("img",{src:P0(a,O),alt:c("Live Playwright browser"),draggable:!1,style:{cursor:u.pointerCursor??"default"},onLoad:H,onError:H,onClick:C=>{C.currentTarget.parentElement?.focus(),T({type:"click",...K(C)})},onMouseMove:C=>{Date.now()-$.current<80||($.current=Date.now(),E({type:"move",...K(C)}))}}):n.jsx("div",{className:"recorder-browser-loading",children:c(z?"Recording stopped. Save the Test Case from the left panel.":"Starting Playwright browser…")})}),n.jsx("p",{children:c("Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly.")}),n.jsxs("div",{className:"hidden","aria-hidden":"true",children:[n.jsx("span",{className:"recorder-live-browser-icon","aria-hidden":"true",children:"◉"}),n.jsx("b",{children:c("Live Playwright browser")}),n.jsx("p",{children:c("Interact with the browser window opened by LazyScout. This modal controls the same recording session and prevents the target page from being opened a second time.")}),n.jsx("span",{className:"recorder-live-browser-note",children:c("The page is intentionally not embedded in an iframe.")})]})]})]}),n.jsx("footer",{className:"modal-footer",children:n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>S(!1),children:c("Close workspace")})})]})})]})}function fC(a){return a.role&&a.accessibleName?{strategy:"role",role:a.role,name:a.accessibleName,cssSelector:a.cssSelector}:{strategy:"css",cssSelector:a.cssSelector}}const hC=["navigate","click","fill","select","check","wait","assert"],pC="https://lazyscout.lazyscout.workers.dev/guided-flow.html";function mC({flows:a,baseUrl:s,projectId:l,secrets:o,onSave:c,onGenerateTestCase:u}){const{ui:f}=Le(),[p,m]=L.useState(),[g,v]=L.useState(),[y,j]=L.useState("click"),[b,E]=L.useState(!1),[N,A]=L.useState(!1),[w,S]=L.useState(),[O,D]=L.useState(),[M,F]=L.useState(),[X,Z]=L.useState();L.useEffect(()=>{if(!a.length)return;const I=a.find(ee=>ee.id===p)??a[0];m(I.id),v(I)},[a]);const $=a.findIndex(I=>I.id===g?.id),B=!!(g?.baseUrl&&g.steps.length);function J(){const I=new Date().toISOString(),ee={id:crypto.randomUUID(),name:"New Guided Flow",description:"",baseUrl:s||"http://localhost:5173",steps:[{id:crypto.randomUUID(),type:"navigate",path:"/"}],createdAt:I,updatedAt:I};m(ee.id),v(ee),D(void 0)}function z(I){v(ee=>ee&&{...ee,...I,updatedAt:new Date().toISOString()})}function H(I,ee){if(!g)return;const he=g.steps.map((_e,Ne)=>Ne===I?ee:_e);z({steps:he})}function T(){g&&z({steps:[...g.steps,vC(y)]})}function K(I){g&&z({steps:g.steps.filter((ee,he)=>he!==I)})}function V(I,ee){if(!g)return;const he=I+ee;if(he<0||he>=g.steps.length)return;const _e=[...g.steps],[Ne]=_e.splice(I,1);_e.splice(he,0,Ne),z({steps:_e})}async function Q(){if(g){E(!0);try{const I=$<0?[...a,g]:a.map(ee=>ee.id===g.id?g:ee);await c(I)}finally{E(!1)}}}async function W(){if(!g)return;const I={...g,id:crypto.randomUUID(),name:`${g.name} Copy`,steps:g.steps.map(ee=>({...ee,id:crypto.randomUUID()})),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};await c([...a,I]),m(I.id),v(I)}async function R(){if(!g)return;const I=a.filter(ee=>ee.id!==g.id);E(!0);try{await c(I),m(I[0]?.id),v(I[0])}finally{E(!1)}}async function Y(){if(X)try{X==="save"?await Q():await R(),Z(void 0)}catch{}}async function x(){if(!g||!B||N)return;A(!0),D(void 0);const I=crypto.randomUUID();S(I);try{D(await L0(g,l,o,I))}catch(ee){D({status:"failed",framework:"playwright",runId:I,logs:[{timestamp:new Date().toISOString(),level:"fail",message:ee instanceof Error?ee.message:String(ee)}],stepStatuses:g.steps.map(he=>({id:he.id,status:"pending"}))})}finally{A(!1),S(void 0)}}async function C(){w&&await M0(w)}const q=L.useMemo(()=>new Map(O?.stepStatuses.map(I=>[I.id,I.status])),[O]);return n.jsxs("div",{className:"guided-flow-panel",children:[n.jsxs("div",{className:"guided-flow-intro",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:f("Tester-defined execution")}),n.jsx("h2",{children:f("Guided Flow")}),n.jsx("p",{children:f("Auto Scout finds the paths. Guided Scout follows yours.")})]}),n.jsxs("div",{className:"guided-flow-intro-actions",children:[n.jsxs("a",{className:"guided-flow-guide-link",href:pC,target:"_blank",rel:"noreferrer","aria-label":f("Open the visual Guided Flow guide"),title:f("Open visual Guided Flow guide"),children:[n.jsx("span",{"aria-hidden":"true",children:"▤"}),f("Guided Flow Guide")]}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:J,children:f("+ New Flow")})]})]}),n.jsxs("section",{className:"hidden","aria-hidden":"true",children:[n.jsxs("div",{className:"guided-flow-guide-grid",children:[n.jsxs("div",{children:[n.jsx("strong",{children:f("Inputs without a label")}),n.jsxs("p",{children:[f("Use CSS with a stable id or name. Example:")," ",n.jsx("code",{children:"input#username"}),"."]})]}),n.jsxs("div",{children:[n.jsx("strong",{children:f("Buttons")}),n.jsx("p",{children:f("Prefer Role + accessible name, or CSS when the button has a stable id.")})]}),n.jsxs("div",{children:[n.jsx("strong",{children:f("Labels")}),n.jsx("p",{children:f("Use Label when the input has a real HTML label. It is also useful for validation checks.")})]}),n.jsxs("div",{children:[n.jsx("strong",{children:f("Login example")}),n.jsx("pre",{children:`Fill · CSS · #username · TEST_USERNAME
52
+ await expect(page.getByRole("alert")).toContainText("Invalid password")`;return n.jsxs("section",{className:"qa-guidance",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Beginner guide")}),n.jsx("h3",{children:l("What should I add next?")}),n.jsx("p",{children:l("Use a template, then replace labels and expected results with what you observed.")})]}),n.jsxs("div",{className:"qa-guidance-actions",children:[n.jsxs("button",{type:"button",onClick:()=>s(c),children:[n.jsx("b",{children:l("Login success")}),n.jsx("span",{children:l("Fill credentials and verify the next URL")})]}),n.jsxs("button",{type:"button",onClick:()=>s(u),children:[n.jsx("b",{children:l("Login validation")}),n.jsx("span",{children:l("Try an invalid password and assert the alert")})]}),n.jsx("span",{children:l("For uploads, create a draft first and choose a safe test file before running.")})]})]})}function C2({stopped:a=!1}){return n.jsx("svg",{className:"run-button-icon",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:a?n.jsx("rect",{x:"5.25",y:"5.25",width:"9.5",height:"9.5",rx:"2",fill:"currentColor"}):n.jsx("path",{d:"M6.2 3.95a1.15 1.15 0 0 1 1.75-.97l7.05 5.03a1.2 1.2 0 0 1 0 1.98l-7.05 5.03a1.15 1.15 0 0 1-1.75-.97V3.95Z",fill:"currentColor"})})}function Ri({children:a,stopped:s=!1,onClick:l,disabled:o=!1}){return n.jsxs("button",{type:"button",className:`btn ${s?"btn-danger":"btn-dark"} run-button`,"data-help":s?void 0:"start-run",onClick:l,disabled:o,children:[n.jsx(C2,{stopped:s}),n.jsx("span",{children:a})]})}function T2({testCases:a,focused:s=!1,onEditSteps:l,projectId:o="active",secrets:c,blockedKeywords:u,onRunStatus:f,onRunResult:p}){const{ui:m,language:g}=Le(),[v,y]=L.useState("playwright"),S=a.find(fe=>/submit|login|sign in|เข้าสู่ระบบ|ล็อกอิน/i.test(`${fe.title} ${fe.module}`))??a[0],[b,E]=L.useState(S?.id??""),[N,A]=L.useState([]),w=s&&a.length===1,[j,R]=L.useState(!1),[O,M]=L.useState(!1),[F,X]=L.useState(""),[Z,$]=L.useState(),[B,J]=L.useState([]),[z,H]=L.useState(!1),[T,K]=L.useState(!1),[V,Q]=L.useState("all"),W=L.useRef(void 0),D=L.useRef(!1),Y=L.useRef(!1);L.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,D.current=!0;const fe=W.current;fe&&(fe.controller.abort(),bg(fe.runId).catch(()=>{}))}),[]);const[x,C]=L.useState({}),[q,I]=L.useState("loading"),[ee,he]=L.useState(""),[_e,Ne]=L.useState(0),le=L.useMemo(()=>[{value:"all",label:m("All folders and tags")},...[...new Set(a.map(fe=>fe.folder??fe.module))].sort().map(fe=>({value:`folder:${fe}`,label:`${m("Folder")}: ${fe}`})),...[...new Set(a.flatMap(fe=>fe.tags??[]))].sort().map(fe=>({value:`tag:${fe}`,label:`${m("Tag")}: ${fe}`}))],[a,m]),Ce=L.useMemo(()=>V==="all"?a:a.filter(fe=>V.startsWith("folder:")?(fe.folder??fe.module)===V.slice(7):(fe.tags??[]).includes(V.slice(4))),[V,a]),ye=Ce.find(fe=>fe.id===b)??Ce[0],Ge=Ce.filter(fe=>!N.includes(fe.id)).length;L.useEffect(()=>{a.some(fe=>fe.id===b)||E(S?.id??"")},[S?.id,b,a]),L.useEffect(()=>{if(s){I("ready");return}let fe=!1;return I("loading"),he(""),C({}),(async()=>{const ze=await V0(o),$e=`lazyscout.automation.${o}`;let Ve={};try{Ve=JSON.parse(localStorage.getItem($e)??"{}")}catch{}const rt={...Ve,...ze};Object.keys(Ve).length&&(await vg(o,rt),localStorage.removeItem($e)),fe||(C(rt),I("ready"))})().catch(()=>{fe||I("error")}),()=>{fe=!0}},[o,_e,s]),L.useEffect(()=>{const fe=$e=>{j&&($e.key==="F5"||($e.ctrlKey||$e.metaKey)&&$e.key.toLowerCase()==="r")&&($e.preventDefault(),K(!0))},ze=$e=>{if(!j)return;const Ve=W.current;Ve&&navigator.sendBeacon("/api/automation/stop",new Blob([JSON.stringify({runId:Ve.runId})],{type:"application/json"})),$e.preventDefault(),$e.returnValue=""};return window.addEventListener("keydown",fe),window.addEventListener("beforeunload",ze),()=>{window.removeEventListener("keydown",fe),window.removeEventListener("beforeunload",ze)}},[j]);const Me=L.useMemo(()=>ye?v==="playwright"?Kg(ye):Qg(ye):"",[v,ye]),k=ye?`${v}:${ye.id}`:"",pe=x[k]??Me,ce=ye?.steps.every(fe=>fe.type==="manual")&&(!pe.trim()||pe.trim()===Me.trim());function G(){X(pe),M(!0)}async function P(fe){if(!(!ye||q!=="ready")){I("saving"),he("");try{await vg(o,fe),Y.current&&(C(fe),M(!1))}catch{Y.current&&he(m("Could not save the code. Please try again."))}finally{Y.current&&I("ready")}}}function ne(){const fe={...x};delete fe[k],P(fe)}function xe(fe){const ze=`${v}:${fe.id}`;return x[ze]??(v==="playwright"?Kg(fe):Qg(fe))}async function ge(fe,ze){const $e=crypto.randomUUID(),Ve=new AbortController;W.current={runId:$e,controller:Ve};try{const rt=await T0(fe,v,ze,c,$e,o,u,Ve.signal);return Y.current&&(f?.(fe.id,rt.status==="passed"?"passed":rt.status==="failed"?"failed":"pending"),p?.(fe.id,rt)),rt}catch(rt){const tt=D.current||rt instanceof DOMException&&rt.name==="AbortError",ft={status:tt?"stopped":"failed",framework:v,logs:[{timestamp:new Date().toISOString(),level:tt?"warn":"fail",message:tt?"Run stopped by user.":rt instanceof Error?rt.message:String(rt)}]};return Y.current&&(f?.(fe.id,tt?"pending":"failed"),p?.(fe.id,ft)),ft}finally{W.current?.runId===$e&&(W.current=void 0)}}async function se(){D.current=!0;const fe=W.current;fe&&(fe.controller.abort(),bg(fe.runId).catch(()=>{})),H(!1),K(!1),J(ze=>[...ze,{timestamp:new Date().toISOString(),level:"warn",message:"Stop requested. Closing the active Playwright session…"}])}async function Te(){if(!ye||j||q!=="ready")return;D.current=!1,R(!0),$("running"),J([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --case ${ye.id}`},{timestamp:new Date().toISOString(),level:"info",message:`Starting Playwright runner: ${ye.title}`},{timestamp:new Date().toISOString(),level:"info",message:"Preparing browser context and test steps…"},{timestamp:new Date().toISOString(),level:"info",message:"Running generated automation source…"}]);const fe=await ge(ye,pe);$(fe.status),J(ze=>[...ze,...fe.logs]),R(!1)}async function Ee(){if(j||q!=="ready")return;const fe=Ce.filter($e=>!N.includes($e.id)).slice(0,50);if(D.current=!1,R(!0),$("running"),J([{timestamp:new Date().toISOString(),level:"info",message:`Selected cases: ${fe.length}/${Ce.length} in current filter · Run budget: 50 cases`}]),fe.length===0){J($e=>[...$e,{timestamp:new Date().toISOString(),level:"warn",message:"No test cases selected. Nothing to run."}]),$("pending"),R(!1);return}let ze="passed";for(const $e of fe){if(D.current)break;const Ve=await ge($e,xe($e));if((Ve.status==="failed"||ze==="passed")&&(ze=Ve.status),J(rt=>[...rt,...Ve.logs]),Ve.status==="stopped")break}$(D.current?"stopped":ze),R(!1)}function we(){navigator.clipboard?.writeText(pe)}function ke(){const fe=new Blob([pe],{type:"text/plain"}),ze=URL.createObjectURL(fe),$e=document.createElement("a");$e.href=ze,$e.download=`${ye?.id??"lazyscout-test"}.${v==="playwright"?"spec.ts":"cy.ts"}`,$e.click(),URL.revokeObjectURL(ze)}function qe(){se(),window.location.reload()}return n.jsxs("section",{className:"automation-page",children:[n.jsxs("div",{className:"automation-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s?"Scout":m("Automation workspace")}),n.jsx("h2",{children:w?ye?.title:m(s?"Selected cases":"Generated Tests")}),n.jsx("p",{children:w?ye?.id:!s&&m("Edit the generated file per Test Case, then run one case or selected cases.")})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[!w&&n.jsxs(n.Fragment,{children:[n.jsx("select",{className:"automation-run-filter",value:V,disabled:j,onChange:fe=>Q(fe.target.value),children:le.map(fe=>n.jsx("option",{value:fe.value,children:fe.label},fe.value))}),n.jsxs("span",{className:"automation-selected-count",children:[Ge,"/",Ce.length," ",m("selected")]})]}),j?n.jsx(Ri,{stopped:!0,onClick:()=>H(!0),children:m("Stop run")}):w?n.jsx(Ri,{onClick:Te,disabled:q!=="ready"||v!=="playwright"||!ye||ce,children:m("Run this case")}):n.jsx(Ri,{onClick:Ee,disabled:!Ge||q!=="ready"||v!=="playwright",children:m("Run selected cases")})]})]}),q==="error"&&n.jsxs("p",{className:"p-3",role:"alert",children:[m("Could not load saved code.")," ",n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Ne(fe=>fe+1),children:m("Retry")})]}),ee&&!O&&n.jsx("p",{className:"p-3",role:"alert",children:ee}),!s&&ye&&v==="playwright"&&q==="ready"&&!j&&n.jsx(N2,{sourceUrl:ye?.sourceUrl,onUse:fe=>{X(fe),M(!0)}}),n.jsxs("div",{className:w?"block":"automation-layout",children:[!w&&n.jsxs("aside",{className:"automation-case-list",children:[n.jsxs("div",{className:"automation-filter-head",children:[n.jsxs("span",{className:"field-label",children:[m("Test files ("),Ce.length,"/",a.length,")"]}),n.jsx("span",{children:m(V==="all"?"All":"Filtered")})]}),Ce.map(fe=>n.jsxs("button",{type:"button",className:ye?.id===fe.id?"selected":"",onClick:()=>{E(fe.id),M(!1)},children:[n.jsx("input",{type:"checkbox",checked:!N.includes(fe.id),onChange:ze=>{ze.stopPropagation();const $e=ze.target.checked;A(Ve=>$e?Ve.filter(rt=>rt!==fe.id):[...Ve,fe.id])},onClick:ze=>ze.stopPropagation(),"aria-label":`${m("Run")} ${fe.id}`}),n.jsx("span",{className:"case-file-icon",children:x[`playwright:${fe.id}`]||x[`cypress:${fe.id}`]?"●":"○"}),n.jsxs("span",{children:[n.jsx("b",{children:fe.id}),n.jsx("small",{children:fe.title}),fe.tags?.length?n.jsx("em",{className:"automation-tag",children:fe.tags.slice(0,2).join(" · ")}):null]})]},fe.id))]}),n.jsxs("div",{className:s?"min-w-0 bg-white p-4 sm:p-6":"automation-editor",children:[s?ye&&n.jsxs("section",{className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsx("h3",{className:"font-semibold",children:w?m("Steps"):ye.title}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:j,onClick:()=>l?.(ye),children:m("Edit steps")})]}),ye.steps.length>0&&n.jsx("ol",{className:"list-decimal space-y-2 ps-6 text-sm",children:ye.steps.map((fe,ze)=>n.jsx("li",{className:"break-words",children:z1(fe,g==="th")},ze))}),ce&&n.jsx("p",{className:"text-sm",children:m("Add an action or a check to run this case.")}),ye.expectedResult&&n.jsxs("p",{className:"text-sm",children:[n.jsx("b",{children:m("Expected Result")})," · ",ye.expectedResult]}),!w&&n.jsx(Ri,{onClick:Te,disabled:j||ce,children:m("Run this case")})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"automation-toolbar",children:[n.jsxs("select",{className:"field",value:v,onChange:fe=>y(fe.target.value),disabled:j,children:[n.jsx("option",{value:"playwright",children:"Playwright"}),n.jsx("option",{value:"cypress",children:"Cypress"})]}),n.jsx("span",{className:"automation-source",children:ye?.sourceUrl}),n.jsxs("div",{className:"ml-auto flex gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:G,disabled:O||j||!ye||q!=="ready",children:m("Edit code")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:ne,disabled:j||!ye||q!=="ready",children:m("Regenerate")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:we,children:m("Copy")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:ke,children:m("Save file")}),!w&&n.jsx(Ri,{onClick:Te,disabled:j||!ye||q!=="ready"||v!=="playwright",children:m("Run this case")})]})]}),v==="cypress"&&n.jsx("p",{className:"px-4 py-2 text-sm text-white",children:m("Export Cypress code to run it with Cypress.")}),n.jsx("pre",{className:"automation-code",children:q==="loading"?m("Loading saved code…"):q==="error"?"":pe||m("No Test Cases are available to generate.")})]}),Z&&n.jsxs("div",{className:"terminal-panel",children:[n.jsxs("div",{className:"terminal-head",children:[n.jsxs("span",{children:[n.jsx("i",{})," ",m(s?"Run log":"CLI output")]}),n.jsx("b",{className:Z==="passed"?"terminal-pass":Z==="failed"?"terminal-fail":"terminal-warn",children:m(Z.toUpperCase())})]}),n.jsx("div",{className:"terminal-body",children:B.map((fe,ze)=>n.jsxs("div",{className:`terminal-line terminal-${fe.level}`,children:[n.jsx("span",{children:new Date(fe.timestamp).toLocaleTimeString()}),fe.message,fe.durationMs!==void 0&&n.jsxs("em",{children:[fe.durationMs,m("ms")]})]},`${fe.timestamp}-${ze}`))})]})]})]}),z&&n.jsx(sv,{title:m("Stop the running tests?"),message:m("The active Playwright session will be closed. Remaining selected Test Cases will not run."),confirmLabel:m("Stop run"),onCancel:()=>H(!1),onConfirm:()=>{se()}}),T&&n.jsx(sv,{title:m("Stop tests and refresh?"),message:m("Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases."),confirmLabel:m("Stop and refresh"),onCancel:()=>K(!1),onConfirm:qe}),O&&n.jsx("div",{className:"modern-modal-backdrop code-editor-backdrop",children:n.jsxs("section",{className:"modern-modal code-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"code-editor-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:m("Automation source")}),n.jsxs("h2",{id:"code-editor-title",children:[g==="th"?"แก้ไขโค้ด":"Edit"," ",v==="playwright"?"Playwright":"Cypress",g==="en"&&" code"]}),n.jsxs("p",{children:[ye?.id," · ",ye?.title]})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":m("Close editor"),onClick:()=>M(!1),children:"×"})]}),n.jsx("div",{className:"code-editor-modal-body",children:n.jsx(S2,{value:F,framework:v,onChange:X,height:"100%"})}),n.jsxs("footer",{className:"modal-footer code-editor-modal-footer",children:[ee&&n.jsx("span",{role:"alert",children:ee}),n.jsx("span",{className:"muted",children:m("VS Code style editor · Ctrl+Space for suggestions.")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>M(!1),children:m("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:q!=="ready"||!F.trim(),onClick:()=>{P({...x,[k]:F})},children:m("Save code")})]})]})})]})}function sv({title:a,message:s,confirmLabel:l,onCancel:o,onConfirm:c}){const{ui:u}=Le();return n.jsx("div",{className:"modern-modal-backdrop",children:n.jsxs("section",{className:"modern-modal run-confirm-modal",role:"dialog","aria-modal":"true",children:[n.jsx("div",{className:"modal-header",children:n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:u("Running tests")}),n.jsx("h2",{children:a}),n.jsx("p",{children:s})]})}),n.jsxs("div",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:u("Keep running")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:c,children:l})]})]})})}const _2={"not-found":["หาองค์ประกอบนี้ไม่พบ","No matching element"],"not-visible":["องค์ประกอบยังไม่ปรากฏบนหน้าจอ","Element is not visible"],disabled:["ปุ่มยังไม่เปิดให้กด","Control is disabled"],covered:["มีองค์ประกอบอื่นบังตำแหน่งคลิก","Another element intercepted the click"],detached:["องค์ประกอบถูกนำออกจากหน้าระหว่างคลิก","Element was detached"],unstable:["องค์ประกอบยังขยับอยู่","Element did not become stable"],timeout:["หมดเวลารอ","Timed out"],closed:["หน้าเว็บหรือเบราว์เซอร์ปิดลง","Page or browser closed"],"connection-refused":["เซิร์ฟเวอร์ปฏิเสธการเชื่อมต่อ","Connection refused"],"dns-error":["หาโดเมนไม่พบ","Domain lookup failed"],"ssl-error":["ตรวจสอบใบรับรองเว็บไซต์ไม่สำเร็จ","TLS certificate error"],"no-response":["ไม่ได้รับคำตอบจากหน้าเว็บ","No page response"],"navigation-failed":["เปิดหน้าเว็บไม่สำเร็จ","Navigation failed"],"action-failed":["ทำคำสั่งไม่สำเร็จ","Action failed"],"http-error":["หน้าเว็บตอบกลับด้วยข้อผิดพลาด","Page returned an HTTP error"]},E2={filtered:["ตัวกรองคลิกของโปรเจกต์","Project click filter"],"session-ending":["การกระทำนี้จะจบเซสชัน","Session-ending action"],"outside-scope":["อยู่นอกขอบเขตที่เลือก","Outside the selected scope"],disabled:["ปุ่มยังไม่เปิดให้กด","Control is disabled"]},k2={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",422:"Unprocessable Content",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"};function bd(a){return[a,k2[a]].filter(Boolean).join(" ")}function Gy(a){return a.state==="failed"||(a.status??0)>=400}function of(a){return a.kind==="open"||a.kind==="reload"?a.path:a.name}const A2=L.memo(function({item:s,th:l,live:o,expanded:c,statusLabel:u,onToggle:f}){const p=s.kind==="open"?"goto":s.kind,m=s.failure?_2[s.failure]?.[l?0:1]:s.skipReason?E2[s.skipReason]?.[l?0:1]:void 0;return n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",className:"trace-step trace-command","aria-expanded":c,onClick:()=>f(s.id),children:[n.jsx("span",{className:"console-number",children:String(s.id).padStart(2,"0")}),n.jsxs("span",{className:"console-command-text",children:[n.jsx("b",{children:p})," ",s.kind==="click"?JSON.stringify(of(s)):of(s),s.afterPath&&s.afterPath!==s.path&&n.jsxs(n.Fragment,{children:[" → ",s.afterPath]}),(s.attempt??0)>1&&n.jsxs("small",{children:[" ","· ",l?"ครั้งที่":"attempt"," ",s.attempt]}),s.httpStatus!==void 0&&n.jsxs(n.Fragment,{children:[" · HTTP ",bd(s.httpStatus)]}),m&&n.jsxs("small",{className:s.status==="failed"?"console-fail":"",children:[" · ",m]})]}),n.jsxs("span",{className:"console-result console-"+s.status,children:[s.status==="done"?"✓ ":s.status==="failed"?"× ":"",u]})]}),s.navigation&&n.jsxs("div",{className:"trace-api-line",children:[n.jsx("span",{"aria-hidden":"true",children:"↳"}),n.jsxs("span",{children:[n.jsx("b",{children:"document"})," ",s.navigation.path," · HTTP ",bd(s.navigation.status)]}),n.jsx("span",{className:"console-result "+(s.navigation.status>=400?"console-fail":"console-number"),children:s.navigation.status>=400?l?"× ไม่ผ่าน":"× FAIL":""})]}),s.requests.map((g,v)=>{const y=Gy(g),S=g.state==="response"&&g.status!==void 0&&g.status>=200&&g.status<300,b=y?l?"× ไม่ผ่าน":"× FAIL":S?l?"✓ ผ่าน":"✓ PASS":g.status!==void 0?l?"ได้รับคำตอบ":"RESPONSE":o?l?"รอผล":"WAIT":l?"ยังไม่มีผล":"NO RESULT";return n.jsxs("div",{className:"trace-api-line",children:[n.jsx("span",{"aria-hidden":"true",children:"↳"}),n.jsxs("span",{children:[n.jsx("b",{children:g.method})," ",g.path,g.status!==void 0&&" · HTTP "+bd(g.status),g.state==="failed"&&" · "+(g.networkError||(l?"คำขอเครือข่ายล้มเหลว":"Network request failed"))]}),n.jsx("span",{className:"console-result "+(y?"console-fail":S?"console-done":"console-running"),children:b})]},v)}),s.requestsLimited&&n.jsx("small",{children:l?"แสดง 24 คำขอแรกของขั้นนี้":"Showing the first 24 requests for this step."})]})}),Fy=L.memo(function({steps:s,live:l=!1,runError:o,issues:c}){const{language:u}=Le(),f=u==="th",[p,m]=L.useState(),[g,v]=L.useState(!0),y=L.useRef(null),S=s.find(j=>j.id===p),b=L.useCallback(j=>{m(R=>R===j?void 0:j),v(!1)},[]),E=j=>j.status==="failed"?f?"ไม่ผ่าน":"FAIL":j.status==="skipped"?f?"ข้าม":"SKIP":j.status==="done"?f?"ผ่าน":"PASS":l?f?"กำลังรัน":"RUNNING":f?"ยังไม่จบ":"INCOMPLETE",N=s.reduce((j,R)=>j+ +(R.status==="failed")+ +((R.navigation?.status??0)>=400)+R.requests.filter(Gy).length,0),A=[...new Set([o,...(c??[]).map(j=>j.message)].filter(j=>!!j))];L.useLayoutEffect(()=>{l&&g&&y.current&&(y.current.scrollTop=y.current.scrollHeight)},[s,l,g]),L.useLayoutEffect(()=>{const j=y.current,R=j?.querySelector(".trace-inspector"),O=R?.parentElement;if(!j||!R||!O)return;const M=j.getBoundingClientRect(),F=R.getBoundingClientRect().bottom-M.bottom;F>0&&(j.scrollTop+=Math.max(0,Math.min(F,O.getBoundingClientRect().top-M.top)))},[p]),L.useLayoutEffect(()=>{const j=y.current;if(!l||!g||!j)return;const R=new ResizeObserver(()=>{j.clientHeight&&(j.scrollTop=j.scrollHeight)});return R.observe(j),()=>R.disconnect()},[l,g]);const w=S&&n.jsxs("section",{className:"trace-inspector","aria-label":f?"รายละเอียดขั้นตอน":"Step details",children:[n.jsxs("header",{children:[n.jsxs("div",{children:[n.jsxs("small",{children:[f?"ขั้นที่":"Step"," ",S.id]}),n.jsx("h3",{children:of(S)})]}),n.jsxs("span",{className:"trace-status trace-"+S.status,children:[E(S),S.durationMs!==void 0&&" · "+S.durationMs+" ms"]})]}),n.jsxs("p",{className:"trace-path",children:[n.jsx(Qe,{name:"globe"}),n.jsxs("code",{children:[S.path,S.afterPath&&S.afterPath!==S.path&&" → "+S.afterPath]})]}),S.kind==="click"&&n.jsxs("div",{className:"trace-detail",children:[n.jsx("h4",{children:f?"องค์ประกอบที่เลือก":"Target element"}),S.html?n.jsxs(n.Fragment,{children:[n.jsx("pre",{children:S.html}),n.jsx("small",{children:f?"ตัวเลือก CSS":"CSS selector"}),n.jsx("code",{children:S.selector})]}):n.jsx("p",{children:S.status==="running"?f?"กำลังหาปุ่มบนหน้าเว็บ…":"Locating the control…":f?"อ่าน HTML ขององค์ประกอบนี้ไม่ได้":"Element HTML unavailable."})]}),n.jsxs("div",{className:"trace-detail",children:[n.jsx("h4",{children:S.kind==="open"?f?"ข้อมูลที่พบบนหน้า":"Observed on the page":f?"สิ่งที่เปลี่ยนบนหน้า":"Page changes"}),S.changes?.length?n.jsx("ul",{children:S.changes.map(j=>n.jsx("li",{children:j},j))}):n.jsx("p",{children:S.status==="running"?f?"กำลังสังเกตหน้าเว็บ…":"Observing the page…":S.changes?f?"ไม่พบหัวข้อ กล่องโต้ตอบ หรือข้อความสถานะใหม่":"No new heading, dialog or status message observed.":f?"ไม่มีผลการอ่านหน้าสำหรับขั้นนี้":"No page observation for this step."})]}),n.jsxs("div",{className:"trace-detail",children:[n.jsx("h4",{children:f?"API ของเว็บที่พบในช่วงนี้":"Site API requests during this step"}),S.requests.length?n.jsx("ul",{className:"trace-requests",children:S.requests.map((j,R)=>n.jsxs("li",{children:[n.jsxs("div",{children:[n.jsx("b",{children:j.method})," ",n.jsx("code",{children:j.path})," ",n.jsx("span",{className:j.state==="failed"||(j.status??0)>=400?"trace-http-error":"trace-http-status",children:j.state==="failed"?f?"เชื่อมต่อไม่สำเร็จ":"Request failed":j.status??(f?"ยังไม่เห็นคำตอบ":"No response yet")})]}),(j.durationMs!==void 0||j.contentType)&&n.jsx("small",{children:[j.contentType,j.durationMs!==void 0?j.durationMs+" ms":void 0].filter(Boolean).join(" · ")}),j.itemCount!==void 0&&n.jsxs("small",{children:[j.itemCount," ",f?"รายการ":"items"]}),!!j.jsonFields?.length&&n.jsxs("small",{children:[f?"ฟิลด์":"Fields"," · ",j.jsonFields.join(", ")]})]},R))}):n.jsx("p",{children:f?"ยังไม่พบคำขอ XHR หรือ fetch ของเว็บนี้ในช่วงนี้":"No same-origin XHR or fetch observed during this step."}),S.requestsLimited&&n.jsx("small",{children:f?"แสดง 24 คำขอแรกของขั้นนี้":"Showing the first 24 requests for this step."})]})]});return n.jsx("div",{className:"trace-console-view",children:n.jsxs("section",{className:"trace-console","aria-label":f?"เทอร์มินัล Scout":"Scout terminal",children:[n.jsxs("header",{className:"trace-console-head",children:[n.jsxs("h3",{children:[n.jsx("span",{"aria-hidden":"true",children:"›_"})," ",f?"เทอร์มินัล Scout":"Scout terminal"]}),n.jsx("span",{role:"status",className:N?"console-fail":"",children:N>0&&(f?"ข้อผิดพลาด ":"Errors: ")+N}),l&&!g&&n.jsx("button",{type:"button",onClick:()=>{v(!0),m(void 0)},children:f?"ติดตามขั้นล่าสุด":"Follow latest"})]}),n.jsxs("div",{className:"trace-console-output",ref:y,tabIndex:0,"aria-label":f?"รายการคำสั่ง":"Command output",onScroll:j=>{const R=j.currentTarget;l&&g&&R.clientHeight&&R.scrollTop+R.clientHeight<R.scrollHeight-4&&v(!1)},children:[!s.length&&!A.length&&n.jsx("p",{role:"status",children:l?f?"กำลังเปิดเบราว์เซอร์…":"Opening the browser…":f?"ยังไม่มีคำสั่งที่บันทึกไว้":"No recorded commands."}),s.map((j,R)=>n.jsxs("div",{className:"trace-command-group","data-tail":l&&R===s.length-1||void 0,children:[n.jsx(A2,{item:j,th:f,live:l,expanded:p===j.id,statusLabel:E(j),onToggle:b}),j.id===p&&w]},j.id)),A.map(j=>n.jsxs("p",{className:"console-fail",role:"status",children:["× ERROR · ",j]},j))]})]})})});function O2({result:a}){const{ui:s,language:l}=Le(),[o,c]=L.useState(a.scoutTrace?.length?"trace":"events"),[u,f]=L.useState(!1),[p,m]=L.useState(a.runEvents);async function g(){if(!u){c("terminal"),f(!0),m([]);for(const y of a.runEvents)await new Promise(S=>window.setTimeout(S,120)),m(S=>[...S,y]);f(!1)}}const v=u||p.length<a.runEvents.length?p:a.runEvents;return!a.runEvents.length&&!a.stats.pagesVisited?n.jsxs("section",{className:"scout-log-card",children:[n.jsx("div",{className:"workspace-panel-head",children:n.jsx("h2",{children:s("Scout Log")})}),n.jsxs("div",{className:"workspace-empty",children:[n.jsx(Qe,{name:"activity"}),n.jsx("strong",{children:l==="th"?"ยังไม่มีบันทึกการสำรวจ":"No Scout activity yet"}),n.jsx("p",{children:l==="th"?"เริ่มสำรวจเว็บไซต์จากหน้าภาพรวม แล้วกลับมาดูหน้าที่พบและเหตุการณ์ระหว่างการสำรวจที่นี่":"Scout a website from Overview to see the pages visited and events recorded here."})]})]}):n.jsxs("section",{className:"scout-log-card",children:[n.jsxs("div",{className:"workspace-panel-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Playwright Scout Log")}),n.jsx("h2",{children:s("Scout Log")})]}),n.jsxs("span",{className:"run-live",children:[n.jsx("i",{})," ",s("DONE")]})]}),n.jsxs("div",{className:"scout-log-tabs",children:[!!a.scoutTrace?.length&&n.jsx("button",{type:"button",className:o==="trace"?"active":"",onClick:()=>c("trace"),children:l==="th"?"เทอร์มินัล Scout":"Scout terminal"}),n.jsx("button",{type:"button",className:o==="events"?"active":"",onClick:()=>c("events"),children:s("◉ Event Stream")}),!a.scoutTrace?.length&&n.jsx("button",{type:"button",className:o==="terminal"?"active":"",onClick:()=>c("terminal"),children:s("›_ CLI Terminal")})]}),n.jsxs("div",{className:"run-summary",children:[n.jsxs("div",{children:[n.jsxs("strong",{children:[a.stats.durationMs,s("ms")]}),n.jsx("span",{children:s("duration")})]}),n.jsxs("div",{children:[n.jsx("strong",{children:a.stats.pagesVisited}),n.jsx("span",{children:s("pages")})]}),n.jsxs("div",{children:[n.jsx("strong",{className:a.stats.urlsSkipped?"text-amber-600":"",children:a.stats.urlsSkipped}),n.jsx("span",{children:s("skipped")})]})]}),o==="trace"&&a.scoutTrace?n.jsx(Fy,{steps:a.scoutTrace,issues:a.issues}):o==="terminal"?n.jsxs("div",{className:"scout-cli-terminal",children:[n.jsxs("div",{className:"scout-cli-head",children:[n.jsxs("span",{children:[n.jsx("i",{})," ",s("Playwright CLI output")]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("b",{children:s(u?"RUNNING":"COMPLETED")}),n.jsx("button",{type:"button",className:"cli-run-button",onClick:g,disabled:u,children:u?s("Running…"):l==="th"?"เล่นบันทึกซ้ำ":"Replay log"})]})]}),n.jsxs("div",{className:"scout-cli-body",children:[n.jsxs("div",{children:[n.jsx("em",{children:"$"})," npx playwright scout ",a.startUrl]}),v.map((y,S)=>n.jsxs("div",{className:y.result==="failed"?"cli-fail":y.result==="warning"||y.result==="blocked"?"cli-warn":"cli-pass",children:[n.jsx("em",{children:"›"})," ",y.message]},`cli-${y.timestamp}-${S}`)),u&&n.jsx("div",{className:"cli-cursor",children:"▌"})]})]}):n.jsx("div",{className:"run-events",children:a.runEvents.map((y,S)=>n.jsxs("div",{className:"run-event",children:[n.jsx("div",{className:`event-marker event-${y.result}`}),n.jsxs("div",{className:"run-event-body",children:[n.jsxs("div",{className:"run-event-top",children:[n.jsx("span",{children:new Date(y.timestamp).toLocaleTimeString()}),n.jsx("b",{children:y.eventType})]}),n.jsx("p",{children:y.message}),y.currentUrl&&n.jsx("small",{children:new URL(y.currentUrl).pathname})]})]},`${y.timestamp}-${S}`))}),n.jsxs("div",{className:"inspector-foot",children:[n.jsx("span",{className:"status-dot status-pass"})," ",s("Scout completed · Playwright events captured")]})]})}const R2=L.memo(function({frame:s}){const l=Le().language==="th",[o,c]=L.useState(),u=o?.frame??s,f=o?.index??u?.targetIndex,p=f===void 0?void 0:u?.elements[f],m=u?.targetIndex===void 0?void 0:u.elements[u.targetIndex];function g(v){u&&c({frame:u,index:v})}return n.jsxs("section",{className:"scout-preview","aria-label":l?"ภาพจากเบราว์เซอร์":"Browser preview",children:[n.jsxs("header",{children:[n.jsx(Qe,{name:"globe"}),n.jsx("h3",{children:l?"ภาพจากเบราว์เซอร์":"Browser preview"}),u&&n.jsxs("span",{children:["#",u.stepId]})]}),u?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"scout-preview-location",children:[n.jsx("span",{"aria-hidden":"true",children:"● ● ●"}),n.jsx("code",{children:u.path})]}),n.jsxs("div",{className:"scout-preview-screen",style:{aspectRatio:u.width+" / "+u.height},children:[n.jsx("img",{src:"data:image/jpeg;base64,"+u.jpeg,alt:l?"หน้าเว็บในขั้นตอนนี้":"Website at this step",draggable:!1}),u.elements.map((v,y)=>n.jsx("button",{type:"button",tabIndex:-1,className:"scout-preview-hit"+(y===f?" is-selected":""),"aria-label":v.label,onClick:()=>g(y),style:{left:100*v.x/u.width+"%",top:100*v.y/u.height+"%",width:100*v.width/u.width+"%",height:100*v.height/u.height+"%",zIndex:Math.max(1,1e3-Math.round(999*v.width*v.height/(u.width*u.height)))}},y)),m&&!o&&n.jsx("span",{className:"scout-click-pointer","aria-hidden":"true",style:{left:100*(m.x+m.width/2)/u.width+"%",top:100*(m.y+m.height/2)/u.height+"%"},children:n.jsx("svg",{viewBox:"0 0 20 24",width:"19",height:"23",children:n.jsx("path",{d:"M2 2 17 13l-7 .7-3.4 7.1Z",fill:"currentColor",stroke:"white",strokeWidth:"1.6",strokeLinejoin:"round"})})},u.stepId)]}),n.jsxs("div",{className:"scout-preview-inspect",children:[n.jsxs("label",{children:[n.jsx("span",{children:l?"ตรวจองค์ประกอบในภาพ":"Inspect an element"}),n.jsxs("select",{value:o?.index??"",onChange:v=>v.target.value===""?c(void 0):g(Number(v.target.value)),children:[n.jsx("option",{value:"",children:l?"กดที่ปุ่มในภาพ หรือเลือกจากรายการ":"Click a control in the image or select one"}),u.elements.map((v,y)=>n.jsxs("option",{value:y,children:[v.tag," · ",v.label]},y))]})]}),p&&n.jsxs("div",{className:"scout-preview-element",children:[n.jsx("small",{children:o?l?"องค์ประกอบที่เลือก":"Selected element":l?"เป้าหมายคลิกของ Scout":"Scout click target"}),n.jsx("strong",{children:p.label}),n.jsx("code",{children:p.html})]}),o&&n.jsxs("button",{type:"button",onClick:()=>c(void 0),children:[l?"กลับไปดูภาพล่าสุด":"Resume live preview"," →"]})]})]}):n.jsxs("div",{className:"scout-preview-wait",children:[n.jsx(Qe,{name:"globe"}),n.jsx("p",{children:l?"รอภาพจากหน้าเว็บที่กำลังสำรวจ…":"Waiting for a view of the site…"})]})]})});function D2({checks:a,secrets:s}){const{ui:l}=Le(),[o,c]=L.useState(),[u,f]=L.useState({}),[p,m]=L.useState();async function g(v,y=!1){c(v.id);try{const S=await Q0(v,s,y);f(b=>({...b,[v.id]:`${S.status.toUpperCase()} · ${S.message}`}))}catch(S){f(b=>({...b,[v.id]:S instanceof Error?S.message:String(S)}))}finally{c(void 0)}}return n.jsxs("div",{className:"api-checks",children:[n.jsxs("div",{className:"api-checks-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Network validation")}),n.jsx("h3",{children:l("Test API")}),n.jsx("p",{children:l("Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured.")})]}),n.jsxs("span",{className:"status-badge status-badge-pass",children:[a.length," ",l("observed")]})]}),a.length===0?n.jsxs("div",{className:"empty-state",children:[l("Run Analyze with")," ",n.jsx("b",{children:l("Include API checks from XHR/fetch")})," ",l("enabled to collect the API requests used by the page.")]}):n.jsx("div",{className:"api-table",children:a.map(v=>n.jsxs("div",{className:"api-row",children:[n.jsx("span",{className:"api-method",children:v.method}),n.jsxs("div",{children:[n.jsx("b",{children:v.id}),n.jsx("p",{children:v.url}),n.jsx("small",{children:v.note??`Observed HTTP ${v.observedStatus??"—"} · ${v.durationMs??0}ms`})]}),n.jsx("span",{className:`status-badge ${v.status==="observed"?"status-badge-pass":"status-badge-warn"}`,children:v.status}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>["GET","HEAD","OPTIONS"].includes(v.method.toUpperCase())?void g(v):m(v),disabled:o===v.id,children:o===v.id?l("Checking…"):l("Run API")}),u[v.id]&&n.jsx("div",{className:"api-result",children:u[v.id]})]},v.id))}),p&&n.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal",role:"dialog","aria-modal":"true","aria-labelledby":"unsafe-api-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Protected API action")}),n.jsxs("h2",{id:"unsafe-api-title",children:[l("Run")," ",p.method.toUpperCase()," ",l("once?")]})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>m(void 0),"aria-label":l("Close"),children:"×"})]}),n.jsxs("div",{className:"modal-body",children:[n.jsx("p",{children:l("This request can create, update, or delete data. LazyScout will send it only once for this run.")}),n.jsx("code",{className:"block break-all",children:p.url})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>m(void 0),children:l("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{m(void 0),g(p,!0)},children:l("Run once")})]})]})})]})}function L2({view:a,onChange:s,counts:l}){const{t:o,language:c,ui:u}=Le(),f=a==="queue"?"map":a==="case-run"?"automation":a,p=c==="th"?"หน้าในโปรเจกต์":"Project views",m=[["overview",o("overview"),"overview"],["qa","AI Scout","spark"],["testcases",o("testCases"),"cases",l.cases],["map",c==="th"?"แผนที่เว็บ":"Page map","map"],["automation",o("automation"),"play"],["documents",c==="th"?"เอกสาร":"Documents","documents"],["scoutlog",o("scoutLog"),"activity"],["explorer",o("explorer"),"globe",l.states],["loadtest",u("Load Test"),"gauge"]];return n.jsxs("nav",{className:"workspace-nav","aria-label":p,children:[n.jsxs("label",{className:"view-picker",children:[n.jsx("span",{children:p}),n.jsx("select",{value:f,onChange:g=>s(g.target.value),children:m.map(([g,v,,y])=>n.jsxs("option",{value:g,children:[v,y!==void 0?` (${y})`:""]},g))})]}),m.map(([g,v,y,S])=>n.jsxs("button",{type:"button","aria-label":S===void 0?v:`${v} ${S}`,"aria-current":f===g?"page":void 0,"aria-haspopup":g==="explorer"?"dialog":void 0,className:[f===g?"is-active":"",g==="qa"?"ai-workspace-nav-tab":""].filter(Boolean).join(" "),onClick:()=>s(g),children:[n.jsx(Qe,{name:y}),v,S!==void 0&&n.jsx("small",{children:S})]},g))]})}function M2(a,s,l,o){const c=(p,m)=>a?p:m,u={selector:'[data-help="project-name"]',title:c("ตั้งชื่อโปรเจกต์","Name the project"),body:c("ใช้ชื่อเว็บหรือชุดงานที่จำได้ง่าย เว้นว่างได้ถ้าอยากเริ่มเลย","Use a site or suite name you will recognise, or leave it blank to get started.")};if(s)return[{title:c("ลองโปรเจกต์ตัวอย่าง","Try the sample project"),icon:"cases",steps:[{selector:'[data-help="sample"]',title:c("เปิดเคสที่เตรียมไว้","Open the sample cases"),body:c("เลือกเทมเพลต Practice Login Demo ตรวจชื่อแล้วกดสร้างโปรเจกต์เพื่อเปิดเคสตัวอย่าง","Select the Practice Login Demo template, review the name, then choose Create project to open the sample cases.")}]},{title:c("เริ่มจากเว็บไซต์ของฉัน","Start with my website"),icon:"globe",steps:[u,{selector:'[data-help="new-scout"]',title:c("เลือกสำรวจเว็บไซต์","Choose Scout a website"),body:c("ตรวจชื่อแล้วกดสร้างโปรเจกต์ จากนั้นกรอก URL และกดสำรวจเว็บไซต์เมื่อพร้อม","Review the name and choose Create project. Enter your URL and start Scout when ready.")}]},{title:c("สร้างชุดเคสเปล่า","Create an empty suite"),icon:"plus",steps:[u,{selector:'[data-help="empty-project"]',title:c("สร้างโปรเจกต์เปล่า","Create the empty project"),body:c("ตรวจชื่อแล้วกดสร้างโปรเจกต์ จากนั้นเขียนเคสเอง นำเข้าจากไฟล์ หรือกดสำรวจเว็บไซต์","Review the name and choose Create project. Then write cases, import a file, or choose Scout a website.")}]}];const f=[];return l&&f.push({page:"overview",icon:"globe",title:c("สำรวจเว็บไซต์","Scout a website"),steps:[{selector:"#target-url",title:c("ใส่ URL ที่จะทดสอบ","Enter the target URL"),body:c("ใส่ที่อยู่เต็มของหน้าแรกที่ต้องการให้ Scout เปิด เช่น https://example.com/shop","Enter the full address of the first page for Scout to visit, such as https://example.com/shop.")},{selector:"#max-pages",title:c("กำหนดจำนวนหน้า","Set a page limit"),body:c("ถ้าลองครั้งแรก ใช้จำนวนน้อยก่อนเพื่อให้ตรวจผลได้เร็ว","For a first run, use a small limit so you can review the results quickly.")},{selector:".scout-submit",title:c("เริ่มสำรวจเมื่อพร้อม","Start when ready"),body:c("ปุ่มนี้เริ่มสำรวจตาม URL และขอบเขตที่เลือก กดจบคำแนะนำเพื่อกลับไปตรวจค่าก่อนได้","This button starts Scout with your URL and scope. Finish the tour to review your settings first.")}]}),o&&f.push({page:"testcases",icon:"cases",title:c("ค้นหาและเปิดเคสทดสอบ","Find and open test cases"),steps:[{selector:"#search",title:c("ค้นหาจากชื่อหรือรหัส","Find a case"),body:c("พิมพ์ชื่อหรือรหัสเพื่อลดรายการที่เห็น ลบคำค้นเพื่อดูทุกเคสอีกครั้ง","Type a title or case ID to narrow the list. Clear the search to see all cases again.")},{selector:".case-open",optional:!0,title:c("เปิดอ่านเคส","Read a case"),body:c("แตะชื่อหรือรหัสเพื่อดูขั้นตอนและผลที่คาดหวัง กด Escape หรือปิดเพื่อกลับมารายการเดิม","Select the title or ID to see the steps and expected result. Close the detail to return to this list.")},{selector:'[data-help="add-case"]',title:c("เพิ่มเคสของคุณ","Add your own case"),body:c("เปิดแบบฟอร์มเพื่อเขียนเคสใหม่ แล้วกดบันทึกเมื่อกรอกเสร็จ","Open a draft to write a new case. Save it when you are ready.")},{selector:".case-tools summary",title:c("ใช้เครื่องมือของชุดเคส","Use the case tools"),body:c("เปิดส่วนนี้เพื่อกรองเคส นำเข้าไฟล์ หรือบันทึกขั้นตอน ปุ่มส่งออกอยู่ถัดลงมาข้างจำนวนเคส","Expand this section to filter cases, import a file or record a flow. The export buttons are beside the case count below.")}]}),f.push({page:"qa",icon:"spark",title:c("เชื่อม AI Scout","Connect AI Scout"),steps:[{selector:'[data-help="provider"]',title:c("เลือกผู้ให้บริการ","Choose a provider"),body:c("เลือกกฎบนเครื่องเพื่อเริ่มทันที หรือเลือกผู้ให้บริการ AI แล้วทำตามขั้นตอนเชื่อมต่อที่ปรากฏ","Choose local rules to start immediately, or select an AI provider and follow its connection steps.")},{selector:'[data-help="mcp"]',title:c("ตั้งค่า MCP สำหรับ Codex","Set up MCP for Codex"),body:c("เปิดส่วนนี้ถ้าต้องการใช้ Codex กับโปรเจกต์นี้ คุณเลือกสิทธิ์ได้ตอนตั้งค่า","Open this section to use Codex with this project and choose its permissions during setup.")}]},{page:"map",icon:"map",title:c("ดูแผนที่และตัวอย่างเว็บ","Explore the page map"),steps:[{selector:".page-picker select",optional:!0,title:c("เลือกหน้าในแผนที่","Pick a page"),body:c("เลือก URL ที่สนใจเพื่อดูเคสของหน้านั้น","Select a URL to see the cases linked to that page.")},{selector:".map-segments button:last-child",optional:!0,title:c("เปิดตัวอย่างเว็บ","Preview the page"),body:c("สลับจากแผนที่ไปยังหน้าเว็บ ถ้าเว็บบล็อกการแสดงตัวอย่าง ให้ใช้ปุ่มเปิดแท็บใหม่","Switch from the map to the page preview. If the site blocks embedding, use Open in new tab.")},{selector:".map-empty button",optional:!0,title:c("เพิ่มเว็บให้แผนที่","Set up the first page"),body:c("แผนที่ยังว่าง เริ่มจากตั้งค่าเว็บไซต์ที่จะทดสอบ","The map is empty. Start by setting up the site you want to test.")}]},{page:"documents",icon:"documents",title:c("หาเอกสารของโปรเจกต์","Find project documents"),steps:[{selector:".document-library header button",title:c("อัปเดตรายการเอกสาร","Refresh the document list"),body:c("หลังบันทึกรายงานผ่าน MCP ให้กดรีเฟรช แล้วเลือกดูตัวอย่างหรือดาวน์โหลดไฟล์ที่ต้องการ","After saving a report through MCP, refresh the list, then preview or download the file.")}]}),o&&f.push({page:"automation",icon:"play",title:c("เลือกและรันเคสทดสอบ","Select and run test cases"),steps:[{selector:".automation-case-list button",optional:!0,title:c("ตรวจเคสก่อนรัน","Review the case"),body:c("เลือกชื่อเคสเพื่อดูสคริปต์ ใช้ช่องทำเครื่องหมายข้างชื่อเพื่อเลือกเคสที่จะรัน","Choose a case to inspect its script. The checkboxes beside the names select which cases to run.")},{selector:'.automation-header [data-help="start-run"]',title:c("รันเคสที่เลือก","Run the selection"),body:c("ตรวจจำนวนเคสที่เลือกก่อนกดปุ่มรัน ถ้าแค่อยากดูวิธีใช้ ให้กดจบคำแนะนำ","Check the selected case count before activating Run. Choose Finish to leave the tour without starting a run.")}]}),f}function Es(a){return Array.from(document.querySelectorAll(a.selector)).find(s=>s.getClientRects().length>0&&!s.closest("[hidden], [inert]")&&!(a.optional&&s.matches(":disabled")))}const iv=420;function U2(a){const s=[];for(let l=a.parentElement;l;l=l.parentElement)(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)&&s.push({el:l,x:l.scrollLeft,y:l.scrollTop});return s}function z2(a,s,l){const c=(S,b,E)=>Math.max(b,Math.min(S,E)),u=c(a.left,12,innerWidth-s-12),f=a.top+a.height+12,p=a.top-12;if(f+l<=innerHeight-12)return{left:u,top:f};if(p-l>=12)return{left:u,top:p-l};const m=a.left+a.width+12,g=c(a.top,12,innerHeight-l-12);if(m+s<=innerWidth-12)return{left:m,top:g};if(a.left-s-12>=12)return{left:a.left-s-12,top:g};const v=innerHeight-f>=p,y=Math.max(1,v?innerHeight-f-12:p-12);return{left:u,top:v?f:Math.max(12,p-l),maxHeight:y}}function Vy({welcome:a=!1,scout:s=!1,cases:l=!1,onNavigate:o}){const{language:c}=Le(),u=c==="th",[f,p]=L.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",className:"guide-link help-launch","aria-label":u?"ช่วยเหลือแบบทีละขั้น":"Step-by-step help","aria-haspopup":"dialog",onClick:()=>p(!0),children:[n.jsx(Qe,{name:"help"}),u?"ช่วยเหลือ":"Help"]}),f&&n.jsx(B2,{topics:M2(u,a,s,l),th:u,onNavigate:o,onClose:()=>p(!1)})]})}function B2({topics:a,th:s,onNavigate:l,onClose:o}){const c=L.useRef(null),u=L.useRef(null),f=L.useRef(null),[p,m]=L.useState(),[g,v]=L.useState([]),[{index:y,backwards:S},b]=L.useState({index:0,backwards:!1}),[E,N]=L.useState(),A=L.useRef(void 0),[w,j]=L.useState(!1),[R,O]=L.useState({width:320,height:190}),M=g[y];L.useLayoutEffect(()=>{const Z=c.current;return Z.showModal(),()=>Z.close()},[]),L.useLayoutEffect(()=>{b({index:0,backwards:!1}),v(p?.steps.filter(Z=>!Z.optional||Es(Z))??[])},[p]),L.useLayoutEffect(()=>{const Z=A.current;if(A.current=M,!M){N(void 0),j(!1);return}const $=window.matchMedia("(prefers-reduced-motion: reduce)");let B=0,J=!1;const z=()=>{const W=Es(M);if(!W){N(void 0);return}const D=W.getBoundingClientRect(),Y=Math.max(2,D.left-4),x=Math.max(2,D.top-4),C=Math.min(innerWidth-2,D.right+4),q=Math.min(innerHeight-2,D.bottom+4);N(C>Y&&q>x?{left:Y,top:x,width:C-Y,height:q-x}:void 0)},H=()=>{cancelAnimationFrame(B),J=!1,j(!1),Es(M)?.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),z()},T=Es(M);if(T&&Z&&Z!==M&&!$.matches){const W=U2(T);T.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"}),z();const D=W.map(({el:C,x:q,y:I})=>({el:C,x:q,y:I,dx:C.scrollLeft-q,dy:C.scrollTop-I})).filter(({dx:C,dy:q})=>C||q);for(const{el:C,x:q,y:I}of D)C.scrollTo({left:q,top:I,behavior:"instant"});J=!0,j(!0);const Y=performance.now(),x=C=>{const q=Math.min(1,Math.max(0,(C-Y)/iv)),I=q*q*(3-2*q);for(const{el:ee,x:he,y:_e,dx:Ne,dy:le}of D)ee.scrollTo({left:he+Ne*I,top:_e+le*I,behavior:"instant"});q<1?B=requestAnimationFrame(x):(J=!1,j(!1),z())};B=requestAnimationFrame(x)}else H();f.current?.focus({preventScroll:!0});const K=()=>{J||z()},V=new ResizeObserver(K);T&&V.observe(T),V.observe(document.documentElement);const Q=new MutationObserver(W=>{W.some(D=>!c.current?.contains(D.target))&&K()});return Q.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("scroll",K,!0),window.addEventListener("resize",H),$.addEventListener("change",H),()=>{cancelAnimationFrame(B),V.disconnect(),Q.disconnect(),document.removeEventListener("scroll",K,!0),window.removeEventListener("resize",H),$.removeEventListener("change",H)}},[M]),L.useLayoutEffect(()=>{const Z=u.current;if(!Z)return;const $=()=>O({width:Z.parentElement.offsetWidth,height:Z.offsetHeight+2});$();const B=new ResizeObserver($);return B.observe(Z),()=>B.disconnect()},[p,M]);function F(){const Z=M&&Es(M);if(!(w||!Z||Z.matches(":disabled")))if(c.current?.close(),o(),Z.focus({preventScroll:!0}),Z instanceof HTMLSelectElement)try{Z.showPicker()}catch{}else!(Z instanceof HTMLInputElement)&&!(Z instanceof HTMLTextAreaElement)&&Z.click()}const X=E?z2(E,R.width,R.height):void 0;return n.jsx("dialog",{ref:c,className:"help-dialog"+(p&&E?" has-highlight":""),"data-sliding":w,style:{"--help-slide-duration":`${iv}ms`},"aria-label":s?"ช่วยเหลือ LazyScout":"LazyScout help",onCancel:Z=>{Z.preventDefault(),Z.stopPropagation(),o()},onClick:Z=>{Z.target===Z.currentTarget&&o()},children:p?n.jsxs(n.Fragment,{children:[E&&n.jsx("button",{type:"button",className:"help-hotspot",style:{transform:`translate3d(${E.left}px, ${E.top}px, 0)`,width:E.width,height:E.height},disabled:w||!M||Es(M)?.matches(":disabled"),"aria-label":s?`ลองใช้: ${M?.title}`:`Try: ${M?.title}`,onClick:F}),n.jsx("section",{className:"help-card"+(X?"":" is-centered"),style:X&&{transform:`translate3d(${X.left}px, ${X.top}px, 0)`,height:Math.min(R.height,X.maxHeight??innerHeight-24)},children:n.jsxs("div",{ref:u,className:"help-card-body",children:[n.jsxs("header",{children:[n.jsxs("button",{type:"button",className:"help-topics-back",onClick:()=>m(void 0),children:[n.jsx(Qe,{name:"back"}),s?"เลือกหัวข้อ":"Topics"]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":s?"ปิดคำแนะนำ":"Close tour",onClick:o,children:n.jsx(Qe,{name:"close"})})]}),n.jsxs("div",{className:"help-step-copy","data-backwards":S,"aria-live":"polite",children:[M&&n.jsxs("small",{children:[p.title," · ",y+1,"/",g.length]}),n.jsx("h2",{ref:f,tabIndex:-1,children:M?.title??p.title}),n.jsx("p",{children:E&&M?M.body:s?"ปุ่มนี้ยังไม่พร้อมในหน้าปัจจุบัน เลือกขั้นถัดไปหรือกลับไปเลือกหัวข้อได้":"This control is unavailable in the current view. Continue or choose another topic."})]},M?.selector),n.jsxs("footer",{children:[y>0&&n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>b({index:y-1,backwards:!0}),children:s?"ย้อนกลับ":"Back"}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>y+1<g.length?b({index:y+1,backwards:!1}):o(),children:y+1<g.length?s?"ถัดไป":"Next":s?"จบคำแนะนำ":"Finish"})]})]})})]}):n.jsxs("section",{className:"help-menu",children:[n.jsxs("header",{children:[n.jsx("h2",{children:s?"อยากทำอะไร?":"What would you like to do?"}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":s?"ปิด":"Close",onClick:o,children:n.jsx(Qe,{name:"close"})})]}),n.jsx("p",{children:s?"เลือกงาน แล้วแตะปุ่มที่สว่างเพื่อลองใช้ หรือกดถัดไปเพื่อดูก่อน":"Choose a task. Select the highlighted control to use it, or choose Next to look ahead."}),n.jsx("div",{className:"help-topics",children:a.map(Z=>n.jsxs("button",{type:"button",onClick:()=>{Z.page&&l?.(Z.page),m(Z)},children:[n.jsx(Qe,{name:Z.icon}),n.jsx("span",{children:Z.title}),n.jsx(Qe,{name:"next"})]},Z.title))}),n.jsxs("a",{href:`/guide/index.html?lang=${s?"th":"en"}`,target:"_blank",rel:"noreferrer",children:[s?"อ่านคู่มือฉบับเต็ม":"Read the full guide"," ",n.jsx(Qe,{name:"external"})]})]})})}function I2({projectId:a,detailsRef:s}){const{ui:l,language:o}=Le(),c=o==="th",[u,f]=L.useState(),[p,m]=L.useState(!1),[g,v]=L.useState(""),[y,S]=L.useState(!1),[b,E]=L.useState(!1),[N,A]=L.useState("");async function w(){if(!(u||y)){S(!0),v("");try{f(await ij(a))}catch(B){v(B instanceof Error?B.message:"Could not prepare MCP settings.")}finally{S(!1)}}}const j=u?.command,R=u?.names[p?"run":"read"],O=u?[...u.args,...p?["--allow-qa-write"]:[]]:[],M=j&&R?`[mcp_servers.${R}]
53
+ command = ${JSON.stringify(j)}
54
+ args = ${JSON.stringify(O)}`:void 0,F=B=>`'${B.replaceAll("'",u?.platform==="win32"?"''":`'"'"'`)}'`,X=j&&R?`codex mcp add ${R} -- ${[j,...O].map(F).join(" ")}`:void 0;async function Z(){E(!0),A(""),v("");try{const B=await lj(a,p);v(c?`ตั้งค่า ${B.name} แล้ว เปิด Codex ใหม่เพื่อโหลด MCP`:`Configured ${B.name}. Reopen Codex to load the MCP server.`)}catch(B){A(B instanceof Error?B.message:"Could not connect Codex MCP.")}finally{E(!1)}}function $(B){if(!navigator.clipboard){v("Select and copy the settings above.");return}navigator.clipboard.writeText(B).then(()=>v("Copied.")).catch(()=>v("Select and copy the settings above."))}return n.jsxs("details",{ref:s,id:"local-mcp",className:"scroll-mt-6 rounded-2xl border border-indigo-200 bg-indigo-50/75 p-5 text-slate-900",onToggle:B=>{B.currentTarget.open&&w()},children:[n.jsx("summary",{className:"cursor-pointer font-semibold text-indigo-950",children:c?"เชื่อม MCP บนเครื่อง":"Connect a local MCP client"}),n.jsx("p",{className:"mt-2 text-sm text-slate-600",children:c?"ให้ Codex อ่านข้อมูลจากโปรเจกต์นี้ผ่าน MCP บนเครื่อง เลือกเพิ่มสิทธิ์รัน Scout ได้ด้านล่าง":"Give Codex read access to this project over local MCP. Optionally allow Scout runs below."}),y&&n.jsx("p",{role:"status",children:l("Preparing MCP settings…")}),M&&n.jsxs("div",{className:"mt-4 grid gap-3",children:[n.jsxs("label",{className:"flex items-start gap-2 text-sm",children:[n.jsx("input",{type:"checkbox",checked:p,disabled:b,onChange:B=>{m(B.target.checked),v("")}})," ",c?"อนุญาตให้รัน Scout และสร้างรายงานในโปรเจกต์นี้":"Allow Scout runs and report creation in this project"]}),n.jsx("button",{type:"button",disabled:b,onClick:()=>{Z()},className:"justify-self-start rounded-xl bg-indigo-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-indigo-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:opacity-60",children:b?c?"กำลังเชื่อม…":"Connecting…":c?"ตั้งค่า Codex MCP อัตโนมัติ":"Set up Codex MCP automatically"}),n.jsxs("details",{className:"rounded-xl border border-indigo-100 bg-white p-3",children:[n.jsx("summary",{className:"cursor-pointer text-sm font-medium text-indigo-800",children:c?"ตั้งค่าเองหรือใช้ MCP client อื่น":"Manual setup or another MCP client"}),n.jsx("pre",{className:"mt-3 overflow-auto whitespace-pre-wrap break-all rounded-lg bg-slate-950 p-3 text-xs text-slate-100",children:M}),n.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[X&&n.jsx("button",{type:"button",className:"btn",onClick:()=>$(X),children:l("Copy Codex command")}),n.jsx("button",{type:"button",className:"btn",onClick:()=>$(M),children:l("Copy MCP settings")})]})]})]}),N&&n.jsx("p",{role:"alert",className:"mt-3 text-sm font-medium text-red-800",children:N}),g&&n.jsx("p",{role:"status",className:"mt-3 text-sm font-medium text-emerald-800",children:g})]})}const P2={"failed-interactions":{en:"Check the failed interactions and confirm their expected behavior.",th:"ตรวจการโต้ตอบที่ล้มเหลวและยืนยันว่าพฤติกรรมที่คาดไว้คืออะไร"},"blocked-interactions":{en:"Review why some interactions were blocked and which need a manual check.",th:"ดูสาเหตุที่การโต้ตอบถูกบล็อกและเลือกรายการที่ต้องตรวจด้วยตัวเอง"},"unexplored-interactions":{en:"Review discovered interactions that Scout has yet to explore.",th:"ตรวจการโต้ตอบที่พบแต่ Scout ยังไม่ได้สำรวจ"},"review-test-cases":{en:"Review the drafted Test Cases and confirm their assertions.",th:"ทบทวน Test Case ที่ร่างไว้และยืนยันเงื่อนไขที่ต้องตรวจ"},"review-scope":{en:"Compare the approved scope and observed pages with your testing goals.",th:"เทียบขอบเขตที่อนุมัติและหน้าที่สำรวจกับเป้าหมายการทดสอบ"}};function $2({providerLabel:a,external:s,request:l}){const{language:o}=Le(),c=o==="th",u=L.useRef(null),[f,p]=L.useState(!1),[m,g]=L.useState(""),[v,y]=L.useState();L.useEffect(()=>()=>u.current?.abort(),[]);async function S(){if(u.current)return;const b=new AbortController;u.current=b,p(!0),g("");try{y(await l(b.signal))}catch(E){b.signal.aborted||g(E instanceof Error?E.message:c?"ขอคำแนะนำไม่สำเร็จ":"Could not review the run.")}finally{u.current=null,b.signal.aborted||p(!1)}}return n.jsxs("section",{className:"grid gap-3 rounded-2xl border border-indigo-100 bg-indigo-50/55 p-4 text-sm text-slate-800",children:[n.jsx("h3",{className:"font-semibold text-indigo-950",children:c?"ให้ AI ช่วยจัดลำดับการตรวจต่อ":"AI review priorities"}),v?n.jsxs(n.Fragment,{children:[n.jsx("ol",{className:"list-decimal space-y-1 pl-5","aria-live":"polite",children:v.priorities.map(b=>n.jsx("li",{children:P2[b][o]},b))}),n.jsx("p",{className:"text-xs text-slate-600",children:c?"คำแนะนำสำหรับตรวจต่อ ผลทดสอบจริงอยู่ในรายงาน":"Review suggestions. Recorded test outcomes are in the report."}),v.usage&&n.jsx("p",{className:"text-xs text-slate-600",children:c?`โทเคนเข้า ${v.usage.inputTokens??"—"} · ออก ${v.usage.outputTokens??"—"}`:`AI tokens · ${v.usage.inputTokens??"—"} input · ${v.usage.outputTokens??"—"} output`})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{children:s?c?`ปุ่มนี้จะส่งเฉพาะจำนวนหน้า สถานะ UI การโต้ตอบ และ Test Case ไปยัง ${a}`:`This sends only page, UI state, interaction, and Test Case counts to ${a}.`:c?`วิเคราะห์ตัวเลขสรุปของรอบนี้ด้วย ${a} บนเครื่อง`:`Review this run's aggregate counts with ${a} on this device.`}),n.jsx("button",{type:"button",className:"qa-button justify-self-start border border-indigo-200 bg-white text-indigo-800 hover:bg-indigo-50",disabled:f,onClick:()=>{S()},children:f?c?"กำลังจัดลำดับ…":"Reviewing…":s?c?"ส่งตัวเลขให้ AI วิเคราะห์":"Send counts for AI review":c?"วิเคราะห์บนเครื่อง":"Review counts locally"}),m&&n.jsx("p",{role:"alert",className:"text-red-800",children:m})]})]})}const lv=[["test-cases","Test Cases"],["coverage","UI Coverage"],["playwright","Playwright Automation"],["cypress","Cypress Automation"],["bug-draft","Bug Report Draft"],["execution-report","Recorded Test Execution"],["summary","Test Summary"],["excel","Excel"]],ov=["Summary","Test Cases","UI Coverage","Coverage Gaps","Execution Results","Bug Reports"],q2=[["local","Free on this device"],["free-tier","Cloud with a free tier"],["cloud","Cloud · billing depends on your plan"],["custom","Other endpoints"]],Di="min-w-0 rounded-2xl border border-slate-200 bg-white p-5 shadow-sm sm:p-6",Li="qa-button bg-indigo-700 text-white shadow-sm hover:bg-indigo-800",zn="qa-button border border-indigo-200 bg-white text-indigo-800 hover:bg-indigo-50",So="__manual__",H2={prepare:"กำลังตรวจโปรเจกต์และขอบเขตที่อนุมัติ","verify-session":"ยืนยันว่าพร้อมใช้เซสชันของโปรเจกต์แล้ว","reuse-observations":"กำลังใช้ผลสำรวจที่บันทึกไว้",scout:"กำลังสำรวจหน้าที่อนุมัติและลองการโต้ตอบที่ปลอดภัย","draft-test-cases":"กำลังร่างเคสทดสอบจากผลสำรวจ","analyze-coverage":"กำลังวิเคราะห์ความครอบคลุมของการสำรวจ","prepare-outputs":"กำลังบันทึกผลและไฟล์ที่เลือก"};function xd({step:a,title:s,hint:l}){return n.jsxs("header",{className:"mb-4 flex items-start gap-3",children:[n.jsx("span",{"aria-hidden":"true",className:"grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-indigo-100 text-sm font-bold text-indigo-800",children:a}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-base font-bold text-slate-950",children:s}),n.jsx("p",{className:"mt-0.5 text-sm text-slate-600",children:l})]})]})}function G2(a){try{return["localhost","127.0.0.1","[::1]"].includes(new URL(a??"").hostname)}catch{return!1}}function F2({projectId:a,targetUrl:s,onComplete:l,onSetTarget:o,onOpenSessionSettings:c}){const{ui:u,language:f}=Le(),p=f==="th",m=L.useRef(null),g=L.useRef(null),[v,y]=L.useState(""),[S,b]=L.useState(!1),[E,N]=L.useState(!1),[A,w]=L.useState(""),[j,R]=L.useState(""),[O,M]=L.useState(""),[F,X]=L.useState(""),[Z,$]=L.useState("auto"),[B,J]=L.useState({kind:"rules"}),[z,H]=L.useState(!1),[T,K]=L.useState(""),[V,Q]=L.useState(),[W,D]=L.useState(!0),[Y,x]=L.useState(""),[C,q]=L.useState(!1),[I,ee]=L.useState(""),[he,_e]=L.useState({state:"disconnected"}),[Ne,le]=L.useState(!1),[Ce,ye]=L.useState(!1),[Ge,Me]=L.useState(!1),[k,pe]=L.useState(""),[ce,G]=L.useState(""),[P,ne]=L.useState(!1),[xe,ge]=L.useState(!1),[se,Te]=L.useState(20),[Ee,we]=L.useState(["test-cases","coverage"]),[ke,qe]=L.useState(),[fe,ze]=L.useState(),[$e,Ve]=L.useState([]),[rt,tt]=L.useState(!1),[ft,pt]=L.useState(ov),[Re,kt]=L.useState(),[_t,Ke]=L.useState(""),[ut,st]=L.useState(""),[Ut,mt]=L.useState(!1),[zt,Je]=L.useState(!1),He=Mo[B.kind],Yt=He.tier==="free-tier"||He.tier==="cloud"||He.tier==="custom"&&!G2(B.baseUrl),nt=B.kind!=="rules"&&!(B.model?.trim()||!rt&&He.defaultModel),Fe=B.kind==="codex",Ie=he.state==="pending"&&"loginId"in he?he:void 0,Ye=Re?.status==="queued"||Re?.status==="running",In=Ye?Re.events.at(-1):void 0,Pn=Ye?Re.progress:void 0,Bt=zt||S||Ye||!V,Xt=Yt&&!P,za=Fe&&he.state!=="connected",on=V?.connection,Zt=!!(on&&on.provider.kind===B.kind&&(on.provider.baseUrl??"")===(B.baseUrl?.trim()??"")&&Date.parse(on.expiresAt)>Date.now()),Et=He.key==="required"&&!C&&!Zt&&!T.trim(),Kt=z&&!nt&&!Xt&&!za&&!Et,tn=!Bt&&Kt,Ba=tn&&!!(s&&v.trim()),cn=B.kind==="rules",$n=Fe?"ChatGPT / Codex":He.label,pn=He.key==="none"?void 0:T.trim()||void 0,_n={projectId:a,apiKey:pn,useSavedKey:Zt&&!pn},bn=Array.from(new Set([...He.defaultModel?[He.defaultModel]:[],...$e])),nn=B.model??He.defaultModel??"",qn=rt||!bn.length||!!(nn&&!bn.includes(nn)),va=Ut||Re?.error?.code==="auth-not-ready";L.useEffect(()=>{let re=!1;return tj(a).then(Ae=>{re||(Q(Ae),Ae.connection&&J(Ae.connection.provider))}).catch(()=>{re||Q({supported:!1})}),()=>{re=!0}},[a]),L.useEffect(()=>{if(!on)return;const re=window.setTimeout(()=>{Q(Ae=>Ae?.connection?.expiresAt===on.expiresAt?{supported:Ae.supported}:Ae),Zt&&!pn&&H(!1)},Math.max(0,Date.parse(on.expiresAt)-Date.now()));return()=>window.clearTimeout(re)},[on?.expiresAt,Zt,pn]),L.useEffect(()=>{if(He.key!=="required"||Xt)return;let re=!1;return ej(B.kind).then(({configured:Ae})=>{re||q(Ae)}).catch(()=>{re||q(!1)}),()=>{re=!0}},[B.kind,He.key,Xt]),L.useEffect(()=>{if(!Re||!Ye)return;let re=!1,Ae=!1;const Qt=window.setInterval(()=>{Ae||(Ae=!0,cj(a,Re.id).then(async Lt=>{re||(kt(Lt),Lt.status==="completed"&&await l(a))}).catch(Lt=>{re||st(Lt instanceof Error?Lt.message:String(Lt))}).finally(()=>{Ae=!1}))},1500);return()=>{re=!0,window.clearInterval(Qt)}},[a,Re?.id,Ye]),L.useEffect(()=>{if(!Fe||Xt)return;let re=!1;return le(!0),jg().then(Ae=>{re||(_e(Ae),Ae.state==="connected"&&kn())}).catch(Ae=>{re||_e({state:"failed",message:Ae instanceof Error?Ae.message:String(Ae)})}).finally(()=>{re||le(!1)}),()=>{re=!0}},[Fe,Xt]),L.useEffect(()=>{if(Xt||he.state!=="pending")return;let re=!1,Ae=!1;const Qt=window.setInterval(()=>{Ae||(Ae=!0,jg(Ie?.loginId).then(Lt=>{re||Lt.state==="pending"||(_e(Lt),Lt.state==="connected"&&kn())}).catch(()=>{re||_e({state:"failed",message:"Could not check the sign-in. Start again."})}).finally(()=>{Ae=!1}))},1800);return()=>{re=!0,window.clearInterval(Qt)}},[he.state,Xt,Ie?.loginId]);function ht(){qe(void 0),ze(void 0),Ke(""),st(""),w(""),ee("")}function Ct(re){return!(re instanceof yn)||!["missing-api-key","invalid-api-key","access-denied"].includes(re.code)?!1:(H(!1),re.code==="missing-api-key"&&_n.useSavedKey&&Q(Ae=>Ae&&{supported:Ae.supported}),ee(re.message),!0)}async function xr(){if(!tn)return;b(!0),w(""),ee("");const re=Z==="auto"?new RegExp("\\p{Script=Thai}","u").test(v)?"th":f:Z;try{const Ae=await W0({topic:v,language:re,provider:B,..._n,allowExternal:P});ht(),y(Ae.instruction)}catch(Ae){Ct(Ae)||w(Ae instanceof Error?Ae.message:String(Ae))}finally{b(!1)}}async function jr(){if(Ba){Je(!0),st(""),ee(""),mt(!1),Ke(""),qe(void 0),kt(void 0);try{const re=await J0({instruction:v,startPath:O||void 0,scopePath:F||void 0,language:Z==="auto"?void 0:Z,outputs:Ee,provider:B,..._n,allowExternal:P,reuseObservations:xe,maxPages:se});qe(re.plan),ze(re.usage),re.providerWarningReason?Ke({rulePlanReason:re.providerWarningReason}):re.providerWarning&&Ke(re.providerWarning)}catch(re){Ct(re)||st(re instanceof Error?re.message:String(re))}finally{Je(!1)}}}async function En(){Je(!0),st("");try{await o(a,j)}catch(re){st(re instanceof Error?re.message:String(re))}finally{Je(!1)}}async function Hn(){Je(!0),ht(),x("");try{const re=await xg(B,P,_n);if(Ve(re.models),H(re.available),re.available){const Ae={...B,model:B.model?.trim()||He.defaultModel||re.models[0]};if(J(Ae),W&&V?.supported&&pn)try{Q(await nj(a,Ae,pn)),K("")}catch{x("The key could not be saved. This connection is available in the current tab.")}Ke({en:`Connected (${re.local?"local":"external"}). Models available: ${re.models.length}.`,th:`เชื่อมต่อ${re.local?"บริการในเครื่อง":"บริการภายนอก"}แล้ว พบ ${re.models.length} โมเดล`})}else(!re.error||!Ct(new yn(re.error.code,re.error.message)))&&ee(re.error?.message??"Could not connect.")}catch(re){H(!1),Ct(re)||ee(re instanceof Error?re.message:String(re))}finally{Je(!1)}}async function Sr(){Je(!0),x("");try{await aj(a),Q(re=>re&&{supported:re.supported}),pn||H(!1),ht()}catch{x("Could not remove the saved key.")}finally{Je(!1)}}async function kn(){Je(!0),ht();try{const re=await xg({kind:"codex"},P);if(Ve(re.models),H(re.available),!re.available){ee(re.error?.message??"Could not load models from Codex.");return}J(Ae=>Ae.kind==="codex"?{...Ae,model:Ae.model??re.models[0]}:Ae),Ke({en:`ChatGPT connected. Models available: ${re.models.length}.`,th:`เชื่อมต่อ ChatGPT แล้ว พบ ${re.models.length} โมเดล`})}catch(re){H(!1),ee(re instanceof Error?re.message:String(re))}finally{Je(!1)}}async function ya(){if(!Xt){ht(),G(""),Je(!0),ye(!0);try{const re=await rj();_e(re),re.state==="connected"&&await kn()}catch(re){_e({state:"failed",message:re instanceof Error?re.message:String(re)})}finally{ye(!1),Je(!1)}}}async function Us(){if(Ie){Je(!0);try{_e(await id(Ie.loginId))}catch(re){st(re instanceof Error?re.message:String(re))}finally{Je(!1)}}}async function Ia(){Je(!0),pe("");try{const re=await sj();ht(),_e(re),H(!1),J({kind:"codex"}),Ve([]),tt(!1),Me(!1),Ke("Signed out of Codex on this device.")}catch(re){pe(re instanceof Error?re.message:String(re))}finally{Je(!1)}}async function Pa(){if(!(!ke||zt)){Je(!0),N(!0),st(""),mt(!1);try{kt(await oj(a,ke.id))}catch(re){re instanceof yn&&re.code==="auth-not-ready"?mt(!0):st(re instanceof Error?re.message:String(re))}finally{N(!1),Je(!1)}}}async function mn(){if(Re){Je(!0),st("");try{kt(await uj(a,Re.id))}catch(re){st(re instanceof Error?re.message:String(re))}finally{Je(!1)}}}return n.jsxs("section",{className:"grid min-w-0 grid-cols-1 gap-4","aria-label":u("AI Scout workspace"),children:[n.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-5 rounded-2xl border border-indigo-200 bg-linear-to-br from-indigo-950 via-indigo-900 to-indigo-700 p-6 text-white shadow-sm sm:p-7",children:[n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("span",{"aria-hidden":"true",className:"grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-white/15 text-xl",children:"✦"}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold tracking-tight sm:text-3xl",children:"AI Scout"}),n.jsx("p",{className:"mt-1 text-sm text-indigo-100",children:p?"เชื่อมผู้ให้บริการ AI หรือใช้กฎบนเครื่อง จากนั้นเขียนงาน QA และตรวจแผนก่อนรัน":"Connect an AI provider or use local rules. Describe the QA task and review its plan before running."})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("a",{href:"#local-mcp",onClick:()=>{m.current&&(m.current.open=!0)},"data-help":"mcp",className:"qa-button bg-white text-indigo-950 hover:bg-indigo-50",children:p?"ตั้งค่า MCP":"Set up MCP"}),n.jsxs("a",{href:`/guide/index.html?lang=${f}`,target:"_blank",rel:"noreferrer",className:"qa-button border border-white/30 text-white hover:bg-white/10",children:[p?"คู่มือ 5 ขั้น":"5-step guide"," ",n.jsx("span",{"aria-hidden":"true",children:"↗"})]})]})]}),n.jsxs("form",{onSubmit:re=>{re.preventDefault(),jr()},className:"qa-workspace-form grid grid-cols-1 items-start gap-4 lg:grid-cols-[minmax(0,0.84fr)_minmax(0,1.16fr)]",children:[n.jsxs("section",{className:Di,children:[n.jsx(xd,{step:1,title:p?"เชื่อม AI และเลือกโมเดล":"Connect AI & choose a model",hint:p?"เริ่มด้วยกฎบนเครื่องได้ทันที หรือเลือกผู้ให้บริการด้านล่าง":"Start with local rules or connect a provider below."}),n.jsxs("div",{className:"grid min-w-0 gap-3",children:[n.jsxs("label",{children:[u("Provider"),n.jsx("select",{"data-help":"provider","aria-label":u("Provider"),value:B.kind,disabled:Bt,onChange:re=>{const Ae=re.target.value;w1(Ae)&&(Ie&&id(Ie.loginId).catch(()=>{}),_e({state:"disconnected"}),le(!1),Me(!1),pe(""),G(""),ht(),H(!1),ne(!1),K(""),x(""),q(!1),Ve([]),tt(!1),J({kind:Ae,model:Mo[Ae].defaultModel}))},children:q2.map(([re,Ae])=>n.jsx("optgroup",{label:u(Ae),children:Object.entries(Mo).filter(([,Qt])=>Qt.tier===re).map(([Qt,Lt])=>n.jsx("option",{value:Qt,children:u(Lt.label)},Qt))},re))})]}),cn&&n.jsx("button",{type:"button",className:zn,disabled:Bt||z,onClick:()=>H(!0),children:z?p?"พร้อมใช้กฎบนเครื่อง":"Local rules ready":p?"ใช้กฎบนเครื่อง":"Use local rules"}),(He.tier==="custom"||He.tier==="local"&&!cn)&&n.jsxs("label",{children:[u("Base URL"),n.jsx("input",{value:B.baseUrl??"",disabled:Bt,onChange:re=>{ht(),H(!1),ne(!1),Ve([]),K(""),J({...B,baseUrl:re.target.value})},placeholder:He.baseUrl??"http://localhost:8080/v1"})]}),Yt&&n.jsxs("fieldset",{className:"grid min-w-0 gap-2 rounded-xl border border-slate-200 bg-slate-50 p-3",children:[n.jsx("legend",{className:"px-1 text-sm font-semibold text-slate-900",children:p?"1. อนุญาตการเชื่อมต่อ":"1. Allow the connection"}),n.jsxs("label",{className:"qa-check",children:[n.jsx("input",{type:"checkbox",checked:P,disabled:Bt,onChange:re=>{const Ae=re.target.checked;ht(),ne(Ae),Ae||H(!1),Fe&&(Ae||(Ie&&id(Ie.loginId).catch(()=>{}),_e({state:"disconnected"}),Me(!1),pe(""),G("")),le(Ae))}}),p?"อนุญาตให้เชื่อมต่อผู้ให้บริการนี้และส่งข้อความเมื่อเจนคำหรือสร้างแผน":"I approve connecting to this provider and sending my text when drafting a prompt or creating a plan."]})]}),Fe&&!Xt&&n.jsxs("section",{className:"grid gap-2 rounded-xl border border-indigo-100 bg-indigo-50 p-3 text-sm text-indigo-950","aria-label":u("ChatGPT connection"),children:[n.jsx("h4",{className:"font-semibold",children:p?"2. ลงชื่อเข้าใช้ ChatGPT":"2. Sign in to ChatGPT"}),Ie?n.jsxs(n.Fragment,{children:[n.jsx("p",{children:p?"กรอกรหัสนี้ที่หน้า OpenAI แล้วกลับมาที่ LazyScout":"Enter this code on the OpenAI page, then return to LazyScout."}),n.jsx("p",{className:"flex w-fit items-center gap-2 rounded-lg border border-indigo-200 bg-white px-3 py-2 font-semibold tracking-widest",children:n.jsx("code",{children:Ie.userCode})}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:zn,onClick:async()=>{try{await navigator.clipboard.writeText(Ie.userCode),G("Code copied")}catch{G("Select and copy the code above.")}},children:p?"คัดลอกรหัส":"Copy code"}),n.jsx("a",{className:Li,href:Ie.verificationUrl,target:"_blank",rel:"noreferrer",children:p?"กรอกรหัสที่ OpenAI":"Enter code on OpenAI"})]}),ce&&n.jsx("p",{role:"status",children:u(ce)}),n.jsx("p",{role:"status",children:p?"กำลังรอให้ยืนยันการลงชื่อเข้าใช้…":"Waiting for you to confirm sign-in…"}),n.jsx("button",{type:"button",className:zn,disabled:zt,onClick:()=>{Us()},children:p?"ยกเลิกการลงชื่อเข้าใช้":"Cancel sign-in"})]}):he.state==="connected"?n.jsxs(n.Fragment,{children:[n.jsx("p",{role:"status",className:"font-semibold text-emerald-800",children:p?"เชื่อมบัญชี ChatGPT จาก Codex บนเครื่องแล้ว":"ChatGPT connected using the Codex sign-in on this device."}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("a",{className:zn,href:"https://chatgpt.com/",target:"_blank",rel:"noreferrer",children:p?"เปิด ChatGPT":"Open ChatGPT"}),!Ge&&n.jsx("button",{type:"button",className:"btn btn-danger",disabled:Bt,onClick:()=>Me(!0),children:p?"ออกจากบัญชี":"Sign out"})]}),Ge&&n.jsxs("div",{className:"grid gap-2 rounded-lg border border-red-200 bg-white p-3 text-red-950",children:[n.jsx("p",{children:p?"การยืนยันจะออกจากบัญชี ChatGPT ที่ Codex และ LazyScout ใช้ร่วมกันบนเครื่องนี้":"This signs out the ChatGPT account that Codex and LazyScout share on this device."}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-danger",disabled:Bt,onClick:()=>{Ia()},children:p?"ยืนยันออกจากบัญชี":"Confirm sign out"}),n.jsx("button",{type:"button",className:zn,disabled:Bt,onClick:()=>{Me(!1),pe("")},children:p?"ยกเลิก":"Cancel"})]}),k&&n.jsx("p",{role:"alert",children:k})]})]}):Ne||Ce||he.state==="pending"?n.jsx("p",{role:"status",children:he.state==="pending"?p?"กำลังรอให้ยืนยันการลงชื่อเข้าใช้จากแท็บเดิม…":"Waiting for sign-in from the original tab…":Ce?p?"กำลังขอรหัสลงชื่อเข้าใช้…":"Getting your sign-in code…":p?"กำลังตรวจบัญชี ChatGPT ที่เชื่อมกับ Codex บนเครื่อง…":"Checking the ChatGPT sign-in on this device…"}):n.jsxs(n.Fragment,{children:[he.state==="failed"&&n.jsx("p",{role:"alert",children:he.message&&u(he.message)}),n.jsx("p",{children:p?"ลงชื่อเข้าใช้ที่หน้า OpenAI ด้วยรหัสที่จะขึ้นใน LazyScout":"Sign in on OpenAI with the code shown here."}),n.jsx("button",{type:"button",className:Li,disabled:Bt,onClick:()=>{ya()},children:p?"เชื่อม ChatGPT":"Connect ChatGPT"})]})]}),!cn&&!Xt&&n.jsxs(n.Fragment,{children:[He.key!=="none"&&n.jsxs("section",{className:"grid gap-2 rounded-xl border border-indigo-200 bg-indigo-50 p-3",children:[He.key==="required"&&n.jsx("h4",{className:"text-sm font-semibold text-indigo-950",children:p?`2. เชื่อม ${$n} ด้วย API key`:`2. Connect ${$n} with an API key`}),n.jsxs("label",{children:[u("API key"),He.key==="optional"?p?" (ไม่บังคับ)":" (optional)":"",n.jsx("input",{type:"password",autoComplete:"off",spellCheck:!1,maxLength:1024,disabled:Bt,"aria-describedby":"qa-api-key-help","aria-required":He.key==="required"&&!C&&!Zt,placeholder:p?"วาง API key ที่นี่":"Paste your API key here",value:T,onChange:re=>{ht(),Ve([]),H(!1),K(re.target.value)}})]}),n.jsx("small",{id:"qa-api-key-help",className:"text-slate-600",children:Zt?p?"เว้นว่างเพื่อใช้ API key ที่บันทึกไว้ในโปรเจกต์นี้":"Leave this blank to use the API key saved for this project.":C?p?"เครื่องนี้มี API key ตั้งไว้แล้ว เว้นช่องว่างเพื่อใช้คีย์เดิม หรือกรอกคีย์อื่นแทน":"A key is configured on this device. Leave this blank to use it or paste another key.":He.key==="required"?p?"สร้างคีย์จากบัญชีผู้ให้บริการ แล้วนำมาวางในช่องนี้":"Create a key in your provider account and paste it here.":p?"กรอกเฉพาะเมื่อเซิร์ฟเวอร์นี้ขอ API key":"Enter a key if this server requires one."}),He.keyUrl&&n.jsx("a",{className:"justify-self-start text-sm font-semibold text-indigo-800 underline underline-offset-4",href:He.keyUrl,target:"_blank",rel:"noreferrer",children:p?`เปิดหน้าสร้าง API key ของ ${$n}`:`Get a ${$n} API key`}),V?.supported&&n.jsxs("label",{className:"qa-check",children:[n.jsx("input",{type:"checkbox",checked:W,disabled:Bt,onChange:re=>D(re.target.checked)}),p?"จำ API key ในโปรเจกต์นี้ 24 ชั่วโมง":"Remember the API key for this project for 24 hours"]}),Zt&&n.jsx("button",{type:"button",className:zn,disabled:Bt,onClick:()=>{Sr()},children:p?"ล้างคีย์ที่บันทึกไว้":"Forget saved key"}),Y&&n.jsx("p",{role:"status",className:"text-xs text-indigo-900",children:u(Y)})]}),He.tier==="free-tier"&&n.jsx("small",{className:"text-slate-600",children:B.kind==="openrouter-free"?"Uses free models only. The provider applies rate limits.":"Free quota depends on the model, region and account plan. Check your provider before running."}),B.kind==="compatible"&&n.jsx("small",{className:"text-slate-600",children:u("External custom URLs must also be configured on the LazyScout server.")}),!Et&&!za&&n.jsxs("div",{className:"grid min-w-0 gap-3",children:[Yt&&n.jsx("h4",{className:"text-sm font-semibold text-slate-900",children:p?"3. เลือกโมเดล":"3. Choose a model"}),n.jsx("button",{type:"button",className:zn,disabled:Bt||(Fe?za:Xt||Et),onClick:()=>{Fe?kn():Hn()},children:u(Fe?"Refresh Codex models":"Test connection & load models")}),bn.length>0&&n.jsxs("label",{children:[u("Model"),n.jsxs("select",{"aria-label":u("Model"),disabled:Bt,value:qn?So:nn,onChange:re=>{const Ae=re.target.value;ht(),B.kind==="ollama"&&H(!1),tt(Ae===So),J({...B,model:Ae===So?"":Ae})},children:[n.jsx("option",{value:"",disabled:!0,children:p?"เลือกโมเดล":"Select a model"}),bn.map(re=>n.jsx("option",{value:re,children:re},re)),n.jsx("option",{value:So,children:p?"กรอก Model ID เอง":"Enter model ID manually"})]})]}),qn&&n.jsxs("label",{children:[bn.length?"Model ID":u("Model"),n.jsx("input",{"aria-label":bn.length?"Model ID":u("Model"),value:nn,placeholder:p?"กรอก Model ID หรือโหลดรายการด้านบน":"Enter a model ID or load the list above",disabled:Bt,onChange:re=>{ht(),B.kind==="ollama"&&H(!1),J({...B,model:re.target.value})}})]}),bn.length>0&&n.jsx("p",{className:"break-all text-xs text-slate-600","aria-live":"polite",children:nn&&n.jsxs(n.Fragment,{children:[n.jsx("strong",{className:"text-indigo-800",children:p?"เลือกแล้ว":"Selected"})," · ",nn]})})]}),I&&n.jsx("p",{role:"alert",className:"text-sm text-red-800",children:u(I)})]})]})]}),n.jsxs("section",{className:Di,children:[n.jsx(xd,{step:2,title:p?"กำหนดงานทดสอบ":"Describe the test",hint:p?"ตรวจ URL ระบุสิ่งที่อยากทดสอบ และเลือกผลลัพธ์ที่ต้องการ":"Confirm the URL, describe what to test, and choose your outputs."}),Kt?n.jsxs("div",{className:"grid min-w-0 gap-4",children:[n.jsxs("label",{children:[u("Target URL"),n.jsx("input",{type:"url",value:s||j,readOnly:!!s,onChange:re=>R(re.target.value),placeholder:"https://example.com"})]}),!s&&n.jsx("button",{type:"button",className:zn,disabled:zt||!j.trim(),onClick:()=>{En()},children:u("Set project target")}),n.jsxs("div",{className:"grid min-w-0 gap-2",children:[n.jsx("label",{htmlFor:"qa-testing-instruction",children:u("Testing instruction")}),n.jsx("div",{className:"overflow-hidden rounded-xl","aria-busy":S,children:n.jsx("textarea",{id:"qa-testing-instruction",ref:g,className:S?"block blur-[2px]":"block",required:!0,rows:4,maxLength:2e3,value:v,disabled:S,onChange:re=>{ht(),y(re.target.value)},placeholder:p?"เช่น ตรวจช่องค้นหาและตัวกรองในหน้าสมาชิก แล้วสร้างเคสทดสอบภาษาไทย":"Example: Check Search and Filter on the Members page and create English test cases."})})]}),n.jsxs("div",{className:"grid gap-2 rounded-xl border border-indigo-100 bg-indigo-50 p-3",children:[n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsxs("button",{type:"button",className:zn,disabled:!tn,onClick:()=>{xr()},children:[n.jsx("span",{"aria-hidden":"true",children:"✦"})," ",S?p?"กำลังเจนคำ…":"Generating…":cn?p?"ช่วยร่างคำ":"Draft with rules":p?"เจนคำ":"Generate prompt"]}),n.jsx("button",{type:"submit",className:Li,disabled:!Ba,children:cn?p?"สร้างแผน":"Create plan":p?`ถาม ${$n}`:`Ask ${$n}`})]}),n.jsx("p",{className:"text-xs text-slate-700","aria-live":"polite",children:cn?p?"ร่างจากตัวอย่างด้วยกฎบนเครื่อง ใช้ได้ทันที":"Draft from a template using local rules.":`${$n}${nn?` · ${nn}`:""}`}),A&&n.jsxs("div",{role:"alert",className:"grid gap-1 text-xs text-red-900",children:[n.jsx("p",{children:u(A)}),n.jsx("p",{children:n.jsx("a",{className:"font-semibold underline underline-offset-2",href:`/guide/index.html?lang=${f}#${f}-3`,target:"_blank",rel:"noreferrer",children:p?"ดูวิธีเชื่อมผู้ให้บริการ":"Provider setup guide"})})]})]}),n.jsxs("fieldset",{children:[n.jsx("legend",{className:"mb-2 font-semibold text-slate-900",children:u("Requested outputs")}),n.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:lv.map(([re,Ae])=>n.jsxs("label",{className:"qa-check rounded-lg border border-slate-200 p-2.5 has-checked:border-indigo-300 has-checked:bg-indigo-50",children:[n.jsx("input",{type:"checkbox",checked:Ee.includes(re),onChange:Qt=>{ht(),we(Qt.target.checked?[...Ee,re]:Ee.filter(Lt=>Lt!==re))}})," ",u(Ae)]},re))})]}),n.jsxs("details",{className:"rounded-xl border border-slate-200 bg-slate-50 p-3",children:[n.jsx("summary",{className:"cursor-pointer font-semibold text-slate-800",children:u("Advanced settings")}),n.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[n.jsxs("label",{children:[u("Start path"),n.jsx("input",{value:O,onChange:re=>{ht(),M(re.target.value)},placeholder:"/users"})]}),n.jsxs("label",{children:[u("Scope path"),n.jsx("input",{value:F,onChange:re=>{ht(),X(re.target.value)},placeholder:"/users"})]}),n.jsxs("label",{children:[u("Test Case language"),n.jsxs("select",{value:Z,onChange:re=>{ht(),$(re.target.value)},children:[n.jsx("option",{value:"auto",children:u("Match the instruction")}),n.jsx("option",{value:"th",children:u("Thai")}),n.jsx("option",{value:"en",children:u("English")})]})]}),n.jsxs("label",{children:[u("Maximum pages"),n.jsx("input",{type:"number",min:"1",max:"20",value:se,onChange:re=>{ht(),Te(Number(re.target.value))}})]}),n.jsxs("label",{className:"qa-check sm:col-span-2",children:[n.jsx("input",{type:"checkbox",checked:xe,onChange:re=>{ht(),ge(re.target.checked)}})," ",u("Reuse existing observations where possible")]})]})]}),s&&n.jsx("button",{type:"button",onClick:c,className:"justify-self-start text-xs font-semibold text-indigo-800 underline underline-offset-4",children:p?"ตั้งค่าเซสชันของเว็บทดสอบ":"Website browser session settings"})]}):n.jsx("p",{className:"rounded-xl border border-dashed border-indigo-200 bg-indigo-50/60 p-4 text-sm text-slate-700",children:p?"เชื่อม AI และเลือกโมเดลให้พร้อมเพื่อเปิดส่วนนี้ หรือเลือกใช้กฎบนเครื่อง":"Connect a provider and choose a model, or activate local rules to open this section."})]})]}),_t&&n.jsx("p",{role:"status",className:"rounded-xl border border-indigo-200 bg-indigo-50 px-4 py-3 text-sm text-indigo-950",children:typeof _t=="string"?u(_t):"rulePlanReason"in _t?`${u(_t.rulePlanReason)} ${u("The rule-based plan is ready to review.")}`:_t[f]}),va&&n.jsxs("div",{className:"grid gap-2 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-950",children:[n.jsx("p",{role:"alert",children:p?"ก่อนเริ่มสำรวจ ให้ตรวจสอบเซสชันของเว็บทดสอบ เมื่อเซสชันพร้อมใช้ ให้กลับมากดอนุมัติแผน":"Verify the test website session before scouting. Once it is ready, return and approve the plan."}),n.jsx("button",{type:"button",className:zn,onClick:c,children:p?"เปิดการตั้งค่าเซสชัน":"Open Browser Session"})]}),ut&&n.jsx("p",{role:"alert",className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-900",children:u(ut)}),ke&&n.jsxs("section",{className:`${Di} grid gap-3 text-sm`,"aria-label":u("Plan preview"),children:[n.jsx(xd,{step:3,title:p?"ตรวจแผนก่อนเริ่ม":"Plan preview",hint:p?"ตรวจ URL, เส้นทาง และงานที่ระบบจะทำก่อนกดอนุมัติ":"Check the target, paths, and proposed steps before you approve."}),n.jsxs("p",{children:[u("Target:")," ",ke.targetUrl," ",u("· Scope:")," ",ke.scopePath||"/"," ",u("· Start:")," ",ke.startPath||"/"]}),n.jsx("ol",{className:"list-decimal space-y-1 pl-5",children:ke.steps.map((re,Ae)=>n.jsx("li",{children:re},Ae))}),n.jsx("ul",{className:"list-disc space-y-1 pl-5",children:ke.objectives.map(re=>n.jsx("li",{children:re},re))}),fe&&n.jsxs("p",{children:[u("AI tokens:")," ",fe.inputTokens??"—"," ",u("input,")," ",fe.outputTokens??"—"," ",u("output")]}),n.jsxs("p",{children:[u("Outputs:")," ",ke.outputs.map(re=>u(lv.find(([Ae])=>Ae===re)?.[1]??re)).join(", ")||u("none")," ",u("· Limit:")," ",ke.limits.maxPages," ",u("pages,")," ",ke.limits.maxActions," ",u("actions,")," ",ke.limits.timeoutMs," ",u("ms")]}),n.jsx("button",{className:Li,disabled:zt||!!Re,onClick:()=>{Pa()},children:u("Approve and start")})]}),Re&&n.jsxs("section",{className:`${Di} grid gap-3 text-sm`,"aria-label":u("Agent execution"),children:[n.jsxs("h3",{className:"font-bold text-slate-950",children:[u("Execution:")," ",u(Re.status)]}),Re.error&&Re.error.code!=="auth-not-ready"&&n.jsx("p",{role:"alert",children:Re.error.message}),n.jsx("ol",{className:"max-h-52 list-decimal space-y-1 overflow-y-auto rounded-xl bg-slate-50 py-3 pr-3 pl-8",children:Re.events.map((re,Ae)=>n.jsxs("li",{children:[re.step,": ",re.message]},`${re.at}-${Ae}`))}),Re.summary&&n.jsxs(n.Fragment,{children:[n.jsxs("p",{children:[Re.summary.pages," ",u("pages ·")," ",Re.summary.states," ",u("states ·")," ",Re.summary.testCases," ",u("test cases")]}),n.jsxs("p",{children:[Re.summary.exploredActions," ",u("of")," ",Re.summary.discoveredInteractions," ",u("interactions explored ·")," ",Re.summary.failedActions," ",u("failed ·")," ",Re.summary.blockedActions," ",u("blocked")]}),Re.summary.artifacts.length>0&&n.jsx("ul",{children:Re.summary.artifacts.map(re=>n.jsx("li",{children:n.jsx("a",{className:"font-semibold text-indigo-800 underline underline-offset-4",href:gf(a,re),children:re.endsWith("-bug-draft.md")?"Download bug draft":"Download run report"})},re))})]})]}),Re?.status==="completed"&&n.jsxs("section",{className:`${Di} grid gap-4`,children:[tn&&n.jsx("button",{type:"button",className:`${zn} justify-self-start`,onClick:()=>{ht(),ge(!0),g.current?.focus()},children:p?"ทำงานต่อจากผลสำรวจเดิม":"Follow up using saved observations"}),tn&&!cn&&!Fe&&Re.summary&&n.jsx($2,{providerLabel:$n,external:Yt,request:re=>dj(a,Re.id,{provider:B,allowExternal:P,..._n},re)},JSON.stringify([Re.id,B.kind,B.model,B.baseUrl])),n.jsxs("fieldset",{children:[n.jsx("legend",{className:"mb-3 font-bold text-slate-950",children:u("Report sections")}),n.jsx("div",{className:"flex flex-wrap gap-2",children:ov.map(re=>n.jsxs("label",{className:"qa-check rounded-lg border border-slate-200 p-2.5 has-checked:bg-indigo-50",children:[n.jsx("input",{type:"checkbox",checked:ft.includes(re),onChange:Ae=>pt(Qt=>Ae.target.checked?[...Qt,re]:Qt.filter(Lt=>Lt!==re))})," ",u(re)]},u(re)))}),ft.length>0&&n.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[n.jsx("a",{className:Li,href:Co(a,"xlsx",ft),children:"Excel"}),n.jsx("a",{className:zn,href:Co(a,"csv",ft),children:"CSV"}),n.jsx("a",{className:zn,href:Co(a,"markdown",ft),children:"Markdown"})]})]})]}),(S||E||Ye)&&n.jsx("dialog",{ref:re=>{re&&!re.open&&re.showModal()},onCancel:re=>re.preventDefault(),className:"fixed inset-0 m-auto max-h-[calc(100dvh_-_2rem)] w-[calc(100%_-_2rem)] max-w-sm overflow-y-auto rounded-3xl border border-indigo-200/20 bg-slate-950 text-slate-100 shadow-2xl backdrop:bg-slate-950/55 backdrop:backdrop-blur-sm","aria-labelledby":"qa-scout-progress-title",children:n.jsxs("div",{className:"grid justify-items-center gap-5 bg-linear-to-b from-indigo-950/85 to-slate-950 px-6 py-8 text-center",children:[n.jsxs("div",{className:"relative grid size-20 place-items-center rounded-full bg-indigo-400/10 ring-8 ring-indigo-400/5","aria-hidden":"true",children:[n.jsx("span",{className:"absolute inset-0 rounded-full border-3 border-indigo-300/15 border-t-cyan-300 border-r-indigo-400 motion-safe:animate-spin"}),n.jsx("span",{className:"grid size-12 place-items-center rounded-2xl bg-indigo-400/15 text-2xl text-indigo-100 motion-safe:animate-[spin_1.8s_linear_infinite_reverse]",children:"✦"})]}),n.jsxs("div",{className:"grid gap-2",role:"status",children:[n.jsx("h2",{id:"qa-scout-progress-title",className:"text-lg font-semibold text-white",children:S?p?"กำลังเจนคำสั่งทดสอบ…":"Drafting the testing instruction…":E||Re?.status==="queued"?p?"กำลังเตรียม Scout…":"Preparing Scout…":p?"AI Scout กำลังสำรวจ…":"AI Scout is running…"}),!S&&n.jsx("p",{className:"text-sm text-slate-300",children:In?p?H2[In.step]??In.message:In.message:p?"กำลังเตรียมงานตามแผนที่อนุมัติ":"Preparing the approved plan."})]}),!S&&Pn&&n.jsx("dl",{className:"flex w-full flex-wrap justify-center gap-x-4 gap-y-2 rounded-2xl bg-white/5 px-3 py-3",children:[{label:p?"หน้า":"Pages",value:Pn.pages},{label:p?"สถานะ UI":"UI states",value:Pn.states},{label:p?"ลองทำ":"Attempted",value:Pn.actions},{label:p?"ล้มเหลว":"Failed",value:Pn.failed},{label:p?"ถูกบล็อก":"Blocked",value:Pn.blocked}].map(({label:re,value:Ae})=>n.jsxs("div",{className:"flex flex-col",children:[n.jsx("dt",{className:"order-2 text-xs text-slate-300",children:re}),n.jsx("dd",{className:"font-semibold text-white tabular-nums",children:Ae})]},re))}),!S&&ut&&n.jsx("p",{role:"alert",className:"text-sm text-red-200",children:u(ut)}),!S&&Ye&&n.jsx("button",{type:"button",className:"rounded-lg border border-slate-600 px-4 py-2 text-sm font-medium text-slate-100 transition-colors hover:bg-slate-800 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-indigo-300 disabled:opacity-60",disabled:zt,onClick:()=>{mn()},children:p?"หยุดการรัน":"Cancel run"})]})}),n.jsx(I2,{projectId:a,detailsRef:m})]})}function V2({projects:a,activeProjectId:s,result:l,collapsed:o,onToggleCollapsed:c,onSelect:u,onNew:f,onDelete:p,onRename:m,onSettings:g,workspaceRoot:v,onOpenWorkspace:y}){const{ui:S,language:b,toggleLanguage:E,t:N}=Le(),[A,w]=L.useState(),[j,R]=L.useState(),[O,M]=L.useState(""),[F,X]=L.useState(!1);return n.jsxs("aside",{className:`workspace-sidebar ${o?"is-collapsed":""}`,"data-mobile-open":F,children:[n.jsxs("div",{className:"sidebar-brand",children:[n.jsx("span",{className:"brand-mark",children:"LS"}),n.jsx("b",{children:"LazyScout"}),n.jsxs("button",{type:"button",className:"mobile-project-toggle","aria-expanded":F,"aria-controls":"sidebar-projects",onClick:()=>X(!F),children:[N("projects")," ",n.jsx("span",{"aria-hidden":"true",children:F?"▴":"▾"})]}),n.jsx("button",{type:"button",className:"sidebar-collapse",onClick:c,title:S(o?"Expand sidebar":"Collapse sidebar"),children:o?"›":"‹"})]}),n.jsxs("button",{type:"button",className:"new-project-btn",onClick:()=>{X(!1),f()},title:N("newProject"),children:[n.jsx("span",{children:"+"}),n.jsx("em",{children:N("newProject")})]}),n.jsxs("div",{className:"sidebar-label",children:[n.jsx("span",{children:N("projects")}),n.jsx("b",{children:a.length})]}),n.jsx("div",{className:"project-list",id:"sidebar-projects",children:a.map(Z=>n.jsx("div",{className:`project-item ${Z.id===s?"active":""}`,children:j===Z.id?n.jsxs("form",{className:"project-rename",onSubmit:$=>{$.preventDefault(),m(Z.id,O),R(void 0)},children:[n.jsx("input",{autoFocus:!0,value:O,onChange:$=>M($.target.value),onKeyDown:$=>{$.key==="Escape"&&R(void 0)}}),n.jsx("button",{type:"submit",children:S("Save")}),n.jsx("button",{type:"button",onClick:()=>R(void 0),children:"×"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",onClick:()=>{X(!1),u(Z.id)},title:Z.targetUrl?`${Z.name}
55
+ ${Z.targetUrl}`:Z.name,children:[n.jsx("span",{className:"project-icon",children:"◈"}),n.jsxs("span",{className:"project-copy",children:[n.jsx("b",{children:Z.name}),n.jsx("small",{children:Z.targetUrl||S("Manual suite")})]})]}),n.jsxs("div",{className:"project-actions",children:[n.jsx("button",{type:"button",className:"project-more",title:S("Project actions"),onClick:()=>w($=>$===Z.id?void 0:Z.id),children:"⋯"}),A===Z.id&&n.jsxs("div",{className:"project-action-menu",children:[n.jsx("button",{type:"button",onClick:()=>{R(Z.id),M(Z.name),w(void 0)},children:S("Rename")}),n.jsx("button",{type:"button",className:"danger",onClick:()=>{p(Z.id),w(void 0)},children:S("Delete")})]})]})]})},Z.id))}),l&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"sidebar-label",children:[n.jsx("span",{children:N("files")}),n.jsx("b",{children:l.pages.length})]}),n.jsx("div",{className:"file-list",children:l.pages.map(Z=>n.jsxs("div",{className:"file-item",title:Z.finalUrl,children:[n.jsx("span",{children:"◫"}),n.jsx("span",{className:"file-name",children:new URL(Z.finalUrl).pathname==="/"?"index":new URL(Z.finalUrl).pathname.slice(1)}),n.jsx("small",{children:Z.state?.fingerprint.slice(-4)})]},Z.finalUrl))})]}),s&&n.jsxs("button",{type:"button",className:"sidebar-settings",onClick:()=>{X(!1),g()},title:N("settings"),children:[n.jsx("span",{children:"⚙"}),n.jsx("em",{children:N("settings")})]}),n.jsx("div",{className:"sidebar-bottom",children:n.jsxs("div",{className:"workspace-language-row",children:[n.jsxs("button",{type:"button",className:"workspace-copy",onClick:y,title:v,children:[n.jsx("span",{className:"status-dot status-pass"})," ",n.jsx("b",{children:N("localWorkspace")}),n.jsx("small",{children:v||N("storedHere")})]}),n.jsx("button",{type:"button",className:"language-circle",onClick:E,title:b==="en"?"Switch to Thai":S("Switch to English (US)"),"aria-label":S("Switch language"),children:b==="en"?"EN":"TH"})]})})]})}function Y2(a){return Yy(a,!0)}function X2(a){return Yy(a,!1)}function Yy(a,s){const l=`<!doctype html><html><head><meta charset="utf-8"><title>LazyScout Quality Report</title><style>${Q2}</style></head><body>${Z2(a)}</body></html>`,o=window.open("","_blank","width=1100,height=820");return o&&(o.document.open(),o.document.write(l),o.document.close(),s&&window.setTimeout(()=>{o.focus(),o.print()},350)),l}function Z2(a){const s=[["Test Cases",a.testCases,`${a.pages} pages explored`],["Pass",a.passed,"Execution result"],["Failed",a.failed,"Execution result"],["Requirements",a.requirementCount,`${a.linkedCases}/${a.testCases} cases linked`]],l=a.failedCases.length?`<section class="failures"><div class="head"><div><p>FOLLOW-UP</p><h2>Failed Test Cases & logs</h2></div><em>${a.failedCases.length} failed</em></div>${a.failedCases.map(o=>`<article><div><b>${ia(o.id)} · ${ia(o.title)}</b><small>${ia(o.folder||"UNASSIGNED")}</small></div><pre>${o.logs.length?ia(o.logs.join(`
56
+ `)):"No run log was captured for this case."}</pre></article>`).join("")}</section>`:"";return`<main><header><div><div class="brand">LS <span>LazyScout</span></div><p>QUALITY REPORT</p><h1>Quality overview</h1><small>${ia(a.origin)} · Generated ${ia(a.generatedAt)}</small></div><div class="report-state">${a.pending} pending execution</div></header><section class="metrics">${s.map(([o,c,u])=>`<article><span>${o}</span><b>${c}</b><small>${u}</small></article>`).join("")}</section><section class="grid"><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Execution status</h2></div><em>Donut chart</em></div>${cv(a.status,"Test Cases")}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Priority</h2></div><em>Column chart</em></div>${K2(a.priority)}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Test type</h2></div><em>Bar chart</em></div>${uv(a.testType)}</article><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Automation readiness</h2></div><em>Donut chart</em></div>${cv(a.readiness,"Cases")}</article><article class="card wide"><div class="head"><div><p>HIERARCHY</p><h2>Folder coverage</h2></div><em>Top 10</em></div>${uv(a.modules)}</article></section>${l}<footer>LazyScout · Local QA workspace</footer></main>`}function cv(a,s){const l=a.reduce((u,f)=>u+f.value,0);let o=0;return`<div class="donut-wrap"><div class="donut" style="background:conic-gradient(${a.map(u=>{const f=l?o/l*100:0;o+=u.value;const p=l?o/l*100:0;return`${u.color} ${f}% ${p}%`}).join(", ")||"#e2e8f0 0 100%"})"><div><b>${l}</b><span>${s}</span></div></div><div class="legend">${a.map(u=>`<div><i style="background:${u.color}"></i><span title="${ia(u.label)}">${ia(Sf(u.label))}</span><b>${u.value}</b></div>`).join("")}</div></div>`}function K2(a){const s=Math.max(...a.map(o=>o.value),1),l=a.reduce((o,c)=>o+c.value,0)||1;return`<div class="columns"><div class="axis"><span>100%</span><span>75%</span><span>50%</span><span>25%</span><span>0%</span></div><div class="column-area" style="grid-template-columns:repeat(${Math.max(a.length,1)},minmax(0,1fr))">${a.map(o=>`<div class="column"><div class="column-track"><i style="height:${o.value/s*100}%;background:${o.color}"></i></div><b>${o.value} <small>${Math.round(o.value/l*100)}%</small></b><span>${ia(Sf(o.label))}</span></div>`).join("")}</div></div>`}function uv(a){const s=Math.max(...a.map(l=>l.value),1);return`<div class="bars">${a.map(l=>`<div><span title="${ia(l.label)}">${ia(Sf(l.label))}</span><section><i style="width:${l.value/s*100}%;background:${l.color}"></i></section><b>${l.value}</b></div>`).join("")}</div>`}function Sf(a){return a.length>10?`${a.slice(0,10)}...`:a}function ia(a){return String(a).replace(/[&<>'"]/g,s=>({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"})[s]??s)}const Q2="@page{size:A4 landscape;margin:12mm}*{box-sizing:border-box}body{margin:0;color:#182238;font:12px Inter,Arial,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact}main{max-width:1120px;margin:auto}header{display:flex;justify-content:space-between;align-items:start;padding-bottom:18px;border-bottom:1px solid #e2e8f0}.brand{font-size:18px;font-weight:800;color:#fff;background:#2563eb;border-radius:7px;display:inline-flex;gap:9px;align-items:center;padding:6px 9px}.brand span{color:#182238}header p{margin:15px 0 3px;font-size:9px;letter-spacing:1.4px;color:#64748b;font-weight:700}h1{margin:0;font-size:26px}header small{display:block;margin-top:6px;color:#64748b}.report-state{border-radius:999px;padding:7px 10px;background:#fffbeb;color:#b45309;font-weight:700}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.metrics article,.card,.failures{border:1px solid #e2e8f0;border-radius:10px;background:#fff}.metrics article{padding:13px}.metrics span,.metrics small{display:block;color:#64748b}.metrics b{display:block;margin:8px 0 2px;font-size:27px}.metrics small{font-size:10px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.card{padding:15px;min-height:230px}.card.wide{grid-column:1/3;min-height:180px}.head{display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #f1f5f9;padding-bottom:10px}.head p{margin:0;color:#64748b;font-size:9px;font-weight:700;letter-spacing:1px}.head h2{margin:4px 0 0;font-size:14px}.head em{font-style:normal;background:#f1f5f9;border-radius:999px;padding:4px 7px;color:#64748b;font-size:9px}.donut-wrap{height:165px;display:flex;align-items:center;justify-content:center;gap:30px}.donut{width:124px;height:124px;border-radius:50%;display:flex;align-items:center;justify-content:center}.donut>div{width:68px;height:68px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut b{font-size:21px}.donut span{font-size:9px;color:#64748b}.legend{min-width:140px}.legend div{display:grid;grid-template-columns:9px 1fr auto;gap:7px;align-items:center;margin:8px 0}.legend i{width:8px;height:8px;border-radius:50%}.legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.columns{display:grid;grid-template-columns:34px 1fr;gap:5px;height:165px;margin-top:10px}.axis{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:25px;text-align:right;font-size:8px;color:#94a3b8}.column-area{display:grid;gap:6px;align-items:end;border-bottom:1px solid #cbd5e1;background:repeating-linear-gradient(to bottom,transparent 0 calc(25% - 1px),#e2e8f0 calc(25% - 1px) 25%)}.column{min-width:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:3px}.column-track{height:112px;width:100%;max-width:34px;background:#f1f5f9;display:flex;align-items:end;border-radius:4px 4px 0 0}.column-track i{width:100%;display:block;border-radius:4px 4px 0 0}.column b{font-size:10px;white-space:nowrap}.column small{font-size:8px;color:#94a3b8}.column>span{width:100%;font-size:8px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.bars{margin-top:18px}.bars>div{display:grid;grid-template-columns:85px 1fr 28px;gap:9px;align-items:center;margin:9px 0}.bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.bars section{height:9px;border-radius:99px;background:#f1f5f9;overflow:hidden}.bars i{display:block;height:100%;border-radius:99px}.bars b{text-align:right}.failures{margin-top:12px;padding:15px}.failures article{padding:10px 0;border-bottom:1px solid #f1f5f9}.failures article:last-child{border:0}.failures b,.failures small{display:block}.failures small{margin-top:3px;color:#64748b;font-size:10px}.failures pre{margin:8px 0 0;max-height:110px;overflow:auto;white-space:pre-wrap;border-radius:6px;background:#0b1120;padding:9px;color:#dbeafe;font:9px ui-monospace,monospace}footer{margin-top:18px;border-top:1px solid #e2e8f0;padding-top:10px;color:#94a3b8;font-size:10px}";function J2({result:a,testCases:s,executionStatuses:l={},runResults:o={},projectId:c}){const{ui:u}=Le(),[f,p]=L.useState(!1),[m,g]=L.useState({status:!0,priority:!0,type:!0,automation:!0,modules:!0,trend:!0}),[v,y]=L.useState({status:"donut",priority:"column",type:"bar",automation:"donut",modules:"treemap",trend:"line"}),S=T=>l[T.id]??T.status??"pending",b={passed:s.filter(T=>S(T)==="passed").length,failed:s.filter(T=>S(T)==="failed").length,pending:s.filter(T=>S(T)==="pending").length},E=wo(s,T=>T.priority),N=wo(s,T=>T.type),A=wo(s,T=>T.automationStatus),w=wo(s,T=>(T.folder??T.module)||"UNASSIGNED"),j=L.useMemo(()=>sC(a),[a]),R=[{label:u("Pass"),value:b.passed,color:"#10b981"},{label:u("Failed"),value:b.failed,color:"#ef4444"},{label:u("Pending"),value:b.pending,color:"#f59e0b"}],O=[{label:u("High"),value:E.high??0,color:"#ef4444"},{label:u("Medium"),value:E.medium??0,color:"#f59e0b"},{label:u("Low"),value:E.low??0,color:"#3b82f6"}],M=[{label:u("Positive"),value:N.positive??0,color:"#10b981"},{label:u("Negative"),value:N.negative??0,color:"#ef4444"},{label:u("Validation"),value:N.validation??0,color:"#6366f1"}],F=[{label:u("Ready"),value:A.ready??0,color:"#3b82f6"},{label:u("Needs review"),value:A["needs-review"]??0,color:"#f59e0b"},{label:u("Needs data"),value:A["needs-data"]??0,color:"#8b5cf6"},{label:u("Manual"),value:A.manual??0,color:"#64748b"}],X=Object.entries(w).map(([T,K],V)=>({label:T,value:K,color:dv[V%dv.length]})),Z=s.filter(T=>(T.requirements?.length??0)>0).length,$=new Set(s.flatMap(T=>T.requirements??[])).size,B={origin:a.origin,generatedAt:new Date().toLocaleString(),pages:a.pages.length,testCases:s.length,passed:b.passed,failed:b.failed,pending:b.pending,needsReview:A["needs-review"]??0,linkedCases:Z,requirementCount:$,status:R,priority:O,testType:M,readiness:F,modules:Zy(X),failedCases:s.filter(T=>S(T)==="failed").map(T=>({id:T.id,title:T.title,folder:T.folder??T.module,logs:(o[T.id]?.logs??[]).slice(-8).map(K=>`${new Date(K.timestamp).toLocaleTimeString()} ${K.message}`)}))},J=T=>g(K=>({...K,[T]:!K[T]})),z=(T,K)=>y(V=>({...V,[T]:K})),H=T=>{const K=T?Y2(B):X2(B);c&&Y0(c,T?"quality-report-print.html":"quality-report.html",K)};return n.jsxs("div",{className:"dashboard-view",children:[n.jsxs("div",{className:"dashboard-title",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:u("Project dashboard")}),n.jsx("h2",{children:u("Quality overview")}),n.jsxs("p",{children:[u("Coverage and readiness for")," ",n.jsx("b",{children:a.origin})]})]}),n.jsxs("div",{className:"dashboard-actions",children:[n.jsxs("span",{className:"status-badge status-badge-warn",children:[b.pending," ",u("pending execution")]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(T=>!T),children:u("Customize")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>H(!1),children:u("HTML report")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>H(!0),children:u("Export PDF")})]})]}),f&&n.jsxs("div",{className:"dashboard-customize",children:[n.jsx("b",{children:u("Dashboard layout")}),n.jsx("span",{children:u("Show or hide charts")}),["status","priority","type","automation","modules","trend"].map(T=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:m[T],onChange:()=>J(T)})," ",u(W2(T))]},T))]}),n.jsxs("div",{className:"dashboard-metrics",children:[n.jsx(Mi,{label:u("Test Cases"),value:s.length,hint:`${a.pages.length} ${u("pages explored")}`,tone:"blue"}),n.jsx(Mi,{label:u("Pass"),value:b.passed,hint:u("Execution result"),tone:"green"}),n.jsx(Mi,{label:u("Failed"),value:b.failed,hint:u("Execution result"),tone:"red"}),n.jsx(Mi,{label:u("Need Review"),value:A["needs-review"]??0,hint:u("Tester decision needed"),tone:"amber"}),n.jsx(Mi,{label:u("Requirements"),value:$,hint:`${Z}/${s.length} ${u("cases linked")}`,tone:"blue"})]}),n.jsxs("div",{className:"dashboard-columns",children:[m.status&&n.jsx(ks,{eyebrow:u("Composition"),title:u("Execution status"),panel:"status",kind:v.status,onChange:z,children:Ui(v.status,R,u("Test Cases"))}),m.priority&&n.jsx(ks,{eyebrow:u("Comparison"),title:u("Priority"),panel:"priority",kind:v.priority,onChange:z,children:Ui(v.priority,O,u("Cases"))})]}),n.jsxs("div",{className:"dashboard-columns",children:[m.type&&n.jsx(ks,{eyebrow:u("Comparison"),title:u("Test type"),panel:"type",kind:v.type,onChange:z,children:Ui(v.type,M,u("Cases"))}),m.automation&&n.jsx(ks,{eyebrow:u("Composition"),title:u("Automation readiness"),panel:"automation",kind:v.automation,onChange:z,children:Ui(v.automation,F,u("Cases"))})]}),n.jsxs("div",{className:"dashboard-columns",children:[m.modules&&n.jsx(ks,{eyebrow:u("Hierarchy"),title:u("Folder coverage"),panel:"modules",kind:v.modules,onChange:z,children:Ui(v.modules,X,u("Cases"))}),m.trend&&n.jsx(ks,{eyebrow:u("Trend"),title:u("Scout discovery"),panel:"trend",kind:v.trend,onChange:z,children:v.trend==="line"?n.jsx(rC,{points:j.slice(-cf)}):n.jsx(Xy,{items:j.slice(-cf).map((T,K)=>({label:`${u("Step")} ${K+1}`,value:T,color:"#4f46e5"}))})})]})]})}function ks({eyebrow:a,title:s,panel:l,kind:o,onChange:c,children:u}){const{ui:f}=Le();return n.jsxs("section",{className:"dashboard-card",children:[n.jsxs("div",{className:"dashboard-card-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:a}),n.jsx("h3",{children:s})]}),n.jsxs("label",{className:"chart-selector",children:[n.jsx("span",{children:f("Chart")}),n.jsx("select",{value:o,onChange:p=>c(l,p.target.value),children:iC[l].map(p=>n.jsx("option",{value:p,children:f(eC(p))},p))})]})]}),u]})}function Mi({label:a,value:s,hint:l,tone:o}){return n.jsxs("div",{className:`dashboard-metric tone-${o}`,children:[n.jsx("span",{children:a}),n.jsx("strong",{children:s}),n.jsx("small",{children:l})]})}function wo(a,s){return a.reduce((l,o)=>{const c=s(o);return l[c]=(l[c]??0)+1,l},{})}function W2(a){return{status:"Execution status",priority:"Priority comparison",type:"Test type comparison",automation:"Automation readiness",modules:"Folder treemap",trend:"Scout trend"}[a]}function eC(a){return{bar:"Bar chart",column:"Column chart",donut:"Donut chart",treemap:"Treemap",line:"Line chart"}[a]}function Ui(a,s,l){const o=Zy(s);return a==="donut"?n.jsx(tC,{slices:o,totalLabel:l,compact:o.length>3}):a==="column"?n.jsx(Xy,{items:o}):a==="treemap"?n.jsx(aC,{items:o}):n.jsx(nC,{items:o})}function tC({slices:a,totalLabel:s,compact:l=!1}){const o=a.reduce((f,p)=>f+p.value,0);let c=0;const u=a.map(f=>{const p=o?c/o*100:0;c+=f.value;const m=o?c/o*100:0;return`${f.color} ${p}% ${m}%`}).join(", ");return n.jsxs("div",{className:`donut-chart ${l?"is-compact":""}`,children:[n.jsx("div",{className:"donut-ring",style:{background:o?`conic-gradient(${u})`:"#e2e8f0"},children:n.jsxs("div",{children:[n.jsx("b",{children:o}),n.jsx("span",{children:s})]})}),n.jsx("div",{className:"donut-legend",children:a.map(f=>n.jsxs("div",{children:[n.jsx("i",{style:{background:f.color}}),n.jsx("span",{title:f.label,children:Ko(f.label)}),n.jsx("b",{children:f.value})]},f.label))})]})}function Xy({items:a}){const s=Math.max(...a.map(o=>o.value),1),l=a.reduce((o,c)=>o+c.value,0)||1;return n.jsxs("div",{className:"column-chart-wrap",children:[n.jsxs("div",{className:"column-axis","aria-hidden":"true",children:[n.jsx("span",{children:"100%"}),n.jsx("span",{children:"75%"}),n.jsx("span",{children:"50%"}),n.jsx("span",{children:"25%"}),n.jsx("span",{children:"0%"})]}),n.jsxs("div",{className:"column-chart",style:{gridTemplateColumns:`repeat(${Math.max(a.length,1)}, minmax(0, 1fr))`},children:[n.jsx("div",{className:"column-grid","aria-hidden":"true"}),a.map(o=>n.jsxs("div",{className:"column-item",title:o.label,children:[n.jsx("div",{className:"column-track",children:n.jsx("i",{style:{height:`${o.value/s*100}%`,background:o.color}})}),n.jsxs("div",{className:"column-value",children:[n.jsx("b",{children:o.value}),n.jsxs("small",{children:[Math.round(o.value/l*100),"%"]})]}),n.jsx("span",{children:Ko(o.label)})]},o.label))]})]})}function nC({items:a}){const s=Math.max(...a.map(l=>l.value),1);return n.jsx("div",{className:"bar-chart",children:a.map(l=>n.jsxs("div",{className:"bar-row",children:[n.jsx("span",{title:l.label,children:Ko(l.label)}),n.jsx("div",{children:n.jsx("i",{style:{width:`${l.value/s*100}%`,background:l.color}})}),n.jsx("b",{children:l.value})]},l.label))})}function aC({items:a}){const{ui:s}=Le();return n.jsx("div",{className:"treemap",children:a.length?a.map(l=>n.jsxs("div",{style:{flexGrow:l.value,background:l.color},title:`${l.label}: ${l.value}`,children:[n.jsx("b",{children:Ko(l.label)}),n.jsxs("span",{children:[l.value," ",s("cases")]})]},l.label)):n.jsx("p",{children:s("No folders found.")})})}function rC({points:a}){const{ui:s}=Le(),l=Math.max(...a,1),o=Math.max(a.length-1,1),c=a.map((u,f)=>`${f/o*100},${100-u/l*82-9}`).join(" ");return n.jsxs("div",{className:"line-chart",children:[n.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",role:"img","aria-label":s("Cumulative Scout discovery trend"),children:[n.jsx("line",{x1:"0",y1:"91",x2:"100",y2:"91"}),n.jsx("polyline",{points:c})]}),n.jsxs("div",{className:"line-chart-meta",children:[n.jsx("span",{children:s("Start")}),n.jsxs("b",{children:[a[a.length-1]??0," ",s("discoveries")]}),n.jsx("span",{children:s("Complete")})]})]})}function sC(a){let s=0;const l=[0];for(const o of a.runEvents)(o.eventType==="page-discovered"||o.eventType==="state-discovered"||o.eventType==="action-discovered")&&(s++,l.push(s));return l.length>1?l:[0,a.pages.length]}const dv=["#2563eb","#7c3aed","#0891b2","#059669","#d97706","#db2777","#475569"],iC={status:["donut","bar","column"],priority:["column","bar","donut"],type:["bar","column","donut"],automation:["donut","bar","column"],modules:["treemap","bar","column","donut"],trend:["line","column"]},cf=10;function Zy(a){return[...a].sort((s,l)=>l.value-s.value).slice(0,cf)}function Ko(a){return a.length>10?`${a.slice(0,10)}...`:a}function lC({pages:a,testCases:s,recordedCases:l,completedRuns:o,onScout:c,onReview:u,onRecord:f,onRun:p,onExport:m}){const{language:g}=Le(),v=g==="th",y=[{label:v?"สำรวจเว็บไซต์":"Scout the website",description:a?v?`ค้นพบ ${a} หน้า`:`${a} pages discovered`:v?"ใส่ URL แล้วให้ LazyScout สร้างเคสทดสอบชุดแรก":"Enter a URL and let LazyScout discover the first Test Cases.",complete:a>0,action:a?v?"สำรวจอีกครั้ง":"Scout again":v?"เริ่มสำรวจ":"Start Scout",onClick:c},{label:v?"ตรวจทานเคสทดสอบ":"Review Test Cases",description:s?v?`มี ${s} เคสพร้อมให้ตรวจทาน`:`${s} Test Cases are ready to review.`:v?"ตรวจชื่อ ขั้นตอน และผลลัพธ์ที่คาดหวัง":"Review titles, steps, and expected results.",complete:s>0,action:v?"เปิดเคสทดสอบ":"Open Test Cases",onClick:u},{label:v?"บันทึกขั้นตอนที่ยังขาด":"Record missing flows",description:l?v?`บันทึกแล้ว ${l} ชุดขั้นตอน`:`${l} recorded flow${l===1?"":"s"} saved.`:v?"บันทึกการเข้าสู่ระบบหรือขั้นตอนที่ยังสำรวจไม่พบ":"Record login or business actions that Scout cannot infer.",complete:l>0,action:v?"บันทึกขั้นตอน":"Record Flow",onClick:f},{label:v?"รันทดสอบ":"Run Automation",description:o?v?`รันแล้ว ${o} เคส`:`${o} Test Case${o===1?"":"s"} executed.`:v?"รันเคสที่เลือกด้วย Playwright CLI":"Run selected Test Cases with the Playwright CLI.",complete:o>0,action:v?"เปิดหน้ารันทดสอบ":"Open Automation",onClick:p},{label:v?"ส่งเคสทดสอบให้ทีม":"Share the Test Cases",description:v?"ส่งออกเคสที่ตรวจแล้วเป็นไฟล์ CSV ให้ทีม":"Export the reviewed Test Cases as a CSV file for your team.",complete:!1,action:v?"ส่งออก CSV":"Export CSV",onClick:m}];return n.jsxs("section",{className:"journey-card","aria-labelledby":"journey-title",children:[n.jsxs("header",{children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:v?"ขั้นตอนที่แนะนำ":"Recommended workflow"}),n.jsx("h3",{id:"journey-title",children:v?"ต่อไปควรทำอะไร?":"What should I do next?"})]}),n.jsxs("span",{children:[y.filter(S=>S.complete).length,"/4 ",v?"ขั้นตอนพร้อมแล้ว":"setup steps complete"]})]}),n.jsx("div",{className:"journey-steps",children:y.map((S,b)=>n.jsxs("article",{className:S.complete?"is-complete":"",children:[n.jsx("span",{className:"journey-number",children:S.complete?"✓":b+1}),n.jsxs("div",{children:[n.jsx("b",{children:S.label}),n.jsx("small",{children:S.description})]}),n.jsxs("button",{type:"button",onClick:S.onClick,children:[S.action," ",n.jsx("span",{children:"→"})]})]},S.label))})]})}const oC=1e3,cC=3,jd=a=>({projectId:a,status:"idle",startUrl:"",startedAt:"",steps:[]});function uC(a){const[s,l]=L.useState(()=>jd(a??"")),[o,c]=L.useState(!1),[u,f]=L.useState(),[p,m]=L.useState(!1),[g,v]=L.useState(!1);L.useEffect(()=>{if(!a)return;let w=!0;return l(jd(a)),f(void 0),m(!1),v(!1),pg(a).then(j=>{if(j.status==="stopped"){mg(a).catch(()=>{});return}w&&j.status==="recording"&&l(j)}).catch(()=>{}),()=>{w=!1}},[a]);const y=s.status==="recording"&&!p;L.useEffect(()=>{if(!a||!y)return;let w=!0,j=!1,R=0;const O=setInterval(()=>{j||(j=!0,pg(a).then(M=>{R=0,w&&l(M)}).catch(()=>{R+=1,R>=cC&&w&&(f("Lost contact with the recorder. Stop and start it again."),m(!0))}).finally(()=>{j=!1}))},oC);return()=>{w=!1,clearInterval(O)}},[a,y]);const S=L.useCallback(async w=>{if(a){c(!0),f(void 0),m(!1),v(!1);try{l(await B0(a,w))}catch(j){f(j instanceof Error?j.message:"The recorder could not be started.")}finally{c(!1)}}},[a]),b=L.useCallback(async()=>{if(a){c(!0);try{l(await I0(a))}catch(w){f(w instanceof Error?w.message:"The recorder could not be stopped.")}finally{c(!1)}}},[a]),E=L.useCallback(async()=>{if(!a||!y)return;const w=!g;try{const j=await P0(a,w);l(j),v(w)}catch(j){f(j instanceof Error?j.message:"The inspect mode could not be changed.")}},[g,a,y]),N=L.useCallback(async w=>{if(!(!a||!y))try{l(await q0(a,w))}catch(j){f(j instanceof Error?j.message:"The browser interaction failed.")}},[a,y]),A=L.useCallback(()=>{l(jd(a??"")),f(void 0),m(!1),v(!1),a&&mg(a).catch(()=>{})},[a]);return{state:s,recording:y,busy:o,error:u,start:S,stop:b,reset:A,inspectMode:g,toggleInspectMode:E,interact:N}}const dC="{{TEST_PASSWORD}}",fv="Recorded login",fC=160;function Ky({projectId:a,targetUrl:s,onSaveRecording:l,onPickTarget:o}){const{ui:c}=Le(),{state:u,recording:f,busy:p,error:m,start:g,stop:v,reset:y,inspectMode:S,toggleInspectMode:b,interact:E}=uC(a),[N,A]=L.useState(fv),[w,j]=L.useState(!1),[R,O]=L.useState(0),[M,F]=L.useState(s),[X,Z]=L.useState(!1),$=L.useRef(0),B=L.useRef(void 0),J=u.steps,z=u.status==="stopped"&&J.length>0;L.useEffect(()=>{!X&&u.currentUrl&&F(u.currentUrl)},[X,u.currentUrl]),L.useEffect(()=>{if(!(!w||!f))return O(Date.now()),()=>{B.current!==void 0&&window.clearTimeout(B.current)}},[f,w]);const H=()=>{B.current!==void 0&&window.clearTimeout(B.current),B.current=window.setTimeout(()=>O(Date.now()),fC)},T=async C=>{await E(C),O(Date.now())};L.useEffect(()=>{if(!w)return;const C=document.body,q=document.documentElement,I=C.style.overflow,ee=C.style.paddingRight,he=q.style.overflow,_e=window.innerWidth-q.clientWidth;return C.style.overflow="hidden",q.style.overflow="hidden",_e>0&&(C.style.paddingRight=`${_e}px`),()=>{C.style.overflow=I,C.style.paddingRight=ee,q.style.overflow=he}},[w]);const K=C=>{const q=C.currentTarget.getBoundingClientRect();return{x:(C.clientX-q.left)/q.width*C.currentTarget.naturalWidth,y:(C.clientY-q.top)/q.height*C.currentTarget.naturalHeight}},V=C=>{if(C.nativeEvent.isComposing||["Shift","Control","Alt","Meta"].includes(C.key))return;if(C.preventDefault(),C.key.length===1&&!C.ctrlKey&&!C.altKey&&!C.metaKey){T({type:"text",text:C.key});return}const q=[C.ctrlKey&&"Control",C.altKey&&"Alt",C.metaKey&&"Meta",C.shiftKey&&"Shift"].filter(Boolean).join("+");T({type:"key",key:q?`${q}+${C.key}`:C.key})},Q=C=>{C.preventDefault(),C.stopPropagation(),T({type:"scroll",deltaX:C.deltaX,deltaY:C.deltaY})},W=()=>{const C=M.trim();if(!C||!f)return;let q=C;try{q=new URL(C,u.currentUrl||s).toString()}catch{return}T({type:"navigate",url:q})},D=()=>{y(),A(fv),j(!1)},Y=()=>{l(J,N.trim()||"Recorded flow",u.startUrl||s),D()},x=async C=>{if(!o)return;const q=hC(C);await v(),y(),j(!1),o(q)};return n.jsxs("div",{className:"settings-notice settings-notice-stacked recorder-panel",children:[n.jsx("b",{children:c("Record a flow")}),n.jsx("span",{children:c("Start the Cypress-style workspace to record clicks, typing, and element locators.")}),m&&n.jsx("p",{className:"recorder-error",children:m}),!f&&!z&&n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:p,onClick:()=>{j(!0),g(s)},children:c(p?"Starting…":"Start recording")}),f&&!w&&n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>j(!0),children:c("Open recorder workspace")}),!w&&f&&u.inspection&&n.jsxs("div",{className:"recorder-inspection","aria-live":"polite",children:[n.jsxs("div",{className:"recorder-inspection-heading",children:[n.jsx("b",{children:c("Selected element")}),n.jsxs("code",{children:["<",u.inspection.tagName,">"]})]}),u.inspection.accessibleName&&n.jsxs("span",{children:[c("Accessible name:")," ",u.inspection.accessibleName]}),u.inspection.role&&n.jsxs("span",{children:[c("Role:")," ",u.inspection.role]}),u.inspection.id&&n.jsxs("span",{children:[c("ID:")," ",u.inspection.id]}),u.inspection.name&&n.jsxs("span",{children:[c("Name:")," ",u.inspection.name]}),n.jsxs("label",{children:[c("CSS selector"),n.jsx("code",{children:u.inspection.cssSelector})]}),n.jsxs("label",{children:[c("Playwright locator"),n.jsx("code",{children:u.inspection.playwrightLocator})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:c("Copy locator")})]}),!w&&J.length>0&&n.jsx("ol",{className:"recorder-steps",children:J.map((C,q)=>n.jsxs("li",{children:[n.jsx("span",{className:"recorder-step-index",children:q+1}),n.jsx("span",{children:Ua(C)})]},`${q}-${C.type}`))}),!w&&z&&n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"recorder-title",children:[n.jsx("span",{children:c("Test Case title")}),n.jsx("input",{value:N,onChange:C=>A(C.target.value),placeholder:c("Recorded login")})]}),n.jsxs("div",{className:"recorder-actions",children:[n.jsx("button",{type:"button",className:"btn btn-primary",onClick:Y,children:c("Save as Test Case")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:D,children:c("Discard")})]})]}),u.status==="stopped"&&J.length===0&&n.jsx("p",{className:"recorder-status",children:c("No steps were recorded. Start again and interact with the page.")}),w&&n.jsx("div",{className:"modern-modal-backdrop recorder-workspace-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal recorder-workspace-modal",role:"dialog","aria-modal":"true","aria-labelledby":"recorder-workspace-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("h2",{id:"recorder-workspace-title",children:c("Record and inspect")}),n.jsxs("p",{children:[c("Control the recorder from the left and preview the target page on the right. Your clicks and typing become Test Steps. Passwords are never read and are saved as")," ",n.jsx("code",{children:dC}),"."]})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":c("Close recorder workspace"),onClick:()=>j(!1),children:"×"})]}),n.jsxs("div",{className:"recorder-workspace-body",children:[n.jsxs("aside",{className:"recorder-workspace-sidebar",children:[n.jsx("span",{className:"recorder-workspace-status",children:c(f?"● Recording":"○ Recorder idle")}),n.jsx("button",{type:"button",className:"btn btn-danger",disabled:!f||p,onClick:()=>{v()},children:c(p?"Stopping…":"Stop recording")}),n.jsx("button",{type:"button",className:S?"btn btn-primary":"btn btn-secondary",disabled:!f||p,onClick:()=>{b()},children:c(S?"Inspecting element":"Inspect element")}),n.jsx("p",{className:"recorder-workspace-help",children:c("Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock.")}),u.inspection&&n.jsxs("div",{className:"recorder-workspace-selection",children:[n.jsxs("div",{className:"recorder-inspection-lock-row",children:[n.jsx("b",{children:c("Selected element")}),n.jsx("span",{className:u.inspection.locked?"is-locked":"",children:u.inspection.locked?c("Locked"):c("Hover preview")})]}),n.jsxs("code",{children:["<",u.inspection.tagName,">"]}),u.inspection.accessibleName&&n.jsx("span",{children:u.inspection.accessibleName}),n.jsx("code",{children:u.inspection.playwrightLocator}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:c("Copy locator")}),o&&u.inspection.locked&&n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{x(u.inspection)},children:c("Use this element")})]}),J.length>0&&n.jsx("ol",{className:"recorder-workspace-steps",children:J.map((C,q)=>n.jsxs("li",{children:[n.jsx("span",{children:q+1}),n.jsx("p",{children:Ua(C)})]},`${q}-${C.type}`))}),z&&n.jsxs("div",{className:"recorder-workspace-save",children:[n.jsxs("label",{children:[c("Test Case title"),n.jsx("input",{value:N,onChange:C=>A(C.target.value)})]}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:Y,children:c("Save as Test Case")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:D,children:c("Discard")})]}),n.jsxs("span",{className:"recorder-workspace-count",children:[c("Recorded steps:")," ",J.length]})]}),n.jsxs("main",{className:"recorder-workspace-preview",children:[n.jsxs("div",{className:"recorder-workspace-browser-bar",children:[n.jsx("button",{type:"button","aria-label":c("Back"),disabled:!f,onClick:()=>{T({type:"back"})},children:"←"}),n.jsx("button",{type:"button","aria-label":c("Forward"),disabled:!f,onClick:()=>{T({type:"forward"})},children:"→"}),n.jsx("button",{type:"button","aria-label":c("Reload"),disabled:!f,onClick:()=>{T({type:"reload"})},children:"↻"}),n.jsxs("form",{className:"recorder-workspace-address-form",onSubmit:C=>{C.preventDefault(),W()},children:[n.jsx("input",{className:"recorder-workspace-url",value:M,disabled:!f,"aria-label":c("Browser address"),spellCheck:!1,onFocus:()=>Z(!0),onBlur:()=>Z(!1),onChange:C=>F(C.target.value)}),n.jsx("button",{type:"submit",className:"recorder-address-go",disabled:!f||!M.trim(),children:c("Go")})]})]}),n.jsx("div",{className:"recorder-browser-viewport",style:{cursor:u.pointerCursor??"default"},role:"application",tabIndex:0,"aria-label":c("Interactive Playwright browser"),onKeyDown:V,onCompositionEnd:C=>{T({type:"text",text:C.data})},onPaste:C=>{C.preventDefault(),T({type:"text",text:C.clipboardData.getData("text")})},onWheel:Q,children:f?n.jsx("img",{src:$0(a,R),alt:c("Live Playwright browser"),draggable:!1,style:{cursor:u.pointerCursor??"default"},onLoad:H,onError:H,onClick:C=>{C.currentTarget.parentElement?.focus(),T({type:"click",...K(C)})},onMouseMove:C=>{Date.now()-$.current<80||($.current=Date.now(),E({type:"move",...K(C)}))}}):n.jsx("div",{className:"recorder-browser-loading",children:c(z?"Recording stopped. Save the Test Case from the left panel.":"Starting Playwright browser…")})}),n.jsx("p",{children:c("Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly.")}),n.jsxs("div",{className:"hidden","aria-hidden":"true",children:[n.jsx("span",{className:"recorder-live-browser-icon","aria-hidden":"true",children:"◉"}),n.jsx("b",{children:c("Live Playwright browser")}),n.jsx("p",{children:c("Interact with the browser window opened by LazyScout. This modal controls the same recording session and prevents the target page from being opened a second time.")}),n.jsx("span",{className:"recorder-live-browser-note",children:c("The page is intentionally not embedded in an iframe.")})]})]})]}),n.jsx("footer",{className:"modal-footer",children:n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>j(!1),children:c("Close workspace")})})]})})]})}function hC(a){return a.role&&a.accessibleName?{strategy:"role",role:a.role,name:a.accessibleName,cssSelector:a.cssSelector}:{strategy:"css",cssSelector:a.cssSelector}}const pC=["navigate","click","fill","select","check","wait","assert"],mC="https://lazyscout.lazyscout.workers.dev/guided-flow.html";function gC({flows:a,baseUrl:s,projectId:l,secrets:o,onSave:c,onGenerateTestCase:u}){const{ui:f}=Le(),[p,m]=L.useState(),[g,v]=L.useState(),[y,S]=L.useState("click"),[b,E]=L.useState(!1),[N,A]=L.useState(!1),[w,j]=L.useState(),[R,O]=L.useState(),[M,F]=L.useState(),[X,Z]=L.useState();L.useEffect(()=>{if(!a.length)return;const I=a.find(ee=>ee.id===p)??a[0];m(I.id),v(I)},[a]);const $=a.findIndex(I=>I.id===g?.id),B=!!(g?.baseUrl&&g.steps.length);function J(){const I=new Date().toISOString(),ee={id:crypto.randomUUID(),name:"New Guided Flow",description:"",baseUrl:s||"http://localhost:5173",steps:[{id:crypto.randomUUID(),type:"navigate",path:"/"}],createdAt:I,updatedAt:I};m(ee.id),v(ee),O(void 0)}function z(I){v(ee=>ee&&{...ee,...I,updatedAt:new Date().toISOString()})}function H(I,ee){if(!g)return;const he=g.steps.map((_e,Ne)=>Ne===I?ee:_e);z({steps:he})}function T(){g&&z({steps:[...g.steps,yC(y)]})}function K(I){g&&z({steps:g.steps.filter((ee,he)=>he!==I)})}function V(I,ee){if(!g)return;const he=I+ee;if(he<0||he>=g.steps.length)return;const _e=[...g.steps],[Ne]=_e.splice(I,1);_e.splice(he,0,Ne),z({steps:_e})}async function Q(){if(g){E(!0);try{const I=$<0?[...a,g]:a.map(ee=>ee.id===g.id?g:ee);await c(I)}finally{E(!1)}}}async function W(){if(!g)return;const I={...g,id:crypto.randomUUID(),name:`${g.name} Copy`,steps:g.steps.map(ee=>({...ee,id:crypto.randomUUID()})),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};await c([...a,I]),m(I.id),v(I)}async function D(){if(!g)return;const I=a.filter(ee=>ee.id!==g.id);E(!0);try{await c(I),m(I[0]?.id),v(I[0])}finally{E(!1)}}async function Y(){if(X)try{X==="save"?await Q():await D(),Z(void 0)}catch{}}async function x(){if(!g||!B||N)return;A(!0),O(void 0);const I=crypto.randomUUID();j(I);try{O(await M0(g,l,o,I))}catch(ee){O({status:"failed",framework:"playwright",runId:I,logs:[{timestamp:new Date().toISOString(),level:"fail",message:ee instanceof Error?ee.message:String(ee)}],stepStatuses:g.steps.map(he=>({id:he.id,status:"pending"}))})}finally{A(!1),j(void 0)}}async function C(){w&&await U0(w)}const q=L.useMemo(()=>new Map(R?.stepStatuses.map(I=>[I.id,I.status])),[R]);return n.jsxs("div",{className:"guided-flow-panel",children:[n.jsxs("div",{className:"guided-flow-intro",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:f("Tester-defined execution")}),n.jsx("h2",{children:f("Guided Flow")}),n.jsx("p",{children:f("Auto Scout finds the paths. Guided Scout follows yours.")})]}),n.jsxs("div",{className:"guided-flow-intro-actions",children:[n.jsxs("a",{className:"guided-flow-guide-link",href:mC,target:"_blank",rel:"noreferrer","aria-label":f("Open the visual Guided Flow guide"),title:f("Open visual Guided Flow guide"),children:[n.jsx("span",{"aria-hidden":"true",children:"▤"}),f("Guided Flow Guide")]}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:J,children:f("+ New Flow")})]})]}),n.jsxs("section",{className:"hidden","aria-hidden":"true",children:[n.jsxs("div",{className:"guided-flow-guide-grid",children:[n.jsxs("div",{children:[n.jsx("strong",{children:f("Inputs without a label")}),n.jsxs("p",{children:[f("Use CSS with a stable id or name. Example:")," ",n.jsx("code",{children:"input#username"}),"."]})]}),n.jsxs("div",{children:[n.jsx("strong",{children:f("Buttons")}),n.jsx("p",{children:f("Prefer Role + accessible name, or CSS when the button has a stable id.")})]}),n.jsxs("div",{children:[n.jsx("strong",{children:f("Labels")}),n.jsx("p",{children:f("Use Label when the input has a real HTML label. It is also useful for validation checks.")})]}),n.jsxs("div",{children:[n.jsx("strong",{children:f("Login example")}),n.jsx("pre",{children:`Fill · CSS · #username · TEST_USERNAME
57
57
  Fill · CSS · #password · TEST_PASSWORD
58
- Click · CSS · #submit`})]})]}),n.jsxs("div",{className:"guided-flow-guide-steps",children:[n.jsx("strong",{children:f("First time using Guided Flow?")}),n.jsxs("ol",{children:[n.jsx("li",{children:f("Open the target page in your browser and inspect the element you want to test.")}),n.jsxs("li",{children:[f("If it has an id, choose")," ",n.jsx("b",{children:"CSS"}),f(". If it is a named button, choose")," ",n.jsx("b",{children:f("Role")}),"."]}),n.jsxs("li",{children:[f("Enter only the selector value, for example")," ",n.jsx("code",{children:"#username"}),f(", not the whole HTML tag.")]}),n.jsxs("li",{children:[f("For usernames and passwords, leave Value empty and use")," ",n.jsx("b",{children:f("Value reference")}),"."]}),n.jsx("li",{children:f("Save the Flow, run it, then use the CLI error to adjust only the failing step.")})]})]}),n.jsxs("div",{className:"guided-flow-guide-decision",children:[n.jsx("b",{children:f("Not sure which locator to choose?")}),n.jsx("span",{children:f("id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child")})]})]}),n.jsxs("div",{className:"guided-flow-layout",children:[n.jsxs("aside",{className:"guided-flow-list",children:[n.jsxs("div",{className:"guided-flow-list-head",children:[n.jsx("b",{children:f("Guided Flows")}),n.jsx("span",{children:a.length})]}),a.map(I=>n.jsxs("button",{type:"button",className:I.id===g?.id?"is-active":"",onClick:()=>{m(I.id),v(I),D(void 0)},children:[n.jsx("strong",{children:I.name}),n.jsxs("small",{children:[I.steps.length," ",f("steps")]})]},I.id)),!a.length&&n.jsx("p",{className:"guided-flow-empty",children:f("Create a flow to define a deterministic path.")})]}),g?n.jsxs("main",{className:"guided-flow-editor",children:[n.jsxs("div",{className:"guided-flow-fields",children:[n.jsxs("label",{children:[f("Flow name"),n.jsx("input",{className:"field",value:g.name,onChange:I=>z({name:I.target.value})})]}),n.jsxs("label",{children:[f("Base URL"),n.jsx("input",{className:"field",value:g.baseUrl,onChange:I=>z({baseUrl:I.target.value})})]}),n.jsxs("label",{className:"guided-flow-wide",children:[f("Description"),n.jsx("textarea",{className:"field",rows:2,value:g.description??"",onChange:I=>z({description:I.target.value})})]})]}),n.jsxs("div",{className:"guided-flow-section-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:f("Flow Steps")}),n.jsx("span",{children:f("Execute only the steps defined here.")})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:W,children:f("Duplicate")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>Z("delete"),children:f("Delete")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Z("save"),disabled:b,children:f(b?"Saving…":"Save Flow")})]})]}),n.jsx("div",{className:"guided-flow-steps",children:g.steps.map((I,ee)=>n.jsx(yC,{index:ee,step:I,status:q.get(I.id),projectId:l,baseUrl:g.baseUrl||s,onChange:he=>H(ee,he),onDelete:()=>K(ee),onMove:V},I.id))}),n.jsxs("div",{className:"guided-flow-add",children:[n.jsx("select",{className:"field",value:y,onChange:I=>j(I.target.value),children:hC.map(I=>n.jsx("option",{value:I,children:f(I)},I))}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:T,children:f("+ Add Step")})]}),n.jsxs("div",{className:"guided-flow-actions",children:[n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!B||N,onClick:x,children:f(N?"Running…":"Run Flow")}),N&&n.jsx("button",{type:"button",className:"btn btn-danger",onClick:C,children:f("Stop")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>F({framework:"playwright",source:iN(g)}),children:f("Generate Playwright")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>F({framework:"cypress",source:uN(g)}),children:f("Generate Cypress")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>u(rN(g)),children:f("Generate Test Case")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!0,title:f("Record Flow is planned for a future release"),children:f("Record Flow · Planned")})]}),M&&n.jsxs("section",{className:"guided-flow-code",children:[n.jsxs("header",{children:[n.jsxs("b",{children:[M.framework==="playwright"?"Playwright":"Cypress"," ",f("generated source")]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>F(void 0),"aria-label":f("Close generated code"),children:"×"})]}),n.jsx("pre",{children:M.source})]}),O&&n.jsxs("section",{className:"guided-flow-run",children:[n.jsx("header",{children:n.jsxs("b",{children:[f("Run result:")," ",O.status]})}),n.jsx("div",{className:"guided-flow-log",children:O.logs.map((I,ee)=>n.jsx("code",{className:`cli-${I.level}`,children:I.message},`${I.timestamp}-${ee}`))})]})]}):n.jsxs("div",{className:"guided-flow-empty-state",children:[n.jsx("b",{children:f("No Guided Flow selected")}),n.jsx("span",{children:f("Define a path and LazyScout will follow it only.")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:J,children:f("Create Guided Flow")})]})]}),X&&g&&n.jsx(gC,{action:X,flowName:g.name,busy:b,onCancel:()=>Z(void 0),onConfirm:Y})]})}function gC({action:a,flowName:s,busy:l,onCancel:o,onConfirm:c}){const{ui:u}=Le(),f=a==="delete";return n.jsx("div",{className:"guided-flow-confirm-backdrop",role:"presentation",onMouseDown:o,children:n.jsxs("section",{className:"guided-flow-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"guided-flow-confirm-title",onMouseDown:p=>p.stopPropagation(),children:[n.jsx("span",{className:"guided-flow-confirm-icon"+(f?" is-delete":""),"aria-hidden":"true",children:f?"×":"✓"}),n.jsx("p",{className:"eyebrow",children:u(f?"Remove Guided Flow":"Save Guided Flow")}),n.jsx("h3",{id:"guided-flow-confirm-title",children:u(f?"Delete this Flow?":"Save your changes?")}),n.jsx("p",{children:f?'"'+s+'" will be removed from this local Project. This action cannot be undone.':'"'+s+'" will be saved to this local Project and will be ready to run.'}),n.jsxs("footer",{children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,disabled:l,children:u("Cancel")}),n.jsx("button",{type:"button",className:"btn "+(f?"btn-danger":"btn-primary"),onClick:c,disabled:l,children:u(l?"Saving…":f?"Delete Flow":"Save Flow")})]})]})})}function Vr(){return{strategy:"role",role:"button",name:"Button"}}function vC(a){const s=crypto.randomUUID();return a==="navigate"?{id:s,type:a,path:"/"}:a==="click"?{id:s,type:a,target:Vr()}:a==="fill"?{id:s,type:a,target:{...Vr(),role:"textbox"},value:""}:a==="select"?{id:s,type:a,target:{...Vr(),role:"combobox"},option:""}:a==="check"?{id:s,type:a,target:{...Vr(),role:"checkbox"},checked:!0}:a==="wait"?{id:s,type:a,mode:"timeout",value:"750"}:{id:s,type:a,assertion:{type:"text",value:""}}}function yC({index:a,step:s,status:l,onChange:o,onDelete:c,onMove:u,projectId:f,baseUrl:p}){const{ui:m}=Le();return n.jsxs("article",{className:`guided-flow-step ${l?`is-${l}`:""}`,children:[n.jsxs("header",{children:[n.jsx("span",{className:"guided-flow-step-number",children:a+1}),n.jsx("b",{children:m(s.type)}),l&&n.jsx("em",{children:m(l)}),n.jsxs("div",{className:"guided-flow-step-actions",children:[n.jsx("button",{type:"button",onClick:()=>u(a,-1),disabled:a===0,children:"↑"}),n.jsx("button",{type:"button",onClick:()=>u(a,1),children:"↓"}),n.jsx("button",{type:"button",onClick:c,children:m("Delete")})]})]}),n.jsx(bC,{step:s,onChange:o,projectId:f,baseUrl:p})]})}function bC({step:a,onChange:s,projectId:l,baseUrl:o}){const{ui:c}=Le();return a.type==="navigate"?n.jsxs("label",{children:[c("Path"),n.jsx("input",{className:"field",value:a.path,onChange:u=>s({...a,path:u.target.value})})]}):a.type==="click"||a.type==="fill"||a.type==="select"||a.type==="check"?n.jsxs(n.Fragment,{children:[n.jsx(jd,{target:a.target,projectId:l,baseUrl:o,onChange:u=>s({...a,target:u})}),a.type==="fill"&&n.jsxs("div",{className:"guided-flow-inline-fields",children:[n.jsxs("label",{children:[c("Value"),n.jsx("input",{className:"field",value:a.value??"",onChange:u=>s({...a,value:u.target.value,valueRef:void 0})})]}),n.jsxs("label",{children:[c("Value reference"),n.jsx("input",{className:"field",placeholder:"TEST_USERNAME",value:a.valueRef??"",onChange:u=>s({...a,valueRef:u.target.value||void 0,value:u.target.value?void 0:a.value})}),n.jsxs("small",{className:"guided-flow-field-help",children:[c("Use a Project Settings variable such as")," ",n.jsx("code",{children:"TEST_USERNAME"})," ",c("or")," ",n.jsx("code",{children:"TEST_PASSWORD"}),c(". Do not put real credentials in Value.")]})]})]}),a.type==="select"&&n.jsxs("label",{children:[c("Option"),n.jsx("input",{className:"field",value:a.option,onChange:u=>s({...a,option:u.target.value})})]}),a.type==="check"&&n.jsxs("label",{className:"guided-flow-check",children:[n.jsx("input",{type:"checkbox",checked:a.checked,onChange:u=>s({...a,checked:u.target.checked})})," ",c("Checked")]})]}):a.type==="wait"?n.jsxs("div",{className:"guided-flow-inline-fields",children:[n.jsxs("label",{children:[c("Wait type"),n.jsxs("select",{className:"field",value:a.mode,onChange:u=>s({...a,mode:u.target.value}),children:[n.jsx("option",{value:"timeout",children:c("Wait for timeout")}),n.jsx("option",{value:"url",children:c("Wait for URL")}),n.jsx("option",{value:"text",children:c("Wait for text")}),n.jsx("option",{value:"visible",children:c("Wait for element visible")})]})]}),n.jsxs("label",{children:[c("Value"),n.jsx("input",{className:"field",value:a.value,onChange:u=>s({...a,value:u.target.value})})]}),a.mode==="visible"&&n.jsx(jd,{target:a.target??Vr(),projectId:l,baseUrl:o,onChange:u=>s({...a,target:u})})]}):n.jsxs("div",{className:"guided-flow-inline-fields",children:[n.jsxs("label",{children:[c("Assertion"),n.jsxs("select",{className:"field",value:a.assertion.type,onChange:u=>s({...a,assertion:u.target.value==="visible"?{type:"visible",target:Vr()}:{type:u.target.value,value:""}}),children:[n.jsx("option",{value:"visible",children:c("Element visible")}),n.jsx("option",{value:"text",children:c("Text visible")}),n.jsx("option",{value:"url",children:c("URL contains")})]})]}),a.assertion.type==="visible"?n.jsx(jd,{target:a.assertion.target,projectId:l,baseUrl:o,onChange:u=>s({...a,assertion:{type:"visible",target:u}})}):n.jsxs("label",{children:[c("Expected value"),n.jsx("input",{className:"field",value:a.assertion.value,onChange:u=>s({...a,assertion:a.assertion.type==="text"?{type:"text",value:u.target.value}:{type:"url",value:u.target.value}})})]})]})}function jd({target:a,onChange:s,projectId:l,baseUrl:o}){const{ui:c}=Le(),[u,f]=L.useState(!1),p=a.strategy==="role"?a.name??"":a[a.strategy==="testid"?"testId":a.strategy==="css"?"cssSelector":a.strategy];return n.jsxs("div",{className:"guided-flow-target",children:[n.jsxs("div",{className:"guided-flow-picker-head",children:[n.jsx("span",{children:c("Target element")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!l||!o,onClick:()=>f(m=>!m),children:c("◎ Pick from page")})]}),u&&l&&o&&n.jsx("div",{className:"guided-flow-picker",children:n.jsx(Zy,{projectId:l,targetUrl:o,onSaveRecording:()=>{},onPickTarget:m=>{s({...Vr(),...m}),f(!1)}})}),n.jsxs("label",{children:[c("Locator"),n.jsxs("select",{className:"field",value:a.strategy,onChange:m=>s({strategy:m.target.value,value:""}),children:[n.jsx("option",{value:"role",children:c("Role")}),n.jsx("option",{value:"label",children:c("Label")}),n.jsx("option",{value:"placeholder",children:c("Placeholder")}),n.jsx("option",{value:"text",children:c("Text")}),n.jsx("option",{value:"testid",children:"Test ID"}),n.jsx("option",{value:"css",children:"CSS"})]}),n.jsx("small",{className:"guided-flow-field-help",children:xC(a.strategy)})]}),a.strategy==="role"&&n.jsxs("label",{children:[c("Role"),n.jsx("input",{className:"field",value:a.role??"",onChange:m=>s({...a,role:m.target.value})})]}),n.jsxs("label",{children:[a.strategy==="role"?c("Accessible name"):c("Value"),n.jsx("input",{className:"field",value:p??"",placeholder:hv(a.strategy),onChange:m=>s(jC(a,m.target.value))}),n.jsxs("small",{className:"guided-flow-field-help",children:[c("Example:")," ",n.jsx("code",{children:hv(a.strategy)})]})]})]})}function xC(a){return a==="css"?"Best for inputs/buttons with a stable id, name, or data attribute. Enter quotes without backslashes.":a==="role"?"Best for buttons, links, checkboxes, and controls with a clear accessible name.":a==="label"?"Use only when the input has a real HTML label. Useful for validation checks.":a==="placeholder"?"Use when the input has a stable placeholder attribute.":a==="testid"?"Best when the application provides a stable data-testid attribute.":"Use for visible text assertions or text-based controls when no stronger locator exists."}function hv(a){return a==="css"?'#username or input[name="email"]':a==="role"?"Submit":a==="label"?"Email":a==="placeholder"?"Search products":a==="testid"?"save-button":"Welcome back"}function jC(a,s){return a.strategy==="role"?{...a,name:s}:a.strategy==="testid"?{...a,testId:s}:a.strategy==="css"?{...a,cssSelector:s.replace(/\\(["'])/g,"$1")}:{...a,[a.strategy]:s}}function SC({result:a,testCaseCount:s,flows:l,baseUrl:o,projectId:c,secrets:u,onSaveFlows:f,onGenerateTestCase:p,onAddToFlow:m,onClose:g,onOpenCases:v}){const{ui:y,language:j}=Le(),[b,E]=L.useState("state-flow"),[N,A]=L.useState("auto-scout"),[w,S]=L.useState(),[O,D]=L.useState(),[M,F]=L.useState(1),X=a.actionGraph.states.find($=>$.id===w),Z=a.actionGraph.edges.find($=>$.id===O);return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:$=>$.target===$.currentTarget&&g(),children:n.jsxs("section",{className:"modern-modal explorer-flow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"flow-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:y("Website explorer")}),n.jsx("h2",{id:"flow-title",children:y("UI State Explorer")}),n.jsx("p",{title:a.origin,children:a.origin})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:g,"aria-label":y("Close explorer"),children:"×"})]}),n.jsxs("div",{className:"explorer-dialog-body",children:[n.jsxs("div",{className:"explorer-main-tabs",role:"tablist","aria-label":y("Explorer mode"),children:[n.jsx("button",{type:"button",className:N==="auto-scout"?"active":"",onClick:()=>A("auto-scout"),children:y("Auto Scout")}),n.jsx("button",{type:"button",className:N==="guided-flow"?"active":"",onClick:()=>A("guided-flow"),children:y("Guided Flow")})]}),N==="guided-flow"?n.jsx(mC,{flows:l,baseUrl:o,projectId:c,secrets:u,onSave:f,onGenerateTestCase:p}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"explorer-hero",children:[n.jsxs("div",{className:"explorer-number",children:[n.jsx("strong",{children:s}),n.jsx("span",{children:y("draft test cases")})]}),n.jsxs("div",{className:"explorer-number",children:[n.jsx("strong",{children:a.stats.pagesVisited}),n.jsx("span",{children:y("pages discovered")})]}),n.jsxs("div",{className:"explorer-number",children:[n.jsx("strong",{children:a.actionGraph.states.length}),n.jsx("span",{children:y("UI states observed")})]})]}),n.jsxs("div",{className:"explorer-view-tabs",role:"tablist","aria-label":y("Explorer view"),children:[n.jsx("button",{type:"button",className:b==="site-map"?"active":"",onClick:()=>E("site-map"),children:y("Site Map")}),n.jsxs("button",{type:"button",className:b==="state-flow"?"active":"",onClick:()=>E("state-flow"),children:[y("State Flow")," ",n.jsx("span",{children:a.actionGraph.edges.length})]})]}),a.actionGraph.states.length?b==="site-map"?n.jsx(wC,{result:a,onSelect:$=>{S($.id),E("state-flow")}}):n.jsxs("div",{className:"state-flow-layout",children:[n.jsx(NC,{states:a.actionGraph.states,edges:a.actionGraph.edges,selectedStateId:w,selectedEdgeId:O,zoom:M,onZoom:F,onState:$=>{S($),D(void 0)},onEdge:$=>{D($),S(void 0)}}),n.jsx(CC,{state:X,edge:Z,states:a.actionGraph.states,onAddToFlow:m})]}):n.jsxs("div",{className:"workspace-empty",children:[n.jsx(nt,{name:"map"}),n.jsx("strong",{children:j==="th"?"ยังไม่มีข้อมูลแผนผัง":"No exploration data yet"}),n.jsx("p",{children:j==="th"?"สำรวจเว็บไซต์จากหน้าภาพรวมเพื่อดูหน้าที่พบและเส้นทางระหว่างหน้า":"Scout the website from Overview to map its pages and the paths between them."})]})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsxs("span",{className:"flow-safety",children:[a.actionGraph.blockedActionKeys.length," ",y("unsafe actions blocked")]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:y("Close")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:v,children:y("Review Test Cases")})]})]})})}function wC({result:a,onSelect:s}){const{ui:l}=Le(),o=L.useMemo(()=>{const c=new Map;for(const u of a.actionGraph.states){const f=c.get(u.url)??[];f.push(u),c.set(u.url,f)}return[...c.entries()]},[a.actionGraph.states]);return n.jsx("div",{className:"site-map-list",children:o.map(([c,u])=>n.jsxs("section",{children:[n.jsx("h3",{children:new URL(c).pathname||"/"}),n.jsx("small",{children:c}),u.map(f=>n.jsxs("button",{type:"button",onClick:()=>s(f),children:[n.jsx("i",{className:`state-type-${f.type}`})," ",n.jsx("span",{children:f.name||f.title||l("Observed state")}),n.jsx("em",{children:l(f.type)})]},f.id))]},c))})}function NC({states:a,edges:s,selectedStateId:l,selectedEdgeId:o,zoom:c,onZoom:u,onState:f,onEdge:p}){const{ui:m}=Le(),g=[...new Map(a.map(w=>[w.url,a.filter(S=>S.url===w.url)])).values()],v=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(g.length)))),y=Math.ceil(g.length/v),b=Math.max(1,...g.map(w=>w.length))*130+90,E=new Map;g.forEach((w,S)=>{const O=S%v,D=Math.floor(S/v);w.forEach((M,F)=>{E.set(M.id,{x:150+O*300,y:115+D*b+F*130})})});const N=v*300+80,A=Math.max(320,y*b+40);return n.jsxs("div",{className:"state-flow-canvas",children:[n.jsxs("div",{className:"flow-toolbar",children:[n.jsxs("span",{children:[a.length," ",m("states ·")," ",s.length," ",m("transitions")]}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>u(Math.max(.6,c-.15)),children:"−"}),n.jsx("button",{type:"button",onClick:()=>u(Math.min(1.4,c+.15)),children:"+"}),n.jsx("button",{type:"button",onClick:()=>u(1),children:m("Fit")})]})]}),n.jsx("div",{className:"flow-viewport",children:n.jsxs("svg",{width:N*c,height:A*c,viewBox:`0 0 ${N} ${A}`,"aria-label":m("UI state flow graph"),children:[n.jsx("defs",{children:n.jsx("marker",{id:"flow-arrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:n.jsx("path",{d:"M0,0 L8,4 L0,8 Z",fill:"#94a3b8"})})}),g.map((w,S)=>{const O=S%v,D=Math.floor(S/v),M=20+O*300,F=35+D*b;return n.jsxs("g",{className:"flow-page-group",children:[n.jsx("rect",{x:M,y:F,width:"260",height:b-20,rx:"14"}),n.jsx("text",{x:M+14,y:F+22,className:"flow-page-label",children:Sd(new URL(w[0].url).pathname||"/",30)})]},w[0].url)}),s.map(w=>{const S=E.get(w.fromStateId),O=w.toStateId?E.get(w.toStateId):void 0;if(!S||!O)return null;const D=w.id===o;return n.jsxs("g",{onClick:()=>p(w.id),className:"flow-edge",children:[n.jsx("path",{className:D?"selected":"",d:`M ${S.x} ${S.y+38} C ${S.x} ${S.y+95}, ${O.x} ${O.y-95}, ${O.x} ${O.y-38}`,markerEnd:"url(#flow-arrow)"}),n.jsx("title",{children:w.action.description})]},w.id)}),a.map(w=>{const S=E.get(w.id),O=w.id===l;return n.jsxs("g",{onClick:()=>f(w.id),className:"flow-node",children:[n.jsx("rect",{className:O?"selected":"",x:S.x-112,y:S.y-38,width:"224",height:"76",rx:"12"}),n.jsx("text",{x:S.x-94,y:S.y-11,className:"flow-node-type",children:m(w.type).toUpperCase()}),n.jsx("text",{x:S.x-94,y:S.y+12,className:"flow-node-name",children:Sd(w.name||w.title||w.url,27)}),n.jsx("text",{x:S.x-94,y:S.y+28,className:"flow-node-url",children:Sd(new URL(w.url).pathname||"/",31)}),n.jsx("title",{children:w.name||w.title||w.url})]},w.id)})]})})]})}function CC({state:a,edge:s,states:l,onAddToFlow:o}){const{ui:c}=Le();if(!a&&!s)return n.jsxs("aside",{className:"flow-inspector empty",children:[n.jsx("b",{children:c("Select a state or transition")}),n.jsx("span",{children:c("Click a node to view observed UI. Click a line to inspect the action that created it.")})]});if(s){const u=l.find(p=>p.id===s.fromStateId),f=l.find(p=>p.id===s.toStateId);return n.jsxs("aside",{className:"flow-inspector",children:[n.jsx("p",{className:"eyebrow",children:c("Transition detail")}),n.jsx("h3",{children:s.action.description}),n.jsxs("dl",{children:[n.jsx("dt",{children:c("Action type")}),n.jsx("dd",{children:c(s.action.type)}),n.jsx("dt",{children:c("Status")}),n.jsx("dd",{children:s.status}),n.jsx("dt",{children:c("Safety")}),n.jsx("dd",{children:s.action.safe?c("Safe action"):s.action.reason||c("Blocked")}),n.jsx("dt",{children:c("From")}),n.jsx("dd",{children:u?.name||u?.url}),n.jsx("dt",{children:c("To")}),n.jsx("dd",{children:f?.name||c("Not observed")}),s.action.locator&&n.jsxs(n.Fragment,{children:[n.jsx("dt",{children:c("Locator")}),n.jsxs("dd",{children:[s.action.locator.role,": ",s.action.locator.name]})]}),s.action.locator&&n.jsx("button",{type:"button",className:"btn btn-secondary mt-3",onClick:()=>o({id:crypto.randomUUID(),type:"click",target:TC(s.action.locator)}),children:c("Add to Guided Flow")})]})]})}return n.jsxs("aside",{className:"flow-inspector",children:[n.jsx("p",{className:"eyebrow",children:c("State detail")}),n.jsx("h3",{children:a.name||a.title||c("Observed state")}),n.jsxs("dl",{children:[n.jsx("dt",{children:c("Type")}),n.jsx("dd",{children:c(a.type)}),n.jsx("dt",{children:"URL"}),n.jsx("dd",{className:"break-all",children:a.url}),n.jsx("dt",{children:c("Fingerprint")}),n.jsxs("dd",{className:"font-mono",children:[a.fingerprint.slice(0,18),"…"]}),n.jsx("dt",{children:c("Discovered")}),n.jsx("dd",{children:a.discoveredAt?new Date(a.discoveredAt).toLocaleString():c("Previous scan")})]}),n.jsxs("section",{children:[n.jsx("b",{children:c("Observed UI")}),n.jsx("p",{children:a.headings.slice(0,3).join(" · ")||c("No headings recorded")}),n.jsx("p",{children:a.visibleDialogs.length?`Dialog: ${a.visibleDialogs.join(", ")}`:`${a.controls.length} controls observed`}),a.validationMessages?.length?n.jsxs("p",{children:[c("Validation:")," ",a.validationMessages.join(" · ")]}):null]})]})}function TC(a){return a.role?{strategy:"role",role:a.role,name:a.name??""}:a.label?{strategy:"label",label:a.label}:a.placeholder?{strategy:"placeholder",placeholder:a.placeholder}:a.testId?{strategy:"testid",testId:a.testId}:{strategy:"text",text:a.name??""}}function Sd(a,s){return a.length>s?`${a.slice(0,s-1)}…`:a}const pv=a=>a.join(`
59
- `),_C=a=>a.split(/[\n,]/).map(s=>s.trim());function EC({filter:a,onChange:s}){const{ui:l}=Le(),[o,c]=L.useState(()=>pv(a.keywords)),u=(f,p=a.enabled)=>{c(f),s({enabled:p,keywords:_C(f)})};return n.jsxs("div",{className:"settings-notice settings-notice-stacked click-filter-panel",children:[n.jsxs("b",{children:[l("Click safeguards")," ",a.enabled?l("ON"):l("OFF")]}),n.jsx("span",{children:l("Suggested destructive actions are blocked by default. Explorer skips them and an Automation run stops instead of clicking. Logout and sign-out actions remain available for QA testing.")}),n.jsxs("label",{className:"settings-toggle",children:[n.jsx("input",{type:"checkbox",checked:a.enabled,onChange:f=>s({...a,enabled:f.target.checked})}),n.jsx("span",{children:l("Block controls whose label contains one of these words")})]}),a.enabled&&n.jsxs(n.Fragment,{children:[n.jsx("textarea",{className:"click-filter-input",rows:5,value:o,onChange:f=>u(f.target.value),placeholder:`delete
58
+ Click · CSS · #submit`})]})]}),n.jsxs("div",{className:"guided-flow-guide-steps",children:[n.jsx("strong",{children:f("First time using Guided Flow?")}),n.jsxs("ol",{children:[n.jsx("li",{children:f("Open the target page in your browser and inspect the element you want to test.")}),n.jsxs("li",{children:[f("If it has an id, choose")," ",n.jsx("b",{children:"CSS"}),f(". If it is a named button, choose")," ",n.jsx("b",{children:f("Role")}),"."]}),n.jsxs("li",{children:[f("Enter only the selector value, for example")," ",n.jsx("code",{children:"#username"}),f(", not the whole HTML tag.")]}),n.jsxs("li",{children:[f("For usernames and passwords, leave Value empty and use")," ",n.jsx("b",{children:f("Value reference")}),"."]}),n.jsx("li",{children:f("Save the Flow, run it, then use the CLI error to adjust only the failing step.")})]})]}),n.jsxs("div",{className:"guided-flow-guide-decision",children:[n.jsx("b",{children:f("Not sure which locator to choose?")}),n.jsx("span",{children:f("id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child")})]})]}),n.jsxs("div",{className:"guided-flow-layout",children:[n.jsxs("aside",{className:"guided-flow-list",children:[n.jsxs("div",{className:"guided-flow-list-head",children:[n.jsx("b",{children:f("Guided Flows")}),n.jsx("span",{children:a.length})]}),a.map(I=>n.jsxs("button",{type:"button",className:I.id===g?.id?"is-active":"",onClick:()=>{m(I.id),v(I),O(void 0)},children:[n.jsx("strong",{children:I.name}),n.jsxs("small",{children:[I.steps.length," ",f("steps")]})]},I.id)),!a.length&&n.jsx("p",{className:"guided-flow-empty",children:f("Create a flow to define a deterministic path.")})]}),g?n.jsxs("main",{className:"guided-flow-editor",children:[n.jsxs("div",{className:"guided-flow-fields",children:[n.jsxs("label",{children:[f("Flow name"),n.jsx("input",{className:"field",value:g.name,onChange:I=>z({name:I.target.value})})]}),n.jsxs("label",{children:[f("Base URL"),n.jsx("input",{className:"field",value:g.baseUrl,onChange:I=>z({baseUrl:I.target.value})})]}),n.jsxs("label",{className:"guided-flow-wide",children:[f("Description"),n.jsx("textarea",{className:"field",rows:2,value:g.description??"",onChange:I=>z({description:I.target.value})})]})]}),n.jsxs("div",{className:"guided-flow-section-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:f("Flow Steps")}),n.jsx("span",{children:f("Execute only the steps defined here.")})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:W,children:f("Duplicate")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>Z("delete"),children:f("Delete")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Z("save"),disabled:b,children:f(b?"Saving…":"Save Flow")})]})]}),n.jsx("div",{className:"guided-flow-steps",children:g.steps.map((I,ee)=>n.jsx(bC,{index:ee,step:I,status:q.get(I.id),projectId:l,baseUrl:g.baseUrl||s,onChange:he=>H(ee,he),onDelete:()=>K(ee),onMove:V},I.id))}),n.jsxs("div",{className:"guided-flow-add",children:[n.jsx("select",{className:"field",value:y,onChange:I=>S(I.target.value),children:pC.map(I=>n.jsx("option",{value:I,children:f(I)},I))}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:T,children:f("+ Add Step")})]}),n.jsxs("div",{className:"guided-flow-actions",children:[n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!B||N,onClick:x,children:f(N?"Running…":"Run Flow")}),N&&n.jsx("button",{type:"button",className:"btn btn-danger",onClick:C,children:f("Stop")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>F({framework:"playwright",source:lN(g)}),children:f("Generate Playwright")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>F({framework:"cypress",source:dN(g)}),children:f("Generate Cypress")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>u(sN(g)),children:f("Generate Test Case")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!0,title:f("Record Flow is planned for a future release"),children:f("Record Flow · Planned")})]}),M&&n.jsxs("section",{className:"guided-flow-code",children:[n.jsxs("header",{children:[n.jsxs("b",{children:[M.framework==="playwright"?"Playwright":"Cypress"," ",f("generated source")]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>F(void 0),"aria-label":f("Close generated code"),children:"×"})]}),n.jsx("pre",{children:M.source})]}),R&&n.jsxs("section",{className:"guided-flow-run",children:[n.jsx("header",{children:n.jsxs("b",{children:[f("Run result:")," ",R.status]})}),n.jsx("div",{className:"guided-flow-log",children:R.logs.map((I,ee)=>n.jsx("code",{className:`cli-${I.level}`,children:I.message},`${I.timestamp}-${ee}`))})]})]}):n.jsxs("div",{className:"guided-flow-empty-state",children:[n.jsx("b",{children:f("No Guided Flow selected")}),n.jsx("span",{children:f("Define a path and LazyScout will follow it only.")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:J,children:f("Create Guided Flow")})]})]}),X&&g&&n.jsx(vC,{action:X,flowName:g.name,busy:b,onCancel:()=>Z(void 0),onConfirm:Y})]})}function vC({action:a,flowName:s,busy:l,onCancel:o,onConfirm:c}){const{ui:u}=Le(),f=a==="delete";return n.jsx("div",{className:"guided-flow-confirm-backdrop",role:"presentation",onMouseDown:o,children:n.jsxs("section",{className:"guided-flow-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"guided-flow-confirm-title",onMouseDown:p=>p.stopPropagation(),children:[n.jsx("span",{className:"guided-flow-confirm-icon"+(f?" is-delete":""),"aria-hidden":"true",children:f?"×":"✓"}),n.jsx("p",{className:"eyebrow",children:u(f?"Remove Guided Flow":"Save Guided Flow")}),n.jsx("h3",{id:"guided-flow-confirm-title",children:u(f?"Delete this Flow?":"Save your changes?")}),n.jsx("p",{children:f?'"'+s+'" will be removed from this local Project. This action cannot be undone.':'"'+s+'" will be saved to this local Project and will be ready to run.'}),n.jsxs("footer",{children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,disabled:l,children:u("Cancel")}),n.jsx("button",{type:"button",className:"btn "+(f?"btn-danger":"btn-primary"),onClick:c,disabled:l,children:u(l?"Saving…":f?"Delete Flow":"Save Flow")})]})]})})}function Vr(){return{strategy:"role",role:"button",name:"Button"}}function yC(a){const s=crypto.randomUUID();return a==="navigate"?{id:s,type:a,path:"/"}:a==="click"?{id:s,type:a,target:Vr()}:a==="fill"?{id:s,type:a,target:{...Vr(),role:"textbox"},value:""}:a==="select"?{id:s,type:a,target:{...Vr(),role:"combobox"},option:""}:a==="check"?{id:s,type:a,target:{...Vr(),role:"checkbox"},checked:!0}:a==="wait"?{id:s,type:a,mode:"timeout",value:"750"}:{id:s,type:a,assertion:{type:"text",value:""}}}function bC({index:a,step:s,status:l,onChange:o,onDelete:c,onMove:u,projectId:f,baseUrl:p}){const{ui:m}=Le();return n.jsxs("article",{className:`guided-flow-step ${l?`is-${l}`:""}`,children:[n.jsxs("header",{children:[n.jsx("span",{className:"guided-flow-step-number",children:a+1}),n.jsx("b",{children:m(s.type)}),l&&n.jsx("em",{children:m(l)}),n.jsxs("div",{className:"guided-flow-step-actions",children:[n.jsx("button",{type:"button",onClick:()=>u(a,-1),disabled:a===0,children:"↑"}),n.jsx("button",{type:"button",onClick:()=>u(a,1),children:"↓"}),n.jsx("button",{type:"button",onClick:c,children:m("Delete")})]})]}),n.jsx(xC,{step:s,onChange:o,projectId:f,baseUrl:p})]})}function xC({step:a,onChange:s,projectId:l,baseUrl:o}){const{ui:c}=Le();return a.type==="navigate"?n.jsxs("label",{children:[c("Path"),n.jsx("input",{className:"field",value:a.path,onChange:u=>s({...a,path:u.target.value})})]}):a.type==="click"||a.type==="fill"||a.type==="select"||a.type==="check"?n.jsxs(n.Fragment,{children:[n.jsx(Sd,{target:a.target,projectId:l,baseUrl:o,onChange:u=>s({...a,target:u})}),a.type==="fill"&&n.jsxs("div",{className:"guided-flow-inline-fields",children:[n.jsxs("label",{children:[c("Value"),n.jsx("input",{className:"field",value:a.value??"",onChange:u=>s({...a,value:u.target.value,valueRef:void 0})})]}),n.jsxs("label",{children:[c("Value reference"),n.jsx("input",{className:"field",placeholder:"TEST_USERNAME",value:a.valueRef??"",onChange:u=>s({...a,valueRef:u.target.value||void 0,value:u.target.value?void 0:a.value})}),n.jsxs("small",{className:"guided-flow-field-help",children:[c("Use a Project Settings variable such as")," ",n.jsx("code",{children:"TEST_USERNAME"})," ",c("or")," ",n.jsx("code",{children:"TEST_PASSWORD"}),c(". Do not put real credentials in Value.")]})]})]}),a.type==="select"&&n.jsxs("label",{children:[c("Option"),n.jsx("input",{className:"field",value:a.option,onChange:u=>s({...a,option:u.target.value})})]}),a.type==="check"&&n.jsxs("label",{className:"guided-flow-check",children:[n.jsx("input",{type:"checkbox",checked:a.checked,onChange:u=>s({...a,checked:u.target.checked})})," ",c("Checked")]})]}):a.type==="wait"?n.jsxs("div",{className:"guided-flow-inline-fields",children:[n.jsxs("label",{children:[c("Wait type"),n.jsxs("select",{className:"field",value:a.mode,onChange:u=>s({...a,mode:u.target.value}),children:[n.jsx("option",{value:"timeout",children:c("Wait for timeout")}),n.jsx("option",{value:"url",children:c("Wait for URL")}),n.jsx("option",{value:"text",children:c("Wait for text")}),n.jsx("option",{value:"visible",children:c("Wait for element visible")})]})]}),n.jsxs("label",{children:[c("Value"),n.jsx("input",{className:"field",value:a.value,onChange:u=>s({...a,value:u.target.value})})]}),a.mode==="visible"&&n.jsx(Sd,{target:a.target??Vr(),projectId:l,baseUrl:o,onChange:u=>s({...a,target:u})})]}):n.jsxs("div",{className:"guided-flow-inline-fields",children:[n.jsxs("label",{children:[c("Assertion"),n.jsxs("select",{className:"field",value:a.assertion.type,onChange:u=>s({...a,assertion:u.target.value==="visible"?{type:"visible",target:Vr()}:{type:u.target.value,value:""}}),children:[n.jsx("option",{value:"visible",children:c("Element visible")}),n.jsx("option",{value:"text",children:c("Text visible")}),n.jsx("option",{value:"url",children:c("URL contains")})]})]}),a.assertion.type==="visible"?n.jsx(Sd,{target:a.assertion.target,projectId:l,baseUrl:o,onChange:u=>s({...a,assertion:{type:"visible",target:u}})}):n.jsxs("label",{children:[c("Expected value"),n.jsx("input",{className:"field",value:a.assertion.value,onChange:u=>s({...a,assertion:a.assertion.type==="text"?{type:"text",value:u.target.value}:{type:"url",value:u.target.value}})})]})]})}function Sd({target:a,onChange:s,projectId:l,baseUrl:o}){const{ui:c}=Le(),[u,f]=L.useState(!1),p=a.strategy==="role"?a.name??"":a[a.strategy==="testid"?"testId":a.strategy==="css"?"cssSelector":a.strategy];return n.jsxs("div",{className:"guided-flow-target",children:[n.jsxs("div",{className:"guided-flow-picker-head",children:[n.jsx("span",{children:c("Target element")}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!l||!o,onClick:()=>f(m=>!m),children:c("◎ Pick from page")})]}),u&&l&&o&&n.jsx("div",{className:"guided-flow-picker",children:n.jsx(Ky,{projectId:l,targetUrl:o,onSaveRecording:()=>{},onPickTarget:m=>{s({...Vr(),...m}),f(!1)}})}),n.jsxs("label",{children:[c("Locator"),n.jsxs("select",{className:"field",value:a.strategy,onChange:m=>s({strategy:m.target.value,value:""}),children:[n.jsx("option",{value:"role",children:c("Role")}),n.jsx("option",{value:"label",children:c("Label")}),n.jsx("option",{value:"placeholder",children:c("Placeholder")}),n.jsx("option",{value:"text",children:c("Text")}),n.jsx("option",{value:"testid",children:"Test ID"}),n.jsx("option",{value:"css",children:"CSS"})]}),n.jsx("small",{className:"guided-flow-field-help",children:jC(a.strategy)})]}),a.strategy==="role"&&n.jsxs("label",{children:[c("Role"),n.jsx("input",{className:"field",value:a.role??"",onChange:m=>s({...a,role:m.target.value})})]}),n.jsxs("label",{children:[a.strategy==="role"?c("Accessible name"):c("Value"),n.jsx("input",{className:"field",value:p??"",placeholder:hv(a.strategy),onChange:m=>s(SC(a,m.target.value))}),n.jsxs("small",{className:"guided-flow-field-help",children:[c("Example:")," ",n.jsx("code",{children:hv(a.strategy)})]})]})]})}function jC(a){return a==="css"?"Best for inputs/buttons with a stable id, name, or data attribute. Enter quotes without backslashes.":a==="role"?"Best for buttons, links, checkboxes, and controls with a clear accessible name.":a==="label"?"Use only when the input has a real HTML label. Useful for validation checks.":a==="placeholder"?"Use when the input has a stable placeholder attribute.":a==="testid"?"Best when the application provides a stable data-testid attribute.":"Use for visible text assertions or text-based controls when no stronger locator exists."}function hv(a){return a==="css"?'#username or input[name="email"]':a==="role"?"Submit":a==="label"?"Email":a==="placeholder"?"Search products":a==="testid"?"save-button":"Welcome back"}function SC(a,s){return a.strategy==="role"?{...a,name:s}:a.strategy==="testid"?{...a,testId:s}:a.strategy==="css"?{...a,cssSelector:s.replace(/\\(["'])/g,"$1")}:{...a,[a.strategy]:s}}function wC({result:a,testCaseCount:s,flows:l,baseUrl:o,projectId:c,secrets:u,onSaveFlows:f,onGenerateTestCase:p,onAddToFlow:m,onClose:g,onOpenCases:v}){const{ui:y,language:S}=Le(),[b,E]=L.useState("state-flow"),[N,A]=L.useState("auto-scout"),[w,j]=L.useState(),[R,O]=L.useState(),[M,F]=L.useState(1),X=a.actionGraph.states.find($=>$.id===w),Z=a.actionGraph.edges.find($=>$.id===R);return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:$=>$.target===$.currentTarget&&g(),children:n.jsxs("section",{className:"modern-modal explorer-flow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"flow-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:y("Website explorer")}),n.jsx("h2",{id:"flow-title",children:y("UI State Explorer")}),n.jsx("p",{title:a.origin,children:a.origin})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:g,"aria-label":y("Close explorer"),children:"×"})]}),n.jsxs("div",{className:"explorer-dialog-body",children:[n.jsxs("div",{className:"explorer-main-tabs",role:"tablist","aria-label":y("Explorer mode"),children:[n.jsx("button",{type:"button",className:N==="auto-scout"?"active":"",onClick:()=>A("auto-scout"),children:y("Auto Scout")}),n.jsx("button",{type:"button",className:N==="guided-flow"?"active":"",onClick:()=>A("guided-flow"),children:y("Guided Flow")})]}),N==="guided-flow"?n.jsx(gC,{flows:l,baseUrl:o,projectId:c,secrets:u,onSave:f,onGenerateTestCase:p}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"explorer-hero",children:[n.jsxs("div",{className:"explorer-number",children:[n.jsx("strong",{children:s}),n.jsx("span",{children:y("draft test cases")})]}),n.jsxs("div",{className:"explorer-number",children:[n.jsx("strong",{children:a.stats.pagesVisited}),n.jsx("span",{children:y("pages discovered")})]}),n.jsxs("div",{className:"explorer-number",children:[n.jsx("strong",{children:a.actionGraph.states.length}),n.jsx("span",{children:y("UI states observed")})]})]}),n.jsxs("div",{className:"explorer-view-tabs",role:"tablist","aria-label":y("Explorer view"),children:[n.jsx("button",{type:"button",className:b==="site-map"?"active":"",onClick:()=>E("site-map"),children:y("Site Map")}),n.jsxs("button",{type:"button",className:b==="state-flow"?"active":"",onClick:()=>E("state-flow"),children:[y("State Flow")," ",n.jsx("span",{children:a.actionGraph.edges.length})]})]}),a.actionGraph.states.length?b==="site-map"?n.jsx(NC,{result:a,onSelect:$=>{j($.id),E("state-flow")}}):n.jsxs("div",{className:"state-flow-layout",children:[n.jsx(CC,{states:a.actionGraph.states,edges:a.actionGraph.edges,selectedStateId:w,selectedEdgeId:R,zoom:M,onZoom:F,onState:$=>{j($),O(void 0)},onEdge:$=>{O($),j(void 0)}}),n.jsx(TC,{state:X,edge:Z,states:a.actionGraph.states,onAddToFlow:m})]}):n.jsxs("div",{className:"workspace-empty",children:[n.jsx(Qe,{name:"map"}),n.jsx("strong",{children:S==="th"?"ยังไม่มีข้อมูลแผนผัง":"No exploration data yet"}),n.jsx("p",{children:S==="th"?"สำรวจเว็บไซต์จากหน้าภาพรวมเพื่อดูหน้าที่พบและเส้นทางระหว่างหน้า":"Scout the website from Overview to map its pages and the paths between them."})]})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsxs("span",{className:"flow-safety",children:[a.actionGraph.blockedActionKeys.length," ",y("unsafe actions blocked")]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:y("Close")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:v,children:y("Review Test Cases")})]})]})})}function NC({result:a,onSelect:s}){const{ui:l}=Le(),o=L.useMemo(()=>{const c=new Map;for(const u of a.actionGraph.states){const f=c.get(u.url)??[];f.push(u),c.set(u.url,f)}return[...c.entries()]},[a.actionGraph.states]);return n.jsx("div",{className:"site-map-list",children:o.map(([c,u])=>n.jsxs("section",{children:[n.jsx("h3",{children:new URL(c).pathname||"/"}),n.jsx("small",{children:c}),u.map(f=>n.jsxs("button",{type:"button",onClick:()=>s(f),children:[n.jsx("i",{className:`state-type-${f.type}`})," ",n.jsx("span",{children:f.name||f.title||l("Observed state")}),n.jsx("em",{children:l(f.type)})]},f.id))]},c))})}function CC({states:a,edges:s,selectedStateId:l,selectedEdgeId:o,zoom:c,onZoom:u,onState:f,onEdge:p}){const{ui:m}=Le(),g=[...new Map(a.map(w=>[w.url,a.filter(j=>j.url===w.url)])).values()],v=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(g.length)))),y=Math.ceil(g.length/v),b=Math.max(1,...g.map(w=>w.length))*130+90,E=new Map;g.forEach((w,j)=>{const R=j%v,O=Math.floor(j/v);w.forEach((M,F)=>{E.set(M.id,{x:150+R*300,y:115+O*b+F*130})})});const N=v*300+80,A=Math.max(320,y*b+40);return n.jsxs("div",{className:"state-flow-canvas",children:[n.jsxs("div",{className:"flow-toolbar",children:[n.jsxs("span",{children:[a.length," ",m("states ·")," ",s.length," ",m("transitions")]}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>u(Math.max(.6,c-.15)),children:"−"}),n.jsx("button",{type:"button",onClick:()=>u(Math.min(1.4,c+.15)),children:"+"}),n.jsx("button",{type:"button",onClick:()=>u(1),children:m("Fit")})]})]}),n.jsx("div",{className:"flow-viewport",children:n.jsxs("svg",{width:N*c,height:A*c,viewBox:`0 0 ${N} ${A}`,"aria-label":m("UI state flow graph"),children:[n.jsx("defs",{children:n.jsx("marker",{id:"flow-arrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:n.jsx("path",{d:"M0,0 L8,4 L0,8 Z",fill:"#94a3b8"})})}),g.map((w,j)=>{const R=j%v,O=Math.floor(j/v),M=20+R*300,F=35+O*b;return n.jsxs("g",{className:"flow-page-group",children:[n.jsx("rect",{x:M,y:F,width:"260",height:b-20,rx:"14"}),n.jsx("text",{x:M+14,y:F+22,className:"flow-page-label",children:wd(new URL(w[0].url).pathname||"/",30)})]},w[0].url)}),s.map(w=>{const j=E.get(w.fromStateId),R=w.toStateId?E.get(w.toStateId):void 0;if(!j||!R)return null;const O=w.id===o;return n.jsxs("g",{onClick:()=>p(w.id),className:"flow-edge",children:[n.jsx("path",{className:O?"selected":"",d:`M ${j.x} ${j.y+38} C ${j.x} ${j.y+95}, ${R.x} ${R.y-95}, ${R.x} ${R.y-38}`,markerEnd:"url(#flow-arrow)"}),n.jsx("title",{children:w.action.description})]},w.id)}),a.map(w=>{const j=E.get(w.id),R=w.id===l;return n.jsxs("g",{onClick:()=>f(w.id),className:"flow-node",children:[n.jsx("rect",{className:R?"selected":"",x:j.x-112,y:j.y-38,width:"224",height:"76",rx:"12"}),n.jsx("text",{x:j.x-94,y:j.y-11,className:"flow-node-type",children:m(w.type).toUpperCase()}),n.jsx("text",{x:j.x-94,y:j.y+12,className:"flow-node-name",children:wd(w.name||w.title||w.url,27)}),n.jsx("text",{x:j.x-94,y:j.y+28,className:"flow-node-url",children:wd(new URL(w.url).pathname||"/",31)}),n.jsx("title",{children:w.name||w.title||w.url})]},w.id)})]})})]})}function TC({state:a,edge:s,states:l,onAddToFlow:o}){const{ui:c}=Le();if(!a&&!s)return n.jsxs("aside",{className:"flow-inspector empty",children:[n.jsx("b",{children:c("Select a state or transition")}),n.jsx("span",{children:c("Click a node to view observed UI. Click a line to inspect the action that created it.")})]});if(s){const u=l.find(p=>p.id===s.fromStateId),f=l.find(p=>p.id===s.toStateId);return n.jsxs("aside",{className:"flow-inspector",children:[n.jsx("p",{className:"eyebrow",children:c("Transition detail")}),n.jsx("h3",{children:s.action.description}),n.jsxs("dl",{children:[n.jsx("dt",{children:c("Action type")}),n.jsx("dd",{children:c(s.action.type)}),n.jsx("dt",{children:c("Status")}),n.jsx("dd",{children:s.status}),n.jsx("dt",{children:c("Safety")}),n.jsx("dd",{children:s.action.safe?c("Safe action"):s.action.reason||c("Blocked")}),n.jsx("dt",{children:c("From")}),n.jsx("dd",{children:u?.name||u?.url}),n.jsx("dt",{children:c("To")}),n.jsx("dd",{children:f?.name||c("Not observed")}),s.action.locator&&n.jsxs(n.Fragment,{children:[n.jsx("dt",{children:c("Locator")}),n.jsxs("dd",{children:[s.action.locator.role,": ",s.action.locator.name]})]}),s.action.locator&&n.jsx("button",{type:"button",className:"btn btn-secondary mt-3",onClick:()=>o({id:crypto.randomUUID(),type:"click",target:_C(s.action.locator)}),children:c("Add to Guided Flow")})]})]})}return n.jsxs("aside",{className:"flow-inspector",children:[n.jsx("p",{className:"eyebrow",children:c("State detail")}),n.jsx("h3",{children:a.name||a.title||c("Observed state")}),n.jsxs("dl",{children:[n.jsx("dt",{children:c("Type")}),n.jsx("dd",{children:c(a.type)}),n.jsx("dt",{children:"URL"}),n.jsx("dd",{className:"break-all",children:a.url}),n.jsx("dt",{children:c("Fingerprint")}),n.jsxs("dd",{className:"font-mono",children:[a.fingerprint.slice(0,18),"…"]}),n.jsx("dt",{children:c("Discovered")}),n.jsx("dd",{children:a.discoveredAt?new Date(a.discoveredAt).toLocaleString():c("Previous scan")})]}),n.jsxs("section",{children:[n.jsx("b",{children:c("Observed UI")}),n.jsx("p",{children:a.headings.slice(0,3).join(" · ")||c("No headings recorded")}),n.jsx("p",{children:a.visibleDialogs.length?`Dialog: ${a.visibleDialogs.join(", ")}`:`${a.controls.length} controls observed`}),a.validationMessages?.length?n.jsxs("p",{children:[c("Validation:")," ",a.validationMessages.join(" · ")]}):null]})]})}function _C(a){return a.role?{strategy:"role",role:a.role,name:a.name??""}:a.label?{strategy:"label",label:a.label}:a.placeholder?{strategy:"placeholder",placeholder:a.placeholder}:a.testId?{strategy:"testid",testId:a.testId}:{strategy:"text",text:a.name??""}}function wd(a,s){return a.length>s?`${a.slice(0,s-1)}…`:a}const pv=a=>a.join(`
59
+ `),EC=a=>a.split(/[\n,]/).map(s=>s.trim());function kC({filter:a,onChange:s}){const{ui:l}=Le(),[o,c]=L.useState(()=>pv(a.keywords)),u=(f,p=a.enabled)=>{c(f),s({enabled:p,keywords:EC(f)})};return n.jsxs("div",{className:"settings-notice settings-notice-stacked click-filter-panel",children:[n.jsxs("b",{children:[l("Click safeguards")," ",a.enabled?l("ON"):l("OFF")]}),n.jsx("span",{children:l("Suggested destructive actions are blocked by default. Explorer skips them and an Automation run stops instead of clicking. Logout and sign-out actions remain available for QA testing.")}),n.jsxs("label",{className:"settings-toggle",children:[n.jsx("input",{type:"checkbox",checked:a.enabled,onChange:f=>s({...a,enabled:f.target.checked})}),n.jsx("span",{children:l("Block controls whose label contains one of these words")})]}),a.enabled&&n.jsxs(n.Fragment,{children:[n.jsx("textarea",{className:"click-filter-input",rows:5,value:o,onChange:f=>u(f.target.value),placeholder:`delete
60
60
  pay now
61
- transfer`}),n.jsx("p",{className:"click-filter-help",children:l("One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control.")}),n.jsxs("div",{className:"recorder-actions",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(pv([...new Set([...a.keywords,...Ry])])),children:l("Add suggested words")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(""),children:l("Clear list")})]})]})]})}const kC={"not-configured":["No session saved","ยังไม่มีเซสชัน"],recorded:["Session saved — not verified yet","บันทึกแล้ว — ยังไม่ได้ตรวจสอบ"],verifying:["Checking…","กำลังตรวจสอบ…"],ready:["Ready — a protected page opened","พร้อมใช้ — เปิดหน้าที่ต้องล็อกอินได้"],expired:["Expired — sign in again","หมดอายุ — ต้องเข้าสู่ระบบใหม่"],invalid:["Unusable — record the login again","ใช้ไม่ได้ — บันทึกการเข้าสู่ระบบใหม่"]};function wo(a){return a instanceof Error?a.message:String(a)}function AC({projectName:a,projectId:s,targetUrl:l,secrets:o,onSave:c,onClear:u,onClose:f,onSaveRecording:p,clickFilter:m,onChangeClickFilter:g,initialTab:v="credentials"}){const{ui:y,language:j}=Le(),b=j==="th",[E,N]=L.useState(v),[A,w]=L.useState(o),[S,O]=L.useState(),[D,M]=L.useState(!1),[F,X]=L.useState(!1),[Z,$]=L.useState(!1),[B,J]=L.useState(!1),[z,H]=L.useState(!1),[T,K]=L.useState(!1),[V,Q]=L.useState(),[W,R]=L.useState(""),[Y,x]=L.useState(!1),C=(ye,Fe)=>w(Ue=>({...Ue,[ye]:Fe||void 0})),q=S?.status??"not-configured",I=S?.loginBrowserOpen??T,ee=F||Z||B,he=q!=="not-configured",_e=!he||q==="expired"||q==="invalid",Ne=JSON.stringify(A)!==JSON.stringify(o),le=S?.detail??(S?.verifiedAt?`${b?"ตรวจล่าสุด":"Last verified"} ${new Date(S.verifiedAt).toLocaleString()}${S.verifiedPath?` · ${S.verifiedPath}`:""}`:S?.capturedAt?`${b?"บันทึกเมื่อ":"Captured"} ${new Date(S.capturedAt).toLocaleString()}`:b?"ยังไม่ได้บันทึกเซสชัน สำหรับโปรเจกต์นี้":"No session has been recorded for this Project yet.");async function Ce(){if(s){M(!0);try{O(await E0(s))}catch{O(void 0)}finally{M(!1)}}}return L.useEffect(()=>{Ce()},[s]),n.jsx("div",{className:"modal-backdrop",role:"presentation",onMouseDown:ye=>{ye.target===ye.currentTarget&&f()},children:n.jsxs("section",{className:"modal-card project-settings-modal",role:"dialog","aria-modal":"true","aria-labelledby":"project-settings-title",children:[n.jsxs("div",{className:"modal-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:b?"ตั้งค่าโปรเจกต์":"Project settings"}),n.jsx("h2",{id:"project-settings-title",children:E==="credentials"?b?"ข้อมูลสำหรับทดสอบ":"Test credentials":E==="session"?"Browser session":E==="safety"?b?"กฎความปลอดภัย":"Safety rules":b?"บันทึกขั้นตอน":"Record a flow"}),n.jsxs("p",{className:"settings-project-context",title:a,children:[a??(b?"โปรเจกต์ปัจจุบัน":"Current project")," ·"," ",b?"ตั้งค่าทีละหมวด":"Configure one task at a time"]})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":y("Close"),children:"×"})]}),n.jsxs("div",{className:"modal-body",children:[n.jsx("nav",{className:"settings-tabs","aria-label":y("Project settings sections"),children:[["credentials",b?"ข้อมูลทดสอบ":"Credentials",b?"ตัวแปรสำหรับเข้าสู่ระบบและเรียก API":"Variables used by login and API steps"],["session",b?"เซสชันเบราว์เซอร์":"Browser Session",b?"Google, SSO และ Cookie ที่บันทึกไว้":"Google, SSO, and saved cookies"],["safety",b?"ความปลอดภัย":"Safety",b?"ป้องกันการคลิกที่มีความเสี่ยง":"Block risky clicks and actions"],["recorder",b?"บันทึกขั้นตอน":"Recorder",b?"เก็บการคลิกและการพิมพ์เป็นขั้นตอนทดสอบ":"Turn your browser actions into Test Steps"]].map(([ye,Fe,Ue])=>n.jsx("button",{type:"button",title:Ue,"aria-label":`${Fe} — ${Ue}`,className:E===ye?"is-active":"","aria-pressed":E===ye,onClick:()=>N(ye),children:n.jsx("b",{children:Fe})},ye))}),E==="credentials"&&n.jsxs("div",{className:"settings-section",children:[n.jsxs("div",{className:"settings-notice",children:[n.jsx("b",{children:b?"เก็บในหน่วยความจำเท่านั้น":"Memory only"}),n.jsx("span",{children:b?"ข้อมูลจะอยู่ในแท็บนี้เท่านั้น ถูกล้างเมื่อ Refresh และไม่ถูกเขียนลง Test Case หรือ Log":"Values stay in this browser tab, are cleared on refresh and are never written to Test Cases or logs."})]}),n.jsxs("div",{className:"settings-grid",children:[n.jsxs("label",{children:[n.jsx("span",{children:y("Email")}),n.jsx("input",{type:"email",value:A.email??"",onChange:ye=>C("email",ye.target.value),placeholder:y("Test email"),autoComplete:"off"})]}),n.jsxs("label",{children:[n.jsx("span",{children:y("Username")}),n.jsx("input",{value:A.username??"",onChange:ye=>C("username",ye.target.value),placeholder:y("Test username"),autoComplete:"off"})]}),n.jsxs("label",{children:[n.jsx("span",{children:y("Password")}),n.jsx("input",{type:"password",value:A.password??"",onChange:ye=>C("password",ye.target.value),placeholder:y("Test password"),autoComplete:"off"})]}),n.jsxs("label",{children:[n.jsx("span",{children:y("API Token")}),n.jsx("input",{type:"password",value:A.apiToken??"",onChange:ye=>C("apiToken",ye.target.value),placeholder:y("API token"),autoComplete:"off"})]})]}),n.jsxs("p",{className:"settings-help",children:[y("Use")," ",n.jsx("code",{children:"{{TEST_PASSWORD}}"}),", ",n.jsx("code",{children:"{{TEST_EMAIL}}"}),","," ",n.jsx("code",{children:"{{TEST_USERNAME}}"})," ",y("or")," ",n.jsx("code",{children:"{{API_TOKEN}}"})," ",y("in a Test Case. Values are passed to the runner only while it runs.")]}),n.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[n.jsx("b",{children:b?"วิธีใช้ข้อมูลทดสอบกับ Guided Flow":"How to connect credentials to Guided Flow"}),n.jsxs("span",{children:[b?"ในขั้นตอน Fill ให้เว้น Value ว่าง แล้วใส่ ":"In a Fill step, leave Value empty and put ",n.jsx("code",{children:"TEST_USERNAME"}),", ",n.jsx("code",{children:"TEST_PASSWORD"}),", ",b?"หรือ":"or"," ",n.jsx("code",{children:"TEST_EMAIL"})," ",b?"ใน Value reference โดย LazyScout จะแทนค่าตอนรันเท่านั้น":"in Value reference. LazyScout replaces the reference only during the run."]})]})]}),E==="session"&&s&&l&&n.jsxs("div",{className:"auth-panel",children:[n.jsxs("div",{className:`auth-state auth-state-${q}`,"aria-live":"polite",children:[n.jsx("span",{className:"auth-state-dot"}),n.jsxs("div",{children:[n.jsx("b",{children:kC[q][b?1:0]}),n.jsx("small",{children:le})]}),n.jsx("span",{className:"auth-state-badge",children:q})]}),_e&&!I&&n.jsxs("ol",{className:"auth-steps",children:[n.jsx("li",{children:b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ แล้วเข้าสู่ระบบ":"Open the login browser and sign in"}),n.jsx("li",{children:b?"กดบันทึกเซสชัน":"Capture the session"}),n.jsx("li",{children:b?"ตรวจสอบเซสชันกับหน้าที่ต้องเข้าสู่ระบบ":"Verify against a page that requires a login"})]}),I&&n.jsx("p",{className:"settings-help",role:"status",children:b?"เข้าสู่ระบบในหน้าต่างเบราว์เซอร์ที่เปิดแยกไว้ แล้วกลับมากดบันทึกเซสชัน โดยเปิดหน้าต่างนั้นค้างไว้":"Sign in in the separate browser window. Leave it open and return here to click Capture session."}),q==="recorded"&&!I&&n.jsx("p",{className:"settings-help",children:b?"บันทึกเซสชัน แล้ว ใส่ path ของหน้าที่ต้องล็อกอิน แล้วกดตรวจสอบ":"The session is saved. Enter a path that requires login, then click Verify."}),he&&n.jsxs("dl",{className:"auth-session-facts",children:[n.jsxs("div",{children:[n.jsx("dt",{children:b?"Cookie":"Cookies"}),n.jsxs("dd",{children:[S?.cookieCount??0,S?.sessionCookieCount?` (${S.sessionCookieCount} session)`:""]})]}),n.jsxs("div",{children:[n.jsx("dt",{children:b?"Origin":"Origins"}),n.jsx("dd",{children:S?.originCount??0})]}),n.jsxs("div",{children:[n.jsx("dt",{children:"sessionStorage"}),n.jsx("dd",{children:S?.sessionStorageOriginCount??0})]}),n.jsxs("div",{children:[n.jsx("dt",{children:"IndexedDB"}),n.jsx("dd",{children:S?.indexedDb?b?"รวม":"included":b?"ไม่รองรับ":"unsupported"})]})]}),S?.browserModeMismatch&&n.jsx("p",{className:"auth-warn",children:b?"Session ถูกบันทึกคนละโหมดเบราว์เซอร์กับที่ใช้รัน บางเว็บจะปฏิเสธ":"Captured in a different browser mode from the one runs use. Some applications reject that."}),S?.lockedBy&&n.jsx("p",{className:"auth-warn",children:b?`กำลังถูกใช้โดย ${S.lockedBy} — รันพร้อมกันสองตัวจะทำให้ session หลุด`:`Held by ${S.lockedBy}. Running two at once on one session signs both out.`}),n.jsxs("div",{className:"auth-session-actions",children:[n.jsx("button",{type:"button",className:_e&&!I?"btn btn-primary":"btn btn-secondary",disabled:F||ee,onClick:async()=>{X(!0),Q(void 0);try{await _0(s,l),K(!0),await Ce()}catch(ye){Q(wo(ye))}finally{X(!1)}},children:F?b?"กำลังเปิด…":"Opening…":b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ":"Open login browser"}),n.jsx("button",{type:"button",className:I?"btn btn-primary":"btn btn-secondary",disabled:!I||ee,title:I?void 0:b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ และเข้าสู่ระบบก่อน":"Open the login browser and sign in first",onClick:async()=>{$(!0),Q(void 0);try{O(await k0(s)),K(!1)}catch(ye){Q(wo(ye))}finally{$(!1)}},children:Z?b?"กำลังบันทึก…":"Capturing…":b?"บันทึกเซสชัน":"Capture session"}),I&&n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:Z,onClick:async()=>{Q(void 0);try{await A0(s),K(!1),await Ce()}catch(ye){Q(wo(ye))}},children:b?"ยกเลิกการเข้าสู่ระบบ":"Cancel sign-in"})]}),n.jsxs("label",{className:"auth-verify-row",children:[n.jsx("span",{children:b?"หน้าที่ต้องล็อกอิน (เช่น /dashboard)":"A path that requires a login (e.g. /dashboard)"}),n.jsxs("div",{children:[n.jsx("input",{value:W,onChange:ye=>R(ye.target.value),placeholder:"/dashboard",autoComplete:"off"}),n.jsx("button",{type:"button",className:q==="recorded"&&!I?"btn btn-primary":"btn btn-secondary",disabled:ee||I||!he||!W.trim(),title:I?b?"บันทึกเซสชัน จากหน้าต่างที่เปิดก่อน":"Capture the session from the open browser first":he?W.trim()?void 0:b?"ใส่ path ของหน้าที่ต้องล็อกอิน":"Enter a path that requires a login":b?"บันทึกเซสชัน ก่อน":"Capture a session first",onClick:async()=>{J(!0),Q(void 0);try{const ye=new URL(W||"/",l).toString();O(await O0(s,ye))}catch(ye){Q(wo(ye))}finally{J(!1)}},children:B?b?"กำลังตรวจ…":"Verifying…":b?"ตรวจสอบ":"Verify"})]})]}),V&&n.jsx("p",{className:"auth-session-error",children:V}),n.jsxs("div",{className:"auth-session-actions auth-session-secondary",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:D,onClick:()=>{Ce()},children:D?b?"กำลังเช็ก…":"Checking…":b?"รีเฟรชสถานะ":"Refresh status"}),z?n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>{await U0(s),H(!1),K(!1),await Ce()},children:b?"ยืนยันล้าง":"Confirm clear"}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>H(!1),children:b?"ยกเลิก":"Cancel"})]}):n.jsx("button",{type:"button",className:"btn btn-danger",disabled:ee,onClick:()=>H(!0),children:b?"ล้างเซสชัน":"Clear login session"})]}),n.jsx("small",{className:"auth-session-hint",children:b?"สถานะจะเป็น ready ก็ต่อเมื่อเปิดหน้าที่ต้องล็อกอินได้จริงเท่านั้น การมีโฟลเดอร์อยู่ไม่ได้แปลว่า login ยังใช้ได้ · เคสที่บันทึกการ Login ไว้ต้องล้างเซสชัน ก่อนถึงจะ replay ได้":"The status reaches ready only when a protected page actually opens — a saved folder never meant a working login. A recorded login Test Case needs the session cleared before it can replay."})]}),E==="session"&&(!s||!l)&&n.jsxs("div",{className:"settings-empty-state",children:[n.jsx("b",{children:b?"Scout เว็บไซต์ก่อน":"Scout a website first"}),n.jsx("span",{children:b?"ต้องมี Target URL ก่อน LazyScout จึงจะสร้าง Browser Session ที่ใช้ซ้ำได้":"A target URL is required before LazyScout can create a reusable browser session."})]}),E==="safety"&&n.jsx(EC,{filter:m,onChange:g}),E==="recorder"&&s&&l&&p&&n.jsx(Zy,{projectId:s,targetUrl:l,onSaveRecording:p}),E==="recorder"&&(!s||!l)&&n.jsxs("div",{className:"settings-empty-state",children:[n.jsx("b",{children:b?"เพิ่ม Target URL ก่อน":"Add a target URL first"}),n.jsx("span",{children:b?"Scout เว็บไซต์หนึ่งครั้ง แล้วกลับมาบันทึก Login และ Business Flow ที่นี่":"Scout a website once, then return here to record login and business flows."})]})]}),n.jsxs("div",{className:"modal-footer",children:[E==="credentials"&&n.jsx("button",{type:"button",className:"btn btn-secondary mr-auto",onClick:()=>{u(),w({}),x(!1)},children:b?"ล้างข้อมูลทดสอบ":"Clear secrets"}),Y&&!Ne&&n.jsx("span",{className:"settings-saved",role:"status",children:b?"บันทึกแล้ว":"Saved"}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:f,children:b?"ปิด":"Close"}),(Ne||E==="credentials")&&n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!Ne,title:Ne?void 0:b?"ยังไม่มีการแก้ไข":"Nothing has changed",onClick:()=>{c(A),x(!0)},children:b?"บันทึกข้อมูลทดสอบ":"Save credentials"})]})]})})}var wd={exports:{}},mv;function OC(){return mv||(mv=1,(function(a){var s=(function(l){var o=Object.prototype,c=o.hasOwnProperty,u=Object.defineProperty||function(R,Y,x){R[Y]=x.value},f,p=typeof Symbol=="function"?Symbol:{},m=p.iterator||"@@iterator",g=p.asyncIterator||"@@asyncIterator",v=p.toStringTag||"@@toStringTag";function y(R,Y,x){return Object.defineProperty(R,Y,{value:x,enumerable:!0,configurable:!0,writable:!0}),R[Y]}try{y({},"")}catch{y=function(Y,x,C){return Y[x]=C}}function j(R,Y,x,C){var q=Y&&Y.prototype instanceof O?Y:O,I=Object.create(q.prototype),ee=new V(C||[]);return u(I,"_invoke",{value:z(R,x,ee)}),I}l.wrap=j;function b(R,Y,x){try{return{type:"normal",arg:R.call(Y,x)}}catch(C){return{type:"throw",arg:C}}}var E="suspendedStart",N="suspendedYield",A="executing",w="completed",S={};function O(){}function D(){}function M(){}var F={};y(F,m,function(){return this});var X=Object.getPrototypeOf,Z=X&&X(X(Q([])));Z&&Z!==o&&c.call(Z,m)&&(F=Z);var $=M.prototype=O.prototype=Object.create(F);D.prototype=M,u($,"constructor",{value:M,configurable:!0}),u(M,"constructor",{value:D,configurable:!0}),D.displayName=y(M,v,"GeneratorFunction");function B(R){["next","throw","return"].forEach(function(Y){y(R,Y,function(x){return this._invoke(Y,x)})})}l.isGeneratorFunction=function(R){var Y=typeof R=="function"&&R.constructor;return Y?Y===D||(Y.displayName||Y.name)==="GeneratorFunction":!1},l.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,M):(R.__proto__=M,y(R,v,"GeneratorFunction")),R.prototype=Object.create($),R},l.awrap=function(R){return{__await:R}};function J(R,Y){function x(I,ee,he,_e){var Ne=b(R[I],R,ee);if(Ne.type==="throw")_e(Ne.arg);else{var le=Ne.arg,Ce=le.value;return Ce&&typeof Ce=="object"&&c.call(Ce,"__await")?Y.resolve(Ce.__await).then(function(ye){x("next",ye,he,_e)},function(ye){x("throw",ye,he,_e)}):Y.resolve(Ce).then(function(ye){le.value=ye,he(le)},function(ye){return x("throw",ye,he,_e)})}}var C;function q(I,ee){function he(){return new Y(function(_e,Ne){x(I,ee,_e,Ne)})}return C=C?C.then(he,he):he()}u(this,"_invoke",{value:q})}B(J.prototype),y(J.prototype,g,function(){return this}),l.AsyncIterator=J,l.async=function(R,Y,x,C,q){q===void 0&&(q=Promise);var I=new J(j(R,Y,x,C),q);return l.isGeneratorFunction(Y)?I:I.next().then(function(ee){return ee.done?ee.value:I.next()})};function z(R,Y,x){var C=E;return function(I,ee){if(C===A)throw new Error("Generator is already running");if(C===w){if(I==="throw")throw ee;return W()}for(x.method=I,x.arg=ee;;){var he=x.delegate;if(he){var _e=H(he,x);if(_e){if(_e===S)continue;return _e}}if(x.method==="next")x.sent=x._sent=x.arg;else if(x.method==="throw"){if(C===E)throw C=w,x.arg;x.dispatchException(x.arg)}else x.method==="return"&&x.abrupt("return",x.arg);C=A;var Ne=b(R,Y,x);if(Ne.type==="normal"){if(C=x.done?w:N,Ne.arg===S)continue;return{value:Ne.arg,done:x.done}}else Ne.type==="throw"&&(C=w,x.method="throw",x.arg=Ne.arg)}}}function H(R,Y){var x=Y.method,C=R.iterator[x];if(C===f)return Y.delegate=null,x==="throw"&&R.iterator.return&&(Y.method="return",Y.arg=f,H(R,Y),Y.method==="throw")||x!=="return"&&(Y.method="throw",Y.arg=new TypeError("The iterator does not provide a '"+x+"' method")),S;var q=b(C,R.iterator,Y.arg);if(q.type==="throw")return Y.method="throw",Y.arg=q.arg,Y.delegate=null,S;var I=q.arg;if(!I)return Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,S;if(I.done)Y[R.resultName]=I.value,Y.next=R.nextLoc,Y.method!=="return"&&(Y.method="next",Y.arg=f);else return I;return Y.delegate=null,S}B($),y($,v,"Generator"),y($,m,function(){return this}),y($,"toString",function(){return"[object Generator]"});function T(R){var Y={tryLoc:R[0]};1 in R&&(Y.catchLoc=R[1]),2 in R&&(Y.finallyLoc=R[2],Y.afterLoc=R[3]),this.tryEntries.push(Y)}function K(R){var Y=R.completion||{};Y.type="normal",delete Y.arg,R.completion=Y}function V(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(T,this),this.reset(!0)}l.keys=function(R){var Y=Object(R),x=[];for(var C in Y)x.push(C);return x.reverse(),function q(){for(;x.length;){var I=x.pop();if(I in Y)return q.value=I,q.done=!1,q}return q.done=!0,q}};function Q(R){if(R){var Y=R[m];if(Y)return Y.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var x=-1,C=function q(){for(;++x<R.length;)if(c.call(R,x))return q.value=R[x],q.done=!1,q;return q.value=f,q.done=!0,q};return C.next=C}}return{next:W}}l.values=Q;function W(){return{value:f,done:!0}}return V.prototype={constructor:V,reset:function(R){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(K),!R)for(var Y in this)Y.charAt(0)==="t"&&c.call(this,Y)&&!isNaN(+Y.slice(1))&&(this[Y]=f)},stop:function(){this.done=!0;var R=this.tryEntries[0],Y=R.completion;if(Y.type==="throw")throw Y.arg;return this.rval},dispatchException:function(R){if(this.done)throw R;var Y=this;function x(_e,Ne){return I.type="throw",I.arg=R,Y.next=_e,Ne&&(Y.method="next",Y.arg=f),!!Ne}for(var C=this.tryEntries.length-1;C>=0;--C){var q=this.tryEntries[C],I=q.completion;if(q.tryLoc==="root")return x("end");if(q.tryLoc<=this.prev){var ee=c.call(q,"catchLoc"),he=c.call(q,"finallyLoc");if(ee&&he){if(this.prev<q.catchLoc)return x(q.catchLoc,!0);if(this.prev<q.finallyLoc)return x(q.finallyLoc)}else if(ee){if(this.prev<q.catchLoc)return x(q.catchLoc,!0)}else if(he){if(this.prev<q.finallyLoc)return x(q.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(R,Y){for(var x=this.tryEntries.length-1;x>=0;--x){var C=this.tryEntries[x];if(C.tryLoc<=this.prev&&c.call(C,"finallyLoc")&&this.prev<C.finallyLoc){var q=C;break}}q&&(R==="break"||R==="continue")&&q.tryLoc<=Y&&Y<=q.finallyLoc&&(q=null);var I=q?q.completion:{};return I.type=R,I.arg=Y,q?(this.method="next",this.next=q.finallyLoc,S):this.complete(I)},complete:function(R,Y){if(R.type==="throw")throw R.arg;return R.type==="break"||R.type==="continue"?this.next=R.arg:R.type==="return"?(this.rval=this.arg=R.arg,this.method="return",this.next="end"):R.type==="normal"&&Y&&(this.next=Y),S},finish:function(R){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var x=this.tryEntries[Y];if(x.finallyLoc===R)return this.complete(x.completion,x.afterLoc),K(x),S}},catch:function(R){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var x=this.tryEntries[Y];if(x.tryLoc===R){var C=x.completion;if(C.type==="throw"){var q=C.arg;K(x)}return q}}throw new Error("illegal catch attempt")},delegateYield:function(R,Y,x){return this.delegate={iterator:Q(R),resultName:Y,nextLoc:x},this.method==="next"&&(this.arg=f),S}},l})(a.exports);try{regeneratorRuntime=s}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}})(wd)),wd.exports}var Nd,gv;function wf(){return gv||(gv=1,Nd=(a,s)=>`${a}-${s}-${Math.random().toString(16).slice(3,8)}`),Nd}var Cd,vv;function Ky(){if(vv)return Cd;vv=1;const a=wf();let s=0;return Cd=({id:l,action:o,payload:c={}})=>{let u=l;return typeof u>"u"&&(u=a("Job",s),s+=1),{id:u,action:o,payload:c}},Cd}var zi={},yv;function Nf(){if(yv)return zi;yv=1;let a=!1;return zi.logging=a,zi.setLogging=s=>{a=s},zi.log=(...s)=>a?console.log.apply(this,s):null,zi}var Td,bv;function RC(){if(bv)return Td;bv=1;const a=Ky(),{log:s}=Nf(),l=wf();let o=0;return Td=()=>{const c=l("Scheduler",o),u={},f={};let p=[];o+=1;const m=()=>p.length,g=()=>Object.keys(u).length,v=()=>{if(p.length!==0){const N=Object.keys(u);for(let A=0;A<N.length;A+=1)if(typeof f[N[A]]>"u"){p[0](u[N[A]]);break}}},y=(N,A)=>new Promise((w,S)=>{const O=a({action:N,payload:A});p.push(async D=>{p.shift(),f[D.id]=O;try{w(await D[N].apply(this,[...A,O.id]))}catch(M){S(M)}finally{delete f[D.id],v()}}),s(`[${c}]: Add ${O.id} to JobQueue`),s(`[${c}]: JobQueue length=${p.length}`),v()});return{addWorker:N=>(u[N.id]=N,s(`[${c}]: Add ${N.id}`),s(`[${c}]: Number of workers=${g()}`),v(),N.id),addJob:async(N,...A)=>{if(g()===0)throw Error(`[${c}]: You need to have at least one worker before adding jobs`);return y(N,A)},terminate:async()=>{Object.keys(u).forEach(async N=>{await u[N].terminate()}),p=[]},getQueueLen:m,getNumWorkers:g}},Td}function Pi(a){throw new Error('Could not dynamically require "'+a+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _d,xv;function DC(){return xv||(xv=1,_d=a=>{const s={};return typeof WorkerGlobalScope<"u"?s.type="webworker":typeof document=="object"?s.type="browser":typeof process=="object"&&typeof Pi=="function"&&(s.type="node"),typeof a>"u"?s:s[a]}),_d}var Ed,jv;function LC(){if(jv)return Ed;jv=1;const s=DC()("type")==="browser"?l=>new URL(l,window.location.href).href:l=>l;return Ed=l=>{const o={...l};return["corePath","workerPath","langPath"].forEach(c=>{l[c]&&(o[c]=s(o[c]))}),o},Ed}var kd,Sv;function Qy(){return Sv||(Sv=1,kd={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),kd}const MC="7.0.0",UC={version:MC};var Ad,wv;function zC(){return wv||(wv=1,Ad={workerBlobURL:!0,logger:()=>{}}),Ad}var Od,Nv;function BC(){if(Nv)return Od;Nv=1;const a=UC.version;return Od={...zC(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${a}/dist/worker.min.js`},Od}var Rd,Cv;function IC(){return Cv||(Cv=1,Rd=({workerPath:a,workerBlobURL:s})=>{let l;if(Blob&&URL&&s){const o=new Blob([`importScripts("${a}");`],{type:"application/javascript"});l=new Worker(URL.createObjectURL(o))}else l=new Worker(a);return l}),Rd}var Dd,Tv;function PC(){return Tv||(Tv=1,Dd=a=>{a.terminate()}),Dd}var Ld,_v;function $C(){return _v||(_v=1,Ld=(a,s)=>{a.onmessage=({data:l})=>{s(l)}}),Ld}var Md,Ev;function qC(){return Ev||(Ev=1,Md=async(a,s)=>{a.postMessage(s)}),Md}var Ud,kv;function HC(){if(kv)return Ud;kv=1;const a=l=>new Promise((o,c)=>{const u=new FileReader;u.onload=()=>{o(u.result)},u.onerror=({target:{error:{code:f}}})=>{c(Error(`File could not be read! Code=${f}`))},u.readAsArrayBuffer(l)}),s=async l=>{let o=l;if(typeof l>"u")return"undefined";if(typeof l=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(l)?o=atob(l.split(",")[1]).split("").map(c=>c.charCodeAt(0)):o=await(await fetch(l)).arrayBuffer();else if(typeof HTMLElement<"u"&&l instanceof HTMLElement)l.tagName==="IMG"&&(o=await s(l.src)),l.tagName==="VIDEO"&&(o=await s(l.poster)),l.tagName==="CANVAS"&&await new Promise(c=>{l.toBlob(async u=>{o=await a(u),c()})});else if(typeof OffscreenCanvas<"u"&&l instanceof OffscreenCanvas){const c=await l.convertToBlob();o=await a(c)}else(l instanceof File||l instanceof Blob)&&(o=await a(l));return new Uint8Array(o)};return Ud=s,Ud}var zd,Av;function GC(){if(Av)return zd;Av=1;const a=BC(),s=IC(),l=PC(),o=$C(),c=qC(),u=HC();return zd={defaultOptions:a,spawnWorker:s,terminateWorker:l,onMessage:o,send:c,loadImage:u},zd}var Bd,Ov;function Jy(){if(Ov)return Bd;Ov=1;const a=LC(),s=Ky(),{log:l}=Nf(),o=wf(),c=Qy(),{defaultOptions:u,spawnWorker:f,terminateWorker:p,onMessage:m,loadImage:g,send:v}=GC();let y=0;return Bd=async(j="eng",b=c.LSTM_ONLY,E={},N={})=>{const A=o("Worker",y),{logger:w,errorHandler:S,...O}=a({...u,...E}),D={},M=typeof j=="string"?j.split("+"):j;let F=b,X=N;const Z=[c.DEFAULT,c.LSTM_ONLY].includes(b)&&!O.legacyCore;let $,B;const J=new Promise((le,Ce)=>{B=le,$=Ce}),z=le=>{$(le.message)};let H=f(O);H.onerror=z,y+=1;const T=({id:le,action:Ce,payload:ye})=>new Promise((Fe,Ue)=>{l(`[${A}]: Start ${le}, action=${Ce}`);const k=`${Ce}-${le}`;D[k]={resolve:Fe,reject:Ue},v(H,{workerId:A,jobId:le,action:Ce,payload:ye})}),K=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),V=le=>T(s({id:le,action:"load",payload:{options:{lstmOnly:Z,corePath:O.corePath,logging:O.logging}}})),Q=(le,Ce,ye)=>T(s({id:ye,action:"FS",payload:{method:"writeFile",args:[le,Ce]}})),W=(le,Ce)=>T(s({id:Ce,action:"FS",payload:{method:"readFile",args:[le,{encoding:"utf8"}]}})),R=(le,Ce)=>T(s({id:Ce,action:"FS",payload:{method:"unlink",args:[le]}})),Y=(le,Ce,ye)=>T(s({id:ye,action:"FS",payload:{method:le,args:Ce}})),x=(le,Ce)=>T(s({id:Ce,action:"loadLanguage",payload:{langs:le,options:{langPath:O.langPath,dataPath:O.dataPath,cachePath:O.cachePath,cacheMethod:O.cacheMethod,gzip:O.gzip,lstmOnly:[c.DEFAULT,c.LSTM_ONLY].includes(F)&&!O.legacyLang}}})),C=(le,Ce,ye,Fe)=>T(s({id:Fe,action:"initialize",payload:{langs:le,oem:Ce,config:ye}})),q=(le="eng",Ce,ye,Fe)=>{if(Z&&[c.TESSERACT_ONLY,c.TESSERACT_LSTM_COMBINED].includes(Ce))throw Error("Legacy model requested but code missing.");const Ue=Ce||F;F=Ue;const k=ye||X;X=k;const ce=(typeof le=="string"?le.split("+"):le).filter(G=>!M.includes(G));return M.push(...ce),ce.length>0?x(ce,Fe).then(()=>C(le,Ue,k,Fe)):C(le,Ue,k,Fe)},I=(le={},Ce)=>T(s({id:Ce,action:"setParameters",payload:{params:le}})),ee=async(le,Ce={},ye={text:!0},Fe)=>T(s({id:Fe,action:"recognize",payload:{image:await g(le),options:Ce,output:ye}})),he=async(le,Ce)=>{if(Z)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return T(s({id:Ce,action:"detect",payload:{image:await g(le)}}))},_e=async()=>(H!==null&&(p(H),H=null),Promise.resolve());m(H,({workerId:le,jobId:Ce,status:ye,action:Fe,data:Ue})=>{const k=`${Fe}-${Ce}`;if(ye==="resolve")l(`[${le}]: Complete ${Ce}`),D[k].resolve({jobId:Ce,data:Ue}),delete D[k];else if(ye==="reject")if(D[k].reject(Ue),delete D[k],Fe==="load"&&$(Ue),S)S(Ue);else throw Error(Ue);else ye==="progress"&&w({...Ue,userJobId:Ce})});const Ne={id:A,worker:H,load:K,writeText:Q,readText:W,removeFile:R,FS:Y,reinitialize:q,setParameters:I,recognize:ee,detect:he,terminate:_e};return V().then(()=>x(j)).then(()=>C(j,b,N)).then(()=>B(Ne)).catch(()=>{}),J},Bd}var Id,Rv;function FC(){if(Rv)return Id;Rv=1;const a=Jy();return Id={recognize:async(o,c,u)=>{const f=await a(c,1,u);return f.recognize(o).finally(async()=>{await f.terminate()})},detect:async(o,c)=>{const u=await a("osd",0,c);return u.detect(o).finally(async()=>{await u.terminate()})}},Id}var Pd,Dv;function VC(){return Dv||(Dv=1,Pd={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}),Pd}var $d,Lv;function YC(){return Lv||(Lv=1,$d={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}),$d}var qd,Mv;function XC(){if(Mv)return qd;Mv=1,OC();const a=RC(),s=Jy(),l=FC(),o=VC(),c=Qy(),u=YC(),{setLogging:f}=Nf();return qd={languages:o,OEM:c,PSM:u,createScheduler:a,createWorker:s,setLogging:f,...l},qd}var ZC=XC();const KC=[{id:"visual",title:"Visual check",description:"Compare text, colors and layout with the image"},{id:"text",title:"Text check",description:"Create steps for text read from the image"},{id:"manual",title:"Manual checklist",description:"Create a checklist for a Tester to review"}],Wy="lazyscout-test-case-language";function QC(){const a=localStorage.getItem(Wy);return a==="th"||a==="en"?a:"en"}function JC({sourceUrl:a,initialLanguage:s,onLanguageChange:l,existingCases:o,onImport:c,onClose:u}){const{ui:f,language:p}=Le(),[m,g]=L.useState(""),[v,y]=L.useState(""),[j,b]=L.useState("Screenshot screen"),[E,N]=L.useState("visual"),[A,w]=L.useState(s??QC),[S,O]=L.useState(""),[D,M]=L.useState([]),[F,X]=L.useState(""),[Z,$]=L.useState(!1),[B,J]=L.useState(!1),[z,H]=L.useState(!1);function T(R){!R||!R.type.startsWith("image/")||(y(R.name),g(URL.createObjectURL(R)),X("Ready to read the image."))}async function K(){if(!m||Z)return;$(!0),X("Reading Thai and English from the image…");let R;try{R=await new Promise((C,q)=>{ZC.createWorker("tha+eng",void 0,{errorHandler:q}).then(C,q)});const x=(await R.recognize(m)).data.text.trim();O(x),M(x.split(/\r?\n/).map(C=>C.trim()).filter(C=>C.length>1).slice(0,12).map((C,q)=>q)),X("Reading complete. Review and edit the text before creating Test Cases.")}catch{X(R?"OCR failed. Try a clearer image or enter the text manually.":"Could not load OCR. Check the connection and try again, or enter the text manually.")}finally{$(!1),await R?.terminate().catch(()=>{})}}async function V(){const R=S.split(/\r?\n/).map(Ne=>Ne.trim()).filter(Ne=>Ne.length>1).slice(0,12),Y=(D.length?D.map(Ne=>R[Ne]).filter(Boolean):R).slice(0,8),x="SCREENSHOT",C=new Set(o.map(Ne=>Ne.id));let q=1;const I=()=>{let Ne=`TC-${x}-${String(q).padStart(3,"0")}`;for(;C.has(Ne);)Ne=`TC-${x}-${String(++q).padStart(3,"0")}`;return C.add(Ne),q++,Ne},ee=Y.slice(0,8).map(Ne=>({type:"assertText",text:Ne,description:A==="th"?`ตรวจสอบว่าหน้าเว็บแสดงข้อความ "${Ne}"`:`Verify that "${Ne}" is visible on the page`})),he={module:x,preconditions:A==="th"?["เปิดหน้าที่ต้องการตรวจสอบให้ตรงกับภาพอ้างอิง"]:["Open the page that matches the screenshot reference"],sourceUrl:a||v,priority:"medium",automationStatus:"needs-review",type:"validation",notes:A==="th"?`สร้างจากภาพ ${v||"อ้างอิง"} · โปรดตรวจทานก่อนนำไปใช้งานจริง`:`Created from ${v||"reference"} · Review before production use`},_e=[];(E==="visual"||E==="manual")&&_e.push({...he,id:I(),title:A==="th"?`ตรวจสอบว่า ${j} แสดงผลตรงตามภาพอ้างอิง`:`${j} matches the screenshot reference`,steps:[{type:"navigate",url:a||"about:blank",description:A==="th"?"เปิดหน้าที่ต้องการตรวจสอบ":"Open the page to inspect"},{type:"manual",description:A==="th"?"เปรียบเทียบโครงร่าง ระยะห่าง สี และตำแหน่งขององค์ประกอบกับภาพอ้างอิง":"Compare layout, spacing, colors and element positions with the screenshot"}],expectedResult:A==="th"?"โครงร่างและองค์ประกอบที่มองเห็นบนหน้าเว็บตรงกับภาพอ้างอิง":"The page layout and visible elements match the screenshot reference."}),(E==="visual"||E==="text")&&_e.push({...he,id:I(),title:A==="th"?`ตรวจสอบข้อความสำคัญทั้งหมดบน ${j}`:`${j} shows all important text`,steps:ee,expectedResult:A==="th"?"ข้อความสำคัญบนหน้าจอแสดงครบถ้วนและอ่านได้ชัดเจน":"Important on-screen text is complete and readable."}),J(!0),H(!1);try{await c(_e),u()}catch{H(!0)}finally{J(!1)}}const Q=S.split(/\r?\n/).map(R=>R.trim()).filter(R=>R.length>1).slice(0,12),W=D.length||Q.length;return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:R=>!B&&R.target===R.currentTarget&&u(),children:n.jsxs("section",{className:"modern-modal screenshot-importer",role:"dialog","aria-modal":"true","aria-labelledby":"import-image-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:f("Create Test Cases from an image")}),n.jsx("h2",{id:"import-image-title",children:f("Screenshot → Test Case")}),n.jsx("p",{children:f("Follow three steps to create Draft Test Cases for review.")})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":f("Close"),disabled:B,onClick:u,children:"×"})]}),n.jsxs("div",{className:"screenshot-import-body",children:[n.jsxs("div",{className:"import-step",children:[n.jsx("span",{children:"1"}),n.jsxs("div",{children:[n.jsx("b",{children:f("Choose a Test Case pattern")}),n.jsx("p",{children:f("Pick the pattern that matches what you need to check.")})]})]}),n.jsx("div",{className:"pattern-grid",children:KC.map(R=>n.jsxs("button",{type:"button",className:`pattern-card ${E===R.id?"is-selected":""}`,onClick:()=>N(R.id),children:[n.jsx("b",{children:f(R.title)}),n.jsx("span",{children:f(R.description)})]},R.id))}),n.jsxs("div",{className:"import-step",children:[n.jsx("span",{children:"2"}),n.jsxs("div",{children:[n.jsx("b",{children:f("Upload a Screenshot")}),n.jsx("p",{children:f("PNG, JPG and WEBP are supported.")})]})]}),n.jsxs("label",{className:"upload-dropzone",children:[n.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:R=>T(R.target.files?.[0])}),n.jsx("strong",{children:v||f("Click to choose an image")}),n.jsx("span",{children:f("or drop a file here")})]}),m&&n.jsxs("div",{className:"screenshot-preview",children:[n.jsx("img",{src:m,alt:f("Screenshot preview")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:K,disabled:Z,children:f(Z?"Reading…":"Read text from image")})]}),n.jsxs("div",{className:"import-step",children:[n.jsx("span",{children:"3"}),n.jsxs("div",{children:[n.jsx("b",{children:f("Review text and create cases")}),n.jsx("p",{children:f("You can edit OCR text before importing.")})]})]}),n.jsxs("label",{className:"field-label",children:[f("Screen name"),n.jsx("input",{className:"field mt-1",value:j,onChange:R=>b(R.target.value)})]}),n.jsxs("label",{className:"field-label",children:[f("Test Case language"),n.jsxs("select",{className:"field mt-1",value:A,onChange:R=>{const Y=R.target.value;w(Y),localStorage.setItem(Wy,Y),l?.(Y)},children:[n.jsx("option",{value:"en",children:f("English")}),n.jsx("option",{value:"th",children:"ไทย"})]})]}),n.jsxs("label",{className:"field-label",children:[f("Text detected"),n.jsx("textarea",{className:"field screenshot-ocr",value:S,onChange:R=>{O(R.target.value),M([])},placeholder:f("Read text from the image, or type it yourself")})]}),Q.length>0&&n.jsxs("div",{className:"import-preview",children:[n.jsxs("b",{children:[f("Choose OCR lines to create assertions ("),W," ",f("selected)")]}),n.jsx("table",{children:n.jsx("tbody",{children:Q.map((R,Y)=>{const x=D.length===0||D.includes(Y);return n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("input",{type:"checkbox",checked:x,onChange:()=>M(C=>{const q=C.length===0?Q.map((I,ee)=>ee):C;return q.includes(Y)?q.filter(I=>I!==Y):[...q,Y]})})}),n.jsx("td",{children:R})]},`${Y}-${R}`)})})})]}),n.jsxs("div",{className:"import-summary",children:[n.jsx("b",{children:f("Draft preview")}),n.jsxs("span",{children:[E==="visual"||E==="manual"?f("1 visual comparison case"):"",E==="visual"?" + ":"",E==="visual"||E==="text"?p==="th"?`1 เคสตรวจข้อความ (${W} เงื่อนไข)`:`1 text verification case with ${W} assertion(s)`:""]})]}),n.jsx("p",{role:"status",className:"screenshot-status",children:f(F)}),z&&n.jsx("p",{role:"alert",className:"import-error",children:f("Could not save the imported cases. Check that LazyScout is running and try again.")})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsxs("span",{className:"mr-auto text-xs text-slate-500",children:[f("Results are marked")," ",n.jsx("b",{children:f("needs-review")})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:B,onClick:u,children:f("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:V,disabled:Z||B||!S.trim()&&E!=="manual",children:f(B?"Saving…":"Create Draft Test Cases")})]})]})})}function WC({existingCases:a,sourceUrl:s,onImport:l,onClose:o}){const{ui:c}=Le(),[u,f]=L.useState(""),[p,m]=L.useState([]),[g,v]=L.useState(""),[y,j]=L.useState(!1),[b,E]=L.useState(!1);async function N(){E(!0),v("");try{await l(p),o()}catch{v("Could not save the imported cases. Check that LazyScout is running and try again.")}finally{E(!1)}}async function A(w){if(!(!w||y)){j(!0),v(""),f(w.name);try{const S=await eT(w),O=tT(S,a,s);if(!O.length)throw new Error("No valid Test Cases were found. Check that the file contains TC_ID or Title.");m(O)}catch(S){m([]),v(S instanceof Error?S.message:"Could not read the file.")}finally{j(!1)}}}return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:w=>!b&&w.target===w.currentTarget&&o(),children:n.jsxs("section",{className:"modern-modal import-testcase-modal",role:"dialog","aria-modal":"true","aria-labelledby":"import-cases-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:c("Import Test Cases")}),n.jsx("h2",{id:"import-cases-title",children:c("Bring an existing suite into LazyScout")}),n.jsx("p",{children:c("CSV, XLSX and JSON are supported. Fields are mapped automatically.")})]}),n.jsx("button",{type:"button",className:"icon-btn",disabled:b,onClick:o,"aria-label":c("Close"),children:"×"})]}),n.jsxs("div",{className:"import-testcase-body",children:[n.jsxs("label",{className:"upload-dropzone",children:[n.jsx("input",{type:"file",accept:".csv,.xlsx,.json",disabled:b||y,onChange:w=>{A(w.target.files?.[0])}}),n.jsx("strong",{children:y?c("Reading file…"):u||c("Choose a CSV, XLSX or JSON file")}),n.jsx("span",{children:c("Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result")})]}),g&&n.jsx("p",{role:"alert",className:"import-error",children:c(g)}),p.length>0&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"import-summary",children:[n.jsxs("b",{children:[p.length," ",c("Test Cases ready to import")]}),n.jsx("span",{children:c("Duplicate IDs are replaced with a new TC-IMPORT ID.")})]}),n.jsxs("div",{className:"import-preview",children:[n.jsxs("table",{children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:c("TC ID")}),n.jsx("th",{children:c("Folder")}),n.jsx("th",{children:c("Title")}),n.jsx("th",{children:c("Tags")}),n.jsx("th",{children:c("Requirements")})]})}),n.jsx("tbody",{children:p.slice(0,10).map(w=>n.jsxs("tr",{children:[n.jsx("td",{children:w.id}),n.jsx("td",{children:w.folder??w.module}),n.jsx("td",{children:w.title}),n.jsx("td",{children:(w.tags??[]).join(", ")||"—"}),n.jsx("td",{children:(w.requirements??[]).join(", ")||"—"})]},w.id))})]}),p.length>10&&n.jsxs("p",{children:[c("Previewing 10 of")," ",p.length," ",c("Test Cases.")]})]})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:b,onClick:o,children:c("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!p.length||y||b,onClick:N,children:b?c("Saving…"):[c("Import"),p.length||"",c("Test Cases")].filter(Boolean).join(" ")})]})]})})}async function eT(a){const s=a.name.split(".").pop()?.toLowerCase();if(s==="json"){let l;try{l=JSON.parse(await a.text())}catch{throw new Error("Invalid JSON. Check the file and try again.")}return(Array.isArray(l)?l:l&&typeof l=="object"&&Array.isArray(l.testCases)?l.testCases:[]).filter(c=>!!c&&typeof c=="object")}if(s==="csv")return Uv(Ey(await a.text()));if(s==="xlsx")return Uv(await p1(a));throw new Error("Supported formats are CSV, XLSX and JSON.")}function Uv(a){const[s,...l]=a;if(!s)return[];const o=s.map(c=>String(c??"").trim());return l.filter(c=>c.some(u=>u!=null&&String(u).trim())).map(c=>Object.fromEntries(o.map((u,f)=>[u||`Column_${f+1}`,c[f]??""])))}function tT(a,s,l){const o=new Set(s.map(f=>f.id));let c=1;const u=()=>{let f=`TC-IMPORT-${String(c).padStart(3,"0")}`;for(;o.has(f);)f=`TC-IMPORT-${String(++c).padStart(3,"0")}`;return o.add(f),c++,f};return a.map(f=>{const p=ia(f,"TC_ID","ID","TEST_CASE_ID"),m=ia(f,"TITLE","TEST_CASE","NAME");if(!m&&!p)return null;const g=!p||o.has(p)?u():p;o.add(g);const v=ia(f,"MODULE")||"IMPORTED",y=nT(f).map(j=>({type:"manual",description:j}));return{id:g,module:v,folder:ia(f,"FOLDER")||v,tags:Mo(f,"TAGS","TAG"),requirements:Mo(f,"REQUIREMENTS","REQUIREMENT","TICKET","TICKETS"),title:m||g,preconditions:Mo(f,"PRECONDITIONS","PRECONDITION"),steps:y.length?y:[{type:"manual",description:"Review imported steps"}],expectedResult:ia(f,"EXPECTED_RESULT","EXPECTED RESULT","EXPECTED")||"Review expected result",type:aT(ia(f,"TYPE")),priority:rT(ia(f,"PRIORITY")),automationStatus:sT(ia(f,"AUTOMATION_STATUS","AUTOMATION")),sourceUrl:ia(f,"SOURCE_URL","SOURCE URL","URL")||l||"Imported file",notes:ia(f,"NOTES","NOTE")||"Imported into LazyScout"}}).filter(f=>!!f)}function cf(a){return a.toUpperCase().replace(/[^A-Z0-9]/g,"")}function nT(a){const s=Object.entries(a).find(([l])=>["TESTSTEPS","STEPS"].includes(cf(l)))?.[1];return Array.isArray(s)?s.map(l=>{if(typeof l=="string")return l.trim();if(l&&typeof l=="object"){const o=l;if(typeof o.description=="string"&&o.description.trim())return o.description.trim();const c=o.target,u=!!c&&typeof c=="object"&&!Array.isArray(c);if(o.type==="navigate"&&typeof o.url=="string"||o.type==="assertUrl"&&typeof o.urlContains=="string"||o.type==="assertText"&&typeof o.text=="string"&&(c==null||u)||o.type==="wait"&&typeof o.mode=="string"&&typeof o.value=="string"||o.type==="assertValidation"||u&&(o.type==="click"||o.type==="assertVisible"||o.type==="assertInvalid"||o.type==="fill"&&typeof o.value=="string"||o.type==="select"&&typeof o.option=="string"||o.type==="check"&&typeof o.checked=="boolean"))return La(o)}throw new Error("A JSON test step could not be read. Give it a description or use a Scout step.")}).filter(Boolean):Mo(a,"TEST_STEPS","STEPS")}function ia(a,...s){const l=new Map(Object.entries(a).map(([o,c])=>[cf(o),String(c??"").trim()]));for(const o of s){const c=l.get(cf(o));if(c)return c}return""}function Mo(a,...s){return ia(a,...s).split(/[\n,;|]/).map(l=>l.replace(/^\s*\d+[.)-]?\s*/,"").trim()).filter(Boolean)}function aT(a){return a.toLowerCase()==="negative"?"negative":a.toLowerCase()==="validation"?"validation":"positive"}function rT(a){return a.toLowerCase()==="high"?"high":a.toLowerCase()==="low"?"low":"medium"}function sT(a){return["ready","needs-data","needs-review","manual"].includes(a)?a:"needs-review"}function iT(a,s){return a?new Intl.DateTimeFormat(s,{dateStyle:"medium"}).format(new Date(a)):"Published on npm"}function lT({compact:a=!1}){const{ui:s,language:l}=Le(),[o,c]=L.useState(),[u,f]=L.useState(!0),[p,m]=L.useState(),[g,v]=L.useState(),[y,j]=L.useState(),[b,E]=L.useState(),[N,A]=L.useState();async function w(){f(!0),m(void 0);try{c(await S0())}catch(D){m(D instanceof yn?D.message:"Could not check npm versions.")}finally{f(!1)}}L.useEffect(()=>{w()},[]);async function S(D){await navigator.clipboard.writeText(`npm install -g lazyscout@${D}`),A(D),window.setTimeout(()=>A(M=>M===D?void 0:M),1600)}async function O(D){j(D),v(void 0),E(void 0),m(void 0);try{E(await w0(D))}catch(M){m(M instanceof yn&&M.hint?`${M.message} ${M.hint}`:M instanceof Error?M.message:"Could not install this version.")}finally{j(void 0)}}return n.jsxs("section",{className:`version-center ${a?"is-compact":""}`,children:[n.jsxs("header",{className:"version-center-head",children:[n.jsx("div",{className:"version-center-icon",children:"V"}),n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:s("Version Center")}),n.jsx("h3",{children:s(a?"LazyScout version":"Choose your LazyScout version")}),!a&&n.jsx("p",{children:s("Install the latest release or switch to an earlier published version before opening a workspace.")})]}),n.jsx("button",{type:"button",className:"version-refresh",onClick:()=>{w()},disabled:u,children:s(u?"Checking…":"Check again")})]}),u&&!o?n.jsxs("div",{className:"version-loading",children:[n.jsx("span",{className:"scout-spinner"})," ",s("Checking npm Registry…")]}):o?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"version-summary",children:[n.jsxs("div",{children:[n.jsx("small",{children:s("Running now")}),n.jsxs("strong",{children:["v",o.currentVersion]})]}),n.jsx("span",{className:"version-summary-arrow",children:"→"}),n.jsxs("div",{children:[n.jsx("small",{children:s("Latest release")}),n.jsx("strong",{children:o.latestVersion?`v${o.latestVersion}`:s("Unavailable")})]}),o.registryAvailable&&o.latestVersion&&!p&&!u&&n.jsx("span",{className:`version-state ${o.updateAvailable?"has-update":""}`,children:o.updateAvailable?s("Update available"):s("Up to date")})]}),!a&&n.jsx("div",{className:"version-list","aria-label":s("Published LazyScout versions"),children:o.versions.slice(0,3).map(D=>{const M=D.version===o.currentVersion,F=D.version===g,X=D.version===y;return n.jsxs("div",{className:`version-row ${M?"is-current":""}`,children:[n.jsxs("div",{className:"version-number",children:[n.jsxs("span",{children:["v",D.version]}),n.jsx("small",{children:s(iT(D.publishedAt,l))})]}),n.jsxs("div",{className:"version-tags",children:[D.tags.map(Z=>n.jsx("span",{children:Z},Z)),M&&n.jsx("span",{className:"current",children:s("running")})]}),n.jsx("button",{type:"button",className:"btn btn-secondary version-copy",onClick:()=>{S(D.version)},children:N===D.version?s("Copied"):s("Copy command")}),n.jsx("button",{type:"button",className:"btn btn-primary version-install",disabled:M||!!y,onClick:()=>v(F?void 0:D.version),children:s(M?"Current":X?"Installing…":"Install")}),F&&n.jsxs("div",{className:"version-confirm",children:[n.jsxs("span",{children:[s("Install")," ",n.jsxs("b",{children:["v",D.version]})," ",s("globally? Restart LazyScout after installation to use it.")]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>v(void 0),children:s("Cancel")}),n.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>{O(D.version)},children:[s("Install v"),D.version]})]})]},D.version)})})]}):null,o&&!o.registryAvailable&&n.jsxs("div",{className:"version-message warning",children:[s("npm Registry is unavailable.")," ",o.error]}),p&&n.jsx("div",{className:"version-message error",children:s(p)}),b&&n.jsxs("div",{className:"version-message success",children:[n.jsxs("b",{children:[s("LazyScout v"),b.installedVersion," ",s("installed.")]}),n.jsx("span",{children:s("Close the current LazyScout terminal and run `lazyscout` again to switch versions.")})]})]})}function oT({projects:a,onScout:s,onEmpty:l,onSample:o,onOpenProject:c,onClose:u}){const{ui:f,language:p,toggleLanguage:m}=Le(),g=p==="th",[v,y]=L.useState(""),[j,b]=L.useState(!1),[E,N]=L.useState(a[0]?.id??""),A=v.trim()||"Untitled Test Suite";return n.jsx(jf,{labelledBy:"new-project-title",onClose:u,children:n.jsxs("section",{className:"modern-modal new-project-modal",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:g?"โปรเจกต์ใหม่":"New Project"}),n.jsx("h2",{id:"new-project-title",children:g?"เริ่มพื้นที่ทำงาน QA":"Start a QA workspace"}),n.jsx("p",{children:g?"เลือกสำรวจเว็บไซต์ ลองโปรเจกต์ตัวอย่าง หรือนำเข้าเคสทดสอบเดิม":"Start with your website, try the sample, or create an empty test suite."})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",lang:g?"en":"th",onClick:m,children:g?"English":"ภาษาไทย"}),n.jsx("button",{type:"button",className:"icon-btn",onClick:u,"aria-label":f("Close"),children:"×"})]})]}),n.jsxs("div",{className:"new-project-modal-body",children:[n.jsxs("label",{children:[n.jsx("span",{children:g?"ชื่อโปรเจกต์":"Project name"}),n.jsx("input",{"data-help":"project-name",className:"field",value:v,onChange:w=>y(w.target.value),placeholder:f("Example: Storefront regression")})]}),n.jsxs("div",{className:"new-project-choices",children:[n.jsxs("button",{type:"button","data-help":"new-scout",onClick:()=>s(A),children:[n.jsx("span",{className:"new-project-choice-icon scout",children:"◉"}),n.jsxs("span",{children:[n.jsx("b",{children:g?"Scout เว็บไซต์":"Scout a website"}),n.jsx("small",{children:g?"ใส่ URL แล้วให้ Playwright ค้นหาหน้าและสร้างเคสทดสอบชุดแรก":"Enter a URL, then let Playwright discover pages and create a first Test Case suite."})]}),n.jsx("em",{children:"→"})]}),n.jsxs("button",{type:"button","data-help":"sample",onClick:o,children:[n.jsx("span",{className:"new-project-choice-icon sample",children:"✦"}),n.jsxs("span",{children:[n.jsx("b",{children:g?"ลองโปรเจกต์ตัวอย่าง":"Try a sample project"}),n.jsx("small",{children:g?"เปิดเคสตัวอย่างการเข้าสู่ระบบ แล้วลองอ่านขั้นตอนและผลที่คาดหวัง":"Open the sample login cases to explore the steps and expected results."})]}),n.jsx("em",{children:"→"})]}),n.jsxs("button",{type:"button","data-help":"empty-project",onClick:()=>l(A),children:[n.jsx("span",{className:"new-project-choice-icon empty",children:"⇧"}),n.jsxs("span",{children:[n.jsx("b",{children:g?"โปรเจกต์เปล่า":"Empty project"}),n.jsx("small",{children:g?"สร้างชุดเปล่าสำหรับนำเข้า CSV, XLSX หรือ JSON และเพิ่มเคสทดสอบเองได้":"Create a blank suite for CSV, XLSX, or JSON import. You can add Test Cases manually too."})]}),n.jsx("em",{children:"→"})]})]}),a.length>0&&n.jsxs("div",{className:"existing-project-choice",children:[n.jsx("span",{className:"new-project-choice-icon empty",children:"↗"}),n.jsxs("div",{children:[n.jsx("b",{children:g?"เปิดโปรเจกต์เดิม":"Open existing project"}),n.jsx("small",{children:g?"ทำงานต่อจาก Local workspace":"Continue a local workspace."}),n.jsx("select",{"aria-label":g?"เลือกโปรเจกต์เดิม":"Select existing project",className:"field",value:E,onChange:w=>N(w.target.value),children:a.map(w=>n.jsx("option",{value:w.id,children:w.name},w.id))})]})]}),n.jsxs("details",{className:"version-disclosure",onToggle:w=>{w.currentTarget.open&&b(!0)},children:[n.jsx("summary",{children:g?"เวอร์ชันและการอัปเดต":"Version and updates"}),j&&n.jsx(lT,{compact:!0})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx(Fy,{welcome:!0}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:u,children:g?"ยกเลิก":"Cancel"}),a.length>0&&n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!E,onClick:()=>E&&c(E),children:g?"เปิดโปรเจกต์":"Open project"})]})]})})}var Hd={exports:{}};var zv;function cT(){return zv||(zv=1,(function(a,s){(function(l){a.exports=l()})(function(){return(function l(o,c,u){function f(g,v){if(!c[g]){if(!o[g]){var y=typeof Pi=="function"&&Pi;if(!v&&y)return y(g,!0);if(p)return p(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var b=c[g]={exports:{}};o[g][0].call(b.exports,function(E){var N=o[g][1][E];return f(N||E)},b,b.exports,l,o,c,u)}return c[g].exports}for(var p=typeof Pi=="function"&&Pi,m=0;m<u.length;m++)f(u[m]);return f})({1:[function(l,o,c){var u=l("./utils"),f=l("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(m){for(var g,v,y,j,b,E,N,A=[],w=0,S=m.length,O=S,D=u.getTypeOf(m)!=="string";w<m.length;)O=S-w,y=D?(g=m[w++],v=w<S?m[w++]:0,w<S?m[w++]:0):(g=m.charCodeAt(w++),v=w<S?m.charCodeAt(w++):0,w<S?m.charCodeAt(w++):0),j=g>>2,b=(3&g)<<4|v>>4,E=1<O?(15&v)<<2|y>>6:64,N=2<O?63&y:64,A.push(p.charAt(j)+p.charAt(b)+p.charAt(E)+p.charAt(N));return A.join("")},c.decode=function(m){var g,v,y,j,b,E,N=0,A=0,w="data:";if(m.substr(0,w.length)===w)throw new Error("Invalid base64 input, it looks like a data url.");var S,O=3*(m=m.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(m.charAt(m.length-1)===p.charAt(64)&&O--,m.charAt(m.length-2)===p.charAt(64)&&O--,O%1!=0)throw new Error("Invalid base64 input, bad content length.");for(S=f.uint8array?new Uint8Array(0|O):new Array(0|O);N<m.length;)g=p.indexOf(m.charAt(N++))<<2|(j=p.indexOf(m.charAt(N++)))>>4,v=(15&j)<<4|(b=p.indexOf(m.charAt(N++)))>>2,y=(3&b)<<6|(E=p.indexOf(m.charAt(N++))),S[A++]=g,b!==64&&(S[A++]=v),E!==64&&(S[A++]=y);return S}},{"./support":30,"./utils":32}],2:[function(l,o,c){var u=l("./external"),f=l("./stream/DataWorker"),p=l("./stream/Crc32Probe"),m=l("./stream/DataLengthProbe");function g(v,y,j,b,E){this.compressedSize=v,this.uncompressedSize=y,this.crc32=j,this.compression=b,this.compressedContent=E}g.prototype={getContentWorker:function(){var v=new f(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),y=this;return v.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),v},getCompressedWorker:function(){return new f(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},g.createWorkerFrom=function(v,y,j){return v.pipe(new p).pipe(new m("uncompressedSize")).pipe(y.compressWorker(j)).pipe(new m("compressedSize")).withStreamInfo("compression",y)},o.exports=g},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(l,o,c){var u=l("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},c.DEFLATE=l("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(l,o,c){var u=l("./utils"),f=(function(){for(var p,m=[],g=0;g<256;g++){p=g;for(var v=0;v<8;v++)p=1&p?3988292384^p>>>1:p>>>1;m[g]=p}return m})();o.exports=function(p,m){return p!==void 0&&p.length?u.getTypeOf(p)!=="string"?(function(g,v,y,j){var b=f,E=j+y;g^=-1;for(var N=j;N<E;N++)g=g>>>8^b[255&(g^v[N])];return-1^g})(0|m,p,p.length,0):(function(g,v,y,j){var b=f,E=j+y;g^=-1;for(var N=j;N<E;N++)g=g>>>8^b[255&(g^v.charCodeAt(N))];return-1^g})(0|m,p,p.length,0):0}},{"./utils":32}],5:[function(l,o,c){c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(l,o,c){var u=null;u=typeof Promise<"u"?Promise:l("lie"),o.exports={Promise:u}},{lie:37}],7:[function(l,o,c){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",f=l("pako"),p=l("./utils"),m=l("./stream/GenericWorker"),g=u?"uint8array":"array";function v(y,j){m.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=j,this.meta={}}c.magic="\b\0",p.inherits(v,m),v.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(g,y.data),!1)},v.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},v.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},v.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(j){y.push({data:j,meta:y.meta})}},c.compressWorker=function(y){return new v("Deflate",y)},c.uncompressWorker=function(){return new v("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(l,o,c){function u(b,E){var N,A="";for(N=0;N<E;N++)A+=String.fromCharCode(255&b),b>>>=8;return A}function f(b,E,N,A,w,S){var O,D,M=b.file,F=b.compression,X=S!==g.utf8encode,Z=p.transformTo("string",S(M.name)),$=p.transformTo("string",g.utf8encode(M.name)),B=M.comment,J=p.transformTo("string",S(B)),z=p.transformTo("string",g.utf8encode(B)),H=$.length!==M.name.length,T=z.length!==B.length,K="",V="",Q="",W=M.dir,R=M.date,Y={crc32:0,compressedSize:0,uncompressedSize:0};E&&!N||(Y.crc32=b.crc32,Y.compressedSize=b.compressedSize,Y.uncompressedSize=b.uncompressedSize);var x=0;E&&(x|=8),X||!H&&!T||(x|=2048);var C=0,q=0;W&&(C|=16),w==="UNIX"?(q=798,C|=(function(ee,he){var _e=ee;return ee||(_e=he?16893:33204),(65535&_e)<<16})(M.unixPermissions,W)):(q=20,C|=(function(ee){return 63&(ee||0)})(M.dosPermissions)),O=R.getUTCHours(),O<<=6,O|=R.getUTCMinutes(),O<<=5,O|=R.getUTCSeconds()/2,D=R.getUTCFullYear()-1980,D<<=4,D|=R.getUTCMonth()+1,D<<=5,D|=R.getUTCDate(),H&&(V=u(1,1)+u(v(Z),4)+$,K+="up"+u(V.length,2)+V),T&&(Q=u(1,1)+u(v(J),4)+z,K+="uc"+u(Q.length,2)+Q);var I="";return I+=`
62
- \0`,I+=u(x,2),I+=F.magic,I+=u(O,2),I+=u(D,2),I+=u(Y.crc32,4),I+=u(Y.compressedSize,4),I+=u(Y.uncompressedSize,4),I+=u(Z.length,2),I+=u(K.length,2),{fileRecord:y.LOCAL_FILE_HEADER+I+Z+K,dirRecord:y.CENTRAL_FILE_HEADER+u(q,2)+I+u(J.length,2)+"\0\0\0\0"+u(C,4)+u(A,4)+Z+K+J}}var p=l("../utils"),m=l("../stream/GenericWorker"),g=l("../utf8"),v=l("../crc32"),y=l("../signature");function j(b,E,N,A){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=E,this.zipPlatform=N,this.encodeFileName=A,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(j,m),j.prototype.push=function(b){var E=b.meta.percent||0,N=this.entriesCount,A=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,m.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:N?(E+100*(N-A-1))/N:100}}))},j.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var E=this.streamFiles&&!b.file.dir;if(E){var N=f(b,E,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},j.prototype.closedSource=function(b){this.accumulate=!1;var E=this.streamFiles&&!b.file.dir,N=f(b,E,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),E)this.push({data:(function(A){return y.DATA_DESCRIPTOR+u(A.crc32,4)+u(A.compressedSize,4)+u(A.uncompressedSize,4)})(b),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},j.prototype.flush=function(){for(var b=this.bytesWritten,E=0;E<this.dirRecords.length;E++)this.push({data:this.dirRecords[E],meta:{percent:100}});var N=this.bytesWritten-b,A=(function(w,S,O,D,M){var F=p.transformTo("string",M(D));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(w,2)+u(w,2)+u(S,4)+u(O,4)+u(F.length,2)+F})(this.dirRecords.length,N,b,this.zipComment,this.encodeFileName);this.push({data:A,meta:{percent:100}})},j.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},j.prototype.registerPrevious=function(b){this._sources.push(b);var E=this;return b.on("data",function(N){E.processChunk(N)}),b.on("end",function(){E.closedSource(E.previous.streamInfo),E._sources.length?E.prepareNextSource():E.end()}),b.on("error",function(N){E.error(N)}),this},j.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},j.prototype.error=function(b){var E=this._sources;if(!m.prototype.error.call(this,b))return!1;for(var N=0;N<E.length;N++)try{E[N].error(b)}catch{}return!0},j.prototype.lock=function(){m.prototype.lock.call(this);for(var b=this._sources,E=0;E<b.length;E++)b[E].lock()},o.exports=j},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(l,o,c){var u=l("../compressions"),f=l("./ZipFileWorker");c.generateWorker=function(p,m,g){var v=new f(m.streamFiles,g,m.platform,m.encodeFileName),y=0;try{p.forEach(function(j,b){y++;var E=(function(S,O){var D=S||O,M=u[D];if(!M)throw new Error(D+" is not a valid compression method !");return M})(b.options.compression,m.compression),N=b.options.compressionOptions||m.compressionOptions||{},A=b.dir,w=b.date;b._compressWorker(E,N).withStreamInfo("file",{name:j,dir:A,date:w,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(v)}),v.entriesCount=y}catch(j){v.error(j)}return v}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(l,o,c){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var f=new u;for(var p in this)typeof this[p]!="function"&&(f[p]=this[p]);return f}}(u.prototype=l("./object")).loadAsync=l("./load"),u.support=l("./support"),u.defaults=l("./defaults"),u.version="3.10.2",u.loadAsync=function(f,p){return new u().loadAsync(f,p)},u.external=l("./external"),o.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(l,o,c){var u=l("./utils"),f=l("./external"),p=l("./utf8"),m=l("./zipEntries"),g=l("./stream/Crc32Probe"),v=l("./nodejsUtils");function y(j){return new f.Promise(function(b,E){var N=j.decompressed.getContentWorker().pipe(new g);N.on("error",function(A){E(A)}).on("end",function(){N.streamInfo.crc32!==j.decompressed.crc32?E(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}o.exports=function(j,b){var E=this;return b=u.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:p.utf8decode}),v.isNode&&v.isStream(j)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",j,!0,b.optimizedBinaryString,b.base64).then(function(N){var A=new m(b);return A.load(N),A}).then(function(N){var A=[f.Promise.resolve(N)],w=N.files;if(b.checkCRC32)for(var S=0;S<w.length;S++)A.push(y(w[S]));return f.Promise.all(A)}).then(function(N){for(var A=N.shift(),w=A.files,S=0;S<w.length;S++){var O=w[S],D=O.fileNameStr,M=u.resolve(O.fileNameStr);E.file(M,O.decompressed,{binary:!0,optimizedBinaryString:!0,date:O.date,dir:O.dir,comment:O.fileCommentStr.length?O.fileCommentStr:null,unixPermissions:O.unixPermissions,dosPermissions:O.dosPermissions,createFolders:b.createFolders}),O.dir||(E.file(M).unsafeOriginalName=D)}return A.zipComment.length&&(E.comment=A.zipComment),E})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(l,o,c){var u=l("../utils"),f=l("../stream/GenericWorker");function p(m,g){f.call(this,"Nodejs stream input adapter for "+m),this._upstreamEnded=!1,this._bindStream(g)}u.inherits(p,f),p.prototype._bindStream=function(m){var g=this;(this._stream=m).pause(),m.on("data",function(v){g.push({data:v,meta:{percent:0}})}).on("error",function(v){g.isPaused?this.generatedError=v:g.error(v)}).on("end",function(){g.isPaused?g._upstreamEnded=!0:g.end()})},p.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=p},{"../stream/GenericWorker":28,"../utils":32}],13:[function(l,o,c){var u=l("readable-stream").Readable;function f(p,m,g){u.call(this,m),this._helper=p;var v=this;p.on("data",function(y,j){v.push(y)||v._helper.pause(),g&&g(j)}).on("error",function(y){v.emit("error",y)}).on("end",function(){v.push(null)})}l("../utils").inherits(f,u),f.prototype._read=function(){this._helper.resume()},o.exports=f},{"../utils":32,"readable-stream":16}],14:[function(l,o,c){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,f){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,f);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,f)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var f=new Buffer(u);return f.fill(0),f},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(l,o,c){function u(M,F,X){var Z,$=p.getTypeOf(F),B=p.extend(X||{},v);B.date=B.date||new Date,B.compression!==null&&(B.compression=B.compression.toUpperCase()),typeof B.unixPermissions=="string"&&(B.unixPermissions=parseInt(B.unixPermissions,8)),B.unixPermissions&&16384&B.unixPermissions&&(B.dir=!0),B.dosPermissions&&16&B.dosPermissions&&(B.dir=!0),B.dir&&(M=w(M)),B.createFolders&&(Z=A(M))&&S.call(this,Z,!0);var J=$==="string"&&B.binary===!1&&B.base64===!1;X&&X.binary!==void 0||(B.binary=!J),(F instanceof y&&F.uncompressedSize===0||B.dir||!F||F.length===0)&&(B.base64=!1,B.binary=!0,F="",B.compression="STORE",$="string");var z=null;z=F instanceof y||F instanceof m?F:E.isNode&&E.isStream(F)?new N(M,F):p.prepareContent(M,F,B.binary,B.optimizedBinaryString,B.base64);var H=new j(M,z,B);this.files[M]=H}var f=l("./utf8"),p=l("./utils"),m=l("./stream/GenericWorker"),g=l("./stream/StreamHelper"),v=l("./defaults"),y=l("./compressedObject"),j=l("./zipObject"),b=l("./generate"),E=l("./nodejsUtils"),N=l("./nodejs/NodejsStreamInputAdapter"),A=function(M){M.slice(-1)==="/"&&(M=M.substring(0,M.length-1));var F=M.lastIndexOf("/");return 0<F?M.substring(0,F):""},w=function(M){return M.slice(-1)!=="/"&&(M+="/"),M},S=function(M,F){return F=F!==void 0?F:v.createFolders,M=w(M),this.files[M]||u.call(this,M,null,{dir:!0,createFolders:F}),this.files[M]};function O(M){return Object.prototype.toString.call(M)==="[object RegExp]"}var D={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(M){var F,X,Z;for(F in this.files)Z=this.files[F],(X=F.slice(this.root.length,F.length))&&F.slice(0,this.root.length)===this.root&&M(X,Z)},filter:function(M){var F=[];return this.forEach(function(X,Z){M(X,Z)&&F.push(Z)}),F},file:function(M,F,X){if(arguments.length!==1)return M=this.root+M,u.call(this,M,F,X),this;if(O(M)){var Z=M;return this.filter(function(B,J){return!J.dir&&Z.test(B)})}var $=this.files[this.root+M];return $&&!$.dir?$:null},folder:function(M){if(!M)return this;if(O(M))return this.filter(function($,B){return B.dir&&M.test($)});var F=this.root+M,X=S.call(this,F),Z=this.clone();return Z.root=X.name,Z},remove:function(M){M=this.root+M;var F=this.files[M];if(F||(M.slice(-1)!=="/"&&(M+="/"),F=this.files[M]),F&&!F.dir)delete this.files[M];else for(var X=this.filter(function($,B){return B.name.slice(0,M.length)===M}),Z=0;Z<X.length;Z++)delete this.files[X[Z].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(M){var F,X={};try{if((X=p.extend(M||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:f.utf8encode})).type=X.type.toLowerCase(),X.compression=X.compression.toUpperCase(),X.type==="binarystring"&&(X.type="string"),!X.type)throw new Error("No output type specified.");p.checkSupport(X.type),X.platform!=="darwin"&&X.platform!=="freebsd"&&X.platform!=="linux"&&X.platform!=="sunos"||(X.platform="UNIX"),X.platform==="win32"&&(X.platform="DOS");var Z=X.comment||this.comment||"";F=b.generateWorker(this,X,Z)}catch($){(F=new m("error")).error($)}return new g(F,X.type||"string",X.mimeType)},generateAsync:function(M,F){return this.generateInternalStream(M).accumulate(F)},generateNodeStream:function(M,F){return(M=M||{}).type||(M.type="nodebuffer"),this.generateInternalStream(M).toNodejsStream(F)}};o.exports=D},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(l,o,c){o.exports=l("stream")},{stream:void 0}],17:[function(l,o,c){var u=l("./DataReader");function f(p){u.call(this,p);for(var m=0;m<this.data.length;m++)p[m]=255&p[m]}l("../utils").inherits(f,u),f.prototype.byteAt=function(p){return this.data[this.zero+p]},f.prototype.lastIndexOfSignature=function(p){for(var m=p.charCodeAt(0),g=p.charCodeAt(1),v=p.charCodeAt(2),y=p.charCodeAt(3),j=this.length-4;0<=j;--j)if(this.data[j]===m&&this.data[j+1]===g&&this.data[j+2]===v&&this.data[j+3]===y)return j-this.zero;return-1},f.prototype.readAndCheckSignature=function(p){var m=p.charCodeAt(0),g=p.charCodeAt(1),v=p.charCodeAt(2),y=p.charCodeAt(3),j=this.readData(4);return m===j[0]&&g===j[1]&&v===j[2]&&y===j[3]},f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],18:[function(l,o,c){var u=l("../utils");function f(p){this.data=p,this.length=p.length,this.index=0,this.zero=0}f.prototype={checkOffset:function(p){this.checkIndex(this.index+p)},checkIndex:function(p){if(this.length<this.zero+p||p<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+p+"). Corrupted zip ?")},setIndex:function(p){this.checkIndex(p),this.index=p},skip:function(p){this.setIndex(this.index+p)},byteAt:function(){},readInt:function(p){var m,g=0;for(this.checkOffset(p),m=this.index+p-1;m>=this.index;m--)g=(g<<8)+this.byteAt(m);return this.index+=p,g},readString:function(p){return u.transformTo("string",this.readData(p))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var p=this.readInt(4);return new Date(Date.UTC(1980+(p>>25&127),(p>>21&15)-1,p>>16&31,p>>11&31,p>>5&63,(31&p)<<1))}},o.exports=f},{"../utils":32}],19:[function(l,o,c){var u=l("./Uint8ArrayReader");function f(p){u.call(this,p)}l("../utils").inherits(f,u),f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(l,o,c){var u=l("./DataReader");function f(p){u.call(this,p)}l("../utils").inherits(f,u),f.prototype.byteAt=function(p){return this.data.charCodeAt(this.zero+p)},f.prototype.lastIndexOfSignature=function(p){return this.data.lastIndexOf(p)-this.zero},f.prototype.readAndCheckSignature=function(p){return p===this.readData(4)},f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],21:[function(l,o,c){var u=l("./ArrayReader");function f(p){u.call(this,p)}l("../utils").inherits(f,u),f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(l,o,c){var u=l("../utils"),f=l("../support"),p=l("./ArrayReader"),m=l("./StringReader"),g=l("./NodeBufferReader"),v=l("./Uint8ArrayReader");o.exports=function(y){var j=u.getTypeOf(y);return u.checkSupport(j),j!=="string"||f.uint8array?j==="nodebuffer"?new g(y):f.uint8array?new v(u.transformTo("uint8array",y)):new p(u.transformTo("array",y)):new m(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(l,o,c){c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(l,o,c){var u=l("./GenericWorker"),f=l("../utils");function p(m){u.call(this,"ConvertWorker to "+m),this.destType=m}f.inherits(p,u),p.prototype.processChunk=function(m){this.push({data:f.transformTo(this.destType,m.data),meta:m.meta})},o.exports=p},{"../utils":32,"./GenericWorker":28}],25:[function(l,o,c){var u=l("./GenericWorker"),f=l("../crc32");function p(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}l("../utils").inherits(p,u),p.prototype.processChunk=function(m){this.streamInfo.crc32=f(m.data,this.streamInfo.crc32||0),this.push(m)},o.exports=p},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(l,o,c){var u=l("../utils"),f=l("./GenericWorker");function p(m){f.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}u.inherits(p,f),p.prototype.processChunk=function(m){if(m){var g=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=g+m.data.length}f.prototype.processChunk.call(this,m)},o.exports=p},{"../utils":32,"./GenericWorker":28}],27:[function(l,o,c){var u=l("../utils"),f=l("./GenericWorker");function p(m){f.call(this,"DataWorker");var g=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(v){g.dataIsReady=!0,g.data=v,g.max=v&&v.length||0,g.type=u.getTypeOf(v),g.isPaused||g._tickAndRepeat()},function(v){g.error(v)})}u.inherits(p,f),p.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},p.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,g=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,g);break;case"uint8array":m=this.data.subarray(this.index,g);break;case"array":case"nodebuffer":m=this.data.slice(this.index,g)}return this.index=g,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=p},{"../utils":32,"./GenericWorker":28}],28:[function(l,o,c){function u(f){this.name=f||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(f){this.emit("data",f)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(f){this.emit("error",f)}return!0},error:function(f){return!this.isFinished&&(this.isPaused?this.generatedError=f:(this.isFinished=!0,this.emit("error",f),this.previous&&this.previous.error(f),this.cleanUp()),!0)},on:function(f,p){return this._listeners[f].push(p),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(f,p){if(this._listeners[f])for(var m=0;m<this._listeners[f].length;m++)this._listeners[f][m].call(this,p)},pipe:function(f){return f.registerPrevious(this)},registerPrevious:function(f){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=f.streamInfo,this.mergeStreamInfo(),this.previous=f;var p=this;return f.on("data",function(m){p.processChunk(m)}),f.on("end",function(){p.end()}),f.on("error",function(m){p.error(m)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var f=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),f=!0),this.previous&&this.previous.resume(),!f},flush:function(){},processChunk:function(f){this.push(f)},withStreamInfo:function(f,p){return this.extraStreamInfo[f]=p,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var f in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,f)&&(this.streamInfo[f]=this.extraStreamInfo[f])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var f="Worker "+this.name;return this.previous?this.previous+" -> "+f:f}},o.exports=u},{}],29:[function(l,o,c){var u=l("../utils"),f=l("./ConvertWorker"),p=l("./GenericWorker"),m=l("../base64"),g=l("../support"),v=l("../external"),y=null;if(g.nodestream)try{y=l("../nodejs/NodejsStreamOutputAdapter")}catch{}function j(E,N){return new v.Promise(function(A,w){var S=[],O=E._internalType,D=E._outputType,M=E._mimeType;E.on("data",function(F,X){S.push(F),N&&N(X)}).on("error",function(F){S=[],w(F)}).on("end",function(){try{var F=(function(X,Z,$){switch(X){case"blob":return u.newBlob(u.transformTo("arraybuffer",Z),$);case"base64":return m.encode(Z);default:return u.transformTo(X,Z)}})(D,(function(X,Z){var $,B=0,J=null,z=0;for($=0;$<Z.length;$++)z+=Z[$].length;switch(X){case"string":return Z.join("");case"array":return Array.prototype.concat.apply([],Z);case"uint8array":for(J=new Uint8Array(z),$=0;$<Z.length;$++)J.set(Z[$],B),B+=Z[$].length;return J;case"nodebuffer":return Buffer.concat(Z);default:throw new Error("concat : unsupported type '"+X+"'")}})(O,S),M);A(F)}catch(X){w(X)}S=[]}).resume()})}function b(E,N,A){var w=N;switch(N){case"blob":case"arraybuffer":w="uint8array";break;case"base64":w="string"}try{this._internalType=w,this._outputType=N,this._mimeType=A,u.checkSupport(w),this._worker=E.pipe(new f(w)),E.lock()}catch(S){this._worker=new p("error"),this._worker.error(S)}}b.prototype={accumulate:function(E){return j(this,E)},on:function(E,N){var A=this;return E==="data"?this._worker.on(E,function(w){N.call(A,w.data,w.meta)}):this._worker.on(E,function(){u.delay(N,arguments,A)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(E){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},E)}},o.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(l,o,c){if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",c.nodebuffer=typeof Buffer<"u",c.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")c.blob=!1;else{var u=new ArrayBuffer(0);try{c.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);f.append(u),c.blob=f.getBlob("application/zip").size===0}catch{c.blob=!1}}}try{c.nodestream=!!l("readable-stream").Readable}catch{c.nodestream=!1}},{"readable-stream":16}],31:[function(l,o,c){for(var u=l("./utils"),f=l("./support"),p=l("./nodejsUtils"),m=l("./stream/GenericWorker"),g=new Array(256),v=0;v<256;v++)g[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;g[254]=g[254]=1;function y(){m.call(this,"utf-8 decode"),this.leftOver=null}function j(){m.call(this,"utf-8 encode")}c.utf8encode=function(b){return f.nodebuffer?p.newBufferFrom(b,"utf-8"):(function(E){var N,A,w,S,O,D=E.length,M=0;for(S=0;S<D;S++)(64512&(A=E.charCodeAt(S)))==55296&&S+1<D&&(64512&(w=E.charCodeAt(S+1)))==56320&&(A=65536+(A-55296<<10)+(w-56320),S++),M+=A<128?1:A<2048?2:A<65536?3:4;for(N=f.uint8array?new Uint8Array(M):new Array(M),S=O=0;O<M;S++)(64512&(A=E.charCodeAt(S)))==55296&&S+1<D&&(64512&(w=E.charCodeAt(S+1)))==56320&&(A=65536+(A-55296<<10)+(w-56320),S++),A<128?N[O++]=A:(A<2048?N[O++]=192|A>>>6:(A<65536?N[O++]=224|A>>>12:(N[O++]=240|A>>>18,N[O++]=128|A>>>12&63),N[O++]=128|A>>>6&63),N[O++]=128|63&A);return N})(b)},c.utf8decode=function(b){return f.nodebuffer?u.transformTo("nodebuffer",b).toString("utf-8"):(function(E){var N,A,w,S,O=E.length,D=new Array(2*O);for(N=A=0;N<O;)if((w=E[N++])<128)D[A++]=w;else if(4<(S=g[w]))D[A++]=65533,N+=S-1;else{for(w&=S===2?31:S===3?15:7;1<S&&N<O;)w=w<<6|63&E[N++],S--;1<S?D[A++]=65533:w<65536?D[A++]=w:(w-=65536,D[A++]=55296|w>>10&1023,D[A++]=56320|1023&w)}return D.length!==A&&(D.subarray?D=D.subarray(0,A):D.length=A),u.applyFromCharCode(D)})(b=u.transformTo(f.uint8array?"uint8array":"array",b))},u.inherits(y,m),y.prototype.processChunk=function(b){var E=u.transformTo(f.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var N=E;(E=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),E.set(N,this.leftOver.length)}else E=this.leftOver.concat(E);this.leftOver=null}var A=(function(S,O){var D;for((O=O||S.length)>S.length&&(O=S.length),D=O-1;0<=D&&(192&S[D])==128;)D--;return D<0||D===0?O:D+g[S[D]]>O?D:O})(E),w=E;A!==E.length&&(f.uint8array?(w=E.subarray(0,A),this.leftOver=E.subarray(A,E.length)):(w=E.slice(0,A),this.leftOver=E.slice(A,E.length))),this.push({data:c.utf8decode(w),meta:b.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=y,u.inherits(j,m),j.prototype.processChunk=function(b){this.push({data:c.utf8encode(b.data),meta:b.meta})},c.Utf8EncodeWorker=j},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(l,o,c){var u=l("./support"),f=l("./base64"),p=l("./nodejsUtils"),m=l("./external");function g(N){return N}function v(N,A){for(var w=0;w<N.length;++w)A[w]=255&N.charCodeAt(w);return A}l("setimmediate"),c.newBlob=function(N,A){c.checkSupport("blob");try{return new Blob([N],{type:A})}catch{try{var w=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return w.append(N),w.getBlob(A)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(N,A,w){var S=[],O=0,D=N.length;if(D<=w)return String.fromCharCode.apply(null,N);for(;O<D;)A==="array"||A==="nodebuffer"?S.push(String.fromCharCode.apply(null,N.slice(O,Math.min(O+w,D)))):S.push(String.fromCharCode.apply(null,N.subarray(O,Math.min(O+w,D)))),O+=w;return S.join("")},stringifyByChar:function(N){for(var A="",w=0;w<N.length;w++)A+=String.fromCharCode(N[w]);return A},applyCanBeUsed:{uint8array:(function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,p.allocBuffer(1)).length===1}catch{return!1}})()}};function j(N){var A=65536,w=c.getTypeOf(N),S=!0;if(w==="uint8array"?S=y.applyCanBeUsed.uint8array:w==="nodebuffer"&&(S=y.applyCanBeUsed.nodebuffer),S)for(;1<A;)try{return y.stringifyByChunk(N,w,A)}catch{A=Math.floor(A/2)}return y.stringifyByChar(N)}function b(N,A){for(var w=0;w<N.length;w++)A[w]=N[w];return A}c.applyFromCharCode=j;var E={};E.string={string:g,array:function(N){return v(N,new Array(N.length))},arraybuffer:function(N){return E.string.uint8array(N).buffer},uint8array:function(N){return v(N,new Uint8Array(N.length))},nodebuffer:function(N){return v(N,p.allocBuffer(N.length))}},E.array={string:j,array:g,arraybuffer:function(N){return new Uint8Array(N).buffer},uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(N)}},E.arraybuffer={string:function(N){return j(new Uint8Array(N))},array:function(N){return b(new Uint8Array(N),new Array(N.byteLength))},arraybuffer:g,uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(new Uint8Array(N))}},E.uint8array={string:j,array:function(N){return b(N,new Array(N.length))},arraybuffer:function(N){return N.buffer},uint8array:g,nodebuffer:function(N){return p.newBufferFrom(N)}},E.nodebuffer={string:j,array:function(N){return b(N,new Array(N.length))},arraybuffer:function(N){return E.nodebuffer.uint8array(N).buffer},uint8array:function(N){return b(N,new Uint8Array(N.length))},nodebuffer:g},c.transformTo=function(N,A){if(A=A||"",!N)return A;c.checkSupport(N);var w=c.getTypeOf(A);return E[w][N](A)},c.resolve=function(N){for(var A=N.split("/"),w=[],S=0;S<A.length;S++){var O=A[S];O==="."||O===""&&S!==0&&S!==A.length-1||(O===".."?w.pop():w.push(O))}return w.join("/")},c.getTypeOf=function(N){if(typeof N=="string")return"string";var A=Object.prototype.toString.call(N);return A==="[object Array]"?"array":u.nodebuffer&&p.isBuffer(N)?"nodebuffer":u.uint8array&&A==="[object Uint8Array]"?"uint8array":u.arraybuffer&&A==="[object ArrayBuffer]"?"arraybuffer":void 0},c.checkSupport=function(N){if(!u[N.toLowerCase()])throw new Error(N+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(N){var A,w,S="";for(w=0;w<(N||"").length;w++)S+="\\x"+((A=N.charCodeAt(w))<16?"0":"")+A.toString(16).toUpperCase();return S},c.delay=function(N,A,w){setImmediate(function(){N.apply(w||null,A||[])})},c.inherits=function(N,A){function w(){}w.prototype=A.prototype,N.prototype=new w},c.extend=function(){var N,A,w={};for(N=0;N<arguments.length;N++)for(A in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],A)&&w[A]===void 0&&(w[A]=arguments[N][A]);return w},c.prepareContent=function(N,A,w,S,O){return m.Promise.resolve(A).then(function(D){return u.blob&&(D instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(D))!==-1)?Blob.prototype.arrayBuffer!==void 0?D.arrayBuffer():typeof FileReader<"u"?new m.Promise(function(M,F){var X=new FileReader;X.onload=function(Z){M(Z.target.result)},X.onerror=function(Z){F(Z.target.error)},X.readAsArrayBuffer(D)}):m.Promise.reject(new Error(N+" is a Blob, but we have no way of reading it.")):D}).then(function(D){var M=c.getTypeOf(D);return M?(M==="arraybuffer"?D=c.transformTo("uint8array",D):M==="string"&&(O?D=f.decode(D):w&&S!==!0&&(D=(function(F){return v(F,u.uint8array?new Uint8Array(F.length):new Array(F.length))})(D))),D):m.Promise.reject(new Error("Can't read the data of '"+N+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(l,o,c){var u=l("./reader/readerFor"),f=l("./utils"),p=l("./signature"),m=l("./zipEntry"),g=l("./support");function v(y){this.files=[],this.loadOptions=y}v.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var j=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(j)+", expected "+f.pretty(y)+")")}},isSignature:function(y,j){var b=this.reader.index;this.reader.setIndex(y);var E=this.reader.readString(4)===j;return this.reader.setIndex(b),E},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),j=g.uint8array?"uint8array":"array",b=f.transformTo(j,y);this.zipComment=this.loadOptions.decodeFileName(b)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,j,b,E=this.zip64EndOfCentralSize-44;0<E;)y=this.reader.readInt(2),j=this.reader.readInt(4),b=this.reader.readData(j),this.zip64ExtensibleData[y]={id:y,length:j,value:b}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,j;for(y=0;y<this.files.length;y++)j=this.files[y],this.reader.setIndex(j.localHeaderOffset),this.checkSignature(p.LOCAL_FILE_HEADER),j.readLocalPart(this.reader),j.handleUTF8(),j.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(p.CENTRAL_FILE_HEADER);)(y=new m({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(p.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,p.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var j=y;if(this.checkSignature(p.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,p.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var E=j-b;if(0<E)this.isSignature(j,p.CENTRAL_FILE_HEADER)||(this.reader.zero=E);else if(E<0)throw new Error("Corrupted zip: missing "+Math.abs(E)+" bytes.")},prepareReader:function(y){this.reader=u(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=v},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(l,o,c){var u=l("./reader/readerFor"),f=l("./utils"),p=l("./compressedObject"),m=l("./crc32"),g=l("./utf8"),v=l("./compressions"),y=l("./support");function j(b,E){this.options=b,this.loadOptions=E}j.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var E,N;if(b.skip(22),this.fileNameLength=b.readInt(2),N=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(N),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((E=(function(A){for(var w in v)if(Object.prototype.hasOwnProperty.call(v,w)&&v[w].magic===A)return v[w];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new p(this.compressedSize,this.uncompressedSize,this.crc32,E,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var E=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(E),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var b=u(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var E,N,A,w=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<w;)E=b.readInt(2),N=b.readInt(2),A=b.readData(N),this.extraFields[E]={id:E,length:N,value:A};b.setIndex(w)},handleUTF8:function(){var b=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=g.utf8decode(this.fileName),this.fileCommentStr=g.utf8decode(this.fileComment);else{var E=this.findExtraFieldUnicodePath();if(E!==null)this.fileNameStr=E;else{var N=f.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(N)}var A=this.findExtraFieldUnicodeComment();if(A!==null)this.fileCommentStr=A;else{var w=f.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(w)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var E=u(b.value);return E.readInt(1)!==1||m(this.fileName)!==E.readInt(4)?null:g.utf8decode(E.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var E=u(b.value);return E.readInt(1)!==1||m(this.fileComment)!==E.readInt(4)?null:g.utf8decode(E.readData(b.length-5))}return null}},o.exports=j},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(l,o,c){function u(E,N,A){this.name=E,this.dir=A.dir,this.date=A.date,this.comment=A.comment,this.unixPermissions=A.unixPermissions,this.dosPermissions=A.dosPermissions,this._data=N,this._dataBinary=A.binary,this.options={compression:A.compression,compressionOptions:A.compressionOptions}}var f=l("./stream/StreamHelper"),p=l("./stream/DataWorker"),m=l("./utf8"),g=l("./compressedObject"),v=l("./stream/GenericWorker");u.prototype={internalStream:function(E){var N=null,A="string";try{if(!E)throw new Error("No output type specified.");var w=(A=E.toLowerCase())==="string"||A==="text";A!=="binarystring"&&A!=="text"||(A="string"),N=this._decompressWorker();var S=!this._dataBinary;S&&!w&&(N=N.pipe(new m.Utf8EncodeWorker)),!S&&w&&(N=N.pipe(new m.Utf8DecodeWorker))}catch(O){(N=new v("error")).error(O)}return new f(N,A,"")},async:function(E,N){return this.internalStream(E).accumulate(N)},nodeStream:function(E,N){return this.internalStream(E||"nodebuffer").toNodejsStream(N)},_compressWorker:function(E,N){if(this._data instanceof g&&this._data.compression.magic===E.magic)return this._data.getCompressedWorker();var A=this._decompressWorker();return this._dataBinary||(A=A.pipe(new m.Utf8EncodeWorker)),g.createWorkerFrom(A,E,N)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof v?this._data:new p(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],j=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<y.length;b++)u.prototype[y[b]]=j;o.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(l,o,c){(function(u){var f,p,m=u.MutationObserver||u.WebKitMutationObserver;if(m){var g=0,v=new m(E),y=u.document.createTextNode("");v.observe(y,{characterData:!0}),f=function(){y.data=g=++g%2}}else if(u.setImmediate||u.MessageChannel===void 0)f="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var N=u.document.createElement("script");N.onreadystatechange=function(){E(),N.onreadystatechange=null,N.parentNode.removeChild(N),N=null},u.document.documentElement.appendChild(N)}:function(){setTimeout(E,0)};else{var j=new u.MessageChannel;j.port1.onmessage=E,f=function(){j.port2.postMessage(0)}}var b=[];function E(){var N,A;p=!0;for(var w=b.length;w;){for(A=b,b=[],N=-1;++N<w;)A[N]();w=b.length}p=!1}o.exports=function(N){b.push(N)!==1||p||f()}}).call(this,typeof mo<"u"?mo:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(l,o,c){var u=l("immediate");function f(){}var p={},m=["REJECTED"],g=["FULFILLED"],v=["PENDING"];function y(w){if(typeof w!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,w!==f&&N(this,w)}function j(w,S,O){this.promise=w,typeof S=="function"&&(this.onFulfilled=S,this.callFulfilled=this.otherCallFulfilled),typeof O=="function"&&(this.onRejected=O,this.callRejected=this.otherCallRejected)}function b(w,S,O){u(function(){var D;try{D=S(O)}catch(M){return p.reject(w,M)}D===w?p.reject(w,new TypeError("Cannot resolve promise with itself")):p.resolve(w,D)})}function E(w){var S=w&&w.then;if(w&&(typeof w=="object"||typeof w=="function")&&typeof S=="function")return function(){S.apply(w,arguments)}}function N(w,S){var O=!1;function D(X){O||(O=!0,p.reject(w,X))}function M(X){O||(O=!0,p.resolve(w,X))}var F=A(function(){S(M,D)});F.status==="error"&&D(F.value)}function A(w,S){var O={};try{O.value=w(S),O.status="success"}catch(D){O.status="error",O.value=D}return O}(o.exports=y).prototype.finally=function(w){if(typeof w!="function")return this;var S=this.constructor;return this.then(function(O){return S.resolve(w()).then(function(){return O})},function(O){return S.resolve(w()).then(function(){throw O})})},y.prototype.catch=function(w){return this.then(null,w)},y.prototype.then=function(w,S){if(typeof w!="function"&&this.state===g||typeof S!="function"&&this.state===m)return this;var O=new this.constructor(f);return this.state!==v?b(O,this.state===g?w:S,this.outcome):this.queue.push(new j(O,w,S)),O},j.prototype.callFulfilled=function(w){p.resolve(this.promise,w)},j.prototype.otherCallFulfilled=function(w){b(this.promise,this.onFulfilled,w)},j.prototype.callRejected=function(w){p.reject(this.promise,w)},j.prototype.otherCallRejected=function(w){b(this.promise,this.onRejected,w)},p.resolve=function(w,S){var O=A(E,S);if(O.status==="error")return p.reject(w,O.value);var D=O.value;if(D)N(w,D);else{w.state=g,w.outcome=S;for(var M=-1,F=w.queue.length;++M<F;)w.queue[M].callFulfilled(S)}return w},p.reject=function(w,S){w.state=m,w.outcome=S;for(var O=-1,D=w.queue.length;++O<D;)w.queue[O].callRejected(S);return w},y.resolve=function(w){return w instanceof this?w:p.resolve(new this(f),w)},y.reject=function(w){var S=new this(f);return p.reject(S,w)},y.all=function(w){var S=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=w.length,D=!1;if(!O)return this.resolve([]);for(var M=new Array(O),F=0,X=-1,Z=new this(f);++X<O;)$(w[X],X);return Z;function $(B,J){S.resolve(B).then(function(z){M[J]=z,++F!==O||D||(D=!0,p.resolve(Z,M))},function(z){D||(D=!0,p.reject(Z,z))})}},y.race=function(w){var S=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=w.length,D=!1;if(!O)return this.resolve([]);for(var M=-1,F=new this(f);++M<O;)X=w[M],S.resolve(X).then(function(Z){D||(D=!0,p.resolve(F,Z))},function(Z){D||(D=!0,p.reject(F,Z))});var X;return F}},{immediate:36}],38:[function(l,o,c){var u={};(0,l("./lib/utils/common").assign)(u,l("./lib/deflate"),l("./lib/inflate"),l("./lib/zlib/constants")),o.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(l,o,c){var u=l("./zlib/deflate"),f=l("./utils/common"),p=l("./utils/strings"),m=l("./zlib/messages"),g=l("./zlib/zstream"),v=Object.prototype.toString,y=0,j=-1,b=0,E=8;function N(w){if(!(this instanceof N))return new N(w);this.options=f.assign({level:j,method:E,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},w||{});var S=this.options;S.raw&&0<S.windowBits?S.windowBits=-S.windowBits:S.gzip&&0<S.windowBits&&S.windowBits<16&&(S.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var O=u.deflateInit2(this.strm,S.level,S.method,S.windowBits,S.memLevel,S.strategy);if(O!==y)throw new Error(m[O]);if(S.header&&u.deflateSetHeader(this.strm,S.header),S.dictionary){var D;if(D=typeof S.dictionary=="string"?p.string2buf(S.dictionary):v.call(S.dictionary)==="[object ArrayBuffer]"?new Uint8Array(S.dictionary):S.dictionary,(O=u.deflateSetDictionary(this.strm,D))!==y)throw new Error(m[O]);this._dict_set=!0}}function A(w,S){var O=new N(S);if(O.push(w,!0),O.err)throw O.msg||m[O.err];return O.result}N.prototype.push=function(w,S){var O,D,M=this.strm,F=this.options.chunkSize;if(this.ended)return!1;D=S===~~S?S:S===!0?4:0,typeof w=="string"?M.input=p.string2buf(w):v.call(w)==="[object ArrayBuffer]"?M.input=new Uint8Array(w):M.input=w,M.next_in=0,M.avail_in=M.input.length;do{if(M.avail_out===0&&(M.output=new f.Buf8(F),M.next_out=0,M.avail_out=F),(O=u.deflate(M,D))!==1&&O!==y)return this.onEnd(O),!(this.ended=!0);M.avail_out!==0&&(M.avail_in!==0||D!==4&&D!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(M.output,M.next_out))):this.onData(f.shrinkBuf(M.output,M.next_out)))}while((0<M.avail_in||M.avail_out===0)&&O!==1);return D===4?(O=u.deflateEnd(this.strm),this.onEnd(O),this.ended=!0,O===y):D!==2||(this.onEnd(y),!(M.avail_out=0))},N.prototype.onData=function(w){this.chunks.push(w)},N.prototype.onEnd=function(w){w===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=w,this.msg=this.strm.msg},c.Deflate=N,c.deflate=A,c.deflateRaw=function(w,S){return(S=S||{}).raw=!0,A(w,S)},c.gzip=function(w,S){return(S=S||{}).gzip=!0,A(w,S)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(l,o,c){var u=l("./zlib/inflate"),f=l("./utils/common"),p=l("./utils/strings"),m=l("./zlib/constants"),g=l("./zlib/messages"),v=l("./zlib/zstream"),y=l("./zlib/gzheader"),j=Object.prototype.toString;function b(N){if(!(this instanceof b))return new b(N);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},N||{});var A=this.options;A.raw&&0<=A.windowBits&&A.windowBits<16&&(A.windowBits=-A.windowBits,A.windowBits===0&&(A.windowBits=-15)),!(0<=A.windowBits&&A.windowBits<16)||N&&N.windowBits||(A.windowBits+=32),15<A.windowBits&&A.windowBits<48&&(15&A.windowBits)==0&&(A.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var w=u.inflateInit2(this.strm,A.windowBits);if(w!==m.Z_OK)throw new Error(g[w]);this.header=new y,u.inflateGetHeader(this.strm,this.header)}function E(N,A){var w=new b(A);if(w.push(N,!0),w.err)throw w.msg||g[w.err];return w.result}b.prototype.push=function(N,A){var w,S,O,D,M,F,X=this.strm,Z=this.options.chunkSize,$=this.options.dictionary,B=!1;if(this.ended)return!1;S=A===~~A?A:A===!0?m.Z_FINISH:m.Z_NO_FLUSH,typeof N=="string"?X.input=p.binstring2buf(N):j.call(N)==="[object ArrayBuffer]"?X.input=new Uint8Array(N):X.input=N,X.next_in=0,X.avail_in=X.input.length;do{if(X.avail_out===0&&(X.output=new f.Buf8(Z),X.next_out=0,X.avail_out=Z),(w=u.inflate(X,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&$&&(F=typeof $=="string"?p.string2buf($):j.call($)==="[object ArrayBuffer]"?new Uint8Array($):$,w=u.inflateSetDictionary(this.strm,F)),w===m.Z_BUF_ERROR&&B===!0&&(w=m.Z_OK,B=!1),w!==m.Z_STREAM_END&&w!==m.Z_OK)return this.onEnd(w),!(this.ended=!0);X.next_out&&(X.avail_out!==0&&w!==m.Z_STREAM_END&&(X.avail_in!==0||S!==m.Z_FINISH&&S!==m.Z_SYNC_FLUSH)||(this.options.to==="string"?(O=p.utf8border(X.output,X.next_out),D=X.next_out-O,M=p.buf2string(X.output,O),X.next_out=D,X.avail_out=Z-D,D&&f.arraySet(X.output,X.output,O,D,0),this.onData(M)):this.onData(f.shrinkBuf(X.output,X.next_out)))),X.avail_in===0&&X.avail_out===0&&(B=!0)}while((0<X.avail_in||X.avail_out===0)&&w!==m.Z_STREAM_END);return w===m.Z_STREAM_END&&(S=m.Z_FINISH),S===m.Z_FINISH?(w=u.inflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===m.Z_OK):S!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(X.avail_out=0))},b.prototype.onData=function(N){this.chunks.push(N)},b.prototype.onEnd=function(N){N===m.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg},c.Inflate=b,c.inflate=E,c.inflateRaw=function(N,A){return(A=A||{}).raw=!0,E(N,A)},c.ungzip=E},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(l,o,c){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";c.assign=function(m){for(var g=Array.prototype.slice.call(arguments,1);g.length;){var v=g.shift();if(v){if(typeof v!="object")throw new TypeError(v+"must be non-object");for(var y in v)v.hasOwnProperty(y)&&(m[y]=v[y])}}return m},c.shrinkBuf=function(m,g){return m.length===g?m:m.subarray?m.subarray(0,g):(m.length=g,m)};var f={arraySet:function(m,g,v,y,j){if(g.subarray&&m.subarray)m.set(g.subarray(v,v+y),j);else for(var b=0;b<y;b++)m[j+b]=g[v+b]},flattenChunks:function(m){var g,v,y,j,b,E;for(g=y=0,v=m.length;g<v;g++)y+=m[g].length;for(E=new Uint8Array(y),g=j=0,v=m.length;g<v;g++)b=m[g],E.set(b,j),j+=b.length;return E}},p={arraySet:function(m,g,v,y,j){for(var b=0;b<y;b++)m[j+b]=g[v+b]},flattenChunks:function(m){return[].concat.apply([],m)}};c.setTyped=function(m){m?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,f)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,p))},c.setTyped(u)},{}],42:[function(l,o,c){var u=l("./common"),f=!0,p=!0;try{String.fromCharCode.apply(null,[0])}catch{f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{p=!1}for(var m=new u.Buf8(256),g=0;g<256;g++)m[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;function v(y,j){if(j<65537&&(y.subarray&&p||!y.subarray&&f))return String.fromCharCode.apply(null,u.shrinkBuf(y,j));for(var b="",E=0;E<j;E++)b+=String.fromCharCode(y[E]);return b}m[254]=m[254]=1,c.string2buf=function(y){var j,b,E,N,A,w=y.length,S=0;for(N=0;N<w;N++)(64512&(b=y.charCodeAt(N)))==55296&&N+1<w&&(64512&(E=y.charCodeAt(N+1)))==56320&&(b=65536+(b-55296<<10)+(E-56320),N++),S+=b<128?1:b<2048?2:b<65536?3:4;for(j=new u.Buf8(S),N=A=0;A<S;N++)(64512&(b=y.charCodeAt(N)))==55296&&N+1<w&&(64512&(E=y.charCodeAt(N+1)))==56320&&(b=65536+(b-55296<<10)+(E-56320),N++),b<128?j[A++]=b:(b<2048?j[A++]=192|b>>>6:(b<65536?j[A++]=224|b>>>12:(j[A++]=240|b>>>18,j[A++]=128|b>>>12&63),j[A++]=128|b>>>6&63),j[A++]=128|63&b);return j},c.buf2binstring=function(y){return v(y,y.length)},c.binstring2buf=function(y){for(var j=new u.Buf8(y.length),b=0,E=j.length;b<E;b++)j[b]=y.charCodeAt(b);return j},c.buf2string=function(y,j){var b,E,N,A,w=j||y.length,S=new Array(2*w);for(b=E=0;b<w;)if((N=y[b++])<128)S[E++]=N;else if(4<(A=m[N]))S[E++]=65533,b+=A-1;else{for(N&=A===2?31:A===3?15:7;1<A&&b<w;)N=N<<6|63&y[b++],A--;1<A?S[E++]=65533:N<65536?S[E++]=N:(N-=65536,S[E++]=55296|N>>10&1023,S[E++]=56320|1023&N)}return v(S,E)},c.utf8border=function(y,j){var b;for((j=j||y.length)>y.length&&(j=y.length),b=j-1;0<=b&&(192&y[b])==128;)b--;return b<0||b===0?j:b+m[y[b]]>j?b:j}},{"./common":41}],43:[function(l,o,c){o.exports=function(u,f,p,m){for(var g=65535&u|0,v=u>>>16&65535|0,y=0;p!==0;){for(p-=y=2e3<p?2e3:p;v=v+(g=g+f[m++]|0)|0,--y;);g%=65521,v%=65521}return g|v<<16|0}},{}],44:[function(l,o,c){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(l,o,c){var u=(function(){for(var f,p=[],m=0;m<256;m++){f=m;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;p[m]=f}return p})();o.exports=function(f,p,m,g){var v=u,y=g+m;f^=-1;for(var j=g;j<y;j++)f=f>>>8^v[255&(f^p[j])];return-1^f}},{}],46:[function(l,o,c){var u,f=l("../utils/common"),p=l("./trees"),m=l("./adler32"),g=l("./crc32"),v=l("./messages"),y=0,j=4,b=0,E=-2,N=-1,A=4,w=2,S=8,O=9,D=286,M=30,F=19,X=2*D+1,Z=15,$=3,B=258,J=B+$+1,z=42,H=113,T=1,K=2,V=3,Q=4;function W(k,pe){return k.msg=v[pe],pe}function R(k){return(k<<1)-(4<k?9:0)}function Y(k){for(var pe=k.length;0<=--pe;)k[pe]=0}function x(k){var pe=k.state,ce=pe.pending;ce>k.avail_out&&(ce=k.avail_out),ce!==0&&(f.arraySet(k.output,pe.pending_buf,pe.pending_out,ce,k.next_out),k.next_out+=ce,pe.pending_out+=ce,k.total_out+=ce,k.avail_out-=ce,pe.pending-=ce,pe.pending===0&&(pe.pending_out=0))}function C(k,pe){p._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,pe),k.block_start=k.strstart,x(k.strm)}function q(k,pe){k.pending_buf[k.pending++]=pe}function I(k,pe){k.pending_buf[k.pending++]=pe>>>8&255,k.pending_buf[k.pending++]=255&pe}function ee(k,pe){var ce,G,P=k.max_chain_length,ne=k.strstart,xe=k.prev_length,ge=k.nice_match,se=k.strstart>k.w_size-J?k.strstart-(k.w_size-J):0,Te=k.window,Ee=k.w_mask,we=k.prev,ke=k.strstart+B,qe=Te[ne+xe-1],fe=Te[ne+xe];k.prev_length>=k.good_match&&(P>>=2),ge>k.lookahead&&(ge=k.lookahead);do if(Te[(ce=pe)+xe]===fe&&Te[ce+xe-1]===qe&&Te[ce]===Te[ne]&&Te[++ce]===Te[ne+1]){ne+=2,ce++;do;while(Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&ne<ke);if(G=B-(ke-ne),ne=ke-B,xe<G){if(k.match_start=pe,ge<=(xe=G))break;qe=Te[ne+xe-1],fe=Te[ne+xe]}}while((pe=we[pe&Ee])>se&&--P!=0);return xe<=k.lookahead?xe:k.lookahead}function he(k){var pe,ce,G,P,ne,xe,ge,se,Te,Ee,we=k.w_size;do{if(P=k.window_size-k.lookahead-k.strstart,k.strstart>=we+(we-J)){for(f.arraySet(k.window,k.window,we,we,0),k.match_start-=we,k.strstart-=we,k.block_start-=we,pe=ce=k.hash_size;G=k.head[--pe],k.head[pe]=we<=G?G-we:0,--ce;);for(pe=ce=we;G=k.prev[--pe],k.prev[pe]=we<=G?G-we:0,--ce;);P+=we}if(k.strm.avail_in===0)break;if(xe=k.strm,ge=k.window,se=k.strstart+k.lookahead,Te=P,Ee=void 0,Ee=xe.avail_in,Te<Ee&&(Ee=Te),ce=Ee===0?0:(xe.avail_in-=Ee,f.arraySet(ge,xe.input,xe.next_in,Ee,se),xe.state.wrap===1?xe.adler=m(xe.adler,ge,Ee,se):xe.state.wrap===2&&(xe.adler=g(xe.adler,ge,Ee,se)),xe.next_in+=Ee,xe.total_in+=Ee,Ee),k.lookahead+=ce,k.lookahead+k.insert>=$)for(ne=k.strstart-k.insert,k.ins_h=k.window[ne],k.ins_h=(k.ins_h<<k.hash_shift^k.window[ne+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[ne+$-1])&k.hash_mask,k.prev[ne&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=ne,ne++,k.insert--,!(k.lookahead+k.insert<$)););}while(k.lookahead<J&&k.strm.avail_in!==0)}function _e(k,pe){for(var ce,G;;){if(k.lookahead<J){if(he(k),k.lookahead<J&&pe===y)return T;if(k.lookahead===0)break}if(ce=0,k.lookahead>=$&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),ce!==0&&k.strstart-ce<=k.w_size-J&&(k.match_length=ee(k,ce)),k.match_length>=$)if(G=p._tr_tally(k,k.strstart-k.match_start,k.match_length-$),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=$){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else G=p._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(G&&(C(k,!1),k.strm.avail_out===0))return T}return k.insert=k.strstart<$-1?k.strstart:$-1,pe===j?(C(k,!0),k.strm.avail_out===0?V:Q):k.last_lit&&(C(k,!1),k.strm.avail_out===0)?T:K}function Ne(k,pe){for(var ce,G,P;;){if(k.lookahead<J){if(he(k),k.lookahead<J&&pe===y)return T;if(k.lookahead===0)break}if(ce=0,k.lookahead>=$&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=$-1,ce!==0&&k.prev_length<k.max_lazy_match&&k.strstart-ce<=k.w_size-J&&(k.match_length=ee(k,ce),k.match_length<=5&&(k.strategy===1||k.match_length===$&&4096<k.strstart-k.match_start)&&(k.match_length=$-1)),k.prev_length>=$&&k.match_length<=k.prev_length){for(P=k.strstart+k.lookahead-$,G=p._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-$),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=P&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=$-1,k.strstart++,G&&(C(k,!1),k.strm.avail_out===0))return T}else if(k.match_available){if((G=p._tr_tally(k,0,k.window[k.strstart-1]))&&C(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return T}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(G=p._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<$-1?k.strstart:$-1,pe===j?(C(k,!0),k.strm.avail_out===0?V:Q):k.last_lit&&(C(k,!1),k.strm.avail_out===0)?T:K}function le(k,pe,ce,G,P){this.good_length=k,this.max_lazy=pe,this.nice_length=ce,this.max_chain=G,this.func=P}function Ce(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=S,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new f.Buf16(2*X),this.dyn_dtree=new f.Buf16(2*(2*M+1)),this.bl_tree=new f.Buf16(2*(2*F+1)),Y(this.dyn_ltree),Y(this.dyn_dtree),Y(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new f.Buf16(Z+1),this.heap=new f.Buf16(2*D+1),Y(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*D+1),Y(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(k){var pe;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=w,(pe=k.state).pending=0,pe.pending_out=0,pe.wrap<0&&(pe.wrap=-pe.wrap),pe.status=pe.wrap?z:H,k.adler=pe.wrap===2?0:1,pe.last_flush=y,p._tr_init(pe),b):W(k,E)}function Fe(k){var pe=ye(k);return pe===b&&(function(ce){ce.window_size=2*ce.w_size,Y(ce.head),ce.max_lazy_match=u[ce.level].max_lazy,ce.good_match=u[ce.level].good_length,ce.nice_match=u[ce.level].nice_length,ce.max_chain_length=u[ce.level].max_chain,ce.strstart=0,ce.block_start=0,ce.lookahead=0,ce.insert=0,ce.match_length=ce.prev_length=$-1,ce.match_available=0,ce.ins_h=0})(k.state),pe}function Ue(k,pe,ce,G,P,ne){if(!k)return E;var xe=1;if(pe===N&&(pe=6),G<0?(xe=0,G=-G):15<G&&(xe=2,G-=16),P<1||O<P||ce!==S||G<8||15<G||pe<0||9<pe||ne<0||A<ne)return W(k,E);G===8&&(G=9);var ge=new Ce;return(k.state=ge).strm=k,ge.wrap=xe,ge.gzhead=null,ge.w_bits=G,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=P+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+$-1)/$),ge.window=new f.Buf8(2*ge.w_size),ge.head=new f.Buf16(ge.hash_size),ge.prev=new f.Buf16(ge.w_size),ge.lit_bufsize=1<<P+6,ge.pending_buf_size=4*ge.lit_bufsize,ge.pending_buf=new f.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=pe,ge.strategy=ne,ge.method=ce,Fe(k)}u=[new le(0,0,0,0,function(k,pe){var ce=65535;for(ce>k.pending_buf_size-5&&(ce=k.pending_buf_size-5);;){if(k.lookahead<=1){if(he(k),k.lookahead===0&&pe===y)return T;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var G=k.block_start+ce;if((k.strstart===0||k.strstart>=G)&&(k.lookahead=k.strstart-G,k.strstart=G,C(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-J&&(C(k,!1),k.strm.avail_out===0))return T}return k.insert=0,pe===j?(C(k,!0),k.strm.avail_out===0?V:Q):(k.strstart>k.block_start&&(C(k,!1),k.strm.avail_out),T)}),new le(4,4,8,4,_e),new le(4,5,16,8,_e),new le(4,6,32,32,_e),new le(4,4,16,16,Ne),new le(8,16,32,32,Ne),new le(8,16,128,128,Ne),new le(8,32,128,256,Ne),new le(32,128,258,1024,Ne),new le(32,258,258,4096,Ne)],c.deflateInit=function(k,pe){return Ue(k,pe,S,15,8,0)},c.deflateInit2=Ue,c.deflateReset=Fe,c.deflateResetKeep=ye,c.deflateSetHeader=function(k,pe){return k&&k.state?k.state.wrap!==2?E:(k.state.gzhead=pe,b):E},c.deflate=function(k,pe){var ce,G,P,ne;if(!k||!k.state||5<pe||pe<0)return k?W(k,E):E;if(G=k.state,!k.output||!k.input&&k.avail_in!==0||G.status===666&&pe!==j)return W(k,k.avail_out===0?-5:E);if(G.strm=k,ce=G.last_flush,G.last_flush=pe,G.status===z)if(G.wrap===2)k.adler=0,q(G,31),q(G,139),q(G,8),G.gzhead?(q(G,(G.gzhead.text?1:0)+(G.gzhead.hcrc?2:0)+(G.gzhead.extra?4:0)+(G.gzhead.name?8:0)+(G.gzhead.comment?16:0)),q(G,255&G.gzhead.time),q(G,G.gzhead.time>>8&255),q(G,G.gzhead.time>>16&255),q(G,G.gzhead.time>>24&255),q(G,G.level===9?2:2<=G.strategy||G.level<2?4:0),q(G,255&G.gzhead.os),G.gzhead.extra&&G.gzhead.extra.length&&(q(G,255&G.gzhead.extra.length),q(G,G.gzhead.extra.length>>8&255)),G.gzhead.hcrc&&(k.adler=g(k.adler,G.pending_buf,G.pending,0)),G.gzindex=0,G.status=69):(q(G,0),q(G,0),q(G,0),q(G,0),q(G,0),q(G,G.level===9?2:2<=G.strategy||G.level<2?4:0),q(G,3),G.status=H);else{var xe=S+(G.w_bits-8<<4)<<8;xe|=(2<=G.strategy||G.level<2?0:G.level<6?1:G.level===6?2:3)<<6,G.strstart!==0&&(xe|=32),xe+=31-xe%31,G.status=H,I(G,xe),G.strstart!==0&&(I(G,k.adler>>>16),I(G,65535&k.adler)),k.adler=1}if(G.status===69)if(G.gzhead.extra){for(P=G.pending;G.gzindex<(65535&G.gzhead.extra.length)&&(G.pending!==G.pending_buf_size||(G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),x(k),P=G.pending,G.pending!==G.pending_buf_size));)q(G,255&G.gzhead.extra[G.gzindex]),G.gzindex++;G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),G.gzindex===G.gzhead.extra.length&&(G.gzindex=0,G.status=73)}else G.status=73;if(G.status===73)if(G.gzhead.name){P=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),x(k),P=G.pending,G.pending===G.pending_buf_size)){ne=1;break}ne=G.gzindex<G.gzhead.name.length?255&G.gzhead.name.charCodeAt(G.gzindex++):0,q(G,ne)}while(ne!==0);G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),ne===0&&(G.gzindex=0,G.status=91)}else G.status=91;if(G.status===91)if(G.gzhead.comment){P=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),x(k),P=G.pending,G.pending===G.pending_buf_size)){ne=1;break}ne=G.gzindex<G.gzhead.comment.length?255&G.gzhead.comment.charCodeAt(G.gzindex++):0,q(G,ne)}while(ne!==0);G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),ne===0&&(G.status=103)}else G.status=103;if(G.status===103&&(G.gzhead.hcrc?(G.pending+2>G.pending_buf_size&&x(k),G.pending+2<=G.pending_buf_size&&(q(G,255&k.adler),q(G,k.adler>>8&255),k.adler=0,G.status=H)):G.status=H),G.pending!==0){if(x(k),k.avail_out===0)return G.last_flush=-1,b}else if(k.avail_in===0&&R(pe)<=R(ce)&&pe!==j)return W(k,-5);if(G.status===666&&k.avail_in!==0)return W(k,-5);if(k.avail_in!==0||G.lookahead!==0||pe!==y&&G.status!==666){var ge=G.strategy===2?(function(se,Te){for(var Ee;;){if(se.lookahead===0&&(he(se),se.lookahead===0)){if(Te===y)return T;break}if(se.match_length=0,Ee=p._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++,Ee&&(C(se,!1),se.strm.avail_out===0))return T}return se.insert=0,Te===j?(C(se,!0),se.strm.avail_out===0?V:Q):se.last_lit&&(C(se,!1),se.strm.avail_out===0)?T:K})(G,pe):G.strategy===3?(function(se,Te){for(var Ee,we,ke,qe,fe=se.window;;){if(se.lookahead<=B){if(he(se),se.lookahead<=B&&Te===y)return T;if(se.lookahead===0)break}if(se.match_length=0,se.lookahead>=$&&0<se.strstart&&(we=fe[ke=se.strstart-1])===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]){qe=se.strstart+B;do;while(we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&ke<qe);se.match_length=B-(qe-ke),se.match_length>se.lookahead&&(se.match_length=se.lookahead)}if(se.match_length>=$?(Ee=p._tr_tally(se,1,se.match_length-$),se.lookahead-=se.match_length,se.strstart+=se.match_length,se.match_length=0):(Ee=p._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++),Ee&&(C(se,!1),se.strm.avail_out===0))return T}return se.insert=0,Te===j?(C(se,!0),se.strm.avail_out===0?V:Q):se.last_lit&&(C(se,!1),se.strm.avail_out===0)?T:K})(G,pe):u[G.level].func(G,pe);if(ge!==V&&ge!==Q||(G.status=666),ge===T||ge===V)return k.avail_out===0&&(G.last_flush=-1),b;if(ge===K&&(pe===1?p._tr_align(G):pe!==5&&(p._tr_stored_block(G,0,0,!1),pe===3&&(Y(G.head),G.lookahead===0&&(G.strstart=0,G.block_start=0,G.insert=0))),x(k),k.avail_out===0))return G.last_flush=-1,b}return pe!==j?b:G.wrap<=0?1:(G.wrap===2?(q(G,255&k.adler),q(G,k.adler>>8&255),q(G,k.adler>>16&255),q(G,k.adler>>24&255),q(G,255&k.total_in),q(G,k.total_in>>8&255),q(G,k.total_in>>16&255),q(G,k.total_in>>24&255)):(I(G,k.adler>>>16),I(G,65535&k.adler)),x(k),0<G.wrap&&(G.wrap=-G.wrap),G.pending!==0?b:1)},c.deflateEnd=function(k){var pe;return k&&k.state?(pe=k.state.status)!==z&&pe!==69&&pe!==73&&pe!==91&&pe!==103&&pe!==H&&pe!==666?W(k,E):(k.state=null,pe===H?W(k,-3):b):E},c.deflateSetDictionary=function(k,pe){var ce,G,P,ne,xe,ge,se,Te,Ee=pe.length;if(!k||!k.state||(ne=(ce=k.state).wrap)===2||ne===1&&ce.status!==z||ce.lookahead)return E;for(ne===1&&(k.adler=m(k.adler,pe,Ee,0)),ce.wrap=0,Ee>=ce.w_size&&(ne===0&&(Y(ce.head),ce.strstart=0,ce.block_start=0,ce.insert=0),Te=new f.Buf8(ce.w_size),f.arraySet(Te,pe,Ee-ce.w_size,ce.w_size,0),pe=Te,Ee=ce.w_size),xe=k.avail_in,ge=k.next_in,se=k.input,k.avail_in=Ee,k.next_in=0,k.input=pe,he(ce);ce.lookahead>=$;){for(G=ce.strstart,P=ce.lookahead-($-1);ce.ins_h=(ce.ins_h<<ce.hash_shift^ce.window[G+$-1])&ce.hash_mask,ce.prev[G&ce.w_mask]=ce.head[ce.ins_h],ce.head[ce.ins_h]=G,G++,--P;);ce.strstart=G,ce.lookahead=$-1,he(ce)}return ce.strstart+=ce.lookahead,ce.block_start=ce.strstart,ce.insert=ce.lookahead,ce.lookahead=0,ce.match_length=ce.prev_length=$-1,ce.match_available=0,k.next_in=ge,k.input=se,k.avail_in=xe,ce.wrap=ne,b},c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(l,o,c){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(l,o,c){o.exports=function(u,f){var p,m,g,v,y,j,b,E,N,A,w,S,O,D,M,F,X,Z,$,B,J,z,H,T,K;p=u.state,m=u.next_in,T=u.input,g=m+(u.avail_in-5),v=u.next_out,K=u.output,y=v-(f-u.avail_out),j=v+(u.avail_out-257),b=p.dmax,E=p.wsize,N=p.whave,A=p.wnext,w=p.window,S=p.hold,O=p.bits,D=p.lencode,M=p.distcode,F=(1<<p.lenbits)-1,X=(1<<p.distbits)-1;e:do{O<15&&(S+=T[m++]<<O,O+=8,S+=T[m++]<<O,O+=8),Z=D[S&F];t:for(;;){if(S>>>=$=Z>>>24,O-=$,($=Z>>>16&255)===0)K[v++]=65535&Z;else{if(!(16&$)){if((64&$)==0){Z=D[(65535&Z)+(S&(1<<$)-1)];continue t}if(32&$){p.mode=12;break e}u.msg="invalid literal/length code",p.mode=30;break e}B=65535&Z,($&=15)&&(O<$&&(S+=T[m++]<<O,O+=8),B+=S&(1<<$)-1,S>>>=$,O-=$),O<15&&(S+=T[m++]<<O,O+=8,S+=T[m++]<<O,O+=8),Z=M[S&X];n:for(;;){if(S>>>=$=Z>>>24,O-=$,!(16&($=Z>>>16&255))){if((64&$)==0){Z=M[(65535&Z)+(S&(1<<$)-1)];continue n}u.msg="invalid distance code",p.mode=30;break e}if(J=65535&Z,O<($&=15)&&(S+=T[m++]<<O,(O+=8)<$&&(S+=T[m++]<<O,O+=8)),b<(J+=S&(1<<$)-1)){u.msg="invalid distance too far back",p.mode=30;break e}if(S>>>=$,O-=$,($=v-y)<J){if(N<($=J-$)&&p.sane){u.msg="invalid distance too far back",p.mode=30;break e}if(H=w,(z=0)===A){if(z+=E-$,$<B){for(B-=$;K[v++]=w[z++],--$;);z=v-J,H=K}}else if(A<$){if(z+=E+A-$,($-=A)<B){for(B-=$;K[v++]=w[z++],--$;);if(z=0,A<B){for(B-=$=A;K[v++]=w[z++],--$;);z=v-J,H=K}}}else if(z+=A-$,$<B){for(B-=$;K[v++]=w[z++],--$;);z=v-J,H=K}for(;2<B;)K[v++]=H[z++],K[v++]=H[z++],K[v++]=H[z++],B-=3;B&&(K[v++]=H[z++],1<B&&(K[v++]=H[z++]))}else{for(z=v-J;K[v++]=K[z++],K[v++]=K[z++],K[v++]=K[z++],2<(B-=3););B&&(K[v++]=K[z++],1<B&&(K[v++]=K[z++]))}break}}break}}while(m<g&&v<j);m-=B=O>>3,S&=(1<<(O-=B<<3))-1,u.next_in=m,u.next_out=v,u.avail_in=m<g?g-m+5:5-(m-g),u.avail_out=v<j?j-v+257:257-(v-j),p.hold=S,p.bits=O}},{}],49:[function(l,o,c){var u=l("../utils/common"),f=l("./adler32"),p=l("./crc32"),m=l("./inffast"),g=l("./inftrees"),v=1,y=2,j=0,b=-2,E=1,N=852,A=592;function w(z){return(z>>>24&255)+(z>>>8&65280)+((65280&z)<<8)+((255&z)<<24)}function S(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function O(z){var H;return z&&z.state?(H=z.state,z.total_in=z.total_out=H.total=0,z.msg="",H.wrap&&(z.adler=1&H.wrap),H.mode=E,H.last=0,H.havedict=0,H.dmax=32768,H.head=null,H.hold=0,H.bits=0,H.lencode=H.lendyn=new u.Buf32(N),H.distcode=H.distdyn=new u.Buf32(A),H.sane=1,H.back=-1,j):b}function D(z){var H;return z&&z.state?((H=z.state).wsize=0,H.whave=0,H.wnext=0,O(z)):b}function M(z,H){var T,K;return z&&z.state?(K=z.state,H<0?(T=0,H=-H):(T=1+(H>>4),H<48&&(H&=15)),H&&(H<8||15<H)?b:(K.window!==null&&K.wbits!==H&&(K.window=null),K.wrap=T,K.wbits=H,D(z))):b}function F(z,H){var T,K;return z?(K=new S,(z.state=K).window=null,(T=M(z,H))!==j&&(z.state=null),T):b}var X,Z,$=!0;function B(z){if($){var H;for(X=new u.Buf32(512),Z=new u.Buf32(32),H=0;H<144;)z.lens[H++]=8;for(;H<256;)z.lens[H++]=9;for(;H<280;)z.lens[H++]=7;for(;H<288;)z.lens[H++]=8;for(g(v,z.lens,0,288,X,0,z.work,{bits:9}),H=0;H<32;)z.lens[H++]=5;g(y,z.lens,0,32,Z,0,z.work,{bits:5}),$=!1}z.lencode=X,z.lenbits=9,z.distcode=Z,z.distbits=5}function J(z,H,T,K){var V,Q=z.state;return Q.window===null&&(Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new u.Buf8(Q.wsize)),K>=Q.wsize?(u.arraySet(Q.window,H,T-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(K<(V=Q.wsize-Q.wnext)&&(V=K),u.arraySet(Q.window,H,T-K,V,Q.wnext),(K-=V)?(u.arraySet(Q.window,H,T-K,K,0),Q.wnext=K,Q.whave=Q.wsize):(Q.wnext+=V,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave<Q.wsize&&(Q.whave+=V))),0}c.inflateReset=D,c.inflateReset2=M,c.inflateResetKeep=O,c.inflateInit=function(z){return F(z,15)},c.inflateInit2=F,c.inflate=function(z,H){var T,K,V,Q,W,R,Y,x,C,q,I,ee,he,_e,Ne,le,Ce,ye,Fe,Ue,k,pe,ce,G,P=0,ne=new u.Buf8(4),xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!z||!z.state||!z.output||!z.input&&z.avail_in!==0)return b;(T=z.state).mode===12&&(T.mode=13),W=z.next_out,V=z.output,Y=z.avail_out,Q=z.next_in,K=z.input,R=z.avail_in,x=T.hold,C=T.bits,q=R,I=Y,pe=j;e:for(;;)switch(T.mode){case E:if(T.wrap===0){T.mode=13;break}for(;C<16;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(2&T.wrap&&x===35615){ne[T.check=0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0),C=x=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&x)<<8)+(x>>8))%31){z.msg="incorrect header check",T.mode=30;break}if((15&x)!=8){z.msg="unknown compression method",T.mode=30;break}if(C-=4,k=8+(15&(x>>>=4)),T.wbits===0)T.wbits=k;else if(k>T.wbits){z.msg="invalid window size",T.mode=30;break}T.dmax=1<<k,z.adler=T.check=1,T.mode=512&x?10:12,C=x=0;break;case 2:for(;C<16;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(T.flags=x,(255&T.flags)!=8){z.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){z.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=x>>8&1),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0)),C=x=0,T.mode=3;case 3:for(;C<32;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}T.head&&(T.head.time=x),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,ne[2]=x>>>16&255,ne[3]=x>>>24&255,T.check=p(T.check,ne,4,0)),C=x=0,T.mode=4;case 4:for(;C<16;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}T.head&&(T.head.xflags=255&x,T.head.os=x>>8),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0)),C=x=0,T.mode=5;case 5:if(1024&T.flags){for(;C<16;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}T.length=x,T.head&&(T.head.extra_len=x),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0)),C=x=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(R<(ee=T.length)&&(ee=R),ee&&(T.head&&(k=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),u.arraySet(T.head.extra,K,Q,ee,k)),512&T.flags&&(T.check=p(T.check,K,ee,Q)),R-=ee,Q+=ee,T.length-=ee),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(R===0)break e;for(ee=0;k=K[Q+ee++],T.head&&k&&T.length<65536&&(T.head.name+=String.fromCharCode(k)),k&&ee<R;);if(512&T.flags&&(T.check=p(T.check,K,ee,Q)),R-=ee,Q+=ee,k)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(R===0)break e;for(ee=0;k=K[Q+ee++],T.head&&k&&T.length<65536&&(T.head.comment+=String.fromCharCode(k)),k&&ee<R;);if(512&T.flags&&(T.check=p(T.check,K,ee,Q)),R-=ee,Q+=ee,k)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;C<16;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(x!==(65535&T.check)){z.msg="header crc mismatch",T.mode=30;break}C=x=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),z.adler=T.check=0,T.mode=12;break;case 10:for(;C<32;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}z.adler=T.check=w(x),C=x=0,T.mode=11;case 11:if(T.havedict===0)return z.next_out=W,z.avail_out=Y,z.next_in=Q,z.avail_in=R,T.hold=x,T.bits=C,2;z.adler=T.check=1,T.mode=12;case 12:if(H===5||H===6)break e;case 13:if(T.last){x>>>=7&C,C-=7&C,T.mode=27;break}for(;C<3;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}switch(T.last=1&x,C-=1,3&(x>>>=1)){case 0:T.mode=14;break;case 1:if(B(T),T.mode=20,H!==6)break;x>>>=2,C-=2;break e;case 2:T.mode=17;break;case 3:z.msg="invalid block type",T.mode=30}x>>>=2,C-=2;break;case 14:for(x>>>=7&C,C-=7&C;C<32;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if((65535&x)!=(x>>>16^65535)){z.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&x,C=x=0,T.mode=15,H===6)break e;case 15:T.mode=16;case 16:if(ee=T.length){if(R<ee&&(ee=R),Y<ee&&(ee=Y),ee===0)break e;u.arraySet(V,K,Q,ee,W),R-=ee,Q+=ee,Y-=ee,W+=ee,T.length-=ee;break}T.mode=12;break;case 17:for(;C<14;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(T.nlen=257+(31&x),x>>>=5,C-=5,T.ndist=1+(31&x),x>>>=5,C-=5,T.ncode=4+(15&x),x>>>=4,C-=4,286<T.nlen||30<T.ndist){z.msg="too many length or distance symbols",T.mode=30;break}T.have=0,T.mode=18;case 18:for(;T.have<T.ncode;){for(;C<3;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}T.lens[xe[T.have++]]=7&x,x>>>=3,C-=3}for(;T.have<19;)T.lens[xe[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,ce={bits:T.lenbits},pe=g(0,T.lens,0,19,T.lencode,0,T.work,ce),T.lenbits=ce.bits,pe){z.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;le=(P=T.lencode[x&(1<<T.lenbits)-1])>>>16&255,Ce=65535&P,!((Ne=P>>>24)<=C);){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(Ce<16)x>>>=Ne,C-=Ne,T.lens[T.have++]=Ce;else{if(Ce===16){for(G=Ne+2;C<G;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(x>>>=Ne,C-=Ne,T.have===0){z.msg="invalid bit length repeat",T.mode=30;break}k=T.lens[T.have-1],ee=3+(3&x),x>>>=2,C-=2}else if(Ce===17){for(G=Ne+3;C<G;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}C-=Ne,k=0,ee=3+(7&(x>>>=Ne)),x>>>=3,C-=3}else{for(G=Ne+7;C<G;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}C-=Ne,k=0,ee=11+(127&(x>>>=Ne)),x>>>=7,C-=7}if(T.have+ee>T.nlen+T.ndist){z.msg="invalid bit length repeat",T.mode=30;break}for(;ee--;)T.lens[T.have++]=k}}if(T.mode===30)break;if(T.lens[256]===0){z.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,ce={bits:T.lenbits},pe=g(v,T.lens,0,T.nlen,T.lencode,0,T.work,ce),T.lenbits=ce.bits,pe){z.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,ce={bits:T.distbits},pe=g(y,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,ce),T.distbits=ce.bits,pe){z.msg="invalid distances set",T.mode=30;break}if(T.mode=20,H===6)break e;case 20:T.mode=21;case 21:if(6<=R&&258<=Y){z.next_out=W,z.avail_out=Y,z.next_in=Q,z.avail_in=R,T.hold=x,T.bits=C,m(z,I),W=z.next_out,V=z.output,Y=z.avail_out,Q=z.next_in,K=z.input,R=z.avail_in,x=T.hold,C=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;le=(P=T.lencode[x&(1<<T.lenbits)-1])>>>16&255,Ce=65535&P,!((Ne=P>>>24)<=C);){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(le&&(240&le)==0){for(ye=Ne,Fe=le,Ue=Ce;le=(P=T.lencode[Ue+((x&(1<<ye+Fe)-1)>>ye)])>>>16&255,Ce=65535&P,!(ye+(Ne=P>>>24)<=C);){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}x>>>=ye,C-=ye,T.back+=ye}if(x>>>=Ne,C-=Ne,T.back+=Ne,T.length=Ce,le===0){T.mode=26;break}if(32&le){T.back=-1,T.mode=12;break}if(64&le){z.msg="invalid literal/length code",T.mode=30;break}T.extra=15&le,T.mode=22;case 22:if(T.extra){for(G=T.extra;C<G;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}T.length+=x&(1<<T.extra)-1,x>>>=T.extra,C-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;le=(P=T.distcode[x&(1<<T.distbits)-1])>>>16&255,Ce=65535&P,!((Ne=P>>>24)<=C);){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if((240&le)==0){for(ye=Ne,Fe=le,Ue=Ce;le=(P=T.distcode[Ue+((x&(1<<ye+Fe)-1)>>ye)])>>>16&255,Ce=65535&P,!(ye+(Ne=P>>>24)<=C);){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}x>>>=ye,C-=ye,T.back+=ye}if(x>>>=Ne,C-=Ne,T.back+=Ne,64&le){z.msg="invalid distance code",T.mode=30;break}T.offset=Ce,T.extra=15&le,T.mode=24;case 24:if(T.extra){for(G=T.extra;C<G;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}T.offset+=x&(1<<T.extra)-1,x>>>=T.extra,C-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){z.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(Y===0)break e;if(ee=I-Y,T.offset>ee){if((ee=T.offset-ee)>T.whave&&T.sane){z.msg="invalid distance too far back",T.mode=30;break}he=ee>T.wnext?(ee-=T.wnext,T.wsize-ee):T.wnext-ee,ee>T.length&&(ee=T.length),_e=T.window}else _e=V,he=W-T.offset,ee=T.length;for(Y<ee&&(ee=Y),Y-=ee,T.length-=ee;V[W++]=_e[he++],--ee;);T.length===0&&(T.mode=21);break;case 26:if(Y===0)break e;V[W++]=T.length,Y--,T.mode=21;break;case 27:if(T.wrap){for(;C<32;){if(R===0)break e;R--,x|=K[Q++]<<C,C+=8}if(I-=Y,z.total_out+=I,T.total+=I,I&&(z.adler=T.check=T.flags?p(T.check,V,I,W-I):f(T.check,V,I,W-I)),I=Y,(T.flags?x:w(x))!==T.check){z.msg="incorrect data check",T.mode=30;break}C=x=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;C<32;){if(R===0)break e;R--,x+=K[Q++]<<C,C+=8}if(x!==(4294967295&T.total)){z.msg="incorrect length check",T.mode=30;break}C=x=0}T.mode=29;case 29:pe=1;break e;case 30:pe=-3;break e;case 31:return-4;default:return b}return z.next_out=W,z.avail_out=Y,z.next_in=Q,z.avail_in=R,T.hold=x,T.bits=C,(T.wsize||I!==z.avail_out&&T.mode<30&&(T.mode<27||H!==4))&&J(z,z.output,z.next_out,I-z.avail_out)?(T.mode=31,-4):(q-=z.avail_in,I-=z.avail_out,z.total_in+=q,z.total_out+=I,T.total+=I,T.wrap&&I&&(z.adler=T.check=T.flags?p(T.check,V,I,z.next_out-I):f(T.check,V,I,z.next_out-I)),z.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(q==0&&I===0||H===4)&&pe===j&&(pe=-5),pe)},c.inflateEnd=function(z){if(!z||!z.state)return b;var H=z.state;return H.window&&(H.window=null),z.state=null,j},c.inflateGetHeader=function(z,H){var T;return z&&z.state?(2&(T=z.state).wrap)==0?b:((T.head=H).done=!1,j):b},c.inflateSetDictionary=function(z,H){var T,K=H.length;return z&&z.state?(T=z.state).wrap!==0&&T.mode!==11?b:T.mode===11&&f(1,H,K,0)!==T.check?-3:J(z,H,K,K)?(T.mode=31,-4):(T.havedict=1,j):b},c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(l,o,c){var u=l("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],p=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(v,y,j,b,E,N,A,w){var S,O,D,M,F,X,Z,$,B,J=w.bits,z=0,H=0,T=0,K=0,V=0,Q=0,W=0,R=0,Y=0,x=0,C=null,q=0,I=new u.Buf16(16),ee=new u.Buf16(16),he=null,_e=0;for(z=0;z<=15;z++)I[z]=0;for(H=0;H<b;H++)I[y[j+H]]++;for(V=J,K=15;1<=K&&I[K]===0;K--);if(K<V&&(V=K),K===0)return E[N++]=20971520,E[N++]=20971520,w.bits=1,0;for(T=1;T<K&&I[T]===0;T++);for(V<T&&(V=T),z=R=1;z<=15;z++)if(R<<=1,(R-=I[z])<0)return-1;if(0<R&&(v===0||K!==1))return-1;for(ee[1]=0,z=1;z<15;z++)ee[z+1]=ee[z]+I[z];for(H=0;H<b;H++)y[j+H]!==0&&(A[ee[y[j+H]]++]=H);if(X=v===0?(C=he=A,19):v===1?(C=f,q-=257,he=p,_e-=257,256):(C=m,he=g,-1),z=T,F=N,W=H=x=0,D=-1,M=(Y=1<<(Q=V))-1,v===1&&852<Y||v===2&&592<Y)return 1;for(;;){for(Z=z-W,B=A[H]<X?($=0,A[H]):A[H]>X?($=he[_e+A[H]],C[q+A[H]]):($=96,0),S=1<<z-W,T=O=1<<Q;E[F+(x>>W)+(O-=S)]=Z<<24|$<<16|B|0,O!==0;);for(S=1<<z-1;x&S;)S>>=1;if(S!==0?(x&=S-1,x+=S):x=0,H++,--I[z]==0){if(z===K)break;z=y[j+A[H]]}if(V<z&&(x&M)!==D){for(W===0&&(W=V),F+=T,R=1<<(Q=z-W);Q+W<K&&!((R-=I[Q+W])<=0);)Q++,R<<=1;if(Y+=1<<Q,v===1&&852<Y||v===2&&592<Y)return 1;E[D=x&M]=V<<24|Q<<16|F-N|0}}return x!==0&&(E[F+x]=z-W<<24|64<<16|0),w.bits=V,0}},{"../utils/common":41}],51:[function(l,o,c){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(l,o,c){var u=l("../utils/common"),f=0,p=1;function m(P){for(var ne=P.length;0<=--ne;)P[ne]=0}var g=0,v=29,y=256,j=y+1+v,b=30,E=19,N=2*j+1,A=15,w=16,S=7,O=256,D=16,M=17,F=18,X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=new Array(2*(j+2));m(J);var z=new Array(2*b);m(z);var H=new Array(512);m(H);var T=new Array(256);m(T);var K=new Array(v);m(K);var V,Q,W,R=new Array(b);function Y(P,ne,xe,ge,se){this.static_tree=P,this.extra_bits=ne,this.extra_base=xe,this.elems=ge,this.max_length=se,this.has_stree=P&&P.length}function x(P,ne){this.dyn_tree=P,this.max_code=0,this.stat_desc=ne}function C(P){return P<256?H[P]:H[256+(P>>>7)]}function q(P,ne){P.pending_buf[P.pending++]=255&ne,P.pending_buf[P.pending++]=ne>>>8&255}function I(P,ne,xe){P.bi_valid>w-xe?(P.bi_buf|=ne<<P.bi_valid&65535,q(P,P.bi_buf),P.bi_buf=ne>>w-P.bi_valid,P.bi_valid+=xe-w):(P.bi_buf|=ne<<P.bi_valid&65535,P.bi_valid+=xe)}function ee(P,ne,xe){I(P,xe[2*ne],xe[2*ne+1])}function he(P,ne){for(var xe=0;xe|=1&P,P>>>=1,xe<<=1,0<--ne;);return xe>>>1}function _e(P,ne,xe){var ge,se,Te=new Array(A+1),Ee=0;for(ge=1;ge<=A;ge++)Te[ge]=Ee=Ee+xe[ge-1]<<1;for(se=0;se<=ne;se++){var we=P[2*se+1];we!==0&&(P[2*se]=he(Te[we]++,we))}}function Ne(P){var ne;for(ne=0;ne<j;ne++)P.dyn_ltree[2*ne]=0;for(ne=0;ne<b;ne++)P.dyn_dtree[2*ne]=0;for(ne=0;ne<E;ne++)P.bl_tree[2*ne]=0;P.dyn_ltree[2*O]=1,P.opt_len=P.static_len=0,P.last_lit=P.matches=0}function le(P){8<P.bi_valid?q(P,P.bi_buf):0<P.bi_valid&&(P.pending_buf[P.pending++]=P.bi_buf),P.bi_buf=0,P.bi_valid=0}function Ce(P,ne,xe,ge){var se=2*ne,Te=2*xe;return P[se]<P[Te]||P[se]===P[Te]&&ge[ne]<=ge[xe]}function ye(P,ne,xe){for(var ge=P.heap[xe],se=xe<<1;se<=P.heap_len&&(se<P.heap_len&&Ce(ne,P.heap[se+1],P.heap[se],P.depth)&&se++,!Ce(ne,ge,P.heap[se],P.depth));)P.heap[xe]=P.heap[se],xe=se,se<<=1;P.heap[xe]=ge}function Fe(P,ne,xe){var ge,se,Te,Ee,we=0;if(P.last_lit!==0)for(;ge=P.pending_buf[P.d_buf+2*we]<<8|P.pending_buf[P.d_buf+2*we+1],se=P.pending_buf[P.l_buf+we],we++,ge===0?ee(P,se,ne):(ee(P,(Te=T[se])+y+1,ne),(Ee=X[Te])!==0&&I(P,se-=K[Te],Ee),ee(P,Te=C(--ge),xe),(Ee=Z[Te])!==0&&I(P,ge-=R[Te],Ee)),we<P.last_lit;);ee(P,O,ne)}function Ue(P,ne){var xe,ge,se,Te=ne.dyn_tree,Ee=ne.stat_desc.static_tree,we=ne.stat_desc.has_stree,ke=ne.stat_desc.elems,qe=-1;for(P.heap_len=0,P.heap_max=N,xe=0;xe<ke;xe++)Te[2*xe]!==0?(P.heap[++P.heap_len]=qe=xe,P.depth[xe]=0):Te[2*xe+1]=0;for(;P.heap_len<2;)Te[2*(se=P.heap[++P.heap_len]=qe<2?++qe:0)]=1,P.depth[se]=0,P.opt_len--,we&&(P.static_len-=Ee[2*se+1]);for(ne.max_code=qe,xe=P.heap_len>>1;1<=xe;xe--)ye(P,Te,xe);for(se=ke;xe=P.heap[1],P.heap[1]=P.heap[P.heap_len--],ye(P,Te,1),ge=P.heap[1],P.heap[--P.heap_max]=xe,P.heap[--P.heap_max]=ge,Te[2*se]=Te[2*xe]+Te[2*ge],P.depth[se]=(P.depth[xe]>=P.depth[ge]?P.depth[xe]:P.depth[ge])+1,Te[2*xe+1]=Te[2*ge+1]=se,P.heap[1]=se++,ye(P,Te,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],(function(fe,ze){var $e,Ve,rt,et,ht,pt,Oe=ze.dyn_tree,Et=ze.max_code,Tt=ze.stat_desc.static_tree,Ze=ze.stat_desc.has_stree,dt=ze.stat_desc.extra_bits,st=ze.stat_desc.extra_base,Ut=ze.stat_desc.max_length,mt=0;for(et=0;et<=A;et++)fe.bl_count[et]=0;for(Oe[2*fe.heap[fe.heap_max]+1]=0,$e=fe.heap_max+1;$e<N;$e++)Ut<(et=Oe[2*Oe[2*(Ve=fe.heap[$e])+1]+1]+1)&&(et=Ut,mt++),Oe[2*Ve+1]=et,Et<Ve||(fe.bl_count[et]++,ht=0,st<=Ve&&(ht=dt[Ve-st]),pt=Oe[2*Ve],fe.opt_len+=pt*(et+ht),Ze&&(fe.static_len+=pt*(Tt[2*Ve+1]+ht)));if(mt!==0){do{for(et=Ut-1;fe.bl_count[et]===0;)et--;fe.bl_count[et]--,fe.bl_count[et+1]+=2,fe.bl_count[Ut]--,mt-=2}while(0<mt);for(et=Ut;et!==0;et--)for(Ve=fe.bl_count[et];Ve!==0;)Et<(rt=fe.heap[--$e])||(Oe[2*rt+1]!==et&&(fe.opt_len+=(et-Oe[2*rt+1])*Oe[2*rt],Oe[2*rt+1]=et),Ve--)}})(P,ne),_e(Te,qe,P.bl_count)}function k(P,ne,xe){var ge,se,Te=-1,Ee=ne[1],we=0,ke=7,qe=4;for(Ee===0&&(ke=138,qe=3),ne[2*(xe+1)+1]=65535,ge=0;ge<=xe;ge++)se=Ee,Ee=ne[2*(ge+1)+1],++we<ke&&se===Ee||(we<qe?P.bl_tree[2*se]+=we:se!==0?(se!==Te&&P.bl_tree[2*se]++,P.bl_tree[2*D]++):we<=10?P.bl_tree[2*M]++:P.bl_tree[2*F]++,Te=se,qe=(we=0)===Ee?(ke=138,3):se===Ee?(ke=6,3):(ke=7,4))}function pe(P,ne,xe){var ge,se,Te=-1,Ee=ne[1],we=0,ke=7,qe=4;for(Ee===0&&(ke=138,qe=3),ge=0;ge<=xe;ge++)if(se=Ee,Ee=ne[2*(ge+1)+1],!(++we<ke&&se===Ee)){if(we<qe)for(;ee(P,se,P.bl_tree),--we!=0;);else se!==0?(se!==Te&&(ee(P,se,P.bl_tree),we--),ee(P,D,P.bl_tree),I(P,we-3,2)):we<=10?(ee(P,M,P.bl_tree),I(P,we-3,3)):(ee(P,F,P.bl_tree),I(P,we-11,7));Te=se,qe=(we=0)===Ee?(ke=138,3):se===Ee?(ke=6,3):(ke=7,4)}}m(R);var ce=!1;function G(P,ne,xe,ge){I(P,(g<<1)+(ge?1:0),3),(function(se,Te,Ee,we){le(se),q(se,Ee),q(se,~Ee),u.arraySet(se.pending_buf,se.window,Te,Ee,se.pending),se.pending+=Ee})(P,ne,xe)}c._tr_init=function(P){ce||((function(){var ne,xe,ge,se,Te,Ee=new Array(A+1);for(se=ge=0;se<v-1;se++)for(K[se]=ge,ne=0;ne<1<<X[se];ne++)T[ge++]=se;for(T[ge-1]=se,se=Te=0;se<16;se++)for(R[se]=Te,ne=0;ne<1<<Z[se];ne++)H[Te++]=se;for(Te>>=7;se<b;se++)for(R[se]=Te<<7,ne=0;ne<1<<Z[se]-7;ne++)H[256+Te++]=se;for(xe=0;xe<=A;xe++)Ee[xe]=0;for(ne=0;ne<=143;)J[2*ne+1]=8,ne++,Ee[8]++;for(;ne<=255;)J[2*ne+1]=9,ne++,Ee[9]++;for(;ne<=279;)J[2*ne+1]=7,ne++,Ee[7]++;for(;ne<=287;)J[2*ne+1]=8,ne++,Ee[8]++;for(_e(J,j+1,Ee),ne=0;ne<b;ne++)z[2*ne+1]=5,z[2*ne]=he(ne,5);V=new Y(J,X,y+1,j,A),Q=new Y(z,Z,0,b,A),W=new Y(new Array(0),$,0,E,S)})(),ce=!0),P.l_desc=new x(P.dyn_ltree,V),P.d_desc=new x(P.dyn_dtree,Q),P.bl_desc=new x(P.bl_tree,W),P.bi_buf=0,P.bi_valid=0,Ne(P)},c._tr_stored_block=G,c._tr_flush_block=function(P,ne,xe,ge){var se,Te,Ee=0;0<P.level?(P.strm.data_type===2&&(P.strm.data_type=(function(we){var ke,qe=4093624447;for(ke=0;ke<=31;ke++,qe>>>=1)if(1&qe&&we.dyn_ltree[2*ke]!==0)return f;if(we.dyn_ltree[18]!==0||we.dyn_ltree[20]!==0||we.dyn_ltree[26]!==0)return p;for(ke=32;ke<y;ke++)if(we.dyn_ltree[2*ke]!==0)return p;return f})(P)),Ue(P,P.l_desc),Ue(P,P.d_desc),Ee=(function(we){var ke;for(k(we,we.dyn_ltree,we.l_desc.max_code),k(we,we.dyn_dtree,we.d_desc.max_code),Ue(we,we.bl_desc),ke=E-1;3<=ke&&we.bl_tree[2*B[ke]+1]===0;ke--);return we.opt_len+=3*(ke+1)+5+5+4,ke})(P),se=P.opt_len+3+7>>>3,(Te=P.static_len+3+7>>>3)<=se&&(se=Te)):se=Te=xe+5,xe+4<=se&&ne!==-1?G(P,ne,xe,ge):P.strategy===4||Te===se?(I(P,2+(ge?1:0),3),Fe(P,J,z)):(I(P,4+(ge?1:0),3),(function(we,ke,qe,fe){var ze;for(I(we,ke-257,5),I(we,qe-1,5),I(we,fe-4,4),ze=0;ze<fe;ze++)I(we,we.bl_tree[2*B[ze]+1],3);pe(we,we.dyn_ltree,ke-1),pe(we,we.dyn_dtree,qe-1)})(P,P.l_desc.max_code+1,P.d_desc.max_code+1,Ee+1),Fe(P,P.dyn_ltree,P.dyn_dtree)),Ne(P),ge&&le(P)},c._tr_tally=function(P,ne,xe){return P.pending_buf[P.d_buf+2*P.last_lit]=ne>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&ne,P.pending_buf[P.l_buf+P.last_lit]=255&xe,P.last_lit++,ne===0?P.dyn_ltree[2*xe]++:(P.matches++,ne--,P.dyn_ltree[2*(T[xe]+y+1)]++,P.dyn_dtree[2*C(ne)]++),P.last_lit===P.lit_bufsize-1},c._tr_align=function(P){I(P,2,3),ee(P,O,J),(function(ne){ne.bi_valid===16?(q(ne,ne.bi_buf),ne.bi_buf=0,ne.bi_valid=0):8<=ne.bi_valid&&(ne.pending_buf[ne.pending++]=255&ne.bi_buf,ne.bi_buf>>=8,ne.bi_valid-=8)})(P)}},{"../utils/common":41}],53:[function(l,o,c){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(l,o,c){(function(u){(function(f,p){if(!f.setImmediate){var m,g,v,y,j=1,b={},E=!1,N=f.document,A=Object.getPrototypeOf&&Object.getPrototypeOf(f);A=A&&A.setTimeout?A:f,m={}.toString.call(f.process)==="[object process]"?function(D){process.nextTick(function(){S(D)})}:(function(){if(f.postMessage&&!f.importScripts){var D=!0,M=f.onmessage;return f.onmessage=function(){D=!1},f.postMessage("","*"),f.onmessage=M,D}})()?(y="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",O,!1):f.attachEvent("onmessage",O),function(D){f.postMessage(y+D,"*")}):f.MessageChannel?((v=new MessageChannel).port1.onmessage=function(D){S(D.data)},function(D){v.port2.postMessage(D)}):N&&"onreadystatechange"in N.createElement("script")?(g=N.documentElement,function(D){var M=N.createElement("script");M.onreadystatechange=function(){S(D),M.onreadystatechange=null,g.removeChild(M),M=null},g.appendChild(M)}):function(D){setTimeout(S,0,D)},A.setImmediate=function(D){typeof D!="function"&&(D=new Function(""+D));for(var M=new Array(arguments.length-1),F=0;F<M.length;F++)M[F]=arguments[F+1];var X={callback:D,args:M};return b[j]=X,m(j),j++},A.clearImmediate=w}function w(D){delete b[D]}function S(D){if(E)setTimeout(S,0,D);else{var M=b[D];if(M){E=!0;try{(function(F){var X=F.callback,Z=F.args;switch(Z.length){case 0:X();break;case 1:X(Z[0]);break;case 2:X(Z[0],Z[1]);break;case 3:X(Z[0],Z[1],Z[2]);break;default:X.apply(p,Z)}})(M)}finally{w(D),E=!1}}}}function O(D){D.source===f&&typeof D.data=="string"&&D.data.indexOf(y)===0&&S(+D.data.slice(y.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof mo<"u"?mo:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Hd)),Hd.exports}var uT=cT();const dT=Pv(uT),Bv=()=>({id:`BUG-${Date.now().toString().slice(-6)}`,title:"",severity:"medium",status:"open",actualResult:"",expectedResult:"",stepsToReproduce:"",attachments:[],createdAt:new Date().toISOString()});function fT({reports:a,testCases:s,onSave:l,onDelete:o}){const{ui:c}=Le(),[u,f]=L.useState(),[p,m]=L.useState(!1);async function g(){m(!0);try{const v=new dT;v.file("bug-reports.csv",mT(a));for(const E of a)for(const N of E.attachments)v.file(`attachments/${Ho(E.id)}/${Ho(N.name)}`,N.dataUrl.split(",")[1]??"",{base64:!0});const y=await v.generateAsync({type:"blob"}),j=URL.createObjectURL(y),b=document.createElement("a");b.href=j,b.download=`lazyscout-bug-reports-${new Date().toISOString().slice(0,10)}.zip`,b.click(),URL.revokeObjectURL(j)}finally{m(!1)}}return n.jsxs("section",{className:"bug-reports",children:[n.jsxs("div",{className:"bug-reports-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:c("Defect tracking")}),n.jsx("h3",{children:c("Bug Reports")}),n.jsx("p",{children:c("Capture reproducible issues and keep screenshots with the local project.")})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!a.length||p,onClick:()=>{g()},children:c(p?"Creating ZIP…":"Export ZIP + images")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>f(Bv()),children:c("+ Add Bug Report")})]})]}),a.length?n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"bug-report-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:c("Bug ID")}),n.jsx("th",{children:c("Title")}),n.jsx("th",{children:c("Test Case")}),n.jsx("th",{children:c("Severity")}),n.jsx("th",{children:c("Status")}),n.jsx("th",{children:c("Evidence")}),n.jsx("th",{children:c("Actions")})]})}),n.jsx("tbody",{children:a.map(v=>n.jsxs("tr",{children:[n.jsx("td",{children:v.id}),n.jsxs("td",{children:[n.jsx("b",{children:v.title||c("Untitled bug")}),n.jsx("small",{children:new Date(v.createdAt).toLocaleDateString()})]}),n.jsx("td",{children:v.testCaseId||"—"}),n.jsx("td",{children:n.jsx("span",{className:`bug-severity ${v.severity}`,children:v.severity})}),n.jsx("td",{children:n.jsx("span",{className:"bug-status",children:v.status})}),n.jsxs("td",{children:[v.attachments.length," ",c("screenshot"),v.attachments.length===1?"":"s"]}),n.jsx("td",{children:n.jsxs("div",{className:"flex justify-center gap-1",children:[n.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>f(v),children:c("Edit")}),n.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>o(v.id),children:c("Delete")})]})})]},v.id))})]})}):n.jsxs("div",{className:"bug-empty",children:[n.jsx("b",{children:c("No Bug Reports yet")}),n.jsx("span",{children:c("When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here.")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>f(Bv()),children:c("Create first Bug Report")})]}),u&&n.jsx(hT,{report:u,testCases:s,onClose:()=>f(void 0),onSave:v=>{l(v),f(void 0)}})]})}function hT({report:a,testCases:s,onSave:l,onClose:o}){const{ui:c}=Le(),[u,f]=L.useState(a);async function p(m){const g=[...m.target.files??[]].filter(y=>y.type.startsWith("image/")).slice(0,5),v=await Promise.all(g.map(async y=>({name:y.name,type:y.type,dataUrl:await pT(y)})));f(y=>({...y,attachments:[...y.attachments,...v]}))}return n.jsx("div",{className:"modern-modal-backdrop",children:n.jsxs("section",{className:"modern-modal bug-editor",role:"dialog","aria-modal":"true","aria-labelledby":"bug-editor-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:c("Bug Report")}),n.jsx("h2",{id:"bug-editor-title",children:u.id}),n.jsx("p",{children:c("Describe the defect so another person can reproduce it quickly.")})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":c("Close"),onClick:o,children:"×"})]}),n.jsxs("div",{className:"bug-editor-body",children:[n.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_150px_150px]",children:[n.jsxs("label",{children:[n.jsx("span",{children:c("Title")}),n.jsx("input",{className:"field",value:u.title,onChange:m=>f({...u,title:m.target.value}),placeholder:c("What went wrong?")})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Severity")}),n.jsxs("select",{className:"field",value:u.severity,onChange:m=>f({...u,severity:m.target.value}),children:[n.jsx("option",{value:"critical",children:c("critical")}),n.jsx("option",{value:"high",children:c("high")}),n.jsx("option",{value:"medium",children:c("medium")}),n.jsx("option",{value:"low",children:c("low")})]})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Status")}),n.jsxs("select",{className:"field",value:u.status,onChange:m=>f({...u,status:m.target.value}),children:[n.jsx("option",{value:"open",children:c("open")}),n.jsx("option",{value:"in-progress",children:c("in-progress")}),n.jsx("option",{value:"resolved",children:c("resolved")})]})]})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Related Test Case")}),n.jsxs("select",{className:"field",value:u.testCaseId??"",onChange:m=>f({...u,testCaseId:m.target.value||void 0}),children:[n.jsx("option",{value:"",children:c("Not linked")}),s.map(m=>n.jsxs("option",{value:m.id,children:[m.id," · ",m.title]},m.id))]})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Steps to reproduce")}),n.jsx("textarea",{className:"field",rows:4,value:u.stepsToReproduce,onChange:m=>f({...u,stepsToReproduce:m.target.value}),placeholder:c(`1. Open…
61
+ transfer`}),n.jsx("p",{className:"click-filter-help",children:l("One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control.")}),n.jsxs("div",{className:"recorder-actions",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(pv([...new Set([...a.keywords,...Dy])])),children:l("Add suggested words")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(""),children:l("Clear list")})]})]})]})}const AC={"not-configured":["No session saved","ยังไม่มีเซสชัน"],recorded:["Session saved — not verified yet","บันทึกแล้ว — ยังไม่ได้ตรวจสอบ"],verifying:["Checking…","กำลังตรวจสอบ…"],ready:["Ready — a protected page opened","พร้อมใช้ — เปิดหน้าที่ต้องล็อกอินได้"],expired:["Expired — sign in again","หมดอายุ — ต้องเข้าสู่ระบบใหม่"],invalid:["Unusable — record the login again","ใช้ไม่ได้ — บันทึกการเข้าสู่ระบบใหม่"]};function No(a){return a instanceof Error?a.message:String(a)}function OC({projectName:a,projectId:s,targetUrl:l,secrets:o,onSave:c,onClear:u,onClose:f,onSaveRecording:p,clickFilter:m,onChangeClickFilter:g,initialTab:v="credentials"}){const{ui:y,language:S}=Le(),b=S==="th",[E,N]=L.useState(v),[A,w]=L.useState(o),[j,R]=L.useState(),[O,M]=L.useState(!1),[F,X]=L.useState(!1),[Z,$]=L.useState(!1),[B,J]=L.useState(!1),[z,H]=L.useState(!1),[T,K]=L.useState(!1),[V,Q]=L.useState(),[W,D]=L.useState(""),[Y,x]=L.useState(!1),C=(ye,Ge)=>w(Me=>({...Me,[ye]:Ge||void 0})),q=j?.status??"not-configured",I=j?.loginBrowserOpen??T,ee=F||Z||B,he=q!=="not-configured",_e=!he||q==="expired"||q==="invalid",Ne=JSON.stringify(A)!==JSON.stringify(o),le=j?.detail??(j?.verifiedAt?`${b?"ตรวจล่าสุด":"Last verified"} ${new Date(j.verifiedAt).toLocaleString()}${j.verifiedPath?` · ${j.verifiedPath}`:""}`:j?.capturedAt?`${b?"บันทึกเมื่อ":"Captured"} ${new Date(j.capturedAt).toLocaleString()}`:b?"ยังไม่ได้บันทึกเซสชัน สำหรับโปรเจกต์นี้":"No session has been recorded for this Project yet.");async function Ce(){if(s){M(!0);try{R(await k0(s))}catch{R(void 0)}finally{M(!1)}}}return L.useEffect(()=>{Ce()},[s]),n.jsx("div",{className:"modal-backdrop",role:"presentation",onMouseDown:ye=>{ye.target===ye.currentTarget&&f()},children:n.jsxs("section",{className:"modal-card project-settings-modal",role:"dialog","aria-modal":"true","aria-labelledby":"project-settings-title",children:[n.jsxs("div",{className:"modal-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:b?"ตั้งค่าโปรเจกต์":"Project settings"}),n.jsx("h2",{id:"project-settings-title",children:E==="credentials"?b?"ข้อมูลสำหรับทดสอบ":"Test credentials":E==="session"?"Browser session":E==="safety"?b?"กฎความปลอดภัย":"Safety rules":b?"บันทึกขั้นตอน":"Record a flow"}),n.jsxs("p",{className:"settings-project-context",title:a,children:[a??(b?"โปรเจกต์ปัจจุบัน":"Current project")," ·"," ",b?"ตั้งค่าทีละหมวด":"Configure one task at a time"]})]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":y("Close"),children:"×"})]}),n.jsxs("div",{className:"modal-body",children:[n.jsx("nav",{className:"settings-tabs","aria-label":y("Project settings sections"),children:[["credentials",b?"ข้อมูลทดสอบ":"Credentials",b?"ตัวแปรสำหรับเข้าสู่ระบบและเรียก API":"Variables used by login and API steps"],["session",b?"เซสชันเบราว์เซอร์":"Browser Session",b?"Google, SSO และ Cookie ที่บันทึกไว้":"Google, SSO, and saved cookies"],["safety",b?"ความปลอดภัย":"Safety",b?"ป้องกันการคลิกที่มีความเสี่ยง":"Block risky clicks and actions"],["recorder",b?"บันทึกขั้นตอน":"Recorder",b?"เก็บการคลิกและการพิมพ์เป็นขั้นตอนทดสอบ":"Turn your browser actions into Test Steps"]].map(([ye,Ge,Me])=>n.jsx("button",{type:"button",title:Me,"aria-label":`${Ge} — ${Me}`,className:E===ye?"is-active":"","aria-pressed":E===ye,onClick:()=>N(ye),children:n.jsx("b",{children:Ge})},ye))}),E==="credentials"&&n.jsxs("div",{className:"settings-section",children:[n.jsxs("div",{className:"settings-notice",children:[n.jsx("b",{children:b?"เก็บในหน่วยความจำเท่านั้น":"Memory only"}),n.jsx("span",{children:b?"ข้อมูลจะอยู่ในแท็บนี้เท่านั้น ถูกล้างเมื่อ Refresh และไม่ถูกเขียนลง Test Case หรือ Log":"Values stay in this browser tab, are cleared on refresh and are never written to Test Cases or logs."})]}),n.jsxs("div",{className:"settings-grid",children:[n.jsxs("label",{children:[n.jsx("span",{children:y("Email")}),n.jsx("input",{type:"email",value:A.email??"",onChange:ye=>C("email",ye.target.value),placeholder:y("Test email"),autoComplete:"off"})]}),n.jsxs("label",{children:[n.jsx("span",{children:y("Username")}),n.jsx("input",{value:A.username??"",onChange:ye=>C("username",ye.target.value),placeholder:y("Test username"),autoComplete:"off"})]}),n.jsxs("label",{children:[n.jsx("span",{children:y("Password")}),n.jsx("input",{type:"password",value:A.password??"",onChange:ye=>C("password",ye.target.value),placeholder:y("Test password"),autoComplete:"off"})]}),n.jsxs("label",{children:[n.jsx("span",{children:y("API Token")}),n.jsx("input",{type:"password",value:A.apiToken??"",onChange:ye=>C("apiToken",ye.target.value),placeholder:y("API token"),autoComplete:"off"})]})]}),n.jsxs("p",{className:"settings-help",children:[y("Use")," ",n.jsx("code",{children:"{{TEST_PASSWORD}}"}),", ",n.jsx("code",{children:"{{TEST_EMAIL}}"}),","," ",n.jsx("code",{children:"{{TEST_USERNAME}}"})," ",y("or")," ",n.jsx("code",{children:"{{API_TOKEN}}"})," ",y("in a Test Case. Values are passed to the runner only while it runs.")]}),n.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[n.jsx("b",{children:b?"วิธีใช้ข้อมูลทดสอบกับ Guided Flow":"How to connect credentials to Guided Flow"}),n.jsxs("span",{children:[b?"ในขั้นตอน Fill ให้เว้น Value ว่าง แล้วใส่ ":"In a Fill step, leave Value empty and put ",n.jsx("code",{children:"TEST_USERNAME"}),", ",n.jsx("code",{children:"TEST_PASSWORD"}),", ",b?"หรือ":"or"," ",n.jsx("code",{children:"TEST_EMAIL"})," ",b?"ใน Value reference โดย LazyScout จะแทนค่าตอนรันเท่านั้น":"in Value reference. LazyScout replaces the reference only during the run."]})]})]}),E==="session"&&s&&l&&n.jsxs("div",{className:"auth-panel",children:[n.jsxs("div",{className:`auth-state auth-state-${q}`,"aria-live":"polite",children:[n.jsx("span",{className:"auth-state-dot"}),n.jsxs("div",{children:[n.jsx("b",{children:AC[q][b?1:0]}),n.jsx("small",{children:le})]}),n.jsx("span",{className:"auth-state-badge",children:q})]}),_e&&!I&&n.jsxs("ol",{className:"auth-steps",children:[n.jsx("li",{children:b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ แล้วเข้าสู่ระบบ":"Open the login browser and sign in"}),n.jsx("li",{children:b?"กดบันทึกเซสชัน":"Capture the session"}),n.jsx("li",{children:b?"ตรวจสอบเซสชันกับหน้าที่ต้องเข้าสู่ระบบ":"Verify against a page that requires a login"})]}),I&&n.jsx("p",{className:"settings-help",role:"status",children:b?"เข้าสู่ระบบในหน้าต่างเบราว์เซอร์ที่เปิดแยกไว้ แล้วกลับมากดบันทึกเซสชัน โดยเปิดหน้าต่างนั้นค้างไว้":"Sign in in the separate browser window. Leave it open and return here to click Capture session."}),q==="recorded"&&!I&&n.jsx("p",{className:"settings-help",children:b?"บันทึกเซสชัน แล้ว ใส่ path ของหน้าที่ต้องล็อกอิน แล้วกดตรวจสอบ":"The session is saved. Enter a path that requires login, then click Verify."}),he&&n.jsxs("dl",{className:"auth-session-facts",children:[n.jsxs("div",{children:[n.jsx("dt",{children:b?"Cookie":"Cookies"}),n.jsxs("dd",{children:[j?.cookieCount??0,j?.sessionCookieCount?` (${j.sessionCookieCount} session)`:""]})]}),n.jsxs("div",{children:[n.jsx("dt",{children:b?"Origin":"Origins"}),n.jsx("dd",{children:j?.originCount??0})]}),n.jsxs("div",{children:[n.jsx("dt",{children:"sessionStorage"}),n.jsx("dd",{children:j?.sessionStorageOriginCount??0})]}),n.jsxs("div",{children:[n.jsx("dt",{children:"IndexedDB"}),n.jsx("dd",{children:j?.indexedDb?b?"รวม":"included":b?"ไม่รองรับ":"unsupported"})]})]}),j?.browserModeMismatch&&n.jsx("p",{className:"auth-warn",children:b?"Session ถูกบันทึกคนละโหมดเบราว์เซอร์กับที่ใช้รัน บางเว็บจะปฏิเสธ":"Captured in a different browser mode from the one runs use. Some applications reject that."}),j?.lockedBy&&n.jsx("p",{className:"auth-warn",children:b?`กำลังถูกใช้โดย ${j.lockedBy} — รันพร้อมกันสองตัวจะทำให้ session หลุด`:`Held by ${j.lockedBy}. Running two at once on one session signs both out.`}),n.jsxs("div",{className:"auth-session-actions",children:[n.jsx("button",{type:"button",className:_e&&!I?"btn btn-primary":"btn btn-secondary",disabled:F||ee,onClick:async()=>{X(!0),Q(void 0);try{await E0(s,l),K(!0),await Ce()}catch(ye){Q(No(ye))}finally{X(!1)}},children:F?b?"กำลังเปิด…":"Opening…":b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ":"Open login browser"}),n.jsx("button",{type:"button",className:I?"btn btn-primary":"btn btn-secondary",disabled:!I||ee,title:I?void 0:b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ และเข้าสู่ระบบก่อน":"Open the login browser and sign in first",onClick:async()=>{$(!0),Q(void 0);try{R(await A0(s)),K(!1)}catch(ye){Q(No(ye))}finally{$(!1)}},children:Z?b?"กำลังบันทึก…":"Capturing…":b?"บันทึกเซสชัน":"Capture session"}),I&&n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:Z,onClick:async()=>{Q(void 0);try{await O0(s),K(!1),await Ce()}catch(ye){Q(No(ye))}},children:b?"ยกเลิกการเข้าสู่ระบบ":"Cancel sign-in"})]}),n.jsxs("label",{className:"auth-verify-row",children:[n.jsx("span",{children:b?"หน้าที่ต้องล็อกอิน (เช่น /dashboard)":"A path that requires a login (e.g. /dashboard)"}),n.jsxs("div",{children:[n.jsx("input",{value:W,onChange:ye=>D(ye.target.value),placeholder:"/dashboard",autoComplete:"off"}),n.jsx("button",{type:"button",className:q==="recorded"&&!I?"btn btn-primary":"btn btn-secondary",disabled:ee||I||!he||!W.trim(),title:I?b?"บันทึกเซสชัน จากหน้าต่างที่เปิดก่อน":"Capture the session from the open browser first":he?W.trim()?void 0:b?"ใส่ path ของหน้าที่ต้องล็อกอิน":"Enter a path that requires a login":b?"บันทึกเซสชัน ก่อน":"Capture a session first",onClick:async()=>{J(!0),Q(void 0);try{const ye=new URL(W||"/",l).toString();R(await R0(s,ye))}catch(ye){Q(No(ye))}finally{J(!1)}},children:B?b?"กำลังตรวจ…":"Verifying…":b?"ตรวจสอบ":"Verify"})]})]}),V&&n.jsx("p",{className:"auth-session-error",children:V}),n.jsxs("div",{className:"auth-session-actions auth-session-secondary",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:O,onClick:()=>{Ce()},children:O?b?"กำลังเช็ก…":"Checking…":b?"รีเฟรชสถานะ":"Refresh status"}),z?n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>{await z0(s),H(!1),K(!1),await Ce()},children:b?"ยืนยันล้าง":"Confirm clear"}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>H(!1),children:b?"ยกเลิก":"Cancel"})]}):n.jsx("button",{type:"button",className:"btn btn-danger",disabled:ee,onClick:()=>H(!0),children:b?"ล้างเซสชัน":"Clear login session"})]}),n.jsx("small",{className:"auth-session-hint",children:b?"สถานะจะเป็น ready ก็ต่อเมื่อเปิดหน้าที่ต้องล็อกอินได้จริงเท่านั้น การมีโฟลเดอร์อยู่ไม่ได้แปลว่า login ยังใช้ได้ · เคสที่บันทึกการ Login ไว้ต้องล้างเซสชัน ก่อนถึงจะ replay ได้":"The status reaches ready only when a protected page actually opens — a saved folder never meant a working login. A recorded login Test Case needs the session cleared before it can replay."})]}),E==="session"&&(!s||!l)&&n.jsxs("div",{className:"settings-empty-state",children:[n.jsx("b",{children:b?"Scout เว็บไซต์ก่อน":"Scout a website first"}),n.jsx("span",{children:b?"ต้องมี Target URL ก่อน LazyScout จึงจะสร้าง Browser Session ที่ใช้ซ้ำได้":"A target URL is required before LazyScout can create a reusable browser session."})]}),E==="safety"&&n.jsx(kC,{filter:m,onChange:g}),E==="recorder"&&s&&l&&p&&n.jsx(Ky,{projectId:s,targetUrl:l,onSaveRecording:p}),E==="recorder"&&(!s||!l)&&n.jsxs("div",{className:"settings-empty-state",children:[n.jsx("b",{children:b?"เพิ่ม Target URL ก่อน":"Add a target URL first"}),n.jsx("span",{children:b?"Scout เว็บไซต์หนึ่งครั้ง แล้วกลับมาบันทึก Login และ Business Flow ที่นี่":"Scout a website once, then return here to record login and business flows."})]})]}),n.jsxs("div",{className:"modal-footer",children:[E==="credentials"&&n.jsx("button",{type:"button",className:"btn btn-secondary mr-auto",onClick:()=>{u(),w({}),x(!1)},children:b?"ล้างข้อมูลทดสอบ":"Clear secrets"}),Y&&!Ne&&n.jsx("span",{className:"settings-saved",role:"status",children:b?"บันทึกแล้ว":"Saved"}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:f,children:b?"ปิด":"Close"}),(Ne||E==="credentials")&&n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!Ne,title:Ne?void 0:b?"ยังไม่มีการแก้ไข":"Nothing has changed",onClick:()=>{c(A),x(!0)},children:b?"บันทึกข้อมูลทดสอบ":"Save credentials"})]})]})})}var Nd={exports:{}},mv;function RC(){return mv||(mv=1,(function(a){var s=(function(l){var o=Object.prototype,c=o.hasOwnProperty,u=Object.defineProperty||function(D,Y,x){D[Y]=x.value},f,p=typeof Symbol=="function"?Symbol:{},m=p.iterator||"@@iterator",g=p.asyncIterator||"@@asyncIterator",v=p.toStringTag||"@@toStringTag";function y(D,Y,x){return Object.defineProperty(D,Y,{value:x,enumerable:!0,configurable:!0,writable:!0}),D[Y]}try{y({},"")}catch{y=function(Y,x,C){return Y[x]=C}}function S(D,Y,x,C){var q=Y&&Y.prototype instanceof R?Y:R,I=Object.create(q.prototype),ee=new V(C||[]);return u(I,"_invoke",{value:z(D,x,ee)}),I}l.wrap=S;function b(D,Y,x){try{return{type:"normal",arg:D.call(Y,x)}}catch(C){return{type:"throw",arg:C}}}var E="suspendedStart",N="suspendedYield",A="executing",w="completed",j={};function R(){}function O(){}function M(){}var F={};y(F,m,function(){return this});var X=Object.getPrototypeOf,Z=X&&X(X(Q([])));Z&&Z!==o&&c.call(Z,m)&&(F=Z);var $=M.prototype=R.prototype=Object.create(F);O.prototype=M,u($,"constructor",{value:M,configurable:!0}),u(M,"constructor",{value:O,configurable:!0}),O.displayName=y(M,v,"GeneratorFunction");function B(D){["next","throw","return"].forEach(function(Y){y(D,Y,function(x){return this._invoke(Y,x)})})}l.isGeneratorFunction=function(D){var Y=typeof D=="function"&&D.constructor;return Y?Y===O||(Y.displayName||Y.name)==="GeneratorFunction":!1},l.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,M):(D.__proto__=M,y(D,v,"GeneratorFunction")),D.prototype=Object.create($),D},l.awrap=function(D){return{__await:D}};function J(D,Y){function x(I,ee,he,_e){var Ne=b(D[I],D,ee);if(Ne.type==="throw")_e(Ne.arg);else{var le=Ne.arg,Ce=le.value;return Ce&&typeof Ce=="object"&&c.call(Ce,"__await")?Y.resolve(Ce.__await).then(function(ye){x("next",ye,he,_e)},function(ye){x("throw",ye,he,_e)}):Y.resolve(Ce).then(function(ye){le.value=ye,he(le)},function(ye){return x("throw",ye,he,_e)})}}var C;function q(I,ee){function he(){return new Y(function(_e,Ne){x(I,ee,_e,Ne)})}return C=C?C.then(he,he):he()}u(this,"_invoke",{value:q})}B(J.prototype),y(J.prototype,g,function(){return this}),l.AsyncIterator=J,l.async=function(D,Y,x,C,q){q===void 0&&(q=Promise);var I=new J(S(D,Y,x,C),q);return l.isGeneratorFunction(Y)?I:I.next().then(function(ee){return ee.done?ee.value:I.next()})};function z(D,Y,x){var C=E;return function(I,ee){if(C===A)throw new Error("Generator is already running");if(C===w){if(I==="throw")throw ee;return W()}for(x.method=I,x.arg=ee;;){var he=x.delegate;if(he){var _e=H(he,x);if(_e){if(_e===j)continue;return _e}}if(x.method==="next")x.sent=x._sent=x.arg;else if(x.method==="throw"){if(C===E)throw C=w,x.arg;x.dispatchException(x.arg)}else x.method==="return"&&x.abrupt("return",x.arg);C=A;var Ne=b(D,Y,x);if(Ne.type==="normal"){if(C=x.done?w:N,Ne.arg===j)continue;return{value:Ne.arg,done:x.done}}else Ne.type==="throw"&&(C=w,x.method="throw",x.arg=Ne.arg)}}}function H(D,Y){var x=Y.method,C=D.iterator[x];if(C===f)return Y.delegate=null,x==="throw"&&D.iterator.return&&(Y.method="return",Y.arg=f,H(D,Y),Y.method==="throw")||x!=="return"&&(Y.method="throw",Y.arg=new TypeError("The iterator does not provide a '"+x+"' method")),j;var q=b(C,D.iterator,Y.arg);if(q.type==="throw")return Y.method="throw",Y.arg=q.arg,Y.delegate=null,j;var I=q.arg;if(!I)return Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,j;if(I.done)Y[D.resultName]=I.value,Y.next=D.nextLoc,Y.method!=="return"&&(Y.method="next",Y.arg=f);else return I;return Y.delegate=null,j}B($),y($,v,"Generator"),y($,m,function(){return this}),y($,"toString",function(){return"[object Generator]"});function T(D){var Y={tryLoc:D[0]};1 in D&&(Y.catchLoc=D[1]),2 in D&&(Y.finallyLoc=D[2],Y.afterLoc=D[3]),this.tryEntries.push(Y)}function K(D){var Y=D.completion||{};Y.type="normal",delete Y.arg,D.completion=Y}function V(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(T,this),this.reset(!0)}l.keys=function(D){var Y=Object(D),x=[];for(var C in Y)x.push(C);return x.reverse(),function q(){for(;x.length;){var I=x.pop();if(I in Y)return q.value=I,q.done=!1,q}return q.done=!0,q}};function Q(D){if(D){var Y=D[m];if(Y)return Y.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var x=-1,C=function q(){for(;++x<D.length;)if(c.call(D,x))return q.value=D[x],q.done=!1,q;return q.value=f,q.done=!0,q};return C.next=C}}return{next:W}}l.values=Q;function W(){return{value:f,done:!0}}return V.prototype={constructor:V,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(K),!D)for(var Y in this)Y.charAt(0)==="t"&&c.call(this,Y)&&!isNaN(+Y.slice(1))&&(this[Y]=f)},stop:function(){this.done=!0;var D=this.tryEntries[0],Y=D.completion;if(Y.type==="throw")throw Y.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var Y=this;function x(_e,Ne){return I.type="throw",I.arg=D,Y.next=_e,Ne&&(Y.method="next",Y.arg=f),!!Ne}for(var C=this.tryEntries.length-1;C>=0;--C){var q=this.tryEntries[C],I=q.completion;if(q.tryLoc==="root")return x("end");if(q.tryLoc<=this.prev){var ee=c.call(q,"catchLoc"),he=c.call(q,"finallyLoc");if(ee&&he){if(this.prev<q.catchLoc)return x(q.catchLoc,!0);if(this.prev<q.finallyLoc)return x(q.finallyLoc)}else if(ee){if(this.prev<q.catchLoc)return x(q.catchLoc,!0)}else if(he){if(this.prev<q.finallyLoc)return x(q.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(D,Y){for(var x=this.tryEntries.length-1;x>=0;--x){var C=this.tryEntries[x];if(C.tryLoc<=this.prev&&c.call(C,"finallyLoc")&&this.prev<C.finallyLoc){var q=C;break}}q&&(D==="break"||D==="continue")&&q.tryLoc<=Y&&Y<=q.finallyLoc&&(q=null);var I=q?q.completion:{};return I.type=D,I.arg=Y,q?(this.method="next",this.next=q.finallyLoc,j):this.complete(I)},complete:function(D,Y){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&Y&&(this.next=Y),j},finish:function(D){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var x=this.tryEntries[Y];if(x.finallyLoc===D)return this.complete(x.completion,x.afterLoc),K(x),j}},catch:function(D){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var x=this.tryEntries[Y];if(x.tryLoc===D){var C=x.completion;if(C.type==="throw"){var q=C.arg;K(x)}return q}}throw new Error("illegal catch attempt")},delegateYield:function(D,Y,x){return this.delegate={iterator:Q(D),resultName:Y,nextLoc:x},this.method==="next"&&(this.arg=f),j}},l})(a.exports);try{regeneratorRuntime=s}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}})(Nd)),Nd.exports}var Cd,gv;function wf(){return gv||(gv=1,Cd=(a,s)=>`${a}-${s}-${Math.random().toString(16).slice(3,8)}`),Cd}var Td,vv;function Qy(){if(vv)return Td;vv=1;const a=wf();let s=0;return Td=({id:l,action:o,payload:c={}})=>{let u=l;return typeof u>"u"&&(u=a("Job",s),s+=1),{id:u,action:o,payload:c}},Td}var zi={},yv;function Nf(){if(yv)return zi;yv=1;let a=!1;return zi.logging=a,zi.setLogging=s=>{a=s},zi.log=(...s)=>a?console.log.apply(this,s):null,zi}var _d,bv;function DC(){if(bv)return _d;bv=1;const a=Qy(),{log:s}=Nf(),l=wf();let o=0;return _d=()=>{const c=l("Scheduler",o),u={},f={};let p=[];o+=1;const m=()=>p.length,g=()=>Object.keys(u).length,v=()=>{if(p.length!==0){const N=Object.keys(u);for(let A=0;A<N.length;A+=1)if(typeof f[N[A]]>"u"){p[0](u[N[A]]);break}}},y=(N,A)=>new Promise((w,j)=>{const R=a({action:N,payload:A});p.push(async O=>{p.shift(),f[O.id]=R;try{w(await O[N].apply(this,[...A,R.id]))}catch(M){j(M)}finally{delete f[O.id],v()}}),s(`[${c}]: Add ${R.id} to JobQueue`),s(`[${c}]: JobQueue length=${p.length}`),v()});return{addWorker:N=>(u[N.id]=N,s(`[${c}]: Add ${N.id}`),s(`[${c}]: Number of workers=${g()}`),v(),N.id),addJob:async(N,...A)=>{if(g()===0)throw Error(`[${c}]: You need to have at least one worker before adding jobs`);return y(N,A)},terminate:async()=>{Object.keys(u).forEach(async N=>{await u[N].terminate()}),p=[]},getQueueLen:m,getNumWorkers:g}},_d}function Pi(a){throw new Error('Could not dynamically require "'+a+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ed,xv;function LC(){return xv||(xv=1,Ed=a=>{const s={};return typeof WorkerGlobalScope<"u"?s.type="webworker":typeof document=="object"?s.type="browser":typeof process=="object"&&typeof Pi=="function"&&(s.type="node"),typeof a>"u"?s:s[a]}),Ed}var kd,jv;function MC(){if(jv)return kd;jv=1;const s=LC()("type")==="browser"?l=>new URL(l,window.location.href).href:l=>l;return kd=l=>{const o={...l};return["corePath","workerPath","langPath"].forEach(c=>{l[c]&&(o[c]=s(o[c]))}),o},kd}var Ad,Sv;function Jy(){return Sv||(Sv=1,Ad={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),Ad}const UC="7.0.0",zC={version:UC};var Od,wv;function BC(){return wv||(wv=1,Od={workerBlobURL:!0,logger:()=>{}}),Od}var Rd,Nv;function IC(){if(Nv)return Rd;Nv=1;const a=zC.version;return Rd={...BC(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${a}/dist/worker.min.js`},Rd}var Dd,Cv;function PC(){return Cv||(Cv=1,Dd=({workerPath:a,workerBlobURL:s})=>{let l;if(Blob&&URL&&s){const o=new Blob([`importScripts("${a}");`],{type:"application/javascript"});l=new Worker(URL.createObjectURL(o))}else l=new Worker(a);return l}),Dd}var Ld,Tv;function $C(){return Tv||(Tv=1,Ld=a=>{a.terminate()}),Ld}var Md,_v;function qC(){return _v||(_v=1,Md=(a,s)=>{a.onmessage=({data:l})=>{s(l)}}),Md}var Ud,Ev;function HC(){return Ev||(Ev=1,Ud=async(a,s)=>{a.postMessage(s)}),Ud}var zd,kv;function GC(){if(kv)return zd;kv=1;const a=l=>new Promise((o,c)=>{const u=new FileReader;u.onload=()=>{o(u.result)},u.onerror=({target:{error:{code:f}}})=>{c(Error(`File could not be read! Code=${f}`))},u.readAsArrayBuffer(l)}),s=async l=>{let o=l;if(typeof l>"u")return"undefined";if(typeof l=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(l)?o=atob(l.split(",")[1]).split("").map(c=>c.charCodeAt(0)):o=await(await fetch(l)).arrayBuffer();else if(typeof HTMLElement<"u"&&l instanceof HTMLElement)l.tagName==="IMG"&&(o=await s(l.src)),l.tagName==="VIDEO"&&(o=await s(l.poster)),l.tagName==="CANVAS"&&await new Promise(c=>{l.toBlob(async u=>{o=await a(u),c()})});else if(typeof OffscreenCanvas<"u"&&l instanceof OffscreenCanvas){const c=await l.convertToBlob();o=await a(c)}else(l instanceof File||l instanceof Blob)&&(o=await a(l));return new Uint8Array(o)};return zd=s,zd}var Bd,Av;function FC(){if(Av)return Bd;Av=1;const a=IC(),s=PC(),l=$C(),o=qC(),c=HC(),u=GC();return Bd={defaultOptions:a,spawnWorker:s,terminateWorker:l,onMessage:o,send:c,loadImage:u},Bd}var Id,Ov;function Wy(){if(Ov)return Id;Ov=1;const a=MC(),s=Qy(),{log:l}=Nf(),o=wf(),c=Jy(),{defaultOptions:u,spawnWorker:f,terminateWorker:p,onMessage:m,loadImage:g,send:v}=FC();let y=0;return Id=async(S="eng",b=c.LSTM_ONLY,E={},N={})=>{const A=o("Worker",y),{logger:w,errorHandler:j,...R}=a({...u,...E}),O={},M=typeof S=="string"?S.split("+"):S;let F=b,X=N;const Z=[c.DEFAULT,c.LSTM_ONLY].includes(b)&&!R.legacyCore;let $,B;const J=new Promise((le,Ce)=>{B=le,$=Ce}),z=le=>{$(le.message)};let H=f(R);H.onerror=z,y+=1;const T=({id:le,action:Ce,payload:ye})=>new Promise((Ge,Me)=>{l(`[${A}]: Start ${le}, action=${Ce}`);const k=`${Ce}-${le}`;O[k]={resolve:Ge,reject:Me},v(H,{workerId:A,jobId:le,action:Ce,payload:ye})}),K=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),V=le=>T(s({id:le,action:"load",payload:{options:{lstmOnly:Z,corePath:R.corePath,logging:R.logging}}})),Q=(le,Ce,ye)=>T(s({id:ye,action:"FS",payload:{method:"writeFile",args:[le,Ce]}})),W=(le,Ce)=>T(s({id:Ce,action:"FS",payload:{method:"readFile",args:[le,{encoding:"utf8"}]}})),D=(le,Ce)=>T(s({id:Ce,action:"FS",payload:{method:"unlink",args:[le]}})),Y=(le,Ce,ye)=>T(s({id:ye,action:"FS",payload:{method:le,args:Ce}})),x=(le,Ce)=>T(s({id:Ce,action:"loadLanguage",payload:{langs:le,options:{langPath:R.langPath,dataPath:R.dataPath,cachePath:R.cachePath,cacheMethod:R.cacheMethod,gzip:R.gzip,lstmOnly:[c.DEFAULT,c.LSTM_ONLY].includes(F)&&!R.legacyLang}}})),C=(le,Ce,ye,Ge)=>T(s({id:Ge,action:"initialize",payload:{langs:le,oem:Ce,config:ye}})),q=(le="eng",Ce,ye,Ge)=>{if(Z&&[c.TESSERACT_ONLY,c.TESSERACT_LSTM_COMBINED].includes(Ce))throw Error("Legacy model requested but code missing.");const Me=Ce||F;F=Me;const k=ye||X;X=k;const ce=(typeof le=="string"?le.split("+"):le).filter(G=>!M.includes(G));return M.push(...ce),ce.length>0?x(ce,Ge).then(()=>C(le,Me,k,Ge)):C(le,Me,k,Ge)},I=(le={},Ce)=>T(s({id:Ce,action:"setParameters",payload:{params:le}})),ee=async(le,Ce={},ye={text:!0},Ge)=>T(s({id:Ge,action:"recognize",payload:{image:await g(le),options:Ce,output:ye}})),he=async(le,Ce)=>{if(Z)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return T(s({id:Ce,action:"detect",payload:{image:await g(le)}}))},_e=async()=>(H!==null&&(p(H),H=null),Promise.resolve());m(H,({workerId:le,jobId:Ce,status:ye,action:Ge,data:Me})=>{const k=`${Ge}-${Ce}`;if(ye==="resolve")l(`[${le}]: Complete ${Ce}`),O[k].resolve({jobId:Ce,data:Me}),delete O[k];else if(ye==="reject")if(O[k].reject(Me),delete O[k],Ge==="load"&&$(Me),j)j(Me);else throw Error(Me);else ye==="progress"&&w({...Me,userJobId:Ce})});const Ne={id:A,worker:H,load:K,writeText:Q,readText:W,removeFile:D,FS:Y,reinitialize:q,setParameters:I,recognize:ee,detect:he,terminate:_e};return V().then(()=>x(S)).then(()=>C(S,b,N)).then(()=>B(Ne)).catch(()=>{}),J},Id}var Pd,Rv;function VC(){if(Rv)return Pd;Rv=1;const a=Wy();return Pd={recognize:async(o,c,u)=>{const f=await a(c,1,u);return f.recognize(o).finally(async()=>{await f.terminate()})},detect:async(o,c)=>{const u=await a("osd",0,c);return u.detect(o).finally(async()=>{await u.terminate()})}},Pd}var $d,Dv;function YC(){return Dv||(Dv=1,$d={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}),$d}var qd,Lv;function XC(){return Lv||(Lv=1,qd={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}),qd}var Hd,Mv;function ZC(){if(Mv)return Hd;Mv=1,RC();const a=DC(),s=Wy(),l=VC(),o=YC(),c=Jy(),u=XC(),{setLogging:f}=Nf();return Hd={languages:o,OEM:c,PSM:u,createScheduler:a,createWorker:s,setLogging:f,...l},Hd}var KC=ZC();const QC=[{id:"visual",title:"Visual check",description:"Compare text, colors and layout with the image"},{id:"text",title:"Text check",description:"Create steps for text read from the image"},{id:"manual",title:"Manual checklist",description:"Create a checklist for a Tester to review"}],eb="lazyscout-test-case-language";function JC(){const a=localStorage.getItem(eb);return a==="th"||a==="en"?a:"en"}function WC({sourceUrl:a,initialLanguage:s,onLanguageChange:l,existingCases:o,onImport:c,onClose:u}){const{ui:f,language:p}=Le(),[m,g]=L.useState(""),[v,y]=L.useState(""),[S,b]=L.useState("Screenshot screen"),[E,N]=L.useState("visual"),[A,w]=L.useState(s??JC),[j,R]=L.useState(""),[O,M]=L.useState([]),[F,X]=L.useState(""),[Z,$]=L.useState(!1),[B,J]=L.useState(!1),[z,H]=L.useState(!1);function T(D){!D||!D.type.startsWith("image/")||(y(D.name),g(URL.createObjectURL(D)),X("Ready to read the image."))}async function K(){if(!m||Z)return;$(!0),X("Reading Thai and English from the image…");let D;try{D=await new Promise((C,q)=>{KC.createWorker("tha+eng",void 0,{errorHandler:q}).then(C,q)});const x=(await D.recognize(m)).data.text.trim();R(x),M(x.split(/\r?\n/).map(C=>C.trim()).filter(C=>C.length>1).slice(0,12).map((C,q)=>q)),X("Reading complete. Review and edit the text before creating Test Cases.")}catch{X(D?"OCR failed. Try a clearer image or enter the text manually.":"Could not load OCR. Check the connection and try again, or enter the text manually.")}finally{$(!1),await D?.terminate().catch(()=>{})}}async function V(){const D=j.split(/\r?\n/).map(Ne=>Ne.trim()).filter(Ne=>Ne.length>1).slice(0,12),Y=(O.length?O.map(Ne=>D[Ne]).filter(Boolean):D).slice(0,8),x="SCREENSHOT",C=new Set(o.map(Ne=>Ne.id));let q=1;const I=()=>{let Ne=`TC-${x}-${String(q).padStart(3,"0")}`;for(;C.has(Ne);)Ne=`TC-${x}-${String(++q).padStart(3,"0")}`;return C.add(Ne),q++,Ne},ee=Y.slice(0,8).map(Ne=>({type:"assertText",text:Ne,description:A==="th"?`ตรวจสอบว่าหน้าเว็บแสดงข้อความ "${Ne}"`:`Verify that "${Ne}" is visible on the page`})),he={module:x,preconditions:A==="th"?["เปิดหน้าที่ต้องการตรวจสอบให้ตรงกับภาพอ้างอิง"]:["Open the page that matches the screenshot reference"],sourceUrl:a||v,priority:"medium",automationStatus:"needs-review",type:"validation",notes:A==="th"?`สร้างจากภาพ ${v||"อ้างอิง"} · โปรดตรวจทานก่อนนำไปใช้งานจริง`:`Created from ${v||"reference"} · Review before production use`},_e=[];(E==="visual"||E==="manual")&&_e.push({...he,id:I(),title:A==="th"?`ตรวจสอบว่า ${S} แสดงผลตรงตามภาพอ้างอิง`:`${S} matches the screenshot reference`,steps:[{type:"navigate",url:a||"about:blank",description:A==="th"?"เปิดหน้าที่ต้องการตรวจสอบ":"Open the page to inspect"},{type:"manual",description:A==="th"?"เปรียบเทียบโครงร่าง ระยะห่าง สี และตำแหน่งขององค์ประกอบกับภาพอ้างอิง":"Compare layout, spacing, colors and element positions with the screenshot"}],expectedResult:A==="th"?"โครงร่างและองค์ประกอบที่มองเห็นบนหน้าเว็บตรงกับภาพอ้างอิง":"The page layout and visible elements match the screenshot reference."}),(E==="visual"||E==="text")&&_e.push({...he,id:I(),title:A==="th"?`ตรวจสอบข้อความสำคัญทั้งหมดบน ${S}`:`${S} shows all important text`,steps:ee,expectedResult:A==="th"?"ข้อความสำคัญบนหน้าจอแสดงครบถ้วนและอ่านได้ชัดเจน":"Important on-screen text is complete and readable."}),J(!0),H(!1);try{await c(_e),u()}catch{H(!0)}finally{J(!1)}}const Q=j.split(/\r?\n/).map(D=>D.trim()).filter(D=>D.length>1).slice(0,12),W=O.length||Q.length;return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:D=>!B&&D.target===D.currentTarget&&u(),children:n.jsxs("section",{className:"modern-modal screenshot-importer",role:"dialog","aria-modal":"true","aria-labelledby":"import-image-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:f("Create Test Cases from an image")}),n.jsx("h2",{id:"import-image-title",children:f("Screenshot → Test Case")}),n.jsx("p",{children:f("Follow three steps to create Draft Test Cases for review.")})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":f("Close"),disabled:B,onClick:u,children:"×"})]}),n.jsxs("div",{className:"screenshot-import-body",children:[n.jsxs("div",{className:"import-step",children:[n.jsx("span",{children:"1"}),n.jsxs("div",{children:[n.jsx("b",{children:f("Choose a Test Case pattern")}),n.jsx("p",{children:f("Pick the pattern that matches what you need to check.")})]})]}),n.jsx("div",{className:"pattern-grid",children:QC.map(D=>n.jsxs("button",{type:"button",className:`pattern-card ${E===D.id?"is-selected":""}`,onClick:()=>N(D.id),children:[n.jsx("b",{children:f(D.title)}),n.jsx("span",{children:f(D.description)})]},D.id))}),n.jsxs("div",{className:"import-step",children:[n.jsx("span",{children:"2"}),n.jsxs("div",{children:[n.jsx("b",{children:f("Upload a Screenshot")}),n.jsx("p",{children:f("PNG, JPG and WEBP are supported.")})]})]}),n.jsxs("label",{className:"upload-dropzone",children:[n.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:D=>T(D.target.files?.[0])}),n.jsx("strong",{children:v||f("Click to choose an image")}),n.jsx("span",{children:f("or drop a file here")})]}),m&&n.jsxs("div",{className:"screenshot-preview",children:[n.jsx("img",{src:m,alt:f("Screenshot preview")}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:K,disabled:Z,children:f(Z?"Reading…":"Read text from image")})]}),n.jsxs("div",{className:"import-step",children:[n.jsx("span",{children:"3"}),n.jsxs("div",{children:[n.jsx("b",{children:f("Review text and create cases")}),n.jsx("p",{children:f("You can edit OCR text before importing.")})]})]}),n.jsxs("label",{className:"field-label",children:[f("Screen name"),n.jsx("input",{className:"field mt-1",value:S,onChange:D=>b(D.target.value)})]}),n.jsxs("label",{className:"field-label",children:[f("Test Case language"),n.jsxs("select",{className:"field mt-1",value:A,onChange:D=>{const Y=D.target.value;w(Y),localStorage.setItem(eb,Y),l?.(Y)},children:[n.jsx("option",{value:"en",children:f("English")}),n.jsx("option",{value:"th",children:"ไทย"})]})]}),n.jsxs("label",{className:"field-label",children:[f("Text detected"),n.jsx("textarea",{className:"field screenshot-ocr",value:j,onChange:D=>{R(D.target.value),M([])},placeholder:f("Read text from the image, or type it yourself")})]}),Q.length>0&&n.jsxs("div",{className:"import-preview",children:[n.jsxs("b",{children:[f("Choose OCR lines to create assertions ("),W," ",f("selected)")]}),n.jsx("table",{children:n.jsx("tbody",{children:Q.map((D,Y)=>{const x=O.length===0||O.includes(Y);return n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("input",{type:"checkbox",checked:x,onChange:()=>M(C=>{const q=C.length===0?Q.map((I,ee)=>ee):C;return q.includes(Y)?q.filter(I=>I!==Y):[...q,Y]})})}),n.jsx("td",{children:D})]},`${Y}-${D}`)})})})]}),n.jsxs("div",{className:"import-summary",children:[n.jsx("b",{children:f("Draft preview")}),n.jsxs("span",{children:[E==="visual"||E==="manual"?f("1 visual comparison case"):"",E==="visual"?" + ":"",E==="visual"||E==="text"?p==="th"?`1 เคสตรวจข้อความ (${W} เงื่อนไข)`:`1 text verification case with ${W} assertion(s)`:""]})]}),n.jsx("p",{role:"status",className:"screenshot-status",children:f(F)}),z&&n.jsx("p",{role:"alert",className:"import-error",children:f("Could not save the imported cases. Check that LazyScout is running and try again.")})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsxs("span",{className:"mr-auto text-xs text-slate-500",children:[f("Results are marked")," ",n.jsx("b",{children:f("needs-review")})]}),n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:B,onClick:u,children:f("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:V,disabled:Z||B||!j.trim()&&E!=="manual",children:f(B?"Saving…":"Create Draft Test Cases")})]})]})})}function eT({existingCases:a,sourceUrl:s,onImport:l,onClose:o}){const{ui:c}=Le(),[u,f]=L.useState(""),[p,m]=L.useState([]),[g,v]=L.useState(""),[y,S]=L.useState(!1),[b,E]=L.useState(!1);async function N(){E(!0),v("");try{await l(p),o()}catch{v("Could not save the imported cases. Check that LazyScout is running and try again.")}finally{E(!1)}}async function A(w){if(!(!w||y)){S(!0),v(""),f(w.name);try{const j=await tT(w),R=nT(j,a,s);if(!R.length)throw new Error("No valid Test Cases were found. Check that the file contains TC_ID or Title.");m(R)}catch(j){m([]),v(j instanceof Error?j.message:"Could not read the file.")}finally{S(!1)}}}return n.jsx("div",{className:"modern-modal-backdrop",onMouseDown:w=>!b&&w.target===w.currentTarget&&o(),children:n.jsxs("section",{className:"modern-modal import-testcase-modal",role:"dialog","aria-modal":"true","aria-labelledby":"import-cases-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:c("Import Test Cases")}),n.jsx("h2",{id:"import-cases-title",children:c("Bring an existing suite into LazyScout")}),n.jsx("p",{children:c("CSV, XLSX and JSON are supported. Fields are mapped automatically.")})]}),n.jsx("button",{type:"button",className:"icon-btn",disabled:b,onClick:o,"aria-label":c("Close"),children:"×"})]}),n.jsxs("div",{className:"import-testcase-body",children:[n.jsxs("label",{className:"upload-dropzone",children:[n.jsx("input",{type:"file",accept:".csv,.xlsx,.json",disabled:b||y,onChange:w=>{A(w.target.files?.[0])}}),n.jsx("strong",{children:y?c("Reading file…"):u||c("Choose a CSV, XLSX or JSON file")}),n.jsx("span",{children:c("Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result")})]}),g&&n.jsx("p",{role:"alert",className:"import-error",children:c(g)}),p.length>0&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"import-summary",children:[n.jsxs("b",{children:[p.length," ",c("Test Cases ready to import")]}),n.jsx("span",{children:c("Duplicate IDs are replaced with a new TC-IMPORT ID.")})]}),n.jsxs("div",{className:"import-preview",children:[n.jsxs("table",{children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:c("TC ID")}),n.jsx("th",{children:c("Folder")}),n.jsx("th",{children:c("Title")}),n.jsx("th",{children:c("Tags")}),n.jsx("th",{children:c("Requirements")})]})}),n.jsx("tbody",{children:p.slice(0,10).map(w=>n.jsxs("tr",{children:[n.jsx("td",{children:w.id}),n.jsx("td",{children:w.folder??w.module}),n.jsx("td",{children:w.title}),n.jsx("td",{children:(w.tags??[]).join(", ")||"—"}),n.jsx("td",{children:(w.requirements??[]).join(", ")||"—"})]},w.id))})]}),p.length>10&&n.jsxs("p",{children:[c("Previewing 10 of")," ",p.length," ",c("Test Cases.")]})]})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:b,onClick:o,children:c("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!p.length||y||b,onClick:N,children:b?c("Saving…"):[c("Import"),p.length||"",c("Test Cases")].filter(Boolean).join(" ")})]})]})})}async function tT(a){const s=a.name.split(".").pop()?.toLowerCase();if(s==="json"){let l;try{l=JSON.parse(await a.text())}catch{throw new Error("Invalid JSON. Check the file and try again.")}return(Array.isArray(l)?l:l&&typeof l=="object"&&Array.isArray(l.testCases)?l.testCases:[]).filter(c=>!!c&&typeof c=="object")}if(s==="csv")return Uv(ky(await a.text()));if(s==="xlsx")return Uv(await m1(a));throw new Error("Supported formats are CSV, XLSX and JSON.")}function Uv(a){const[s,...l]=a;if(!s)return[];const o=s.map(c=>String(c??"").trim());return l.filter(c=>c.some(u=>u!=null&&String(u).trim())).map(c=>Object.fromEntries(o.map((u,f)=>[u||`Column_${f+1}`,c[f]??""])))}function nT(a,s,l){const o=new Set(s.map(f=>f.id));let c=1;const u=()=>{let f=`TC-IMPORT-${String(c).padStart(3,"0")}`;for(;o.has(f);)f=`TC-IMPORT-${String(++c).padStart(3,"0")}`;return o.add(f),c++,f};return a.map(f=>{const p=ra(f,"TC_ID","ID","TEST_CASE_ID"),m=ra(f,"TITLE","TEST_CASE","NAME");if(!m&&!p)return null;const g=!p||o.has(p)?u():p;o.add(g);const v=ra(f,"MODULE")||"IMPORTED",y=aT(f).map(S=>({type:"manual",description:S}));return{id:g,module:v,folder:ra(f,"FOLDER")||v,tags:Uo(f,"TAGS","TAG"),requirements:Uo(f,"REQUIREMENTS","REQUIREMENT","TICKET","TICKETS"),title:m||g,preconditions:Uo(f,"PRECONDITIONS","PRECONDITION"),steps:y.length?y:[{type:"manual",description:"Review imported steps"}],expectedResult:ra(f,"EXPECTED_RESULT","EXPECTED RESULT","EXPECTED")||"Review expected result",type:rT(ra(f,"TYPE")),priority:sT(ra(f,"PRIORITY")),automationStatus:iT(ra(f,"AUTOMATION_STATUS","AUTOMATION")),sourceUrl:ra(f,"SOURCE_URL","SOURCE URL","URL")||l||"Imported file",notes:ra(f,"NOTES","NOTE")||"Imported into LazyScout"}}).filter(f=>!!f)}function uf(a){return a.toUpperCase().replace(/[^A-Z0-9]/g,"")}function aT(a){const s=Object.entries(a).find(([l])=>["TESTSTEPS","STEPS"].includes(uf(l)))?.[1];return Array.isArray(s)?s.map(l=>{if(typeof l=="string")return l.trim();if(l&&typeof l=="object"){const o=l;if(typeof o.description=="string"&&o.description.trim())return o.description.trim();const c=o.target,u=!!c&&typeof c=="object"&&!Array.isArray(c);if(o.type==="navigate"&&typeof o.url=="string"||o.type==="assertUrl"&&typeof o.urlContains=="string"||o.type==="assertText"&&typeof o.text=="string"&&(c==null||u)||o.type==="wait"&&typeof o.mode=="string"&&typeof o.value=="string"||o.type==="assertValidation"||u&&(o.type==="click"||o.type==="assertVisible"||o.type==="assertInvalid"||o.type==="fill"&&typeof o.value=="string"||o.type==="select"&&typeof o.option=="string"||o.type==="check"&&typeof o.checked=="boolean"))return Ua(o)}throw new Error("A JSON test step could not be read. Give it a description or use a Scout step.")}).filter(Boolean):Uo(a,"TEST_STEPS","STEPS")}function ra(a,...s){const l=new Map(Object.entries(a).map(([o,c])=>[uf(o),String(c??"").trim()]));for(const o of s){const c=l.get(uf(o));if(c)return c}return""}function Uo(a,...s){return ra(a,...s).split(/[\n,;|]/).map(l=>l.replace(/^\s*\d+[.)-]?\s*/,"").trim()).filter(Boolean)}function rT(a){return a.toLowerCase()==="negative"?"negative":a.toLowerCase()==="validation"?"validation":"positive"}function sT(a){return a.toLowerCase()==="high"?"high":a.toLowerCase()==="low"?"low":"medium"}function iT(a){return["ready","needs-data","needs-review","manual"].includes(a)?a:"needs-review"}function lT(a,s){return a?new Intl.DateTimeFormat(s,{dateStyle:"medium"}).format(new Date(a)):"Published on npm"}function oT({compact:a=!1}){const{ui:s,language:l}=Le(),[o,c]=L.useState(),[u,f]=L.useState(!0),[p,m]=L.useState(),[g,v]=L.useState(),[y,S]=L.useState(),[b,E]=L.useState(),[N,A]=L.useState();async function w(){f(!0),m(void 0);try{c(await w0())}catch(O){m(O instanceof yn?O.message:"Could not check npm versions.")}finally{f(!1)}}L.useEffect(()=>{w()},[]);async function j(O){await navigator.clipboard.writeText(`npm install -g lazyscout@${O}`),A(O),window.setTimeout(()=>A(M=>M===O?void 0:M),1600)}async function R(O){S(O),v(void 0),E(void 0),m(void 0);try{E(await N0(O))}catch(M){m(M instanceof yn&&M.hint?`${M.message} ${M.hint}`:M instanceof Error?M.message:"Could not install this version.")}finally{S(void 0)}}return n.jsxs("section",{className:`version-center ${a?"is-compact":""}`,children:[n.jsxs("header",{className:"version-center-head",children:[n.jsx("div",{className:"version-center-icon",children:"V"}),n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:s("Version Center")}),n.jsx("h3",{children:s(a?"LazyScout version":"Choose your LazyScout version")}),!a&&n.jsx("p",{children:s("Install the latest release or switch to an earlier published version before opening a workspace.")})]}),n.jsx("button",{type:"button",className:"version-refresh",onClick:()=>{w()},disabled:u,children:s(u?"Checking…":"Check again")})]}),u&&!o?n.jsxs("div",{className:"version-loading",children:[n.jsx("span",{className:"scout-spinner"})," ",s("Checking npm Registry…")]}):o?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"version-summary",children:[n.jsxs("div",{children:[n.jsx("small",{children:s("Running now")}),n.jsxs("strong",{children:["v",o.currentVersion]})]}),n.jsx("span",{className:"version-summary-arrow",children:"→"}),n.jsxs("div",{children:[n.jsx("small",{children:s("Latest release")}),n.jsx("strong",{children:o.latestVersion?`v${o.latestVersion}`:s("Unavailable")})]}),o.registryAvailable&&o.latestVersion&&!p&&!u&&n.jsx("span",{className:`version-state ${o.updateAvailable?"has-update":""}`,children:o.updateAvailable?s("Update available"):s("Up to date")})]}),!a&&n.jsx("div",{className:"version-list","aria-label":s("Published LazyScout versions"),children:o.versions.slice(0,3).map(O=>{const M=O.version===o.currentVersion,F=O.version===g,X=O.version===y;return n.jsxs("div",{className:`version-row ${M?"is-current":""}`,children:[n.jsxs("div",{className:"version-number",children:[n.jsxs("span",{children:["v",O.version]}),n.jsx("small",{children:s(lT(O.publishedAt,l))})]}),n.jsxs("div",{className:"version-tags",children:[O.tags.map(Z=>n.jsx("span",{children:Z},Z)),M&&n.jsx("span",{className:"current",children:s("running")})]}),n.jsx("button",{type:"button",className:"btn btn-secondary version-copy",onClick:()=>{j(O.version)},children:N===O.version?s("Copied"):s("Copy command")}),n.jsx("button",{type:"button",className:"btn btn-primary version-install",disabled:M||!!y,onClick:()=>v(F?void 0:O.version),children:s(M?"Current":X?"Installing…":"Install")}),F&&n.jsxs("div",{className:"version-confirm",children:[n.jsxs("span",{children:[s("Install")," ",n.jsxs("b",{children:["v",O.version]})," ",s("globally? Restart LazyScout after installation to use it.")]}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>v(void 0),children:s("Cancel")}),n.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>{R(O.version)},children:[s("Install v"),O.version]})]})]},O.version)})})]}):null,o&&!o.registryAvailable&&n.jsxs("div",{className:"version-message warning",children:[s("npm Registry is unavailable.")," ",o.error]}),p&&n.jsx("div",{className:"version-message error",children:s(p)}),b&&n.jsxs("div",{className:"version-message success",children:[n.jsxs("b",{children:[s("LazyScout v"),b.installedVersion," ",s("installed.")]}),n.jsx("span",{children:s("Close the current LazyScout terminal and run `lazyscout` again to switch versions.")})]})]})}const cT=["scout","sample","empty"],zv="Practice Login Demo";function uT({projects:a,creating:s,onCreate:l,onOpenProject:o,onClose:c}){const{ui:u,language:f,toggleLanguage:p}=Le(),m=f==="th",[g,v]=L.useState(""),[y,S]=L.useState(),[b,E]=L.useState(!1),[N,A]=L.useState(a[0]?.id??""),w=g.trim()||(y==="sample"?zv:m?"โปรเจกต์ไม่มีชื่อ":"Untitled Test Suite"),j={scout:{help:"new-scout",icon:"globe",label:m?"สำรวจเว็บไซต์":"Scout a website",title:m?"สร้างโปรเจกต์สำหรับ Scout?":"Create a website Scout project?",description:m?"ใส่ URL แล้วให้ Scout สำรวจหน้าเว็บและสร้างเคสทดสอบชุดแรก":"Enter a URL and let Scout discover pages and generate your first test cases."},sample:{help:"sample",icon:"stack",label:m?"เทมเพลต Practice Login Demo":"Practice Login Demo template",title:m?"สร้างโปรเจกต์จากเทมเพลต?":"Create a project from a template?",description:m?"เริ่มด้วยเว็บตัวอย่างและเคสสำหรับทดสอบการเข้าสู่ระบบ":"Start with a practice website and a set of login test cases."},empty:{help:"empty-project",icon:"plus",label:m?"โปรเจกต์เปล่า":"Empty project",title:m?"สร้างโปรเจกต์เปล่า?":"Create an empty project?",description:m?"เริ่มด้วยรายการเคสว่าง แล้วเพิ่มเคสเอง นำเข้าจากไฟล์ หรือสำรวจเว็บไซต์ทีหลัง":"Start with an empty case list. Add cases, import a file, or Scout a website later."}};function R(){s||S(void 0)}return n.jsxs(n.Fragment,{children:[n.jsx(Ho,{labelledBy:"new-project-title",onClose:c,children:n.jsxs("section",{className:"modern-modal new-project-modal",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:m?"โปรเจกต์ใหม่":"New Project"}),n.jsx("h2",{id:"new-project-title",children:m?"เริ่มพื้นที่ทำงาน QA":"Start a QA workspace"}),n.jsx("p",{children:m?"เลือกสำรวจเว็บไซต์ ลองโปรเจกต์ตัวอย่าง หรือนำเข้าเคสทดสอบเดิม":"Start with your website, try the sample, or create an empty test suite."})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",lang:m?"en":"th",onClick:p,children:m?"English":"ภาษาไทย"}),n.jsx("button",{type:"button",className:"icon-btn",onClick:c,"aria-label":u("Close"),children:"×"})]})]}),n.jsxs("div",{className:"new-project-modal-body",children:[n.jsxs("label",{children:[n.jsx("span",{children:m?"ชื่อโปรเจกต์":"Project name"}),n.jsx("input",{"data-help":"project-name",className:"field",value:g,onChange:O=>v(O.target.value),placeholder:u("Example: Storefront regression")})]}),n.jsx("div",{className:"new-project-choices",children:cT.map(O=>n.jsxs("button",{type:"button","aria-haspopup":"dialog","data-help":j[O].help,onClick:()=>S(O),children:[n.jsx("span",{className:`new-project-choice-icon ${O}`,children:n.jsx(Qe,{name:j[O].icon})}),n.jsxs("span",{children:[n.jsx("b",{children:j[O].label}),n.jsx("small",{children:j[O].description})]}),n.jsx("em",{"aria-hidden":"true",children:"→"})]},O))}),a.length>0&&n.jsxs("div",{className:"existing-project-choice",children:[n.jsx("span",{className:"new-project-choice-icon empty",children:"↗"}),n.jsxs("div",{children:[n.jsx("b",{children:m?"เปิดโปรเจกต์เดิม":"Open existing project"}),n.jsx("small",{children:m?"ทำงานต่อจาก Local workspace":"Continue a local workspace."}),n.jsx("select",{"aria-label":m?"เลือกโปรเจกต์เดิม":"Select existing project",className:"field",value:N,onChange:O=>A(O.target.value),children:a.map(O=>n.jsx("option",{value:O.id,children:O.name},O.id))})]})]}),n.jsxs("details",{className:"version-disclosure",onToggle:O=>{O.currentTarget.open&&E(!0)},children:[n.jsx("summary",{children:m?"เวอร์ชันและการอัปเดต":"Version and updates"}),b&&n.jsx(oT,{compact:!0})]})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx(Vy,{welcome:!0}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:c,children:m?"ยกเลิก":"Cancel"}),a.length>0&&n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!N,onClick:()=>N&&o(N),children:m?"เปิดโปรเจกต์":"Open project"})]})]})}),y&&n.jsx(Ho,{labelledBy:"confirm-project-title",onClose:R,children:n.jsxs("section",{className:"modern-modal project-create-confirm","aria-busy":s,children:[n.jsxs("header",{className:`project-confirm-heading ${y}`,children:[n.jsx("span",{className:"project-confirm-icon",children:n.jsx(Qe,{name:j[y].icon})}),n.jsx("h2",{id:"confirm-project-title",children:j[y].title})]}),n.jsxs("div",{className:"project-confirm-body",children:[n.jsxs("dl",{children:[n.jsxs("div",{children:[n.jsx("dt",{children:m?"ชื่อโปรเจกต์":"Project name"}),n.jsx("dd",{children:w})]}),y==="sample"&&n.jsxs("div",{children:[n.jsx("dt",{children:m?"เทมเพลต":"Template"}),n.jsx("dd",{children:zv})]})]}),n.jsx("p",{children:j[y].description})]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsxs("button",{type:"button",className:"btn btn-secondary",autoFocus:!0,disabled:s,onClick:R,children:[n.jsx(Qe,{name:"back"}),m?"ย้อนกลับ":"Back"]}),n.jsxs("button",{type:"button",className:"btn btn-primary",disabled:s,onClick:()=>l(y,w),children:[n.jsx(Qe,{name:"check"}),s?m?"กำลังสร้าง…":"Creating…":m?"สร้างโปรเจกต์":"Create project"]})]})]})})]})}var Gd={exports:{}};var Bv;function dT(){return Bv||(Bv=1,(function(a,s){(function(l){a.exports=l()})(function(){return(function l(o,c,u){function f(g,v){if(!c[g]){if(!o[g]){var y=typeof Pi=="function"&&Pi;if(!v&&y)return y(g,!0);if(p)return p(g,!0);var S=new Error("Cannot find module '"+g+"'");throw S.code="MODULE_NOT_FOUND",S}var b=c[g]={exports:{}};o[g][0].call(b.exports,function(E){var N=o[g][1][E];return f(N||E)},b,b.exports,l,o,c,u)}return c[g].exports}for(var p=typeof Pi=="function"&&Pi,m=0;m<u.length;m++)f(u[m]);return f})({1:[function(l,o,c){var u=l("./utils"),f=l("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(m){for(var g,v,y,S,b,E,N,A=[],w=0,j=m.length,R=j,O=u.getTypeOf(m)!=="string";w<m.length;)R=j-w,y=O?(g=m[w++],v=w<j?m[w++]:0,w<j?m[w++]:0):(g=m.charCodeAt(w++),v=w<j?m.charCodeAt(w++):0,w<j?m.charCodeAt(w++):0),S=g>>2,b=(3&g)<<4|v>>4,E=1<R?(15&v)<<2|y>>6:64,N=2<R?63&y:64,A.push(p.charAt(S)+p.charAt(b)+p.charAt(E)+p.charAt(N));return A.join("")},c.decode=function(m){var g,v,y,S,b,E,N=0,A=0,w="data:";if(m.substr(0,w.length)===w)throw new Error("Invalid base64 input, it looks like a data url.");var j,R=3*(m=m.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(m.charAt(m.length-1)===p.charAt(64)&&R--,m.charAt(m.length-2)===p.charAt(64)&&R--,R%1!=0)throw new Error("Invalid base64 input, bad content length.");for(j=f.uint8array?new Uint8Array(0|R):new Array(0|R);N<m.length;)g=p.indexOf(m.charAt(N++))<<2|(S=p.indexOf(m.charAt(N++)))>>4,v=(15&S)<<4|(b=p.indexOf(m.charAt(N++)))>>2,y=(3&b)<<6|(E=p.indexOf(m.charAt(N++))),j[A++]=g,b!==64&&(j[A++]=v),E!==64&&(j[A++]=y);return j}},{"./support":30,"./utils":32}],2:[function(l,o,c){var u=l("./external"),f=l("./stream/DataWorker"),p=l("./stream/Crc32Probe"),m=l("./stream/DataLengthProbe");function g(v,y,S,b,E){this.compressedSize=v,this.uncompressedSize=y,this.crc32=S,this.compression=b,this.compressedContent=E}g.prototype={getContentWorker:function(){var v=new f(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),y=this;return v.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),v},getCompressedWorker:function(){return new f(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},g.createWorkerFrom=function(v,y,S){return v.pipe(new p).pipe(new m("uncompressedSize")).pipe(y.compressWorker(S)).pipe(new m("compressedSize")).withStreamInfo("compression",y)},o.exports=g},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(l,o,c){var u=l("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},c.DEFLATE=l("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(l,o,c){var u=l("./utils"),f=(function(){for(var p,m=[],g=0;g<256;g++){p=g;for(var v=0;v<8;v++)p=1&p?3988292384^p>>>1:p>>>1;m[g]=p}return m})();o.exports=function(p,m){return p!==void 0&&p.length?u.getTypeOf(p)!=="string"?(function(g,v,y,S){var b=f,E=S+y;g^=-1;for(var N=S;N<E;N++)g=g>>>8^b[255&(g^v[N])];return-1^g})(0|m,p,p.length,0):(function(g,v,y,S){var b=f,E=S+y;g^=-1;for(var N=S;N<E;N++)g=g>>>8^b[255&(g^v.charCodeAt(N))];return-1^g})(0|m,p,p.length,0):0}},{"./utils":32}],5:[function(l,o,c){c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(l,o,c){var u=null;u=typeof Promise<"u"?Promise:l("lie"),o.exports={Promise:u}},{lie:37}],7:[function(l,o,c){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",f=l("pako"),p=l("./utils"),m=l("./stream/GenericWorker"),g=u?"uint8array":"array";function v(y,S){m.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=S,this.meta={}}c.magic="\b\0",p.inherits(v,m),v.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(g,y.data),!1)},v.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},v.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},v.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(S){y.push({data:S,meta:y.meta})}},c.compressWorker=function(y){return new v("Deflate",y)},c.uncompressWorker=function(){return new v("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(l,o,c){function u(b,E){var N,A="";for(N=0;N<E;N++)A+=String.fromCharCode(255&b),b>>>=8;return A}function f(b,E,N,A,w,j){var R,O,M=b.file,F=b.compression,X=j!==g.utf8encode,Z=p.transformTo("string",j(M.name)),$=p.transformTo("string",g.utf8encode(M.name)),B=M.comment,J=p.transformTo("string",j(B)),z=p.transformTo("string",g.utf8encode(B)),H=$.length!==M.name.length,T=z.length!==B.length,K="",V="",Q="",W=M.dir,D=M.date,Y={crc32:0,compressedSize:0,uncompressedSize:0};E&&!N||(Y.crc32=b.crc32,Y.compressedSize=b.compressedSize,Y.uncompressedSize=b.uncompressedSize);var x=0;E&&(x|=8),X||!H&&!T||(x|=2048);var C=0,q=0;W&&(C|=16),w==="UNIX"?(q=798,C|=(function(ee,he){var _e=ee;return ee||(_e=he?16893:33204),(65535&_e)<<16})(M.unixPermissions,W)):(q=20,C|=(function(ee){return 63&(ee||0)})(M.dosPermissions)),R=D.getUTCHours(),R<<=6,R|=D.getUTCMinutes(),R<<=5,R|=D.getUTCSeconds()/2,O=D.getUTCFullYear()-1980,O<<=4,O|=D.getUTCMonth()+1,O<<=5,O|=D.getUTCDate(),H&&(V=u(1,1)+u(v(Z),4)+$,K+="up"+u(V.length,2)+V),T&&(Q=u(1,1)+u(v(J),4)+z,K+="uc"+u(Q.length,2)+Q);var I="";return I+=`
62
+ \0`,I+=u(x,2),I+=F.magic,I+=u(R,2),I+=u(O,2),I+=u(Y.crc32,4),I+=u(Y.compressedSize,4),I+=u(Y.uncompressedSize,4),I+=u(Z.length,2),I+=u(K.length,2),{fileRecord:y.LOCAL_FILE_HEADER+I+Z+K,dirRecord:y.CENTRAL_FILE_HEADER+u(q,2)+I+u(J.length,2)+"\0\0\0\0"+u(C,4)+u(A,4)+Z+K+J}}var p=l("../utils"),m=l("../stream/GenericWorker"),g=l("../utf8"),v=l("../crc32"),y=l("../signature");function S(b,E,N,A){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=E,this.zipPlatform=N,this.encodeFileName=A,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(S,m),S.prototype.push=function(b){var E=b.meta.percent||0,N=this.entriesCount,A=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,m.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:N?(E+100*(N-A-1))/N:100}}))},S.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var E=this.streamFiles&&!b.file.dir;if(E){var N=f(b,E,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},S.prototype.closedSource=function(b){this.accumulate=!1;var E=this.streamFiles&&!b.file.dir,N=f(b,E,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),E)this.push({data:(function(A){return y.DATA_DESCRIPTOR+u(A.crc32,4)+u(A.compressedSize,4)+u(A.uncompressedSize,4)})(b),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},S.prototype.flush=function(){for(var b=this.bytesWritten,E=0;E<this.dirRecords.length;E++)this.push({data:this.dirRecords[E],meta:{percent:100}});var N=this.bytesWritten-b,A=(function(w,j,R,O,M){var F=p.transformTo("string",M(O));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(w,2)+u(w,2)+u(j,4)+u(R,4)+u(F.length,2)+F})(this.dirRecords.length,N,b,this.zipComment,this.encodeFileName);this.push({data:A,meta:{percent:100}})},S.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},S.prototype.registerPrevious=function(b){this._sources.push(b);var E=this;return b.on("data",function(N){E.processChunk(N)}),b.on("end",function(){E.closedSource(E.previous.streamInfo),E._sources.length?E.prepareNextSource():E.end()}),b.on("error",function(N){E.error(N)}),this},S.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},S.prototype.error=function(b){var E=this._sources;if(!m.prototype.error.call(this,b))return!1;for(var N=0;N<E.length;N++)try{E[N].error(b)}catch{}return!0},S.prototype.lock=function(){m.prototype.lock.call(this);for(var b=this._sources,E=0;E<b.length;E++)b[E].lock()},o.exports=S},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(l,o,c){var u=l("../compressions"),f=l("./ZipFileWorker");c.generateWorker=function(p,m,g){var v=new f(m.streamFiles,g,m.platform,m.encodeFileName),y=0;try{p.forEach(function(S,b){y++;var E=(function(j,R){var O=j||R,M=u[O];if(!M)throw new Error(O+" is not a valid compression method !");return M})(b.options.compression,m.compression),N=b.options.compressionOptions||m.compressionOptions||{},A=b.dir,w=b.date;b._compressWorker(E,N).withStreamInfo("file",{name:S,dir:A,date:w,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(v)}),v.entriesCount=y}catch(S){v.error(S)}return v}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(l,o,c){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var f=new u;for(var p in this)typeof this[p]!="function"&&(f[p]=this[p]);return f}}(u.prototype=l("./object")).loadAsync=l("./load"),u.support=l("./support"),u.defaults=l("./defaults"),u.version="3.10.2",u.loadAsync=function(f,p){return new u().loadAsync(f,p)},u.external=l("./external"),o.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(l,o,c){var u=l("./utils"),f=l("./external"),p=l("./utf8"),m=l("./zipEntries"),g=l("./stream/Crc32Probe"),v=l("./nodejsUtils");function y(S){return new f.Promise(function(b,E){var N=S.decompressed.getContentWorker().pipe(new g);N.on("error",function(A){E(A)}).on("end",function(){N.streamInfo.crc32!==S.decompressed.crc32?E(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}o.exports=function(S,b){var E=this;return b=u.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:p.utf8decode}),v.isNode&&v.isStream(S)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",S,!0,b.optimizedBinaryString,b.base64).then(function(N){var A=new m(b);return A.load(N),A}).then(function(N){var A=[f.Promise.resolve(N)],w=N.files;if(b.checkCRC32)for(var j=0;j<w.length;j++)A.push(y(w[j]));return f.Promise.all(A)}).then(function(N){for(var A=N.shift(),w=A.files,j=0;j<w.length;j++){var R=w[j],O=R.fileNameStr,M=u.resolve(R.fileNameStr);E.file(M,R.decompressed,{binary:!0,optimizedBinaryString:!0,date:R.date,dir:R.dir,comment:R.fileCommentStr.length?R.fileCommentStr:null,unixPermissions:R.unixPermissions,dosPermissions:R.dosPermissions,createFolders:b.createFolders}),R.dir||(E.file(M).unsafeOriginalName=O)}return A.zipComment.length&&(E.comment=A.zipComment),E})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(l,o,c){var u=l("../utils"),f=l("../stream/GenericWorker");function p(m,g){f.call(this,"Nodejs stream input adapter for "+m),this._upstreamEnded=!1,this._bindStream(g)}u.inherits(p,f),p.prototype._bindStream=function(m){var g=this;(this._stream=m).pause(),m.on("data",function(v){g.push({data:v,meta:{percent:0}})}).on("error",function(v){g.isPaused?this.generatedError=v:g.error(v)}).on("end",function(){g.isPaused?g._upstreamEnded=!0:g.end()})},p.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=p},{"../stream/GenericWorker":28,"../utils":32}],13:[function(l,o,c){var u=l("readable-stream").Readable;function f(p,m,g){u.call(this,m),this._helper=p;var v=this;p.on("data",function(y,S){v.push(y)||v._helper.pause(),g&&g(S)}).on("error",function(y){v.emit("error",y)}).on("end",function(){v.push(null)})}l("../utils").inherits(f,u),f.prototype._read=function(){this._helper.resume()},o.exports=f},{"../utils":32,"readable-stream":16}],14:[function(l,o,c){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,f){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,f);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,f)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var f=new Buffer(u);return f.fill(0),f},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(l,o,c){function u(M,F,X){var Z,$=p.getTypeOf(F),B=p.extend(X||{},v);B.date=B.date||new Date,B.compression!==null&&(B.compression=B.compression.toUpperCase()),typeof B.unixPermissions=="string"&&(B.unixPermissions=parseInt(B.unixPermissions,8)),B.unixPermissions&&16384&B.unixPermissions&&(B.dir=!0),B.dosPermissions&&16&B.dosPermissions&&(B.dir=!0),B.dir&&(M=w(M)),B.createFolders&&(Z=A(M))&&j.call(this,Z,!0);var J=$==="string"&&B.binary===!1&&B.base64===!1;X&&X.binary!==void 0||(B.binary=!J),(F instanceof y&&F.uncompressedSize===0||B.dir||!F||F.length===0)&&(B.base64=!1,B.binary=!0,F="",B.compression="STORE",$="string");var z=null;z=F instanceof y||F instanceof m?F:E.isNode&&E.isStream(F)?new N(M,F):p.prepareContent(M,F,B.binary,B.optimizedBinaryString,B.base64);var H=new S(M,z,B);this.files[M]=H}var f=l("./utf8"),p=l("./utils"),m=l("./stream/GenericWorker"),g=l("./stream/StreamHelper"),v=l("./defaults"),y=l("./compressedObject"),S=l("./zipObject"),b=l("./generate"),E=l("./nodejsUtils"),N=l("./nodejs/NodejsStreamInputAdapter"),A=function(M){M.slice(-1)==="/"&&(M=M.substring(0,M.length-1));var F=M.lastIndexOf("/");return 0<F?M.substring(0,F):""},w=function(M){return M.slice(-1)!=="/"&&(M+="/"),M},j=function(M,F){return F=F!==void 0?F:v.createFolders,M=w(M),this.files[M]||u.call(this,M,null,{dir:!0,createFolders:F}),this.files[M]};function R(M){return Object.prototype.toString.call(M)==="[object RegExp]"}var O={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(M){var F,X,Z;for(F in this.files)Z=this.files[F],(X=F.slice(this.root.length,F.length))&&F.slice(0,this.root.length)===this.root&&M(X,Z)},filter:function(M){var F=[];return this.forEach(function(X,Z){M(X,Z)&&F.push(Z)}),F},file:function(M,F,X){if(arguments.length!==1)return M=this.root+M,u.call(this,M,F,X),this;if(R(M)){var Z=M;return this.filter(function(B,J){return!J.dir&&Z.test(B)})}var $=this.files[this.root+M];return $&&!$.dir?$:null},folder:function(M){if(!M)return this;if(R(M))return this.filter(function($,B){return B.dir&&M.test($)});var F=this.root+M,X=j.call(this,F),Z=this.clone();return Z.root=X.name,Z},remove:function(M){M=this.root+M;var F=this.files[M];if(F||(M.slice(-1)!=="/"&&(M+="/"),F=this.files[M]),F&&!F.dir)delete this.files[M];else for(var X=this.filter(function($,B){return B.name.slice(0,M.length)===M}),Z=0;Z<X.length;Z++)delete this.files[X[Z].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(M){var F,X={};try{if((X=p.extend(M||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:f.utf8encode})).type=X.type.toLowerCase(),X.compression=X.compression.toUpperCase(),X.type==="binarystring"&&(X.type="string"),!X.type)throw new Error("No output type specified.");p.checkSupport(X.type),X.platform!=="darwin"&&X.platform!=="freebsd"&&X.platform!=="linux"&&X.platform!=="sunos"||(X.platform="UNIX"),X.platform==="win32"&&(X.platform="DOS");var Z=X.comment||this.comment||"";F=b.generateWorker(this,X,Z)}catch($){(F=new m("error")).error($)}return new g(F,X.type||"string",X.mimeType)},generateAsync:function(M,F){return this.generateInternalStream(M).accumulate(F)},generateNodeStream:function(M,F){return(M=M||{}).type||(M.type="nodebuffer"),this.generateInternalStream(M).toNodejsStream(F)}};o.exports=O},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(l,o,c){o.exports=l("stream")},{stream:void 0}],17:[function(l,o,c){var u=l("./DataReader");function f(p){u.call(this,p);for(var m=0;m<this.data.length;m++)p[m]=255&p[m]}l("../utils").inherits(f,u),f.prototype.byteAt=function(p){return this.data[this.zero+p]},f.prototype.lastIndexOfSignature=function(p){for(var m=p.charCodeAt(0),g=p.charCodeAt(1),v=p.charCodeAt(2),y=p.charCodeAt(3),S=this.length-4;0<=S;--S)if(this.data[S]===m&&this.data[S+1]===g&&this.data[S+2]===v&&this.data[S+3]===y)return S-this.zero;return-1},f.prototype.readAndCheckSignature=function(p){var m=p.charCodeAt(0),g=p.charCodeAt(1),v=p.charCodeAt(2),y=p.charCodeAt(3),S=this.readData(4);return m===S[0]&&g===S[1]&&v===S[2]&&y===S[3]},f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],18:[function(l,o,c){var u=l("../utils");function f(p){this.data=p,this.length=p.length,this.index=0,this.zero=0}f.prototype={checkOffset:function(p){this.checkIndex(this.index+p)},checkIndex:function(p){if(this.length<this.zero+p||p<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+p+"). Corrupted zip ?")},setIndex:function(p){this.checkIndex(p),this.index=p},skip:function(p){this.setIndex(this.index+p)},byteAt:function(){},readInt:function(p){var m,g=0;for(this.checkOffset(p),m=this.index+p-1;m>=this.index;m--)g=(g<<8)+this.byteAt(m);return this.index+=p,g},readString:function(p){return u.transformTo("string",this.readData(p))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var p=this.readInt(4);return new Date(Date.UTC(1980+(p>>25&127),(p>>21&15)-1,p>>16&31,p>>11&31,p>>5&63,(31&p)<<1))}},o.exports=f},{"../utils":32}],19:[function(l,o,c){var u=l("./Uint8ArrayReader");function f(p){u.call(this,p)}l("../utils").inherits(f,u),f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(l,o,c){var u=l("./DataReader");function f(p){u.call(this,p)}l("../utils").inherits(f,u),f.prototype.byteAt=function(p){return this.data.charCodeAt(this.zero+p)},f.prototype.lastIndexOfSignature=function(p){return this.data.lastIndexOf(p)-this.zero},f.prototype.readAndCheckSignature=function(p){return p===this.readData(4)},f.prototype.readData=function(p){this.checkOffset(p);var m=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./DataReader":18}],21:[function(l,o,c){var u=l("./ArrayReader");function f(p){u.call(this,p)}l("../utils").inherits(f,u),f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+p);return this.index+=p,m},o.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(l,o,c){var u=l("../utils"),f=l("../support"),p=l("./ArrayReader"),m=l("./StringReader"),g=l("./NodeBufferReader"),v=l("./Uint8ArrayReader");o.exports=function(y){var S=u.getTypeOf(y);return u.checkSupport(S),S!=="string"||f.uint8array?S==="nodebuffer"?new g(y):f.uint8array?new v(u.transformTo("uint8array",y)):new p(u.transformTo("array",y)):new m(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(l,o,c){c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(l,o,c){var u=l("./GenericWorker"),f=l("../utils");function p(m){u.call(this,"ConvertWorker to "+m),this.destType=m}f.inherits(p,u),p.prototype.processChunk=function(m){this.push({data:f.transformTo(this.destType,m.data),meta:m.meta})},o.exports=p},{"../utils":32,"./GenericWorker":28}],25:[function(l,o,c){var u=l("./GenericWorker"),f=l("../crc32");function p(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}l("../utils").inherits(p,u),p.prototype.processChunk=function(m){this.streamInfo.crc32=f(m.data,this.streamInfo.crc32||0),this.push(m)},o.exports=p},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(l,o,c){var u=l("../utils"),f=l("./GenericWorker");function p(m){f.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}u.inherits(p,f),p.prototype.processChunk=function(m){if(m){var g=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=g+m.data.length}f.prototype.processChunk.call(this,m)},o.exports=p},{"../utils":32,"./GenericWorker":28}],27:[function(l,o,c){var u=l("../utils"),f=l("./GenericWorker");function p(m){f.call(this,"DataWorker");var g=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(v){g.dataIsReady=!0,g.data=v,g.max=v&&v.length||0,g.type=u.getTypeOf(v),g.isPaused||g._tickAndRepeat()},function(v){g.error(v)})}u.inherits(p,f),p.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},p.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,g=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,g);break;case"uint8array":m=this.data.subarray(this.index,g);break;case"array":case"nodebuffer":m=this.data.slice(this.index,g)}return this.index=g,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=p},{"../utils":32,"./GenericWorker":28}],28:[function(l,o,c){function u(f){this.name=f||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(f){this.emit("data",f)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(f){this.emit("error",f)}return!0},error:function(f){return!this.isFinished&&(this.isPaused?this.generatedError=f:(this.isFinished=!0,this.emit("error",f),this.previous&&this.previous.error(f),this.cleanUp()),!0)},on:function(f,p){return this._listeners[f].push(p),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(f,p){if(this._listeners[f])for(var m=0;m<this._listeners[f].length;m++)this._listeners[f][m].call(this,p)},pipe:function(f){return f.registerPrevious(this)},registerPrevious:function(f){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=f.streamInfo,this.mergeStreamInfo(),this.previous=f;var p=this;return f.on("data",function(m){p.processChunk(m)}),f.on("end",function(){p.end()}),f.on("error",function(m){p.error(m)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var f=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),f=!0),this.previous&&this.previous.resume(),!f},flush:function(){},processChunk:function(f){this.push(f)},withStreamInfo:function(f,p){return this.extraStreamInfo[f]=p,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var f in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,f)&&(this.streamInfo[f]=this.extraStreamInfo[f])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var f="Worker "+this.name;return this.previous?this.previous+" -> "+f:f}},o.exports=u},{}],29:[function(l,o,c){var u=l("../utils"),f=l("./ConvertWorker"),p=l("./GenericWorker"),m=l("../base64"),g=l("../support"),v=l("../external"),y=null;if(g.nodestream)try{y=l("../nodejs/NodejsStreamOutputAdapter")}catch{}function S(E,N){return new v.Promise(function(A,w){var j=[],R=E._internalType,O=E._outputType,M=E._mimeType;E.on("data",function(F,X){j.push(F),N&&N(X)}).on("error",function(F){j=[],w(F)}).on("end",function(){try{var F=(function(X,Z,$){switch(X){case"blob":return u.newBlob(u.transformTo("arraybuffer",Z),$);case"base64":return m.encode(Z);default:return u.transformTo(X,Z)}})(O,(function(X,Z){var $,B=0,J=null,z=0;for($=0;$<Z.length;$++)z+=Z[$].length;switch(X){case"string":return Z.join("");case"array":return Array.prototype.concat.apply([],Z);case"uint8array":for(J=new Uint8Array(z),$=0;$<Z.length;$++)J.set(Z[$],B),B+=Z[$].length;return J;case"nodebuffer":return Buffer.concat(Z);default:throw new Error("concat : unsupported type '"+X+"'")}})(R,j),M);A(F)}catch(X){w(X)}j=[]}).resume()})}function b(E,N,A){var w=N;switch(N){case"blob":case"arraybuffer":w="uint8array";break;case"base64":w="string"}try{this._internalType=w,this._outputType=N,this._mimeType=A,u.checkSupport(w),this._worker=E.pipe(new f(w)),E.lock()}catch(j){this._worker=new p("error"),this._worker.error(j)}}b.prototype={accumulate:function(E){return S(this,E)},on:function(E,N){var A=this;return E==="data"?this._worker.on(E,function(w){N.call(A,w.data,w.meta)}):this._worker.on(E,function(){u.delay(N,arguments,A)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(E){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},E)}},o.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(l,o,c){if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",c.nodebuffer=typeof Buffer<"u",c.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")c.blob=!1;else{var u=new ArrayBuffer(0);try{c.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);f.append(u),c.blob=f.getBlob("application/zip").size===0}catch{c.blob=!1}}}try{c.nodestream=!!l("readable-stream").Readable}catch{c.nodestream=!1}},{"readable-stream":16}],31:[function(l,o,c){for(var u=l("./utils"),f=l("./support"),p=l("./nodejsUtils"),m=l("./stream/GenericWorker"),g=new Array(256),v=0;v<256;v++)g[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;g[254]=g[254]=1;function y(){m.call(this,"utf-8 decode"),this.leftOver=null}function S(){m.call(this,"utf-8 encode")}c.utf8encode=function(b){return f.nodebuffer?p.newBufferFrom(b,"utf-8"):(function(E){var N,A,w,j,R,O=E.length,M=0;for(j=0;j<O;j++)(64512&(A=E.charCodeAt(j)))==55296&&j+1<O&&(64512&(w=E.charCodeAt(j+1)))==56320&&(A=65536+(A-55296<<10)+(w-56320),j++),M+=A<128?1:A<2048?2:A<65536?3:4;for(N=f.uint8array?new Uint8Array(M):new Array(M),j=R=0;R<M;j++)(64512&(A=E.charCodeAt(j)))==55296&&j+1<O&&(64512&(w=E.charCodeAt(j+1)))==56320&&(A=65536+(A-55296<<10)+(w-56320),j++),A<128?N[R++]=A:(A<2048?N[R++]=192|A>>>6:(A<65536?N[R++]=224|A>>>12:(N[R++]=240|A>>>18,N[R++]=128|A>>>12&63),N[R++]=128|A>>>6&63),N[R++]=128|63&A);return N})(b)},c.utf8decode=function(b){return f.nodebuffer?u.transformTo("nodebuffer",b).toString("utf-8"):(function(E){var N,A,w,j,R=E.length,O=new Array(2*R);for(N=A=0;N<R;)if((w=E[N++])<128)O[A++]=w;else if(4<(j=g[w]))O[A++]=65533,N+=j-1;else{for(w&=j===2?31:j===3?15:7;1<j&&N<R;)w=w<<6|63&E[N++],j--;1<j?O[A++]=65533:w<65536?O[A++]=w:(w-=65536,O[A++]=55296|w>>10&1023,O[A++]=56320|1023&w)}return O.length!==A&&(O.subarray?O=O.subarray(0,A):O.length=A),u.applyFromCharCode(O)})(b=u.transformTo(f.uint8array?"uint8array":"array",b))},u.inherits(y,m),y.prototype.processChunk=function(b){var E=u.transformTo(f.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var N=E;(E=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),E.set(N,this.leftOver.length)}else E=this.leftOver.concat(E);this.leftOver=null}var A=(function(j,R){var O;for((R=R||j.length)>j.length&&(R=j.length),O=R-1;0<=O&&(192&j[O])==128;)O--;return O<0||O===0?R:O+g[j[O]]>R?O:R})(E),w=E;A!==E.length&&(f.uint8array?(w=E.subarray(0,A),this.leftOver=E.subarray(A,E.length)):(w=E.slice(0,A),this.leftOver=E.slice(A,E.length))),this.push({data:c.utf8decode(w),meta:b.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=y,u.inherits(S,m),S.prototype.processChunk=function(b){this.push({data:c.utf8encode(b.data),meta:b.meta})},c.Utf8EncodeWorker=S},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(l,o,c){var u=l("./support"),f=l("./base64"),p=l("./nodejsUtils"),m=l("./external");function g(N){return N}function v(N,A){for(var w=0;w<N.length;++w)A[w]=255&N.charCodeAt(w);return A}l("setimmediate"),c.newBlob=function(N,A){c.checkSupport("blob");try{return new Blob([N],{type:A})}catch{try{var w=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return w.append(N),w.getBlob(A)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(N,A,w){var j=[],R=0,O=N.length;if(O<=w)return String.fromCharCode.apply(null,N);for(;R<O;)A==="array"||A==="nodebuffer"?j.push(String.fromCharCode.apply(null,N.slice(R,Math.min(R+w,O)))):j.push(String.fromCharCode.apply(null,N.subarray(R,Math.min(R+w,O)))),R+=w;return j.join("")},stringifyByChar:function(N){for(var A="",w=0;w<N.length;w++)A+=String.fromCharCode(N[w]);return A},applyCanBeUsed:{uint8array:(function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,p.allocBuffer(1)).length===1}catch{return!1}})()}};function S(N){var A=65536,w=c.getTypeOf(N),j=!0;if(w==="uint8array"?j=y.applyCanBeUsed.uint8array:w==="nodebuffer"&&(j=y.applyCanBeUsed.nodebuffer),j)for(;1<A;)try{return y.stringifyByChunk(N,w,A)}catch{A=Math.floor(A/2)}return y.stringifyByChar(N)}function b(N,A){for(var w=0;w<N.length;w++)A[w]=N[w];return A}c.applyFromCharCode=S;var E={};E.string={string:g,array:function(N){return v(N,new Array(N.length))},arraybuffer:function(N){return E.string.uint8array(N).buffer},uint8array:function(N){return v(N,new Uint8Array(N.length))},nodebuffer:function(N){return v(N,p.allocBuffer(N.length))}},E.array={string:S,array:g,arraybuffer:function(N){return new Uint8Array(N).buffer},uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(N)}},E.arraybuffer={string:function(N){return S(new Uint8Array(N))},array:function(N){return b(new Uint8Array(N),new Array(N.byteLength))},arraybuffer:g,uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(new Uint8Array(N))}},E.uint8array={string:S,array:function(N){return b(N,new Array(N.length))},arraybuffer:function(N){return N.buffer},uint8array:g,nodebuffer:function(N){return p.newBufferFrom(N)}},E.nodebuffer={string:S,array:function(N){return b(N,new Array(N.length))},arraybuffer:function(N){return E.nodebuffer.uint8array(N).buffer},uint8array:function(N){return b(N,new Uint8Array(N.length))},nodebuffer:g},c.transformTo=function(N,A){if(A=A||"",!N)return A;c.checkSupport(N);var w=c.getTypeOf(A);return E[w][N](A)},c.resolve=function(N){for(var A=N.split("/"),w=[],j=0;j<A.length;j++){var R=A[j];R==="."||R===""&&j!==0&&j!==A.length-1||(R===".."?w.pop():w.push(R))}return w.join("/")},c.getTypeOf=function(N){if(typeof N=="string")return"string";var A=Object.prototype.toString.call(N);return A==="[object Array]"?"array":u.nodebuffer&&p.isBuffer(N)?"nodebuffer":u.uint8array&&A==="[object Uint8Array]"?"uint8array":u.arraybuffer&&A==="[object ArrayBuffer]"?"arraybuffer":void 0},c.checkSupport=function(N){if(!u[N.toLowerCase()])throw new Error(N+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(N){var A,w,j="";for(w=0;w<(N||"").length;w++)j+="\\x"+((A=N.charCodeAt(w))<16?"0":"")+A.toString(16).toUpperCase();return j},c.delay=function(N,A,w){setImmediate(function(){N.apply(w||null,A||[])})},c.inherits=function(N,A){function w(){}w.prototype=A.prototype,N.prototype=new w},c.extend=function(){var N,A,w={};for(N=0;N<arguments.length;N++)for(A in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],A)&&w[A]===void 0&&(w[A]=arguments[N][A]);return w},c.prepareContent=function(N,A,w,j,R){return m.Promise.resolve(A).then(function(O){return u.blob&&(O instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(O))!==-1)?Blob.prototype.arrayBuffer!==void 0?O.arrayBuffer():typeof FileReader<"u"?new m.Promise(function(M,F){var X=new FileReader;X.onload=function(Z){M(Z.target.result)},X.onerror=function(Z){F(Z.target.error)},X.readAsArrayBuffer(O)}):m.Promise.reject(new Error(N+" is a Blob, but we have no way of reading it.")):O}).then(function(O){var M=c.getTypeOf(O);return M?(M==="arraybuffer"?O=c.transformTo("uint8array",O):M==="string"&&(R?O=f.decode(O):w&&j!==!0&&(O=(function(F){return v(F,u.uint8array?new Uint8Array(F.length):new Array(F.length))})(O))),O):m.Promise.reject(new Error("Can't read the data of '"+N+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(l,o,c){var u=l("./reader/readerFor"),f=l("./utils"),p=l("./signature"),m=l("./zipEntry"),g=l("./support");function v(y){this.files=[],this.loadOptions=y}v.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var S=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(S)+", expected "+f.pretty(y)+")")}},isSignature:function(y,S){var b=this.reader.index;this.reader.setIndex(y);var E=this.reader.readString(4)===S;return this.reader.setIndex(b),E},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),S=g.uint8array?"uint8array":"array",b=f.transformTo(S,y);this.zipComment=this.loadOptions.decodeFileName(b)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,S,b,E=this.zip64EndOfCentralSize-44;0<E;)y=this.reader.readInt(2),S=this.reader.readInt(4),b=this.reader.readData(S),this.zip64ExtensibleData[y]={id:y,length:S,value:b}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,S;for(y=0;y<this.files.length;y++)S=this.files[y],this.reader.setIndex(S.localHeaderOffset),this.checkSignature(p.LOCAL_FILE_HEADER),S.readLocalPart(this.reader),S.handleUTF8(),S.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(p.CENTRAL_FILE_HEADER);)(y=new m({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(p.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,p.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var S=y;if(this.checkSignature(p.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,p.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var E=S-b;if(0<E)this.isSignature(S,p.CENTRAL_FILE_HEADER)||(this.reader.zero=E);else if(E<0)throw new Error("Corrupted zip: missing "+Math.abs(E)+" bytes.")},prepareReader:function(y){this.reader=u(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=v},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(l,o,c){var u=l("./reader/readerFor"),f=l("./utils"),p=l("./compressedObject"),m=l("./crc32"),g=l("./utf8"),v=l("./compressions"),y=l("./support");function S(b,E){this.options=b,this.loadOptions=E}S.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var E,N;if(b.skip(22),this.fileNameLength=b.readInt(2),N=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(N),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((E=(function(A){for(var w in v)if(Object.prototype.hasOwnProperty.call(v,w)&&v[w].magic===A)return v[w];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new p(this.compressedSize,this.uncompressedSize,this.crc32,E,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var E=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(E),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var b=u(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var E,N,A,w=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<w;)E=b.readInt(2),N=b.readInt(2),A=b.readData(N),this.extraFields[E]={id:E,length:N,value:A};b.setIndex(w)},handleUTF8:function(){var b=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=g.utf8decode(this.fileName),this.fileCommentStr=g.utf8decode(this.fileComment);else{var E=this.findExtraFieldUnicodePath();if(E!==null)this.fileNameStr=E;else{var N=f.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(N)}var A=this.findExtraFieldUnicodeComment();if(A!==null)this.fileCommentStr=A;else{var w=f.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(w)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var E=u(b.value);return E.readInt(1)!==1||m(this.fileName)!==E.readInt(4)?null:g.utf8decode(E.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var E=u(b.value);return E.readInt(1)!==1||m(this.fileComment)!==E.readInt(4)?null:g.utf8decode(E.readData(b.length-5))}return null}},o.exports=S},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(l,o,c){function u(E,N,A){this.name=E,this.dir=A.dir,this.date=A.date,this.comment=A.comment,this.unixPermissions=A.unixPermissions,this.dosPermissions=A.dosPermissions,this._data=N,this._dataBinary=A.binary,this.options={compression:A.compression,compressionOptions:A.compressionOptions}}var f=l("./stream/StreamHelper"),p=l("./stream/DataWorker"),m=l("./utf8"),g=l("./compressedObject"),v=l("./stream/GenericWorker");u.prototype={internalStream:function(E){var N=null,A="string";try{if(!E)throw new Error("No output type specified.");var w=(A=E.toLowerCase())==="string"||A==="text";A!=="binarystring"&&A!=="text"||(A="string"),N=this._decompressWorker();var j=!this._dataBinary;j&&!w&&(N=N.pipe(new m.Utf8EncodeWorker)),!j&&w&&(N=N.pipe(new m.Utf8DecodeWorker))}catch(R){(N=new v("error")).error(R)}return new f(N,A,"")},async:function(E,N){return this.internalStream(E).accumulate(N)},nodeStream:function(E,N){return this.internalStream(E||"nodebuffer").toNodejsStream(N)},_compressWorker:function(E,N){if(this._data instanceof g&&this._data.compression.magic===E.magic)return this._data.getCompressedWorker();var A=this._decompressWorker();return this._dataBinary||(A=A.pipe(new m.Utf8EncodeWorker)),g.createWorkerFrom(A,E,N)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof v?this._data:new p(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],S=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<y.length;b++)u.prototype[y[b]]=S;o.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(l,o,c){(function(u){var f,p,m=u.MutationObserver||u.WebKitMutationObserver;if(m){var g=0,v=new m(E),y=u.document.createTextNode("");v.observe(y,{characterData:!0}),f=function(){y.data=g=++g%2}}else if(u.setImmediate||u.MessageChannel===void 0)f="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var N=u.document.createElement("script");N.onreadystatechange=function(){E(),N.onreadystatechange=null,N.parentNode.removeChild(N),N=null},u.document.documentElement.appendChild(N)}:function(){setTimeout(E,0)};else{var S=new u.MessageChannel;S.port1.onmessage=E,f=function(){S.port2.postMessage(0)}}var b=[];function E(){var N,A;p=!0;for(var w=b.length;w;){for(A=b,b=[],N=-1;++N<w;)A[N]();w=b.length}p=!1}o.exports=function(N){b.push(N)!==1||p||f()}}).call(this,typeof go<"u"?go:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(l,o,c){var u=l("immediate");function f(){}var p={},m=["REJECTED"],g=["FULFILLED"],v=["PENDING"];function y(w){if(typeof w!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,w!==f&&N(this,w)}function S(w,j,R){this.promise=w,typeof j=="function"&&(this.onFulfilled=j,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}function b(w,j,R){u(function(){var O;try{O=j(R)}catch(M){return p.reject(w,M)}O===w?p.reject(w,new TypeError("Cannot resolve promise with itself")):p.resolve(w,O)})}function E(w){var j=w&&w.then;if(w&&(typeof w=="object"||typeof w=="function")&&typeof j=="function")return function(){j.apply(w,arguments)}}function N(w,j){var R=!1;function O(X){R||(R=!0,p.reject(w,X))}function M(X){R||(R=!0,p.resolve(w,X))}var F=A(function(){j(M,O)});F.status==="error"&&O(F.value)}function A(w,j){var R={};try{R.value=w(j),R.status="success"}catch(O){R.status="error",R.value=O}return R}(o.exports=y).prototype.finally=function(w){if(typeof w!="function")return this;var j=this.constructor;return this.then(function(R){return j.resolve(w()).then(function(){return R})},function(R){return j.resolve(w()).then(function(){throw R})})},y.prototype.catch=function(w){return this.then(null,w)},y.prototype.then=function(w,j){if(typeof w!="function"&&this.state===g||typeof j!="function"&&this.state===m)return this;var R=new this.constructor(f);return this.state!==v?b(R,this.state===g?w:j,this.outcome):this.queue.push(new S(R,w,j)),R},S.prototype.callFulfilled=function(w){p.resolve(this.promise,w)},S.prototype.otherCallFulfilled=function(w){b(this.promise,this.onFulfilled,w)},S.prototype.callRejected=function(w){p.reject(this.promise,w)},S.prototype.otherCallRejected=function(w){b(this.promise,this.onRejected,w)},p.resolve=function(w,j){var R=A(E,j);if(R.status==="error")return p.reject(w,R.value);var O=R.value;if(O)N(w,O);else{w.state=g,w.outcome=j;for(var M=-1,F=w.queue.length;++M<F;)w.queue[M].callFulfilled(j)}return w},p.reject=function(w,j){w.state=m,w.outcome=j;for(var R=-1,O=w.queue.length;++R<O;)w.queue[R].callRejected(j);return w},y.resolve=function(w){return w instanceof this?w:p.resolve(new this(f),w)},y.reject=function(w){var j=new this(f);return p.reject(j,w)},y.all=function(w){var j=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=w.length,O=!1;if(!R)return this.resolve([]);for(var M=new Array(R),F=0,X=-1,Z=new this(f);++X<R;)$(w[X],X);return Z;function $(B,J){j.resolve(B).then(function(z){M[J]=z,++F!==R||O||(O=!0,p.resolve(Z,M))},function(z){O||(O=!0,p.reject(Z,z))})}},y.race=function(w){var j=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=w.length,O=!1;if(!R)return this.resolve([]);for(var M=-1,F=new this(f);++M<R;)X=w[M],j.resolve(X).then(function(Z){O||(O=!0,p.resolve(F,Z))},function(Z){O||(O=!0,p.reject(F,Z))});var X;return F}},{immediate:36}],38:[function(l,o,c){var u={};(0,l("./lib/utils/common").assign)(u,l("./lib/deflate"),l("./lib/inflate"),l("./lib/zlib/constants")),o.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(l,o,c){var u=l("./zlib/deflate"),f=l("./utils/common"),p=l("./utils/strings"),m=l("./zlib/messages"),g=l("./zlib/zstream"),v=Object.prototype.toString,y=0,S=-1,b=0,E=8;function N(w){if(!(this instanceof N))return new N(w);this.options=f.assign({level:S,method:E,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},w||{});var j=this.options;j.raw&&0<j.windowBits?j.windowBits=-j.windowBits:j.gzip&&0<j.windowBits&&j.windowBits<16&&(j.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var R=u.deflateInit2(this.strm,j.level,j.method,j.windowBits,j.memLevel,j.strategy);if(R!==y)throw new Error(m[R]);if(j.header&&u.deflateSetHeader(this.strm,j.header),j.dictionary){var O;if(O=typeof j.dictionary=="string"?p.string2buf(j.dictionary):v.call(j.dictionary)==="[object ArrayBuffer]"?new Uint8Array(j.dictionary):j.dictionary,(R=u.deflateSetDictionary(this.strm,O))!==y)throw new Error(m[R]);this._dict_set=!0}}function A(w,j){var R=new N(j);if(R.push(w,!0),R.err)throw R.msg||m[R.err];return R.result}N.prototype.push=function(w,j){var R,O,M=this.strm,F=this.options.chunkSize;if(this.ended)return!1;O=j===~~j?j:j===!0?4:0,typeof w=="string"?M.input=p.string2buf(w):v.call(w)==="[object ArrayBuffer]"?M.input=new Uint8Array(w):M.input=w,M.next_in=0,M.avail_in=M.input.length;do{if(M.avail_out===0&&(M.output=new f.Buf8(F),M.next_out=0,M.avail_out=F),(R=u.deflate(M,O))!==1&&R!==y)return this.onEnd(R),!(this.ended=!0);M.avail_out!==0&&(M.avail_in!==0||O!==4&&O!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(M.output,M.next_out))):this.onData(f.shrinkBuf(M.output,M.next_out)))}while((0<M.avail_in||M.avail_out===0)&&R!==1);return O===4?(R=u.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===y):O!==2||(this.onEnd(y),!(M.avail_out=0))},N.prototype.onData=function(w){this.chunks.push(w)},N.prototype.onEnd=function(w){w===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=w,this.msg=this.strm.msg},c.Deflate=N,c.deflate=A,c.deflateRaw=function(w,j){return(j=j||{}).raw=!0,A(w,j)},c.gzip=function(w,j){return(j=j||{}).gzip=!0,A(w,j)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(l,o,c){var u=l("./zlib/inflate"),f=l("./utils/common"),p=l("./utils/strings"),m=l("./zlib/constants"),g=l("./zlib/messages"),v=l("./zlib/zstream"),y=l("./zlib/gzheader"),S=Object.prototype.toString;function b(N){if(!(this instanceof b))return new b(N);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},N||{});var A=this.options;A.raw&&0<=A.windowBits&&A.windowBits<16&&(A.windowBits=-A.windowBits,A.windowBits===0&&(A.windowBits=-15)),!(0<=A.windowBits&&A.windowBits<16)||N&&N.windowBits||(A.windowBits+=32),15<A.windowBits&&A.windowBits<48&&(15&A.windowBits)==0&&(A.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var w=u.inflateInit2(this.strm,A.windowBits);if(w!==m.Z_OK)throw new Error(g[w]);this.header=new y,u.inflateGetHeader(this.strm,this.header)}function E(N,A){var w=new b(A);if(w.push(N,!0),w.err)throw w.msg||g[w.err];return w.result}b.prototype.push=function(N,A){var w,j,R,O,M,F,X=this.strm,Z=this.options.chunkSize,$=this.options.dictionary,B=!1;if(this.ended)return!1;j=A===~~A?A:A===!0?m.Z_FINISH:m.Z_NO_FLUSH,typeof N=="string"?X.input=p.binstring2buf(N):S.call(N)==="[object ArrayBuffer]"?X.input=new Uint8Array(N):X.input=N,X.next_in=0,X.avail_in=X.input.length;do{if(X.avail_out===0&&(X.output=new f.Buf8(Z),X.next_out=0,X.avail_out=Z),(w=u.inflate(X,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&$&&(F=typeof $=="string"?p.string2buf($):S.call($)==="[object ArrayBuffer]"?new Uint8Array($):$,w=u.inflateSetDictionary(this.strm,F)),w===m.Z_BUF_ERROR&&B===!0&&(w=m.Z_OK,B=!1),w!==m.Z_STREAM_END&&w!==m.Z_OK)return this.onEnd(w),!(this.ended=!0);X.next_out&&(X.avail_out!==0&&w!==m.Z_STREAM_END&&(X.avail_in!==0||j!==m.Z_FINISH&&j!==m.Z_SYNC_FLUSH)||(this.options.to==="string"?(R=p.utf8border(X.output,X.next_out),O=X.next_out-R,M=p.buf2string(X.output,R),X.next_out=O,X.avail_out=Z-O,O&&f.arraySet(X.output,X.output,R,O,0),this.onData(M)):this.onData(f.shrinkBuf(X.output,X.next_out)))),X.avail_in===0&&X.avail_out===0&&(B=!0)}while((0<X.avail_in||X.avail_out===0)&&w!==m.Z_STREAM_END);return w===m.Z_STREAM_END&&(j=m.Z_FINISH),j===m.Z_FINISH?(w=u.inflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===m.Z_OK):j!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(X.avail_out=0))},b.prototype.onData=function(N){this.chunks.push(N)},b.prototype.onEnd=function(N){N===m.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg},c.Inflate=b,c.inflate=E,c.inflateRaw=function(N,A){return(A=A||{}).raw=!0,E(N,A)},c.ungzip=E},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(l,o,c){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";c.assign=function(m){for(var g=Array.prototype.slice.call(arguments,1);g.length;){var v=g.shift();if(v){if(typeof v!="object")throw new TypeError(v+"must be non-object");for(var y in v)v.hasOwnProperty(y)&&(m[y]=v[y])}}return m},c.shrinkBuf=function(m,g){return m.length===g?m:m.subarray?m.subarray(0,g):(m.length=g,m)};var f={arraySet:function(m,g,v,y,S){if(g.subarray&&m.subarray)m.set(g.subarray(v,v+y),S);else for(var b=0;b<y;b++)m[S+b]=g[v+b]},flattenChunks:function(m){var g,v,y,S,b,E;for(g=y=0,v=m.length;g<v;g++)y+=m[g].length;for(E=new Uint8Array(y),g=S=0,v=m.length;g<v;g++)b=m[g],E.set(b,S),S+=b.length;return E}},p={arraySet:function(m,g,v,y,S){for(var b=0;b<y;b++)m[S+b]=g[v+b]},flattenChunks:function(m){return[].concat.apply([],m)}};c.setTyped=function(m){m?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,f)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,p))},c.setTyped(u)},{}],42:[function(l,o,c){var u=l("./common"),f=!0,p=!0;try{String.fromCharCode.apply(null,[0])}catch{f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{p=!1}for(var m=new u.Buf8(256),g=0;g<256;g++)m[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;function v(y,S){if(S<65537&&(y.subarray&&p||!y.subarray&&f))return String.fromCharCode.apply(null,u.shrinkBuf(y,S));for(var b="",E=0;E<S;E++)b+=String.fromCharCode(y[E]);return b}m[254]=m[254]=1,c.string2buf=function(y){var S,b,E,N,A,w=y.length,j=0;for(N=0;N<w;N++)(64512&(b=y.charCodeAt(N)))==55296&&N+1<w&&(64512&(E=y.charCodeAt(N+1)))==56320&&(b=65536+(b-55296<<10)+(E-56320),N++),j+=b<128?1:b<2048?2:b<65536?3:4;for(S=new u.Buf8(j),N=A=0;A<j;N++)(64512&(b=y.charCodeAt(N)))==55296&&N+1<w&&(64512&(E=y.charCodeAt(N+1)))==56320&&(b=65536+(b-55296<<10)+(E-56320),N++),b<128?S[A++]=b:(b<2048?S[A++]=192|b>>>6:(b<65536?S[A++]=224|b>>>12:(S[A++]=240|b>>>18,S[A++]=128|b>>>12&63),S[A++]=128|b>>>6&63),S[A++]=128|63&b);return S},c.buf2binstring=function(y){return v(y,y.length)},c.binstring2buf=function(y){for(var S=new u.Buf8(y.length),b=0,E=S.length;b<E;b++)S[b]=y.charCodeAt(b);return S},c.buf2string=function(y,S){var b,E,N,A,w=S||y.length,j=new Array(2*w);for(b=E=0;b<w;)if((N=y[b++])<128)j[E++]=N;else if(4<(A=m[N]))j[E++]=65533,b+=A-1;else{for(N&=A===2?31:A===3?15:7;1<A&&b<w;)N=N<<6|63&y[b++],A--;1<A?j[E++]=65533:N<65536?j[E++]=N:(N-=65536,j[E++]=55296|N>>10&1023,j[E++]=56320|1023&N)}return v(j,E)},c.utf8border=function(y,S){var b;for((S=S||y.length)>y.length&&(S=y.length),b=S-1;0<=b&&(192&y[b])==128;)b--;return b<0||b===0?S:b+m[y[b]]>S?b:S}},{"./common":41}],43:[function(l,o,c){o.exports=function(u,f,p,m){for(var g=65535&u|0,v=u>>>16&65535|0,y=0;p!==0;){for(p-=y=2e3<p?2e3:p;v=v+(g=g+f[m++]|0)|0,--y;);g%=65521,v%=65521}return g|v<<16|0}},{}],44:[function(l,o,c){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(l,o,c){var u=(function(){for(var f,p=[],m=0;m<256;m++){f=m;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;p[m]=f}return p})();o.exports=function(f,p,m,g){var v=u,y=g+m;f^=-1;for(var S=g;S<y;S++)f=f>>>8^v[255&(f^p[S])];return-1^f}},{}],46:[function(l,o,c){var u,f=l("../utils/common"),p=l("./trees"),m=l("./adler32"),g=l("./crc32"),v=l("./messages"),y=0,S=4,b=0,E=-2,N=-1,A=4,w=2,j=8,R=9,O=286,M=30,F=19,X=2*O+1,Z=15,$=3,B=258,J=B+$+1,z=42,H=113,T=1,K=2,V=3,Q=4;function W(k,pe){return k.msg=v[pe],pe}function D(k){return(k<<1)-(4<k?9:0)}function Y(k){for(var pe=k.length;0<=--pe;)k[pe]=0}function x(k){var pe=k.state,ce=pe.pending;ce>k.avail_out&&(ce=k.avail_out),ce!==0&&(f.arraySet(k.output,pe.pending_buf,pe.pending_out,ce,k.next_out),k.next_out+=ce,pe.pending_out+=ce,k.total_out+=ce,k.avail_out-=ce,pe.pending-=ce,pe.pending===0&&(pe.pending_out=0))}function C(k,pe){p._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,pe),k.block_start=k.strstart,x(k.strm)}function q(k,pe){k.pending_buf[k.pending++]=pe}function I(k,pe){k.pending_buf[k.pending++]=pe>>>8&255,k.pending_buf[k.pending++]=255&pe}function ee(k,pe){var ce,G,P=k.max_chain_length,ne=k.strstart,xe=k.prev_length,ge=k.nice_match,se=k.strstart>k.w_size-J?k.strstart-(k.w_size-J):0,Te=k.window,Ee=k.w_mask,we=k.prev,ke=k.strstart+B,qe=Te[ne+xe-1],fe=Te[ne+xe];k.prev_length>=k.good_match&&(P>>=2),ge>k.lookahead&&(ge=k.lookahead);do if(Te[(ce=pe)+xe]===fe&&Te[ce+xe-1]===qe&&Te[ce]===Te[ne]&&Te[++ce]===Te[ne+1]){ne+=2,ce++;do;while(Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&Te[++ne]===Te[++ce]&&ne<ke);if(G=B-(ke-ne),ne=ke-B,xe<G){if(k.match_start=pe,ge<=(xe=G))break;qe=Te[ne+xe-1],fe=Te[ne+xe]}}while((pe=we[pe&Ee])>se&&--P!=0);return xe<=k.lookahead?xe:k.lookahead}function he(k){var pe,ce,G,P,ne,xe,ge,se,Te,Ee,we=k.w_size;do{if(P=k.window_size-k.lookahead-k.strstart,k.strstart>=we+(we-J)){for(f.arraySet(k.window,k.window,we,we,0),k.match_start-=we,k.strstart-=we,k.block_start-=we,pe=ce=k.hash_size;G=k.head[--pe],k.head[pe]=we<=G?G-we:0,--ce;);for(pe=ce=we;G=k.prev[--pe],k.prev[pe]=we<=G?G-we:0,--ce;);P+=we}if(k.strm.avail_in===0)break;if(xe=k.strm,ge=k.window,se=k.strstart+k.lookahead,Te=P,Ee=void 0,Ee=xe.avail_in,Te<Ee&&(Ee=Te),ce=Ee===0?0:(xe.avail_in-=Ee,f.arraySet(ge,xe.input,xe.next_in,Ee,se),xe.state.wrap===1?xe.adler=m(xe.adler,ge,Ee,se):xe.state.wrap===2&&(xe.adler=g(xe.adler,ge,Ee,se)),xe.next_in+=Ee,xe.total_in+=Ee,Ee),k.lookahead+=ce,k.lookahead+k.insert>=$)for(ne=k.strstart-k.insert,k.ins_h=k.window[ne],k.ins_h=(k.ins_h<<k.hash_shift^k.window[ne+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[ne+$-1])&k.hash_mask,k.prev[ne&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=ne,ne++,k.insert--,!(k.lookahead+k.insert<$)););}while(k.lookahead<J&&k.strm.avail_in!==0)}function _e(k,pe){for(var ce,G;;){if(k.lookahead<J){if(he(k),k.lookahead<J&&pe===y)return T;if(k.lookahead===0)break}if(ce=0,k.lookahead>=$&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),ce!==0&&k.strstart-ce<=k.w_size-J&&(k.match_length=ee(k,ce)),k.match_length>=$)if(G=p._tr_tally(k,k.strstart-k.match_start,k.match_length-$),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=$){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else G=p._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(G&&(C(k,!1),k.strm.avail_out===0))return T}return k.insert=k.strstart<$-1?k.strstart:$-1,pe===S?(C(k,!0),k.strm.avail_out===0?V:Q):k.last_lit&&(C(k,!1),k.strm.avail_out===0)?T:K}function Ne(k,pe){for(var ce,G,P;;){if(k.lookahead<J){if(he(k),k.lookahead<J&&pe===y)return T;if(k.lookahead===0)break}if(ce=0,k.lookahead>=$&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=$-1,ce!==0&&k.prev_length<k.max_lazy_match&&k.strstart-ce<=k.w_size-J&&(k.match_length=ee(k,ce),k.match_length<=5&&(k.strategy===1||k.match_length===$&&4096<k.strstart-k.match_start)&&(k.match_length=$-1)),k.prev_length>=$&&k.match_length<=k.prev_length){for(P=k.strstart+k.lookahead-$,G=p._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-$),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=P&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+$-1])&k.hash_mask,ce=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=$-1,k.strstart++,G&&(C(k,!1),k.strm.avail_out===0))return T}else if(k.match_available){if((G=p._tr_tally(k,0,k.window[k.strstart-1]))&&C(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return T}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(G=p._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<$-1?k.strstart:$-1,pe===S?(C(k,!0),k.strm.avail_out===0?V:Q):k.last_lit&&(C(k,!1),k.strm.avail_out===0)?T:K}function le(k,pe,ce,G,P){this.good_length=k,this.max_lazy=pe,this.nice_length=ce,this.max_chain=G,this.func=P}function Ce(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=j,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new f.Buf16(2*X),this.dyn_dtree=new f.Buf16(2*(2*M+1)),this.bl_tree=new f.Buf16(2*(2*F+1)),Y(this.dyn_ltree),Y(this.dyn_dtree),Y(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new f.Buf16(Z+1),this.heap=new f.Buf16(2*O+1),Y(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*O+1),Y(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(k){var pe;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=w,(pe=k.state).pending=0,pe.pending_out=0,pe.wrap<0&&(pe.wrap=-pe.wrap),pe.status=pe.wrap?z:H,k.adler=pe.wrap===2?0:1,pe.last_flush=y,p._tr_init(pe),b):W(k,E)}function Ge(k){var pe=ye(k);return pe===b&&(function(ce){ce.window_size=2*ce.w_size,Y(ce.head),ce.max_lazy_match=u[ce.level].max_lazy,ce.good_match=u[ce.level].good_length,ce.nice_match=u[ce.level].nice_length,ce.max_chain_length=u[ce.level].max_chain,ce.strstart=0,ce.block_start=0,ce.lookahead=0,ce.insert=0,ce.match_length=ce.prev_length=$-1,ce.match_available=0,ce.ins_h=0})(k.state),pe}function Me(k,pe,ce,G,P,ne){if(!k)return E;var xe=1;if(pe===N&&(pe=6),G<0?(xe=0,G=-G):15<G&&(xe=2,G-=16),P<1||R<P||ce!==j||G<8||15<G||pe<0||9<pe||ne<0||A<ne)return W(k,E);G===8&&(G=9);var ge=new Ce;return(k.state=ge).strm=k,ge.wrap=xe,ge.gzhead=null,ge.w_bits=G,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=P+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+$-1)/$),ge.window=new f.Buf8(2*ge.w_size),ge.head=new f.Buf16(ge.hash_size),ge.prev=new f.Buf16(ge.w_size),ge.lit_bufsize=1<<P+6,ge.pending_buf_size=4*ge.lit_bufsize,ge.pending_buf=new f.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=pe,ge.strategy=ne,ge.method=ce,Ge(k)}u=[new le(0,0,0,0,function(k,pe){var ce=65535;for(ce>k.pending_buf_size-5&&(ce=k.pending_buf_size-5);;){if(k.lookahead<=1){if(he(k),k.lookahead===0&&pe===y)return T;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var G=k.block_start+ce;if((k.strstart===0||k.strstart>=G)&&(k.lookahead=k.strstart-G,k.strstart=G,C(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-J&&(C(k,!1),k.strm.avail_out===0))return T}return k.insert=0,pe===S?(C(k,!0),k.strm.avail_out===0?V:Q):(k.strstart>k.block_start&&(C(k,!1),k.strm.avail_out),T)}),new le(4,4,8,4,_e),new le(4,5,16,8,_e),new le(4,6,32,32,_e),new le(4,4,16,16,Ne),new le(8,16,32,32,Ne),new le(8,16,128,128,Ne),new le(8,32,128,256,Ne),new le(32,128,258,1024,Ne),new le(32,258,258,4096,Ne)],c.deflateInit=function(k,pe){return Me(k,pe,j,15,8,0)},c.deflateInit2=Me,c.deflateReset=Ge,c.deflateResetKeep=ye,c.deflateSetHeader=function(k,pe){return k&&k.state?k.state.wrap!==2?E:(k.state.gzhead=pe,b):E},c.deflate=function(k,pe){var ce,G,P,ne;if(!k||!k.state||5<pe||pe<0)return k?W(k,E):E;if(G=k.state,!k.output||!k.input&&k.avail_in!==0||G.status===666&&pe!==S)return W(k,k.avail_out===0?-5:E);if(G.strm=k,ce=G.last_flush,G.last_flush=pe,G.status===z)if(G.wrap===2)k.adler=0,q(G,31),q(G,139),q(G,8),G.gzhead?(q(G,(G.gzhead.text?1:0)+(G.gzhead.hcrc?2:0)+(G.gzhead.extra?4:0)+(G.gzhead.name?8:0)+(G.gzhead.comment?16:0)),q(G,255&G.gzhead.time),q(G,G.gzhead.time>>8&255),q(G,G.gzhead.time>>16&255),q(G,G.gzhead.time>>24&255),q(G,G.level===9?2:2<=G.strategy||G.level<2?4:0),q(G,255&G.gzhead.os),G.gzhead.extra&&G.gzhead.extra.length&&(q(G,255&G.gzhead.extra.length),q(G,G.gzhead.extra.length>>8&255)),G.gzhead.hcrc&&(k.adler=g(k.adler,G.pending_buf,G.pending,0)),G.gzindex=0,G.status=69):(q(G,0),q(G,0),q(G,0),q(G,0),q(G,0),q(G,G.level===9?2:2<=G.strategy||G.level<2?4:0),q(G,3),G.status=H);else{var xe=j+(G.w_bits-8<<4)<<8;xe|=(2<=G.strategy||G.level<2?0:G.level<6?1:G.level===6?2:3)<<6,G.strstart!==0&&(xe|=32),xe+=31-xe%31,G.status=H,I(G,xe),G.strstart!==0&&(I(G,k.adler>>>16),I(G,65535&k.adler)),k.adler=1}if(G.status===69)if(G.gzhead.extra){for(P=G.pending;G.gzindex<(65535&G.gzhead.extra.length)&&(G.pending!==G.pending_buf_size||(G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),x(k),P=G.pending,G.pending!==G.pending_buf_size));)q(G,255&G.gzhead.extra[G.gzindex]),G.gzindex++;G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),G.gzindex===G.gzhead.extra.length&&(G.gzindex=0,G.status=73)}else G.status=73;if(G.status===73)if(G.gzhead.name){P=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),x(k),P=G.pending,G.pending===G.pending_buf_size)){ne=1;break}ne=G.gzindex<G.gzhead.name.length?255&G.gzhead.name.charCodeAt(G.gzindex++):0,q(G,ne)}while(ne!==0);G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),ne===0&&(G.gzindex=0,G.status=91)}else G.status=91;if(G.status===91)if(G.gzhead.comment){P=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),x(k),P=G.pending,G.pending===G.pending_buf_size)){ne=1;break}ne=G.gzindex<G.gzhead.comment.length?255&G.gzhead.comment.charCodeAt(G.gzindex++):0,q(G,ne)}while(ne!==0);G.gzhead.hcrc&&G.pending>P&&(k.adler=g(k.adler,G.pending_buf,G.pending-P,P)),ne===0&&(G.status=103)}else G.status=103;if(G.status===103&&(G.gzhead.hcrc?(G.pending+2>G.pending_buf_size&&x(k),G.pending+2<=G.pending_buf_size&&(q(G,255&k.adler),q(G,k.adler>>8&255),k.adler=0,G.status=H)):G.status=H),G.pending!==0){if(x(k),k.avail_out===0)return G.last_flush=-1,b}else if(k.avail_in===0&&D(pe)<=D(ce)&&pe!==S)return W(k,-5);if(G.status===666&&k.avail_in!==0)return W(k,-5);if(k.avail_in!==0||G.lookahead!==0||pe!==y&&G.status!==666){var ge=G.strategy===2?(function(se,Te){for(var Ee;;){if(se.lookahead===0&&(he(se),se.lookahead===0)){if(Te===y)return T;break}if(se.match_length=0,Ee=p._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++,Ee&&(C(se,!1),se.strm.avail_out===0))return T}return se.insert=0,Te===S?(C(se,!0),se.strm.avail_out===0?V:Q):se.last_lit&&(C(se,!1),se.strm.avail_out===0)?T:K})(G,pe):G.strategy===3?(function(se,Te){for(var Ee,we,ke,qe,fe=se.window;;){if(se.lookahead<=B){if(he(se),se.lookahead<=B&&Te===y)return T;if(se.lookahead===0)break}if(se.match_length=0,se.lookahead>=$&&0<se.strstart&&(we=fe[ke=se.strstart-1])===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]){qe=se.strstart+B;do;while(we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&we===fe[++ke]&&ke<qe);se.match_length=B-(qe-ke),se.match_length>se.lookahead&&(se.match_length=se.lookahead)}if(se.match_length>=$?(Ee=p._tr_tally(se,1,se.match_length-$),se.lookahead-=se.match_length,se.strstart+=se.match_length,se.match_length=0):(Ee=p._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++),Ee&&(C(se,!1),se.strm.avail_out===0))return T}return se.insert=0,Te===S?(C(se,!0),se.strm.avail_out===0?V:Q):se.last_lit&&(C(se,!1),se.strm.avail_out===0)?T:K})(G,pe):u[G.level].func(G,pe);if(ge!==V&&ge!==Q||(G.status=666),ge===T||ge===V)return k.avail_out===0&&(G.last_flush=-1),b;if(ge===K&&(pe===1?p._tr_align(G):pe!==5&&(p._tr_stored_block(G,0,0,!1),pe===3&&(Y(G.head),G.lookahead===0&&(G.strstart=0,G.block_start=0,G.insert=0))),x(k),k.avail_out===0))return G.last_flush=-1,b}return pe!==S?b:G.wrap<=0?1:(G.wrap===2?(q(G,255&k.adler),q(G,k.adler>>8&255),q(G,k.adler>>16&255),q(G,k.adler>>24&255),q(G,255&k.total_in),q(G,k.total_in>>8&255),q(G,k.total_in>>16&255),q(G,k.total_in>>24&255)):(I(G,k.adler>>>16),I(G,65535&k.adler)),x(k),0<G.wrap&&(G.wrap=-G.wrap),G.pending!==0?b:1)},c.deflateEnd=function(k){var pe;return k&&k.state?(pe=k.state.status)!==z&&pe!==69&&pe!==73&&pe!==91&&pe!==103&&pe!==H&&pe!==666?W(k,E):(k.state=null,pe===H?W(k,-3):b):E},c.deflateSetDictionary=function(k,pe){var ce,G,P,ne,xe,ge,se,Te,Ee=pe.length;if(!k||!k.state||(ne=(ce=k.state).wrap)===2||ne===1&&ce.status!==z||ce.lookahead)return E;for(ne===1&&(k.adler=m(k.adler,pe,Ee,0)),ce.wrap=0,Ee>=ce.w_size&&(ne===0&&(Y(ce.head),ce.strstart=0,ce.block_start=0,ce.insert=0),Te=new f.Buf8(ce.w_size),f.arraySet(Te,pe,Ee-ce.w_size,ce.w_size,0),pe=Te,Ee=ce.w_size),xe=k.avail_in,ge=k.next_in,se=k.input,k.avail_in=Ee,k.next_in=0,k.input=pe,he(ce);ce.lookahead>=$;){for(G=ce.strstart,P=ce.lookahead-($-1);ce.ins_h=(ce.ins_h<<ce.hash_shift^ce.window[G+$-1])&ce.hash_mask,ce.prev[G&ce.w_mask]=ce.head[ce.ins_h],ce.head[ce.ins_h]=G,G++,--P;);ce.strstart=G,ce.lookahead=$-1,he(ce)}return ce.strstart+=ce.lookahead,ce.block_start=ce.strstart,ce.insert=ce.lookahead,ce.lookahead=0,ce.match_length=ce.prev_length=$-1,ce.match_available=0,k.next_in=ge,k.input=se,k.avail_in=xe,ce.wrap=ne,b},c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(l,o,c){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(l,o,c){o.exports=function(u,f){var p,m,g,v,y,S,b,E,N,A,w,j,R,O,M,F,X,Z,$,B,J,z,H,T,K;p=u.state,m=u.next_in,T=u.input,g=m+(u.avail_in-5),v=u.next_out,K=u.output,y=v-(f-u.avail_out),S=v+(u.avail_out-257),b=p.dmax,E=p.wsize,N=p.whave,A=p.wnext,w=p.window,j=p.hold,R=p.bits,O=p.lencode,M=p.distcode,F=(1<<p.lenbits)-1,X=(1<<p.distbits)-1;e:do{R<15&&(j+=T[m++]<<R,R+=8,j+=T[m++]<<R,R+=8),Z=O[j&F];t:for(;;){if(j>>>=$=Z>>>24,R-=$,($=Z>>>16&255)===0)K[v++]=65535&Z;else{if(!(16&$)){if((64&$)==0){Z=O[(65535&Z)+(j&(1<<$)-1)];continue t}if(32&$){p.mode=12;break e}u.msg="invalid literal/length code",p.mode=30;break e}B=65535&Z,($&=15)&&(R<$&&(j+=T[m++]<<R,R+=8),B+=j&(1<<$)-1,j>>>=$,R-=$),R<15&&(j+=T[m++]<<R,R+=8,j+=T[m++]<<R,R+=8),Z=M[j&X];n:for(;;){if(j>>>=$=Z>>>24,R-=$,!(16&($=Z>>>16&255))){if((64&$)==0){Z=M[(65535&Z)+(j&(1<<$)-1)];continue n}u.msg="invalid distance code",p.mode=30;break e}if(J=65535&Z,R<($&=15)&&(j+=T[m++]<<R,(R+=8)<$&&(j+=T[m++]<<R,R+=8)),b<(J+=j&(1<<$)-1)){u.msg="invalid distance too far back",p.mode=30;break e}if(j>>>=$,R-=$,($=v-y)<J){if(N<($=J-$)&&p.sane){u.msg="invalid distance too far back",p.mode=30;break e}if(H=w,(z=0)===A){if(z+=E-$,$<B){for(B-=$;K[v++]=w[z++],--$;);z=v-J,H=K}}else if(A<$){if(z+=E+A-$,($-=A)<B){for(B-=$;K[v++]=w[z++],--$;);if(z=0,A<B){for(B-=$=A;K[v++]=w[z++],--$;);z=v-J,H=K}}}else if(z+=A-$,$<B){for(B-=$;K[v++]=w[z++],--$;);z=v-J,H=K}for(;2<B;)K[v++]=H[z++],K[v++]=H[z++],K[v++]=H[z++],B-=3;B&&(K[v++]=H[z++],1<B&&(K[v++]=H[z++]))}else{for(z=v-J;K[v++]=K[z++],K[v++]=K[z++],K[v++]=K[z++],2<(B-=3););B&&(K[v++]=K[z++],1<B&&(K[v++]=K[z++]))}break}}break}}while(m<g&&v<S);m-=B=R>>3,j&=(1<<(R-=B<<3))-1,u.next_in=m,u.next_out=v,u.avail_in=m<g?g-m+5:5-(m-g),u.avail_out=v<S?S-v+257:257-(v-S),p.hold=j,p.bits=R}},{}],49:[function(l,o,c){var u=l("../utils/common"),f=l("./adler32"),p=l("./crc32"),m=l("./inffast"),g=l("./inftrees"),v=1,y=2,S=0,b=-2,E=1,N=852,A=592;function w(z){return(z>>>24&255)+(z>>>8&65280)+((65280&z)<<8)+((255&z)<<24)}function j(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R(z){var H;return z&&z.state?(H=z.state,z.total_in=z.total_out=H.total=0,z.msg="",H.wrap&&(z.adler=1&H.wrap),H.mode=E,H.last=0,H.havedict=0,H.dmax=32768,H.head=null,H.hold=0,H.bits=0,H.lencode=H.lendyn=new u.Buf32(N),H.distcode=H.distdyn=new u.Buf32(A),H.sane=1,H.back=-1,S):b}function O(z){var H;return z&&z.state?((H=z.state).wsize=0,H.whave=0,H.wnext=0,R(z)):b}function M(z,H){var T,K;return z&&z.state?(K=z.state,H<0?(T=0,H=-H):(T=1+(H>>4),H<48&&(H&=15)),H&&(H<8||15<H)?b:(K.window!==null&&K.wbits!==H&&(K.window=null),K.wrap=T,K.wbits=H,O(z))):b}function F(z,H){var T,K;return z?(K=new j,(z.state=K).window=null,(T=M(z,H))!==S&&(z.state=null),T):b}var X,Z,$=!0;function B(z){if($){var H;for(X=new u.Buf32(512),Z=new u.Buf32(32),H=0;H<144;)z.lens[H++]=8;for(;H<256;)z.lens[H++]=9;for(;H<280;)z.lens[H++]=7;for(;H<288;)z.lens[H++]=8;for(g(v,z.lens,0,288,X,0,z.work,{bits:9}),H=0;H<32;)z.lens[H++]=5;g(y,z.lens,0,32,Z,0,z.work,{bits:5}),$=!1}z.lencode=X,z.lenbits=9,z.distcode=Z,z.distbits=5}function J(z,H,T,K){var V,Q=z.state;return Q.window===null&&(Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new u.Buf8(Q.wsize)),K>=Q.wsize?(u.arraySet(Q.window,H,T-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(K<(V=Q.wsize-Q.wnext)&&(V=K),u.arraySet(Q.window,H,T-K,V,Q.wnext),(K-=V)?(u.arraySet(Q.window,H,T-K,K,0),Q.wnext=K,Q.whave=Q.wsize):(Q.wnext+=V,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave<Q.wsize&&(Q.whave+=V))),0}c.inflateReset=O,c.inflateReset2=M,c.inflateResetKeep=R,c.inflateInit=function(z){return F(z,15)},c.inflateInit2=F,c.inflate=function(z,H){var T,K,V,Q,W,D,Y,x,C,q,I,ee,he,_e,Ne,le,Ce,ye,Ge,Me,k,pe,ce,G,P=0,ne=new u.Buf8(4),xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!z||!z.state||!z.output||!z.input&&z.avail_in!==0)return b;(T=z.state).mode===12&&(T.mode=13),W=z.next_out,V=z.output,Y=z.avail_out,Q=z.next_in,K=z.input,D=z.avail_in,x=T.hold,C=T.bits,q=D,I=Y,pe=S;e:for(;;)switch(T.mode){case E:if(T.wrap===0){T.mode=13;break}for(;C<16;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(2&T.wrap&&x===35615){ne[T.check=0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0),C=x=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&x)<<8)+(x>>8))%31){z.msg="incorrect header check",T.mode=30;break}if((15&x)!=8){z.msg="unknown compression method",T.mode=30;break}if(C-=4,k=8+(15&(x>>>=4)),T.wbits===0)T.wbits=k;else if(k>T.wbits){z.msg="invalid window size",T.mode=30;break}T.dmax=1<<k,z.adler=T.check=1,T.mode=512&x?10:12,C=x=0;break;case 2:for(;C<16;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(T.flags=x,(255&T.flags)!=8){z.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){z.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=x>>8&1),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0)),C=x=0,T.mode=3;case 3:for(;C<32;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}T.head&&(T.head.time=x),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,ne[2]=x>>>16&255,ne[3]=x>>>24&255,T.check=p(T.check,ne,4,0)),C=x=0,T.mode=4;case 4:for(;C<16;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}T.head&&(T.head.xflags=255&x,T.head.os=x>>8),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0)),C=x=0,T.mode=5;case 5:if(1024&T.flags){for(;C<16;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}T.length=x,T.head&&(T.head.extra_len=x),512&T.flags&&(ne[0]=255&x,ne[1]=x>>>8&255,T.check=p(T.check,ne,2,0)),C=x=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(D<(ee=T.length)&&(ee=D),ee&&(T.head&&(k=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),u.arraySet(T.head.extra,K,Q,ee,k)),512&T.flags&&(T.check=p(T.check,K,ee,Q)),D-=ee,Q+=ee,T.length-=ee),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(D===0)break e;for(ee=0;k=K[Q+ee++],T.head&&k&&T.length<65536&&(T.head.name+=String.fromCharCode(k)),k&&ee<D;);if(512&T.flags&&(T.check=p(T.check,K,ee,Q)),D-=ee,Q+=ee,k)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(D===0)break e;for(ee=0;k=K[Q+ee++],T.head&&k&&T.length<65536&&(T.head.comment+=String.fromCharCode(k)),k&&ee<D;);if(512&T.flags&&(T.check=p(T.check,K,ee,Q)),D-=ee,Q+=ee,k)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;C<16;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(x!==(65535&T.check)){z.msg="header crc mismatch",T.mode=30;break}C=x=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),z.adler=T.check=0,T.mode=12;break;case 10:for(;C<32;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}z.adler=T.check=w(x),C=x=0,T.mode=11;case 11:if(T.havedict===0)return z.next_out=W,z.avail_out=Y,z.next_in=Q,z.avail_in=D,T.hold=x,T.bits=C,2;z.adler=T.check=1,T.mode=12;case 12:if(H===5||H===6)break e;case 13:if(T.last){x>>>=7&C,C-=7&C,T.mode=27;break}for(;C<3;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}switch(T.last=1&x,C-=1,3&(x>>>=1)){case 0:T.mode=14;break;case 1:if(B(T),T.mode=20,H!==6)break;x>>>=2,C-=2;break e;case 2:T.mode=17;break;case 3:z.msg="invalid block type",T.mode=30}x>>>=2,C-=2;break;case 14:for(x>>>=7&C,C-=7&C;C<32;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if((65535&x)!=(x>>>16^65535)){z.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&x,C=x=0,T.mode=15,H===6)break e;case 15:T.mode=16;case 16:if(ee=T.length){if(D<ee&&(ee=D),Y<ee&&(ee=Y),ee===0)break e;u.arraySet(V,K,Q,ee,W),D-=ee,Q+=ee,Y-=ee,W+=ee,T.length-=ee;break}T.mode=12;break;case 17:for(;C<14;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(T.nlen=257+(31&x),x>>>=5,C-=5,T.ndist=1+(31&x),x>>>=5,C-=5,T.ncode=4+(15&x),x>>>=4,C-=4,286<T.nlen||30<T.ndist){z.msg="too many length or distance symbols",T.mode=30;break}T.have=0,T.mode=18;case 18:for(;T.have<T.ncode;){for(;C<3;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}T.lens[xe[T.have++]]=7&x,x>>>=3,C-=3}for(;T.have<19;)T.lens[xe[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,ce={bits:T.lenbits},pe=g(0,T.lens,0,19,T.lencode,0,T.work,ce),T.lenbits=ce.bits,pe){z.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;le=(P=T.lencode[x&(1<<T.lenbits)-1])>>>16&255,Ce=65535&P,!((Ne=P>>>24)<=C);){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(Ce<16)x>>>=Ne,C-=Ne,T.lens[T.have++]=Ce;else{if(Ce===16){for(G=Ne+2;C<G;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(x>>>=Ne,C-=Ne,T.have===0){z.msg="invalid bit length repeat",T.mode=30;break}k=T.lens[T.have-1],ee=3+(3&x),x>>>=2,C-=2}else if(Ce===17){for(G=Ne+3;C<G;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}C-=Ne,k=0,ee=3+(7&(x>>>=Ne)),x>>>=3,C-=3}else{for(G=Ne+7;C<G;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}C-=Ne,k=0,ee=11+(127&(x>>>=Ne)),x>>>=7,C-=7}if(T.have+ee>T.nlen+T.ndist){z.msg="invalid bit length repeat",T.mode=30;break}for(;ee--;)T.lens[T.have++]=k}}if(T.mode===30)break;if(T.lens[256]===0){z.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,ce={bits:T.lenbits},pe=g(v,T.lens,0,T.nlen,T.lencode,0,T.work,ce),T.lenbits=ce.bits,pe){z.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,ce={bits:T.distbits},pe=g(y,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,ce),T.distbits=ce.bits,pe){z.msg="invalid distances set",T.mode=30;break}if(T.mode=20,H===6)break e;case 20:T.mode=21;case 21:if(6<=D&&258<=Y){z.next_out=W,z.avail_out=Y,z.next_in=Q,z.avail_in=D,T.hold=x,T.bits=C,m(z,I),W=z.next_out,V=z.output,Y=z.avail_out,Q=z.next_in,K=z.input,D=z.avail_in,x=T.hold,C=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;le=(P=T.lencode[x&(1<<T.lenbits)-1])>>>16&255,Ce=65535&P,!((Ne=P>>>24)<=C);){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(le&&(240&le)==0){for(ye=Ne,Ge=le,Me=Ce;le=(P=T.lencode[Me+((x&(1<<ye+Ge)-1)>>ye)])>>>16&255,Ce=65535&P,!(ye+(Ne=P>>>24)<=C);){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}x>>>=ye,C-=ye,T.back+=ye}if(x>>>=Ne,C-=Ne,T.back+=Ne,T.length=Ce,le===0){T.mode=26;break}if(32&le){T.back=-1,T.mode=12;break}if(64&le){z.msg="invalid literal/length code",T.mode=30;break}T.extra=15&le,T.mode=22;case 22:if(T.extra){for(G=T.extra;C<G;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}T.length+=x&(1<<T.extra)-1,x>>>=T.extra,C-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;le=(P=T.distcode[x&(1<<T.distbits)-1])>>>16&255,Ce=65535&P,!((Ne=P>>>24)<=C);){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if((240&le)==0){for(ye=Ne,Ge=le,Me=Ce;le=(P=T.distcode[Me+((x&(1<<ye+Ge)-1)>>ye)])>>>16&255,Ce=65535&P,!(ye+(Ne=P>>>24)<=C);){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}x>>>=ye,C-=ye,T.back+=ye}if(x>>>=Ne,C-=Ne,T.back+=Ne,64&le){z.msg="invalid distance code",T.mode=30;break}T.offset=Ce,T.extra=15&le,T.mode=24;case 24:if(T.extra){for(G=T.extra;C<G;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}T.offset+=x&(1<<T.extra)-1,x>>>=T.extra,C-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){z.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(Y===0)break e;if(ee=I-Y,T.offset>ee){if((ee=T.offset-ee)>T.whave&&T.sane){z.msg="invalid distance too far back",T.mode=30;break}he=ee>T.wnext?(ee-=T.wnext,T.wsize-ee):T.wnext-ee,ee>T.length&&(ee=T.length),_e=T.window}else _e=V,he=W-T.offset,ee=T.length;for(Y<ee&&(ee=Y),Y-=ee,T.length-=ee;V[W++]=_e[he++],--ee;);T.length===0&&(T.mode=21);break;case 26:if(Y===0)break e;V[W++]=T.length,Y--,T.mode=21;break;case 27:if(T.wrap){for(;C<32;){if(D===0)break e;D--,x|=K[Q++]<<C,C+=8}if(I-=Y,z.total_out+=I,T.total+=I,I&&(z.adler=T.check=T.flags?p(T.check,V,I,W-I):f(T.check,V,I,W-I)),I=Y,(T.flags?x:w(x))!==T.check){z.msg="incorrect data check",T.mode=30;break}C=x=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;C<32;){if(D===0)break e;D--,x+=K[Q++]<<C,C+=8}if(x!==(4294967295&T.total)){z.msg="incorrect length check",T.mode=30;break}C=x=0}T.mode=29;case 29:pe=1;break e;case 30:pe=-3;break e;case 31:return-4;default:return b}return z.next_out=W,z.avail_out=Y,z.next_in=Q,z.avail_in=D,T.hold=x,T.bits=C,(T.wsize||I!==z.avail_out&&T.mode<30&&(T.mode<27||H!==4))&&J(z,z.output,z.next_out,I-z.avail_out)?(T.mode=31,-4):(q-=z.avail_in,I-=z.avail_out,z.total_in+=q,z.total_out+=I,T.total+=I,T.wrap&&I&&(z.adler=T.check=T.flags?p(T.check,V,I,z.next_out-I):f(T.check,V,I,z.next_out-I)),z.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(q==0&&I===0||H===4)&&pe===S&&(pe=-5),pe)},c.inflateEnd=function(z){if(!z||!z.state)return b;var H=z.state;return H.window&&(H.window=null),z.state=null,S},c.inflateGetHeader=function(z,H){var T;return z&&z.state?(2&(T=z.state).wrap)==0?b:((T.head=H).done=!1,S):b},c.inflateSetDictionary=function(z,H){var T,K=H.length;return z&&z.state?(T=z.state).wrap!==0&&T.mode!==11?b:T.mode===11&&f(1,H,K,0)!==T.check?-3:J(z,H,K,K)?(T.mode=31,-4):(T.havedict=1,S):b},c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(l,o,c){var u=l("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],p=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(v,y,S,b,E,N,A,w){var j,R,O,M,F,X,Z,$,B,J=w.bits,z=0,H=0,T=0,K=0,V=0,Q=0,W=0,D=0,Y=0,x=0,C=null,q=0,I=new u.Buf16(16),ee=new u.Buf16(16),he=null,_e=0;for(z=0;z<=15;z++)I[z]=0;for(H=0;H<b;H++)I[y[S+H]]++;for(V=J,K=15;1<=K&&I[K]===0;K--);if(K<V&&(V=K),K===0)return E[N++]=20971520,E[N++]=20971520,w.bits=1,0;for(T=1;T<K&&I[T]===0;T++);for(V<T&&(V=T),z=D=1;z<=15;z++)if(D<<=1,(D-=I[z])<0)return-1;if(0<D&&(v===0||K!==1))return-1;for(ee[1]=0,z=1;z<15;z++)ee[z+1]=ee[z]+I[z];for(H=0;H<b;H++)y[S+H]!==0&&(A[ee[y[S+H]]++]=H);if(X=v===0?(C=he=A,19):v===1?(C=f,q-=257,he=p,_e-=257,256):(C=m,he=g,-1),z=T,F=N,W=H=x=0,O=-1,M=(Y=1<<(Q=V))-1,v===1&&852<Y||v===2&&592<Y)return 1;for(;;){for(Z=z-W,B=A[H]<X?($=0,A[H]):A[H]>X?($=he[_e+A[H]],C[q+A[H]]):($=96,0),j=1<<z-W,T=R=1<<Q;E[F+(x>>W)+(R-=j)]=Z<<24|$<<16|B|0,R!==0;);for(j=1<<z-1;x&j;)j>>=1;if(j!==0?(x&=j-1,x+=j):x=0,H++,--I[z]==0){if(z===K)break;z=y[S+A[H]]}if(V<z&&(x&M)!==O){for(W===0&&(W=V),F+=T,D=1<<(Q=z-W);Q+W<K&&!((D-=I[Q+W])<=0);)Q++,D<<=1;if(Y+=1<<Q,v===1&&852<Y||v===2&&592<Y)return 1;E[O=x&M]=V<<24|Q<<16|F-N|0}}return x!==0&&(E[F+x]=z-W<<24|64<<16|0),w.bits=V,0}},{"../utils/common":41}],51:[function(l,o,c){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(l,o,c){var u=l("../utils/common"),f=0,p=1;function m(P){for(var ne=P.length;0<=--ne;)P[ne]=0}var g=0,v=29,y=256,S=y+1+v,b=30,E=19,N=2*S+1,A=15,w=16,j=7,R=256,O=16,M=17,F=18,X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=new Array(2*(S+2));m(J);var z=new Array(2*b);m(z);var H=new Array(512);m(H);var T=new Array(256);m(T);var K=new Array(v);m(K);var V,Q,W,D=new Array(b);function Y(P,ne,xe,ge,se){this.static_tree=P,this.extra_bits=ne,this.extra_base=xe,this.elems=ge,this.max_length=se,this.has_stree=P&&P.length}function x(P,ne){this.dyn_tree=P,this.max_code=0,this.stat_desc=ne}function C(P){return P<256?H[P]:H[256+(P>>>7)]}function q(P,ne){P.pending_buf[P.pending++]=255&ne,P.pending_buf[P.pending++]=ne>>>8&255}function I(P,ne,xe){P.bi_valid>w-xe?(P.bi_buf|=ne<<P.bi_valid&65535,q(P,P.bi_buf),P.bi_buf=ne>>w-P.bi_valid,P.bi_valid+=xe-w):(P.bi_buf|=ne<<P.bi_valid&65535,P.bi_valid+=xe)}function ee(P,ne,xe){I(P,xe[2*ne],xe[2*ne+1])}function he(P,ne){for(var xe=0;xe|=1&P,P>>>=1,xe<<=1,0<--ne;);return xe>>>1}function _e(P,ne,xe){var ge,se,Te=new Array(A+1),Ee=0;for(ge=1;ge<=A;ge++)Te[ge]=Ee=Ee+xe[ge-1]<<1;for(se=0;se<=ne;se++){var we=P[2*se+1];we!==0&&(P[2*se]=he(Te[we]++,we))}}function Ne(P){var ne;for(ne=0;ne<S;ne++)P.dyn_ltree[2*ne]=0;for(ne=0;ne<b;ne++)P.dyn_dtree[2*ne]=0;for(ne=0;ne<E;ne++)P.bl_tree[2*ne]=0;P.dyn_ltree[2*R]=1,P.opt_len=P.static_len=0,P.last_lit=P.matches=0}function le(P){8<P.bi_valid?q(P,P.bi_buf):0<P.bi_valid&&(P.pending_buf[P.pending++]=P.bi_buf),P.bi_buf=0,P.bi_valid=0}function Ce(P,ne,xe,ge){var se=2*ne,Te=2*xe;return P[se]<P[Te]||P[se]===P[Te]&&ge[ne]<=ge[xe]}function ye(P,ne,xe){for(var ge=P.heap[xe],se=xe<<1;se<=P.heap_len&&(se<P.heap_len&&Ce(ne,P.heap[se+1],P.heap[se],P.depth)&&se++,!Ce(ne,ge,P.heap[se],P.depth));)P.heap[xe]=P.heap[se],xe=se,se<<=1;P.heap[xe]=ge}function Ge(P,ne,xe){var ge,se,Te,Ee,we=0;if(P.last_lit!==0)for(;ge=P.pending_buf[P.d_buf+2*we]<<8|P.pending_buf[P.d_buf+2*we+1],se=P.pending_buf[P.l_buf+we],we++,ge===0?ee(P,se,ne):(ee(P,(Te=T[se])+y+1,ne),(Ee=X[Te])!==0&&I(P,se-=K[Te],Ee),ee(P,Te=C(--ge),xe),(Ee=Z[Te])!==0&&I(P,ge-=D[Te],Ee)),we<P.last_lit;);ee(P,R,ne)}function Me(P,ne){var xe,ge,se,Te=ne.dyn_tree,Ee=ne.stat_desc.static_tree,we=ne.stat_desc.has_stree,ke=ne.stat_desc.elems,qe=-1;for(P.heap_len=0,P.heap_max=N,xe=0;xe<ke;xe++)Te[2*xe]!==0?(P.heap[++P.heap_len]=qe=xe,P.depth[xe]=0):Te[2*xe+1]=0;for(;P.heap_len<2;)Te[2*(se=P.heap[++P.heap_len]=qe<2?++qe:0)]=1,P.depth[se]=0,P.opt_len--,we&&(P.static_len-=Ee[2*se+1]);for(ne.max_code=qe,xe=P.heap_len>>1;1<=xe;xe--)ye(P,Te,xe);for(se=ke;xe=P.heap[1],P.heap[1]=P.heap[P.heap_len--],ye(P,Te,1),ge=P.heap[1],P.heap[--P.heap_max]=xe,P.heap[--P.heap_max]=ge,Te[2*se]=Te[2*xe]+Te[2*ge],P.depth[se]=(P.depth[xe]>=P.depth[ge]?P.depth[xe]:P.depth[ge])+1,Te[2*xe+1]=Te[2*ge+1]=se,P.heap[1]=se++,ye(P,Te,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],(function(fe,ze){var $e,Ve,rt,tt,ft,pt,Re=ze.dyn_tree,kt=ze.max_code,_t=ze.stat_desc.static_tree,Ke=ze.stat_desc.has_stree,ut=ze.stat_desc.extra_bits,st=ze.stat_desc.extra_base,Ut=ze.stat_desc.max_length,mt=0;for(tt=0;tt<=A;tt++)fe.bl_count[tt]=0;for(Re[2*fe.heap[fe.heap_max]+1]=0,$e=fe.heap_max+1;$e<N;$e++)Ut<(tt=Re[2*Re[2*(Ve=fe.heap[$e])+1]+1]+1)&&(tt=Ut,mt++),Re[2*Ve+1]=tt,kt<Ve||(fe.bl_count[tt]++,ft=0,st<=Ve&&(ft=ut[Ve-st]),pt=Re[2*Ve],fe.opt_len+=pt*(tt+ft),Ke&&(fe.static_len+=pt*(_t[2*Ve+1]+ft)));if(mt!==0){do{for(tt=Ut-1;fe.bl_count[tt]===0;)tt--;fe.bl_count[tt]--,fe.bl_count[tt+1]+=2,fe.bl_count[Ut]--,mt-=2}while(0<mt);for(tt=Ut;tt!==0;tt--)for(Ve=fe.bl_count[tt];Ve!==0;)kt<(rt=fe.heap[--$e])||(Re[2*rt+1]!==tt&&(fe.opt_len+=(tt-Re[2*rt+1])*Re[2*rt],Re[2*rt+1]=tt),Ve--)}})(P,ne),_e(Te,qe,P.bl_count)}function k(P,ne,xe){var ge,se,Te=-1,Ee=ne[1],we=0,ke=7,qe=4;for(Ee===0&&(ke=138,qe=3),ne[2*(xe+1)+1]=65535,ge=0;ge<=xe;ge++)se=Ee,Ee=ne[2*(ge+1)+1],++we<ke&&se===Ee||(we<qe?P.bl_tree[2*se]+=we:se!==0?(se!==Te&&P.bl_tree[2*se]++,P.bl_tree[2*O]++):we<=10?P.bl_tree[2*M]++:P.bl_tree[2*F]++,Te=se,qe=(we=0)===Ee?(ke=138,3):se===Ee?(ke=6,3):(ke=7,4))}function pe(P,ne,xe){var ge,se,Te=-1,Ee=ne[1],we=0,ke=7,qe=4;for(Ee===0&&(ke=138,qe=3),ge=0;ge<=xe;ge++)if(se=Ee,Ee=ne[2*(ge+1)+1],!(++we<ke&&se===Ee)){if(we<qe)for(;ee(P,se,P.bl_tree),--we!=0;);else se!==0?(se!==Te&&(ee(P,se,P.bl_tree),we--),ee(P,O,P.bl_tree),I(P,we-3,2)):we<=10?(ee(P,M,P.bl_tree),I(P,we-3,3)):(ee(P,F,P.bl_tree),I(P,we-11,7));Te=se,qe=(we=0)===Ee?(ke=138,3):se===Ee?(ke=6,3):(ke=7,4)}}m(D);var ce=!1;function G(P,ne,xe,ge){I(P,(g<<1)+(ge?1:0),3),(function(se,Te,Ee,we){le(se),q(se,Ee),q(se,~Ee),u.arraySet(se.pending_buf,se.window,Te,Ee,se.pending),se.pending+=Ee})(P,ne,xe)}c._tr_init=function(P){ce||((function(){var ne,xe,ge,se,Te,Ee=new Array(A+1);for(se=ge=0;se<v-1;se++)for(K[se]=ge,ne=0;ne<1<<X[se];ne++)T[ge++]=se;for(T[ge-1]=se,se=Te=0;se<16;se++)for(D[se]=Te,ne=0;ne<1<<Z[se];ne++)H[Te++]=se;for(Te>>=7;se<b;se++)for(D[se]=Te<<7,ne=0;ne<1<<Z[se]-7;ne++)H[256+Te++]=se;for(xe=0;xe<=A;xe++)Ee[xe]=0;for(ne=0;ne<=143;)J[2*ne+1]=8,ne++,Ee[8]++;for(;ne<=255;)J[2*ne+1]=9,ne++,Ee[9]++;for(;ne<=279;)J[2*ne+1]=7,ne++,Ee[7]++;for(;ne<=287;)J[2*ne+1]=8,ne++,Ee[8]++;for(_e(J,S+1,Ee),ne=0;ne<b;ne++)z[2*ne+1]=5,z[2*ne]=he(ne,5);V=new Y(J,X,y+1,S,A),Q=new Y(z,Z,0,b,A),W=new Y(new Array(0),$,0,E,j)})(),ce=!0),P.l_desc=new x(P.dyn_ltree,V),P.d_desc=new x(P.dyn_dtree,Q),P.bl_desc=new x(P.bl_tree,W),P.bi_buf=0,P.bi_valid=0,Ne(P)},c._tr_stored_block=G,c._tr_flush_block=function(P,ne,xe,ge){var se,Te,Ee=0;0<P.level?(P.strm.data_type===2&&(P.strm.data_type=(function(we){var ke,qe=4093624447;for(ke=0;ke<=31;ke++,qe>>>=1)if(1&qe&&we.dyn_ltree[2*ke]!==0)return f;if(we.dyn_ltree[18]!==0||we.dyn_ltree[20]!==0||we.dyn_ltree[26]!==0)return p;for(ke=32;ke<y;ke++)if(we.dyn_ltree[2*ke]!==0)return p;return f})(P)),Me(P,P.l_desc),Me(P,P.d_desc),Ee=(function(we){var ke;for(k(we,we.dyn_ltree,we.l_desc.max_code),k(we,we.dyn_dtree,we.d_desc.max_code),Me(we,we.bl_desc),ke=E-1;3<=ke&&we.bl_tree[2*B[ke]+1]===0;ke--);return we.opt_len+=3*(ke+1)+5+5+4,ke})(P),se=P.opt_len+3+7>>>3,(Te=P.static_len+3+7>>>3)<=se&&(se=Te)):se=Te=xe+5,xe+4<=se&&ne!==-1?G(P,ne,xe,ge):P.strategy===4||Te===se?(I(P,2+(ge?1:0),3),Ge(P,J,z)):(I(P,4+(ge?1:0),3),(function(we,ke,qe,fe){var ze;for(I(we,ke-257,5),I(we,qe-1,5),I(we,fe-4,4),ze=0;ze<fe;ze++)I(we,we.bl_tree[2*B[ze]+1],3);pe(we,we.dyn_ltree,ke-1),pe(we,we.dyn_dtree,qe-1)})(P,P.l_desc.max_code+1,P.d_desc.max_code+1,Ee+1),Ge(P,P.dyn_ltree,P.dyn_dtree)),Ne(P),ge&&le(P)},c._tr_tally=function(P,ne,xe){return P.pending_buf[P.d_buf+2*P.last_lit]=ne>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&ne,P.pending_buf[P.l_buf+P.last_lit]=255&xe,P.last_lit++,ne===0?P.dyn_ltree[2*xe]++:(P.matches++,ne--,P.dyn_ltree[2*(T[xe]+y+1)]++,P.dyn_dtree[2*C(ne)]++),P.last_lit===P.lit_bufsize-1},c._tr_align=function(P){I(P,2,3),ee(P,R,J),(function(ne){ne.bi_valid===16?(q(ne,ne.bi_buf),ne.bi_buf=0,ne.bi_valid=0):8<=ne.bi_valid&&(ne.pending_buf[ne.pending++]=255&ne.bi_buf,ne.bi_buf>>=8,ne.bi_valid-=8)})(P)}},{"../utils/common":41}],53:[function(l,o,c){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(l,o,c){(function(u){(function(f,p){if(!f.setImmediate){var m,g,v,y,S=1,b={},E=!1,N=f.document,A=Object.getPrototypeOf&&Object.getPrototypeOf(f);A=A&&A.setTimeout?A:f,m={}.toString.call(f.process)==="[object process]"?function(O){process.nextTick(function(){j(O)})}:(function(){if(f.postMessage&&!f.importScripts){var O=!0,M=f.onmessage;return f.onmessage=function(){O=!1},f.postMessage("","*"),f.onmessage=M,O}})()?(y="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",R,!1):f.attachEvent("onmessage",R),function(O){f.postMessage(y+O,"*")}):f.MessageChannel?((v=new MessageChannel).port1.onmessage=function(O){j(O.data)},function(O){v.port2.postMessage(O)}):N&&"onreadystatechange"in N.createElement("script")?(g=N.documentElement,function(O){var M=N.createElement("script");M.onreadystatechange=function(){j(O),M.onreadystatechange=null,g.removeChild(M),M=null},g.appendChild(M)}):function(O){setTimeout(j,0,O)},A.setImmediate=function(O){typeof O!="function"&&(O=new Function(""+O));for(var M=new Array(arguments.length-1),F=0;F<M.length;F++)M[F]=arguments[F+1];var X={callback:O,args:M};return b[S]=X,m(S),S++},A.clearImmediate=w}function w(O){delete b[O]}function j(O){if(E)setTimeout(j,0,O);else{var M=b[O];if(M){E=!0;try{(function(F){var X=F.callback,Z=F.args;switch(Z.length){case 0:X();break;case 1:X(Z[0]);break;case 2:X(Z[0],Z[1]);break;case 3:X(Z[0],Z[1],Z[2]);break;default:X.apply(p,Z)}})(M)}finally{w(O),E=!1}}}}function R(O){O.source===f&&typeof O.data=="string"&&O.data.indexOf(y)===0&&j(+O.data.slice(y.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof go<"u"?go:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Gd)),Gd.exports}var fT=dT();const hT=$v(fT),Iv=()=>({id:`BUG-${Date.now().toString().slice(-6)}`,title:"",severity:"medium",status:"open",actualResult:"",expectedResult:"",stepsToReproduce:"",attachments:[],createdAt:new Date().toISOString()});function pT({reports:a,testCases:s,onSave:l,onDelete:o}){const{ui:c}=Le(),[u,f]=L.useState(),[p,m]=L.useState(!1);async function g(){m(!0);try{const v=new hT;v.file("bug-reports.csv",vT(a));for(const E of a)for(const N of E.attachments)v.file(`attachments/${Fo(E.id)}/${Fo(N.name)}`,N.dataUrl.split(",")[1]??"",{base64:!0});const y=await v.generateAsync({type:"blob"}),S=URL.createObjectURL(y),b=document.createElement("a");b.href=S,b.download=`lazyscout-bug-reports-${new Date().toISOString().slice(0,10)}.zip`,b.click(),URL.revokeObjectURL(S)}finally{m(!1)}}return n.jsxs("section",{className:"bug-reports",children:[n.jsxs("div",{className:"bug-reports-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:c("Defect tracking")}),n.jsx("h3",{children:c("Bug Reports")}),n.jsx("p",{children:c("Capture reproducible issues and keep screenshots with the local project.")})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!a.length||p,onClick:()=>{g()},children:c(p?"Creating ZIP…":"Export ZIP + images")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>f(Iv()),children:c("+ Add Bug Report")})]})]}),a.length?n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"bug-report-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:c("Bug ID")}),n.jsx("th",{children:c("Title")}),n.jsx("th",{children:c("Test Case")}),n.jsx("th",{children:c("Severity")}),n.jsx("th",{children:c("Status")}),n.jsx("th",{children:c("Evidence")}),n.jsx("th",{children:c("Actions")})]})}),n.jsx("tbody",{children:a.map(v=>n.jsxs("tr",{children:[n.jsx("td",{children:v.id}),n.jsxs("td",{children:[n.jsx("b",{children:v.title||c("Untitled bug")}),n.jsx("small",{children:new Date(v.createdAt).toLocaleDateString()})]}),n.jsx("td",{children:v.testCaseId||"—"}),n.jsx("td",{children:n.jsx("span",{className:`bug-severity ${v.severity}`,children:v.severity})}),n.jsx("td",{children:n.jsx("span",{className:"bug-status",children:v.status})}),n.jsxs("td",{children:[v.attachments.length," ",c("screenshot"),v.attachments.length===1?"":"s"]}),n.jsx("td",{children:n.jsxs("div",{className:"flex justify-center gap-1",children:[n.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>f(v),children:c("Edit")}),n.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>o(v.id),children:c("Delete")})]})})]},v.id))})]})}):n.jsxs("div",{className:"bug-empty",children:[n.jsx("b",{children:c("No Bug Reports yet")}),n.jsx("span",{children:c("When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here.")}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>f(Iv()),children:c("Create first Bug Report")})]}),u&&n.jsx(mT,{report:u,testCases:s,onClose:()=>f(void 0),onSave:v=>{l(v),f(void 0)}})]})}function mT({report:a,testCases:s,onSave:l,onClose:o}){const{ui:c}=Le(),[u,f]=L.useState(a);async function p(m){const g=[...m.target.files??[]].filter(y=>y.type.startsWith("image/")).slice(0,5),v=await Promise.all(g.map(async y=>({name:y.name,type:y.type,dataUrl:await gT(y)})));f(y=>({...y,attachments:[...y.attachments,...v]}))}return n.jsx("div",{className:"modern-modal-backdrop",children:n.jsxs("section",{className:"modern-modal bug-editor",role:"dialog","aria-modal":"true","aria-labelledby":"bug-editor-title",children:[n.jsxs("header",{className:"modal-header",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:c("Bug Report")}),n.jsx("h2",{id:"bug-editor-title",children:u.id}),n.jsx("p",{children:c("Describe the defect so another person can reproduce it quickly.")})]}),n.jsx("button",{type:"button",className:"icon-btn","aria-label":c("Close"),onClick:o,children:"×"})]}),n.jsxs("div",{className:"bug-editor-body",children:[n.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_150px_150px]",children:[n.jsxs("label",{children:[n.jsx("span",{children:c("Title")}),n.jsx("input",{className:"field",value:u.title,onChange:m=>f({...u,title:m.target.value}),placeholder:c("What went wrong?")})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Severity")}),n.jsxs("select",{className:"field",value:u.severity,onChange:m=>f({...u,severity:m.target.value}),children:[n.jsx("option",{value:"critical",children:c("critical")}),n.jsx("option",{value:"high",children:c("high")}),n.jsx("option",{value:"medium",children:c("medium")}),n.jsx("option",{value:"low",children:c("low")})]})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Status")}),n.jsxs("select",{className:"field",value:u.status,onChange:m=>f({...u,status:m.target.value}),children:[n.jsx("option",{value:"open",children:c("open")}),n.jsx("option",{value:"in-progress",children:c("in-progress")}),n.jsx("option",{value:"resolved",children:c("resolved")})]})]})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Related Test Case")}),n.jsxs("select",{className:"field",value:u.testCaseId??"",onChange:m=>f({...u,testCaseId:m.target.value||void 0}),children:[n.jsx("option",{value:"",children:c("Not linked")}),s.map(m=>n.jsxs("option",{value:m.id,children:[m.id," · ",m.title]},m.id))]})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Steps to reproduce")}),n.jsx("textarea",{className:"field",rows:4,value:u.stepsToReproduce,onChange:m=>f({...u,stepsToReproduce:m.target.value}),placeholder:c(`1. Open…
63
63
  2. Click…
64
- 3. Observe…`)})]}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsxs("label",{children:[n.jsx("span",{children:c("Actual Result")}),n.jsx("textarea",{className:"field",rows:4,value:u.actualResult,onChange:m=>f({...u,actualResult:m.target.value})})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Expected Result")}),n.jsx("textarea",{className:"field",rows:4,value:u.expectedResult,onChange:m=>f({...u,expectedResult:m.target.value})})]})]}),n.jsxs("label",{className:"bug-upload",children:[n.jsx("span",{children:c("Evidence screenshots")}),n.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:m=>{p(m)}}),n.jsx("em",{children:c("Upload up to 5 images at a time. Images are included in ZIP export.")})]}),u.attachments.length?n.jsx("div",{className:"bug-attachments",children:u.attachments.map((m,g)=>n.jsxs("figure",{children:[n.jsx("img",{src:m.dataUrl,alt:m.name}),n.jsxs("figcaption",{children:[m.name,n.jsx("button",{type:"button",onClick:()=>f(v=>({...v,attachments:v.attachments.filter((y,j)=>j!==g)})),children:"×"})]})]},`${m.name}-${g}`))}):null]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:c("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!u.title.trim(),onClick:()=>l(u),children:c("Save Bug Report")})]})]})})}function pT(a){return new Promise((s,l)=>{const o=new FileReader;o.onload=()=>s(String(o.result)),o.onerror=()=>l(o.error),o.readAsDataURL(a)})}function Ho(a){return a.replace(/[^a-z0-9._-]/gi,"_")}function mT(a){const s=["Bug_ID","Title","Test_Case","Severity","Status","Steps_To_Reproduce","Actual_Result","Expected_Result","Attachments"],l=o=>`"${o.replaceAll('"','""')}"`;return[s,...a.map(o=>[o.id,o.title,o.testCaseId??"",o.severity,o.status,o.stepsToReproduce,o.actualResult,o.expectedResult,o.attachments.map(c=>`attachments/${Ho(o.id)}/${Ho(c.name)}`).join("; ")])].map(o=>o.map(l).join(",")).join(`\r
65
- `)}function gT({screenshots:a,onDelete:s}){const{ui:l}=Le();function o(c){const u=document.createElement("a");u.href=c.dataUrl,u.download=c.name,u.click()}return n.jsxs("section",{className:"screenshot-gallery",children:[n.jsxs("header",{className:"screenshot-gallery-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Playwright evidence")}),n.jsx("h3",{children:l("Screenshots")}),n.jsxs("p",{children:[l("LazyScout does not capture automatically. Add")," ",n.jsxs("code",{children:["await page.screenshot(","{"," path: 'evidence.png', fullPage: true ","}",")"]})," ",l("to edited Playwright code when evidence is needed.")]})]}),n.jsxs("span",{children:[a.length,l("/50 saved")]})]}),a.length?n.jsx("div",{className:"screenshot-gallery-grid",children:a.map(c=>n.jsxs("figure",{children:[n.jsx("img",{src:c.dataUrl,alt:`Screenshot for ${c.testCaseId}`}),n.jsxs("figcaption",{children:[n.jsxs("div",{children:[n.jsx("b",{children:c.testCaseId}),n.jsxs("span",{children:[c.status," · ",new Date(c.capturedAt).toLocaleString()]})]}),n.jsxs("div",{className:"flex shrink-0 gap-1",children:[n.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>o(c),children:l("Download")}),n.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>s(c.name),children:l("Delete")})]})]})]},c.name))}):n.jsxs("div",{className:"bug-empty",children:[n.jsx("b",{children:l("No screenshots yet")}),n.jsx("span",{children:l("Add page.screenshot() to edited Playwright code, save it, then run that Test Case.")})]})]})}function vT({defaultUrl:a}){const{ui:s}=Le(),[l,o]=L.useState(a),[c,u]=L.useState(3),[f,p]=L.useState(5),[m,g]=L.useState(300),[v,y]=L.useState(!1),[j,b]=L.useState(!1),[E,N]=L.useState(),[A,w]=L.useState(""),S=Math.min(20,Math.max(1,Number(c)||1))*Math.min(100,Math.max(1,Number(f)||1));async function O(){if(!(j||!v)){b(!0),N(void 0),w("");try{N(await Z0({url:l,virtualUsers:Number(c)||1,requestsPerUser:Number(f)||1,intervalMs:Number(m)||0,confirmed:v}))}catch(D){w(D instanceof Error?D.message:String(D))}finally{b(!1)}}}return n.jsxs("section",{className:"load-test-page",children:[n.jsxs("header",{className:"load-test-hero",children:[n.jsx("div",{className:"load-test-hero-icon",children:"⚡"}),n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("HTTP performance workspace")}),n.jsx("h2",{children:s("Load Test")}),n.jsx("p",{children:s("Send controlled GET traffic, compare response times, and inspect every HTTP response.")})]}),n.jsx("span",{children:s("GET only · Local runner")})]}),n.jsxs("div",{className:"load-test-layout",children:[n.jsxs("section",{className:"load-config-card",children:[n.jsxs("div",{className:"load-section-title",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Test configuration")}),n.jsx("h3",{children:s("Request settings")})]}),n.jsxs("b",{children:[S," ",s("requests")]})]}),n.jsxs("div",{className:"load-test-form",children:[n.jsxs("label",{className:"load-url",children:[n.jsx("span",{children:s("Target URL")}),n.jsx("input",{className:"field",value:l,onChange:D=>o(D.target.value),placeholder:"https://example.com",disabled:j})]}),n.jsxs("div",{className:"load-input-grid",children:[n.jsxs("label",{children:[n.jsx("span",{children:s("Virtual users")}),n.jsx("input",{className:"field",type:"number",min:1,max:20,value:c,onChange:D=>u(D.target.value===""?"":Number(D.target.value)),disabled:j}),n.jsx("small",{children:s("Maximum 20 concurrent users")})]}),n.jsxs("label",{children:[n.jsx("span",{children:s("Requests / user")}),n.jsx("input",{className:"field",type:"number",min:1,max:100,value:f,onChange:D=>p(D.target.value===""?"":Number(D.target.value)),disabled:j}),n.jsx("small",{children:s("Maximum 100 per user")})]}),n.jsxs("label",{children:[n.jsx("span",{children:s("Interval")}),n.jsxs("div",{className:"load-input-unit",children:[n.jsx("input",{className:"field",type:"number",min:0,max:1e4,value:m,onChange:D=>g(D.target.value===""?"":Number(D.target.value)),disabled:j}),n.jsx("em",{children:s("ms")})]}),n.jsx("small",{children:s("Pause between each request")})]})]}),n.jsxs("label",{className:"load-confirm",children:[n.jsx("input",{type:"checkbox",checked:v,onChange:D=>y(D.target.checked),disabled:j}),n.jsxs("span",{children:[n.jsx("b",{children:s("Authorized target")}),n.jsx("small",{children:s("I own this target or have permission to run a load test.")})]})]}),n.jsx("button",{type:"button",className:"btn btn-primary load-run-button",disabled:j||!v||!l.trim(),onClick:()=>{O()},children:j?n.jsxs(n.Fragment,{children:[n.jsx("i",{})," ",s("Running")," ",S," ",s("requests…")]}):n.jsx(n.Fragment,{children:s("▶ Start Load Test")})})]})]}),n.jsxs("aside",{className:"load-safety-card",children:[n.jsx("p",{className:"eyebrow",children:s("Safe limits")}),n.jsx("h3",{children:s("Controlled traffic")}),n.jsxs("ul",{children:[n.jsxs("li",{children:[n.jsx("b",{children:"20"}),n.jsx("span",{children:s("Maximum virtual users")})]}),n.jsxs("li",{children:[n.jsx("b",{children:"2,000"}),n.jsx("span",{children:s("Maximum total requests")})]}),n.jsxs("li",{children:[n.jsx("b",{children:"15s"}),n.jsx("span",{children:s("Timeout per request")})]})]}),n.jsx("p",{children:s("Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data.")})]})]}),A&&n.jsx("p",{className:"load-error",children:A}),j&&n.jsxs("section",{className:"load-running",children:[n.jsx("i",{}),n.jsxs("div",{children:[n.jsx("b",{children:s("Load test is running")}),n.jsx("span",{children:s("Waiting for all virtual users to complete their request budget…")})]})]}),E&&n.jsxs("section",{className:"load-results",children:[n.jsxs("div",{className:"load-results-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Run report")}),n.jsx("h3",{children:s("HTTP Request Results")})]}),n.jsx("span",{className:E.failed?"has-failures":"all-passed",children:E.failed?`${E.failed} failed`:s("All requests passed")})]}),n.jsxs("div",{className:"load-kpis",children:[n.jsx(As,{label:s("Total"),value:String(E.total)}),n.jsx(As,{label:s("Passed"),value:String(E.passed),tone:"pass"}),n.jsx(As,{label:s("Failed"),value:String(E.failed),tone:"fail"}),n.jsx(As,{label:s("Average"),value:`${E.averageMs} ms`}),n.jsx(As,{label:s("Min / Max"),value:`${E.minMs} / ${E.maxMs} ms`}),n.jsx(As,{label:s("Requests/sec"),value:String(E.requestsPerSecond)})]}),n.jsx("div",{className:"load-table-wrap",children:n.jsxs("table",{className:"load-request-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"#"}),n.jsx("th",{children:s("User")}),n.jsx("th",{children:s("Method")}),n.jsx("th",{children:s("Request URL")}),n.jsx("th",{children:"HTTP"}),n.jsx("th",{children:s("Time")}),n.jsx("th",{children:s("Size")}),n.jsx("th",{children:s("Result")})]})}),n.jsx("tbody",{children:E.requests.map(D=>n.jsxs("tr",{children:[n.jsx("td",{children:D.id}),n.jsxs("td",{children:["VU-",D.virtualUser,n.jsxs("small",{children:[s("Run")," ",D.iteration]})]}),n.jsx("td",{children:n.jsx("span",{className:"load-method",children:D.method})}),n.jsxs("td",{children:[n.jsx("span",{className:"load-request-url",title:D.finalUrl??D.url,children:D.finalUrl??D.url}),D.error&&n.jsx("small",{className:"load-request-error",children:D.error})]}),n.jsx("td",{children:D.statusCode?n.jsxs(n.Fragment,{children:[n.jsx("b",{children:D.statusCode}),n.jsx("small",{children:D.statusText})]}):"—"}),n.jsxs("td",{children:[D.durationMs," ",s("ms")]}),n.jsx("td",{children:yT(D.responseBytes)}),n.jsx("td",{children:n.jsx("span",{className:`load-result-badge ${D.passed?"passed":"failed"}`,children:D.passed?s("PASS"):s("FAIL")})})]},D.id))})]})})]})]})}function As({label:a,value:s,tone:l=""}){return n.jsxs("div",{className:l,children:[n.jsx("span",{children:a}),n.jsx("b",{children:s})]})}function yT(a){return a?a<1024?`${a} B`:`${(a/1024).toFixed(1)} KB`:"—"}function bT({message:a,detail:s,onClose:l}){const{ui:o}=Le();return n.jsxs("div",{className:"scout-notice",role:"alert",children:[n.jsx("div",{className:"scout-notice-icon",children:"!"}),n.jsxs("div",{children:[n.jsx("b",{children:a}),n.jsx("p",{children:s})]}),n.jsx("button",{type:"button",onClick:l,"aria-label":o("Dismiss notice"),children:"×"})]})}function xT(){const[a,s]=L.useState({status:"idle",result:null,error:null}),[l,o]=L.useState([]),[c,u]=L.useState(null),f=L.useRef(void 0);L.useEffect(()=>()=>f.current?.abort(),[]);async function p(g,v,y,j="en",b=!1,E=750,N=[],A,w,S,O,D=!1){f.current?.abort();const M=new AbortController;f.current=M,u(null),o([]),s({status:"loading",result:null,error:null});try{const F=await j0({url:g,maxPages:v,maxDepth:y,language:j,includeApiChecks:b,waitAfterNavigationMs:E,blockedKeywords:N,projectId:A,startPath:w,scopePath:S,mode:O,debug:D},X=>{M.signal.aborted||o(Z=>{const $=Z.findIndex(J=>J.id===X.id);if($<0)return[...Z,X];const B=[...Z];return B[$]=X,B})},M.signal,X=>{M.signal.aborted||u(X)});return M.signal.aborted?null:(o(F.scoutTrace??[]),s({status:"success",result:F,error:null}),F)}catch(F){if(M.signal.aborted)return null;const X=F instanceof yn?F:new yn("unknown","An unexpected error occurred.");return s({status:"error",result:null,error:X}),null}finally{f.current===M&&(u(null),f.current=void 0)}}function m(){f.current?.abort(),u(null),o([]),s({status:"idle",result:null,error:null})}return{...a,trace:l,preview:c,analyze:p,reset:m}}const Go={enabled:!0,keywords:Ry},eb=a=>`lazyscout-click-filter:${a}`;function jT(a){try{const s=localStorage.getItem(eb(a));if(!s)return Go;const l=JSON.parse(s);return{enabled:l.enabled===!0,keywords:Dy(l.keywords)}}catch{return Go}}function ST(a){const[s,l]=L.useState(Go);L.useEffect(()=>{l(a?jT(a):Go)},[a]);const o=L.useCallback(u=>{const f={enabled:u.enabled,keywords:Dy(u.keywords)};l(f),a&&localStorage.setItem(eb(a),JSON.stringify(f))},[a]),c=s.enabled?s.keywords:[];return{filter:s,blockedKeywords:c,save:o}}function wT(a,s){const[l,o]=L.useState([]),[c,u]=L.useState([]);L.useEffect(()=>u([]),[a]),L.useEffect(()=>{const N=s??[];o(N),u(A=>{if(!A.length)return A;const w=new Set(N.map(O=>O.id)),S=A.filter(O=>w.has(O));return S.length===A.length?A:S})},[s]);function f(N,A){o(w=>w.map(S=>S.id===N?A:S)),u(w=>w.map(S=>S===N?A.id:S))}function p(N){o(A=>A.filter(w=>w.id!==N)),u(A=>A.filter(w=>w!==N))}function m(){o(N=>N.filter(A=>!c.includes(A.id))),u([])}function g(N,A){N!==A&&o(w=>{const S=w.findIndex(F=>F.id===N),O=w.findIndex(F=>F.id===A);if(S<0||O<0)return w;const D=[...w],[M]=D.splice(S,1);return D.splice(O,0,M),D})}function v(N){const A=new Set(l.map(S=>S.id));let w=l.filter(S=>S.module==="MANUAL").length+1;for(;A.has(rf("MANUAL",w));)w++;return _1("MANUAL",rf("MANUAL",w),N)}function y(N){return o(A=>[N,...A]),N}function j(N){o(A=>[...N,...A])}function b(N){u(A=>A.includes(N)?A.filter(w=>w!==N):[...A,N])}function E(N){u(N)}return{testCases:l,selectedIds:c,updateTestCase:f,deleteTestCase:p,deleteSelected:m,reorderTestCases:g,createTestCaseDraft:v,addTestCase:y,addImportedTestCases:j,toggleSelected:b,setSelection:E}}function NT(a){const[s,l]=L.useState([]);L.useEffect(()=>{l(a??[])},[a]);function o(f,p){l(m=>m.map(g=>g.id===f?p:g))}function c(f){l(p=>p.filter(m=>m.id!==f))}function u(f){const p=new Set(s.map(g=>g.id));let m=s.filter(g=>g.module==="MANUAL").length+1;for(;p.has(sf("MANUAL",m));)m++;l(g=>[T1("MANUAL",sf("MANUAL",m),f),...g])}return{testData:s,updateRow:o,deleteRow:c,addRow:u}}const Fo="lazyscout.projects.v1";function CT(){return{startUrl:"",origin:"Manual test suite",pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function uf(){try{return JSON.parse(localStorage.getItem(Fo)??"[]")}catch{return[]}}function TT(a){const s=uf().filter(l=>l.id!==a);s.length?localStorage.setItem(Fo,JSON.stringify(s)):localStorage.removeItem(Fo)}function _T(){const[a,s]=L.useState([]),[l,o]=L.useState(),[c,u]=L.useState("~/LazyScout"),[f,p]=L.useState(),[m,g]=L.useState(!0),v=L.useRef(new Set),y=L.useRef(new Map),j=L.useRef(new Map);L.useEffect(()=>{(async()=>{try{const $=await hg();u($.root);const B=uf(),J=B.filter(z=>!$.projects.some(H=>H.id===z.id));for(const z of J)await rd(z);B.length&&localStorage.removeItem(Fo),s([...J,...$.projects])}catch($){s(uf()),p($ instanceof Error?$.message:String($))}finally{g(!1)}})()},[]);function b($){if(v.current.has($.id))return Promise.resolve();const J=(y.current.get($.id)??Promise.resolve()).catch(()=>{}).then(()=>rd($)).then(()=>{const z=j.current.get($.id);j.current.delete($.id),z&&![...j.current.values()].includes(z)&&p(H=>H===z?"":H)}).catch(z=>{const H=z instanceof Error?z.message:String(z);j.current.set($.id,H),p(H)});return y.current.set($.id,J),J.finally(()=>{y.current.get($.id)===J&&y.current.delete($.id)}),J}async function E($){let B=y.current.get($);for(;B;)await B,B=y.current.get($);const J=j.current.get($);if(J)throw new Error(J)}function N($,B,J,z,H){const T=new Date().toISOString(),K=`project-${ET($)}`,V=z??K,Q=a.find(R=>R.id===V),W={id:V,name:J??Q?.name??new URL($).hostname,targetUrl:$,createdAt:Q?.createdAt??T,updatedAt:T,mode:Q?.mode,testCaseLanguage:H??Q?.testCaseLanguage??"en",result:B};return v.current.delete(V),s(R=>Q?R.map(Y=>Y.id===V?W:Y):[W,...R]),b(W),o(V),V}function A($="Untitled Test Suite",B="empty",J=CT(),z=""){const H=new Date().toISOString(),T=`project-${crypto.randomUUID()}`,K={id:T,name:$.trim()||"Untitled Test Suite",targetUrl:z,createdAt:H,updatedAt:H,mode:B,result:J};return v.current.delete(T),s(V=>[K,...V]),b(K),o(T),T}async function w($){const B=a.findIndex(H=>H.id===$),J=a[B];if(!J)return;const z=a.filter(H=>H.id!==$);v.current.add($),s(z),l===$&&o(z[0]?.id);try{await(y.current.get($)??Promise.resolve()),await T0($),j.current.delete($),TT($)}catch(H){v.current.delete($),s(T=>{if(T.some(V=>V.id===$))return T;const K=Math.min(B,T.length);return[...T.slice(0,K),J,...T.slice(K)]}),l===$&&o($),p(H instanceof Error?H.message:String(H))}}function S($){v.current.delete($.id),s(B=>B.some(J=>J.id===$.id)?B:[$,...B]),b($),o($.id)}function O($,B){const J=B.trim(),z=a.find(T=>T.id===$);if(!J||!z)return;const H={...z,name:J,updatedAt:new Date().toISOString()};s(T=>T.map(K=>K.id===$?H:K)),b(H)}function D($,B,J=!1){const z=a.find(K=>K.id===$);if(!z)return;const H={...z,result:B,updatedAt:new Date().toISOString()},T=()=>s(K=>K.map(V=>V.id===$?{...V,result:B,updatedAt:H.updatedAt}:V));if(b(H),J)return E($).then(T);T()}function M($,B){const J=a.find(H=>H.id===$);if(!J)return;const z={...J,testCaseLanguage:B,updatedAt:new Date().toISOString()};s(H=>H.map(T=>T.id===$?z:T)),b(z)}function F(){q0().catch($=>p($ instanceof Error?$.message:String($)))}async function X($){await y.current.get($);const B=(await hg()).projects.find(J=>J.id===$);!B||v.current.has($)||s(J=>J.map(z=>z.id===$?B:z))}async function Z($,B){const J=a.find(T=>T.id===$);if(!J||J.targetUrl)throw new Error("This project already has a target.");let z;try{z=new URL(B.trim())}catch{throw new Error("Enter a full website URL.")}if(!["http:","https:"].includes(z.protocol)||z.username||z.password)throw new Error("Use an HTTP or HTTPS URL without credentials.");const H={...J,targetUrl:z.toString(),updatedAt:new Date().toISOString()};await y.current.get($),await rd(H),s(T=>T.map(K=>K.id===$?H:K))}return{projects:a,activeProjectId:l,setActiveProjectId:o,saveProject:N,createEmptyProject:A,deleteProject:w,restoreProject:S,renameProject:O,updateProjectResult:D,updateProjectTestCaseLanguage:M,reloadProject:X,waitForProjectSave:E,setProjectTargetUrl:Z,workspaceRoot:c,workspaceError:f,loading:m,openWorkspace:F}}function ET(a){const s=new TextEncoder().encode(a),l=Array.from(s,o=>String.fromCharCode(o)).join("");return btoa(l).replace(/[^a-z0-9]/gi,"").slice(0,32).toLowerCase()}function kT(a){const[s,l]=L.useState({}),o=a?s[a]??{}:{};function c(f){a&&l(p=>({...p,[a]:f}))}function u(){a&&l(f=>{const p={...f};return delete p[a],p})}return{secrets:o,saveSecrets:c,clearSecrets:u,hasSecrets:Object.values(o).some(Boolean)}}function AT(a){const[s,l]=L.useState([]);L.useEffect(()=>{l([]),a&&(async()=>{const u=await Y0(a),f=`lazyscout.bug-reports.${a}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=p.filter(g=>!u.some(v=>v.id===g.id));for(const g of m)await yg(a,g);p.length&&localStorage.removeItem(f),l([...m,...u])})().catch(()=>l([]))},[a]);function o(u){l(f=>f.some(p=>p.id===u.id)?f.map(p=>p.id===u.id?u:p):[u,...f]),a&&yg(a,u)}function c(u){l(f=>f.filter(p=>p.id!==u)),a&&X0(a,u)}return{reports:s,save:o,remove:c}}function OT(a){const[s,l]=L.useState([]);L.useEffect(()=>{l([]),a&&(async()=>{const u=await H0(a),f=`lazyscout.screenshots.${a}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=[];for(const g of p)u.some(v=>v.name===g.name)||m.push(await gg(a,g));p.length&&localStorage.removeItem(f),l([...m,...u])})().catch(()=>l([]))},[a]);function o(u){a&&gg(a,u).then(f=>l(p=>[f,...p.filter(m=>m.name!==f.name)].slice(0,50)))}function c(u){l(f=>f.filter(p=>p.name!==u)),a&&G0(a,u)}return{screenshots:s,add:o,remove:c}}function RT(a){const[s,l]=L.useState([]),[o,c]=L.useState();L.useEffect(()=>{if(!a){l([]);return}R0(a).then(l).catch(f=>c(f instanceof Error?f.message:String(f)))},[a]);async function u(f){l(f);try{await D0(a,f),c(void 0)}catch(p){c(p instanceof Error?p.message:String(p))}}return{flows:s,update:u,error:o}}function DT(a,s){const l=s.search.trim().toLowerCase();return a.filter(o=>s.module!=="all"&&!(o.folder??o.module).toLowerCase().includes(s.module.toLowerCase())||s.type!=="all"&&o.type!==s.type||s.priority!=="all"&&o.priority!==s.priority?!1:l?[o.id,o.module,o.folder??"",...o.tags??[],...o.requirements??[],o.title,o.expectedResult,o.sourceUrl,C1(o.steps)].join(" ").toLowerCase().includes(l):!0)}function Iv(a){return[...new Set(a.map(s=>s.folder??s.module))].sort()}function LT(a,s,l){const o=s.trim().toLowerCase();return a.filter(c=>l!=="all"&&c.module!==l?!1:o?[c.id,c.module,c.field,c.inputType,c.validValue,c.invalidValue,c.note??""].join(" ").toLowerCase().includes(o):!0)}const MT={search:"",module:"all",type:"all",priority:"all"},Gd="lazyscout-active-project-id";function UT(){const{t:a,ui:s,language:l}=Le(),o=l==="th",c=L.useRef(null),{status:u,result:f,error:p,trace:m,preview:g,analyze:v,reset:y}=xT(),{projects:j,activeProjectId:b,setActiveProjectId:E,saveProject:N,createEmptyProject:A,deleteProject:w,restoreProject:S,renameProject:O,updateProjectResult:D,updateProjectTestCaseLanguage:M,reloadProject:F,waitForProjectSave:X,setProjectTargetUrl:Z,workspaceRoot:$,workspaceError:B,loading:J,openWorkspace:z}=_T(),H=j.find(ve=>ve.id===b),{secrets:T,saveSecrets:K,clearSecrets:V}=kT(b),{filter:Q,blockedKeywords:W,save:R}=ST(b),x=H?.result??f,{testCases:C,selectedIds:q,updateTestCase:I,deleteTestCase:ee,deleteSelected:he,reorderTestCases:_e,createTestCaseDraft:Ne,addImportedTestCases:le,addTestCase:Ce,toggleSelected:ye,setSelection:Fe}=wT(b,x?.testCases),{testData:Ue,updateRow:k,deleteRow:pe,addRow:ce}=NT(x?.testData),{reports:G,save:P,remove:ne}=AT(b),{screenshots:xe,add:ge,remove:se}=OT(b),{flows:Te,update:Ee}=RT(b),we=x??(H?tb(H.targetUrl):void 0),[ke,qe]=L.useState("testcases"),[fe,ze]=L.useState(!1),[$e,Ve]=L.useState("terminal"),[rt,et]=L.useState(MT),[ht,pt]=L.useState(""),[Oe,Et]=L.useState("all"),[Tt,Ze]=L.useState(),[dt,st]=L.useState(),[Ut,mt]=L.useState(null),[zt,Qe]=L.useState(!1),[He,Xt]=L.useState(),[tt,Ge]=L.useState(()=>window.location.hash==="#documents"?"documents":"overview");L.useLayoutEffect(()=>{window.scrollTo({top:0,behavior:"instant"})},[tt,b]),L.useEffect(()=>{const ve=new URL(window.location.href);if(tt==="documents")ve.hash="documents";else if(ve.hash==="#documents")ve.hash="";else return;ve.href!==window.location.href&&window.history.replaceState(window.history.state,"",ve)},[tt]);const[Ie,Ye]=L.useState({}),[$n,qn]=L.useState();function Bt(ve){qn({projectId:b,ids:ve}),st(void 0),Ge("case-run")}const Zt=L.useMemo(()=>{if(tt!=="queue"&&tt!=="case-run")return C;const ve=tt==="queue"?Ie[b??""]:$n&&$n.projectId===b?$n.ids:[],Re=new Map(C.map(Ke=>[Ke.id,Ke]));return(ve??[]).flatMap(Ke=>Re.get(Ke)??[])},[C,tt,Ie,b,$n]),[Ma,ln]=L.useState(!1),[Kt,jt]=L.useState({}),[Qt,Jt]=L.useState({}),[Ua,on]=L.useState(!1),[Hn,pn]=L.useState("credentials"),[En,bn]=L.useState(!1),[tn,Gn]=L.useState(!1),[ga,ot]=L.useState(!1),[_t,xr]=L.useState(!1),[jr,kn]=L.useState(),[Fn,Sr]=L.useState(),[An,va]=L.useState(),[Us,za]=L.useState(()=>localStorage.getItem("lazyscout-sidebar-collapsed")==="true");function Ba(){za(ve=>(localStorage.setItem("lazyscout-sidebar-collapsed",String(!ve)),!ve))}function mn(ve,Re){va({message:ve,restore:Re})}function re(ve){const Re=C.find(Ke=>Ke.id===ve);Re&&(ee(ve),mn(Ke=>Ke?`ลบ ${Re.id} แล้ว`:`Deleted ${Re.id}`,()=>le([Re])))}function Ae(){const ve=C.filter(Re=>q.includes(Re.id));ve.length&&(he(),mn(Re=>Re?`ลบแล้ว ${ve.length} เคส`:`Deleted ${ve.length} Test Cases`,()=>le(ve)))}L.useEffect(()=>{if(!An)return;const ve=window.setTimeout(()=>va(void 0),8e3);return()=>window.clearTimeout(ve)},[An]);function $t(ve){_t||(xr(!0),window.setTimeout(()=>{ve(),xr(!1)},700))}const Dt=L.useMemo(()=>DT(C,rt),[C,rt]),Yr=L.useMemo(()=>LT(Ue,ht,Oe),[Ue,ht,Oe]),Xr=L.useMemo(()=>Iv(C),[C]),Zo=L.useMemo(()=>Iv(Ue),[Ue]),xn=C.find(ve=>ve.id===Tt);function zs(ve,Re,Ke){const kt=C.find(Lt=>Lt.id===ve);if(!kt)return;const cn={...kt};if(Re==="preconditions"||Re==="tags"?cn[Re]=Ke.split(/\n|,/).map(Lt=>Lt.trim()).filter(Boolean):Re==="steps"?cn.steps=Ke.split(`
66
- `).map(Lt=>Lt.trim()).filter(Boolean).map(Lt=>{try{return JSON.parse(Lt)}catch{return{type:"manual",description:Lt}}}):cn[Re]=Ke,I(ve,cn),b&&x){const Lt=C.map(un=>un.id===ve?cn:un);D(b,{...x,testCases:Lt,testData:Ue})}}L.useEffect(()=>{if(!b||!x||!H?.result)return;const ve=window.setTimeout(()=>{const Re=H.result;JSON.stringify(Re.testCases)===JSON.stringify(C)&&JSON.stringify(Re.testData)===JSON.stringify(Ue)||D(b,{...x,testCases:C,testData:Ue})},150);return()=>window.clearTimeout(ve)},[b,H?.result,x,C,Ue]),L.useEffect(()=>{if(J)return;if(j.length===0){localStorage.removeItem(Gd),ot(!0);return}if(b&&j.some(Ke=>Ke.id===b))return;const ve=localStorage.getItem(Gd),Re=j.find(Ke=>Ke.id===ve)??j[0];E(Re.id)},[b,j,J,E]),L.useEffect(()=>{!J&&b&&localStorage.setItem(Gd,b)},[b,J]),L.useEffect(()=>{if(u!=="loading")return;const ve=document.body.style.overflow,Re=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=ve,document.documentElement.style.overflow=Re}},[u]);async function sl(ve,Re,Ke,kt,cn,Lt,un,Ps,$s,$a){Ve("terminal"),ze(!0);const jn=await v(ve,Re,Ke,kt,cn,Lt,W,b,un,Ps,$s,$a);if(jn){N(ve,jn,void 0,b,kt);const Zr=jn.pages.reduce((qa,On)=>qa+On.links.length+On.buttons.length+On.inputs.length+On.textareas.length+On.selects.length+(On.state?.interactions.length??0),0);if(jn.testCases.length===0||Zr===0){const qa=jn.issues.map(On=>On.code).filter((On,Nr,na)=>na.indexOf(On)===Nr);kn({message:"Scout finished, but no usable Test Cases were created.",detail:`Visited ${jn.pages.length} page${jn.pages.length===1?"":"s"} and found ${Zr} testable control${Zr===1?"":"s"}.${qa.length?` Explorer reported: ${qa.join(", ")}.`:" The site may show a bot challenge, render content after a delay, or expose no detectable controls. Check Scout Log for details."}`})}else kn(void 0)}}async function wr(){const ve=ke==="testcases"?Dt:[],Re=ke==="testdata"?Yr:[];if(ve.length===0&&Re.length===0){Xt("No data is available for export.");return}Qe(!0),Xt(void 0);try{await N0(ve,Re)}catch(Ke){Xt(Ke instanceof yn?Ke.message:"Could not export CSV.")}finally{Qe(!1)}}async function Ia(ve){Qe(!0),Xt(void 0);try{await X(ve),await dj(ve)}catch(Re){Xt(Re instanceof Error?Re.message:"Could not export Excel.")}finally{Qe(!1)}}async function Bs(ve){if(!b||!x){le(ve);return}await D(b,{...x,testCases:[...ve,...C],testData:Ue},!0)}function Is(ve=x?.startUrl??""){const Re=Ne(ve);ve&&(Re.steps=[{type:"navigate",url:ve}]),mt(Re),Ze(Re.id)}function Pa(ve,Re,Ke){const kt=Ce({...Ne(Ke),title:Re,steps:ve,expectedResult:"The recorded flow completes without an error.",automationStatus:"needs-review"});on(!1),qe("testcases"),Ze(kt.id)}function Ko(ve){const Re=H?.targetUrl||x?.startUrl||"http://localhost:5173",Ke=Te[0],kt=Ke??{id:crypto.randomUUID(),name:"Explorer Guided Flow",description:"Steps added from Auto Scout Explorer.",baseUrl:Re,steps:[{id:crypto.randomUUID(),type:"navigate",path:new URL(Re).pathname||"/"}],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Ee(Ke?Te.map(cn=>cn.id===Ke.id?{...cn,steps:[...cn.steps,ve],updatedAt:new Date().toISOString()}:cn):[{...kt,steps:[...kt.steps,ve]}])}return n.jsxs("div",{className:"app-frame","data-view":tt,children:[n.jsx(F2,{projects:j,activeProjectId:b,result:x,collapsed:u==="loading"?!1:Us,onToggleCollapsed:()=>{u!=="loading"&&Ba()},onSelect:ve=>$t(()=>{E(ve),jt({}),Jt({}),Ge(Re=>Re==="documents"?Re:"overview"),Ze(void 0)}),onNew:()=>ot(!0),onDelete:ve=>Sr(j.find(Re=>Re.id===ve)),onRename:O,onSettings:()=>{pn("credentials"),on(!0)},workspaceRoot:$,onOpenWorkspace:z}),n.jsxs("div",{className:"app-main",children:[n.jsxs("header",{className:"app-header",children:[n.jsxs("div",{className:"workspace-heading",children:[n.jsx("p",{className:"eyebrow",children:a("localWorkspace")}),n.jsx("h1",{title:H?.name,children:H?.name||"LazyScout"})]}),H?n.jsx(Fy,{scout:!!H.targetUrl||H.mode==="scout",cases:!!x,onNavigate:ve=>{ve==="testcases"&&qe("testcases"),ve==="overview"&&c.current?.expand(),Ge(ve)}},H.id):n.jsxs("a",{className:"guide-link",href:`/guide/index.html?lang=${l}`,target:"_blank",rel:"noreferrer","aria-label":s("Open LazyScout Guide"),title:s("Open LazyScout Guide"),children:[n.jsx(nt,{name:"documents"}),s("Guide")]})]}),H&&n.jsx(D2,{view:tt,onChange:ve=>ve==="explorer"?ln(!0):Ge(ve),counts:{cases:C.length,states:x?.actionGraph.states.length??0}}),n.jsxs("div",{className:"workspace-content",children:[H&&(H.targetUrl||H.mode==="scout")&&n.jsx(v0,{ref:c,hidden:tt!=="overview",initialUrl:H?.targetUrl,hasExistingData:!!H?.result?.testCases?.length,initialLanguage:H.testCaseLanguage,loading:u==="loading",onLanguageChange:ve=>b&&M(b,ve),onAnalyze:sl,onOpenAiScout:()=>Ge("qa")},b??"new-project"),p&&n.jsx(vo,{message:p.message,hint:p.hint}),B&&n.jsx(vo,{message:B,hint:s("Check that the LazyScout workspace is writable.")}),He&&n.jsx(vo,{message:He}),jr&&n.jsx(bT,{...jr,onClose:()=>kn(void 0)}),H&&!x&&["testcases","automation","scoutlog","loadtest"].includes(tt)&&n.jsxs("section",{className:"workspace-empty",children:[n.jsx(nt,{name:"cases"}),n.jsx("h2",{children:o?"ยังไม่มีผลการสำรวจ":"No Scout results yet"}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>Ge("overview"),children:a("overview")})]}),tt==="documents"&&H&&n.jsx(b1,{projectId:H.id,projectName:H.name},H.id),tt==="map"&&H&&n.jsx(x0,{projectId:H.id,projectName:H.name,target:H.targetUrl,result:H.result,cases:C,queue:Ie[H.id]??[],onQueue:ve=>Ye(Re=>({...Re,[H.id]:ve})),onReview:()=>Ge("queue"),onCase:st,onWrite:Is,onScout:()=>{if(!H.targetUrl&&H.mode!=="scout"){Ge("qa");return}Ge("overview"),requestAnimationFrame(()=>c.current?.focusUrl())}},H.id),tt==="case-run"&&n.jsxs("div",{className:"queue-return",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{qe("testcases"),Ge("testcases")},children:s("Back to Test Cases")}),n.jsxs("b",{children:[s("Selected cases")," · ",Zt.length]})]}),tt==="queue"&&H&&n.jsxs("div",{className:"queue-return",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Ge("map"),children:o?"กลับไปคิวทดสอบ":"Back to run queue"}),n.jsxs("b",{children:[o?"เคสในคิว":"Queued cases"," · ",Zt.length]})]}),tt==="qa"&&H&&n.jsx(G2,{projectId:H.id,targetUrl:H.targetUrl,onComplete:F,onSetTarget:Z,onOpenSessionSettings:()=>{pn("session"),on(!0)}},H.id),x&&tt!=="qa"&&tt!=="map"&&tt!=="documents"&&n.jsx(n.Fragment,{children:tt==="scoutlog"?n.jsx(A2,{result:x}):tt==="loadtest"?n.jsx(vT,{defaultUrl:H?.targetUrl||x.startUrl}):tt==="automation"||tt==="queue"||tt==="case-run"?n.jsx(C2,{testCases:Zt,focused:tt==="case-run",onEditSteps:mt,projectId:b,secrets:T,blockedKeywords:W,onRunStatus:(ve,Re)=>{jt(kt=>({...kt,[ve]:Re}));const Ke=C.find(kt=>kt.id===ve);Ke&&I(ve,{...Ke,status:Re})},onRunResult:(ve,Re)=>{Jt(kt=>({...kt,[ve]:{...Re,finishedAt:new Date().toISOString()}}));const Ke=Re.screenshots?.length?Re.screenshots:Re.screenshot?[Re.screenshot]:[];if(Ke.forEach(ge),Re.status==="failed"&&b){const kt=C.find(Lt=>Lt.id===ve),cn={id:`bug-${crypto.randomUUID()}`,title:`Automation failed: ${kt?.title??ve}`,severity:"high",status:"open",testCaseId:ve,actualResult:"The Playwright automation step failed. Open Automation Run Log for details.",expectedResult:kt?.expectedResult??"The Test Case should complete successfully.",stepsToReproduce:kt?.steps.map((Lt,un)=>`${un+1}. ${Lt.type}`).join(`
67
- `)??"",attachments:Ke.map(Lt=>({name:Lt.name,type:"image/png",dataUrl:Lt.dataUrl})),createdAt:new Date().toISOString()};P(cn)}}},`${b}-${tt}`):tt==="overview"?n.jsxs(n.Fragment,{children:[n.jsxs("details",{className:"project-workflow",children:[n.jsx("summary",{children:o?"ขั้นตอนและความคืบหน้าของโปรเจกต์":"Project workflow and progress"}),n.jsx(iC,{pages:x.pages.length,testCases:C.length,recordedCases:C.filter(ve=>ve.module==="MANUAL").length,completedRuns:C.filter(ve=>ve.status==="passed"||ve.status==="failed").length,onScout:()=>{c.current?c.current.focusUrl():ot(!0)},onReview:()=>Ge("testcases"),onRecord:()=>{pn("recorder"),on(!0)},onRun:()=>Ge("automation"),onExport:()=>{wr()}})]}),n.jsx(Q2,{result:x,testCases:C,executionStatuses:Kt,runResults:Qt,projectId:b})]}):n.jsxs("div",{className:x.pages.length?"workspace-shell":"workspace-shell without-tree",children:[x.pages.length>0&&n.jsx(x1,{result:x,activeUrl:xn?.sourceUrl,onSelect:ve=>Ze(C.find(Re=>Re.sourceUrl===ve)?.id)}),n.jsxs("main",{className:"workspace-center",children:[n.jsxs("div",{className:"workspace-center-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Current Workspace")}),n.jsx("h2",{children:s({testcases:"Test Case Review",testdata:"Test Data",apichecks:"Test API",bugreports:"Bug Reports",screenshots:"Screenshots"}[ke]??"Test Cases")})]}),ke==="testcases"&&n.jsxs("div",{className:"center-chips",children:[n.jsxs("span",{className:"status-badge status-badge-pass",children:[C.filter(ve=>ve.automationStatus==="ready").length," ",s("ready")]}),n.jsxs("span",{className:"status-badge status-badge-warn",children:[C.filter(ve=>ve.automationStatus==="needs-review").length," ",s("review")]})]})]}),n.jsx("div",{className:"grid gap-4",children:n.jsxs("div",{className:"card",children:[n.jsxs("div",{className:"result-tabs",children:[n.jsxs("button",{type:"button","aria-pressed":ke==="testcases",onClick:()=>qe("testcases"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="testcases"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Test Cases ("),C.length,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="testdata",onClick:()=>qe("testdata"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="testdata"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Test Data ("),Ue.length,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="apichecks",onClick:()=>qe("apichecks"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="apichecks"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Test API ("),x.apiChecks?.length??0,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="bugreports",onClick:()=>qe("bugreports"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="bugreports"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Bug Reports ("),G.length,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="screenshots",onClick:()=>qe("screenshots"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="screenshots"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Screenshots ("),xe.length,")"]})]}),ke==="screenshots"?n.jsx(gT,{screenshots:xe,onDelete:se}):ke==="bugreports"?n.jsx(fT,{reports:G,testCases:C,onSave:P,onDelete:ne}):ke==="apichecks"?n.jsx(R2,{checks:x.apiChecks??[],secrets:T}):ke==="testcases"?n.jsxs(n.Fragment,{children:[n.jsx(P1,{filters:rt,modules:Xr,totalCount:C.length,visibleCount:Dt.length,selectedCount:q.length,onReviewSelection:()=>Bt(q),exporting:zt,onFiltersChange:et,onAdd:()=>Is(),onImport:()=>Gn(!0),onImportScreenshot:()=>bn(!0),onRecord:()=>{pn("recorder"),on(!0)},onDeleteSelected:Ae,onExport:wr,onExportExcel:H&&C.length?()=>{Ia(H.id)}:void 0}),n.jsx(I1,{testCases:Dt,selectedIds:q,activeId:Tt,onToggleSelect:ye,onToggleAll:Fe,onOpen:ve=>{Ze(ve.id),st(ve.id)},onEdit:mt,onDelete:re,onReorder:_e,onUpdateCell:zs,executionStatuses:Kt}),n.jsx($1,{testCases:C})]}):n.jsxs(n.Fragment,{children:[n.jsx(H1,{search:ht,module:Oe,modules:Zo,totalCount:Ue.length,visibleCount:Yr.length,exporting:zt,onSearchChange:pt,onModuleChange:Et,onAdd:()=>ce(x.startUrl),onExport:wr}),n.jsx(q1,{rows:Yr,onUpdate:k,onDelete:pe})]})]})})]})]})})]}),Ut&&n.jsx(B1,{testCase:Ut,cases:C,onCancel:()=>mt(null),onSave:(ve,Re)=>{C.some(Ke=>Ke.id===Ut.id)?I(Ut.id,ve):Ce(ve),Ze(ve.id),mt(null),Re?Bt([ve.id]):tt==="case-run"&&ve.id!==Ut.id&&qn(Ke=>Ke&&{...Ke,ids:Ke.ids.map(kt=>kt===Ut.id?ve.id:kt)})}}),Ma&&we&&n.jsx(SC,{result:we,testCaseCount:C.length,flows:Te,baseUrl:H?.targetUrl||we.startUrl,projectId:b,secrets:T,onSaveFlows:Ee,onGenerateTestCase:ve=>{Ce(ve),ln(!1),Ge("testcases")},onAddToFlow:Ko,onClose:()=>ln(!1),onOpenCases:()=>{ln(!1),Ge("testcases")}}),dt&&!Ut&&(tt==="map"||ke==="testcases")&&C.find(ve=>ve.id===dt)&&n.jsx(L1,{testCase:C.find(ve=>ve.id===dt),onEdit:()=>mt(C.find(ve=>ve.id===dt)),onOpenRunner:()=>Bt([dt]),onClose:()=>st(void 0)}),Ua&&H&&n.jsx(AC,{projectName:H.name,projectId:H.id,targetUrl:H.targetUrl,secrets:T,onSave:K,onClear:V,onClose:()=>on(!1),onSaveRecording:Pa,clickFilter:Q,onChangeClickFilter:R,initialTab:Hn}),Fn&&n.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal confirm-delete-modal",role:"dialog","aria-modal":"true",children:[n.jsx("header",{className:"modal-header",children:n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Delete project")}),n.jsxs("h2",{children:[s("Remove “"),Fn.name,"”?"]}),n.jsx("p",{children:s("The project will be removed from this local workspace. You can undo immediately afterward.")})]})}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Sr(void 0),children:s("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{const ve=Fn;Sr(void 0),w(ve.id).then(()=>mn(Re=>Re?`ลบโปรเจกต์ ${ve.name} แล้ว`:`Deleted project ${ve.name}`,()=>S(ve)))},children:s("Delete project")})]})]})}),An&&n.jsxs("div",{className:"undo-toast",role:"status","aria-live":"polite",children:[n.jsx("span",{children:An.message(o)}),n.jsx("button",{type:"button",onClick:()=>{An.restore(),va(void 0)},children:s("Undo")}),n.jsx("button",{type:"button","aria-label":s("Dismiss"),onClick:()=>va(void 0),children:"×"})]}),En&&n.jsx(JC,{sourceUrl:x?.startUrl??H?.targetUrl??"",initialLanguage:H?.testCaseLanguage,onLanguageChange:ve=>b&&M(b,ve),existingCases:C,onImport:Bs,onClose:()=>bn(!1)}),tn&&n.jsx(WC,{sourceUrl:x?.startUrl??H?.targetUrl??"",existingCases:C,onImport:Bs,onClose:()=>Gn(!1)}),ga&&n.jsx(oT,{projects:j,onClose:()=>ot(!1),onScout:ve=>$t(()=>{A(ve,"scout"),y(),jt({}),Jt({}),Ge("overview"),ot(!1)}),onEmpty:ve=>$t(()=>{A(ve,"empty"),y(),jt({}),Jt({}),Ge("testcases"),ot(!1)}),onSample:()=>$t(()=>{A("Practice Login Demo","empty",zT(),"https://practicetestautomation.com/practice-test-login/"),y(),jt({}),Jt({}),qe("testcases"),Ge("testcases"),ot(!1)}),onOpenProject:ve=>$t(()=>{E(ve),y(),jt({}),Jt({}),Ge("overview"),ot(!1)})}),fe&&n.jsx(jf,{labelledBy:"scout-trace-title",onClose:()=>{u!=="loading"&&ze(!1)},children:n.jsxs("section",{className:"trace-panel","data-live":u==="loading"||void 0,children:[n.jsxs("header",{className:"trace-heading",children:[n.jsx("h2",{id:"scout-trace-title",children:o?"ติดตามการสำรวจเว็บ":"Scout activity"}),n.jsxs("span",{role:"status",children:[u==="loading"&&n.jsxs("svg",{className:"trace-spin",viewBox:"0 0 28 28",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"14",cy:"14",r:"10",stroke:"#39616d",strokeWidth:"2"}),n.jsx("path",{d:"M 5.34 19 A 10 10 0 0 1 14 4",stroke:"#58dec8",strokeWidth:"3.5",strokeLinecap:"round"}),n.jsx("circle",{cx:"14",cy:"4",r:"3.3",fill:"#e0fff7"})]}),u==="loading"?o?"กำลังสำรวจ":"Live":p?o?"สำรวจไม่สำเร็จ":"Scout failed":o?"สำรวจเสร็จแล้ว":"Completed"]})]}),p&&n.jsx(vo,{message:p.message,hint:p.hint}),u==="loading"&&n.jsxs("div",{className:"trace-pane-picker","aria-label":o?"มุมมองการสำรวจ":"Activity views",children:[n.jsx("button",{type:"button","aria-pressed":$e==="terminal",onClick:()=>Ve("terminal"),children:o?"เทอร์มินัล":"Terminal"}),n.jsx("button",{type:"button","aria-pressed":$e==="browser",onClick:()=>Ve("browser"),children:o?"ภาพเว็บไซต์":"Website preview"})]}),n.jsxs("div",{className:"trace-workspace","data-pane":u==="loading"?$e:"terminal",children:[n.jsx(Gy,{steps:m,live:u==="loading",runError:p?.message,issues:f?.issues}),u==="loading"&&n.jsx(O2,{frame:g})]}),n.jsxs("footer",{className:"trace-footer",children:[n.jsxs("span",{className:"trace-count",children:[o?"ขั้นตอนที่เสร็จแล้ว":"Steps finished"," ",n.jsxs("b",{children:[m.filter(ve=>ve.status!=="running").length," / ",m.length]})]}),u==="loading"?n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{y(),ze(!1)},children:o?"หยุดสำรวจ":"Stop Scout"}):n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>ze(!1),children:p?o?"ปิด":"Close":o?"ดูผลการสำรวจ":"View Scout results"})]})]})}),_t&&n.jsx("div",{className:"navigation-loader",children:n.jsxs("div",{children:[n.jsx("span",{children:"LS"}),n.jsx("b",{children:s("Opening workspace")}),n.jsx("small",{children:s("Preparing your local QA tools…")})]})})]})]})}function tb(a){const s=new URL(a);return{startUrl:a,origin:s.origin,pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function zT(){const a="https://practicetestautomation.com/practice-test-login/",s=tb(a);return s.origin=new URL(a).origin,s.testCases=[{id:"TC-LOGIN-001",module:"LOGIN",folder:"Authentication",tags:["smoke","login"],title:"Sign in with valid demo credentials",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:a},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"student"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"Password123"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertUrl",urlContains:"/logged-in-successfully/"},{type:"assertText",target:{strategy:"css",cssSelector:"strong"},text:"Congratulations"},{type:"assertVisible",target:{strategy:"role",role:"link",name:"Log out"}}],expectedResult:"The success page opens, shows a congratulations message, and displays Log out.",type:"positive",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:a,notes:"Uses the public demo credentials published on Practice Test Automation."},{id:"TC-LOGIN-002",module:"LOGIN",folder:"Authentication",tags:["validation","login"],title:"Reject an invalid username",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:a},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"incorrectUser"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"Password123"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertText",target:{strategy:"css",cssSelector:"#error"},text:"Your username is invalid!"}],expectedResult:"The page displays “Your username is invalid!”.",type:"negative",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:a},{id:"TC-LOGIN-003",module:"LOGIN",folder:"Authentication",tags:["validation","login"],title:"Reject an invalid password",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:a},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"student"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"incorrectPassword"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertText",target:{strategy:"css",cssSelector:"#error"},text:"Your password is invalid!"}],expectedResult:"The page displays “Your password is invalid!”.",type:"negative",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:a}],s}h0.createRoot(document.getElementById("root")).render(n.jsx(L.StrictMode,{children:n.jsx(m0,{children:n.jsx(UT,{})})}));
64
+ 3. Observe…`)})]}),n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsxs("label",{children:[n.jsx("span",{children:c("Actual Result")}),n.jsx("textarea",{className:"field",rows:4,value:u.actualResult,onChange:m=>f({...u,actualResult:m.target.value})})]}),n.jsxs("label",{children:[n.jsx("span",{children:c("Expected Result")}),n.jsx("textarea",{className:"field",rows:4,value:u.expectedResult,onChange:m=>f({...u,expectedResult:m.target.value})})]})]}),n.jsxs("label",{className:"bug-upload",children:[n.jsx("span",{children:c("Evidence screenshots")}),n.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:m=>{p(m)}}),n.jsx("em",{children:c("Upload up to 5 images at a time. Images are included in ZIP export.")})]}),u.attachments.length?n.jsx("div",{className:"bug-attachments",children:u.attachments.map((m,g)=>n.jsxs("figure",{children:[n.jsx("img",{src:m.dataUrl,alt:m.name}),n.jsxs("figcaption",{children:[m.name,n.jsx("button",{type:"button",onClick:()=>f(v=>({...v,attachments:v.attachments.filter((y,S)=>S!==g)})),children:"×"})]})]},`${m.name}-${g}`))}):null]}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:c("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-primary",disabled:!u.title.trim(),onClick:()=>l(u),children:c("Save Bug Report")})]})]})})}function gT(a){return new Promise((s,l)=>{const o=new FileReader;o.onload=()=>s(String(o.result)),o.onerror=()=>l(o.error),o.readAsDataURL(a)})}function Fo(a){return a.replace(/[^a-z0-9._-]/gi,"_")}function vT(a){const s=["Bug_ID","Title","Test_Case","Severity","Status","Steps_To_Reproduce","Actual_Result","Expected_Result","Attachments"],l=o=>`"${o.replaceAll('"','""')}"`;return[s,...a.map(o=>[o.id,o.title,o.testCaseId??"",o.severity,o.status,o.stepsToReproduce,o.actualResult,o.expectedResult,o.attachments.map(c=>`attachments/${Fo(o.id)}/${Fo(c.name)}`).join("; ")])].map(o=>o.map(l).join(",")).join(`\r
65
+ `)}function yT({screenshots:a,onDelete:s}){const{ui:l}=Le();function o(c){const u=document.createElement("a");u.href=c.dataUrl,u.download=c.name,u.click()}return n.jsxs("section",{className:"screenshot-gallery",children:[n.jsxs("header",{className:"screenshot-gallery-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:l("Playwright evidence")}),n.jsx("h3",{children:l("Screenshots")}),n.jsxs("p",{children:[l("LazyScout does not capture automatically. Add")," ",n.jsxs("code",{children:["await page.screenshot(","{"," path: 'evidence.png', fullPage: true ","}",")"]})," ",l("to edited Playwright code when evidence is needed.")]})]}),n.jsxs("span",{children:[a.length,l("/50 saved")]})]}),a.length?n.jsx("div",{className:"screenshot-gallery-grid",children:a.map(c=>n.jsxs("figure",{children:[n.jsx("img",{src:c.dataUrl,alt:`Screenshot for ${c.testCaseId}`}),n.jsxs("figcaption",{children:[n.jsxs("div",{children:[n.jsx("b",{children:c.testCaseId}),n.jsxs("span",{children:[c.status," · ",new Date(c.capturedAt).toLocaleString()]})]}),n.jsxs("div",{className:"flex shrink-0 gap-1",children:[n.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>o(c),children:l("Download")}),n.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>s(c.name),children:l("Delete")})]})]})]},c.name))}):n.jsxs("div",{className:"bug-empty",children:[n.jsx("b",{children:l("No screenshots yet")}),n.jsx("span",{children:l("Add page.screenshot() to edited Playwright code, save it, then run that Test Case.")})]})]})}function bT({defaultUrl:a}){const{ui:s}=Le(),[l,o]=L.useState(a),[c,u]=L.useState(3),[f,p]=L.useState(5),[m,g]=L.useState(300),[v,y]=L.useState(!1),[S,b]=L.useState(!1),[E,N]=L.useState(),[A,w]=L.useState(""),j=Math.min(20,Math.max(1,Number(c)||1))*Math.min(100,Math.max(1,Number(f)||1));async function R(){if(!(S||!v)){b(!0),N(void 0),w("");try{N(await K0({url:l,virtualUsers:Number(c)||1,requestsPerUser:Number(f)||1,intervalMs:Number(m)||0,confirmed:v}))}catch(O){w(O instanceof Error?O.message:String(O))}finally{b(!1)}}}return n.jsxs("section",{className:"load-test-page",children:[n.jsxs("header",{className:"load-test-hero",children:[n.jsx("div",{className:"load-test-hero-icon",children:"⚡"}),n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("HTTP performance workspace")}),n.jsx("h2",{children:s("Load Test")}),n.jsx("p",{children:s("Send controlled GET traffic, compare response times, and inspect every HTTP response.")})]}),n.jsx("span",{children:s("GET only · Local runner")})]}),n.jsxs("div",{className:"load-test-layout",children:[n.jsxs("section",{className:"load-config-card",children:[n.jsxs("div",{className:"load-section-title",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Test configuration")}),n.jsx("h3",{children:s("Request settings")})]}),n.jsxs("b",{children:[j," ",s("requests")]})]}),n.jsxs("div",{className:"load-test-form",children:[n.jsxs("label",{className:"load-url",children:[n.jsx("span",{children:s("Target URL")}),n.jsx("input",{className:"field",value:l,onChange:O=>o(O.target.value),placeholder:"https://example.com",disabled:S})]}),n.jsxs("div",{className:"load-input-grid",children:[n.jsxs("label",{children:[n.jsx("span",{children:s("Virtual users")}),n.jsx("input",{className:"field",type:"number",min:1,max:20,value:c,onChange:O=>u(O.target.value===""?"":Number(O.target.value)),disabled:S}),n.jsx("small",{children:s("Maximum 20 concurrent users")})]}),n.jsxs("label",{children:[n.jsx("span",{children:s("Requests / user")}),n.jsx("input",{className:"field",type:"number",min:1,max:100,value:f,onChange:O=>p(O.target.value===""?"":Number(O.target.value)),disabled:S}),n.jsx("small",{children:s("Maximum 100 per user")})]}),n.jsxs("label",{children:[n.jsx("span",{children:s("Interval")}),n.jsxs("div",{className:"load-input-unit",children:[n.jsx("input",{className:"field",type:"number",min:0,max:1e4,value:m,onChange:O=>g(O.target.value===""?"":Number(O.target.value)),disabled:S}),n.jsx("em",{children:s("ms")})]}),n.jsx("small",{children:s("Pause between each request")})]})]}),n.jsxs("label",{className:"load-confirm",children:[n.jsx("input",{type:"checkbox",checked:v,onChange:O=>y(O.target.checked),disabled:S}),n.jsxs("span",{children:[n.jsx("b",{children:s("Authorized target")}),n.jsx("small",{children:s("I own this target or have permission to run a load test.")})]})]}),n.jsx("button",{type:"button",className:"btn btn-primary load-run-button",disabled:S||!v||!l.trim(),onClick:()=>{R()},children:S?n.jsxs(n.Fragment,{children:[n.jsx("i",{})," ",s("Running")," ",j," ",s("requests…")]}):n.jsx(n.Fragment,{children:s("▶ Start Load Test")})})]})]}),n.jsxs("aside",{className:"load-safety-card",children:[n.jsx("p",{className:"eyebrow",children:s("Safe limits")}),n.jsx("h3",{children:s("Controlled traffic")}),n.jsxs("ul",{children:[n.jsxs("li",{children:[n.jsx("b",{children:"20"}),n.jsx("span",{children:s("Maximum virtual users")})]}),n.jsxs("li",{children:[n.jsx("b",{children:"2,000"}),n.jsx("span",{children:s("Maximum total requests")})]}),n.jsxs("li",{children:[n.jsx("b",{children:"15s"}),n.jsx("span",{children:s("Timeout per request")})]})]}),n.jsx("p",{children:s("Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data.")})]})]}),A&&n.jsx("p",{className:"load-error",children:A}),S&&n.jsxs("section",{className:"load-running",children:[n.jsx("i",{}),n.jsxs("div",{children:[n.jsx("b",{children:s("Load test is running")}),n.jsx("span",{children:s("Waiting for all virtual users to complete their request budget…")})]})]}),E&&n.jsxs("section",{className:"load-results",children:[n.jsxs("div",{className:"load-results-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Run report")}),n.jsx("h3",{children:s("HTTP Request Results")})]}),n.jsx("span",{className:E.failed?"has-failures":"all-passed",children:E.failed?`${E.failed} failed`:s("All requests passed")})]}),n.jsxs("div",{className:"load-kpis",children:[n.jsx(As,{label:s("Total"),value:String(E.total)}),n.jsx(As,{label:s("Passed"),value:String(E.passed),tone:"pass"}),n.jsx(As,{label:s("Failed"),value:String(E.failed),tone:"fail"}),n.jsx(As,{label:s("Average"),value:`${E.averageMs} ms`}),n.jsx(As,{label:s("Min / Max"),value:`${E.minMs} / ${E.maxMs} ms`}),n.jsx(As,{label:s("Requests/sec"),value:String(E.requestsPerSecond)})]}),n.jsx("div",{className:"load-table-wrap",children:n.jsxs("table",{className:"load-request-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"#"}),n.jsx("th",{children:s("User")}),n.jsx("th",{children:s("Method")}),n.jsx("th",{children:s("Request URL")}),n.jsx("th",{children:"HTTP"}),n.jsx("th",{children:s("Time")}),n.jsx("th",{children:s("Size")}),n.jsx("th",{children:s("Result")})]})}),n.jsx("tbody",{children:E.requests.map(O=>n.jsxs("tr",{children:[n.jsx("td",{children:O.id}),n.jsxs("td",{children:["VU-",O.virtualUser,n.jsxs("small",{children:[s("Run")," ",O.iteration]})]}),n.jsx("td",{children:n.jsx("span",{className:"load-method",children:O.method})}),n.jsxs("td",{children:[n.jsx("span",{className:"load-request-url",title:O.finalUrl??O.url,children:O.finalUrl??O.url}),O.error&&n.jsx("small",{className:"load-request-error",children:O.error})]}),n.jsx("td",{children:O.statusCode?n.jsxs(n.Fragment,{children:[n.jsx("b",{children:O.statusCode}),n.jsx("small",{children:O.statusText})]}):"—"}),n.jsxs("td",{children:[O.durationMs," ",s("ms")]}),n.jsx("td",{children:xT(O.responseBytes)}),n.jsx("td",{children:n.jsx("span",{className:`load-result-badge ${O.passed?"passed":"failed"}`,children:O.passed?s("PASS"):s("FAIL")})})]},O.id))})]})})]})]})}function As({label:a,value:s,tone:l=""}){return n.jsxs("div",{className:l,children:[n.jsx("span",{children:a}),n.jsx("b",{children:s})]})}function xT(a){return a?a<1024?`${a} B`:`${(a/1024).toFixed(1)} KB`:"—"}function jT({message:a,detail:s,onClose:l}){const{ui:o}=Le();return n.jsxs("div",{className:"scout-notice",role:"alert",children:[n.jsx("div",{className:"scout-notice-icon",children:"!"}),n.jsxs("div",{children:[n.jsx("b",{children:a}),n.jsx("p",{children:s})]}),n.jsx("button",{type:"button",onClick:l,"aria-label":o("Dismiss notice"),children:"×"})]})}function ST(){const[a,s]=L.useState({status:"idle",result:null,error:null}),[l,o]=L.useState([]),[c,u]=L.useState(null),f=L.useRef(void 0);L.useEffect(()=>()=>f.current?.abort(),[]);async function p(g,v,y,S="en",b=!1,E=750,N=[],A,w,j,R,O=!1){f.current?.abort();const M=new AbortController;f.current=M,u(null),o([]),s({status:"loading",result:null,error:null});try{const F=await S0({url:g,maxPages:v,maxDepth:y,language:S,includeApiChecks:b,waitAfterNavigationMs:E,blockedKeywords:N,projectId:A,startPath:w,scopePath:j,mode:R,debug:O},X=>{M.signal.aborted||o(Z=>{const $=Z.findIndex(J=>J.id===X.id);if($<0)return[...Z,X];const B=[...Z];return B[$]=X,B})},M.signal,X=>{M.signal.aborted||u(X)});return M.signal.aborted?null:(o(F.scoutTrace??[]),s({status:"success",result:F,error:null}),F)}catch(F){if(M.signal.aborted)return null;const X=F instanceof yn?F:new yn("unknown","An unexpected error occurred.");return s({status:"error",result:null,error:X}),null}finally{f.current===M&&(u(null),f.current=void 0)}}function m(){f.current?.abort(),u(null),o([]),s({status:"idle",result:null,error:null})}return{...a,trace:l,preview:c,analyze:p,reset:m}}const Vo={enabled:!0,keywords:Dy},tb=a=>`lazyscout-click-filter:${a}`;function wT(a){try{const s=localStorage.getItem(tb(a));if(!s)return Vo;const l=JSON.parse(s);return{enabled:l.enabled===!0,keywords:Ly(l.keywords)}}catch{return Vo}}function NT(a){const[s,l]=L.useState(Vo);L.useEffect(()=>{l(a?wT(a):Vo)},[a]);const o=L.useCallback(u=>{const f={enabled:u.enabled,keywords:Ly(u.keywords)};l(f),a&&localStorage.setItem(tb(a),JSON.stringify(f))},[a]),c=s.enabled?s.keywords:[];return{filter:s,blockedKeywords:c,save:o}}function CT(a,s){const[l,o]=L.useState([]),[c,u]=L.useState([]);L.useEffect(()=>u([]),[a]),L.useEffect(()=>{const N=s??[];o(N),u(A=>{if(!A.length)return A;const w=new Set(N.map(R=>R.id)),j=A.filter(R=>w.has(R));return j.length===A.length?A:j})},[s]);function f(N,A){o(w=>w.map(j=>j.id===N?A:j)),u(w=>w.map(j=>j===N?A.id:j))}function p(N){o(A=>A.filter(w=>w.id!==N)),u(A=>A.filter(w=>w!==N))}function m(){o(N=>N.filter(A=>!c.includes(A.id))),u([])}function g(N,A){N!==A&&o(w=>{const j=w.findIndex(F=>F.id===N),R=w.findIndex(F=>F.id===A);if(j<0||R<0)return w;const O=[...w],[M]=O.splice(j,1);return O.splice(R,0,M),O})}function v(N){const A=new Set(l.map(j=>j.id));let w=l.filter(j=>j.module==="MANUAL").length+1;for(;A.has(sf("MANUAL",w));)w++;return E1("MANUAL",sf("MANUAL",w),N)}function y(N){return o(A=>[N,...A]),N}function S(N){o(A=>[...N,...A])}function b(N){u(A=>A.includes(N)?A.filter(w=>w!==N):[...A,N])}function E(N){u(N)}return{testCases:l,selectedIds:c,updateTestCase:f,deleteTestCase:p,deleteSelected:m,reorderTestCases:g,createTestCaseDraft:v,addTestCase:y,addImportedTestCases:S,toggleSelected:b,setSelection:E}}function TT(a){const[s,l]=L.useState([]);L.useEffect(()=>{l(a??[])},[a]);function o(f,p){l(m=>m.map(g=>g.id===f?p:g))}function c(f){l(p=>p.filter(m=>m.id!==f))}function u(f){const p=new Set(s.map(g=>g.id));let m=s.filter(g=>g.module==="MANUAL").length+1;for(;p.has(lf("MANUAL",m));)m++;l(g=>[_1("MANUAL",lf("MANUAL",m),f),...g])}return{testData:s,updateRow:o,deleteRow:c,addRow:u}}const Yo="lazyscout.projects.v1";function _T(){return{startUrl:"",origin:"Manual test suite",pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function df(){try{return JSON.parse(localStorage.getItem(Yo)??"[]")}catch{return[]}}function ET(a){const s=df().filter(l=>l.id!==a);s.length?localStorage.setItem(Yo,JSON.stringify(s)):localStorage.removeItem(Yo)}function kT(){const[a,s]=L.useState([]),[l,o]=L.useState(),[c,u]=L.useState("~/LazyScout"),[f,p]=L.useState(),[m,g]=L.useState(!0),v=L.useRef(new Set),y=L.useRef(new Map),S=L.useRef(new Map);L.useEffect(()=>{(async()=>{try{const $=await hg();u($.root);const B=df(),J=B.filter(z=>!$.projects.some(H=>H.id===z.id));for(const z of J)await sd(z);B.length&&localStorage.removeItem(Yo),s([...J,...$.projects])}catch($){s(df()),p($ instanceof Error?$.message:String($))}finally{g(!1)}})()},[]);function b($){if(v.current.has($.id))return Promise.resolve();const J=(y.current.get($.id)??Promise.resolve()).catch(()=>{}).then(()=>sd($)).then(()=>{const z=S.current.get($.id);S.current.delete($.id),z&&![...S.current.values()].includes(z)&&p(H=>H===z?"":H)}).catch(z=>{const H=z instanceof Error?z.message:String(z);S.current.set($.id,H),p(H)});return y.current.set($.id,J),J.finally(()=>{y.current.get($.id)===J&&y.current.delete($.id)}),J}async function E($){let B=y.current.get($);for(;B;)await B,B=y.current.get($);const J=S.current.get($);if(J)throw new Error(J)}function N($,B,J,z,H){const T=new Date().toISOString(),K=`project-${AT($)}`,V=z??K,Q=a.find(D=>D.id===V),W={id:V,name:J??Q?.name??new URL($).hostname,targetUrl:$,createdAt:Q?.createdAt??T,updatedAt:T,mode:Q?.mode,testCaseLanguage:H??Q?.testCaseLanguage??"en",result:B};return v.current.delete(V),s(D=>Q?D.map(Y=>Y.id===V?W:Y):[W,...D]),b(W),o(V),V}function A($="Untitled Test Suite",B="empty",J=_T(),z=""){const H=new Date().toISOString(),T=`project-${crypto.randomUUID()}`,K={id:T,name:$.trim()||"Untitled Test Suite",targetUrl:z,createdAt:H,updatedAt:H,mode:B,result:J};return v.current.delete(T),s(V=>[K,...V]),b(K),o(T),T}async function w($){const B=a.findIndex(H=>H.id===$),J=a[B];if(!J)return;const z=a.filter(H=>H.id!==$);v.current.add($),s(z),l===$&&o(z[0]?.id);try{await(y.current.get($)??Promise.resolve()),await _0($),S.current.delete($),ET($)}catch(H){v.current.delete($),s(T=>{if(T.some(V=>V.id===$))return T;const K=Math.min(B,T.length);return[...T.slice(0,K),J,...T.slice(K)]}),l===$&&o($),p(H instanceof Error?H.message:String(H))}}function j($){v.current.delete($.id),s(B=>B.some(J=>J.id===$.id)?B:[$,...B]),b($),o($.id)}function R($,B){const J=B.trim(),z=a.find(T=>T.id===$);if(!J||!z)return;const H={...z,name:J,updatedAt:new Date().toISOString()};s(T=>T.map(K=>K.id===$?H:K)),b(H)}function O($,B,J=!1){const z=a.find(K=>K.id===$);if(!z)return;const H={...z,result:B,updatedAt:new Date().toISOString()},T=()=>s(K=>K.map(V=>V.id===$?{...V,result:B,updatedAt:H.updatedAt}:V));if(b(H),J)return E($).then(T);T()}function M($,B){const J=a.find(H=>H.id===$);if(!J)return;const z={...J,testCaseLanguage:B,updatedAt:new Date().toISOString()};s(H=>H.map(T=>T.id===$?z:T)),b(z)}function F(){H0().catch($=>p($ instanceof Error?$.message:String($)))}async function X($){await y.current.get($);const B=(await hg()).projects.find(J=>J.id===$);!B||v.current.has($)||s(J=>J.map(z=>z.id===$?B:z))}async function Z($,B){const J=a.find(T=>T.id===$);if(!J||J.targetUrl)throw new Error("This project already has a target.");let z;try{z=new URL(B.trim())}catch{throw new Error("Enter a full website URL.")}if(!["http:","https:"].includes(z.protocol)||z.username||z.password)throw new Error("Use an HTTP or HTTPS URL without credentials.");const H={...J,targetUrl:z.toString(),updatedAt:new Date().toISOString()};await y.current.get($),await sd(H),s(T=>T.map(K=>K.id===$?H:K))}return{projects:a,activeProjectId:l,setActiveProjectId:o,saveProject:N,createEmptyProject:A,deleteProject:w,restoreProject:j,renameProject:R,updateProjectResult:O,updateProjectTestCaseLanguage:M,reloadProject:X,waitForProjectSave:E,setProjectTargetUrl:Z,workspaceRoot:c,workspaceError:f,loading:m,openWorkspace:F}}function AT(a){const s=new TextEncoder().encode(a),l=Array.from(s,o=>String.fromCharCode(o)).join("");return btoa(l).replace(/[^a-z0-9]/gi,"").slice(0,32).toLowerCase()}function OT(a){const[s,l]=L.useState({}),o=a?s[a]??{}:{};function c(f){a&&l(p=>({...p,[a]:f}))}function u(){a&&l(f=>{const p={...f};return delete p[a],p})}return{secrets:o,saveSecrets:c,clearSecrets:u,hasSecrets:Object.values(o).some(Boolean)}}function RT(a){const[s,l]=L.useState([]);L.useEffect(()=>{l([]),a&&(async()=>{const u=await X0(a),f=`lazyscout.bug-reports.${a}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=p.filter(g=>!u.some(v=>v.id===g.id));for(const g of m)await yg(a,g);p.length&&localStorage.removeItem(f),l([...m,...u])})().catch(()=>l([]))},[a]);function o(u){l(f=>f.some(p=>p.id===u.id)?f.map(p=>p.id===u.id?u:p):[u,...f]),a&&yg(a,u)}function c(u){l(f=>f.filter(p=>p.id!==u)),a&&Z0(a,u)}return{reports:s,save:o,remove:c}}function DT(a){const[s,l]=L.useState([]);L.useEffect(()=>{l([]),a&&(async()=>{const u=await G0(a),f=`lazyscout.screenshots.${a}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const m=[];for(const g of p)u.some(v=>v.name===g.name)||m.push(await gg(a,g));p.length&&localStorage.removeItem(f),l([...m,...u])})().catch(()=>l([]))},[a]);function o(u){a&&gg(a,u).then(f=>l(p=>[f,...p.filter(m=>m.name!==f.name)].slice(0,50)))}function c(u){l(f=>f.filter(p=>p.name!==u)),a&&F0(a,u)}return{screenshots:s,add:o,remove:c}}function LT(a){const[s,l]=L.useState([]),[o,c]=L.useState();L.useEffect(()=>{if(!a){l([]);return}D0(a).then(l).catch(f=>c(f instanceof Error?f.message:String(f)))},[a]);async function u(f){l(f);try{await L0(a,f),c(void 0)}catch(p){c(p instanceof Error?p.message:String(p))}}return{flows:s,update:u,error:o}}function MT(a,s){const l=s.search.trim().toLowerCase();return a.filter(o=>s.module!=="all"&&!(o.folder??o.module).toLowerCase().includes(s.module.toLowerCase())||s.type!=="all"&&o.type!==s.type||s.priority!=="all"&&o.priority!==s.priority?!1:l?[o.id,o.module,o.folder??"",...o.tags??[],...o.requirements??[],o.title,o.expectedResult,o.sourceUrl,T1(o.steps)].join(" ").toLowerCase().includes(l):!0)}function Pv(a){return[...new Set(a.map(s=>s.folder??s.module))].sort()}function UT(a,s,l){const o=s.trim().toLowerCase();return a.filter(c=>l!=="all"&&c.module!==l?!1:o?[c.id,c.module,c.field,c.inputType,c.validValue,c.invalidValue,c.note??""].join(" ").toLowerCase().includes(o):!0)}const zT={search:"",module:"all",type:"all",priority:"all"},Fd="lazyscout-active-project-id";function BT(){const{t:a,ui:s,language:l}=Le(),o=l==="th",c=L.useRef(null),{status:u,result:f,error:p,trace:m,preview:g,analyze:v,reset:y}=ST(),{projects:S,activeProjectId:b,setActiveProjectId:E,saveProject:N,createEmptyProject:A,deleteProject:w,restoreProject:j,renameProject:R,updateProjectResult:O,updateProjectTestCaseLanguage:M,reloadProject:F,waitForProjectSave:X,setProjectTargetUrl:Z,workspaceRoot:$,workspaceError:B,loading:J,openWorkspace:z}=kT(),H=S.find(ve=>ve.id===b),{secrets:T,saveSecrets:K,clearSecrets:V}=OT(b),{filter:Q,blockedKeywords:W,save:D}=NT(b),x=H?.result??f,{testCases:C,selectedIds:q,updateTestCase:I,deleteTestCase:ee,deleteSelected:he,reorderTestCases:_e,createTestCaseDraft:Ne,addImportedTestCases:le,addTestCase:Ce,toggleSelected:ye,setSelection:Ge}=CT(b,x?.testCases),{testData:Me,updateRow:k,deleteRow:pe,addRow:ce}=TT(x?.testData),{reports:G,save:P,remove:ne}=RT(b),{screenshots:xe,add:ge,remove:se}=DT(b),{flows:Te,update:Ee}=LT(b),we=x??(H?nb(H.targetUrl):void 0),[ke,qe]=L.useState("testcases"),[fe,ze]=L.useState(!1),[$e,Ve]=L.useState("terminal"),[rt,tt]=L.useState(zT),[ft,pt]=L.useState(""),[Re,kt]=L.useState("all"),[_t,Ke]=L.useState(),[ut,st]=L.useState(),[Ut,mt]=L.useState(null),[zt,Je]=L.useState(!1),[He,Yt]=L.useState(),[nt,Fe]=L.useState(()=>window.location.hash==="#documents"?"documents":"overview");L.useLayoutEffect(()=>{window.scrollTo({top:0,behavior:"instant"})},[nt,b]),L.useEffect(()=>{const ve=new URL(window.location.href);if(nt==="documents")ve.hash="documents";else if(ve.hash==="#documents")ve.hash="";else return;ve.href!==window.location.href&&window.history.replaceState(window.history.state,"",ve)},[nt]);const[Ie,Ye]=L.useState({}),[In,Pn]=L.useState();function Bt(ve){Pn({projectId:b,ids:ve}),st(void 0),Fe("case-run")}const Xt=L.useMemo(()=>{if(nt!=="queue"&&nt!=="case-run")return C;const ve=nt==="queue"?Ie[b??""]:In&&In.projectId===b?In.ids:[],Oe=new Map(C.map(Xe=>[Xe.id,Xe]));return(ve??[]).flatMap(Xe=>Oe.get(Xe)??[])},[C,nt,Ie,b,In]),[za,on]=L.useState(!1),[Zt,Et]=L.useState({}),[Kt,tn]=L.useState({}),[Ba,cn]=L.useState(!1),[$n,pn]=L.useState("credentials"),[_n,bn]=L.useState(!1),[nn,qn]=L.useState(!1),[va,ht]=L.useState(!1),[Ct,xr]=L.useState(!1),[jr,En]=L.useState(),[Hn,Sr]=L.useState(),[kn,ya]=L.useState(),[Us,Ia]=L.useState(()=>localStorage.getItem("lazyscout-sidebar-collapsed")==="true");function Pa(){Ia(ve=>(localStorage.setItem("lazyscout-sidebar-collapsed",String(!ve)),!ve))}function mn(ve,Oe){ya({message:ve,restore:Oe})}function re(ve){const Oe=C.find(Xe=>Xe.id===ve);Oe&&(ee(ve),mn(Xe=>Xe?`ลบ ${Oe.id} แล้ว`:`Deleted ${Oe.id}`,()=>le([Oe])))}function Ae(){const ve=C.filter(Oe=>q.includes(Oe.id));ve.length&&(he(),mn(Oe=>Oe?`ลบแล้ว ${ve.length} เคส`:`Deleted ${ve.length} Test Cases`,()=>le(ve)))}L.useEffect(()=>{if(!kn)return;const ve=window.setTimeout(()=>ya(void 0),8e3);return()=>window.clearTimeout(ve)},[kn]);function Qt(ve){Ct||(xr(!0),window.setTimeout(()=>{ve(),xr(!1)},700))}const Lt=L.useMemo(()=>MT(C,rt),[C,rt]),Yr=L.useMemo(()=>UT(Me,ft,Re),[Me,ft,Re]),Xr=L.useMemo(()=>Pv(C),[C]),Qo=L.useMemo(()=>Pv(Me),[Me]),xn=C.find(ve=>ve.id===_t);function zs(ve,Oe,Xe){const At=C.find(bt=>bt.id===ve);if(!At)return;const Jt={...At};if(Oe==="preconditions"||Oe==="tags"?Jt[Oe]=Xe.split(/\n|,/).map(bt=>bt.trim()).filter(Boolean):Oe==="steps"?Jt.steps=Xe.split(`
66
+ `).map(bt=>bt.trim()).filter(Boolean).map(bt=>{try{return JSON.parse(bt)}catch{return{type:"manual",description:bt}}}):Jt[Oe]=Xe,I(ve,Jt),b&&x){const bt=C.map(oa=>oa.id===ve?Jt:oa);O(b,{...x,testCases:bt,testData:Me})}}L.useEffect(()=>{if(!b||!x||!H?.result)return;const ve=window.setTimeout(()=>{const Oe=H.result;JSON.stringify(Oe.testCases)===JSON.stringify(C)&&JSON.stringify(Oe.testData)===JSON.stringify(Me)||O(b,{...x,testCases:C,testData:Me})},150);return()=>window.clearTimeout(ve)},[b,H?.result,x,C,Me]),L.useEffect(()=>{if(J)return;if(S.length===0){localStorage.removeItem(Fd),ht(!0);return}if(b&&S.some(Xe=>Xe.id===b))return;const ve=localStorage.getItem(Fd),Oe=S.find(Xe=>Xe.id===ve)??S[0];E(Oe.id)},[b,S,J,E]),L.useEffect(()=>{!J&&b&&localStorage.setItem(Fd,b)},[b,J]),L.useEffect(()=>{if(u!=="loading")return;const ve=document.body.style.overflow,Oe=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=ve,document.documentElement.style.overflow=Oe}},[u]);function Zr(){Fe("overview"),c.current?.focusUrl()}async function Bs(ve,Oe,Xe,At,Jt,bt,oa,Ps,$a,qa){Ve("terminal"),ze(!0);const ca=await v(ve,Oe,Xe,At,Jt,bt,W,b,oa,Ps,$a,qa);if(ca){N(ve,ca,void 0,b,At);const wr=ca.pages.reduce((Nr,un)=>Nr+un.links.length+un.buttons.length+un.inputs.length+un.textareas.length+un.selects.length+(un.state?.interactions.length??0),0);if(ca.testCases.length===0||wr===0){const Nr=ca.issues.map(un=>un.code).filter((un,ea,$s)=>$s.indexOf(un)===ea);En({message:"Scout finished, but no usable Test Cases were created.",detail:`Visited ${ca.pages.length} page${ca.pages.length===1?"":"s"} and found ${wr} testable control${wr===1?"":"s"}.${Nr.length?` Explorer reported: ${Nr.join(", ")}.`:" The site may show a bot challenge, render content after a delay, or expose no detectable controls. Check Scout Log for details."}`})}else En(void 0)}}async function la(){const ve=ke==="testcases"?Lt:[],Oe=ke==="testdata"?Yr:[];if(ve.length===0&&Oe.length===0){Yt("No data is available for export.");return}Je(!0),Yt(void 0);try{await C0(ve,Oe)}catch(Xe){Yt(Xe instanceof yn?Xe.message:"Could not export CSV.")}finally{Je(!1)}}async function sl(ve){Je(!0),Yt(void 0);try{await X(ve),await fj(ve)}catch(Oe){Yt(Oe instanceof Error?Oe.message:"Could not export Excel.")}finally{Je(!1)}}async function Is(ve){if(!b||!x){le(ve);return}await O(b,{...x,testCases:[...ve,...C],testData:Me},!0)}function ba(ve=x?.startUrl??""){const Oe=Ne(ve);ve&&(Oe.steps=[{type:"navigate",url:ve}]),mt(Oe),Ke(Oe.id)}function Jo(ve,Oe,Xe){const At=Ce({...Ne(Xe),title:Oe,steps:ve,expectedResult:"The recorded flow completes without an error.",automationStatus:"needs-review"});cn(!1),qe("testcases"),Ke(At.id)}function il(ve){const Oe=H?.targetUrl||x?.startUrl||"http://localhost:5173",Xe=Te[0],At=Xe??{id:crypto.randomUUID(),name:"Explorer Guided Flow",description:"Steps added from Auto Scout Explorer.",baseUrl:Oe,steps:[{id:crypto.randomUUID(),type:"navigate",path:new URL(Oe).pathname||"/"}],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Ee(Xe?Te.map(Jt=>Jt.id===Xe.id?{...Jt,steps:[...Jt.steps,ve],updatedAt:new Date().toISOString()}:Jt):[{...At,steps:[...At.steps,ve]}])}return n.jsxs("div",{className:"app-frame","data-view":nt,children:[n.jsx(V2,{projects:S,activeProjectId:b,result:x,collapsed:u==="loading"?!1:Us,onToggleCollapsed:()=>{u!=="loading"&&Pa()},onSelect:ve=>Qt(()=>{E(ve),Et({}),tn({}),Fe(Oe=>Oe==="documents"?Oe:"overview"),Ke(void 0)}),onNew:()=>ht(!0),onDelete:ve=>Sr(S.find(Oe=>Oe.id===ve)),onRename:R,onSettings:()=>{pn("credentials"),cn(!0)},workspaceRoot:$,onOpenWorkspace:z}),n.jsxs("div",{className:"app-main",children:[n.jsxs("header",{className:"app-header",children:[n.jsxs("div",{className:"workspace-heading",children:[n.jsx("p",{className:"eyebrow",children:a("localWorkspace")}),n.jsx("h1",{title:H?.name,children:H?.name||"LazyScout"})]}),H?n.jsxs("div",{className:"project-header-actions",children:[n.jsxs("button",{type:"button",className:"btn btn-primary",onClick:Zr,children:[n.jsx(Qe,{name:"globe"})," ",a("scoutWebsite")]}),n.jsx(Vy,{scout:!0,cases:!!x,onNavigate:ve=>{ve==="testcases"&&qe("testcases"),ve==="overview"&&c.current?.expand(),Fe(ve)}},H.id)]}):n.jsxs("a",{className:"guide-link",href:`/guide/index.html?lang=${l}`,target:"_blank",rel:"noreferrer","aria-label":s("Open LazyScout Guide"),title:s("Open LazyScout Guide"),children:[n.jsx(Qe,{name:"documents"}),s("Guide")]})]}),H&&n.jsx(L2,{view:nt,onChange:ve=>ve==="explorer"?on(!0):Fe(ve),counts:{cases:C.length,states:x?.actionGraph.states.length??0}}),n.jsxs("div",{className:"workspace-content",children:[H&&n.jsx(y0,{ref:c,hidden:nt!=="overview",initialUrl:H.targetUrl,hasExistingData:!!(H.result?.pages?.length||C.length||Me.length),initialLanguage:H.testCaseLanguage,loading:u==="loading",onLanguageChange:ve=>b&&M(b,ve),onAnalyze:Bs,onOpenAiScout:()=>Fe("qa")},b??"new-project"),p&&n.jsx(yo,{message:p.message,hint:p.hint}),B&&n.jsx(yo,{message:B,hint:s("Check that the LazyScout workspace is writable.")}),He&&n.jsx(yo,{message:He}),jr&&n.jsx(jT,{...jr,onClose:()=>En(void 0)}),H&&!x&&["testcases","automation","scoutlog","loadtest"].includes(nt)&&n.jsxs("section",{className:"workspace-empty",children:[n.jsx(Qe,{name:"cases"}),n.jsx("h2",{children:o?"ยังไม่มีผลการสำรวจ":"No Scout results yet"}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>Fe("overview"),children:a("overview")})]}),nt==="documents"&&H&&n.jsx(x1,{projectId:H.id,projectName:H.name},H.id),nt==="map"&&H&&n.jsx(j0,{projectId:H.id,projectName:H.name,target:H.targetUrl,result:H.result,cases:C,queue:Ie[H.id]??[],onQueue:ve=>Ye(Oe=>({...Oe,[H.id]:ve})),onReview:()=>Fe("queue"),onCase:st,onWrite:ba,onScout:Zr},H.id),nt==="case-run"&&n.jsxs("div",{className:"queue-return",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{qe("testcases"),Fe("testcases")},children:s("Back to Test Cases")}),n.jsxs("b",{children:[s("Selected cases")," · ",Xt.length]})]}),nt==="queue"&&H&&n.jsxs("div",{className:"queue-return",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Fe("map"),children:o?"กลับไปคิวทดสอบ":"Back to run queue"}),n.jsxs("b",{children:[o?"เคสในคิว":"Queued cases"," · ",Xt.length]})]}),nt==="qa"&&H&&n.jsx(F2,{projectId:H.id,targetUrl:H.targetUrl,onComplete:F,onSetTarget:Z,onOpenSessionSettings:()=>{pn("session"),cn(!0)}},H.id),x&&nt!=="qa"&&nt!=="map"&&nt!=="documents"&&n.jsx(n.Fragment,{children:nt==="scoutlog"?n.jsx(O2,{result:x}):nt==="loadtest"?n.jsx(bT,{defaultUrl:H?.targetUrl||x.startUrl}):nt==="automation"||nt==="queue"||nt==="case-run"?n.jsx(T2,{testCases:Xt,focused:nt==="case-run",onEditSteps:mt,projectId:b,secrets:T,blockedKeywords:W,onRunStatus:(ve,Oe)=>{Et(At=>({...At,[ve]:Oe}));const Xe=C.find(At=>At.id===ve);Xe&&I(ve,{...Xe,status:Oe})},onRunResult:(ve,Oe)=>{tn(At=>({...At,[ve]:{...Oe,finishedAt:new Date().toISOString()}}));const Xe=Oe.screenshots?.length?Oe.screenshots:Oe.screenshot?[Oe.screenshot]:[];if(Xe.forEach(ge),Oe.status==="failed"&&b){const At=C.find(bt=>bt.id===ve),Jt={id:`bug-${crypto.randomUUID()}`,title:`Automation failed: ${At?.title??ve}`,severity:"high",status:"open",testCaseId:ve,actualResult:"The Playwright automation step failed. Open Automation Run Log for details.",expectedResult:At?.expectedResult??"The Test Case should complete successfully.",stepsToReproduce:At?.steps.map((bt,oa)=>`${oa+1}. ${bt.type}`).join(`
67
+ `)??"",attachments:Xe.map(bt=>({name:bt.name,type:"image/png",dataUrl:bt.dataUrl})),createdAt:new Date().toISOString()};P(Jt)}}},`${b}-${nt}`):nt==="overview"?n.jsxs(n.Fragment,{children:[n.jsxs("details",{className:"project-workflow",children:[n.jsx("summary",{children:o?"ขั้นตอนและความคืบหน้าของโปรเจกต์":"Project workflow and progress"}),n.jsx(lC,{pages:x.pages.length,testCases:C.length,recordedCases:C.filter(ve=>ve.module==="MANUAL").length,completedRuns:C.filter(ve=>ve.status==="passed"||ve.status==="failed").length,onScout:Zr,onReview:()=>Fe("testcases"),onRecord:()=>{pn("recorder"),cn(!0)},onRun:()=>Fe("automation"),onExport:()=>{la()}})]}),n.jsx(J2,{result:x,testCases:C,executionStatuses:Zt,runResults:Kt,projectId:b})]}):n.jsxs("div",{className:x.pages.length?"workspace-shell":"workspace-shell without-tree",children:[x.pages.length>0&&n.jsx(j1,{result:x,activeUrl:xn?.sourceUrl,onSelect:ve=>Ke(C.find(Oe=>Oe.sourceUrl===ve)?.id)}),n.jsxs("main",{className:"workspace-center",children:[n.jsxs("div",{className:"workspace-center-head",children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Current Workspace")}),n.jsx("h2",{children:s({testcases:"Test Case Review",testdata:"Test Data",apichecks:"Test API",bugreports:"Bug Reports",screenshots:"Screenshots"}[ke]??"Test Cases")})]}),ke==="testcases"&&n.jsxs("div",{className:"center-chips",children:[n.jsxs("span",{className:"status-badge status-badge-pass",children:[C.filter(ve=>ve.automationStatus==="ready").length," ",s("ready")]}),n.jsxs("span",{className:"status-badge status-badge-warn",children:[C.filter(ve=>ve.automationStatus==="needs-review").length," ",s("review")]})]})]}),n.jsx("div",{className:"grid gap-4",children:n.jsxs("div",{className:"card",children:[n.jsxs("div",{className:"result-tabs",children:[n.jsxs("button",{type:"button","aria-pressed":ke==="testcases",onClick:()=>qe("testcases"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="testcases"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Test Cases ("),C.length,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="testdata",onClick:()=>qe("testdata"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="testdata"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Test Data ("),Me.length,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="apichecks",onClick:()=>qe("apichecks"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="apichecks"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Test API ("),x.apiChecks?.length??0,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="bugreports",onClick:()=>qe("bugreports"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="bugreports"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Bug Reports ("),G.length,")"]}),n.jsxs("button",{type:"button","aria-pressed":ke==="screenshots",onClick:()=>qe("screenshots"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ke==="screenshots"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[s("Screenshots ("),xe.length,")"]})]}),ke==="screenshots"?n.jsx(yT,{screenshots:xe,onDelete:se}):ke==="bugreports"?n.jsx(pT,{reports:G,testCases:C,onSave:P,onDelete:ne}):ke==="apichecks"?n.jsx(D2,{checks:x.apiChecks??[],secrets:T}):ke==="testcases"?n.jsxs(n.Fragment,{children:[n.jsx($1,{filters:rt,modules:Xr,totalCount:C.length,visibleCount:Lt.length,selectedCount:q.length,onReviewSelection:()=>Bt(q),exporting:zt,onFiltersChange:tt,onAdd:()=>ba(),onImport:()=>qn(!0),onImportScreenshot:()=>bn(!0),onRecord:()=>{pn("recorder"),cn(!0)},onDeleteSelected:Ae,onExport:la,onExportExcel:H&&C.length?()=>{sl(H.id)}:void 0}),n.jsx(P1,{testCases:Lt,selectedIds:q,activeId:_t,onToggleSelect:ye,onToggleAll:Ge,onOpen:ve=>{Ke(ve.id),st(ve.id)},onEdit:mt,onDelete:re,onReorder:_e,onUpdateCell:zs,executionStatuses:Zt}),n.jsx(q1,{testCases:C})]}):n.jsxs(n.Fragment,{children:[n.jsx(G1,{search:ft,module:Re,modules:Qo,totalCount:Me.length,visibleCount:Yr.length,exporting:zt,onSearchChange:pt,onModuleChange:kt,onAdd:()=>ce(x.startUrl),onExport:la}),n.jsx(H1,{rows:Yr,onUpdate:k,onDelete:pe})]})]})})]})]})})]}),Ut&&n.jsx(I1,{testCase:Ut,cases:C,onCancel:()=>mt(null),onSave:(ve,Oe)=>{C.some(Xe=>Xe.id===Ut.id)?I(Ut.id,ve):Ce(ve),Ke(ve.id),mt(null),Oe?Bt([ve.id]):nt==="case-run"&&ve.id!==Ut.id&&Pn(Xe=>Xe&&{...Xe,ids:Xe.ids.map(At=>At===Ut.id?ve.id:At)})}}),za&&we&&n.jsx(wC,{result:we,testCaseCount:C.length,flows:Te,baseUrl:H?.targetUrl||we.startUrl,projectId:b,secrets:T,onSaveFlows:Ee,onGenerateTestCase:ve=>{Ce(ve),on(!1),Fe("testcases")},onAddToFlow:il,onClose:()=>on(!1),onOpenCases:()=>{on(!1),Fe("testcases")}}),ut&&!Ut&&(nt==="map"||ke==="testcases")&&C.find(ve=>ve.id===ut)&&n.jsx(M1,{testCase:C.find(ve=>ve.id===ut),onEdit:()=>mt(C.find(ve=>ve.id===ut)),onOpenRunner:()=>Bt([ut]),onClose:()=>st(void 0)}),Ba&&H&&n.jsx(OC,{projectName:H.name,projectId:H.id,targetUrl:H.targetUrl,secrets:T,onSave:K,onClear:V,onClose:()=>cn(!1),onSaveRecording:Jo,clickFilter:Q,onChangeClickFilter:D,initialTab:$n}),Hn&&n.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:n.jsxs("section",{className:"modern-modal confirm-delete-modal",role:"dialog","aria-modal":"true",children:[n.jsx("header",{className:"modal-header",children:n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:s("Delete project")}),n.jsxs("h2",{children:[s("Remove “"),Hn.name,"”?"]}),n.jsx("p",{children:s("The project will be removed from this local workspace. You can undo immediately afterward.")})]})}),n.jsxs("footer",{className:"modal-footer",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Sr(void 0),children:s("Cancel")}),n.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{const ve=Hn;Sr(void 0),w(ve.id).then(()=>mn(Oe=>Oe?`ลบโปรเจกต์ ${ve.name} แล้ว`:`Deleted project ${ve.name}`,()=>j(ve)))},children:s("Delete project")})]})]})}),kn&&n.jsxs("div",{className:"undo-toast",role:"status","aria-live":"polite",children:[n.jsx("span",{children:kn.message(o)}),n.jsx("button",{type:"button",onClick:()=>{kn.restore(),ya(void 0)},children:s("Undo")}),n.jsx("button",{type:"button","aria-label":s("Dismiss"),onClick:()=>ya(void 0),children:"×"})]}),_n&&n.jsx(WC,{sourceUrl:x?.startUrl??H?.targetUrl??"",initialLanguage:H?.testCaseLanguage,onLanguageChange:ve=>b&&M(b,ve),existingCases:C,onImport:Is,onClose:()=>bn(!1)}),nn&&n.jsx(eT,{sourceUrl:x?.startUrl??H?.targetUrl??"",existingCases:C,onImport:Is,onClose:()=>qn(!1)}),va&&n.jsx(uT,{projects:S,onClose:()=>ht(!1),creating:Ct,onCreate:(ve,Oe)=>Qt(()=>{if(ve==="sample"){const Xe=IT();A(Oe,"empty",Xe,Xe.startUrl)}else A(Oe,ve);y(),Et({}),tn({}),qe("testcases"),Fe(ve==="scout"?"overview":"testcases"),ht(!1)}),onOpenProject:ve=>Qt(()=>{E(ve),y(),Et({}),tn({}),Fe("overview"),ht(!1)})}),fe&&n.jsx(Ho,{labelledBy:"scout-trace-title",onClose:()=>{u!=="loading"&&ze(!1)},children:n.jsxs("section",{className:"trace-panel","data-live":u==="loading"||void 0,children:[n.jsxs("header",{className:"trace-heading",children:[n.jsx("h2",{id:"scout-trace-title",children:o?"ติดตามการสำรวจเว็บ":"Scout activity"}),n.jsxs("span",{role:"status",children:[u==="loading"&&n.jsxs("svg",{className:"trace-spin",viewBox:"0 0 28 28",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"14",cy:"14",r:"10",stroke:"#39616d",strokeWidth:"2"}),n.jsx("path",{d:"M 5.34 19 A 10 10 0 0 1 14 4",stroke:"#58dec8",strokeWidth:"3.5",strokeLinecap:"round"}),n.jsx("circle",{cx:"14",cy:"4",r:"3.3",fill:"#e0fff7"})]}),u==="loading"?o?"กำลังสำรวจ":"Live":p?o?"สำรวจไม่สำเร็จ":"Scout failed":o?"สำรวจเสร็จแล้ว":"Completed"]})]}),p&&n.jsx(yo,{message:p.message,hint:p.hint}),u==="loading"&&n.jsxs("div",{className:"trace-pane-picker","aria-label":o?"มุมมองการสำรวจ":"Activity views",children:[n.jsx("button",{type:"button","aria-pressed":$e==="terminal",onClick:()=>Ve("terminal"),children:o?"เทอร์มินัล":"Terminal"}),n.jsx("button",{type:"button","aria-pressed":$e==="browser",onClick:()=>Ve("browser"),children:o?"ภาพเว็บไซต์":"Website preview"})]}),n.jsxs("div",{className:"trace-workspace","data-pane":u==="loading"?$e:"terminal",children:[n.jsx(Fy,{steps:m,live:u==="loading",runError:p?.message,issues:f?.issues}),u==="loading"&&n.jsx(R2,{frame:g})]}),n.jsxs("footer",{className:"trace-footer",children:[n.jsxs("span",{className:"trace-count",children:[o?"ขั้นตอนที่เสร็จแล้ว":"Steps finished"," ",n.jsxs("b",{children:[m.filter(ve=>ve.status!=="running").length," / ",m.length]})]}),u==="loading"?n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{y(),ze(!1)},children:o?"หยุดสำรวจ":"Stop Scout"}):n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>ze(!1),children:p?o?"ปิด":"Close":o?"ดูผลการสำรวจ":"View Scout results"})]})]})}),Ct&&n.jsx("div",{className:"navigation-loader",children:n.jsxs("div",{children:[n.jsx("span",{children:"LS"}),n.jsx("b",{children:s("Opening workspace")}),n.jsx("small",{children:s("Preparing your local QA tools…")})]})})]})]})}function nb(a){const s=new URL(a);return{startUrl:a,origin:s.origin,pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function IT(){const a="https://practicetestautomation.com/practice-test-login/",s=nb(a);return s.origin=new URL(a).origin,s.testCases=[{id:"TC-LOGIN-001",module:"LOGIN",folder:"Authentication",tags:["smoke","login"],title:"Sign in with valid demo credentials",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:a},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"student"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"Password123"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertUrl",urlContains:"/logged-in-successfully/"},{type:"assertText",target:{strategy:"css",cssSelector:"strong"},text:"Congratulations"},{type:"assertVisible",target:{strategy:"role",role:"link",name:"Log out"}}],expectedResult:"The success page opens, shows a congratulations message, and displays Log out.",type:"positive",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:a,notes:"Uses the public demo credentials published on Practice Test Automation."},{id:"TC-LOGIN-002",module:"LOGIN",folder:"Authentication",tags:["validation","login"],title:"Reject an invalid username",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:a},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"incorrectUser"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"Password123"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertText",target:{strategy:"css",cssSelector:"#error"},text:"Your username is invalid!"}],expectedResult:"The page displays “Your username is invalid!”.",type:"negative",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:a},{id:"TC-LOGIN-003",module:"LOGIN",folder:"Authentication",tags:["validation","login"],title:"Reject an invalid password",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:a},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"student"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"incorrectPassword"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertText",target:{strategy:"css",cssSelector:"#error"},text:"Your password is invalid!"}],expectedResult:"The page displays “Your password is invalid!”.",type:"negative",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:a}],s}p0.createRoot(document.getElementById("root")).render(n.jsx(L.StrictMode,{children:n.jsx(g0,{children:n.jsx(BT,{})})}));