const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-BBCX0spr.js","../codeMirrorModule.ez37Vkbh.css"])))=>i.map(i=>d[i]); var Fp=Object.defineProperty;var Hp=(e,t,n)=>t in e?Fp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>Hp(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var tw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vc={exports:{}},Es={},Bc={exports:{}},j={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xr=Symbol.for("react.element"),Vp=Symbol.for("react.portal"),Bp=Symbol.for("react.fragment"),qp=Symbol.for("react.strict_mode"),Wp=Symbol.for("react.profiler"),Qp=Symbol.for("react.provider"),Kp=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),Xp=Symbol.for("react.suspense"),Jp=Symbol.for("react.memo"),Yp=Symbol.for("react.lazy"),eu=Symbol.iterator;function Zp(e){return e===null||typeof e!="object"?null:(e=eu&&e[eu]||e["@@iterator"],typeof e=="function"?e:null)}var qc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wc=Object.assign,Qc={};function Kn(e,t,n){this.props=e,this.context=t,this.refs=Qc,this.updater=n||qc}Kn.prototype.isReactComponent={};Kn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Kc(){}Kc.prototype=Kn.prototype;function Dl(e,t,n){this.props=e,this.context=t,this.refs=Qc,this.updater=n||qc}var Fl=Dl.prototype=new Kc;Fl.constructor=Dl;Wc(Fl,Kn.prototype);Fl.isPureReactComponent=!0;var tu=Array.isArray,Gc=Object.prototype.hasOwnProperty,Hl={current:null},Xc={key:!0,ref:!0,__self:!0,__source:!0};function Jc(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Gc.call(t,r)&&!Xc.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1{let o=!1;return e().then(l=>{o||s(l)}),()=>{o=!0}},t),i}function ks(){const e=et.useRef(null),[t,n]=et.useState(new DOMRect(0,0,10,10));return et.useLayoutEffect(()=>{const r=e.current;if(!r)return;const i=new ResizeObserver(s=>{const o=s[s.length-1];o&&o.contentRect&&n(o.contentRect)});return i.observe(r),()=>i.disconnect()},[e]),[t,e]}function Ro(e){if(e<0||!isFinite(e))return"-";if(e===0)return"0";if(e<1e3)return e.toFixed(0)+"ms";const t=e/1e3;if(t<60)return t.toFixed(1)+"s";const n=t/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function dg(e){if(e<0||!isFinite(e))return"-";if(e===0)return"0";if(e<1e3)return e.toFixed(0);const t=e/1024;if(t<1e3)return t.toFixed(1)+"K";const n=t/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function nw(e,t,n,r,i){let s=0,o=i!==void 0?i:e.length;for(;s>1;n(t,e[l])>=0?s=l+1:o=l}return o}function fg(e){const t=document.createElement("textarea");t.style.position="absolute",t.style.zIndex="-1000",t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}function ru(e,t){e&&(t=Yt.getObject(e,t));const[n,r]=et.useState(t),i=et.useCallback(s=>{e?Yt.setObject(e,s):r(s)},[e,r]);return et.useEffect(()=>{if(e){const s=()=>r(Yt.getObject(e,t));return Yt.onChangeEmitter.addEventListener(e,s),()=>Yt.onChangeEmitter.removeEventListener(e,s)}},[t,e]),[n,i]}class hg{constructor(){this.onChangeEmitter=new EventTarget}getString(t,n){return localStorage[t]||n}setString(t,n){var r;localStorage[t]=n,this.onChangeEmitter.dispatchEvent(new Event(t)),(r=window.saveSettings)==null||r.call(window)}getObject(t,n){if(!localStorage[t])return n;try{return JSON.parse(localStorage[t])}catch{return n}}setObject(t,n){var r;localStorage[t]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(t)),(r=window.saveSettings)==null||r.call(window)}}const Yt=new hg;function tt(...e){return e.filter(Boolean).join(" ")}async function rw(e){const t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-1",t))).map(n=>n.toString(16).padStart(2,"0")).join("")}function pg(e){e&&(e!=null&&e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e==null||e.scrollIntoView())}const iu="\\u0000-\\u0020\\u007f-\\u009f",gg=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+iu+'"]{2,}[^\\s'+iu+`"')}\\],:;.!?]`,"ug");function iw(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1);const e=Yt.getString("theme","light-mode"),t=window.matchMedia("(prefers-color-scheme: dark)");(e==="dark-mode"||t.matches)&&document.body.classList.add("dark-mode")}const Vl=new Set;function mg(){const e=$o(),t=e==="dark-mode"?"light-mode":"dark-mode";e&&document.body.classList.remove(e),document.body.classList.add(t),Yt.setString("theme",t);for(const n of Vl)n(t)}function sw(e){Vl.add(e)}function ow(e){Vl.delete(e)}function $o(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function lw(){const[e,t]=et.useState($o()==="dark-mode");return[e,n=>{$o()==="dark-mode"!==n&&mg(),t(n)}]}var Zc={exports:{}},De={},ed={exports:{}},td={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){function t(L,R){var $=L.length;L.push(R);e:for(;0<$;){var Y=$-1>>>1,oe=L[Y];if(0>>1;Yi(Ws,$))Kti(ii,Ws)?(L[Y]=ii,L[Kt]=$,Y=Kt):(L[Y]=Ws,L[Qt]=$,Y=Qt);else if(Kti(ii,$))L[Y]=ii,L[Kt]=$,Y=Kt;else break e}}return R}function i(L,R){var $=L.sortIndex-R.sortIndex;return $!==0?$:L.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,f=null,d=3,g=!1,m=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(L){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=L)r(u),R.sortIndex=R.expirationTime,t(a,R);else break;R=n(u)}}function x(L){if(y=!1,v(L),!m)if(n(a)!==null)m=!0,er(E);else{var R=n(u);R!==null&&tr(x,R.startTime-L)}}function E(L,R){m=!1,y&&(y=!1,p(b),b=-1),g=!0;var $=d;try{for(v(R),f=n(a);f!==null&&(!(f.expirationTime>R)||L&&!O());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,d=f.priorityLevel;var oe=Y(f.expirationTime<=R);R=e.unstable_now(),typeof oe=="function"?f.callback=oe:f===n(a)&&r(a),v(R)}else r(a);f=n(a)}if(f!==null)var ri=!0;else{var Qt=n(u);Qt!==null&&tr(x,Qt.startTime-R),ri=!1}return ri}finally{f=null,d=$,g=!1}}var C=!1,N=null,b=-1,S=5,I=-1;function O(){return!(e.unstable_now()-IL||125Y?(L.sortIndex=$,t(u,L),n(a)===null&&L===n(u)&&(y?(p(b),b=-1):y=!0,tr(x,$-Y))):(L.sortIndex=oe,t(a,L),m||g||(m=!0,er(E))),L},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(L){var R=d;return function(){var $=d;d=R;try{return L.apply(this,arguments)}finally{d=$}}}})(td);ed.exports=td;var vg=ed.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var nd=M,je=vg;function k(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oo=Object.prototype.hasOwnProperty,yg=/^[: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]*$/,su={},ou={};function wg(e){return Oo.call(ou,e)?!0:Oo.call(su,e)?!1:yg.test(e)?ou[e]=!0:(su[e]=!0,!1)}function _g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function xg(e,t,n,r){if(t===null||typeof t>"u"||_g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Te(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){fe[e]=new Te(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];fe[t]=new Te(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){fe[e]=new Te(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){fe[e]=new Te(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){fe[e]=new Te(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){fe[e]=new Te(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){fe[e]=new Te(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){fe[e]=new Te(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){fe[e]=new Te(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bl=/[\-:]([a-z])/g;function ql(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bl,ql);fe[t]=new Te(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bl,ql);fe[t]=new Te(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bl,ql);fe[t]=new Te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){fe[e]=new Te(e,1,!1,e.toLowerCase(),null,!1,!1)});fe.xlinkHref=new Te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){fe[e]=new Te(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wl(e,t,n,r){var i=fe.hasOwnProperty(t)?fe[t]:null;(i!==null?i.type!==0:r||!(2l||i[o]!==s[l]){var a=` `+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Gs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gr(e):""}function Sg(e){switch(e.tag){case 5:return gr(e.type);case 16:return gr("Lazy");case 13:return gr("Suspense");case 19:return gr("SuspenseList");case 0:case 2:case 15:return e=Xs(e.type,!1),e;case 11:return e=Xs(e.type.render,!1),e;case 1:return e=Xs(e.type,!0),e;default:return""}}function Fo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sn:return"Fragment";case xn:return"Portal";case jo:return"Profiler";case Ql:return"StrictMode";case zo:return"Suspense";case Do:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sd:return(e.displayName||"Context")+".Consumer";case id:return(e._context.displayName||"Context")+".Provider";case Kl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gl:return t=e.displayName||null,t!==null?t:Fo(e.type)||"Memo";case Ct:t=e._payload,e=e._init;try{return Fo(e(t))}catch{}}return null}function Eg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Fo(t);case 8:return t===Ql?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ut(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ld(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kg(e){var t=ld(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function li(e){e._valueTracker||(e._valueTracker=kg(e))}function ad(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ld(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Qi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ho(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function au(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ut(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ud(e,t){t=t.checked,t!=null&&Wl(e,"checked",t,!1)}function Uo(e,t){ud(e,t);var n=Ut(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vo(e,t.type,Ut(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vo(e,t,n){(t!=="number"||Qi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mr=Array.isArray;function Rn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ai.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Er={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Tg=["Webkit","ms","Moz","O"];Object.keys(Er).forEach(function(e){Tg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Er[t]=Er[e]})});function hd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Er.hasOwnProperty(e)&&Er[e]?(""+t).trim():t+"px"}function pd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=hd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Cg=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wo(e,t){if(t){if(Cg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function Qo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ko=null;function Xl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Go=null,$n=null,On=null;function fu(e){if(e=Zr(e)){if(typeof Go!="function")throw Error(k(280));var t=e.stateNode;t&&(t=As(t),Go(e.stateNode,e.type,t))}}function gd(e){$n?On?On.push(e):On=[e]:$n=e}function md(){if($n){var e=$n,t=On;if(On=$n=null,fu(e),t)for(e=0;e>>=0,e===0?32:31-(jg(e)/zg|0)|0}var ui=64,ci=4194304;function vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ji(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=vr(l):(s&=o,s!==0&&(r=vr(s)))}else o=n&~i,o!==0?r=vr(o):s!==0&&(r=vr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Jr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nt(t),e[t]=n}function Ug(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Tr),xu=" ",Su=!1;function Od(e,t){switch(e){case"keyup":return mm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function ym(e,t){switch(e){case"compositionend":return jd(t);case"keypress":return t.which!==32?null:(Su=!0,xu);case"textInput":return e=t.data,e===xu&&Su?null:e;default:return null}}function wm(e,t){if(En)return e==="compositionend"||!ia&&Od(e,t)?(e=Rd(),Ii=ta=Mt=null,En=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cu(n)}}function Hd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ud(){for(var e=window,t=Qi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Qi(e.document)}return t}function sa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bm(e){var t=Ud(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hd(n.ownerDocument.documentElement,n)){if(r!==null&&sa(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Nu(n,s);var o=Nu(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,kn=null,tl=null,Nr=null,nl=!1;function bu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nl||kn==null||kn!==Qi(r)||(r=kn,"selectionStart"in r&&sa(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&Dr(Nr,r)||(Nr=r,r=es(tl,"onSelect"),0Nn||(e.current=al[Nn],al[Nn]=null,Nn--)}function F(e,t){Nn++,al[Nn]=e.current,e.current=t}var Vt={},we=qt(Vt),Ie=qt(!1),ln=Vt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Me(e){return e=e.childContextTypes,e!=null}function ns(){V(Ie),V(we)}function $u(e,t,n){if(we.current!==Vt)throw Error(k(168));F(we,t),F(Ie,n)}function Jd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(k(108,Eg(e)||"Unknown",i));return G({},n,r)}function rs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vt,ln=we.current,F(we,e),F(Ie,Ie.current),!0}function Ou(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=Jd(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,V(Ie),V(we),F(we,e)):V(Ie),F(Ie,n)}var gt=null,Ls=!1,co=!1;function Yd(e){gt===null?gt=[e]:gt.push(e)}function Fm(e){Ls=!0,Yd(e)}function Wt(){if(!co&>!==null){co=!0;var e=0,t=D;try{var n=gt;for(D=1;e>=o,i-=o,mt=1<<32-nt(t)+i|n<b?(S=N,N=null):S=N.sibling;var I=d(p,N,v[b],x);if(I===null){N===null&&(N=S);break}e&&N&&I.alternate===null&&t(p,N),h=s(I,h,b),C===null?E=I:C.sibling=I,C=I,N=S}if(b===v.length)return n(p,N),W&&Gt(p,b),E;if(N===null){for(;bb?(S=N,N=null):S=N.sibling;var O=d(p,N,I.value,x);if(O===null){N===null&&(N=S);break}e&&N&&O.alternate===null&&t(p,N),h=s(O,h,b),C===null?E=O:C.sibling=O,C=O,N=S}if(I.done)return n(p,N),W&&Gt(p,b),E;if(N===null){for(;!I.done;b++,I=v.next())I=f(p,I.value,x),I!==null&&(h=s(I,h,b),C===null?E=I:C.sibling=I,C=I);return W&&Gt(p,b),E}for(N=r(p,N);!I.done;b++,I=v.next())I=g(N,p,b,I.value,x),I!==null&&(e&&I.alternate!==null&&N.delete(I.key===null?b:I.key),h=s(I,h,b),C===null?E=I:C.sibling=I,C=I);return e&&N.forEach(function(T){return t(p,T)}),W&&Gt(p,b),E}function _(p,h,v,x){if(typeof v=="object"&&v!==null&&v.type===Sn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case oi:e:{for(var E=v.key,C=h;C!==null;){if(C.key===E){if(E=v.type,E===Sn){if(C.tag===7){n(p,C.sibling),h=i(C,v.props.children),h.return=p,p=h;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ct&&Vu(E)===C.type){n(p,C.sibling),h=i(C,v.props),h.ref=lr(p,C,v),h.return=p,p=h;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Sn?(h=sn(v.props.children,p.mode,x,v.key),h.return=p,p=h):(x=Di(v.type,v.key,v.props,null,p.mode,x),x.ref=lr(p,h,v),x.return=p,p=x)}return o(p);case xn:e:{for(C=v.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){n(p,h.sibling),h=i(h,v.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=wo(v,p.mode,x),h.return=p,p=h}return o(p);case Ct:return C=v._init,_(p,h,C(v._payload),x)}if(mr(v))return m(p,h,v,x);if(nr(v))return y(p,h,v,x);vi(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,v),h.return=p,p=h):(n(p,h),h=yo(v,p.mode,x),h.return=p,p=h),o(p)):n(p,h)}return _}var Bn=lf(!0),af=lf(!1),ei={},dt=qt(ei),Vr=qt(ei),Br=qt(ei);function tn(e){if(e===ei)throw Error(k(174));return e}function pa(e,t){switch(F(Br,t),F(Vr,e),F(dt,ei),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qo(t,e)}V(dt),F(dt,t)}function qn(){V(dt),V(Vr),V(Br)}function uf(e){tn(Br.current);var t=tn(dt.current),n=qo(t,e.type);t!==n&&(F(Vr,e),F(dt,n))}function ga(e){Vr.current===e&&(V(dt),V(Vr))}var Q=qt(0);function us(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fo=[];function ma(){for(var e=0;en?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{D=n,ho.transition=r}}function Tf(){return Ke().memoizedState}function Bm(e,t,n){var r=Ft(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cf(e))Nf(t,n);else if(n=nf(e,t,n,r),n!==null){var i=Ee();rt(n,e,r,i),bf(n,t,r)}}function qm(e,t,n){var r=Ft(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cf(e))Nf(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,it(l,o)){var a=t.interleaved;a===null?(i.next=i,fa(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=nf(e,t,i,r),n!==null&&(i=Ee(),rt(n,e,r,i),bf(n,t,r))}}function Cf(e){var t=e.alternate;return e===K||t!==null&&t===K}function Nf(e,t){br=cs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yl(e,n)}}var ds={readContext:Qe,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},Wm={readContext:Qe,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:qu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$i(4194308,4,_f.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $i(4194308,4,e,t)},useInsertionEffect:function(e,t){return $i(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Bm.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:Bu,useDebugValue:xa,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=Bu(!1),t=e[0];return e=Vm.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,i=lt();if(W){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),ae===null)throw Error(k(349));un&30||ff(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,qu(pf.bind(null,r,s,e),[e]),r.flags|=2048,Qr(9,hf.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=lt(),t=ae.identifierPrefix;if(W){var n=vt,r=mt;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ut]=t,e[Ur]=r,jf(e,t,!1,!1),t.stateNode=e;e:{switch(o=Qo(n,r),n){case"dialog":U("cancel",e),U("close",e),i=r;break;case"iframe":case"object":case"embed":U("load",e),i=r;break;case"video":case"audio":for(i=0;iQn&&(t.flags|=128,r=!0,ar(s,!1),t.lanes=4194304)}else{if(!r)if(e=us(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ar(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!W)return pe(t),null}else 2*Z()-s.renderingStartTime>Qn&&n!==1073741824&&(t.flags|=128,r=!0,ar(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Z(),t.sibling=null,n=Q.current,F(Q,r?n&1|2:n&1),t):(pe(t),null);case 22:case 23:return Na(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Re&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function ev(e,t){switch(la(t),t.tag){case 1:return Me(t.type)&&ns(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qn(),V(Ie),V(we),ma(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ga(t),null;case 13:if(V(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Q),null;case 4:return qn(),null;case 10:return da(t.type._context),null;case 22:case 23:return Na(),null;case 24:return null;default:return null}}var wi=!1,me=!1,tv=typeof WeakSet=="function"?WeakSet:Set,A=null;function In(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function _l(e,t,n){try{n()}catch(r){X(e,t,r)}}var ec=!1;function nv(e,t){if(rl=Yi,e=Ud(),sa(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(l=o+i),f!==s||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=o),d===s&&++c===r&&(a=o),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(il={focusedElem:e,selectionRange:n},Yi=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,_=m.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:Xe(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(x){X(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return m=ec,ec=!1,m}function Ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&_l(t,n,s)}i=i.next}while(i!==r)}}function Ps(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ff(e){var t=e.alternate;t!==null&&(e.alternate=null,Ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[Ur],delete t[ll],delete t[zm],delete t[Dm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hf(e){return e.tag===5||e.tag===3||e.tag===4}function tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ts));else if(r!==4&&(e=e.child,e!==null))for(Sl(e,t,n),e=e.sibling;e!==null;)Sl(e,t,n),e=e.sibling}function El(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(El(e,t,n),e=e.sibling;e!==null;)El(e,t,n),e=e.sibling}var ue=null,Je=!1;function Tt(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Ts,n)}catch{}switch(n.tag){case 5:me||In(n,t);case 6:var r=ue,i=Je;ue=null,Tt(e,t,n),ue=r,Je=i,ue!==null&&(Je?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(Je?(e=ue,n=n.stateNode,e.nodeType===8?uo(e.parentNode,n):e.nodeType===1&&uo(e,n),jr(e)):uo(ue,n.stateNode));break;case 4:r=ue,i=Je,ue=n.stateNode.containerInfo,Je=!0,Tt(e,t,n),ue=r,Je=i;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&_l(n,t,o),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!me&&(In(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){X(n,t,l)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,Tt(e,t,n),me=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function nc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tv),t.forEach(function(r){var i=dv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ge(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*iv(r/1960))-r,10e?16:e,Pt===null)var r=!1;else{if(e=Pt,Pt=null,ps=0,z&6)throw Error(k(331));var i=z;for(z|=4,A=e.current;A!==null;){var s=A,o=s.child;if(A.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aZ()-Ta?rn(e,0):ka|=n),Pe(e,t)}function Xf(e,t){t===0&&(e.mode&1?(t=ci,ci<<=1,!(ci&130023424)&&(ci=4194304)):t=1);var n=Ee();e=St(e,t),e!==null&&(Jr(e,t,n),Pe(e,n))}function cv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xf(e,n)}function dv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(k(314))}r!==null&&r.delete(t),Xf(e,n)}var Jf;Jf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Le=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Le=!1,Ym(e,t,n);Le=!!(e.flags&131072)}else Le=!1,W&&t.flags&1048576&&Zd(t,ss,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Oi(e,t),e=t.pendingProps;var i=Un(t,we.current);zn(t,n),i=ya(null,t,r,e,i,n);var s=wa();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Me(r)?(s=!0,rs(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ha(t),i.updater=Is,t.stateNode=i,i._reactInternals=t,hl(t,r,e,n),t=ml(null,t,r,!0,s,n)):(t.tag=0,W&&s&&oa(t),_e(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Oi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=hv(r),e=Xe(r,e),i){case 0:t=gl(null,t,r,e,n);break e;case 1:t=Ju(null,t,r,e,n);break e;case 11:t=Gu(null,t,r,e,n);break e;case 14:t=Xu(null,t,r,Xe(r.type,e),n);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),gl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),Ju(e,t,r,i,n);case 3:e:{if(Rf(t),e===null)throw Error(k(387));r=t.pendingProps,s=t.memoizedState,i=s.element,rf(e,t),as(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Wn(Error(k(423)),t),t=Yu(e,t,r,n,i);break e}else if(r!==i){i=Wn(Error(k(424)),t),t=Yu(e,t,r,n,i);break e}else for($e=jt(t.stateNode.containerInfo.firstChild),Oe=t,W=!0,Ye=null,n=af(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===i){t=Et(e,t,n);break e}_e(e,t,r,n)}t=t.child}return t;case 5:return uf(t),e===null&&cl(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,sl(r,i)?o=null:s!==null&&sl(r,s)&&(t.flags|=32),Pf(e,t),_e(e,t,o,n),t.child;case 6:return e===null&&cl(t),null;case 13:return $f(e,t,n);case 4:return pa(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):_e(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),Gu(e,t,r,i,n);case 7:return _e(e,t,t.pendingProps,n),t.child;case 8:return _e(e,t,t.pendingProps.children,n),t.child;case 12:return _e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,F(os,r._currentValue),r._currentValue=o,s!==null)if(it(s.value,o)){if(s.children===i.children&&!Ie.current){t=Et(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=wt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),dl(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(k(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),dl(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}_e(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zn(t,n),i=Qe(i),r=r(i),t.flags|=1,_e(e,t,r,n),t.child;case 14:return r=t.type,i=Xe(r,t.pendingProps),i=Xe(r.type,i),Xu(e,t,r,i,n);case 15:return If(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),Oi(e,t),t.tag=1,Me(r)?(e=!0,rs(t)):e=!1,zn(t,n),of(t,r,i),hl(t,r,i,n),ml(null,t,r,!0,e,n);case 19:return Of(e,t,n);case 22:return Mf(e,t,n)}throw Error(k(156,t.tag))};function Yf(e,t){return Ed(e,t)}function fv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new fv(e,t,n,r)}function Aa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hv(e){if(typeof e=="function")return Aa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kl)return 11;if(e===Gl)return 14}return 2}function Ht(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Di(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Aa(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Sn:return sn(n.children,i,s,t);case Ql:o=8,i|=8;break;case jo:return e=Be(12,n,t,i|2),e.elementType=jo,e.lanes=s,e;case zo:return e=Be(13,n,t,i),e.elementType=zo,e.lanes=s,e;case Do:return e=Be(19,n,t,i),e.elementType=Do,e.lanes=s,e;case od:return $s(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case id:o=10;break e;case sd:o=9;break e;case Kl:o=11;break e;case Gl:o=14;break e;case Ct:o=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Be(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function sn(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function $s(e,t,n,r){return e=Be(22,e,r,t),e.elementType=od,e.lanes=n,e.stateNode={isHidden:!1},e}function yo(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function wo(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pv(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ys(0),this.expirationTimes=Ys(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ys(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function La(e,t,n,r,i,s,o,l,a){return e=new pv(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Be(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ha(s),e}function gv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nh)}catch(e){console.error(e)}}nh(),Zc.exports=De;var _v=Zc.exports,xv,cc=_v;xv=cc.createRoot,cc.hydrateRoot;const fn=({children:e,title:t="",icon:n,disabled:r=!1,toggled:i=!1,onClick:s=()=>{},style:o,testId:l,className:a,ariaLabel:u})=>w.jsxs("button",{className:tt(a,"toolbar-button",n,i&&"toggled"),onMouseDown:dc,onClick:s,onDoubleClick:dc,title:t,disabled:!!r,style:o,"data-testid":l,"aria-label":u||t,children:[n&&w.jsx("span",{className:`codicon codicon-${n}`,style:e?{marginRight:5}:{}}),e]}),aw=({style:e})=>w.jsx("div",{className:"toolbar-separator",style:e}),dc=e=>{e.stopPropagation(),e.preventDefault()},wr=Symbol("context"),rh=Symbol("next"),ih=Symbol("prev"),fc=Symbol("events");class uw{constructor(t){H(this,"startTime");H(this,"endTime");H(this,"browserName");H(this,"channel");H(this,"platform");H(this,"wallTime");H(this,"title");H(this,"options");H(this,"pages");H(this,"actions");H(this,"events");H(this,"stdio");H(this,"errors");H(this,"errorDescriptors");H(this,"hasSource");H(this,"hasStepData");H(this,"sdkLanguage");H(this,"testIdAttributeName");H(this,"sources");H(this,"resources");t.forEach(r=>Sv(r));const n=t.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=Ev(t),this.pages=[].concat(...t.map(r=>r.pages)),this.wallTime=t.map(r=>r.wallTime).reduce((r,i)=>Math.min(r||Number.MAX_VALUE,i),Number.MAX_VALUE),this.startTime=t.map(r=>r.startTime).reduce((r,i)=>Math.min(r,i),Number.MAX_VALUE),this.endTime=t.map(r=>r.endTime).reduce((r,i)=>Math.max(r,i),Number.MIN_VALUE),this.events=[].concat(...t.map(r=>r.events)),this.stdio=[].concat(...t.map(r=>r.stdio)),this.errors=[].concat(...t.map(r=>r.errors)),this.hasSource=t.some(r=>r.hasSource),this.hasStepData=t.some(r=>r.origin==="testRunner"),this.resources=[...t.map(r=>r.resources)].flat(),this.events.sort((r,i)=>r.time-i.time),this.resources.sort((r,i)=>r._monotonicTime-i._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Iv(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(t=>t.error)}_errorDescriptorsFromActions(){var n;const t=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&t.push({action:r,stack:r.stack,message:r.error.message});return t}_errorDescriptorsFromTestRunner(){const t=[];for(const n of this.errors||[])n.message&&t.push({stack:n.stack,message:n.message});return t}}function Sv(e){for(const n of e.pages)n[wr]=e;for(let n=0;n=0;n--){const r=e.actions[n];r[rh]=t,r.apiName.includes("route.")||(t=r)}for(const n of e.events)n[wr]=e;for(const n of e.resources)n[wr]=e}function Ev(e){const t=new Map;for(const i of e){const s=i.traceUrl;let o=t.get(s);o||(o=[],t.set(s,o)),o.push(i)}const n=[];let r=0;for(const[,i]of t){t.size>1&&kv(i,++r);const s=Tv(i);n.push(...s)}n.sort((i,s)=>s.parentId===i.callId?-1:i.parentId===s.callId?1:i.startTime-s.startTime);for(let i=1;il.origin==="library"),r=e.filter(l=>l.origin==="testRunner");if(!r.length||!n.length)return e.map(l=>l.actions.map(a=>({...a,context:l}))).flat();const i=n.some(l=>l.actions.some(a=>!!a.stepId));for(const l of n)for(const a of l.actions){const u=i?a.stepId:`${a.apiName}@${a.wallTime}`;t.set(u,{...a,context:l})}const s=Nv(r,t,i);s&&Cv(n,s);const o=new Map;for(const l of r)for(const a of l.actions){const u=i?a.callId:`${a.apiName}@${a.wallTime}`,c=t.get(u);if(c){o.set(a.callId,c.callId),a.error&&(c.error=a.error),a.attachments&&(c.attachments=a.attachments),a.parentId&&(c.parentId=o.get(a.parentId)??a.parentId),c.startTime=a.startTime,c.endTime=a.endTime;continue}a.parentId&&(a.parentId=o.get(a.parentId)??a.parentId),t.set(u,{...a,context:l})}return[...t.values()]}function Cv(e,t){for(const n of e){n.startTime+=t,n.endTime+=t;for(const r of n.actions)r.startTime&&(r.startTime+=t),r.endTime&&(r.endTime+=t);for(const r of n.events)r.time+=t;for(const r of n.stdio)r.timestamp+=t;for(const r of n.pages)for(const i of r.screencastFrames)i.timestamp+=t;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=t)}}function Nv(e,t,n){for(const r of e)for(const i of r.actions){if(!i.startTime)continue;const s=n?i.callId:`${i.apiName}@${i.wallTime}`,o=t.get(s);if(o)return i.startTime-o.startTime}return 0}function cw(e){const t=new Map;for(const r of e)t.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of t.values()){const i=r.action.parentId&&t.get(r.action.parentId)||n;i.children.push(r),r.parent=i}return{rootItem:n,itemMap:t}}function vs(e){return e[wr]}function bv(e){return e[rh]}function Av(e){return e[ih]}function dw(e){let t=0,n=0;for(const r of Lv(e)){if(r.type==="console"){const i=r.messageType;i==="warning"?++n:i==="error"&&++t}r.type==="event"&&r.method==="pageError"&&++t}return{errors:t,warnings:n}}function Lv(e){let t=e[fc];if(t)return t;const n=bv(e);return t=vs(e).events.filter(r=>r.time>=e.startTime&&(!n||r.time{const a=Math.max(i,e)*window.devicePixelRatio,[u,c]=ru(s?s+"."+r+":size":void 0,a),[f,d]=ru(s?s+"."+r+":size":void 0,a),[g,m]=M.useState(null),[y,_]=ks();let p;r==="vertical"?(p=f/window.devicePixelRatio,y&&y.heightm({offset:r==="vertical"?v.clientY:v.clientX,size:p}),onMouseUp:()=>m(null),onMouseMove:v=>{if(!v.buttons)m(null);else if(g){const E=(r==="vertical"?v.clientY:v.clientX)-g.offset,C=n?g.size+E:g.size-E,b=v.target.parentElement.getBoundingClientRect(),S=Math.min(Math.max(i,C),(r==="vertical"?b.height:b.width)-i);r==="vertical"?d(S*window.devicePixelRatio):c(S*window.devicePixelRatio)}}})]})};function Fs(e,t="'"){const n=JSON.stringify(e),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(t==="'")return t+r.replace(/[']/g,"\\'")+t;if(t==='"')return t+r.replace(/["]/g,'\\"')+t;if(t==="`")return t+r.replace(/[`]/g,"`")+t;throw new Error("Invalid escape char")}function ys(e){return e.charAt(0).toUpperCase()+e.substring(1)}function oh(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Ve(e){let t="";for(let n=0;n=1&&n<=31||n>=48&&n<=57&&(t===0||t===1&&e.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":t===0&&n===45&&e.length===1?"\\"+e.charAt(t):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?e.charAt(t):"\\"+e.charAt(t)}let Jt;function Rv(){Jt=new Map}function ze(e){let t=Jt==null?void 0:Jt.get(e);return t===void 0&&(t=e.replace(/\u200b/g,"").trim().replace(/\s+/g," "),Jt==null||Jt.set(e,t)),t}function Hs(e){return e.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function lh(e){return e.unicode||e.unicodeSets?String(e):String(e).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function qe(e,t){return typeof e!="string"?lh(e):`${JSON.stringify(e)}${t?"s":"i"}`}function xe(e,t){return typeof e!="string"?lh(e):`"${e.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${t?"s":"i"}`}function $v(e,t,n=""){if(e.length<=t)return e;const r=[...e];return r.length>t?r.slice(0,t-n.length).join("")+n:r.join("")}function hc(e,t){return $v(e,t,"…")}function bl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ov(e,t){const n=e.length,r=t.length;let i=0,s=0;const o=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let l=1;l<=n;l++)for(let a=1;a<=r;a++)e[l-1]===t[a-1]&&(o[l][a]=o[l-1][a-1]+1,o[l][a]>i&&(i=o[l][a],s=l));return e.slice(s-i,s)}const te=function(e,t,n){return e>=t&&e<=n};function Ce(e){return te(e,48,57)}function pc(e){return Ce(e)||te(e,65,70)||te(e,97,102)}function jv(e){return te(e,65,90)}function zv(e){return te(e,97,122)}function Dv(e){return jv(e)||zv(e)}function Fv(e){return e>=128}function Fi(e){return Dv(e)||Fv(e)||e===95}function gc(e){return Fi(e)||Ce(e)||e===45}function Hv(e){return te(e,0,8)||e===11||te(e,14,31)||e===127}function Hi(e){return e===10}function ft(e){return Hi(e)||e===9||e===32}const Uv=1114111;class Ra extends Error{constructor(t){super(t),this.name="InvalidCharacterError"}}function Vv(e){const t=[];for(let n=0;n=t.length?-1:t[T]},o=function(T){if(T===void 0&&(T=1),T>3)throw"Spec Error: no more than three codepoints of lookahead.";return s(n+T)},l=function(T){return T===void 0&&(T=1),n+=T,i=s(n),!0},a=function(){return n-=1,!0},u=function(T){return T===void 0&&(T=i),T===-1},c=function(){if(f(),l(),ft(i)){for(;ft(o());)l();return new Al}else{if(i===34)return m();if(i===35)if(gc(o())||p(o(1),o(2))){const T=new Sh("");return v(o(1),o(2),o(3))&&(T.type="id"),T.value=N(),T}else return new ge(i);else return i===36?o()===61?(l(),new Kv):new ge(i):i===39?m():i===40?new vh:i===41?new yh:i===42?o()===61?(l(),new Gv):new ge(i):i===43?C()?(a(),d()):new ge(i):i===44?new hh:i===45?C()?(a(),d()):o(1)===45&&o(2)===62?(l(2),new ch):x()?(a(),g()):new ge(i):i===46?C()?(a(),d()):new ge(i):i===58?new dh:i===59?new fh:i===60?o(1)===33&&o(2)===45&&o(3)===45?(l(3),new uh):new ge(i):i===64?v(o(1),o(2),o(3))?new xh(N()):new ge(i):i===91?new mh:i===92?h()?(a(),g()):new ge(i):i===93?new Ll:i===94?o()===61?(l(),new Qv):new ge(i):i===123?new ph:i===124?o()===61?(l(),new Wv):o()===124?(l(),new wh):new ge(i):i===125?new gh:i===126?o()===61?(l(),new qv):new ge(i):Ce(i)?(a(),d()):Fi(i)?(a(),g()):u()?new Vi:new ge(i)}},f=function(){for(;o(1)===47&&o(2)===42;)for(l(2);;)if(l(),i===42&&o()===47){l();break}else if(u())return},d=function(){const T=b();if(v(o(1),o(2),o(3))){const P=new Xv;return P.value=T.value,P.repr=T.repr,P.type=T.type,P.unit=N(),P}else if(o()===37){l();const P=new Ch;return P.value=T.value,P.repr=T.repr,P}else{const P=new Th;return P.value=T.value,P.repr=T.repr,P.type=T.type,P}},g=function(){const T=N();if(T.toLowerCase()==="url"&&o()===40){for(l();ft(o(1))&&ft(o(2));)l();return o()===34||o()===39?new Bi(T):ft(o())&&(o(2)===34||o(2)===39)?new Bi(T):y()}else return o()===40?(l(),new Bi(T)):new _h(T)},m=function(T){T===void 0&&(T=i);let P="";for(;l();){if(i===T||u())return new Eh(P);if(Hi(i))return a(),new ah;i===92?u(o())||(Hi(o())?l():P+=re(_())):P+=re(i)}throw new Error("Internal error")},y=function(){const T=new kh("");for(;ft(o());)l();if(u(o()))return T;for(;l();){if(i===41||u())return T;if(ft(i)){for(;ft(o());)l();return o()===41||u(o())?(l(),T):(I(),new Ui)}else{if(i===34||i===39||i===40||Hv(i))return I(),new Ui;if(i===92)if(h())T.value+=re(_());else return I(),new Ui;else T.value+=re(i)}}throw new Error("Internal error")},_=function(){if(l(),pc(i)){const T=[i];for(let J=0;J<5&&pc(o());J++)l(),T.push(i);ft(o())&&l();let P=parseInt(T.map(function(J){return String.fromCharCode(J)}).join(""),16);return P>Uv&&(P=65533),P}else return u()?65533:i},p=function(T,P){return!(T!==92||Hi(P))},h=function(){return p(i,o())},v=function(T,P,J){return T===45?Fi(P)||P===45||p(P,J):Fi(T)?!0:T===92?p(T,P):!1},x=function(){return v(i,o(1),o(2))},E=function(T,P,J){return T===43||T===45?!!(Ce(P)||P===46&&Ce(J)):T===46?!!Ce(P):!!Ce(T)},C=function(){return E(i,o(1),o(2))},N=function(){let T="";for(;l();)if(gc(i))T+=re(i);else if(h())T+=re(_());else return a(),T;throw new Error("Internal parse error")},b=function(){let T="",P="integer";for((o()===43||o()===45)&&(l(),T+=re(i));Ce(o());)l(),T+=re(i);if(o(1)===46&&Ce(o(2)))for(l(),T+=re(i),l(),T+=re(i),P="number";Ce(o());)l(),T+=re(i);const J=o(1),st=o(2),er=o(3);if((J===69||J===101)&&Ce(st))for(l(),T+=re(i),l(),T+=re(i),P="number";Ce(o());)l(),T+=re(i);else if((J===69||J===101)&&(st===43||st===45)&&Ce(er))for(l(),T+=re(i),l(),T+=re(i),l(),T+=re(i),P="number";Ce(o());)l(),T+=re(i);const tr=S(T);return{type:P,value:tr,repr:T}},S=function(T){return+T},I=function(){for(;l();){if(i===41||u())return;h()&&_()}};let O=0;for(;!u(o());)if(r.push(c()),O++,O>t.length*2)throw new Error("I'm infinite-looping!");return r}class ee{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class ah extends ee{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Ui extends ee{constructor(){super(...arguments),this.tokenType="BADURL"}}class Al extends ee{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class uh extends ee{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class dh extends ee{constructor(){super(...arguments),this.tokenType=":"}}class fh extends ee{constructor(){super(...arguments),this.tokenType=";"}}class hh extends ee{constructor(){super(...arguments),this.tokenType=","}}class Jn extends ee{constructor(){super(...arguments),this.value="",this.mirror=""}}class ph extends Jn{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class gh extends Jn{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class mh extends Jn{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Ll extends Jn{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class vh extends Jn{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class yh extends Jn{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class qv extends ee{constructor(){super(...arguments),this.tokenType="~="}}class Wv extends ee{constructor(){super(...arguments),this.tokenType="|="}}class Qv extends ee{constructor(){super(...arguments),this.tokenType="^="}}class Kv extends ee{constructor(){super(...arguments),this.tokenType="$="}}class Gv extends ee{constructor(){super(...arguments),this.tokenType="*="}}class wh extends ee{constructor(){super(...arguments),this.tokenType="||"}}class Vi extends ee{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ge extends ee{constructor(t){super(),this.tokenType="DELIM",this.value="",this.value=re(t)}toString(){return"DELIM("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}toSource(){return this.value==="\\"?`\\ `:this.value}}class Yn extends ee{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class _h extends Yn{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return ti(this.value)}}class Bi extends Yn{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ti(this.value)+"("}}class xh extends Yn{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+ti(this.value)}}class Sh extends Yn{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+ti(this.value):"#"+Jv(this.value)}}class Eh extends Yn{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+Nh(this.value)+'"'}}class kh extends Yn{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Nh(this.value)+'")'}}class Th extends ee{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class Ch extends ee{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class Xv extends ee{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=ti(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||te(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function ti(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r=128||i===45||i===95||te(i,48,57)||te(i,65,90)||te(i,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function Jv(e){e=""+e;let t="";for(let n=0;n=128||r===45||r===95||te(r,48,57)||te(r,65,90)||te(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function Nh(e){e=""+e;let t="";for(let n=0;nS instanceof xh||S instanceof ah||S instanceof Ui||S instanceof wh||S instanceof uh||S instanceof ch||S instanceof fh||S instanceof ph||S instanceof gh||S instanceof kh||S instanceof Ch);if(r)throw new be(`Unsupported token "${r.toSource()}" while parsing selector "${e}"`);let i=0;const s=new Set;function o(){return new be(`Unexpected token "${n[i].toSource()}" while parsing selector "${e}"`)}function l(){for(;n[i]instanceof Al;)i++}function a(S=i){return n[S]instanceof _h}function u(S=i){return n[S]instanceof Eh}function c(S=i){return n[S]instanceof Th}function f(S=i){return n[S]instanceof hh}function d(S=i){return n[S]instanceof vh}function g(S=i){return n[S]instanceof yh}function m(S=i){return n[S]instanceof Bi}function y(S=i){return n[S]instanceof ge&&n[S].value==="*"}function _(S=i){return n[S]instanceof Vi}function p(S=i){return n[S]instanceof ge&&[">","+","~"].includes(n[S].value)}function h(S=i){return f(S)||g(S)||_(S)||p(S)||n[S]instanceof Al}function v(){const S=[x()];for(;l(),!!f();)i++,S.push(x());return S}function x(){return l(),c()||u()?n[i++].value:E()}function E(){const S={simples:[]};for(l(),p()?S.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):S.simples.push({selector:C(),combinator:""});;){if(l(),p())S.simples[S.simples.length-1].combinator=n[i++].value,l();else if(h())break;S.simples.push({combinator:"",selector:C()})}return S}function C(){let S="";const I=[];for(;!h();)if(a()||y())S+=n[i++].toSource();else if(n[i]instanceof Sh)S+=n[i++].toSource();else if(n[i]instanceof ge&&n[i].value===".")if(i++,a())S+="."+n[i++].toSource();else throw o();else if(n[i]instanceof dh)if(i++,a())if(!t.has(n[i].value.toLowerCase()))S+=":"+n[i++].toSource();else{const O=n[i++].value.toLowerCase();I.push({name:O,args:[]}),s.add(O)}else if(m()){const O=n[i++].value.toLowerCase();if(t.has(O)?(I.push({name:O,args:v()}),s.add(O)):S+=`:${O}(${N()})`,l(),!g())throw o();i++}else throw o();else if(n[i]instanceof mh){for(S+="[",i++;!(n[i]instanceof Ll)&&!_();)S+=n[i++].toSource();if(!(n[i]instanceof Ll))throw o();S+="]",i++}else throw o();if(!S&&!I.length)throw o();return{css:S||void 0,functions:I}}function N(){let S="",I=1;for(;!_()&&((d()||m())&&I++,g()&&I--,!!I);)S+=n[i++].toSource();return S}const b=v();if(!_())throw o();if(b.some(S=>typeof S!="object"||!("simples"in S)))throw new be(`Error while parsing selector "${e}"`);return{selector:b,names:Array.from(s)}}const Il=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Zv=new Set(["left-of","right-of","above","below","near"]),bh=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 Us(e){const t=n0(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const i=Yv(r.body,bh);n.push({name:"css",body:i.selector,source:r.body});continue}if(Il.has(r.name)){let i,s;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new be(`Malformed selector: ${r.name}=`+r.body);if(i=u[0],u.length===2){if(typeof u[1]!="number"||!Zv.has(r.name))throw new be(`Malformed selector: ${r.name}=`+r.body);s=u[1]}}catch{throw new be(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:Us(i),distance:s}},l=[...o.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&e0(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if(Il.has(n[0].name))throw new be(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function e0(e,t){return yt({parts:e})===yt({parts:t})}function yt(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let i=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(i=!1);const s=i?n.name+"=":"";return`${r===e.capture?"*":""}${s}${n.source}`}).join(" >> ")}function t0(e,t){const n=(r,i)=>{for(const s of r.parts)t(s,i),Il.has(s.name)&&n(s.body.parsed,!0)};n(e,!1)}function n0(e){let t=0,n,r=0;const i={parts:[]},s=()=>{const l=e.substring(r,t).trim(),a=l.indexOf("=");let u,c;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=l.substring(0,a).trim(),c=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(u="text",c=l):/^\(*\/\//.test(l)||l.startsWith("..")?(u="xpath",c=l):(u="css",c=l);let f=!1;if(u[0]==="*"&&(f=!0,u=u.substring(1)),i.parts.push({name:u,body:c}),f){if(i.capture!==void 0)throw new be("Only one of the selectors can capture using * modifier");i.capture=i.parts.length-1}};if(!e.includes(">>"))return t=e.length,s(),i;const o=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t"&&e[t+1]===">"?(s(),t+=2,r=t):t++}return s(),i}function on(e,t){let n=0,r=e.length===0;const i=()=>e[n]||"",s=()=>{const _=i();return++n,r=n>=e.length,_},o=_=>{throw r?new be(`Unexpected end of selector while parsing selector \`${e}\``):new be(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(_?" during "+_:""))};function l(){for(;!r&&/\s/.test(i());)s()}function a(_){return _>="€"||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function u(){let _="";for(l();!r&&a(i());)_+=s();return _}function c(_){let p=s();for(p!==_&&o("parsing quoted string");!r&&i()!==_;)i()==="\\"&&s(),p+=s();return i()!==_&&o("parsing quoted string"),p+=s(),p}function f(){s()!=="/"&&o("parsing regular expression");let _="",p=!1;for(;!r;){if(i()==="\\")_+=s(),r&&o("parsing regular expression");else if(p&&i()==="]")p=!1;else if(!p&&i()==="[")p=!0;else if(!p&&i()==="/")break;_+=s()}s()!=="/"&&o("parsing regular expression");let h="";for(;!r&&i().match(/[dgimsuy]/);)h+=s();try{return new RegExp(_,h)}catch(v){throw new be(`Error while parsing selector \`${e}\`: ${v.message}`)}}function d(){let _="";return l(),i()==="'"||i()==='"'?_=c(i()).slice(1,-1):_=u(),_||o("parsing property path"),_}function g(){l();let _="";return r||(_+=s()),!r&&_!=="="&&(_+=s()),["=","*=","^=","$=","|=","~="].includes(_)||o("parsing operator"),_}function m(){s();const _=[];for(_.push(d()),l();i()===".";)s(),_.push(d()),l();if(i()==="]")return s(),{name:_.join("."),jsonPath:_,op:"",value:null,caseSensitive:!1};const p=g();let h,v=!0;if(l(),i()==="/"){if(p!=="=")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with regular expression`);h=f()}else if(i()==="'"||i()==='"')h=c(i()).slice(1,-1),l(),i()==="i"||i()==="I"?(v=!1,s()):(i()==="s"||i()==="S")&&(v=!0,s());else{for(h="";!r&&(a(i())||i()==="+"||i()===".");)h+=s();h==="true"?h=!0:h==="false"?h=!1:t||(h=+h,Number.isNaN(h)&&o("parsing attribute value"))}if(l(),i()!=="]"&&o("parsing attribute value"),s(),p!=="="&&typeof h!="string")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with non-string matching value - ${h}`);return{name:_.join("."),jsonPath:_,op:p,value:h,caseSensitive:v}}const y={name:"",attributes:[]};for(y.name=u(),l();i()==="[";)y.attributes.push(m()),l();if(r||o(void 0),!y.name&&!y.attributes.length)throw new be(`Error while parsing selector \`${e}\` - selector cannot be empty`);return y}function Fn(e,t,n=!1){return Ah(e,t,n)[0]}function Ah(e,t,n=!1,r=20,i){try{return _n(new u0[e](i),Us(t),n,r)}catch{return[t]}}function _n(e,t,n=!1,r=20){const i=[...t.parts],s=[];let o=n?"frame-locator":"page";for(let l=0;le.generateLocator(u,"has",y)));continue}if(a.name==="internal:has-not"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"hasNot",y)));continue}if(a.name==="internal:and"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"and",y)));continue}if(a.name==="internal:or"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"or",y)));continue}if(a.name==="internal:chain"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"chain",y)));continue}if(a.name==="internal:label"){const{exact:m,text:y}=dr(a.body);s.push([e.generateLocator(u,"label",y,{exact:m})]);continue}if(a.name==="internal:role"){const m=on(a.body,!0),y={attrs:[]};for(const _ of m.attributes)_.name==="name"?(y.exact=_.caseSensitive,y.name=_.value):(_.name==="level"&&typeof _.value=="string"&&(_.value=+_.value),y.attrs.push({name:_.name==="include-hidden"?"includeHidden":_.name,value:_.value}));s.push([e.generateLocator(u,"role",m.name,y)]);continue}if(a.name==="internal:testid"){const m=on(a.body,!0),{value:y}=m.attributes[0];s.push([e.generateLocator(u,"test-id",y)]);continue}if(a.name==="internal:attr"){const m=on(a.body,!0),{name:y,value:_,caseSensitive:p}=m.attributes[0],h=_,v=!!p;if(y==="placeholder"){s.push([e.generateLocator(u,"placeholder",h,{exact:v})]);continue}if(y==="alt"){s.push([e.generateLocator(u,"alt",h,{exact:v})]);continue}if(y==="title"){s.push([e.generateLocator(u,"title",h,{exact:v})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){const m=s[s.length-1],y=i[l-1],_=m.map(p=>e.chainLocators([p,e.generateLocator(u,"frame","")]));["xpath","css"].includes(y.name)&&_.push(e.generateLocator(u,"frame-locator",yt({parts:[y]})),e.generateLocator(u,"frame-locator",yt({parts:[y]},!0))),m.splice(0,m.length,..._),o="frame-locator";continue}const c=i[l+1],f=yt({parts:[a]}),d=e.generateLocator(u,"default",f);if(c&&["internal:has-text","internal:has-not-text"].includes(c.name)){const{exact:m,text:y}=dr(c.body);if(!m){const _=e.generateLocator("locator",c.name==="internal:has-text"?"has-text":"has-not-text",y,{exact:m}),p={};c.name==="internal:has-text"?p.hasText=y:p.hasNotText=y;const h=e.generateLocator(u,"default",f,p);s.push([e.chainLocators([d,_]),h]),l++;continue}}let g;if(["xpath","css"].includes(a.name)){const m=yt({parts:[a]},!0);g=e.generateLocator(u,"default",m)}s.push([d,g].filter(Boolean))}return r0(e,s,r)}function r0(e,t,n){const r=t.map(()=>""),i=[],s=o=>{if(o===t.length)return i.push(e.chainLocators(r)),r.lengthJSON.parse(r));for(let r=0;r{const[n,r]=M.useState("copy"),i=M.useCallback(()=>{(typeof e=="function"?e():Promise.resolve(e)).then(o=>{navigator.clipboard.writeText(o).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[e]);return w.jsx(fn,{title:t||"Copy",icon:n,onClick:i})},mc=({value:e,description:t})=>{const n=M.useCallback(async()=>{const r=typeof e=="function"?await e():e;await navigator.clipboard.writeText(r)},[e]);return w.jsx(fn,{title:t,onClick:n,className:"copy-to-clipboard-text-button",children:t})},Lh=({text:e})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:e}),vc=new Map;function $a({name:e,items:t=[],id:n,render:r,icon:i,isError:s,isWarning:o,isInfo:l,selectedItem:a,onAccepted:u,onSelected:c,onHighlighted:f,onIconClicked:d,noItemsMessage:g,dataTestId:m,notSelectable:y}){const _=M.useRef(null),[p,h]=M.useState();return M.useEffect(()=>{f==null||f(p)},[f,p]),M.useEffect(()=>{const v=_.current;if(!v)return;const x=()=>{vc.set(e,v.scrollTop)};return v.addEventListener("scroll",x,{passive:!0}),()=>v.removeEventListener("scroll",x)},[e]),M.useEffect(()=>{_.current&&(_.current.scrollTop=vc.get(e)||0)},[e]),w.jsx("div",{className:tt("list-view vbox",e+"-list-view"),role:t.length>0?"list":void 0,"data-testid":m||e+"-list",children:w.jsxs("div",{className:tt("list-view-content",y&&"not-selectable"),tabIndex:0,onKeyDown:v=>{var N;if(a&&v.key==="Enter"){u==null||u(a,t.indexOf(a));return}if(v.key!=="ArrowDown"&&v.key!=="ArrowUp")return;v.stopPropagation(),v.preventDefault();const x=a?t.indexOf(a):-1;let E=x;v.key==="ArrowDown"&&(x===-1?E=0:E=Math.min(x+1,t.length-1)),v.key==="ArrowUp"&&(x===-1?E=t.length-1:E=Math.max(x-1,0));const C=(N=_.current)==null?void 0:N.children.item(E);pg(C||void 0),f==null||f(void 0),c==null||c(t[E],E),h(void 0)},ref:_,children:[g&&t.length===0&&w.jsx("div",{className:"list-view-empty",children:g}),t.map((v,x)=>{const E=r(v,x);return w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(v,x),role:"listitem",className:tt("list-view-entry",a===v&&"selected",!y&&p===v&&"highlighted",(s==null?void 0:s(v,x))&&"error",(o==null?void 0:o(v,x))&&"warning",(l==null?void 0:l(v,x))&&"info"),onClick:()=>c==null?void 0:c(v,x),onMouseEnter:()=>h(v),onMouseLeave:()=>h(void 0),children:[i&&w.jsx("div",{className:"codicon "+(i(v,x)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:C=>{C.preventDefault(),C.stopPropagation()},onClick:C=>{C.stopPropagation(),C.preventDefault(),d==null||d(v,x)}}),typeof E=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:E}):E]},(n==null?void 0:n(v,x))||x)})]})})}function ws(e,t){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let i,s={},o=!1,l=t==null?void 0:t.fg,a=t==null?void 0:t.bg;for(;(i=n.exec(e))!==null;){const[,,u,,c]=i;if(u){const f=+u;switch(f){case 0:s={};break;case 1:s["font-weight"]="bold";break;case 2:s.opacity="0.8";break;case 3:s["font-style"]="italic";break;case 4:s["text-decoration"]="underline";break;case 7:o=!0;break;case 8:s.display="none";break;case 9:s["text-decoration"]="line-through";break;case 22:delete s["font-weight"],delete s["font-style"],delete s.opacity,delete s["text-decoration"];break;case 23:delete s["font-weight"],delete s["font-style"],delete s.opacity;break;case 24:delete s["text-decoration"];break;case 27:o=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:l=yc[f-30];break;case 39:l=t==null?void 0:t.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:a=yc[f-40];break;case 49:a=t==null?void 0:t.bg;break;case 53:s["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:l=wc[f-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:a=wc[f-100];break}}else if(c){const f={...s},d=o?a:l;d!==void 0&&(f.color=d);const g=o?l:a;g!==void 0&&(f["background-color"]=g),r.push(`${d0(c)}`)}}return r.join("")}const yc={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},wc={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function d0(e){return e.replace(/[&"<>]/g,t=>({"&":"&",'"':""","<":"<",">":">"})[t])}function f0(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const h0=$a;function fw(e,t){const{entries:n}=M.useMemo(()=>{if(!e)return{entries:[]};const i=[];for(const s of e.events){if(s.type==="console"){const o=s.args&&s.args.length?p0(s.args):Ih(s.text),l=s.location.url,u=`${l?l.substring(l.lastIndexOf("/")+1):""}:${s.location.lineNumber}`;i.push({browserMessage:{body:o,location:u},isError:s.messageType==="error",isWarning:s.messageType==="warning",timestamp:s.time})}s.type==="event"&&s.method==="pageError"&&i.push({browserError:s.params.error,isError:!0,isWarning:!1,timestamp:s.time})}for(const s of e.stdio){let o="";s.text&&(o=ws(s.text.trim())||""),s.base64&&(o=ws(atob(s.base64).trim())||""),i.push({nodeMessage:{html:o},isError:s.type==="stderr",isWarning:!1,timestamp:s.timestamp})}return i.sort((s,o)=>s.timestamp-o.timestamp),{entries:i}},[e]);return{entries:M.useMemo(()=>t?n.filter(i=>i.timestamp>=t.minimum&&i.timestamp<=t.maximum):n,[n,t])}}const hw=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(h0,{name:"console",onAccepted:r,onHighlighted:n,items:e.entries,isError:i=>i.isError,isWarning:i=>i.isWarning,render:i=>{const s=Ro(i.timestamp-t.minimum),o=w.jsx("span",{className:"console-time",children:s}),l=i.isError?"status-error":i.isWarning?"status-warning":"status-none",a=i.browserMessage||i.browserError?w.jsx("span",{className:tt("codicon","codicon-browser",l),title:"Browser message"}):w.jsx("span",{className:tt("codicon","codicon-file",l),title:"Runner message"});let u,c,f,d;const{browserMessage:g,browserError:m,nodeMessage:y}=i;if(g&&(u=g.location,c=g.body),m){const{error:_,value:p}=m;_?(c=_.message,d=_.stack):c=String(p)}return y&&(f=y.html),w.jsxs("div",{className:"console-line",children:[o,a,u&&w.jsx("span",{className:"console-location",children:u}),c&&w.jsx("span",{className:"console-line-message",children:c}),f&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&w.jsx("div",{className:"console-stack",children:d})]})}})}):w.jsx(Lh,{text:"No console entries"});function p0(e){if(e.length===1)return Ih(e[0].preview);const t=typeof e[0].value=="string"&&e[0].value.includes("%"),n=t?e[0].value:"",r=t?e.slice(1):e;let i=0;const s=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(w.jsx("span",{children:a}));let u=0;for(;(o=s.exec(n))!==null;){const c=n.substring(u,o.index);a.push(w.jsx("span",{children:c})),u=o.index+2;const f=o[0][1];if(f==="%")a.push(w.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[i++],g={};typeof(d==null?void 0:d.value)!="string"&&(g.color="var(--vscode-debugTokenExpression-number)"),a.push(w.jsx("span",{style:g,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[i++],g=d?g0(d.preview):{};l.push(w.jsx("span",{style:g,children:a}))}}for(ua[1].toUpperCase());t[l]=o}return t}catch{return{}}}function m0(e){return["background","border","color","font","line","margin","padding","text"].some(n=>e.startsWith(n))}const Oa=({noShadow:e,children:t,noMinHeight:n,className:r,sidebarBackground:i,onClick:s})=>w.jsx("div",{className:tt("toolbar",e&&"no-shadow",n&&"no-min-height",r,i&&"toolbar-sidebar-background"),onClick:s,children:t}),v0=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:s,mode:o})=>{const l=M.useId();return t||(t=e[0].id),o||(o="default"),w.jsx("div",{className:"tabbed-pane","data-testid":s,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(Oa,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...e.map(a=>w.jsx(Mh,{id:a.id,ariaControls:`${l}-${a.id}`,title:a.title,count:a.count,errorCount:a.errorCount,selected:t===a.id,onSelect:n},a.id))]}),o==="select"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:w.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:a=>{n==null||n(e[a.currentTarget.selectedIndex].id)},children:e.map(a=>{let u="";return a.count&&(u=` (${a.count})`),a.errorCount&&(u=` (${a.errorCount})`),w.jsxs("option",{value:a.id,selected:a.id===t,role:"tab","aria-controls":`${l}-${a.id}`,children:[a.title,u]},a.id)})})}),i&&w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...i]})]}),e.map(a=>{const u="tab-content tab-"+a.id;if(a.component)return w.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,style:{display:t===a.id?"inherit":"none"},children:a.component},a.id);if(t===a.id)return w.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,children:a.render()},a.id)})]})})},Mh=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:s,ariaControls:o})=>w.jsxs("div",{className:tt("tabbed-pane-tab",i&&"selected"),onClick:()=>s==null?void 0:s(e),role:"tab",title:t,"aria-controls":o,children:[w.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&w.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&w.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]}),y0="modulepreload",w0=function(e,t){return new URL(e,t).href},_c={},_0=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=w0(u,r),u in _c)return;_c[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let m=o.length-1;m>=0;m--){const y=o[m];if(y.href===u&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":y0,c||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((m,y)=>{g.addEventListener("load",m),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},pw=20,Vs=({text:e,language:t,mimeType:n,linkify:r,readOnly:i,highlight:s,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:u,wrapLines:c,onChange:f,dataTestId:d,placeholder:g})=>{const[m,y]=ks(),[_]=M.useState(_0(()=>import("./codeMirrorModule-BBCX0spr.js"),__vite__mapDeps([0,1]),import.meta.url).then(x=>x.default)),p=M.useRef(null),[h,v]=M.useState();return M.useEffect(()=>{(async()=>{var b,S;const x=await _;S0(x);const E=y.current;if(!E)return;const C=k0(t)||E0(n)||(r?"text/linkified":"");if(p.current&&C===p.current.cm.getOption("mode")&&!!i===p.current.cm.getOption("readOnly")&&l===p.current.cm.getOption("lineNumbers")&&c===p.current.cm.getOption("lineWrapping")&&g===p.current.cm.getOption("placeholder"))return;(S=(b=p.current)==null?void 0:b.cm)==null||S.getWrapperElement().remove();const N=x(E,{value:"",mode:C,readOnly:!!i,lineNumbers:l,lineWrapping:c,placeholder:g});return p.current={cm:N},a&&N.focus(),v(N),N})()},[_,h,y,t,n,r,l,c,i,a,g]),M.useEffect(()=>{p.current&&p.current.cm.setSize(m.width,m.height)},[m]),M.useLayoutEffect(()=>{var C;if(!h)return;let x=!1;if(h.getValue()!==e&&(h.setValue(e),x=!0,u&&(h.execCommand("selectAll"),h.focus())),x||JSON.stringify(s)!==JSON.stringify(p.current.highlight)){for(const S of p.current.highlight||[])h.removeLineClass(S.line-1,"wrap");for(const S of s||[])h.addLineClass(S.line-1,"wrap",`source-line-${S.type}`);for(const S of p.current.widgets||[])h.removeLineWidget(S);for(const S of p.current.markers||[])S.clear();const N=[],b=[];for(const S of s||[]){if(S.type!=="subtle-error"&&S.type!=="error")continue;const I=(C=p.current)==null?void 0:C.cm.getLine(S.line-1);if(I){const O={};O.title=S.message||"",b.push(h.markText({line:S.line-1,ch:0},{line:S.line-1,ch:S.column||I.length},{className:"source-line-error-underline",attributes:O}))}if(S.type==="error"){const O=document.createElement("div");O.innerHTML=ws(S.message||""),O.className="source-line-error-widget",N.push(h.addLineWidget(S.line,O,{above:!0,coverGutter:!1}))}}p.current.highlight=s,p.current.widgets=N,p.current.markers=b}typeof o=="number"&&p.current.cm.lineCount()>=o&&h.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let E;return f&&(E=()=>f(h.getValue()),h.on("change",E)),()=>{E&&h.off("change",E)}},[h,e,s,o,u,f]),w.jsx("div",{"data-testid":d,className:"cm-wrapper",ref:y,onClick:x0})};function x0(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let xc=!1;function S0(e){xc||(xc=!0,e.defineSimpleMode("text/linkified",{start:[{regex:gg,token:"linkified"}]}))}function E0(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function k0(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[e]}async function T0(e){const t=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function i(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^ `)+d}function s(f){function d(g){let y=g.charCodeAt(0).toString(16);for(;y.length<4;)y="0"+y;return"\\u"+y}return/[\0-\x1F\x7F-\x9F!]|\'/.test(f)?"$'"+f.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,d)+"'":"'"+f+"'"}const o=t==="win"?i:s;n.push(o(e.request.url).replace(/[[{}\]]/g,"\\$&"));let l="GET";const a=[],u=await Ph(e);u&&(a.push("--data-raw "+o(u)),r.add("content-length"),l="POST"),e.request.method!==l&&n.push("-X "+o(e.request.method));const c=e.request.headers;for(let f=0;f=3?t==="win"?` ^ `:` \\ `:" ")}async function C0(e,t=0){const n=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),r=new Set(["cookie","authorization"]),i=JSON.stringify(e.request.url),s=e.request.headers,o=s.reduce((m,y)=>{const _=y.name;return!n.has(_.toLowerCase())&&!_.includes(":")&&m.append(_,y.value),m},new Headers),l={};for(const m of o)l[m[0]]=m[1];const a=e.request.cookies.length||s.some(({name:m})=>r.has(m.toLowerCase()))?"include":"omit",u=s.find(({name:m})=>m.toLowerCase()==="referer"),c=u?u.value:void 0,f=await Ph(e),d={headers:Object.keys(l).length?l:void 0,referrer:c,body:f,method:e.request.method,mode:"cors"};if(t===1){const m=s.find(_=>_.name.toLowerCase()==="cookie"),y={};delete d.mode,m&&(y.cookie=m.value),c&&(delete d.referrer,y.Referer=c),Object.keys(y).length&&(d.headers={...l,...y})}else d.credentials=a;const g=JSON.stringify(d,null,2);return`fetch(${i}, ${g});`}async function Ph(e){var t,n;return(t=e.request.postData)!=null&&t._sha1?await fetch(`sha1/${e.request.postData._sha1}`).then(r=>r.text()):(n=e.request.postData)==null?void 0:n.text}const N0=({resource:e,onClose:t})=>{const[n,r]=M.useState("request");return w.jsx(v0,{dataTestId:"network-request-details",leftToolbar:[w.jsx(fn,{icon:"close",title:"Close",onClick:t},"close")],tabs:[{id:"request",title:"Request",render:()=>w.jsx(b0,{resource:e})},{id:"response",title:"Response",render:()=>w.jsx(A0,{resource:e})},{id:"body",title:"Body",render:()=>w.jsx(L0,{resource:e})}],selectedTab:n,setSelectedTab:r})},b0=({resource:e})=>{const[t,n]=M.useState(null);return M.useEffect(()=>{(async()=>{if(e.request.postData){const i=e.request.headers.find(o=>o.name.toLowerCase()==="content-type"),s=i?i.value:"";if(e.request.postData._sha1){const o=await fetch(`sha1/${e.request.postData._sha1}`);n({text:Ml(await o.text(),s),mimeType:s})}else n({text:Ml(e.request.postData.text,s),mimeType:s})}else n(null)})()},[e]),w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"General"}),w.jsx("div",{className:"network-request-details-url",children:`URL: ${e.request.url}`}),w.jsx("div",{className:"network-request-details-general",children:`Method: ${e.request.method}`}),e.response.status!==-1&&w.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",w.jsx("span",{className:M0(e.response.status),style:{display:"inline-flex"},children:`${e.response.status} ${e.response.statusText}`})]}),e.request.queryString.length?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),w.jsx("div",{className:"network-request-details-headers",children:e.request.queryString.map(r=>`${r.name}: ${r.value}`).join(` `)})]}):null,w.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),w.jsx("div",{className:"network-request-details-headers",children:e.request.headers.map(r=>`${r.name}: ${r.value}`).join(` `)}),w.jsxs("div",{className:"network-request-details-copy",children:[w.jsx(mc,{description:"Copy as cURL",value:()=>T0(e)}),w.jsx(mc,{description:"Copy as Fetch",value:()=>C0(e)})]}),t&&w.jsx("div",{className:"network-request-details-header",children:"Request Body"}),t&&w.jsx(Vs,{text:t.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})]})},A0=({resource:e})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),w.jsx("div",{className:"network-request-details-headers",children:e.response.headers.map(t=>`${t.name}: ${t.value}`).join(` `)})]}),L0=({resource:e})=>{const[t,n]=M.useState(null);return M.useEffect(()=>{(async()=>{if(e.response.content._sha1){const i=e.response.content.mimeType.includes("image"),s=e.response.content.mimeType.includes("font"),o=await fetch(`sha1/${e.response.content._sha1}`);if(i){const l=await o.blob(),a=new FileReader,u=new Promise(c=>a.onload=c);a.readAsDataURL(l),n({dataUrl:(await u).target.result})}else if(s){const l=await o.arrayBuffer();n({font:l})}else{const l=Ml(await o.text(),e.response.content.mimeType);n({text:l,mimeType:e.response.content.mimeType})}}else n(null)})()},[e]),w.jsxs("div",{className:"network-request-details-tab",children:[!e.response.content._sha1&&w.jsx("div",{children:"Response body is not available for this request."}),t&&t.font&&w.jsx(I0,{font:t.font}),t&&t.dataUrl&&w.jsx("img",{draggable:"false",src:t.dataUrl}),t&&t.text&&w.jsx(Vs,{text:t.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})]})},I0=({font:e})=>{const[t,n]=M.useState(!1);return M.useEffect(()=>{let r;try{r=new FontFace("font-preview",e),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[e]),t?w.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):w.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",w.jsx("br",{}),"NOPQRSTUVWXYZ",w.jsx("br",{}),"abcdefghijklm",w.jsx("br",{}),"nopqrstuvwxyz",w.jsx("br",{}),"1234567890"]})};function M0(e){return e<300||e===304?"green-circle":e<400?"yellow-circle":"red-circle"}function Ml(e,t){if(e===null)return"Loading...";const n=e;if(n==="")return"";if(t.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return t.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}const P0=({cursor:e,onPaneMouseMove:t,onPaneMouseUp:n,onPaneDoubleClick:r})=>(et.useEffect(()=>{const i=document.createElement("div");return i.style.position="fixed",i.style.top="0",i.style.right="0",i.style.bottom="0",i.style.left="0",i.style.zIndex="9999",i.style.cursor=e,document.body.appendChild(i),t&&i.addEventListener("mousemove",t),n&&i.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{t&&i.removeEventListener("mousemove",t),n&&i.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(i)}},[e,t,n,r]),w.jsx(w.Fragment,{})),R0={position:"absolute",top:0,right:0,bottom:0,left:0},$0=({orientation:e,offsets:t,setOffsets:n,resizerColor:r,resizerWidth:i,minColumnWidth:s})=>{const o=s||0,[l,a]=et.useState(null),[u,c]=ks(),f={position:"absolute",right:e==="horizontal"?void 0:0,bottom:e==="horizontal"?0:void 0,width:e==="horizontal"?7:void 0,height:e==="horizontal"?void 0:7,borderTopWidth:e==="horizontal"?void 0:(7-i)/2,borderRightWidth:e==="horizontal"?(7-i)/2:void 0,borderBottomWidth:e==="horizontal"?void 0:(7-i)/2,borderLeftWidth:e==="horizontal"?(7-i)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:e==="horizontal"?"ew-resize":"ns-resize"};return w.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-i)/2,zIndex:100,pointerEvents:"none"},ref:c,children:[!!l&&w.jsx(P0,{cursor:e==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>a(null),onPaneMouseMove:d=>{if(!d.buttons)a(null);else if(l){const g=e==="horizontal"?d.clientX-l.clientX:d.clientY-l.clientY,m=l.offset+g,y=l.index>0?t[l.index-1]:0,_=e==="horizontal"?u.width:u.height,p=Math.min(Math.max(y+o,m),_-o)-t[l.index];for(let h=l.index;hw.jsx("div",{style:{...f,top:e==="horizontal"?0:d,left:e==="horizontal"?d:0,pointerEvents:"initial"},onMouseDown:m=>a({clientX:m.clientX,clientY:m.clientY,offset:d,index:g}),children:w.jsx("div",{style:{...R0,background:r}})},g))]})};function O0(e){const[t,n]=M.useState([]);M.useEffect(()=>{const s=[];for(let o=0;o{var o,l;(l=e.setSorting)==null||l.call(e,{by:s,negate:((o=e.sorting)==null?void 0:o.by)===s?!e.sorting.negate:!1})},[e]);return w.jsxs("div",{className:`grid-view ${e.name}-grid-view`,children:[w.jsx($0,{orientation:"horizontal",offsets:t,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),w.jsxs("div",{className:"vbox",children:[w.jsx("div",{className:"grid-view-header",children:e.columns.map((s,o)=>w.jsxs("div",{className:"grid-view-header-cell "+j0(s,e.sorting),style:{width:oe.setSorting&&i(s),children:[w.jsx("span",{className:"grid-view-header-cell-title",children:e.columnTitle(s)}),w.jsx("span",{className:"codicon codicon-triangle-up"}),w.jsx("span",{className:"codicon codicon-triangle-down"})]},e.columnTitle(s)))}),w.jsx($a,{name:e.name,items:e.items,id:e.id,render:(s,o)=>w.jsx(w.Fragment,{children:e.columns.map((l,a)=>{const{body:u,title:c}=e.render(s,l,o);return w.jsx("div",{className:`grid-view-cell grid-view-column-${String(l)}`,title:c,style:{width:aw.jsxs("div",{className:"network-filters",children:[w.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:e.searchValue,onChange:n=>t({...e,searchValue:n.target.value})}),w.jsx("div",{className:"network-filters-resource-types",children:z0.map(n=>w.jsx("div",{title:n,onClick:()=>t({...e,resourceType:n}),className:`network-filters-resource-type ${e.resourceType===n?"selected":""}`,children:n},n))})]}),H0=O0;function gw(e,t){const n=M.useMemo(()=>((e==null?void 0:e.resources)||[]).filter(o=>t?!!o._monotonicTime&&o._monotonicTime>=t.minimum&&o._monotonicTime<=t.maximum:!0),[e,t]),r=M.useMemo(()=>new W0(e),[e]);return{resources:n,contextIdMap:r}}const mw=({boundaries:e,networkModel:t,onEntryHovered:n})=>{const[r,i]=M.useState(void 0),[s,o]=M.useState(void 0),[l,a]=M.useState(D0),{renderedEntries:u}=M.useMemo(()=>{const m=t.resources.map(y=>Q0(y,e,t.contextIdMap)).filter(Y0(l));return r&&G0(m,r),{renderedEntries:m}},[t.resources,t.contextIdMap,l,r,e]),[c,f]=M.useState(()=>new Map(Rh().map(m=>[m,V0(m)]))),d=M.useCallback(m=>{a(m),o(void 0)},[]);if(!t.resources.length)return w.jsx(Lh,{text:"No network calls"});const g=w.jsx(H0,{name:"network",items:u,selectedItem:s,onSelected:m=>o(m),onHighlighted:m=>n==null?void 0:n(m==null?void 0:m.resource),columns:B0(!!s,u),columnTitle:U0,columnWidths:c,setColumnWidths:f,isError:m=>m.status.code>=400||m.status.code===-1,isInfo:m=>!!m.route,render:(m,y)=>q0(m,y),sorting:r,setSorting:i});return w.jsxs(w.Fragment,{children:[w.jsx(F0,{filterState:l,onFilterStateChange:d}),!s&&g,s&&w.jsx(sh,{sidebarSize:c.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:w.jsx(N0,{resource:s.resource,onClose:()=>o(void 0)}),sidebar:g})]})},U0=e=>e==="contextId"?"Source":e==="name"?"Name":e==="method"?"Method":e==="status"?"Status":e==="contentType"?"Content Type":e==="duration"?"Duration":e==="size"?"Size":e==="start"?"Start":e==="route"?"Route":"",V0=e=>e==="name"?200:e==="method"||e==="status"?60:e==="contentType"?200:e==="contextId"?60:100;function B0(e,t){if(e){const r=["name"];return Sc(t)&&r.unshift("contextId"),r}let n=Rh();return Sc(t)||(n=n.filter(r=>r!=="contextId")),n}function Rh(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const q0=(e,t)=>t==="contextId"?{body:e.contextId,title:e.name.url}:t==="name"?{body:e.name.name,title:e.name.url}:t==="method"?{body:e.method}:t==="status"?{body:e.status.code>0?e.status.code:"",title:e.status.text}:t==="contentType"?{body:e.contentType}:t==="duration"?{body:Ro(e.duration)}:t==="size"?{body:dg(e.size)}:t==="start"?{body:Ro(e.start)}:t==="route"?{body:e.route}:{body:""};class W0{constructor(t){H(this,"_pagerefToShortId",new Map);H(this,"_contextToId",new Map);H(this,"_lastPageId",0);H(this,"_lastApiRequestContextId",0)}contextId(t){return t.pageref?this._pageId(t.pageref):t._apiRequest?this._apiRequestContextId(t):""}_pageId(t){let n=this._pagerefToShortId.get(t);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(t,n)),n}_apiRequestContextId(t){const n=vs(t);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function Sc(e){const t=new Set;for(const n of e)if(t.add(n.contextId),t.size>1)return!0;return!1}const Q0=(e,t,n)=>{const r=K0(e);let i;try{const l=new URL(e.request.url);i=l.pathname.substring(l.pathname.lastIndexOf("/")+1),i||(i=l.host)}catch{i=e.request.url}let s=e.response.content.mimeType;const o=s.match(/^(.*);\s*charset=.*$/);return o&&(s=o[1]),{name:{name:i,url:e.request.url},method:e.request.method,status:{code:e.response.status,text:e.response.statusText},contentType:s,duration:e.time,size:e.response._transferSize>0?e.response._transferSize:e.response.bodySize,start:e._monotonicTime-t.minimum,route:r,resource:e,contextId:n.contextId(e)}};function K0(e){return e._wasAborted?"aborted":e._wasContinued?"continued":e._wasFulfilled?"fulfilled":e._apiRequest?"api":""}function G0(e,t){const n=X0(t==null?void 0:t.by);n&&e.sort(n),t.negate&&e.reverse()}function X0(e){if(e==="start")return(t,n)=>t.start-n.start;if(e==="duration")return(t,n)=>t.duration-n.duration;if(e==="status")return(t,n)=>t.status.code-n.status.code;if(e==="method")return(t,n)=>{const r=t.method,i=n.method;return r.localeCompare(i)};if(e==="size")return(t,n)=>t.size-n.size;if(e==="contentType")return(t,n)=>t.contentType.localeCompare(n.contentType);if(e==="name")return(t,n)=>t.name.name.localeCompare(n.name.name);if(e==="route")return(t,n)=>t.route.localeCompare(n.route);if(e==="contextId")return(t,n)=>t.contextId.localeCompare(n.contextId)}const J0={All:()=>!0,Fetch:e=>e==="application/json",HTML:e=>e==="text/html",CSS:e=>e==="text/css",JS:e=>e.includes("javascript"),Font:e=>e.includes("font"),Image:e=>e.includes("image")};function Y0({searchValue:e,resourceType:t}){return n=>{const r=J0[t];return r(n.contentType)&&n.name.url.toLowerCase().includes(e.toLowerCase())}}const Ec={queryAll(e,t){t.startsWith("/")&&e.nodeType!==Node.DOCUMENT_NODE&&(t="."+t);const n=[],r=e.ownerDocument||e;if(!r)return n;const i=r.evaluate(t,e,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let s=i.iterateNext();s;s=i.iterateNext())s.nodeType===Node.ELEMENT_NODE&&n.push(s);return n}};let $h="";function Z0(e){$h=e}function Bs(e,t){for(;t;){if(e.contains(t))return!0;t=jh(t)}return!1}function Se(e){if(e.parentElement)return e.parentElement;if(e.parentNode&&e.parentNode.nodeType===11&&e.parentNode.host)return e.parentNode.host}function Oh(e){let t=e;for(;t.parentNode;)t=t.parentNode;if(t.nodeType===11||t.nodeType===9)return t}function jh(e){for(;e.parentElement;)e=e.parentElement;return Se(e)}function _r(e,t,n){for(;e;){const r=e.closest(t);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;e=jh(e)}}function gn(e,t){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,t):void 0}function zh(e,t){if(t=t??gn(e),!t)return!0;if(Element.prototype.checkVisibility&&$h!=="webkit"){if(!e.checkVisibility())return!1}else{const n=e.closest("details,summary");if(n!==e&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return t.visibility==="visible"}function nn(e){const t=gn(e);if(!t)return!0;if(t.display==="contents"){for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===1&&nn(r)||r.nodeType===3&&Dh(r))return!0;return!1}if(!zh(e,t))return!1;const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Dh(e){const t=e.ownerDocument.createRange();t.selectNode(e);const n=t.getBoundingClientRect();return n.width>0&&n.height>0}function ve(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function kc(e){return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")}const Tc="article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]",ey=new Map([["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-labelledby",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",new Set(["generic"])]]);function Fh(e,t){return[...ey].some(([n,r])=>!(r!=null&&r.has(t||""))&&e.hasAttribute(n))}function Hh(e){return!Number.isNaN(Number(String(e.getAttribute("tabindex"))))}function ty(e){return!ep(e)&&(ny(e)||Hh(e))}function ny(e){const t=ve(e);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(t)?!0:t==="A"||t==="AREA"?e.hasAttribute("href"):t==="INPUT"?!e.hidden:!1}const xo={A:e=>e.hasAttribute("href")?"link":null,AREA:e=>e.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:e=>_r(e,Tc)?null:"contentinfo",FORM:e=>kc(e)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:e=>_r(e,Tc)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:e=>e.getAttribute("alt")===""&&!e.getAttribute("title")&&!Fh(e)&&!Hh(e)?"presentation":"img",INPUT:e=>{const t=e.type.toLowerCase();if(t==="search")return e.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(t)){const n=ni(e,e.getAttribute("list"))[0];return n&&ve(n)==="DATALIST"?"combobox":"textbox"}return t==="hidden"?null:ay[t]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SECTION:e=>kc(e)?"region":null,SELECT:e=>e.hasAttribute("multiple")||e.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:e=>{const t=_r(e,"table"),n=t?_s(t):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:e=>{if(e.getAttribute("scope")==="col")return"columnheader";if(e.getAttribute("scope")==="row")return"rowheader";const t=_r(e,"table"),n=t?_s(t):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},ry={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function Cc(e){var r;const t=((r=xo[ve(e)])==null?void 0:r.call(xo,e))||"";if(!t)return null;let n=e;for(;n;){const i=Se(n),s=ry[ve(n)];if(!s||!i||!s.includes(ve(i)))break;const o=_s(i);if((o==="none"||o==="presentation")&&!Uh(i,o))return o;n=i}return t}const iy=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function _s(e){return(e.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>iy.includes(n))||null}function Uh(e,t){return Fh(e,t)||ty(e)}function ye(e){const t=_s(e);if(!t)return Cc(e);if(t==="none"||t==="presentation"){const n=Cc(e);if(Uh(e,n))return n}return t}function Vh(e){return e===null?void 0:e.toLowerCase()==="true"}function Bh(e){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(ve(e))}function Ze(e){if(Bh(e))return!0;const t=gn(e),n=e.nodeName==="SLOT";if((t==null?void 0:t.display)==="contents"&&!n){for(let i=e.firstChild;i;i=i.nextSibling)if(i.nodeType===1&&!Ze(i)||i.nodeType===3&&Dh(i))return!1;return!0}return!(e.nodeName==="OPTION"&&!!e.closest("select"))&&!n&&!zh(e,t)?!0:qh(e)}function qh(e){let t=bt==null?void 0:bt.get(e);if(t===void 0){if(t=!1,e.parentElement&&e.parentElement.shadowRoot&&!e.assignedSlot&&(t=!0),!t){const n=gn(e);t=!n||n.display==="none"||Vh(e.getAttribute("aria-hidden"))===!0}if(!t){const n=Se(e);n&&(t=qh(n))}bt==null||bt.set(e,t)}return t}function ni(e,t){if(!t)return[];const n=Oh(e);if(!n)return[];try{const r=t.split(" ").filter(s=>!!s),i=new Set;for(const s of r){const o=n.querySelector("#"+CSS.escape(s));o&&i.add(o)}return[...i]}catch{return[]}}function ht(e){return e.trim()}function qi(e){return e.split(" ").map(t=>t.replace(/\r\n/g,` `).replace(/\s\s*/g," ")).join(" ").trim()}function Nc(e,t){const n=[...e.querySelectorAll(t)];for(const r of ni(e,e.getAttribute("aria-owns")))r.matches(t)&&n.push(r),n.push(...r.querySelectorAll(t));return n}function xs(e,t){const n=t==="::before"?Qa:Ka;if(n!=null&&n.has(e))return(n==null?void 0:n.get(e))||"";const r=gn(e,t),i=sy(r);return n&&n.set(e,i),i}function sy(e){if(!e||e.display==="none"||e.visibility==="hidden")return"";const t=e.content;if(t[0]==="'"&&t[t.length-1]==="'"||t[0]==='"'&&t[t.length-1]==='"'){const n=t.substring(1,t.length-1);return(e.display||"inline")!=="inline"?" "+n+" ":n}return""}function Wh(e){const t=e.getAttribute("aria-labelledby");if(t===null)return null;const n=ni(e,t);return n.length?n:null}function oy(e,t){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(e),r=t&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(e);return n||r}function Gr(e,t){const n=t?Ba:Va;let r=n==null?void 0:n.get(e);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ye(e)||"")||(r=qi(at(e,{includeHidden:t,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(e,r)),r}function bc(e,t){const n=t?Wa:qa;let r=n==null?void 0:n.get(e);if(r===void 0){if(r="",e.hasAttribute("aria-describedby")){const i=ni(e,e.getAttribute("aria-describedby"));r=qi(i.map(s=>at(s,{includeHidden:t,visitedElements:new Set,embeddedInDescribedBy:{element:s,hidden:Ze(s)}})).join(" "))}else e.hasAttribute("aria-description")?r=qi(e.getAttribute("aria-description")||""):r=qi(e.getAttribute("title")||"");n==null||n.set(e,r)}return r}function at(e,t){var a,u,c,f;if(t.visitedElements.has(e))return"";const n={...t,embeddedInTargetElement:t.embeddedInTargetElement==="self"?"descendant":t.embeddedInTargetElement};if(!t.includeHidden){const d=!!((a=t.embeddedInLabelledBy)!=null&&a.hidden)||!!((u=t.embeddedInDescribedBy)!=null&&u.hidden)||!!((c=t.embeddedInNativeTextAlternative)!=null&&c.hidden)||!!((f=t.embeddedInLabel)!=null&&f.hidden);if(Bh(e)||!d&&Ze(e))return t.visitedElements.add(e),""}const r=Wh(e);if(!t.embeddedInLabelledBy){const d=(r||[]).map(g=>at(g,{...t,embeddedInLabelledBy:{element:g,hidden:Ze(g)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(d)return d}const i=ye(e)||"",s=ve(e);if(t.embeddedInLabel||t.embeddedInLabelledBy||t.embeddedInTargetElement==="descendant"){const d=[...e.labels||[]].includes(e),g=(r||[]).includes(e);if(!d&&!g){if(i==="textbox")return t.visitedElements.add(e),s==="INPUT"||s==="TEXTAREA"?e.value:e.textContent||"";if(["combobox","listbox"].includes(i)){t.visitedElements.add(e);let m;if(s==="SELECT")m=[...e.selectedOptions],!m.length&&e.options.length&&m.push(e.options[0]);else{const y=i==="combobox"?Nc(e,"*").find(_=>ye(_)==="listbox"):e;m=y?Nc(y,'[aria-selected="true"]').filter(_=>ye(_)==="option"):[]}return!m.length&&s==="INPUT"?e.value:m.map(y=>at(y,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(i))return t.visitedElements.add(e),e.hasAttribute("aria-valuetext")?e.getAttribute("aria-valuetext")||"":e.hasAttribute("aria-valuenow")?e.getAttribute("aria-valuenow")||"":e.getAttribute("value")||"";if(["menu"].includes(i))return t.visitedElements.add(e),""}}const o=e.getAttribute("aria-label")||"";if(ht(o))return t.visitedElements.add(e),o;if(!["presentation","none"].includes(i)){if(s==="INPUT"&&["button","submit","reset"].includes(e.type)){t.visitedElements.add(e);const d=e.value||"";return ht(d)?d:e.type==="submit"?"Submit":e.type==="reset"?"Reset":e.getAttribute("title")||""}if(s==="INPUT"&&e.type==="image"){t.visitedElements.add(e);const d=e.labels||[];if(d.length&&!t.embeddedInLabelledBy)return Si(d,t);const g=e.getAttribute("alt")||"";if(ht(g))return g;const m=e.getAttribute("title")||"";return ht(m)?m:"Submit"}if(!r&&s==="BUTTON"){t.visitedElements.add(e);const d=e.labels||[];if(d.length)return Si(d,t)}if(!r&&s==="OUTPUT"){t.visitedElements.add(e);const d=e.labels||[];return d.length?Si(d,t):e.getAttribute("title")||""}if(!r&&(s==="TEXTAREA"||s==="SELECT"||s==="INPUT")){t.visitedElements.add(e);const d=e.labels||[];if(d.length)return Si(d,t);const g=s==="INPUT"&&["text","password","search","tel","email","url"].includes(e.type)||s==="TEXTAREA",m=e.getAttribute("placeholder")||"",y=e.getAttribute("title")||"";return!g||y?y:m}if(!r&&s==="FIELDSET"){t.visitedElements.add(e);for(let g=e.firstElementChild;g;g=g.nextElementSibling)if(ve(g)==="LEGEND")return at(g,{...n,embeddedInNativeTextAlternative:{element:g,hidden:Ze(g)}});return e.getAttribute("title")||""}if(!r&&s==="FIGURE"){t.visitedElements.add(e);for(let g=e.firstElementChild;g;g=g.nextElementSibling)if(ve(g)==="FIGCAPTION")return at(g,{...n,embeddedInNativeTextAlternative:{element:g,hidden:Ze(g)}});return e.getAttribute("title")||""}if(s==="IMG"){t.visitedElements.add(e);const d=e.getAttribute("alt")||"";return ht(d)?d:e.getAttribute("title")||""}if(s==="TABLE"){t.visitedElements.add(e);for(let g=e.firstElementChild;g;g=g.nextElementSibling)if(ve(g)==="CAPTION")return at(g,{...n,embeddedInNativeTextAlternative:{element:g,hidden:Ze(g)}});const d=e.getAttribute("summary")||"";if(d)return d}if(s==="AREA"){t.visitedElements.add(e);const d=e.getAttribute("alt")||"";return ht(d)?d:e.getAttribute("title")||""}if(s==="SVG"||e.ownerSVGElement){t.visitedElements.add(e);for(let d=e.firstElementChild;d;d=d.nextElementSibling)if(ve(d)==="TITLE"&&d.ownerSVGElement)return at(d,{...n,embeddedInLabelledBy:{element:d,hidden:Ze(d)}})}if(e.ownerSVGElement&&s==="A"){const d=e.getAttribute("xlink:title")||"";if(ht(d))return t.visitedElements.add(e),d}}const l=s==="SUMMARY"&&!["presentation","none"].includes(i);if(oy(i,t.embeddedInTargetElement==="descendant")||l||t.embeddedInLabelledBy||t.embeddedInDescribedBy||t.embeddedInLabel||t.embeddedInNativeTextAlternative){t.visitedElements.add(e);const d=ly(e,n);if(t.embeddedInTargetElement==="self"?ht(d):d)return d}if(!["presentation","none"].includes(i)||s==="IFRAME"){t.visitedElements.add(e);const d=e.getAttribute("title")||"";if(ht(d))return d}return t.visitedElements.add(e),""}function ly(e,t){const n=[],r=(s,o)=>{var l;if(!(o&&s.assignedSlot))if(s.nodeType===1){const a=((l=gn(s))==null?void 0:l.display)||"inline";let u=at(s,t);(a!=="inline"||s.nodeName==="BR")&&(u=" "+u+" "),n.push(u)}else s.nodeType===3&&n.push(s.textContent||"")};n.push(xs(e,"::before"));const i=e.nodeName==="SLOT"?e.assignedNodes():[];if(i.length)for(const s of i)r(s,!1);else{for(let s=e.firstChild;s;s=s.nextSibling)r(s,!0);if(e.shadowRoot)for(let s=e.shadowRoot.firstChild;s;s=s.nextSibling)r(s,!0);for(const s of ni(e,e.getAttribute("aria-owns")))r(s,!0)}return n.push(xs(e,"::after")),n.join("")}const ja=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Qh(e){return ve(e)==="OPTION"?e.selected:ja.includes(ye(e)||"")?Vh(e.getAttribute("aria-selected"))===!0:!1}const za=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Kh(e){const t=Gh(e,!0);return t==="error"?!1:t}function Gh(e,t){const n=ve(e);if(t&&n==="INPUT"&&e.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(e.type))return e.checked;if(za.includes(ye(e)||"")){const r=e.getAttribute("aria-checked");return r==="true"?!0:t&&r==="mixed"?"mixed":!1}return"error"}const Da=["button"];function Xh(e){if(Da.includes(ye(e)||"")){const t=e.getAttribute("aria-pressed");if(t==="true")return!0;if(t==="mixed")return"mixed"}return!1}const Fa=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Jh(e){if(ve(e)==="DETAILS")return e.open;if(Fa.includes(ye(e)||"")){const t=e.getAttribute("aria-expanded");return t===null?void 0:t==="true"}}const Ha=["heading","listitem","row","treeitem"];function Yh(e){const t={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[ve(e)];if(t)return t;if(Ha.includes(ye(e)||"")){const n=e.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const Zh=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function Ua(e){return ep(e)||np(e)}function ep(e){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(e.tagName)&&(e.hasAttribute("disabled")||tp(e))}function tp(e){return e?ve(e)==="FIELDSET"&&e.hasAttribute("disabled")?!0:tp(e.parentElement):!1}function np(e){if(!e)return!1;if(Zh.includes(ye(e)||"")){const t=(e.getAttribute("aria-disabled")||"").toLowerCase();if(t==="true")return!0;if(t==="false")return!1}return np(Se(e))}function Si(e,t){return[...e].map(n=>at(n,{...t,embeddedInLabel:{element:n,hidden:Ze(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}let Va,Ba,qa,Wa,bt,Qa,Ka,rp=0;function Ga(){++rp,Va??(Va=new Map),Ba??(Ba=new Map),qa??(qa=new Map),Wa??(Wa=new Map),bt??(bt=new Map),Qa??(Qa=new Map),Ka??(Ka=new Map)}function Xa(){--rp||(Va=void 0,Ba=void 0,qa=void 0,Wa=void 0,bt=void 0,Qa=void 0,Ka=void 0)}const ay={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function ip(e,t){for(const n of t.jsonPath)e!=null&&(e=e[n]);return sp(e,t)}function sp(e,t){const n=typeof e=="string"&&!t.caseSensitive?e.toUpperCase():e,r=typeof t.value=="string"&&!t.caseSensitive?t.value.toUpperCase():t.value;return t.op===""?!!n:t.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:t.op==="*="?n.includes(r):t.op==="^="?n.startsWith(r):t.op==="$="?n.endsWith(r):t.op==="|="?n===r||n.startsWith(r+"-"):t.op==="~="?n.split(" ").includes(r):!1}function Ja(e){const t=e.ownerDocument;return e.nodeName==="SCRIPT"||e.nodeName==="NOSCRIPT"||e.nodeName==="STYLE"||t.head&&t.head.contains(e)}function Ae(e,t){let n=e.get(t);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!Ja(t)){let r="";if(t instanceof HTMLInputElement&&(t.type==="submit"||t.type==="button"))n={full:t.value,normalized:ze(t.value),immediate:[t.value]};else{for(let i=t.firstChild;i;i=i.nextSibling)i.nodeType===Node.TEXT_NODE?(n.full+=i.nodeValue||"",r+=i.nodeValue||""):(r&&n.immediate.push(r),r="",i.nodeType===Node.ELEMENT_NODE&&(n.full+=Ae(e,i).full));r&&n.immediate.push(r),t.shadowRoot&&(n.full+=Ae(e,t.shadowRoot).full),n.full&&(n.normalized=ze(n.full))}}e.set(t,n)}return n}function qs(e,t,n){if(Ja(t)||!n(Ae(e,t)))return"none";for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Ae(e,r)))return"selfAndChildren";return t.shadowRoot&&n(Ae(e,t.shadowRoot))?"selfAndChildren":"self"}function op(e,t){const n=Wh(t);if(n)return n.map(s=>Ae(e,s));const r=t.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:ze(r),immediate:[r]}];const i=t.nodeName==="INPUT"&&t.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(t.nodeName)||i){const s=t.labels;if(s)return[...s].map(o=>Ae(e,o))}return[]}function Ac(e){return e.displayName||e.name||"Anonymous"}function uy(e){if(e.type)switch(typeof e.type){case"function":return Ac(e.type);case"string":return e.type;case"object":return e.type.displayName||(e.type.render?Ac(e.type.render):"")}if(e._currentElement){const t=e._currentElement.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Anonymous"}return""}function cy(e){var t;return e.key??((t=e._currentElement)==null?void 0:t.key)}function dy(e){if(e.child){const n=[];for(let r=e.child;r;r=r.sibling)n.push(r);return n}if(!e._currentElement)return[];const t=n=>{var i;const r=(i=n._currentElement)==null?void 0:i.type;return typeof r=="function"||typeof r=="string"};if(e._renderedComponent){const n=e._renderedComponent;return t(n)?[n]:[]}return e._renderedChildren?[...Object.values(e._renderedChildren)].filter(t):[]}function fy(e){var r;const t=e.memoizedProps||((r=e._currentElement)==null?void 0:r.props);if(!t||typeof t=="string")return t;const n={...t};return delete n.children,n}function lp(e){var r;const t={key:cy(e),name:uy(e),children:dy(e).map(lp),rootElements:[],props:fy(e)},n=e.stateNode||e._hostNode||((r=e._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)t.rootElements.push(n);else for(const i of t.children)t.rootElements.push(...i.rootElements);return t}function ap(e,t,n=[]){t(e)&&n.push(e);for(const r of e.children)ap(r,t,n);return n}function up(e,t=[]){const r=(e.ownerDocument||e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT);do{const i=r.currentNode,s=i,o=Object.keys(s).find(a=>a.startsWith("__reactContainer")&&s[a]!==null);if(o)t.push(s[o].stateNode.current);else{const a="_reactRootContainer";s.hasOwnProperty(a)&&s[a]!==null&&t.push(s[a]._internalRoot.current)}if(i instanceof Element&&i.hasAttribute("data-reactroot"))for(const a of Object.keys(i))(a.startsWith("__reactInternalInstance")||a.startsWith("__reactFiber"))&&t.push(i[a]);const l=i instanceof Element?i.shadowRoot:null;l&&up(l,t)}while(r.nextNode());return t}const hy={queryAll(e,t){const{name:n,attributes:r}=on(t,!1),o=up(e.ownerDocument||e).map(a=>lp(a)).map(a=>ap(a,u=>{const c=u.props??{};if(u.key!==void 0&&(c.key=u.key),n&&u.name!==n||u.rootElements.some(f=>!Bs(e,f)))return!1;for(const f of r)if(!ip(c,f))return!1;return!0})).flat(),l=new Set;for(const a of o)for(const u of a.rootElements)l.add(u);return[...l]}};function cp(e,t){const n=e.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(t)&&(r=r.substring(0,r.length-t.length)),r}function py(e,t){return t?t.toUpperCase():""}const gy=/(?:^|[-_/])(\w)/g,dp=e=>e&&e.replace(gy,py);function my(e){function t(c){const f=c.name||c._componentTag||c.__playwright_guessedName;if(f)return f;const d=c.__file;if(d)return dp(cp(d,".vue"))}function n(c,f){return c.type.__playwright_guessedName=f,f}function r(c){var d,g,m,y;const f=t(c.type||{});if(f)return f;if(c.root===c)return"Root";for(const _ in(g=(d=c.parent)==null?void 0:d.type)==null?void 0:g.components)if(((m=c.parent)==null?void 0:m.type.components[_])===c.type)return n(c,_);for(const _ in(y=c.appContext)==null?void 0:y.components)if(c.appContext.components[_]===c.type)return n(c,_);return"Anonymous Component"}function i(c){return c._isBeingDestroyed||c.isUnmounted}function s(c){return c.subTree.type.toString()==="Symbol(Fragment)"}function o(c){const f=[];return c.component&&f.push(c.component),c.suspense&&f.push(...o(c.suspense.activeBranch)),Array.isArray(c.children)&&c.children.forEach(d=>{d.component?f.push(d.component):f.push(...o(d))}),f.filter(d=>{var g;return!i(d)&&!((g=d.type.devtools)!=null&&g.hide)})}function l(c){return s(c)?a(c.subTree):[c.subTree.el]}function a(c){if(!c.children)return[];const f=[];for(let d=0,g=c.children.length;d!!o.component).map(o=>o.component):[]}function i(s){return{name:n(s),children:r(s).map(i),rootElements:[s.$el],props:s._props}}return i(e)}function fp(e,t,n=[]){t(e)&&n.push(e);for(const r of e.children)fp(r,t,n);return n}function hp(e,t=[]){const r=(e.ownerDocument||e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT),i=new Set;do{const s=r.currentNode;s.__vue__&&i.add(s.__vue__.$root),s.__vue_app__&&s._vnode&&s._vnode.component&&t.push({root:s._vnode.component,version:3});const o=s instanceof Element?s.shadowRoot:null;o&&hp(o,t)}while(r.nextNode());for(const s of i)t.push({version:2,root:s});return t}const yy={queryAll(e,t){const n=e.ownerDocument||e,{name:r,attributes:i}=on(t,!1),l=hp(n).map(u=>u.version===3?my(u.root):vy(u.root)).map(u=>fp(u,c=>{if(r&&c.name!==r||c.rootElements.some(f=>!Bs(e,f)))return!1;for(const f of i)if(!ip(c.props,f))return!1;return!0})).flat(),a=new Set;for(const u of l)for(const c of u.rootElements)a.add(c);return[...a]}},pp=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];pp.sort();function fr(e,t,n){if(!t.includes(n))throw new Error(`"${e}" attribute is only supported for roles: ${t.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function vn(e,t){if(e.op!==""&&!t.includes(e.value))throw new Error(`"${e.name}" must be one of ${t.map(n=>JSON.stringify(n)).join(", ")}`)}function yn(e,t){if(!t.includes(e.op))throw new Error(`"${e.name}" does not support "${e.op}" matcher`)}function wy(e,t){const n={role:t};for(const r of e)switch(r.name){case"checked":{fr(r.name,za,t),vn(r,[!0,!1,"mixed"]),yn(r,["","="]),n.checked=r.op===""?!0:r.value;break}case"pressed":{fr(r.name,Da,t),vn(r,[!0,!1,"mixed"]),yn(r,["","="]),n.pressed=r.op===""?!0:r.value;break}case"selected":{fr(r.name,ja,t),vn(r,[!0,!1]),yn(r,["","="]),n.selected=r.op===""?!0:r.value;break}case"expanded":{fr(r.name,Fa,t),vn(r,[!0,!1]),yn(r,["","="]),n.expanded=r.op===""?!0:r.value;break}case"level":{if(fr(r.name,Ha,t),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');n.level=r.value;break}case"disabled":{vn(r,[!0,!1]),yn(r,["","="]),n.disabled=r.op===""?!0:r.value;break}case"name":{if(r.op==="")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{vn(r,[!0,!1]),yn(r,["","="]),n.includeHidden=r.op===""?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${pp.map(i=>`"${i}"`).join(", ")}.`)}return n}function _y(e,t,n){const r=[],i=o=>{if(ye(o)===t.role&&!(t.selected!==void 0&&Qh(o)!==t.selected)&&!(t.checked!==void 0&&Kh(o)!==t.checked)&&!(t.pressed!==void 0&&Xh(o)!==t.pressed)&&!(t.expanded!==void 0&&Jh(o)!==t.expanded)&&!(t.level!==void 0&&Yh(o)!==t.level)&&!(t.disabled!==void 0&&Ua(o)!==t.disabled)&&!(!t.includeHidden&&Ze(o))){if(t.name!==void 0){const l=ze(Gr(o,!!t.includeHidden));if(typeof t.name=="string"&&(t.name=ze(t.name)),n&&!t.exact&&t.nameOp==="="&&(t.nameOp="*="),!sp(l,{name:"",jsonPath:[],op:t.nameOp||"=",value:t.name,caseSensitive:!!t.exact}))return}r.push(o)}},s=o=>{const l=[];o.shadowRoot&&l.push(o.shadowRoot);for(const a of o.querySelectorAll("*"))i(a),a.shadowRoot&&l.push(a.shadowRoot);l.forEach(s)};return s(e),r}function Lc(e){return{queryAll:(t,n)=>{const r=on(n,!0),i=r.name.toLowerCase();if(!i)throw new Error("Role must not be empty");const s=wy(r.attributes,i);Ga();try{return _y(t,s,e)}finally{Xa()}}}}function xy(e,t,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.bottom-e.bottom,0)+Math.max(e.top-t.top,0)}function Sy(e,t,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.bottom-e.bottom,0)+Math.max(e.top-t.top,0)}function Ey(e,t,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.left-t.left,0)+Math.max(t.right-e.right,0)}function ky(e,t,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.left-t.left,0)+Math.max(t.right-e.right,0)}function Ty(e,t,n){const r=n===void 0?50:n;let i=0;return e.left-t.right>=0&&(i+=e.left-t.right),t.left-e.right>=0&&(i+=t.left-e.right),t.top-e.bottom>=0&&(i+=t.top-e.bottom),e.top-t.bottom>=0&&(i+=e.top-t.bottom),i>r?void 0:i}const Cy=["left-of","right-of","above","below","near"];function gp(e,t,n,r){const i=t.getBoundingClientRect(),s={"left-of":Sy,"right-of":xy,above:Ey,below:ky,near:Ty}[e];let o;for(const l of n){if(l===t)continue;const a=s(i,l.getBoundingClientRect(),r);a!==void 0&&(o===void 0||ar.every((u,c)=>a.rest[c]===u));if(o)return o.result;const l=i();return s.push({rest:r,result:l}),l}_checkSelector(t){if(!(typeof t=="object"&&t&&(Array.isArray(t)||"simples"in t&&t.simples.length)))throw new Error(`Malformed selector "${t}"`);return t}matches(t,n,r){const i=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,t,[i,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(i)?this._matchesEngine(xr,t,i,r):(this._hasScopeClause(i)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(t,i.simples[i.simples.length-1].selector,r)?this._matchesParents(t,i,i.simples.length-2,r):!1))}finally{this.end()}}query(t,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[t.scope,t.pierceShadow,t.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(xr,t,r);this._hasScopeClause(r)&&(t=this._expandContextForScopeMatching(t));const i=this._scoreMap;this._scoreMap=new Map;let s=this._querySimple(t,r.simples[r.simples.length-1].selector);return s=s.filter(o=>this._matchesParents(o,r,r.simples.length-2,t)),this._scoreMap.size&&s.sort((o,l)=>{const a=this._scoreMap.get(o),u=this._scoreMap.get(l);return a===u?0:a===void 0?1:u===void 0?-1:a-u}),this._scoreMap=i,s})}finally{this.end()}}_markScore(t,n){this._scoreMap&&this._scoreMap.set(t,n)}_hasScopeClause(t){return t.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(t){if(t.scope.nodeType!==1)return t;const n=Se(t.scope);return n?{...t,scope:n,originalScope:t.originalScope||t.scope}:t}_matchesSimple(t,n,r){return this._cached(this._cacheMatchesSimple,t,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(t===r.scope||n.css&&!this._matchesCSS(t,n.css))return!1;for(const i of n.functions)if(!this._matchesEngine(this._getEngine(i.name),t,i.args,r))return!1;return!0})}_querySimple(t,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[t.scope,t.pierceShadow,t.originalScope],()=>{let r=n.css;const i=n.functions;r==="*"&&i.length&&(r=void 0);let s,o=-1;r!==void 0?s=this._queryCSS(t,r):(o=i.findIndex(l=>this._getEngine(l.name).query!==void 0),o===-1&&(o=0),s=this._queryEngine(this._getEngine(i[o].name),t,i[o].args));for(let l=0;lthis._matchesEngine(a,u,i[l].args,t)))}for(let l=0;lthis._matchesEngine(a,u,i[l].args,t)))}return s}):this._queryCSS(t,n.css||"*")}_matchesParents(t,n,r,i){return r<0?!0:this._cached(this._cacheMatchesParents,t,[n,r,i.scope,i.pierceShadow,i.originalScope],()=>{const{selector:s,combinator:o}=n.simples[r];if(o===">"){const l=Ei(t,i);return!l||!this._matchesSimple(l,s,i)?!1:this._matchesParents(l,n,r-1,i)}if(o==="+"){const l=So(t,i);return!l||!this._matchesSimple(l,s,i)?!1:this._matchesParents(l,n,r-1,i)}if(o===""){let l=Ei(t,i);for(;l;){if(this._matchesSimple(l,s,i)){if(this._matchesParents(l,n,r-1,i))return!0;if(n.simples[r-1].combinator==="")break}l=Ei(l,i)}return!1}if(o==="~"){let l=So(t,i);for(;l;){if(this._matchesSimple(l,s,i)){if(this._matchesParents(l,n,r-1,i))return!0;if(n.simples[r-1].combinator==="~")break}l=So(l,i)}return!1}if(o===">="){let l=t;for(;l;){if(this._matchesSimple(l,s,i)){if(this._matchesParents(l,n,r-1,i))return!0;if(n.simples[r-1].combinator==="")break}l=Ei(l,i)}return!1}throw new Error(`Unsupported combinator "${o}"`)})}_matchesEngine(t,n,r,i){if(t.matches)return this._callMatches(t,n,r,i);if(t.query)return this._callQuery(t,r,i).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(t,n,r){if(t.query)return this._callQuery(t,r,n);if(t.matches)return this._queryCSS(n,"*").filter(i=>this._callMatches(t,i,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(t,n,r,i){return this._cached(this._cacheCallMatches,n,[t,i.scope,i.pierceShadow,i.originalScope,...r],()=>t.matches(n,r,i,this))}_callQuery(t,n,r){return this._cached(this._cacheCallQuery,t,[r.scope,r.pierceShadow,r.originalScope,...n],()=>t.query(r,n,this))}_matchesCSS(t,n){return t.matches(n)}_queryCSS(t,n){return this._cached(this._cacheQueryCSS,n,[t.scope,t.pierceShadow,t.originalScope],()=>{let r=[];function i(s){if(r=r.concat([...s.querySelectorAll(n)]),!!t.pierceShadow){s.shadowRoot&&i(s.shadowRoot);for(const o of s.querySelectorAll("*"))o.shadowRoot&&i(o.shadowRoot)}}return i(t.scope),r})}_getEngine(t){const n=this._engines.get(t);if(!n)throw new Error(`Unknown selector engine "${t}"`);return n}}const xr={matches(e,t,n,r){if(t.length===0)throw new Error('"is" engine expects non-empty selector list');return t.some(i=>r.matches(e,i,n))},query(e,t,n){if(t.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const i of t)r=r.concat(n.query(e,i));return t.length===1?r:mp(r)}},by={matches(e,t,n,r){if(t.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:e},t).length>0}},Ay={matches(e,t,n,r){if(t.length!==0)throw new Error('"scope" engine expects no arguments');const i=n.originalScope||n.scope;return i.nodeType===9?e===i.documentElement:e===i},query(e,t,n){if(t.length!==0)throw new Error('"scope" engine expects no arguments');const r=e.originalScope||e.scope;if(r.nodeType===9){const i=r.documentElement;return i?[i]:[]}return r.nodeType===1?[r]:[]}},Ly={matches(e,t,n,r){if(t.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(e,t,n)}},Iy={query(e,t,n){return n.query({...e,pierceShadow:!1},t)},matches(e,t,n,r){return r.matches(e,t,{...n,pierceShadow:!1})}},My={matches(e,t,n,r){if(t.length)throw new Error('"visible" engine expects no arguments');return nn(e)}},Py={matches(e,t,n,r){if(t.length!==1||typeof t[0]!="string")throw new Error('"text" engine expects a single string');const i=ze(t[0]).toLowerCase(),s=o=>o.normalized.toLowerCase().includes(i);return qs(r._cacheText,e,s)==="self"}},Ry={matches(e,t,n,r){if(t.length!==1||typeof t[0]!="string")throw new Error('"text-is" engine expects a single string');const i=ze(t[0]),s=o=>!i&&!o.immediate.length?!0:o.immediate.some(l=>ze(l)===i);return qs(r._cacheText,e,s)!=="none"}},$y={matches(e,t,n,r){if(t.length===0||typeof t[0]!="string"||t.length>2||t.length===2&&typeof t[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const i=new RegExp(t[0],t.length===2?t[1]:void 0),s=o=>i.test(o.full);return qs(r._cacheText,e,s)==="self"}},Oy={matches(e,t,n,r){if(t.length!==1||typeof t[0]!="string")throw new Error('"has-text" engine expects a single string');if(Ja(e))return!1;const i=ze(t[0]).toLowerCase();return(o=>o.normalized.toLowerCase().includes(i))(Ae(r._cacheText,e))}};function hr(e){return{matches(t,n,r,i){const s=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,o=s===void 0?n:n.slice(0,n.length-1);if(n.length<1+(s===void 0?0:1))throw new Error(`"${e}" engine expects a selector list and optional maximum distance in pixels`);const l=i.query(r,o),a=gp(e,t,l,s);return a===void 0?!1:(i._markScore(t,a),!0)}}}const jy={query(e,t,n){let r=t[t.length-1];if(t.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const i=xr.query(e,t.slice(0,t.length-1),n);return r--,r1){const a=new Set(l.children);l.children=[];let u=o.firstElementChild;for(;u&&l.children.lengthWi(u)))]}else{const o=wn(e,t,n)||ki(e,t,n);r=[Wi(o)]}}const i=r[0],s=e.parseSelector(i);return{selector:i,selectors:r,elements:e.querySelectorAll(s,n.root??t.ownerDocument)}}finally{Pl.clear(),Rl.clear(),Xa(),e._evaluator.end()}}function Pc(e){return e.filter(t=>t[0].selector[0]!=="/")}function wn(e,t,n){if(n.root&&!Bs(n.root,t))throw new Error("Target element must belong to the root's subtree");if(t===n.root)return[{engine:"css",selector:":scope",score:1}];if(t.ownerDocument.documentElement===t)return[{engine:"css",selector:"html",score:1}];const r=(s,o)=>{const l=s===t;let a=o?e1(e,s,s===t):[];s!==t&&(a=Pc(a));const u=Zy(e,s,n).filter(d=>!n.omitInternalEngines||!d.engine.startsWith("internal:")).map(d=>[d]);let c=Rc(e,n.root??t.ownerDocument,s,[...a,...u],l);a=Pc(a);const f=d=>{const g=o&&!d.length,m=[...d,...u].filter(_=>c?At(_)=At(c))continue;if(y=Rc(e,_,s,m,l),!y)return;const h=[...p,...y];(!c||At(h){const l=o?Pl:Rl;let a=l.get(s);return a===void 0&&(a=r(s,o),l.set(s,a)),a};return r(t,!n.noText)}function Zy(e,t,n){const r=[];{for(const o of["data-testid","data-test-id","data-test"])o!==n.testIdAttributeName&&t.getAttribute(o)&&r.push({engine:"css",selector:`[${o}=${cr(t.getAttribute(o))}]`,score:zy});if(!n.noCSSId){const o=t.getAttribute("id");o&&!t1(o)&&r.push({engine:"css",selector:Tp(o),score:Gy})}r.push({engine:"css",selector:Ve(t.nodeName.toLowerCase()),score:Ep})}if(t.nodeName==="IFRAME"){for(const o of["name","title"])t.getAttribute(o)&&r.push({engine:"css",selector:`${Ve(t.nodeName.toLowerCase())}[${o}=${cr(t.getAttribute(o))}]`,score:Dy});return t.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${cr(t.getAttribute(n.testIdAttributeName))}]`,score:Ic}),Ol([r]),r}if(t.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${xe(t.getAttribute(n.testIdAttributeName),!0)}]`,score:Ic}),t.nodeName==="INPUT"||t.nodeName==="TEXTAREA"){const o=t;if(o.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${xe(o.placeholder,!0)}]`,score:Uy});for(const l of Pn(o.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${xe(l.text,!1)}]`,score:yp-l.scoreBouns})}}const i=op(e._evaluator._cacheText,t);for(const o of i){const l=o.normalized;r.push({engine:"internal:label",selector:qe(l,!0),score:Vy});for(const a of Pn(l))r.push({engine:"internal:label",selector:qe(a.text,!1),score:wp-a.scoreBouns})}const s=ye(t);return s&&!["none","presentation"].includes(s)&&r.push({engine:"internal:role",selector:s,score:Xy}),t.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(t.nodeName)&&r.push({engine:"css",selector:`${Ve(t.nodeName.toLowerCase())}[name=${cr(t.getAttribute("name"))}]`,score:Eo}),["INPUT","TEXTAREA"].includes(t.nodeName)&&t.getAttribute("type")!=="hidden"&&t.getAttribute("type")&&r.push({engine:"css",selector:`${Ve(t.nodeName.toLowerCase())}[type=${cr(t.getAttribute("type"))}]`,score:Eo}),["INPUT","TEXTAREA","SELECT"].includes(t.nodeName)&&t.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:Ve(t.nodeName.toLowerCase()),score:Eo+1}),Ol([r]),r}function e1(e,t,n){if(t.nodeName==="SELECT")return[];const r=[],i=t.getAttribute("title");if(i){r.push([{engine:"internal:attr",selector:`[title=${xe(i,!0)}]`,score:Qy}]);for(const a of Pn(i))r.push([{engine:"internal:attr",selector:`[title=${xe(a.text,!1)}]`,score:Sp-a.scoreBouns}])}const s=t.getAttribute("alt");if(s&&["APPLET","AREA","IMG","INPUT"].includes(t.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${xe(s,!0)}]`,score:qy}]);for(const a of Pn(s))r.push([{engine:"internal:attr",selector:`[alt=${xe(a.text,!1)}]`,score:xp-a.scoreBouns}])}const o=Ae(e._evaluator._cacheText,t).normalized;if(o){const a=Pn(o);if(n){o.length<=80&&r.push([{engine:"internal:text",selector:qe(o,!0),score:Wy}]);for(const c of a)r.push([{engine:"internal:text",selector:qe(c.text,!1),score:$l-c.scoreBouns}])}const u={engine:"css",selector:Ve(t.nodeName.toLowerCase()),score:Ep};for(const c of a)r.push([u,{engine:"internal:has-text",selector:qe(c.text,!1),score:$l-c.scoreBouns}]);if(o.length<=80){const c=new RegExp("^"+bl(o)+"$");r.push([u,{engine:"internal:has-text",selector:qe(c,!1),score:Hy}])}}const l=ye(t);if(l&&!["none","presentation"].includes(l)){const a=Gr(t,!1);if(a){r.push([{engine:"internal:role",selector:`${l}[name=${xe(a,!0)}]`,score:By}]);for(const u of Pn(a))r.push([{engine:"internal:role",selector:`${l}[name=${xe(u.text,!1)}]`,score:_p-u.scoreBouns}])}}return Ol(r),r}function Tp(e){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(e)?"#"+e:`[id="${Ve(e)}"]`}function ko(e){return e.some(t=>t.engine==="css"&&(t.selector.startsWith("#")||t.selector.startsWith('[id="')))}function ki(e,t,n){const r=n.root??t.ownerDocument,i=[];function s(l){const a=i.slice();l&&a.unshift(l);const u=a.join(" > "),c=e.parseSelector(u);return e.querySelector(c,r,!1)===t?u:void 0}function o(l){const a={engine:"css",selector:l,score:Jy},u=e.parseSelector(l),c=e.querySelectorAll(u,r);if(c.length===1)return[a];const f={engine:"nth",selector:String(c.indexOf(t)),score:kp};return[a,f]}for(let l=t;l&&l!==r;l=Se(l)){const a=l.nodeName.toLowerCase();let u="";if(l.id&&!n.noCSSId){const d=Tp(l.id),g=s(d);if(g)return o(g);u=d}const c=l.parentNode,f=[...l.classList];for(let d=0;d_.nodeName.toLowerCase()===a).indexOf(l)===0?Ve(a):`${Ve(a)}:nth-child(${1+d.indexOf(l)})`,y=s(m);if(y)return o(y);u||(u=m)}else u||(u=Ve(a));i.unshift(u)}return o(s())}function Ol(e){for(const t of e)for(const n of t)n.score>Fy&&n.score>"),n=r,r==="css"?t.push(i):t.push(`${r}=${i}`);return t.join(" ")}function At(e){let t=0;for(let n=0;n({tokens:l,score:At(l)}));s.sort((l,a)=>l.score-a.score);let o=null;for(const{tokens:l}of s){const a=e.parseSelector(Wi(l)),u=e.querySelectorAll(a,t);if(u[0]===n&&u.length===1)return l;const c=u.indexOf(n);if(!i||o||c===-1||u.length>5)continue;const f={engine:"nth",selector:String(c),score:kp};o=[...l,f]}return o}function t1(e){let t,n=0;for(let r=0;r="a"&&i<="z"?s="lower":i>="A"&&i<="Z"?s="upper":i>="0"&&i<="9"?s="digit":s="other",s==="lower"&&t==="upper"){t=s;continue}t&&t!==s&&++n,t=s}}return n>=e.length/4}function Ti(e,t){if(e.length<=t)return e;e=e.substring(0,t);const n=e.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function Pn(e){let t=[];{const n=e.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const i=Ti(e.substring(r).trimStart(),80);t.push({text:i,scoreBouns:i.length<=30?2:1})}}{const n=e.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const i=Ti(e.substring(0,e.length-r).trimEnd(),80);t.push({text:i,scoreBouns:i.length<=30?2:1})}}return e.length<=30?t.push({text:e,scoreBouns:0}):(t.push({text:Ti(e,80),scoreBouns:0}),t.push({text:Ti(e,30),scoreBouns:1})),t=t.filter(n=>n.text),t.length||t.push({text:e.substring(0,80),scoreBouns:0}),t}const $c=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;cursor:pointer;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.active{background-color:#8acae480}x-pw-tool-item.active:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.active{background-color:transparent}x-pw-tool-item.record.active:hover{background-color:#dbdbdb}x-pw-tool-item.record.active>x-div{background-color:#a1260d}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class To{constructor(t){this._highlightEntries=[],this._highlightOptions={},this._language="javascript",this._injectedScript=t;const n=t.document;this._isUnderTest=t.isUnderTest,this._glassPaneElement=n.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483646",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent";for(const r of["click","auxclick","dragstart","input","keydown","keyup","pointerdown","pointerup","mousedown","mouseup","mouseleave","focus","scroll"])this._glassPaneElement.addEventListener(r,i=>{i.stopPropagation(),i.stopImmediatePropagation(),i.type==="click"&&i.button===0&&this._highlightOptions.tooltipListItemSelected&&this._highlightOptions.tooltipListItemSelected(void 0)});if(this._actionPointElement=n.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync($c),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=$c,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&!this._injectedScript.document.documentElement.contains(this._glassPaneElement)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(t){this._language=t}runHighlightOnRaf(t){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this.updateHighlight(this._injectedScript.querySelectorAll(t,this._injectedScript.document.documentElement),{tooltipText:Fn(this._language,yt(t))}),this._rafRequest=this._injectedScript.builtinRequestAnimationFrame(()=>this.runHighlightOnRaf(t))}uninstall(){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(t,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=t+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var t,n;for(const r of this._highlightEntries)(t=r.highlightElement)==null||t.remove(),(n=r.tooltipElement)==null||n.remove();this._highlightEntries=[],this._highlightOptions={},this._glassPaneElement.style.pointerEvents="none"}updateHighlight(t,n){this._innerUpdateHighlight(t,n)}maskElements(t,n){this._innerUpdateHighlight(t,{color:n})}_innerUpdateHighlight(t,n){let r=n.color;if(r||(r=t.length>1?"#f6b26b7f":"#6fa8dc7f"),!this._highlightIsUpToDate(t,n)){this.clearHighlight(),this._highlightOptions=n,this._glassPaneElement.style.pointerEvents=n.tooltipListItemSelected?"initial":"none";for(let i=0;i1?` [${i+1} of ${t.length}]`:"";l=[n.tooltipText+a]}for(let a=0;a{var c;return(c=n.tooltipListItemSelected)==null?void 0:c.call(n,a)}))}if(n.tooltipFooter){const a=this._injectedScript.document.createElement("x-pw-tooltip-footer");a.textContent=n.tooltipFooter,o.appendChild(a)}}this._highlightEntries.push({targetElement:t[i],tooltipElement:o,highlightElement:s})}for(const i of this._highlightEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:s,anchorTop:o}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=o,i.tooltipLeft=s}for(const i of this._highlightEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const s=i.box;i.highlightElement.style.backgroundColor=r,i.highlightElement.style.left=s.x+"px",i.highlightElement.style.top=s.y+"px",i.highlightElement.style.width=s.width+"px",i.highlightElement.style.height=s.height+"px",i.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.height}))}}}firstBox(){var t;return(t=this._highlightEntries[0])==null?void 0:t.box}tooltipPosition(t,n){const r=n.offsetWidth,i=n.offsetHeight,s=this._glassPaneElement.offsetWidth,o=this._glassPaneElement.offsetHeight;let l=t.left;l+r>s-5&&(l=s-r-5);let a=t.bottom+5;return a+i>o-5&&(t.top>i+5?a=t.top-i-5:a=o-5-i),{anchorLeft:l,anchorTop:a}}_highlightIsUpToDate(t,n){var r,i;if(n.tooltipText!==this._highlightOptions.tooltipText||n.tooltipListItemSelected!==this._highlightOptions.tooltipListItemSelected||n.tooltipFooter!==this._highlightOptions.tooltipFooter||((r=n.tooltipList)==null?void 0:r.length)!==((i=this._highlightOptions.tooltipList)==null?void 0:i.length))return!1;if(n.tooltipList&&this._highlightOptions.tooltipList){for(let s=0;s{switch(t){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case` `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+t.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':e}function Cp(e){return!!(e.length===0||/^\s|\s$/.test(e)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(e)||/^-\s/.test(e)||/[\n:](\s|$)/.test(e)||/\s#/.test(e)||/[\n\r]/.test(e)||/^[&*\],?!>|@"'#%]/.test(e)||/[{}`]/.test(e)||!isNaN(Number(e))||["y","n","yes","no","true","false","on","off","null"].includes(e.toLowerCase()))}function Ya(e){const t=new Set,n=(s,o)=>{if(t.has(o))return;if(t.add(o),o.nodeType===Node.TEXT_NODE&&o.nodeValue){o.nodeValue&&s.children.push(o.nodeValue||"");return}if(o.nodeType!==Node.ELEMENT_NODE)return;const l=o;if(Ze(l))return;const a=[];if(l.hasAttribute("aria-owns")){const c=l.getAttribute("aria-owns").split(/\s+/);for(const f of c){const d=e.ownerDocument.getElementById(f);d&&a.push(d)}}const u=r1(l);u&&s.children.push(u),r(u||s,l,a)};function r(s,o,l=[]){var f;const u=(((f=gn(o))==null?void 0:f.display)||"inline")!=="inline"||o.nodeName==="BR"?" ":"";u&&s.children.push(u),s.children.push(xs(o,"::before"));const c=o.nodeName==="SLOT"?o.assignedNodes():[];if(c.length)for(const d of c)n(s,d);else{for(let d=o.firstChild;d;d=d.nextSibling)d.assignedSlot||n(s,d);if(o.shadowRoot)for(let d=o.shadowRoot.firstChild;d;d=d.nextSibling)n(s,d)}for(const d of l)n(s,d);s.children.push(xs(o,"::after")),u&&s.children.push(u),s.children.length===1&&s.name===s.children[0]&&(s.children=[])}Ga();const i={role:"fragment",name:"",children:[],element:e};try{n(i,e)}finally{Xa()}return s1(i),i}function r1(e){const t=ye(e);if(!t||t==="presentation"||t==="none")return null;const n=Gr(e,!1)||"",r={role:t,name:n,children:[],element:e};return za.includes(t)&&(r.checked=Kh(e)),Zh.includes(t)&&(r.disabled=Ua(e)),Fa.includes(t)&&(r.expanded=Jh(e)),Ha.includes(t)&&(r.level=Yh(e)),Da.includes(t)&&(r.pressed=Xh(e)),ja.includes(t)&&(r.selected=Qh(e)),(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(r.children=[e.value]),r}function i1(e,t){return jl(Ya(e),t)}function s1(e){const t=(r,i)=>{if(!r.length)return;const s=o1(r.join("")).trim();s&&i.push(s),r.length=0},n=r=>{const i=[],s=[];for(const o of r.children||[])typeof o=="string"?s.push(o):(t(s,i),n(o),i.push(o));t(s,i),r.children=i.length?i:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(e)}const o1=e=>e.replace(/[\u200b\s\t\r\n]+/g," ");function Np(e,t){return t?e?typeof t=="string"?e===t:!!e.match(t):!1:!0}function l1(e,t){return Np(e,t.text)}function a1(e,t){return Np(e,t.name)}function u1(e,t){const n=Ya(e);return{matches:Ap(n,t,!1),received:{raw:jl(n,{mode:"raw"}),regex:jl(n,{mode:"regex"})}}}function c1(e,t){const n=Ya(e);return Ap(n,t,!0).map(i=>i.element)}function bp(e,t,n){return typeof e=="string"&&t.kind==="text"?l1(e,t):typeof e=="object"&&t.kind==="role"?!(t.role!=="fragment"&&t.role!==e.role||t.checked!==void 0&&t.checked!==e.checked||t.disabled!==void 0&&t.disabled!==e.disabled||t.expanded!==void 0&&t.expanded!==e.expanded||t.level!==void 0&&t.level!==e.level||t.pressed!==void 0&&t.pressed!==e.pressed||t.selected!==void 0&&t.selected!==e.selected||!a1(e.name,t)||!d1(e.children||[],t.children||[])):!1}function d1(e,t,n){if(t.length>e.length)return!1;const r=e.slice(),i=t.slice();for(const s of i){let o=r.shift();for(;o&&!bp(o,s);)o=r.shift();if(!o)return!1}return!0}function Ap(e,t,n){const r=[],i=s=>{if(bp(s,t))return r.push(s),!n;if(typeof s=="string")return!1;for(const o of s.children||[])if(i(o))return!0;return!1};return i(e),r}function jl(e,t){const n=[],r=(t==null?void 0:t.mode)==="regex"?h1:()=>!0,i=(t==null?void 0:t.mode)==="regex"?f1:o=>o,s=(o,l,a)=>{if(typeof o=="string"){if(l&&!r(l,o))return;const f=Oc(i(o));f&&n.push(a+"- text: "+f);return}let u=o.role;if(o.name&&o.name.length<=900){const f=i(o.name);if(f){const d=f.startsWith("/")&&f.endsWith("/")?f:JSON.stringify(f);u+=" "+d}}o.checked==="mixed"&&(u+=" [checked=mixed]"),o.checked===!0&&(u+=" [checked]"),o.disabled&&(u+=" [disabled]"),o.expanded&&(u+=" [expanded]"),o.level&&(u+=` [level=${o.level}]`),o.pressed==="mixed"&&(u+=" [pressed=mixed]"),o.pressed===!0&&(u+=" [pressed]"),o.selected===!0&&(u+=" [selected]");const c=a+"- "+n1(u);if(!o.children.length)n.push(c);else if(o.children.length===1&&typeof o.children[0]=="string"){const f=r(o,o.children[0])?i(o.children[0]):null;f?n.push(c+": "+Oc(f)):n.push(c)}else{n.push(c+":");for(const f of o.children||[])s(f,o,a+" ")}};if(e.role==="fragment")for(const o of e.children||[])s(o,e,"");else s(e,null,"");return n.join(` `)}function f1(e){const t=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let n="",r=0;const i=new RegExp(t.map(s=>"("+s.regex.source+")").join("|"),"g");return e.replace(i,(s,...o)=>{const l=o[o.length-2],a=o.slice(0,-2);n+=bl(e.slice(r,l));for(let u=0;ut.length)return!1;const n=t.length<=200&&e.name.length<=200?Ov(t,e.name):"";let r=t;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/t.length>.1}function p1(e){const t={kind:"role",role:"fragment"};return Lp(t,e),t.children&&t.children.length===1?t.children[0]:t}function Lp(e,t){for(const n of t){if(typeof n=="string"){const r=Ss.parse(n);e.children=e.children||[],e.children.push(r);continue}for(const r of Object.keys(n)){e.children=e.children||[];const i=n[r];if(r==="text"){e.children.push({kind:"text",text:Co(i)});continue}const s=Ss.parse(r);if(s.kind==="text"){e.children.push({kind:"text",text:Co(i)});continue}if(typeof i=="string"){e.children.push({...s,children:[{kind:"text",text:Co(i)}]});continue}e.children.push(s),Lp(s,i)}}}function g1(e){return e.replace(/[\r\n\s\t]+/g," ").trim()}function Co(e){return e.startsWith("/")&&e.endsWith("/")?new RegExp(e.slice(1,-1)):g1(e)}class Ss{static parse(t){return new Ss(t)._parse()}constructor(t){this._input=t,this._pos=0,this._length=t.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(t){this._eof()&&this._throwError(`Unexpected end of input when expecting ${t}`);const n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let t="",n=!1;for(;!this._eof();){const r=this._next();if(n)t+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return t;t+=r}}this._throwError("Unterminated string")}_throwError(t,n){throw new m1(t,this._input,n||this._pos)}_readRegex(){let t="",n=!1,r=!1;for(;!this._eof();){const i=this._next();if(n)t+=i,n=!1;else if(i==="\\")n=!0,t+=i;else{if(i==="/"&&!r)return t;i==="["?(r=!0,t+=i):i==="]"&&r?(t+=i,r=!1):t+=i}}this._throwError("Unterminated regex")}_readStringOrRegex(){const t=this._peek();return t==='"'?(this._next(),this._readString()):t==="/"?(this._next(),new RegExp(this._readRegex())):null}_readAttributes(t){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let i="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)i+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(t,r,i||"true",n)}}_parse(){this._skipWhitespace();const t=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:t,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(t,n,r,i){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',i),t.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',i),t.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',i),t.expanded=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',i),t.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',i),t.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',i),t.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,i)}_assert(t,n,r){t||this._throwError(n||"Assertion error",r)}}class m1 extends Error{constructor(t,n,r){super(t+`: `+n+` `+" ".repeat(r)+`^ `),this.shortMessage=t,this.pos=r,this.stack=void 0}}class Ip{constructor(t,n,r,i,s,o,l){this.onGlobalListenersRemoved=new Set,this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Fn,cacheNormalizedWhitespaces:Rv,elementText:Ae,getAriaRole:ye,getElementAccessibleDescription:bc,getElementAccessibleName:Gr,isElementVisible:nn,isInsideScope:Bs,normalizeWhiteSpace:ze,parseYamlTemplate:p1},this.window=t,this.document=t.document,this.isUnderTest=n,this._sdkLanguage=r,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i,this._evaluator=new Ny(new Map),this._engines=new Map,this._engines.set("xpath",Ec),this._engines.set("xpath:light",Ec),this._engines.set("_react",hy),this._engines.set("_vue",yy),this._engines.set("role",Lc(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",Lc(!0));for(const{name:a,engine:u}of l)this._engines.set(a,u);this._stableRafCount=s,this._browserName=o,Z0(o),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),n&&(this.window.__injectedScript=this)}builtinSetTimeout(t,n){var r;return(r=this.window.__pwClock)!=null&&r.builtin?this.window.__pwClock.builtin.setTimeout(t,n):this.window.setTimeout(t,n)}builtinClearTimeout(t){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.clearTimeout(t):this.window.clearTimeout(t)}builtinRequestAnimationFrame(t){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.requestAnimationFrame(t):this.window.requestAnimationFrame(t)}eval(t){return this.window.eval(t)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(t){const n=Us(t);return t0(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${t}`)}),n}generateSelector(t,n){return Mc(this,t,n)}generateSelectorSimple(t,n){return Mc(this,t,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(t,n,r){const i=this.querySelectorAll(t,n);if(r&&i.length>1)throw this.strictModeViolationError(t,i);return i[0]}_queryNth(t,n){const r=[...t];let i=+n.body;return i===-1&&(i=r.length-1),new Set(r.slice(i,i+1))}_queryLayoutSelector(t,n,r){const i=n.name,s=n.body,o=[],l=this.querySelectorAll(s.parsed,r);for(const a of t){const u=gp(i,a,l,s.distance);u!==void 0&&o.push({element:a,score:u})}return o.sort((a,u)=>a.score-u.score),new Set(o.map(a=>a.element))}ariaSnapshot(t,n){if(t.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");return i1(t,n)}getAllByAria(t,n){return c1(t.documentElement,n)}querySelectorAll(t,n){if(t.capture!==void 0){if(t.parts.some(i=>i.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const r={parts:t.parts.slice(0,t.capture+1)};if(t.capturer.has(o)))}else if(i.name==="internal:or"){const s=this.querySelectorAll(i.body.parsed,n);r=new Set(mp(new Set([...r,...s])))}else if(Cy.includes(i.name))r=this._queryLayoutSelector(r,i,n);else{const s=new Set;for(const o of r){const l=this._queryEngineAll(i,o);for(const a of l)s.add(a)}r=s}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(t,n){const r=this._engines.get(t.name).queryAll(n,t.body);for(const i of r)if(!("nodeName"in i))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(i)}`);return r}_createAttributeEngine(t,n){const r=i=>[{simples:[{selector:{css:`[${t}=${JSON.stringify(i)}]`,functions:[]},combinator:""}]}];return{queryAll:(i,s)=>this._evaluator.query({scope:i,pierceShadow:n},r(s))}}_createCSSEngine(){return{queryAll:(t,n)=>this._evaluator.query({scope:t,pierceShadow:!0},n)}}_createTextEngine(t,n){return{queryAll:(i,s)=>{const{matcher:o,kind:l}=Ni(s,n),a=[];let u=null;const c=d=>{if(l==="lax"&&u&&u.contains(d))return!1;const g=qs(this._evaluator._cacheText,d,o);g==="none"&&(u=d),(g==="self"||g==="selfAndChildren"&&l==="strict"&&!n)&&a.push(d)};i.nodeType===Node.ELEMENT_NODE&&c(i);const f=this._evaluator._queryCSS({scope:i,pierceShadow:t},"*");for(const d of f)c(d);return a}}}_createInternalHasTextEngine(){return{queryAll:(t,n)=>{if(t.nodeType!==1)return[];const r=t,i=Ae(this._evaluator._cacheText,r),{matcher:s}=Ni(n,!0);return s(i)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(t,n)=>{if(t.nodeType!==1)return[];const r=t,i=Ae(this._evaluator._cacheText,r),{matcher:s}=Ni(n,!0);return s(i)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(t,n)=>{const{matcher:r}=Ni(n,!0);return this._evaluator._queryCSS({scope:t,pierceShadow:!0},"*").filter(s=>op(this._evaluator._cacheText,s).some(o=>r(o)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const i=on(r,!0);if(i.name||i.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:s,value:o,caseSensitive:l}=i.attributes[0],a=l?null:o.toLowerCase();let u;return o instanceof RegExp?u=f=>!!f.match(o):l?u=f=>f===o:u=f=>f.toLowerCase().includes(a),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${s}]`).filter(f=>u(f.getAttribute(s)))}}}_createControlEngine(){return{queryAll(t,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return t.nodeType!==1?[]:[t.childElementCount===1?t.firstElementChild:t];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:nn(n)===!!r?[n]:[]}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(t,n){const r=this.window.eval(` (() => { const module = {}; ${t} return module.exports.default(); })()`);return new r(this,n)}async viewportRatio(t){return await new Promise(n=>{const r=new IntersectionObserver(i=>{n(i[0].intersectionRatio),r.disconnect()});r.observe(t),this.builtinRequestAnimationFrame(()=>{})})}getElementBorderWidth(t){if(t.nodeType!==Node.ELEMENT_NODE||!t.ownerDocument||!t.ownerDocument.defaultView)return{left:0,top:0};const n=t.ownerDocument.defaultView.getComputedStyle(t);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return"error:notconnected";const n=t.ownerDocument.defaultView;for(let i=t;i;i=Se(i))if(n.getComputedStyle(i).transform!=="none")return"transformed";const r=n.getComputedStyle(t);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(t,n){let r=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;return r?(n==="none"||(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&(!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable&&(r=r.closest("label")||r),r.nodeName==="LABEL"&&(r=r.control||r))),r):null}async checkElementStates(t,n){if(n.includes("stable")){const r=await this._checkElementIsStable(t);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return r}for(const r of n)if(r!=="stable"){const i=this.elementState(t,r);if(i===!1)return{missingState:r};if(i==="error:notconnected")return i}}async _checkElementIsStable(t){const n=Symbol("continuePolling");let r,i=0,s=0;const o=()=>{const f=this.retarget(t,"no-follow-label");if(!f)return"error:notconnected";const d=performance.now();if(this._stableRafCount>1&&d-s<15)return n;s=d;const g=f.getBoundingClientRect(),m={x:g.top,y:g.left,width:g.width,height:g.height};if(r){if(!(m.x===r.x&&m.y===r.y&&m.width===r.width&&m.height===r.height))return!1;if(++i>=this._stableRafCount)return!0}return r=m,n};let l,a;const u=new Promise((f,d)=>{l=f,a=d}),c=()=>{try{const f=o();f!==n?l(f):this.builtinRequestAnimationFrame(c)}catch(f){a(f)}};return this.builtinRequestAnimationFrame(c),u}elementState(t,n){const r=this.retarget(t,["stable","visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?!0:"error:notconnected";if(n==="visible")return nn(r);if(n==="hidden")return!nn(r);const i=Ua(r);if(n==="disabled")return i;if(n==="enabled")return!i;const s=!(["INPUT","TEXTAREA","SELECT"].includes(r.nodeName)&&r.hasAttribute("readonly"));if(n==="editable")return!i&&s;if(n==="checked"||n==="unchecked"){const o=n==="checked",l=Gh(r,!1);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return o===l}throw this.createStacklessError(`Unexpected element state "${n}"`)}selectOptions(t,n){const r=this.retarget(t,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a ,