(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))c(s);new MutationObserver(s=>{for(const y of s)if(y.type==="childList")for(const E of y.addedNodes)E.tagName==="LINK"&&E.rel==="modulepreload"&&c(E)}).observe(document,{childList:!0,subtree:!0});function h(s){const y={};return s.integrity&&(y.integrity=s.integrity),s.referrerPolicy&&(y.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?y.credentials="include":s.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function c(s){if(s.ep)return;s.ep=!0;const y=h(s);fetch(s.href,y)}})();function am(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var Df={exports:{}},jn={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Vh;function nm(){if(Vh)return jn;Vh=1;var f=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function h(c,s,y){var E=null;if(y!==void 0&&(E=""+y),s.key!==void 0&&(E=""+s.key),"key"in s){y={};for(var p in s)p!=="key"&&(y[p]=s[p])}else y=s;return s=y.ref,{$$typeof:f,type:c,key:E,ref:s!==void 0?s:null,props:y}}return jn.Fragment=o,jn.jsx=h,jn.jsxs=h,jn}var Jh;function um(){return Jh||(Jh=1,Df.exports=nm()),Df.exports}var U=um(),Cf={exports:{}},nt={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Kh;function im(){if(Kh)return nt;Kh=1;var f=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),E=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),J=Symbol.iterator;function $(m){return m===null||typeof m!="object"?null:(m=J&&m[J]||m["@@iterator"],typeof m=="function"?m:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,q={};function Z(m,_,w){this.props=m,this.context=_,this.refs=q,this.updater=w||Q}Z.prototype.isReactComponent={},Z.prototype.setState=function(m,_){if(typeof m!="object"&&typeof m!="function"&&m!=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,m,_,"setState")},Z.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function P(){}P.prototype=Z.prototype;function et(m,_,w){this.props=m,this.context=_,this.refs=q,this.updater=w||Q}var Rt=et.prototype=new P;Rt.constructor=et,N(Rt,Z.prototype),Rt.isPureReactComponent=!0;var Lt=Array.isArray;function At(){}var tt={H:null,A:null,T:null,S:null},Nt=Object.prototype.hasOwnProperty;function R(m,_,w){var Y=w.ref;return{$$typeof:f,type:m,key:_,ref:Y!==void 0?Y:null,props:w}}function Dt(m,_){return R(m.type,_,m.props)}function xt(m){return typeof m=="object"&&m!==null&&m.$$typeof===f}function j(m){var _={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(w){return _[w]})}var I=/\/+/g;function _t(m,_){return typeof m=="object"&&m!==null&&m.key!=null?j(""+m.key):_.toString(36)}function gt(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(At,At):(m.status="pending",m.then(function(_){m.status==="pending"&&(m.status="fulfilled",m.value=_)},function(_){m.status==="pending"&&(m.status="rejected",m.reason=_)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function O(m,_,w,Y,F){var at=typeof m;(at==="undefined"||at==="boolean")&&(m=null);var rt=!1;if(m===null)rt=!0;else switch(at){case"bigint":case"string":case"number":rt=!0;break;case"object":switch(m.$$typeof){case f:case o:rt=!0;break;case G:return rt=m._init,O(rt(m._payload),_,w,Y,F)}}if(rt)return F=F(m),rt=Y===""?"."+_t(m,0):Y,Lt(F)?(w="",rt!=null&&(w=rt.replace(I,"$&/")+"/"),O(F,_,w,"",function(Cl){return Cl})):F!=null&&(xt(F)&&(F=Dt(F,w+(F.key==null||m&&m.key===F.key?"":(""+F.key).replace(I,"$&/")+"/")+rt)),_.push(F)),1;rt=0;var Vt=Y===""?".":Y+":";if(Lt(m))for(var Ut=0;Ut>>1,lt=O[k];if(0>>1;ks(w,H))Ys(F,w)?(O[k]=F,O[Y]=H,k=Y):(O[k]=w,O[_]=H,k=_);else if(Ys(F,H))O[k]=F,O[Y]=H,k=Y;else break t}}return L}function s(O,L){var H=O.sortIndex-L.sortIndex;return H!==0?H:O.id-L.id}if(f.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;f.unstable_now=function(){return y.now()}}else{var E=Date,p=E.now();f.unstable_now=function(){return E.now()-p}}var z=[],v=[],G=1,B=null,J=3,$=!1,Q=!1,N=!1,q=!1,Z=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,et=typeof setImmediate<"u"?setImmediate:null;function Rt(O){for(var L=h(v);L!==null;){if(L.callback===null)c(v);else if(L.startTime<=O)c(v),L.sortIndex=L.expirationTime,o(z,L);else break;L=h(v)}}function Lt(O){if(N=!1,Rt(O),!Q)if(h(z)!==null)Q=!0,At||(At=!0,j());else{var L=h(v);L!==null&>(Lt,L.startTime-O)}}var At=!1,tt=-1,Nt=5,R=-1;function Dt(){return q?!0:!(f.unstable_now()-RO&&Dt());){var k=B.callback;if(typeof k=="function"){B.callback=null,J=B.priorityLevel;var lt=k(B.expirationTime<=O);if(O=f.unstable_now(),typeof lt=="function"){B.callback=lt,Rt(O),L=!0;break e}B===h(z)&&c(z),Rt(O)}else c(z);B=h(z)}if(B!==null)L=!0;else{var m=h(v);m!==null&>(Lt,m.startTime-O),L=!1}}break t}finally{B=null,J=H,$=!1}L=void 0}}finally{L?j():At=!1}}}var j;if(typeof et=="function")j=function(){et(xt)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,_t=I.port2;I.port1.onmessage=xt,j=function(){_t.postMessage(null)}}else j=function(){Z(xt,0)};function gt(O,L){tt=Z(function(){O(f.unstable_now())},L)}f.unstable_IdlePriority=5,f.unstable_ImmediatePriority=1,f.unstable_LowPriority=4,f.unstable_NormalPriority=3,f.unstable_Profiling=null,f.unstable_UserBlockingPriority=2,f.unstable_cancelCallback=function(O){O.callback=null},f.unstable_forceFrameRate=function(O){0>O||125k?(O.sortIndex=H,o(v,O),h(z)===null&&O===h(v)&&(N?(P(tt),tt=-1):N=!0,gt(Lt,H-k))):(O.sortIndex=lt,o(z,O),Q||$||(Q=!0,At||(At=!0,j()))),O},f.unstable_shouldYield=Dt,f.unstable_wrapCallback=function(O){var L=J;return function(){var H=J;J=L;try{return O.apply(this,arguments)}finally{J=H}}}})(jf)),jf}var Wh;function fm(){return Wh||(Wh=1,Hf.exports=cm()),Hf.exports}var Rf={exports:{}},le={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Fh;function sm(){if(Fh)return le;Fh=1;var f=Gf();function o(z){var v="https://react.dev/errors/"+z;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(o){console.error(o)}}return f(),Rf.exports=sm(),Rf.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ph;function om(){if(Ph)return Rn;Ph=1;var f=fm(),o=Gf(),h=rm();function c(t){var e="https://react.dev/errors/"+t;if(1lt||(t.current=k[lt],k[lt]=null,lt--)}function w(t,e){lt++,k[lt]=t.current,t.current=e}var Y=m(null),F=m(null),at=m(null),rt=m(null);function Vt(t,e){switch(w(at,e),w(F,t),w(Y,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?mh(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=mh(e),t=vh(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}_(Y),w(Y,t)}function Ut(){_(Y),_(F),_(at)}function Cl(t){t.memoizedState!==null&&w(rt,t);var e=Y.current,l=vh(e,t.type);e!==l&&(w(F,t),w(Y,l))}function wn(t){F.current===t&&(_(Y),_(F)),rt.current===t&&(_(rt),Dn._currentValue=H)}var oi,Xf;function Ul(t){if(oi===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);oi=e&&e[1]||"",Xf=-1)":-1n||d[a]!==b[n]){var M=` `+d[a].replace(" at new "," at ");return t.displayName&&M.includes("")&&(M=M.replace("",t.displayName)),M}while(1<=a&&0<=n);break}}}finally{hi=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Ul(l):""}function j0(t,e){switch(t.tag){case 26:case 27:case 5:return Ul(t.type);case 16:return Ul("Lazy");case 13:return t.child!==e&&e!==null?Ul("Suspense Fallback"):Ul("Suspense");case 19:return Ul("SuspenseList");case 0:case 15:return di(t.type,!1);case 11:return di(t.type.render,!1);case 1:return di(t.type,!0);case 31:return Ul("Activity");default:return""}}function Zf(t){try{var e="",l=null;do e+=j0(t,l),l=t,t=t.return;while(t);return e}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var mi=Object.prototype.hasOwnProperty,vi=f.unstable_scheduleCallback,gi=f.unstable_cancelCallback,R0=f.unstable_shouldYield,q0=f.unstable_requestPaint,me=f.unstable_now,B0=f.unstable_getCurrentPriorityLevel,Vf=f.unstable_ImmediatePriority,Jf=f.unstable_UserBlockingPriority,Ln=f.unstable_NormalPriority,w0=f.unstable_LowPriority,Kf=f.unstable_IdlePriority,L0=f.log,Y0=f.unstable_setDisableYieldValue,Ga=null,ve=null;function il(t){if(typeof L0=="function"&&Y0(t),ve&&typeof ve.setStrictMode=="function")try{ve.setStrictMode(Ga,t)}catch{}}var ge=Math.clz32?Math.clz32:X0,G0=Math.log,Q0=Math.LN2;function X0(t){return t>>>=0,t===0?32:31-(G0(t)/Q0|0)|0}var Yn=256,Gn=262144,Qn=4194304;function Hl(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Xn(t,e,l){var a=t.pendingLanes;if(a===0)return 0;var n=0,u=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var r=a&134217727;return r!==0?(a=r&~u,a!==0?n=Hl(a):(i&=r,i!==0?n=Hl(i):l||(l=r&~t,l!==0&&(n=Hl(l))))):(r=a&~u,r!==0?n=Hl(r):i!==0?n=Hl(i):l||(l=a&~t,l!==0&&(n=Hl(l)))),n===0?0:e!==0&&e!==n&&(e&u)===0&&(u=n&-n,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:n}function Qa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Z0(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 $f(){var t=Qn;return Qn<<=1,(Qn&62914560)===0&&(Qn=4194304),t}function yi(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Xa(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function V0(t,e,l,a,n,u){var i=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var r=t.entanglements,d=t.expirationTimes,b=t.hiddenUpdates;for(l=i&~l;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var F0=/[\n"\\]/g;function Ae(t){return t.replace(F0,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function xi(t,e,l,a,n,u,i,r){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),e!=null?i==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+ze(e)):t.value!==""+ze(e)&&(t.value=""+ze(e)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),e!=null?zi(t,i,ze(e)):l!=null?zi(t,i,ze(l)):a!=null&&t.removeAttribute("value"),n==null&&u!=null&&(t.defaultChecked=!!u),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.name=""+ze(r):t.removeAttribute("name")}function cs(t,e,l,a,n,u,i,r){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){Ei(t);return}l=l!=null?""+ze(l):"",e=e!=null?""+ze(e):l,r||e===t.value||(t.value=e),t.defaultValue=e}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=r?t.checked:!!a,t.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),Ei(t)}function zi(t,e,l){e==="number"&&Jn(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function aa(t,e,l,a){if(t=t.options,e){e={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ni=!1;if(Xe)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){Ni=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{Ni=!1}var fl=null,Di=null,$n=null;function ms(){if($n)return $n;var t,e=Di,l=e.length,a,n="value"in fl?fl.value:fl.textContent,u=n.length;for(t=0;t=Wa),Ts=" ",bs=!1;function Es(t,e){switch(t){case"keyup":return Ad.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xs(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ca=!1;function Od(t,e){switch(t){case"compositionend":return xs(e);case"keypress":return e.which!==32?null:(bs=!0,Ts);case"textInput":return t=e.data,t===Ts&&bs?null:t;default:return null}}function Md(t,e){if(ca)return t==="compositionend"||!Ri&&Es(t,e)?(t=ms(),$n=Di=fl=null,ca=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:l,offset:e-t};t=a}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Cs(l)}}function Hs(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Hs(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function js(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Jn(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Jn(t.document)}return e}function wi(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var qd=Xe&&"documentMode"in document&&11>=document.documentMode,fa=null,Li=null,tn=null,Yi=!1;function Rs(t,e,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Yi||fa==null||fa!==Jn(a)||(a=fa,"selectionStart"in a&&wi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),tn&&Pa(tn,a)||(tn=a,a=Gu(Li,"onSelect"),0>=i,n-=i,Be=1<<32-ge(e)+n|l<it?(ht=V,V=null):ht=V.sibling;var vt=x(S,V,T[it],D);if(vt===null){V===null&&(V=ht);break}t&&V&&vt.alternate===null&&e(S,V),g=u(vt,g,it),mt===null?K=vt:mt.sibling=vt,mt=vt,V=ht}if(it===T.length)return l(S,V),dt&&Ve(S,it),K;if(V===null){for(;itit?(ht=V,V=null):ht=V.sibling;var Dl=x(S,V,vt.value,D);if(Dl===null){V===null&&(V=ht);break}t&&V&&Dl.alternate===null&&e(S,V),g=u(Dl,g,it),mt===null?K=Dl:mt.sibling=Dl,mt=Dl,V=ht}if(vt.done)return l(S,V),dt&&Ve(S,it),K;if(V===null){for(;!vt.done;it++,vt=T.next())vt=C(S,vt.value,D),vt!==null&&(g=u(vt,g,it),mt===null?K=vt:mt.sibling=vt,mt=vt);return dt&&Ve(S,it),K}for(V=a(V);!vt.done;it++,vt=T.next())vt=A(V,S,it,vt.value,D),vt!==null&&(t&&vt.alternate!==null&&V.delete(vt.key===null?it:vt.key),g=u(vt,g,it),mt===null?K=vt:mt.sibling=vt,mt=vt);return t&&V.forEach(function(lm){return e(S,lm)}),dt&&Ve(S,it),K}function Et(S,g,T,D){if(typeof T=="object"&&T!==null&&T.type===N&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case $:t:{for(var K=T.key;g!==null;){if(g.key===K){if(K=T.type,K===N){if(g.tag===7){l(S,g.sibling),D=n(g,T.props.children),D.return=S,S=D;break t}}else if(g.elementType===K||typeof K=="object"&&K!==null&&K.$$typeof===Nt&&Zl(K)===g.type){l(S,g.sibling),D=n(g,T.props),cn(D,T),D.return=S,S=D;break t}l(S,g);break}else e(S,g);g=g.sibling}T.type===N?(D=Ll(T.props.children,S.mode,D,T.key),D.return=S,S=D):(D=nu(T.type,T.key,T.props,null,S.mode,D),cn(D,T),D.return=S,S=D)}return i(S);case Q:t:{for(K=T.key;g!==null;){if(g.key===K)if(g.tag===4&&g.stateNode.containerInfo===T.containerInfo&&g.stateNode.implementation===T.implementation){l(S,g.sibling),D=n(g,T.children||[]),D.return=S,S=D;break t}else{l(S,g);break}else e(S,g);g=g.sibling}D=Ki(T,S.mode,D),D.return=S,S=D}return i(S);case Nt:return T=Zl(T),Et(S,g,T,D)}if(gt(T))return X(S,g,T,D);if(j(T)){if(K=j(T),typeof K!="function")throw Error(c(150));return T=K.call(T),W(S,g,T,D)}if(typeof T.then=="function")return Et(S,g,ou(T),D);if(T.$$typeof===et)return Et(S,g,cu(S,T),D);hu(S,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,g!==null&&g.tag===6?(l(S,g.sibling),D=n(g,T),D.return=S,S=D):(l(S,g),D=Ji(T,S.mode,D),D.return=S,S=D),i(S)):l(S,g)}return function(S,g,T,D){try{un=0;var K=Et(S,g,T,D);return pa=null,K}catch(V){if(V===Sa||V===su)throw V;var mt=Se(29,V,null,S.mode);return mt.lanes=D,mt.return=S,mt}finally{}}}var Jl=nr(!0),ur=nr(!1),dl=!1;function uc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ic(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ml(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function vl(t,e,l){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(yt&2)!==0){var n=a.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),a.pending=e,e=au(t),Qs(t,null,l),e}return lu(t,a,e,l),au(t)}function fn(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,Wf(t,l)}}function cc(t,e){var l=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?n=u=e:u=u.next=e}else n=u=e;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var fc=!1;function sn(){if(fc){var t=ya;if(t!==null)throw t}}function rn(t,e,l,a){fc=!1;var n=t.updateQueue;dl=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,r=n.shared.pending;if(r!==null){n.shared.pending=null;var d=r,b=d.next;d.next=null,i===null?u=b:i.next=b,i=d;var M=t.alternate;M!==null&&(M=M.updateQueue,r=M.lastBaseUpdate,r!==i&&(r===null?M.firstBaseUpdate=b:r.next=b,M.lastBaseUpdate=d))}if(u!==null){var C=n.baseState;i=0,M=b=d=null,r=u;do{var x=r.lane&-536870913,A=x!==r.lane;if(A?(ot&x)===x:(a&x)===x){x!==0&&x===ga&&(fc=!0),M!==null&&(M=M.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});t:{var X=t,W=r;x=e;var Et=l;switch(W.tag){case 1:if(X=W.payload,typeof X=="function"){C=X.call(Et,C,x);break t}C=X;break t;case 3:X.flags=X.flags&-65537|128;case 0:if(X=W.payload,x=typeof X=="function"?X.call(Et,C,x):X,x==null)break t;C=B({},C,x);break t;case 2:dl=!0}}x=r.callback,x!==null&&(t.flags|=64,A&&(t.flags|=8192),A=n.callbacks,A===null?n.callbacks=[x]:A.push(x))}else A={lane:x,tag:r.tag,payload:r.payload,callback:r.callback,next:null},M===null?(b=M=A,d=C):M=M.next=A,i|=x;if(r=r.next,r===null){if(r=n.shared.pending,r===null)break;A=r,r=A.next,A.next=null,n.lastBaseUpdate=A,n.shared.pending=null}}while(!0);M===null&&(d=C),n.baseState=d,n.firstBaseUpdate=b,n.lastBaseUpdate=M,u===null&&(n.shared.lanes=0),Tl|=i,t.lanes=i,t.memoizedState=C}}function ir(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function cr(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;tu?u:8;var i=O.T,r={};O.T=r,Oc(t,!1,e,l);try{var d=n(),b=O.S;if(b!==null&&b(r,d),d!==null&&typeof d=="object"&&typeof d.then=="function"){var M=Vd(d,a);dn(t,e,M,xe(t))}else dn(t,e,a,xe(t))}catch(C){dn(t,e,{then:function(){},status:"rejected",reason:C},xe())}finally{L.p=u,i!==null&&r.types!==null&&(i.types=r.types),O.T=i}}function Fd(){}function Ac(t,e,l,a){if(t.tag!==5)throw Error(c(476));var n=Lr(t).queue;wr(t,n,e,H,l===null?Fd:function(){return Yr(t),l(a)})}function Lr(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ke,lastRenderedState:H},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ke,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Yr(t){var e=Lr(t);e.next===null&&(e=t.alternate.memoizedState),dn(t,e.next.queue,{},xe())}function _c(){return It(Dn)}function Gr(){return Bt().memoizedState}function Qr(){return Bt().memoizedState}function Id(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=xe();t=ml(l);var a=vl(e,t,l);a!==null&&(oe(a,e,l),fn(a,e,l)),e={cache:ec()},t.payload=e;return}e=e.return}}function Pd(t,e,l){var a=xe();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Eu(t)?Zr(e,l):(l=Zi(t,e,l,a),l!==null&&(oe(l,t,a),Vr(l,e,a)))}function Xr(t,e,l){var a=xe();dn(t,e,l,a)}function dn(t,e,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Eu(t))Zr(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var i=e.lastRenderedState,r=u(i,l);if(n.hasEagerState=!0,n.eagerState=r,ye(r,i))return lu(t,e,n,0),zt===null&&eu(),!1}catch{}finally{}if(l=Zi(t,e,n,a),l!==null)return oe(l,t,a),Vr(l,e,a),!0}return!1}function Oc(t,e,l,a){if(a={lane:2,revertLane:uf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Eu(t)){if(e)throw Error(c(479))}else e=Zi(t,l,a,2),e!==null&&oe(e,t,2)}function Eu(t){var e=t.alternate;return t===ut||e!==null&&e===ut}function Zr(t,e){ba=vu=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Vr(t,e,l){if((l&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,Wf(t,l)}}var mn={readContext:It,use:Su,useCallback:Ht,useContext:Ht,useEffect:Ht,useImperativeHandle:Ht,useLayoutEffect:Ht,useInsertionEffect:Ht,useMemo:Ht,useReducer:Ht,useRef:Ht,useState:Ht,useDebugValue:Ht,useDeferredValue:Ht,useTransition:Ht,useSyncExternalStore:Ht,useId:Ht,useHostTransitionStatus:Ht,useFormState:Ht,useActionState:Ht,useOptimistic:Ht,useMemoCache:Ht,useCacheRefresh:Ht};mn.useEffectEvent=Ht;var Jr={readContext:It,use:Su,useCallback:function(t,e){return ne().memoizedState=[t,e===void 0?null:e],t},useContext:It,useEffect:Nr,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Tu(4194308,4,Hr.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Tu(4194308,4,t,e)},useInsertionEffect:function(t,e){Tu(4,2,t,e)},useMemo:function(t,e){var l=ne();e=e===void 0?null:e;var a=t();if(Kl){il(!0);try{t()}finally{il(!1)}}return l.memoizedState=[a,e],a},useReducer:function(t,e,l){var a=ne();if(l!==void 0){var n=l(e);if(Kl){il(!0);try{l(e)}finally{il(!1)}}}else n=e;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=Pd.bind(null,ut,t),[a.memoizedState,t]},useRef:function(t){var e=ne();return t={current:t},e.memoizedState=t},useState:function(t){t=Tc(t);var e=t.queue,l=Xr.bind(null,ut,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:xc,useDeferredValue:function(t,e){var l=ne();return zc(l,t,e)},useTransition:function(){var t=Tc(!1);return t=wr.bind(null,ut,t.queue,!0,!1),ne().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var a=ut,n=ne();if(dt){if(l===void 0)throw Error(c(407));l=l()}else{if(l=e(),zt===null)throw Error(c(349));(ot&127)!==0||dr(a,e,l)}n.memoizedState=l;var u={value:l,getSnapshot:e};return n.queue=u,Nr(vr.bind(null,a,u,t),[t]),a.flags|=2048,xa(9,{destroy:void 0},mr.bind(null,a,u,l,e),null),l},useId:function(){var t=ne(),e=zt.identifierPrefix;if(dt){var l=we,a=Be;l=(a&~(1<<32-ge(a)-1)).toString(32)+l,e="_"+e+"R_"+l,l=gu++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[Wt]=e,u[ue]=a;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=u;t:switch(te(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&Fe(e)}}return Mt(e),Gc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&Fe(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(c(166));if(t=at.current,ma(e)){if(t=e.stateNode,l=e.memoizedProps,a=null,n=Ft,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[Wt]=e,t=!!(t.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||hh(t.nodeValue,l)),t||ol(e,!0)}else t=Qu(t).createTextNode(a),t[Wt]=e,e.stateNode=t}return Mt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(a=ma(e),l!==null){if(t===null){if(!a)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[Wt]=e}else Yl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Mt(e),t=!1}else l=Fi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(Te(e),e):(Te(e),null);if((e.flags&128)!==0)throw Error(c(558))}return Mt(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=ma(e),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(c(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));n[Wt]=e}else Yl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Mt(e),n=!1}else n=Fi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?(Te(e),e):(Te(e),null)}return Te(e),(e.flags&128)!==0?(e.lanes=l,e):(l=a!==null,t=t!==null&&t.memoizedState!==null,l&&(a=e.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Ou(e,e.updateQueue),Mt(e),null);case 4:return Ut(),t===null&&rf(e.stateNode.containerInfo),Mt(e),null;case 10:return Ke(e.type),Mt(e),null;case 19:if(_(qt),a=e.memoizedState,a===null)return Mt(e),null;if(n=(e.flags&128)!==0,u=a.rendering,u===null)if(n)gn(a,!1);else{if(jt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=mu(t),u!==null){for(e.flags|=128,gn(a,!1),t=u.updateQueue,e.updateQueue=t,Ou(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Xs(l,t),l=l.sibling;return w(qt,qt.current&1|2),dt&&Ve(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&me()>Uu&&(e.flags|=128,n=!0,gn(a,!1),e.lanes=4194304)}else{if(!n)if(t=mu(u),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,Ou(e,t),gn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!dt)return Mt(e),null}else 2*me()-a.renderingStartTime>Uu&&l!==536870912&&(e.flags|=128,n=!0,gn(a,!1),e.lanes=4194304);a.isBackwards?(u.sibling=e.child,e.child=u):(t=a.last,t!==null?t.sibling=u:e.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=me(),t.sibling=null,l=qt.current,w(qt,n?l&1|2:l&1),dt&&Ve(e,a.treeForkCount),t):(Mt(e),null);case 22:case 23:return Te(e),rc(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(l&536870912)!==0&&(e.flags&128)===0&&(Mt(e),e.subtreeFlags&6&&(e.flags|=8192)):Mt(e),l=e.updateQueue,l!==null&&Ou(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==l&&(e.flags|=2048),t!==null&&_(Xl),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Ke(Yt),Mt(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function n1(t,e){switch(ki(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ke(Yt),Ut(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return wn(e),null;case 31:if(e.memoizedState!==null){if(Te(e),e.alternate===null)throw Error(c(340));Yl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Te(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));Yl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _(qt),null;case 4:return Ut(),null;case 10:return Ke(e.type),null;case 22:case 23:return Te(e),rc(),t!==null&&_(Xl),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ke(Yt),null;case 25:return null;default:return null}}function yo(t,e){switch(ki(e),e.tag){case 3:Ke(Yt),Ut();break;case 26:case 27:case 5:wn(e);break;case 4:Ut();break;case 31:e.memoizedState!==null&&Te(e);break;case 13:Te(e);break;case 19:_(qt);break;case 10:Ke(e.type);break;case 22:case 23:Te(e),rc(),t!==null&&_(Xl);break;case 24:Ke(Yt)}}function yn(t,e){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&t)===t){a=void 0;var u=l.create,i=l.inst;a=u(),i.destroy=a}l=l.next}while(l!==n)}}catch(r){pt(e,e.return,r)}}function Sl(t,e,l){try{var a=e.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&t)===t){var i=a.inst,r=i.destroy;if(r!==void 0){i.destroy=void 0,n=e;var d=l,b=r;try{b()}catch(M){pt(n,d,M)}}}a=a.next}while(a!==u)}}catch(M){pt(e,e.return,M)}}function So(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{cr(e,l)}catch(a){pt(t,t.return,a)}}}function po(t,e,l){l.props=$l(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(a){pt(t,e,a)}}function Sn(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof l=="function"?t.refCleanup=l(a):l.current=a}}catch(n){pt(t,e,n)}}function Le(t,e){var l=t.ref,a=t.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){pt(t,e,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){pt(t,e,n)}else l.current=null}function To(t){var e=t.type,l=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break t;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){pt(t,t.return,n)}}function Qc(t,e,l){try{var a=t.stateNode;_1(a,t.type,l,e),a[ue]=e}catch(n){pt(t,t.return,n)}}function bo(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Al(t.type)||t.tag===4}function Xc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||bo(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Al(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zc(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Qe));else if(a!==4&&(a===27&&Al(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Zc(t,e,l),t=t.sibling;t!==null;)Zc(t,e,l),t=t.sibling}function Mu(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(a!==4&&(a===27&&Al(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Mu(t,e,l),t=t.sibling;t!==null;)Mu(t,e,l),t=t.sibling}function Eo(t){var e=t.stateNode,l=t.memoizedProps;try{for(var a=t.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);te(e,a,l),e[Wt]=t,e[ue]=l}catch(u){pt(t,t.return,u)}}var Ie=!1,Xt=!1,Vc=!1,xo=typeof WeakSet=="function"?WeakSet:Set,kt=null;function u1(t,e){if(t=t.containerInfo,df=ku,t=js(t),wi(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break t}var i=0,r=-1,d=-1,b=0,M=0,C=t,x=null;e:for(;;){for(var A;C!==l||n!==0&&C.nodeType!==3||(r=i+n),C!==u||a!==0&&C.nodeType!==3||(d=i+a),C.nodeType===3&&(i+=C.nodeValue.length),(A=C.firstChild)!==null;)x=C,C=A;for(;;){if(C===t)break e;if(x===l&&++b===n&&(r=i),x===u&&++M===a&&(d=i),(A=C.nextSibling)!==null)break;C=x,x=C.parentNode}C=A}l=r===-1||d===-1?null:{start:r,end:d}}else l=null}l=l||{start:0,end:0}}else l=null;for(mf={focusedElem:t,selectionRange:l},ku=!1,kt=e;kt!==null;)if(e=kt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,kt=t;else for(;kt!==null;){switch(e=kt,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l title"))),te(u,a,l),u[Wt]=t,$t(u),a=u;break t;case"link":var i=Nh("link","href",n).get(a+(l.href||""));if(i){for(var r=0;rEt&&(i=Et,Et=W,W=i);var S=Us(r,W),g=Us(r,Et);if(S&&g&&(A.rangeCount!==1||A.anchorNode!==S.node||A.anchorOffset!==S.offset||A.focusNode!==g.node||A.focusOffset!==g.offset)){var T=C.createRange();T.setStart(S.node,S.offset),A.removeAllRanges(),W>Et?(A.addRange(T),A.extend(g.node,g.offset)):(T.setEnd(g.node,g.offset),A.addRange(T))}}}}for(C=[],A=r;A=A.parentNode;)A.nodeType===1&&C.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;rl?32:l,O.T=null,l=Ic,Ic=null;var u=El,i=al;if(Jt=0,Ma=El=null,al=0,(yt&6)!==0)throw Error(c(331));var r=yt;if(yt|=4,jo(u.current),Co(u,u.current,i,l),yt=r,zn(0,!1),ve&&typeof ve.onPostCommitFiberRoot=="function")try{ve.onPostCommitFiberRoot(Ga,u)}catch{}return!0}finally{L.p=n,O.T=a,Io(t,e)}}function th(t,e,l){e=Oe(l,e),e=Cc(t.stateNode,e,2),t=vl(t,e,2),t!==null&&(Xa(t,2),Ye(t))}function pt(t,e,l){if(t.tag===3)th(t,t,l);else for(;e!==null;){if(e.tag===3){th(e,t,l);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(bl===null||!bl.has(a))){t=Oe(l,t),l=to(2),a=vl(e,l,2),a!==null&&(eo(l,a,e,t),Xa(a,2),Ye(a));break}}e=e.return}}function lf(t,e,l){var a=t.pingCache;if(a===null){a=t.pingCache=new f1;var n=new Set;a.set(e,n)}else n=a.get(e),n===void 0&&(n=new Set,a.set(e,n));n.has(l)||($c=!0,n.add(l),t=d1.bind(null,t,e,l),e.then(t,t))}function d1(t,e,l){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,zt===t&&(ot&l)===l&&(jt===4||jt===3&&(ot&62914560)===ot&&300>me()-Cu?(yt&2)===0&&Na(t,0):kc|=l,Oa===ot&&(Oa=0)),Ye(t)}function eh(t,e){e===0&&(e=$f()),t=wl(t,e),t!==null&&(Xa(t,e),Ye(t))}function m1(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),eh(t,l)}function v1(t,e){var l=0;switch(t.tag){case 31:case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(e),eh(t,l)}function g1(t,e){return vi(t,e)}var wu=null,Ca=null,af=!1,Lu=!1,nf=!1,zl=0;function Ye(t){t!==Ca&&t.next===null&&(Ca===null?wu=Ca=t:Ca=Ca.next=t),Lu=!0,af||(af=!0,S1())}function zn(t,e){if(!nf&&Lu){nf=!0;do for(var l=!1,a=wu;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,r=a.pingedLanes;u=(1<<31-ge(42|t)+1)-1,u&=n&~(i&~r),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,uh(a,u))}else u=ot,u=Xn(a,a===zt?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Qa(a,u)||(l=!0,uh(a,u));a=a.next}while(l);nf=!1}}function y1(){lh()}function lh(){Lu=af=!1;var t=0;zl!==0&&M1()&&(t=zl);for(var e=me(),l=null,a=wu;a!==null;){var n=a.next,u=ah(a,e);u===0?(a.next=null,l===null?wu=n:l.next=n,n===null&&(Ca=l)):(l=a,(t!==0||(u&3)!==0)&&(Lu=!0)),a=n}Jt!==0&&Jt!==5||zn(t),zl!==0&&(zl=0)}function ah(t,e){for(var l=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0r)break;var M=d.transferSize,C=d.initiatorType;M&&dh(C)&&(d=d.responseEnd,i+=M*(d"u"?null:document;function Ah(t,e,l){var a=Ua;if(a&&typeof e=="string"&&e){var n=Ae(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),zh.has(n)||(zh.add(n),t={rel:t,crossOrigin:l,href:e},a.querySelector(n)===null&&(e=a.createElement("link"),te(e,"link",t),$t(e),a.head.appendChild(e)))}}function B1(t){nl.D(t),Ah("dns-prefetch",t,null)}function w1(t,e){nl.C(t,e),Ah("preconnect",t,e)}function L1(t,e,l){nl.L(t,e,l);var a=Ua;if(a&&t&&e){var n='link[rel="preload"][as="'+Ae(e)+'"]';e==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Ae(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Ae(l.imageSizes)+'"]')):n+='[href="'+Ae(t)+'"]';var u=n;switch(e){case"style":u=Ha(t);break;case"script":u=ja(t)}He.has(u)||(t=B({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),He.set(u,t),a.querySelector(n)!==null||e==="style"&&a.querySelector(Mn(u))||e==="script"&&a.querySelector(Nn(u))||(e=a.createElement("link"),te(e,"link",t),$t(e),a.head.appendChild(e)))}}function Y1(t,e){nl.m(t,e);var l=Ua;if(l&&t){var a=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Ae(a)+'"][href="'+Ae(t)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ja(t)}if(!He.has(u)&&(t=B({rel:"modulepreload",href:t},e),He.set(u,t),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Nn(u)))return}a=l.createElement("link"),te(a,"link",t),$t(a),l.head.appendChild(a)}}}function G1(t,e,l){nl.S(t,e,l);var a=Ua;if(a&&t){var n=ea(a).hoistableStyles,u=Ha(t);e=e||"default";var i=n.get(u);if(!i){var r={loading:0,preload:null};if(i=a.querySelector(Mn(u)))r.loading=5;else{t=B({rel:"stylesheet",href:t,"data-precedence":e},l),(l=He.get(u))&&bf(t,l);var d=i=a.createElement("link");$t(d),te(d,"link",t),d._p=new Promise(function(b,M){d.onload=b,d.onerror=M}),d.addEventListener("load",function(){r.loading|=1}),d.addEventListener("error",function(){r.loading|=2}),r.loading|=4,Zu(i,e,a)}i={type:"stylesheet",instance:i,count:1,state:r},n.set(u,i)}}}function Q1(t,e){nl.X(t,e);var l=Ua;if(l&&t){var a=ea(l).hoistableScripts,n=ja(t),u=a.get(n);u||(u=l.querySelector(Nn(n)),u||(t=B({src:t,async:!0},e),(e=He.get(n))&&Ef(t,e),u=l.createElement("script"),$t(u),te(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function X1(t,e){nl.M(t,e);var l=Ua;if(l&&t){var a=ea(l).hoistableScripts,n=ja(t),u=a.get(n);u||(u=l.querySelector(Nn(n)),u||(t=B({src:t,async:!0,type:"module"},e),(e=He.get(n))&&Ef(t,e),u=l.createElement("script"),$t(u),te(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function _h(t,e,l,a){var n=(n=at.current)?Xu(n):null;if(!n)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=Ha(l.href),l=ea(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Ha(l.href);var u=ea(n).hoistableStyles,i=u.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=n.querySelector(Mn(t)))&&!u._p&&(i.instance=u,i.state.loading=5),He.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},He.set(t,l),u||Z1(n,t,l,i.state))),e&&a===null)throw Error(c(528,""));return i}if(e&&a!==null)throw Error(c(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ja(l),l=ea(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function Ha(t){return'href="'+Ae(t)+'"'}function Mn(t){return'link[rel="stylesheet"]['+t+"]"}function Oh(t){return B({},t,{"data-precedence":t.precedence,precedence:null})}function Z1(t,e,l,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),te(e,"link",l),$t(e),t.head.appendChild(e))}function ja(t){return'[src="'+Ae(t)+'"]'}function Nn(t){return"script[async]"+t}function Mh(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+Ae(l.href)+'"]');if(a)return e.instance=a,$t(a),a;var n=B({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),$t(a),te(a,"style",n),Zu(a,l.precedence,t),e.instance=a;case"stylesheet":n=Ha(l.href);var u=t.querySelector(Mn(n));if(u)return e.state.loading|=4,e.instance=u,$t(u),u;a=Oh(l),(n=He.get(n))&&bf(a,n),u=(t.ownerDocument||t).createElement("link"),$t(u);var i=u;return i._p=new Promise(function(r,d){i.onload=r,i.onerror=d}),te(u,"link",a),e.state.loading|=4,Zu(u,l.precedence,t),e.instance=u;case"script":return u=ja(l.src),(n=t.querySelector(Nn(u)))?(e.instance=n,$t(n),n):(a=l,(n=He.get(u))&&(a=B({},l),Ef(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),$t(n),te(n,"link",a),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Zu(a,l.precedence,t));return e.instance}function Zu(t,e,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i title"):null)}function V1(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Ch(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function J1(t,e,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Ha(a.href),u=e.querySelector(Mn(n));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Ju.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,$t(u);return}u=e.ownerDocument||e,a=Oh(a),(n=He.get(n))&&bf(a,n),u=u.createElement("link"),$t(u);var i=u;i._p=new Promise(function(r,d){i.onload=r,i.onerror=d}),te(u,"link",a),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Ju.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var xf=0;function K1(t,e){return t.stylesheets&&t.count===0&&$u(t,t.stylesheets),0xf?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ju(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$u(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ku=null;function $u(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ku=new Map,e.forEach($1,t),Ku=null,Ju.call(t))}function $1(t,e){if(!(e.state.loading&4)){var l=Ku.get(t);if(l)var a=l.get(null);else{l=new Map,Ku.set(t,l);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(o){console.error(o)}}return f(),Uf.exports=om(),Uf.exports}var dm=hm();function mm(){const f=st.useRef(null),[o]=vm(f);return[o,f]}function vm(f){const[o,h]=st.useState(new DOMRect(0,0,10,10)),c=st.useCallback(()=>{const s=f==null?void 0:f.current;s&&h(s.getBoundingClientRect())},[f]);return st.useLayoutEffect(()=>{const s=f==null?void 0:f.current;if(!s)return;c();const y=new ResizeObserver(c);return y.observe(s),window.addEventListener("resize",c),()=>{y.disconnect(),window.removeEventListener("resize",c)}},[c,f]),[o,c]}function e0(f,o){f&&(o=Fl.getObject(f,o));const[h,c]=st.useState(o),s=st.useCallback(y=>{f?Fl.setObject(f,y):c(y)},[f,c]);return st.useEffect(()=>{if(f){const y=()=>c(Fl.getObject(f,o));return Fl.onChangeEmitter.addEventListener(f,y),()=>Fl.onChangeEmitter.removeEventListener(f,y)}},[o,f]),[h,s]}class gm{constructor(){this.onChangeEmitter=new EventTarget}getString(o,h){return localStorage[o]||h}setString(o,h){var c;localStorage[o]=h,this.onChangeEmitter.dispatchEvent(new Event(o)),(c=window.saveSettings)==null||c.call(window)}getObject(o,h){if(!localStorage[o])return h;try{return JSON.parse(localStorage[o])}catch{return h}}setObject(o,h){var c;localStorage[o]=JSON.stringify(h),this.onChangeEmitter.dispatchEvent(new Event(o)),(c=window.saveSettings)==null||c.call(window)}}const Fl=new gm;function ym(...f){return f.filter(Boolean).join(" ")}const Sm="system",f0="theme",pm=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],s0=window.matchMedia("(prefers-color-scheme: dark)");function Tm(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",f=>{f.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",f=>{document.body.classList.add("inactive")},!1),Bf(wf()),s0.addEventListener("change",()=>{Bf(wf())}))}const bm=new Set;function Bf(f){const o=Em(),h=f==="system"?s0.matches?"dark-mode":"light-mode":f;if(o!==h){o&&document.documentElement.classList.remove(o),document.documentElement.classList.add(h);for(const c of bm)c(h)}}function wf(){return Fl.getString(f0,Sm)}function Em(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function xm(){const[f,o]=st.useState(wf());return st.useEffect(()=>{Fl.setString(f0,f),Bf(f)},[f]),[f,o]}class zm{constructor(o){this._lastId=0,this._pending=new Map,this._sendQueue=[],this._closed=!1,this._ws=new WebSocket(o),this._ws.onopen=()=>{for(const h of this._sendQueue||[])this._ws.send(h);this._sendQueue=void 0,this.onopen&&this.onopen()},this._ws.onmessage=h=>{let c;try{c=JSON.parse(h.data)}catch{this._ws.close();return}if(c.id!==void 0){const s=this._pending.get(c.id);s&&(this._pending.delete(c.id),c.error?s.reject(new Error(c.error)):s.resolve(c.result))}else c.method&&this.onevent&&this.onevent(c.method,c.params)},this._ws.onclose=h=>{this._closed=!0,this._sendQueue=void 0;for(const{reject:c}of this._pending.values())c(new Error("Connection closed"));this._pending.clear(),this.onclose&&this.onclose(h.reason)},this._ws.onerror=()=>{}}sendNoReply(o,h){this.send(o,h).catch(()=>{})}send(o,h){if(this._closed)return Promise.reject(new Error("Connection closed"));const c=++this._lastId,s=JSON.stringify({id:c,method:o,params:h});return this._sendQueue?this._sendQueue.push(s):this._ws.send(s),new Promise((y,E)=>{this._pending.set(c,{resolve:y,reject:E})})}close(){this._ws.close()}}class fi{constructor(o){this._listeners=new Map,this._transport=o,this._transport.onopen=()=>{var h;(h=this.onopen)==null||h.call(this)},this._transport.onevent=(h,c)=>{this._fireEvent(h,c)},this._transport.onclose=h=>{var c;(c=this.onclose)==null||c.call(this,h)}}static create(o){const h=new zm(o),c=new fi(h);return new Proxy(c,{get(s,y,E){if(typeof y=="symbol"||y in s)return Reflect.get(s,y,E);if(y!=="then")return p=>s._transport.send(y,p)}})}_fireEvent(o,h){const c=this._listeners.get(o);if(c)for(const s of c)s(h)}on(o,h){let c=this._listeners.get(o);c||(c=new Set,this._listeners.set(o,c)),c.add(h)}off(o,h){var c;(c=this._listeners.get(o))==null||c.delete(h)}close(){this._transport.close()}}const Zt=function(f,o,h){return f>=o&&f<=h};function he(f){return Zt(f,48,57)}function l0(f){return he(f)||Zt(f,65,70)||Zt(f,97,102)}function Am(f){return Zt(f,65,90)}function _m(f){return Zt(f,97,122)}function Om(f){return Am(f)||_m(f)}function Mm(f){return f>=128}function li(f){return Om(f)||Mm(f)||f===95}function a0(f){return li(f)||he(f)||f===45}function Nm(f){return Zt(f,0,8)||f===11||Zt(f,14,31)||f===127}function ai(f){return f===10}function ul(f){return ai(f)||f===9||f===32}const Dm=1114111;class Qf extends Error{constructor(o){super(o),this.name="InvalidCharacterError"}}function Cm(f){const o=[];for(let h=0;h=o.length?-1:o[j]},E=function(j){if(j===void 0&&(j=1),j>3)throw"Spec Error: no more than three codepoints of lookahead.";return y(h+j)},p=function(j){return j===void 0&&(j=1),h+=j,s=y(h),!0},z=function(){return h-=1,!0},v=function(j){return j===void 0&&(j=s),j===-1},G=function(){if(B(),p(),ul(s)){for(;ul(E());)p();return new Lf}else{if(s===34)return Q();if(s===35)if(a0(E())||Z(E(1),E(2))){const j=new z0("");return et(E(1),E(2),E(3))&&(j.type="id"),j.value=tt(),j}else return new ae(s);else return s===36?E()===61?(p(),new qm):new ae(s):s===39?Q():s===40?new p0:s===41?new T0:s===42?E()===61?(p(),new Bm):new ae(s):s===43?At()?(z(),J()):new ae(s):s===44?new v0:s===45?At()?(z(),J()):E(1)===45&&E(2)===62?(p(2),new h0):Rt()?(z(),$()):new ae(s):s===46?At()?(z(),J()):new ae(s):s===58?new d0:s===59?new m0:s===60?E(1)===33&&E(2)===45&&E(3)===45?(p(3),new o0):new ae(s):s===64?et(E(1),E(2),E(3))?new x0(tt()):new ae(s):s===91?new S0:s===92?P()?(z(),$()):new ae(s):s===93?new Yf:s===94?E()===61?(p(),new Rm):new ae(s):s===123?new g0:s===124?E()===61?(p(),new jm):E()===124?(p(),new b0):new ae(s):s===125?new y0:s===126?E()===61?(p(),new Hm):new ae(s):he(s)?(z(),J()):li(s)?(z(),$()):v()?new ui:new ae(s)}},B=function(){for(;E(1)===47&&E(2)===42;)for(p(2);;)if(p(),s===42&&E()===47){p();break}else if(v())return},J=function(){const j=Nt();if(et(E(1),E(2),E(3))){const I=new wm;return I.value=j.value,I.repr=j.repr,I.type=j.type,I.unit=tt(),I}else if(E()===37){p();const I=new M0;return I.value=j.value,I.repr=j.repr,I}else{const I=new O0;return I.value=j.value,I.repr=j.repr,I.type=j.type,I}},$=function(){const j=tt();if(j.toLowerCase()==="url"&&E()===40){for(p();ul(E(1))&&ul(E(2));)p();return E()===34||E()===39?new ii(j):ul(E())&&(E(2)===34||E(2)===39)?new ii(j):N()}else return E()===40?(p(),new ii(j)):new E0(j)},Q=function(j){j===void 0&&(j=s);let I="";for(;p();){if(s===j||v())return new A0(I);if(ai(s))return z(),new r0;s===92?v(E())||(ai(E())?p():I+=Kt(q())):I+=Kt(s)}throw new Error("Internal error")},N=function(){const j=new _0("");for(;ul(E());)p();if(v(E()))return j;for(;p();){if(s===41||v())return j;if(ul(s)){for(;ul(E());)p();return E()===41||v(E())?(p(),j):(Dt(),new ni)}else{if(s===34||s===39||s===40||Nm(s))return Dt(),new ni;if(s===92)if(P())j.value+=Kt(q());else return Dt(),new ni;else j.value+=Kt(s)}}throw new Error("Internal error")},q=function(){if(p(),l0(s)){const j=[s];for(let _t=0;_t<5&&l0(E());_t++)p(),j.push(s);ul(E())&&p();let I=parseInt(j.map(function(_t){return String.fromCharCode(_t)}).join(""),16);return I>Dm&&(I=65533),I}else return v()?65533:s},Z=function(j,I){return!(j!==92||ai(I))},P=function(){return Z(s,E())},et=function(j,I,_t){return j===45?li(I)||I===45||Z(I,_t):li(j)?!0:j===92?Z(j,I):!1},Rt=function(){return et(s,E(1),E(2))},Lt=function(j,I,_t){return j===43||j===45?!!(he(I)||I===46&&he(_t)):j===46?!!he(I):!!he(j)},At=function(){return Lt(s,E(1),E(2))},tt=function(){let j="";for(;p();)if(a0(s))j+=Kt(s);else if(P())j+=Kt(q());else return z(),j;throw new Error("Internal parse error")},Nt=function(){let j="",I="integer";for((E()===43||E()===45)&&(p(),j+=Kt(s));he(E());)p(),j+=Kt(s);if(E(1)===46&&he(E(2)))for(p(),j+=Kt(s),p(),j+=Kt(s),I="number";he(E());)p(),j+=Kt(s);const _t=E(1),gt=E(2),O=E(3);if((_t===69||_t===101)&&he(gt))for(p(),j+=Kt(s),p(),j+=Kt(s),I="number";he(E());)p(),j+=Kt(s);else if((_t===69||_t===101)&&(gt===43||gt===45)&&he(O))for(p(),j+=Kt(s),p(),j+=Kt(s),p(),j+=Kt(s),I="number";he(E());)p(),j+=Kt(s);const L=R(j);return{type:I,value:L,repr:j}},R=function(j){return+j},Dt=function(){for(;p();){if(s===41||v())return;P()&&q()}};let xt=0;for(;!v(E());)if(c.push(G()),xt++,xt>o.length*2)throw new Error("I'm infinite-looping!");return c}class wt{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class r0 extends wt{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class ni extends wt{constructor(){super(...arguments),this.tokenType="BADURL"}}class Lf extends wt{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class o0 extends wt{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class d0 extends wt{constructor(){super(...arguments),this.tokenType=":"}}class m0 extends wt{constructor(){super(...arguments),this.tokenType=";"}}class v0 extends wt{constructor(){super(...arguments),this.tokenType=","}}class La extends wt{constructor(){super(...arguments),this.value="",this.mirror=""}}class g0 extends La{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class y0 extends La{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class S0 extends La{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Yf extends La{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class p0 extends La{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class T0 extends La{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Hm extends wt{constructor(){super(...arguments),this.tokenType="~="}}class jm extends wt{constructor(){super(...arguments),this.tokenType="|="}}class Rm extends wt{constructor(){super(...arguments),this.tokenType="^="}}class qm extends wt{constructor(){super(...arguments),this.tokenType="$="}}class Bm extends wt{constructor(){super(...arguments),this.tokenType="*="}}class b0 extends wt{constructor(){super(...arguments),this.tokenType="||"}}class ui extends wt{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ae extends wt{constructor(o){super(),this.tokenType="DELIM",this.value="",this.value=Kt(o)}toString(){return"DELIM("+this.value+")"}toJSON(){const o=this.constructor.prototype.constructor.prototype.toJSON.call(this);return o.value=this.value,o}toSource(){return this.value==="\\"?`\\ `:this.value}}class Ya extends wt{constructor(){super(...arguments),this.value=""}ASCIIMatch(o){return this.value.toLowerCase()===o.toLowerCase()}toJSON(){const o=this.constructor.prototype.constructor.prototype.toJSON.call(this);return o.value=this.value,o}}class E0 extends Ya{constructor(o){super(),this.tokenType="IDENT",this.value=o}toString(){return"IDENT("+this.value+")"}toSource(){return Bn(this.value)}}class ii extends Ya{constructor(o){super(),this.tokenType="FUNCTION",this.value=o,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Bn(this.value)+"("}}class x0 extends Ya{constructor(o){super(),this.tokenType="AT-KEYWORD",this.value=o}toString(){return"AT("+this.value+")"}toSource(){return"@"+Bn(this.value)}}class z0 extends Ya{constructor(o){super(),this.tokenType="HASH",this.value=o,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const o=this.constructor.prototype.constructor.prototype.toJSON.call(this);return o.value=this.value,o.type=this.type,o}toSource(){return this.type==="id"?"#"+Bn(this.value):"#"+Lm(this.value)}}class A0 extends Ya{constructor(o){super(),this.tokenType="STRING",this.value=o}toString(){return'"'+N0(this.value)+'"'}}class _0 extends Ya{constructor(o){super(),this.tokenType="URL",this.value=o}toString(){return"URL("+this.value+")"}toSource(){return'url("'+N0(this.value)+'")'}}class O0 extends wt{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const o=super.toJSON();return o.value=this.value,o.type=this.type,o.repr=this.repr,o}toSource(){return this.repr}}class M0 extends wt{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const o=this.constructor.prototype.constructor.prototype.toJSON.call(this);return o.value=this.value,o.repr=this.repr,o}toSource(){return this.repr+"%"}}class wm extends wt{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const o=this.constructor.prototype.constructor.prototype.toJSON.call(this);return o.value=this.value,o.type=this.type,o.repr=this.repr,o.unit=this.unit,o}toSource(){const o=this.repr;let h=Bn(this.unit);return h[0].toLowerCase()==="e"&&(h[1]==="-"||Zt(h.charCodeAt(1),48,57))&&(h="\\65 "+h.slice(1,h.length)),o+h}}function Bn(f){f=""+f;let o="";const h=f.charCodeAt(0);for(let c=0;c=128||s===45||s===95||Zt(s,48,57)||Zt(s,65,90)||Zt(s,97,122)?o+=f[c]:o+="\\"+f[c]}return o}function Lm(f){f=""+f;let o="";for(let h=0;h=128||c===45||c===95||Zt(c,48,57)||Zt(c,65,90)||Zt(c,97,122)?o+=f[h]:o+="\\"+c.toString(16)+" "}return o}function N0(f){f=""+f;let o="";for(let h=0;hR instanceof x0||R instanceof r0||R instanceof ni||R instanceof b0||R instanceof o0||R instanceof h0||R instanceof m0||R instanceof g0||R instanceof y0||R instanceof _0||R instanceof M0);if(c)throw new de(`Unsupported token "${c.toSource()}" while parsing css selector "${f}". Did you mean to CSS.escape it?`);let s=0;const y=new Set;function E(){return new de(`Unexpected token "${h[s].toSource()}" while parsing css selector "${f}". Did you mean to CSS.escape it?`)}function p(){for(;h[s]instanceof Lf;)s++}function z(R=s){return h[R]instanceof E0}function v(R=s){return h[R]instanceof A0}function G(R=s){return h[R]instanceof O0}function B(R=s){return h[R]instanceof v0}function J(R=s){return h[R]instanceof p0}function $(R=s){return h[R]instanceof T0}function Q(R=s){return h[R]instanceof ii}function N(R=s){return h[R]instanceof ae&&h[R].value==="*"}function q(R=s){return h[R]instanceof ui}function Z(R=s){return h[R]instanceof ae&&[">","+","~"].includes(h[R].value)}function P(R=s){return B(R)||$(R)||q(R)||Z(R)||h[R]instanceof Lf}function et(){const R=[Rt()];for(;p(),!!B();)s++,R.push(Rt());return R}function Rt(){return p(),G()||v()?h[s++].value:Lt()}function Lt(){const R={simples:[]};for(p(),Z()?R.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):R.simples.push({selector:At(),combinator:""});;){if(p(),Z())R.simples[R.simples.length-1].combinator=h[s++].value,p();else if(P())break;R.simples.push({combinator:"",selector:At()})}return R}function At(){let R="";const Dt=[];for(;!P();)if(z()||N())R+=h[s++].toSource();else if(h[s]instanceof z0)R+=h[s++].toSource();else if(h[s]instanceof ae&&h[s].value===".")if(s++,z())R+="."+h[s++].toSource();else throw E();else if(h[s]instanceof d0)if(s++,z())if(!o.has(h[s].value.toLowerCase()))R+=":"+h[s++].toSource();else{const xt=h[s++].value.toLowerCase();Dt.push({name:xt,args:[]}),y.add(xt)}else if(Q()){const xt=h[s++].value.toLowerCase();if(o.has(xt)?(Dt.push({name:xt,args:et()}),y.add(xt)):R+=`:${xt}(${tt()})`,p(),!$())throw E();s++}else throw E();else if(h[s]instanceof S0){for(R+="[",s++;!(h[s]instanceof Yf)&&!q();)R+=h[s++].toSource();if(!(h[s]instanceof Yf))throw E();R+="]",s++}else throw E();if(!R&&!Dt.length)throw E();return{css:R||void 0,functions:Dt}}function tt(){let R="",Dt=1;for(;!q()&&((J()||Q())&&Dt++,$()&&Dt--,!!Dt);)R+=h[s++].toSource();return R}const Nt=et();if(!q())throw E();if(Nt.some(R=>typeof R!="object"||!("simples"in R)))throw new de(`Error while parsing css selector "${f}". Did you mean to CSS.escape it?`);return{selector:Nt,names:Array.from(y)}}const n0=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Gm=new Set(["left-of","right-of","above","below","near"]),Qm=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function D0(f){const o=Zm(f),h=[];for(const c of o.parts){if(c.name==="css"||c.name==="css:light"){c.name==="css:light"&&(c.body=":light("+c.body+")");const s=Ym(c.body,Qm);h.push({name:"css",body:s.selector,source:c.body});continue}if(n0.has(c.name)){let s,y;try{const v=JSON.parse("["+c.body+"]");if(!Array.isArray(v)||v.length<1||v.length>2||typeof v[0]!="string")throw new de(`Malformed selector: ${c.name}=`+c.body);if(s=v[0],v.length===2){if(typeof v[1]!="number"||!Gm.has(c.name))throw new de(`Malformed selector: ${c.name}=`+c.body);y=v[1]}}catch{throw new de(`Malformed selector: ${c.name}=`+c.body)}const E={name:c.name,source:c.body,body:{parsed:D0(s),distance:y}},p=[...E.body.parsed.parts].reverse().find(v=>v.name==="internal:control"&&v.body==="enter-frame"),z=p?E.body.parsed.parts.indexOf(p):-1;z!==-1&&Xm(E.body.parsed.parts.slice(0,z+1),h.slice(0,z+1))&&E.body.parsed.parts.splice(0,z+1),h.push(E);continue}h.push({...c,source:c.body})}if(n0.has(h[0].name))throw new de(`"${h[0].name}" selector cannot be first`);return{capture:o.capture,parts:h}}function Xm(f,o){return wa({parts:f})===wa({parts:o})}function wa(f,o){return typeof f=="string"?f:f.parts.map((h,c)=>{let s=!0;!o&&c!==f.capture&&(h.name==="css"||h.name==="xpath"&&h.source.startsWith("//")||h.source.startsWith(".."))&&(s=!1);const y=s?h.name+"=":"";return`${c===f.capture?"*":""}${y}${h.source}`}).join(" >> ")}function Zm(f){let o=0,h,c=0;const s={parts:[]},y=()=>{const p=f.substring(c,o).trim(),z=p.indexOf("=");let v,G;z!==-1&&p.substring(0,z).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(v=p.substring(0,z).trim(),G=p.substring(z+1)):p.length>1&&p[0]==='"'&&p[p.length-1]==='"'||p.length>1&&p[0]==="'"&&p[p.length-1]==="'"?(v="text",G=p):/^\(*\/\//.test(p)||p.startsWith("..")?(v="xpath",G=p):(v="css",G=p);let B=!1;if(v[0]==="*"&&(B=!0,v=v.substring(1)),s.parts.push({name:v,body:G}),B){if(s.capture!==void 0)throw new de("Only one of the selectors can capture using * modifier");s.capture=s.parts.length-1}};if(!f.includes(">>"))return o=f.length,y(),s;const E=()=>{const z=f.substring(c,o).match(/^\s*text\s*=(.*)$/);return!!z&&!!z[1]};for(;o"&&f[o+1]===">"?(y(),o+=2,c=o):o++}return y(),s}function qf(f,o){let h=0,c=f.length===0;const s=()=>f[h]||"",y=()=>{const q=s();return++h,c=h>=f.length,q},E=q=>{throw c?new de(`Unexpected end of selector while parsing selector \`${f}\``):new de(`Error while parsing selector \`${f}\` - unexpected symbol "${s()}" at position ${h}`+(q?" during "+q:""))};function p(){for(;!c&&/\s/.test(s());)y()}function z(q){return q>="€"||q>="0"&&q<="9"||q>="A"&&q<="Z"||q>="a"&&q<="z"||q>="0"&&q<="9"||q==="_"||q==="-"}function v(){let q="";for(p();!c&&z(s());)q+=y();return q}function G(q){let Z=y();for(Z!==q&&E("parsing quoted string");!c&&s()!==q;)s()==="\\"&&y(),Z+=y();return s()!==q&&E("parsing quoted string"),Z+=y(),Z}function B(){y()!=="/"&&E("parsing regular expression");let q="",Z=!1;for(;!c;){if(s()==="\\")q+=y(),c&&E("parsing regular expression");else if(Z&&s()==="]")Z=!1;else if(!Z&&s()==="[")Z=!0;else if(!Z&&s()==="/")break;q+=y()}y()!=="/"&&E("parsing regular expression");let P="";for(;!c&&s().match(/[dgimsuy]/);)P+=y();try{return new RegExp(q,P)}catch(et){throw new de(`Error while parsing selector \`${f}\`: ${et.message}`)}}function J(){let q="";return p(),s()==="'"||s()==='"'?q=G(s()).slice(1,-1):q=v(),q||E("parsing property path"),q}function $(){p();let q="";return c||(q+=y()),!c&&q!=="="&&(q+=y()),["=","*=","^=","$=","|=","~="].includes(q)||E("parsing operator"),q}function Q(){y();const q=[];for(q.push(J()),p();s()===".";)y(),q.push(J()),p();if(s()==="]")return y(),{name:q.join("."),jsonPath:q,op:"",value:null,caseSensitive:!1};const Z=$();let P,et=!0;if(p(),s()==="/"){if(Z!=="=")throw new de(`Error while parsing selector \`${f}\` - cannot use ${Z} in attribute with regular expression`);P=B()}else if(s()==="'"||s()==='"')P=G(s()).slice(1,-1),p(),s()==="i"||s()==="I"?(et=!1,y()):(s()==="s"||s()==="S")&&(et=!0,y());else{for(P="";!c&&(z(s())||s()==="+"||s()===".");)P+=y();P==="true"?P=!0:P==="false"&&(P=!1)}if(p(),s()!=="]"&&E("parsing attribute value"),y(),Z!=="="&&typeof P!="string")throw new de(`Error while parsing selector \`${f}\` - cannot use ${Z} in attribute with non-string matching value - ${P}`);return{name:q.join("."),jsonPath:q,op:Z,value:P,caseSensitive:et}}const N={name:"",attributes:[]};for(N.name=v(),p();s()==="[";)N.attributes.push(Q()),p();if(c||E(void 0),!N.name&&!N.attributes.length)throw new de(`Error while parsing selector \`${f}\` - selector cannot be empty`);return N}function si(f,o="'"){const h=JSON.stringify(f),c=h.substring(1,h.length-1).replace(/\\"/g,'"');if(o==="'")return o+c.replace(/[']/g,"\\'")+o;if(o==='"')return o+c.replace(/["]/g,'\\"')+o;if(o==="`")return o+c.replace(/[`]/g,"\\`")+o;throw new Error("Invalid escape char")}function ci(f){return f.charAt(0).toUpperCase()+f.substring(1)}function C0(f){return f.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ri(f){return f.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function Vm(f,o,h=!1){return Jm(f,o,h,1)[0]}function Jm(f,o,h=!1,c=20,s){try{return Ba(new Pm[f](s),D0(o),h,c)}catch{return[o]}}function Ba(f,o,h=!1,c=20){const s=[...o.parts],y=[];let E=h?"frame-locator":"page";for(let p=0;pf.generateLocator(v,"has",N)));continue}if(z.name==="internal:has-not"){const Q=Ba(f,z.body.parsed,!1,c);y.push(Q.map(N=>f.generateLocator(v,"hasNot",N)));continue}if(z.name==="internal:and"){const Q=Ba(f,z.body.parsed,!1,c);y.push(Q.map(N=>f.generateLocator(v,"and",N)));continue}if(z.name==="internal:or"){const Q=Ba(f,z.body.parsed,!1,c);y.push(Q.map(N=>f.generateLocator(v,"or",N)));continue}if(z.name==="internal:chain"){const Q=Ba(f,z.body.parsed,!1,c);y.push(Q.map(N=>f.generateLocator(v,"chain",N)));continue}if(z.name==="internal:label"){const{exact:Q,text:N}=qn(z.body);y.push([f.generateLocator(v,"label",N,{exact:Q})]);continue}if(z.name==="internal:role"){const Q=qf(z.body),N={attrs:[]};for(const q of Q.attributes)q.name==="name"?(N.exact=q.caseSensitive,N.name=q.value):(q.name==="level"&&typeof q.value=="string"&&(q.value=+q.value),N.attrs.push({name:q.name==="include-hidden"?"includeHidden":q.name,value:q.value}));y.push([f.generateLocator(v,"role",Q.name,N)]);continue}if(z.name==="internal:testid"){const Q=qf(z.body),{value:N}=Q.attributes[0];y.push([f.generateLocator(v,"test-id",N)]);continue}if(z.name==="internal:attr"){const Q=qf(z.body),{name:N,value:q,caseSensitive:Z}=Q.attributes[0],P=q,et=!!Z;if(N==="placeholder"){y.push([f.generateLocator(v,"placeholder",P,{exact:et})]);continue}if(N==="alt"){y.push([f.generateLocator(v,"alt",P,{exact:et})]);continue}if(N==="title"){y.push([f.generateLocator(v,"title",P,{exact:et})]);continue}}if(z.name==="internal:control"&&z.body==="enter-frame"){const Q=y[y.length-1],N=s[p-1],q=Q.map(Z=>f.chainLocators([Z,f.generateLocator(v,"frame","")]));["xpath","css"].includes(N.name)&&q.push(f.generateLocator(v,"frame-locator",wa({parts:[N]})),f.generateLocator(v,"frame-locator",wa({parts:[N]},!0))),Q.splice(0,Q.length,...q),E="frame-locator";continue}const G=s[p+1],B=wa({parts:[z]}),J=f.generateLocator(v,"default",B);if(G&&["internal:has-text","internal:has-not-text"].includes(G.name)){const{exact:Q,text:N}=qn(G.body);if(!Q){const q=f.generateLocator("locator",G.name==="internal:has-text"?"has-text":"has-not-text",N,{exact:Q}),Z={};G.name==="internal:has-text"?Z.hasText=N:Z.hasNotText=N;const P=f.generateLocator(v,"default",B,Z);y.push([f.chainLocators([J,q]),P]),p++;continue}}let $;if(["xpath","css"].includes(z.name)){const Q=wa({parts:[z]},!0);$=f.generateLocator(v,"default",Q)}y.push([J,$].filter(Boolean))}return Km(f,y,c)}function Km(f,o,h){const c=o.map(()=>""),s=[],y=E=>{if(E===o.length)return s.push(f.chainLocators(c)),s.lengthJSON.parse(c));for(let c=0;c{const z=Math.max(s,f)*window.devicePixelRatio,[v,G]=e0(y?y+"."+c+":size":void 0,z),[B,J]=e0(y?y+"."+c+":size":void 0,z),[$,Q]=c0.useState(null),[N,q]=mm();let Z;c==="vertical"?(Z=B/window.devicePixelRatio,N&&N.heightQ({offset:c==="vertical"?et.clientY:et.clientX,size:Z}),onMouseUp:()=>Q(null),onMouseMove:et=>{if(!et.buttons)Q(null);else if($){const Lt=(c==="vertical"?et.clientY:et.clientX)-$.offset,At=h?$.size+Lt:$.size-Lt,Nt=et.target.parentElement.getBoundingClientRect(),R=Math.min(Math.max(s,At),(c==="vertical"?Nt.height:Nt.width)-s);c==="vertical"?J(R*window.devicePixelRatio):G(R*window.devicePixelRatio)}}})]})},u0=()=>U.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:U.jsx("polyline",{points:"15 18 9 12 15 6"})}),lv=()=>U.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:U.jsx("polyline",{points:"9 18 15 12 9 6"})}),av=()=>U.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",children:[U.jsx("line",{x1:"2",y1:"2",x2:"10",y2:"10"}),U.jsx("line",{x1:"10",y1:"2",x2:"2",y2:"10"})]}),nv=()=>U.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[U.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),U.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),uv=()=>U.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[U.jsx("polyline",{points:"23 4 23 10 17 10"}),U.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),iv=()=>U.jsx("svg",{viewBox:"0 0 48 48",fill:"currentColor",children:U.jsx("path",{d:"M18 42h-7.5c-3 0-4.5-1.5-4.5-4.5v-27C6 7.5 7.5 6 10.5 6h27C42 6 42 10.404 42 10.5V18h-3V9H9v30h9v3Zm27-15-9 6 9 9-3 3-9-9-6 9-6-24 24 6Z"})}),cv=()=>U.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[U.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),U.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21"})]}),fv=()=>U.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:U.jsx("path",{d:"M8 0a8.2 8.2 0 0 1 .701.031C9.444.095 9.99.645 10.16 1.29l.288 1.107c.018.066.079.158.212.224.231.114.454.243.668.386.123.082.233.09.299.071l1.103-.303c.644-.176 1.392.021 1.82.63.27.385.506.792.704 1.218.315.675.111 1.422-.364 1.891l-.814.806c-.049.048-.098.147-.088.294.016.257.016.515 0 .772-.01.147.038.246.088.294l.814.806c.475.469.679 1.216.364 1.891a7.977 7.977 0 0 1-.704 1.217c-.428.61-1.176.807-1.82.63l-1.102-.302c-.067-.019-.177-.011-.3.071a5.909 5.909 0 0 1-.668.386c-.133.066-.194.158-.211.224l-.29 1.106c-.168.646-.715 1.196-1.458 1.26a8.006 8.006 0 0 1-1.402 0c-.743-.064-1.289-.614-1.458-1.26l-.289-1.106c-.018-.066-.079-.158-.212-.224a5.738 5.738 0 0 1-.668-.386c-.123-.082-.233-.09-.299-.071l-1.103.303c-.644.176-1.392-.021-1.82-.63a8.12 8.12 0 0 1-.704-1.218c-.315-.675-.111-1.422.363-1.891l.815-.806c.05-.048.098-.147.088-.294a6.214 6.214 0 0 1 0-.772c.01-.147-.038-.246-.088-.294l-.815-.806C.635 6.045.431 5.298.746 4.623a7.92 7.92 0 0 1 .704-1.217c.428-.61 1.176-.807 1.82-.63l1.102.302c.067.019.177.011.3-.071.214-.143.437-.272.668-.386.133-.066.194-.158.211-.224l.29-1.106C6.009.645 6.556.095 7.299.03 7.53.01 7.764 0 8 0Zm-.571 1.525c-.036.003-.108.036-.137.146l-.289 1.105c-.147.561-.549.967-.998 1.189-.173.086-.34.183-.5.29-.417.278-.97.423-1.529.27l-1.103-.303c-.109-.03-.175.016-.195.045-.22.312-.412.644-.573.99-.014.031-.021.11.059.19l.815.806c.411.406.562.957.53 1.456a4.709 4.709 0 0 0 0 .582c.032.499-.119 1.05-.53 1.456l-.815.806c-.081.08-.073.159-.059.19.162.346.353.677.573.989.02.03.085.076.195.046l1.102-.303c.56-.153 1.113-.008 1.53.27.161.107.328.204.501.29.447.222.85.629.997 1.189l.289 1.105c.029.109.101.143.137.146a6.6 6.6 0 0 0 1.142 0c.036-.003.108-.036.137-.146l.289-1.105c.147-.561.549-.967.998-1.189.173-.086.34-.183.5-.29.417-.278.97-.423 1.529-.27l1.103.303c.109.029.175-.016.195-.045.22-.313.411-.644.573-.99.014-.031.021-.11-.059-.19l-.815-.806c-.411-.406-.562-.957-.53-1.456a4.709 4.709 0 0 0 0-.582c-.032-.499.119-1.05.53-1.456l.815-.806c.081-.08.073-.159.059-.19a6.464 6.464 0 0 0-.573-.989c-.02-.03-.085-.076-.195-.046l-1.102.303c-.56.153-1.113.008-1.53-.27a4.44 4.44 0 0 0-.501-.29c-.447-.222-.85-.629-.997-1.189l-.289-1.105c-.029-.11-.101-.143-.137-.146a6.6 6.6 0 0 0-1.142 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9.5 8a1.5 1.5 0 1 0-3.001.001A1.5 1.5 0 0 0 9.5 8Z"})}),U0=()=>{const[f,o]=st.useState(!1),[h,c]=xm(),s=st.useRef(null);return st.useEffect(()=>{if(!f)return;const y=p=>{s.current&&!s.current.contains(p.target)&&o(!1)},E=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",y),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",E)}},[f]),U.jsxs("div",{ref:s,className:"settings-button-container",children:[U.jsx("button",{className:"settings-gear-btn"+(f?" open":""),title:"Settings",onClick:()=>o(!f),children:U.jsx(fv,{})}),f&&U.jsx("div",{className:"settings-popup",children:U.jsxs("div",{className:"setting-row",children:[U.jsx("span",{className:"setting-label",children:"Theme"}),U.jsx("div",{className:"setting-options",children:pm.map(y=>U.jsx("div",{className:"setting-option"+(h===y.value?" selected":""),onClick:()=>{c(y.value),o(!1)},children:y.label},y.value))})]})})]})};function sv(f){try{const h=new URL(f).hostname.replace(/^www\./,"");return h?h[0].toUpperCase():""}catch{return""}}const rv=["left","middle","right"],ov=({wsUrl:f})=>{const[o,h]=st.useState(!1),[c,s]=st.useState(null),[y,E]=st.useState(""),[p,z]=st.useState(),[v,G]=st.useState(!1),[B,J]=st.useState(null),[$,Q]=st.useState(),[N,q]=st.useState(),Z=st.useRef(null),P=st.useRef(null),et=st.useRef(null),Rt=st.useRef(null),Lt=st.useRef(0);st.useEffect(()=>{if(!f)return;const H=fi.create(f);H.onopen=()=>{q(H),h(!1),J(null)},H.on("tabs",lt=>{s(lt.tabs);const m=lt.tabs.find(_=>_.selected);m&&E(m.url)});let k=!1;return H.on("frame",lt=>{z(lt);const m=et.current,_=Rt.current;if(!k&&m&&_&<.viewportWidth&<.viewportHeight){k=!0;const w=m.offsetHeight+_.offsetHeight,Y=window.outerWidth-window.innerWidth,F=window.outerHeight-window.innerHeight,at=Math.min(lt.viewportWidth+Y,screen.availWidth),rt=Math.min(lt.viewportHeight+w+F,screen.availHeight);window.resizeTo(at,rt)}}),H.on("elementPicked",lt=>{var _;const m=Vm("javascript",lt.selector);(_=navigator.clipboard)==null||_.writeText(m).catch(()=>{}),J(null),Q(w=>(clearTimeout(w==null?void 0:w.timer),{text:m,timer:setTimeout(()=>Q(void 0),3e3)}))}),H.onclose=()=>{q(void 0),h(!1),J(null),G(!1)},()=>{H.close()}},[f]);function At(H){const k=(p==null?void 0:p.viewportWidth)??0,lt=(p==null?void 0:p.viewportHeight)??0;if(!k||!lt)return{x:0,y:0};const m=Z.current;if(!m)return{x:0,y:0};const _=m.getBoundingClientRect(),w=m.naturalWidth/m.naturalHeight,Y=_.width/_.height;let F,at,rt,Vt;w>Y?(F=_.width,at=_.width/w,rt=0,Vt=(_.height-at)/2):(at=_.height,F=_.height*w,rt=(_.width-F)/2,Vt=0);const Ut=(H.clientX-_.left-rt)/F,Cl=(H.clientY-_.top-Vt)/at;return{x:Math.round(Ut*k),y:Math.round(Cl*lt)}}function tt(H,k){const{x:lt,y:m}=At(k);N==null||N[H]({x:lt,y:m,button:rv[k.button]||"left"})}function Nt(H){var k;if(H.preventDefault(),(k=P.current)==null||k.focus(),!!N){if(!o){h(!0);return}tt("mousedown",H)}}function R(H){o&&(H.preventDefault(),tt("mouseup",H))}function Dt(H){if(!o)return;const k=Date.now();if(k-Lt.current<32)return;Lt.current=k;const{x:lt,y:m}=At(H);N==null||N.mousemove({x:lt,y:m})}function xt(H){o&&(H.preventDefault(),N==null||N.wheel({deltaX:H.deltaX,deltaY:H.deltaY}))}function j(H){if(B!==null&&H.key==="Escape"){H.preventDefault(),N==null||N.cancelPickLocator(),J(null);return}o&&(H.preventDefault(),N==null||N.keydown({key:H.key}))}function I(H){o&&(H.preventDefault(),N==null||N.keyup({key:H.key}))}function _t(H){if(H.key==="Enter"){let k=H.target.value.trim();/^https?:\/\//i.test(k)||(k="https://"+k),E(k),N==null||N.navigate({url:k}),H.currentTarget.blur()}}const gt=c==null?void 0:c.find(H=>H.selected),O=(gt==null?void 0:gt.pageId)===B;let L;return N?c===null?L="Loading...":c.length===0&&(L="No tabs open"):L="Disconnected",U.jsxs("div",{className:"dashboard-view"+(o?" interactive":""),children:[U.jsxs("div",{ref:et,className:"tabbar",children:[U.jsxs("a",{className:"tabbar-back",href:"#",title:"Back to sessions",onClick:H=>{H.preventDefault(),H0("#")},children:[U.jsx(u0,{}),"Sessions"]}),U.jsx("div",{id:"tabstrip",className:"tabstrip",role:"tablist",children:c==null?void 0:c.map(H=>U.jsxs("div",{className:"tab"+(H.selected?" active":""),role:"tab","aria-selected":H.selected,title:H.url||"",onClick:()=>N==null?void 0:N.selectTab({pageId:H.pageId}),children:[U.jsx("span",{className:"tab-favicon","aria-hidden":"true",children:sv(H.url)}),U.jsx("span",{className:"tab-label",children:H.title||"New Tab"}),U.jsx("button",{className:"tab-close",title:"Close tab",onClick:k=>{k.stopPropagation(),N==null||N.closeTab({pageId:H.pageId})},children:U.jsx(av,{})})]},H.pageId))}),U.jsx("button",{id:"new-tab-btn",className:"new-tab-btn",title:"New Tab",onClick:()=>N==null?void 0:N.newTab(),children:U.jsx(nv,{})}),U.jsxs("div",{className:"interactive-controls",children:[U.jsxs("div",{className:"segmented-control"+(o?" interactive":""),role:"group","aria-label":"Interaction mode",title:o?"Interactive mode: page input is forwarded":"Read-only mode: page input is blocked",children:[U.jsx("button",{className:"segmented-control-option"+(o?"":" active"),disabled:!N,"aria-pressed":!o,title:"Read-only mode",onClick:()=>{N==null||N.cancelPickLocator(),J(null),G(!1),h(!1)},children:"Read-only"}),U.jsx("button",{className:"segmented-control-option"+(o?" active":""),disabled:!N,"aria-pressed":o,title:"Interactive mode",onClick:()=>h(!0),children:"Interactive"})]}),U.jsx(U0,{})]})]}),U.jsxs("div",{ref:Rt,className:"toolbar",children:[U.jsx("button",{className:"nav-btn",title:"Back",onClick:()=>N==null?void 0:N.back(),children:U.jsx(u0,{})}),U.jsx("button",{className:"nav-btn",title:"Forward",onClick:()=>N==null?void 0:N.forward(),children:U.jsx(lv,{})}),U.jsx("button",{className:"nav-btn",title:"Reload",onClick:()=>N==null?void 0:N.reload(),children:U.jsx(uv,{})}),U.jsx("input",{id:"omnibox",className:"omnibox",type:"text",placeholder:"Search or enter URL",spellCheck:!1,autoComplete:"off",value:y,onChange:H=>E(H.target.value),onKeyDown:_t,onFocus:H=>H.target.select()}),U.jsx("button",{className:"nav-btn"+(O?" active-toggle":""),title:"Pick locator","aria-pressed":O,disabled:!N,onClick:()=>{var H;O?(N==null||N.cancelPickLocator(),J(null)):(h(!0),J((gt==null?void 0:gt.pageId)??null),(H=P.current)==null||H.focus(),N==null||N.pickLocator())},children:U.jsx(iv,{})}),(gt==null?void 0:gt.inspectorUrl)&&U.jsx("button",{className:"nav-btn"+(v?" active-toggle":""),title:"Chrome DevTools","aria-pressed":v,disabled:!N,onClick:()=>{h(!0),G(!v)},children:U.jsx(cv,{})})]}),U.jsx("div",{className:"viewport-wrapper",children:U.jsx(ev,{orientation:"horizontal",sidebarSize:500,minSidebarSize:300,settingName:"devtoolsInspector",sidebarHidden:!v||!(gt!=null&>.inspectorUrl),main:U.jsxs("div",{className:"viewport-main",children:[U.jsxs("div",{ref:P,className:"screen",tabIndex:0,style:{display:p?"":"none"},onMouseDown:Nt,onMouseUp:R,onMouseMove:Dt,onWheel:xt,onKeyDown:j,onKeyUp:I,onContextMenu:H=>H.preventDefault(),children:[U.jsx("img",{ref:Z,id:"display",className:"display",alt:"screencast",src:p?"data:image/jpeg;base64,"+p.data:void 0}),$?U.jsxs("div",{className:"screen-toast visible",children:["Copied: ",U.jsx("code",{children:$.text})]}):O?U.jsx("div",{className:"screen-toast visible",children:"Click an element to pick its locator"}):null]}),L&&U.jsx("div",{className:"screen-overlay"+(p?" has-frame":""),children:U.jsx("span",{children:L})})]}),sidebar:U.jsx("iframe",{className:"inspector-frame",src:(gt==null?void 0:gt.inspectorUrl)||"",title:"Chrome DevTools"})})})]})},hv=({channel:f})=>{const[o,h]=st.useState("");return st.useEffect(()=>{const c=s=>{h("data:image/jpeg;base64,"+s.data)};return f.on("frame",c),()=>f.off("frame",c)},[f]),o?U.jsx("img",{className:"screencast-frame",alt:"screencast",src:o}):U.jsx("div",{className:"screencast-placeholder",children:"Connecting..."})},dv=({model:f})=>{const[o,h]=st.useState(new Set),c=f.sessions,s=f.clientInfo;function y(p){h(z=>{const v=new Set(z);return v.has(p)?v.delete(p):v.add(p),v})}const E=st.useMemo(()=>{const p=new Map;for(const B of c){const J=B.workspaceDir||"Global";let $=p.get(J);$||($=[],p.set(J,$)),$.push(B)}for(const B of p.values())B.sort((J,$)=>J.title.localeCompare($.title));const z=[...p.entries()],v=z.filter(([B])=>B===(s==null?void 0:s.workspaceDir)),G=z.filter(([B])=>B!==(s==null?void 0:s.workspaceDir)).sort((B,J)=>B[0].localeCompare(J[0]));return[...v,...G]},[c,s==null?void 0:s.workspaceDir]);return U.jsxs("div",{className:"grid-view",children:[U.jsx("div",{className:"grid-toolbar",children:U.jsx(U0,{})}),U.jsxs("div",{className:"grid-content",children:[f.loading&&c.length===0&&U.jsx("div",{className:"grid-loading",children:"Loading sessions..."}),f.error&&U.jsxs("div",{className:"grid-error",children:["Error: ",f.error]}),!f.loading&&!f.error&&c.length===0&&U.jsx("div",{className:"grid-empty",children:"No sessions found."}),U.jsx("div",{className:"workspace-list",children:E.map(([p,z],v)=>{const G=v===0,B=G||o.has(p);return U.jsxs("div",{className:"workspace-group",children:[U.jsxs("div",{className:"workspace-header"+(G?"":" collapsible"),onClick:G?void 0:()=>y(p),children:[!G&&U.jsx("svg",{className:"workspace-chevron"+(B?" expanded":""),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:U.jsx("polyline",{points:"9 18 15 12 9 6"})}),U.jsx("span",{className:"workspace-name",children:p.split("/").pop()||p}),U.jsxs("span",{className:"workspace-path",children:["— ",p]})]}),B&&U.jsx("div",{className:"session-chips",children:z.map(J=>U.jsx(mv,{descriptor:J,wsUrl:J.wsUrl,visible:B,model:f},J.browser.guid))})]},p)})})]})]})},mv=({descriptor:f,wsUrl:o,visible:h,model:c})=>{const s="#session="+encodeURIComponent(f.browser.guid),y=st.useMemo(()=>{if(!(!o||!h))return fi.create(o)},[o,h]),[E,p]=st.useState();st.useEffect(()=>{if(!y)return;const v=G=>{p(G.tabs.find(B=>B.selected))};return y.tabs().then(v),y.on("tabs",v),()=>{y.off("tabs",v),y.close()}},[y]);const z=E?`[${f.title}] ${E.url} — ${E.title}`:f.title;return U.jsxs("a",{className:"session-chip"+(o?"":" disconnected"),href:o?s:void 0,title:z,onClick:v=>{v.preventDefault(),o&&H0(s)},children:[U.jsxs("div",{className:"session-chip-header",children:[U.jsx("div",{className:"session-status-dot "+(o?"open":"closed")}),U.jsx("span",{className:"session-chip-name",children:E?U.jsxs(U.Fragment,{children:["[",f.title,"] ",E.url," ",U.jsxs("span",{className:"session-chip-title",children:["— ",E.title]})]}):f.title}),o&&U.jsx("button",{className:"session-chip-action",title:"Close session",onClick:v=>{v.preventDefault(),v.stopPropagation(),c.closeSession(f)},children:U.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[U.jsx("line",{x1:"2",y1:"2",x2:"10",y2:"10"}),U.jsx("line",{x1:"10",y1:"2",x2:"2",y2:"10"})]})}),!o&&U.jsx("button",{className:"session-chip-action",title:"Delete session data",onClick:v=>{v.preventDefault(),v.stopPropagation(),c.deleteSessionData(f)},children:U.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[U.jsx("path",{d:"M2 4h12"}),U.jsx("path",{d:"M5 4V3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1"}),U.jsx("path",{d:"M4 4l.8 9a1 1 0 0 0 1 .9h4.4a1 1 0 0 0 1-.9L12 4"})]})})]}),U.jsxs("div",{className:"screencast-container",children:[y&&U.jsx(hv,{channel:y}),!o&&U.jsx("div",{className:"screencast-placeholder",children:"Session closed"})]})]})};class vv{constructor(){this.sessions=[],this.loading=!0,this._pollActive=!1,this._lastJson="",this._listeners=new Set}subscribe(o){return this._listeners.add(o),()=>this._listeners.delete(o)}_notify(){for(const o of this._listeners)o()}startPolling(){if(this._pollActive)return;this._pollActive=!0;const o=async()=>{await this._fetchSessions(),this._pollActive&&(this._pollTimeout=setTimeout(o,3e3))};o()}stopPolling(){this._pollActive=!1,this._pollTimeout&&(clearTimeout(this._pollTimeout),this._pollTimeout=void 0)}sessionByGuid(o){return this.sessions.find(h=>h.browser.guid===o)}async _fetchSessions(){try{this.loading=!0;const o=await fetch("/api/sessions/list");if(!o.ok)throw new Error(`HTTP ${o.status}`);const h=await o.text();if(h!==this._lastJson){this._lastJson=h;const c=JSON.parse(h);this.sessions=c.sessions,this.clientInfo=c.clientInfo,this._notify()}this.error=void 0}catch(o){this.error=o.message}finally{this.loading=!1}this._notify()}async fetchSessions(){await this._fetchSessions()}async closeSession(o){await fetch("/api/sessions/close",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({guid:o.browser.guid})}),await this._fetchSessions()}async deleteSessionData(o){await fetch("/api/sessions/delete-data",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({guid:o.browser.guid})}),await this._fetchSessions()}dispose(){this.stopPolling(),this._listeners.clear()}}Tm();function H0(f){window.history.pushState(null,"",f),window.dispatchEvent(new PopStateEvent("popstate"))}function i0(){const f=window.location.hash,o="#session=";if(f.startsWith(o))return decodeURIComponent(f.slice(o.length))}const qa=new vv,gv=()=>{var c;const[,f]=st.useState(0),[o,h]=st.useState(i0);if(st.useEffect(()=>{qa.startPolling();const s=qa.subscribe(()=>f(y=>y+1));return()=>{s(),qa.stopPolling()}},[qa]),st.useEffect(()=>{const s=()=>h(i0());return window.addEventListener("popstate",s),()=>window.removeEventListener("popstate",s)},[]),o){const s=(c=qa.sessionByGuid(o))==null?void 0:c.wsUrl;return U.jsx(ov,{wsUrl:s||void 0})}return U.jsx(dv,{model:qa})};dm.createRoot(document.querySelector("#root")).render(U.jsx(gv,{}));