lazyscout 0.4.6 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,58 +0,0 @@
1
- (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=s(u);fetch(u.href,h)}})();var Is=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Eu={exports:{}},Wi={};var Nm;function fx(){if(Nm)return Wi;Nm=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function s(o,u,h){var f=null;if(h!==void 0&&(f=""+h),u.key!==void 0&&(f=""+u.key),"key"in u){h={};for(var p in u)p!=="key"&&(h[p]=u[p])}else h=u;return u=h.ref,{$$typeof:n,type:o,key:f,ref:u!==void 0?u:null,props:h}}return Wi.Fragment=l,Wi.jsx=s,Wi.jsxs=s,Wi}var Tm;function hx(){return Tm||(Tm=1,Eu.exports=fx()),Eu.exports}var r=hx(),Cu={exports:{}},ze={};var Em;function px(){if(Em)return ze;Em=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),b=Symbol.iterator;function y(v){return v===null||typeof v!="object"?null:(v=b&&v[b]||v["@@iterator"],typeof v=="function"?v:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,_={};function w(v,R,B){this.props=v,this.context=R,this.refs=_,this.updater=B||O}w.prototype.isReactComponent={},w.prototype.setState=function(v,R){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,R,"setState")},w.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function C(){}C.prototype=w.prototype;function A(v,R,B){this.props=v,this.context=R,this.refs=_,this.updater=B||O}var H=A.prototype=new C;H.constructor=A,N(H,w.prototype),H.isPureReactComponent=!0;var D=Array.isArray;function K(){}var G={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function $(v,R,B){var J=B.ref;return{$$typeof:n,type:v,key:R,ref:J!==void 0?J:null,props:B}}function F(v,R){return $(v.type,R,v.props)}function ne(v){return typeof v=="object"&&v!==null&&v.$$typeof===n}function M(v){var R={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(B){return R[B]})}var q=/\/+/g;function T(v,R){return typeof v=="object"&&v!==null&&v.key!=null?M(""+v.key):R.toString(36)}function Z(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(K,K):(v.status="pending",v.then(function(R){v.status==="pending"&&(v.status="fulfilled",v.value=R)},function(R){v.status==="pending"&&(v.status="rejected",v.reason=R)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function V(v,R,B,J,se){var ge=typeof v;(ge==="undefined"||ge==="boolean")&&(v=null);var Ne=!1;if(v===null)Ne=!0;else switch(ge){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(v.$$typeof){case n:case l:Ne=!0;break;case j:return Ne=v._init,V(Ne(v._payload),R,B,J,se)}}if(Ne)return se=se(v),Ne=J===""?"."+T(v,0):J,D(se)?(B="",Ne!=null&&(B=Ne.replace(q,"$&/")+"/"),V(se,R,B,"",function(je){return je})):se!=null&&(ne(se)&&(se=F(se,B+(se.key==null||v&&v.key===se.key?"":(""+se.key).replace(q,"$&/")+"/")+Ne)),R.push(se)),1;Ne=0;var _e=J===""?".":J+":";if(D(v))for(var ae=0;ae<v.length;ae++)J=v[ae],ge=_e+T(J,ae),Ne+=V(J,R,B,ge,se);else if(ae=y(v),typeof ae=="function")for(v=ae.call(v),ae=0;!(J=v.next()).done;)J=J.value,ge=_e+T(J,ae++),Ne+=V(J,R,B,ge,se);else if(ge==="object"){if(typeof v.then=="function")return V(Z(v),R,B,J,se);throw R=String(v),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function P(v,R,B){if(v==null)return v;var J=[],se=0;return V(v,J,"","",function(ge){return R.call(B,ge,se++)}),J}function X(v){if(v._status===-1){var R=v._result;R=R(),R.then(function(B){(v._status===0||v._status===-1)&&(v._status=1,v._result=B)},function(B){(v._status===0||v._status===-1)&&(v._status=2,v._result=B)}),v._status===-1&&(v._status=0,v._result=R)}if(v._status===1)return v._result.default;throw v._result}var k=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},Y={map:P,forEach:function(v,R,B){P(v,function(){R.apply(this,arguments)},B)},count:function(v){var R=0;return P(v,function(){R++}),R},toArray:function(v){return P(v,function(R){return R})||[]},only:function(v){if(!ne(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return ze.Activity=x,ze.Children=Y,ze.Component=w,ze.Fragment=s,ze.Profiler=u,ze.PureComponent=A,ze.StrictMode=o,ze.Suspense=g,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,ze.__COMPILER_RUNTIME={__proto__:null,c:function(v){return G.H.useMemoCache(v)}},ze.cache=function(v){return function(){return v.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(v,R,B){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var J=N({},v.props),se=v.key;if(R!=null)for(ge in R.key!==void 0&&(se=""+R.key),R)!re.call(R,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&R.ref===void 0||(J[ge]=R[ge]);var ge=arguments.length-2;if(ge===1)J.children=B;else if(1<ge){for(var Ne=Array(ge),_e=0;_e<ge;_e++)Ne[_e]=arguments[_e+2];J.children=Ne}return $(v.type,se,J)},ze.createContext=function(v){return v={$$typeof:f,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:h,_context:v},v},ze.createElement=function(v,R,B){var J,se={},ge=null;if(R!=null)for(J in R.key!==void 0&&(ge=""+R.key),R)re.call(R,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(se[J]=R[J]);var Ne=arguments.length-2;if(Ne===1)se.children=B;else if(1<Ne){for(var _e=Array(Ne),ae=0;ae<Ne;ae++)_e[ae]=arguments[ae+2];se.children=_e}if(v&&v.defaultProps)for(J in Ne=v.defaultProps,Ne)se[J]===void 0&&(se[J]=Ne[J]);return $(v,ge,se)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(v){return{$$typeof:p,render:v}},ze.isValidElement=ne,ze.lazy=function(v){return{$$typeof:j,_payload:{_status:-1,_result:v},_init:X}},ze.memo=function(v,R){return{$$typeof:m,type:v,compare:R===void 0?null:R}},ze.startTransition=function(v){var R=G.T,B={};G.T=B;try{var J=v(),se=G.S;se!==null&&se(B,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(K,k)}catch(ge){k(ge)}finally{R!==null&&B.types!==null&&(R.types=B.types),G.T=R}},ze.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},ze.use=function(v){return G.H.use(v)},ze.useActionState=function(v,R,B){return G.H.useActionState(v,R,B)},ze.useCallback=function(v,R){return G.H.useCallback(v,R)},ze.useContext=function(v){return G.H.useContext(v)},ze.useDebugValue=function(){},ze.useDeferredValue=function(v,R){return G.H.useDeferredValue(v,R)},ze.useEffect=function(v,R){return G.H.useEffect(v,R)},ze.useEffectEvent=function(v){return G.H.useEffectEvent(v)},ze.useId=function(){return G.H.useId()},ze.useImperativeHandle=function(v,R,B){return G.H.useImperativeHandle(v,R,B)},ze.useInsertionEffect=function(v,R){return G.H.useInsertionEffect(v,R)},ze.useLayoutEffect=function(v,R){return G.H.useLayoutEffect(v,R)},ze.useMemo=function(v,R){return G.H.useMemo(v,R)},ze.useOptimistic=function(v,R){return G.H.useOptimistic(v,R)},ze.useReducer=function(v,R,B){return G.H.useReducer(v,R,B)},ze.useRef=function(v){return G.H.useRef(v)},ze.useState=function(v){return G.H.useState(v)},ze.useSyncExternalStore=function(v,R,B){return G.H.useSyncExternalStore(v,R,B)},ze.useTransition=function(){return G.H.useTransition()},ze.version="19.2.8",ze}var Cm;function zd(){return Cm||(Cm=1,Cu.exports=px()),Cu.exports}var I=zd();const ai=tv(I);var Ou={exports:{}},el={},Au={exports:{}},Ru={};var Om;function mx(){return Om||(Om=1,(function(n){function l(V,P){var X=V.length;V.push(P);e:for(;0<X;){var k=X-1>>>1,Y=V[k];if(0<u(Y,P))V[k]=P,V[X]=Y,X=k;else break e}}function s(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var P=V[0],X=V.pop();if(X!==P){V[0]=X;e:for(var k=0,Y=V.length,v=Y>>>1;k<v;){var R=2*(k+1)-1,B=V[R],J=R+1,se=V[J];if(0>u(B,X))J<Y&&0>u(se,B)?(V[k]=se,V[J]=X,k=J):(V[k]=B,V[R]=X,k=R);else if(J<Y&&0>u(se,X))V[k]=se,V[J]=X,k=J;else break e}}return P}function u(V,P){var X=V.sortIndex-P.sortIndex;return X!==0?X:V.id-P.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var g=[],m=[],j=1,x=null,b=3,y=!1,O=!1,N=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function H(V){for(var P=s(m);P!==null;){if(P.callback===null)o(m);else if(P.startTime<=V)o(m),P.sortIndex=P.expirationTime,l(g,P);else break;P=s(m)}}function D(V){if(N=!1,H(V),!O)if(s(g)!==null)O=!0,K||(K=!0,M());else{var P=s(m);P!==null&&Z(D,P.startTime-V)}}var K=!1,G=-1,re=5,$=-1;function F(){return _?!0:!(n.unstable_now()-$<re)}function ne(){if(_=!1,K){var V=n.unstable_now();$=V;var P=!0;try{e:{O=!1,N&&(N=!1,C(G),G=-1),y=!0;var X=b;try{t:{for(H(V),x=s(g);x!==null&&!(x.expirationTime>V&&F());){var k=x.callback;if(typeof k=="function"){x.callback=null,b=x.priorityLevel;var Y=k(x.expirationTime<=V);if(V=n.unstable_now(),typeof Y=="function"){x.callback=Y,H(V),P=!0;break t}x===s(g)&&o(g),H(V)}else o(g);x=s(g)}if(x!==null)P=!0;else{var v=s(m);v!==null&&Z(D,v.startTime-V),P=!1}}break e}finally{x=null,b=X,y=!1}P=void 0}}finally{P?M():K=!1}}}var M;if(typeof A=="function")M=function(){A(ne)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,T=q.port2;q.port1.onmessage=ne,M=function(){T.postMessage(null)}}else M=function(){w(ne,0)};function Z(V,P){G=w(function(){V(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(V){V.callback=null},n.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"):re=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(V){switch(b){case 1:case 2:case 3:var P=3;break;default:P=b}var X=b;b=P;try{return V()}finally{b=X}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(V,P){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var X=b;b=V;try{return P()}finally{b=X}},n.unstable_scheduleCallback=function(V,P,X){var k=n.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?k+X:k):X=k,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=X+Y,V={id:j++,callback:P,priorityLevel:V,startTime:X,expirationTime:Y,sortIndex:-1},X>k?(V.sortIndex=X,l(m,V),s(g)===null&&V===s(m)&&(N?(C(G),G=-1):N=!0,Z(D,X-k))):(V.sortIndex=Y,l(g,V),O||y||(O=!0,K||(K=!0,M()))),V},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(V){var P=b;return function(){var X=b;b=P;try{return V.apply(this,arguments)}finally{b=X}}}})(Ru)),Ru}var Am;function gx(){return Am||(Am=1,Au.exports=mx()),Au.exports}var ku={exports:{}},Yt={};var Rm;function vx(){if(Rm)return Yt;Rm=1;var n=zd();function l(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)m+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(l(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},u=Symbol.for("react.portal");function h(g,m,j){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:g,containerInfo:m,implementation:j}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Yt.createPortal=function(g,m){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return h(g,m,null,j)},Yt.flushSync=function(g){var m=f.T,j=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=m,o.p=j,o.d.f()}},Yt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(g,m))},Yt.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},Yt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var j=m.as,x=p(j,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,y=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;j==="style"?o.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:b,fetchPriority:y}):j==="script"&&o.d.X(g,{crossOrigin:x,integrity:b,fetchPriority:y,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Yt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var j=p(m.as,m.crossOrigin);o.d.M(g,{crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(g)},Yt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var j=m.as,x=p(j,m.crossOrigin);o.d.L(g,j,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Yt.preloadModule=function(g,m){if(typeof g=="string")if(m){var j=p(m.as,m.crossOrigin);o.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(g)},Yt.requestFormReset=function(g){o.d.r(g)},Yt.unstable_batchedUpdates=function(g,m){return g(m)},Yt.useFormState=function(g,m,j){return f.H.useFormState(g,m,j)},Yt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Yt.version="19.2.8",Yt}var km;function yx(){if(km)return ku.exports;km=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),ku.exports=vx(),ku.exports}var Dm;function bx(){if(Dm)return el;Dm=1;var n=gx(),l=zd(),s=yx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a: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 g(e){if(h(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(i=c.return,i!==null){a=i;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return g(c),e;if(d===i)return g(c),t;d=d.sibling}throw Error(o(188))}if(a.return!==i.return)a=c,i=d;else{for(var S=!1,z=c.child;z;){if(z===a){S=!0,a=c,i=d;break}if(z===i){S=!0,i=c,a=d;break}z=z.sibling}if(!S){for(z=d.child;z;){if(z===a){S=!0,a=d,i=c;break}if(z===i){S=!0,i=d,a=c;break}z=z.sibling}if(!S)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),A=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function M(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var q=Symbol.for("react.client.reference");function T(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case w:return"Profiler";case _:return"StrictMode";case D:return"Suspense";case K:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case A:return e.displayName||"Context";case C:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:T(e.type)||"Memo";case re:t=e._payload,e=e._init;try{return T(e(t))}catch{}}return null}var Z=Array.isArray,V=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},k=[],Y=-1;function v(e){return{current:e}}function R(e){0>Y||(e.current=k[Y],k[Y]=null,Y--)}function B(e,t){Y++,k[Y]=e.current,e.current=t}var J=v(null),se=v(null),ge=v(null),Ne=v(null);function _e(e,t){switch(B(ge,t),B(se,e),B(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zp(t),e=Xp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}R(J),B(J,e)}function ae(){R(J),R(se),R(ge)}function je(e){e.memoizedState!==null&&B(Ne,e);var t=J.current,a=Xp(t,e.type);t!==a&&(B(se,e),B(J,a))}function Te(e){se.current===e&&(R(J),R(se)),Ne.current===e&&(R(Ne),Xi._currentValue=X)}var Ge,Me;function E(e){if(Ge===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ge=t&&t[1]||"",Me=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Ge+e+Me}var W=!1;function ie(e,t){if(!e||W)return"";W=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(fe){var de=fe}Reflect.construct(e,[],be)}else{try{be.call()}catch(fe){de=fe}e.call(be.prototype)}}else{try{throw Error()}catch(fe){de=fe}(be=e())&&typeof be.catch=="function"&&be.catch(function(){})}}catch(fe){if(fe&&de&&typeof fe.stack=="string")return[fe.stack,de.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=i.DetermineComponentFrameRoot(),S=d[0],z=d[1];if(S&&z){var Q=S.split(`
4
- `),ue=z.split(`
5
- `);for(c=i=0;i<Q.length&&!Q[i].includes("DetermineComponentFrameRoot");)i++;for(;c<ue.length&&!ue[c].includes("DetermineComponentFrameRoot");)c++;if(i===Q.length||c===ue.length)for(i=Q.length-1,c=ue.length-1;1<=i&&0<=c&&Q[i]!==ue[c];)c--;for(;1<=i&&0<=c;i--,c--)if(Q[i]!==ue[c]){if(i!==1||c!==1)do if(i--,c--,0>c||Q[i]!==ue[c]){var pe=`
6
- `+Q[i].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),pe}while(1<=i&&0<=c);break}}}finally{W=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?E(a):""}function L(e,t){switch(e.tag){case 26:case 27:case 5:return E(e.type);case 16:return E("Lazy");case 13:return e.child!==t&&t!==null?E("Suspense Fallback"):E("Suspense");case 19:return E("SuspenseList");case 0:case 15:return ie(e.type,!1);case 11:return ie(e.type.render,!1);case 1:return ie(e.type,!0);case 31:return E("Activity");default:return""}}function U(e){try{var t="",a=null;do t+=L(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
7
- Error generating stack: `+i.message+`
8
- `+i.stack}}var ee=Object.prototype.hasOwnProperty,me=n.unstable_scheduleCallback,he=n.unstable_cancelCallback,le=n.unstable_shouldYield,Se=n.unstable_requestPaint,we=n.unstable_now,xe=n.unstable_getCurrentPriorityLevel,Ce=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,De=n.unstable_NormalPriority,jt=n.unstable_LowPriority,wt=n.unstable_IdlePriority,_t=n.log,Jt=n.unstable_setDisableYieldValue,Qe=null,gt=null;function Je(e){if(typeof _t=="function"&&Jt(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Qe,e)}catch{}}var $e=Math.clz32?Math.clz32:Xe,nt=Math.log,Bt=Math.LN2;function Xe(e){return e>>>=0,e===0?32:31-(nt(e)/Bt|0)|0}var ut=256,dt=262144,Zt=4194304;function lt(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 Xt(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var c=0,d=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var z=i&134217727;return z!==0?(i=z&~d,i!==0?c=lt(i):(S&=z,S!==0?c=lt(S):a||(a=z&~e,a!==0&&(c=lt(a))))):(z=i&~d,z!==0?c=lt(z):S!==0?c=lt(S):a||(a=i&~e,a!==0&&(c=lt(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function bt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yt(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 mn(){var e=Zt;return Zt<<=1,(Zt&62914560)===0&&(Zt=4194304),e}function fa(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function He(e,t,a,i,c,d){var S=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var z=e.entanglements,Q=e.expirationTimes,ue=e.hiddenUpdates;for(a=S&~a;0<a;){var pe=31-$e(a),be=1<<pe;z[pe]=0,Q[pe]=-1;var de=ue[pe];if(de!==null)for(ue[pe]=null,pe=0;pe<de.length;pe++){var fe=de[pe];fe!==null&&(fe.lane&=-536870913)}a&=~be}i!==0&&Ie(e,i,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(S&~t))}function Ie(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-$e(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function El(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-$e(a),c=1<<i;c&t|e[i]&t&&(e[i]|=t),a&=~c}}function On(e,t){var a=t&-t;return a=(a&42)!==0?1:pr(a),(a&(e.suspendedLanes|t))!==0?0:a}function pr(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 mr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function oi(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:ym(e.type))}function gr(e,t){var a=P.p;try{return P.p=e,t()}finally{P.p=a}}var gn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+gn,At="__reactProps$"+gn,An="__reactContainer$"+gn,ci="__reactEvents$"+gn,bo="__reactListeners$"+gn,xo="__reactHandles$"+gn,vr="__reactResources$"+gn,Va="__reactMarker$"+gn;function ui(e){delete e[Nt],delete e[At],delete e[ci],delete e[bo],delete e[xo]}function vn(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[An]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=nm(e);e!==null;){if(a=e[Nt])return a;e=nm(e)}return t}e=a,a=e.parentNode}return null}function Mn(e){if(e=e[Nt]||e[An]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ha(e){var t=e[vr];return t||(t=e[vr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Va]=!0}var di=new Set,Cl={};function Pn(e,t){Bn(e,t),Bn(e+"Capture",t)}function Bn(e,t){for(Cl[e]=t,e=0;e<t.length;e++)di.add(t[e])}var Ol=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]*$"),Al={},Rl={};function So(e){return ee.call(Rl,e)?!0:ee.call(Al,e)?!1:Ol.test(e)?Rl[e]=!0:(Al[e]=!0,!1)}function ye(e,t,a){if(So(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){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,""+a)}}function Ae(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function qe(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function Ke(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ht(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tt(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,d=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(S){a=""+S,d.call(this,S)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(S){a=""+S},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $n(e){if(!e._valueTracker){var t=Ht(e)?"checked":"value";e._valueTracker=Tt(e,t,""+e[t])}}function kl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=Ht(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function yr(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 jo=/[\n"\\]/g;function kt(e){return e.replace(jo,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ya(e,t,a,i,c,d,S,z){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),t!=null?S==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ke(t)):e.value!==""+Ke(t)&&(e.value=""+Ke(t)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),t!=null?Wt(e,S,Ke(t)):a!=null?Wt(e,S,Ke(a)):i!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?e.name=""+Ke(z):e.removeAttribute("name")}function Fa(e,t,a,i,c,d,S,z){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){$n(e);return}a=a!=null?""+Ke(a):"",t=t!=null?""+Ke(t):a,z||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=z?e.checked:!!i,e.defaultChecked=!!i,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),$n(e)}function Wt(e,t,a){t==="number"&&yr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function pa(e,t,a,i){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&i&&(e[a].defaultSelected=!0)}else{for(a=""+Ke(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Dl(e,t,a){if(t!=null&&(t=""+Ke(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ke(a):""}function Id(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if(Z(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=Ke(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),$n(e)}function br(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var sy=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 Vd(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||sy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Yd(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&a[c]!==i&&Vd(e,c,i)}else for(var d in t)t.hasOwnProperty(d)&&Vd(e,d,t[d])}function wo(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 oy=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"]]),cy=/^[\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 zl(e){return cy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var _o=null;function No(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xr=null,Sr=null;function Fd(e){var t=Mn(e);if(t&&(e=t.stateNode)){var a=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ya(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var c=i[At]||null;if(!c)throw Error(o(90));Ya(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&kl(i)}break e;case"textarea":Dl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&pa(e,!!a.multiple,t,!1)}}}var To=!1;function Pd(e,t,a){if(To)return e(t,a);To=!0;try{var i=e(t);return i}finally{if(To=!1,(xr!==null||Sr!==null)&&(Ss(),xr&&(t=xr,e=Sr,Sr=xr=null,Fd(t),e)))for(t=0;t<e.length;t++)Fd(e[t])}}function fi(e,t){var a=e.stateNode;if(a===null)return null;var i=a[At]||null;if(i===null)return null;a=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(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eo=!1;if(Xn)try{var hi={};Object.defineProperty(hi,"passive",{get:function(){Eo=!0}}),window.addEventListener("test",hi,hi),window.removeEventListener("test",hi,hi)}catch{Eo=!1}var ma=null,Co=null,Ul=null;function Zd(){if(Ul)return Ul;var e,t=Co,a=t.length,i,c="value"in ma?ma.value:ma.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var S=a-e;for(i=1;i<=S&&t[a-i]===c[d-i];i++);return Ul=c.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 Ml(){return!0}function Xd(){return!1}function en(e){function t(a,i,c,d,S){this._reactName=a,this._targetInst=c,this.type=i,this.nativeEvent=d,this.target=S,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(a=e[z],this[z]=a?a(d):d[z]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ml:Xd,this.isPropagationStopped=Xd,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ml)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ml)},persist:function(){},isPersistent:Ml}),t}var Pa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bl=en(Pa),pi=x({},Pa,{view:0,detail:0}),uy=en(pi),Oo,Ao,mi,$l=x({},pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ko,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!==mi&&(mi&&e.type==="mousemove"?(Oo=e.screenX-mi.screenX,Ao=e.screenY-mi.screenY):Ao=Oo=0,mi=e),Oo)},movementY:function(e){return"movementY"in e?e.movementY:Ao}}),Kd=en($l),dy=x({},$l,{dataTransfer:0}),fy=en(dy),hy=x({},pi,{relatedTarget:0}),Ro=en(hy),py=x({},Pa,{animationName:0,elapsedTime:0,pseudoElement:0}),my=en(py),gy=x({},Pa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vy=en(gy),yy=x({},Pa,{data:0}),Qd=en(yy),by={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xy={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"},Sy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sy[e])?!!t[e]:!1}function ko(){return jy}var wy=x({},pi,{key:function(e){if(e.key){var t=by[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"?xy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ko,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}}),_y=en(wy),Ny=x({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jd=en(Ny),Ty=x({},pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ko}),Ey=en(Ty),Cy=x({},Pa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Oy=en(Cy),Ay=x({},$l,{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}),Ry=en(Ay),ky=x({},Pa,{newState:0,oldState:0}),Dy=en(ky),zy=[9,13,27,32],Do=Xn&&"CompositionEvent"in window,gi=null;Xn&&"documentMode"in document&&(gi=document.documentMode);var Uy=Xn&&"TextEvent"in window&&!gi,Wd=Xn&&(!Do||gi&&8<gi&&11>=gi),ef=" ",tf=!1;function nf(e,t){switch(e){case"keyup":return zy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function af(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Ly(e,t){switch(e){case"compositionend":return af(t);case"keypress":return t.which!==32?null:(tf=!0,ef);case"textInput":return e=t.data,e===ef&&tf?null:e;default:return null}}function My(e,t){if(jr)return e==="compositionend"||!Do&&nf(e,t)?(e=Zd(),Ul=Co=ma=null,jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wd&&t.locale!=="ko"?null:t.data;default:return null}}var By={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 rf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!By[e.type]:t==="textarea"}function lf(e,t,a,i){xr?Sr?Sr.push(i):Sr=[i]:xr=i,t=Cs(t,"onChange"),0<t.length&&(a=new Bl("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var vi=null,yi=null;function $y(e){Gp(e,0)}function Hl(e){var t=Fn(e);if(kl(t))return e}function sf(e,t){if(e==="change")return t}var of=!1;if(Xn){var zo;if(Xn){var Uo="oninput"in document;if(!Uo){var cf=document.createElement("div");cf.setAttribute("oninput","return;"),Uo=typeof cf.oninput=="function"}zo=Uo}else zo=!1;of=zo&&(!document.documentMode||9<document.documentMode)}function uf(){vi&&(vi.detachEvent("onpropertychange",df),yi=vi=null)}function df(e){if(e.propertyName==="value"&&Hl(yi)){var t=[];lf(t,yi,e,No(e)),Pd($y,t)}}function Hy(e,t,a){e==="focusin"?(uf(),vi=t,yi=a,vi.attachEvent("onpropertychange",df)):e==="focusout"&&uf()}function qy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hl(yi)}function Gy(e,t){if(e==="click")return Hl(t)}function Iy(e,t){if(e==="input"||e==="change")return Hl(t)}function Vy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sn=typeof Object.is=="function"?Object.is:Vy;function bi(e,t){if(sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var c=a[i];if(!ee.call(t,c)||!sn(e[c],t[c]))return!1}return!0}function ff(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hf(e,t){var a=ff(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ff(a)}}function pf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=yr(e.document)}return t}function Lo(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 Yy=Xn&&"documentMode"in document&&11>=document.documentMode,wr=null,Mo=null,xi=null,Bo=!1;function gf(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Bo||wr==null||wr!==yr(i)||(i=wr,"selectionStart"in i&&Lo(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}),xi&&bi(xi,i)||(xi=i,i=Cs(Mo,"onSelect"),0<i.length&&(t=new Bl("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=wr)))}function Za(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var _r={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},$o={},vf={};Xn&&(vf=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function Xa(e){if($o[e])return $o[e];if(!_r[e])return e;var t=_r[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in vf)return $o[e]=t[a];return e}var yf=Xa("animationend"),bf=Xa("animationiteration"),xf=Xa("animationstart"),Fy=Xa("transitionrun"),Py=Xa("transitionstart"),Zy=Xa("transitioncancel"),Sf=Xa("transitionend"),jf=new Map,Ho="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(" ");Ho.push("scrollEnd");function Rn(e,t){jf.set(e,t),Pn(t,[e])}var ql=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)},yn=[],Nr=0,qo=0;function Gl(){for(var e=Nr,t=qo=Nr=0;t<e;){var a=yn[t];yn[t++]=null;var i=yn[t];yn[t++]=null;var c=yn[t];yn[t++]=null;var d=yn[t];if(yn[t++]=null,i!==null&&c!==null){var S=i.pending;S===null?c.next=c:(c.next=S.next,S.next=c),i.pending=c}d!==0&&wf(a,c,d)}}function Il(e,t,a,i){yn[Nr++]=e,yn[Nr++]=t,yn[Nr++]=a,yn[Nr++]=i,qo|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Go(e,t,a,i){return Il(e,t,a,i),Vl(e)}function Ka(e,t){return Il(e,null,null,t),Vl(e)}function wf(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,i=d.alternate,i!==null&&(i.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-$e(a),e=d.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=a|536870912),d):null}function Vl(e){if(50<Gi)throw Gi=0,Qc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Tr={};function Xy(e,t,a,i){this.tag=e,this.key=a,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,a,i){return new Xy(e,t,a,i)}function Io(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kn(e,t){var a=e.alternate;return a===null?(a=on(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function _f(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Yl(e,t,a,i,c,d){var S=0;if(i=e,typeof e=="function")Io(e)&&(S=1);else if(typeof e=="string")S=ex(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=on(31,a,t,c),e.elementType=$,e.lanes=d,e;case N:return Qa(a.children,c,d,t);case _:S=8,c|=24;break;case w:return e=on(12,a,t,c|2),e.elementType=w,e.lanes=d,e;case D:return e=on(13,a,t,c),e.elementType=D,e.lanes=d,e;case K:return e=on(19,a,t,c),e.elementType=K,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:S=10;break e;case C:S=9;break e;case H:S=11;break e;case G:S=14;break e;case re:S=16,i=null;break e}S=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=on(S,a,t,c),t.elementType=e,t.type=i,t.lanes=d,t}function Qa(e,t,a,i){return e=on(7,e,i,t),e.lanes=a,e}function Vo(e,t,a){return e=on(6,e,null,t),e.lanes=a,e}function Nf(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Yo(e,t,a){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Tf=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var a=Tf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:U(t)},Tf.set(e,t),t)}return{value:e,source:t,stack:U(t)}}var Er=[],Cr=0,Fl=null,Si=0,xn=[],Sn=0,ga=null,Hn=1,qn="";function Qn(e,t){Er[Cr++]=Si,Er[Cr++]=Fl,Fl=e,Si=t}function Ef(e,t,a){xn[Sn++]=Hn,xn[Sn++]=qn,xn[Sn++]=ga,ga=e;var i=Hn;e=qn;var c=32-$e(i)-1;i&=~(1<<c),a+=1;var d=32-$e(t)+c;if(30<d){var S=c-c%5;d=(i&(1<<S)-1).toString(32),i>>=S,c-=S,Hn=1<<32-$e(t)+c|a<<c|i,qn=d+e}else Hn=1<<d|a<<c|i,qn=e}function Fo(e){e.return!==null&&(Qn(e,1),Ef(e,1,0))}function Po(e){for(;e===Fl;)Fl=Er[--Cr],Er[Cr]=null,Si=Er[--Cr],Er[Cr]=null;for(;e===ga;)ga=xn[--Sn],xn[Sn]=null,qn=xn[--Sn],xn[Sn]=null,Hn=xn[--Sn],xn[Sn]=null}function Cf(e,t){xn[Sn++]=Hn,xn[Sn++]=qn,xn[Sn++]=ga,Hn=t.id,qn=t.overflow,ga=e}var qt=null,ht=null,Ze=!1,va=null,jn=!1,Zo=Error(o(519));function ya(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ji(bn(t,e)),Zo}function Of(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Nt]=e,t[At]=i,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<Vi.length;a++)Ye(Vi[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),Fa(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),Id(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||Fp(t.textContent,a)?(i.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),i.onScroll!=null&&Ye("scroll",t),i.onScrollEnd!=null&&Ye("scrollend",t),i.onClick!=null&&(t.onclick=Zn),t=!0):t=!1,t||ya(e,!0)}function Af(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:qt=qt.return}}function Or(e){if(e!==qt)return!1;if(!Ze)return Af(e),Ze=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||fu(e.type,e.memoizedProps)),a=!a),a&&ht&&ya(e),Af(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=tm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=tm(e)}else t===27?(t=ht,ka(e.type)?(e=vu,vu=null,ht=e):ht=t):ht=qt?_n(e.stateNode.nextSibling):null;return!0}function Ja(){ht=qt=null,Ze=!1}function Xo(){var e=va;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),va=null),e}function ji(e){va===null?va=[e]:va.push(e)}var Ko=v(null),Wa=null,Jn=null;function ba(e,t,a){B(Ko,t._currentValue),t._currentValue=a}function Wn(e){e._currentValue=Ko.current,R(Ko)}function Qo(e,t,a){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===a)break;e=e.return}}function Jo(e,t,a,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var S=c.child;d=d.firstContext;e:for(;d!==null;){var z=d;d=c;for(var Q=0;Q<t.length;Q++)if(z.context===t[Q]){d.lanes|=a,z=d.alternate,z!==null&&(z.lanes|=a),Qo(d.return,a,e),i||(S=null);break e}d=z.next}}else if(c.tag===18){if(S=c.return,S===null)throw Error(o(341));S.lanes|=a,d=S.alternate,d!==null&&(d.lanes|=a),Qo(S,a,e),S=null}else S=c.child;if(S!==null)S.return=c;else for(S=c;S!==null;){if(S===e){S=null;break}if(c=S.sibling,c!==null){c.return=S.return,S=c;break}S=S.return}c=S}}function Ar(e,t,a,i){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var S=c.alternate;if(S===null)throw Error(o(387));if(S=S.memoizedProps,S!==null){var z=c.type;sn(c.pendingProps.value,S.value)||(e!==null?e.push(z):e=[z])}}else if(c===Ne.current){if(S=c.alternate,S===null)throw Error(o(387));S.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Xi):e=[Xi])}c=c.return}e!==null&&Jo(t,e,a,i),t.flags|=262144}function Pl(e){for(e=e.firstContext;e!==null;){if(!sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function er(e){Wa=e,Jn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return Rf(Wa,e)}function Zl(e,t){return Wa===null&&er(e),Rf(e,t)}function Rf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Jn===null){if(e===null)throw Error(o(308));Jn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jn=Jn.next=t;return a}var Ky=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Qy=n.unstable_scheduleCallback,Jy=n.unstable_NormalPriority,Dt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wo(){return{controller:new Ky,data:new Map,refCount:0}}function wi(e){e.refCount--,e.refCount===0&&Qy(Jy,function(){e.controller.abort()})}var _i=null,ec=0,Rr=0,kr=null;function Wy(e,t){if(_i===null){var a=_i=[];ec=0,Rr=au(),kr={status:"pending",value:void 0,then:function(i){a.push(i)}}}return ec++,t.then(kf,kf),t}function kf(){if(--ec===0&&_i!==null){kr!==null&&(kr.status="fulfilled");var e=_i;_i=null,Rr=0,kr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eb(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),i}var Df=V.S;V.S=function(e,t){gp=we(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wy(e,t),Df!==null&&Df(e,t)};var tr=v(null);function tc(){var e=tr.current;return e!==null?e:ft.pooledCache}function Xl(e,t){t===null?B(tr,tr.current):B(tr,t.pool)}function zf(){var e=tc();return e===null?null:{parent:Dt._currentValue,pool:e}}var Dr=Error(o(460)),nc=Error(o(474)),Kl=Error(o(542)),Ql={then:function(){}};function Uf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zn,Zn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bf(e),e;default:if(typeof t.status=="string")t.then(Zn,Zn);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bf(e),e}throw ar=t,Dr}}function nr(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ar=a,Dr):a}}var ar=null;function Mf(){if(ar===null)throw Error(o(459));var e=ar;return ar=null,e}function Bf(e){if(e===Dr||e===Kl)throw Error(o(483))}var zr=null,Ni=0;function Jl(e){var t=Ni;return Ni+=1,zr===null&&(zr=[]),Lf(zr,e,t)}function Ti(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Wl(e,t){throw t.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $f(e){function t(oe,te){if(e){var ce=oe.deletions;ce===null?(oe.deletions=[te],oe.flags|=16):ce.push(te)}}function a(oe,te){if(!e)return null;for(;te!==null;)t(oe,te),te=te.sibling;return null}function i(oe){for(var te=new Map;oe!==null;)oe.key!==null?te.set(oe.key,oe):te.set(oe.index,oe),oe=oe.sibling;return te}function c(oe,te){return oe=Kn(oe,te),oe.index=0,oe.sibling=null,oe}function d(oe,te,ce){return oe.index=ce,e?(ce=oe.alternate,ce!==null?(ce=ce.index,ce<te?(oe.flags|=67108866,te):ce):(oe.flags|=67108866,te)):(oe.flags|=1048576,te)}function S(oe){return e&&oe.alternate===null&&(oe.flags|=67108866),oe}function z(oe,te,ce,ve){return te===null||te.tag!==6?(te=Vo(ce,oe.mode,ve),te.return=oe,te):(te=c(te,ce),te.return=oe,te)}function Q(oe,te,ce,ve){var Re=ce.type;return Re===N?pe(oe,te,ce.props.children,ve,ce.key):te!==null&&(te.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===re&&nr(Re)===te.type)?(te=c(te,ce.props),Ti(te,ce),te.return=oe,te):(te=Yl(ce.type,ce.key,ce.props,null,oe.mode,ve),Ti(te,ce),te.return=oe,te)}function ue(oe,te,ce,ve){return te===null||te.tag!==4||te.stateNode.containerInfo!==ce.containerInfo||te.stateNode.implementation!==ce.implementation?(te=Yo(ce,oe.mode,ve),te.return=oe,te):(te=c(te,ce.children||[]),te.return=oe,te)}function pe(oe,te,ce,ve,Re){return te===null||te.tag!==7?(te=Qa(ce,oe.mode,ve,Re),te.return=oe,te):(te=c(te,ce),te.return=oe,te)}function be(oe,te,ce){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Vo(""+te,oe.mode,ce),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return ce=Yl(te.type,te.key,te.props,null,oe.mode,ce),Ti(ce,te),ce.return=oe,ce;case O:return te=Yo(te,oe.mode,ce),te.return=oe,te;case re:return te=nr(te),be(oe,te,ce)}if(Z(te)||M(te))return te=Qa(te,oe.mode,ce,null),te.return=oe,te;if(typeof te.then=="function")return be(oe,Jl(te),ce);if(te.$$typeof===A)return be(oe,Zl(oe,te),ce);Wl(oe,te)}return null}function de(oe,te,ce,ve){var Re=te!==null?te.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Re!==null?null:z(oe,te,""+ce,ve);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return ce.key===Re?Q(oe,te,ce,ve):null;case O:return ce.key===Re?ue(oe,te,ce,ve):null;case re:return ce=nr(ce),de(oe,te,ce,ve)}if(Z(ce)||M(ce))return Re!==null?null:pe(oe,te,ce,ve,null);if(typeof ce.then=="function")return de(oe,te,Jl(ce),ve);if(ce.$$typeof===A)return de(oe,te,Zl(oe,ce),ve);Wl(oe,ce)}return null}function fe(oe,te,ce,ve,Re){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return oe=oe.get(ce)||null,z(te,oe,""+ve,Re);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case y:return oe=oe.get(ve.key===null?ce:ve.key)||null,Q(te,oe,ve,Re);case O:return oe=oe.get(ve.key===null?ce:ve.key)||null,ue(te,oe,ve,Re);case re:return ve=nr(ve),fe(oe,te,ce,ve,Re)}if(Z(ve)||M(ve))return oe=oe.get(ce)||null,pe(te,oe,ve,Re,null);if(typeof ve.then=="function")return fe(oe,te,ce,Jl(ve),Re);if(ve.$$typeof===A)return fe(oe,te,ce,Zl(te,ve),Re);Wl(te,ve)}return null}function Ee(oe,te,ce,ve){for(var Re=null,We=null,Oe=te,Le=te=0,Pe=null;Oe!==null&&Le<ce.length;Le++){Oe.index>Le?(Pe=Oe,Oe=null):Pe=Oe.sibling;var et=de(oe,Oe,ce[Le],ve);if(et===null){Oe===null&&(Oe=Pe);break}e&&Oe&&et.alternate===null&&t(oe,Oe),te=d(et,te,Le),We===null?Re=et:We.sibling=et,We=et,Oe=Pe}if(Le===ce.length)return a(oe,Oe),Ze&&Qn(oe,Le),Re;if(Oe===null){for(;Le<ce.length;Le++)Oe=be(oe,ce[Le],ve),Oe!==null&&(te=d(Oe,te,Le),We===null?Re=Oe:We.sibling=Oe,We=Oe);return Ze&&Qn(oe,Le),Re}for(Oe=i(Oe);Le<ce.length;Le++)Pe=fe(Oe,oe,Le,ce[Le],ve),Pe!==null&&(e&&Pe.alternate!==null&&Oe.delete(Pe.key===null?Le:Pe.key),te=d(Pe,te,Le),We===null?Re=Pe:We.sibling=Pe,We=Pe);return e&&Oe.forEach(function(Ma){return t(oe,Ma)}),Ze&&Qn(oe,Le),Re}function ke(oe,te,ce,ve){if(ce==null)throw Error(o(151));for(var Re=null,We=null,Oe=te,Le=te=0,Pe=null,et=ce.next();Oe!==null&&!et.done;Le++,et=ce.next()){Oe.index>Le?(Pe=Oe,Oe=null):Pe=Oe.sibling;var Ma=de(oe,Oe,et.value,ve);if(Ma===null){Oe===null&&(Oe=Pe);break}e&&Oe&&Ma.alternate===null&&t(oe,Oe),te=d(Ma,te,Le),We===null?Re=Ma:We.sibling=Ma,We=Ma,Oe=Pe}if(et.done)return a(oe,Oe),Ze&&Qn(oe,Le),Re;if(Oe===null){for(;!et.done;Le++,et=ce.next())et=be(oe,et.value,ve),et!==null&&(te=d(et,te,Le),We===null?Re=et:We.sibling=et,We=et);return Ze&&Qn(oe,Le),Re}for(Oe=i(Oe);!et.done;Le++,et=ce.next())et=fe(Oe,oe,Le,et.value,ve),et!==null&&(e&&et.alternate!==null&&Oe.delete(et.key===null?Le:et.key),te=d(et,te,Le),We===null?Re=et:We.sibling=et,We=et);return e&&Oe.forEach(function(dx){return t(oe,dx)}),Ze&&Qn(oe,Le),Re}function ct(oe,te,ce,ve){if(typeof ce=="object"&&ce!==null&&ce.type===N&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:e:{for(var Re=ce.key;te!==null;){if(te.key===Re){if(Re=ce.type,Re===N){if(te.tag===7){a(oe,te.sibling),ve=c(te,ce.props.children),ve.return=oe,oe=ve;break e}}else if(te.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===re&&nr(Re)===te.type){a(oe,te.sibling),ve=c(te,ce.props),Ti(ve,ce),ve.return=oe,oe=ve;break e}a(oe,te);break}else t(oe,te);te=te.sibling}ce.type===N?(ve=Qa(ce.props.children,oe.mode,ve,ce.key),ve.return=oe,oe=ve):(ve=Yl(ce.type,ce.key,ce.props,null,oe.mode,ve),Ti(ve,ce),ve.return=oe,oe=ve)}return S(oe);case O:e:{for(Re=ce.key;te!==null;){if(te.key===Re)if(te.tag===4&&te.stateNode.containerInfo===ce.containerInfo&&te.stateNode.implementation===ce.implementation){a(oe,te.sibling),ve=c(te,ce.children||[]),ve.return=oe,oe=ve;break e}else{a(oe,te);break}else t(oe,te);te=te.sibling}ve=Yo(ce,oe.mode,ve),ve.return=oe,oe=ve}return S(oe);case re:return ce=nr(ce),ct(oe,te,ce,ve)}if(Z(ce))return Ee(oe,te,ce,ve);if(M(ce)){if(Re=M(ce),typeof Re!="function")throw Error(o(150));return ce=Re.call(ce),ke(oe,te,ce,ve)}if(typeof ce.then=="function")return ct(oe,te,Jl(ce),ve);if(ce.$$typeof===A)return ct(oe,te,Zl(oe,ce),ve);Wl(oe,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,te!==null&&te.tag===6?(a(oe,te.sibling),ve=c(te,ce),ve.return=oe,oe=ve):(a(oe,te),ve=Vo(ce,oe.mode,ve),ve.return=oe,oe=ve),S(oe)):a(oe,te)}return function(oe,te,ce,ve){try{Ni=0;var Re=ct(oe,te,ce,ve);return zr=null,Re}catch(Oe){if(Oe===Dr||Oe===Kl)throw Oe;var We=on(29,Oe,null,oe.mode);return We.lanes=ve,We.return=oe,We}}}var rr=$f(!0),Hf=$f(!1),xa=!1;function ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rc(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 Sa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(tt&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Vl(e),wf(e,null,a),t}return Il(e,i,t,a),Vl(e)}function Ei(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,El(e,a)}}function ic(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=S:d=d.next=S,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var lc=!1;function Ci(){if(lc){var e=kr;if(e!==null)throw e}}function Oi(e,t,a,i){lc=!1;var c=e.updateQueue;xa=!1;var d=c.firstBaseUpdate,S=c.lastBaseUpdate,z=c.shared.pending;if(z!==null){c.shared.pending=null;var Q=z,ue=Q.next;Q.next=null,S===null?d=ue:S.next=ue,S=Q;var pe=e.alternate;pe!==null&&(pe=pe.updateQueue,z=pe.lastBaseUpdate,z!==S&&(z===null?pe.firstBaseUpdate=ue:z.next=ue,pe.lastBaseUpdate=Q))}if(d!==null){var be=c.baseState;S=0,pe=ue=Q=null,z=d;do{var de=z.lane&-536870913,fe=de!==z.lane;if(fe?(Fe&de)===de:(i&de)===de){de!==0&&de===Rr&&(lc=!0),pe!==null&&(pe=pe.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Ee=e,ke=z;de=t;var ct=a;switch(ke.tag){case 1:if(Ee=ke.payload,typeof Ee=="function"){be=Ee.call(ct,be,de);break e}be=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=ke.payload,de=typeof Ee=="function"?Ee.call(ct,be,de):Ee,de==null)break e;be=x({},be,de);break e;case 2:xa=!0}}de=z.callback,de!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=c.callbacks,fe===null?c.callbacks=[de]:fe.push(de))}else fe={lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},pe===null?(ue=pe=fe,Q=be):pe=pe.next=fe,S|=de;if(z=z.next,z===null){if(z=c.shared.pending,z===null)break;fe=z,z=fe.next,fe.next=null,c.lastBaseUpdate=fe,c.shared.pending=null}}while(!0);pe===null&&(Q=be),c.baseState=Q,c.firstBaseUpdate=ue,c.lastBaseUpdate=pe,d===null&&(c.shared.lanes=0),Ea|=S,e.lanes=S,e.memoizedState=be}}function qf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Gf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)qf(a[e],t)}var Ur=v(null),es=v(0);function If(e,t){e=oa,B(es,e),B(Ur,t),oa=e|t.baseLanes}function sc(){B(es,oa),B(Ur,Ur.current)}function oc(){oa=es.current,R(Ur),R(es)}var cn=v(null),wn=null;function wa(e){var t=e.alternate;B(Et,Et.current&1),B(cn,e),wn===null&&(t===null||Ur.current!==null||t.memoizedState!==null)&&(wn=e)}function cc(e){B(Et,Et.current),B(cn,e),wn===null&&(wn=e)}function Vf(e){e.tag===22?(B(Et,Et.current),B(cn,e),wn===null&&(wn=e)):_a()}function _a(){B(Et,Et.current),B(cn,cn.current)}function un(e){R(cn),wn===e&&(wn=null),R(Et)}var Et=v(0);function ts(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mu(a)||gu(a)))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 ea=0,Ue=null,st=null,zt=null,ns=!1,Lr=!1,ir=!1,as=0,Ai=0,Mr=null,tb=0;function xt(){throw Error(o(321))}function uc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!sn(e[a],t[a]))return!1;return!0}function dc(e,t,a,i,c,d){return ea=d,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?Eh:Tc,ir=!1,d=a(i,c),ir=!1,Lr&&(d=Ff(t,a,i,c)),Yf(e),d}function Yf(e){V.H=Di;var t=st!==null&&st.next!==null;if(ea=0,zt=st=Ue=null,ns=!1,Ai=0,Mr=null,t)throw Error(o(300));e===null||Ut||(e=e.dependencies,e!==null&&Pl(e)&&(Ut=!0))}function Ff(e,t,a,i){Ue=e;var c=0;do{if(Lr&&(Mr=null),Ai=0,Lr=!1,25<=c)throw Error(o(301));if(c+=1,zt=st=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}V.H=Ch,d=t(a,i)}while(Lr);return d}function nb(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?Ri(t):t,e=e.useState()[0],(st!==null?st.memoizedState:null)!==e&&(Ue.flags|=1024),t}function fc(){var e=as!==0;return as=0,e}function hc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function pc(e){if(ns){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ns=!1}ea=0,zt=st=Ue=null,Lr=!1,Ai=as=0,Mr=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Ue.memoizedState=zt=e:zt=zt.next=e,zt}function Ct(){if(st===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=zt===null?Ue.memoizedState:zt.next;if(t!==null)zt=t,st=e;else{if(e===null)throw Ue.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},zt===null?Ue.memoizedState=zt=e:zt=zt.next=e}return zt}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ri(e){var t=Ai;return Ai+=1,Mr===null&&(Mr=[]),e=Lf(Mr,e,t),t=Ue,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?Eh:Tc),e}function is(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ri(e);if(e.$$typeof===A)return Gt(e)}throw Error(o(438,String(e)))}function mc(e){var t=null,a=Ue.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Ue.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=rs(),Ue.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=F;return t.index++,a}function ta(e,t){return typeof t=="function"?t(e):t}function ls(e){var t=Ct();return gc(t,st,e)}function gc(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var c=e.baseQueue,d=i.pending;if(d!==null){if(c!==null){var S=c.next;c.next=d.next,d.next=S}t.baseQueue=c=d,i.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var z=S=null,Q=null,ue=t,pe=!1;do{var be=ue.lane&-536870913;if(be!==ue.lane?(Fe&be)===be:(ea&be)===be){var de=ue.revertLane;if(de===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),be===Rr&&(pe=!0);else if((ea&de)===de){ue=ue.next,de===Rr&&(pe=!0);continue}else be={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(z=Q=be,S=d):Q=Q.next=be,Ue.lanes|=de,Ea|=de;be=ue.action,ir&&a(d,be),d=ue.hasEagerState?ue.eagerState:a(d,be)}else de={lane:be,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(z=Q=de,S=d):Q=Q.next=de,Ue.lanes|=be,Ea|=be;ue=ue.next}while(ue!==null&&ue!==t);if(Q===null?S=d:Q.next=z,!sn(d,e.memoizedState)&&(Ut=!0,pe&&(a=kr,a!==null)))throw a;e.memoizedState=d,e.baseState=S,e.baseQueue=Q,i.lastRenderedState=d}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function vc(e){var t=Ct(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var S=c=c.next;do d=e(d,S.action),S=S.next;while(S!==c);sn(d,t.memoizedState)||(Ut=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,i]}function Pf(e,t,a){var i=Ue,c=Ct(),d=Ze;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var S=!sn((st||c).memoizedState,a);if(S&&(c.memoizedState=a,Ut=!0),c=c.queue,xc(Kf.bind(null,i,c,e),[e]),c.getSnapshot!==t||S||zt!==null&&zt.memoizedState.tag&1){if(i.flags|=2048,Br(9,{destroy:void 0},Xf.bind(null,i,c,a,t),null),ft===null)throw Error(o(349));d||(ea&127)!==0||Zf(i,t,a)}return a}function Zf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ue.updateQueue,t===null?(t=rs(),Ue.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Xf(e,t,a,i){t.value=a,t.getSnapshot=i,Qf(t)&&Jf(e)}function Kf(e,t,a){return a(function(){Qf(t)&&Jf(e)})}function Qf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!sn(e,a)}catch{return!0}}function Jf(e){var t=Ka(e,2);t!==null&&ln(t,e,2)}function yc(e){var t=Kt();if(typeof e=="function"){var a=e;if(e=a(),ir){Je(!0);try{a()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e},t}function Wf(e,t,a,i){return e.baseState=a,gc(e,st,typeof i=="function"?i:ta)}function ab(e,t,a,i,c){if(cs(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){d.listeners.push(S)}};V.T!==null?a(!0):d.isTransition=!1,i(d),a=t.pending,a===null?(d.next=t.pending=d,eh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function eh(e,t){var a=t.action,i=t.payload,c=e.state;if(t.isTransition){var d=V.T,S={};V.T=S;try{var z=a(c,i),Q=V.S;Q!==null&&Q(S,z),th(e,t,z)}catch(ue){bc(e,t,ue)}finally{d!==null&&S.types!==null&&(d.types=S.types),V.T=d}}else try{d=a(c,i),th(e,t,d)}catch(ue){bc(e,t,ue)}}function th(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){nh(e,t,i)},function(i){return bc(e,t,i)}):nh(e,t,a)}function nh(e,t,a){t.status="fulfilled",t.value=a,ah(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,eh(e,a)))}function bc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,ah(t),t=t.next;while(t!==i)}e.action=null}function ah(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rh(e,t){return t}function ih(e,t){if(Ze){var a=ft.formState;if(a!==null){e:{var i=Ue;if(Ze){if(ht){t:{for(var c=ht,d=jn;c.nodeType!==8;){if(!d){c=null;break t}if(c=_n(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){ht=_n(c.nextSibling),i=c.data==="F!";break e}}ya(i)}i=!1}i&&(t=a[0])}}return a=Kt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rh,lastRenderedState:t},a.queue=i,a=_h.bind(null,Ue,i),i.dispatch=a,i=yc(!1),d=Nc.bind(null,Ue,!1,i.queue),i=Kt(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,a=ab.bind(null,Ue,c,d,a),c.dispatch=a,i.memoizedState=e,[t,a,!1]}function lh(e){var t=Ct();return sh(t,st,e)}function sh(e,t,a){if(t=gc(e,t,rh)[0],e=ls(ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ri(t)}catch(S){throw S===Dr?Kl:S}else i=t;t=Ct();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(Ue.flags|=2048,Br(9,{destroy:void 0},rb.bind(null,c,a),null)),[i,d,e]}function rb(e,t){e.action=t}function oh(e){var t=Ct(),a=st;if(a!==null)return sh(t,a,e);Ct(),t=t.memoizedState,a=Ct();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Br(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=rs(),Ue.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function ch(){return Ct().memoizedState}function ss(e,t,a,i){var c=Kt();Ue.flags|=e,c.memoizedState=Br(1|t,{destroy:void 0},a,i===void 0?null:i)}function os(e,t,a,i){var c=Ct();i=i===void 0?null:i;var d=c.memoizedState.inst;st!==null&&i!==null&&uc(i,st.memoizedState.deps)?c.memoizedState=Br(t,d,a,i):(Ue.flags|=e,c.memoizedState=Br(1|t,d,a,i))}function uh(e,t){ss(8390656,8,e,t)}function xc(e,t){os(2048,8,e,t)}function ib(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=rs(),Ue.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function dh(e){var t=Ct().memoizedState;return ib({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function fh(e,t){return os(4,2,e,t)}function hh(e,t){return os(4,4,e,t)}function ph(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mh(e,t,a){a=a!=null?a.concat([e]):null,os(4,4,ph.bind(null,t,e),a)}function Sc(){}function gh(e,t){var a=Ct();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&uc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function vh(e,t){var a=Ct();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&uc(t,i[1]))return i[0];if(i=e(),ir){Je(!0);try{e()}finally{Je(!1)}}return a.memoizedState=[i,t],i}function jc(e,t,a){return a===void 0||(ea&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=yp(),Ue.lanes|=e,Ea|=e,a)}function yh(e,t,a,i){return sn(a,t)?a:Ur.current!==null?(e=jc(e,a,i),sn(e,t)||(Ut=!0),e):(ea&42)===0||(ea&1073741824)!==0&&(Fe&261930)===0?(Ut=!0,e.memoizedState=a):(e=yp(),Ue.lanes|=e,Ea|=e,t)}function bh(e,t,a,i,c){var d=P.p;P.p=d!==0&&8>d?d:8;var S=V.T,z={};V.T=z,Nc(e,!1,t,a);try{var Q=c(),ue=V.S;if(ue!==null&&ue(z,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var pe=eb(Q,i);ki(e,t,pe,hn(e))}else ki(e,t,i,hn(e))}catch(be){ki(e,t,{then:function(){},status:"rejected",reason:be},hn())}finally{P.p=d,S!==null&&z.types!==null&&(S.types=z.types),V.T=S}}function lb(){}function wc(e,t,a,i){if(e.tag!==5)throw Error(o(476));var c=xh(e).queue;bh(e,c,t,X,a===null?lb:function(){return Sh(e),a(i)})}function xh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:X},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Sh(e){var t=xh(e);t.next===null&&(t=e.alternate.memoizedState),ki(e,t.next.queue,{},hn())}function _c(){return Gt(Xi)}function jh(){return Ct().memoizedState}function wh(){return Ct().memoizedState}function sb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=hn();e=Sa(a);var i=ja(t,e,a);i!==null&&(ln(i,t,a),Ei(i,t,a)),t={cache:Wo()},e.payload=t;return}t=t.return}}function ob(e,t,a){var i=hn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cs(e)?Nh(t,a):(a=Go(e,t,a,i),a!==null&&(ln(a,e,i),Th(a,t,i)))}function _h(e,t,a){var i=hn();ki(e,t,a,i)}function ki(e,t,a,i){var c={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(cs(e))Nh(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var S=t.lastRenderedState,z=d(S,a);if(c.hasEagerState=!0,c.eagerState=z,sn(z,S))return Il(e,t,c,0),ft===null&&Gl(),!1}catch{}if(a=Go(e,t,c,i),a!==null)return ln(a,e,i),Th(a,t,i),!0}return!1}function Nc(e,t,a,i){if(i={lane:2,revertLane:au(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},cs(e)){if(t)throw Error(o(479))}else t=Go(e,a,i,2),t!==null&&ln(t,e,2)}function cs(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Nh(e,t){Lr=ns=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Th(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,El(e,a)}}var Di={readContext:Gt,use:is,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};Di.useEffectEvent=xt;var Eh={readContext:Gt,use:is,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:uh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ss(4194308,4,ph.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var a=Kt();t=t===void 0?null:t;var i=e();if(ir){Je(!0);try{e()}finally{Je(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Kt();if(a!==void 0){var c=a(t);if(ir){Je(!0);try{a(t)}finally{Je(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=ob.bind(null,Ue,e),[i.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=yc(e);var t=e.queue,a=_h.bind(null,Ue,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Sc,useDeferredValue:function(e,t){var a=Kt();return jc(a,e,t)},useTransition:function(){var e=yc(!1);return e=bh.bind(null,Ue,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Ue,c=Kt();if(Ze){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ft===null)throw Error(o(349));(Fe&127)!==0||Zf(i,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,uh(Kf.bind(null,i,d,e),[e]),i.flags|=2048,Br(9,{destroy:void 0},Xf.bind(null,i,d,a,t),null),a},useId:function(){var e=Kt(),t=ft.identifierPrefix;if(Ze){var a=qn,i=Hn;a=(i&~(1<<32-$e(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=as++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=tb++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:_c,useFormState:ih,useActionState:ih,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Nc.bind(null,Ue,!0,a),a.dispatch=t,[e,t]},useMemoCache:mc,useCacheRefresh:function(){return Kt().memoizedState=sb.bind(null,Ue)},useEffectEvent:function(e){var t=Kt(),a={impl:e};return t.memoizedState=a,function(){if((tt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Tc={readContext:Gt,use:is,useCallback:gh,useContext:Gt,useEffect:xc,useImperativeHandle:mh,useInsertionEffect:fh,useLayoutEffect:hh,useMemo:vh,useReducer:ls,useRef:ch,useState:function(){return ls(ta)},useDebugValue:Sc,useDeferredValue:function(e,t){var a=Ct();return yh(a,st.memoizedState,e,t)},useTransition:function(){var e=ls(ta)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Ri(e),t]},useSyncExternalStore:Pf,useId:jh,useHostTransitionStatus:_c,useFormState:lh,useActionState:lh,useOptimistic:function(e,t){var a=Ct();return Wf(a,st,e,t)},useMemoCache:mc,useCacheRefresh:wh};Tc.useEffectEvent=dh;var Ch={readContext:Gt,use:is,useCallback:gh,useContext:Gt,useEffect:xc,useImperativeHandle:mh,useInsertionEffect:fh,useLayoutEffect:hh,useMemo:vh,useReducer:vc,useRef:ch,useState:function(){return vc(ta)},useDebugValue:Sc,useDeferredValue:function(e,t){var a=Ct();return st===null?jc(a,e,t):yh(a,st.memoizedState,e,t)},useTransition:function(){var e=vc(ta)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Ri(e),t]},useSyncExternalStore:Pf,useId:jh,useHostTransitionStatus:_c,useFormState:oh,useActionState:oh,useOptimistic:function(e,t){var a=Ct();return st!==null?Wf(a,st,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:mc,useCacheRefresh:wh};Ch.useEffectEvent=dh;function Ec(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Cc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=hn(),c=Sa(i);c.payload=t,a!=null&&(c.callback=a),t=ja(e,c,i),t!==null&&(ln(t,e,i),Ei(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=hn(),c=Sa(i);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=ja(e,c,i),t!==null&&(ln(t,e,i),Ei(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=hn(),i=Sa(a);i.tag=2,t!=null&&(i.callback=t),t=ja(e,i,a),t!==null&&(ln(t,e,a),Ei(t,e,a))}};function Oh(e,t,a,i,c,d,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,S):t.prototype&&t.prototype.isPureReactComponent?!bi(a,i)||!bi(c,d):!0}function Ah(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Cc.enqueueReplaceState(t,t.state,null)}function lr(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Rh(e){ql(e)}function kh(e){console.error(e)}function Dh(e){ql(e)}function us(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function zh(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Oc(e,t,a){return a=Sa(a),a.tag=3,a.payload={element:null},a.callback=function(){us(e,t)},a}function Uh(e){return e=Sa(e),e.tag=3,e}function Lh(e,t,a,i){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=i.value;e.payload=function(){return c(d)},e.callback=function(){zh(t,a,i)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){zh(t,a,i),typeof c!="function"&&(Ca===null?Ca=new Set([this]):Ca.add(this));var z=i.stack;this.componentDidCatch(i.value,{componentStack:z!==null?z:""})})}function cb(e,t,a,i,c){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Ar(t,a,c,!0),a=cn.current,a!==null){switch(a.tag){case 31:case 13:return wn===null?js():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=c,i===Ql?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),eu(e,i,c)),!1;case 22:return a.flags|=65536,i===Ql?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),eu(e,i,c)),!1}throw Error(o(435,a.tag))}return eu(e,i,c),js(),!1}if(Ze)return t=cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==Zo&&(e=Error(o(422),{cause:i}),ji(bn(e,a)))):(i!==Zo&&(t=Error(o(423),{cause:i}),ji(bn(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=bn(i,a),c=Oc(e.stateNode,i,c),ic(e,c),St!==4&&(St=2)),!1;var d=Error(o(520),{cause:i});if(d=bn(d,a),qi===null?qi=[d]:qi.push(d),St!==4&&(St=2),t===null)return!0;i=bn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Oc(a.stateNode,i,e),ic(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ca===null||!Ca.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Uh(c),Lh(c,e,a,i),ic(a,c),!1}a=a.return}while(a!==null);return!1}var Ac=Error(o(461)),Ut=!1;function It(e,t,a,i){t.child=e===null?Hf(t,null,a,i):rr(t,e.child,a,i)}function Mh(e,t,a,i,c){a=a.render;var d=t.ref;if("ref"in i){var S={};for(var z in i)z!=="ref"&&(S[z]=i[z])}else S=i;return er(t),i=dc(e,t,a,S,d,c),z=fc(),e!==null&&!Ut?(hc(e,t,c),na(e,t,c)):(Ze&&z&&Fo(t),t.flags|=1,It(e,t,i,c),t.child)}function Bh(e,t,a,i,c){if(e===null){var d=a.type;return typeof d=="function"&&!Io(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,$h(e,t,d,i,c)):(e=Yl(a.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Bc(e,c)){var S=d.memoizedProps;if(a=a.compare,a=a!==null?a:bi,a(S,i)&&e.ref===t.ref)return na(e,t,c)}return t.flags|=1,e=Kn(d,i),e.ref=t.ref,e.return=t,t.child=e}function $h(e,t,a,i,c){if(e!==null){var d=e.memoizedProps;if(bi(d,i)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=i=d,Bc(e,c))(e.flags&131072)!==0&&(Ut=!0);else return t.lanes=e.lanes,na(e,t,c)}return Rc(e,t,a,i,c)}function Hh(e,t,a,i){var c=i.children,d=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(d=d!==null?d.baseLanes|a:a,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~d}else i=0,t.child=null;return qh(e,t,d,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xl(t,d!==null?d.cachePool:null),d!==null?If(t,d):sc(),Vf(t);else return i=t.lanes=536870912,qh(e,t,d!==null?d.baseLanes|a:a,a,i)}else d!==null?(Xl(t,d.cachePool),If(t,d),_a(),t.memoizedState=null):(e!==null&&Xl(t,null),sc(),_a());return It(e,t,c,a),t.child}function zi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function qh(e,t,a,i,c){var d=tc();return d=d===null?null:{parent:Dt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Xl(t,null),sc(),Vf(t),e!==null&&Ar(e,t,i,!0),t.childLanes=c,null}function ds(e,t){return t=hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gh(e,t,a){return rr(t,e.child,null,a),e=ds(t,t.pendingProps),e.flags|=2,un(t),t.memoizedState=null,e}function ub(e,t,a){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ze){if(i.mode==="hidden")return e=ds(t,i),t.lanes=536870912,zi(null,e);if(cc(t),(e=ht)?(e=em(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Hn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},a=Nf(e),a.return=t,t.child=a,qt=t,ht=null)):e=null,e===null)throw ya(t);return t.lanes=536870912,null}return ds(t,i)}var d=e.memoizedState;if(d!==null){var S=d.dehydrated;if(cc(t),c)if(t.flags&256)t.flags&=-257,t=Gh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ut||Ar(e,t,a,!1),c=(a&e.childLanes)!==0,Ut||c){if(i=ft,i!==null&&(S=On(i,a),S!==0&&S!==d.retryLane))throw d.retryLane=S,Ka(e,S),ln(i,e,S),Ac;js(),t=Gh(e,t,a)}else e=d.treeContext,ht=_n(S.nextSibling),qt=t,Ze=!0,va=null,jn=!1,e!==null&&Cf(t,e),t=ds(t,i),t.flags|=4096;return t}return e=Kn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Rc(e,t,a,i,c){return er(t),a=dc(e,t,a,i,void 0,c),i=fc(),e!==null&&!Ut?(hc(e,t,c),na(e,t,c)):(Ze&&i&&Fo(t),t.flags|=1,It(e,t,a,c),t.child)}function Ih(e,t,a,i,c,d){return er(t),t.updateQueue=null,a=Ff(t,i,a,c),Yf(e),i=fc(),e!==null&&!Ut?(hc(e,t,d),na(e,t,d)):(Ze&&i&&Fo(t),t.flags|=1,It(e,t,a,d),t.child)}function Vh(e,t,a,i,c){if(er(t),t.stateNode===null){var d=Tr,S=a.contextType;typeof S=="object"&&S!==null&&(d=Gt(S)),d=new a(i,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Cc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=i,d.state=t.memoizedState,d.refs={},ac(t),S=a.contextType,d.context=typeof S=="object"&&S!==null?Gt(S):Tr,d.state=t.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(Ec(t,a,S,i),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(S=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),S!==d.state&&Cc.enqueueReplaceState(d,d.state,null),Oi(t,i,d,c),Ci(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){d=t.stateNode;var z=t.memoizedProps,Q=lr(a,z);d.props=Q;var ue=d.context,pe=a.contextType;S=Tr,typeof pe=="object"&&pe!==null&&(S=Gt(pe));var be=a.getDerivedStateFromProps;pe=typeof be=="function"||typeof d.getSnapshotBeforeUpdate=="function",z=t.pendingProps!==z,pe||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(z||ue!==S)&&Ah(t,d,i,S),xa=!1;var de=t.memoizedState;d.state=de,Oi(t,i,d,c),Ci(),ue=t.memoizedState,z||de!==ue||xa?(typeof be=="function"&&(Ec(t,a,be,i),ue=t.memoizedState),(Q=xa||Oh(t,a,Q,i,de,ue,S))?(pe||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=ue),d.props=i,d.state=ue,d.context=S,i=Q):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{d=t.stateNode,rc(e,t),S=t.memoizedProps,pe=lr(a,S),d.props=pe,be=t.pendingProps,de=d.context,ue=a.contextType,Q=Tr,typeof ue=="object"&&ue!==null&&(Q=Gt(ue)),z=a.getDerivedStateFromProps,(ue=typeof z=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S!==be||de!==Q)&&Ah(t,d,i,Q),xa=!1,de=t.memoizedState,d.state=de,Oi(t,i,d,c),Ci();var fe=t.memoizedState;S!==be||de!==fe||xa||e!==null&&e.dependencies!==null&&Pl(e.dependencies)?(typeof z=="function"&&(Ec(t,a,z,i),fe=t.memoizedState),(pe=xa||Oh(t,a,pe,i,de,fe,Q)||e!==null&&e.dependencies!==null&&Pl(e.dependencies))?(ue||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(i,fe,Q),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(i,fe,Q)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||S===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=fe),d.props=i,d.state=fe,d.context=Q,i=pe):(typeof d.componentDidUpdate!="function"||S===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),i=!1)}return d=i,fs(e,t),i=(t.flags&128)!==0,d||i?(d=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&i?(t.child=rr(t,e.child,null,c),t.child=rr(t,null,a,c)):It(e,t,a,c),t.memoizedState=d.state,e=t.child):e=na(e,t,c),e}function Yh(e,t,a,i){return Ja(),t.flags|=256,It(e,t,a,i),t.child}var kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dc(e){return{baseLanes:e,cachePool:zf()}}function zc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=fn),e}function Fh(e,t,a){var i=t.pendingProps,c=!1,d=(t.flags&128)!==0,S;if((S=d)||(S=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),S&&(c=!0,t.flags&=-129),S=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ze){if(c?wa(t):_a(),(e=ht)?(e=em(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Hn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},a=Nf(e),a.return=t,t.child=a,qt=t,ht=null)):e=null,e===null)throw ya(t);return gu(e)?t.lanes=32:t.lanes=536870912,null}var z=i.children;return i=i.fallback,c?(_a(),c=t.mode,z=hs({mode:"hidden",children:z},c),i=Qa(i,c,a,null),z.return=t,i.return=t,z.sibling=i,t.child=z,i=t.child,i.memoizedState=Dc(a),i.childLanes=zc(e,S,a),t.memoizedState=kc,zi(null,i)):(wa(t),Uc(t,z))}var Q=e.memoizedState;if(Q!==null&&(z=Q.dehydrated,z!==null)){if(d)t.flags&256?(wa(t),t.flags&=-257,t=Lc(e,t,a)):t.memoizedState!==null?(_a(),t.child=e.child,t.flags|=128,t=null):(_a(),z=i.fallback,c=t.mode,i=hs({mode:"visible",children:i.children},c),z=Qa(z,c,a,null),z.flags|=2,i.return=t,z.return=t,i.sibling=z,t.child=i,rr(t,e.child,null,a),i=t.child,i.memoizedState=Dc(a),i.childLanes=zc(e,S,a),t.memoizedState=kc,t=zi(null,i));else if(wa(t),gu(z)){if(S=z.nextSibling&&z.nextSibling.dataset,S)var ue=S.dgst;S=ue,i=Error(o(419)),i.stack="",i.digest=S,ji({value:i,source:null,stack:null}),t=Lc(e,t,a)}else if(Ut||Ar(e,t,a,!1),S=(a&e.childLanes)!==0,Ut||S){if(S=ft,S!==null&&(i=On(S,a),i!==0&&i!==Q.retryLane))throw Q.retryLane=i,Ka(e,i),ln(S,e,i),Ac;mu(z)||js(),t=Lc(e,t,a)}else mu(z)?(t.flags|=192,t.child=e.child,t=null):(e=Q.treeContext,ht=_n(z.nextSibling),qt=t,Ze=!0,va=null,jn=!1,e!==null&&Cf(t,e),t=Uc(t,i.children),t.flags|=4096);return t}return c?(_a(),z=i.fallback,c=t.mode,Q=e.child,ue=Q.sibling,i=Kn(Q,{mode:"hidden",children:i.children}),i.subtreeFlags=Q.subtreeFlags&65011712,ue!==null?z=Kn(ue,z):(z=Qa(z,c,a,null),z.flags|=2),z.return=t,i.return=t,i.sibling=z,t.child=i,zi(null,i),i=t.child,z=e.child.memoizedState,z===null?z=Dc(a):(c=z.cachePool,c!==null?(Q=Dt._currentValue,c=c.parent!==Q?{parent:Q,pool:Q}:c):c=zf(),z={baseLanes:z.baseLanes|a,cachePool:c}),i.memoizedState=z,i.childLanes=zc(e,S,a),t.memoizedState=kc,zi(e.child,i)):(wa(t),a=e.child,e=a.sibling,a=Kn(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(S=t.deletions,S===null?(t.deletions=[e],t.flags|=16):S.push(e)),t.child=a,t.memoizedState=null,a)}function Uc(e,t){return t=hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function hs(e,t){return e=on(22,e,null,t),e.lanes=0,e}function Lc(e,t,a){return rr(t,e.child,null,a),e=Uc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ph(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Qo(e.return,t,a)}function Mc(e,t,a,i,c,d){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:c,treeForkCount:d}:(S.isBackwards=t,S.rendering=null,S.renderingStartTime=0,S.last=i,S.tail=a,S.tailMode=c,S.treeForkCount=d)}function Zh(e,t,a){var i=t.pendingProps,c=i.revealOrder,d=i.tail;i=i.children;var S=Et.current,z=(S&2)!==0;if(z?(S=S&1|2,t.flags|=128):S&=1,B(Et,S),It(e,t,i,a),i=Ze?Si:0,!z&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ph(e,a,t);else if(e.tag===19)Ph(e,a,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(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&ts(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Mc(t,!1,c,a,d,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ts(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Mc(t,!0,a,null,d,i);break;case"together":Mc(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function na(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ar(e,t,a,!1),(a&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,a=Kn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Bc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pl(e)))}function db(e,t,a){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),ba(t,Dt,e.memoizedState.cache),Ja();break;case 27:case 5:je(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(wa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Fh(e,t,a):(wa(t),e=na(e,t,a),e!==null?e.sibling:null);wa(t);break;case 19:var c=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Ar(e,t,a,!1),i=(a&t.childLanes)!==0),c){if(i)return Zh(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),B(Et,Et.current),i)break;return null;case 22:return t.lanes=0,Hh(e,t,a,t.pendingProps);case 24:ba(t,Dt,e.memoizedState.cache)}return na(e,t,a)}function Xh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ut=!0;else{if(!Bc(e,a)&&(t.flags&128)===0)return Ut=!1,db(e,t,a);Ut=(e.flags&131072)!==0}else Ut=!1,Ze&&(t.flags&1048576)!==0&&Ef(t,Si,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=nr(t.elementType),t.type=e,typeof e=="function")Io(e)?(i=lr(e,i),t.tag=1,t=Vh(null,t,e,i,a)):(t.tag=0,t=Rc(null,t,e,i,a));else{if(e!=null){var c=e.$$typeof;if(c===H){t.tag=11,t=Mh(null,t,e,i,a);break e}else if(c===G){t.tag=14,t=Bh(null,t,e,i,a);break e}}throw t=T(e)||e,Error(o(306,t,""))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,c=lr(i,t.pendingProps),Vh(e,t,i,c,a);case 3:e:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var d=t.memoizedState;c=d.element,rc(e,t),Oi(t,i,null,a);var S=t.memoizedState;if(i=S.cache,ba(t,Dt,i),i!==d.cache&&Jo(t,[Dt],a,!0),Ci(),i=S.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:S.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Yh(e,t,i,a);break e}else if(i!==c){c=bn(Error(o(424)),t),ji(c),t=Yh(e,t,i,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ht=_n(e.firstChild),qt=t,Ze=!0,va=null,jn=!0,a=Hf(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ja(),i===c){t=na(e,t,a);break e}It(e,t,i,a)}t=t.child}return t;case 26:return fs(e,t),e===null?(a=lm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ze||(a=t.type,e=t.pendingProps,i=Os(ge.current).createElement(a),i[Nt]=t,i[At]=e,Vt(i,a,e),Rt(i),t.stateNode=i):t.memoizedState=lm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&Ze&&(i=t.stateNode=am(t.type,t.pendingProps,ge.current),qt=t,jn=!0,c=ht,ka(t.type)?(vu=c,ht=_n(i.firstChild)):ht=c),It(e,t,t.pendingProps.children,a),fs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ze&&((c=i=ht)&&(i=qb(i,t.type,t.pendingProps,jn),i!==null?(t.stateNode=i,qt=t,ht=_n(i.firstChild),jn=!1,c=!0):c=!1),c||ya(t)),je(t),c=t.type,d=t.pendingProps,S=e!==null?e.memoizedProps:null,i=d.children,fu(c,d)?i=null:S!==null&&fu(c,S)&&(t.flags|=32),t.memoizedState!==null&&(c=dc(e,t,nb,null,null,a),Xi._currentValue=c),fs(e,t),It(e,t,i,a),t.child;case 6:return e===null&&Ze&&((e=a=ht)&&(a=Gb(a,t.pendingProps,jn),a!==null?(t.stateNode=a,qt=t,ht=null,e=!0):e=!1),e||ya(t)),null;case 13:return Fh(e,t,a);case 4:return _e(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=rr(t,null,i,a):It(e,t,i,a),t.child;case 11:return Mh(e,t,t.type,t.pendingProps,a);case 7:return It(e,t,t.pendingProps,a),t.child;case 8:return It(e,t,t.pendingProps.children,a),t.child;case 12:return It(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,ba(t,t.type,i.value),It(e,t,i.children,a),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,er(t),c=Gt(c),i=i(c),t.flags|=1,It(e,t,i,a),t.child;case 14:return Bh(e,t,t.type,t.pendingProps,a);case 15:return $h(e,t,t.type,t.pendingProps,a);case 19:return Zh(e,t,a);case 31:return ub(e,t,a);case 22:return Hh(e,t,a,t.pendingProps);case 24:return er(t),i=Gt(Dt),e===null?(c=tc(),c===null&&(c=ft,d=Wo(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:i,cache:c},ac(t),ba(t,Dt,c)):((e.lanes&a)!==0&&(rc(e,t),Oi(t,null,null,a),Ci()),c=e.memoizedState,d=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),ba(t,Dt,i)):(i=d.cache,ba(t,Dt,i),i!==c.cache&&Jo(t,[Dt],a,!0))),It(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function aa(e){e.flags|=4}function $c(e,t,a,i,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(jp())e.flags|=8192;else throw ar=Ql,nc}else e.flags&=-16777217}function Kh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!dm(t))if(jp())e.flags|=8192;else throw ar=Ql,nc}function ps(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mn():536870912,e.lanes|=t,Gr|=t)}function Ui(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function fb(e,t,a){var i=t.pendingProps;switch(Po(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return pt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Wn(Dt),ae(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Or(t)?aa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xo())),pt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(aa(t),d!==null?(pt(t),Kh(t,d)):(pt(t),$c(t,c,null,i,a))):d?d!==e.memoizedState?(aa(t),pt(t),Kh(t,d)):(pt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&aa(t),pt(t),$c(t,c,e,i,a)),null;case 27:if(Te(t),a=ge.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&aa(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return pt(t),null}e=J.current,Or(t)?Of(t):(e=am(c,i,a),t.stateNode=e,aa(t))}return pt(t),null;case 5:if(Te(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&aa(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return pt(t),null}if(d=J.current,Or(t))Of(t);else{var S=Os(ge.current);switch(d){case 1:d=S.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=S.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=S.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=S.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=S.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof i.is=="string"?S.createElement("select",{is:i.is}):S.createElement("select"),i.multiple?d.multiple=!0:i.size&&(d.size=i.size);break;default:d=typeof i.is=="string"?S.createElement(c,{is:i.is}):S.createElement(c)}}d[Nt]=t,d[At]=i;e:for(S=t.child;S!==null;){if(S.tag===5||S.tag===6)d.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===t)break e;for(;S.sibling===null;){if(S.return===null||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}t.stateNode=d;e:switch(Vt(d,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&aa(t)}}return pt(t),$c(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&aa(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=ge.current,Or(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,c=qt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||Fp(e.nodeValue,a)),e||ya(t,!0)}else e=Os(e).createTextNode(i),e[Nt]=t,t.stateNode=e}return pt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Or(t),a!==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[Nt]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else a=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(un(t),t):(un(t),null);if((t.flags&128)!==0)throw Error(o(558))}return pt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Or(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Nt]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),c=!1}else c=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(un(t),t):(un(t),null)}return un(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==c&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ps(t,t.updateQueue),pt(t),null);case 4:return ae(),e===null&&su(t.stateNode.containerInfo),pt(t),null;case 10:return Wn(t.type),pt(t),null;case 19:if(R(Et),i=t.memoizedState,i===null)return pt(t),null;if(c=(t.flags&128)!==0,d=i.rendering,d===null)if(c)Ui(i,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=ts(e),d!==null){for(t.flags|=128,Ui(i,!1),e=d.updateQueue,t.updateQueue=e,ps(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)_f(a,e),a=a.sibling;return B(Et,Et.current&1|2),Ze&&Qn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&we()>bs&&(t.flags|=128,c=!0,Ui(i,!1),t.lanes=4194304)}else{if(!c)if(e=ts(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,ps(t,e),Ui(i,!0),i.tail===null&&i.tailMode==="hidden"&&!d.alternate&&!Ze)return pt(t),null}else 2*we()-i.renderingStartTime>bs&&a!==536870912&&(t.flags|=128,c=!0,Ui(i,!1),t.lanes=4194304);i.isBackwards?(d.sibling=t.child,t.child=d):(e=i.last,e!==null?e.sibling=d:t.child=d,i.last=d)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=we(),e.sibling=null,a=Et.current,B(Et,c?a&1|2:a&1),Ze&&Qn(t,i.treeForkCount),e):(pt(t),null);case 22:case 23:return un(t),oc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),a=t.updateQueue,a!==null&&ps(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&R(tr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wn(Dt),pt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function hb(e,t){switch(Po(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(Dt),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Te(t),null;case 31:if(t.memoizedState!==null){if(un(t),t.alternate===null)throw Error(o(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(Et),null;case 4:return ae(),null;case 10:return Wn(t.type),null;case 22:case 23:return un(t),oc(),e!==null&&R(tr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wn(Dt),null;case 25:return null;default:return null}}function Qh(e,t){switch(Po(t),t.tag){case 3:Wn(Dt),ae();break;case 26:case 27:case 5:Te(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&un(t);break;case 13:un(t);break;case 19:R(Et);break;case 10:Wn(t.type);break;case 22:case 23:un(t),oc(),e!==null&&R(tr);break;case 24:Wn(Dt)}}function Li(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){i=void 0;var d=a.create,S=a.inst;i=d(),S.destroy=i}a=a.next}while(a!==c)}}catch(z){rt(t,t.return,z)}}function Na(e,t,a){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var d=c.next;i=d;do{if((i.tag&e)===e){var S=i.inst,z=S.destroy;if(z!==void 0){S.destroy=void 0,c=t;var Q=a,ue=z;try{ue()}catch(pe){rt(c,Q,pe)}}}i=i.next}while(i!==d)}}catch(pe){rt(t,t.return,pe)}}function Jh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Gf(t,a)}catch(i){rt(e,e.return,i)}}}function Wh(e,t,a){a.props=lr(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){rt(e,t,i)}}function Mi(e,t){try{var a=e.ref;if(a!==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 a=="function"?e.refCleanup=a(i):a.current=i}}catch(c){rt(e,t,c)}}function Gn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(c){rt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){rt(e,t,c)}else a.current=null}function ep(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(c){rt(e,e.return,c)}}function Hc(e,t,a){try{var i=e.stateNode;Ub(i,e.type,a,t),i[At]=t}catch(c){rt(e,e.return,c)}}function tp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ka(e.type)||e.tag===4}function qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tp(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&&ka(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 Gc(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zn));else if(i!==4&&(i===27&&ka(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,a),e=e.sibling;e!==null;)Gc(e,t,a),e=e.sibling}function ms(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&ka(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ms(e,t,a),e=e.sibling;e!==null;)ms(e,t,a),e=e.sibling}function np(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Vt(t,i,a),t[Nt]=e,t[At]=a}catch(d){rt(e,e.return,d)}}var ra=!1,Lt=!1,Ic=!1,ap=typeof WeakSet=="function"?WeakSet:Set,$t=null;function pb(e,t){if(e=e.containerInfo,uu=Ls,e=mf(e),Lo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var c=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var S=0,z=-1,Q=-1,ue=0,pe=0,be=e,de=null;t:for(;;){for(var fe;be!==a||c!==0&&be.nodeType!==3||(z=S+c),be!==d||i!==0&&be.nodeType!==3||(Q=S+i),be.nodeType===3&&(S+=be.nodeValue.length),(fe=be.firstChild)!==null;)de=be,be=fe;for(;;){if(be===e)break t;if(de===a&&++ue===c&&(z=S),de===d&&++pe===i&&(Q=S),(fe=be.nextSibling)!==null)break;be=de,de=be.parentNode}be=fe}a=z===-1||Q===-1?null:{start:z,end:Q}}else a=null}a=a||{start:0,end:0}}else a=null;for(du={focusedElem:e,selectionRange:a},Ls=!1,$t=t;$t!==null;)if(t=$t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$t=e;else for(;$t!==null;){switch(t=$t,d=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(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,i=a.stateNode;try{var Ee=lr(a.type,c);e=i.getSnapshotBeforeUpdate(Ee,d),i.__reactInternalSnapshotBeforeUpdate=e}catch(ke){rt(a,a.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)pu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pu(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,$t=e;break}$t=t.return}}function rp(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:la(e,a),i&4&&Li(5,a);break;case 1:if(la(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(S){rt(a,a.return,S)}else{var c=lr(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){rt(a,a.return,S)}}i&64&&Jh(a),i&512&&Mi(a,a.return);break;case 3:if(la(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Gf(e,t)}catch(S){rt(a,a.return,S)}}break;case 27:t===null&&i&4&&np(a);case 26:case 5:la(e,a),t===null&&i&4&&ep(a),i&512&&Mi(a,a.return);break;case 12:la(e,a);break;case 31:la(e,a),i&4&&sp(e,a);break;case 13:la(e,a),i&4&&op(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=wb.bind(null,a),Ib(e,a))));break;case 22:if(i=a.memoizedState!==null||ra,!i){t=t!==null&&t.memoizedState!==null||Lt,c=ra;var d=Lt;ra=i,(Lt=t)&&!d?sa(e,a,(a.subtreeFlags&8772)!==0):la(e,a),ra=c,Lt=d}break;case 30:break;default:la(e,a)}}function ip(e){var t=e.alternate;t!==null&&(e.alternate=null,ip(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ui(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 vt=null,tn=!1;function ia(e,t,a){for(a=a.child;a!==null;)lp(e,t,a),a=a.sibling}function lp(e,t,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Qe,a)}catch{}switch(a.tag){case 26:Lt||Gn(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Lt||Gn(a,t);var i=vt,c=tn;ka(a.type)&&(vt=a.stateNode,tn=!1),ia(e,t,a),Fi(a.stateNode),vt=i,tn=c;break;case 5:Lt||Gn(a,t);case 6:if(i=vt,c=tn,vt=null,ia(e,t,a),vt=i,tn=c,vt!==null)if(tn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(a.stateNode)}catch(d){rt(a,t,d)}else try{vt.removeChild(a.stateNode)}catch(d){rt(a,t,d)}break;case 18:vt!==null&&(tn?(e=vt,Jp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Kr(e)):Jp(vt,a.stateNode));break;case 4:i=vt,c=tn,vt=a.stateNode.containerInfo,tn=!0,ia(e,t,a),vt=i,tn=c;break;case 0:case 11:case 14:case 15:Na(2,a,t),Lt||Na(4,a,t),ia(e,t,a);break;case 1:Lt||(Gn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Wh(a,t,i)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:Lt=(i=Lt)||a.memoizedState!==null,ia(e,t,a),Lt=i;break;default:ia(e,t,a)}}function sp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kr(e)}catch(a){rt(t,t.return,a)}}}function op(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kr(e)}catch(a){rt(t,t.return,a)}}function mb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ap),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ap),t;default:throw Error(o(435,e.tag))}}function gs(e,t){var a=mb(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var c=_b.bind(null,e,i);i.then(c,c)}})}function nn(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],d=e,S=t,z=S;e:for(;z!==null;){switch(z.tag){case 27:if(ka(z.type)){vt=z.stateNode,tn=!1;break e}break;case 5:vt=z.stateNode,tn=!1;break e;case 3:case 4:vt=z.stateNode.containerInfo,tn=!0;break e}z=z.return}if(vt===null)throw Error(o(160));lp(d,S,c),vt=null,tn=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)cp(t,e),t=t.sibling}var kn=null;function cp(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),an(e),i&4&&(Na(3,e,e.return),Li(3,e),Na(5,e,e.return));break;case 1:nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),i&64&&ra&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var c=kn;if(nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),i&4){var d=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Va]||d[Nt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(i),c.head.insertBefore(d,c.querySelector("head > title"))),Vt(d,i,a),d[Nt]=e,Rt(d),i=d;break e;case"link":var S=cm("link","href",c).get(i+(a.href||""));if(S){for(var z=0;z<S.length;z++)if(d=S[z],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(z,1);break t}}d=c.createElement(i),Vt(d,i,a),c.head.appendChild(d);break;case"meta":if(S=cm("meta","content",c).get(i+(a.content||""))){for(z=0;z<S.length;z++)if(d=S[z],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(z,1);break t}}d=c.createElement(i),Vt(d,i,a),c.head.appendChild(d);break;default:throw Error(o(468,i))}d[Nt]=e,Rt(d),i=d}e.stateNode=i}else um(c,e.type,e.stateNode);else e.stateNode=om(c,i,e.memoizedProps);else d!==i?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,i===null?um(c,e.type,e.stateNode):om(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Hc(e,e.memoizedProps,a.memoizedProps)}break;case 27:nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),a!==null&&i&4&&Hc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),e.flags&32){c=e.stateNode;try{br(c,"")}catch(Ee){rt(e,e.return,Ee)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,Hc(e,c,a!==null?a.memoizedProps:c)),i&1024&&(Ic=!0);break;case 6:if(nn(t,e),an(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(Ee){rt(e,e.return,Ee)}}break;case 3:if(ks=null,c=kn,kn=As(t.containerInfo),nn(t,e),kn=c,an(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Kr(t.containerInfo)}catch(Ee){rt(e,e.return,Ee)}Ic&&(Ic=!1,up(e));break;case 4:i=kn,kn=As(e.stateNode.containerInfo),nn(t,e),an(e),kn=i;break;case 12:nn(t,e),an(e);break;case 31:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,gs(e,i)));break;case 13:nn(t,e),an(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ys=we()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,gs(e,i)));break;case 22:c=e.memoizedState!==null;var Q=a!==null&&a.memoizedState!==null,ue=ra,pe=Lt;if(ra=ue||c,Lt=pe||Q,nn(t,e),Lt=pe,ra=ue,an(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||Q||ra||Lt||sr(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){Q=a=t;try{if(d=Q.stateNode,c)S=d.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{z=Q.stateNode;var be=Q.memoizedProps.style,de=be!=null&&be.hasOwnProperty("display")?be.display:null;z.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(Ee){rt(Q,Q.return,Ee)}}}else if(t.tag===6){if(a===null){Q=t;try{Q.stateNode.nodeValue=c?"":Q.memoizedProps}catch(Ee){rt(Q,Q.return,Ee)}}}else if(t.tag===18){if(a===null){Q=t;try{var fe=Q.stateNode;c?Wp(fe,!0):Wp(Q.stateNode,!1)}catch(Ee){rt(Q,Q.return,Ee)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,gs(e,a))));break;case 19:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,gs(e,i)));break;case 30:break;case 21:break;default:nn(t,e),an(e)}}function an(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(tp(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var c=a.stateNode,d=qc(e);ms(e,d,c);break;case 5:var S=a.stateNode;a.flags&32&&(br(S,""),a.flags&=-33);var z=qc(e);ms(e,z,S);break;case 3:case 4:var Q=a.stateNode.containerInfo,ue=qc(e);Gc(e,ue,Q);break;default:throw Error(o(161))}}catch(pe){rt(e,e.return,pe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function up(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;up(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function la(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rp(e,t.alternate,t),t=t.sibling}function sr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),sr(t);break;case 1:Gn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Wh(t,t.return,a),sr(t);break;case 27:Fi(t.stateNode);case 26:case 5:Gn(t,t.return),sr(t);break;case 22:t.memoizedState===null&&sr(t);break;case 30:sr(t);break;default:sr(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,d=t,S=d.flags;switch(d.tag){case 0:case 11:case 15:sa(c,d,a),Li(4,d);break;case 1:if(sa(c,d,a),i=d,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(ue){rt(i,i.return,ue)}if(i=d,c=i.updateQueue,c!==null){var z=i.stateNode;try{var Q=c.shared.hiddenCallbacks;if(Q!==null)for(c.shared.hiddenCallbacks=null,c=0;c<Q.length;c++)qf(Q[c],z)}catch(ue){rt(i,i.return,ue)}}a&&S&64&&Jh(d),Mi(d,d.return);break;case 27:np(d);case 26:case 5:sa(c,d,a),a&&i===null&&S&4&&ep(d),Mi(d,d.return);break;case 12:sa(c,d,a);break;case 31:sa(c,d,a),a&&S&4&&sp(c,d);break;case 13:sa(c,d,a),a&&S&4&&op(c,d);break;case 22:d.memoizedState===null&&sa(c,d,a),Mi(d,d.return);break;case 30:break;default:sa(c,d,a)}t=t.sibling}}function Vc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&wi(a))}function Yc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e))}function Dn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)dp(e,t,a,i),t=t.sibling}function dp(e,t,a,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Dn(e,t,a,i),c&2048&&Li(9,t);break;case 1:Dn(e,t,a,i);break;case 3:Dn(e,t,a,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e)));break;case 12:if(c&2048){Dn(e,t,a,i),e=t.stateNode;try{var d=t.memoizedProps,S=d.id,z=d.onPostCommit;typeof z=="function"&&z(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Q){rt(t,t.return,Q)}}else Dn(e,t,a,i);break;case 31:Dn(e,t,a,i);break;case 13:Dn(e,t,a,i);break;case 23:break;case 22:d=t.stateNode,S=t.alternate,t.memoizedState!==null?d._visibility&2?Dn(e,t,a,i):Bi(e,t):d._visibility&2?Dn(e,t,a,i):(d._visibility|=2,$r(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Vc(S,t);break;case 24:Dn(e,t,a,i),c&2048&&Yc(t.alternate,t);break;default:Dn(e,t,a,i)}}function $r(e,t,a,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,S=t,z=a,Q=i,ue=S.flags;switch(S.tag){case 0:case 11:case 15:$r(d,S,z,Q,c),Li(8,S);break;case 23:break;case 22:var pe=S.stateNode;S.memoizedState!==null?pe._visibility&2?$r(d,S,z,Q,c):Bi(d,S):(pe._visibility|=2,$r(d,S,z,Q,c)),c&&ue&2048&&Vc(S.alternate,S);break;case 24:$r(d,S,z,Q,c),c&&ue&2048&&Yc(S.alternate,S);break;default:$r(d,S,z,Q,c)}t=t.sibling}}function Bi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,c=i.flags;switch(i.tag){case 22:Bi(a,i),c&2048&&Vc(i.alternate,i);break;case 24:Bi(a,i),c&2048&&Yc(i.alternate,i);break;default:Bi(a,i)}t=t.sibling}}var $i=8192;function Hr(e,t,a){if(e.subtreeFlags&$i)for(e=e.child;e!==null;)fp(e,t,a),e=e.sibling}function fp(e,t,a){switch(e.tag){case 26:Hr(e,t,a),e.flags&$i&&e.memoizedState!==null&&tx(a,kn,e.memoizedState,e.memoizedProps);break;case 5:Hr(e,t,a);break;case 3:case 4:var i=kn;kn=As(e.stateNode.containerInfo),Hr(e,t,a),kn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=$i,$i=16777216,Hr(e,t,a),$i=i):Hr(e,t,a));break;default:Hr(e,t,a)}}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 Hi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];$t=i,mp(i,e)}hp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)pp(e),e=e.sibling}function pp(e){switch(e.tag){case 0:case 11:case 15:Hi(e),e.flags&2048&&Na(9,e,e.return);break;case 3:Hi(e);break;case 12:Hi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vs(e)):Hi(e);break;default:Hi(e)}}function vs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];$t=i,mp(i,e)}hp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),vs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,vs(t));break;default:vs(t)}e=e.sibling}}function mp(e,t){for(;$t!==null;){var a=$t;switch(a.tag){case 0:case 11:case 15:Na(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:wi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,$t=i;else e:for(a=e;$t!==null;){i=$t;var c=i.sibling,d=i.return;if(ip(i),i===a){$t=null;break e}if(c!==null){c.return=d,$t=c;break e}$t=d}}}var gb={getCacheForType:function(e){var t=Gt(Dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Gt(Dt).controller.signal}},vb=typeof WeakMap=="function"?WeakMap:Map,tt=0,ft=null,Ve=null,Fe=0,at=0,dn=null,Ta=!1,qr=!1,Fc=!1,oa=0,St=0,Ea=0,or=0,Pc=0,fn=0,Gr=0,qi=null,rn=null,Zc=!1,ys=0,gp=0,bs=1/0,xs=null,Ca=null,Mt=0,Oa=null,Ir=null,ca=0,Xc=0,Kc=null,vp=null,Gi=0,Qc=null;function hn(){return(tt&2)!==0&&Fe!==0?Fe&-Fe:V.T!==null?au():oi()}function yp(){if(fn===0)if((Fe&536870912)===0||Ze){var e=dt;dt<<=1,(dt&3932160)===0&&(dt=262144),fn=e}else fn=536870912;return e=cn.current,e!==null&&(e.flags|=32),fn}function ln(e,t,a){(e===ft&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(Vr(e,0),Aa(e,Fe,fn,!1)),Ot(e,a),((tt&2)===0||e!==ft)&&(e===ft&&((tt&2)===0&&(or|=a),St===4&&Aa(e,Fe,fn,!1)),In(e))}function bp(e,t,a){if((tt&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||bt(e,t),c=i?xb(e,t):Wc(e,t,!0),d=i;do{if(c===0){qr&&!i&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!yb(a)){c=Wc(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){t=S;e:{var z=e;c=qi;var Q=z.current.memoizedState.isDehydrated;if(Q&&(Vr(z,S).flags|=256),S=Wc(z,S,!1),S!==2){if(Fc&&!Q){z.errorRecoveryDisabledLanes|=d,or|=d,c=4;break e}d=rn,rn=c,d!==null&&(rn===null?rn=d:rn.push.apply(rn,d))}c=S}if(d=!1,c!==2)continue}}if(c===1){Vr(e,0),Aa(e,t,0,!0);break}e:{switch(i=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Aa(i,t,fn,!Ta);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=ys+300-we(),10<c)){if(Aa(i,t,fn,!Ta),Xt(i,0,!0)!==0)break e;ca=t,i.timeoutHandle=Kp(xp.bind(null,i,a,rn,xs,Zc,t,fn,or,Gr,Ta,d,"Throttled",-0,0),c);break e}xp(i,a,rn,xs,Zc,t,fn,or,Gr,Ta,d,null,-0,0)}}break}while(!0);In(e)}function xp(e,t,a,i,c,d,S,z,Q,ue,pe,be,de,fe){if(e.timeoutHandle=-1,be=t.subtreeFlags,be&8192||(be&16785408)===16785408){be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},fp(t,d,be);var Ee=(d&62914560)===d?ys-we():(d&4194048)===d?gp-we():0;if(Ee=nx(be,Ee),Ee!==null){ca=d,e.cancelPendingCommit=Ee(Cp.bind(null,e,t,d,a,i,c,S,z,Q,pe,be,null,de,fe)),Aa(e,d,S,!ue);return}}Cp(e,t,d,a,i,c,S,z,Q)}function yb(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var c=a[i],d=c.getSnapshot;c=c.value;try{if(!sn(d(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Aa(e,t,a,i){t&=~Pc,t&=~or,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var d=31-$e(c),S=1<<d;i[d]=-1,c&=~S}a!==0&&Ie(e,a,t)}function Ss(){return(tt&6)===0?(Ii(0),!1):!0}function Jc(){if(Ve!==null){if(at===0)var e=Ve.return;else e=Ve,Jn=Wa=null,pc(e),zr=null,Ni=0,e=Ve;for(;e!==null;)Qh(e.alternate,e),e=e.return;Ve=null}}function Vr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Bb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ca=0,Jc(),ft=e,Ve=a=Kn(e.current,null),Fe=t,at=0,dn=null,Ta=!1,qr=bt(e,t),Fc=!1,Gr=fn=Pc=or=Ea=St=0,rn=qi=null,Zc=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-$e(i),d=1<<c;t|=e[c],i&=~d}return oa=t,Gl(),a}function Sp(e,t){Ue=null,V.H=Di,t===Dr||t===Kl?(t=Mf(),at=3):t===nc?(t=Mf(),at=4):at=t===Ac?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Ve===null&&(St=1,us(e,bn(t,e.current)))}function jp(){var e=cn.current;return e===null?!0:(Fe&4194048)===Fe?wn===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===wn:!1}function wp(){var e=V.H;return V.H=Di,e===null?Di:e}function _p(){var e=V.A;return V.A=gb,e}function js(){St=4,Ta||(Fe&4194048)!==Fe&&cn.current!==null||(qr=!0),(Ea&134217727)===0&&(or&134217727)===0||ft===null||Aa(ft,Fe,fn,!1)}function Wc(e,t,a){var i=tt;tt|=2;var c=wp(),d=_p();(ft!==e||Fe!==t)&&(xs=null,Vr(e,t)),t=!1;var S=St;e:do try{if(at!==0&&Ve!==null){var z=Ve,Q=dn;switch(at){case 8:Jc(),S=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(t=!0);var ue=at;if(at=0,dn=null,Yr(e,z,Q,ue),a&&qr){S=0;break e}break;default:ue=at,at=0,dn=null,Yr(e,z,Q,ue)}}bb(),S=St;break}catch(pe){Sp(e,pe)}while(!0);return t&&e.shellSuspendCounter++,Jn=Wa=null,tt=i,V.H=c,V.A=d,Ve===null&&(ft=null,Fe=0,Gl()),S}function bb(){for(;Ve!==null;)Np(Ve)}function xb(e,t){var a=tt;tt|=2;var i=wp(),c=_p();ft!==e||Fe!==t?(xs=null,bs=we()+500,Vr(e,t)):qr=bt(e,t);e:do try{if(at!==0&&Ve!==null){t=Ve;var d=dn;t:switch(at){case 1:at=0,dn=null,Yr(e,t,d,1);break;case 2:case 9:if(Uf(d)){at=0,dn=null,Tp(t);break}t=function(){at!==2&&at!==9||ft!==e||(at=7),In(e)},d.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Uf(d)?(at=0,dn=null,Tp(t)):(at=0,dn=null,Yr(e,t,d,7));break;case 5:var S=null;switch(Ve.tag){case 26:S=Ve.memoizedState;case 5:case 27:var z=Ve;if(S?dm(S):z.stateNode.complete){at=0,dn=null;var Q=z.sibling;if(Q!==null)Ve=Q;else{var ue=z.return;ue!==null?(Ve=ue,ws(ue)):Ve=null}break t}}at=0,dn=null,Yr(e,t,d,5);break;case 6:at=0,dn=null,Yr(e,t,d,6);break;case 8:Jc(),St=6;break e;default:throw Error(o(462))}}Sb();break}catch(pe){Sp(e,pe)}while(!0);return Jn=Wa=null,V.H=i,V.A=c,tt=a,Ve!==null?0:(ft=null,Fe=0,Gl(),St)}function Sb(){for(;Ve!==null&&!le();)Np(Ve)}function Np(e){var t=Xh(e.alternate,e,oa);e.memoizedProps=e.pendingProps,t===null?ws(e):Ve=t}function Tp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Ih(a,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=Ih(a,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:pc(t);default:Qh(a,t),t=Ve=_f(t,oa),t=Xh(a,t,oa)}e.memoizedProps=e.pendingProps,t===null?ws(e):Ve=t}function Yr(e,t,a,i){Jn=Wa=null,pc(t),zr=null,Ni=0;var c=t.return;try{if(cb(e,c,t,a,Fe)){St=1,us(e,bn(a,e.current)),Ve=null;return}}catch(d){if(c!==null)throw Ve=c,d;St=1,us(e,bn(a,e.current)),Ve=null;return}t.flags&32768?(Ze||i===1?e=!0:qr||(Fe&536870912)!==0?e=!1:(Ta=e=!0,(i===2||i===9||i===3||i===6)&&(i=cn.current,i!==null&&i.tag===13&&(i.flags|=16384))),Ep(t,e)):ws(t)}function ws(e){var t=e;do{if((t.flags&32768)!==0){Ep(t,Ta);return}e=t.return;var a=fb(t.alternate,t,oa);if(a!==null){Ve=a;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);St===0&&(St=5)}function Ep(e,t){do{var a=hb(e.alternate,e);if(a!==null){a.flags&=32767,Ve=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=a}while(e!==null);St=6,Ve=null}function Cp(e,t,a,i,c,d,S,z,Q){e.cancelPendingCommit=null;do _s();while(Mt!==0);if((tt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=qo,He(e,a,d,S,z,Q),e===ft&&(Ve=ft=null,Fe=0),Ir=t,Oa=e,ca=a,Xc=d,Kc=c,vp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Nb(De,function(){return Dp(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null,c=P.p,P.p=2,S=tt,tt|=4;try{pb(e,t,a)}finally{tt=S,P.p=c,V.T=i}}Mt=1,Op(),Ap(),Rp()}}function Op(){if(Mt===1){Mt=0;var e=Oa,t=Ir,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=V.T,V.T=null;var i=P.p;P.p=2;var c=tt;tt|=4;try{cp(t,e);var d=du,S=mf(e.containerInfo),z=d.focusedElem,Q=d.selectionRange;if(S!==z&&z&&z.ownerDocument&&pf(z.ownerDocument.documentElement,z)){if(Q!==null&&Lo(z)){var ue=Q.start,pe=Q.end;if(pe===void 0&&(pe=ue),"selectionStart"in z)z.selectionStart=ue,z.selectionEnd=Math.min(pe,z.value.length);else{var be=z.ownerDocument||document,de=be&&be.defaultView||window;if(de.getSelection){var fe=de.getSelection(),Ee=z.textContent.length,ke=Math.min(Q.start,Ee),ct=Q.end===void 0?ke:Math.min(Q.end,Ee);!fe.extend&&ke>ct&&(S=ct,ct=ke,ke=S);var oe=hf(z,ke),te=hf(z,ct);if(oe&&te&&(fe.rangeCount!==1||fe.anchorNode!==oe.node||fe.anchorOffset!==oe.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var ce=be.createRange();ce.setStart(oe.node,oe.offset),fe.removeAllRanges(),ke>ct?(fe.addRange(ce),fe.extend(te.node,te.offset)):(ce.setEnd(te.node,te.offset),fe.addRange(ce))}}}}for(be=[],fe=z;fe=fe.parentNode;)fe.nodeType===1&&be.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<be.length;z++){var ve=be[z];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}Ls=!!uu,du=uu=null}finally{tt=c,P.p=i,V.T=a}}e.current=t,Mt=2}}function Ap(){if(Mt===2){Mt=0;var e=Oa,t=Ir,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=V.T,V.T=null;var i=P.p;P.p=2;var c=tt;tt|=4;try{rp(e,t.alternate,t)}finally{tt=c,P.p=i,V.T=a}}Mt=3}}function Rp(){if(Mt===4||Mt===3){Mt=0,Se();var e=Oa,t=Ir,a=ca,i=vp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,Ir=Oa=null,kp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ca=null),mr(a),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Qe,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=V.T,c=P.p,P.p=2,V.T=null;try{for(var d=e.onRecoverableError,S=0;S<i.length;S++){var z=i[S];d(z.value,{componentStack:z.stack})}}finally{V.T=t,P.p=c}}(ca&3)!==0&&_s(),In(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Qc?Gi++:(Gi=0,Qc=e):Gi=0,Ii(0)}}function kp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wi(t)))}function _s(){return Op(),Ap(),Rp(),Dp()}function Dp(){if(Mt!==5)return!1;var e=Oa,t=Xc;Xc=0;var a=mr(ca),i=V.T,c=P.p;try{P.p=32>a?32:a,V.T=null,a=Kc,Kc=null;var d=Oa,S=ca;if(Mt=0,Ir=Oa=null,ca=0,(tt&6)!==0)throw Error(o(331));var z=tt;if(tt|=4,pp(d.current),dp(d,d.current,S,a),tt=z,Ii(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Qe,d)}catch{}return!0}finally{P.p=c,V.T=i,kp(e,t)}}function zp(e,t,a){t=bn(a,t),t=Oc(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(Ot(e,2),In(e))}function rt(e,t,a){if(e.tag===3)zp(e,e,a);else for(;t!==null;){if(t.tag===3){zp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ca===null||!Ca.has(i))){e=bn(a,e),a=Uh(2),i=ja(t,a,2),i!==null&&(Lh(a,i,t,e),Ot(i,2),In(i));break}}t=t.return}}function eu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new vb;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(a)||(Fc=!0,c.add(a),e=jb.bind(null,e,t,a),t.then(e,e))}function jb(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ft===e&&(Fe&a)===a&&(St===4||St===3&&(Fe&62914560)===Fe&&300>we()-ys?(tt&2)===0&&Vr(e,0):Pc|=a,Gr===Fe&&(Gr=0)),In(e)}function Up(e,t){t===0&&(t=mn()),e=Ka(e,t),e!==null&&(Ot(e,t),In(e))}function wb(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Up(e,a)}function _b(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(a=c.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),Up(e,a)}function Nb(e,t){return me(e,t)}var Ns=null,Fr=null,tu=!1,Ts=!1,nu=!1,Ra=0;function In(e){e!==Fr&&e.next===null&&(Fr===null?Ns=Fr=e:Fr=Fr.next=e),Ts=!0,tu||(tu=!0,Eb())}function Ii(e,t){if(!nu&&Ts){nu=!0;do for(var a=!1,i=Ns;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var d=0;else{var S=i.suspendedLanes,z=i.pingedLanes;d=(1<<31-$e(42|e)+1)-1,d&=c&~(S&~z),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,$p(i,d))}else d=Fe,d=Xt(i,i===ft?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(d&3)===0||bt(i,d)||(a=!0,$p(i,d));i=i.next}while(a);nu=!1}}function Tb(){Lp()}function Lp(){Ts=tu=!1;var e=0;Ra!==0&&Mb()&&(e=Ra);for(var t=we(),a=null,i=Ns;i!==null;){var c=i.next,d=Mp(i,t);d===0?(i.next=null,a===null?Ns=c:a.next=c,c===null&&(Fr=a)):(a=i,(e!==0||(d&3)!==0)&&(Ts=!0)),i=c}Mt!==0&&Mt!==5||Ii(e),Ra!==0&&(Ra=0)}function Mp(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var S=31-$e(d),z=1<<S,Q=c[S];Q===-1?((z&a)===0||(z&i)!==0)&&(c[S]=yt(z,t)):Q<=t&&(e.expiredLanes|=z),d&=~z}if(t=ft,a=Fe,a=Xt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&he(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||bt(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&he(i),mr(a)){case 2:case 8:a=Be;break;case 32:a=De;break;case 268435456:a=wt;break;default:a=De}return i=Bp.bind(null,e),a=me(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&he(i),e.callbackPriority=2,e.callbackNode=null,2}function Bp(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_s()&&e.callbackNode!==a)return null;var i=Fe;return i=Xt(e,e===ft?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(bp(e,i,t),Mp(e,we()),e.callbackNode!=null&&e.callbackNode===a?Bp.bind(null,e):null)}function $p(e,t){if(_s())return null;bp(e,t,!0)}function Eb(){$b(function(){(tt&6)!==0?me(Ce,Tb):Lp()})}function au(){if(Ra===0){var e=Rr;e===0&&(e=ut,ut<<=1,(ut&261888)===0&&(ut=256)),Ra=e}return Ra}function Hp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zl(""+e)}function qp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Cb(e,t,a,i,c){if(t==="submit"&&a&&a.stateNode===c){var d=Hp((c[At]||null).action),S=i.submitter;S&&(t=(t=S[At]||null)?Hp(t.formAction):S.getAttribute("formAction"),t!==null&&(d=t,S=null));var z=new Bl("action","action",null,i,c);e.push({event:z,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Ra!==0){var Q=S?qp(c,S):new FormData(c);wc(a,{pending:!0,data:Q,method:c.method,action:d},null,Q)}}else typeof d=="function"&&(z.preventDefault(),Q=S?qp(c,S):new FormData(c),wc(a,{pending:!0,data:Q,method:c.method,action:d},d,Q))},currentTarget:c}]})}}for(var ru=0;ru<Ho.length;ru++){var iu=Ho[ru],Ob=iu.toLowerCase(),Ab=iu[0].toUpperCase()+iu.slice(1);Rn(Ob,"on"+Ab)}Rn(yf,"onAnimationEnd"),Rn(bf,"onAnimationIteration"),Rn(xf,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Fy,"onTransitionRun"),Rn(Py,"onTransitionStart"),Rn(Zy,"onTransitionCancel"),Rn(Sf,"onTransitionEnd"),Bn("onMouseEnter",["mouseout","mouseover"]),Bn("onMouseLeave",["mouseout","mouseover"]),Bn("onPointerEnter",["pointerout","pointerover"]),Bn("onPointerLeave",["pointerout","pointerover"]),Pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="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(" "),Rb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function Gp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],c=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var S=i.length-1;0<=S;S--){var z=i[S],Q=z.instance,ue=z.currentTarget;if(z=z.listener,Q!==d&&c.isPropagationStopped())break e;d=z,c.currentTarget=ue;try{d(c)}catch(pe){ql(pe)}c.currentTarget=null,d=Q}else for(S=0;S<i.length;S++){if(z=i[S],Q=z.instance,ue=z.currentTarget,z=z.listener,Q!==d&&c.isPropagationStopped())break e;d=z,c.currentTarget=ue;try{d(c)}catch(pe){ql(pe)}c.currentTarget=null,d=Q}}}}function Ye(e,t){var a=t[ci];a===void 0&&(a=t[ci]=new Set);var i=e+"__bubble";a.has(i)||(Ip(t,e,2,!1),a.add(i))}function lu(e,t,a){var i=0;t&&(i|=4),Ip(a,e,i,t)}var Es="_reactListening"+Math.random().toString(36).slice(2);function su(e){if(!e[Es]){e[Es]=!0,di.forEach(function(a){a!=="selectionchange"&&(Rb.has(a)||lu(a,!1,e),lu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Es]||(t[Es]=!0,lu("selectionchange",!1,t))}}function Ip(e,t,a,i){switch(ym(t)){case 2:var c=ix;break;case 8:c=lx;break;default:c=ju}a=c.bind(null,t,a,e),c=void 0,!Eo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function ou(e,t,a,i,c){var d=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var S=i.tag;if(S===3||S===4){var z=i.stateNode.containerInfo;if(z===c)break;if(S===4)for(S=i.return;S!==null;){var Q=S.tag;if((Q===3||Q===4)&&S.stateNode.containerInfo===c)return;S=S.return}for(;z!==null;){if(S=vn(z),S===null)return;if(Q=S.tag,Q===5||Q===6||Q===26||Q===27){i=d=S;continue e}z=z.parentNode}}i=i.return}Pd(function(){var ue=d,pe=No(a),be=[];e:{var de=jf.get(e);if(de!==void 0){var fe=Bl,Ee=e;switch(e){case"keypress":if(Ll(a)===0)break e;case"keydown":case"keyup":fe=_y;break;case"focusin":Ee="focus",fe=Ro;break;case"focusout":Ee="blur",fe=Ro;break;case"beforeblur":case"afterblur":fe=Ro;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=Kd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=fy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Ey;break;case yf:case bf:case xf:fe=my;break;case Sf:fe=Oy;break;case"scroll":case"scrollend":fe=uy;break;case"wheel":fe=Ry;break;case"copy":case"cut":case"paste":fe=vy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=Jd;break;case"toggle":case"beforetoggle":fe=Dy}var ke=(t&4)!==0,ct=!ke&&(e==="scroll"||e==="scrollend"),oe=ke?de!==null?de+"Capture":null:de;ke=[];for(var te=ue,ce;te!==null;){var ve=te;if(ce=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||ce===null||oe===null||(ve=fi(te,oe),ve!=null&&ke.push(Yi(te,ve,ce))),ct)break;te=te.return}0<ke.length&&(de=new fe(de,Ee,null,a,pe),be.push({event:de,listeners:ke}))}}if((t&7)===0){e:{if(de=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",de&&a!==_o&&(Ee=a.relatedTarget||a.fromElement)&&(vn(Ee)||Ee[An]))break e;if((fe||de)&&(de=pe.window===pe?pe:(de=pe.ownerDocument)?de.defaultView||de.parentWindow:window,fe?(Ee=a.relatedTarget||a.toElement,fe=ue,Ee=Ee?vn(Ee):null,Ee!==null&&(ct=h(Ee),ke=Ee.tag,Ee!==ct||ke!==5&&ke!==27&&ke!==6)&&(Ee=null)):(fe=null,Ee=ue),fe!==Ee)){if(ke=Kd,ve="onMouseLeave",oe="onMouseEnter",te="mouse",(e==="pointerout"||e==="pointerover")&&(ke=Jd,ve="onPointerLeave",oe="onPointerEnter",te="pointer"),ct=fe==null?de:Fn(fe),ce=Ee==null?de:Fn(Ee),de=new ke(ve,te+"leave",fe,a,pe),de.target=ct,de.relatedTarget=ce,ve=null,vn(pe)===ue&&(ke=new ke(oe,te+"enter",Ee,a,pe),ke.target=ce,ke.relatedTarget=ct,ve=ke),ct=ve,fe&&Ee)t:{for(ke=kb,oe=fe,te=Ee,ce=0,ve=oe;ve;ve=ke(ve))ce++;ve=0;for(var Re=te;Re;Re=ke(Re))ve++;for(;0<ce-ve;)oe=ke(oe),ce--;for(;0<ve-ce;)te=ke(te),ve--;for(;ce--;){if(oe===te||te!==null&&oe===te.alternate){ke=oe;break t}oe=ke(oe),te=ke(te)}ke=null}else ke=null;fe!==null&&Vp(be,de,fe,ke,!1),Ee!==null&&ct!==null&&Vp(be,ct,Ee,ke,!0)}}e:{if(de=ue?Fn(ue):window,fe=de.nodeName&&de.nodeName.toLowerCase(),fe==="select"||fe==="input"&&de.type==="file")var We=sf;else if(rf(de))if(of)We=Iy;else{We=qy;var Oe=Hy}else fe=de.nodeName,!fe||fe.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ue&&wo(ue.elementType)&&(We=sf):We=Gy;if(We&&(We=We(e,ue))){lf(be,We,a,pe);break e}Oe&&Oe(e,de,ue),e==="focusout"&&ue&&de.type==="number"&&ue.memoizedProps.value!=null&&Wt(de,"number",de.value)}switch(Oe=ue?Fn(ue):window,e){case"focusin":(rf(Oe)||Oe.contentEditable==="true")&&(wr=Oe,Mo=ue,xi=null);break;case"focusout":xi=Mo=wr=null;break;case"mousedown":Bo=!0;break;case"contextmenu":case"mouseup":case"dragend":Bo=!1,gf(be,a,pe);break;case"selectionchange":if(Yy)break;case"keydown":case"keyup":gf(be,a,pe)}var Le;if(Do)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else jr?nf(e,a)&&(Pe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Pe="onCompositionStart");Pe&&(Wd&&a.locale!=="ko"&&(jr||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&jr&&(Le=Zd()):(ma=pe,Co="value"in ma?ma.value:ma.textContent,jr=!0)),Oe=Cs(ue,Pe),0<Oe.length&&(Pe=new Qd(Pe,e,null,a,pe),be.push({event:Pe,listeners:Oe}),Le?Pe.data=Le:(Le=af(a),Le!==null&&(Pe.data=Le)))),(Le=Uy?Ly(e,a):My(e,a))&&(Pe=Cs(ue,"onBeforeInput"),0<Pe.length&&(Oe=new Qd("onBeforeInput","beforeinput",null,a,pe),be.push({event:Oe,listeners:Pe}),Oe.data=Le)),Cb(be,e,ue,a,pe)}Gp(be,t)})}function Yi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Cs(e,t){for(var a=t+"Capture",i=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=fi(e,a),c!=null&&i.unshift(Yi(e,c,d)),c=fi(e,t),c!=null&&i.push(Yi(e,c,d))),e.tag===3)return i;e=e.return}return[]}function kb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vp(e,t,a,i,c){for(var d=t._reactName,S=[];a!==null&&a!==i;){var z=a,Q=z.alternate,ue=z.stateNode;if(z=z.tag,Q!==null&&Q===i)break;z!==5&&z!==26&&z!==27||ue===null||(Q=ue,c?(ue=fi(a,d),ue!=null&&S.unshift(Yi(a,ue,Q))):c||(ue=fi(a,d),ue!=null&&S.push(Yi(a,ue,Q)))),a=a.return}S.length!==0&&e.push({event:t,listeners:S})}var Db=/\r\n?/g,zb=/\u0000|\uFFFD/g;function Yp(e){return(typeof e=="string"?e:""+e).replace(Db,`
9
- `).replace(zb,"")}function Fp(e,t){return t=Yp(t),Yp(e)===t}function ot(e,t,a,i,c,d){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||br(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&br(e,""+i);break;case"className":Ae(e,"class",i);break;case"tabIndex":Ae(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ae(e,a,i);break;case"style":Yd(e,i,d);break;case"data":if(t!=="object"){Ae(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=zl(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"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 d=="function"&&(a==="formAction"?(t!=="input"&&ot(e,t,"name",c.name,c,null),ot(e,t,"formEncType",c.formEncType,c,null),ot(e,t,"formMethod",c.formMethod,c,null),ot(e,t,"formTarget",c.formTarget,c,null)):(ot(e,t,"encType",c.encType,c,null),ot(e,t,"method",c.method,c,null),ot(e,t,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=zl(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Zn);break;case"onScroll":i!=null&&Ye("scroll",e);break;case"onScrollEnd":i!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}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}a=zl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);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(a,""+i):e.removeAttribute(a);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(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),ye(e,"popover",i);break;case"xlinkActuate":qe(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":qe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":qe(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":qe(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":qe(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":qe(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":qe(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":qe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":qe(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":ye(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=oy.get(a)||a,ye(e,a,i))}}function cu(e,t,a,i,c,d){switch(a){case"style":Yd(e,i,d);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?br(e,i):(typeof i=="number"||typeof i=="bigint")&&br(e,""+i);break;case"onScroll":i!=null&&Ye("scroll",e);break;case"onScrollEnd":i!=null&&Ye("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cl.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[At]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof i=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,c);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):ye(e,a,i)}}}function Vt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var i=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var S=a[d];if(S!=null)switch(d){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ot(e,t,d,S,a,null)}}c&&ot(e,t,"srcSet",a.srcSet,a,null),i&&ot(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var z=d=S=c=null,Q=null,ue=null;for(i in a)if(a.hasOwnProperty(i)){var pe=a[i];if(pe!=null)switch(i){case"name":c=pe;break;case"type":S=pe;break;case"checked":Q=pe;break;case"defaultChecked":ue=pe;break;case"value":d=pe;break;case"defaultValue":z=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,t));break;default:ot(e,t,i,pe,a,null)}}Fa(e,d,z,Q,ue,S,c,!1);return;case"select":Ye("invalid",e),i=S=d=null;for(c in a)if(a.hasOwnProperty(c)&&(z=a[c],z!=null))switch(c){case"value":d=z;break;case"defaultValue":S=z;break;case"multiple":i=z;default:ot(e,t,c,z,a,null)}t=d,a=S,e.multiple=!!i,t!=null?pa(e,!!i,t,!1):a!=null&&pa(e,!!i,a,!0);return;case"textarea":Ye("invalid",e),d=c=i=null;for(S in a)if(a.hasOwnProperty(S)&&(z=a[S],z!=null))switch(S){case"value":i=z;break;case"defaultValue":c=z;break;case"children":d=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(91));break;default:ot(e,t,S,z,a,null)}Id(e,i,c,d);return;case"option":for(Q in a)a.hasOwnProperty(Q)&&(i=a[Q],i!=null)&&(Q==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":ot(e,t,Q,i,a,null));return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(i=0;i<Vi.length;i++)Ye(Vi[i],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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 a)if(a.hasOwnProperty(ue)&&(i=a[ue],i!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ot(e,t,ue,i,a,null)}return;default:if(wo(t)){for(pe in a)a.hasOwnProperty(pe)&&(i=a[pe],i!==void 0&&cu(e,t,pe,i,a,void 0));return}}for(z in a)a.hasOwnProperty(z)&&(i=a[z],i!=null&&ot(e,t,z,i,a,null))}function Ub(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,S=null,z=null,Q=null,ue=null,pe=null;for(fe in a){var be=a[fe];if(a.hasOwnProperty(fe)&&be!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Q=be;default:i.hasOwnProperty(fe)||ot(e,t,fe,null,i,be)}}for(var de in i){var fe=i[de];if(be=a[de],i.hasOwnProperty(de)&&(fe!=null||be!=null))switch(de){case"type":d=fe;break;case"name":c=fe;break;case"checked":ue=fe;break;case"defaultChecked":pe=fe;break;case"value":S=fe;break;case"defaultValue":z=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:fe!==be&&ot(e,t,de,fe,i,be)}}Ya(e,S,z,Q,ue,pe,d,c);return;case"select":fe=S=z=de=null;for(d in a)if(Q=a[d],a.hasOwnProperty(d)&&Q!=null)switch(d){case"value":break;case"multiple":fe=Q;default:i.hasOwnProperty(d)||ot(e,t,d,null,i,Q)}for(c in i)if(d=i[c],Q=a[c],i.hasOwnProperty(c)&&(d!=null||Q!=null))switch(c){case"value":de=d;break;case"defaultValue":z=d;break;case"multiple":S=d;default:d!==Q&&ot(e,t,c,d,i,Q)}t=z,a=S,i=fe,de!=null?pa(e,!!a,de,!1):!!i!=!!a&&(t!=null?pa(e,!!a,t,!0):pa(e,!!a,a?[]:"",!1));return;case"textarea":fe=de=null;for(z in a)if(c=a[z],a.hasOwnProperty(z)&&c!=null&&!i.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:ot(e,t,z,null,i,c)}for(S in i)if(c=i[S],d=a[S],i.hasOwnProperty(S)&&(c!=null||d!=null))switch(S){case"value":de=c;break;case"defaultValue":fe=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&ot(e,t,S,c,i,d)}Dl(e,de,fe);return;case"option":for(var Ee in a)de=a[Ee],a.hasOwnProperty(Ee)&&de!=null&&!i.hasOwnProperty(Ee)&&(Ee==="selected"?e.selected=!1:ot(e,t,Ee,null,i,de));for(Q in i)de=i[Q],fe=a[Q],i.hasOwnProperty(Q)&&de!==fe&&(de!=null||fe!=null)&&(Q==="selected"?e.selected=de&&typeof de!="function"&&typeof de!="symbol":ot(e,t,Q,de,i,fe));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 ke in a)de=a[ke],a.hasOwnProperty(ke)&&de!=null&&!i.hasOwnProperty(ke)&&ot(e,t,ke,null,i,de);for(ue in i)if(de=i[ue],fe=a[ue],i.hasOwnProperty(ue)&&de!==fe&&(de!=null||fe!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:ot(e,t,ue,de,i,fe)}return;default:if(wo(t)){for(var ct in a)de=a[ct],a.hasOwnProperty(ct)&&de!==void 0&&!i.hasOwnProperty(ct)&&cu(e,t,ct,void 0,i,de);for(pe in i)de=i[pe],fe=a[pe],!i.hasOwnProperty(pe)||de===fe||de===void 0&&fe===void 0||cu(e,t,pe,de,i,fe);return}}for(var oe in a)de=a[oe],a.hasOwnProperty(oe)&&de!=null&&!i.hasOwnProperty(oe)&&ot(e,t,oe,null,i,de);for(be in i)de=i[be],fe=a[be],!i.hasOwnProperty(be)||de===fe||de==null&&fe==null||ot(e,t,be,de,i,fe)}function Pp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var c=a[i],d=c.transferSize,S=c.initiatorType,z=c.duration;if(d&&z&&Pp(S)){for(S=0,z=c.responseEnd,i+=1;i<a.length;i++){var Q=a[i],ue=Q.startTime;if(ue>z)break;var pe=Q.transferSize,be=Q.initiatorType;pe&&Pp(be)&&(Q=Q.responseEnd,S+=pe*(Q<z?1:(z-ue)/(Q-ue)))}if(--i,t+=8*(d+S)/(c.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 uu=null,du=null;function Os(e){return e.nodeType===9?e:e.ownerDocument}function Zp(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 Xp(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 fu(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 hu=null;function Mb(){var e=window.event;return e&&e.type==="popstate"?e===hu?!1:(hu=e,!0):(hu=null,!1)}var Kp=typeof setTimeout=="function"?setTimeout:void 0,Bb=typeof clearTimeout=="function"?clearTimeout:void 0,Qp=typeof Promise=="function"?Promise:void 0,$b=typeof queueMicrotask=="function"?queueMicrotask:typeof Qp<"u"?function(e){return Qp.resolve(null).then(e).catch(Hb)}:Kp;function Hb(e){setTimeout(function(){throw e})}function ka(e){return e==="head"}function Jp(e,t){var a=t,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(c),Kr(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Fi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Fi(a);for(var d=a.firstChild;d;){var S=d.nextSibling,z=d.nodeName;d[Va]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=S}}else a==="body"&&Fi(e.ownerDocument.body);a=c}while(a);Kr(t)}function Wp(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function pu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":pu(a),ui(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function qb(e,t,a,i){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Va])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function Gb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=_n(e.nextSibling),e===null))return null;return e}function em(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function mu(e){return e.data==="$?"||e.data==="$~"}function gu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ib(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function _n(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 vu=null;function tm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return _n(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function nm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function am(e,t,a){switch(t=Os(a),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 Fi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ui(e)}var Nn=new Map,rm=new Set;function As(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ua=P.d;P.d={f:Vb,r:Yb,D:Fb,C:Pb,L:Zb,m:Xb,X:Qb,S:Kb,M:Jb};function Vb(){var e=ua.f(),t=Ss();return e||t}function Yb(e){var t=Mn(e);t!==null&&t.tag===5&&t.type==="form"?Sh(t):ua.r(e)}var Pr=typeof document>"u"?null:document;function im(e,t,a){var i=Pr;if(i&&typeof t=="string"&&t){var c=kt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),rm.has(c)||(rm.add(c),e={rel:e,crossOrigin:a,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Vt(t,"link",e),Rt(t),i.head.appendChild(t)))}}function Fb(e){ua.D(e),im("dns-prefetch",e,null)}function Pb(e,t){ua.C(e,t),im("preconnect",e,t)}function Zb(e,t,a){ua.L(e,t,a);var i=Pr;if(i&&e&&t){var c='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+kt(a.imageSizes)+'"]')):c+='[href="'+kt(e)+'"]';var d=c;switch(t){case"style":d=Zr(e);break;case"script":d=Xr(e)}Nn.has(d)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Nn.set(d,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Pi(d))||t==="script"&&i.querySelector(Zi(d))||(t=i.createElement("link"),Vt(t,"link",e),Rt(t),i.head.appendChild(t)))}}function Xb(e,t){ua.m(e,t);var a=Pr;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+kt(i)+'"][href="'+kt(e)+'"]',d=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Xr(e)}if(!Nn.has(d)&&(e=x({rel:"modulepreload",href:e},t),Nn.set(d,e),a.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Zi(d)))return}i=a.createElement("link"),Vt(i,"link",e),Rt(i),a.head.appendChild(i)}}}function Kb(e,t,a){ua.S(e,t,a);var i=Pr;if(i&&e){var c=ha(i).hoistableStyles,d=Zr(e);t=t||"default";var S=c.get(d);if(!S){var z={loading:0,preload:null};if(S=i.querySelector(Pi(d)))z.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Nn.get(d))&&yu(e,a);var Q=S=i.createElement("link");Rt(Q),Vt(Q,"link",e),Q._p=new Promise(function(ue,pe){Q.onload=ue,Q.onerror=pe}),Q.addEventListener("load",function(){z.loading|=1}),Q.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Rs(S,t,i)}S={type:"stylesheet",instance:S,count:1,state:z},c.set(d,S)}}}function Qb(e,t){ua.X(e,t);var a=Pr;if(a&&e){var i=ha(a).hoistableScripts,c=Xr(e),d=i.get(c);d||(d=a.querySelector(Zi(c)),d||(e=x({src:e,async:!0},t),(t=Nn.get(c))&&bu(e,t),d=a.createElement("script"),Rt(d),Vt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(c,d))}}function Jb(e,t){ua.M(e,t);var a=Pr;if(a&&e){var i=ha(a).hoistableScripts,c=Xr(e),d=i.get(c);d||(d=a.querySelector(Zi(c)),d||(e=x({src:e,async:!0,type:"module"},t),(t=Nn.get(c))&&bu(e,t),d=a.createElement("script"),Rt(d),Vt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(c,d))}}function lm(e,t,a,i){var c=(c=ge.current)?As(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Zr(a.href),a=ha(c).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Zr(a.href);var d=ha(c).hoistableStyles,S=d.get(e);if(S||(c=c.ownerDocument||c,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,S),(d=c.querySelector(Pi(e)))&&!d._p&&(S.instance=d,S.state.loading=5),Nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Nn.set(e,a),d||Wb(c,e,a,S.state))),t&&i===null)throw Error(o(528,""));return S}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xr(a),a=ha(c).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Zr(e){return'href="'+kt(e)+'"'}function Pi(e){return'link[rel="stylesheet"]['+e+"]"}function sm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Wb(e,t,a,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}),Vt(t,"link",a),Rt(t),e.head.appendChild(t))}function Xr(e){return'[src="'+kt(e)+'"]'}function Zi(e){return"script[async]"+e}function om(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+kt(a.href)+'"]');if(i)return t.instance=i,Rt(i),i;var c=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Rt(i),Vt(i,"style",c),Rs(i,a.precedence,e),t.instance=i;case"stylesheet":c=Zr(a.href);var d=e.querySelector(Pi(c));if(d)return t.state.loading|=4,t.instance=d,Rt(d),d;i=sm(a),(c=Nn.get(c))&&yu(i,c),d=(e.ownerDocument||e).createElement("link"),Rt(d);var S=d;return S._p=new Promise(function(z,Q){S.onload=z,S.onerror=Q}),Vt(d,"link",i),t.state.loading|=4,Rs(d,a.precedence,e),t.instance=d;case"script":return d=Xr(a.src),(c=e.querySelector(Zi(d)))?(t.instance=c,Rt(c),c):(i=a,(c=Nn.get(d))&&(i=x({},a),bu(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),Rt(c),Vt(c,"link",i),e.head.appendChild(c),t.instance=c);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,Rs(i,a.precedence,e));return t.instance}function Rs(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,d=c,S=0;S<i.length;S++){var z=i[S];if(z.dataset.precedence===t)d=z;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ks=null;function cm(e,t,a){if(ks===null){var i=new Map,c=ks=new Map;c.set(a,i)}else c=ks,i=c.get(a),i||(i=new Map,c.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[Va]||d[Nt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var S=d.getAttribute(t)||"";S=e+S;var z=i.get(S);z?z.push(d):i.set(S,[d])}}return i}function um(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ex(e,t,a){if(a===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 dm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tx(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Zr(i.href),d=t.querySelector(Pi(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ds.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Rt(d);return}d=t.ownerDocument||t,i=sm(i),(c=Nn.get(c))&&yu(i,c),d=d.createElement("link"),Rt(d);var S=d;S._p=new Promise(function(z,Q){S.onload=z,S.onerror=Q}),Vt(d,"link",i),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ds.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var xu=0;function nx(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&xu===0&&(xu=62500*Lb());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>xu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zs=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zs=new Map,t.forEach(ax,e),zs=null,Ds.call(e))}function ax(e,t){if(!(t.state.loading&4)){var a=zs.get(e);if(a)var i=a.get(null);else{a=new Map,zs.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var S=c[d];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),i=S)}i&&a.set(null,i)}c=t.instance,S=c.getAttribute("data-precedence"),d=a.get(S)||i,d===i&&a.set(null,c),a.set(S,c),this.count++,i=Ds.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Xi={$$typeof:A,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function rx(e,t,a,i,c,d,S,z,Q){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=fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.hiddenUpdates=fa(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function fm(e,t,a,i,c,d,S,z,Q,ue,pe,be){return e=new rx(e,t,a,S,Q,ue,pe,be,z),t=1,d===!0&&(t|=24),d=on(3,null,null,t),e.current=d,d.stateNode=e,t=Wo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:i,isDehydrated:a,cache:t},ac(d),e}function hm(e){return e?(e=Tr,e):Tr}function pm(e,t,a,i,c,d){c=hm(c),i.context===null?i.context=c:i.pendingContext=c,i=Sa(t),i.payload={element:a},d=d===void 0?null:d,d!==null&&(i.callback=d),a=ja(e,i,t),a!==null&&(ln(a,e,t),Ei(a,e,t))}function mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Su(e,t){mm(e,t),(e=e.alternate)&&mm(e,t)}function gm(e){if(e.tag===13||e.tag===31){var t=Ka(e,67108864);t!==null&&ln(t,e,67108864),Su(e,67108864)}}function vm(e){if(e.tag===13||e.tag===31){var t=hn();t=pr(t);var a=Ka(e,t);a!==null&&ln(a,e,t),Su(e,t)}}var Ls=!0;function ix(e,t,a,i){var c=V.T;V.T=null;var d=P.p;try{P.p=2,ju(e,t,a,i)}finally{P.p=d,V.T=c}}function lx(e,t,a,i){var c=V.T;V.T=null;var d=P.p;try{P.p=8,ju(e,t,a,i)}finally{P.p=d,V.T=c}}function ju(e,t,a,i){if(Ls){var c=wu(i);if(c===null)ou(e,t,i,Ms,a),bm(e,i);else if(ox(c,e,t,a,i))i.stopPropagation();else if(bm(e,i),t&4&&-1<sx.indexOf(e)){for(;c!==null;){var d=Mn(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var S=lt(d.pendingLanes);if(S!==0){var z=d;for(z.pendingLanes|=2,z.entangledLanes|=2;S;){var Q=1<<31-$e(S);z.entanglements[1]|=Q,S&=~Q}In(d),(tt&6)===0&&(bs=we()+500,Ii(0))}}break;case 31:case 13:z=Ka(d,2),z!==null&&ln(z,d,2),Ss(),Su(d,2)}if(d=wu(i),d===null&&ou(e,t,i,Ms,a),d===c)break;c=d}c!==null&&i.stopPropagation()}else ou(e,t,i,null,a)}}function wu(e){return e=No(e),_u(e)}var Ms=null;function _u(e){if(Ms=null,e=vn(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=f(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ms=e,null}function ym(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(xe()){case Ce:return 2;case Be:return 8;case De:case jt:return 32;case wt:return 268435456;default:return 32}default:return 32}}var Nu=!1,Da=null,za=null,Ua=null,Ki=new Map,Qi=new Map,La=[],sx="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 bm(e,t){switch(e){case"focusin":case"focusout":Da=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":Ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qi.delete(t.pointerId)}}function Ji(e,t,a,i,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:d,targetContainers:[c]},t!==null&&(t=Mn(t),t!==null&&gm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function ox(e,t,a,i,c){switch(t){case"focusin":return Da=Ji(Da,e,t,a,i,c),!0;case"dragenter":return za=Ji(za,e,t,a,i,c),!0;case"mouseover":return Ua=Ji(Ua,e,t,a,i,c),!0;case"pointerover":var d=c.pointerId;return Ki.set(d,Ji(Ki.get(d)||null,e,t,a,i,c)),!0;case"gotpointercapture":return d=c.pointerId,Qi.set(d,Ji(Qi.get(d)||null,e,t,a,i,c)),!0}return!1}function xm(e){var t=vn(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=f(a),t!==null){e.blockedOn=t,gr(e.priority,function(){vm(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,gr(e.priority,function(){vm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=wu(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);_o=i,a.target.dispatchEvent(i),_o=null}else return t=Mn(a),t!==null&&gm(t),e.blockedOn=a,!1;t.shift()}return!0}function Sm(e,t,a){Bs(e)&&a.delete(t)}function cx(){Nu=!1,Da!==null&&Bs(Da)&&(Da=null),za!==null&&Bs(za)&&(za=null),Ua!==null&&Bs(Ua)&&(Ua=null),Ki.forEach(Sm),Qi.forEach(Sm)}function $s(e,t){e.blockedOn===t&&(e.blockedOn=null,Nu||(Nu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,cx)))}var Hs=null;function jm(e){Hs!==e&&(Hs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Hs===e&&(Hs=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(_u(i||a)===null)continue;break}var d=Mn(a);d!==null&&(e.splice(t,3),t-=3,wc(d,{pending:!0,data:c,method:a.method,action:i},i,c))}}))}function Kr(e){function t(Q){return $s(Q,e)}Da!==null&&$s(Da,e),za!==null&&$s(za,e),Ua!==null&&$s(Ua,e),Ki.forEach(t),Qi.forEach(t);for(var a=0;a<La.length;a++){var i=La[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<La.length&&(a=La[0],a.blockedOn===null);)xm(a),a.blockedOn===null&&La.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var c=a[i],d=a[i+1],S=c[At]||null;if(typeof d=="function")S||jm(a);else if(S){var z=null;if(d&&d.hasAttribute("formAction")){if(c=d,S=d[At]||null)z=S.formAction;else if(_u(c)!==null)continue}else z=S.action;typeof z=="function"?a[i+1]=z:(a.splice(i,3),i-=3),jm(a)}}}function wm(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(S){return c=S})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Tu(e){this._internalRoot=e}qs.prototype.render=Tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=hn();pm(a,i,e,t,null,null)},qs.prototype.unmount=Tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pm(e.current,2,null,e,null,null),Ss(),t[An]=null}};function qs(e){this._internalRoot=e}qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=oi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<La.length&&t!==0&&t<La[a].priority;a++);La.splice(a,0,e),a===0&&xm(e)}};var _m=l.version;if(_m!=="19.2.8")throw Error(o(527,_m,"19.2.8"));P.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=m(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var ux={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gs.isDisabled&&Gs.supportsFiber)try{Qe=Gs.inject(ux),gt=Gs}catch{}}return el.createRoot=function(e,t){if(!u(e))throw Error(o(299));var a=!1,i="",c=Rh,d=kh,S=Dh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(S=t.onRecoverableError)),t=fm(e,1,!1,null,null,a,i,null,c,d,S,wm),e[An]=t.current,su(e),new Tu(t)},el.hydrateRoot=function(e,t,a){if(!u(e))throw Error(o(299));var i=!1,c="",d=Rh,S=kh,z=Dh,Q=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(z=a.onRecoverableError),a.formState!==void 0&&(Q=a.formState)),t=fm(e,1,!0,t,a??null,i,c,Q,d,S,z,wm),t.context=hm(null),a=t.current,i=hn(),i=pr(i),c=Sa(i),c.callback=null,ja(a,c,i),a=i,t.current.lanes=a,Ot(t,a),In(t),e[An]=t.current,su(e),new qs(t)},el.version="19.2.8",el}var zm;function xx(){if(zm)return Ou.exports;zm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Ou.exports=bx(),Ou.exports}var Sx=xx();const jx={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:"Test Case",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"โปรเจกต์ใหม่",projects:"โปรเจกต์",files:"ไฟล์",settings:"ตั้งค่าโปรเจกต์",localWorkspace:"พื้นที่ทำงานในเครื่อง",storedHere:"โปรเจกต์ถูกเก็บไว้ในอุปกรณ์นี้",activeTarget:"เว็บไซต์ของโปรเจกต์",savedProject:"บันทึกแล้ว",newWorkspace:"พื้นที่ทำงานใหม่",scoutWebsite:"สำรวจเว็บไซต์",targetUrl:"URL เป้าหมาย",startPath:"จุดเริ่มต้น (Path)",scopePath:"ขอบเขต (Path)",maxPages:"จำนวนหน้าสูงสุด",maxDepth:"ระดับความลึก",language:"ภาษาของ Test Case",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"กำหนดขอบเขตการสำรวจเฉพาะหน้า หรือเฉพาะ path ที่ต้องการ",startPathHelp:"หน้าเริ่มต้นภายในเว็บไซต์ เช่น /admin/users ใช้เมื่ออยากเริ่มจากหน้าลึก ๆ",scopePathHelp:"จำกัดการสำรวจให้อยู่ใต้ path นี้ เช่น /admin จะไม่ออกไปสำรวจส่วนอื่นของเว็บ",startPathHint:"หน้าที่ต้องการให้เริ่มสำรวจหลังเข้าสู่ระบบ",scopePathHint:"จำกัดการสำรวจให้อยู่ในส่วนนี้",explore:"ขอบเขตการสำรวจ",currentPageOnly:"สำรวจหน้าเดียว",thisSection:"สำรวจเฉพาะส่วนนี้",entireSite:"สำรวจทั้งเว็บไซต์",targetedGuideTitle:"วิธีใช้ Targeted Exploration",targetedGuideTargetUrl:"ใส่ URL หลักของระบบที่ต้องการให้ LazyScout สำรวจ",targetedGuideStartPath:"ใส่ path ที่ต้องการให้เริ่ม เช่น",targetedGuideScopePath:"ใส่ขอบเขต เช่น",targetedGuideScopePathEnd:"เพื่อไม่ให้ flow โยกไปหน้าอื่น",targetedGuideCurrentPage:"สำรวจเพียงหน้าเดียว",targetedGuideThisSection:"สำรวจเฉพาะ scope",targetedGuideEntireSite:"สำรวจทั้งเว็บไซต์",targetedGuideExample:"ตัวอย่าง: Target URL = ระบบของคุณ, Start Path = /admin/users, Scope Path = /admin, เลือก This section",search:"ค้นหา",addCase:"เพิ่ม Test Case",screenshot:"Screenshot",delete:"ลบ",export:"Export CSV",activeProjectTarget:"เว็บไซต์เป้าหมายของโปรเจกต์",currentProject:"โปรเจกต์ปัจจุบัน",scoutDescription:"ใส่ URL แล้วให้ Playwright ค้นหาหน้า ปุ่ม ฟอร์ม และสถานะ UI โดยอัตโนมัติ",scouting:"กำลังสำรวจ…",optional:"ไม่บังคับ",targetUrlHelp:"URL หลักของเว็บไซต์ที่ต้องการให้ LazyScout เปิดและสำรวจ เช่น https://example.com",maxPagesHelp:"จำนวนหน้าสูงสุดที่ Scout จะสำรวจ ค่ายิ่งมากอาจใช้เวลานานขึ้น",maxDepthHelp:"ระดับความลึกของลิงก์จากหน้าเริ่มต้น 0 คือหน้าเดียว และ 1 คือหน้าที่ลิงก์จากหน้านั้น",testLanguageHelp:"ภาษาที่ใช้สร้างชื่อและรายละเอียดของ Test Case",maxPagesDescription:"จำนวนหน้าสูงสุดที่จะสำรวจ",maxDepthDescription:"ระดับความลึกของลิงก์จากหน้าเป้าหมาย",testLanguageDescription:"ภาษาที่ใช้สร้างรายละเอียด Test Case",safetyNotice:"Playwright จะอยู่ภายใน origin เดียวกัน และหลีกเลี่ยงการกระทำที่อาจเปลี่ยนแปลงหรือลบข้อมูล",includeApiChecks:"รวม API checks จาก XHR/fetch",validationMatrix:"รวม Validation Matrix แบบครบชุด",validationMatrixHelp:"สร้าง Test Case สำหรับ required, รูปแบบผิด, ความยาว, ช่วงตัวเลข, นโยบายรหัสผ่าน และ Login ไม่สำเร็จ จากกฎที่ตรวจพบในฟอร์ม",validationMatrixSafety:"Scout จะค้นหาและสร้างเคสเท่านั้น ส่วน Login ผิดและ Server validation จะยิงหนึ่งครั้งเมื่อผู้ใช้สั่ง Run Automation",waitAfterNavigation:"รอหลังเปลี่ยนหน้า",debugMode:"โหมด Debug",scoutAgain:"สำรวจอีกครั้ง",regenerateProject:"ต้องการสร้างข้อมูลของโปรเจกต์นี้ใหม่หรือไม่?",regenerateWarning:"Scout Site จะเขียนทับหน้าที่ค้นพบและ Test Case ที่สร้างไว้ของโปรเจกต์นี้",regenerateHint:"Export Test Case ที่ต้องการเก็บไว้ก่อนยืนยัน ส่วน Project Settings จะยังคงเดิม",cancel:"ยกเลิก",expandScout:"ขยายฟอร์ม Scout",collapseScout:"พับฟอร์ม Scout",help:"คำอธิบาย"}},nv=I.createContext(null);function wx({children:n}){const[l,s]=I.useState(()=>localStorage.getItem("lazyscout-language")||"en");I.useEffect(()=>{localStorage.setItem("lazyscout-language",l),document.documentElement.lang=l},[l]);const o=I.useMemo(()=>({language:l,setLanguage:s,toggleLanguage:()=>s(u=>u==="en"?"th":"en"),t:u=>jx[l][u]}),[l]);return r.jsx(nv.Provider,{value:o,children:n})}function Cn(){const n=I.useContext(nv);if(!n)throw new Error("useLanguage must be used inside LanguageProvider");return n}const av="lazyscout-test-case-language";function _x(){const n=localStorage.getItem(av);return n==="th"||n==="en"?n:"en"}function cr({text:n}){const{t:l}=Cn(),[s,o]=I.useState(!1);return r.jsxs("span",{className:`help-tip ${s?"is-open":""}`,children:[r.jsx("button",{type:"button","aria-label":l("help"),"aria-expanded":s,title:n,onClick:u=>{u.preventDefault(),u.stopPropagation(),o(h=>!h)},children:"?"}),r.jsx("span",{className:"help-tip-popover",role:"tooltip",children:n})]})}function Nx({loading:n,initialUrl:l="",hasExistingData:s=!1,initialLanguage:o,onLanguageChange:u,onAnalyze:h}){const{t:f}=Cn(),[p,g]=I.useState(l),[m,j]=I.useState(20),[x,b]=I.useState(3),[y,O]=I.useState(o??_x),[N,_]=I.useState(!1),[w,C]=I.useState(750),[A,H]=I.useState(""),[D,K]=I.useState(""),[G,re]=I.useState("site"),[$,F]=I.useState(!1),[ne,M]=I.useState(!1),[q,T]=I.useState(!1),Z=(()=>{try{return new URL(l).hostname}catch{return"Current project"}})();function V(X){if(X.preventDefault(),!(!p.trim()||n)){if(s){T(!0);return}P()}}function P(){const X=Math.min(100,Math.max(1,m===""?20:m)),k=Math.min(10,Math.max(0,x===""?3:x));h(p.trim(),X,k,y,N,w,A.trim()||void 0,D.trim()||void 0,G,$),T(!1)}return r.jsxs("form",{onSubmit:V,className:l?"project-scout-card":"new-project-card",children:[l&&r.jsxs("div",{className:"project-target-heading",children:[r.jsx("span",{className:"target-glow",children:"◎"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("activeProjectTarget")}),r.jsx("h2",{children:Z}),r.jsx("span",{children:l})]}),r.jsxs("span",{className:"target-status",children:[r.jsx("i",{})," ",f("savedProject")]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${ne?"is-collapsed":""}`,onClick:()=>M(X=>!X),"aria-label":f(ne?"expandScout":"collapseScout"),title:f(ne?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),!l&&r.jsxs("div",{className:"new-project-hero",children:[r.jsx("span",{className:"scout-orbit",children:"✦"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("localWorkspace")}),r.jsx("h2",{children:f("scoutWebsite")}),r.jsx("p",{children:f("scoutDescription")})]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${ne?"is-collapsed":""}`,onClick:()=>M(X=>!X),"aria-label":f(ne?"expandScout":"collapseScout"),title:f(ne?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),r.jsxs("div",{className:`scout-form-body ${ne?"is-collapsed":""}`,children:[r.jsxs("div",{className:"scout-form-grid",children:[r.jsxs("div",{className:"scout-url-field",children:[r.jsxs("label",{className:"field-label",htmlFor:"target-url",children:[f("targetUrl"),r.jsx(cr,{text:f("targetUrlHelp")})]}),r.jsx("input",{id:"target-url",className:"field",value:p,onChange:X=>g(X.target.value),placeholder:"https://example.com",autoComplete:"off",disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-pages",children:[f("maxPages"),r.jsx(cr,{text:f("maxPagesHelp")})]}),r.jsx("input",{id:"max-pages",className:"field",type:"number",min:1,max:100,value:m,onChange:X=>j(X.target.value===""?"":Math.min(100,Math.max(1,Number(X.target.value)))),disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-depth",children:[f("maxDepth"),r.jsx(cr,{text:f("maxDepthHelp")})]}),r.jsx("input",{id:"max-depth",className:"field",type:"number",min:0,max:10,value:x,onChange:X=>b(X.target.value===""?"":Math.min(10,Math.max(0,Number(X.target.value)))),disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"test-language",children:[f("language"),r.jsx(cr,{text:f("testLanguageHelp")})]}),r.jsxs("select",{id:"test-language",className:"field",value:y,onChange:X=>{const k=X.target.value;O(k),localStorage.setItem(av,k),u?.(k)},disabled:n,children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsx("button",{type:"submit",className:"btn btn-primary scout-submit",disabled:n||!p.trim(),children:f(n?"scouting":"scoutSite")})]}),!l&&r.jsxs("div",{className:"scout-options-help",children:[r.jsxs("span",{children:[r.jsx("b",{children:f("maxPages")})," ",f("maxPagesDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("maxDepth")})," ",f("maxDepthDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("language")})," ",f("testLanguageDescription")]})]}),r.jsxs("div",{className:"mt-3 border-t border-slate-100 pt-3",children:[r.jsxs("p",{className:"text-xs font-semibold text-slate-700 mb-2",children:[f("targetedExploration")," ",r.jsx(cr,{text:f("targetedExplorationHelp")})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"start-path",children:[f("startPath"),r.jsx(cr,{text:f("startPathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"start-path",className:"field text-sm",value:A,onChange:X=>H(X.target.value),placeholder:"/admin/users",autoComplete:"off",disabled:n}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("startPathHint")})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"scope-path",children:[f("scopePath"),r.jsx(cr,{text:f("scopePathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"scope-path",className:"field text-sm",value:D,onChange:X=>K(X.target.value),placeholder:"/admin",autoComplete:"off",disabled:n}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("scopePathHint")})]})]}),r.jsxs("div",{className:"mt-3",children:[r.jsx("label",{className:"field-label text-xs",children:f("explore")}),r.jsxs("div",{className:"flex gap-4 mt-1",children:[r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"current-page",checked:G==="current-page",onChange:()=>re("current-page"),disabled:n}),f("currentPageOnly")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"scope",checked:G==="scope",onChange:()=>re("scope"),disabled:n}),f("thisSection")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"site",checked:G==="site",onChange:()=>re("site"),disabled:n}),f("entireSite")]})]})]})]}),r.jsxs("details",{className:"scout-guide",children:[r.jsx("summary",{children:f("targetedGuideTitle")}),r.jsxs("div",{className:"scout-guide-body",children:[r.jsx("img",{src:"/lazyscout-icon-v2.png",alt:"LazyScout"}),r.jsxs("div",{children:[r.jsxs("p",{children:[r.jsx("b",{children:f("targetUrl")})," ",f("targetedGuideTargetUrl")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("startPath")})," ",f("targetedGuideStartPath")," ",r.jsx("code",{children:"/admin/users"})]}),r.jsxs("p",{children:[r.jsx("b",{children:f("scopePath")})," ",f("targetedGuideScopePath")," ",r.jsx("code",{children:"/admin"})," ",f("targetedGuideScopePathEnd")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("currentPageOnly")})," ",f("targetedGuideCurrentPage")," · ",r.jsx("b",{children:f("thisSection")})," ",f("targetedGuideThisSection")," · ",r.jsx("b",{children:f("entireSite")})," ",f("targetedGuideEntireSite")]}),r.jsx("p",{className:"text-slate-500",children:f("targetedGuideExample")})]})]})]}),r.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:[r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:N,onChange:X=>_(X.target.checked),className:"h-4 w-4",disabled:n})," ",f("includeApiChecks")]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[f("waitAfterNavigation")," ",r.jsx("input",{className:"field w-24",type:"number",min:0,max:5e3,step:250,value:w,onChange:X=>C(X.target.value===""?0:Number(X.target.value)),disabled:n})," ","ms"]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:$,onChange:X=>F(X.target.checked),className:"h-4 w-4",disabled:n})," ",f("debugMode")]})]})]}),q&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal scout-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"scout-confirm-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("scoutAgain")}),r.jsx("h2",{id:"scout-confirm-title",children:f("regenerateProject")})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>T(!1),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:f("regenerateWarning")}),r.jsx("p",{className:"text-sm text-slate-500",children:f("regenerateHint")})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>T(!1),children:f("cancel")}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:P,children:f("scoutSite")})]})]})})]})}function Du({message:n,hint:l}){return r.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[r.jsx("p",{className:"text-sm font-semibold text-red-700",children:n}),l&&r.jsx("p",{className:"mt-1 text-sm text-red-600",children:l})]})}function Tx({result:n,activeUrl:l,onSelect:s}){const[o,u]=I.useState(!1),{language:h}=Cn(),f=n.pages.reduce((p,g)=>{const m=new URL(g.finalUrl).pathname||"/";return(p[m]??=[]).push(g),p},{});return r.jsxs("aside",{className:`workspace-panel workspace-tree ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsx("button",{type:"button",className:"tree-panel-toggle",onClick:()=>u(p=>!p),"aria-label":o?h==="th"?"ขยาย Explorer":"Expand Explorer":h==="th"?"พับ Explorer":"Collapse Explorer",title:o?h==="th"?"ขยาย Explorer":"Expand Explorer":h==="th"?"พับ Explorer":"Collapse Explorer",children:o?"›":"‹"}),r.jsxs("div",{className:"tree-panel-heading",children:[r.jsx("p",{className:"eyebrow",children:"Explorer"}),r.jsx("h2",{children:"State Tree"})]}),r.jsx("span",{className:"status-dot status-pass",title:"scan complete"})]}),!o&&r.jsxs("div",{className:"tree-meta",children:[r.jsxs("span",{children:[n.pages.length," pages"]}),r.jsxs("span",{children:[n.actionGraph.states.length," states"]})]}),!o&&r.jsx("div",{className:"tree-list",children:Object.entries(f).map(([p,g])=>r.jsxs("div",{className:"tree-branch",children:[r.jsxs("div",{className:"tree-path",children:[r.jsx("span",{className:"tree-chevron",children:"⌄"}),r.jsx("span",{className:"tree-folder",children:"●"}),p]}),g.map(m=>r.jsxs("button",{type:"button",onClick:()=>s(m.finalUrl),className:`tree-node ${l===m.finalUrl?"is-active":""}`,children:[r.jsx("span",{className:"tree-node-icon",children:m.state?.visibleDialogs.length?"◈":"◇"}),r.jsx("span",{className:"truncate",children:m.state?.visibleDialogs[0]??(m.title||"Untitled page")}),r.jsx("span",{className:"tree-node-count",children:m.buttons.length})]},m.state?.id??m.finalUrl))]},p))}),!o&&r.jsxs("div",{className:"tree-footer",children:[r.jsx("span",{className:"status-dot status-pass"})," Safe exploration only",r.jsx("br",{}),r.jsx("span",{className:"status-dot status-warn"})," Destructive actions blocked"]})]})}const rv=["password","passwd","token","access_token","refresh_token","api_key","apikey","authorization","cookie","set-cookie","secret","client_secret","session","sessionid"];rv.map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");rv.filter(n=>n!=="authorization").map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");const iv=["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","ลบ","ชำระเงิน","จ่าย","โอน","ซื้อ","สั่งซื้อ","ยืนยันการชำระ"],Ex=100,Cx=80;function lv(n){if(!Array.isArray(n))return[];const l=n.filter(s=>typeof s=="string").map(s=>s.trim().toLowerCase().slice(0,Cx)).filter(Boolean);return[...new Set(l)].slice(0,Ex)}function ur(n){const l=n.name||n.label||n.text||n.placeholder;return l&&n.role?`${n.role} "${l}"`:l?`"${l}"`:n.cssSelector?`element (${n.cssSelector})`:"element"}function li(n){if(n.description)return n.description;switch(n.type){case"navigate":return`Navigate to ${n.url}`;case"click":return`Click ${ur(n.target)}`;case"fill":return`Enter "${n.value}" in ${ur(n.target)}`;case"select":return`Select "${n.option}" from ${ur(n.target)}`;case"check":return`${n.checked?"Check":"Uncheck"} ${ur(n.target)}`;case"wait":return`Wait for ${n.mode}: ${n.value}`;case"assertVisible":return`Verify that ${ur(n.target)} is visible`;case"assertText":return n.target?`Verify that ${ur(n.target)} shows "${n.text}"`:`Verify that the page shows "${n.text}"`;case"assertUrl":return`Verify that the URL contains "${n.urlContains}"`;case"assertInvalid":return`Verify that ${ur(n.target)} is invalid and the form remains open`;case"assertValidation":return"Wait for a visible validation or error message";case"manual":return n.description}}function Ox(n){return n.map((l,s)=>`${s+1}. ${li(l)}`).join(`
10
- `)}function vd(n,l){return`TC-${n}-${String(l).padStart(3,"0")}`}function yd(n,l){return`TD-${n}-${String(l).padStart(3,"0")}`}function Ax(n="MANUAL",l=yd("MANUAL",1),s=""){return{id:l,module:n,sourceUrl:s,field:"",inputType:"text",required:!1,validValue:"",invalidValue:""}}function Rx(n="MANUAL",l=vd("MANUAL",1),s=""){return{id:l,module:n,title:"New test case",preconditions:[],steps:[],expectedResult:"",type:"positive",priority:"medium",automationStatus:"manual",status:"pending",sourceUrl:s}}const kx={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"},Dx={high:"bg-red-100 text-red-800",medium:"bg-blue-100 text-blue-800",low:"bg-slate-100 text-slate-700"},zx={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 Ux({value:n}){return r.jsx("span",{className:`badge ${kx[n]}`,children:n})}function Lx({value:n}){return r.jsx("span",{className:`badge ${Dx[n]}`,children:n})}function Mx({value:n}){return r.jsx("span",{className:`badge ${zx[n]}`,children:n})}function Bx({testCase:n,onEdit:l,onClose:s}){return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:o=>o.target===o.currentTarget&&s(),children:r.jsxs("section",{className:"modern-modal test-detail-modal",role:"dialog","aria-modal":"true","aria-labelledby":"test-case-detail-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test Case detail"}),r.jsx("h2",{id:"test-case-detail-title",children:n.id}),r.jsx("p",{children:n.title})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:s,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"test-detail-body",children:[r.jsxs("div",{className:"test-detail-meta",children:[r.jsx(Ux,{value:n.type}),r.jsx(Lx,{value:n.priority}),r.jsx(Mx,{value:n.automationStatus}),r.jsx("span",{className:"badge bg-slate-100 text-slate-600",children:n.folder??n.module})]}),(n.tags?.length||n.requirements?.length)&&r.jsxs("section",{className:"traceability-meta",children:[n.tags?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Tags"}),n.tags.map(o=>r.jsx("span",{className:"tag-chip",children:o},o))]}):null,n.requirements?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Requirements / Tickets"}),n.requirements.map(o=>r.jsx("span",{className:"requirement-chip",children:o},o))]}):null]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Preconditions"}),n.preconditions.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ul",{className:"list-inside list-disc space-y-1 text-sm text-slate-700",children:n.preconditions.map((o,u)=>r.jsx("li",{children:o},u))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Steps"}),n.steps.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ol",{className:"space-y-2 text-sm text-slate-700",children:n.steps.map((o,u)=>r.jsxs("li",{className:"test-detail-step",children:[r.jsx("span",{children:u+1}),r.jsxs("div",{children:[li(o),r.jsxs("small",{children:["[",o.type,"]"]})]})]},u))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Expected Result"}),r.jsx("p",{className:"text-sm text-slate-700",children:n.expectedResult||"—"})]}),n.notes&&r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Notes from Generator"}),r.jsx("p",{className:"text-sm text-slate-500",children:n.notes})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Source URL"}),r.jsx("p",{className:"break-all text-xs text-slate-500",children:n.sourceUrl})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:l,children:"Edit Test Case"})]})]})})}function $x({testCase:n,onSave:l,onCancel:s}){const[o,u]=I.useState({...n}),[h,f]=I.useState(n.preconditions.join(`
11
- `)),[p,g]=I.useState((n.tags??[]).join(", ")),[m,j]=I.useState((n.requirements??[]).join(", "));I.useEffect(()=>{function _(w){w.key==="Escape"&&s()}return document.addEventListener("keydown",_),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",_),document.body.style.overflow=""}},[s]);function x(_){u(w=>({...w,..._}))}function b(_,w){u(C=>({...C,steps:C.steps.map((A,H)=>H===_?{...A,description:w}:A)}))}function y(_){u(w=>({...w,steps:w.steps.filter((C,A)=>A!==_)}))}function O(){u(_=>({..._,steps:[..._.steps,{type:"manual",description:"New step"}]}))}function N(){l({...o,preconditions:h.split(`
12
- `).map(_=>_.trim()).filter(Boolean),tags:Um(p),requirements:Um(m)})}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:_=>_.target===_.currentTarget&&s(),children:r.jsxs("div",{className:"modern-modal test-case-editor-modal",children:[r.jsxs("div",{className:"card-title flex shrink-0 items-center justify-between",children:[r.jsxs("span",{children:["Edit ",o.id]}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:s,"aria-label":"Close editor",children:"✕"})]}),r.jsxs("div",{className:"test-case-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-module",children:"Module"}),r.jsx("input",{id:"edit-module",className:"field",value:o.module,onChange:_=>x({module:_.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-id",children:"TC ID"}),r.jsx("input",{id:"edit-id",className:"field font-mono",value:o.id,onChange:_=>x({id:_.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-folder",children:"Folder"}),r.jsx("input",{id:"edit-folder",className:"field",value:o.folder??o.module,onChange:_=>x({folder:_.target.value})})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-title",children:"Title"}),r.jsx("input",{id:"edit-title",className:"field",value:o.title,onChange:_=>x({title:_.target.value})})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-type",children:"Type"}),r.jsxs("select",{id:"edit-type",className:"field",value:o.type,onChange:_=>x({type:_.target.value}),children:[r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-priority",children:"Priority"}),r.jsxs("select",{id:"edit-priority",className:"field",value:o.priority,onChange:_=>x({priority:_.target.value}),children:[r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-automation",children:"Automation Status"}),r.jsxs("select",{id:"edit-automation",className:"field",value:o.automationStatus,onChange:_=>x({automationStatus:_.target.value}),children:[r.jsx("option",{value:"ready",children:"ready"}),r.jsx("option",{value:"needs-data",children:"needs-data"}),r.jsx("option",{value:"needs-review",children:"needs-review"}),r.jsx("option",{value:"manual",children:"manual"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-preconditions",children:"Preconditions (one per line)"}),r.jsx("textarea",{id:"edit-preconditions",className:"field h-20",value:h,onChange:_=>f(_.target.value)})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-tags",children:"Tags (comma separated)"}),r.jsx("input",{id:"edit-tags",className:"field",value:p,onChange:_=>g(_.target.value),placeholder:"smoke, regression, critical"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-requirements",children:"Requirements / Tickets"}),r.jsx("textarea",{id:"edit-requirements",className:"field min-h-10 resize-y leading-5",value:m,onChange:_=>j(_.target.value),placeholder:"JIRA-123, https://tracker.example/456",rows:2})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[r.jsx("span",{className:"field-label mb-0",children:"Steps"}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:O,children:"+ Add step"})]}),r.jsxs("div",{className:"space-y-2",children:[o.steps.map((_,w)=>r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsxs("span",{className:"w-5 text-xs text-slate-400",children:[w+1,"."]}),r.jsx("input",{className:"field min-w-0",value:li(_),onChange:C=>b(w,C.target.value)}),r.jsx("span",{className:"w-24 shrink-0 font-mono text-xs text-slate-400",children:_.type}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>y(w),children:"Delete"})]},w)),o.steps.length===0&&r.jsx("p",{className:"text-sm text-slate-400",children:"No steps yet."})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-expected",children:"Expected Result"}),r.jsx("textarea",{id:"edit-expected",className:"field h-20",value:o.expectedResult,onChange:_=>x({expectedResult:_.target.value})})]})]}),r.jsxs("div",{className:"test-case-editor-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Save"})]})]})})}function Um(n){return n.split(/[,;\n]/).map(l=>l.trim()).filter(Boolean)}function Qr({value:n,editValue:l=n,options:s,multiline:o=!1,onSave:u}){const{language:h}=Cn(),[f,p]=I.useState(!1),[g,m]=I.useState(l);if(I.useEffect(()=>{f||m(l)},[f,l]),!f)return r.jsxs("span",{className:"inline-edit-shell",children:[r.jsx("span",{className:"inline-edit-value",title:h==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>p(!0),children:n||"—"}),r.jsx("button",{type:"button",onClick:()=>p(!0),"aria-label":h==="th"?"แก้ไขค่า":"Edit value",title:h==="th"?"แก้ไข":"Edit",children:"✎"})]});const j=()=>{p(!1),g!==l&&u(g)},x={autoFocus:!0,value:g,onChange:b=>m(b.target.value),onBlur:j,onKeyDown:b=>{b.key==="Enter"&&j(),b.key==="Escape"&&(m(l),p(!1))},onClick:b=>b.stopPropagation()};return o&&!s?r.jsx("textarea",{...x,className:"inline-edit-textarea",rows:5}):s?r.jsx("select",{...x,className:"inline-edit-input",children:s.map(b=>r.jsx("option",{children:b},b))}):r.jsx("input",{...x,className:"inline-edit-input"})}function tl({value:n,onSave:l}){const{language:s}=Cn(),[o,u]=I.useState(!1),[h,f]=I.useState(n),p=I.useRef(null),g=I.useRef(null);if(I.useEffect(()=>{o||f(n)},[o,n]),!o)return r.jsxs("span",{className:"inline-edit-shell",children:[r.jsx("span",{className:"inline-edit-value",title:s==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>u(!0),dangerouslySetInnerHTML:{__html:n||"—"}}),r.jsx("button",{type:"button",onClick:()=>u(!0),"aria-label":s==="th"?"แก้ไขค่า":"Edit value",title:s==="th"?"แก้ไข":"Edit",children:"✎"})]});const m=()=>{const y=window.getSelection();y?.rangeCount&&(p.current=y.getRangeAt(0).cloneRange())},j=()=>{const y=window.getSelection();p.current&&y&&(y.removeAllRanges(),y.addRange(p.current))},x=(y,O)=>{j(),document.execCommand(y,!1,O),g.current?.focus(),m()},b=y=>{f(y.innerHTML),u(!1),l(y.innerHTML)};return r.jsxs("div",{className:"rich-text-editor",onClick:y=>y.stopPropagation(),children:[r.jsxs("div",{className:"rich-text-toolbar",children:[r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>x("bold"),children:"B"}),r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>x("italic"),children:"I"}),r.jsx("input",{type:"color",defaultValue:"#1e293b",onMouseDown:()=>m(),onChange:y=>x("foreColor",y.target.value),"aria-label":"Text color"}),r.jsxs("select",{defaultValue:"3",onMouseDown:()=>m(),onChange:y=>x("fontSize",y.target.value),"aria-label":"Text size",children:[r.jsx("option",{value:"2",children:"Small"}),r.jsx("option",{value:"3",children:"Normal"}),r.jsx("option",{value:"5",children:"Large"}),r.jsx("option",{value:"7",children:"Huge"})]})]}),r.jsx("div",{className:"rich-text-content",ref:g,contentEditable:!0,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:{__html:h},onBlur:y=>{y.relatedTarget&&g.current?.parentElement?.contains(y.relatedTarget)||b(y.currentTarget)},onMouseUp:m,onKeyUp:m,onKeyDown:y=>{y.key==="Escape"&&(f(n),u(!1))}})]})}function Hx({testCases:n,selectedIds:l,activeId:s,onToggleSelect:o,onToggleAll:u,onOpen:h,onEdit:f,onDelete:p,onReorder:g,onUpdateCell:m,executionStatuses:j={}}){const{language:x}=Cn(),b=x==="th",[y,O]=I.useState(),[N,_]=I.useState(),[w,C]=I.useState(),[A,H]=I.useState("basic"),[D,K]=I.useState({}),G=I.useRef(null),re=n.length>0&&n.every($=>l.includes($.id));return I.useEffect(()=>{function $(ne){G.current&&!G.current.contains(ne.target)&&C(void 0)}function F(ne){ne.key==="Escape"&&C(void 0)}return document.addEventListener("pointerdown",$),document.addEventListener("keydown",F),()=>{document.removeEventListener("pointerdown",$),document.removeEventListener("keydown",F)}},[]),n.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:b?"ไม่พบ Test Case ที่ตรงกับตัวกรอง":"No Test Cases match the current filters."}):r.jsxs("div",{className:`test-case-table-wrap table-view-${A}`,children:[r.jsxs("div",{className:"test-case-view-bar",children:[r.jsxs("div",{children:[r.jsx("b",{children:b?"คอลัมน์ตาราง":"Table columns"}),r.jsx("span",{children:b?"เริ่มจากข้อมูลพื้นฐาน แล้วแสดงรายละเอียดเมื่อจำเป็น":"Start simple, then show more detail only when you need it."})]}),r.jsxs("div",{role:"group","aria-label":"Test Case table columns",children:[r.jsx("button",{type:"button",className:A==="basic"?"is-active":"",onClick:()=>H("basic"),children:b?"พื้นฐาน":"Basic"}),r.jsx("button",{type:"button",className:A==="tester"?"is-active":"",onClick:()=>H("tester"),children:"Tester"}),r.jsx("button",{type:"button",className:A==="all"?"is-active":"",onClick:()=>H("all"),children:b?"ทุกคอลัมน์":"All columns"})]})]}),r.jsx("div",{className:"test-case-table-scroll border border-slate-200",children:r.jsxs("table",{className:"test-case-table border-collapse",children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-10",children:b?"ย้าย":"Move"}),r.jsx("th",{className:"table-head w-10",children:r.jsx("input",{type:"checkbox",checked:re,onChange:()=>u(re?[]:n.map($=>$.id)),"aria-label":"Select all"})}),r.jsx("th",{className:"table-head w-32",children:"TC ID"}),r.jsx("th",{className:"table-head w-28",children:"Folder"}),r.jsx("th",{className:"table-head",children:b?"ชื่อ":"Title"}),r.jsx("th",{className:"table-head w-24 col-tester",children:"Type"}),r.jsx("th",{className:"table-head w-24",children:"Priority"}),r.jsx("th",{className:"table-head w-56 col-tester",children:b?"ขั้นตอน":"Steps"}),r.jsx("th",{className:"table-head col-tester",children:"Expected Result"}),r.jsx("th",{className:"table-head w-32",children:"Automation"}),r.jsx("th",{className:"table-head w-48 col-all",children:"Preconditions"}),r.jsx("th",{className:"table-head w-48 col-all",children:"Notes"}),r.jsx("th",{className:"table-head w-40 col-tester",children:"Tags"}),r.jsx("th",{className:"table-head w-32",children:"Status"}),r.jsx("th",{className:"table-head w-28 text-center",children:b?"จัดการ":"Actions"})]})}),r.jsx("tbody",{children:n.map($=>r.jsxs("tr",{onDragOver:F=>{F.preventDefault(),_($.id)},onDrop:F=>{F.preventDefault(),y&&g(y,$.id),O(void 0),_(void 0)},onDragEnd:()=>{O(void 0),_(void 0)},className:`border-b border-slate-100 hover:bg-blue-50 ${N===$.id?"bg-indigo-50 ring-2 ring-inset ring-indigo-300":""} ${s===$.id?"bg-blue-50":""}`,children:[r.jsx("td",{className:"table-cell drag-handle",draggable:!0,onDragStart:()=>O($.id),onClick:F=>F.stopPropagation(),title:"Drag to reorder",children:"⠿"}),r.jsx("td",{className:"table-cell",onClick:F=>F.stopPropagation(),children:r.jsx("input",{type:"checkbox",checked:l.includes($.id),onChange:()=>o($.id),"aria-label":`Select ${$.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs",children:$.id}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:$.folder??$.module,onSave:F=>m($.id,"folder",F)})}),r.jsxs("td",{className:"table-cell font-medium text-slate-900",children:[r.jsx(tl,{value:$.title,onSave:F=>m($.id,"title",F)}),($.tags?.length||$.requirements?.length)&&r.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[$.tags?.slice(0,3).map(F=>r.jsx("span",{className:"tag-chip",children:F},F)),$.requirements?.slice(0,2).map(F=>r.jsx("span",{className:"requirement-chip",children:F},F))]})]}),r.jsx("td",{className:"table-cell col-tester",children:r.jsx(Qr,{value:$.type,options:["positive","negative","validation"],onSave:F=>m($.id,"type",F)})}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:$.priority,options:["high","medium","low"],onSave:F=>m($.id,"priority",F)})}),r.jsxs("td",{className:"table-cell min-w-56 col-tester",children:[r.jsx(tl,{value:$.steps.map((F,ne)=>`${ne+1}. ${li(F)}`).join(`
13
- `),onSave:F=>m($.id,"steps",F)}),r.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:F=>{F.stopPropagation(),h($)},children:b?"ดูขั้นตอน":"View Steps"})]}),r.jsx("td",{className:"table-cell max-w-md text-slate-600 col-tester",children:r.jsx(tl,{value:$.expectedResult,onSave:F=>m($.id,"expectedResult",F)})}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:$.automationStatus,options:["ready","needs-data","needs-review","manual"],onSave:F=>m($.id,"automationStatus",F)})}),r.jsx("td",{className:"table-cell min-w-48 col-all",children:r.jsx(tl,{value:$.preconditions.join(`
14
- `),onSave:F=>m($.id,"preconditions",F)})}),r.jsx("td",{className:"table-cell min-w-48 col-all",children:r.jsx(tl,{value:$.notes??"",onSave:F=>m($.id,"notes",F)})}),r.jsx("td",{className:"table-cell min-w-40 col-tester",children:r.jsx(Qr,{value:($.tags??[]).join(", "),onSave:F=>m($.id,"tags",F)})}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:D[$.id]??j[$.id]??$.status??"pending",options:["pending","passed","failed"],onSave:F=>{const ne=F;K(M=>({...M,[$.id]:ne})),m($.id,"status",ne)}})}),r.jsx("td",{className:"table-cell text-center",onClick:F=>F.stopPropagation(),children:r.jsxs("div",{className:"action-menu-wrap",ref:w===$.id?G:void 0,children:[r.jsx("button",{type:"button",className:"action-menu-trigger","aria-label":`Actions for ${$.id}`,"aria-expanded":w===$.id,onClick:()=>C(F=>F===$.id?void 0:$.id),children:"⋯"}),w===$.id&&r.jsxs("div",{className:"action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{h($),C(void 0)},children:"View Test Case"}),r.jsx("button",{type:"button",onClick:()=>{f($),C(void 0)},children:"Edit"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p($.id),C(void 0)},children:"Delete"})]})]})})]},$.id))})]})})]})}function qx({filters:n,modules:l,totalCount:s,visibleCount:o,selectedCount:u,exporting:h,onFiltersChange:f,onAdd:p,onImportScreenshot:g,onImport:m,onRecord:j,onDeleteSelected:x,onExport:b}){const{language:y,t:O}=Cn(),N=y==="th",_=w=>f({...n,...w});return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"search",children:O("search")}),r.jsx("input",{id:"search",className:"field",value:n.search,onChange:w=>_({search:w.target.value}),placeholder:"Search ID, title, expected result, steps, tags or requirements"})]}),r.jsxs("div",{className:"w-48",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-module",children:"Folder / Module"}),r.jsx("input",{id:"filter-module",className:"field",list:"module-options",value:n.module==="all"?"":n.module,onChange:w=>_({module:w.target.value||"all"}),placeholder:"Search or select folder"}),r.jsx("datalist",{id:"module-options",children:l.map(w=>r.jsx("option",{value:w},w))})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-type",children:"Type"}),r.jsxs("select",{id:"filter-type",className:"field",value:n.type,onChange:w=>_({type:w.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-priority",children:"Priority"}),r.jsxs("select",{id:"filter-priority",className:"field",value:n.priority,onChange:w=>_({priority:w.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:p,children:["+ ",O("addCase")]}),r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:m,children:["⇧ ",N?"นำเข้า":"Import"]}),r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:g,children:["▣ ",O("screenshot")]}),r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:j,children:["● ",N?"บันทึก Flow":"Record Flow"]}),r.jsxs("button",{type:"button",className:"btn btn-danger",onClick:x,disabled:u===0,children:[O("delete")," (",u,")"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:b,disabled:h,children:h?N?"กำลัง Export…":"Exporting…":O("export")})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:[N?"แสดง":"Showing"," ",o," ",N?"จาก":"of"," ",s," Test Cases",u>0&&` · ${u} ${N?"รายการที่เลือก":"selected"}`]})]})}function Gx({testCases:n}){const l=I.useMemo(()=>{const u=new Map;for(const h of n)for(const f of h.requirements??[])u.set(f,[...u.get(f)??[],h]);return[...u.entries()].sort(([h],[f])=>h.localeCompare(f))},[n]),s=n.filter(u=>(u.requirements?.length??0)>0).length,o=n.length-s;return n.length?r.jsxs("section",{className:"traceability-summary",children:[r.jsxs("div",{className:"traceability-summary-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Requirements traceability"}),r.jsx("h3",{children:"Coverage at a glance"})]}),r.jsxs("span",{children:[l.length," requirements"]})]}),r.jsxs("div",{className:"traceability-kpis",children:[r.jsxs("div",{children:[r.jsx("b",{children:s}),r.jsx("span",{children:"Linked cases"})]}),r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:"Without requirement"})]}),r.jsxs("div",{children:[r.jsxs("b",{children:[l.length?Math.round(s/n.length*100):0,"%"]}),r.jsx("span",{children:"Case coverage"})]})]}),l.length?r.jsxs("div",{className:"traceability-list",children:[l.slice(0,8).map(([u,h])=>r.jsxs("div",{children:[r.jsx("span",{title:u,children:u}),r.jsxs("b",{children:[h.length," case",h.length===1?"":"s"]})]},u)),l.length>8&&r.jsxs("small",{children:["+ ",l.length-8," more requirements"]})]}):r.jsx("p",{className:"traceability-empty",children:"Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here."})]}):null}function Ix({rows:n,onUpdate:l,onDelete:s}){return n.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:"No Test Data matches the current filters."}):r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-32",children:"TD ID"}),r.jsx("th",{className:"table-head w-28",children:"Module"}),r.jsx("th",{className:"table-head w-44",children:"Field"}),r.jsx("th",{className:"table-head w-28",children:"Input Type"}),r.jsx("th",{className:"table-head w-20",children:"Required"}),r.jsx("th",{className:"table-head",children:"Valid Value"}),r.jsx("th",{className:"table-head",children:"Invalid Value"}),r.jsx("th",{className:"table-head",children:"Note"}),r.jsx("th",{className:"table-head w-20",children:"Actions"})]})}),r.jsx("tbody",{children:n.map(o=>r.jsxs("tr",{className:"border-b border-slate-100 hover:bg-slate-50",children:[r.jsx("td",{className:"table-cell font-mono text-xs",children:o.id}),r.jsx("td",{className:"table-cell",children:o.module}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.field,onChange:u=>l(o.id,{...o,field:u.target.value}),"aria-label":`Field for ${o.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs text-slate-500",children:o.inputType}),r.jsx("td",{className:"table-cell text-center",children:r.jsx("input",{type:"checkbox",checked:o.required,onChange:u=>l(o.id,{...o,required:u.target.checked}),"aria-label":`Required for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.validValue,onChange:u=>l(o.id,{...o,validValue:u.target.value}),"aria-label":`Valid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.invalidValue,onChange:u=>l(o.id,{...o,invalidValue:u.target.value}),"aria-label":`Invalid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.note??"",onChange:u=>l(o.id,{...o,note:u.target.value}),"aria-label":`Note for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>s(o.id),children:"Delete"})})]},o.id))})]})})}function Vx({search:n,module:l,modules:s,totalCount:o,visibleCount:u,exporting:h,onSearchChange:f,onModuleChange:p,onAdd:g,onExport:m}){return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"data-search",children:"Search"}),r.jsx("input",{id:"data-search",className:"field",value:n,onChange:j=>f(j.target.value),placeholder:"Search field, value or note"})]}),r.jsxs("div",{className:"w-40",children:[r.jsx("label",{className:"field-label",htmlFor:"data-module",children:"Module"}),r.jsxs("select",{id:"data-module",className:"field",value:l,onChange:j=>p(j.target.value),children:[r.jsx("option",{value:"all",children:"All"}),s.map(j=>r.jsx("option",{value:j,children:j},j))]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:"+ Add Row"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:m,disabled:h,children:h?"Exporting…":"Export CSV"})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:["Showing ",u," of ",o," rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together."]})]})}const Yx=/\bdata-v-[0-9a-f]{6,}\b/i,Fx=/\d{4,}/,Lm="data-testid";function Px(n){const l=[],s=(o,u)=>{!u||Yx.test(u)||l.some(([,h])=>h===u)||l.push([o,u])};return s(...Zx(n)),s("id",n.elementId&&!Fx.test(n.elementId)?ll(Qx(n.elementId)):void 0),s("semantic locator",Xx(n)),s("name",n.attributeName?ll(sv("name",n.attributeName,n.tagName)):void 0),s("recorded CSS",n.cssSelector?ll(Mm(n.cssSelector)):void 0),l.length===0&&s("recorded CSS",ll(Mm(n.cssSelector??""))),l}function Zx(n){if(!n.testId)return["test id",void 0];const l=n.testIdAttribute??Lm;return l===Lm?["test id",`page.getByTestId(${da(n.testId)})`]:[l,ll(sv(l,n.testId))]}function Xx(n){const l=n.role&&n.name?`page.getByRole(${da(n.role)}, { name: ${da(n.name)}, exact: true })`:n.label?`page.getByLabel(${da(n.label)}, { exact: true })`:n.placeholder?`page.getByPlaceholder(${da(n.placeholder)})`:n.text?`page.getByText(${da(n.text)})`:void 0;if(!l)return;const s=n.contextTestId?`page.getByTestId(${da(n.contextTestId)})`:n.contextSelector?`page.locator(${da(n.contextSelector)})`:void 0,o=s?n.contextText?`${s}.filter({ hasText: ${da(n.contextText)} }).${l.slice(5)}`:`${s}.${l.slice(5)}`:l;return n.nth===void 0?o:`${o}.nth(${n.nth})`}function Kx(n){return n.name??n.label??n.placeholder??n.text??n.testId??n.elementId??n.attributeName??n.cssSelector??"target"}function sv(n,l,s){const o=l.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return`${s?s.toLowerCase():""}[${n}="${o}"]`}function Qx(n){return`#${n.replace(/[^\w-]/g,l=>`\\${l}`)}`}function ll(n){return`page.locator(${Jx(n)})`}function Mm(n){return n.replace(/\\(["'])/g,"$1")}function Jx(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}const da=n=>JSON.stringify(n);function Bm(n){const l=["import { test, expect } from '@playwright/test'","",...t0(),"",`test(${Un(n.title)}, async ({ page }) => {`];for(const s of n.steps)l.push(` ${n0(s)}`);return l.push("})",""),l.join(`
15
- `)}const Wx=5e3,e0=100;function t0(){return[`async function resolveTarget(page, candidates, description, timeout = ${Wx}) {`," 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(${e0})`," } 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 Ba(n){const l=Px(n);return`resolveTarget(page, [${(n.strategy==="css"?[...l].sort(([u],[h])=>u==="recorded CSS"?-1:h==="recorded CSS"?1:0):l).map(([u,h])=>`[${Un(u)}, ${h}]`).join(", ")}], ${Un(Kx(n))})`}function n0(n){switch(n.type){case"navigate":return`await page.goto(${Un(a0(n.url))})`;case"click":return`await (await ${Ba(n.target)}).click()`;case"fill":return`await (await ${Ba(n.target)}).fill(${Un(n.value)})`;case"select":return`await (await ${Ba(n.target)}).selectOption(${Un(n.option)})`;case"check":return`await (await ${Ba(n.target)}).${n.checked?"check":"uncheck"}()`;case"wait":return n.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(n.value)||0))})`:n.mode==="url"?`await page.waitForURL(new RegExp(${Un(n.value)}))`:n.mode==="text"?`await expect(page).toContainText(${Un(n.value)})`:`await expect(await ${Ba(n.target)}).toBeVisible()`;case"assertVisible":return`await expect(await ${Ba(n.target)}).toBeVisible()`;case"assertText":return n.target?`await expect(await ${Ba(n.target)}).toContainText(${Un(n.text)})`:`await expect(page.locator('body')).toContainText(${Un(n.text)})`;case"assertUrl":return`await expect(page).toHaveURL(new RegExp(${Un(n.urlContains)}))`;case"assertInvalid":return`expect(await (await ${Ba(n.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: ${n.description}`}}const Un=n=>JSON.stringify(n);function a0(n){const l=/^\s*\[([^\]]+)\]\(\s*([^)\s]+)\s*\)\s*$/.exec(n);return l?l[2]:n.trim()}function $m(n){const l=[`describe(${Ft(n.module)}, () => {`,` it(${Ft(n.title)}, () => {`];for(const s of n.steps)l.push(` ${r0(s)}`);return l.push(" })","})",""),l.join(`
16
- `)}function $a(n){const l=n.role&&n.name?`cy.contains(${Ft(n.role)}, ${Ft(n.name)})`:n.label?`cy.get('label').contains(${Ft(n.label)}).invoke('attr', 'for').then((id) => cy.get('#' + id))`:n.placeholder?`cy.get(${Ft(`[placeholder="${n.placeholder}"]`)})`:n.text?`cy.contains(${Ft(n.text)})`:`cy.get(${Ft(n.cssSelector??"")})`;return n.nth===void 0?l:`${l}.eq(${n.nth})`}function r0(n){switch(n.type){case"navigate":return`cy.visit(${Ft(n.url)})`;case"click":return`${$a(n.target)}.click()`;case"fill":return`${$a(n.target)}.clear().type(${Ft(n.value)})`;case"select":return`${$a(n.target)}.select(${Ft(n.option)})`;case"check":return`${$a(n.target)}.${n.checked?"check":"uncheck"}()`;case"wait":return n.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(n.value)||0))})`:n.mode==="url"?`cy.url().should('include', ${Ft(n.value)})`:n.mode==="text"?`cy.contains(${Ft(n.value)}).should('be.visible')`:`${$a(n.target)}.should('be.visible')`;case"assertVisible":return`${$a(n.target)}.should('be.visible')`;case"assertText":return n.target?`${$a(n.target)}.should('contain.text', ${Ft(n.text)})`:`cy.contains(${Ft(n.text)}).should('be.visible')`;case"assertUrl":return`cy.url().should('include', ${Ft(n.urlContains)})`;case"assertInvalid":return`${$a(n.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: ${n.description}`}}const Ft=n=>JSON.stringify(n);function i0(n){const l=n.steps.map(u=>l0(n,u)),s=n.steps.find(u=>u.type==="assert"),o=s?.type==="assert"&&s.assertion.type==="text"?`The page shows "${s.assertion.value}".`:s?.type==="assert"&&s.assertion.type==="url"?`The URL contains "${s.assertion.value}".`:s?.type==="assert"?"The expected element is visible.":"Needs Review";return{id:`TC-FLOW-${n.id.slice(-8).toUpperCase()}`,module:"FLOW",title:n.name,preconditions:n.description?[n.description]:[],steps:l,expectedResult:o,type:"positive",priority:"medium",automationStatus:l.length?"ready":"needs-review",status:"pending",sourceUrl:n.baseUrl,notes:s?void 0:"Guided Flow has no assertion — expected result needs review."}}function l0(n,l){switch(l.type){case"navigate":return{type:"navigate",url:new URL(l.path,n.baseUrl).toString()};case"click":return{type:"click",target:l.target};case"fill":return{type:"fill",target:l.target,value:l.valueRef?`{{${l.valueRef}}}`:l.value??""};case"select":return{type:"select",target:l.target,option:l.option};case"check":return{type:"check",target:l.target,checked:l.checked};case"wait":return{type:"wait",mode:l.mode,value:l.value,target:l.target};case"assert":return l.assertion.type==="visible"?{type:"assertVisible",target:l.assertion.target}:l.assertion.type==="text"?{type:"assertText",text:l.assertion.value}:{type:"assertUrl",urlContains:l.assertion.value}}}function s0(n){const l=["import { test, expect } from '@playwright/test'","",`test(${JSON.stringify(n.name)}, async ({ page }) => {`];for(const s of n.steps)l.push(` ${o0(n,s)}`);return l.push("})",""),l.join(`
17
- `)}function o0(n,l){switch(l.type){case"navigate":return`await page.goto(${JSON.stringify(new URL(l.path,n.baseUrl).toString())})`;case"click":return`await ${Jr(l.target)}.click()`;case"fill":return`await ${Jr(l.target)}.fill(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`await ${Jr(l.target)}.selectOption(${JSON.stringify(l.option)})`;case"check":return`await ${Jr(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`await page.waitForURL(new RegExp(${JSON.stringify(l.value)}))`:l.mode==="text"?`await expect(page).toContainText(${JSON.stringify(l.value)})`:`await expect(${Jr(l.target)}).toBeVisible()`;case"assert":return l.assertion.type==="visible"?`await expect(${Jr(l.assertion.target)}).toBeVisible()`:l.assertion.type==="text"?`await expect(page.getByText(${JSON.stringify(l.assertion.value)})).toBeVisible()`:`await expect(page).toHaveURL(new RegExp(${JSON.stringify(l.assertion.value)}))`}}function Jr(n){if(c0(n))return`page.locator(${zu(Hm(n.cssSelector??n.value??""))})`;if(n.strategy==="role"||n.role&&n.name)return`page.getByRole(${JSON.stringify(n.role??"generic")}, { name: ${JSON.stringify(n.name??n.value??"")}, exact: true })`;if(n.strategy==="label"||n.label)return`page.getByLabel(${JSON.stringify(n.label??n.value??"")}, { exact: true })`;if(n.strategy==="placeholder"||n.placeholder)return`page.getByPlaceholder(${JSON.stringify(n.placeholder??n.value??"")})`;if(n.strategy==="testid"||n.testId){const l=n.testId??n.value??"";return n.testIdAttribute&&n.testIdAttribute!=="data-testid"?`page.locator(${zu(u0(n.testIdAttribute,l))})`:`page.getByTestId(${JSON.stringify(l)})`}return n.strategy==="text"||n.text?`page.getByText(${JSON.stringify(n.text??n.value??"")})`:`page.locator(${zu(Hm(n.cssSelector??n.value??""))})`}function c0(n){return!!(n.cssSelector&&(n.strategy==="css"||n.matchCount!==void 0&&n.matchCount>1&&!n.contextSelector&&!n.contextText))}function u0(n,l){return`[${n}="${l.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"]`}function Hm(n){return n.replace(/\\(["'])/g,"$1")}function zu(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function d0(n){const l=[`describe(${JSON.stringify(n.name)}, () => {`,` it(${JSON.stringify(n.name)}, () => {`];for(const s of n.steps)l.push(` ${f0(n,s)}`);return l.push(" })","})",""),l.join(`
18
- `)}function f0(n,l){switch(l.type){case"navigate":return`cy.visit(${JSON.stringify(new URL(l.path,n.baseUrl).toString())})`;case"click":return`${Wr(l.target)}.click()`;case"fill":return`${Wr(l.target)}.clear().type(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`${Wr(l.target)}.select(${JSON.stringify(l.option)})`;case"check":return`${Wr(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`cy.url().should('include', ${JSON.stringify(l.value)})`:l.mode==="text"?`cy.contains(${JSON.stringify(l.value)}).should('be.visible')`:`${Wr(l.target)}.should('be.visible')`;case"assert":return l.assertion.type==="visible"?`${Wr(l.assertion.target)}.should('be.visible')`:l.assertion.type==="text"?`cy.contains(${JSON.stringify(l.assertion.value)}).should('be.visible')`:`cy.url().should('include', ${JSON.stringify(l.assertion.value)})`}}function Wr(n){return n.strategy==="role"||n.role&&n.name?`cy.contains(${JSON.stringify(n.name??n.value??"")})`:n.strategy==="label"||n.label?`cy.get('label').contains(${JSON.stringify(n.label??n.value??"")})`:n.strategy==="placeholder"||n.placeholder?`cy.get(${JSON.stringify(`[placeholder="${n.placeholder??n.value??""}"]`)})`:n.strategy==="testid"||n.testId?`cy.get(${JSON.stringify(`[data-testid="${n.testId??n.value??""}"]`)})`:n.strategy==="text"||n.text?`cy.contains(${JSON.stringify(n.text??n.value??"")})`:`cy.get(${JSON.stringify(n.cssSelector??n.value??"")})`}class hr extends Error{code;hint;constructor(l,s,o){super(s),this.name="ApiError",this.code=l,this.hint=o}}async function Ia(n){try{const l=await n.json();if(l?.error?.message)return new hr(l.error.code,l.error.message,l.error.hint)}catch{}return new hr("unknown",`The server returned status ${n.status}.`)}async function h0(n){let l;try{l=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch{throw new hr("server-unreachable","Could not reach the LazyScout API.",'Check that "npm run dev:server" is running.')}if(!l.ok)throw await Ia(l);return await l.json()}async function p0(){const n=await fetch("/api/versions");if(!n.ok)throw await Ia(n);return await n.json()}async function m0(n){const l=await fetch("/api/versions/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:n})});if(!l.ok)throw await Ia(l);return await l.json()}async function g0(n,l=[]){const s=await fetch("/api/export/csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:n,testData:l})});if(!s.ok)throw await Ia(s);const o=await s.blob(),u=URL.createObjectURL(o),h=document.createElement("a");h.href=u,h.download=`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(h),h.click(),h.remove(),URL.revokeObjectURL(u)}async function v0(n,l="playwright",s,o,u,h,f,p){const g=await fetch("/api/automation/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:n,framework:l,code:s,secrets:o,runId:u,projectId:h,blockedKeywords:f}),signal:p});if(!g.ok)throw await Ia(g);return await g.json()}async function y0(){return it("/api/workspace")}async function qm(n){await it(`/api/workspace/projects/${encodeURIComponent(n.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}async function b0(n){await it(`/api/workspace/projects/${encodeURIComponent(n)}`,{method:"DELETE"})}async function x0(n,l){await it(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function S0(n){return it(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/status`)}async function j0(n){return it(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/capture`,{method:"POST"})}async function w0(n){await it(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/login-browser`,{method:"DELETE"})}async function _0(n,l){return it(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/verify`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function N0(n){return it(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`)}async function T0(n,l){await it(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({flows:l})})}async function E0(n,l,s,o){return it("/api/guided-flows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flow:n,projectId:l,secrets:s,runId:o})})}async function C0(n){return it("/api/guided-flows/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n})})}async function O0(n){await it(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"DELETE"})}async function A0(n,l){return it(`/api/recorder/${encodeURIComponent(n)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function Gm(n){return it(`/api/recorder/${encodeURIComponent(n)}`)}async function R0(n){return it(`/api/recorder/${encodeURIComponent(n)}/stop`,{method:"POST"})}async function k0(n,l){return it(`/api/recorder/${encodeURIComponent(n)}/inspect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:l})})}function D0(n,l){return`/api/recorder/${encodeURIComponent(n)}/frame?v=${l}`}async function z0(n,l){return it(`/api/recorder/${encodeURIComponent(n)}/interact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function Im(n){return it(`/api/recorder/${encodeURIComponent(n)}`,{method:"DELETE"})}async function U0(){await it("/api/workspace/open",{method:"POST"})}async function L0(n){return it(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`)}async function Vm(n,l){return it(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function M0(n,l){await it(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots/${encodeURIComponent(l)}`,{method:"DELETE"})}async function B0(n){return it(`/api/workspace/projects/${encodeURIComponent(n)}/automation`)}async function Uu(n,l){await it(`/api/workspace/projects/${encodeURIComponent(n)}/automation`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function $0(n,l,s){await it(`/api/workspace/projects/${encodeURIComponent(n)}/reports`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,html:s})})}async function H0(n){return it(`/api/workspace/projects/${encodeURIComponent(n)}/bugs`)}async function Ym(n,l){await it(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(l.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function q0(n,l){await it(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(l)}`,{method:"DELETE"})}async function it(n,l){const s=await fetch(n,l);if(!s.ok)throw await Ia(s);return await s.json()}async function G0(n){await fetch("/api/automation/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n}),keepalive:!0})}async function I0(n){const l=await fetch("/api/load-test/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw await Ia(l);return await l.json()}async function V0(n,l,s=!1){const o=await fetch("/api/api-check/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiCheck:n,secrets:l,allowUnsafe:s})});if(!o.ok)throw await Ia(o);return await o.json()}function Fm(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=Array(l);s<l;s++)o[s]=n[s];return o}function Y0(n){if(Array.isArray(n))return n}function F0(n,l,s){return(l=W0(l))in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function P0(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function Z0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pm(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function Zm(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Pm(Object(s),!0).forEach(function(o){F0(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Pm(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function X0(n,l){if(n==null)return{};var s,o,u=K0(n,l);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(o=0;o<h.length;o++)s=h[o],l.indexOf(s)===-1&&{}.propertyIsEnumerable.call(n,s)&&(u[s]=n[s])}return u}function K0(n,l){if(n==null)return{};var s={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(l.indexOf(o)!==-1)continue;s[o]=n[o]}return s}function Q0(n,l){return Y0(n)||P0(n,l)||eS(n,l)||Z0()}function J0(n,l){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function W0(n){var l=J0(n,"string");return typeof l=="symbol"?l:l+""}function eS(n,l){if(n){if(typeof n=="string")return Fm(n,l);var s={}.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Fm(n,l):void 0}}function tS(n,l,s){return l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function Xm(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function Km(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Xm(Object(s),!0).forEach(function(o){tS(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Xm(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function nS(){for(var n=arguments.length,l=new Array(n),s=0;s<n;s++)l[s]=arguments[s];return function(o){return l.reduceRight(function(u,h){return h(u)},o)}}function sl(n){return function l(){for(var s=this,o=arguments.length,u=new Array(o),h=0;h<o;h++)u[h]=arguments[h];return u.length>=n.length?n.apply(this,u):function(){for(var f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];return l.apply(s,[].concat(u,p))}}}function io(n){return{}.toString.call(n).includes("Object")}function aS(n){return!Object.keys(n).length}function dl(n){return typeof n=="function"}function rS(n,l){return Object.prototype.hasOwnProperty.call(n,l)}function iS(n,l){return io(l)||Ga("changeType"),Object.keys(l).some(function(s){return!rS(n,s)})&&Ga("changeField"),l}function lS(n){dl(n)||Ga("selectorType")}function sS(n){dl(n)||io(n)||Ga("handlerType"),io(n)&&Object.values(n).some(function(l){return!dl(l)})&&Ga("handlersType")}function oS(n){n||Ga("initialIsRequired"),io(n)||Ga("initialType"),aS(n)&&Ga("initialContent")}function cS(n,l){throw new Error(n[l]||n.default)}var uS={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"},Ga=sl(cS)(uS),Vs={changes:iS,selector:lS,handler:sS,initial:oS};function dS(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vs.initial(n),Vs.handler(l);var s={current:n},o=sl(pS)(s,l),u=sl(hS)(s),h=sl(Vs.changes)(n),f=sl(fS)(s);function p(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return Vs.selector(m),m(s.current)}function g(m){nS(o,u,h,f)(m)}return[p,g]}function fS(n,l){return dl(l)?l(n.current):l}function hS(n,l){return n.current=Km(Km({},n.current),l),l}function pS(n,l,s){return dl(l)?l(n.current):Object.keys(s).forEach(function(o){var u;return(u=l[o])===null||u===void 0?void 0:u.call(l,n.current[o])}),s}var mS={create:dS},gS={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function vS(n){return function l(){for(var s=this,o=arguments.length,u=new Array(o),h=0;h<o;h++)u[h]=arguments[h];return u.length>=n.length?n.apply(this,u):function(){for(var f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];return l.apply(s,[].concat(u,p))}}}function yS(n){return{}.toString.call(n).includes("Object")}function bS(n){return n||Qm("configIsRequired"),yS(n)||Qm("configType"),n.urls?(xS(),{paths:{vs:n.urls.monacoBase}}):n}function xS(){console.warn(ov.deprecation)}function SS(n,l){throw new Error(n[l]||n.default)}var ov={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!
20
- You are using deprecated way of configuration.
21
-
22
- Instead of using
23
- monaco.config({ urls: { monacoBase: '...' } })
24
- use
25
- monaco.config({ paths: { vs: '...' } })
26
-
27
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
28
- `},Qm=vS(SS)(ov),jS={config:bS},wS=function(){for(var l=arguments.length,s=new Array(l),o=0;o<l;o++)s[o]=arguments[o];return function(u){return s.reduceRight(function(h,f){return f(h)},u)}};function cv(n,l){return Object.keys(l).forEach(function(s){l[s]instanceof Object&&n[s]&&Object.assign(l[s],cv(n[s],l[s]))}),Zm(Zm({},n),l)}var _S={type:"cancelation",msg:"operation is manually canceled"};function Lu(n){var l=!1,s=new Promise(function(o,u){n.then(function(h){return l?u(_S):o(h)}),n.catch(u)});return s.cancel=function(){return l=!0},s}var NS=["monaco"],TS=mS.create({config:gS,isInitialized:!1,resolve:null,reject:null,monaco:null}),uv=Q0(TS,2),Nl=uv[0],go=uv[1];function ES(n){var l=jS.config(n),s=l.monaco,o=X0(l,NS);go(function(u){return{config:cv(u.config,o),monaco:s}})}function CS(){var n=Nl(function(l){var s=l.monaco,o=l.isInitialized,u=l.resolve;return{monaco:s,isInitialized:o,resolve:u}});if(!n.isInitialized){if(go({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),Lu(Mu);if(window.monaco&&window.monaco.editor)return dv(window.monaco),n.resolve(window.monaco),Lu(Mu);wS(OS,RS)(kS)}return Lu(Mu)}function OS(n){return document.body.appendChild(n)}function AS(n){var l=document.createElement("script");return n&&(l.src=n),l}function RS(n){var l=Nl(function(o){var u=o.config,h=o.reject;return{config:u,reject:h}}),s=AS("".concat(l.config.paths.vs,"/loader.js"));return s.onload=function(){return n()},s.onerror=l.reject,s}function kS(){var n=Nl(function(s){var o=s.config,u=s.resolve,h=s.reject;return{config:o,resolve:u,reject:h}}),l=window.require;l.config(n.config),l(["vs/editor/editor.main"],function(s){var o=s.m||s;dv(o),n.resolve(o)},function(s){n.reject(s)})}function dv(n){Nl().monaco||go({monaco:n})}function DS(){return Nl(function(n){var l=n.monaco;return l})}var Mu=new Promise(function(n,l){return go({resolve:n,reject:l})}),fv={config:ES,init:CS,__getMonacoInstance:DS},zS={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Bu=zS,US={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},LS=US;function MS({children:n}){return ai.createElement("div",{style:LS.container},n)}var BS=MS,$S=BS;function HS({width:n,height:l,isEditorReady:s,loading:o,_ref:u,className:h,wrapperProps:f}){return ai.createElement("section",{style:{...Bu.wrapper,width:n,height:l},...f},!s&&ai.createElement($S,null,o),ai.createElement("div",{ref:u,style:{...Bu.fullWidth,...!s&&Bu.hide},className:h}))}var qS=HS,hv=I.memo(qS);function GS(n){I.useEffect(n,[])}var pv=GS;function IS(n,l,s=!0){let o=I.useRef(!0);I.useEffect(o.current||!s?()=>{o.current=!1}:n,l)}var pn=IS;function cl(){}function ni(n,l,s,o){return VS(n,o)||YS(n,l,s,o)}function VS(n,l){return n.editor.getModel(mv(n,l))}function YS(n,l,s,o){return n.editor.createModel(l,s,o?mv(n,o):void 0)}function mv(n,l){return n.Uri.parse(l)}function FS({original:n,modified:l,language:s,originalLanguage:o,modifiedLanguage:u,originalModelPath:h,modifiedModelPath:f,keepCurrentOriginalModel:p=!1,keepCurrentModifiedModel:g=!1,theme:m="light",loading:j="Loading...",options:x={},height:b="100%",width:y="100%",className:O,wrapperProps:N={},beforeMount:_=cl,onMount:w=cl}){let[C,A]=I.useState(!1),[H,D]=I.useState(!0),K=I.useRef(null),G=I.useRef(null),re=I.useRef(null),$=I.useRef(w),F=I.useRef(_),ne=I.useRef(!1);pv(()=>{let Z=fv.init();return Z.then(V=>(G.current=V)&&D(!1)).catch(V=>V?.type!=="cancelation"&&console.error("Monaco initialization: error:",V)),()=>K.current?T():Z.cancel()}),pn(()=>{if(K.current&&G.current){let Z=K.current.getOriginalEditor(),V=ni(G.current,n||"",o||s||"text",h||"");V!==Z.getModel()&&Z.setModel(V)}},[h],C),pn(()=>{if(K.current&&G.current){let Z=K.current.getModifiedEditor(),V=ni(G.current,l||"",u||s||"text",f||"");V!==Z.getModel()&&Z.setModel(V)}},[f],C),pn(()=>{let Z=K.current.getModifiedEditor();Z.getOption(G.current.editor.EditorOption.readOnly)?Z.setValue(l||""):l!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:l||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[l],C),pn(()=>{K.current?.getModel()?.original.setValue(n||"")},[n],C),pn(()=>{let{original:Z,modified:V}=K.current.getModel();G.current.editor.setModelLanguage(Z,o||s||"text"),G.current.editor.setModelLanguage(V,u||s||"text")},[s,o,u],C),pn(()=>{G.current?.editor.setTheme(m)},[m],C),pn(()=>{K.current?.updateOptions(x)},[x],C);let M=I.useCallback(()=>{if(!G.current)return;F.current(G.current);let Z=ni(G.current,n||"",o||s||"text",h||""),V=ni(G.current,l||"",u||s||"text",f||"");K.current?.setModel({original:Z,modified:V})},[s,l,u,n,o,h,f]),q=I.useCallback(()=>{!ne.current&&re.current&&(K.current=G.current.editor.createDiffEditor(re.current,{automaticLayout:!0,...x}),M(),G.current?.editor.setTheme(m),A(!0),ne.current=!0)},[x,m,M]);I.useEffect(()=>{C&&$.current(K.current,G.current)},[C]),I.useEffect(()=>{!H&&!C&&q()},[H,C,q]);function T(){let Z=K.current?.getModel();p||Z?.original?.dispose(),g||Z?.modified?.dispose(),K.current?.dispose()}return ai.createElement(hv,{width:y,height:b,isEditorReady:C,loading:j,_ref:re,className:O,wrapperProps:N})}var PS=FS;I.memo(PS);function ZS(n){let l=I.useRef();return I.useEffect(()=>{l.current=n},[n]),l.current}var XS=ZS,Ys=new Map;function KS({defaultValue:n,defaultLanguage:l,defaultPath:s,value:o,language:u,path:h,theme:f="light",line:p,loading:g="Loading...",options:m={},overrideServices:j={},saveViewState:x=!0,keepCurrentModel:b=!1,width:y="100%",height:O="100%",className:N,wrapperProps:_={},beforeMount:w=cl,onMount:C=cl,onChange:A,onValidate:H=cl}){let[D,K]=I.useState(!1),[G,re]=I.useState(!0),$=I.useRef(null),F=I.useRef(null),ne=I.useRef(null),M=I.useRef(C),q=I.useRef(w),T=I.useRef(),Z=I.useRef(o),V=XS(h),P=I.useRef(!1),X=I.useRef(!1);pv(()=>{let v=fv.init();return v.then(R=>($.current=R)&&re(!1)).catch(R=>R?.type!=="cancelation"&&console.error("Monaco initialization: error:",R)),()=>F.current?Y():v.cancel()}),pn(()=>{let v=ni($.current,n||o||"",l||u||"",h||s||"");v!==F.current?.getModel()&&(x&&Ys.set(V,F.current?.saveViewState()),F.current?.setModel(v),x&&F.current?.restoreViewState(Ys.get(h)))},[h],D),pn(()=>{F.current?.updateOptions(m)},[m],D),pn(()=>{!F.current||o===void 0||(F.current.getOption($.current.editor.EditorOption.readOnly)?F.current.setValue(o):o!==F.current.getValue()&&(X.current=!0,F.current.executeEdits("",[{range:F.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),F.current.pushUndoStop(),X.current=!1))},[o],D),pn(()=>{let v=F.current?.getModel();v&&u&&$.current?.editor.setModelLanguage(v,u)},[u],D),pn(()=>{p!==void 0&&F.current?.revealLine(p)},[p],D),pn(()=>{$.current?.editor.setTheme(f)},[f],D);let k=I.useCallback(()=>{if(!(!ne.current||!$.current)&&!P.current){q.current($.current);let v=h||s,R=ni($.current,o||n||"",l||u||"",v||"");F.current=$.current?.editor.create(ne.current,{model:R,automaticLayout:!0,...m},j),x&&F.current.restoreViewState(Ys.get(v)),$.current.editor.setTheme(f),p!==void 0&&F.current.revealLine(p),K(!0),P.current=!0}},[n,l,s,o,u,h,m,j,x,f,p]);I.useEffect(()=>{D&&M.current(F.current,$.current)},[D]),I.useEffect(()=>{!G&&!D&&k()},[G,D,k]),Z.current=o,I.useEffect(()=>{D&&A&&(T.current?.dispose(),T.current=F.current?.onDidChangeModelContent(v=>{X.current||A(F.current.getValue(),v)}))},[D,A]),I.useEffect(()=>{if(D){let v=$.current.editor.onDidChangeMarkers(R=>{let B=F.current.getModel()?.uri;if(B&&R.find(J=>J.path===B.path)){let J=$.current.editor.getModelMarkers({resource:B});H?.(J)}});return()=>{v?.dispose()}}return()=>{}},[D,H]);function Y(){T.current?.dispose(),b?x&&Ys.set(h,F.current.saveViewState()):F.current.getModel()?.dispose(),F.current.dispose()}return ai.createElement(hv,{width:y,height:O,isEditorReady:D,loading:g,_ref:ne,className:N,wrapperProps:_})}var QS=KS,JS=I.memo(QS),WS=JS;function Jm({value:n,framework:l,onChange:s,height:o="calc(100vh - 420px)"}){function u(h,f){const p="typescript",g=l==="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')"],m=f.languages.registerCompletionItemProvider(p,{triggerCharacters:[".","("],provideCompletionItems:(j,x)=>{const b=j.getWordUntilPosition(x),y=j.getLineContent(x.lineNumber).slice(0,x.column-1).toLowerCase(),O={startLineNumber:x.lineNumber,endLineNumber:x.lineNumber,startColumn:b.startColumn,endColumn:x.column},N=ej(y,l);return{suggestions:[...g.map(_=>({label:_,kind:f.languages.CompletionItemKind.Method,insertText:_,range:O,detail:l==="playwright"?"Playwright API":"Cypress API"})),...N.map(_=>({..._,kind:f.languages.CompletionItemKind.Snippet,range:O}))]}}});h.onDidDispose(()=>m.dispose())}return r.jsx(WS,{height:o,theme:"vs-dark",language:"typescript",value:n,onChange:h=>s(h??""),onMount:u,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 ej(n,l){const s=l==="playwright",o=[];return/กรอก|พิมพ์|fill|type|input/i.test(n)&&o.push({label:"Fill an input",insertText:s?"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(n)&&o.push({label:"Click a button",insertText:s?"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(n)&&o.push({label:"Navigate to a URL",insertText:s?"await page.goto('${1:https://example.com}')":"cy.visit('${1:https://example.com}')",detail:"Suggested from a navigation instruction"}),/ตรวจสอบ|เช็ค|assert|expect|verify|เห็นข้อความ|ข้อความ/i.test(n)&&o.push({label:"Assert visible text",insertText:s?"await expect(page.getByText('${1:Success}')).toBeVisible()":"cy.contains('${1:Success}').should('be.visible')",detail:"Suggested from an assertion instruction"}),o}function tj({sourceUrl:n,onUse:l}){const s=n||"http://localhost:5500/login",o=`await page.goto("${s}")
29
- await page.getByLabel("Email address").fill("{{TEST_EMAIL}}")
30
- await page.getByLabel("Password").fill("{{TEST_PASSWORD}}")
31
- await page.getByRole("button", { name: "Login", exact: true }).click()
32
- await expect(page).toHaveURL(new RegExp("/dashboard"))`,u=`await page.goto("${s}")
33
- await page.getByLabel("Password").fill("wrong-password")
34
- await page.getByRole("button", { name: "Login", exact: true }).click()
35
- await expect(page.getByRole("alert")).toContainText("Invalid password")`;return r.jsxs("section",{className:"qa-guidance",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Beginner guide"}),r.jsx("h3",{children:"What should I add next?"}),r.jsx("p",{children:"Use a template, then replace labels and expected results with what you observed."})]}),r.jsxs("div",{className:"qa-guidance-actions",children:[r.jsxs("button",{type:"button",onClick:()=>l(o),children:[r.jsx("b",{children:"Login success"}),r.jsx("span",{children:"Fill credentials and verify the next URL"})]}),r.jsxs("button",{type:"button",onClick:()=>l(u),children:[r.jsx("b",{children:"Login validation"}),r.jsx("span",{children:"Try an invalid password and assert the alert"})]}),r.jsx("span",{children:"For uploads, create a draft first and choose a safe test file before running."})]})]})}function nj({stopped:n=!1}){return r.jsx("svg",{className:"run-button-icon",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:n?r.jsx("rect",{x:"5.25",y:"5.25",width:"9.5",height:"9.5",rx:"2",fill:"currentColor"}):r.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 $u({children:n,stopped:l=!1,onClick:s,disabled:o=!1}){return r.jsxs("button",{type:"button",className:`btn ${l?"btn-danger":"btn-dark"} run-button`,onClick:s,disabled:o,children:[r.jsx(nj,{stopped:l}),r.jsx("span",{children:n})]})}function aj({testCases:n,projectId:l="active",secrets:s,blockedKeywords:o,onRunStatus:u,onRunResult:h}){const[f,p]=I.useState("playwright"),g=n.find(W=>/submit|login|sign in|เข้าสู่ระบบ|ล็อกอิน/i.test(`${W.title} ${W.module}`))??n[0],[m,j]=I.useState(g?.id??""),[x,b]=I.useState(()=>n.map(W=>W.id)),[y,O]=I.useState(!1),[N,_]=I.useState(!1),[w,C]=I.useState(""),[A,H]=I.useState(),[D,K]=I.useState([]),[G,re]=I.useState(!1),[$,F]=I.useState(!1),[ne,M]=I.useState("all"),q=I.useRef(void 0),T=I.useRef(!1),[Z,V]=I.useState({}),P=n.find(W=>W.id===m)??n[0],X=I.useMemo(()=>[{value:"all",label:"All folders and tags"},...[...new Set(n.map(W=>W.folder??W.module))].sort().map(W=>({value:`folder:${W}`,label:`Folder: ${W}`})),...[...new Set(n.flatMap(W=>W.tags??[]))].sort().map(W=>({value:`tag:${W}`,label:`Tag: ${W}`}))],[n]),k=I.useMemo(()=>ne==="all"?n:n.filter(W=>ne.startsWith("folder:")?(W.folder??W.module)===ne.slice(7):(W.tags??[]).includes(ne.slice(4))),[ne,n]),Y=k.filter(W=>x.includes(W.id)).length;I.useEffect(()=>{n.some(W=>W.id===m)||j(g?.id??"")},[g?.id,m,n]),I.useEffect(()=>{V({}),(async()=>{const W=await B0(l),ie=`lazyscout.automation.${l}`;let L={};try{L=JSON.parse(localStorage.getItem(ie)??"{}")}catch{}const U={...L,...W};Object.keys(L).length&&(await Uu(l,U),localStorage.removeItem(ie)),V(U)})().catch(()=>V({}))},[l]),I.useEffect(()=>{b(n.map(W=>W.id))},[n]),I.useEffect(()=>{const W=L=>{y&&(L.key==="F5"||(L.ctrlKey||L.metaKey)&&L.key.toLowerCase()==="r")&&(L.preventDefault(),F(!0))},ie=L=>{if(!y)return;const U=q.current;U&&navigator.sendBeacon("/api/automation/stop",new Blob([JSON.stringify({runId:U.runId})],{type:"application/json"})),L.preventDefault(),L.returnValue=""};return window.addEventListener("keydown",W),window.addEventListener("beforeunload",ie),()=>{window.removeEventListener("keydown",W),window.removeEventListener("beforeunload",ie)}},[y]);const v=I.useMemo(()=>P?f==="playwright"?Bm(P):$m(P):"",[f,P]),R=P?`${f}:${P.id}`:"",B=Z[R]??v;function J(){C(B),_(!0)}function se(){const W={...Z,[R]:w};V(W),Uu(l,W),_(!1)}function ge(){const W={...Z};delete W[R],V(W),Uu(l,W),_(!1)}function Ne(W){const ie=`${f}:${W.id}`;return Z[ie]??(f==="playwright"?Bm(W):$m(W))}async function _e(W,ie){const L=crypto.randomUUID(),U=new AbortController;q.current={runId:L,controller:U};try{const ee=await v0(W,f,ie,s,L,l,o,U.signal);return u?.(W.id,ee.status==="passed"?"passed":ee.status==="failed"?"failed":"pending"),h?.(W.id,ee),ee}catch(ee){const me=T.current||ee instanceof DOMException&&ee.name==="AbortError",he={status:me?"stopped":"failed",framework:f,logs:[{timestamp:new Date().toISOString(),level:me?"warn":"fail",message:me?"Run stopped by user.":ee instanceof Error?ee.message:String(ee)}]};return u?.(W.id,me?"pending":"failed"),h?.(W.id,he),he}finally{q.current?.runId===L&&(q.current=void 0)}}async function ae(){T.current=!0;const W=q.current;W&&(W.controller.abort(),G0(W.runId).catch(()=>{})),re(!1),F(!1),K(ie=>[...ie,{timestamp:new Date().toISOString(),level:"warn",message:"Stop requested. Closing the active Playwright session…"}])}async function je(){if(!P||y)return;T.current=!1,O(!0),H("running"),K([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --case ${P.id}`},{timestamp:new Date().toISOString(),level:"info",message:`Starting Playwright runner: ${P.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 W=await _e(P,B);H(W.status),K(ie=>[...ie,...W.logs]),O(!1)}async function Te(){if(y)return;const W=k.filter(L=>x.includes(L.id)).slice(0,50);if(T.current=!1,O(!0),H("running"),K([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --all --project ${l}`},{timestamp:new Date().toISOString(),level:"info",message:`Selected cases: ${W.length}/${k.length} in current filter · Run budget: 50 cases`}]),W.length===0){K(L=>[...L,{timestamp:new Date().toISOString(),level:"warn",message:"No test cases selected. Nothing to run."}]),H("pending"),O(!1);return}let ie=!1;for(const L of W){if(T.current)break;const U=await _e(L,Ne(L));if(U.status==="failed"&&(ie=!0),K(ee=>[...ee,...U.logs]),U.status==="stopped")break}H(T.current?"stopped":ie?"failed":"passed"),O(!1)}function Ge(){navigator.clipboard?.writeText(B)}function Me(){const W=new Blob([B],{type:"text/plain"}),ie=URL.createObjectURL(W),L=document.createElement("a");L.href=ie,L.download=`${P?.id??"lazyscout-test"}.${f==="playwright"?"spec.ts":"cy.ts"}`,L.click(),URL.revokeObjectURL(ie)}function E(){ae(),window.location.reload()}return r.jsxs("section",{className:"automation-page",children:[r.jsxs("div",{className:"automation-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation workspace"}),r.jsx("h2",{children:"Generated Tests"}),r.jsx("p",{children:"Edit the generated file per Test Case, then run one case or selected cases."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{className:"automation-run-filter",value:ne,disabled:y,onChange:W=>M(W.target.value),children:X.map(W=>r.jsx("option",{value:W.value,children:W.label},W.value))}),r.jsxs("span",{className:"automation-selected-count",children:[Y,"/",k.length," selected"]}),y?r.jsx($u,{stopped:!0,onClick:()=>re(!0),children:"Stop run"}):r.jsx($u,{onClick:Te,children:"Run selected cases"})]})]}),r.jsx(tj,{sourceUrl:P?.sourceUrl,onUse:W=>{C(W),_(!0)}}),r.jsxs("div",{className:"automation-layout",children:[r.jsxs("aside",{className:"automation-case-list",children:[r.jsxs("div",{className:"automation-filter-head",children:[r.jsxs("span",{className:"field-label",children:["Test files (",k.length,"/",n.length,")"]}),r.jsx("span",{children:ne==="all"?"All":"Filtered"})]}),k.map(W=>r.jsxs("button",{type:"button",className:P?.id===W.id?"selected":"",onClick:()=>{j(W.id),_(!1)},children:[r.jsx("input",{type:"checkbox",checked:x.includes(W.id),onChange:ie=>{ie.stopPropagation(),b(L=>ie.target.checked?[...L,W.id]:L.filter(U=>U!==W.id))},onClick:ie=>ie.stopPropagation(),"aria-label":`Run ${W.id}`}),r.jsx("span",{className:"case-file-icon",children:Z[`playwright:${W.id}`]||Z[`cypress:${W.id}`]?"●":"○"}),r.jsxs("span",{children:[r.jsx("b",{children:W.id}),r.jsx("small",{children:W.title}),W.tags?.length?r.jsx("em",{className:"automation-tag",children:W.tags.slice(0,2).join(" · ")}):null]})]},W.id))]}),r.jsxs("div",{className:"automation-editor",children:[r.jsxs("div",{className:"automation-toolbar",children:[r.jsxs("select",{className:"field",value:f,onChange:W=>p(W.target.value),disabled:y,children:[r.jsx("option",{value:"playwright",children:"Playwright"}),r.jsx("option",{value:"cypress",children:"Cypress"})]}),r.jsx("span",{className:"automation-source",children:P?.sourceUrl}),r.jsxs("div",{className:"ml-auto flex gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:J,disabled:N||y,children:"Edit code"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:ge,disabled:y,children:"Regenerate"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:Ge,children:"Copy"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:Me,children:"Save file"}),r.jsx($u,{onClick:je,disabled:y||!P,children:"Run"})]})]}),N?r.jsxs("div",{className:"code-edit-area",children:[r.jsx(Jm,{value:w,framework:f,onChange:C}),r.jsxs("div",{className:"code-edit-actions",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>_(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:se,children:"Save code"})]})]}):r.jsx("pre",{className:"automation-code",children:B||"No Test Cases are available to generate."}),A&&r.jsxs("div",{className:"terminal-panel",children:[r.jsxs("div",{className:"terminal-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," CLI output"]}),r.jsx("b",{className:A==="passed"?"terminal-pass":A==="failed"?"terminal-fail":"terminal-warn",children:A.toUpperCase()})]}),r.jsx("div",{className:"terminal-body",children:D.map((W,ie)=>r.jsxs("div",{className:`terminal-line terminal-${W.level}`,children:[r.jsx("span",{children:new Date(W.timestamp).toLocaleTimeString()}),W.message,W.durationMs!==void 0&&r.jsxs("em",{children:[W.durationMs,"ms"]})]},`${W.timestamp}-${ie}`))})]})]})]}),G&&r.jsx(Wm,{title:"Stop the running tests?",message:"The active Playwright session will be closed. Remaining selected Test Cases will not run.",confirmLabel:"Stop run",onCancel:()=>re(!1),onConfirm:()=>{ae()}}),$&&r.jsx(Wm,{title:"Stop tests and refresh?",message:"Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases.",confirmLabel:"Stop and refresh",onCancel:()=>F(!1),onConfirm:E}),N&&r.jsx("div",{className:"modern-modal-backdrop code-editor-backdrop",children:r.jsxs("section",{className:"modern-modal code-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"code-editor-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation source"}),r.jsxs("h2",{id:"code-editor-title",children:["Edit ",f==="playwright"?"Playwright":"Cypress"," code"]}),r.jsxs("p",{children:[P?.id," · ",P?.title]})]}),r.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close editor",onClick:()=>_(!1),children:"×"})]}),r.jsx("div",{className:"code-editor-modal-body",children:r.jsx(Jm,{value:w,framework:f,onChange:C,height:"100%"})}),r.jsxs("footer",{className:"modal-footer code-editor-modal-footer",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>_(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:se,children:"Save code"})]})]})})]})}function Wm({title:n,message:l,confirmLabel:s,onCancel:o,onConfirm:u}){return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal run-confirm-modal",role:"dialog","aria-modal":"true",children:[r.jsx("div",{className:"modal-header",children:r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Running tests"}),r.jsx("h2",{children:n}),r.jsx("p",{children:l})]})}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Keep running"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:u,children:s})]})]})})}function rj({result:n}){const[l,s]=I.useState("events"),[o,u]=I.useState(!1),[h,f]=I.useState(n.runEvents);async function p(){if(!o){s("terminal"),u(!0),f([]);for(const m of n.runEvents)await new Promise(j=>window.setTimeout(j,120)),f(j=>[...j,m]);u(!1)}}const g=o||h.length<n.runEvents.length?h:n.runEvents;return r.jsxs("section",{className:"scout-log-card",children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright Scout Log"}),r.jsx("h2",{children:"Scout Log"})]}),r.jsxs("span",{className:"run-live",children:[r.jsx("i",{})," DONE"]})]}),r.jsxs("div",{className:"scout-log-tabs",children:[r.jsx("button",{type:"button",className:l==="events"?"active":"",onClick:()=>s("events"),children:"◉ Event Stream"}),r.jsx("button",{type:"button",className:l==="terminal"?"active":"",onClick:()=>s("terminal"),children:"›_ CLI Terminal"})]}),r.jsxs("div",{className:"run-summary",children:[r.jsxs("div",{children:[r.jsxs("strong",{children:[n.stats.durationMs,"ms"]}),r.jsx("span",{children:"duration"})]}),r.jsxs("div",{children:[r.jsx("strong",{children:n.stats.pagesVisited}),r.jsx("span",{children:"pages"})]}),r.jsxs("div",{children:[r.jsx("strong",{className:n.stats.urlsSkipped?"text-amber-600":"",children:n.stats.urlsSkipped}),r.jsx("span",{children:"skipped"})]})]}),l==="terminal"?r.jsxs("div",{className:"scout-cli-terminal",children:[r.jsxs("div",{className:"scout-cli-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," Playwright CLI output"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("b",{children:o?"RUNNING":"COMPLETED"}),r.jsx("button",{type:"button",className:"cli-run-button",onClick:p,disabled:o,children:o?"Running…":"▶ Run again"})]})]}),r.jsxs("div",{className:"scout-cli-body",children:[r.jsxs("div",{children:[r.jsx("em",{children:"$"})," npx playwright scout ",n.startUrl]}),g.map((m,j)=>r.jsxs("div",{className:m.result==="failed"?"cli-fail":m.result==="warning"||m.result==="blocked"?"cli-warn":"cli-pass",children:[r.jsx("em",{children:"›"})," ",m.message]},`cli-${m.timestamp}-${j}`)),o&&r.jsx("div",{className:"cli-cursor",children:"▌"})]})]}):r.jsx("div",{className:"run-events",children:n.runEvents.map((m,j)=>r.jsxs("div",{className:"run-event",children:[r.jsx("div",{className:`event-marker event-${m.result}`}),r.jsxs("div",{className:"run-event-body",children:[r.jsxs("div",{className:"run-event-top",children:[r.jsx("span",{children:new Date(m.timestamp).toLocaleTimeString()}),r.jsx("b",{children:m.eventType})]}),r.jsx("p",{children:m.message}),m.currentUrl&&r.jsx("small",{children:new URL(m.currentUrl).pathname})]})]},`${m.timestamp}-${j}`))}),r.jsxs("div",{className:"inspector-foot",children:[r.jsx("span",{className:"status-dot status-pass"})," Scout completed · Playwright events captured"]})]})}function ij({checks:n,secrets:l}){const[s,o]=I.useState(),[u,h]=I.useState({}),[f,p]=I.useState();async function g(m,j=!1){o(m.id);try{const x=await V0(m,l,j);h(b=>({...b,[m.id]:`${x.status.toUpperCase()} · ${x.message}`}))}catch(x){h(b=>({...b,[m.id]:x instanceof Error?x.message:String(x)}))}finally{o(void 0)}}return r.jsxs("div",{className:"api-checks",children:[r.jsxs("div",{className:"api-checks-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Network validation"}),r.jsx("h3",{children:"Test API"}),r.jsx("p",{children:"Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured."})]}),r.jsxs("span",{className:"status-badge status-badge-pass",children:[n.length," observed"]})]}),n.length===0?r.jsxs("div",{className:"empty-state",children:["Run Analyze with ",r.jsx("b",{children:"Include API checks from XHR/fetch"})," enabled to collect the API requests used by the page."]}):r.jsx("div",{className:"api-table",children:n.map(m=>r.jsxs("div",{className:"api-row",children:[r.jsx("span",{className:"api-method",children:m.method}),r.jsxs("div",{children:[r.jsx("b",{children:m.id}),r.jsx("p",{children:m.url}),r.jsx("small",{children:m.note??`Observed HTTP ${m.observedStatus??"—"} · ${m.durationMs??0}ms`})]}),r.jsx("span",{className:`status-badge ${m.status==="observed"?"status-badge-pass":"status-badge-warn"}`,children:m.status}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>["GET","HEAD","OPTIONS"].includes(m.method.toUpperCase())?void g(m):p(m),disabled:s===m.id,children:s===m.id?"Checking…":"Run API"}),u[m.id]&&r.jsx("div",{className:"api-result",children:u[m.id]})]},m.id))}),f&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal",role:"dialog","aria-modal":"true","aria-labelledby":"unsafe-api-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Protected API action"}),r.jsxs("h2",{id:"unsafe-api-title",children:["Run ",f.method.toUpperCase()," once?"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>p(void 0),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:"This request can create, update, or delete data. LazyScout will send it only once for this run."}),r.jsx("code",{className:"block break-all",children:f.url})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(void 0),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{p(void 0),g(f,!0)},children:"Run once"})]})]})})]})}function eg({view:n,onChange:l,counts:s}){const{t:o}=Cn(),u=[["overview",o("overview"),"⌂"],["testcases",`${o("testCases")} ${s.cases}`,"✓"],["automation",o("automation"),"↗"],["scoutlog",o("scoutLog"),"◉"],["explorer",o("explorer"),"⌘"],["loadtest","Load Test","⚡"]];return r.jsx("nav",{className:"workspace-nav",children:u.map(([h,f,p])=>r.jsxs("button",{type:"button",className:n===h?"is-active":"",onClick:()=>l(h),children:[r.jsx("span",{children:p}),f,h==="explorer"&&r.jsx("small",{children:s.states})]},h))})}function lj({projects:n,activeProjectId:l,result:s,collapsed:o,onToggleCollapsed:u,onSelect:h,onNew:f,onDelete:p,onRename:g,onSettings:m,workspaceRoot:j,onOpenWorkspace:x}){const{language:b,toggleLanguage:y,t:O}=Cn(),[N,_]=I.useState(),[w,C]=I.useState(),[A,H]=I.useState("");return r.jsxs("aside",{className:`workspace-sidebar ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"sidebar-brand",children:[r.jsx("span",{className:"brand-mark",children:"LS"}),r.jsx("b",{children:"LazyScout"}),r.jsx("button",{type:"button",className:"sidebar-collapse",onClick:u,title:o?"Expand sidebar":"Collapse sidebar",children:o?"›":"‹"})]}),r.jsxs("button",{type:"button",className:"new-project-btn",onClick:f,title:O("newProject"),children:[r.jsx("span",{children:"+"}),r.jsx("em",{children:O("newProject")})]}),r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:O("projects")}),r.jsx("b",{children:n.length})]}),r.jsx("div",{className:"project-list",children:n.map(D=>r.jsx("div",{className:`project-item ${D.id===l?"active":""}`,children:w===D.id?r.jsxs("form",{className:"project-rename",onSubmit:K=>{K.preventDefault(),g(D.id,A),C(void 0)},children:[r.jsx("input",{autoFocus:!0,value:A,onChange:K=>H(K.target.value),onKeyDown:K=>{K.key==="Escape"&&C(void 0)}}),r.jsx("button",{type:"submit",children:"Save"}),r.jsx("button",{type:"button",onClick:()=>C(void 0),children:"×"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:()=>h(D.id),title:D.targetUrl?`${D.name}
36
- ${D.targetUrl}`:D.name,children:[r.jsx("span",{className:"project-icon",children:"◈"}),r.jsxs("span",{className:"project-copy",children:[r.jsx("b",{children:D.name}),r.jsx("small",{children:D.targetUrl||"Manual suite"})]})]}),r.jsxs("div",{className:"project-actions",children:[r.jsx("button",{type:"button",className:"project-more",title:"Project actions",onClick:()=>_(K=>K===D.id?void 0:D.id),children:"⋯"}),N===D.id&&r.jsxs("div",{className:"project-action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{C(D.id),H(D.name),_(void 0)},children:"Rename"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p(D.id),_(void 0)},children:"Delete"})]})]})]})},D.id))}),s&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:O("files")}),r.jsx("b",{children:s.pages.length})]}),r.jsx("div",{className:"file-list",children:s.pages.map(D=>r.jsxs("div",{className:"file-item",title:D.finalUrl,children:[r.jsx("span",{children:"◫"}),r.jsx("span",{className:"file-name",children:new URL(D.finalUrl).pathname==="/"?"index":new URL(D.finalUrl).pathname.slice(1)}),r.jsx("small",{children:D.state?.fingerprint.slice(-4)})]},D.finalUrl))})]}),l&&r.jsxs("button",{type:"button",className:"sidebar-settings",onClick:m,title:O("settings"),children:[r.jsx("span",{children:"⚙"}),r.jsx("em",{children:O("settings")})]}),r.jsx("div",{className:"sidebar-bottom",children:r.jsxs("div",{className:"workspace-language-row",children:[r.jsxs("button",{type:"button",className:"workspace-copy",onClick:x,title:j,children:[r.jsx("span",{className:"status-dot status-pass"})," ",r.jsx("b",{children:O("localWorkspace")}),r.jsx("small",{children:j||O("storedHere")})]}),r.jsx("button",{type:"button",className:"language-circle",onClick:y,title:b==="en"?"Switch to Thai":"Switch to English (US)","aria-label":"Switch language",children:b==="en"?"EN":"TH"})]})})]})}function sj(n){return gv(n,!0)}function oj(n){return gv(n,!1)}function gv(n,l){const s=`<!doctype html><html><head><meta charset="utf-8"><title>LazyScout Quality Report</title><style>${dj}</style></head><body>${cj(n)}</body></html>`,o=window.open("","_blank","width=1100,height=820");return o&&(o.document.open(),o.document.write(s),o.document.close(),l&&window.setTimeout(()=>{o.focus(),o.print()},350)),s}function cj(n){const l=[["Test Cases",n.testCases,`${n.pages} pages explored`],["Pass",n.passed,"Execution result"],["Failed",n.failed,"Execution result"],["Requirements",n.requirementCount,`${n.linkedCases}/${n.testCases} cases linked`]],s=n.failedCases.length?`<section class="failures"><div class="head"><div><p>FOLLOW-UP</p><h2>Failed Test Cases & logs</h2></div><em>${n.failedCases.length} failed</em></div>${n.failedCases.map(o=>`<article><div><b>${Ln(o.id)} · ${Ln(o.title)}</b><small>${Ln(o.folder||"UNASSIGNED")}</small></div><pre>${o.logs.length?Ln(o.logs.join(`
37
- `)):"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>${Ln(n.origin)} · Generated ${Ln(n.generatedAt)}</small></div><div class="report-state">${n.pending} pending execution</div></header><section class="metrics">${l.map(([o,u,h])=>`<article><span>${o}</span><b>${u}</b><small>${h}</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>${tg(n.status,"Test Cases")}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Priority</h2></div><em>Column chart</em></div>${uj(n.priority)}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Test type</h2></div><em>Bar chart</em></div>${ng(n.testType)}</article><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Automation readiness</h2></div><em>Donut chart</em></div>${tg(n.readiness,"Cases")}</article><article class="card wide"><div class="head"><div><p>HIERARCHY</p><h2>Folder coverage</h2></div><em>Top 10</em></div>${ng(n.modules)}</article></section>${s}<footer>LazyScout · Local QA workspace</footer></main>`}function tg(n,l){const s=n.reduce((h,f)=>h+f.value,0);let o=0;return`<div class="donut-wrap"><div class="donut" style="background:conic-gradient(${n.map(h=>{const f=s?o/s*100:0;o+=h.value;const p=s?o/s*100:0;return`${h.color} ${f}% ${p}%`}).join(", ")||"#e2e8f0 0 100%"})"><div><b>${s}</b><span>${l}</span></div></div><div class="legend">${n.map(h=>`<div><i style="background:${h.color}"></i><span title="${Ln(h.label)}">${Ln(Ud(h.label))}</span><b>${h.value}</b></div>`).join("")}</div></div>`}function uj(n){const l=Math.max(...n.map(o=>o.value),1),s=n.reduce((o,u)=>o+u.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(n.length,1)},minmax(0,1fr))">${n.map(o=>`<div class="column"><div class="column-track"><i style="height:${o.value/l*100}%;background:${o.color}"></i></div><b>${o.value} <small>${Math.round(o.value/s*100)}%</small></b><span>${Ln(Ud(o.label))}</span></div>`).join("")}</div></div>`}function ng(n){const l=Math.max(...n.map(s=>s.value),1);return`<div class="bars">${n.map(s=>`<div><span title="${Ln(s.label)}">${Ln(Ud(s.label))}</span><section><i style="width:${s.value/l*100}%;background:${s.color}"></i></section><b>${s.value}</b></div>`).join("")}</div>`}function Ud(n){return n.length>10?`${n.slice(0,10)}...`:n}function Ln(n){return String(n).replace(/[&<>'"]/g,l=>({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"})[l]??l)}const dj="@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 fj({result:n,testCases:l,executionStatuses:s={},runResults:o={},projectId:u}){const[h,f]=I.useState(!1),[p,g]=I.useState({status:!0,priority:!0,type:!0,automation:!0,modules:!0,trend:!0}),[m,j]=I.useState({status:"donut",priority:"column",type:"bar",automation:"donut",modules:"treemap",trend:"line"}),x=q=>s[q.id]??q.status??"pending",b={passed:l.filter(q=>x(q)==="passed").length,failed:l.filter(q=>x(q)==="failed").length,pending:l.filter(q=>x(q)==="pending").length},y=Fs(l,q=>q.priority),O=Fs(l,q=>q.type),N=Fs(l,q=>q.automationStatus),_=Fs(l,q=>(q.folder??q.module)||"UNASSIGNED"),w=I.useMemo(()=>bj(n),[n]),C=[{label:"Pass",value:b.passed,color:"#10b981"},{label:"Failed",value:b.failed,color:"#ef4444"},{label:"Pending",value:b.pending,color:"#f59e0b"}],A=[{label:"High",value:y.high??0,color:"#ef4444"},{label:"Medium",value:y.medium??0,color:"#f59e0b"},{label:"Low",value:y.low??0,color:"#3b82f6"}],H=[{label:"Positive",value:O.positive??0,color:"#10b981"},{label:"Negative",value:O.negative??0,color:"#ef4444"},{label:"Validation",value:O.validation??0,color:"#6366f1"}],D=[{label:"Ready",value:N.ready??0,color:"#3b82f6"},{label:"Needs review",value:N["needs-review"]??0,color:"#f59e0b"},{label:"Needs data",value:N["needs-data"]??0,color:"#8b5cf6"},{label:"Manual",value:N.manual??0,color:"#64748b"}],K=Object.entries(_).map(([q,T],Z)=>({label:q,value:T,color:ag[Z%ag.length]})),G=l.filter(q=>(q.requirements?.length??0)>0).length,re=new Set(l.flatMap(q=>q.requirements??[])).size,$={origin:n.origin,generatedAt:new Date().toLocaleString(),pages:n.pages.length,testCases:l.length,passed:b.passed,failed:b.failed,pending:b.pending,needsReview:N["needs-review"]??0,linkedCases:G,requirementCount:re,status:C,priority:A,testType:H,readiness:D,modules:yv(K),failedCases:l.filter(q=>x(q)==="failed").map(q=>({id:q.id,title:q.title,folder:q.folder??q.module,logs:(o[q.id]?.logs??[]).slice(-8).map(T=>`${new Date(T.timestamp).toLocaleTimeString()} ${T.message}`)}))},F=q=>g(T=>({...T,[q]:!T[q]})),ne=(q,T)=>j(Z=>({...Z,[q]:T})),M=q=>{const T=q?sj($):oj($);u&&$0(u,q?"quality-report-print.html":"quality-report.html",T)};return r.jsxs("div",{className:"dashboard-view",children:[r.jsxs("div",{className:"dashboard-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Project dashboard"}),r.jsx("h2",{children:"Quality overview"}),r.jsxs("p",{children:["Coverage and readiness for ",r.jsx("b",{children:n.origin})]})]}),r.jsxs("div",{className:"dashboard-actions",children:[r.jsxs("span",{className:"status-badge status-badge-warn",children:[b.pending," pending execution"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>f(q=>!q),children:"Customize"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>M(!1),children:"HTML report"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>M(!0),children:"Export PDF"})]})]}),h&&r.jsxs("div",{className:"dashboard-customize",children:[r.jsx("b",{children:"Dashboard layout"}),r.jsx("span",{children:"Show or hide charts"}),["status","priority","type","automation","modules","trend"].map(q=>r.jsxs("label",{children:[r.jsx("input",{type:"checkbox",checked:p[q],onChange:()=>F(q)})," ",hj(q)]},q))]}),r.jsxs("div",{className:"dashboard-metrics",children:[r.jsx(nl,{label:"Test Cases",value:l.length,hint:`${n.pages.length} pages explored`,tone:"blue"}),r.jsx(nl,{label:"Pass",value:b.passed,hint:"Execution result",tone:"green"}),r.jsx(nl,{label:"Failed",value:b.failed,hint:"Execution result",tone:"red"}),r.jsx(nl,{label:"Need Review",value:N["needs-review"]??0,hint:"Tester decision needed",tone:"amber"}),r.jsx(nl,{label:"Requirements",value:re,hint:`${G}/${l.length} cases linked`,tone:"blue"})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.status&&r.jsx(ei,{eyebrow:"Composition",title:"Execution status",panel:"status",kind:m.status,onChange:ne,children:al(m.status,C,"Test Cases")}),p.priority&&r.jsx(ei,{eyebrow:"Comparison",title:"Priority",panel:"priority",kind:m.priority,onChange:ne,children:al(m.priority,A,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.type&&r.jsx(ei,{eyebrow:"Comparison",title:"Test type",panel:"type",kind:m.type,onChange:ne,children:al(m.type,H,"Cases")}),p.automation&&r.jsx(ei,{eyebrow:"Composition",title:"Automation readiness",panel:"automation",kind:m.automation,onChange:ne,children:al(m.automation,D,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.modules&&r.jsx(ei,{eyebrow:"Hierarchy",title:"Folder coverage",panel:"modules",kind:m.modules,onChange:ne,children:al(m.modules,K,"Cases")}),p.trend&&r.jsx(ei,{eyebrow:"Trend",title:"Scout discovery",panel:"trend",kind:m.trend,onChange:ne,children:m.trend==="line"?r.jsx(yj,{points:w.slice(-bd)}):r.jsx(vv,{items:w.slice(-bd).map((q,T)=>({label:`Step ${T+1}`,value:q,color:"#4f46e5"}))})})]})]})}function ei({eyebrow:n,title:l,panel:s,kind:o,onChange:u,children:h}){return r.jsxs("section",{className:"dashboard-card",children:[r.jsxs("div",{className:"dashboard-card-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:n}),r.jsx("h3",{children:l})]}),r.jsxs("label",{className:"chart-selector",children:[r.jsx("span",{children:"Chart"}),r.jsx("select",{value:o,onChange:f=>u(s,f.target.value),children:xj[s].map(f=>r.jsx("option",{value:f,children:pj(f)},f))})]})]}),h]})}function nl({label:n,value:l,hint:s,tone:o}){return r.jsxs("div",{className:`dashboard-metric tone-${o}`,children:[r.jsx("span",{children:n}),r.jsx("strong",{children:l}),r.jsx("small",{children:s})]})}function Fs(n,l){return n.reduce((s,o)=>{const u=l(o);return s[u]=(s[u]??0)+1,s},{})}function hj(n){return{status:"Execution status",priority:"Priority comparison",type:"Test type comparison",automation:"Automation readiness",modules:"Folder treemap",trend:"Scout trend"}[n]}function pj(n){return{bar:"Bar chart",column:"Column chart",donut:"Donut chart",treemap:"Treemap",line:"Line chart"}[n]}function al(n,l,s){const o=yv(l);return n==="donut"?r.jsx(mj,{slices:o,totalLabel:s,compact:o.length>3}):n==="column"?r.jsx(vv,{items:o}):n==="treemap"?r.jsx(vj,{items:o}):r.jsx(gj,{items:o})}function mj({slices:n,totalLabel:l,compact:s=!1}){const o=n.reduce((f,p)=>f+p.value,0);let u=0;const h=n.map(f=>{const p=o?u/o*100:0;u+=f.value;const g=o?u/o*100:0;return`${f.color} ${p}% ${g}%`}).join(", ");return r.jsxs("div",{className:`donut-chart ${s?"is-compact":""}`,children:[r.jsx("div",{className:"donut-ring",style:{background:o?`conic-gradient(${h})`:"#e2e8f0"},children:r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:l})]})}),r.jsx("div",{className:"donut-legend",children:n.map(f=>r.jsxs("div",{children:[r.jsx("i",{style:{background:f.color}}),r.jsx("span",{title:f.label,children:vo(f.label)}),r.jsx("b",{children:f.value})]},f.label))})]})}function vv({items:n}){const l=Math.max(...n.map(o=>o.value),1),s=n.reduce((o,u)=>o+u.value,0)||1;return r.jsxs("div",{className:"column-chart-wrap",children:[r.jsxs("div",{className:"column-axis","aria-hidden":"true",children:[r.jsx("span",{children:"100%"}),r.jsx("span",{children:"75%"}),r.jsx("span",{children:"50%"}),r.jsx("span",{children:"25%"}),r.jsx("span",{children:"0%"})]}),r.jsxs("div",{className:"column-chart",style:{gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`},children:[r.jsx("div",{className:"column-grid","aria-hidden":"true"}),n.map(o=>r.jsxs("div",{className:"column-item",title:o.label,children:[r.jsx("div",{className:"column-track",children:r.jsx("i",{style:{height:`${o.value/l*100}%`,background:o.color}})}),r.jsxs("div",{className:"column-value",children:[r.jsx("b",{children:o.value}),r.jsxs("small",{children:[Math.round(o.value/s*100),"%"]})]}),r.jsx("span",{children:vo(o.label)})]},o.label))]})]})}function gj({items:n}){const l=Math.max(...n.map(s=>s.value),1);return r.jsx("div",{className:"bar-chart",children:n.map(s=>r.jsxs("div",{className:"bar-row",children:[r.jsx("span",{title:s.label,children:vo(s.label)}),r.jsx("div",{children:r.jsx("i",{style:{width:`${s.value/l*100}%`,background:s.color}})}),r.jsx("b",{children:s.value})]},s.label))})}function vj({items:n}){return r.jsx("div",{className:"treemap",children:n.length?n.map(l=>r.jsxs("div",{style:{flexGrow:l.value,background:l.color},title:`${l.label}: ${l.value}`,children:[r.jsx("b",{children:vo(l.label)}),r.jsxs("span",{children:[l.value," cases"]})]},l.label)):r.jsx("p",{children:"No folders found."})})}function yj({points:n}){const l=Math.max(...n,1),s=Math.max(n.length-1,1),o=n.map((u,h)=>`${h/s*100},${100-u/l*82-9}`).join(" ");return r.jsxs("div",{className:"line-chart",children:[r.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",role:"img","aria-label":"Cumulative Scout discovery trend",children:[r.jsx("line",{x1:"0",y1:"91",x2:"100",y2:"91"}),r.jsx("polyline",{points:o})]}),r.jsxs("div",{className:"line-chart-meta",children:[r.jsx("span",{children:"Start"}),r.jsxs("b",{children:[n[n.length-1]??0," discoveries"]}),r.jsx("span",{children:"Complete"})]})]})}function bj(n){let l=0;const s=[0];for(const o of n.runEvents)(o.eventType==="page-discovered"||o.eventType==="state-discovered"||o.eventType==="action-discovered")&&(l++,s.push(l));return s.length>1?s:[0,n.pages.length]}const ag=["#2563eb","#7c3aed","#0891b2","#059669","#d97706","#db2777","#475569"],xj={status:["donut","bar","column"],priority:["column","bar","donut"],type:["bar","column","donut"],automation:["donut","bar","column"],modules:["treemap","bar","column","donut"],trend:["line","column"]},bd=10;function yv(n){return[...n].sort((l,s)=>s.value-l.value).slice(0,bd)}function vo(n){return n.length>10?`${n.slice(0,10)}...`:n}function Sj({pages:n,testCases:l,recordedCases:s,completedRuns:o,onScout:u,onReview:h,onRecord:f,onRun:p,onExport:g}){const{language:m}=Cn(),j=m==="th",x=[{label:j?"สำรวจเว็บไซต์":"Scout the website",description:n?j?`ค้นพบ ${n} หน้า`:`${n} pages discovered`:j?"ใส่ URL แล้วให้ LazyScout สร้าง Test Case ชุดแรก":"Enter a URL and let LazyScout discover the first Test Cases.",complete:n>0,action:n?j?"สำรวจอีกครั้ง":"Scout again":j?"เริ่ม Scout":"Start Scout",onClick:u},{label:j?"ตรวจทาน Test Case":"Review Test Cases",description:l?j?`มี ${l} Test Case พร้อมให้ตรวจทาน`:`${l} Test Cases are ready to review.`:j?"ตรวจชื่อ ขั้นตอน และผลลัพธ์ที่คาดหวัง":"Review titles, steps, and expected results.",complete:l>0,action:j?"เปิด Test Case":"Open Test Cases",onClick:h},{label:j?"Record Flow ที่ขาด":"Record missing flows",description:s?j?`บันทึกแล้ว ${s} Flow`:`${s} recorded flow${s===1?"":"s"} saved.`:j?"บันทึก Login หรือขั้นตอนงานที่ Scout คาดเดาไม่ได้":"Record login or business actions that Scout cannot infer.",complete:s>0,action:"Record Flow",onClick:f},{label:j?"รัน Automation":"Run Automation",description:o?j?`รันแล้ว ${o} Test Case`:`${o} Test Case${o===1?"":"s"} executed.`:j?"รัน Test Case ที่เลือกด้วย Playwright CLI":"Run selected Test Cases with the Playwright CLI.",complete:o>0,action:j?"เปิด Automation":"Open Automation",onClick:p},{label:j?"ส่ง Test Case ให้ทีม":"Share the Test Cases",description:j?"Export Test Case ที่ตรวจแล้วเป็น CSV เพื่อส่งให้ทีม":"Export the reviewed Test Cases as a CSV file for your team.",complete:!1,action:"Export CSV",onClick:g}];return r.jsxs("section",{className:"journey-card","aria-labelledby":"journey-title",children:[r.jsxs("header",{children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:j?"ขั้นตอนที่แนะนำ":"Recommended workflow"}),r.jsx("h3",{id:"journey-title",children:j?"ต่อไปควรทำอะไร?":"What should I do next?"})]}),r.jsxs("span",{children:[x.filter(b=>b.complete).length,"/4 ",j?"ขั้นตอนพร้อมแล้ว":"setup steps complete"]})]}),r.jsx("div",{className:"journey-steps",children:x.map((b,y)=>r.jsxs("article",{className:b.complete?"is-complete":"",children:[r.jsx("span",{className:"journey-number",children:b.complete?"✓":y+1}),r.jsxs("div",{children:[r.jsx("b",{children:b.label}),r.jsx("small",{children:b.description})]}),r.jsxs("button",{type:"button",onClick:b.onClick,children:[b.action," ",r.jsx("span",{children:"→"})]})]},b.label))})]})}const jj=1e3,wj=3,Hu=n=>({projectId:n,status:"idle",startUrl:"",startedAt:"",steps:[]});function _j(n){const[l,s]=I.useState(()=>Hu(n??"")),[o,u]=I.useState(!1),[h,f]=I.useState(),[p,g]=I.useState(!1),[m,j]=I.useState(!1);I.useEffect(()=>{if(!n)return;let w=!0;return s(Hu(n)),f(void 0),g(!1),j(!1),Gm(n).then(C=>{if(C.status==="stopped"){Im(n).catch(()=>{});return}w&&C.status==="recording"&&s(C)}).catch(()=>{}),()=>{w=!1}},[n]);const x=l.status==="recording"&&!p;I.useEffect(()=>{if(!n||!x)return;let w=!0,C=!1,A=0;const H=setInterval(()=>{C||(C=!0,Gm(n).then(D=>{A=0,w&&s(D)}).catch(()=>{A+=1,A>=wj&&w&&(f("Lost contact with the recorder. Stop and start it again."),g(!0))}).finally(()=>{C=!1}))},jj);return()=>{w=!1,clearInterval(H)}},[n,x]);const b=I.useCallback(async w=>{if(n){u(!0),f(void 0),g(!1),j(!1);try{s(await A0(n,w))}catch(C){f(C instanceof Error?C.message:"The recorder could not be started.")}finally{u(!1)}}},[n]),y=I.useCallback(async()=>{if(n){u(!0);try{s(await R0(n))}catch(w){f(w instanceof Error?w.message:"The recorder could not be stopped.")}finally{u(!1)}}},[n]),O=I.useCallback(async()=>{if(!n||!x)return;const w=!m;try{const C=await k0(n,w);s(C),j(w)}catch(C){f(C instanceof Error?C.message:"The inspect mode could not be changed.")}},[m,n,x]),N=I.useCallback(async w=>{if(!(!n||!x))try{s(await z0(n,w))}catch(C){f(C instanceof Error?C.message:"The browser interaction failed.")}},[n,x]),_=I.useCallback(()=>{s(Hu(n??"")),f(void 0),g(!1),j(!1),n&&Im(n).catch(()=>{})},[n]);return{state:l,recording:x,busy:o,error:h,start:b,stop:y,reset:_,inspectMode:m,toggleInspectMode:O,interact:N}}const Nj="{{TEST_PASSWORD}}",rg="Recorded login",Tj=160;function bv({projectId:n,targetUrl:l,onSaveRecording:s,onPickTarget:o}){const{state:u,recording:h,busy:f,error:p,start:g,stop:m,reset:j,inspectMode:x,toggleInspectMode:b,interact:y}=_j(n),[O,N]=I.useState(rg),[_,w]=I.useState(!1),[C,A]=I.useState(0),[H,D]=I.useState(l),[K,G]=I.useState(!1),re=I.useRef(0),$=I.useRef(void 0),F=u.steps,ne=u.status==="stopped"&&F.length>0;I.useEffect(()=>{!K&&u.currentUrl&&D(u.currentUrl)},[K,u.currentUrl]),I.useEffect(()=>{if(!(!_||!h))return A(Date.now()),()=>{$.current!==void 0&&window.clearTimeout($.current)}},[h,_]);const M=()=>{$.current!==void 0&&window.clearTimeout($.current),$.current=window.setTimeout(()=>A(Date.now()),Tj)},q=async v=>{await y(v),A(Date.now())};I.useEffect(()=>{if(!_)return;const v=document.body,R=document.documentElement,B=v.style.overflow,J=v.style.paddingRight,se=R.style.overflow,ge=window.innerWidth-R.clientWidth;return v.style.overflow="hidden",R.style.overflow="hidden",ge>0&&(v.style.paddingRight=`${ge}px`),()=>{v.style.overflow=B,v.style.paddingRight=J,R.style.overflow=se}},[_]);const T=v=>{const R=v.currentTarget.getBoundingClientRect();return{x:(v.clientX-R.left)/R.width*v.currentTarget.naturalWidth,y:(v.clientY-R.top)/R.height*v.currentTarget.naturalHeight}},Z=v=>{if(v.nativeEvent.isComposing||["Shift","Control","Alt","Meta"].includes(v.key))return;if(v.preventDefault(),v.key.length===1&&!v.ctrlKey&&!v.altKey&&!v.metaKey){q({type:"text",text:v.key});return}const R=[v.ctrlKey&&"Control",v.altKey&&"Alt",v.metaKey&&"Meta",v.shiftKey&&"Shift"].filter(Boolean).join("+");q({type:"key",key:R?`${R}+${v.key}`:v.key})},V=v=>{v.preventDefault(),v.stopPropagation(),q({type:"scroll",deltaX:v.deltaX,deltaY:v.deltaY})},P=()=>{const v=H.trim();if(!v||!h)return;let R=v;try{R=new URL(v,u.currentUrl||l).toString()}catch{return}q({type:"navigate",url:R})},X=()=>{j(),N(rg),w(!1)},k=()=>{s(F,O.trim()||"Recorded flow",u.startUrl||l),X()},Y=async v=>{if(!o)return;const R=Ej(v);await m(),j(),w(!1),o(R)};return r.jsxs("div",{className:"settings-notice settings-notice-stacked recorder-panel",children:[r.jsx("b",{children:"Record a flow"}),r.jsx("span",{children:"Start the Cypress-style workspace to record clicks, typing, and element locators."}),p&&r.jsx("p",{className:"recorder-error",children:p}),!h&&!ne&&r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:f,onClick:()=>{w(!0),g(l)},children:f?"Starting…":"Start recording"}),h&&!_&&r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>w(!0),children:"Open recorder workspace"}),!_&&h&&u.inspection&&r.jsxs("div",{className:"recorder-inspection","aria-live":"polite",children:[r.jsxs("div",{className:"recorder-inspection-heading",children:[r.jsx("b",{children:"Selected element"}),r.jsxs("code",{children:["<",u.inspection.tagName,">"]})]}),u.inspection.accessibleName&&r.jsxs("span",{children:["Accessible name: ",u.inspection.accessibleName]}),u.inspection.role&&r.jsxs("span",{children:["Role: ",u.inspection.role]}),u.inspection.id&&r.jsxs("span",{children:["ID: ",u.inspection.id]}),u.inspection.name&&r.jsxs("span",{children:["Name: ",u.inspection.name]}),r.jsxs("label",{children:["CSS selector",r.jsx("code",{children:u.inspection.cssSelector})]}),r.jsxs("label",{children:["Playwright locator",r.jsx("code",{children:u.inspection.playwrightLocator})]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:"Copy locator"})]}),!_&&F.length>0&&r.jsx("ol",{className:"recorder-steps",children:F.map((v,R)=>r.jsxs("li",{children:[r.jsx("span",{className:"recorder-step-index",children:R+1}),r.jsx("span",{children:li(v)})]},`${R}-${v.type}`))}),!_&&ne&&r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"recorder-title",children:[r.jsx("span",{children:"Test Case title"}),r.jsx("input",{value:O,onChange:v=>N(v.target.value),placeholder:"Recorded login"})]}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",onClick:k,children:"Save as Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:X,children:"Discard"})]})]}),u.status==="stopped"&&F.length===0&&r.jsx("p",{className:"recorder-status",children:"No steps were recorded. Start again and interact with the page."}),_&&r.jsx("div",{className:"modern-modal-backdrop recorder-workspace-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal recorder-workspace-modal",role:"dialog","aria-modal":"true","aria-labelledby":"recorder-workspace-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("h2",{id:"recorder-workspace-title",children:"Record and inspect"}),r.jsxs("p",{children:["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 ",r.jsx("code",{children:Nj}),"."]})]}),r.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close recorder workspace",onClick:()=>w(!1),children:"×"})]}),r.jsxs("div",{className:"recorder-workspace-body",children:[r.jsxs("aside",{className:"recorder-workspace-sidebar",children:[r.jsx("span",{className:"recorder-workspace-status",children:h?"● Recording":"○ Recorder idle"}),r.jsx("button",{type:"button",className:"btn btn-danger",disabled:!h||f,onClick:()=>{m()},children:f?"Stopping…":"Stop recording"}),r.jsx("button",{type:"button",className:x?"btn btn-primary":"btn btn-secondary",disabled:!h||f,onClick:()=>{b()},children:x?"Inspecting element":"Inspect element"}),r.jsx("p",{className:"recorder-workspace-help",children:"Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock."}),u.inspection&&r.jsxs("div",{className:"recorder-workspace-selection",children:[r.jsxs("div",{className:"recorder-inspection-lock-row",children:[r.jsx("b",{children:"Selected element"}),r.jsx("span",{className:u.inspection.locked?"is-locked":"",children:u.inspection.locked?"Locked":"Hover preview"})]}),r.jsxs("code",{children:["<",u.inspection.tagName,">"]}),u.inspection.accessibleName&&r.jsx("span",{children:u.inspection.accessibleName}),r.jsx("code",{children:u.inspection.playwrightLocator}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:"Copy locator"}),o&&u.inspection.locked&&r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{Y(u.inspection)},children:"Use this element"})]}),F.length>0&&r.jsx("ol",{className:"recorder-workspace-steps",children:F.map((v,R)=>r.jsxs("li",{children:[r.jsx("span",{children:R+1}),r.jsx("p",{children:li(v)})]},`${R}-${v.type}`))}),ne&&r.jsxs("div",{className:"recorder-workspace-save",children:[r.jsxs("label",{children:["Test Case title",r.jsx("input",{value:O,onChange:v=>N(v.target.value)})]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:k,children:"Save as Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:X,children:"Discard"})]}),r.jsxs("span",{className:"recorder-workspace-count",children:["Recorded steps: ",F.length]})]}),r.jsxs("main",{className:"recorder-workspace-preview",children:[r.jsxs("div",{className:"recorder-workspace-browser-bar",children:[r.jsx("button",{type:"button","aria-label":"Back",disabled:!h,onClick:()=>{q({type:"back"})},children:"←"}),r.jsx("button",{type:"button","aria-label":"Forward",disabled:!h,onClick:()=>{q({type:"forward"})},children:"→"}),r.jsx("button",{type:"button","aria-label":"Reload",disabled:!h,onClick:()=>{q({type:"reload"})},children:"↻"}),r.jsxs("form",{className:"recorder-workspace-address-form",onSubmit:v=>{v.preventDefault(),P()},children:[r.jsx("input",{className:"recorder-workspace-url",value:H,disabled:!h,"aria-label":"Browser address",spellCheck:!1,onFocus:()=>G(!0),onBlur:()=>G(!1),onChange:v=>D(v.target.value)}),r.jsx("button",{type:"submit",className:"recorder-address-go",disabled:!h||!H.trim(),children:"Go"})]})]}),r.jsx("div",{className:"recorder-browser-viewport",style:{cursor:u.pointerCursor??"default"},role:"application",tabIndex:0,"aria-label":"Interactive Playwright browser",onKeyDown:Z,onCompositionEnd:v=>{q({type:"text",text:v.data})},onPaste:v=>{v.preventDefault(),q({type:"text",text:v.clipboardData.getData("text")})},onWheel:V,children:h?r.jsx("img",{src:D0(n,C),alt:"Live Playwright browser",draggable:!1,style:{cursor:u.pointerCursor??"default"},onLoad:M,onError:M,onClick:v=>{v.currentTarget.parentElement?.focus(),q({type:"click",...T(v)})},onMouseMove:v=>{Date.now()-re.current<80||(re.current=Date.now(),y({type:"move",...T(v)}))}}):r.jsx("div",{className:"recorder-browser-loading",children:ne?"Recording stopped. Save the Test Case from the left panel.":"Starting Playwright browser…"})}),r.jsx("p",{children:"Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly."}),r.jsxs("div",{className:"hidden","aria-hidden":"true",children:[r.jsx("span",{className:"recorder-live-browser-icon","aria-hidden":"true",children:"◉"}),r.jsx("b",{children:"Live Playwright browser"}),r.jsx("p",{children:"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."}),r.jsx("span",{className:"recorder-live-browser-note",children:"The page is intentionally not embedded in an iframe."})]})]})]}),r.jsx("footer",{className:"modal-footer",children:r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>w(!1),children:"Close workspace"})})]})})]})}function Ej(n){return n.role&&n.accessibleName?{strategy:"role",role:n.role,name:n.accessibleName,cssSelector:n.cssSelector}:{strategy:"css",cssSelector:n.cssSelector}}const Cj=["navigate","click","fill","select","check","wait","assert"],Oj="https://lazyscout.lazyscout.workers.dev/guided-flow.html";function Aj({flows:n,baseUrl:l,projectId:s,secrets:o,onSave:u,onGenerateTestCase:h}){const[f,p]=I.useState(),[g,m]=I.useState(),[j,x]=I.useState("click"),[b,y]=I.useState(!1),[O,N]=I.useState(!1),[_,w]=I.useState(),[C,A]=I.useState(),[H,D]=I.useState(),[K,G]=I.useState();I.useEffect(()=>{if(!n.length)return;const B=n.find(J=>J.id===f)??n[0];p(B.id),m(B)},[n]);const re=n.findIndex(B=>B.id===g?.id),$=!!(g?.baseUrl&&g.steps.length);function F(){const B=new Date().toISOString(),J={id:crypto.randomUUID(),name:"New Guided Flow",description:"",baseUrl:l||"http://localhost:5173",steps:[{id:crypto.randomUUID(),type:"navigate",path:"/"}],createdAt:B,updatedAt:B};p(J.id),m(J),A(void 0)}function ne(B){m(J=>J&&{...J,...B,updatedAt:new Date().toISOString()})}function M(B,J){if(!g)return;const se=g.steps.map((ge,Ne)=>Ne===B?J:ge);ne({steps:se})}function q(){g&&ne({steps:[...g.steps,kj(j)]})}function T(B){g&&ne({steps:g.steps.filter((J,se)=>se!==B)})}function Z(B,J){if(!g)return;const se=B+J;if(se<0||se>=g.steps.length)return;const ge=[...g.steps],[Ne]=ge.splice(B,1);ge.splice(se,0,Ne),ne({steps:ge})}async function V(){if(g){y(!0);try{const B=re<0?[...n,g]:n.map(J=>J.id===g.id?g:J);await u(B)}finally{y(!1)}}}async function P(){if(!g)return;const B={...g,id:crypto.randomUUID(),name:`${g.name} Copy`,steps:g.steps.map(J=>({...J,id:crypto.randomUUID()})),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};await u([...n,B]),p(B.id),m(B)}async function X(){if(!g)return;const B=n.filter(J=>J.id!==g.id);y(!0);try{await u(B),p(B[0]?.id),m(B[0])}finally{y(!1)}}async function k(){if(K)try{K==="save"?await V():await X(),G(void 0)}catch{}}async function Y(){if(!g||!$||O)return;N(!0),A(void 0);const B=crypto.randomUUID();w(B);try{A(await E0(g,s,o,B))}catch(J){A({status:"failed",framework:"playwright",runId:B,logs:[{timestamp:new Date().toISOString(),level:"fail",message:J instanceof Error?J.message:String(J)}],stepStatuses:g.steps.map(se=>({id:se.id,status:"pending"}))})}finally{N(!1),w(void 0)}}async function v(){_&&await C0(_)}const R=I.useMemo(()=>new Map(C?.stepStatuses.map(B=>[B.id,B.status])),[C]);return r.jsxs("div",{className:"guided-flow-panel",children:[r.jsxs("div",{className:"guided-flow-intro",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Tester-defined execution"}),r.jsx("h2",{children:"Guided Flow"}),r.jsx("p",{children:"Auto Scout finds the paths. Guided Scout follows yours."})]}),r.jsxs("div",{className:"guided-flow-intro-actions",children:[r.jsxs("a",{className:"guided-flow-guide-link",href:Oj,target:"_blank",rel:"noreferrer","aria-label":"Open the visual Guided Flow guide",title:"Open visual Guided Flow guide",children:[r.jsx("span",{"aria-hidden":"true",children:"▤"}),"Guided Flow Guide"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:F,children:"+ New Flow"})]})]}),r.jsxs("section",{className:"hidden","aria-hidden":"true",children:[r.jsxs("div",{className:"guided-flow-guide-grid",children:[r.jsxs("div",{children:[r.jsx("strong",{children:"Inputs without a label"}),r.jsxs("p",{children:["Use CSS with a stable id or name. Example: ",r.jsx("code",{children:"input#username"}),"."]})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Buttons"}),r.jsx("p",{children:"Prefer Role + accessible name, or CSS when the button has a stable id."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Labels"}),r.jsx("p",{children:"Use Label when the input has a real HTML label. It is also useful for validation checks."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Login example"}),r.jsx("pre",{children:`Fill · CSS · #username · TEST_USERNAME
38
- Fill · CSS · #password · TEST_PASSWORD
39
- Click · CSS · #submit`})]})]}),r.jsxs("div",{className:"guided-flow-guide-steps",children:[r.jsx("strong",{children:"First time using Guided Flow?"}),r.jsxs("ol",{children:[r.jsx("li",{children:"Open the target page in your browser and inspect the element you want to test."}),r.jsxs("li",{children:["If it has an id, choose ",r.jsx("b",{children:"CSS"}),". If it is a named button, choose ",r.jsx("b",{children:"Role"}),"."]}),r.jsxs("li",{children:["Enter only the selector value, for example ",r.jsx("code",{children:"#username"}),", not the whole HTML tag."]}),r.jsxs("li",{children:["For usernames and passwords, leave Value empty and use ",r.jsx("b",{children:"Value reference"}),"."]}),r.jsx("li",{children:"Save the Flow, run it, then use the CLI error to adjust only the failing step."})]})]}),r.jsxs("div",{className:"guided-flow-guide-decision",children:[r.jsx("b",{children:"Not sure which locator to choose?"}),r.jsx("span",{children:"id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child"})]})]}),r.jsxs("div",{className:"guided-flow-layout",children:[r.jsxs("aside",{className:"guided-flow-list",children:[r.jsxs("div",{className:"guided-flow-list-head",children:[r.jsx("b",{children:"Guided Flows"}),r.jsx("span",{children:n.length})]}),n.map(B=>r.jsxs("button",{type:"button",className:B.id===g?.id?"is-active":"",onClick:()=>{p(B.id),m(B),A(void 0)},children:[r.jsx("strong",{children:B.name}),r.jsxs("small",{children:[B.steps.length," steps"]})]},B.id)),!n.length&&r.jsx("p",{className:"guided-flow-empty",children:"Create a flow to define a deterministic path."})]}),g?r.jsxs("main",{className:"guided-flow-editor",children:[r.jsxs("div",{className:"guided-flow-fields",children:[r.jsxs("label",{children:["Flow name",r.jsx("input",{className:"field",value:g.name,onChange:B=>ne({name:B.target.value})})]}),r.jsxs("label",{children:["Base URL",r.jsx("input",{className:"field",value:g.baseUrl,onChange:B=>ne({baseUrl:B.target.value})})]}),r.jsxs("label",{className:"guided-flow-wide",children:["Description",r.jsx("textarea",{className:"field",rows:2,value:g.description??"",onChange:B=>ne({description:B.target.value})})]})]}),r.jsxs("div",{className:"guided-flow-section-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Flow Steps"}),r.jsx("span",{children:"Execute only the steps defined here."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:P,children:"Duplicate"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>G("delete"),children:"Delete"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>G("save"),disabled:b,children:b?"Saving…":"Save Flow"})]})]}),r.jsx("div",{className:"guided-flow-steps",children:g.steps.map((B,J)=>r.jsx(Dj,{index:J,step:B,status:R.get(B.id),projectId:s,baseUrl:g.baseUrl||l,onChange:se=>M(J,se),onDelete:()=>T(J),onMove:Z},B.id))}),r.jsxs("div",{className:"guided-flow-add",children:[r.jsx("select",{className:"field",value:j,onChange:B=>x(B.target.value),children:Cj.map(B=>r.jsx("option",{children:B},B))}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:q,children:"+ Add Step"})]}),r.jsxs("div",{className:"guided-flow-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!$||O,onClick:Y,children:O?"Running…":"Run Flow"}),O&&r.jsx("button",{type:"button",className:"btn btn-danger",onClick:v,children:"Stop"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>D({framework:"playwright",source:s0(g)}),children:"Generate Playwright"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>D({framework:"cypress",source:d0(g)}),children:"Generate Cypress"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>h(i0(g)),children:"Generate Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!0,title:"Record Flow is planned for a future release",children:"Record Flow · Planned"})]}),H&&r.jsxs("section",{className:"guided-flow-code",children:[r.jsxs("header",{children:[r.jsxs("b",{children:[H.framework==="playwright"?"Playwright":"Cypress"," generated source"]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>D(void 0),"aria-label":"Close generated code",children:"×"})]}),r.jsx("pre",{children:H.source})]}),C&&r.jsxs("section",{className:"guided-flow-run",children:[r.jsx("header",{children:r.jsxs("b",{children:["Run result: ",C.status]})}),r.jsx("div",{className:"guided-flow-log",children:C.logs.map((B,J)=>r.jsx("code",{className:`cli-${B.level}`,children:B.message},`${B.timestamp}-${J}`))})]})]}):r.jsxs("div",{className:"guided-flow-empty-state",children:[r.jsx("b",{children:"No Guided Flow selected"}),r.jsx("span",{children:"Define a path and LazyScout will follow it only."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:F,children:"Create Guided Flow"})]})]}),K&&g&&r.jsx(Rj,{action:K,flowName:g.name,busy:b,onCancel:()=>G(void 0),onConfirm:k})]})}function Rj({action:n,flowName:l,busy:s,onCancel:o,onConfirm:u}){const h=n==="delete";return r.jsx("div",{className:"guided-flow-confirm-backdrop",role:"presentation",onMouseDown:o,children:r.jsxs("section",{className:"guided-flow-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"guided-flow-confirm-title",onMouseDown:f=>f.stopPropagation(),children:[r.jsx("span",{className:"guided-flow-confirm-icon"+(h?" is-delete":""),"aria-hidden":"true",children:h?"×":"✓"}),r.jsx("p",{className:"eyebrow",children:h?"Remove Guided Flow":"Save Guided Flow"}),r.jsx("h3",{id:"guided-flow-confirm-title",children:h?"Delete this Flow?":"Save your changes?"}),r.jsx("p",{children:h?'"'+l+'" will be removed from this local Project. This action cannot be undone.':'"'+l+'" will be saved to this local Project and will be ready to run.'}),r.jsxs("footer",{children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,disabled:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn "+(h?"btn-danger":"btn-primary"),onClick:u,disabled:s,children:s?"Saving…":h?"Delete Flow":"Save Flow"})]})]})})}function dr(){return{strategy:"role",role:"button",name:"Button"}}function kj(n){const l=crypto.randomUUID();return n==="navigate"?{id:l,type:n,path:"/"}:n==="click"?{id:l,type:n,target:dr()}:n==="fill"?{id:l,type:n,target:{...dr(),role:"textbox"},value:""}:n==="select"?{id:l,type:n,target:{...dr(),role:"combobox"},option:""}:n==="check"?{id:l,type:n,target:{...dr(),role:"checkbox"},checked:!0}:n==="wait"?{id:l,type:n,mode:"timeout",value:"750"}:{id:l,type:n,assertion:{type:"text",value:""}}}function Dj({index:n,step:l,status:s,onChange:o,onDelete:u,onMove:h,projectId:f,baseUrl:p}){return r.jsxs("article",{className:`guided-flow-step ${s?`is-${s}`:""}`,children:[r.jsxs("header",{children:[r.jsx("span",{className:"guided-flow-step-number",children:n+1}),r.jsx("b",{children:l.type}),s&&r.jsx("em",{children:s}),r.jsxs("div",{className:"guided-flow-step-actions",children:[r.jsx("button",{type:"button",onClick:()=>h(n,-1),disabled:n===0,children:"↑"}),r.jsx("button",{type:"button",onClick:()=>h(n,1),children:"↓"}),r.jsx("button",{type:"button",onClick:u,children:"Delete"})]})]}),r.jsx(zj,{step:l,onChange:o,projectId:f,baseUrl:p})]})}function zj({step:n,onChange:l,projectId:s,baseUrl:o}){return n.type==="navigate"?r.jsxs("label",{children:["Path",r.jsx("input",{className:"field",value:n.path,onChange:u=>l({...n,path:u.target.value})})]}):n.type==="click"||n.type==="fill"||n.type==="select"||n.type==="check"?r.jsxs(r.Fragment,{children:[r.jsx(qu,{target:n.target,projectId:s,baseUrl:o,onChange:u=>l({...n,target:u})}),n.type==="fill"&&r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:n.value??"",onChange:u=>l({...n,value:u.target.value,valueRef:void 0})})]}),r.jsxs("label",{children:["Value reference",r.jsx("input",{className:"field",placeholder:"TEST_USERNAME",value:n.valueRef??"",onChange:u=>l({...n,valueRef:u.target.value||void 0,value:u.target.value?void 0:n.value})}),r.jsxs("small",{className:"guided-flow-field-help",children:["Use a Project Settings variable such as ",r.jsx("code",{children:"TEST_USERNAME"})," or ",r.jsx("code",{children:"TEST_PASSWORD"}),". Do not put real credentials in Value."]})]})]}),n.type==="select"&&r.jsxs("label",{children:["Option",r.jsx("input",{className:"field",value:n.option,onChange:u=>l({...n,option:u.target.value})})]}),n.type==="check"&&r.jsxs("label",{className:"guided-flow-check",children:[r.jsx("input",{type:"checkbox",checked:n.checked,onChange:u=>l({...n,checked:u.target.checked})})," ","Checked"]})]}):n.type==="wait"?r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Wait type",r.jsxs("select",{className:"field",value:n.mode,onChange:u=>l({...n,mode:u.target.value}),children:[r.jsx("option",{value:"timeout",children:"Wait for timeout"}),r.jsx("option",{value:"url",children:"Wait for URL"}),r.jsx("option",{value:"text",children:"Wait for text"}),r.jsx("option",{value:"visible",children:"Wait for element visible"})]})]}),r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:n.value,onChange:u=>l({...n,value:u.target.value})})]}),n.mode==="visible"&&r.jsx(qu,{target:n.target??dr(),projectId:s,baseUrl:o,onChange:u=>l({...n,target:u})})]}):r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Assertion",r.jsxs("select",{className:"field",value:n.assertion.type,onChange:u=>l({...n,assertion:u.target.value==="visible"?{type:"visible",target:dr()}:{type:u.target.value,value:""}}),children:[r.jsx("option",{value:"visible",children:"Element visible"}),r.jsx("option",{value:"text",children:"Text visible"}),r.jsx("option",{value:"url",children:"URL contains"})]})]}),n.assertion.type==="visible"?r.jsx(qu,{target:n.assertion.target,projectId:s,baseUrl:o,onChange:u=>l({...n,assertion:{type:"visible",target:u}})}):r.jsxs("label",{children:["Expected value",r.jsx("input",{className:"field",value:n.assertion.value,onChange:u=>l({...n,assertion:n.assertion.type==="text"?{type:"text",value:u.target.value}:{type:"url",value:u.target.value}})})]})]})}function qu({target:n,onChange:l,projectId:s,baseUrl:o}){const[u,h]=I.useState(!1),f=n.strategy==="role"?n.name??"":n[n.strategy==="testid"?"testId":n.strategy==="css"?"cssSelector":n.strategy];return r.jsxs("div",{className:"guided-flow-target",children:[r.jsxs("div",{className:"guided-flow-picker-head",children:[r.jsx("span",{children:"Target element"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!s||!o,onClick:()=>h(p=>!p),children:"◎ Pick from page"})]}),u&&s&&o&&r.jsx("div",{className:"guided-flow-picker",children:r.jsx(bv,{projectId:s,targetUrl:o,onSaveRecording:()=>{},onPickTarget:p=>{l({...dr(),...p}),h(!1)}})}),r.jsxs("label",{children:["Locator",r.jsxs("select",{className:"field",value:n.strategy,onChange:p=>l({strategy:p.target.value,value:""}),children:[r.jsx("option",{value:"role",children:"Role"}),r.jsx("option",{value:"label",children:"Label"}),r.jsx("option",{value:"placeholder",children:"Placeholder"}),r.jsx("option",{value:"text",children:"Text"}),r.jsx("option",{value:"testid",children:"Test ID"}),r.jsx("option",{value:"css",children:"CSS"})]}),r.jsx("small",{className:"guided-flow-field-help",children:Uj(n.strategy)})]}),n.strategy==="role"&&r.jsxs("label",{children:["Role",r.jsx("input",{className:"field",value:n.role??"",onChange:p=>l({...n,role:p.target.value})})]}),r.jsxs("label",{children:[n.strategy==="role"?"Accessible name":"Value",r.jsx("input",{className:"field",value:f??"",placeholder:ig(n.strategy),onChange:p=>l(Lj(n,p.target.value))}),r.jsxs("small",{className:"guided-flow-field-help",children:["Example: ",r.jsx("code",{children:ig(n.strategy)})]})]})]})}function Uj(n){return n==="css"?"Best for inputs/buttons with a stable id, name, or data attribute. Enter quotes without backslashes.":n==="role"?"Best for buttons, links, checkboxes, and controls with a clear accessible name.":n==="label"?"Use only when the input has a real HTML label. Useful for validation checks.":n==="placeholder"?"Use when the input has a stable placeholder attribute.":n==="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 ig(n){return n==="css"?'#username or input[name="email"]':n==="role"?"Submit":n==="label"?"Email":n==="placeholder"?"Search products":n==="testid"?"save-button":"Welcome back"}function Lj(n,l){return n.strategy==="role"?{...n,name:l}:n.strategy==="testid"?{...n,testId:l}:n.strategy==="css"?{...n,cssSelector:l.replace(/\\(["'])/g,"$1")}:{...n,[n.strategy]:l}}function Mj({result:n,testCaseCount:l,flows:s,baseUrl:o,projectId:u,secrets:h,onSaveFlows:f,onGenerateTestCase:p,onAddToFlow:g,onClose:m,onOpenCases:j}){const[x,b]=I.useState("state-flow"),[y,O]=I.useState("auto-scout"),[N,_]=I.useState(),[w,C]=I.useState(),[A,H]=I.useState(1),D=n.actionGraph.states.find(G=>G.id===N),K=n.actionGraph.edges.find(G=>G.id===w);return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:G=>G.target===G.currentTarget&&m(),children:r.jsxs("section",{className:"modern-modal explorer-flow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"flow-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Website explorer"}),r.jsx("h2",{id:"flow-title",children:"UI State Explorer"}),r.jsx("p",{children:n.origin})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:m,"aria-label":"Close explorer",children:"×"})]}),r.jsxs("div",{className:"explorer-main-tabs",role:"tablist","aria-label":"Explorer mode",children:[r.jsx("button",{type:"button",className:y==="auto-scout"?"active":"",onClick:()=>O("auto-scout"),children:"Auto Scout"}),r.jsx("button",{type:"button",className:y==="guided-flow"?"active":"",onClick:()=>O("guided-flow"),children:"Guided Flow"})]}),y==="guided-flow"?r.jsx(Aj,{flows:s,baseUrl:o,projectId:u,secrets:h,onSave:f,onGenerateTestCase:p}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"explorer-hero",children:[r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:l}),r.jsx("span",{children:"draft test cases"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:n.stats.pagesVisited}),r.jsx("span",{children:"pages discovered"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:n.actionGraph.states.length}),r.jsx("span",{children:"UI states observed"})]})]}),r.jsxs("div",{className:"explorer-view-tabs",role:"tablist","aria-label":"Explorer view",children:[r.jsx("button",{type:"button",className:x==="site-map"?"active":"",onClick:()=>b("site-map"),children:"Site Map"}),r.jsxs("button",{type:"button",className:x==="state-flow"?"active":"",onClick:()=>b("state-flow"),children:["State Flow ",r.jsx("span",{children:n.actionGraph.edges.length})]})]}),x==="site-map"?r.jsx(Bj,{result:n,onSelect:G=>{_(G.id),b("state-flow")}}):r.jsxs("div",{className:"state-flow-layout",children:[r.jsx($j,{states:n.actionGraph.states,edges:n.actionGraph.edges,selectedStateId:N,selectedEdgeId:w,zoom:A,onZoom:H,onState:G=>{_(G),C(void 0)},onEdge:G=>{C(G),_(void 0)}}),r.jsx(Hj,{state:D,edge:K,states:n.actionGraph.states,onAddToFlow:g})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"flow-safety",children:[n.actionGraph.blockedActionKeys.length," unsafe actions blocked"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:j,children:"Review Test Cases"})]})]})})}function Bj({result:n,onSelect:l}){const s=I.useMemo(()=>{const o=new Map;for(const u of n.actionGraph.states){const h=o.get(u.url)??[];h.push(u),o.set(u.url,h)}return[...o.entries()]},[n.actionGraph.states]);return r.jsx("div",{className:"site-map-list",children:s.map(([o,u])=>r.jsxs("section",{children:[r.jsx("h3",{children:new URL(o).pathname||"/"}),r.jsx("small",{children:o}),u.map(h=>r.jsxs("button",{type:"button",onClick:()=>l(h),children:[r.jsx("i",{className:`state-type-${h.type}`})," ",r.jsx("span",{children:h.name||h.title||"Observed state"}),r.jsx("em",{children:h.type})]},h.id))]},o))})}function $j({states:n,edges:l,selectedStateId:s,selectedEdgeId:o,zoom:u,onZoom:h,onState:f,onEdge:p}){const g=[...new Map(n.map(_=>[_.url,n.filter(w=>w.url===_.url)])).values()],m=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(g.length)))),j=Math.ceil(g.length/m),b=Math.max(1,...g.map(_=>_.length))*130+90,y=new Map;g.forEach((_,w)=>{const C=w%m,A=Math.floor(w/m);_.forEach((H,D)=>{y.set(H.id,{x:150+C*300,y:115+A*b+D*130})})});const O=m*300+80,N=Math.max(320,j*b+40);return r.jsxs("div",{className:"state-flow-canvas",children:[r.jsxs("div",{className:"flow-toolbar",children:[r.jsxs("span",{children:[n.length," states · ",l.length," transitions"]}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>h(Math.max(.6,u-.15)),children:"−"}),r.jsx("button",{type:"button",onClick:()=>h(Math.min(1.4,u+.15)),children:"+"}),r.jsx("button",{type:"button",onClick:()=>h(1),children:"Fit"})]})]}),r.jsx("div",{className:"flow-viewport",children:r.jsxs("svg",{width:O*u,height:N*u,viewBox:`0 0 ${O} ${N}`,"aria-label":"UI state flow graph",children:[r.jsx("defs",{children:r.jsx("marker",{id:"flow-arrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:r.jsx("path",{d:"M0,0 L8,4 L0,8 Z",fill:"#94a3b8"})})}),g.map((_,w)=>{const C=w%m,A=Math.floor(w/m),H=20+C*300,D=35+A*b;return r.jsxs("g",{className:"flow-page-group",children:[r.jsx("rect",{x:H,y:D,width:"260",height:b-20,rx:"14"}),r.jsx("text",{x:H+14,y:D+22,className:"flow-page-label",children:Gu(new URL(_[0].url).pathname||"/",30)})]},_[0].url)}),l.map(_=>{const w=y.get(_.fromStateId),C=_.toStateId?y.get(_.toStateId):void 0;if(!w||!C)return null;const A=_.id===o;return r.jsxs("g",{onClick:()=>p(_.id),className:"flow-edge",children:[r.jsx("path",{className:A?"selected":"",d:`M ${w.x} ${w.y+38} C ${w.x} ${w.y+95}, ${C.x} ${C.y-95}, ${C.x} ${C.y-38}`,markerEnd:"url(#flow-arrow)"}),r.jsx("title",{children:_.action.description})]},_.id)}),n.map(_=>{const w=y.get(_.id),C=_.id===s;return r.jsxs("g",{onClick:()=>f(_.id),className:"flow-node",children:[r.jsx("rect",{className:C?"selected":"",x:w.x-112,y:w.y-38,width:"224",height:"76",rx:"12"}),r.jsx("text",{x:w.x-94,y:w.y-11,className:"flow-node-type",children:_.type.toUpperCase()}),r.jsx("text",{x:w.x-94,y:w.y+12,className:"flow-node-name",children:Gu(_.name||_.title||_.url,27)}),r.jsx("text",{x:w.x-94,y:w.y+28,className:"flow-node-url",children:Gu(new URL(_.url).pathname||"/",31)}),r.jsx("title",{children:_.name||_.title||_.url})]},_.id)})]})})]})}function Hj({state:n,edge:l,states:s,onAddToFlow:o}){if(!n&&!l)return r.jsxs("aside",{className:"flow-inspector empty",children:[r.jsx("b",{children:"Select a state or transition"}),r.jsx("span",{children:"Click a node to view observed UI. Click a line to inspect the action that created it."})]});if(l){const u=s.find(f=>f.id===l.fromStateId),h=s.find(f=>f.id===l.toStateId);return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"Transition detail"}),r.jsx("h3",{children:l.action.description}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Action type"}),r.jsx("dd",{children:l.action.type}),r.jsx("dt",{children:"Status"}),r.jsx("dd",{children:l.status}),r.jsx("dt",{children:"Safety"}),r.jsx("dd",{children:l.action.safe?"Safe action":l.action.reason||"Blocked"}),r.jsx("dt",{children:"From"}),r.jsx("dd",{children:u?.name||u?.url}),r.jsx("dt",{children:"To"}),r.jsx("dd",{children:h?.name||"Not observed"}),l.action.locator&&r.jsxs(r.Fragment,{children:[r.jsx("dt",{children:"Locator"}),r.jsxs("dd",{children:[l.action.locator.role,": ",l.action.locator.name]})]}),l.action.locator&&r.jsx("button",{type:"button",className:"btn btn-secondary mt-3",onClick:()=>o({id:crypto.randomUUID(),type:"click",target:qj(l.action.locator)}),children:"Add to Guided Flow"})]})]})}return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"State detail"}),r.jsx("h3",{children:n.name||n.title||"Observed state"}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Type"}),r.jsx("dd",{children:n.type}),r.jsx("dt",{children:"URL"}),r.jsx("dd",{className:"break-all",children:n.url}),r.jsx("dt",{children:"Fingerprint"}),r.jsxs("dd",{className:"font-mono",children:[n.fingerprint.slice(0,18),"…"]}),r.jsx("dt",{children:"Discovered"}),r.jsx("dd",{children:n.discoveredAt?new Date(n.discoveredAt).toLocaleString():"Previous scan"})]}),r.jsxs("section",{children:[r.jsx("b",{children:"Observed UI"}),r.jsx("p",{children:n.headings.slice(0,3).join(" · ")||"No headings recorded"}),r.jsx("p",{children:n.visibleDialogs.length?`Dialog: ${n.visibleDialogs.join(", ")}`:`${n.controls.length} controls observed`}),n.validationMessages?.length?r.jsxs("p",{children:["Validation: ",n.validationMessages.join(" · ")]}):null]})]})}function qj(n){return n.role?{strategy:"role",role:n.role,name:n.name??""}:n.label?{strategy:"label",label:n.label}:n.placeholder?{strategy:"placeholder",placeholder:n.placeholder}:n.testId?{strategy:"testid",testId:n.testId}:{strategy:"text",text:n.name??""}}function Gu(n,l){return n.length>l?`${n.slice(0,l-1)}…`:n}const lg=n=>n.join(`
40
- `),Gj=n=>n.split(/[\n,]/).map(l=>l.trim());function Ij({filter:n,onChange:l}){const[s,o]=I.useState(()=>lg(n.keywords)),u=(h,f=n.enabled)=>{o(h),l({enabled:f,keywords:Gj(h)})};return r.jsxs("div",{className:"settings-notice settings-notice-stacked click-filter-panel",children:[r.jsxs("b",{children:["Click safeguards ",n.enabled?"ON":"OFF"]}),r.jsx("span",{children:"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."}),r.jsxs("label",{className:"settings-toggle",children:[r.jsx("input",{type:"checkbox",checked:n.enabled,onChange:h=>l({...n,enabled:h.target.checked})}),r.jsx("span",{children:"Block controls whose label contains one of these words"})]}),n.enabled&&r.jsxs(r.Fragment,{children:[r.jsx("textarea",{className:"click-filter-input",rows:5,value:s,onChange:h=>u(h.target.value),placeholder:`delete
41
- pay now
42
- transfer`}),r.jsx("p",{className:"click-filter-help",children:"One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control."}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(lg([...new Set([...n.keywords,...iv])])),children:"Add suggested words"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(""),children:"Clear list"})]})]})]})}const Vj={"not-configured":["No session saved","ยังไม่มี Session"],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","ใช้ไม่ได้ — บันทึกการ Login ใหม่"]};function Ps(n){return n instanceof Error?n.message:String(n)}function Yj({projectName:n,projectId:l,targetUrl:s,secrets:o,onSave:u,onClear:h,onClose:f,onSaveRecording:p,clickFilter:g,onChangeClickFilter:m,initialTab:j="credentials"}){const{language:x}=Cn(),b=x==="th",[y,O]=I.useState(j),[N,_]=I.useState(o),[w,C]=I.useState(),[A,H]=I.useState(!1),[D,K]=I.useState(!1),[G,re]=I.useState(!1),[$,F]=I.useState(!1),[ne,M]=I.useState(!1),[q,T]=I.useState(!1),[Z,V]=I.useState(),[P,X]=I.useState(""),[k,Y]=I.useState(!1),v=(ae,je)=>_(Te=>({...Te,[ae]:je||void 0})),R=w?.status??"not-configured",B=w?.loginBrowserOpen??q,J=D||G||$,se=R!=="not-configured",ge=JSON.stringify(N)!==JSON.stringify(o),Ne=w?.detail??(w?.verifiedAt?`${b?"ตรวจล่าสุด":"Last verified"} ${new Date(w.verifiedAt).toLocaleString()}${w.verifiedPath?` · ${w.verifiedPath}`:""}`:w?.capturedAt?`${b?"บันทึกเมื่อ":"Captured"} ${new Date(w.capturedAt).toLocaleString()}`:b?"ยังไม่ได้บันทึก Session สำหรับโปรเจกต์นี้":"No session has been recorded for this Project yet.");async function _e(){if(l){H(!0);try{C(await S0(l))}catch{C(void 0)}finally{H(!1)}}}return I.useEffect(()=>{_e()},[l]),r.jsx("div",{className:"modal-backdrop",role:"presentation",onMouseDown:ae=>{ae.target===ae.currentTarget&&f()},children:r.jsxs("section",{className:"modal-card project-settings-modal",role:"dialog","aria-modal":"true","aria-labelledby":"project-settings-title",children:[r.jsxs("div",{className:"modal-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:b?"ตั้งค่าโปรเจกต์":"Project settings"}),r.jsx("h2",{id:"project-settings-title",children:y==="credentials"?b?"ข้อมูลสำหรับทดสอบ":"Test credentials":y==="session"?"Browser session":y==="safety"?b?"กฎความปลอดภัย":"Safety rules":b?"บันทึก Flow":"Record a flow"}),r.jsxs("p",{children:[n??(b?"โปรเจกต์ปัจจุบัน":"Current project")," ·"," ",b?"ตั้งค่าทีละหมวด":"Configure one task at a time"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":"Close",children:"×"})]}),r.jsx("nav",{className:"settings-tabs","aria-label":"Project settings sections",children:[["credentials",b?"ข้อมูลทดสอบ":"Credentials",b?"ตัวแปรสำหรับ Login และ API":"Variables used by login and API steps"],["session","Browser Session",b?"Google, SSO และ Cookie ที่บันทึกไว้":"Google, SSO, and saved cookies"],["safety",b?"ความปลอดภัย":"Safety",b?"ป้องกันการคลิกที่มีความเสี่ยง":"Block risky clicks and actions"],["recorder","Recorder",b?"เปลี่ยนการกดของคุณเป็น Test Step":"Turn your browser actions into Test Steps"]].map(([ae,je,Te])=>r.jsx("button",{type:"button",title:Te,"aria-label":`${je} — ${Te}`,className:y===ae?"is-active":"",onClick:()=>O(ae),children:r.jsx("b",{children:je})},ae))}),r.jsxs("div",{className:"modal-body",children:[y==="credentials"&&r.jsxs("div",{className:"settings-section",children:[r.jsxs("div",{className:"settings-notice",children:[r.jsx("b",{children:b?"เก็บในหน่วยความจำเท่านั้น":"Memory only"}),r.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."})]}),r.jsxs("div",{className:"settings-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Email"}),r.jsx("input",{type:"email",value:N.email??"",onChange:ae=>v("email",ae.target.value),placeholder:"Test email",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Username"}),r.jsx("input",{value:N.username??"",onChange:ae=>v("username",ae.target.value),placeholder:"Test username",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Password"}),r.jsx("input",{type:"password",value:N.password??"",onChange:ae=>v("password",ae.target.value),placeholder:"Test password",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"API Token"}),r.jsx("input",{type:"password",value:N.apiToken??"",onChange:ae=>v("apiToken",ae.target.value),placeholder:"API token",autoComplete:"off"})]})]}),r.jsxs("p",{className:"settings-help",children:["Use ",r.jsx("code",{children:"{{TEST_PASSWORD}}"}),", ",r.jsx("code",{children:"{{TEST_EMAIL}}"}),","," ",r.jsx("code",{children:"{{TEST_USERNAME}}"})," or ",r.jsx("code",{children:"{{API_TOKEN}}"})," in a Test Case. Values are passed to the runner only while it runs."]}),r.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[r.jsx("b",{children:b?"วิธีใช้ข้อมูลทดสอบกับ Guided Flow":"How to connect credentials to Guided Flow"}),r.jsxs("span",{children:[b?"ในขั้นตอน Fill ให้เว้น Value ว่าง แล้วใส่ ":"In a Fill step, leave Value empty and put ",r.jsx("code",{children:"TEST_USERNAME"}),", ",r.jsx("code",{children:"TEST_PASSWORD"}),", ",b?"หรือ":"or"," ",r.jsx("code",{children:"TEST_EMAIL"})," ",b?"ใน Value reference โดย LazyScout จะแทนค่าตอนรันเท่านั้น":"in Value reference. LazyScout replaces the reference only during the run."]})]})]}),y==="session"&&l&&s&&r.jsxs("div",{className:"auth-panel",children:[r.jsxs("div",{className:`auth-state auth-state-${R}`,"aria-live":"polite",children:[r.jsx("span",{className:"auth-state-dot"}),r.jsxs("div",{children:[r.jsx("b",{children:Vj[R][b?1:0]}),r.jsx("small",{children:Ne})]}),r.jsx("span",{className:"auth-state-badge",children:R})]}),!se&&r.jsxs("ol",{className:"auth-steps",children:[r.jsx("li",{children:b?"เปิด Login browser แล้วเข้าสู่ระบบ":"Open the login browser and sign in"}),r.jsx("li",{children:b?"กด Capture session":"Capture the session"}),r.jsx("li",{children:b?"Verify กับหน้าที่ต้องล็อกอิน":"Verify against a page that requires a login"})]}),se&&r.jsxs("dl",{className:"auth-session-facts",children:[r.jsxs("div",{children:[r.jsx("dt",{children:b?"Cookie":"Cookies"}),r.jsxs("dd",{children:[w?.cookieCount??0,w?.sessionCookieCount?` (${w.sessionCookieCount} session)`:""]})]}),r.jsxs("div",{children:[r.jsx("dt",{children:b?"Origin":"Origins"}),r.jsx("dd",{children:w?.originCount??0})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"sessionStorage"}),r.jsx("dd",{children:w?.sessionStorageOriginCount??0})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"IndexedDB"}),r.jsx("dd",{children:w?.indexedDb?b?"รวม":"included":b?"ไม่รองรับ":"unsupported"})]})]}),w?.browserModeMismatch&&r.jsx("p",{className:"auth-warn",children:b?"Session ถูกบันทึกคนละโหมดเบราว์เซอร์กับที่ใช้รัน บางเว็บจะปฏิเสธ":"Captured in a different browser mode from the one runs use. Some applications reject that."}),w?.lockedBy&&r.jsx("p",{className:"auth-warn",children:b?`กำลังถูกใช้โดย ${w.lockedBy} — รันพร้อมกันสองตัวจะทำให้ session หลุด`:`Held by ${w.lockedBy}. Running two at once on one session signs both out.`}),r.jsxs("div",{className:"auth-session-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:D||J,onClick:async()=>{K(!0),V(void 0);try{await x0(l,s),T(!0),await _e()}catch(ae){V(Ps(ae))}finally{K(!1)}},children:D?b?"กำลังเปิด…":"Opening…":b?"เปิด Login browser":"Open login browser"}),r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!B||J,title:B?void 0:b?"เปิด Login browser และเข้าสู่ระบบก่อน":"Open the login browser and sign in first",onClick:async()=>{re(!0),V(void 0);try{C(await j0(l)),T(!1)}catch(ae){V(Ps(ae))}finally{re(!1)}},children:G?b?"กำลังบันทึก…":"Capturing…":b?"บันทึก Session":"Capture session"}),B&&r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:G,onClick:async()=>{V(void 0);try{await w0(l),T(!1),await _e()}catch(ae){V(Ps(ae))}},children:b?"ยกเลิกการเข้าสู่ระบบ":"Cancel sign-in"})]}),r.jsxs("label",{className:"auth-verify-row",children:[r.jsx("span",{children:b?"หน้าที่ต้องล็อกอิน (เช่น /dashboard)":"A path that requires a login (e.g. /dashboard)"}),r.jsxs("div",{children:[r.jsx("input",{value:P,onChange:ae=>X(ae.target.value),placeholder:"/dashboard",autoComplete:"off"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:J||!se||!P.trim(),title:se?P.trim()?void 0:b?"ใส่ path ของหน้าที่ต้องล็อกอิน":"Enter a path that requires a login":b?"บันทึก Session ก่อน":"Capture a session first",onClick:async()=>{F(!0),V(void 0);try{const ae=new URL(P||"/",s).toString();C(await _0(l,ae))}catch(ae){V(Ps(ae))}finally{F(!1)}},children:$?b?"กำลังตรวจ…":"Verifying…":b?"ตรวจสอบ":"Verify"})]})]}),Z&&r.jsx("p",{className:"auth-session-error",children:Z}),r.jsxs("div",{className:"auth-session-actions auth-session-secondary",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:A,onClick:()=>{_e()},children:A?b?"กำลังเช็ก…":"Checking…":b?"รีเฟรชสถานะ":"Refresh status"}),ne?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>{await O0(l),M(!1),T(!1),await _e()},children:b?"ยืนยันล้าง":"Confirm clear"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>M(!1),children:b?"ยกเลิก":"Cancel"})]}):r.jsx("button",{type:"button",className:"btn btn-danger",disabled:J,onClick:()=>M(!0),children:b?"ล้าง Session":"Clear login session"})]}),r.jsx("small",{className:"auth-session-hint",children:b?"สถานะจะเป็น ready ก็ต่อเมื่อเปิดหน้าที่ต้องล็อกอินได้จริงเท่านั้น การมีโฟลเดอร์อยู่ไม่ได้แปลว่า login ยังใช้ได้ · เคสที่บันทึกการ Login ไว้ต้องล้าง Session ก่อนถึงจะ 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."})]}),y==="session"&&(!l||!s)&&r.jsxs("div",{className:"settings-empty-state",children:[r.jsx("b",{children:b?"Scout เว็บไซต์ก่อน":"Scout a website first"}),r.jsx("span",{children:b?"ต้องมี Target URL ก่อน LazyScout จึงจะสร้าง Browser Session ที่ใช้ซ้ำได้":"A target URL is required before LazyScout can create a reusable browser session."})]}),y==="safety"&&r.jsx(Ij,{filter:g,onChange:m}),y==="recorder"&&l&&s&&p&&r.jsx(bv,{projectId:l,targetUrl:s,onSaveRecording:p}),y==="recorder"&&(!l||!s)&&r.jsxs("div",{className:"settings-empty-state",children:[r.jsx("b",{children:b?"เพิ่ม Target URL ก่อน":"Add a target URL first"}),r.jsx("span",{children:b?"Scout เว็บไซต์หนึ่งครั้ง แล้วกลับมาบันทึก Login และ Business Flow ที่นี่":"Scout a website once, then return here to record login and business flows."})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary mr-auto",onClick:()=>{h(),_({}),Y(!1)},children:b?"ล้างข้อมูลทดสอบ":"Clear secrets"}),k&&!ge&&r.jsx("span",{className:"settings-saved",role:"status",children:b?"บันทึกแล้ว":"Saved"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:f,children:b?"ปิด":"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!ge,title:ge?void 0:b?"ยังไม่มีการแก้ไข":"Nothing has changed",onClick:()=>{u(N),Y(!0)},children:b?"บันทึกข้อมูลทดสอบ":"Save credentials"})]})]})})}var Iu={exports:{}},sg;function Fj(){return sg||(sg=1,(function(n){var l=(function(s){var o=Object.prototype,u=o.hasOwnProperty,h=Object.defineProperty||function(k,Y,v){k[Y]=v.value},f,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",m=p.asyncIterator||"@@asyncIterator",j=p.toStringTag||"@@toStringTag";function x(k,Y,v){return Object.defineProperty(k,Y,{value:v,enumerable:!0,configurable:!0,writable:!0}),k[Y]}try{x({},"")}catch{x=function(Y,v,R){return Y[v]=R}}function b(k,Y,v,R){var B=Y&&Y.prototype instanceof A?Y:A,J=Object.create(B.prototype),se=new V(R||[]);return h(J,"_invoke",{value:M(k,v,se)}),J}s.wrap=b;function y(k,Y,v){try{return{type:"normal",arg:k.call(Y,v)}}catch(R){return{type:"throw",arg:R}}}var O="suspendedStart",N="suspendedYield",_="executing",w="completed",C={};function A(){}function H(){}function D(){}var K={};x(K,g,function(){return this});var G=Object.getPrototypeOf,re=G&&G(G(P([])));re&&re!==o&&u.call(re,g)&&(K=re);var $=D.prototype=A.prototype=Object.create(K);H.prototype=D,h($,"constructor",{value:D,configurable:!0}),h(D,"constructor",{value:H,configurable:!0}),H.displayName=x(D,j,"GeneratorFunction");function F(k){["next","throw","return"].forEach(function(Y){x(k,Y,function(v){return this._invoke(Y,v)})})}s.isGeneratorFunction=function(k){var Y=typeof k=="function"&&k.constructor;return Y?Y===H||(Y.displayName||Y.name)==="GeneratorFunction":!1},s.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,D):(k.__proto__=D,x(k,j,"GeneratorFunction")),k.prototype=Object.create($),k},s.awrap=function(k){return{__await:k}};function ne(k,Y){function v(J,se,ge,Ne){var _e=y(k[J],k,se);if(_e.type==="throw")Ne(_e.arg);else{var ae=_e.arg,je=ae.value;return je&&typeof je=="object"&&u.call(je,"__await")?Y.resolve(je.__await).then(function(Te){v("next",Te,ge,Ne)},function(Te){v("throw",Te,ge,Ne)}):Y.resolve(je).then(function(Te){ae.value=Te,ge(ae)},function(Te){return v("throw",Te,ge,Ne)})}}var R;function B(J,se){function ge(){return new Y(function(Ne,_e){v(J,se,Ne,_e)})}return R=R?R.then(ge,ge):ge()}h(this,"_invoke",{value:B})}F(ne.prototype),x(ne.prototype,m,function(){return this}),s.AsyncIterator=ne,s.async=function(k,Y,v,R,B){B===void 0&&(B=Promise);var J=new ne(b(k,Y,v,R),B);return s.isGeneratorFunction(Y)?J:J.next().then(function(se){return se.done?se.value:J.next()})};function M(k,Y,v){var R=O;return function(J,se){if(R===_)throw new Error("Generator is already running");if(R===w){if(J==="throw")throw se;return X()}for(v.method=J,v.arg=se;;){var ge=v.delegate;if(ge){var Ne=q(ge,v);if(Ne){if(Ne===C)continue;return Ne}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(R===O)throw R=w,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);R=_;var _e=y(k,Y,v);if(_e.type==="normal"){if(R=v.done?w:N,_e.arg===C)continue;return{value:_e.arg,done:v.done}}else _e.type==="throw"&&(R=w,v.method="throw",v.arg=_e.arg)}}}function q(k,Y){var v=Y.method,R=k.iterator[v];if(R===f)return Y.delegate=null,v==="throw"&&k.iterator.return&&(Y.method="return",Y.arg=f,q(k,Y),Y.method==="throw")||v!=="return"&&(Y.method="throw",Y.arg=new TypeError("The iterator does not provide a '"+v+"' method")),C;var B=y(R,k.iterator,Y.arg);if(B.type==="throw")return Y.method="throw",Y.arg=B.arg,Y.delegate=null,C;var J=B.arg;if(!J)return Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,C;if(J.done)Y[k.resultName]=J.value,Y.next=k.nextLoc,Y.method!=="return"&&(Y.method="next",Y.arg=f);else return J;return Y.delegate=null,C}F($),x($,j,"Generator"),x($,g,function(){return this}),x($,"toString",function(){return"[object Generator]"});function T(k){var Y={tryLoc:k[0]};1 in k&&(Y.catchLoc=k[1]),2 in k&&(Y.finallyLoc=k[2],Y.afterLoc=k[3]),this.tryEntries.push(Y)}function Z(k){var Y=k.completion||{};Y.type="normal",delete Y.arg,k.completion=Y}function V(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(T,this),this.reset(!0)}s.keys=function(k){var Y=Object(k),v=[];for(var R in Y)v.push(R);return v.reverse(),function B(){for(;v.length;){var J=v.pop();if(J in Y)return B.value=J,B.done=!1,B}return B.done=!0,B}};function P(k){if(k){var Y=k[g];if(Y)return Y.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var v=-1,R=function B(){for(;++v<k.length;)if(u.call(k,v))return B.value=k[v],B.done=!1,B;return B.value=f,B.done=!0,B};return R.next=R}}return{next:X}}s.values=P;function X(){return{value:f,done:!0}}return V.prototype={constructor:V,reset:function(k){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(Z),!k)for(var Y in this)Y.charAt(0)==="t"&&u.call(this,Y)&&!isNaN(+Y.slice(1))&&(this[Y]=f)},stop:function(){this.done=!0;var k=this.tryEntries[0],Y=k.completion;if(Y.type==="throw")throw Y.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var Y=this;function v(Ne,_e){return J.type="throw",J.arg=k,Y.next=Ne,_e&&(Y.method="next",Y.arg=f),!!_e}for(var R=this.tryEntries.length-1;R>=0;--R){var B=this.tryEntries[R],J=B.completion;if(B.tryLoc==="root")return v("end");if(B.tryLoc<=this.prev){var se=u.call(B,"catchLoc"),ge=u.call(B,"finallyLoc");if(se&&ge){if(this.prev<B.catchLoc)return v(B.catchLoc,!0);if(this.prev<B.finallyLoc)return v(B.finallyLoc)}else if(se){if(this.prev<B.catchLoc)return v(B.catchLoc,!0)}else if(ge){if(this.prev<B.finallyLoc)return v(B.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(k,Y){for(var v=this.tryEntries.length-1;v>=0;--v){var R=this.tryEntries[v];if(R.tryLoc<=this.prev&&u.call(R,"finallyLoc")&&this.prev<R.finallyLoc){var B=R;break}}B&&(k==="break"||k==="continue")&&B.tryLoc<=Y&&Y<=B.finallyLoc&&(B=null);var J=B?B.completion:{};return J.type=k,J.arg=Y,B?(this.method="next",this.next=B.finallyLoc,C):this.complete(J)},complete:function(k,Y){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&Y&&(this.next=Y),C},finish:function(k){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var v=this.tryEntries[Y];if(v.finallyLoc===k)return this.complete(v.completion,v.afterLoc),Z(v),C}},catch:function(k){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var v=this.tryEntries[Y];if(v.tryLoc===k){var R=v.completion;if(R.type==="throw"){var B=R.arg;Z(v)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(k,Y,v){return this.delegate={iterator:P(k),resultName:Y,nextLoc:v},this.method==="next"&&(this.arg=f),C}},s})(n.exports);try{regeneratorRuntime=l}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=l:Function("r","regeneratorRuntime = r")(l)}})(Iu)),Iu.exports}var Vu,og;function Ld(){return og||(og=1,Vu=(n,l)=>`${n}-${l}-${Math.random().toString(16).slice(3,8)}`),Vu}var Yu,cg;function xv(){if(cg)return Yu;cg=1;const n=Ld();let l=0;return Yu=({id:s,action:o,payload:u={}})=>{let h=s;return typeof h>"u"&&(h=n("Job",l),l+=1),{id:h,action:o,payload:u}},Yu}var rl={},ug;function Md(){if(ug)return rl;ug=1;let n=!1;return rl.logging=n,rl.setLogging=l=>{n=l},rl.log=(...l)=>n?console.log.apply(this,l):null,rl}var Fu,dg;function Pj(){if(dg)return Fu;dg=1;const n=xv(),{log:l}=Md(),s=Ld();let o=0;return Fu=()=>{const u=s("Scheduler",o),h={},f={};let p=[];o+=1;const g=()=>p.length,m=()=>Object.keys(h).length,j=()=>{if(p.length!==0){const N=Object.keys(h);for(let _=0;_<N.length;_+=1)if(typeof f[N[_]]>"u"){p[0](h[N[_]]);break}}},x=(N,_)=>new Promise((w,C)=>{const A=n({action:N,payload:_});p.push(async H=>{p.shift(),f[H.id]=A;try{w(await H[N].apply(this,[..._,A.id]))}catch(D){C(D)}finally{delete f[H.id],j()}}),l(`[${u}]: Add ${A.id} to JobQueue`),l(`[${u}]: JobQueue length=${p.length}`),j()});return{addWorker:N=>(h[N.id]=N,l(`[${u}]: Add ${N.id}`),l(`[${u}]: Number of workers=${m()}`),j(),N.id),addJob:async(N,..._)=>{if(m()===0)throw Error(`[${u}]: You need to have at least one worker before adding jobs`);return x(N,_)},terminate:async()=>{Object.keys(h).forEach(async N=>{await h[N].terminate()}),p=[]},getQueueLen:g,getNumWorkers:m}},Fu}function ol(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Pu,fg;function Zj(){return fg||(fg=1,Pu=n=>{const l={};return typeof WorkerGlobalScope<"u"?l.type="webworker":typeof document=="object"?l.type="browser":typeof process=="object"&&typeof ol=="function"&&(l.type="node"),typeof n>"u"?l:l[n]}),Pu}var Zu,hg;function Xj(){if(hg)return Zu;hg=1;const l=Zj()("type")==="browser"?s=>new URL(s,window.location.href).href:s=>s;return Zu=s=>{const o={...s};return["corePath","workerPath","langPath"].forEach(u=>{s[u]&&(o[u]=l(o[u]))}),o},Zu}var Xu,pg;function Sv(){return pg||(pg=1,Xu={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),Xu}const Kj="7.0.0",Qj={version:Kj};var Ku,mg;function Jj(){return mg||(mg=1,Ku={workerBlobURL:!0,logger:()=>{}}),Ku}var Qu,gg;function Wj(){if(gg)return Qu;gg=1;const n=Qj.version;return Qu={...Jj(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${n}/dist/worker.min.js`},Qu}var Ju,vg;function e1(){return vg||(vg=1,Ju=({workerPath:n,workerBlobURL:l})=>{let s;if(Blob&&URL&&l){const o=new Blob([`importScripts("${n}");`],{type:"application/javascript"});s=new Worker(URL.createObjectURL(o))}else s=new Worker(n);return s}),Ju}var Wu,yg;function t1(){return yg||(yg=1,Wu=n=>{n.terminate()}),Wu}var ed,bg;function n1(){return bg||(bg=1,ed=(n,l)=>{n.onmessage=({data:s})=>{l(s)}}),ed}var td,xg;function a1(){return xg||(xg=1,td=async(n,l)=>{n.postMessage(l)}),td}var nd,Sg;function r1(){if(Sg)return nd;Sg=1;const n=s=>new Promise((o,u)=>{const h=new FileReader;h.onload=()=>{o(h.result)},h.onerror=({target:{error:{code:f}}})=>{u(Error(`File could not be read! Code=${f}`))},h.readAsArrayBuffer(s)}),l=async s=>{let o=s;if(typeof s>"u")return"undefined";if(typeof s=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(s)?o=atob(s.split(",")[1]).split("").map(u=>u.charCodeAt(0)):o=await(await fetch(s)).arrayBuffer();else if(typeof HTMLElement<"u"&&s instanceof HTMLElement)s.tagName==="IMG"&&(o=await l(s.src)),s.tagName==="VIDEO"&&(o=await l(s.poster)),s.tagName==="CANVAS"&&await new Promise(u=>{s.toBlob(async h=>{o=await n(h),u()})});else if(typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas){const u=await s.convertToBlob();o=await n(u)}else(s instanceof File||s instanceof Blob)&&(o=await n(s));return new Uint8Array(o)};return nd=l,nd}var ad,jg;function i1(){if(jg)return ad;jg=1;const n=Wj(),l=e1(),s=t1(),o=n1(),u=a1(),h=r1();return ad={defaultOptions:n,spawnWorker:l,terminateWorker:s,onMessage:o,send:u,loadImage:h},ad}var rd,wg;function jv(){if(wg)return rd;wg=1;const n=Xj(),l=xv(),{log:s}=Md(),o=Ld(),u=Sv(),{defaultOptions:h,spawnWorker:f,terminateWorker:p,onMessage:g,loadImage:m,send:j}=i1();let x=0;return rd=async(b="eng",y=u.LSTM_ONLY,O={},N={})=>{const _=o("Worker",x),{logger:w,errorHandler:C,...A}=n({...h,...O}),H={},D=typeof b=="string"?b.split("+"):b;let K=y,G=N;const re=[u.DEFAULT,u.LSTM_ONLY].includes(y)&&!A.legacyCore;let $,F;const ne=new Promise((ae,je)=>{F=ae,$=je}),M=ae=>{$(ae.message)};let q=f(A);q.onerror=M,x+=1;const T=({id:ae,action:je,payload:Te})=>new Promise((Ge,Me)=>{s(`[${_}]: Start ${ae}, action=${je}`);const E=`${je}-${ae}`;H[E]={resolve:Ge,reject:Me},j(q,{workerId:_,jobId:ae,action:je,payload:Te})}),Z=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),V=ae=>T(l({id:ae,action:"load",payload:{options:{lstmOnly:re,corePath:A.corePath,logging:A.logging}}})),P=(ae,je,Te)=>T(l({id:Te,action:"FS",payload:{method:"writeFile",args:[ae,je]}})),X=(ae,je)=>T(l({id:je,action:"FS",payload:{method:"readFile",args:[ae,{encoding:"utf8"}]}})),k=(ae,je)=>T(l({id:je,action:"FS",payload:{method:"unlink",args:[ae]}})),Y=(ae,je,Te)=>T(l({id:Te,action:"FS",payload:{method:ae,args:je}})),v=(ae,je)=>T(l({id:je,action:"loadLanguage",payload:{langs:ae,options:{langPath:A.langPath,dataPath:A.dataPath,cachePath:A.cachePath,cacheMethod:A.cacheMethod,gzip:A.gzip,lstmOnly:[u.DEFAULT,u.LSTM_ONLY].includes(K)&&!A.legacyLang}}})),R=(ae,je,Te,Ge)=>T(l({id:Ge,action:"initialize",payload:{langs:ae,oem:je,config:Te}})),B=(ae="eng",je,Te,Ge)=>{if(re&&[u.TESSERACT_ONLY,u.TESSERACT_LSTM_COMBINED].includes(je))throw Error("Legacy model requested but code missing.");const Me=je||K;K=Me;const E=Te||G;G=E;const ie=(typeof ae=="string"?ae.split("+"):ae).filter(L=>!D.includes(L));return D.push(...ie),ie.length>0?v(ie,Ge).then(()=>R(ae,Me,E,Ge)):R(ae,Me,E,Ge)},J=(ae={},je)=>T(l({id:je,action:"setParameters",payload:{params:ae}})),se=async(ae,je={},Te={text:!0},Ge)=>T(l({id:Ge,action:"recognize",payload:{image:await m(ae),options:je,output:Te}})),ge=async(ae,je)=>{if(re)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return T(l({id:je,action:"detect",payload:{image:await m(ae)}}))},Ne=async()=>(q!==null&&(p(q),q=null),Promise.resolve());g(q,({workerId:ae,jobId:je,status:Te,action:Ge,data:Me})=>{const E=`${Ge}-${je}`;if(Te==="resolve")s(`[${ae}]: Complete ${je}`),H[E].resolve({jobId:je,data:Me}),delete H[E];else if(Te==="reject")if(H[E].reject(Me),delete H[E],Ge==="load"&&$(Me),C)C(Me);else throw Error(Me);else Te==="progress"&&w({...Me,userJobId:je})});const _e={id:_,worker:q,load:Z,writeText:P,readText:X,removeFile:k,FS:Y,reinitialize:B,setParameters:J,recognize:se,detect:ge,terminate:Ne};return V().then(()=>v(b)).then(()=>R(b,y,N)).then(()=>F(_e)).catch(()=>{}),ne},rd}var id,_g;function l1(){if(_g)return id;_g=1;const n=jv();return id={recognize:async(o,u,h)=>{const f=await n(u,1,h);return f.recognize(o).finally(async()=>{await f.terminate()})},detect:async(o,u)=>{const h=await n("osd",0,u);return h.detect(o).finally(async()=>{await h.terminate()})}},id}var ld,Ng;function s1(){return Ng||(Ng=1,ld={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"}),ld}var sd,Tg;function o1(){return Tg||(Tg=1,sd={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"}),sd}var od,Eg;function c1(){if(Eg)return od;Eg=1,Fj();const n=Pj(),l=jv(),s=l1(),o=s1(),u=Sv(),h=o1(),{setLogging:f}=Md();return od={languages:o,OEM:u,PSM:h,createScheduler:n,createWorker:l,setLogging:f,...s},od}var u1=c1();const d1=[{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"}],wv="lazyscout-test-case-language";function f1(){const n=localStorage.getItem(wv);return n==="th"||n==="en"?n:"en"}function h1({sourceUrl:n,initialLanguage:l,onLanguageChange:s,existingCases:o,onImport:u,onClose:h}){const[f,p]=I.useState(""),[g,m]=I.useState(""),[j,x]=I.useState("Screenshot screen"),[b,y]=I.useState("visual"),[O,N]=I.useState(l??f1),[_,w]=I.useState(""),[C,A]=I.useState([]),[H,D]=I.useState(""),[K,G]=I.useState(!1);function re(q){!q||!q.type.startsWith("image/")||(m(q.name),p(URL.createObjectURL(q)),D("Ready to read the image."))}async function $(){if(!f||K)return;G(!0),D("Reading Thai and English from the image…");const q=await u1.createWorker("tha+eng");try{const Z=(await q.recognize(f)).data.text.trim();w(Z),A(Z.split(/\r?\n/).map(V=>V.trim()).filter(V=>V.length>1).slice(0,12).map((V,P)=>P)),D("Reading complete. Review and edit the text before creating Test Cases.")}catch(T){D(T instanceof Error?T.message:"OCR failed.")}finally{await q.terminate(),G(!1)}}function F(){const q=_.split(/\r?\n/).map(R=>R.trim()).filter(R=>R.length>1).slice(0,12),T=(C.length?C.map(R=>q[R]).filter(Boolean):q).slice(0,8),Z="SCREENSHOT",V=new Set(o.map(R=>R.id));let P=1;const X=()=>{let R=`TC-${Z}-${String(P).padStart(3,"0")}`;for(;V.has(R);)R=`TC-${Z}-${String(++P).padStart(3,"0")}`;return V.add(R),P++,R},k=T.slice(0,8).map(R=>({type:"assertText",text:R,description:O==="th"?`ตรวจสอบว่าหน้าเว็บแสดงข้อความ "${R}"`:`Verify that "${R}" is visible on the page`})),Y={module:Z,preconditions:O==="th"?["เปิดหน้าที่ต้องการตรวจสอบให้ตรงกับภาพอ้างอิง"]:["Open the page that matches the screenshot reference"],sourceUrl:n||g,priority:"medium",automationStatus:"needs-review",type:"validation",notes:O==="th"?`สร้างจากภาพ ${g||"อ้างอิง"} · โปรดตรวจทานก่อนนำไปใช้งานจริง`:`Created from ${g||"reference"} · Review before production use`},v=[];(b==="visual"||b==="manual")&&v.push({...Y,id:X(),title:O==="th"?`ตรวจสอบว่า ${j} แสดงผลตรงตามภาพอ้างอิง`:`${j} matches the screenshot reference`,steps:[{type:"navigate",url:n||"about:blank",description:O==="th"?"เปิดหน้าที่ต้องการตรวจสอบ":"Open the page to inspect"},{type:"manual",description:O==="th"?"เปรียบเทียบโครงร่าง ระยะห่าง สี และตำแหน่งขององค์ประกอบกับภาพอ้างอิง":"Compare layout, spacing, colors and element positions with the screenshot"}],expectedResult:O==="th"?"โครงร่างและองค์ประกอบที่มองเห็นบนหน้าเว็บตรงกับภาพอ้างอิง":"The page layout and visible elements match the screenshot reference."}),(b==="visual"||b==="text")&&v.push({...Y,id:X(),title:O==="th"?`ตรวจสอบข้อความสำคัญทั้งหมดบน ${j}`:`${j} shows all important text`,steps:k,expectedResult:O==="th"?"ข้อความสำคัญบนหน้าจอแสดงครบถ้วนและอ่านได้ชัดเจน":"Important on-screen text is complete and readable."}),u(v),h()}const ne=_.split(/\r?\n/).map(q=>q.trim()).filter(q=>q.length>1).slice(0,12),M=C.length||ne.length;return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:q=>q.target===q.currentTarget&&h(),children:r.jsxs("section",{className:"modern-modal screenshot-importer",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Create Test Cases from an image"}),r.jsx("h2",{children:"Screenshot → Test Case"}),r.jsx("p",{children:"Follow three steps to create Draft Test Cases for review."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:h,children:"×"})]}),r.jsxs("div",{className:"screenshot-import-body",children:[r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"1"}),r.jsxs("div",{children:[r.jsx("b",{children:"Choose a Test Case pattern"}),r.jsx("p",{children:"Pick the pattern that matches what you need to check."})]})]}),r.jsx("div",{className:"pattern-grid",children:d1.map(q=>r.jsxs("button",{type:"button",className:`pattern-card ${b===q.id?"is-selected":""}`,onClick:()=>y(q.id),children:[r.jsx("b",{children:q.title}),r.jsx("span",{children:q.description})]},q.id))}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"2"}),r.jsxs("div",{children:[r.jsx("b",{children:"Upload a Screenshot"}),r.jsx("p",{children:"PNG, JPG and WEBP are supported."})]})]}),r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:q=>re(q.target.files?.[0])}),r.jsx("strong",{children:g||"Click to choose an image"}),r.jsx("span",{children:"or drop a file here"})]}),f&&r.jsxs("div",{className:"screenshot-preview",children:[r.jsx("img",{src:f,alt:"Screenshot preview"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:$,disabled:K,children:K?"Reading…":"Read text from image"})]}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"3"}),r.jsxs("div",{children:[r.jsx("b",{children:"Review text and create cases"}),r.jsx("p",{children:"You can edit OCR text before importing."})]})]}),r.jsxs("label",{className:"field-label",children:["Screen name",r.jsx("input",{className:"field mt-1",value:j,onChange:q=>x(q.target.value)})]}),r.jsxs("label",{className:"field-label",children:["Test Case language",r.jsxs("select",{className:"field mt-1",value:O,onChange:q=>{const T=q.target.value;N(T),localStorage.setItem(wv,T),s?.(T)},children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsxs("label",{className:"field-label",children:["Text detected",r.jsx("textarea",{className:"field screenshot-ocr",value:_,onChange:q=>{w(q.target.value),A([])},placeholder:"Read text from the image, or type it yourself"})]}),ne.length>0&&r.jsxs("div",{className:"import-preview",children:[r.jsxs("b",{children:["Choose OCR lines to create assertions (",M," selected)"]}),r.jsx("table",{children:r.jsx("tbody",{children:ne.map((q,T)=>{const Z=C.length===0||C.includes(T);return r.jsxs("tr",{children:[r.jsx("td",{children:r.jsx("input",{type:"checkbox",checked:Z,onChange:()=>A(V=>{const P=V.length===0?ne.map((X,k)=>k):V;return P.includes(T)?P.filter(X=>X!==T):[...P,T]})})}),r.jsx("td",{children:q})]},`${T}-${q}`)})})})]}),r.jsxs("div",{className:"import-summary",children:[r.jsx("b",{children:"Draft preview"}),r.jsxs("span",{children:[b==="visual"||b==="manual"?"1 visual comparison case":"",b==="visual"?" + ":"",b==="visual"||b==="text"?`1 text verification case with ${M} assertion(s)`:""]})]}),r.jsx("p",{className:"screenshot-status",children:H})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"mr-auto text-xs text-slate-500",children:["Results are marked ",r.jsx("b",{children:"needs-review"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:F,disabled:!_.trim()&&b!=="manual",children:"Create Draft Test Cases"})]})]})})}const p1=/^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;function m1(n){const l={},s={},o=n(),u=n.toString(),h=u.slice(u.indexOf("[")+1,u.lastIndexOf("]")).split(",").map(p=>p.trim());for(const p of h)if(!p1.test(p))throw new Error(`Invalid dependency name: ${p}`);let f=0;for(;f<o.length;){let p=h[f],g=o[f];typeof g=="function"?l[p]=g1(g,p):s[p]=g,f++}return{functions:l,variables:s}}function g1(n,l){const s=n.toString();if(n.prototype)if(s.indexOf("[native code]")>=0){const o=s.indexOf(" ",8)+1,u=s.indexOf("(",o);return s.slice(o,u)}else{let o=s;for(const u in n.prototype)o+=";"+l+".prototype."+u+"="+n.prototype[u].toString();return o}else return s}function v1(n,l,s,o,u,h){let f=!1,p;const g=()=>{p.stop()},m=(x,b)=>{try{p.ingest(x,b)}catch(y){throw g(),y}};return{start:(x,b)=>{if(f)throw new Error("Was started");f=!0;const y=u(),O=y&&y._,N=O||x1(l,x);O||h({_:N});const[_,w]=N;p=n(_,()=>{const H=u();if(H)return H.other},H=>{h(Object.assign(Object.assign({},u()),{other:H}))},s,o),w&&m(w,b)},stop:g,ingest:m}}const y1="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",b1=")(postMessage)}";function x1(n,l){const[s,o]=S1(l);return[s+";"+y1+n.toString()+b1,o]}function S1(n){let l={},s={};for(const u of n){const{functions:h,variables:f}=m1(u);l=Object.assign(Object.assign({},l),h),s=Object.assign(Object.assign({},s),f)}return[Object.keys(l).map(u=>u+"="+l[u]).join(";"),s]}function j1(n,l,s,o,u,h){let f=!1,p=!1,g=[];const m=void 0;let j=()=>[],x=()=>[],b,y;const O=Z=>Cg[Z],N=(Z,V)=>{Cg[Z]=V},_=()=>{if(!f)throw new Error("Not started")},w=()=>{if(f)throw new Error("Was started")},C=()=>{if(p)throw new Error("Was stopped")},A=()=>{if(b)throw new Error("Has alias")},H=Z=>{if(typeof Z!="function")throw new TypeError("Argument must be a function")};let D;if(typeof l=="string"){if(b=l,y=O(b),!y||!y.$)throw new Error("Not found");D=y.$[0],g=y.$[1],j=y.$[2],x=y.$[3],y.$[4]}else D=l;H(D);let K;const G=Z=>{C(),w(),H(Z),g.push(Z)},re=()=>{C(),w(),G(()=>[D,x,o]),f=!0,K.start(g,m)},$=()=>{p=!0,K.stop()},F=Z=>{K.ingest([Date.now(),Z],j(...Z))};let ne;const M=Object.assign({inputLatency:ne,outputLatency:ne,addDependencies(Z){A(),G(Z)},inputTransferList:Z=>{C(),w(),A(),H(Z),j=Z},outputTransferList:Z=>{C(),w(),A(),H(Z),x=Z},alias(Z){C(),w(),A(),b=Z,N(b,{$:[D,g,j,x]})},start:re,stop:$},s(re,$,f,p,F,_,w,C));return K=v1(n,Z=>{let V=-1,P=-1;const k=o(D,Y=>{Z([V,P,Date.now(),Y],x(Y))});return([Y,v])=>(V=Y,P=Date.now(),k(v))},Z=>{p||u(Z)},([Z,V,P,X])=>{p||(Z!==-1&&(M.inputLatency=V-Z),M.outputLatency=Date.now()-P,h(X))},()=>{if(b){const Z=O(b);if(Z)return Z.other}},Z=>{b&&N(b,Object.assign(Object.assign({},O(b)),{other:Z}))}),M}const Cg={};function w1(n,l){let s,o;return j1(n,l,(g,m,j,x,b,y,O,N)=>({call(..._){if(N(),y(),s||o)throw new Error("Previous call not finished");return new Promise((w,C)=>{s=w,o=C,b(_)})},callOnce(..._){return g(),this.call(..._).finally(m)}}),(g,m)=>{const j=x=>x!==null&&typeof x=="object"&&typeof x.then=="function";return x=>{const b=g(...x);j(b)?b.then(m):m(b)}},g=>{if(o)o(g),s=void 0,o=void 0;else throw new Error("`reject` callback not found")},g=>{if(s)s(g),s=void 0,o=void 0;else throw new Error("`resolve` callback not found")})}function _1(n,l,s,o,u){let h=l();h||(h=N1(n),s(h));const f=new Worker(h);return f.onmessage=p=>{const g=p.data,m=g?g[_v]:void 0;if(m){const j=new Error(m[0]);j.stack=m[1];let x=2;for(;x<m.length;)j[m[x][0]]=m[x][1],x++;o(j),f.terminate()}else u(g)},{stop:f.terminate.bind(f),ingest:f.postMessage.bind(f)}}function N1(n){return URL.createObjectURL(new Blob([n+";"+T1],{type:"text/javascript"}))}const _v="$err$",T1="self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({"+_v+':[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 E1(n){return w1(_1,n)}function xd(n){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},xd(n)}function C1(n){var l=String.fromCharCode,s=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,u={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(u).forEach(function(C){u[C.toUpperCase()]=u[C]});function h(C,A,H,D){return D?s.call(u,D)?u[D]:"&"+D+";":l(A||parseInt(H,16))}function f(C){return C.length>3&&C.indexOf("&")!==-1?C.replace(o,h):C}var p="non-whitespace outside of root node";function g(C){return new Error(C)}function m(C){return"missing namespace for prefix <"+C+">"}function j(C){return{get:C,enumerable:!0}}function x(C){var A={},H;for(H in C)A[H]=C[H];return A}var b=Symbol("nameCache");function y(C){return C+"$uri"}function O(C){var A={},H,D;for(H in C)D=C[H],A[D]=D,A[y(D)]=H;return A}function N(){return{line:0,column:0}}function _(C){throw C}function w(C){if(!this)return new w(C);var A=C&&C.proxy,H,D,K,G,re=_,$,F,ne,M,q=N,T=!1,Z=!1,V="",P=!1,X=!1,k=null,Y=!1,v,R,B,J;function se(ae){ae instanceof Error||(ae=g(ae)),k=ae,re(ae,q)}function ge(ae){$&&(ae instanceof Error||(ae=g(ae)),$(ae,q))}this.on=function(ae,je){if(typeof je!="function")throw g("required args <name, cb>");switch(ae){case"openTag":D=je;break;case"text":H=je;break;case"closeTag":K=je;break;case"error":re=je;break;case"warn":$=je;break;case"cdata":G=je;break;case"attention":M=je;break;case"question":ne=je;break;case"comment":F=je;break;default:throw g("unsupported event: "+ae)}return this},this.ns=function(ae){if(typeof ae>"u"&&(ae={}),xd(ae)!=="object")throw g("required args <nsMap={}>");var je={},Te;for(Te in ae)je[Te]=ae[Te];return X=!0,J=je,this};function Ne(){v=X?[]:null,R=X?O(J):null,B=[],q=N,Y=!1,k=null,Z=!1,V=""}this.parse=function(ae){if(typeof ae!="string")throw g("required args <xml=string>");if(T)throw g("parse during stream; call end() first");return Ne(),_e(ae),q=N,Y=!1,k},this.write=function(ae){if(typeof ae!="string")throw g("required args <xml=string>");return T||(Ne(),T=!0),k||(V=_e(V+ae,!0)||""),this},this.end=function(){return T||Ne(),T=!1,k||_e(V),V="",q=N,Y=!1,k},this.stop=function(){Y=!0};function _e(ae){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=null,Ge=null,Me,E=0,W=!1,ie=!1,L=0,U=0,ee,me,he,le,Se,we,xe,Ce,Be,De="",jt=0,wt;function _t(Je,$e){var nt=Je.indexOf(":");if(nt===-1)return Je;var Bt=R[Je.substring(0,nt)];return Bt?$e===Bt?Je.substr(nt+1):Bt+Je.substr(nt):(ge(m(Je.substring(0,nt))),null)}function Jt(){if(wt!==null)return wt;var Je,$e,nt=X&&R.xmlns,Bt=X&&P?[]:null,Xe=jt,ut=De,dt=ut.length,Zt,lt,Xt,bt,yt,mn={},fa=new Set,Ot,He,Ie;e:for(;Xe<dt;Xe++)if(Ot=!1,He=ut.charCodeAt(Xe),!(He===32||He<14&&He>8)){for((He<65||He>122||He>90&&He<97)&&He!==95&&He!==58&&(ge("illegal first char attribute name"),Ot=!0),Ie=Xe+1;Ie<dt;Ie++)if(He=ut.charCodeAt(Ie),!(He>96&&He<123||He>64&&He<91||He>47&&He<59||He===46||He===45||He===95)){if(He===32||He<14&&He>8){ge("missing attribute value"),Xe=Ie;continue e}if(He===61)break;ge("illegal attribute name char"),Ot=!0}if(yt=ut.substring(Xe,Ie),yt==="xmlns:xmlns"&&(ge("illegal declaration of xmlns"),Ot=!0),He=ut.charCodeAt(Ie+1),He===34)Ie=ut.indexOf('"',Xe=Ie+2),Ie===-1&&(Ie=ut.indexOf("'",Xe),Ie!==-1&&(ge("attribute value quote missmatch"),Ot=!0));else if(He===39)Ie=ut.indexOf("'",Xe=Ie+2),Ie===-1&&(Ie=ut.indexOf('"',Xe),Ie!==-1&&(ge("attribute value quote missmatch"),Ot=!0));else for(ge("missing attribute value quotes"),Ot=!0,Ie=Ie+1;Ie<dt&&(He=ut.charCodeAt(Ie+1),!(He===32||He<14&&He>8));Ie++);for(Ie===-1&&(ge("missing closing quotes"),Ie=dt,Ot=!0),Ot||(Xt=ut.substring(Xe,Ie)),Xe=Ie;Ie+1<dt&&(He=ut.charCodeAt(Ie+1),!(He===32||He<14&&He>8));Ie++)Xe===Ie&&(ge("illegal character after attribute end"),Ot=!0);if(Xe=Ie+1,Ot)continue e;if(fa.has(yt)){ge("attribute <"+yt+"> already defined");continue}if(fa.add(yt),!X){mn[yt]=Xt;continue}if(P){if(lt=yt==="xmlns"?"xmlns":yt.charCodeAt(0)===120&&yt.substr(0,6)==="xmlns:"?yt.substr(6):null,lt!==null){if(Je=f(Xt),$e=y(lt),bt=J[Je],!bt){if(lt==="xmlns"||$e in R&&R[$e]!==Je)do bt="ns"+E++;while(typeof R[bt]<"u");else bt=lt;J[Je]=bt}R[lt]!==bt&&(Zt||(R=x(R),Zt=!0),R[lt]=bt,lt==="xmlns"&&(R[y(bt)]=Je,nt=bt),R[$e]=Je),mn[yt]=Xt;continue}Bt.push(yt,Xt);continue}yt=_t(yt,nt),yt!==null&&(mn[yt]=Xt)}if(P)for(Xe=0,dt=Bt.length;Xe<dt;Xe++)yt=_t(Bt[Xe++],nt),Xt=Bt[Xe],yt!==null&&(mn[yt]=Xt);return wt=mn}function Qe(){for(var Je=/(\r\n|\r|\n)/g,$e=0,nt=0,Bt=0,Xe=U,ut,dt;L>=Bt&&(ut=Je.exec(ae),!(!ut||(Xe=ut[0].length+ut.index,Xe>L)));)$e+=1,Bt=Xe;return L==-1?(nt=Xe,dt=ae.substring(U)):U===0?dt=ae.substring(U,L):(nt=L-Bt,dt=U==-1?ae.substring(L):ae.substring(L,U+1)),{data:dt,line:$e,column:nt}}for(q=Qe,A&&(Be=Object.create({},{name:j(function(){return xe}),originalName:j(function(){return Ce}),attrs:j(Jt),ns:j(function(){return R})}));U!==-1;){if(ae.charCodeAt(U)===60?L=U:L=ae.indexOf("<",U),L===-1){if(je)return ae.substring(U);if(B.length)return se("unexpected end of file");if(!Z)return se("missing start tag");U<ae.length&&ae.substring(U).trim()&&ge(p);return}if(Z||(Z=!0),U!==L){if(B.length){if(H&&(H(ae.substring(U,L),f,q),Y))return}else if(ae.substring(U,L).trim()&&(ge(p),Y))return}if(le=ae.charCodeAt(L+1),le===33){if(he=ae.charCodeAt(L+2),he===91&&ae.substr(L+3,6)==="CDATA["){if(U=ae.indexOf("]]>",L),U===-1)return je?ae.substring(L):se("unclosed cdata");if(G&&(G(ae.substring(L+9,U),q),Y))return;U+=3;continue}if(he===45&&ae.charCodeAt(L+3)===45){if(U=ae.indexOf("-->",L),U===-1)return je?ae.substring(L):se("unclosed comment");if(F&&(F(ae.substring(L+4,U),f,q),Y))return;U+=3;continue}}if(le===63){if(U=ae.indexOf("?>",L),U===-1)return je?ae.substring(L):se("unclosed question");if(ne&&(ne(ae.substring(L,U+2),q),Y))return;U+=2;continue}for(ee=L+1;;ee++){if(Se=ae.charCodeAt(ee),isNaN(Se))return je?ae.substring(L):(U=-1,se("unclosed tag"));if(Se===34)he=ae.indexOf('"',ee+1),ee=he!==-1?he:ee;else if(Se===39)he=ae.indexOf("'",ee+1),ee=he!==-1?he:ee;else if(Se===62){U=ee;break}}if(le===33){if(M&&(M(ae.substring(L,U+1),f,q),Y))return;U+=1;continue}if(wt={},le===47){if(W=!1,ie=!0,!B.length)return se("missing open tag");if(ee=xe=B.pop(),he=L+2+ee.length,ae.substring(L+2,he)!==ee)return se("closing tag mismatch");for(;he<U;he++)if(le=ae.charCodeAt(he),!(le===32||le>8&&le<14))return se("close tag")}else{if(ae.charCodeAt(U-1)===47?(ee=xe=ae.substring(L+1,U-1),W=!0,ie=!0):(ee=xe=ae.substring(L+1,U),W=!0,ie=!1),!(le>96&&le<123||le>64&&le<91||le===95||le===58))return se("illegal first char nodeName");for(he=1,me=ee.length;he<me;he++)if(le=ee.charCodeAt(he),!(le>96&&le<123||le>64&&le<91||le>47&&le<59||le===45||le===95||le==46)){if(le===32||le<14&&le>8){xe=ee.substring(0,he),wt=null;break}return se("invalid nodeName")}ie||B.push(xe)}if(X){Me=R,W&&(ie||v.push(Me),wt===null&&(P=ee.indexOf("xmlns",he)!==-1)&&(jt=he,De=ee,Jt(),P=!1)),Ce=xe,Ge!==R&&(Te=R[b],Te===void 0&&(Te=R[b]={}),Ge=R);var gt=Te[xe];if(gt!==void 0)xe=gt;else{if(le=xe.indexOf(":"),le!==-1){if(we=R[xe.substring(0,le)],!we)return se("missing namespace on <"+Ce+">");xe=xe.substr(le+1)}else we=R.xmlns;we&&(xe=we+":"+xe),Te[Ce]=xe}}if(W&&(jt=he,De=ee,D&&(A?D(Be,f,ie,q):D(xe,Jt,f,ie,q),Y)))return;if(ie){if(K&&(K(A?Be:xe,f,W,q),Y))return;X&&(W?R=Me:R=v.pop())}U+=1}}}return new w(n)}function O1(n,l,s,o){var u=!1,h=function(){if(u)throw new Error("Errored")},f,p=new C1,g=function(b){h(),p.write(b)},m=function(){h(),p.end(),f()},j=new Promise(function(x,b){f=x;var y=function(C){throw u=!0,C},O=function(C,A){o&&o(A(C),n)},N=function(C,A,H,D,K){if(l){var G=A();for(var re in G)G[cd(re,!0)]=H(G[re]);l(cd(C),G,n)}},_=function(C){s&&s(cd(C),n)};p.on("error",y),p.on("text",O),p.on("openTag",N),p.on("closeTag",_)});return{promise:j,write:g,end:m}}function cd(n,l){for(var s=0;s<n.length;){if(n[s]===":"&&!(l&&s===5&&n.slice(0,5)==="xmlns"))return n.slice(s+1);s++}return n}function Sd(n){"@babel/helpers - typeof";return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Sd(n)}function A1(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function R1(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function k1(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&fl(n,l)}function D1(n){var l=Nv();return function(){var o=hl(n),u;if(l){var h=hl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return z1(this,u)}}function z1(n,l){if(l&&(Sd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U1(n)}function U1(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jd(n){var l=typeof Map=="function"?new Map:void 0;return jd=function(o){if(o===null||!L1(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return Ks(o,arguments,hl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),fl(u,o)},jd(n)}function Ks(n,l,s){return Nv()?Ks=Reflect.construct.bind():Ks=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&fl(m,f.prototype),m},Ks.apply(null,arguments)}function Nv(){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 L1(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function fl(n,l){return fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},fl(n,l)}function hl(n){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},hl(n)}var ul=(function(n){k1(s,n);var l=D1(s);function s(o){var u;return R1(this,s),u=l.call(this,o),u.name="InvalidSpreadsheetError",u}return A1(s)})(jd(Error));function M1(n,l,s,o,u,h){var f=O1(l,s,o,u);return h?p(f,n,h):(f.write(n),f.end()),f.promise.then(function(g){return g},function(g){var m=new ul(g.message);throw m.stack=g.stack,m.cause=g,m});function p(g,m,j,x){var b=7,y=64*1024,O=y,N=function(){var C=Date.now();if(m.length>O){g.write(m.slice(0,O)),j&&j(!1),m=m.slice(O);var A=Date.now()-C;return A<b*.5?O*=2:A>b&&(O/=2),!0}else return g.write(m),g.end(),j&&j(!0),!1},_=function w(){N()&&w()};_()}}var Og={},B1=(function(n,l,s,o,u){var h=new Worker(Og[l]||(Og[l]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return h.onmessage=function(f){var p=f.data,g=p.$e$;if(g){var m=new Error(g[0]);m.code=g[1],m.stack=g[2],u(m,null)}else u(null,p)},h.postMessage(s,o),h}),Qt=Uint8Array,fr=Uint16Array,Tv=Int32Array,Bd=new Qt([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]),$d=new Qt([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]),Ev=new Qt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Cv=function(n,l){for(var s=new fr(31),o=0;o<31;++o)s[o]=l+=1<<n[o-1];for(var u=new Tv(s[30]),o=1;o<30;++o)for(var h=s[o];h<s[o+1];++h)u[h]=h-s[o]<<5|o;return{b:s,r:u}},Ov=Cv(Bd,2),Hd=Ov.b,$1=Ov.r;Hd[28]=258,$1[258]=28;var H1=Cv($d,0),Av=H1.b,lo=new fr(32768);for(var mt=0;mt<32768;++mt){var Ha=(mt&43690)>>1|(mt&21845)<<1;Ha=(Ha&52428)>>2|(Ha&13107)<<2,Ha=(Ha&61680)>>4|(Ha&3855)<<4,lo[mt]=((Ha&65280)>>8|(Ha&255)<<8)>>1}var ri=(function(n,l,s){for(var o=n.length,u=0,h=new fr(l);u<o;++u)n[u]&&++h[n[u]-1];var f=new fr(l);for(u=1;u<l;++u)f[u]=f[u-1]+h[u-1]<<1;var p;if(s){p=new fr(1<<l);var g=15-l;for(u=0;u<o;++u)if(n[u])for(var m=u<<4|n[u],j=l-n[u],x=f[n[u]-1]++<<j,b=x|(1<<j)-1;x<=b;++x)p[lo[x]>>g]=m}else for(p=new fr(o),u=0;u<o;++u)n[u]&&(p[u]=lo[f[n[u]-1]++]>>15-n[u]);return p}),Tl=new Qt(288);for(var mt=0;mt<144;++mt)Tl[mt]=8;for(var mt=144;mt<256;++mt)Tl[mt]=9;for(var mt=256;mt<280;++mt)Tl[mt]=7;for(var mt=280;mt<288;++mt)Tl[mt]=8;var Rv=new Qt(32);for(var mt=0;mt<32;++mt)Rv[mt]=5;var kv=ri(Tl,9,1),Dv=ri(Rv,5,1),Qs=function(n){for(var l=n[0],s=1;s<n.length;++s)n[s]>l&&(l=n[s]);return l},Tn=function(n,l,s){var o=l/8|0;return(n[o]|n[o+1]<<8)>>(l&7)&s},Js=function(n,l){var s=l/8|0;return(n[s]|n[s+1]<<8|n[s+2]<<16)>>(l&7)},zv=function(n){return(n+7)/8|0},yo=function(n,l,s){return(l==null||l<0)&&(l=0),(s==null||s>n.length)&&(s=n.length),new Qt(n.subarray(l,s))},Uv=["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"],Pt=function(n,l,s){var o=new Error(l||Uv[n]);if(o.code=n,Error.captureStackTrace&&Error.captureStackTrace(o,Pt),!s)throw o;return o},Lv=function(n,l,s,o){var u=n.length,h=o?o.length:0;if(!u||l.f&&!l.l)return s||new Qt(0);var f=!s,p=f||l.i!=2,g=l.i;f&&(s=new Qt(u*3));var m=function(Te){var Ge=s.length;if(Te>Ge){var Me=new Qt(Math.max(Ge*2,Te));Me.set(s),s=Me}},j=l.f||0,x=l.p||0,b=l.b||0,y=l.l,O=l.d,N=l.m,_=l.n,w=u*8;do{if(!y){j=Tn(n,x,1);var C=Tn(n,x+1,3);if(x+=3,C)if(C==1)y=kv,O=Dv,N=9,_=5;else if(C==2){var K=Tn(n,x,31)+257,G=Tn(n,x+10,15)+4,re=K+Tn(n,x+5,31)+1;x+=14;for(var $=new Qt(re),F=new Qt(19),ne=0;ne<G;++ne)F[Ev[ne]]=Tn(n,x+ne*3,7);x+=G*3;for(var M=Qs(F),q=(1<<M)-1,T=ri(F,M,1),ne=0;ne<re;){var Z=T[Tn(n,x,q)];x+=Z&15;var A=Z>>4;if(A<16)$[ne++]=A;else{var V=0,P=0;for(A==16?(P=3+Tn(n,x,3),x+=2,V=$[ne-1]):A==17?(P=3+Tn(n,x,7),x+=3):A==18&&(P=11+Tn(n,x,127),x+=7);P--;)$[ne++]=V}}var X=$.subarray(0,K),k=$.subarray(K);N=Qs(X),_=Qs(k),y=ri(X,N,1),O=ri(k,_,1)}else Pt(1);else{var A=zv(x)+4,H=n[A-4]|n[A-3]<<8,D=A+H;if(D>u){g&&Pt(0);break}p&&m(b+H),s.set(n.subarray(A,D),b),l.b=b+=H,l.p=x=D*8,l.f=j;continue}if(x>w){g&&Pt(0);break}}p&&m(b+131072);for(var Y=(1<<N)-1,v=(1<<_)-1,R=x;;R=x){var V=y[Js(n,x)&Y],B=V>>4;if(x+=V&15,x>w){g&&Pt(0);break}if(V||Pt(2),B<256)s[b++]=B;else if(B==256){R=x,y=null;break}else{var J=B-254;if(B>264){var ne=B-257,se=Bd[ne];J=Tn(n,x,(1<<se)-1)+Hd[ne],x+=se}var ge=O[Js(n,x)&v],Ne=ge>>4;ge||Pt(3),x+=ge&15;var k=Av[Ne];if(Ne>3){var se=$d[Ne];k+=Js(n,x)&(1<<se)-1,x+=se}if(x>w){g&&Pt(0);break}p&&m(b+131072);var _e=b+J;if(b<k){var ae=h-k,je=Math.min(k,_e);for(ae+b<0&&Pt(3);b<je;++b)s[b]=o[ae+b]}for(;b<_e;++b)s[b]=s[b-k]}}l.l=y,l.p=R,l.b=b,l.f=j,y&&(j=1,l.m=N,l.d=O,l.n=_)}while(!j);return b!=s.length&&f?yo(s,0,b):s.subarray(0,b)},q1=new Qt(0),G1=function(n,l){var s={};for(var o in n)s[o]=n[o];for(var o in l)s[o]=l[o];return s},Ag=function(n,l,s){for(var o=n(),u=n.toString(),h=u.slice(u.indexOf("[")+1,u.lastIndexOf("]")).replace(/\s+/g,"").split(","),f=0;f<o.length;++f){var p=o[f],g=h[f];if(typeof p=="function"){l+=";"+g+"=";var m=p.toString();if(p.prototype)if(m.indexOf("[native code]")!=-1){var j=m.indexOf(" ",8)+1;l+=m.slice(j,m.indexOf("(",j))}else{l+=m;for(var x in p.prototype)l+=";"+g+".prototype."+x+"="+p.prototype[x].toString()}else l+=m}else s[g]=p}return l},Zs=[],I1=function(n){var l=[];for(var s in n)n[s].buffer&&l.push((n[s]=new n[s].constructor(n[s])).buffer);return l},V1=function(n,l,s,o){if(!Zs[s]){for(var u="",h={},f=n.length-1,p=0;p<f;++p)u=Ag(n[p],u,h);Zs[s]={c:Ag(n[f],u,h),e:h}}var g=G1({},Zs[s].e);return B1(Zs[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+l.toString()+"}",s,g,I1(g),o)},Y1=function(){return[Qt,fr,Tv,Bd,$d,Ev,Hd,Av,kv,Dv,lo,Uv,ri,Qs,Tn,Js,zv,yo,Pt,Lv,qd,Mv,Bv]},Mv=function(n){return postMessage(n,[n.buffer])},Bv=function(n){return n&&{out:n.size&&new Qt(n.size),dictionary:n.dictionary}},F1=function(n,l,s,o,u,h){var f=V1(s,o,u,function(p,g){f.terminate(),h(p,g)});return f.postMessage([n,l],l.consume?[n.buffer]:[]),function(){f.terminate()}},Vn=function(n,l){return n[l]|n[l+1]<<8},En=function(n,l){return(n[l]|n[l+1]<<8|n[l+2]<<16|n[l+3]<<24)>>>0},ud=function(n,l){return En(n,l)+En(n,l+4)*4294967296};function P1(n,l,s){return s||(s=l,l={}),typeof s!="function"&&Pt(7),F1(n,l,[Y1],function(o){return Mv(qd(o.data[0],Bv(o.data[1])))},1,s)}function qd(n,l){return Lv(n,{i:2},l&&l.out,l&&l.dictionary)}var wd=typeof TextDecoder<"u"&&new TextDecoder,Z1=0;try{wd.decode(q1,{stream:!0}),Z1=1}catch{}var X1=function(n){for(var l="",s=0;;){var o=n[s++],u=(o>127)+(o>223)+(o>239);if(s+u>n.length)return{s:l,r:yo(n,s-1)};u?u==3?(o=((o&15)<<18|(n[s++]&63)<<12|(n[s++]&63)<<6|n[s++]&63)-65536,l+=String.fromCharCode(55296|o>>10,56320|o&1023)):u&1?l+=String.fromCharCode((o&31)<<6|n[s++]&63):l+=String.fromCharCode((o&15)<<12|(n[s++]&63)<<6|n[s++]&63):l+=String.fromCharCode(o)}};function $v(n,l){if(l){for(var s="",o=0;o<n.length;o+=16384)s+=String.fromCharCode.apply(null,n.subarray(o,o+16384));return s}else{if(wd)return wd.decode(n);var u=X1(n),h=u.s,s=u.r;return s.length&&Pt(8),h}}var K1=function(n,l){return l+30+Vn(n,l+26)+Vn(n,l+28)},Q1=function(n,l,s){var o=Vn(n,l+28),u=Vn(n,l+30),h=$v(n.subarray(l+46,l+46+o),!(Vn(n,l+8)&2048)),f=l+46+o,p=J1(n,f,u,s,En(n,l+20),En(n,l+24),En(n,l+42)),g=p[0],m=p[1],j=p[2];return[Vn(n,l+10),g,m,h,f+u+Vn(n,l+32),j]},J1=function(n,l,s,o,u,h,f){var p=u==4294967295,g=h==4294967295,m=f==4294967295,j=l+s,x=p+g+m;if(o&&x){for(;l+4<j;l+=4+Vn(n,l+2))if(Vn(n,l)==1)return[p?ud(n,l+4+8*g):u,g?ud(n,l+4):h,m?ud(n,l+4+8*(g+p)):f,1];o<2&&Pt(13)}return[u,h,f,0]},Rg=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n()};function W1(n,l,s){s||(s=l,l={}),typeof s!="function"&&Pt(7);var o=[],u=function(){for(var _=0;_<o.length;++_)o[_]()},h={},f=function(_,w){Rg(function(){s(_,w)})};Rg(function(){f=s});for(var p=n.length-22;En(n,p)!=101010256;--p)if(!p||n.length-p>65558)return f(Pt(13,0,1),null),u;var g=Vn(n,p+8);if(g){var m=g,j=En(n,p+16),x=En(n,p-20)==117853008;if(x){var b=En(n,p-12);x=En(n,b)==101075792,x&&(m=g=En(n,b+32),j=En(n,b+48))}for(var y=l&&l.filter,O=function(_){var w=Q1(n,j,x),C=w[0],A=w[1],H=w[2],D=w[3],K=w[4],G=w[5],re=K1(n,G);j=K;var $=function(ne,M){ne?(u(),f(ne,null)):(M&&(h[D]=M),--g||f(null,h))};if(!y||y({name:D,size:A,originalSize:H,compression:C}))if(!C)$(null,yo(n,re,re+A));else if(C==8){var F=n.subarray(re,re+A);if(H<524288||A>.8*H)try{$(null,qd(F,{out:new Qt(H)}))}catch(ne){$(ne,null)}else o.push(P1(F,{size:H},$))}else $(Pt(14,"unknown compression type "+C,1),null);else $(null,null)},N=0;N<m;++N)O(N)}else f(null,{});return u}function _d(n){"@babel/helpers - typeof";return _d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_d(n)}function ew(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function tw(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function nw(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&pl(n,l)}function aw(n){var l=Hv();return function(){var o=ml(n),u;if(l){var h=ml(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return rw(this,u)}}function rw(n,l){if(l&&(_d(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iw(n)}function iw(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Nd(n){var l=typeof Map=="function"?new Map:void 0;return Nd=function(o){if(o===null||!lw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return Ws(o,arguments,ml(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),pl(u,o)},Nd(n)}function Ws(n,l,s){return Hv()?Ws=Reflect.construct.bind():Ws=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&pl(m,f.prototype),m},Ws.apply(null,arguments)}function Hv(){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 lw(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function pl(n,l){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},pl(n,l)}function ml(n){return ml=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},ml(n)}var qv=(function(n){nw(s,n);var l=aw(s);function s(){return tw(this,s),l.apply(this,arguments)}return ew(s)})(Nd(Error));function Gv(n){var l=new qv(n.message);return n.stack&&(l.stack=n.stack),Error.captureStackTrace&&Error.captureStackTrace(l,Gv),l.cause=n,l}function sw(n,l){return ow(n,l,cw,!0)}function ow(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=l.filter,o=arguments.length>2?arguments[2]:void 0;return o(new Uint8Array(n),{filter:function(h){return s?s({path:h.name}):!0}}).then(function(u){return u},function(u){throw uw(u)?Gv(u):u})}function cw(n){return new Promise(function(l,s){W1(n,function(o,u){o?s(o):l(u)})})}function uw(n){return typeof n.code=="number"}function Td(n){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Td(n)}function dw(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function fw(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function hw(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&gl(n,l)}function pw(n){var l=Iv();return function(){var o=vl(n),u;if(l){var h=vl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return mw(this,u)}}function mw(n,l){if(l&&(Td(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gw(n)}function gw(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ed(n){var l=typeof Map=="function"?new Map:void 0;return Ed=function(o){if(o===null||!vw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return eo(o,arguments,vl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),gl(u,o)},Ed(n)}function eo(n,l,s){return Iv()?eo=Reflect.construct.bind():eo=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&gl(m,f.prototype),m},eo.apply(null,arguments)}function Iv(){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 vw(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function gl(n,l){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},gl(n,l)}function vl(n){return vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},vl(n)}var yw={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"},so=(function(n){hw(s,n);var l=pw(s);function s(o,u){var h;return fw(this,s),h=l.call(this,yw[o]||o),h.code=o,h.name="InvalidInputError",h.cause=u,h}return dw(s)})(Ed(Error));function bw(n){var l=n.path;return l.endsWith(".xml")||l.endsWith(".xml.rels")}var xw=[80,75],Vv=[208,207,17,224],to=[xw,Vv],Sw=to.indexOf(Vv);function jw(){var n,l=ww(to),s=0;return function(o){if(isNaN(n)){var u;l=l.filter(function(h){if(o===to[h][s])return to[h].length===s+1&&(u=h),!0}),l.length===1?n=u:l.length===0&&(n=-1)}return s++,n}}function ww(n){for(var l=[],s=0;s<n.length;)l.push(s),s++;return l}function _w(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=Nw(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
43
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nw(n,l){if(n){if(typeof n=="string")return kg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return kg(n,l)}}function kg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Tw(n){for(var l=jw(),s=_w(n),o;!(o=s()).done;){var u=o.value;if(Ew(u,l))return}Cw(n.length)}function Ew(n,l){var s=l(n);if(s!==void 0){if(s===Sw)throw new so("XLS_FILE_NOT_SUPPORTED");if(s<0)throw new so("FILE_NOT_SUPPORTED");return!0}}function Cw(n){throw new so(n===0?"NO_DATA":"FILE_NOT_SUPPORTED")}var no;function qa(n){var l=Date.now(),s=typeof global<"u"?!!global.READ_EXCEL_FILE_CHECKPOINTS:typeof window<"u"?!!window.READ_EXCEL_FILE_CHECKPOINTS:!1;s&&(no&&console.log(" -",l-no,"ms"),console.log("*",n)),no=l}function Ow(){no=void 0}function Aw(n){return Ow(),qa("unpack files"),n instanceof File||n instanceof Blob?n.arrayBuffer().then(Dg):Promise.resolve(n).then(Dg)}function Dg(n){return Tw(new Uint8Array(n)),sw(n,{filter:bw}).then(function(l){return l},function(l){throw l instanceof qv?new so("INVALID_ZIP",l.cause):l})}function Rw(n,l){var s=o();return l(n,s,h,null,null).then(function(){return u(s)});function o(){return{workbookPr:void 0,sheets:[]}}function u(f){return{epoch1904:f.workbookPr?f.workbookPr.epoch1904:!1,sheets:f.sheets}}function h(f,p,g){f==="workbookPr"?g.workbookPr||(g.workbookPr={epoch1904:p.date1904==="1"}):f==="sheet"&&p.name&&g.sheets.push({id:Number(p.sheetId),name:p.name,relationId:p.id})}}function kw(n,l){var s="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",o="http://purl.oclc.org/ooxml/officeDocument/relationships/",u=h();return l(n,u,p,null,null).then(function(){return u});function h(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function f(j){return j}function p(j,x,b){j==="Relationship"&&g(b,x.Id,x.Type,x.Target)}function g(j,x,b,y){switch(b){case s+"styles":case o+"styles":j.styles=m(y);break;case s+"sharedStrings":case o+"sharedStrings":j.sharedStrings=m(y);break;case s+"worksheet":case o+"worksheet":j.sheets[x]=m(y);break}}function m(j){return j[0]==="/"?j.slice(1):"xl/"+j}}function yl(n){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},yl(n)}var Dw=["xfId"];function zg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function Ug(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?zg(Object(s),!0).forEach(function(o){zw(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):zg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function zw(n,l,s){return l=Uw(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function Uw(n){var l=Lw(n,"string");return yl(l)==="symbol"?l:String(l)}function Lw(n,l){if(yl(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(yl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function Mw(n,l){if(n==null)return{};var s=Bw(n,l),o,u;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(u=0;u<h.length;u++)o=h[u],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function Bw(n,l){if(n==null)return{};var s={},o=Object.keys(n),u,h;for(h=0;h<o.length;h++)u=o[h],!(l.indexOf(u)>=0)&&(s[u]=n[u]);return s}function $w(n,l){var s=o();return l(n,s,h,f,null).then(function(){return u(s)});function o(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function u(g){return g.styles.map(function(m){if(m.xfId){var j=m.xfId,x=Mw(m,Dw);return Ug(Ug({},g.baseStyles[j]),x)}else return m})}function h(g,m,j){if(g==="numFmt")j.numberFormats[m.numFmtId]={id:Number(m.numFmtId),template:m.formatCode};else if(g==="cellStyleXfs")j.cellStyleXfs=!0;else if(g==="cellXfs")j.cellXfs=!0;else if(g==="xf"){if(j.cellStyleXfs)j.baseStyles.push(p(m));else if(j.cellXfs){var x=p(m,j.numberFormats);m.xfId&&(x.xfId=Number(m.xfId)),j.styles.push(x)}}}function f(g,m){g==="cellStyleXfs"?m.cellStyleXfs=!1:g==="cellXfs"&&(m.cellXfs=!1)}function p(g,m){var j={},x=g.numFmtId;return x&&(m&&m[x]?j.numberFormat=m[x]:j.numberFormat={id:Number(x)}),j}}function Hw(n,l){var s=o();return l(n,s,h,f,p).then(function(){return u(s)});function o(){return{si:void 0,strings:[]}}function u(b){return b.strings}function h(b,y,O){b==="si"?O.si=g():O.si&&m(b,y,O.si)}function f(b,y){b==="si"?(y.strings.push(y.si.string),y.si=void 0):y.si&&j(b,y.si)}function p(b,y){y.si&&x(b,y.si)}function g(){return{t:!1,r:!1,rPh:!1,string:""}}function m(b,y,O){b==="t"?O.t=!0:b==="r"?O.r=!0:b==="rPh"&&(O.rPh=!0)}function j(b,y){b==="t"?y.t=!1:b==="r"?y.r=!1:b==="rPh"&&(y.rPh=!1)}function x(b,y){y.rPh||y.t&&(y.r?y.string+=b:y.string=b)}}function qw(n,l){var s=17,o=1,u=1,h=1440*60*1e3,f=365;l&&(n+=4*f+o+u);var p=o+u+70*f+s;return Math.floor((n-p)*h)}var Gw=/^\[\$-[^\]]+\]/,Iw=/;@$/,dd={};function Vw(n){if(n in dd)return dd[n];n=n.toLowerCase(),n=n.replace(Gw,""),n=n.replace(Iw,"");var l=n.split(/\W+/),s=l.length===0?!1:l.every(function(o){return Yw.indexOf(o)>=0});return dd[n]=s,s}var Yw=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function Fw(n,l,s){return n.numberFormat?!!(Xw.indexOf(n.numberFormat.id)>=0||l&&n.numberFormat.template===l||s&&n.numberFormat.template&&Vw(n.numberFormat.template)):!1}var Pw=[14,15,16,17,18,19,20,21,22,45,46,47],fd=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Lg=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Zw=[71,72,73,74,75,76,77,78,79,80,81],Xw=Pw.concat(fd).concat(Lg.filter(function(n){return fd.indexOf(n)<0})).concat(Zw.filter(function(n){return fd.indexOf(n)<0}).filter(function(n){return Lg.indexOf(n)<0}));function Kw(n,l){return e2(n)||Ww(n,l)||Jw(n,l)||Qw()}function Qw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
44
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jw(n,l){if(n){if(typeof n=="string")return Mg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Mg(n,l)}}function Mg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Ww(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function e2(n){if(Array.isArray(n))return n}var t2=null,ii=[null,t2];function n2(n,l,s,o,u){var h=Kw(u,6),f=h[0],p=h[1],g=h[2],m=h[3],j=h[4],x=h[5];switch(n||"n"){case"str":return s===void 0?"VALUE_MISSING":s?["s",s]:ii;case"inlineStr":return o===void 0?"VALUE_MISSING":["s",o];case"s":if(!s)return"VALUE_MISSING";var b=Number(s);return isNaN(b)||f[b]===void 0?"VALUE_INVALID":["s",f[b]];case"b":return s?s==="1"?["b",!0]:s==="0"?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return s?["e",s]:"VALUE_MISSING";case"d":if(!s)return ii;var y=new Date(s);return isNaN(y.valueOf())?"VALUE_INVALID":["d",y.getTime()];case"n":if(!s)return ii;if(l){var O=Number(l);if(isNaN(O)||p[O]===void 0)return"FORMAT_INVALID";if(Fw(p[O],m,j)){var N=Number(s);return isNaN(N)?"VALUE_INVALID":["d",qw(N,g)]}}if(x)return["n",s];var _=Number(s);return isNaN(_)?"VALUE_INVALID":["n",_];default:return"TYPE_INVALID"}}function Bg(n){for(var l=0,s=0;s<n.length;){var o=n.charCodeAt(s);if(o>=48&&o<=57){var u=Number(n.slice(s));return isNaN(u)&&$g(n),[u,l]}l*=26,l+=n.charCodeAt(s)-64,s++}$g(n)}function $g(n){throw new Error('<c r="'.concat(n,'">'))}function a2(n,l){return l2(n)||i2(n,l)||Yv(n,l)||r2()}function r2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
45
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i2(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function l2(n){if(Array.isArray(n))return n}function s2(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=Yv(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
46
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yv(n,l){if(n){if(typeof n=="string")return Hg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Hg(n,l)}}function Hg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}var hd=null;function o2(n,l,s){var o=s.sharedStrings,u=s.styles,h=s.epoch1904,f=s.options,p=[o,u,h,f.dateFormat,f.smartDateParser!==!1,f.parseNumber],g=[],m=[],j=x();return l(n,j,C,A,H,w).then(function(){var X=j.sheetData,k=X.rowCount,Y=X.columnCount,v=X.dataRowCount,R=X.dataColumnCount;if(v<k&&(g=g.slice(0,v)),R<Y)for(var B=0;B<g.length;)g[B].length>R&&(g[B]=g[B].slice(0,R)),B++;for(var J=s2(g),se;!(se=J()).done;)for(var ge=se.value;ge.length<R;)ge.push(hd);return g});function x(){return{dimension:void 0,sheetData:void 0}}function b(X){return X.sheetData.rows}function y(X,k){X.sheetData.rowIndexShift+=X.sheetData.rows.length-k.length,X.sheetData.rows=k}function O(X){return X.sheetData.errors}function N(X,k){X.sheetData.errors=k}function _(X){var k=X.row,Y=X.column,v=X.error;throw new ul("<c/> at row ".concat(k,", col ").concat(Y,": ").concat(v))}function w(X){var k=b(j),Y=O(j);if(X)g=g.concat(k),m=m.concat(Y),m.length>0&&_(m[0]);else if(k.length>1){var v=k.slice(0,-1);g=g.concat(v),m=m.concat(Y),y(j,k.slice(-1)),N(j,[])}}function C(X,k,Y){X==="dimension"?Y.dimension=D(k.ref):X==="sheetData"?Y.sheetData=K():Y.sheetData&&G(X,k,Y.sheetData)}function A(X,k){k.sheetData&&re(X,k.sheetData)}function H(X,k){k.sheetData&&$(X,k.sheetData)}function D(X){var k=X.split(":").map(Bg);return k.length===1&&(k=[k[0],k[0]]),k}function K(){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 G(X,k,Y){X==="row"?(k.r&&(Y.rowNumber=Number(k.r)),Y.row=[]):X==="c"?(Y.c=T(),Y.c.attributes=k):Y.c&&Z(X,k,Y.c)}function re(X,k){if(X==="row"){if(k.rowNumber){var Y=k.rowIndexShift+k.rows.length;if(k.rowNumber<=Y)throw new ul("Out-of-place <row/> number ".concat(k.rowNumber," follows <row/> number ").concat(Y));for(;k.rowNumber>k.rowIndexShift+k.rows.length+1;)k.rows.push([])}k.rows.push(k.row),k.row.length>0&&(k.dataRowCount=k.rowNumber),k.rowNumber>k.rowCount&&(k.rowCount=k.rowNumber),k.row=void 0,k.rowNumber=void 0}else if(X==="c"){var v=F(k.c);if(v.row<k.cursor[0]||v.row===k.cursor[0]&&v.column<=k.cursor[1])throw new ul("Out-of-place <c/> at row ".concat(v.row," col ").concat(v.column," follows <c/> at row ").concat(k.cursor[0]," col ").concat(k.cursor[1]));if(k.cursor[0]=v.row,k.cursor[1]=v.column,k.rowNumber||(k.rowNumber=v.row),v.error)_(v),k.errors.push(v);else if(v.value!==hd){for(;v.column>k.row.length+1;)k.row.push(hd);k.row.push(v.value),v.column>k.dataColumnCount&&(k.dataColumnCount=v.column)}v.column>k.columnCount&&(k.columnCount=v.column),k.c=void 0}else k.c&&V(X,k.c)}function $(X,k){k.c&&P(X,k.c)}function F(X){var k=X.attributes,Y=X.inlineString,v=X.vText,R=Bg(k.r),B=a2(R,2),J=B[0],se=B[1],ge=ne(k.t,k.s,v,Y,p,f.trim!==!1);return typeof ge=="string"?{row:J,column:se,error:ge}:{row:J,column:se,value:q(ge[1],ge[0])}}function ne(X,k,Y,v,R,B){var J=M(X,k,Y,v,R);return Array.isArray(J)&&J[0]==="s"&&(B&&(J[1]=J[1].trim()),J[1]==="")?ii:J}function M(X,k,Y,v,R){var B=n2(X,k,Y,v,R);if(B==="VALUE_MISSING")switch(X||"n"){case"str":case"inlineStr":case"s":case"b":return ii}return X==="e"?ii:B}function q(X,k){return k==="n"?f.parseNumber?f.parseNumber(X):X:k==="d"?new Date(X):X}function T(){return{v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0}}function Z(X,k,Y){X==="v"?Y.v=!0:X==="is"?(Y.is=!0,Y.inlineString=""):X==="t"?Y.t=!0:X==="r"?Y.r=!0:X==="rPh"&&(Y.rPh=!0)}function V(X,k){X==="v"?(k.v=!1,k.vText||(k.vText="")):X==="is"?k.is=!1:X==="t"?k.t=!1:X==="r"?k.r=!1:X==="rPh"&&(k.rPh=!1)}function P(X,k){k.v?k.vText=X:k.is&&(k.rPh||k.t&&(k.r?k.inlineString+=X:k.inlineString=X))}}function c2(n){qa("convert files to strings");for(var l={},s=0,o=Object.keys(n);s<o.length;s++){var u=o[s];l[u]=u2(n[u])}return l}function u2(n){return typeof TextDecoder<"u"?new TextDecoder().decode(n):$v(n)}function Cd(n){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Cd(n)}function d2(n){return Cd(n)==="object"&&typeof n.then=="function"}function Od(n){"@babel/helpers - typeof";return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Od(n)}function f2(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function h2(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function p2(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&bl(n,l)}function m2(n){var l=Fv();return function(){var o=xl(n),u;if(l){var h=xl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return g2(this,u)}}function g2(n,l){if(l&&(Od(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v2(n)}function v2(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ad(n){var l=typeof Map=="function"?new Map:void 0;return Ad=function(o){if(o===null||!y2(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return ao(o,arguments,xl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),bl(u,o)},Ad(n)}function ao(n,l,s){return Fv()?ao=Reflect.construct.bind():ao=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&bl(m,f.prototype),m},ao.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 y2(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function bl(n,l){return bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},bl(n,l)}function xl(n){return xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},xl(n)}var qg=(function(n){p2(s,n);var l=m2(s);function s(o){var u;return h2(this,s),u=l.call(this,o),u.name="SheetNotFoundError",u}return f2(s)})(Ad(Error));function Sl(n){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Sl(n)}function Pv(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=b2(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
47
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b2(n,l){if(n){if(typeof n=="string")return Gg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Gg(n,l)}}function Gg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Ig(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function oo(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Ig(Object(s),!0).forEach(function(o){co(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Ig(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function co(n,l,s){return l=x2(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function x2(n){var l=S2(n,"string");return Sl(l)==="symbol"?l:String(l)}function S2(n,l){if(Sl(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(Sl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function j2(n,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=c2(l);return qa("parse spreadsheet info and file paths"),pd(T2(),o,n).then(function(u){var h=u.spreadsheetInfo,f=u.filePaths;return qa('parse "shared strings" and "styles"'),pd(E2(f),o,n).then(function(p){var g=p.sharedStrings,m=p.styles,j=s.sheets?s.sheets.map(function(x){return _2(x,h.sheets)}):h.sheets.map(function(x){return x.relationId});return qa("parse sheet".concat(j.length===1?"":"s"," data")),pd(C2(f,j,{sharedStrings:g,styles:m,epoch1904:h.epoch1904,options:s}),o,n).then(function(x){return qa("end"),j.map(function(b){return{sheet:N2(b,h.sheets),data:x[b]}})})})})}function w2(n,l,s,o){return o&&o.parseNumber||(o=oo(oo({},o),{},{parseNumber:null})),j2(l,s,o)}function _2(n,l){if(typeof n=="string"){for(var s=Pv(l),o;!(o=s()).done;){var u=o.value;if(u.name===n)return u.relationId}throw new qg('Sheet "'.concat(n,'" not found. Available sheets: ').concat(l.map(function(h){var f=h.name;return'"'.concat(f,'"')}).join(", ")))}else{if(n<=l.length)return l[n-1].relationId;throw new qg("Sheet number out of bounds: ".concat(n,". Available sheets count: ").concat(l.length))}}function N2(n,l){for(var s=Pv(l),o;!(o=s()).done;){var u=o.value;if(u.relationId===n)return u.name}throw new Error("Sheet relation ID not found: ".concat(n))}function T2(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:kw},"xl/workbook.xml":{name:"spreadsheetInfo",parse:Rw}}}function E2(n){var l;return l={},co(l,n.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:Hw,fallback:[]}),co(l,n.styles||"xl/styles.xml",{name:"styles",parse:$w,fallback:{}}),l}function C2(n,l,s){return Object.keys(n.sheets).filter(function(o){return l.includes(o)}).reduce(function(o,u){return oo(oo({},o),{},co({},n.sheets[u],{name:u,parse:function(f,p){return o2(f,p,s)}}))},{})}function pd(n,l,s){for(var o={},u=function(){var b=f[h],y=n[b];o[y.name]=l[b]===void 0?y.fallback===void 0?(function(){throw new ul('"'.concat(b,'" file not found inside the `.xlsx` file'))})():y.fallback:y.parse(l[b],s)},h=0,f=Object.keys(n);h<f.length;h++)u();for(var p=[],g=function(){var b=j[m];d2(o[b])&&p.push(o[b].then(function(y){o[b]=y}))},m=0,j=Object.keys(o);m<j.length;m++)g();return p.length>0?Promise.all(p).then(function(){return o}):o}function Rd(n){"@babel/helpers - typeof";return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Rd(n)}function O2(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function A2(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function R2(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&jl(n,l)}function k2(n){var l=Zv();return function(){var o=wl(n),u;if(l){var h=wl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return D2(this,u)}}function D2(n,l){if(l&&(Rd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z2(n)}function z2(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function kd(n){var l=typeof Map=="function"?new Map:void 0;return kd=function(o){if(o===null||!U2(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return ro(o,arguments,wl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),jl(u,o)},kd(n)}function ro(n,l,s){return Zv()?ro=Reflect.construct.bind():ro=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&jl(m,f.prototype),m},ro.apply(null,arguments)}function Zv(){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 U2(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function jl(n,l){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},jl(n,l)}function wl(n){return wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},wl(n)}var Yn=(function(n){R2(s,n);var l=k2(s);function s(o){var u;return A2(this,s),u=l.call(this,"invalid"),u.reason=o,u}return O2(s)})(kd(Error));function L2(n){if(typeof n=="string"){var l=n;if(n=Number(n),String(n)!==l)throw new Yn("not_a_number")}if(typeof n!="number")throw new Yn("not_a_number");if(isNaN(n))throw new Yn("invalid_number");if(!isFinite(n))throw new Yn("out_of_bounds");return n}function M2(n){if(typeof n=="string")return n;if(typeof n=="number"){if(isNaN(n))throw new Yn("invalid_number");if(!isFinite(n))throw new Yn("out_of_bounds");return String(n)}throw new Yn("not_a_string")}function B2(n){if(typeof n=="boolean")return n;throw new Yn("not_a_boolean")}function $2(n){if(n instanceof Date){if(isNaN(n.valueOf()))throw new Yn("out_of_bounds");return n}throw new Yn("not_a_date")}var H2={}.constructor;function Xv(n){return n!=null&&n.constructor===H2}function si(n){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},si(n)}function q2(n,l){return Qv(n)||G2(n,l)||Gd(n,l)||Kv()}function G2(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function I2(n){return Qv(n)||V2(n)||Gd(n)||Kv()}function Kv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
48
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V2(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Qv(n){if(Array.isArray(n))return n}function Vg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function uo(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Vg(Object(s),!0).forEach(function(o){Y2(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Vg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function Y2(n,l,s){return l=F2(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function F2(n){var l=P2(n,"string");return si(l)==="symbol"?l:String(l)}function P2(n,l){if(si(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(si(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function Jv(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=Gd(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
49
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gd(n,l){if(n){if(typeof n=="string")return Yg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Yg(n,l)}}function Yg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}var fo=null;function Z2(n,l,s){qa("parse sheet data using schema");for(var o=[],u=[],h=X2(n,l),f=0,p=Jv(h),g;!(g=p()).done;){var m=g.value,j=m.object,x=m.errors;x?u=u.concat(x.map(function(b){return uo(uo({},b),{},{row:f+1})})):o.push(j),f++}return qa("end"),u.length>0?{errors:u}:{objects:o}}function X2(n,l,s){l_(l);var o=c_(),u=I2(n),h=u[0],f=u.slice(1);return f.map(function(p){return K2(p,l,h,o)})}function K2(n,l,s,o){var u={schema:l},h=Wv(n,u,void 0,s,o),f=h.value,p=h.isEmptyValue,g=h.errors,m=h.children,j={value:u_,isEmptyValue:p,errors:g,isRequired:void 0},x=ny(u,f,p,g,m,j.isRequired,j.value,j.isEmptyValue,j.errors,s);return g||x?{errors:(g||[]).concat(x||[])}:{object:ty(f,p,void 0,o)}}function Q2(n,l,s,o,u){for(var h={},f=!0,p=[],g=[],m=0,j=Object.keys(l);m<j.length;m++){var x=j[m],b=Wv(n,l[x],Fg(x,s),o,u);b.errors?p=p.concat(b.errors):(h[x]=ty(b.value,b.isEmptyValue,Fg(x,s),u),f&&!b.isEmptyValue&&(f=!1)),g.push(uo(uo({},b),{},{schemaEntry:l[x]}))}return p.length>0?{errors:p,children:g}:{value:h,isEmptyValue:f,children:g}}function Wv(n,l,s,o,u){var h=l.column?o.indexOf(l.column):void 0,f=l.column?h<0:void 0,p=l.column?f?{value:u.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:J2(n[h],l,h,u):Q2(n,l.schema,s,o,u),g=p.value,m=p.isEmptyValue,j=p.errors,x=p.children;return j?{errors:j,children:x}:{value:g,isEmptyValue:m,children:x}}function J2(n,l,s,o){var u=W2(n,l,o),h=u.value,f=u.isEmptyValue,p=u.error,g=u.reason;if(p){var m=ay({error:p,reason:g,column:l.column,columnIndex:s,valueType:l.type,value:n});return{errors:[m]}}return{value:h,isEmptyValue:f}}function W2(n,l,s){return n===void 0?{value:s.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:n===fo?{value:s.propertyValueWhenCellIsEmpty,isEmptyValue:!0}:Array.isArray(l.type)?e_(n,l,s):ey(n,l)}function e_(n,l,s){if(typeof n!="string")return{error:"not_a_string"};var o=!0,u=[],h=[],f=r_(n,s.separatorCharacter).map(function(p){if(!(u.length>0)){if(!p){u.push("invalid"),h.push("syntax");return}var g=ey(p,l),m=g.value,j=g.isEmptyValue,x=g.error,b=g.reason;if(x){u.push(x),h.push(b);return}return o&&!j&&(o=!1),m}});return u.length>0?{error:u[0],reason:h[0]}:{value:f,isEmptyValue:o}}function ey(n,l,s){if(n===fo)return{value:n,isEmptyValue:!0};var o;if(l.type?o=n_(n,Array.isArray(l.type)?l.type[0]:l.type):o={value:n},o.error)return o;if(n===fo)return{value:n,isEmptyValue:!0};if(l.oneOf){var u=t_(o.value,l.oneOf);if(u)return u}if(l.validate)try{l.validate(o.value)}catch(h){return{error:h.message}}return{value:o.value,isEmptyValue:s_(o.value)}}function t_(n,l){if(l.indexOf(n)<0)return{error:"invalid",reason:"unknown"}}function n_(n,l){switch(l){case String:return il(n,M2);case Number:return il(n,L2);case Date:return il(n,$2);case Boolean:return il(n,B2);default:if(typeof l!="function")throw new Error("Unsupported schema `type`: ".concat(l&&l.name||l));return il(n,l)}}function il(n,l){try{var s=l(n);return s===void 0?{value:fo}:{value:s}}catch(u){var o={error:u.message};return u.reason&&(o.reason=u.reason),o}}function a_(n,l,s){for(var o=0,u="";s+o<n.length;){var h=n[s+o];if(h===l)return[u,o];u+=h,o++}return[u,o]}function r_(n,l){for(var s=[],o=0;o<n.length;){var u=a_(n,l,o),h=q2(u,2),f=h[0],p=h[1];o+=p+l.length,s.push(f.trim())}return s}function ty(n,l,s,o){if(l){if(Xv(n))return o.transformEmptyObject(n,{path:s});if(Array.isArray(n))return o.transformEmptyArray(n,{path:s})}return n}function Fg(n,l){return"".concat(l?l+".":"").concat(n)}function ny(n,l,s,o,u,h,f,p,g,m){var j=[],x=i_(n,h,f,p,g);if(x&&s&&j.push(ay({error:"required",column:n.column,columnIndex:m.indexOf(n.column),valueType:n.type,value:l})),u)for(var b=Jv(u),y;!(y=b()).done;){var O=y.value,N=ny(O.schemaEntry,O.value,O.isEmptyValue,O.errors,O.children,x,l,s,o,m);N&&(j=j.concat(N))}if(j.length>0)return j}function i_(n,l,s,o,u){return l===!1&&(o||u)?!1:n.required&&(typeof n.required=="boolean"?n.required:u?!1:n.required(s))}function ay(n){var l=n.column,s=n.columnIndex,o=n.valueType,u=n.value,h=n.error,f=n.reason,p={error:h,column:l,columnIndex:s,value:u};return f&&(p.reason=f),o&&(p.type=o),p}function l_(n){for(var l=0,s=Object.keys(n);l<s.length;l++){var o=s[l],u=n[o];if(si(u.type)==="object"&&!Array.isArray(u.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!u.schema&&!u.column)throw new Error('"column" not defined for schema entry "'.concat(o,'".'))}ry(n,void 0)}function ry(n,l){if(l!==void 0&&l!==!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(l));for(var s=0,o=Object.keys(n);s<o.length;s++){var u=o[s];if(Xv(n[u].schema)){if(n[u].column)throw new Error("In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: ".concat(u,`. Schema:
50
- `).concat(JSON.stringify(n[u],null,2)));ry(n[u].schema,n[u].required)}}}function s_(n){return n==null}var o_={propertyValueWhenColumnIsMissing:void 0,propertyValueWhenCellIsEmpty:null,transformEmptyObject:function(){return null},transformEmptyArray:function(){return null},separatorCharacter:","};function c_(n){return o_}var u_={};function _l(n){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_l(n)}var d_=["schema"];function Pg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function Zg(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Pg(Object(s),!0).forEach(function(o){f_(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Pg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function f_(n,l,s){return l=h_(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function h_(n){var l=p_(n,"string");return _l(l)==="symbol"?l:String(l)}function p_(n,l){if(_l(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(_l(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function m_(n,l){if(n==null)return{};var s=g_(n,l),o,u;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(u=0;u<h.length;u++)o=h[u],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function g_(n,l){if(n==null)return{};var s={},o=Object.keys(n),u,h;for(h=0;h<o.length;h++)u=o[h],!(l.indexOf(u)>=0)&&(s[u]=n[u]);return s}function v_(n,l,s,o,u){var h={},f=h.schema,p=m_(h,d_);return w2(n,l,s,Zg(Zg({},p),{},{sheets:[1]})).then(function(g){var m=g[0].data;return f?Z2(m,f):m})}function y_(n,l,s){return Aw(n).then(function(o){return v_(E1,M1,o)})}function b_({existingCases:n,sourceUrl:l,onImport:s,onClose:o}){const[u,h]=I.useState(""),[f,p]=I.useState([]),[g,m]=I.useState(""),[j,x]=I.useState(!1);async function b(y){if(!(!y||j)){x(!0),m(""),h(y.name);try{const O=await x_(y),N=j_(O,n,l);if(!N.length)throw new Error("No valid Test Cases were found. Check that the file contains TC_ID or Title.");p(N)}catch(O){p([]),m(O instanceof Error?O.message:"Could not read the file.")}finally{x(!1)}}}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:y=>y.target===y.currentTarget&&o(),children:r.jsxs("section",{className:"modern-modal import-testcase-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Import Test Cases"}),r.jsx("h2",{children:"Bring an existing suite into LazyScout"}),r.jsx("p",{children:"CSV, XLSX and JSON are supported. Fields are mapped automatically."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"import-testcase-body",children:[r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:".csv,.xlsx,.json",onChange:y=>{b(y.target.files?.[0])}}),r.jsx("strong",{children:j?"Reading file…":u||"Choose a CSV, XLSX or JSON file"}),r.jsx("span",{children:"Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result"})]}),g&&r.jsx("p",{className:"import-error",children:g}),f.length>0&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"import-summary",children:[r.jsxs("b",{children:[f.length," Test Cases ready to import"]}),r.jsx("span",{children:"Duplicate IDs are replaced with a new TC-IMPORT ID."})]}),r.jsxs("div",{className:"import-preview",children:[r.jsxs("table",{children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"TC ID"}),r.jsx("th",{children:"Folder"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Tags"}),r.jsx("th",{children:"Requirements"})]})}),r.jsx("tbody",{children:f.slice(0,10).map(y=>r.jsxs("tr",{children:[r.jsx("td",{children:y.id}),r.jsx("td",{children:y.folder??y.module}),r.jsx("td",{children:y.title}),r.jsx("td",{children:(y.tags??[]).join(", ")||"—"}),r.jsx("td",{children:(y.requirements??[]).join(", ")||"—"})]},y.id))})]}),f.length>10&&r.jsxs("p",{children:["Previewing 10 of ",f.length," Test Cases."]})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",disabled:!f.length,onClick:()=>{s(f),o()},children:["Import ",f.length||""," Test Cases"]})]})]})})}async function x_(n){const l=n.name.split(".").pop()?.toLowerCase();if(l==="json"){const s=JSON.parse(await n.text());return(Array.isArray(s)?s:s&&typeof s=="object"&&Array.isArray(s.testCases)?s.testCases:[]).filter(u=>!!u&&typeof u=="object")}if(l==="csv")return Xg(S_(await n.text()));if(l==="xlsx")return Xg(await y_(n));throw new Error("Supported formats are CSV, XLSX and JSON.")}function Xg(n){const[l,...s]=n;if(!l)return[];const o=l.map(u=>String(u??"").trim());return s.filter(u=>u.some(h=>h!=null&&String(h).trim())).map(u=>Object.fromEntries(o.map((h,f)=>[h||`Column_${f+1}`,u[f]??""])))}function S_(n){const l=[];let s=[],o="",u=!1;const h=n.replace(/^\uFEFF/,"");for(let f=0;f<h.length;f++){const p=h[f];p==='"'?u&&h[f+1]==='"'?(o+='"',f++):u=!u:p===","&&!u?(s.push(o),o=""):(p===`
51
- `||p==="\r")&&!u?(p==="\r"&&h[f+1]===`
52
- `&&f++,s.push(o),s.some(g=>g.trim())&&l.push(s),s=[],o=""):o+=p}if(s.push(o),s.some(f=>f.trim())&&l.push(s),u)throw new Error("CSV contains an unclosed quoted value.");return l}function j_(n,l,s){const o=new Set(l.map(f=>f.id));let u=1;const h=()=>{let f=`TC-IMPORT-${String(u).padStart(3,"0")}`;for(;o.has(f);)f=`TC-IMPORT-${String(++u).padStart(3,"0")}`;return o.add(f),u++,f};return n.map(f=>{const p=zn(f,"TC_ID","ID","TEST_CASE_ID"),g=zn(f,"TITLE","TEST_CASE","NAME");if(!g&&!p)return null;const m=!p||o.has(p)?h():p;o.add(m);const j=zn(f,"MODULE")||"IMPORTED",x=Xs(f,"TEST_STEPS","STEPS").map(b=>({type:"manual",description:b}));return{id:m,module:j,folder:zn(f,"FOLDER")||j,tags:Xs(f,"TAGS","TAG"),requirements:Xs(f,"REQUIREMENTS","REQUIREMENT","TICKET","TICKETS"),title:g||m,preconditions:Xs(f,"PRECONDITIONS","PRECONDITION"),steps:x.length?x:[{type:"manual",description:"Review imported steps"}],expectedResult:zn(f,"EXPECTED_RESULT","EXPECTED RESULT","EXPECTED")||"Review expected result",type:w_(zn(f,"TYPE")),priority:__(zn(f,"PRIORITY")),automationStatus:N_(zn(f,"AUTOMATION_STATUS","AUTOMATION")),sourceUrl:zn(f,"SOURCE_URL","SOURCE URL","URL")||s||"Imported file",notes:zn(f,"NOTES","NOTE")||"Imported into LazyScout"}}).filter(f=>!!f)}function Kg(n){return n.toUpperCase().replace(/[^A-Z0-9]/g,"")}function zn(n,...l){const s=new Map(Object.entries(n).map(([o,u])=>[Kg(o),String(u??"").trim()]));for(const o of l){const u=s.get(Kg(o));if(u)return u}return""}function Xs(n,...l){return zn(n,...l).split(/[\n,;|]/).map(s=>s.replace(/^\s*\d+[.)-]?\s*/,"").trim()).filter(Boolean)}function w_(n){return n.toLowerCase()==="negative"?"negative":n.toLowerCase()==="validation"?"validation":"positive"}function __(n){return n.toLowerCase()==="high"?"high":n.toLowerCase()==="low"?"low":"medium"}function N_(n){return["ready","needs-data","needs-review","manual"].includes(n)?n:"needs-review"}function T_(n){return n?new Intl.DateTimeFormat(void 0,{dateStyle:"medium"}).format(new Date(n)):"Published on npm"}function E_({compact:n=!1}){const[l,s]=I.useState(),[o,u]=I.useState(!0),[h,f]=I.useState(),[p,g]=I.useState(),[m,j]=I.useState(),[x,b]=I.useState(),[y,O]=I.useState();async function N(){u(!0),f(void 0);try{s(await p0())}catch(C){f(C instanceof Error?C.message:"Could not check npm versions.")}finally{u(!1)}}I.useEffect(()=>{N()},[]);async function _(C){await navigator.clipboard.writeText(`npm install -g lazyscout@${C}`),O(C),window.setTimeout(()=>O(A=>A===C?void 0:A),1600)}async function w(C){j(C),g(void 0),b(void 0),f(void 0);try{b(await m0(C))}catch(A){f(A instanceof hr&&A.hint?`${A.message} ${A.hint}`:A instanceof Error?A.message:"Could not install this version.")}finally{j(void 0)}}return r.jsxs("section",{className:`version-center ${n?"is-compact":""}`,children:[r.jsxs("header",{className:"version-center-head",children:[r.jsx("div",{className:"version-center-icon",children:"V"}),r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Version Center"}),r.jsx("h3",{children:n?"LazyScout version":"Choose your LazyScout version"}),!n&&r.jsx("p",{children:"Install the latest release or switch to an earlier published version before opening a workspace."})]}),r.jsx("button",{type:"button",className:"version-refresh",onClick:()=>{N()},disabled:o,children:o?"Checking…":"Check again"})]}),o&&!l?r.jsxs("div",{className:"version-loading",children:[r.jsx("span",{className:"scout-spinner"})," Checking npm Registry…"]}):l?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"version-summary",children:[r.jsxs("div",{children:[r.jsx("small",{children:"Running now"}),r.jsxs("strong",{children:["v",l.currentVersion]})]}),r.jsx("span",{className:"version-summary-arrow",children:"→"}),r.jsxs("div",{children:[r.jsx("small",{children:"Latest release"}),r.jsx("strong",{children:l.latestVersion?`v${l.latestVersion}`:"Unavailable"})]}),r.jsx("span",{className:`version-state ${l.updateAvailable?"has-update":""}`,children:l.updateAvailable?"Update available":"Up to date"})]}),!n&&r.jsx("div",{className:"version-list","aria-label":"Published LazyScout versions",children:l.versions.slice(0,3).map(C=>{const A=C.version===l.currentVersion,H=C.version===p,D=C.version===m;return r.jsxs("div",{className:`version-row ${A?"is-current":""}`,children:[r.jsxs("div",{className:"version-number",children:[r.jsxs("span",{children:["v",C.version]}),r.jsx("small",{children:T_(C.publishedAt)})]}),r.jsxs("div",{className:"version-tags",children:[C.tags.map(K=>r.jsx("span",{children:K},K)),A&&r.jsx("span",{className:"current",children:"running"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary version-copy",onClick:()=>{_(C.version)},children:y===C.version?"Copied":"Copy command"}),r.jsx("button",{type:"button",className:"btn btn-primary version-install",disabled:A||!!m,onClick:()=>g(H?void 0:C.version),children:A?"Current":D?"Installing…":"Install"}),H&&r.jsxs("div",{className:"version-confirm",children:[r.jsxs("span",{children:["Install ",r.jsxs("b",{children:["v",C.version]})," globally? Restart LazyScout after installation to use it."]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>g(void 0),children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>{w(C.version)},children:["Install v",C.version]})]})]},C.version)})})]}):null,l&&!l.registryAvailable&&r.jsxs("div",{className:"version-message warning",children:["npm Registry is unavailable. ",l.error]}),h&&r.jsx("div",{className:"version-message error",children:h}),x&&r.jsxs("div",{className:"version-message success",children:[r.jsxs("b",{children:["LazyScout v",x.installedVersion," installed."]}),r.jsx("span",{children:"Close the current LazyScout terminal and run `lazyscout` again to switch versions."})]})]})}function C_({projects:n,onScout:l,onEmpty:s,onSample:o,onOpenProject:u,onClose:h}){const{language:f}=Cn(),p=f==="th",[g,m]=I.useState(""),[j,x]=I.useState(n[0]?.id??""),b=g.trim()||"Untitled Test Suite";return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:y=>y.target===y.currentTarget&&h(),children:r.jsxs("section",{className:"modern-modal new-project-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:p?"โปรเจกต์ใหม่":"New Project"}),r.jsx("h2",{children:p?"เริ่ม QA workspace":"Start a QA workspace"}),r.jsx("p",{children:p?"เลือก Scout เว็บไซต์ สร้างโปรเจกต์ตัวอย่าง หรือนำเข้า Test Case เดิม":"Choose whether to scout a website now or import an existing Test Case suite."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:h,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"new-project-modal-body",children:[r.jsx(E_,{compact:!0}),r.jsxs("label",{children:[r.jsx("span",{children:p?"ชื่อโปรเจกต์":"Project name"}),r.jsx("input",{className:"field",value:g,onChange:y=>m(y.target.value),placeholder:"Example: Storefront regression",autoFocus:!0})]}),r.jsxs("div",{className:"new-project-choices",children:[r.jsxs("button",{type:"button",onClick:()=>l(b),children:[r.jsx("span",{className:"new-project-choice-icon scout",children:"◉"}),r.jsxs("span",{children:[r.jsx("b",{children:p?"Scout เว็บไซต์":"Scout a website"}),r.jsx("small",{children:p?"ใส่ URL แล้วให้ Playwright ค้นหาหน้าและสร้าง Test Case ชุดแรก":"Enter a URL, then let Playwright discover pages and create a first Test Case suite."})]}),r.jsx("em",{children:"→"})]}),r.jsxs("button",{type:"button",onClick:o,children:[r.jsx("span",{className:"new-project-choice-icon sample",children:"✦"}),r.jsxs("span",{children:[r.jsx("b",{children:p?"ลองโปรเจกต์ตัวอย่าง":"Try a sample project"}),r.jsx("small",{children:p?"ทดลอง Login จริงบน Practice Test Automation พร้อม Test Case ที่รันได้ทันที":"Run a ready-made login suite against Practice Test Automation immediately."})]}),r.jsx("em",{children:"→"})]}),n.length?r.jsxs("div",{className:"existing-project-choice",children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"↗"}),r.jsxs("div",{children:[r.jsx("b",{children:p?"เปิดโปรเจกต์เดิม":"Open existing project"}),r.jsx("small",{children:p?"ทำงานต่อจาก Local workspace":"Continue a local workspace."}),r.jsx("select",{className:"field",value:j,onChange:y=>x(y.target.value),children:n.map(y=>r.jsx("option",{value:y.id,children:y.name},y.id))})]})]}):r.jsxs("button",{type:"button",onClick:()=>s(b),children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"⇧"}),r.jsxs("span",{children:[r.jsx("b",{children:p?"โปรเจกต์เปล่า":"Empty project"}),r.jsx("small",{children:p?"สร้างชุดเปล่าสำหรับนำเข้า CSV, XLSX หรือ JSON และเพิ่ม Test Case เองได้":"Create a blank suite for CSV, XLSX, or JSON import. You can add Test Cases manually too."})]}),r.jsx("em",{children:"→"})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:p?"ยกเลิก":"Cancel"}),n.length>0&&r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!j,onClick:()=>j&&u(j),children:p?"เปิดโปรเจกต์":"Open project"})]})]})})}var md={exports:{}};var Qg;function O_(){return Qg||(Qg=1,(function(n,l){(function(s){n.exports=s()})(function(){return(function s(o,u,h){function f(m,j){if(!u[m]){if(!o[m]){var x=typeof ol=="function"&&ol;if(!j&&x)return x(m,!0);if(p)return p(m,!0);var b=new Error("Cannot find module '"+m+"'");throw b.code="MODULE_NOT_FOUND",b}var y=u[m]={exports:{}};o[m][0].call(y.exports,function(O){var N=o[m][1][O];return f(N||O)},y,y.exports,s,o,u,h)}return u[m].exports}for(var p=typeof ol=="function"&&ol,g=0;g<h.length;g++)f(h[g]);return f})({1:[function(s,o,u){var h=s("./utils"),f=s("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(g){for(var m,j,x,b,y,O,N,_=[],w=0,C=g.length,A=C,H=h.getTypeOf(g)!=="string";w<g.length;)A=C-w,x=H?(m=g[w++],j=w<C?g[w++]:0,w<C?g[w++]:0):(m=g.charCodeAt(w++),j=w<C?g.charCodeAt(w++):0,w<C?g.charCodeAt(w++):0),b=m>>2,y=(3&m)<<4|j>>4,O=1<A?(15&j)<<2|x>>6:64,N=2<A?63&x:64,_.push(p.charAt(b)+p.charAt(y)+p.charAt(O)+p.charAt(N));return _.join("")},u.decode=function(g){var m,j,x,b,y,O,N=0,_=0,w="data:";if(g.substr(0,w.length)===w)throw new Error("Invalid base64 input, it looks like a data url.");var C,A=3*(g=g.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(g.charAt(g.length-1)===p.charAt(64)&&A--,g.charAt(g.length-2)===p.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(C=f.uint8array?new Uint8Array(0|A):new Array(0|A);N<g.length;)m=p.indexOf(g.charAt(N++))<<2|(b=p.indexOf(g.charAt(N++)))>>4,j=(15&b)<<4|(y=p.indexOf(g.charAt(N++)))>>2,x=(3&y)<<6|(O=p.indexOf(g.charAt(N++))),C[_++]=m,y!==64&&(C[_++]=j),O!==64&&(C[_++]=x);return C}},{"./support":30,"./utils":32}],2:[function(s,o,u){var h=s("./external"),f=s("./stream/DataWorker"),p=s("./stream/Crc32Probe"),g=s("./stream/DataLengthProbe");function m(j,x,b,y,O){this.compressedSize=j,this.uncompressedSize=x,this.crc32=b,this.compression=y,this.compressedContent=O}m.prototype={getContentWorker:function(){var j=new f(h.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),x=this;return j.on("end",function(){if(this.streamInfo.data_length!==x.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),j},getCompressedWorker:function(){return new f(h.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},m.createWorkerFrom=function(j,x,b){return j.pipe(new p).pipe(new g("uncompressedSize")).pipe(x.compressWorker(b)).pipe(new g("compressedSize")).withStreamInfo("compression",x)},o.exports=m},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,o,u){var h=s("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new h("STORE compression")},uncompressWorker:function(){return new h("STORE decompression")}},u.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,o,u){var h=s("./utils"),f=(function(){for(var p,g=[],m=0;m<256;m++){p=m;for(var j=0;j<8;j++)p=1&p?3988292384^p>>>1:p>>>1;g[m]=p}return g})();o.exports=function(p,g){return p!==void 0&&p.length?h.getTypeOf(p)!=="string"?(function(m,j,x,b){var y=f,O=b+x;m^=-1;for(var N=b;N<O;N++)m=m>>>8^y[255&(m^j[N])];return-1^m})(0|g,p,p.length,0):(function(m,j,x,b){var y=f,O=b+x;m^=-1;for(var N=b;N<O;N++)m=m>>>8^y[255&(m^j.charCodeAt(N))];return-1^m})(0|g,p,p.length,0):0}},{"./utils":32}],5:[function(s,o,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(s,o,u){var h=null;h=typeof Promise<"u"?Promise:s("lie"),o.exports={Promise:h}},{lie:37}],7:[function(s,o,u){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",f=s("pako"),p=s("./utils"),g=s("./stream/GenericWorker"),m=h?"uint8array":"array";function j(x,b){g.call(this,"FlateWorker/"+x),this._pako=null,this._pakoAction=x,this._pakoOptions=b,this.meta={}}u.magic="\b\0",p.inherits(j,g),j.prototype.processChunk=function(x){this.meta=x.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(m,x.data),!1)},j.prototype.flush=function(){g.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},j.prototype.cleanUp=function(){g.prototype.cleanUp.call(this),this._pako=null},j.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var x=this;this._pako.onData=function(b){x.push({data:b,meta:x.meta})}},u.compressWorker=function(x){return new j("Deflate",x)},u.uncompressWorker=function(){return new j("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,o,u){function h(y,O){var N,_="";for(N=0;N<O;N++)_+=String.fromCharCode(255&y),y>>>=8;return _}function f(y,O,N,_,w,C){var A,H,D=y.file,K=y.compression,G=C!==m.utf8encode,re=p.transformTo("string",C(D.name)),$=p.transformTo("string",m.utf8encode(D.name)),F=D.comment,ne=p.transformTo("string",C(F)),M=p.transformTo("string",m.utf8encode(F)),q=$.length!==D.name.length,T=M.length!==F.length,Z="",V="",P="",X=D.dir,k=D.date,Y={crc32:0,compressedSize:0,uncompressedSize:0};O&&!N||(Y.crc32=y.crc32,Y.compressedSize=y.compressedSize,Y.uncompressedSize=y.uncompressedSize);var v=0;O&&(v|=8),G||!q&&!T||(v|=2048);var R=0,B=0;X&&(R|=16),w==="UNIX"?(B=798,R|=(function(se,ge){var Ne=se;return se||(Ne=ge?16893:33204),(65535&Ne)<<16})(D.unixPermissions,X)):(B=20,R|=(function(se){return 63&(se||0)})(D.dosPermissions)),A=k.getUTCHours(),A<<=6,A|=k.getUTCMinutes(),A<<=5,A|=k.getUTCSeconds()/2,H=k.getUTCFullYear()-1980,H<<=4,H|=k.getUTCMonth()+1,H<<=5,H|=k.getUTCDate(),q&&(V=h(1,1)+h(j(re),4)+$,Z+="up"+h(V.length,2)+V),T&&(P=h(1,1)+h(j(ne),4)+M,Z+="uc"+h(P.length,2)+P);var J="";return J+=`
53
- \0`,J+=h(v,2),J+=K.magic,J+=h(A,2),J+=h(H,2),J+=h(Y.crc32,4),J+=h(Y.compressedSize,4),J+=h(Y.uncompressedSize,4),J+=h(re.length,2),J+=h(Z.length,2),{fileRecord:x.LOCAL_FILE_HEADER+J+re+Z,dirRecord:x.CENTRAL_FILE_HEADER+h(B,2)+J+h(ne.length,2)+"\0\0\0\0"+h(R,4)+h(_,4)+re+Z+ne}}var p=s("../utils"),g=s("../stream/GenericWorker"),m=s("../utf8"),j=s("../crc32"),x=s("../signature");function b(y,O,N,_){g.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=O,this.zipPlatform=N,this.encodeFileName=_,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(b,g),b.prototype.push=function(y){var O=y.meta.percent||0,N=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,g.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:N?(O+100*(N-_-1))/N:100}}))},b.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var O=this.streamFiles&&!y.file.dir;if(O){var N=f(y,O,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},b.prototype.closedSource=function(y){this.accumulate=!1;var O=this.streamFiles&&!y.file.dir,N=f(y,O,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),O)this.push({data:(function(_){return x.DATA_DESCRIPTOR+h(_.crc32,4)+h(_.compressedSize,4)+h(_.uncompressedSize,4)})(y),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},b.prototype.flush=function(){for(var y=this.bytesWritten,O=0;O<this.dirRecords.length;O++)this.push({data:this.dirRecords[O],meta:{percent:100}});var N=this.bytesWritten-y,_=(function(w,C,A,H,D){var K=p.transformTo("string",D(H));return x.CENTRAL_DIRECTORY_END+"\0\0\0\0"+h(w,2)+h(w,2)+h(C,4)+h(A,4)+h(K.length,2)+K})(this.dirRecords.length,N,y,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},b.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},b.prototype.registerPrevious=function(y){this._sources.push(y);var O=this;return y.on("data",function(N){O.processChunk(N)}),y.on("end",function(){O.closedSource(O.previous.streamInfo),O._sources.length?O.prepareNextSource():O.end()}),y.on("error",function(N){O.error(N)}),this},b.prototype.resume=function(){return!!g.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},b.prototype.error=function(y){var O=this._sources;if(!g.prototype.error.call(this,y))return!1;for(var N=0;N<O.length;N++)try{O[N].error(y)}catch{}return!0},b.prototype.lock=function(){g.prototype.lock.call(this);for(var y=this._sources,O=0;O<y.length;O++)y[O].lock()},o.exports=b},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,o,u){var h=s("../compressions"),f=s("./ZipFileWorker");u.generateWorker=function(p,g,m){var j=new f(g.streamFiles,m,g.platform,g.encodeFileName),x=0;try{p.forEach(function(b,y){x++;var O=(function(C,A){var H=C||A,D=h[H];if(!D)throw new Error(H+" is not a valid compression method !");return D})(y.options.compression,g.compression),N=y.options.compressionOptions||g.compressionOptions||{},_=y.dir,w=y.date;y._compressWorker(O,N).withStreamInfo("file",{name:b,dir:_,date:w,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(j)}),j.entriesCount=x}catch(b){j.error(b)}return j}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,o,u){function h(){if(!(this instanceof h))return new h;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 h;for(var p in this)typeof this[p]!="function"&&(f[p]=this[p]);return f}}(h.prototype=s("./object")).loadAsync=s("./load"),h.support=s("./support"),h.defaults=s("./defaults"),h.version="3.10.1",h.loadAsync=function(f,p){return new h().loadAsync(f,p)},h.external=s("./external"),o.exports=h},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,o,u){var h=s("./utils"),f=s("./external"),p=s("./utf8"),g=s("./zipEntries"),m=s("./stream/Crc32Probe"),j=s("./nodejsUtils");function x(b){return new f.Promise(function(y,O){var N=b.decompressed.getContentWorker().pipe(new m);N.on("error",function(_){O(_)}).on("end",function(){N.streamInfo.crc32!==b.decompressed.crc32?O(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}o.exports=function(b,y){var O=this;return y=h.extend(y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:p.utf8decode}),j.isNode&&j.isStream(b)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):h.prepareContent("the loaded zip file",b,!0,y.optimizedBinaryString,y.base64).then(function(N){var _=new g(y);return _.load(N),_}).then(function(N){var _=[f.Promise.resolve(N)],w=N.files;if(y.checkCRC32)for(var C=0;C<w.length;C++)_.push(x(w[C]));return f.Promise.all(_)}).then(function(N){for(var _=N.shift(),w=_.files,C=0;C<w.length;C++){var A=w[C],H=A.fileNameStr,D=h.resolve(A.fileNameStr);O.file(D,A.decompressed,{binary:!0,optimizedBinaryString:!0,date:A.date,dir:A.dir,comment:A.fileCommentStr.length?A.fileCommentStr:null,unixPermissions:A.unixPermissions,dosPermissions:A.dosPermissions,createFolders:y.createFolders}),A.dir||(O.file(D).unsafeOriginalName=H)}return _.zipComment.length&&(O.comment=_.zipComment),O})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,o,u){var h=s("../utils"),f=s("../stream/GenericWorker");function p(g,m){f.call(this,"Nodejs stream input adapter for "+g),this._upstreamEnded=!1,this._bindStream(m)}h.inherits(p,f),p.prototype._bindStream=function(g){var m=this;(this._stream=g).pause(),g.on("data",function(j){m.push({data:j,meta:{percent:0}})}).on("error",function(j){m.isPaused?this.generatedError=j:m.error(j)}).on("end",function(){m.isPaused?m._upstreamEnded=!0:m.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(s,o,u){var h=s("readable-stream").Readable;function f(p,g,m){h.call(this,g),this._helper=p;var j=this;p.on("data",function(x,b){j.push(x)||j._helper.pause(),m&&m(b)}).on("error",function(x){j.emit("error",x)}).on("end",function(){j.push(null)})}s("../utils").inherits(f,h),f.prototype._read=function(){this._helper.resume()},o.exports=f},{"../utils":32,"readable-stream":16}],14:[function(s,o,u){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(h,f){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(h,f);if(typeof h=="number")throw new Error('The "data" argument must not be a number');return new Buffer(h,f)},allocBuffer:function(h){if(Buffer.alloc)return Buffer.alloc(h);var f=new Buffer(h);return f.fill(0),f},isBuffer:function(h){return Buffer.isBuffer(h)},isStream:function(h){return h&&typeof h.on=="function"&&typeof h.pause=="function"&&typeof h.resume=="function"}}},{}],15:[function(s,o,u){function h(D,K,G){var re,$=p.getTypeOf(K),F=p.extend(G||{},j);F.date=F.date||new Date,F.compression!==null&&(F.compression=F.compression.toUpperCase()),typeof F.unixPermissions=="string"&&(F.unixPermissions=parseInt(F.unixPermissions,8)),F.unixPermissions&&16384&F.unixPermissions&&(F.dir=!0),F.dosPermissions&&16&F.dosPermissions&&(F.dir=!0),F.dir&&(D=w(D)),F.createFolders&&(re=_(D))&&C.call(this,re,!0);var ne=$==="string"&&F.binary===!1&&F.base64===!1;G&&G.binary!==void 0||(F.binary=!ne),(K instanceof x&&K.uncompressedSize===0||F.dir||!K||K.length===0)&&(F.base64=!1,F.binary=!0,K="",F.compression="STORE",$="string");var M=null;M=K instanceof x||K instanceof g?K:O.isNode&&O.isStream(K)?new N(D,K):p.prepareContent(D,K,F.binary,F.optimizedBinaryString,F.base64);var q=new b(D,M,F);this.files[D]=q}var f=s("./utf8"),p=s("./utils"),g=s("./stream/GenericWorker"),m=s("./stream/StreamHelper"),j=s("./defaults"),x=s("./compressedObject"),b=s("./zipObject"),y=s("./generate"),O=s("./nodejsUtils"),N=s("./nodejs/NodejsStreamInputAdapter"),_=function(D){D.slice(-1)==="/"&&(D=D.substring(0,D.length-1));var K=D.lastIndexOf("/");return 0<K?D.substring(0,K):""},w=function(D){return D.slice(-1)!=="/"&&(D+="/"),D},C=function(D,K){return K=K!==void 0?K:j.createFolders,D=w(D),this.files[D]||h.call(this,D,null,{dir:!0,createFolders:K}),this.files[D]};function A(D){return Object.prototype.toString.call(D)==="[object RegExp]"}var H={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(D){var K,G,re;for(K in this.files)re=this.files[K],(G=K.slice(this.root.length,K.length))&&K.slice(0,this.root.length)===this.root&&D(G,re)},filter:function(D){var K=[];return this.forEach(function(G,re){D(G,re)&&K.push(re)}),K},file:function(D,K,G){if(arguments.length!==1)return D=this.root+D,h.call(this,D,K,G),this;if(A(D)){var re=D;return this.filter(function(F,ne){return!ne.dir&&re.test(F)})}var $=this.files[this.root+D];return $&&!$.dir?$:null},folder:function(D){if(!D)return this;if(A(D))return this.filter(function($,F){return F.dir&&D.test($)});var K=this.root+D,G=C.call(this,K),re=this.clone();return re.root=G.name,re},remove:function(D){D=this.root+D;var K=this.files[D];if(K||(D.slice(-1)!=="/"&&(D+="/"),K=this.files[D]),K&&!K.dir)delete this.files[D];else for(var G=this.filter(function($,F){return F.name.slice(0,D.length)===D}),re=0;re<G.length;re++)delete this.files[G[re].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(D){var K,G={};try{if((G=p.extend(D||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:f.utf8encode})).type=G.type.toLowerCase(),G.compression=G.compression.toUpperCase(),G.type==="binarystring"&&(G.type="string"),!G.type)throw new Error("No output type specified.");p.checkSupport(G.type),G.platform!=="darwin"&&G.platform!=="freebsd"&&G.platform!=="linux"&&G.platform!=="sunos"||(G.platform="UNIX"),G.platform==="win32"&&(G.platform="DOS");var re=G.comment||this.comment||"";K=y.generateWorker(this,G,re)}catch($){(K=new g("error")).error($)}return new m(K,G.type||"string",G.mimeType)},generateAsync:function(D,K){return this.generateInternalStream(D).accumulate(K)},generateNodeStream:function(D,K){return(D=D||{}).type||(D.type="nodebuffer"),this.generateInternalStream(D).toNodejsStream(K)}};o.exports=H},{"./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(s,o,u){o.exports=s("stream")},{stream:void 0}],17:[function(s,o,u){var h=s("./DataReader");function f(p){h.call(this,p);for(var g=0;g<this.data.length;g++)p[g]=255&p[g]}s("../utils").inherits(f,h),f.prototype.byteAt=function(p){return this.data[this.zero+p]},f.prototype.lastIndexOfSignature=function(p){for(var g=p.charCodeAt(0),m=p.charCodeAt(1),j=p.charCodeAt(2),x=p.charCodeAt(3),b=this.length-4;0<=b;--b)if(this.data[b]===g&&this.data[b+1]===m&&this.data[b+2]===j&&this.data[b+3]===x)return b-this.zero;return-1},f.prototype.readAndCheckSignature=function(p){var g=p.charCodeAt(0),m=p.charCodeAt(1),j=p.charCodeAt(2),x=p.charCodeAt(3),b=this.readData(4);return g===b[0]&&m===b[1]&&j===b[2]&&x===b[3]},f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return[];var g=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./DataReader":18}],18:[function(s,o,u){var h=s("../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 g,m=0;for(this.checkOffset(p),g=this.index+p-1;g>=this.index;g--)m=(m<<8)+this.byteAt(g);return this.index+=p,m},readString:function(p){return h.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(s,o,u){var h=s("./Uint8ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){this.checkOffset(p);var g=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,o,u){var h=s("./DataReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),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 g=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./DataReader":18}],21:[function(s,o,u){var h=s("./ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return new Uint8Array(0);var g=this.data.subarray(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(s,o,u){var h=s("../utils"),f=s("../support"),p=s("./ArrayReader"),g=s("./StringReader"),m=s("./NodeBufferReader"),j=s("./Uint8ArrayReader");o.exports=function(x){var b=h.getTypeOf(x);return h.checkSupport(b),b!=="string"||f.uint8array?b==="nodebuffer"?new m(x):f.uint8array?new j(h.transformTo("uint8array",x)):new p(h.transformTo("array",x)):new g(x)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,o,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,o,u){var h=s("./GenericWorker"),f=s("../utils");function p(g){h.call(this,"ConvertWorker to "+g),this.destType=g}f.inherits(p,h),p.prototype.processChunk=function(g){this.push({data:f.transformTo(this.destType,g.data),meta:g.meta})},o.exports=p},{"../utils":32,"./GenericWorker":28}],25:[function(s,o,u){var h=s("./GenericWorker"),f=s("../crc32");function p(){h.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(p,h),p.prototype.processChunk=function(g){this.streamInfo.crc32=f(g.data,this.streamInfo.crc32||0),this.push(g)},o.exports=p},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,o,u){var h=s("../utils"),f=s("./GenericWorker");function p(g){f.call(this,"DataLengthProbe for "+g),this.propName=g,this.withStreamInfo(g,0)}h.inherits(p,f),p.prototype.processChunk=function(g){if(g){var m=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=m+g.data.length}f.prototype.processChunk.call(this,g)},o.exports=p},{"../utils":32,"./GenericWorker":28}],27:[function(s,o,u){var h=s("../utils"),f=s("./GenericWorker");function p(g){f.call(this,"DataWorker");var m=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,g.then(function(j){m.dataIsReady=!0,m.data=j,m.max=j&&j.length||0,m.type=h.getTypeOf(j),m.isPaused||m._tickAndRepeat()},function(j){m.error(j)})}h.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,h.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(h.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},p.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var g=null,m=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":g=this.data.substring(this.index,m);break;case"uint8array":g=this.data.subarray(this.index,m);break;case"array":case"nodebuffer":g=this.data.slice(this.index,m)}return this.index=m,this.push({data:g,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=p},{"../utils":32,"./GenericWorker":28}],28:[function(s,o,u){function h(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}h.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 g=0;g<this._listeners[f].length;g++)this._listeners[f][g].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(g){p.processChunk(g)}),f.on("end",function(){p.end()}),f.on("error",function(g){p.error(g)}),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=h},{}],29:[function(s,o,u){var h=s("../utils"),f=s("./ConvertWorker"),p=s("./GenericWorker"),g=s("../base64"),m=s("../support"),j=s("../external"),x=null;if(m.nodestream)try{x=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function b(O,N){return new j.Promise(function(_,w){var C=[],A=O._internalType,H=O._outputType,D=O._mimeType;O.on("data",function(K,G){C.push(K),N&&N(G)}).on("error",function(K){C=[],w(K)}).on("end",function(){try{var K=(function(G,re,$){switch(G){case"blob":return h.newBlob(h.transformTo("arraybuffer",re),$);case"base64":return g.encode(re);default:return h.transformTo(G,re)}})(H,(function(G,re){var $,F=0,ne=null,M=0;for($=0;$<re.length;$++)M+=re[$].length;switch(G){case"string":return re.join("");case"array":return Array.prototype.concat.apply([],re);case"uint8array":for(ne=new Uint8Array(M),$=0;$<re.length;$++)ne.set(re[$],F),F+=re[$].length;return ne;case"nodebuffer":return Buffer.concat(re);default:throw new Error("concat : unsupported type '"+G+"'")}})(A,C),D);_(K)}catch(G){w(G)}C=[]}).resume()})}function y(O,N,_){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=_,h.checkSupport(w),this._worker=O.pipe(new f(w)),O.lock()}catch(C){this._worker=new p("error"),this._worker.error(C)}}y.prototype={accumulate:function(O){return b(this,O)},on:function(O,N){var _=this;return O==="data"?this._worker.on(O,function(w){N.call(_,w.data,w.meta)}):this._worker.on(O,function(){h.delay(N,arguments,_)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(O){if(h.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new x(this,{objectMode:this._outputType!=="nodebuffer"},O)}},o.exports=y},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,o,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var h=new ArrayBuffer(0);try{u.blob=new Blob([h],{type:"application/zip"}).size===0}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);f.append(h),u.blob=f.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!s("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(s,o,u){for(var h=s("./utils"),f=s("./support"),p=s("./nodejsUtils"),g=s("./stream/GenericWorker"),m=new Array(256),j=0;j<256;j++)m[j]=252<=j?6:248<=j?5:240<=j?4:224<=j?3:192<=j?2:1;m[254]=m[254]=1;function x(){g.call(this,"utf-8 decode"),this.leftOver=null}function b(){g.call(this,"utf-8 encode")}u.utf8encode=function(y){return f.nodebuffer?p.newBufferFrom(y,"utf-8"):(function(O){var N,_,w,C,A,H=O.length,D=0;for(C=0;C<H;C++)(64512&(_=O.charCodeAt(C)))==55296&&C+1<H&&(64512&(w=O.charCodeAt(C+1)))==56320&&(_=65536+(_-55296<<10)+(w-56320),C++),D+=_<128?1:_<2048?2:_<65536?3:4;for(N=f.uint8array?new Uint8Array(D):new Array(D),C=A=0;A<D;C++)(64512&(_=O.charCodeAt(C)))==55296&&C+1<H&&(64512&(w=O.charCodeAt(C+1)))==56320&&(_=65536+(_-55296<<10)+(w-56320),C++),_<128?N[A++]=_:(_<2048?N[A++]=192|_>>>6:(_<65536?N[A++]=224|_>>>12:(N[A++]=240|_>>>18,N[A++]=128|_>>>12&63),N[A++]=128|_>>>6&63),N[A++]=128|63&_);return N})(y)},u.utf8decode=function(y){return f.nodebuffer?h.transformTo("nodebuffer",y).toString("utf-8"):(function(O){var N,_,w,C,A=O.length,H=new Array(2*A);for(N=_=0;N<A;)if((w=O[N++])<128)H[_++]=w;else if(4<(C=m[w]))H[_++]=65533,N+=C-1;else{for(w&=C===2?31:C===3?15:7;1<C&&N<A;)w=w<<6|63&O[N++],C--;1<C?H[_++]=65533:w<65536?H[_++]=w:(w-=65536,H[_++]=55296|w>>10&1023,H[_++]=56320|1023&w)}return H.length!==_&&(H.subarray?H=H.subarray(0,_):H.length=_),h.applyFromCharCode(H)})(y=h.transformTo(f.uint8array?"uint8array":"array",y))},h.inherits(x,g),x.prototype.processChunk=function(y){var O=h.transformTo(f.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var N=O;(O=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),O.set(N,this.leftOver.length)}else O=this.leftOver.concat(O);this.leftOver=null}var _=(function(C,A){var H;for((A=A||C.length)>C.length&&(A=C.length),H=A-1;0<=H&&(192&C[H])==128;)H--;return H<0||H===0?A:H+m[C[H]]>A?H:A})(O),w=O;_!==O.length&&(f.uint8array?(w=O.subarray(0,_),this.leftOver=O.subarray(_,O.length)):(w=O.slice(0,_),this.leftOver=O.slice(_,O.length))),this.push({data:u.utf8decode(w),meta:y.meta})},x.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=x,h.inherits(b,g),b.prototype.processChunk=function(y){this.push({data:u.utf8encode(y.data),meta:y.meta})},u.Utf8EncodeWorker=b},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,o,u){var h=s("./support"),f=s("./base64"),p=s("./nodejsUtils"),g=s("./external");function m(N){return N}function j(N,_){for(var w=0;w<N.length;++w)_[w]=255&N.charCodeAt(w);return _}s("setimmediate"),u.newBlob=function(N,_){u.checkSupport("blob");try{return new Blob([N],{type:_})}catch{try{var w=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return w.append(N),w.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var x={stringifyByChunk:function(N,_,w){var C=[],A=0,H=N.length;if(H<=w)return String.fromCharCode.apply(null,N);for(;A<H;)_==="array"||_==="nodebuffer"?C.push(String.fromCharCode.apply(null,N.slice(A,Math.min(A+w,H)))):C.push(String.fromCharCode.apply(null,N.subarray(A,Math.min(A+w,H)))),A+=w;return C.join("")},stringifyByChar:function(N){for(var _="",w=0;w<N.length;w++)_+=String.fromCharCode(N[w]);return _},applyCanBeUsed:{uint8array:(function(){try{return h.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return h.nodebuffer&&String.fromCharCode.apply(null,p.allocBuffer(1)).length===1}catch{return!1}})()}};function b(N){var _=65536,w=u.getTypeOf(N),C=!0;if(w==="uint8array"?C=x.applyCanBeUsed.uint8array:w==="nodebuffer"&&(C=x.applyCanBeUsed.nodebuffer),C)for(;1<_;)try{return x.stringifyByChunk(N,w,_)}catch{_=Math.floor(_/2)}return x.stringifyByChar(N)}function y(N,_){for(var w=0;w<N.length;w++)_[w]=N[w];return _}u.applyFromCharCode=b;var O={};O.string={string:m,array:function(N){return j(N,new Array(N.length))},arraybuffer:function(N){return O.string.uint8array(N).buffer},uint8array:function(N){return j(N,new Uint8Array(N.length))},nodebuffer:function(N){return j(N,p.allocBuffer(N.length))}},O.array={string:b,array:m,arraybuffer:function(N){return new Uint8Array(N).buffer},uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(N)}},O.arraybuffer={string:function(N){return b(new Uint8Array(N))},array:function(N){return y(new Uint8Array(N),new Array(N.byteLength))},arraybuffer:m,uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(new Uint8Array(N))}},O.uint8array={string:b,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return N.buffer},uint8array:m,nodebuffer:function(N){return p.newBufferFrom(N)}},O.nodebuffer={string:b,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return O.nodebuffer.uint8array(N).buffer},uint8array:function(N){return y(N,new Uint8Array(N.length))},nodebuffer:m},u.transformTo=function(N,_){if(_=_||"",!N)return _;u.checkSupport(N);var w=u.getTypeOf(_);return O[w][N](_)},u.resolve=function(N){for(var _=N.split("/"),w=[],C=0;C<_.length;C++){var A=_[C];A==="."||A===""&&C!==0&&C!==_.length-1||(A===".."?w.pop():w.push(A))}return w.join("/")},u.getTypeOf=function(N){return typeof N=="string"?"string":Object.prototype.toString.call(N)==="[object Array]"?"array":h.nodebuffer&&p.isBuffer(N)?"nodebuffer":h.uint8array&&N instanceof Uint8Array?"uint8array":h.arraybuffer&&N instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(N){if(!h[N.toLowerCase()])throw new Error(N+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(N){var _,w,C="";for(w=0;w<(N||"").length;w++)C+="\\x"+((_=N.charCodeAt(w))<16?"0":"")+_.toString(16).toUpperCase();return C},u.delay=function(N,_,w){setImmediate(function(){N.apply(w||null,_||[])})},u.inherits=function(N,_){function w(){}w.prototype=_.prototype,N.prototype=new w},u.extend=function(){var N,_,w={};for(N=0;N<arguments.length;N++)for(_ in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],_)&&w[_]===void 0&&(w[_]=arguments[N][_]);return w},u.prepareContent=function(N,_,w,C,A){return g.Promise.resolve(_).then(function(H){return h.blob&&(H instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(H))!==-1)&&typeof FileReader<"u"?new g.Promise(function(D,K){var G=new FileReader;G.onload=function(re){D(re.target.result)},G.onerror=function(re){K(re.target.error)},G.readAsArrayBuffer(H)}):H}).then(function(H){var D=u.getTypeOf(H);return D?(D==="arraybuffer"?H=u.transformTo("uint8array",H):D==="string"&&(A?H=f.decode(H):w&&C!==!0&&(H=(function(K){return j(K,h.uint8array?new Uint8Array(K.length):new Array(K.length))})(H))),H):g.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(s,o,u){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./signature"),g=s("./zipEntry"),m=s("./support");function j(x){this.files=[],this.loadOptions=x}j.prototype={checkSignature:function(x){if(!this.reader.readAndCheckSignature(x)){this.reader.index-=4;var b=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(b)+", expected "+f.pretty(x)+")")}},isSignature:function(x,b){var y=this.reader.index;this.reader.setIndex(x);var O=this.reader.readString(4)===b;return this.reader.setIndex(y),O},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 x=this.reader.readData(this.zipCommentLength),b=m.uint8array?"uint8array":"array",y=f.transformTo(b,x);this.zipComment=this.loadOptions.decodeFileName(y)},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 x,b,y,O=this.zip64EndOfCentralSize-44;0<O;)x=this.reader.readInt(2),b=this.reader.readInt(4),y=this.reader.readData(b),this.zip64ExtensibleData[x]={id:x,length:b,value:y}},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 x,b;for(x=0;x<this.files.length;x++)b=this.files[x],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(p.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var x;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(p.CENTRAL_FILE_HEADER);)(x=new g({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(x);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 x=this.reader.lastIndexOfSignature(p.CENTRAL_DIRECTORY_END);if(x<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(x);var b=x;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,(x=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(x),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 y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var O=b-y;if(0<O)this.isSignature(b,p.CENTRAL_FILE_HEADER)||(this.reader.zero=O);else if(O<0)throw new Error("Corrupted zip: missing "+Math.abs(O)+" bytes.")},prepareReader:function(x){this.reader=h(x)},load:function(x){this.prepareReader(x),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=j},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,o,u){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./compressedObject"),g=s("./crc32"),m=s("./utf8"),j=s("./compressions"),x=s("./support");function b(y,O){this.options=y,this.loadOptions=O}b.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var O,N;if(y.skip(22),this.fileNameLength=y.readInt(2),N=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.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((O=(function(_){for(var w in j)if(Object.prototype.hasOwnProperty.call(j,w)&&j[w].magic===_)return j[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,O,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var O=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(O),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=h(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var O,N,_,w=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<w;)O=y.readInt(2),N=y.readInt(2),_=y.readData(N),this.extraFields[O]={id:O,length:N,value:_};y.setIndex(w)},handleUTF8:function(){var y=x.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=m.utf8decode(this.fileName),this.fileCommentStr=m.utf8decode(this.fileComment);else{var O=this.findExtraFieldUnicodePath();if(O!==null)this.fileNameStr=O;else{var N=f.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(N)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var w=f.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(w)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var O=h(y.value);return O.readInt(1)!==1||g(this.fileName)!==O.readInt(4)?null:m.utf8decode(O.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var O=h(y.value);return O.readInt(1)!==1||g(this.fileComment)!==O.readInt(4)?null:m.utf8decode(O.readData(y.length-5))}return null}},o.exports=b},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,o,u){function h(O,N,_){this.name=O,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=N,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var f=s("./stream/StreamHelper"),p=s("./stream/DataWorker"),g=s("./utf8"),m=s("./compressedObject"),j=s("./stream/GenericWorker");h.prototype={internalStream:function(O){var N=null,_="string";try{if(!O)throw new Error("No output type specified.");var w=(_=O.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),N=this._decompressWorker();var C=!this._dataBinary;C&&!w&&(N=N.pipe(new g.Utf8EncodeWorker)),!C&&w&&(N=N.pipe(new g.Utf8DecodeWorker))}catch(A){(N=new j("error")).error(A)}return new f(N,_,"")},async:function(O,N){return this.internalStream(O).accumulate(N)},nodeStream:function(O,N){return this.internalStream(O||"nodebuffer").toNodejsStream(N)},_compressWorker:function(O,N){if(this._data instanceof m&&this._data.compression.magic===O.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new g.Utf8EncodeWorker)),m.createWorkerFrom(_,O,N)},_decompressWorker:function(){return this._data instanceof m?this._data.getContentWorker():this._data instanceof j?this._data:new p(this._data)}};for(var x=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],b=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<x.length;y++)h.prototype[x[y]]=b;o.exports=h},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,o,u){(function(h){var f,p,g=h.MutationObserver||h.WebKitMutationObserver;if(g){var m=0,j=new g(O),x=h.document.createTextNode("");j.observe(x,{characterData:!0}),f=function(){x.data=m=++m%2}}else if(h.setImmediate||h.MessageChannel===void 0)f="document"in h&&"onreadystatechange"in h.document.createElement("script")?function(){var N=h.document.createElement("script");N.onreadystatechange=function(){O(),N.onreadystatechange=null,N.parentNode.removeChild(N),N=null},h.document.documentElement.appendChild(N)}:function(){setTimeout(O,0)};else{var b=new h.MessageChannel;b.port1.onmessage=O,f=function(){b.port2.postMessage(0)}}var y=[];function O(){var N,_;p=!0;for(var w=y.length;w;){for(_=y,y=[],N=-1;++N<w;)_[N]();w=y.length}p=!1}o.exports=function(N){y.push(N)!==1||p||f()}}).call(this,typeof Is<"u"?Is:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,o,u){var h=s("immediate");function f(){}var p={},g=["REJECTED"],m=["FULFILLED"],j=["PENDING"];function x(w){if(typeof w!="function")throw new TypeError("resolver must be a function");this.state=j,this.queue=[],this.outcome=void 0,w!==f&&N(this,w)}function b(w,C,A){this.promise=w,typeof C=="function"&&(this.onFulfilled=C,this.callFulfilled=this.otherCallFulfilled),typeof A=="function"&&(this.onRejected=A,this.callRejected=this.otherCallRejected)}function y(w,C,A){h(function(){var H;try{H=C(A)}catch(D){return p.reject(w,D)}H===w?p.reject(w,new TypeError("Cannot resolve promise with itself")):p.resolve(w,H)})}function O(w){var C=w&&w.then;if(w&&(typeof w=="object"||typeof w=="function")&&typeof C=="function")return function(){C.apply(w,arguments)}}function N(w,C){var A=!1;function H(G){A||(A=!0,p.reject(w,G))}function D(G){A||(A=!0,p.resolve(w,G))}var K=_(function(){C(D,H)});K.status==="error"&&H(K.value)}function _(w,C){var A={};try{A.value=w(C),A.status="success"}catch(H){A.status="error",A.value=H}return A}(o.exports=x).prototype.finally=function(w){if(typeof w!="function")return this;var C=this.constructor;return this.then(function(A){return C.resolve(w()).then(function(){return A})},function(A){return C.resolve(w()).then(function(){throw A})})},x.prototype.catch=function(w){return this.then(null,w)},x.prototype.then=function(w,C){if(typeof w!="function"&&this.state===m||typeof C!="function"&&this.state===g)return this;var A=new this.constructor(f);return this.state!==j?y(A,this.state===m?w:C,this.outcome):this.queue.push(new b(A,w,C)),A},b.prototype.callFulfilled=function(w){p.resolve(this.promise,w)},b.prototype.otherCallFulfilled=function(w){y(this.promise,this.onFulfilled,w)},b.prototype.callRejected=function(w){p.reject(this.promise,w)},b.prototype.otherCallRejected=function(w){y(this.promise,this.onRejected,w)},p.resolve=function(w,C){var A=_(O,C);if(A.status==="error")return p.reject(w,A.value);var H=A.value;if(H)N(w,H);else{w.state=m,w.outcome=C;for(var D=-1,K=w.queue.length;++D<K;)w.queue[D].callFulfilled(C)}return w},p.reject=function(w,C){w.state=g,w.outcome=C;for(var A=-1,H=w.queue.length;++A<H;)w.queue[A].callRejected(C);return w},x.resolve=function(w){return w instanceof this?w:p.resolve(new this(f),w)},x.reject=function(w){var C=new this(f);return p.reject(C,w)},x.all=function(w){var C=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=w.length,H=!1;if(!A)return this.resolve([]);for(var D=new Array(A),K=0,G=-1,re=new this(f);++G<A;)$(w[G],G);return re;function $(F,ne){C.resolve(F).then(function(M){D[ne]=M,++K!==A||H||(H=!0,p.resolve(re,D))},function(M){H||(H=!0,p.reject(re,M))})}},x.race=function(w){var C=this;if(Object.prototype.toString.call(w)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=w.length,H=!1;if(!A)return this.resolve([]);for(var D=-1,K=new this(f);++D<A;)G=w[D],C.resolve(G).then(function(re){H||(H=!0,p.resolve(K,re))},function(re){H||(H=!0,p.reject(K,re))});var G;return K}},{immediate:36}],38:[function(s,o,u){var h={};(0,s("./lib/utils/common").assign)(h,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),o.exports=h},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,o,u){var h=s("./zlib/deflate"),f=s("./utils/common"),p=s("./utils/strings"),g=s("./zlib/messages"),m=s("./zlib/zstream"),j=Object.prototype.toString,x=0,b=-1,y=0,O=8;function N(w){if(!(this instanceof N))return new N(w);this.options=f.assign({level:b,method:O,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},w||{});var C=this.options;C.raw&&0<C.windowBits?C.windowBits=-C.windowBits:C.gzip&&0<C.windowBits&&C.windowBits<16&&(C.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var A=h.deflateInit2(this.strm,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(A!==x)throw new Error(g[A]);if(C.header&&h.deflateSetHeader(this.strm,C.header),C.dictionary){var H;if(H=typeof C.dictionary=="string"?p.string2buf(C.dictionary):j.call(C.dictionary)==="[object ArrayBuffer]"?new Uint8Array(C.dictionary):C.dictionary,(A=h.deflateSetDictionary(this.strm,H))!==x)throw new Error(g[A]);this._dict_set=!0}}function _(w,C){var A=new N(C);if(A.push(w,!0),A.err)throw A.msg||g[A.err];return A.result}N.prototype.push=function(w,C){var A,H,D=this.strm,K=this.options.chunkSize;if(this.ended)return!1;H=C===~~C?C:C===!0?4:0,typeof w=="string"?D.input=p.string2buf(w):j.call(w)==="[object ArrayBuffer]"?D.input=new Uint8Array(w):D.input=w,D.next_in=0,D.avail_in=D.input.length;do{if(D.avail_out===0&&(D.output=new f.Buf8(K),D.next_out=0,D.avail_out=K),(A=h.deflate(D,H))!==1&&A!==x)return this.onEnd(A),!(this.ended=!0);D.avail_out!==0&&(D.avail_in!==0||H!==4&&H!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(D.output,D.next_out))):this.onData(f.shrinkBuf(D.output,D.next_out)))}while((0<D.avail_in||D.avail_out===0)&&A!==1);return H===4?(A=h.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===x):H!==2||(this.onEnd(x),!(D.avail_out=0))},N.prototype.onData=function(w){this.chunks.push(w)},N.prototype.onEnd=function(w){w===x&&(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},u.Deflate=N,u.deflate=_,u.deflateRaw=function(w,C){return(C=C||{}).raw=!0,_(w,C)},u.gzip=function(w,C){return(C=C||{}).gzip=!0,_(w,C)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,o,u){var h=s("./zlib/inflate"),f=s("./utils/common"),p=s("./utils/strings"),g=s("./zlib/constants"),m=s("./zlib/messages"),j=s("./zlib/zstream"),x=s("./zlib/gzheader"),b=Object.prototype.toString;function y(N){if(!(this instanceof y))return new y(N);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},N||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||N&&N.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&(15&_.windowBits)==0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new j,this.strm.avail_out=0;var w=h.inflateInit2(this.strm,_.windowBits);if(w!==g.Z_OK)throw new Error(m[w]);this.header=new x,h.inflateGetHeader(this.strm,this.header)}function O(N,_){var w=new y(_);if(w.push(N,!0),w.err)throw w.msg||m[w.err];return w.result}y.prototype.push=function(N,_){var w,C,A,H,D,K,G=this.strm,re=this.options.chunkSize,$=this.options.dictionary,F=!1;if(this.ended)return!1;C=_===~~_?_:_===!0?g.Z_FINISH:g.Z_NO_FLUSH,typeof N=="string"?G.input=p.binstring2buf(N):b.call(N)==="[object ArrayBuffer]"?G.input=new Uint8Array(N):G.input=N,G.next_in=0,G.avail_in=G.input.length;do{if(G.avail_out===0&&(G.output=new f.Buf8(re),G.next_out=0,G.avail_out=re),(w=h.inflate(G,g.Z_NO_FLUSH))===g.Z_NEED_DICT&&$&&(K=typeof $=="string"?p.string2buf($):b.call($)==="[object ArrayBuffer]"?new Uint8Array($):$,w=h.inflateSetDictionary(this.strm,K)),w===g.Z_BUF_ERROR&&F===!0&&(w=g.Z_OK,F=!1),w!==g.Z_STREAM_END&&w!==g.Z_OK)return this.onEnd(w),!(this.ended=!0);G.next_out&&(G.avail_out!==0&&w!==g.Z_STREAM_END&&(G.avail_in!==0||C!==g.Z_FINISH&&C!==g.Z_SYNC_FLUSH)||(this.options.to==="string"?(A=p.utf8border(G.output,G.next_out),H=G.next_out-A,D=p.buf2string(G.output,A),G.next_out=H,G.avail_out=re-H,H&&f.arraySet(G.output,G.output,A,H,0),this.onData(D)):this.onData(f.shrinkBuf(G.output,G.next_out)))),G.avail_in===0&&G.avail_out===0&&(F=!0)}while((0<G.avail_in||G.avail_out===0)&&w!==g.Z_STREAM_END);return w===g.Z_STREAM_END&&(C=g.Z_FINISH),C===g.Z_FINISH?(w=h.inflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===g.Z_OK):C!==g.Z_SYNC_FLUSH||(this.onEnd(g.Z_OK),!(G.avail_out=0))},y.prototype.onData=function(N){this.chunks.push(N)},y.prototype.onEnd=function(N){N===g.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},u.Inflate=y,u.inflate=O,u.inflateRaw=function(N,_){return(_=_||{}).raw=!0,O(N,_)},u.ungzip=O},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,o,u){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(g){for(var m=Array.prototype.slice.call(arguments,1);m.length;){var j=m.shift();if(j){if(typeof j!="object")throw new TypeError(j+"must be non-object");for(var x in j)j.hasOwnProperty(x)&&(g[x]=j[x])}}return g},u.shrinkBuf=function(g,m){return g.length===m?g:g.subarray?g.subarray(0,m):(g.length=m,g)};var f={arraySet:function(g,m,j,x,b){if(m.subarray&&g.subarray)g.set(m.subarray(j,j+x),b);else for(var y=0;y<x;y++)g[b+y]=m[j+y]},flattenChunks:function(g){var m,j,x,b,y,O;for(m=x=0,j=g.length;m<j;m++)x+=g[m].length;for(O=new Uint8Array(x),m=b=0,j=g.length;m<j;m++)y=g[m],O.set(y,b),b+=y.length;return O}},p={arraySet:function(g,m,j,x,b){for(var y=0;y<x;y++)g[b+y]=m[j+y]},flattenChunks:function(g){return[].concat.apply([],g)}};u.setTyped=function(g){g?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,f)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,p))},u.setTyped(h)},{}],42:[function(s,o,u){var h=s("./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 g=new h.Buf8(256),m=0;m<256;m++)g[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;function j(x,b){if(b<65537&&(x.subarray&&p||!x.subarray&&f))return String.fromCharCode.apply(null,h.shrinkBuf(x,b));for(var y="",O=0;O<b;O++)y+=String.fromCharCode(x[O]);return y}g[254]=g[254]=1,u.string2buf=function(x){var b,y,O,N,_,w=x.length,C=0;for(N=0;N<w;N++)(64512&(y=x.charCodeAt(N)))==55296&&N+1<w&&(64512&(O=x.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(O-56320),N++),C+=y<128?1:y<2048?2:y<65536?3:4;for(b=new h.Buf8(C),N=_=0;_<C;N++)(64512&(y=x.charCodeAt(N)))==55296&&N+1<w&&(64512&(O=x.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(O-56320),N++),y<128?b[_++]=y:(y<2048?b[_++]=192|y>>>6:(y<65536?b[_++]=224|y>>>12:(b[_++]=240|y>>>18,b[_++]=128|y>>>12&63),b[_++]=128|y>>>6&63),b[_++]=128|63&y);return b},u.buf2binstring=function(x){return j(x,x.length)},u.binstring2buf=function(x){for(var b=new h.Buf8(x.length),y=0,O=b.length;y<O;y++)b[y]=x.charCodeAt(y);return b},u.buf2string=function(x,b){var y,O,N,_,w=b||x.length,C=new Array(2*w);for(y=O=0;y<w;)if((N=x[y++])<128)C[O++]=N;else if(4<(_=g[N]))C[O++]=65533,y+=_-1;else{for(N&=_===2?31:_===3?15:7;1<_&&y<w;)N=N<<6|63&x[y++],_--;1<_?C[O++]=65533:N<65536?C[O++]=N:(N-=65536,C[O++]=55296|N>>10&1023,C[O++]=56320|1023&N)}return j(C,O)},u.utf8border=function(x,b){var y;for((b=b||x.length)>x.length&&(b=x.length),y=b-1;0<=y&&(192&x[y])==128;)y--;return y<0||y===0?b:y+g[x[y]]>b?y:b}},{"./common":41}],43:[function(s,o,u){o.exports=function(h,f,p,g){for(var m=65535&h|0,j=h>>>16&65535|0,x=0;p!==0;){for(p-=x=2e3<p?2e3:p;j=j+(m=m+f[g++]|0)|0,--x;);m%=65521,j%=65521}return m|j<<16|0}},{}],44:[function(s,o,u){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(s,o,u){var h=(function(){for(var f,p=[],g=0;g<256;g++){f=g;for(var m=0;m<8;m++)f=1&f?3988292384^f>>>1:f>>>1;p[g]=f}return p})();o.exports=function(f,p,g,m){var j=h,x=m+g;f^=-1;for(var b=m;b<x;b++)f=f>>>8^j[255&(f^p[b])];return-1^f}},{}],46:[function(s,o,u){var h,f=s("../utils/common"),p=s("./trees"),g=s("./adler32"),m=s("./crc32"),j=s("./messages"),x=0,b=4,y=0,O=-2,N=-1,_=4,w=2,C=8,A=9,H=286,D=30,K=19,G=2*H+1,re=15,$=3,F=258,ne=F+$+1,M=42,q=113,T=1,Z=2,V=3,P=4;function X(E,W){return E.msg=j[W],W}function k(E){return(E<<1)-(4<E?9:0)}function Y(E){for(var W=E.length;0<=--W;)E[W]=0}function v(E){var W=E.state,ie=W.pending;ie>E.avail_out&&(ie=E.avail_out),ie!==0&&(f.arraySet(E.output,W.pending_buf,W.pending_out,ie,E.next_out),E.next_out+=ie,W.pending_out+=ie,E.total_out+=ie,E.avail_out-=ie,W.pending-=ie,W.pending===0&&(W.pending_out=0))}function R(E,W){p._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,W),E.block_start=E.strstart,v(E.strm)}function B(E,W){E.pending_buf[E.pending++]=W}function J(E,W){E.pending_buf[E.pending++]=W>>>8&255,E.pending_buf[E.pending++]=255&W}function se(E,W){var ie,L,U=E.max_chain_length,ee=E.strstart,me=E.prev_length,he=E.nice_match,le=E.strstart>E.w_size-ne?E.strstart-(E.w_size-ne):0,Se=E.window,we=E.w_mask,xe=E.prev,Ce=E.strstart+F,Be=Se[ee+me-1],De=Se[ee+me];E.prev_length>=E.good_match&&(U>>=2),he>E.lookahead&&(he=E.lookahead);do if(Se[(ie=W)+me]===De&&Se[ie+me-1]===Be&&Se[ie]===Se[ee]&&Se[++ie]===Se[ee+1]){ee+=2,ie++;do;while(Se[++ee]===Se[++ie]&&Se[++ee]===Se[++ie]&&Se[++ee]===Se[++ie]&&Se[++ee]===Se[++ie]&&Se[++ee]===Se[++ie]&&Se[++ee]===Se[++ie]&&Se[++ee]===Se[++ie]&&Se[++ee]===Se[++ie]&&ee<Ce);if(L=F-(Ce-ee),ee=Ce-F,me<L){if(E.match_start=W,he<=(me=L))break;Be=Se[ee+me-1],De=Se[ee+me]}}while((W=xe[W&we])>le&&--U!=0);return me<=E.lookahead?me:E.lookahead}function ge(E){var W,ie,L,U,ee,me,he,le,Se,we,xe=E.w_size;do{if(U=E.window_size-E.lookahead-E.strstart,E.strstart>=xe+(xe-ne)){for(f.arraySet(E.window,E.window,xe,xe,0),E.match_start-=xe,E.strstart-=xe,E.block_start-=xe,W=ie=E.hash_size;L=E.head[--W],E.head[W]=xe<=L?L-xe:0,--ie;);for(W=ie=xe;L=E.prev[--W],E.prev[W]=xe<=L?L-xe:0,--ie;);U+=xe}if(E.strm.avail_in===0)break;if(me=E.strm,he=E.window,le=E.strstart+E.lookahead,Se=U,we=void 0,we=me.avail_in,Se<we&&(we=Se),ie=we===0?0:(me.avail_in-=we,f.arraySet(he,me.input,me.next_in,we,le),me.state.wrap===1?me.adler=g(me.adler,he,we,le):me.state.wrap===2&&(me.adler=m(me.adler,he,we,le)),me.next_in+=we,me.total_in+=we,we),E.lookahead+=ie,E.lookahead+E.insert>=$)for(ee=E.strstart-E.insert,E.ins_h=E.window[ee],E.ins_h=(E.ins_h<<E.hash_shift^E.window[ee+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[ee+$-1])&E.hash_mask,E.prev[ee&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=ee,ee++,E.insert--,!(E.lookahead+E.insert<$)););}while(E.lookahead<ne&&E.strm.avail_in!==0)}function Ne(E,W){for(var ie,L;;){if(E.lookahead<ne){if(ge(E),E.lookahead<ne&&W===x)return T;if(E.lookahead===0)break}if(ie=0,E.lookahead>=$&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+$-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),ie!==0&&E.strstart-ie<=E.w_size-ne&&(E.match_length=se(E,ie)),E.match_length>=$)if(L=p._tr_tally(E,E.strstart-E.match_start,E.match_length-$),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=$){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+$-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else L=p._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(L&&(R(E,!1),E.strm.avail_out===0))return T}return E.insert=E.strstart<$-1?E.strstart:$-1,W===b?(R(E,!0),E.strm.avail_out===0?V:P):E.last_lit&&(R(E,!1),E.strm.avail_out===0)?T:Z}function _e(E,W){for(var ie,L,U;;){if(E.lookahead<ne){if(ge(E),E.lookahead<ne&&W===x)return T;if(E.lookahead===0)break}if(ie=0,E.lookahead>=$&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+$-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=$-1,ie!==0&&E.prev_length<E.max_lazy_match&&E.strstart-ie<=E.w_size-ne&&(E.match_length=se(E,ie),E.match_length<=5&&(E.strategy===1||E.match_length===$&&4096<E.strstart-E.match_start)&&(E.match_length=$-1)),E.prev_length>=$&&E.match_length<=E.prev_length){for(U=E.strstart+E.lookahead-$,L=p._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-$),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=U&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+$-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=$-1,E.strstart++,L&&(R(E,!1),E.strm.avail_out===0))return T}else if(E.match_available){if((L=p._tr_tally(E,0,E.window[E.strstart-1]))&&R(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return T}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(L=p._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<$-1?E.strstart:$-1,W===b?(R(E,!0),E.strm.avail_out===0?V:P):E.last_lit&&(R(E,!1),E.strm.avail_out===0)?T:Z}function ae(E,W,ie,L,U){this.good_length=E,this.max_lazy=W,this.nice_length=ie,this.max_chain=L,this.func=U}function je(){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=C,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*G),this.dyn_dtree=new f.Buf16(2*(2*D+1)),this.bl_tree=new f.Buf16(2*(2*K+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(re+1),this.heap=new f.Buf16(2*H+1),Y(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*H+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 Te(E){var W;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=w,(W=E.state).pending=0,W.pending_out=0,W.wrap<0&&(W.wrap=-W.wrap),W.status=W.wrap?M:q,E.adler=W.wrap===2?0:1,W.last_flush=x,p._tr_init(W),y):X(E,O)}function Ge(E){var W=Te(E);return W===y&&(function(ie){ie.window_size=2*ie.w_size,Y(ie.head),ie.max_lazy_match=h[ie.level].max_lazy,ie.good_match=h[ie.level].good_length,ie.nice_match=h[ie.level].nice_length,ie.max_chain_length=h[ie.level].max_chain,ie.strstart=0,ie.block_start=0,ie.lookahead=0,ie.insert=0,ie.match_length=ie.prev_length=$-1,ie.match_available=0,ie.ins_h=0})(E.state),W}function Me(E,W,ie,L,U,ee){if(!E)return O;var me=1;if(W===N&&(W=6),L<0?(me=0,L=-L):15<L&&(me=2,L-=16),U<1||A<U||ie!==C||L<8||15<L||W<0||9<W||ee<0||_<ee)return X(E,O);L===8&&(L=9);var he=new je;return(E.state=he).strm=E,he.wrap=me,he.gzhead=null,he.w_bits=L,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=U+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+$-1)/$),he.window=new f.Buf8(2*he.w_size),he.head=new f.Buf16(he.hash_size),he.prev=new f.Buf16(he.w_size),he.lit_bufsize=1<<U+6,he.pending_buf_size=4*he.lit_bufsize,he.pending_buf=new f.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=W,he.strategy=ee,he.method=ie,Ge(E)}h=[new ae(0,0,0,0,function(E,W){var ie=65535;for(ie>E.pending_buf_size-5&&(ie=E.pending_buf_size-5);;){if(E.lookahead<=1){if(ge(E),E.lookahead===0&&W===x)return T;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var L=E.block_start+ie;if((E.strstart===0||E.strstart>=L)&&(E.lookahead=E.strstart-L,E.strstart=L,R(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-ne&&(R(E,!1),E.strm.avail_out===0))return T}return E.insert=0,W===b?(R(E,!0),E.strm.avail_out===0?V:P):(E.strstart>E.block_start&&(R(E,!1),E.strm.avail_out),T)}),new ae(4,4,8,4,Ne),new ae(4,5,16,8,Ne),new ae(4,6,32,32,Ne),new ae(4,4,16,16,_e),new ae(8,16,32,32,_e),new ae(8,16,128,128,_e),new ae(8,32,128,256,_e),new ae(32,128,258,1024,_e),new ae(32,258,258,4096,_e)],u.deflateInit=function(E,W){return Me(E,W,C,15,8,0)},u.deflateInit2=Me,u.deflateReset=Ge,u.deflateResetKeep=Te,u.deflateSetHeader=function(E,W){return E&&E.state?E.state.wrap!==2?O:(E.state.gzhead=W,y):O},u.deflate=function(E,W){var ie,L,U,ee;if(!E||!E.state||5<W||W<0)return E?X(E,O):O;if(L=E.state,!E.output||!E.input&&E.avail_in!==0||L.status===666&&W!==b)return X(E,E.avail_out===0?-5:O);if(L.strm=E,ie=L.last_flush,L.last_flush=W,L.status===M)if(L.wrap===2)E.adler=0,B(L,31),B(L,139),B(L,8),L.gzhead?(B(L,(L.gzhead.text?1:0)+(L.gzhead.hcrc?2:0)+(L.gzhead.extra?4:0)+(L.gzhead.name?8:0)+(L.gzhead.comment?16:0)),B(L,255&L.gzhead.time),B(L,L.gzhead.time>>8&255),B(L,L.gzhead.time>>16&255),B(L,L.gzhead.time>>24&255),B(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),B(L,255&L.gzhead.os),L.gzhead.extra&&L.gzhead.extra.length&&(B(L,255&L.gzhead.extra.length),B(L,L.gzhead.extra.length>>8&255)),L.gzhead.hcrc&&(E.adler=m(E.adler,L.pending_buf,L.pending,0)),L.gzindex=0,L.status=69):(B(L,0),B(L,0),B(L,0),B(L,0),B(L,0),B(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),B(L,3),L.status=q);else{var me=C+(L.w_bits-8<<4)<<8;me|=(2<=L.strategy||L.level<2?0:L.level<6?1:L.level===6?2:3)<<6,L.strstart!==0&&(me|=32),me+=31-me%31,L.status=q,J(L,me),L.strstart!==0&&(J(L,E.adler>>>16),J(L,65535&E.adler)),E.adler=1}if(L.status===69)if(L.gzhead.extra){for(U=L.pending;L.gzindex<(65535&L.gzhead.extra.length)&&(L.pending!==L.pending_buf_size||(L.gzhead.hcrc&&L.pending>U&&(E.adler=m(E.adler,L.pending_buf,L.pending-U,U)),v(E),U=L.pending,L.pending!==L.pending_buf_size));)B(L,255&L.gzhead.extra[L.gzindex]),L.gzindex++;L.gzhead.hcrc&&L.pending>U&&(E.adler=m(E.adler,L.pending_buf,L.pending-U,U)),L.gzindex===L.gzhead.extra.length&&(L.gzindex=0,L.status=73)}else L.status=73;if(L.status===73)if(L.gzhead.name){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(E.adler=m(E.adler,L.pending_buf,L.pending-U,U)),v(E),U=L.pending,L.pending===L.pending_buf_size)){ee=1;break}ee=L.gzindex<L.gzhead.name.length?255&L.gzhead.name.charCodeAt(L.gzindex++):0,B(L,ee)}while(ee!==0);L.gzhead.hcrc&&L.pending>U&&(E.adler=m(E.adler,L.pending_buf,L.pending-U,U)),ee===0&&(L.gzindex=0,L.status=91)}else L.status=91;if(L.status===91)if(L.gzhead.comment){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(E.adler=m(E.adler,L.pending_buf,L.pending-U,U)),v(E),U=L.pending,L.pending===L.pending_buf_size)){ee=1;break}ee=L.gzindex<L.gzhead.comment.length?255&L.gzhead.comment.charCodeAt(L.gzindex++):0,B(L,ee)}while(ee!==0);L.gzhead.hcrc&&L.pending>U&&(E.adler=m(E.adler,L.pending_buf,L.pending-U,U)),ee===0&&(L.status=103)}else L.status=103;if(L.status===103&&(L.gzhead.hcrc?(L.pending+2>L.pending_buf_size&&v(E),L.pending+2<=L.pending_buf_size&&(B(L,255&E.adler),B(L,E.adler>>8&255),E.adler=0,L.status=q)):L.status=q),L.pending!==0){if(v(E),E.avail_out===0)return L.last_flush=-1,y}else if(E.avail_in===0&&k(W)<=k(ie)&&W!==b)return X(E,-5);if(L.status===666&&E.avail_in!==0)return X(E,-5);if(E.avail_in!==0||L.lookahead!==0||W!==x&&L.status!==666){var he=L.strategy===2?(function(le,Se){for(var we;;){if(le.lookahead===0&&(ge(le),le.lookahead===0)){if(Se===x)return T;break}if(le.match_length=0,we=p._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++,we&&(R(le,!1),le.strm.avail_out===0))return T}return le.insert=0,Se===b?(R(le,!0),le.strm.avail_out===0?V:P):le.last_lit&&(R(le,!1),le.strm.avail_out===0)?T:Z})(L,W):L.strategy===3?(function(le,Se){for(var we,xe,Ce,Be,De=le.window;;){if(le.lookahead<=F){if(ge(le),le.lookahead<=F&&Se===x)return T;if(le.lookahead===0)break}if(le.match_length=0,le.lookahead>=$&&0<le.strstart&&(xe=De[Ce=le.strstart-1])===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]){Be=le.strstart+F;do;while(xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&Ce<Be);le.match_length=F-(Be-Ce),le.match_length>le.lookahead&&(le.match_length=le.lookahead)}if(le.match_length>=$?(we=p._tr_tally(le,1,le.match_length-$),le.lookahead-=le.match_length,le.strstart+=le.match_length,le.match_length=0):(we=p._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++),we&&(R(le,!1),le.strm.avail_out===0))return T}return le.insert=0,Se===b?(R(le,!0),le.strm.avail_out===0?V:P):le.last_lit&&(R(le,!1),le.strm.avail_out===0)?T:Z})(L,W):h[L.level].func(L,W);if(he!==V&&he!==P||(L.status=666),he===T||he===V)return E.avail_out===0&&(L.last_flush=-1),y;if(he===Z&&(W===1?p._tr_align(L):W!==5&&(p._tr_stored_block(L,0,0,!1),W===3&&(Y(L.head),L.lookahead===0&&(L.strstart=0,L.block_start=0,L.insert=0))),v(E),E.avail_out===0))return L.last_flush=-1,y}return W!==b?y:L.wrap<=0?1:(L.wrap===2?(B(L,255&E.adler),B(L,E.adler>>8&255),B(L,E.adler>>16&255),B(L,E.adler>>24&255),B(L,255&E.total_in),B(L,E.total_in>>8&255),B(L,E.total_in>>16&255),B(L,E.total_in>>24&255)):(J(L,E.adler>>>16),J(L,65535&E.adler)),v(E),0<L.wrap&&(L.wrap=-L.wrap),L.pending!==0?y:1)},u.deflateEnd=function(E){var W;return E&&E.state?(W=E.state.status)!==M&&W!==69&&W!==73&&W!==91&&W!==103&&W!==q&&W!==666?X(E,O):(E.state=null,W===q?X(E,-3):y):O},u.deflateSetDictionary=function(E,W){var ie,L,U,ee,me,he,le,Se,we=W.length;if(!E||!E.state||(ee=(ie=E.state).wrap)===2||ee===1&&ie.status!==M||ie.lookahead)return O;for(ee===1&&(E.adler=g(E.adler,W,we,0)),ie.wrap=0,we>=ie.w_size&&(ee===0&&(Y(ie.head),ie.strstart=0,ie.block_start=0,ie.insert=0),Se=new f.Buf8(ie.w_size),f.arraySet(Se,W,we-ie.w_size,ie.w_size,0),W=Se,we=ie.w_size),me=E.avail_in,he=E.next_in,le=E.input,E.avail_in=we,E.next_in=0,E.input=W,ge(ie);ie.lookahead>=$;){for(L=ie.strstart,U=ie.lookahead-($-1);ie.ins_h=(ie.ins_h<<ie.hash_shift^ie.window[L+$-1])&ie.hash_mask,ie.prev[L&ie.w_mask]=ie.head[ie.ins_h],ie.head[ie.ins_h]=L,L++,--U;);ie.strstart=L,ie.lookahead=$-1,ge(ie)}return ie.strstart+=ie.lookahead,ie.block_start=ie.strstart,ie.insert=ie.lookahead,ie.lookahead=0,ie.match_length=ie.prev_length=$-1,ie.match_available=0,E.next_in=he,E.input=le,E.avail_in=me,ie.wrap=ee,y},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,o,u){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(s,o,u){o.exports=function(h,f){var p,g,m,j,x,b,y,O,N,_,w,C,A,H,D,K,G,re,$,F,ne,M,q,T,Z;p=h.state,g=h.next_in,T=h.input,m=g+(h.avail_in-5),j=h.next_out,Z=h.output,x=j-(f-h.avail_out),b=j+(h.avail_out-257),y=p.dmax,O=p.wsize,N=p.whave,_=p.wnext,w=p.window,C=p.hold,A=p.bits,H=p.lencode,D=p.distcode,K=(1<<p.lenbits)-1,G=(1<<p.distbits)-1;e:do{A<15&&(C+=T[g++]<<A,A+=8,C+=T[g++]<<A,A+=8),re=H[C&K];t:for(;;){if(C>>>=$=re>>>24,A-=$,($=re>>>16&255)===0)Z[j++]=65535&re;else{if(!(16&$)){if((64&$)==0){re=H[(65535&re)+(C&(1<<$)-1)];continue t}if(32&$){p.mode=12;break e}h.msg="invalid literal/length code",p.mode=30;break e}F=65535&re,($&=15)&&(A<$&&(C+=T[g++]<<A,A+=8),F+=C&(1<<$)-1,C>>>=$,A-=$),A<15&&(C+=T[g++]<<A,A+=8,C+=T[g++]<<A,A+=8),re=D[C&G];n:for(;;){if(C>>>=$=re>>>24,A-=$,!(16&($=re>>>16&255))){if((64&$)==0){re=D[(65535&re)+(C&(1<<$)-1)];continue n}h.msg="invalid distance code",p.mode=30;break e}if(ne=65535&re,A<($&=15)&&(C+=T[g++]<<A,(A+=8)<$&&(C+=T[g++]<<A,A+=8)),y<(ne+=C&(1<<$)-1)){h.msg="invalid distance too far back",p.mode=30;break e}if(C>>>=$,A-=$,($=j-x)<ne){if(N<($=ne-$)&&p.sane){h.msg="invalid distance too far back",p.mode=30;break e}if(q=w,(M=0)===_){if(M+=O-$,$<F){for(F-=$;Z[j++]=w[M++],--$;);M=j-ne,q=Z}}else if(_<$){if(M+=O+_-$,($-=_)<F){for(F-=$;Z[j++]=w[M++],--$;);if(M=0,_<F){for(F-=$=_;Z[j++]=w[M++],--$;);M=j-ne,q=Z}}}else if(M+=_-$,$<F){for(F-=$;Z[j++]=w[M++],--$;);M=j-ne,q=Z}for(;2<F;)Z[j++]=q[M++],Z[j++]=q[M++],Z[j++]=q[M++],F-=3;F&&(Z[j++]=q[M++],1<F&&(Z[j++]=q[M++]))}else{for(M=j-ne;Z[j++]=Z[M++],Z[j++]=Z[M++],Z[j++]=Z[M++],2<(F-=3););F&&(Z[j++]=Z[M++],1<F&&(Z[j++]=Z[M++]))}break}}break}}while(g<m&&j<b);g-=F=A>>3,C&=(1<<(A-=F<<3))-1,h.next_in=g,h.next_out=j,h.avail_in=g<m?m-g+5:5-(g-m),h.avail_out=j<b?b-j+257:257-(j-b),p.hold=C,p.bits=A}},{}],49:[function(s,o,u){var h=s("../utils/common"),f=s("./adler32"),p=s("./crc32"),g=s("./inffast"),m=s("./inftrees"),j=1,x=2,b=0,y=-2,O=1,N=852,_=592;function w(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function C(){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 h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function A(M){var q;return M&&M.state?(q=M.state,M.total_in=M.total_out=q.total=0,M.msg="",q.wrap&&(M.adler=1&q.wrap),q.mode=O,q.last=0,q.havedict=0,q.dmax=32768,q.head=null,q.hold=0,q.bits=0,q.lencode=q.lendyn=new h.Buf32(N),q.distcode=q.distdyn=new h.Buf32(_),q.sane=1,q.back=-1,b):y}function H(M){var q;return M&&M.state?((q=M.state).wsize=0,q.whave=0,q.wnext=0,A(M)):y}function D(M,q){var T,Z;return M&&M.state?(Z=M.state,q<0?(T=0,q=-q):(T=1+(q>>4),q<48&&(q&=15)),q&&(q<8||15<q)?y:(Z.window!==null&&Z.wbits!==q&&(Z.window=null),Z.wrap=T,Z.wbits=q,H(M))):y}function K(M,q){var T,Z;return M?(Z=new C,(M.state=Z).window=null,(T=D(M,q))!==b&&(M.state=null),T):y}var G,re,$=!0;function F(M){if($){var q;for(G=new h.Buf32(512),re=new h.Buf32(32),q=0;q<144;)M.lens[q++]=8;for(;q<256;)M.lens[q++]=9;for(;q<280;)M.lens[q++]=7;for(;q<288;)M.lens[q++]=8;for(m(j,M.lens,0,288,G,0,M.work,{bits:9}),q=0;q<32;)M.lens[q++]=5;m(x,M.lens,0,32,re,0,M.work,{bits:5}),$=!1}M.lencode=G,M.lenbits=9,M.distcode=re,M.distbits=5}function ne(M,q,T,Z){var V,P=M.state;return P.window===null&&(P.wsize=1<<P.wbits,P.wnext=0,P.whave=0,P.window=new h.Buf8(P.wsize)),Z>=P.wsize?(h.arraySet(P.window,q,T-P.wsize,P.wsize,0),P.wnext=0,P.whave=P.wsize):(Z<(V=P.wsize-P.wnext)&&(V=Z),h.arraySet(P.window,q,T-Z,V,P.wnext),(Z-=V)?(h.arraySet(P.window,q,T-Z,Z,0),P.wnext=Z,P.whave=P.wsize):(P.wnext+=V,P.wnext===P.wsize&&(P.wnext=0),P.whave<P.wsize&&(P.whave+=V))),0}u.inflateReset=H,u.inflateReset2=D,u.inflateResetKeep=A,u.inflateInit=function(M){return K(M,15)},u.inflateInit2=K,u.inflate=function(M,q){var T,Z,V,P,X,k,Y,v,R,B,J,se,ge,Ne,_e,ae,je,Te,Ge,Me,E,W,ie,L,U=0,ee=new h.Buf8(4),me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return y;(T=M.state).mode===12&&(T.mode=13),X=M.next_out,V=M.output,Y=M.avail_out,P=M.next_in,Z=M.input,k=M.avail_in,v=T.hold,R=T.bits,B=k,J=Y,W=b;e:for(;;)switch(T.mode){case O:if(T.wrap===0){T.mode=13;break}for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(2&T.wrap&&v===35615){ee[T.check=0]=255&v,ee[1]=v>>>8&255,T.check=p(T.check,ee,2,0),R=v=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&v)<<8)+(v>>8))%31){M.msg="incorrect header check",T.mode=30;break}if((15&v)!=8){M.msg="unknown compression method",T.mode=30;break}if(R-=4,E=8+(15&(v>>>=4)),T.wbits===0)T.wbits=E;else if(E>T.wbits){M.msg="invalid window size",T.mode=30;break}T.dmax=1<<E,M.adler=T.check=1,T.mode=512&v?10:12,R=v=0;break;case 2:for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(T.flags=v,(255&T.flags)!=8){M.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){M.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=v>>8&1),512&T.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,T.check=p(T.check,ee,2,0)),R=v=0,T.mode=3;case 3:for(;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}T.head&&(T.head.time=v),512&T.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,ee[2]=v>>>16&255,ee[3]=v>>>24&255,T.check=p(T.check,ee,4,0)),R=v=0,T.mode=4;case 4:for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}T.head&&(T.head.xflags=255&v,T.head.os=v>>8),512&T.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,T.check=p(T.check,ee,2,0)),R=v=0,T.mode=5;case 5:if(1024&T.flags){for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}T.length=v,T.head&&(T.head.extra_len=v),512&T.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,T.check=p(T.check,ee,2,0)),R=v=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(k<(se=T.length)&&(se=k),se&&(T.head&&(E=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),h.arraySet(T.head.extra,Z,P,se,E)),512&T.flags&&(T.check=p(T.check,Z,se,P)),k-=se,P+=se,T.length-=se),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(k===0)break e;for(se=0;E=Z[P+se++],T.head&&E&&T.length<65536&&(T.head.name+=String.fromCharCode(E)),E&&se<k;);if(512&T.flags&&(T.check=p(T.check,Z,se,P)),k-=se,P+=se,E)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(k===0)break e;for(se=0;E=Z[P+se++],T.head&&E&&T.length<65536&&(T.head.comment+=String.fromCharCode(E)),E&&se<k;);if(512&T.flags&&(T.check=p(T.check,Z,se,P)),k-=se,P+=se,E)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(v!==(65535&T.check)){M.msg="header crc mismatch",T.mode=30;break}R=v=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),M.adler=T.check=0,T.mode=12;break;case 10:for(;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}M.adler=T.check=w(v),R=v=0,T.mode=11;case 11:if(T.havedict===0)return M.next_out=X,M.avail_out=Y,M.next_in=P,M.avail_in=k,T.hold=v,T.bits=R,2;M.adler=T.check=1,T.mode=12;case 12:if(q===5||q===6)break e;case 13:if(T.last){v>>>=7&R,R-=7&R,T.mode=27;break}for(;R<3;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}switch(T.last=1&v,R-=1,3&(v>>>=1)){case 0:T.mode=14;break;case 1:if(F(T),T.mode=20,q!==6)break;v>>>=2,R-=2;break e;case 2:T.mode=17;break;case 3:M.msg="invalid block type",T.mode=30}v>>>=2,R-=2;break;case 14:for(v>>>=7&R,R-=7&R;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if((65535&v)!=(v>>>16^65535)){M.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&v,R=v=0,T.mode=15,q===6)break e;case 15:T.mode=16;case 16:if(se=T.length){if(k<se&&(se=k),Y<se&&(se=Y),se===0)break e;h.arraySet(V,Z,P,se,X),k-=se,P+=se,Y-=se,X+=se,T.length-=se;break}T.mode=12;break;case 17:for(;R<14;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(T.nlen=257+(31&v),v>>>=5,R-=5,T.ndist=1+(31&v),v>>>=5,R-=5,T.ncode=4+(15&v),v>>>=4,R-=4,286<T.nlen||30<T.ndist){M.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(;R<3;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}T.lens[me[T.have++]]=7&v,v>>>=3,R-=3}for(;T.have<19;)T.lens[me[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,ie={bits:T.lenbits},W=m(0,T.lens,0,19,T.lencode,0,T.work,ie),T.lenbits=ie.bits,W){M.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(;ae=(U=T.lencode[v&(1<<T.lenbits)-1])>>>16&255,je=65535&U,!((_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(je<16)v>>>=_e,R-=_e,T.lens[T.have++]=je;else{if(je===16){for(L=_e+2;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(v>>>=_e,R-=_e,T.have===0){M.msg="invalid bit length repeat",T.mode=30;break}E=T.lens[T.have-1],se=3+(3&v),v>>>=2,R-=2}else if(je===17){for(L=_e+3;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}R-=_e,E=0,se=3+(7&(v>>>=_e)),v>>>=3,R-=3}else{for(L=_e+7;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}R-=_e,E=0,se=11+(127&(v>>>=_e)),v>>>=7,R-=7}if(T.have+se>T.nlen+T.ndist){M.msg="invalid bit length repeat",T.mode=30;break}for(;se--;)T.lens[T.have++]=E}}if(T.mode===30)break;if(T.lens[256]===0){M.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,ie={bits:T.lenbits},W=m(j,T.lens,0,T.nlen,T.lencode,0,T.work,ie),T.lenbits=ie.bits,W){M.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,ie={bits:T.distbits},W=m(x,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,ie),T.distbits=ie.bits,W){M.msg="invalid distances set",T.mode=30;break}if(T.mode=20,q===6)break e;case 20:T.mode=21;case 21:if(6<=k&&258<=Y){M.next_out=X,M.avail_out=Y,M.next_in=P,M.avail_in=k,T.hold=v,T.bits=R,g(M,J),X=M.next_out,V=M.output,Y=M.avail_out,P=M.next_in,Z=M.input,k=M.avail_in,v=T.hold,R=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;ae=(U=T.lencode[v&(1<<T.lenbits)-1])>>>16&255,je=65535&U,!((_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(ae&&(240&ae)==0){for(Te=_e,Ge=ae,Me=je;ae=(U=T.lencode[Me+((v&(1<<Te+Ge)-1)>>Te)])>>>16&255,je=65535&U,!(Te+(_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}v>>>=Te,R-=Te,T.back+=Te}if(v>>>=_e,R-=_e,T.back+=_e,T.length=je,ae===0){T.mode=26;break}if(32&ae){T.back=-1,T.mode=12;break}if(64&ae){M.msg="invalid literal/length code",T.mode=30;break}T.extra=15&ae,T.mode=22;case 22:if(T.extra){for(L=T.extra;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}T.length+=v&(1<<T.extra)-1,v>>>=T.extra,R-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;ae=(U=T.distcode[v&(1<<T.distbits)-1])>>>16&255,je=65535&U,!((_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if((240&ae)==0){for(Te=_e,Ge=ae,Me=je;ae=(U=T.distcode[Me+((v&(1<<Te+Ge)-1)>>Te)])>>>16&255,je=65535&U,!(Te+(_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}v>>>=Te,R-=Te,T.back+=Te}if(v>>>=_e,R-=_e,T.back+=_e,64&ae){M.msg="invalid distance code",T.mode=30;break}T.offset=je,T.extra=15&ae,T.mode=24;case 24:if(T.extra){for(L=T.extra;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}T.offset+=v&(1<<T.extra)-1,v>>>=T.extra,R-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){M.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(Y===0)break e;if(se=J-Y,T.offset>se){if((se=T.offset-se)>T.whave&&T.sane){M.msg="invalid distance too far back",T.mode=30;break}ge=se>T.wnext?(se-=T.wnext,T.wsize-se):T.wnext-se,se>T.length&&(se=T.length),Ne=T.window}else Ne=V,ge=X-T.offset,se=T.length;for(Y<se&&(se=Y),Y-=se,T.length-=se;V[X++]=Ne[ge++],--se;);T.length===0&&(T.mode=21);break;case 26:if(Y===0)break e;V[X++]=T.length,Y--,T.mode=21;break;case 27:if(T.wrap){for(;R<32;){if(k===0)break e;k--,v|=Z[P++]<<R,R+=8}if(J-=Y,M.total_out+=J,T.total+=J,J&&(M.adler=T.check=T.flags?p(T.check,V,J,X-J):f(T.check,V,J,X-J)),J=Y,(T.flags?v:w(v))!==T.check){M.msg="incorrect data check",T.mode=30;break}R=v=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(v!==(4294967295&T.total)){M.msg="incorrect length check",T.mode=30;break}R=v=0}T.mode=29;case 29:W=1;break e;case 30:W=-3;break e;case 31:return-4;default:return y}return M.next_out=X,M.avail_out=Y,M.next_in=P,M.avail_in=k,T.hold=v,T.bits=R,(T.wsize||J!==M.avail_out&&T.mode<30&&(T.mode<27||q!==4))&&ne(M,M.output,M.next_out,J-M.avail_out)?(T.mode=31,-4):(B-=M.avail_in,J-=M.avail_out,M.total_in+=B,M.total_out+=J,T.total+=J,T.wrap&&J&&(M.adler=T.check=T.flags?p(T.check,V,J,M.next_out-J):f(T.check,V,J,M.next_out-J)),M.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(B==0&&J===0||q===4)&&W===b&&(W=-5),W)},u.inflateEnd=function(M){if(!M||!M.state)return y;var q=M.state;return q.window&&(q.window=null),M.state=null,b},u.inflateGetHeader=function(M,q){var T;return M&&M.state?(2&(T=M.state).wrap)==0?y:((T.head=q).done=!1,b):y},u.inflateSetDictionary=function(M,q){var T,Z=q.length;return M&&M.state?(T=M.state).wrap!==0&&T.mode!==11?y:T.mode===11&&f(1,q,Z,0)!==T.check?-3:ne(M,q,Z,Z)?(T.mode=31,-4):(T.havedict=1,b):y},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,o,u){var h=s("../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],g=[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],m=[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(j,x,b,y,O,N,_,w){var C,A,H,D,K,G,re,$,F,ne=w.bits,M=0,q=0,T=0,Z=0,V=0,P=0,X=0,k=0,Y=0,v=0,R=null,B=0,J=new h.Buf16(16),se=new h.Buf16(16),ge=null,Ne=0;for(M=0;M<=15;M++)J[M]=0;for(q=0;q<y;q++)J[x[b+q]]++;for(V=ne,Z=15;1<=Z&&J[Z]===0;Z--);if(Z<V&&(V=Z),Z===0)return O[N++]=20971520,O[N++]=20971520,w.bits=1,0;for(T=1;T<Z&&J[T]===0;T++);for(V<T&&(V=T),M=k=1;M<=15;M++)if(k<<=1,(k-=J[M])<0)return-1;if(0<k&&(j===0||Z!==1))return-1;for(se[1]=0,M=1;M<15;M++)se[M+1]=se[M]+J[M];for(q=0;q<y;q++)x[b+q]!==0&&(_[se[x[b+q]]++]=q);if(G=j===0?(R=ge=_,19):j===1?(R=f,B-=257,ge=p,Ne-=257,256):(R=g,ge=m,-1),M=T,K=N,X=q=v=0,H=-1,D=(Y=1<<(P=V))-1,j===1&&852<Y||j===2&&592<Y)return 1;for(;;){for(re=M-X,F=_[q]<G?($=0,_[q]):_[q]>G?($=ge[Ne+_[q]],R[B+_[q]]):($=96,0),C=1<<M-X,T=A=1<<P;O[K+(v>>X)+(A-=C)]=re<<24|$<<16|F|0,A!==0;);for(C=1<<M-1;v&C;)C>>=1;if(C!==0?(v&=C-1,v+=C):v=0,q++,--J[M]==0){if(M===Z)break;M=x[b+_[q]]}if(V<M&&(v&D)!==H){for(X===0&&(X=V),K+=T,k=1<<(P=M-X);P+X<Z&&!((k-=J[P+X])<=0);)P++,k<<=1;if(Y+=1<<P,j===1&&852<Y||j===2&&592<Y)return 1;O[H=v&D]=V<<24|P<<16|K-N|0}}return v!==0&&(O[K+v]=M-X<<24|64<<16|0),w.bits=V,0}},{"../utils/common":41}],51:[function(s,o,u){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(s,o,u){var h=s("../utils/common"),f=0,p=1;function g(U){for(var ee=U.length;0<=--ee;)U[ee]=0}var m=0,j=29,x=256,b=x+1+j,y=30,O=19,N=2*b+1,_=15,w=16,C=7,A=256,H=16,D=17,K=18,G=[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],re=[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],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ne=new Array(2*(b+2));g(ne);var M=new Array(2*y);g(M);var q=new Array(512);g(q);var T=new Array(256);g(T);var Z=new Array(j);g(Z);var V,P,X,k=new Array(y);function Y(U,ee,me,he,le){this.static_tree=U,this.extra_bits=ee,this.extra_base=me,this.elems=he,this.max_length=le,this.has_stree=U&&U.length}function v(U,ee){this.dyn_tree=U,this.max_code=0,this.stat_desc=ee}function R(U){return U<256?q[U]:q[256+(U>>>7)]}function B(U,ee){U.pending_buf[U.pending++]=255&ee,U.pending_buf[U.pending++]=ee>>>8&255}function J(U,ee,me){U.bi_valid>w-me?(U.bi_buf|=ee<<U.bi_valid&65535,B(U,U.bi_buf),U.bi_buf=ee>>w-U.bi_valid,U.bi_valid+=me-w):(U.bi_buf|=ee<<U.bi_valid&65535,U.bi_valid+=me)}function se(U,ee,me){J(U,me[2*ee],me[2*ee+1])}function ge(U,ee){for(var me=0;me|=1&U,U>>>=1,me<<=1,0<--ee;);return me>>>1}function Ne(U,ee,me){var he,le,Se=new Array(_+1),we=0;for(he=1;he<=_;he++)Se[he]=we=we+me[he-1]<<1;for(le=0;le<=ee;le++){var xe=U[2*le+1];xe!==0&&(U[2*le]=ge(Se[xe]++,xe))}}function _e(U){var ee;for(ee=0;ee<b;ee++)U.dyn_ltree[2*ee]=0;for(ee=0;ee<y;ee++)U.dyn_dtree[2*ee]=0;for(ee=0;ee<O;ee++)U.bl_tree[2*ee]=0;U.dyn_ltree[2*A]=1,U.opt_len=U.static_len=0,U.last_lit=U.matches=0}function ae(U){8<U.bi_valid?B(U,U.bi_buf):0<U.bi_valid&&(U.pending_buf[U.pending++]=U.bi_buf),U.bi_buf=0,U.bi_valid=0}function je(U,ee,me,he){var le=2*ee,Se=2*me;return U[le]<U[Se]||U[le]===U[Se]&&he[ee]<=he[me]}function Te(U,ee,me){for(var he=U.heap[me],le=me<<1;le<=U.heap_len&&(le<U.heap_len&&je(ee,U.heap[le+1],U.heap[le],U.depth)&&le++,!je(ee,he,U.heap[le],U.depth));)U.heap[me]=U.heap[le],me=le,le<<=1;U.heap[me]=he}function Ge(U,ee,me){var he,le,Se,we,xe=0;if(U.last_lit!==0)for(;he=U.pending_buf[U.d_buf+2*xe]<<8|U.pending_buf[U.d_buf+2*xe+1],le=U.pending_buf[U.l_buf+xe],xe++,he===0?se(U,le,ee):(se(U,(Se=T[le])+x+1,ee),(we=G[Se])!==0&&J(U,le-=Z[Se],we),se(U,Se=R(--he),me),(we=re[Se])!==0&&J(U,he-=k[Se],we)),xe<U.last_lit;);se(U,A,ee)}function Me(U,ee){var me,he,le,Se=ee.dyn_tree,we=ee.stat_desc.static_tree,xe=ee.stat_desc.has_stree,Ce=ee.stat_desc.elems,Be=-1;for(U.heap_len=0,U.heap_max=N,me=0;me<Ce;me++)Se[2*me]!==0?(U.heap[++U.heap_len]=Be=me,U.depth[me]=0):Se[2*me+1]=0;for(;U.heap_len<2;)Se[2*(le=U.heap[++U.heap_len]=Be<2?++Be:0)]=1,U.depth[le]=0,U.opt_len--,xe&&(U.static_len-=we[2*le+1]);for(ee.max_code=Be,me=U.heap_len>>1;1<=me;me--)Te(U,Se,me);for(le=Ce;me=U.heap[1],U.heap[1]=U.heap[U.heap_len--],Te(U,Se,1),he=U.heap[1],U.heap[--U.heap_max]=me,U.heap[--U.heap_max]=he,Se[2*le]=Se[2*me]+Se[2*he],U.depth[le]=(U.depth[me]>=U.depth[he]?U.depth[me]:U.depth[he])+1,Se[2*me+1]=Se[2*he+1]=le,U.heap[1]=le++,Te(U,Se,1),2<=U.heap_len;);U.heap[--U.heap_max]=U.heap[1],(function(De,jt){var wt,_t,Jt,Qe,gt,Je,$e=jt.dyn_tree,nt=jt.max_code,Bt=jt.stat_desc.static_tree,Xe=jt.stat_desc.has_stree,ut=jt.stat_desc.extra_bits,dt=jt.stat_desc.extra_base,Zt=jt.stat_desc.max_length,lt=0;for(Qe=0;Qe<=_;Qe++)De.bl_count[Qe]=0;for($e[2*De.heap[De.heap_max]+1]=0,wt=De.heap_max+1;wt<N;wt++)Zt<(Qe=$e[2*$e[2*(_t=De.heap[wt])+1]+1]+1)&&(Qe=Zt,lt++),$e[2*_t+1]=Qe,nt<_t||(De.bl_count[Qe]++,gt=0,dt<=_t&&(gt=ut[_t-dt]),Je=$e[2*_t],De.opt_len+=Je*(Qe+gt),Xe&&(De.static_len+=Je*(Bt[2*_t+1]+gt)));if(lt!==0){do{for(Qe=Zt-1;De.bl_count[Qe]===0;)Qe--;De.bl_count[Qe]--,De.bl_count[Qe+1]+=2,De.bl_count[Zt]--,lt-=2}while(0<lt);for(Qe=Zt;Qe!==0;Qe--)for(_t=De.bl_count[Qe];_t!==0;)nt<(Jt=De.heap[--wt])||($e[2*Jt+1]!==Qe&&(De.opt_len+=(Qe-$e[2*Jt+1])*$e[2*Jt],$e[2*Jt+1]=Qe),_t--)}})(U,ee),Ne(Se,Be,U.bl_count)}function E(U,ee,me){var he,le,Se=-1,we=ee[1],xe=0,Ce=7,Be=4;for(we===0&&(Ce=138,Be=3),ee[2*(me+1)+1]=65535,he=0;he<=me;he++)le=we,we=ee[2*(he+1)+1],++xe<Ce&&le===we||(xe<Be?U.bl_tree[2*le]+=xe:le!==0?(le!==Se&&U.bl_tree[2*le]++,U.bl_tree[2*H]++):xe<=10?U.bl_tree[2*D]++:U.bl_tree[2*K]++,Se=le,Be=(xe=0)===we?(Ce=138,3):le===we?(Ce=6,3):(Ce=7,4))}function W(U,ee,me){var he,le,Se=-1,we=ee[1],xe=0,Ce=7,Be=4;for(we===0&&(Ce=138,Be=3),he=0;he<=me;he++)if(le=we,we=ee[2*(he+1)+1],!(++xe<Ce&&le===we)){if(xe<Be)for(;se(U,le,U.bl_tree),--xe!=0;);else le!==0?(le!==Se&&(se(U,le,U.bl_tree),xe--),se(U,H,U.bl_tree),J(U,xe-3,2)):xe<=10?(se(U,D,U.bl_tree),J(U,xe-3,3)):(se(U,K,U.bl_tree),J(U,xe-11,7));Se=le,Be=(xe=0)===we?(Ce=138,3):le===we?(Ce=6,3):(Ce=7,4)}}g(k);var ie=!1;function L(U,ee,me,he){J(U,(m<<1)+(he?1:0),3),(function(le,Se,we,xe){ae(le),B(le,we),B(le,~we),h.arraySet(le.pending_buf,le.window,Se,we,le.pending),le.pending+=we})(U,ee,me)}u._tr_init=function(U){ie||((function(){var ee,me,he,le,Se,we=new Array(_+1);for(le=he=0;le<j-1;le++)for(Z[le]=he,ee=0;ee<1<<G[le];ee++)T[he++]=le;for(T[he-1]=le,le=Se=0;le<16;le++)for(k[le]=Se,ee=0;ee<1<<re[le];ee++)q[Se++]=le;for(Se>>=7;le<y;le++)for(k[le]=Se<<7,ee=0;ee<1<<re[le]-7;ee++)q[256+Se++]=le;for(me=0;me<=_;me++)we[me]=0;for(ee=0;ee<=143;)ne[2*ee+1]=8,ee++,we[8]++;for(;ee<=255;)ne[2*ee+1]=9,ee++,we[9]++;for(;ee<=279;)ne[2*ee+1]=7,ee++,we[7]++;for(;ee<=287;)ne[2*ee+1]=8,ee++,we[8]++;for(Ne(ne,b+1,we),ee=0;ee<y;ee++)M[2*ee+1]=5,M[2*ee]=ge(ee,5);V=new Y(ne,G,x+1,b,_),P=new Y(M,re,0,y,_),X=new Y(new Array(0),$,0,O,C)})(),ie=!0),U.l_desc=new v(U.dyn_ltree,V),U.d_desc=new v(U.dyn_dtree,P),U.bl_desc=new v(U.bl_tree,X),U.bi_buf=0,U.bi_valid=0,_e(U)},u._tr_stored_block=L,u._tr_flush_block=function(U,ee,me,he){var le,Se,we=0;0<U.level?(U.strm.data_type===2&&(U.strm.data_type=(function(xe){var Ce,Be=4093624447;for(Ce=0;Ce<=31;Ce++,Be>>>=1)if(1&Be&&xe.dyn_ltree[2*Ce]!==0)return f;if(xe.dyn_ltree[18]!==0||xe.dyn_ltree[20]!==0||xe.dyn_ltree[26]!==0)return p;for(Ce=32;Ce<x;Ce++)if(xe.dyn_ltree[2*Ce]!==0)return p;return f})(U)),Me(U,U.l_desc),Me(U,U.d_desc),we=(function(xe){var Ce;for(E(xe,xe.dyn_ltree,xe.l_desc.max_code),E(xe,xe.dyn_dtree,xe.d_desc.max_code),Me(xe,xe.bl_desc),Ce=O-1;3<=Ce&&xe.bl_tree[2*F[Ce]+1]===0;Ce--);return xe.opt_len+=3*(Ce+1)+5+5+4,Ce})(U),le=U.opt_len+3+7>>>3,(Se=U.static_len+3+7>>>3)<=le&&(le=Se)):le=Se=me+5,me+4<=le&&ee!==-1?L(U,ee,me,he):U.strategy===4||Se===le?(J(U,2+(he?1:0),3),Ge(U,ne,M)):(J(U,4+(he?1:0),3),(function(xe,Ce,Be,De){var jt;for(J(xe,Ce-257,5),J(xe,Be-1,5),J(xe,De-4,4),jt=0;jt<De;jt++)J(xe,xe.bl_tree[2*F[jt]+1],3);W(xe,xe.dyn_ltree,Ce-1),W(xe,xe.dyn_dtree,Be-1)})(U,U.l_desc.max_code+1,U.d_desc.max_code+1,we+1),Ge(U,U.dyn_ltree,U.dyn_dtree)),_e(U),he&&ae(U)},u._tr_tally=function(U,ee,me){return U.pending_buf[U.d_buf+2*U.last_lit]=ee>>>8&255,U.pending_buf[U.d_buf+2*U.last_lit+1]=255&ee,U.pending_buf[U.l_buf+U.last_lit]=255&me,U.last_lit++,ee===0?U.dyn_ltree[2*me]++:(U.matches++,ee--,U.dyn_ltree[2*(T[me]+x+1)]++,U.dyn_dtree[2*R(ee)]++),U.last_lit===U.lit_bufsize-1},u._tr_align=function(U){J(U,2,3),se(U,A,ne),(function(ee){ee.bi_valid===16?(B(ee,ee.bi_buf),ee.bi_buf=0,ee.bi_valid=0):8<=ee.bi_valid&&(ee.pending_buf[ee.pending++]=255&ee.bi_buf,ee.bi_buf>>=8,ee.bi_valid-=8)})(U)}},{"../utils/common":41}],53:[function(s,o,u){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(s,o,u){(function(h){(function(f,p){if(!f.setImmediate){var g,m,j,x,b=1,y={},O=!1,N=f.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(f);_=_&&_.setTimeout?_:f,g={}.toString.call(f.process)==="[object process]"?function(H){process.nextTick(function(){C(H)})}:(function(){if(f.postMessage&&!f.importScripts){var H=!0,D=f.onmessage;return f.onmessage=function(){H=!1},f.postMessage("","*"),f.onmessage=D,H}})()?(x="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",A,!1):f.attachEvent("onmessage",A),function(H){f.postMessage(x+H,"*")}):f.MessageChannel?((j=new MessageChannel).port1.onmessage=function(H){C(H.data)},function(H){j.port2.postMessage(H)}):N&&"onreadystatechange"in N.createElement("script")?(m=N.documentElement,function(H){var D=N.createElement("script");D.onreadystatechange=function(){C(H),D.onreadystatechange=null,m.removeChild(D),D=null},m.appendChild(D)}):function(H){setTimeout(C,0,H)},_.setImmediate=function(H){typeof H!="function"&&(H=new Function(""+H));for(var D=new Array(arguments.length-1),K=0;K<D.length;K++)D[K]=arguments[K+1];var G={callback:H,args:D};return y[b]=G,g(b),b++},_.clearImmediate=w}function w(H){delete y[H]}function C(H){if(O)setTimeout(C,0,H);else{var D=y[H];if(D){O=!0;try{(function(K){var G=K.callback,re=K.args;switch(re.length){case 0:G();break;case 1:G(re[0]);break;case 2:G(re[0],re[1]);break;case 3:G(re[0],re[1],re[2]);break;default:G.apply(p,re)}})(D)}finally{w(H),O=!1}}}}function A(H){H.source===f&&typeof H.data=="string"&&H.data.indexOf(x)===0&&C(+H.data.slice(x.length))}})(typeof self>"u"?h===void 0?this:h:self)}).call(this,typeof Is<"u"?Is:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(md)),md.exports}var A_=O_();const R_=tv(A_),Jg=()=>({id:`BUG-${Date.now().toString().slice(-6)}`,title:"",severity:"medium",status:"open",actualResult:"",expectedResult:"",stepsToReproduce:"",attachments:[],createdAt:new Date().toISOString()});function k_({reports:n,testCases:l,onSave:s,onDelete:o}){const[u,h]=I.useState(),[f,p]=I.useState(!1);async function g(){p(!0);try{const m=new R_;m.file("bug-reports.csv",U_(n));for(const y of n)for(const O of y.attachments)m.file(`attachments/${ho(y.id)}/${ho(O.name)}`,O.dataUrl.split(",")[1]??"",{base64:!0});const j=await m.generateAsync({type:"blob"}),x=URL.createObjectURL(j),b=document.createElement("a");b.href=x,b.download=`lazyscout-bug-reports-${new Date().toISOString().slice(0,10)}.zip`,b.click(),URL.revokeObjectURL(x)}finally{p(!1)}}return r.jsxs("section",{className:"bug-reports",children:[r.jsxs("div",{className:"bug-reports-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Defect tracking"}),r.jsx("h3",{children:"Bug Reports"}),r.jsx("p",{children:"Capture reproducible issues and keep screenshots with the local project."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!n.length||f,onClick:()=>{g()},children:f?"Creating ZIP…":"Export ZIP + images"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Jg()),children:"+ Add Bug Report"})]})]}),n.length?r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"bug-report-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"Bug ID"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Test Case"}),r.jsx("th",{children:"Severity"}),r.jsx("th",{children:"Status"}),r.jsx("th",{children:"Evidence"}),r.jsx("th",{children:"Actions"})]})}),r.jsx("tbody",{children:n.map(m=>r.jsxs("tr",{children:[r.jsx("td",{children:m.id}),r.jsxs("td",{children:[r.jsx("b",{children:m.title||"Untitled bug"}),r.jsx("small",{children:new Date(m.createdAt).toLocaleDateString()})]}),r.jsx("td",{children:m.testCaseId||"—"}),r.jsx("td",{children:r.jsx("span",{className:`bug-severity ${m.severity}`,children:m.severity})}),r.jsx("td",{children:r.jsx("span",{className:"bug-status",children:m.status})}),r.jsxs("td",{children:[m.attachments.length," screenshot",m.attachments.length===1?"":"s"]}),r.jsx("td",{children:r.jsxs("div",{className:"flex justify-center gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>h(m),children:"Edit"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>o(m.id),children:"Delete"})]})})]},m.id))})]})}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No Bug Reports yet"}),r.jsx("span",{children:"When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Jg()),children:"Create first Bug Report"})]}),u&&r.jsx(D_,{report:u,testCases:l,onClose:()=>h(void 0),onSave:m=>{s(m),h(void 0)}})]})}function D_({report:n,testCases:l,onSave:s,onClose:o}){const[u,h]=I.useState(n);async function f(p){const g=[...p.target.files??[]].filter(j=>j.type.startsWith("image/")).slice(0,5),m=await Promise.all(g.map(async j=>({name:j.name,type:j.type,dataUrl:await z_(j)})));h(j=>({...j,attachments:[...j.attachments,...m]}))}return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal bug-editor",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Bug Report"}),r.jsx("h2",{children:u.id}),r.jsx("p",{children:"Describe the defect so another person can reproduce it quickly."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,children:"×"})]}),r.jsxs("div",{className:"bug-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_150px_150px]",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Title"}),r.jsx("input",{className:"field",value:u.title,onChange:p=>h({...u,title:p.target.value}),placeholder:"What went wrong?"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Severity"}),r.jsxs("select",{className:"field",value:u.severity,onChange:p=>h({...u,severity:p.target.value}),children:[r.jsx("option",{value:"critical",children:"critical"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Status"}),r.jsxs("select",{className:"field",value:u.status,onChange:p=>h({...u,status:p.target.value}),children:[r.jsx("option",{value:"open",children:"open"}),r.jsx("option",{value:"in-progress",children:"in-progress"}),r.jsx("option",{value:"resolved",children:"resolved"})]})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Related Test Case"}),r.jsxs("select",{className:"field",value:u.testCaseId??"",onChange:p=>h({...u,testCaseId:p.target.value||void 0}),children:[r.jsx("option",{value:"",children:"Not linked"}),l.map(p=>r.jsxs("option",{value:p.id,children:[p.id," · ",p.title]},p.id))]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Steps to reproduce"}),r.jsx("textarea",{className:"field",rows:4,value:u.stepsToReproduce,onChange:p=>h({...u,stepsToReproduce:p.target.value}),placeholder:`1. Open…
54
- 2. Click…
55
- 3. Observe…`})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Actual Result"}),r.jsx("textarea",{className:"field",rows:4,value:u.actualResult,onChange:p=>h({...u,actualResult:p.target.value})})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Expected Result"}),r.jsx("textarea",{className:"field",rows:4,value:u.expectedResult,onChange:p=>h({...u,expectedResult:p.target.value})})]})]}),r.jsxs("label",{className:"bug-upload",children:[r.jsx("span",{children:"Evidence screenshots"}),r.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:p=>{f(p)}}),r.jsx("em",{children:"Upload up to 5 images at a time. Images are included in ZIP export."})]}),u.attachments.length?r.jsx("div",{className:"bug-attachments",children:u.attachments.map((p,g)=>r.jsxs("figure",{children:[r.jsx("img",{src:p.dataUrl,alt:p.name}),r.jsxs("figcaption",{children:[p.name,r.jsx("button",{type:"button",onClick:()=>h(m=>({...m,attachments:m.attachments.filter((j,x)=>x!==g)})),children:"×"})]})]},`${p.name}-${g}`))}):null]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!u.title.trim(),onClick:()=>s(u),children:"Save Bug Report"})]})]})})}function z_(n){return new Promise((l,s)=>{const o=new FileReader;o.onload=()=>l(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function ho(n){return n.replace(/[^a-z0-9._-]/gi,"_")}function U_(n){const l=["Bug_ID","Title","Test_Case","Severity","Status","Steps_To_Reproduce","Actual_Result","Expected_Result","Attachments"],s=o=>`"${o.replaceAll('"','""')}"`;return[l,...n.map(o=>[o.id,o.title,o.testCaseId??"",o.severity,o.status,o.stepsToReproduce,o.actualResult,o.expectedResult,o.attachments.map(u=>`attachments/${ho(o.id)}/${ho(u.name)}`).join("; ")])].map(o=>o.map(s).join(",")).join(`\r
56
- `)}function L_({screenshots:n,onDelete:l}){function s(o){const u=document.createElement("a");u.href=o.dataUrl,u.download=o.name,u.click()}return r.jsxs("section",{className:"screenshot-gallery",children:[r.jsxs("header",{className:"screenshot-gallery-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright evidence"}),r.jsx("h3",{children:"Screenshots"}),r.jsxs("p",{children:["LazyScout does not capture automatically. Add"," ",r.jsxs("code",{children:["await page.screenshot(","{"," path: 'evidence.png', fullPage: true ","}",")"]})," ","to edited Playwright code when evidence is needed."]})]}),r.jsxs("span",{children:[n.length,"/50 saved"]})]}),n.length?r.jsx("div",{className:"screenshot-gallery-grid",children:n.map(o=>r.jsxs("figure",{children:[r.jsx("img",{src:o.dataUrl,alt:`Screenshot for ${o.testCaseId}`}),r.jsxs("figcaption",{children:[r.jsxs("div",{children:[r.jsx("b",{children:o.testCaseId}),r.jsxs("span",{children:[o.status," · ",new Date(o.capturedAt).toLocaleString()]})]}),r.jsxs("div",{className:"flex shrink-0 gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>s(o),children:"Download"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>l(o.name),children:"Delete"})]})]})]},o.name))}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No screenshots yet"}),r.jsx("span",{children:"Add page.screenshot() to edited Playwright code, save it, then run that Test Case."})]})]})}function M_({defaultUrl:n}){const[l,s]=I.useState(n),[o,u]=I.useState(3),[h,f]=I.useState(5),[p,g]=I.useState(300),[m,j]=I.useState(!1),[x,b]=I.useState(!1),[y,O]=I.useState(),[N,_]=I.useState(""),w=Math.min(20,Math.max(1,Number(o)||1))*Math.min(100,Math.max(1,Number(h)||1));async function C(){if(!(x||!m)){b(!0),O(void 0),_("");try{O(await I0({url:l,virtualUsers:Number(o)||1,requestsPerUser:Number(h)||1,intervalMs:Number(p)||0,confirmed:m}))}catch(A){_(A instanceof Error?A.message:String(A))}finally{b(!1)}}}return r.jsxs("section",{className:"load-test-page",children:[r.jsxs("header",{className:"load-test-hero",children:[r.jsx("div",{className:"load-test-hero-icon",children:"⚡"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"HTTP performance workspace"}),r.jsx("h2",{children:"Load Test"}),r.jsx("p",{children:"Send controlled GET traffic, compare response times, and inspect every HTTP response."})]}),r.jsx("span",{children:"GET only · Local runner"})]}),r.jsxs("div",{className:"load-test-layout",children:[r.jsxs("section",{className:"load-config-card",children:[r.jsxs("div",{className:"load-section-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test configuration"}),r.jsx("h3",{children:"Request settings"})]}),r.jsxs("b",{children:[w," requests"]})]}),r.jsxs("div",{className:"load-test-form",children:[r.jsxs("label",{className:"load-url",children:[r.jsx("span",{children:"Target URL"}),r.jsx("input",{className:"field",value:l,onChange:A=>s(A.target.value),placeholder:"https://example.com",disabled:x})]}),r.jsxs("div",{className:"load-input-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Virtual users"}),r.jsx("input",{className:"field",type:"number",min:1,max:20,value:o,onChange:A=>u(A.target.value===""?"":Number(A.target.value)),disabled:x}),r.jsx("small",{children:"Maximum 20 concurrent users"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Requests / user"}),r.jsx("input",{className:"field",type:"number",min:1,max:100,value:h,onChange:A=>f(A.target.value===""?"":Number(A.target.value)),disabled:x}),r.jsx("small",{children:"Maximum 100 per user"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Interval"}),r.jsxs("div",{className:"load-input-unit",children:[r.jsx("input",{className:"field",type:"number",min:0,max:1e4,value:p,onChange:A=>g(A.target.value===""?"":Number(A.target.value)),disabled:x}),r.jsx("em",{children:"ms"})]}),r.jsx("small",{children:"Pause between each request"})]})]}),r.jsxs("label",{className:"load-confirm",children:[r.jsx("input",{type:"checkbox",checked:m,onChange:A=>j(A.target.checked),disabled:x}),r.jsxs("span",{children:[r.jsx("b",{children:"Authorized target"}),r.jsx("small",{children:"I own this target or have permission to run a load test."})]})]}),r.jsx("button",{type:"button",className:"btn btn-primary load-run-button",disabled:x||!m||!l.trim(),onClick:()=>{C()},children:x?r.jsxs(r.Fragment,{children:[r.jsx("i",{})," Running ",w," requests…"]}):r.jsx(r.Fragment,{children:"▶ Start Load Test"})})]})]}),r.jsxs("aside",{className:"load-safety-card",children:[r.jsx("p",{className:"eyebrow",children:"Safe limits"}),r.jsx("h3",{children:"Controlled traffic"}),r.jsxs("ul",{children:[r.jsxs("li",{children:[r.jsx("b",{children:"20"}),r.jsx("span",{children:"Maximum virtual users"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"2,000"}),r.jsx("span",{children:"Maximum total requests"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"15s"}),r.jsx("span",{children:"Timeout per request"})]})]}),r.jsx("p",{children:"Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data."})]})]}),N&&r.jsx("p",{className:"load-error",children:N}),x&&r.jsxs("section",{className:"load-running",children:[r.jsx("i",{}),r.jsxs("div",{children:[r.jsx("b",{children:"Load test is running"}),r.jsx("span",{children:"Waiting for all virtual users to complete their request budget…"})]})]}),y&&r.jsxs("section",{className:"load-results",children:[r.jsxs("div",{className:"load-results-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Run report"}),r.jsx("h3",{children:"HTTP Request Results"})]}),r.jsx("span",{className:y.failed?"has-failures":"all-passed",children:y.failed?`${y.failed} failed`:"All requests passed"})]}),r.jsxs("div",{className:"load-kpis",children:[r.jsx(ti,{label:"Total",value:String(y.total)}),r.jsx(ti,{label:"Passed",value:String(y.passed),tone:"pass"}),r.jsx(ti,{label:"Failed",value:String(y.failed),tone:"fail"}),r.jsx(ti,{label:"Average",value:`${y.averageMs} ms`}),r.jsx(ti,{label:"Min / Max",value:`${y.minMs} / ${y.maxMs} ms`}),r.jsx(ti,{label:"Requests/sec",value:String(y.requestsPerSecond)})]}),r.jsx("div",{className:"load-table-wrap",children:r.jsxs("table",{className:"load-request-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"#"}),r.jsx("th",{children:"User"}),r.jsx("th",{children:"Method"}),r.jsx("th",{children:"Request URL"}),r.jsx("th",{children:"HTTP"}),r.jsx("th",{children:"Time"}),r.jsx("th",{children:"Size"}),r.jsx("th",{children:"Result"})]})}),r.jsx("tbody",{children:y.requests.map(A=>r.jsxs("tr",{children:[r.jsx("td",{children:A.id}),r.jsxs("td",{children:["VU-",A.virtualUser,r.jsxs("small",{children:["Run ",A.iteration]})]}),r.jsx("td",{children:r.jsx("span",{className:"load-method",children:A.method})}),r.jsxs("td",{children:[r.jsx("span",{className:"load-request-url",title:A.finalUrl??A.url,children:A.finalUrl??A.url}),A.error&&r.jsx("small",{className:"load-request-error",children:A.error})]}),r.jsx("td",{children:A.statusCode?r.jsxs(r.Fragment,{children:[r.jsx("b",{children:A.statusCode}),r.jsx("small",{children:A.statusText})]}):"—"}),r.jsxs("td",{children:[A.durationMs," ms"]}),r.jsx("td",{children:B_(A.responseBytes)}),r.jsx("td",{children:r.jsx("span",{className:`load-result-badge ${A.passed?"passed":"failed"}`,children:A.passed?"PASS":"FAIL"})})]},A.id))})]})})]})]})}function ti({label:n,value:l,tone:s=""}){return r.jsxs("div",{className:s,children:[r.jsx("span",{children:n}),r.jsx("b",{children:l})]})}function B_(n){return n?n<1024?`${n} B`:`${(n/1024).toFixed(1)} KB`:"—"}function $_({message:n,detail:l,onClose:s}){return r.jsxs("div",{className:"scout-notice",role:"alert",children:[r.jsx("div",{className:"scout-notice-icon",children:"!"}),r.jsxs("div",{children:[r.jsx("b",{children:n}),r.jsx("p",{children:l})]}),r.jsx("button",{type:"button",onClick:s,"aria-label":"Dismiss notice",children:"×"})]})}function H_(){const[n,l]=I.useState({status:"idle",result:null,error:null});async function s(u,h,f,p="en",g=!1,m=750,j=[],x,b,y,O,N=!1){l({status:"loading",result:null,error:null});try{const _=await h0({url:u,maxPages:h,maxDepth:f,language:p,includeApiChecks:g,waitAfterNavigationMs:m,blockedKeywords:j,projectId:x,startPath:b,scopePath:y,mode:O,debug:N});return l({status:"success",result:_,error:null}),_}catch(_){const w=_ instanceof hr?_:new hr("unknown","An unexpected error occurred.");return l({status:"error",result:null,error:w}),null}}function o(){l({status:"idle",result:null,error:null})}return{...n,analyze:s,reset:o}}const po={enabled:!0,keywords:iv},iy=n=>`lazyscout-click-filter:${n}`;function q_(n){try{const l=localStorage.getItem(iy(n));if(!l)return po;const s=JSON.parse(l);return{enabled:s.enabled===!0,keywords:lv(s.keywords)}}catch{return po}}function G_(n){const[l,s]=I.useState(po);I.useEffect(()=>{s(n?q_(n):po)},[n]);const o=I.useCallback(h=>{const f={enabled:h.enabled,keywords:lv(h.keywords)};s(f),n&&localStorage.setItem(iy(n),JSON.stringify(f))},[n]),u=l.enabled?l.keywords:[];return{filter:l,blockedKeywords:u,save:o}}function I_(n){const[l,s]=I.useState([]),[o,u]=I.useState([]);I.useEffect(()=>{s(n??[]),u([])},[n]);function h(O,N){s(_=>_.map(w=>w.id===O?N:w)),u(_=>_.map(w=>w===O?N.id:w))}function f(O){s(N=>N.filter(_=>_.id!==O)),u(N=>N.filter(_=>_!==O))}function p(){s(O=>O.filter(N=>!o.includes(N.id))),u([])}function g(O,N){O!==N&&s(_=>{const w=_.findIndex(D=>D.id===O),C=_.findIndex(D=>D.id===N);if(w<0||C<0)return _;const A=[..._],[H]=A.splice(w,1);return A.splice(C,0,H),A})}function m(O){const N=new Set(l.map(w=>w.id));let _=l.filter(w=>w.module==="MANUAL").length+1;for(;N.has(vd("MANUAL",_));)_++;return Rx("MANUAL",vd("MANUAL",_),O)}function j(O){return s(N=>[O,...N]),O}function x(O){s(N=>[...O,...N])}function b(O){u(N=>N.includes(O)?N.filter(_=>_!==O):[...N,O])}function y(O){u(O)}return{testCases:l,selectedIds:o,updateTestCase:h,deleteTestCase:f,deleteSelected:p,reorderTestCases:g,createTestCaseDraft:m,addTestCase:j,addImportedTestCases:x,toggleSelected:b,setSelection:y}}function V_(n){const[l,s]=I.useState([]);I.useEffect(()=>{s(n??[])},[n]);function o(f,p){s(g=>g.map(m=>m.id===f?p:m))}function u(f){s(p=>p.filter(g=>g.id!==f))}function h(f){const p=new Set(l.map(m=>m.id));let g=l.filter(m=>m.module==="MANUAL").length+1;for(;p.has(yd("MANUAL",g));)g++;s(m=>[Ax("MANUAL",yd("MANUAL",g),f),...m])}return{testData:l,updateRow:o,deleteRow:u,addRow:h}}const mo="lazyscout.projects.v1";function Y_(){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 Dd(){try{return JSON.parse(localStorage.getItem(mo)??"[]")}catch{return[]}}function F_(n){const l=Dd().filter(s=>s.id!==n);l.length?localStorage.setItem(mo,JSON.stringify(l)):localStorage.removeItem(mo)}function P_(){const[n,l]=I.useState([]),[s,o]=I.useState(),[u,h]=I.useState("~/LazyScout"),[f,p]=I.useState(),[g,m]=I.useState(!0),j=I.useRef(new Set),x=I.useRef(new Map);I.useEffect(()=>{(async()=>{try{const D=await y0();h(D.root);const K=Dd(),G=K.filter(re=>!D.projects.some($=>$.id===re.id));for(const re of G)await qm(re);K.length&&localStorage.removeItem(mo),l([...G,...D.projects])}catch(D){l(Dd()),p(D instanceof Error?D.message:String(D))}finally{m(!1)}})()},[]);function b(D){if(j.current.has(D.id))return Promise.resolve();const G=(x.current.get(D.id)??Promise.resolve()).catch(()=>{}).then(()=>qm(D)).catch(re=>{p(re instanceof Error?re.message:String(re))});return x.current.set(D.id,G),G.finally(()=>{x.current.get(D.id)===G&&x.current.delete(D.id)}),G}function y(D,K,G,re,$){const F=new Date().toISOString(),ne=`project-${Z_(D)}`,M=re??ne,q=n.find(Z=>Z.id===M),T={id:M,name:G??q?.name??new URL(D).hostname,targetUrl:D,createdAt:q?.createdAt??F,updatedAt:F,mode:q?.mode,testCaseLanguage:$??q?.testCaseLanguage??"en",result:K};return j.current.delete(M),l(Z=>q?Z.map(V=>V.id===M?T:V):[T,...Z]),b(T),o(M),M}function O(D="Untitled Test Suite",K="empty",G=Y_(),re=""){const $=new Date().toISOString(),F=`project-${crypto.randomUUID()}`,ne={id:F,name:D.trim()||"Untitled Test Suite",targetUrl:re,createdAt:$,updatedAt:$,mode:K,result:G};return j.current.delete(F),l(M=>[ne,...M]),b(ne),o(F),F}async function N(D){const K=n.findIndex($=>$.id===D),G=n[K];if(!G)return;const re=n.filter($=>$.id!==D);j.current.add(D),l(re),s===D&&o(re[0]?.id);try{await(x.current.get(D)??Promise.resolve()),await b0(D),F_(D)}catch($){j.current.delete(D),l(F=>{if(F.some(M=>M.id===D))return F;const ne=Math.min(K,F.length);return[...F.slice(0,ne),G,...F.slice(ne)]}),s===D&&o(D),p($ instanceof Error?$.message:String($))}}function _(D){j.current.delete(D.id),l(K=>K.some(G=>G.id===D.id)?K:[D,...K]),b(D),o(D.id)}function w(D,K){const G=K.trim(),re=n.find(F=>F.id===D);if(!G||!re)return;const $={...re,name:G,updatedAt:new Date().toISOString()};l(F=>F.map(ne=>ne.id===D?$:ne)),b($)}function C(D,K){const G=n.find($=>$.id===D);if(!G)return;const re={...G,result:K,updatedAt:new Date().toISOString()};l($=>$.map(F=>F.id===D?re:F)),b(re)}function A(D,K){const G=n.find($=>$.id===D);if(!G)return;const re={...G,testCaseLanguage:K,updatedAt:new Date().toISOString()};l($=>$.map(F=>F.id===D?re:F)),b(re)}function H(){U0().catch(D=>p(D instanceof Error?D.message:String(D)))}return{projects:n,activeProjectId:s,setActiveProjectId:o,saveProject:y,createEmptyProject:O,deleteProject:N,restoreProject:_,renameProject:w,updateProjectResult:C,updateProjectTestCaseLanguage:A,workspaceRoot:u,workspaceError:f,loading:g,openWorkspace:H}}function Z_(n){const l=new TextEncoder().encode(n),s=Array.from(l,o=>String.fromCharCode(o)).join("");return btoa(s).replace(/[^a-z0-9]/gi,"").slice(0,32).toLowerCase()}function X_(n){const[l,s]=I.useState({}),o=n?l[n]??{}:{};function u(f){n&&s(p=>({...p,[n]:f}))}function h(){n&&s(f=>{const p={...f};return delete p[n],p})}return{secrets:o,saveSecrets:u,clearSecrets:h,hasSecrets:Object.values(o).some(Boolean)}}function K_(n){const[l,s]=I.useState([]);I.useEffect(()=>{s([]),n&&(async()=>{const h=await H0(n),f=`lazyscout.bug-reports.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const g=p.filter(m=>!h.some(j=>j.id===m.id));for(const m of g)await Ym(n,m);p.length&&localStorage.removeItem(f),s([...g,...h])})().catch(()=>s([]))},[n]);function o(h){s(f=>f.some(p=>p.id===h.id)?f.map(p=>p.id===h.id?h:p):[h,...f]),n&&Ym(n,h)}function u(h){s(f=>f.filter(p=>p.id!==h)),n&&q0(n,h)}return{reports:l,save:o,remove:u}}function Q_(n){const[l,s]=I.useState([]);I.useEffect(()=>{s([]),n&&(async()=>{const h=await L0(n),f=`lazyscout.screenshots.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const g=[];for(const m of p)h.some(j=>j.name===m.name)||g.push(await Vm(n,m));p.length&&localStorage.removeItem(f),s([...g,...h])})().catch(()=>s([]))},[n]);function o(h){n&&Vm(n,h).then(f=>s(p=>[f,...p.filter(g=>g.name!==f.name)].slice(0,50)))}function u(h){s(f=>f.filter(p=>p.name!==h)),n&&M0(n,h)}return{screenshots:l,add:o,remove:u}}function J_(n){const[l,s]=I.useState([]),[o,u]=I.useState();I.useEffect(()=>{if(!n){s([]);return}N0(n).then(s).catch(f=>u(f instanceof Error?f.message:String(f)))},[n]);async function h(f){s(f);try{await T0(n,f),u(void 0)}catch(p){u(p instanceof Error?p.message:String(p))}}return{flows:l,update:h,error:o}}function W_(n,l){const s=l.search.trim().toLowerCase();return n.filter(o=>l.module!=="all"&&!(o.folder??o.module).toLowerCase().includes(l.module.toLowerCase())||l.type!=="all"&&o.type!==l.type||l.priority!=="all"&&o.priority!==l.priority?!1:s?[o.id,o.module,o.folder??"",...o.tags??[],...o.requirements??[],o.title,o.expectedResult,o.sourceUrl,Ox(o.steps)].join(" ").toLowerCase().includes(s):!0)}function Wg(n){return[...new Set(n.map(l=>l.folder??l.module))].sort()}function eN(n,l,s){const o=l.trim().toLowerCase();return n.filter(u=>s!=="all"&&u.module!==s?!1:o?[u.id,u.module,u.field,u.inputType,u.validValue,u.invalidValue,u.note??""].join(" ").toLowerCase().includes(o):!0)}const tN={search:"",module:"all",type:"all",priority:"all"},gd="lazyscout-active-project-id",ev=["Launching Playwright runner","Opening target URL","Collecting pages and controls"];function nN(){const{status:n,result:l,error:s,analyze:o,reset:u}=H_(),{projects:h,activeProjectId:f,setActiveProjectId:p,saveProject:g,createEmptyProject:m,deleteProject:j,restoreProject:x,renameProject:b,updateProjectResult:y,updateProjectTestCaseLanguage:O,workspaceRoot:N,workspaceError:_,loading:w,openWorkspace:C}=P_(),A=h.find(ye=>ye.id===f),{secrets:H,saveSecrets:D,clearSecrets:K}=X_(f),{filter:G,blockedKeywords:re,save:$}=G_(f),ne=A?.result??l,{testCases:M,selectedIds:q,updateTestCase:T,deleteTestCase:Z,deleteSelected:V,reorderTestCases:P,createTestCaseDraft:X,addImportedTestCases:k,addTestCase:Y,toggleSelected:v,setSelection:R}=I_(ne?.testCases),{testData:B,updateRow:J,deleteRow:se,addRow:ge}=V_(ne?.testData),{reports:Ne,save:_e,remove:ae}=K_(f),{screenshots:je,add:Te,remove:Ge}=Q_(f),{flows:Me,update:E}=J_(f),W=ne??(A?ly(A.targetUrl):void 0),[ie,L]=I.useState("testcases"),[U,ee]=I.useState(0),[me,he]=I.useState(tN),[le,Se]=I.useState(""),[we,xe]=I.useState("all"),[Ce,Be]=I.useState(),[De,jt]=I.useState(),[wt,_t]=I.useState(null),[Jt,Qe]=I.useState(!1),[gt,Je]=I.useState(),[$e,nt]=I.useState("overview"),[Bt,Xe]=I.useState(!1),[ut,dt]=I.useState({}),[Zt,lt]=I.useState({}),[Xt,bt]=I.useState(!1),[yt,mn]=I.useState("credentials"),[fa,Ot]=I.useState(!1),[He,Ie]=I.useState(!1),[El,On]=I.useState(!1),[pr,mr]=I.useState(!1),[oi,gr]=I.useState(),[gn,Nt]=I.useState(),[At,An]=I.useState(),[ci,bo]=I.useState(()=>localStorage.getItem("lazyscout-sidebar-collapsed")==="true");function xo(){bo(ye=>(localStorage.setItem("lazyscout-sidebar-collapsed",String(!ye)),!ye))}function vr(ye,Ae){An({message:ye,restore:Ae})}function Va(ye){const Ae=M.find(qe=>qe.id===ye);Ae&&(Z(ye),vr(`Deleted ${Ae.id}`,()=>k([Ae])))}function ui(){const ye=M.filter(Ae=>q.includes(Ae.id));ye.length&&(V(),vr(`Deleted ${ye.length} Test Cases`,()=>k(ye)))}I.useEffect(()=>{if(!At)return;const ye=window.setTimeout(()=>An(void 0),8e3);return()=>window.clearTimeout(ye)},[At]);function vn(ye){pr||(mr(!0),window.setTimeout(()=>{ye(),mr(!1)},700))}const Mn=I.useMemo(()=>W_(M,me),[M,me]),Fn=I.useMemo(()=>eN(B,le,we),[B,le,we]),ha=I.useMemo(()=>Wg(M),[M]),Rt=I.useMemo(()=>Wg(B),[B]),di=M.find(ye=>ye.id===Ce);function Cl(ye,Ae,qe){const Ke=M.find(Tt=>Tt.id===ye);if(!Ke)return;const Ht={...Ke};if(Ae==="preconditions"||Ae==="tags"?Ht[Ae]=qe.split(/\n|,/).map(Tt=>Tt.trim()).filter(Boolean):Ae==="steps"?Ht.steps=qe.split(`
57
- `).map(Tt=>Tt.trim()).filter(Boolean).map(Tt=>{try{return JSON.parse(Tt)}catch{return{type:"manual",description:Tt}}}):Ht[Ae]=qe,T(ye,Ht),f&&ne){const Tt=M.map($n=>$n.id===ye?Ht:$n);y(f,{...ne,testCases:Tt,testData:B})}}I.useEffect(()=>{if(!f||!ne||!A?.result)return;const ye=window.setTimeout(()=>{const Ae=A.result;JSON.stringify(Ae.testCases)===JSON.stringify(M)&&JSON.stringify(Ae.testData)===JSON.stringify(B)||y(f,{...ne,testCases:M,testData:B})},150);return()=>window.clearTimeout(ye)},[f,A?.result,ne,M,B]),I.useEffect(()=>{if(w)return;if(h.length===0){localStorage.removeItem(gd),On(!0);return}if(f&&h.some(qe=>qe.id===f))return;const ye=localStorage.getItem(gd),Ae=h.find(qe=>qe.id===ye)??h[0];p(Ae.id)},[f,h,w,p]),I.useEffect(()=>{!w&&f&&localStorage.setItem(gd,f)},[f,w]),I.useEffect(()=>{if(n!=="loading")return;const ye=document.body.style.overflow,Ae=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=ye,document.documentElement.style.overflow=Ae}},[n]),I.useEffect(()=>{if(n!=="loading"){ee(0);return}const ye=window.setInterval(()=>{ee(Ae=>(Ae+1)%ev.length)},1800);return()=>window.clearInterval(ye)},[n]);async function Pn(ye,Ae,qe,Ke,Ht,Tt,$n,kl,yr,jo){const kt=await o(ye,Ae,qe,Ke,Ht,Tt,re,f,$n,kl,yr,jo);if(kt){g(ye,kt,void 0,f,Ke);const Ya=kt.pages.reduce((Fa,Wt)=>Fa+Wt.links.length+Wt.buttons.length+Wt.inputs.length+Wt.textareas.length+Wt.selects.length+(Wt.state?.interactions.length??0),0);if(kt.testCases.length===0||Ya===0){const Fa=kt.issues.map(Wt=>Wt.code).filter((Wt,pa,Dl)=>Dl.indexOf(Wt)===pa);gr({message:"Scout finished, but no usable Test Cases were created.",detail:`Visited ${kt.pages.length} page${kt.pages.length===1?"":"s"} and found ${Ya} testable control${Ya===1?"":"s"}.${Fa.length?` Explorer reported: ${Fa.join(", ")}.`:" The site may show a bot challenge, render content after a delay, or expose no detectable controls. Check Scout Log for details."}`})}else gr(void 0)}}async function Bn(){const ye=ie==="testcases"?Mn:[],Ae=ie==="testdata"?Fn:[];if(ye.length===0&&Ae.length===0){Je("No data is available for export.");return}Qe(!0),Je(void 0);try{await g0(ye,Ae)}catch(qe){Je(qe instanceof hr?qe.message:"Could not export CSV.")}finally{Qe(!1)}}function Ol(ye){const Ae=di?.sourceUrl??ne?.startUrl;if(!Ae){k(ye);return}k(ye.filter(qe=>qe.sourceUrl===Ae))}function Al(){const ye=X(ne?.startUrl??"");_t(ye),Be(ye.id)}function Rl(ye,Ae,qe){const Ke=Y({...X(qe),title:Ae,steps:ye,expectedResult:"The recorded flow completes without an error.",automationStatus:"needs-review"});bt(!1),L("testcases"),Be(Ke.id)}function So(ye){const Ae=A?.targetUrl||ne?.startUrl||"http://localhost:5173",qe=Me[0],Ke=qe??{id:crypto.randomUUID(),name:"Explorer Guided Flow",description:"Steps added from Auto Scout Explorer.",baseUrl:Ae,steps:[{id:crypto.randomUUID(),type:"navigate",path:new URL(Ae).pathname||"/"}],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};E(qe?Me.map(Ht=>Ht.id===qe.id?{...Ht,steps:[...Ht.steps,ye],updatedAt:new Date().toISOString()}:Ht):[{...Ke,steps:[...Ke.steps,ye]}])}return r.jsxs("div",{className:"app-frame",children:[r.jsx(lj,{projects:h,activeProjectId:f,result:ne,collapsed:n==="loading"?!1:ci,onToggleCollapsed:()=>{n!=="loading"&&xo()},onSelect:ye=>vn(()=>{p(ye),dt({}),lt({}),nt("overview"),Be(void 0)}),onNew:()=>On(!0),onDelete:ye=>Nt(h.find(Ae=>Ae.id===ye)),onRename:b,onSettings:()=>{mn("credentials"),bt(!0)},workspaceRoot:N,onOpenWorkspace:C}),r.jsxs("div",{className:"app-main",children:[r.jsxs("header",{className:"app-header",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"brand-mark",children:[r.jsx("span",{children:"LS"}),r.jsx("h1",{children:"LazyScout"}),r.jsxs("a",{className:"guide-link",href:"https://lazyscout.lazyscout.workers.dev/",target:"_blank",rel:"noreferrer","aria-label":"Open LazyScout Guide",title:"Open LazyScout Guide",children:[r.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:r.jsx("path",{d:"M3.5 3.25A2.25 2.25 0 0 1 5.75 1h3A2.25 2.25 0 0 1 11 3.25v13.5A2.75 2.75 0 0 0 8.25 14h-2.5a2.25 2.25 0 0 0-2.25 2.25v-13Zm13 0A2.25 2.25 0 0 0 14.25 1h-3A2.25 2.25 0 0 0 9 3.25v13.5A2.75 2.75 0 0 1 11.75 14h2.5a2.25 2.25 0 0 1 2.25 2.25v-13Z"})}),r.jsx("span",{children:"Guide"})]})]}),r.jsxs("p",{children:["QA workspace ",r.jsx("span",{children:"/"})," Website UI State Explorer"]})]}),A&&!ne&&r.jsx(eg,{view:$e,onChange:ye=>ye==="explorer"?Xe(!0):nt(ye),counts:{cases:M.length,states:0}}),ne&&r.jsxs("div",{className:"header-status",children:[r.jsx("span",{className:"status-dot status-pass"})," Explorer ready ",r.jsx("span",{className:"header-divider"})," ",r.jsx("span",{children:ne.origin})]})]}),r.jsxs("div",{className:"space-y-4",children:[A&&(A.targetUrl||A.mode==="scout")&&r.jsx(Nx,{initialUrl:A?.targetUrl,hasExistingData:!!A?.result?.testCases?.length,initialLanguage:A.testCaseLanguage,loading:n==="loading",onLanguageChange:ye=>f&&O(f,ye),onAnalyze:Pn},f??"new-project"),n==="loading"&&r.jsx("div",{className:"card p-6 text-center text-sm text-slate-600",children:"Playwright is opening the website and collecting page data… This can take a few moments."}),s&&r.jsx(Du,{message:s.message,hint:s.hint}),_&&r.jsx(Du,{message:_,hint:"Check that the LazyScout workspace is writable."}),gt&&r.jsx(Du,{message:gt}),oi&&r.jsx($_,{...oi,onClose:()=>gr(void 0)}),ne&&r.jsxs(r.Fragment,{children:[r.jsx(eg,{view:$e,onChange:ye=>ye==="explorer"?Xe(!0):nt(ye),counts:{cases:M.length,states:ne.actionGraph.states.length}}),$e==="scoutlog"?r.jsx(rj,{result:ne}):$e==="loadtest"?r.jsx(M_,{defaultUrl:A?.targetUrl||ne.startUrl}):$e==="automation"?r.jsx(aj,{testCases:M,projectId:f,secrets:H,blockedKeywords:re,onRunStatus:(ye,Ae)=>{dt(Ke=>({...Ke,[ye]:Ae}));const qe=M.find(Ke=>Ke.id===ye);qe&&T(ye,{...qe,status:Ae})},onRunResult:(ye,Ae)=>{lt(Ke=>({...Ke,[ye]:{...Ae,finishedAt:new Date().toISOString()}}));const qe=Ae.screenshots?.length?Ae.screenshots:Ae.screenshot?[Ae.screenshot]:[];if(qe.forEach(Te),Ae.status==="failed"&&f){const Ke=M.find(Tt=>Tt.id===ye),Ht={id:`bug-${crypto.randomUUID()}`,title:`Automation failed: ${Ke?.title??ye}`,severity:"high",status:"open",testCaseId:ye,actualResult:"The Playwright automation step failed. Open Automation Run Log for details.",expectedResult:Ke?.expectedResult??"The Test Case should complete successfully.",stepsToReproduce:Ke?.steps.map((Tt,$n)=>`${$n+1}. ${Tt.type}`).join(`
58
- `)??"",attachments:qe.map(Tt=>({name:Tt.name,type:"image/png",dataUrl:Tt.dataUrl})),createdAt:new Date().toISOString()};_e(Ht)}}}):$e==="overview"?r.jsxs(r.Fragment,{children:[r.jsx(Sj,{pages:ne.pages.length,testCases:M.length,recordedCases:M.filter(ye=>ye.module==="MANUAL").length,completedRuns:M.filter(ye=>ye.status==="passed"||ye.status==="failed").length,onScout:()=>{const ye=document.getElementById("target-url");ye?(window.scrollTo({top:0,behavior:"smooth"}),window.setTimeout(()=>ye.focus(),250)):On(!0)},onReview:()=>nt("testcases"),onRecord:()=>{mn("recorder"),bt(!0)},onRun:()=>nt("automation"),onExport:()=>{Bn()}}),r.jsx(fj,{result:ne,testCases:M,executionStatuses:ut,runResults:Zt,projectId:f})]}):r.jsxs("div",{className:"workspace-shell",children:[r.jsx(Tx,{result:ne,activeUrl:di?.sourceUrl,onSelect:ye=>Be(M.find(Ae=>Ae.sourceUrl===ye)?.id)}),r.jsxs("main",{className:"workspace-center",children:[r.jsxs("div",{className:"workspace-center-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Current Workspace"}),r.jsx("h2",{children:ie==="testcases"?"Test Case Review":"Test Data"})]}),r.jsxs("div",{className:"center-chips",children:[r.jsxs("span",{className:"status-badge status-badge-pass",children:[M.filter(ye=>ye.automationStatus==="ready").length," ready"]}),r.jsxs("span",{className:"status-badge status-badge-warn",children:[M.filter(ye=>ye.automationStatus==="needs-review").length," review"]})]})]}),r.jsx("div",{className:"grid gap-4",children:r.jsxs("div",{className:"card",children:[r.jsxs("div",{className:"flex gap-1 border-b border-slate-200 px-4 pt-3",children:[r.jsxs("button",{type:"button",onClick:()=>L("testcases"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ie==="testcases"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Cases (",M.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("testdata"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ie==="testdata"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Data (",B.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("apichecks"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ie==="apichecks"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test API (",ne.apiChecks?.length??0,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("bugreports"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ie==="bugreports"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Bug Reports (",Ne.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("screenshots"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ie==="screenshots"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Screenshots (",je.length,")"]})]}),ie==="screenshots"?r.jsx(L_,{screenshots:je,onDelete:Ge}):ie==="bugreports"?r.jsx(k_,{reports:Ne,testCases:M,onSave:_e,onDelete:ae}):ie==="apichecks"?r.jsx(ij,{checks:ne.apiChecks??[],secrets:H}):ie==="testcases"?r.jsxs(r.Fragment,{children:[r.jsx(Gx,{testCases:M}),r.jsx(qx,{filters:me,modules:ha,totalCount:M.length,visibleCount:Mn.length,selectedCount:q.length,exporting:Jt,onFiltersChange:he,onAdd:Al,onImport:()=>Ie(!0),onImportScreenshot:()=>Ot(!0),onRecord:()=>{mn("recorder"),bt(!0)},onDeleteSelected:ui,onExport:Bn}),r.jsx(Hx,{testCases:Mn,selectedIds:q,activeId:Ce,onToggleSelect:v,onToggleAll:R,onOpen:ye=>{Be(ye.id),jt(ye.id)},onEdit:_t,onDelete:Va,onReorder:P,onUpdateCell:Cl,executionStatuses:ut})]}):r.jsxs(r.Fragment,{children:[r.jsx(Vx,{search:le,module:we,modules:Rt,totalCount:B.length,visibleCount:Fn.length,exporting:Jt,onSearchChange:Se,onModuleChange:xe,onAdd:()=>ge(ne.startUrl),onExport:Bn}),r.jsx(Ix,{rows:Fn,onUpdate:J,onDelete:se})]})]})})]})]})]})]}),wt&&r.jsx($x,{testCase:wt,onCancel:()=>_t(null),onSave:ye=>{M.some(Ae=>Ae.id===wt.id)?T(wt.id,ye):Y(ye),Be(ye.id),_t(null)}}),Bt&&W&&r.jsx(Mj,{result:W,testCaseCount:M.length,flows:Me,baseUrl:A?.targetUrl||W.startUrl,projectId:f,secrets:H,onSaveFlows:E,onGenerateTestCase:ye=>{Y(ye),Xe(!1),nt("testcases")},onAddToFlow:So,onClose:()=>Xe(!1),onOpenCases:()=>{Xe(!1),nt("testcases")}}),De&&!wt&&ie==="testcases"&&M.find(ye=>ye.id===De)&&r.jsx(Bx,{testCase:M.find(ye=>ye.id===De),onEdit:()=>_t(M.find(ye=>ye.id===De)),onClose:()=>jt(void 0)}),Xt&&A&&r.jsx(Yj,{projectName:A.name,projectId:A.id,targetUrl:A.targetUrl,secrets:H,onSave:D,onClear:K,onClose:()=>bt(!1),onSaveRecording:Rl,clickFilter:G,onChangeClickFilter:$,initialTab:yt}),gn&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal confirm-delete-modal",role:"dialog","aria-modal":"true",children:[r.jsx("header",{className:"modal-header",children:r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Delete project"}),r.jsxs("h2",{children:["Remove “",gn.name,"”?"]}),r.jsx("p",{children:"The project will be removed from this local workspace. You can undo immediately afterward."})]})}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Nt(void 0),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{const ye=gn;Nt(void 0),j(ye.id).then(()=>vr(`Deleted project ${ye.name}`,()=>x(ye)))},children:"Delete project"})]})]})}),At&&r.jsxs("div",{className:"undo-toast",role:"status","aria-live":"polite",children:[r.jsx("span",{children:At.message}),r.jsx("button",{type:"button",onClick:()=>{At.restore(),An(void 0)},children:"Undo"}),r.jsx("button",{type:"button","aria-label":"Dismiss",onClick:()=>An(void 0),children:"×"})]}),fa&&r.jsx(h1,{sourceUrl:ne?.startUrl??A?.targetUrl??"",initialLanguage:A?.testCaseLanguage,onLanguageChange:ye=>f&&O(f,ye),existingCases:M,onImport:Ol,onClose:()=>Ot(!1)}),He&&r.jsx(b_,{sourceUrl:ne?.startUrl??A?.targetUrl??"",existingCases:M,onImport:Ol,onClose:()=>Ie(!1)}),El&&r.jsx(C_,{projects:h,onClose:()=>On(!1),onScout:ye=>vn(()=>{m(ye,"scout"),u(),dt({}),lt({}),nt("overview"),On(!1)}),onEmpty:ye=>vn(()=>{m(ye,"empty"),u(),dt({}),lt({}),nt("testcases"),On(!1)}),onSample:()=>vn(()=>{m("Practice Login Demo","empty",aN(),"https://practicetestautomation.com/practice-test-login/"),u(),dt({}),lt({}),nt("overview"),On(!1)}),onOpenProject:ye=>vn(()=>{p(ye),u(),dt({}),lt({}),nt("overview"),On(!1)})}),n==="loading"&&r.jsx("div",{className:"scout-lock",role:"status","aria-live":"polite",children:r.jsxs("div",{className:"scout-lock-card",children:[r.jsxs("div",{className:"scout-progress-head",children:[r.jsx("div",{className:"scout-progress-icon",children:"✦"}),r.jsxs("div",{children:[r.jsx("b",{children:"Scouting website with Playwright"}),r.jsx("span",{children:"Collecting pages, controls and event logs."})]})]}),r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"scout-progress-track",children:r.jsx("i",{})}),r.jsx("strong",{className:"scout-progress-percent",children:"Working…"}),r.jsxs("code",{className:"scout-cli-line",children:["$ ",ev[U],"…"]})]}),r.jsx("span",{children:"Please wait until Scout finishes."})]})}),pr&&r.jsx("div",{className:"navigation-loader",children:r.jsxs("div",{children:[r.jsx("span",{children:"LS"}),r.jsx("b",{children:"Opening workspace"}),r.jsx("small",{children:"Preparing your local QA tools…"})]})})]})]})}function ly(n){const l=new URL(n);return{startUrl:n,origin:l.origin,pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function aN(){const n="https://practicetestautomation.com/practice-test-login/",l=ly(n);return l.origin=new URL(n).origin,l.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:n},{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:n,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:n},{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:n},{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:n},{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:n}],l}Sx.createRoot(document.getElementById("root")).render(r.jsx(I.StrictMode,{children:r.jsx(wx,{children:r.jsx(nN,{})})}));