playwright-core 1.55.0-alpha-2025-08-08 → 1.55.0-alpha-2025-08-09

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-kKV6wiKW.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-NFqbwr7X.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
2
  var p0=Object.defineProperty;var m0=(t,e,n)=>e in t?p0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>m0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function g0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uu={exports:{}},bi={},fu={exports:{}},he={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -39,14 +39,14 @@ var p0=Object.defineProperty;var m0=(t,e,n)=>e in t?p0(t,e,{enumerable:!0,config
39
39
  `).replace(Cw,"")}function Ao(s,i,a){if(i=qd(i),qd(s)!==i&&a)throw Error(n(425))}function Io(){}var tc=null,nc=null;function rc(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var sc=typeof setTimeout=="function"?setTimeout:void 0,Nw=typeof clearTimeout=="function"?clearTimeout:void 0,Vd=typeof Promise=="function"?Promise:void 0,Aw=typeof queueMicrotask=="function"?queueMicrotask:typeof Vd<"u"?function(s){return Vd.resolve(null).then(s).catch(Iw)}:sc;function Iw(s){setTimeout(function(){throw s})}function ic(s,i){var a=i,f=0;do{var h=a.nextSibling;if(s.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(f===0){s.removeChild(h),Ys(i);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=h}while(a);Ys(i)}function Dn(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function Wd(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return s;i--}else a==="/$"&&i++}s=s.previousSibling}return null}var Gr=Math.random().toString(36).slice(2),on="__reactFiber$"+Gr,ci="__reactProps$"+Gr,pn="__reactContainer$"+Gr,oc="__reactEvents$"+Gr,Lw="__reactListeners$"+Gr,Mw="__reactHandles$"+Gr;function fr(s){var i=s[on];if(i)return i;for(var a=s.parentNode;a;){if(i=a[pn]||a[on]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(s=Wd(s);s!==null;){if(a=s[on])return a;s=Wd(s)}return i}s=a,a=s.parentNode}return null}function ui(s){return s=s[on]||s[pn],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Qr(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Lo(s){return s[ci]||null}var lc=[],Jr=-1;function Fn(s){return{current:s}}function Ie(s){0>Jr||(s.current=lc[Jr],lc[Jr]=null,Jr--)}function Ce(s,i){Jr++,lc[Jr]=s.current,s.current=i}var Bn={},st=Fn(Bn),gt=Fn(!1),dr=Bn;function Xr(s,i){var a=s.type.contextTypes;if(!a)return Bn;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===i)return f.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=h),h}function yt(s){return s=s.childContextTypes,s!=null}function Mo(){Ie(gt),Ie(st)}function Kd(s,i,a){if(st.current!==Bn)throw Error(n(168));Ce(st,i),Ce(gt,a)}function Gd(s,i,a){var f=s.stateNode;if(i=i.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var h in f)if(!(h in i))throw Error(n(108,ve(s)||"Unknown",h));return J({},a,f)}function jo(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Bn,dr=st.current,Ce(st,s),Ce(gt,gt.current),!0}function Qd(s,i,a){var f=s.stateNode;if(!f)throw Error(n(169));a?(s=Gd(s,i,dr),f.__reactInternalMemoizedMergedChildContext=s,Ie(gt),Ie(st),Ce(st,s)):Ie(gt),Ce(gt,a)}var mn=null,Po=!1,ac=!1;function Jd(s){mn===null?mn=[s]:mn.push(s)}function jw(s){Po=!0,Jd(s)}function zn(){if(!ac&&mn!==null){ac=!0;var s=0,i=Ee;try{var a=mn;for(Ee=1;s<a.length;s++){var f=a[s];do f=f(!0);while(f!==null)}mn=null,Po=!1}catch(h){throw mn!==null&&(mn=mn.slice(s+1)),Yf(Ia,zn),h}finally{Ee=i,ac=!1}}return null}var Yr=[],Zr=0,Oo=null,Ro=0,jt=[],Pt=0,hr=null,gn=1,yn="";function pr(s,i){Yr[Zr++]=Ro,Yr[Zr++]=Oo,Oo=s,Ro=i}function Xd(s,i,a){jt[Pt++]=gn,jt[Pt++]=yn,jt[Pt++]=hr,hr=s;var f=gn;s=yn;var h=32-Kt(f)-1;f&=~(1<<h),a+=1;var m=32-Kt(i)+h;if(30<m){var _=h-h%5;m=(f&(1<<_)-1).toString(32),f>>=_,h-=_,gn=1<<32-Kt(i)+h|a<<h|f,yn=m+s}else gn=1<<m|a<<h|f,yn=s}function cc(s){s.return!==null&&(pr(s,1),Xd(s,1,0))}function uc(s){for(;s===Oo;)Oo=Yr[--Zr],Yr[Zr]=null,Ro=Yr[--Zr],Yr[Zr]=null;for(;s===hr;)hr=jt[--Pt],jt[Pt]=null,yn=jt[--Pt],jt[Pt]=null,gn=jt[--Pt],jt[Pt]=null}var Nt=null,At=null,Le=!1,Qt=null;function Yd(s,i){var a=Dt(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=s,i=s.deletions,i===null?(s.deletions=[a],s.flags|=16):i.push(a)}function Zd(s,i){switch(s.tag){case 5:var a=s.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,Nt=s,At=Dn(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,Nt=s,At=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=hr!==null?{id:gn,overflow:yn}:null,s.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Dt(18,null,null,0),a.stateNode=i,a.return=s,s.child=a,Nt=s,At=null,!0):!1;default:return!1}}function fc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function dc(s){if(Le){var i=At;if(i){var a=i;if(!Zd(s,i)){if(fc(s))throw Error(n(418));i=Dn(a.nextSibling);var f=Nt;i&&Zd(s,i)?Yd(f,a):(s.flags=s.flags&-4097|2,Le=!1,Nt=s)}}else{if(fc(s))throw Error(n(418));s.flags=s.flags&-4097|2,Le=!1,Nt=s}}}function eh(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Nt=s}function $o(s){if(s!==Nt)return!1;if(!Le)return eh(s),Le=!0,!1;var i;if((i=s.tag!==3)&&!(i=s.tag!==5)&&(i=s.type,i=i!=="head"&&i!=="body"&&!rc(s.type,s.memoizedProps)),i&&(i=At)){if(fc(s))throw th(),Error(n(418));for(;i;)Yd(s,i),i=Dn(i.nextSibling)}if(eh(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="/$"){if(i===0){At=Dn(s.nextSibling);break e}i--}else a!=="$"&&a!=="$!"&&a!=="$?"||i++}s=s.nextSibling}At=null}}else At=Nt?Dn(s.stateNode.nextSibling):null;return!0}function th(){for(var s=At;s;)s=Dn(s.nextSibling)}function es(){At=Nt=null,Le=!1}function hc(s){Qt===null?Qt=[s]:Qt.push(s)}var Pw=R.ReactCurrentBatchConfig;function fi(s,i,a){if(s=a.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var f=a.stateNode}if(!f)throw Error(n(147,s));var h=f,m=""+s;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===m?i.ref:(i=function(_){var b=h.refs;_===null?delete b[m]:b[m]=_},i._stringRef=m,i)}if(typeof s!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,s))}return s}function Do(s,i){throw s=Object.prototype.toString.call(i),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s))}function nh(s){var i=s._init;return i(s._payload)}function rh(s){function i(L,N){if(s){var P=L.deletions;P===null?(L.deletions=[N],L.flags|=16):P.push(N)}}function a(L,N){if(!s)return null;for(;N!==null;)i(L,N),N=N.sibling;return null}function f(L,N){for(L=new Map;N!==null;)N.key!==null?L.set(N.key,N):L.set(N.index,N),N=N.sibling;return L}function h(L,N){return L=Qn(L,N),L.index=0,L.sibling=null,L}function m(L,N,P){return L.index=P,s?(P=L.alternate,P!==null?(P=P.index,P<N?(L.flags|=2,N):P):(L.flags|=2,N)):(L.flags|=1048576,N)}function _(L){return s&&L.alternate===null&&(L.flags|=2),L}function b(L,N,P,G){return N===null||N.tag!==6?(N=su(P,L.mode,G),N.return=L,N):(N=h(N,P),N.return=L,N)}function T(L,N,P,G){var te=P.type;return te===q?W(L,N,P.props.children,G,P.key):N!==null&&(N.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===pe&&nh(te)===N.type)?(G=h(N,P.props),G.ref=fi(L,N,P),G.return=L,G):(G=al(P.type,P.key,P.props,null,L.mode,G),G.ref=fi(L,N,P),G.return=L,G)}function O(L,N,P,G){return N===null||N.tag!==4||N.stateNode.containerInfo!==P.containerInfo||N.stateNode.implementation!==P.implementation?(N=iu(P,L.mode,G),N.return=L,N):(N=h(N,P.children||[]),N.return=L,N)}function W(L,N,P,G,te){return N===null||N.tag!==7?(N=_r(P,L.mode,G,te),N.return=L,N):(N=h(N,P),N.return=L,N)}function K(L,N,P){if(typeof N=="string"&&N!==""||typeof N=="number")return N=su(""+N,L.mode,P),N.return=L,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case D:return P=al(N.type,N.key,N.props,null,L.mode,P),P.ref=fi(L,null,N),P.return=L,P;case z:return N=iu(N,L.mode,P),N.return=L,N;case pe:var G=N._init;return K(L,G(N._payload),P)}if(or(N)||ne(N))return N=_r(N,L.mode,P,null),N.return=L,N;Do(L,N)}return null}function V(L,N,P,G){var te=N!==null?N.key:null;if(typeof P=="string"&&P!==""||typeof P=="number")return te!==null?null:b(L,N,""+P,G);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case D:return P.key===te?T(L,N,P,G):null;case z:return P.key===te?O(L,N,P,G):null;case pe:return te=P._init,V(L,N,te(P._payload),G)}if(or(P)||ne(P))return te!==null?null:W(L,N,P,G,null);Do(L,P)}return null}function X(L,N,P,G,te){if(typeof G=="string"&&G!==""||typeof G=="number")return L=L.get(P)||null,b(N,L,""+G,te);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case D:return L=L.get(G.key===null?P:G.key)||null,T(N,L,G,te);case z:return L=L.get(G.key===null?P:G.key)||null,O(N,L,G,te);case pe:var re=G._init;return X(L,N,P,re(G._payload),te)}if(or(G)||ne(G))return L=L.get(P)||null,W(N,L,G,te,null);Do(N,G)}return null}function Z(L,N,P,G){for(var te=null,re=null,se=N,le=N=0,Xe=null;se!==null&&le<P.length;le++){se.index>le?(Xe=se,se=null):Xe=se.sibling;var Se=V(L,se,P[le],G);if(Se===null){se===null&&(se=Xe);break}s&&se&&Se.alternate===null&&i(L,se),N=m(Se,N,le),re===null?te=Se:re.sibling=Se,re=Se,se=Xe}if(le===P.length)return a(L,se),Le&&pr(L,le),te;if(se===null){for(;le<P.length;le++)se=K(L,P[le],G),se!==null&&(N=m(se,N,le),re===null?te=se:re.sibling=se,re=se);return Le&&pr(L,le),te}for(se=f(L,se);le<P.length;le++)Xe=X(se,L,le,P[le],G),Xe!==null&&(s&&Xe.alternate!==null&&se.delete(Xe.key===null?le:Xe.key),N=m(Xe,N,le),re===null?te=Xe:re.sibling=Xe,re=Xe);return s&&se.forEach(function(Jn){return i(L,Jn)}),Le&&pr(L,le),te}function ee(L,N,P,G){var te=ne(P);if(typeof te!="function")throw Error(n(150));if(P=te.call(P),P==null)throw Error(n(151));for(var re=te=null,se=N,le=N=0,Xe=null,Se=P.next();se!==null&&!Se.done;le++,Se=P.next()){se.index>le?(Xe=se,se=null):Xe=se.sibling;var Jn=V(L,se,Se.value,G);if(Jn===null){se===null&&(se=Xe);break}s&&se&&Jn.alternate===null&&i(L,se),N=m(Jn,N,le),re===null?te=Jn:re.sibling=Jn,re=Jn,se=Xe}if(Se.done)return a(L,se),Le&&pr(L,le),te;if(se===null){for(;!Se.done;le++,Se=P.next())Se=K(L,Se.value,G),Se!==null&&(N=m(Se,N,le),re===null?te=Se:re.sibling=Se,re=Se);return Le&&pr(L,le),te}for(se=f(L,se);!Se.done;le++,Se=P.next())Se=X(se,L,le,Se.value,G),Se!==null&&(s&&Se.alternate!==null&&se.delete(Se.key===null?le:Se.key),N=m(Se,N,le),re===null?te=Se:re.sibling=Se,re=Se);return s&&se.forEach(function(h0){return i(L,h0)}),Le&&pr(L,le),te}function Be(L,N,P,G){if(typeof P=="object"&&P!==null&&P.type===q&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case D:e:{for(var te=P.key,re=N;re!==null;){if(re.key===te){if(te=P.type,te===q){if(re.tag===7){a(L,re.sibling),N=h(re,P.props.children),N.return=L,L=N;break e}}else if(re.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===pe&&nh(te)===re.type){a(L,re.sibling),N=h(re,P.props),N.ref=fi(L,re,P),N.return=L,L=N;break e}a(L,re);break}else i(L,re);re=re.sibling}P.type===q?(N=_r(P.props.children,L.mode,G,P.key),N.return=L,L=N):(G=al(P.type,P.key,P.props,null,L.mode,G),G.ref=fi(L,N,P),G.return=L,L=G)}return _(L);case z:e:{for(re=P.key;N!==null;){if(N.key===re)if(N.tag===4&&N.stateNode.containerInfo===P.containerInfo&&N.stateNode.implementation===P.implementation){a(L,N.sibling),N=h(N,P.children||[]),N.return=L,L=N;break e}else{a(L,N);break}else i(L,N);N=N.sibling}N=iu(P,L.mode,G),N.return=L,L=N}return _(L);case pe:return re=P._init,Be(L,N,re(P._payload),G)}if(or(P))return Z(L,N,P,G);if(ne(P))return ee(L,N,P,G);Do(L,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,N!==null&&N.tag===6?(a(L,N.sibling),N=h(N,P),N.return=L,L=N):(a(L,N),N=su(P,L.mode,G),N.return=L,L=N),_(L)):a(L,N)}return Be}var ts=rh(!0),sh=rh(!1),Fo=Fn(null),Bo=null,ns=null,pc=null;function mc(){pc=ns=Bo=null}function gc(s){var i=Fo.current;Ie(Fo),s._currentValue=i}function yc(s,i,a){for(;s!==null;){var f=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),s===a)break;s=s.return}}function rs(s,i){Bo=s,pc=ns=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&i)!==0&&(vt=!0),s.firstContext=null)}function Ot(s){var i=s._currentValue;if(pc!==s)if(s={context:s,memoizedValue:i,next:null},ns===null){if(Bo===null)throw Error(n(308));ns=s,Bo.dependencies={lanes:0,firstContext:s}}else ns=ns.next=s;return i}var mr=null;function vc(s){mr===null?mr=[s]:mr.push(s)}function ih(s,i,a,f){var h=i.interleaved;return h===null?(a.next=a,vc(i)):(a.next=h.next,h.next=a),i.interleaved=a,vn(s,f)}function vn(s,i){s.lanes|=i;var a=s.alternate;for(a!==null&&(a.lanes|=i),a=s,s=s.return;s!==null;)s.childLanes|=i,a=s.alternate,a!==null&&(a.childLanes|=i),a=s,s=s.return;return a.tag===3?a.stateNode:null}var Un=!1;function wc(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oh(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function wn(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function Hn(s,i,a){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(we&2)!==0){var h=f.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),f.pending=i,vn(s,a)}return h=f.interleaved,h===null?(i.next=i,vc(f)):(i.next=h.next,h.next=i),f.interleaved=i,vn(s,a)}function zo(s,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,ja(s,a)}}function lh(s,i){var a=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var _={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?h=m=_:m=m.next=_,a=a.next}while(a!==null);m===null?h=m=i:m=m.next=i}else h=m=i;a={baseState:f.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:f.shared,effects:f.effects},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=i:s.next=i,a.lastBaseUpdate=i}function Uo(s,i,a,f){var h=s.updateQueue;Un=!1;var m=h.firstBaseUpdate,_=h.lastBaseUpdate,b=h.shared.pending;if(b!==null){h.shared.pending=null;var T=b,O=T.next;T.next=null,_===null?m=O:_.next=O,_=T;var W=s.alternate;W!==null&&(W=W.updateQueue,b=W.lastBaseUpdate,b!==_&&(b===null?W.firstBaseUpdate=O:b.next=O,W.lastBaseUpdate=T))}if(m!==null){var K=h.baseState;_=0,W=O=T=null,b=m;do{var V=b.lane,X=b.eventTime;if((f&V)===V){W!==null&&(W=W.next={eventTime:X,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var Z=s,ee=b;switch(V=i,X=a,ee.tag){case 1:if(Z=ee.payload,typeof Z=="function"){K=Z.call(X,K,V);break e}K=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=ee.payload,V=typeof Z=="function"?Z.call(X,K,V):Z,V==null)break e;K=J({},K,V);break e;case 2:Un=!0}}b.callback!==null&&b.lane!==0&&(s.flags|=64,V=h.effects,V===null?h.effects=[b]:V.push(b))}else X={eventTime:X,lane:V,tag:b.tag,payload:b.payload,callback:b.callback,next:null},W===null?(O=W=X,T=K):W=W.next=X,_|=V;if(b=b.next,b===null){if(b=h.shared.pending,b===null)break;V=b,b=V.next,V.next=null,h.lastBaseUpdate=V,h.shared.pending=null}}while(!0);if(W===null&&(T=K),h.baseState=T,h.firstBaseUpdate=O,h.lastBaseUpdate=W,i=h.shared.interleaved,i!==null){h=i;do _|=h.lane,h=h.next;while(h!==i)}else m===null&&(h.shared.lanes=0);vr|=_,s.lanes=_,s.memoizedState=K}}function ah(s,i,a){if(s=i.effects,i.effects=null,s!==null)for(i=0;i<s.length;i++){var f=s[i],h=f.callback;if(h!==null){if(f.callback=null,f=a,typeof h!="function")throw Error(n(191,h));h.call(f)}}}var di={},ln=Fn(di),hi=Fn(di),pi=Fn(di);function gr(s){if(s===di)throw Error(n(174));return s}function Sc(s,i){switch(Ce(pi,i),Ce(hi,s),Ce(ln,di),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:hn(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=hn(i,s)}Ie(ln),Ce(ln,i)}function ss(){Ie(ln),Ie(hi),Ie(pi)}function ch(s){gr(pi.current);var i=gr(ln.current),a=hn(i,s.type);i!==a&&(Ce(hi,s),Ce(ln,a))}function xc(s){hi.current===s&&(Ie(ln),Ie(hi))}var Pe=Fn(0);function Ho(s){for(var i=s;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var _c=[];function Ec(){for(var s=0;s<_c.length;s++)_c[s]._workInProgressVersionPrimary=null;_c.length=0}var qo=R.ReactCurrentDispatcher,kc=R.ReactCurrentBatchConfig,yr=0,Oe=null,We=null,Qe=null,Vo=!1,mi=!1,gi=0,Ow=0;function it(){throw Error(n(321))}function bc(s,i){if(i===null)return!1;for(var a=0;a<i.length&&a<s.length;a++)if(!Gt(s[a],i[a]))return!1;return!0}function Tc(s,i,a,f,h,m){if(yr=m,Oe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,qo.current=s===null||s.memoizedState===null?Fw:Bw,s=a(f,h),mi){m=0;do{if(mi=!1,gi=0,25<=m)throw Error(n(301));m+=1,Qe=We=null,i.updateQueue=null,qo.current=zw,s=a(f,h)}while(mi)}if(qo.current=Go,i=We!==null&&We.next!==null,yr=0,Qe=We=Oe=null,Vo=!1,i)throw Error(n(300));return s}function Cc(){var s=gi!==0;return gi=0,s}function an(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?Oe.memoizedState=Qe=s:Qe=Qe.next=s,Qe}function Rt(){if(We===null){var s=Oe.alternate;s=s!==null?s.memoizedState:null}else s=We.next;var i=Qe===null?Oe.memoizedState:Qe.next;if(i!==null)Qe=i,We=s;else{if(s===null)throw Error(n(310));We=s,s={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Qe===null?Oe.memoizedState=Qe=s:Qe=Qe.next=s}return Qe}function yi(s,i){return typeof i=="function"?i(s):i}function Nc(s){var i=Rt(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=We,h=f.baseQueue,m=a.pending;if(m!==null){if(h!==null){var _=h.next;h.next=m.next,m.next=_}f.baseQueue=h=m,a.pending=null}if(h!==null){m=h.next,f=f.baseState;var b=_=null,T=null,O=m;do{var W=O.lane;if((yr&W)===W)T!==null&&(T=T.next={lane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),f=O.hasEagerState?O.eagerState:s(f,O.action);else{var K={lane:W,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null};T===null?(b=T=K,_=f):T=T.next=K,Oe.lanes|=W,vr|=W}O=O.next}while(O!==null&&O!==m);T===null?_=f:T.next=b,Gt(f,i.memoizedState)||(vt=!0),i.memoizedState=f,i.baseState=_,i.baseQueue=T,a.lastRenderedState=f}if(s=a.interleaved,s!==null){h=s;do m=h.lane,Oe.lanes|=m,vr|=m,h=h.next;while(h!==s)}else h===null&&(a.lanes=0);return[i.memoizedState,a.dispatch]}function Ac(s){var i=Rt(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=a.dispatch,h=a.pending,m=i.memoizedState;if(h!==null){a.pending=null;var _=h=h.next;do m=s(m,_.action),_=_.next;while(_!==h);Gt(m,i.memoizedState)||(vt=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),a.lastRenderedState=m}return[m,f]}function uh(){}function fh(s,i){var a=Oe,f=Rt(),h=i(),m=!Gt(f.memoizedState,h);if(m&&(f.memoizedState=h,vt=!0),f=f.queue,Ic(ph.bind(null,a,f,s),[s]),f.getSnapshot!==i||m||Qe!==null&&Qe.memoizedState.tag&1){if(a.flags|=2048,vi(9,hh.bind(null,a,f,h,i),void 0,null),Je===null)throw Error(n(349));(yr&30)!==0||dh(a,i,h)}return h}function dh(s,i,a){s.flags|=16384,s={getSnapshot:i,value:a},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.stores=[s]):(a=i.stores,a===null?i.stores=[s]:a.push(s))}function hh(s,i,a,f){i.value=a,i.getSnapshot=f,mh(i)&&gh(s)}function ph(s,i,a){return a(function(){mh(i)&&gh(s)})}function mh(s){var i=s.getSnapshot;s=s.value;try{var a=i();return!Gt(s,a)}catch{return!0}}function gh(s){var i=vn(s,1);i!==null&&Zt(i,s,1,-1)}function yh(s){var i=an();return typeof s=="function"&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yi,lastRenderedState:s},i.queue=s,s=s.dispatch=Dw.bind(null,Oe,s),[i.memoizedState,s]}function vi(s,i,a,f){return s={tag:s,create:i,destroy:a,deps:f,next:null},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.lastEffect=s.next=s):(a=i.lastEffect,a===null?i.lastEffect=s.next=s:(f=a.next,a.next=s,s.next=f,i.lastEffect=s)),s}function vh(){return Rt().memoizedState}function Wo(s,i,a,f){var h=an();Oe.flags|=s,h.memoizedState=vi(1|i,a,void 0,f===void 0?null:f)}function Ko(s,i,a,f){var h=Rt();f=f===void 0?null:f;var m=void 0;if(We!==null){var _=We.memoizedState;if(m=_.destroy,f!==null&&bc(f,_.deps)){h.memoizedState=vi(i,a,m,f);return}}Oe.flags|=s,h.memoizedState=vi(1|i,a,m,f)}function wh(s,i){return Wo(8390656,8,s,i)}function Ic(s,i){return Ko(2048,8,s,i)}function Sh(s,i){return Ko(4,2,s,i)}function xh(s,i){return Ko(4,4,s,i)}function _h(s,i){if(typeof i=="function")return s=s(),i(s),function(){i(null)};if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function Eh(s,i,a){return a=a!=null?a.concat([s]):null,Ko(4,4,_h.bind(null,i,s),a)}function Lc(){}function kh(s,i){var a=Rt();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&bc(i,f[1])?f[0]:(a.memoizedState=[s,i],s)}function bh(s,i){var a=Rt();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&bc(i,f[1])?f[0]:(s=s(),a.memoizedState=[s,i],s)}function Th(s,i,a){return(yr&21)===0?(s.baseState&&(s.baseState=!1,vt=!0),s.memoizedState=a):(Gt(a,i)||(a=nd(),Oe.lanes|=a,vr|=a,s.baseState=!0),i)}function Rw(s,i){var a=Ee;Ee=a!==0&&4>a?a:4,s(!0);var f=kc.transition;kc.transition={};try{s(!1),i()}finally{Ee=a,kc.transition=f}}function Ch(){return Rt().memoizedState}function $w(s,i,a){var f=Kn(s);if(a={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null},Nh(s))Ah(i,a);else if(a=ih(s,i,a,f),a!==null){var h=ft();Zt(a,s,f,h),Ih(a,i,f)}}function Dw(s,i,a){var f=Kn(s),h={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null};if(Nh(s))Ah(i,h);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var _=i.lastRenderedState,b=m(_,a);if(h.hasEagerState=!0,h.eagerState=b,Gt(b,_)){var T=i.interleaved;T===null?(h.next=h,vc(i)):(h.next=T.next,T.next=h),i.interleaved=h;return}}catch{}finally{}a=ih(s,i,h,f),a!==null&&(h=ft(),Zt(a,s,f,h),Ih(a,i,f))}}function Nh(s){var i=s.alternate;return s===Oe||i!==null&&i===Oe}function Ah(s,i){mi=Vo=!0;var a=s.pending;a===null?i.next=i:(i.next=a.next,a.next=i),s.pending=i}function Ih(s,i,a){if((a&4194240)!==0){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,ja(s,a)}}var Go={readContext:Ot,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},Fw={readContext:Ot,useCallback:function(s,i){return an().memoizedState=[s,i===void 0?null:i],s},useContext:Ot,useEffect:wh,useImperativeHandle:function(s,i,a){return a=a!=null?a.concat([s]):null,Wo(4194308,4,_h.bind(null,i,s),a)},useLayoutEffect:function(s,i){return Wo(4194308,4,s,i)},useInsertionEffect:function(s,i){return Wo(4,2,s,i)},useMemo:function(s,i){var a=an();return i=i===void 0?null:i,s=s(),a.memoizedState=[s,i],s},useReducer:function(s,i,a){var f=an();return i=a!==void 0?a(i):i,f.memoizedState=f.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},f.queue=s,s=s.dispatch=$w.bind(null,Oe,s),[f.memoizedState,s]},useRef:function(s){var i=an();return s={current:s},i.memoizedState=s},useState:yh,useDebugValue:Lc,useDeferredValue:function(s){return an().memoizedState=s},useTransition:function(){var s=yh(!1),i=s[0];return s=Rw.bind(null,s[1]),an().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,a){var f=Oe,h=an();if(Le){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),Je===null)throw Error(n(349));(yr&30)!==0||dh(f,i,a)}h.memoizedState=a;var m={value:a,getSnapshot:i};return h.queue=m,wh(ph.bind(null,f,m,s),[s]),f.flags|=2048,vi(9,hh.bind(null,f,m,a,i),void 0,null),a},useId:function(){var s=an(),i=Je.identifierPrefix;if(Le){var a=yn,f=gn;a=(f&~(1<<32-Kt(f)-1)).toString(32)+a,i=":"+i+"R"+a,a=gi++,0<a&&(i+="H"+a.toString(32)),i+=":"}else a=Ow++,i=":"+i+"r"+a.toString(32)+":";return s.memoizedState=i},unstable_isNewReconciler:!1},Bw={readContext:Ot,useCallback:kh,useContext:Ot,useEffect:Ic,useImperativeHandle:Eh,useInsertionEffect:Sh,useLayoutEffect:xh,useMemo:bh,useReducer:Nc,useRef:vh,useState:function(){return Nc(yi)},useDebugValue:Lc,useDeferredValue:function(s){var i=Rt();return Th(i,We.memoizedState,s)},useTransition:function(){var s=Nc(yi)[0],i=Rt().memoizedState;return[s,i]},useMutableSource:uh,useSyncExternalStore:fh,useId:Ch,unstable_isNewReconciler:!1},zw={readContext:Ot,useCallback:kh,useContext:Ot,useEffect:Ic,useImperativeHandle:Eh,useInsertionEffect:Sh,useLayoutEffect:xh,useMemo:bh,useReducer:Ac,useRef:vh,useState:function(){return Ac(yi)},useDebugValue:Lc,useDeferredValue:function(s){var i=Rt();return We===null?i.memoizedState=s:Th(i,We.memoizedState,s)},useTransition:function(){var s=Ac(yi)[0],i=Rt().memoizedState;return[s,i]},useMutableSource:uh,useSyncExternalStore:fh,useId:Ch,unstable_isNewReconciler:!1};function Jt(s,i){if(s&&s.defaultProps){i=J({},i),s=s.defaultProps;for(var a in s)i[a]===void 0&&(i[a]=s[a]);return i}return i}function Mc(s,i,a,f){i=s.memoizedState,a=a(f,i),a=a==null?i:J({},i,a),s.memoizedState=a,s.lanes===0&&(s.updateQueue.baseState=a)}var Qo={isMounted:function(s){return(s=s._reactInternals)?ur(s)===s:!1},enqueueSetState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Kn(s),m=wn(f,h);m.payload=i,a!=null&&(m.callback=a),i=Hn(s,m,h),i!==null&&(Zt(i,s,h,f),zo(i,s,h))},enqueueReplaceState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Kn(s),m=wn(f,h);m.tag=1,m.payload=i,a!=null&&(m.callback=a),i=Hn(s,m,h),i!==null&&(Zt(i,s,h,f),zo(i,s,h))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var a=ft(),f=Kn(s),h=wn(a,f);h.tag=2,i!=null&&(h.callback=i),i=Hn(s,h,f),i!==null&&(Zt(i,s,f,a),zo(i,s,f))}};function Lh(s,i,a,f,h,m,_){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,m,_):i.prototype&&i.prototype.isPureReactComponent?!si(a,f)||!si(h,m):!0}function Mh(s,i,a){var f=!1,h=Bn,m=i.contextType;return typeof m=="object"&&m!==null?m=Ot(m):(h=yt(i)?dr:st.current,f=i.contextTypes,m=(f=f!=null)?Xr(s,h):Bn),i=new i(a,m),s.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Qo,s.stateNode=i,i._reactInternals=s,f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=h,s.__reactInternalMemoizedMaskedChildContext=m),i}function jh(s,i,a,f){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,f),i.state!==s&&Qo.enqueueReplaceState(i,i.state,null)}function jc(s,i,a,f){var h=s.stateNode;h.props=a,h.state=s.memoizedState,h.refs={},wc(s);var m=i.contextType;typeof m=="object"&&m!==null?h.context=Ot(m):(m=yt(i)?dr:st.current,h.context=Xr(s,m)),h.state=s.memoizedState,m=i.getDerivedStateFromProps,typeof m=="function"&&(Mc(s,i,m,a),h.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&Qo.enqueueReplaceState(h,h.state,null),Uo(s,a,h,f),h.state=s.memoizedState),typeof h.componentDidMount=="function"&&(s.flags|=4194308)}function is(s,i){try{var a="",f=i;do a+=ye(f),f=f.return;while(f);var h=a}catch(m){h=`
40
40
  Error generating stack: `+m.message+`
41
41
  `+m.stack}return{value:s,source:i,stack:h,digest:null}}function Pc(s,i,a){return{value:s,source:null,stack:a??null,digest:i??null}}function Oc(s,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Uw=typeof WeakMap=="function"?WeakMap:Map;function Ph(s,i,a){a=wn(-1,a),a.tag=3,a.payload={element:null};var f=i.value;return a.callback=function(){nl||(nl=!0,Jc=f),Oc(s,i)},a}function Oh(s,i,a){a=wn(-1,a),a.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=i.value;a.payload=function(){return f(h)},a.callback=function(){Oc(s,i)}}var m=s.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(a.callback=function(){Oc(s,i),typeof f!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})}),a}function Rh(s,i,a){var f=s.pingCache;if(f===null){f=s.pingCache=new Uw;var h=new Set;f.set(i,h)}else h=f.get(i),h===void 0&&(h=new Set,f.set(i,h));h.has(a)||(h.add(a),s=n0.bind(null,s,i,a),i.then(s,s))}function $h(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function Dh(s,i,a,f,h){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=wn(-1,1),i.tag=2,Hn(a,i,1))),a.lanes|=1),s):(s.flags|=65536,s.lanes=h,s)}var Hw=R.ReactCurrentOwner,vt=!1;function ut(s,i,a,f){i.child=s===null?sh(i,null,a,f):ts(i,s.child,a,f)}function Fh(s,i,a,f,h){a=a.render;var m=i.ref;return rs(i,h),f=Tc(s,i,a,f,m,h),a=Cc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Le&&a&&cc(i),i.flags|=1,ut(s,i,f,h),i.child)}function Bh(s,i,a,f,h){if(s===null){var m=a.type;return typeof m=="function"&&!ru(m)&&m.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=m,zh(s,i,m,f,h)):(s=al(a.type,null,f,i,i.mode,h),s.ref=i.ref,s.return=i,i.child=s)}if(m=s.child,(s.lanes&h)===0){var _=m.memoizedProps;if(a=a.compare,a=a!==null?a:si,a(_,f)&&s.ref===i.ref)return Sn(s,i,h)}return i.flags|=1,s=Qn(m,f),s.ref=i.ref,s.return=i,i.child=s}function zh(s,i,a,f,h){if(s!==null){var m=s.memoizedProps;if(si(m,f)&&s.ref===i.ref)if(vt=!1,i.pendingProps=f=m,(s.lanes&h)!==0)(s.flags&131072)!==0&&(vt=!0);else return i.lanes=s.lanes,Sn(s,i,h)}return Rc(s,i,a,f,h)}function Uh(s,i,a){var f=i.pendingProps,h=f.children,m=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(ls,It),It|=a;else{if((a&1073741824)===0)return s=m!==null?m.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,Ce(ls,It),It|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=m!==null?m.baseLanes:a,Ce(ls,It),It|=f}else m!==null?(f=m.baseLanes|a,i.memoizedState=null):f=a,Ce(ls,It),It|=f;return ut(s,i,h,a),i.child}function Hh(s,i){var a=i.ref;(s===null&&a!==null||s!==null&&s.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function Rc(s,i,a,f,h){var m=yt(a)?dr:st.current;return m=Xr(i,m),rs(i,h),a=Tc(s,i,a,f,m,h),f=Cc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Le&&f&&cc(i),i.flags|=1,ut(s,i,a,h),i.child)}function qh(s,i,a,f,h){if(yt(a)){var m=!0;jo(i)}else m=!1;if(rs(i,h),i.stateNode===null)Xo(s,i),Mh(i,a,f),jc(i,a,f,h),f=!0;else if(s===null){var _=i.stateNode,b=i.memoizedProps;_.props=b;var T=_.context,O=a.contextType;typeof O=="object"&&O!==null?O=Ot(O):(O=yt(a)?dr:st.current,O=Xr(i,O));var W=a.getDerivedStateFromProps,K=typeof W=="function"||typeof _.getSnapshotBeforeUpdate=="function";K||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==f||T!==O)&&jh(i,_,f,O),Un=!1;var V=i.memoizedState;_.state=V,Uo(i,f,_,h),T=i.memoizedState,b!==f||V!==T||gt.current||Un?(typeof W=="function"&&(Mc(i,a,W,f),T=i.memoizedState),(b=Un||Lh(i,a,b,f,V,T,O))?(K||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=T),_.props=f,_.state=T,_.context=O,f=b):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{_=i.stateNode,oh(s,i),b=i.memoizedProps,O=i.type===i.elementType?b:Jt(i.type,b),_.props=O,K=i.pendingProps,V=_.context,T=a.contextType,typeof T=="object"&&T!==null?T=Ot(T):(T=yt(a)?dr:st.current,T=Xr(i,T));var X=a.getDerivedStateFromProps;(W=typeof X=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==K||V!==T)&&jh(i,_,f,T),Un=!1,V=i.memoizedState,_.state=V,Uo(i,f,_,h);var Z=i.memoizedState;b!==K||V!==Z||gt.current||Un?(typeof X=="function"&&(Mc(i,a,X,f),Z=i.memoizedState),(O=Un||Lh(i,a,O,f,V,Z,T)||!1)?(W||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,Z,T),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,Z,T)),typeof _.componentDidUpdate=="function"&&(i.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof _.componentDidUpdate!="function"||b===s.memoizedProps&&V===s.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&V===s.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=Z),_.props=f,_.state=Z,_.context=T,f=O):(typeof _.componentDidUpdate!="function"||b===s.memoizedProps&&V===s.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&V===s.memoizedState||(i.flags|=1024),f=!1)}return $c(s,i,a,f,m,h)}function $c(s,i,a,f,h,m){Hh(s,i);var _=(i.flags&128)!==0;if(!f&&!_)return h&&Qd(i,a,!1),Sn(s,i,m);f=i.stateNode,Hw.current=i;var b=_&&typeof a.getDerivedStateFromError!="function"?null:f.render();return i.flags|=1,s!==null&&_?(i.child=ts(i,s.child,null,m),i.child=ts(i,null,b,m)):ut(s,i,b,m),i.memoizedState=f.state,h&&Qd(i,a,!0),i.child}function Vh(s){var i=s.stateNode;i.pendingContext?Kd(s,i.pendingContext,i.pendingContext!==i.context):i.context&&Kd(s,i.context,!1),Sc(s,i.containerInfo)}function Wh(s,i,a,f,h){return es(),hc(h),i.flags|=256,ut(s,i,a,f),i.child}var Dc={dehydrated:null,treeContext:null,retryLane:0};function Fc(s){return{baseLanes:s,cachePool:null,transitions:null}}function Kh(s,i,a){var f=i.pendingProps,h=Pe.current,m=!1,_=(i.flags&128)!==0,b;if((b=_)||(b=s!==null&&s.memoizedState===null?!1:(h&2)!==0),b?(m=!0,i.flags&=-129):(s===null||s.memoizedState!==null)&&(h|=1),Ce(Pe,h&1),s===null)return dc(i),s=i.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((i.mode&1)===0?i.lanes=1:s.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(_=f.children,s=f.fallback,m?(f=i.mode,m=i.child,_={mode:"hidden",children:_},(f&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=_):m=cl(_,f,0,null),s=_r(s,f,a,null),m.return=i,s.return=i,m.sibling=s,i.child=m,i.child.memoizedState=Fc(a),i.memoizedState=Dc,s):Bc(i,_));if(h=s.memoizedState,h!==null&&(b=h.dehydrated,b!==null))return qw(s,i,_,f,b,h,a);if(m){m=f.fallback,_=i.mode,h=s.child,b=h.sibling;var T={mode:"hidden",children:f.children};return(_&1)===0&&i.child!==h?(f=i.child,f.childLanes=0,f.pendingProps=T,i.deletions=null):(f=Qn(h,T),f.subtreeFlags=h.subtreeFlags&14680064),b!==null?m=Qn(b,m):(m=_r(m,_,a,null),m.flags|=2),m.return=i,f.return=i,f.sibling=m,i.child=f,f=m,m=i.child,_=s.child.memoizedState,_=_===null?Fc(a):{baseLanes:_.baseLanes|a,cachePool:null,transitions:_.transitions},m.memoizedState=_,m.childLanes=s.childLanes&~a,i.memoizedState=Dc,f}return m=s.child,s=m.sibling,f=Qn(m,{mode:"visible",children:f.children}),(i.mode&1)===0&&(f.lanes=a),f.return=i,f.sibling=null,s!==null&&(a=i.deletions,a===null?(i.deletions=[s],i.flags|=16):a.push(s)),i.child=f,i.memoizedState=null,f}function Bc(s,i){return i=cl({mode:"visible",children:i},s.mode,0,null),i.return=s,s.child=i}function Jo(s,i,a,f){return f!==null&&hc(f),ts(i,s.child,null,a),s=Bc(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function qw(s,i,a,f,h,m,_){if(a)return i.flags&256?(i.flags&=-257,f=Pc(Error(n(422))),Jo(s,i,_,f)):i.memoizedState!==null?(i.child=s.child,i.flags|=128,null):(m=f.fallback,h=i.mode,f=cl({mode:"visible",children:f.children},h,0,null),m=_r(m,h,_,null),m.flags|=2,f.return=i,m.return=i,f.sibling=m,i.child=f,(i.mode&1)!==0&&ts(i,s.child,null,_),i.child.memoizedState=Fc(_),i.memoizedState=Dc,m);if((i.mode&1)===0)return Jo(s,i,_,null);if(h.data==="$!"){if(f=h.nextSibling&&h.nextSibling.dataset,f)var b=f.dgst;return f=b,m=Error(n(419)),f=Pc(m,f,void 0),Jo(s,i,_,f)}if(b=(_&s.childLanes)!==0,vt||b){if(f=Je,f!==null){switch(_&-_){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(f.suspendedLanes|_))!==0?0:h,h!==0&&h!==m.retryLane&&(m.retryLane=h,vn(s,h),Zt(f,s,h,-1))}return nu(),f=Pc(Error(n(421))),Jo(s,i,_,f)}return h.data==="$?"?(i.flags|=128,i.child=s.child,i=r0.bind(null,s),h._reactRetry=i,null):(s=m.treeContext,At=Dn(h.nextSibling),Nt=i,Le=!0,Qt=null,s!==null&&(jt[Pt++]=gn,jt[Pt++]=yn,jt[Pt++]=hr,gn=s.id,yn=s.overflow,hr=i),i=Bc(i,f.children),i.flags|=4096,i)}function Gh(s,i,a){s.lanes|=i;var f=s.alternate;f!==null&&(f.lanes|=i),yc(s.return,i,a)}function zc(s,i,a,f,h){var m=s.memoizedState;m===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:h}:(m.isBackwards=i,m.rendering=null,m.renderingStartTime=0,m.last=f,m.tail=a,m.tailMode=h)}function Qh(s,i,a){var f=i.pendingProps,h=f.revealOrder,m=f.tail;if(ut(s,i,f.children,a),f=Pe.current,(f&2)!==0)f=f&1|2,i.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Gh(s,a,i);else if(s.tag===19)Gh(s,a,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}f&=1}if(Ce(Pe,f),(i.mode&1)===0)i.memoizedState=null;else switch(h){case"forwards":for(a=i.child,h=null;a!==null;)s=a.alternate,s!==null&&Ho(s)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),zc(i,!1,h,a,m);break;case"backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(s=h.alternate,s!==null&&Ho(s)===null){i.child=h;break}s=h.sibling,h.sibling=a,a=h,h=s}zc(i,!0,a,null,m);break;case"together":zc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Xo(s,i){(i.mode&1)===0&&s!==null&&(s.alternate=null,i.alternate=null,i.flags|=2)}function Sn(s,i,a){if(s!==null&&(i.dependencies=s.dependencies),vr|=i.lanes,(a&i.childLanes)===0)return null;if(s!==null&&i.child!==s.child)throw Error(n(153));if(i.child!==null){for(s=i.child,a=Qn(s,s.pendingProps),i.child=a,a.return=i;s.sibling!==null;)s=s.sibling,a=a.sibling=Qn(s,s.pendingProps),a.return=i;a.sibling=null}return i.child}function Vw(s,i,a){switch(i.tag){case 3:Vh(i),es();break;case 5:ch(i);break;case 1:yt(i.type)&&jo(i);break;case 4:Sc(i,i.stateNode.containerInfo);break;case 10:var f=i.type._context,h=i.memoizedProps.value;Ce(Fo,f._currentValue),f._currentValue=h;break;case 13:if(f=i.memoizedState,f!==null)return f.dehydrated!==null?(Ce(Pe,Pe.current&1),i.flags|=128,null):(a&i.child.childLanes)!==0?Kh(s,i,a):(Ce(Pe,Pe.current&1),s=Sn(s,i,a),s!==null?s.sibling:null);Ce(Pe,Pe.current&1);break;case 19:if(f=(a&i.childLanes)!==0,(s.flags&128)!==0){if(f)return Qh(s,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ce(Pe,Pe.current),f)break;return null;case 22:case 23:return i.lanes=0,Uh(s,i,a)}return Sn(s,i,a)}var Jh,Uc,Xh,Yh;Jh=function(s,i){for(var a=i.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Uc=function(){},Xh=function(s,i,a,f){var h=s.memoizedProps;if(h!==f){s=i.stateNode,gr(ln.current);var m=null;switch(a){case"input":h=ir(s,h),f=ir(s,f),m=[];break;case"select":h=J({},h,{value:void 0}),f=J({},f,{value:void 0}),m=[];break;case"textarea":h=Dr(s,h),f=Dr(s,f),m=[];break;default:typeof h.onClick!="function"&&typeof f.onClick=="function"&&(s.onclick=Io)}_a(a,f);var _;a=null;for(O in h)if(!f.hasOwnProperty(O)&&h.hasOwnProperty(O)&&h[O]!=null)if(O==="style"){var b=h[O];for(_ in b)b.hasOwnProperty(_)&&(a||(a={}),a[_]="")}else O!=="dangerouslySetInnerHTML"&&O!=="children"&&O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(o.hasOwnProperty(O)?m||(m=[]):(m=m||[]).push(O,null));for(O in f){var T=f[O];if(b=h!=null?h[O]:void 0,f.hasOwnProperty(O)&&T!==b&&(T!=null||b!=null))if(O==="style")if(b){for(_ in b)!b.hasOwnProperty(_)||T&&T.hasOwnProperty(_)||(a||(a={}),a[_]="");for(_ in T)T.hasOwnProperty(_)&&b[_]!==T[_]&&(a||(a={}),a[_]=T[_])}else a||(m||(m=[]),m.push(O,a)),a=T;else O==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,b=b?b.__html:void 0,T!=null&&b!==T&&(m=m||[]).push(O,T)):O==="children"?typeof T!="string"&&typeof T!="number"||(m=m||[]).push(O,""+T):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&(o.hasOwnProperty(O)?(T!=null&&O==="onScroll"&&Ae("scroll",s),m||b===T||(m=[])):(m=m||[]).push(O,T))}a&&(m=m||[]).push("style",a);var O=m;(i.updateQueue=O)&&(i.flags|=4)}},Yh=function(s,i,a,f){a!==f&&(i.flags|=4)};function wi(s,i){if(!Le)switch(s.tailMode){case"hidden":i=s.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?s.tail=null:a.sibling=null;break;case"collapsed":a=s.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function ot(s){var i=s.alternate!==null&&s.alternate.child===s.child,a=0,f=0;if(i)for(var h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags&14680064,f|=h.flags&14680064,h.return=s,h=h.sibling;else for(h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags,f|=h.flags,h.return=s,h=h.sibling;return s.subtreeFlags|=f,s.childLanes=a,i}function Ww(s,i,a){var f=i.pendingProps;switch(uc(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(i),null;case 1:return yt(i.type)&&Mo(),ot(i),null;case 3:return f=i.stateNode,ss(),Ie(gt),Ie(st),Ec(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&($o(i)?i.flags|=4:s===null||s.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Qt!==null&&(Zc(Qt),Qt=null))),Uc(s,i),ot(i),null;case 5:xc(i);var h=gr(pi.current);if(a=i.type,s!==null&&i.stateNode!=null)Xh(s,i,a,f,h),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!f){if(i.stateNode===null)throw Error(n(166));return ot(i),null}if(s=gr(ln.current),$o(i)){f=i.stateNode,a=i.type;var m=i.memoizedProps;switch(f[on]=i,f[ci]=m,s=(i.mode&1)!==0,a){case"dialog":Ae("cancel",f),Ae("close",f);break;case"iframe":case"object":case"embed":Ae("load",f);break;case"video":case"audio":for(h=0;h<oi.length;h++)Ae(oi[h],f);break;case"source":Ae("error",f);break;case"img":case"image":case"link":Ae("error",f),Ae("load",f);break;case"details":Ae("toggle",f);break;case"input":Bs(f,m),Ae("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!m.multiple},Ae("invalid",f);break;case"textarea":Fr(f,m),Ae("invalid",f)}_a(a,m),h=null;for(var _ in m)if(m.hasOwnProperty(_)){var b=m[_];_==="children"?typeof b=="string"?f.textContent!==b&&(m.suppressHydrationWarning!==!0&&Ao(f.textContent,b,s),h=["children",b]):typeof b=="number"&&f.textContent!==""+b&&(m.suppressHydrationWarning!==!0&&Ao(f.textContent,b,s),h=["children",""+b]):o.hasOwnProperty(_)&&b!=null&&_==="onScroll"&&Ae("scroll",f)}switch(a){case"input":sr(f),ro(f,m,!0);break;case"textarea":sr(f),io(f);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(f.onclick=Io)}f=h,i.updateQueue=f,f!==null&&(i.flags|=4)}else{_=h.nodeType===9?h:h.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=oo(a)),s==="http://www.w3.org/1999/xhtml"?a==="script"?(s=_.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof f.is=="string"?s=_.createElement(a,{is:f.is}):(s=_.createElement(a),a==="select"&&(_=s,f.multiple?_.multiple=!0:f.size&&(_.size=f.size))):s=_.createElementNS(s,a),s[on]=i,s[ci]=f,Jh(s,i,!1,!1),i.stateNode=s;e:{switch(_=Ea(a,f),a){case"dialog":Ae("cancel",s),Ae("close",s),h=f;break;case"iframe":case"object":case"embed":Ae("load",s),h=f;break;case"video":case"audio":for(h=0;h<oi.length;h++)Ae(oi[h],s);h=f;break;case"source":Ae("error",s),h=f;break;case"img":case"image":case"link":Ae("error",s),Ae("load",s),h=f;break;case"details":Ae("toggle",s),h=f;break;case"input":Bs(s,f),h=ir(s,f),Ae("invalid",s);break;case"option":h=f;break;case"select":s._wrapperState={wasMultiple:!!f.multiple},h=J({},f,{value:void 0}),Ae("invalid",s);break;case"textarea":Fr(s,f),h=Dr(s,f),Ae("invalid",s);break;default:h=f}_a(a,h),b=h;for(m in b)if(b.hasOwnProperty(m)){var T=b[m];m==="style"?Vt(s,T):m==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&lr(s,T)):m==="children"?typeof T=="string"?(a!=="textarea"||T!=="")&&ar(s,T):typeof T=="number"&&ar(s,""+T):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(o.hasOwnProperty(m)?T!=null&&m==="onScroll"&&Ae("scroll",s):T!=null&&U(s,m,T,_))}switch(a){case"input":sr(s),ro(s,f,!1);break;case"textarea":sr(s),io(s);break;case"option":f.value!=null&&s.setAttribute("value",""+_e(f.value));break;case"select":s.multiple=!!f.multiple,m=f.value,m!=null?In(s,!!f.multiple,m,!1):f.defaultValue!=null&&In(s,!!f.multiple,f.defaultValue,!0);break;default:typeof h.onClick=="function"&&(s.onclick=Io)}switch(a){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return ot(i),null;case 6:if(s&&i.stateNode!=null)Yh(s,i,s.memoizedProps,f);else{if(typeof f!="string"&&i.stateNode===null)throw Error(n(166));if(a=gr(pi.current),gr(ln.current),$o(i)){if(f=i.stateNode,a=i.memoizedProps,f[on]=i,(m=f.nodeValue!==a)&&(s=Nt,s!==null))switch(s.tag){case 3:Ao(f.nodeValue,a,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Ao(f.nodeValue,a,(s.mode&1)!==0)}m&&(i.flags|=4)}else f=(a.nodeType===9?a:a.ownerDocument).createTextNode(f),f[on]=i,i.stateNode=f}return ot(i),null;case 13:if(Ie(Pe),f=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Le&&At!==null&&(i.mode&1)!==0&&(i.flags&128)===0)th(),es(),i.flags|=98560,m=!1;else if(m=$o(i),f!==null&&f.dehydrated!==null){if(s===null){if(!m)throw Error(n(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(n(317));m[on]=i}else es(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),m=!1}else Qt!==null&&(Zc(Qt),Qt=null),m=!0;if(!m)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=a,i):(f=f!==null,f!==(s!==null&&s.memoizedState!==null)&&f&&(i.child.flags|=8192,(i.mode&1)!==0&&(s===null||(Pe.current&1)!==0?Ke===0&&(Ke=3):nu())),i.updateQueue!==null&&(i.flags|=4),ot(i),null);case 4:return ss(),Uc(s,i),s===null&&li(i.stateNode.containerInfo),ot(i),null;case 10:return gc(i.type._context),ot(i),null;case 17:return yt(i.type)&&Mo(),ot(i),null;case 19:if(Ie(Pe),m=i.memoizedState,m===null)return ot(i),null;if(f=(i.flags&128)!==0,_=m.rendering,_===null)if(f)wi(m,!1);else{if(Ke!==0||s!==null&&(s.flags&128)!==0)for(s=i.child;s!==null;){if(_=Ho(s),_!==null){for(i.flags|=128,wi(m,!1),f=_.updateQueue,f!==null&&(i.updateQueue=f,i.flags|=4),i.subtreeFlags=0,f=a,a=i.child;a!==null;)m=a,s=f,m.flags&=14680066,_=m.alternate,_===null?(m.childLanes=0,m.lanes=s,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=_.childLanes,m.lanes=_.lanes,m.child=_.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=_.memoizedProps,m.memoizedState=_.memoizedState,m.updateQueue=_.updateQueue,m.type=_.type,s=_.dependencies,m.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a=a.sibling;return Ce(Pe,Pe.current&1|2),i.child}s=s.sibling}m.tail!==null&&Fe()>as&&(i.flags|=128,f=!0,wi(m,!1),i.lanes=4194304)}else{if(!f)if(s=Ho(_),s!==null){if(i.flags|=128,f=!0,a=s.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),wi(m,!0),m.tail===null&&m.tailMode==="hidden"&&!_.alternate&&!Le)return ot(i),null}else 2*Fe()-m.renderingStartTime>as&&a!==1073741824&&(i.flags|=128,f=!0,wi(m,!1),i.lanes=4194304);m.isBackwards?(_.sibling=i.child,i.child=_):(a=m.last,a!==null?a.sibling=_:i.child=_,m.last=_)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Fe(),i.sibling=null,a=Pe.current,Ce(Pe,f?a&1|2:a&1),i):(ot(i),null);case 22:case 23:return tu(),f=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==f&&(i.flags|=8192),f&&(i.mode&1)!==0?(It&1073741824)!==0&&(ot(i),i.subtreeFlags&6&&(i.flags|=8192)):ot(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function Kw(s,i){switch(uc(i),i.tag){case 1:return yt(i.type)&&Mo(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return ss(),Ie(gt),Ie(st),Ec(),s=i.flags,(s&65536)!==0&&(s&128)===0?(i.flags=s&-65537|128,i):null;case 5:return xc(i),null;case 13:if(Ie(Pe),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(n(340));es()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return Ie(Pe),null;case 4:return ss(),null;case 10:return gc(i.type._context),null;case 22:case 23:return tu(),null;case 24:return null;default:return null}}var Yo=!1,lt=!1,Gw=typeof WeakSet=="function"?WeakSet:Set,Y=null;function os(s,i){var a=s.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(f){De(s,i,f)}else a.current=null}function Hc(s,i,a){try{a()}catch(f){De(s,i,f)}}var Zh=!1;function Qw(s,i){if(tc=vo,s=Ld(),Ka(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var h=f.anchorOffset,m=f.focusNode;f=f.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var _=0,b=-1,T=-1,O=0,W=0,K=s,V=null;t:for(;;){for(var X;K!==a||h!==0&&K.nodeType!==3||(b=_+h),K!==m||f!==0&&K.nodeType!==3||(T=_+f),K.nodeType===3&&(_+=K.nodeValue.length),(X=K.firstChild)!==null;)V=K,K=X;for(;;){if(K===s)break t;if(V===a&&++O===h&&(b=_),V===m&&++W===f&&(T=_),(X=K.nextSibling)!==null)break;K=V,V=K.parentNode}K=X}a=b===-1||T===-1?null:{start:b,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(nc={focusedElem:s,selectionRange:a},vo=!1,Y=i;Y!==null;)if(i=Y,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,Y=s;else for(;Y!==null;){i=Y;try{var Z=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(Z!==null){var ee=Z.memoizedProps,Be=Z.memoizedState,L=i.stateNode,N=L.getSnapshotBeforeUpdate(i.elementType===i.type?ee:Jt(i.type,ee),Be);L.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var P=i.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(G){De(i,i.return,G)}if(s=i.sibling,s!==null){s.return=i.return,Y=s;break}Y=i.return}return Z=Zh,Zh=!1,Z}function Si(s,i,a){var f=i.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var h=f=f.next;do{if((h.tag&s)===s){var m=h.destroy;h.destroy=void 0,m!==void 0&&Hc(i,a,m)}h=h.next}while(h!==f)}}function Zo(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&s)===s){var f=a.create;a.destroy=f()}a=a.next}while(a!==i)}}function qc(s){var i=s.ref;if(i!==null){var a=s.stateNode;switch(s.tag){case 5:s=a;break;default:s=a}typeof i=="function"?i(s):i.current=s}}function ep(s){var i=s.alternate;i!==null&&(s.alternate=null,ep(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[on],delete i[ci],delete i[oc],delete i[Lw],delete i[Mw])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function tp(s){return s.tag===5||s.tag===3||s.tag===4}function np(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||tp(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Vc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(s,i):a.insertBefore(s,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(s,a)):(i=a,i.appendChild(s)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Io));else if(f!==4&&(s=s.child,s!==null))for(Vc(s,i,a),s=s.sibling;s!==null;)Vc(s,i,a),s=s.sibling}function Wc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.insertBefore(s,i):a.appendChild(s);else if(f!==4&&(s=s.child,s!==null))for(Wc(s,i,a),s=s.sibling;s!==null;)Wc(s,i,a),s=s.sibling}var Ze=null,Xt=!1;function qn(s,i,a){for(a=a.child;a!==null;)rp(s,i,a),a=a.sibling}function rp(s,i,a){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(fo,a)}catch{}switch(a.tag){case 5:lt||os(a,i);case 6:var f=Ze,h=Xt;Ze=null,qn(s,i,a),Ze=f,Xt=h,Ze!==null&&(Xt?(s=Ze,a=a.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):Ze.removeChild(a.stateNode));break;case 18:Ze!==null&&(Xt?(s=Ze,a=a.stateNode,s.nodeType===8?ic(s.parentNode,a):s.nodeType===1&&ic(s,a),Ys(s)):ic(Ze,a.stateNode));break;case 4:f=Ze,h=Xt,Ze=a.stateNode.containerInfo,Xt=!0,qn(s,i,a),Ze=f,Xt=h;break;case 0:case 11:case 14:case 15:if(!lt&&(f=a.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){h=f=f.next;do{var m=h,_=m.destroy;m=m.tag,_!==void 0&&((m&2)!==0||(m&4)!==0)&&Hc(a,i,_),h=h.next}while(h!==f)}qn(s,i,a);break;case 1:if(!lt&&(os(a,i),f=a.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=a.memoizedProps,f.state=a.memoizedState,f.componentWillUnmount()}catch(b){De(a,i,b)}qn(s,i,a);break;case 21:qn(s,i,a);break;case 22:a.mode&1?(lt=(f=lt)||a.memoizedState!==null,qn(s,i,a),lt=f):qn(s,i,a);break;default:qn(s,i,a)}}function sp(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var a=s.stateNode;a===null&&(a=s.stateNode=new Gw),i.forEach(function(f){var h=s0.bind(null,s,f);a.has(f)||(a.add(f),f.then(h,h))})}}function Yt(s,i){var a=i.deletions;if(a!==null)for(var f=0;f<a.length;f++){var h=a[f];try{var m=s,_=i,b=_;e:for(;b!==null;){switch(b.tag){case 5:Ze=b.stateNode,Xt=!1;break e;case 3:Ze=b.stateNode.containerInfo,Xt=!0;break e;case 4:Ze=b.stateNode.containerInfo,Xt=!0;break e}b=b.return}if(Ze===null)throw Error(n(160));rp(m,_,h),Ze=null,Xt=!1;var T=h.alternate;T!==null&&(T.return=null),h.return=null}catch(O){De(h,i,O)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)ip(i,s),i=i.sibling}function ip(s,i){var a=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Yt(i,s),cn(s),f&4){try{Si(3,s,s.return),Zo(3,s)}catch(ee){De(s,s.return,ee)}try{Si(5,s,s.return)}catch(ee){De(s,s.return,ee)}}break;case 1:Yt(i,s),cn(s),f&512&&a!==null&&os(a,a.return);break;case 5:if(Yt(i,s),cn(s),f&512&&a!==null&&os(a,a.return),s.flags&32){var h=s.stateNode;try{ar(h,"")}catch(ee){De(s,s.return,ee)}}if(f&4&&(h=s.stateNode,h!=null)){var m=s.memoizedProps,_=a!==null?a.memoizedProps:m,b=s.type,T=s.updateQueue;if(s.updateQueue=null,T!==null)try{b==="input"&&m.type==="radio"&&m.name!=null&&zs(h,m),Ea(b,_);var O=Ea(b,m);for(_=0;_<T.length;_+=2){var W=T[_],K=T[_+1];W==="style"?Vt(h,K):W==="dangerouslySetInnerHTML"?lr(h,K):W==="children"?ar(h,K):U(h,W,K,O)}switch(b){case"input":rn(h,m);break;case"textarea":so(h,m);break;case"select":var V=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!m.multiple;var X=m.value;X!=null?In(h,!!m.multiple,X,!1):V!==!!m.multiple&&(m.defaultValue!=null?In(h,!!m.multiple,m.defaultValue,!0):In(h,!!m.multiple,m.multiple?[]:"",!1))}h[ci]=m}catch(ee){De(s,s.return,ee)}}break;case 6:if(Yt(i,s),cn(s),f&4){if(s.stateNode===null)throw Error(n(162));h=s.stateNode,m=s.memoizedProps;try{h.nodeValue=m}catch(ee){De(s,s.return,ee)}}break;case 3:if(Yt(i,s),cn(s),f&4&&a!==null&&a.memoizedState.isDehydrated)try{Ys(i.containerInfo)}catch(ee){De(s,s.return,ee)}break;case 4:Yt(i,s),cn(s);break;case 13:Yt(i,s),cn(s),h=s.child,h.flags&8192&&(m=h.memoizedState!==null,h.stateNode.isHidden=m,!m||h.alternate!==null&&h.alternate.memoizedState!==null||(Qc=Fe())),f&4&&sp(s);break;case 22:if(W=a!==null&&a.memoizedState!==null,s.mode&1?(lt=(O=lt)||W,Yt(i,s),lt=O):Yt(i,s),cn(s),f&8192){if(O=s.memoizedState!==null,(s.stateNode.isHidden=O)&&!W&&(s.mode&1)!==0)for(Y=s,W=s.child;W!==null;){for(K=Y=W;Y!==null;){switch(V=Y,X=V.child,V.tag){case 0:case 11:case 14:case 15:Si(4,V,V.return);break;case 1:os(V,V.return);var Z=V.stateNode;if(typeof Z.componentWillUnmount=="function"){f=V,a=V.return;try{i=f,Z.props=i.memoizedProps,Z.state=i.memoizedState,Z.componentWillUnmount()}catch(ee){De(f,a,ee)}}break;case 5:os(V,V.return);break;case 22:if(V.memoizedState!==null){ap(K);continue}}X!==null?(X.return=V,Y=X):ap(K)}W=W.sibling}e:for(W=null,K=s;;){if(K.tag===5){if(W===null){W=K;try{h=K.stateNode,O?(m=h.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(b=K.stateNode,T=K.memoizedProps.style,_=T!=null&&T.hasOwnProperty("display")?T.display:null,b.style.display=ie("display",_))}catch(ee){De(s,s.return,ee)}}}else if(K.tag===6){if(W===null)try{K.stateNode.nodeValue=O?"":K.memoizedProps}catch(ee){De(s,s.return,ee)}}else if((K.tag!==22&&K.tag!==23||K.memoizedState===null||K===s)&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===s)break e;for(;K.sibling===null;){if(K.return===null||K.return===s)break e;W===K&&(W=null),K=K.return}W===K&&(W=null),K.sibling.return=K.return,K=K.sibling}}break;case 19:Yt(i,s),cn(s),f&4&&sp(s);break;case 21:break;default:Yt(i,s),cn(s)}}function cn(s){var i=s.flags;if(i&2){try{e:{for(var a=s.return;a!==null;){if(tp(a)){var f=a;break e}a=a.return}throw Error(n(160))}switch(f.tag){case 5:var h=f.stateNode;f.flags&32&&(ar(h,""),f.flags&=-33);var m=np(s);Wc(s,m,h);break;case 3:case 4:var _=f.stateNode.containerInfo,b=np(s);Vc(s,b,_);break;default:throw Error(n(161))}}catch(T){De(s,s.return,T)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function Jw(s,i,a){Y=s,op(s)}function op(s,i,a){for(var f=(s.mode&1)!==0;Y!==null;){var h=Y,m=h.child;if(h.tag===22&&f){var _=h.memoizedState!==null||Yo;if(!_){var b=h.alternate,T=b!==null&&b.memoizedState!==null||lt;b=Yo;var O=lt;if(Yo=_,(lt=T)&&!O)for(Y=h;Y!==null;)_=Y,T=_.child,_.tag===22&&_.memoizedState!==null?cp(h):T!==null?(T.return=_,Y=T):cp(h);for(;m!==null;)Y=m,op(m),m=m.sibling;Y=h,Yo=b,lt=O}lp(s)}else(h.subtreeFlags&8772)!==0&&m!==null?(m.return=h,Y=m):lp(s)}}function lp(s){for(;Y!==null;){var i=Y;if((i.flags&8772)!==0){var a=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:lt||Zo(5,i);break;case 1:var f=i.stateNode;if(i.flags&4&&!lt)if(a===null)f.componentDidMount();else{var h=i.elementType===i.type?a.memoizedProps:Jt(i.type,a.memoizedProps);f.componentDidUpdate(h,a.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var m=i.updateQueue;m!==null&&ah(i,m,f);break;case 3:var _=i.updateQueue;if(_!==null){if(a=null,i.child!==null)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}ah(i,_,a)}break;case 5:var b=i.stateNode;if(a===null&&i.flags&4){a=b;var T=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&a.focus();break;case"img":T.src&&(a.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var O=i.alternate;if(O!==null){var W=O.memoizedState;if(W!==null){var K=W.dehydrated;K!==null&&Ys(K)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}lt||i.flags&512&&qc(i)}catch(V){De(i,i.return,V)}}if(i===s){Y=null;break}if(a=i.sibling,a!==null){a.return=i.return,Y=a;break}Y=i.return}}function ap(s){for(;Y!==null;){var i=Y;if(i===s){Y=null;break}var a=i.sibling;if(a!==null){a.return=i.return,Y=a;break}Y=i.return}}function cp(s){for(;Y!==null;){var i=Y;try{switch(i.tag){case 0:case 11:case 15:var a=i.return;try{Zo(4,i)}catch(T){De(i,a,T)}break;case 1:var f=i.stateNode;if(typeof f.componentDidMount=="function"){var h=i.return;try{f.componentDidMount()}catch(T){De(i,h,T)}}var m=i.return;try{qc(i)}catch(T){De(i,m,T)}break;case 5:var _=i.return;try{qc(i)}catch(T){De(i,_,T)}}}catch(T){De(i,i.return,T)}if(i===s){Y=null;break}var b=i.sibling;if(b!==null){b.return=i.return,Y=b;break}Y=i.return}}var Xw=Math.ceil,el=R.ReactCurrentDispatcher,Kc=R.ReactCurrentOwner,$t=R.ReactCurrentBatchConfig,we=0,Je=null,He=null,et=0,It=0,ls=Fn(0),Ke=0,xi=null,vr=0,tl=0,Gc=0,_i=null,wt=null,Qc=0,as=1/0,xn=null,nl=!1,Jc=null,Vn=null,rl=!1,Wn=null,sl=0,Ei=0,Xc=null,il=-1,ol=0;function ft(){return(we&6)!==0?Fe():il!==-1?il:il=Fe()}function Kn(s){return(s.mode&1)===0?1:(we&2)!==0&&et!==0?et&-et:Pw.transition!==null?(ol===0&&(ol=nd()),ol):(s=Ee,s!==0||(s=window.event,s=s===void 0?16:fd(s.type)),s)}function Zt(s,i,a,f){if(50<Ei)throw Ei=0,Xc=null,Error(n(185));Ks(s,a,f),((we&2)===0||s!==Je)&&(s===Je&&((we&2)===0&&(tl|=a),Ke===4&&Gn(s,et)),St(s,f),a===1&&we===0&&(i.mode&1)===0&&(as=Fe()+500,Po&&zn()))}function St(s,i){var a=s.callbackNode;Pv(s,i);var f=mo(s,s===Je?et:0);if(f===0)a!==null&&Zf(a),s.callbackNode=null,s.callbackPriority=0;else if(i=f&-f,s.callbackPriority!==i){if(a!=null&&Zf(a),i===1)s.tag===0?jw(fp.bind(null,s)):Jd(fp.bind(null,s)),Aw(function(){(we&6)===0&&zn()}),a=null;else{switch(rd(f)){case 1:a=Ia;break;case 4:a=ed;break;case 16:a=uo;break;case 536870912:a=td;break;default:a=uo}a=wp(a,up.bind(null,s))}s.callbackPriority=i,s.callbackNode=a}}function up(s,i){if(il=-1,ol=0,(we&6)!==0)throw Error(n(327));var a=s.callbackNode;if(cs()&&s.callbackNode!==a)return null;var f=mo(s,s===Je?et:0);if(f===0)return null;if((f&30)!==0||(f&s.expiredLanes)!==0||i)i=ll(s,f);else{i=f;var h=we;we|=2;var m=hp();(Je!==s||et!==i)&&(xn=null,as=Fe()+500,Sr(s,i));do try{e0();break}catch(b){dp(s,b)}while(!0);mc(),el.current=m,we=h,He!==null?i=0:(Je=null,et=0,i=Ke)}if(i!==0){if(i===2&&(h=La(s),h!==0&&(f=h,i=Yc(s,h))),i===1)throw a=xi,Sr(s,0),Gn(s,f),St(s,Fe()),a;if(i===6)Gn(s,f);else{if(h=s.current.alternate,(f&30)===0&&!Yw(h)&&(i=ll(s,f),i===2&&(m=La(s),m!==0&&(f=m,i=Yc(s,m))),i===1))throw a=xi,Sr(s,0),Gn(s,f),St(s,Fe()),a;switch(s.finishedWork=h,s.finishedLanes=f,i){case 0:case 1:throw Error(n(345));case 2:xr(s,wt,xn);break;case 3:if(Gn(s,f),(f&130023424)===f&&(i=Qc+500-Fe(),10<i)){if(mo(s,0)!==0)break;if(h=s.suspendedLanes,(h&f)!==f){ft(),s.pingedLanes|=s.suspendedLanes&h;break}s.timeoutHandle=sc(xr.bind(null,s,wt,xn),i);break}xr(s,wt,xn);break;case 4:if(Gn(s,f),(f&4194240)===f)break;for(i=s.eventTimes,h=-1;0<f;){var _=31-Kt(f);m=1<<_,_=i[_],_>h&&(h=_),f&=~m}if(f=h,f=Fe()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Xw(f/1960))-f,10<f){s.timeoutHandle=sc(xr.bind(null,s,wt,xn),f);break}xr(s,wt,xn);break;case 5:xr(s,wt,xn);break;default:throw Error(n(329))}}}return St(s,Fe()),s.callbackNode===a?up.bind(null,s):null}function Yc(s,i){var a=_i;return s.current.memoizedState.isDehydrated&&(Sr(s,i).flags|=256),s=ll(s,i),s!==2&&(i=wt,wt=a,i!==null&&Zc(i)),s}function Zc(s){wt===null?wt=s:wt.push.apply(wt,s)}function Yw(s){for(var i=s;;){if(i.flags&16384){var a=i.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var f=0;f<a.length;f++){var h=a[f],m=h.getSnapshot;h=h.value;try{if(!Gt(m(),h))return!1}catch{return!1}}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Gn(s,i){for(i&=~Gc,i&=~tl,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var a=31-Kt(i),f=1<<a;s[a]=-1,i&=~f}}function fp(s){if((we&6)!==0)throw Error(n(327));cs();var i=mo(s,0);if((i&1)===0)return St(s,Fe()),null;var a=ll(s,i);if(s.tag!==0&&a===2){var f=La(s);f!==0&&(i=f,a=Yc(s,f))}if(a===1)throw a=xi,Sr(s,0),Gn(s,i),St(s,Fe()),a;if(a===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,xr(s,wt,xn),St(s,Fe()),null}function eu(s,i){var a=we;we|=1;try{return s(i)}finally{we=a,we===0&&(as=Fe()+500,Po&&zn())}}function wr(s){Wn!==null&&Wn.tag===0&&(we&6)===0&&cs();var i=we;we|=1;var a=$t.transition,f=Ee;try{if($t.transition=null,Ee=1,s)return s()}finally{Ee=f,$t.transition=a,we=i,(we&6)===0&&zn()}}function tu(){It=ls.current,Ie(ls)}function Sr(s,i){s.finishedWork=null,s.finishedLanes=0;var a=s.timeoutHandle;if(a!==-1&&(s.timeoutHandle=-1,Nw(a)),He!==null)for(a=He.return;a!==null;){var f=a;switch(uc(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Mo();break;case 3:ss(),Ie(gt),Ie(st),Ec();break;case 5:xc(f);break;case 4:ss();break;case 13:Ie(Pe);break;case 19:Ie(Pe);break;case 10:gc(f.type._context);break;case 22:case 23:tu()}a=a.return}if(Je=s,He=s=Qn(s.current,null),et=It=i,Ke=0,xi=null,Gc=tl=vr=0,wt=_i=null,mr!==null){for(i=0;i<mr.length;i++)if(a=mr[i],f=a.interleaved,f!==null){a.interleaved=null;var h=f.next,m=a.pending;if(m!==null){var _=m.next;m.next=h,f.next=_}a.pending=f}mr=null}return s}function dp(s,i){do{var a=He;try{if(mc(),qo.current=Go,Vo){for(var f=Oe.memoizedState;f!==null;){var h=f.queue;h!==null&&(h.pending=null),f=f.next}Vo=!1}if(yr=0,Qe=We=Oe=null,mi=!1,gi=0,Kc.current=null,a===null||a.return===null){Ke=1,xi=i,He=null;break}e:{var m=s,_=a.return,b=a,T=i;if(i=et,b.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var O=T,W=b,K=W.tag;if((W.mode&1)===0&&(K===0||K===11||K===15)){var V=W.alternate;V?(W.updateQueue=V.updateQueue,W.memoizedState=V.memoizedState,W.lanes=V.lanes):(W.updateQueue=null,W.memoizedState=null)}var X=$h(_);if(X!==null){X.flags&=-257,Dh(X,_,b,m,i),X.mode&1&&Rh(m,O,i),i=X,T=O;var Z=i.updateQueue;if(Z===null){var ee=new Set;ee.add(T),i.updateQueue=ee}else Z.add(T);break e}else{if((i&1)===0){Rh(m,O,i),nu();break e}T=Error(n(426))}}else if(Le&&b.mode&1){var Be=$h(_);if(Be!==null){(Be.flags&65536)===0&&(Be.flags|=256),Dh(Be,_,b,m,i),hc(is(T,b));break e}}m=T=is(T,b),Ke!==4&&(Ke=2),_i===null?_i=[m]:_i.push(m),m=_;do{switch(m.tag){case 3:m.flags|=65536,i&=-i,m.lanes|=i;var L=Ph(m,T,i);lh(m,L);break e;case 1:b=T;var N=m.type,P=m.stateNode;if((m.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Vn===null||!Vn.has(P)))){m.flags|=65536,i&=-i,m.lanes|=i;var G=Oh(m,b,i);lh(m,G);break e}}m=m.return}while(m!==null)}mp(a)}catch(te){i=te,He===a&&a!==null&&(He=a=a.return);continue}break}while(!0)}function hp(){var s=el.current;return el.current=Go,s===null?Go:s}function nu(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),Je===null||(vr&268435455)===0&&(tl&268435455)===0||Gn(Je,et)}function ll(s,i){var a=we;we|=2;var f=hp();(Je!==s||et!==i)&&(xn=null,Sr(s,i));do try{Zw();break}catch(h){dp(s,h)}while(!0);if(mc(),we=a,el.current=f,He!==null)throw Error(n(261));return Je=null,et=0,Ke}function Zw(){for(;He!==null;)pp(He)}function e0(){for(;He!==null&&!bv();)pp(He)}function pp(s){var i=vp(s.alternate,s,It);s.memoizedProps=s.pendingProps,i===null?mp(s):He=i,Kc.current=null}function mp(s){var i=s;do{var a=i.alternate;if(s=i.return,(i.flags&32768)===0){if(a=Ww(a,i,It),a!==null){He=a;return}}else{if(a=Kw(a,i),a!==null){a.flags&=32767,He=a;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Ke=6,He=null;return}}if(i=i.sibling,i!==null){He=i;return}He=i=s}while(i!==null);Ke===0&&(Ke=5)}function xr(s,i,a){var f=Ee,h=$t.transition;try{$t.transition=null,Ee=1,t0(s,i,a,f)}finally{$t.transition=h,Ee=f}return null}function t0(s,i,a,f){do cs();while(Wn!==null);if((we&6)!==0)throw Error(n(327));a=s.finishedWork;var h=s.finishedLanes;if(a===null)return null;if(s.finishedWork=null,s.finishedLanes=0,a===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var m=a.lanes|a.childLanes;if(Ov(s,m),s===Je&&(He=Je=null,et=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||rl||(rl=!0,wp(uo,function(){return cs(),null})),m=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||m){m=$t.transition,$t.transition=null;var _=Ee;Ee=1;var b=we;we|=4,Kc.current=null,Qw(s,a),ip(a,s),xw(nc),vo=!!tc,nc=tc=null,s.current=a,Jw(a),Tv(),we=b,Ee=_,$t.transition=m}else s.current=a;if(rl&&(rl=!1,Wn=s,sl=h),m=s.pendingLanes,m===0&&(Vn=null),Av(a.stateNode),St(s,Fe()),i!==null)for(f=s.onRecoverableError,a=0;a<i.length;a++)h=i[a],f(h.value,{componentStack:h.stack,digest:h.digest});if(nl)throw nl=!1,s=Jc,Jc=null,s;return(sl&1)!==0&&s.tag!==0&&cs(),m=s.pendingLanes,(m&1)!==0?s===Xc?Ei++:(Ei=0,Xc=s):Ei=0,zn(),null}function cs(){if(Wn!==null){var s=rd(sl),i=$t.transition,a=Ee;try{if($t.transition=null,Ee=16>s?16:s,Wn===null)var f=!1;else{if(s=Wn,Wn=null,sl=0,(we&6)!==0)throw Error(n(331));var h=we;for(we|=4,Y=s.current;Y!==null;){var m=Y,_=m.child;if((Y.flags&16)!==0){var b=m.deletions;if(b!==null){for(var T=0;T<b.length;T++){var O=b[T];for(Y=O;Y!==null;){var W=Y;switch(W.tag){case 0:case 11:case 15:Si(8,W,m)}var K=W.child;if(K!==null)K.return=W,Y=K;else for(;Y!==null;){W=Y;var V=W.sibling,X=W.return;if(ep(W),W===O){Y=null;break}if(V!==null){V.return=X,Y=V;break}Y=X}}}var Z=m.alternate;if(Z!==null){var ee=Z.child;if(ee!==null){Z.child=null;do{var Be=ee.sibling;ee.sibling=null,ee=Be}while(ee!==null)}}Y=m}}if((m.subtreeFlags&2064)!==0&&_!==null)_.return=m,Y=_;else e:for(;Y!==null;){if(m=Y,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:Si(9,m,m.return)}var L=m.sibling;if(L!==null){L.return=m.return,Y=L;break e}Y=m.return}}var N=s.current;for(Y=N;Y!==null;){_=Y;var P=_.child;if((_.subtreeFlags&2064)!==0&&P!==null)P.return=_,Y=P;else e:for(_=N;Y!==null;){if(b=Y,(b.flags&2048)!==0)try{switch(b.tag){case 0:case 11:case 15:Zo(9,b)}}catch(te){De(b,b.return,te)}if(b===_){Y=null;break e}var G=b.sibling;if(G!==null){G.return=b.return,Y=G;break e}Y=b.return}}if(we=h,zn(),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(fo,s)}catch{}f=!0}return f}finally{Ee=a,$t.transition=i}}return!1}function gp(s,i,a){i=is(a,i),i=Ph(s,i,1),s=Hn(s,i,1),i=ft(),s!==null&&(Ks(s,1,i),St(s,i))}function De(s,i,a){if(s.tag===3)gp(s,s,a);else for(;i!==null;){if(i.tag===3){gp(i,s,a);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Vn===null||!Vn.has(f))){s=is(a,s),s=Oh(i,s,1),i=Hn(i,s,1),s=ft(),i!==null&&(Ks(i,1,s),St(i,s));break}}i=i.return}}function n0(s,i,a){var f=s.pingCache;f!==null&&f.delete(i),i=ft(),s.pingedLanes|=s.suspendedLanes&a,Je===s&&(et&a)===a&&(Ke===4||Ke===3&&(et&130023424)===et&&500>Fe()-Qc?Sr(s,0):Gc|=a),St(s,i)}function yp(s,i){i===0&&((s.mode&1)===0?i=1:(i=po,po<<=1,(po&130023424)===0&&(po=4194304)));var a=ft();s=vn(s,i),s!==null&&(Ks(s,i,a),St(s,a))}function r0(s){var i=s.memoizedState,a=0;i!==null&&(a=i.retryLane),yp(s,a)}function s0(s,i){var a=0;switch(s.tag){case 13:var f=s.stateNode,h=s.memoizedState;h!==null&&(a=h.retryLane);break;case 19:f=s.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(i),yp(s,a)}var vp;vp=function(s,i,a){if(s!==null)if(s.memoizedProps!==i.pendingProps||gt.current)vt=!0;else{if((s.lanes&a)===0&&(i.flags&128)===0)return vt=!1,Vw(s,i,a);vt=(s.flags&131072)!==0}else vt=!1,Le&&(i.flags&1048576)!==0&&Xd(i,Ro,i.index);switch(i.lanes=0,i.tag){case 2:var f=i.type;Xo(s,i),s=i.pendingProps;var h=Xr(i,st.current);rs(i,a),h=Tc(null,i,f,s,h,a);var m=Cc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,yt(f)?(m=!0,jo(i)):m=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,wc(i),h.updater=Qo,i.stateNode=h,h._reactInternals=i,jc(i,f,s,a),i=$c(null,i,f,!0,m,a)):(i.tag=0,Le&&m&&cc(i),ut(null,i,h,a),i=i.child),i;case 16:f=i.elementType;e:{switch(Xo(s,i),s=i.pendingProps,h=f._init,f=h(f._payload),i.type=f,h=i.tag=o0(f),s=Jt(f,s),h){case 0:i=Rc(null,i,f,s,a);break e;case 1:i=qh(null,i,f,s,a);break e;case 11:i=Fh(null,i,f,s,a);break e;case 14:i=Bh(null,i,f,Jt(f.type,s),a);break e}throw Error(n(306,f,""))}return i;case 0:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Rc(s,i,f,h,a);case 1:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),qh(s,i,f,h,a);case 3:e:{if(Vh(i),s===null)throw Error(n(387));f=i.pendingProps,m=i.memoizedState,h=m.element,oh(s,i),Uo(i,f,null,a);var _=i.memoizedState;if(f=_.element,m.isDehydrated)if(m={element:f,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){h=is(Error(n(423)),i),i=Wh(s,i,f,a,h);break e}else if(f!==h){h=is(Error(n(424)),i),i=Wh(s,i,f,a,h);break e}else for(At=Dn(i.stateNode.containerInfo.firstChild),Nt=i,Le=!0,Qt=null,a=sh(i,null,f,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(es(),f===h){i=Sn(s,i,a);break e}ut(s,i,f,a)}i=i.child}return i;case 5:return ch(i),s===null&&dc(i),f=i.type,h=i.pendingProps,m=s!==null?s.memoizedProps:null,_=h.children,rc(f,h)?_=null:m!==null&&rc(f,m)&&(i.flags|=32),Hh(s,i),ut(s,i,_,a),i.child;case 6:return s===null&&dc(i),null;case 13:return Kh(s,i,a);case 4:return Sc(i,i.stateNode.containerInfo),f=i.pendingProps,s===null?i.child=ts(i,null,f,a):ut(s,i,f,a),i.child;case 11:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Fh(s,i,f,h,a);case 7:return ut(s,i,i.pendingProps,a),i.child;case 8:return ut(s,i,i.pendingProps.children,a),i.child;case 12:return ut(s,i,i.pendingProps.children,a),i.child;case 10:e:{if(f=i.type._context,h=i.pendingProps,m=i.memoizedProps,_=h.value,Ce(Fo,f._currentValue),f._currentValue=_,m!==null)if(Gt(m.value,_)){if(m.children===h.children&&!gt.current){i=Sn(s,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var b=m.dependencies;if(b!==null){_=m.child;for(var T=b.firstContext;T!==null;){if(T.context===f){if(m.tag===1){T=wn(-1,a&-a),T.tag=2;var O=m.updateQueue;if(O!==null){O=O.shared;var W=O.pending;W===null?T.next=T:(T.next=W.next,W.next=T),O.pending=T}}m.lanes|=a,T=m.alternate,T!==null&&(T.lanes|=a),yc(m.return,a,i),b.lanes|=a;break}T=T.next}}else if(m.tag===10)_=m.type===i.type?null:m.child;else if(m.tag===18){if(_=m.return,_===null)throw Error(n(341));_.lanes|=a,b=_.alternate,b!==null&&(b.lanes|=a),yc(_,a,i),_=m.sibling}else _=m.child;if(_!==null)_.return=m;else for(_=m;_!==null;){if(_===i){_=null;break}if(m=_.sibling,m!==null){m.return=_.return,_=m;break}_=_.return}m=_}ut(s,i,h.children,a),i=i.child}return i;case 9:return h=i.type,f=i.pendingProps.children,rs(i,a),h=Ot(h),f=f(h),i.flags|=1,ut(s,i,f,a),i.child;case 14:return f=i.type,h=Jt(f,i.pendingProps),h=Jt(f.type,h),Bh(s,i,f,h,a);case 15:return zh(s,i,i.type,i.pendingProps,a);case 17:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Jt(f,h),Xo(s,i),i.tag=1,yt(f)?(s=!0,jo(i)):s=!1,rs(i,a),Mh(i,f,h),jc(i,f,h,a),$c(null,i,f,!0,s,a);case 19:return Qh(s,i,a);case 22:return Uh(s,i,a)}throw Error(n(156,i.tag))};function wp(s,i){return Yf(s,i)}function i0(s,i,a,f){this.tag=s,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(s,i,a,f){return new i0(s,i,a,f)}function ru(s){return s=s.prototype,!(!s||!s.isReactComponent)}function o0(s){if(typeof s=="function")return ru(s)?1:0;if(s!=null){if(s=s.$$typeof,s===M)return 11;if(s===xe)return 14}return 2}function Qn(s,i){var a=s.alternate;return a===null?(a=Dt(s.tag,i,s.key,s.mode),a.elementType=s.elementType,a.type=s.type,a.stateNode=s.stateNode,a.alternate=s,s.alternate=a):(a.pendingProps=i,a.type=s.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=s.flags&14680064,a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,i=s.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=s.sibling,a.index=s.index,a.ref=s.ref,a}function al(s,i,a,f,h,m){var _=2;if(f=s,typeof s=="function")ru(s)&&(_=1);else if(typeof s=="string")_=5;else e:switch(s){case q:return _r(a.children,h,m,i);case F:_=8,h|=8;break;case j:return s=Dt(12,a,i,h|2),s.elementType=j,s.lanes=m,s;case H:return s=Dt(13,a,i,h),s.elementType=H,s.lanes=m,s;case fe:return s=Dt(19,a,i,h),s.elementType=fe,s.lanes=m,s;case ge:return cl(a,h,m,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case oe:_=10;break e;case ae:_=9;break e;case M:_=11;break e;case xe:_=14;break e;case pe:_=16,f=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return i=Dt(_,a,i,h),i.elementType=s,i.type=f,i.lanes=m,i}function _r(s,i,a,f){return s=Dt(7,s,f,i),s.lanes=a,s}function cl(s,i,a,f){return s=Dt(22,s,f,i),s.elementType=ge,s.lanes=a,s.stateNode={isHidden:!1},s}function su(s,i,a){return s=Dt(6,s,null,i),s.lanes=a,s}function iu(s,i,a){return i=Dt(4,s.children!==null?s.children:[],s.key,i),i.lanes=a,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function l0(s,i,a,f,h){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ma(0),this.expirationTimes=Ma(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.identifierPrefix=f,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function ou(s,i,a,f,h,m,_,b,T){return s=new l0(s,i,a,b,T),i===1?(i=1,m===!0&&(i|=8)):i=0,m=Dt(3,null,null,i),s.current=m,m.stateNode=s,m.memoizedState={element:f,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},wc(m),s}function a0(s,i,a){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:f==null?null:""+f,children:s,containerInfo:i,implementation:a}}function Sp(s){if(!s)return Bn;s=s._reactInternals;e:{if(ur(s)!==s||s.tag!==1)throw Error(n(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(yt(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(s.tag===1){var a=s.type;if(yt(a))return Gd(s,a,i)}return i}function xp(s,i,a,f,h,m,_,b,T){return s=ou(a,f,!0,s,h,m,_,b,T),s.context=Sp(null),a=s.current,f=ft(),h=Kn(a),m=wn(f,h),m.callback=i??null,Hn(a,m,h),s.current.lanes=h,Ks(s,h,f),St(s,f),s}function ul(s,i,a,f){var h=i.current,m=ft(),_=Kn(h);return a=Sp(a),i.context===null?i.context=a:i.pendingContext=a,i=wn(m,_),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Hn(h,i,_),s!==null&&(Zt(s,h,_,m),zo(s,h,_)),_}function fl(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function _p(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var a=s.retryLane;s.retryLane=a!==0&&a<i?a:i}}function lu(s,i){_p(s,i),(s=s.alternate)&&_p(s,i)}function c0(){return null}var Ep=typeof reportError=="function"?reportError:function(s){console.error(s)};function au(s){this._internalRoot=s}dl.prototype.render=au.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(n(409));ul(s,i,null,null)},dl.prototype.unmount=au.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;wr(function(){ul(null,s,null,null)}),i[pn]=null}};function dl(s){this._internalRoot=s}dl.prototype.unstable_scheduleHydration=function(s){if(s){var i=od();s={blockedOn:null,target:s,priority:i};for(var a=0;a<On.length&&i!==0&&i<On[a].priority;a++);On.splice(a,0,s),a===0&&cd(s)}};function cu(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function hl(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function kp(){}function u0(s,i,a,f,h){if(h){if(typeof f=="function"){var m=f;f=function(){var O=fl(_);m.call(O)}}var _=xp(i,f,s,0,null,!1,!1,"",kp);return s._reactRootContainer=_,s[pn]=_.current,li(s.nodeType===8?s.parentNode:s),wr(),_}for(;h=s.lastChild;)s.removeChild(h);if(typeof f=="function"){var b=f;f=function(){var O=fl(T);b.call(O)}}var T=ou(s,0,!1,null,null,!1,!1,"",kp);return s._reactRootContainer=T,s[pn]=T.current,li(s.nodeType===8?s.parentNode:s),wr(function(){ul(i,T,a,f)}),T}function pl(s,i,a,f,h){var m=a._reactRootContainer;if(m){var _=m;if(typeof h=="function"){var b=h;h=function(){var T=fl(_);b.call(T)}}ul(i,_,s,h)}else _=u0(a,i,s,h,f);return fl(_)}sd=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var a=Ws(i.pendingLanes);a!==0&&(ja(i,a|1),St(i,Fe()),(we&6)===0&&(as=Fe()+500,zn()))}break;case 13:wr(function(){var f=vn(s,1);if(f!==null){var h=ft();Zt(f,s,1,h)}}),lu(s,1)}},Pa=function(s){if(s.tag===13){var i=vn(s,134217728);if(i!==null){var a=ft();Zt(i,s,134217728,a)}lu(s,134217728)}},id=function(s){if(s.tag===13){var i=Kn(s),a=vn(s,i);if(a!==null){var f=ft();Zt(a,s,i,f)}lu(s,i)}},od=function(){return Ee},ld=function(s,i){var a=Ee;try{return Ee=s,i()}finally{Ee=a}},Ta=function(s,i,a){switch(i){case"input":if(rn(s,a),i=a.name,a.type==="radio"&&i!=null){for(a=s;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<a.length;i++){var f=a[i];if(f!==s&&f.form===s.form){var h=Lo(f);if(!h)throw Error(n(90));no(f),rn(f,h)}}}break;case"textarea":so(s,a);break;case"select":i=a.value,i!=null&&In(s,!!a.multiple,i,!1)}},Vf=eu,Wf=wr;var f0={usingClientEntryPoint:!1,Events:[ui,Qr,Lo,Hf,qf,eu]},ki={findFiberByHostInstance:fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d0={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Jf(s),s===null?null:s.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||c0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ml.isDisabled&&ml.supportsFiber)try{fo=ml.inject(d0),sn=ml}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f0,xt.createPortal=function(s,i){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!cu(i))throw Error(n(200));return a0(s,i,null,a)},xt.createRoot=function(s,i){if(!cu(s))throw Error(n(299));var a=!1,f="",h=Ep;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=ou(s,1,!1,null,null,a,!1,f,h),s[pn]=i.current,li(s.nodeType===8?s.parentNode:s),new au(i)},xt.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Jf(i),s=s===null?null:s.stateNode,s},xt.flushSync=function(s){return wr(s)},xt.hydrate=function(s,i,a){if(!hl(i))throw Error(n(200));return pl(null,s,i,!0,a)},xt.hydrateRoot=function(s,i,a){if(!cu(s))throw Error(n(405));var f=a!=null&&a.hydratedSources||null,h=!1,m="",_=Ep;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),i=xp(i,null,s,1,a??null,h,!1,m,_),s[pn]=i.current,li(s),f)for(s=0;s<f.length;s++)a=f[s],h=a._getVersion,h=h(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,h]:i.mutableSourceEagerHydrationData.push(a,h);return new dl(i)},xt.render=function(s,i,a){if(!hl(i))throw Error(n(200));return pl(null,s,i,!1,a)},xt.unmountComponentAtNode=function(s){if(!hl(s))throw Error(n(40));return s._reactRootContainer?(wr(function(){pl(null,null,s,!1,function(){s._reactRootContainer=null,s[pn]=null})}),!0):!1},xt.unstable_batchedUpdates=eu,xt.unstable_renderSubtreeIntoContainer=function(s,i,a,f){if(!hl(a))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return pl(s,i,a,!1,f)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var Pp;function N0(){if(Pp)return du.exports;Pp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),du.exports=C0(),du.exports}var Op;function A0(){if(Op)return gl;Op=1;var t=N0();return gl.createRoot=t.createRoot,gl.hydrateRoot=t.hydrateRoot,gl}var Mk=A0();const ji=Symbol("context"),Dm=Symbol("nextInContext"),Fm=Symbol("prevByEndTime"),Bm=Symbol("nextByStartTime"),Rp=Symbol("events");class jk{constructor(e){be(this,"startTime");be(this,"endTime");be(this,"browserName");be(this,"channel");be(this,"platform");be(this,"wallTime");be(this,"title");be(this,"options");be(this,"pages");be(this,"actions");be(this,"attachments");be(this,"visibleAttachments");be(this,"events");be(this,"stdio");be(this,"errors");be(this,"errorDescriptors");be(this,"hasSource");be(this,"hasStepData");be(this,"sdkLanguage");be(this,"testIdAttributeName");be(this,"sources");be(this,"resources");e.forEach(r=>I0(r));const n=e.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=L0(e),this.pages=[].concat(...e.map(r=>r.pages)),this.wallTime=e.map(r=>r.wallTime).reduce((r,o)=>Math.min(r||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=e.map(r=>r.startTime).reduce((r,o)=>Math.min(r,o),Number.MAX_VALUE),this.endTime=e.map(r=>r.endTime).reduce((r,o)=>Math.max(r,o),Number.MIN_VALUE),this.events=[].concat(...e.map(r=>r.events)),this.stdio=[].concat(...e.map(r=>r.stdio)),this.errors=[].concat(...e.map(r=>r.errors)),this.hasSource=e.some(r=>r.hasSource),this.hasStepData=e.some(r=>r.origin==="testRunner"),this.resources=[...e.map(r=>r.resources)].flat(),this.attachments=this.actions.flatMap(r=>{var o;return((o=r.attachments)==null?void 0:o.map(l=>({...l,traceUrl:r.context.traceUrl})))??[]}),this.visibleAttachments=this.attachments.filter(r=>!r.name.startsWith("_")),this.events.sort((r,o)=>r.time-o.time),this.resources.sort((r,o)=>r._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=B0(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){return e?this.actions:this.actions.filter(n=>n.visibility!=="hidden")}_errorDescriptorsFromActions(){var n;const e=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,n)=>({stack:e.stack,message:e.message}))}}function I0(t){for(const n of t.pages)n[ji]=t;for(let n=0;n<t.actions.length;++n){const r=t.actions[n];r[ji]=t}let e;for(let n=t.actions.length-1;n>=0;n--){const r=t.actions[n];r[Dm]=e,r.class!=="Route"&&(e=r)}for(const n of t.events)n[ji]=t;for(const n of t.resources)n[ji]=t}function L0(t){const e=new Map;for(const o of t){const l=o.traceUrl;let c=e.get(l);c||(c=[],e.set(l,c)),c.push(o)}const n=[];let r=0;for(const[,o]of e){e.size>1&&M0(o,++r);const l=j0(o);n.push(...l)}n.sort((o,l)=>l.parentId===o.callId?1:o.parentId===l.callId?-1:o.endTime-l.endTime);for(let o=1;o<n.length;++o)n[o][Fm]=n[o-1];n.sort((o,l)=>l.parentId===o.callId?-1:o.parentId===l.callId?1:o.startTime-l.startTime);for(let o=0;o+1<n.length;++o)n[o][Bm]=n[o+1];return n}function M0(t,e){for(const n of t)for(const r of n.actions)r.callId&&(r.callId=`${e}:${r.callId}`),r.parentId&&(r.parentId=`${e}:${r.parentId}`)}let $p=0;function j0(t){const e=new Map,n=t.filter(c=>c.origin==="library"),r=t.filter(c=>c.origin==="testRunner");if(!r.length||!n.length)return t.map(c=>c.actions.map(u=>({...u,context:c}))).flat();for(const c of n)for(const u of c.actions)e.set(u.stepId||`tmp-step@${++$p}`,{...u,context:c});const o=O0(r,e);o&&P0(n,o);const l=new Map;for(const c of r)for(const u of c.actions){const d=u.stepId&&e.get(u.stepId);if(d){l.set(u.callId,d.callId),u.error&&(d.error=u.error),u.attachments&&(d.attachments=u.attachments),u.annotations&&(d.annotations=u.annotations),u.parentId&&(d.parentId=l.get(u.parentId)??u.parentId),u.visibility==="hidden"&&(d.visibility="hidden"),d.startTime=u.startTime,d.endTime=u.endTime;continue}u.parentId&&(u.parentId=l.get(u.parentId)??u.parentId),e.set(u.stepId||`tmp-step@${++$p}`,{...u,context:c})}return[...e.values()]}function P0(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const r of n.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of n.events)r.time+=e;for(const r of n.stdio)r.timestamp+=e;for(const r of n.pages)for(const o of r.screencastFrames)o.timestamp+=e;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function O0(t,e){for(const n of t)for(const r of n.actions){if(!r.startTime)continue;const o=r.stepId?e.get(r.stepId):void 0;if(o)return r.startTime-o.startTime}return 0}function R0(t){const e=new Map;for(const r of t)e.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of e.values()){const o=r.action.parentId&&e.get(r.action.parentId)||n;o.children.push(r),r.parent=o}return{rootItem:n,itemMap:e}}function zl(t){return t[ji]}function $0(t){return t[Dm]}function Dp(t){return t[Fm]}function Fp(t){return t[Bm]}function D0(t){let e=0,n=0;for(const r of F0(t)){if(r.type==="console"){const o=r.messageType;o==="warning"?++n:o==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:n}}function F0(t){let e=t[Rp];if(e)return e;const n=$0(t);return e=zl(t).events.filter(r=>r.time>=t.startTime&&(!n||r.time<n.startTime)),t[Rp]=e,e}function B0(t,e){var r;const n=new Map;for(const o of t)for(const l of o.stack||[]){let c=n.get(l.file);c||(c={errors:[],content:void 0},n.set(l.file,c))}for(const o of e){const{action:l,stack:c,message:u}=o;!l||!c||(r=n.get(c[0].file))==null||r.errors.push({line:c[0].line||0,message:u})}return n}const mu=new Set(["page.route","page.routefromhar","page.unroute","page.unrouteall","browsercontext.route","browsercontext.routefromhar","browsercontext.unroute","browsercontext.unrouteall"]);{for(const t of[...mu])mu.add(t+"async");for(const t of["page.route_from_har","page.unroute_all","context.route_from_har","context.unroute_all"])mu.add(t)}const z0=50,Ul=({sidebarSize:t,sidebarHidden:e=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:o=z0,settingName:l,sidebar:c,main:u})=>{const d=Math.max(o,t)*window.devicePixelRatio,[p,g]=Nn(l?l+"."+r+":size":void 0,d),[y,v]=Nn(l?l+"."+r+":size":void 0,d),[x,E]=$.useState(null),[S,k]=jr();let C;r==="vertical"?(C=y/window.devicePixelRatio,S&&S.height<C&&(C=S.height-10)):(C=p/window.devicePixelRatio,S&&S.width<C&&(C=S.width-10)),document.body.style.userSelect=x?"none":"inherit";let A={};return r==="vertical"?n?A={top:x?0:C-4,bottom:x?0:void 0,height:x?"initial":8}:A={bottom:x?0:C-4,top:x?0:void 0,height:x?"initial":8}:n?A={left:x?0:C-4,right:x?0:void 0,width:x?"initial":8}:A={right:x?0:C-4,left:x?0:void 0,width:x?"initial":8},w.jsxs("div",{className:ze("split-view",r,n&&"sidebar-first"),ref:k,children:[w.jsx("div",{className:"split-view-main",children:u}),!e&&w.jsx("div",{style:{flexBasis:C},className:"split-view-sidebar",children:c}),!e&&w.jsx("div",{style:A,className:"split-view-resizer",onMouseDown:U=>E({offset:r==="vertical"?U.clientY:U.clientX,size:C}),onMouseUp:()=>E(null),onMouseMove:U=>{if(!U.buttons)E(null);else if(x){const D=(r==="vertical"?U.clientY:U.clientX)-x.offset,z=n?x.size+D:x.size-D,F=U.target.parentElement.getBoundingClientRect(),j=Math.min(Math.max(o,z),(r==="vertical"?F.height:F.width)-o);r==="vertical"?v(j*window.devicePixelRatio):g(j*window.devicePixelRatio)}}})]})},Ve=function(t,e,n){return t>=e&&t<=n};function _t(t){return Ve(t,48,57)}function Bp(t){return _t(t)||Ve(t,65,70)||Ve(t,97,102)}function U0(t){return Ve(t,65,90)}function H0(t){return Ve(t,97,122)}function q0(t){return U0(t)||H0(t)}function V0(t){return t>=128}function Cl(t){return q0(t)||V0(t)||t===95}function zp(t){return Cl(t)||_t(t)||t===45}function W0(t){return Ve(t,0,8)||t===11||Ve(t,14,31)||t===127}function Nl(t){return t===10}function _n(t){return Nl(t)||t===9||t===32}const K0=1114111;class Yu extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function G0(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r===13&&t.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),Ve(r,55296,56319)&&Ve(t.charCodeAt(n+1),56320,57343)){const o=r-55296,l=t.charCodeAt(n+1)-56320;r=Math.pow(2,16)+o*Math.pow(2,10)+l,n++}e.push(r)}return e}function Ge(t){if(t<=65535)return String.fromCharCode(t);t-=Math.pow(2,16);const e=Math.floor(t/Math.pow(2,10))+55296,n=t%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(n)}function zm(t){const e=G0(t);let n=-1;const r=[];let o;const l=function(M){return M>=e.length?-1:e[M]},c=function(M){if(M===void 0&&(M=1),M>3)throw"Spec Error: no more than three codepoints of lookahead.";return l(n+M)},u=function(M){return M===void 0&&(M=1),n+=M,o=l(n),!0},d=function(){return n-=1,!0},p=function(M){return M===void 0&&(M=o),M===-1},g=function(){if(y(),u(),_n(o)){for(;_n(c());)u();return new Hl}else{if(o===34)return E();if(o===35)if(zp(c())||C(c(1),c(2))){const M=new eg("");return U(c(1),c(2),c(3))&&(M.type="id"),M.value=q(),M}else return new tt(o);else return o===36?c()===61?(u(),new Y0):new tt(o):o===39?E():o===40?new Xm:o===41?new Zu:o===42?c()===61?(u(),new Z0):new tt(o):o===43?z()?(d(),v()):new tt(o):o===44?new Km:o===45?z()?(d(),v()):c(1)===45&&c(2)===62?(u(2),new qm):R()?(d(),x()):new tt(o):o===46?z()?(d(),v()):new tt(o):o===58?new Vm:o===59?new Wm:o===60?c(1)===33&&c(2)===45&&c(3)===45?(u(3),new Hm):new tt(o):o===64?U(c(1),c(2),c(3))?new Zm(q()):new tt(o):o===91?new Jm:o===92?A()?(d(),x()):new tt(o):o===93?new Pu:o===94?c()===61?(u(),new X0):new tt(o):o===123?new Gm:o===124?c()===61?(u(),new J0):c()===124?(u(),new Ym):new tt(o):o===125?new Qm:o===126?c()===61?(u(),new Q0):new tt(o):_t(o)?(d(),v()):Cl(o)?(d(),x()):p()?new Il:new tt(o)}},y=function(){for(;c(1)===47&&c(2)===42;)for(u(2);;)if(u(),o===42&&c()===47){u();break}else if(p())return},v=function(){const M=F();if(U(c(1),c(2),c(3))){const H=new eS;return H.value=M.value,H.repr=M.repr,H.type=M.type,H.unit=q(),H}else if(c()===37){u();const H=new rg;return H.value=M.value,H.repr=M.repr,H}else{const H=new ng;return H.value=M.value,H.repr=M.repr,H.type=M.type,H}},x=function(){const M=q();if(M.toLowerCase()==="url"&&c()===40){for(u();_n(c(1))&&_n(c(2));)u();return c()===34||c()===39?new Di(M):_n(c())&&(c(2)===34||c(2)===39)?new Di(M):S()}else return c()===40?(u(),new Di(M)):new ef(M)},E=function(M){M===void 0&&(M=o);let H="";for(;u();){if(o===M||p())return new tf(H);if(Nl(o))return d(),new Um;o===92?p(c())||(Nl(c())?u():H+=Ge(k())):H+=Ge(o)}throw new Error("Internal error")},S=function(){const M=new tg("");for(;_n(c());)u();if(p(c()))return M;for(;u();){if(o===41||p())return M;if(_n(o)){for(;_n(c());)u();return c()===41||p(c())?(u(),M):(oe(),new Al)}else{if(o===34||o===39||o===40||W0(o))return oe(),new Al;if(o===92)if(A())M.value+=Ge(k());else return oe(),new Al;else M.value+=Ge(o)}}throw new Error("Internal error")},k=function(){if(u(),Bp(o)){const M=[o];for(let fe=0;fe<5&&Bp(c());fe++)u(),M.push(o);_n(c())&&u();let H=parseInt(M.map(function(fe){return String.fromCharCode(fe)}).join(""),16);return H>K0&&(H=65533),H}else return p()?65533:o},C=function(M,H){return!(M!==92||Nl(H))},A=function(){return C(o,c())},U=function(M,H,fe){return M===45?Cl(H)||H===45||C(H,fe):Cl(M)?!0:M===92?C(M,H):!1},R=function(){return U(o,c(1),c(2))},D=function(M,H,fe){return M===43||M===45?!!(_t(H)||H===46&&_t(fe)):M===46?!!_t(H):!!_t(M)},z=function(){return D(o,c(1),c(2))},q=function(){let M="";for(;u();)if(zp(o))M+=Ge(o);else if(A())M+=Ge(k());else return d(),M;throw new Error("Internal parse error")},F=function(){let M="",H="integer";for((c()===43||c()===45)&&(u(),M+=Ge(o));_t(c());)u(),M+=Ge(o);if(c(1)===46&&_t(c(2)))for(u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);const fe=c(1),xe=c(2),pe=c(3);if((fe===69||fe===101)&&_t(xe))for(u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);else if((fe===69||fe===101)&&(xe===43||xe===45)&&_t(pe))for(u(),M+=Ge(o),u(),M+=Ge(o),u(),M+=Ge(o),H="number";_t(c());)u(),M+=Ge(o);const ge=j(M);return{type:H,value:ge,repr:M}},j=function(M){return+M},oe=function(){for(;u();){if(o===41||p())return;A()&&k()}};let ae=0;for(;!p(c());)if(r.push(g()),ae++,ae>e.length*2)throw new Error("I'm infinite-looping!");return r}class Ue{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Um extends Ue{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Al extends Ue{constructor(){super(...arguments),this.tokenType="BADURL"}}class Hl extends Ue{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Hm extends Ue{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class qm extends Ue{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Vm extends Ue{constructor(){super(...arguments),this.tokenType=":"}}class Wm extends Ue{constructor(){super(...arguments),this.tokenType=";"}}class Km extends Ue{constructor(){super(...arguments),this.tokenType=","}}class Is extends Ue{constructor(){super(...arguments),this.value="",this.mirror=""}}class Gm extends Is{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class Qm extends Is{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class Jm extends Is{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Pu extends Is{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Xm extends Is{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Zu extends Is{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Q0 extends Ue{constructor(){super(...arguments),this.tokenType="~="}}class J0 extends Ue{constructor(){super(...arguments),this.tokenType="|="}}class X0 extends Ue{constructor(){super(...arguments),this.tokenType="^="}}class Y0 extends Ue{constructor(){super(...arguments),this.tokenType="$="}}class Z0 extends Ue{constructor(){super(...arguments),this.tokenType="*="}}class Ym extends Ue{constructor(){super(...arguments),this.tokenType="||"}}class Il extends Ue{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class tt extends Ue{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Ge(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
42
- `:this.value}}class Ls extends Ue{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class ef extends Ls{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Xi(this.value)}}class Di extends Ls{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Xi(this.value)+"("}}class Zm extends Ls{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Xi(this.value)}}class eg extends Ls{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+Xi(this.value):"#"+tS(this.value)}}class tf extends Ls{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+sg(this.value)+'"'}}class tg extends Ls{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+sg(this.value)+'")'}}class ng extends Ue{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class rg extends Ue{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class eS extends Ue{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let n=Xi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||Ve(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function Xi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);if(o===0)throw new Yu("Invalid character: the input contains U+0000.");Ve(o,1,31)||o===127||r===0&&Ve(o,48,57)||r===1&&Ve(o,48,57)&&n===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||Ve(o,48,57)||Ve(o,65,90)||Ve(o,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function tS(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Yu("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||Ve(r,48,57)||Ve(r,65,90)||Ve(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function sg(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Yu("Invalid character: the input contains U+0000.");Ve(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class Et extends Error{}function nS(t,e){let n;try{n=zm(t),n[n.length-1]instanceof Il||n.push(new Il)}catch(j){const oe=j.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,ae=(j.stack||"").indexOf(j.message);throw ae!==-1&&(j.stack=j.stack.substring(0,ae)+oe+j.stack.substring(ae+j.message.length)),j.message=oe,j}const r=n.find(j=>j instanceof Zm||j instanceof Um||j instanceof Al||j instanceof Ym||j instanceof Hm||j instanceof qm||j instanceof Wm||j instanceof Gm||j instanceof Qm||j instanceof tg||j instanceof rg);if(r)throw new Et(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function c(){return new Et(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Hl;)o++}function d(j=o){return n[j]instanceof ef}function p(j=o){return n[j]instanceof tf}function g(j=o){return n[j]instanceof ng}function y(j=o){return n[j]instanceof Km}function v(j=o){return n[j]instanceof Xm}function x(j=o){return n[j]instanceof Zu}function E(j=o){return n[j]instanceof Di}function S(j=o){return n[j]instanceof tt&&n[j].value==="*"}function k(j=o){return n[j]instanceof Il}function C(j=o){return n[j]instanceof tt&&[">","+","~"].includes(n[j].value)}function A(j=o){return y(j)||x(j)||k(j)||C(j)||n[j]instanceof Hl}function U(){const j=[R()];for(;u(),!!y();)o++,j.push(R());return j}function R(){return u(),g()||p()?n[o++].value:D()}function D(){const j={simples:[]};for(u(),C()?j.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):j.simples.push({selector:z(),combinator:""});;){if(u(),C())j.simples[j.simples.length-1].combinator=n[o++].value,u();else if(A())break;j.simples.push({combinator:"",selector:z()})}return j}function z(){let j="";const oe=[];for(;!A();)if(d()||S())j+=n[o++].toSource();else if(n[o]instanceof eg)j+=n[o++].toSource();else if(n[o]instanceof tt&&n[o].value===".")if(o++,d())j+="."+n[o++].toSource();else throw c();else if(n[o]instanceof Vm)if(o++,d())if(!e.has(n[o].value.toLowerCase()))j+=":"+n[o++].toSource();else{const ae=n[o++].value.toLowerCase();oe.push({name:ae,args:[]}),l.add(ae)}else if(E()){const ae=n[o++].value.toLowerCase();if(e.has(ae)?(oe.push({name:ae,args:U()}),l.add(ae)):j+=`:${ae}(${q()})`,u(),!x())throw c();o++}else throw c();else if(n[o]instanceof Jm){for(j+="[",o++;!(n[o]instanceof Pu)&&!k();)j+=n[o++].toSource();if(!(n[o]instanceof Pu))throw c();j+="]",o++}else throw c();if(!j&&!oe.length)throw c();return{css:j||void 0,functions:oe}}function q(){let j="",oe=1;for(;!k()&&((v()||E())&&oe++,x()&&oe--,!!oe);)j+=n[o++].toSource();return j}const F=U();if(!k())throw c();if(F.some(j=>typeof j!="object"||!("simples"in j)))throw new Et(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:F,names:Array.from(l)}}const Ou=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),rS=new Set(["left-of","right-of","above","below","near"]),ig=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 Yi(t){const e=oS(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const o=nS(r.body,ig);n.push({name:"css",body:o.selector,source:r.body});continue}if(Ou.has(r.name)){let o,l;try{const p=JSON.parse("["+r.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Et(`Malformed selector: ${r.name}=`+r.body);if(o=p[0],p.length===2){if(typeof p[1]!="number"||!rS.has(r.name))throw new Et(`Malformed selector: ${r.name}=`+r.body);l=p[1]}}catch{throw new Et(`Malformed selector: ${r.name}=`+r.body)}const c={name:r.name,source:r.body,body:{parsed:Yi(o),distance:l}},u=[...c.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=u?c.body.parsed.parts.indexOf(u):-1;d!==-1&&sS(c.body.parsed.parts.slice(0,d+1),n.slice(0,d+1))&&c.body.parsed.parts.splice(0,d+1),n.push(c);continue}n.push({...r,source:r.body})}if(Ou.has(n[0].name))throw new Et(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function sS(t,e){return Tn({parts:t})===Tn({parts:e})}function Tn(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let o=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(o=!1);const l=o?n.name+"=":"";return`${r===t.capture?"*":""}${l}${n.source}`}).join(" >> ")}function iS(t,e){const n=(r,o)=>{for(const l of r.parts)e(l,o),Ou.has(l.name)&&n(l.body.parsed,!0)};n(t,!1)}function oS(t){let e=0,n,r=0;const o={parts:[]},l=()=>{const u=t.substring(r,e).trim(),d=u.indexOf("=");let p,g;d!==-1&&u.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=u.substring(0,d).trim(),g=u.substring(d+1)):u.length>1&&u[0]==='"'&&u[u.length-1]==='"'||u.length>1&&u[0]==="'"&&u[u.length-1]==="'"?(p="text",g=u):/^\(*\/\//.test(u)||u.startsWith("..")?(p="xpath",g=u):(p="css",g=u);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),o.parts.push({name:p,body:g}),y){if(o.capture!==void 0)throw new Et("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!t.includes(">>"))return e=t.length,l(),o;const c=()=>{const d=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<t.length;){const u=t[e];u==="\\"&&e+1<t.length?e+=2:u===n?(n=void 0,e++):!n&&(u==='"'||u==="'"||u==="`")&&!c()?(n=u,e++):!n&&u===">"&&t[e+1]===">"?(l(),e+=2,r=e):e++}return l(),o}function Ir(t,e){let n=0,r=t.length===0;const o=()=>t[n]||"",l=()=>{const k=o();return++n,r=n>=t.length,k},c=k=>{throw r?new Et(`Unexpected end of selector while parsing selector \`${t}\``):new Et(`Error while parsing selector \`${t}\` - unexpected symbol "${o()}" at position ${n}`+(k?" during "+k:""))};function u(){for(;!r&&/\s/.test(o());)l()}function d(k){return k>="€"||k>="0"&&k<="9"||k>="A"&&k<="Z"||k>="a"&&k<="z"||k>="0"&&k<="9"||k==="_"||k==="-"}function p(){let k="";for(u();!r&&d(o());)k+=l();return k}function g(k){let C=l();for(C!==k&&c("parsing quoted string");!r&&o()!==k;)o()==="\\"&&l(),C+=l();return o()!==k&&c("parsing quoted string"),C+=l(),C}function y(){l()!=="/"&&c("parsing regular expression");let k="",C=!1;for(;!r;){if(o()==="\\")k+=l(),r&&c("parsing regular expression");else if(C&&o()==="]")C=!1;else if(!C&&o()==="[")C=!0;else if(!C&&o()==="/")break;k+=l()}l()!=="/"&&c("parsing regular expression");let A="";for(;!r&&o().match(/[dgimsuy]/);)A+=l();try{return new RegExp(k,A)}catch(U){throw new Et(`Error while parsing selector \`${t}\`: ${U.message}`)}}function v(){let k="";return u(),o()==="'"||o()==='"'?k=g(o()).slice(1,-1):k=p(),k||c("parsing property path"),k}function x(){u();let k="";return r||(k+=l()),!r&&k!=="="&&(k+=l()),["=","*=","^=","$=","|=","~="].includes(k)||c("parsing operator"),k}function E(){l();const k=[];for(k.push(v()),u();o()===".";)l(),k.push(v()),u();if(o()==="]")return l(),{name:k.join("."),jsonPath:k,op:"<truthy>",value:null,caseSensitive:!1};const C=x();let A,U=!0;if(u(),o()==="/"){if(C!=="=")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${C} in attribute with regular expression`);A=y()}else if(o()==="'"||o()==='"')A=g(o()).slice(1,-1),u(),o()==="i"||o()==="I"?(U=!1,l()):(o()==="s"||o()==="S")&&(U=!0,l());else{for(A="";!r&&(d(o())||o()==="+"||o()===".");)A+=l();A==="true"?A=!0:A==="false"?A=!1:e||(A=+A,Number.isNaN(A)&&c("parsing attribute value"))}if(u(),o()!=="]"&&c("parsing attribute value"),l(),C!=="="&&typeof A!="string")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${C} in attribute with non-string matching value - ${A}`);return{name:k.join("."),jsonPath:k,op:C,value:A,caseSensitive:U}}const S={name:"",attributes:[]};for(S.name=p(),u();o()==="[";)S.attributes.push(E()),u();if(r||c(void 0),!S.name&&!S.attributes.length)throw new Et(`Error while parsing selector \`${t}\` - selector cannot be empty`);return S}function na(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"`")+e;throw new Error("Invalid escape char")}function ql(t){return t.charAt(0).toUpperCase()+t.substring(1)}function og(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function gs(t){return`"${t.replace(/["\\]/g,e=>"\\"+e)}"`}let Er;function lS(){Er=new Map}function mt(t){let e=Er==null?void 0:Er.get(t);return e===void 0&&(e=t.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Er==null||Er.set(t,e)),e}function ra(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function lg(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function kt(t,e){return typeof t!="string"?lg(t):`${JSON.stringify(t)}${e?"s":"i"}`}function ht(t,e){return typeof t!="string"?lg(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function aS(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Up(t,e){return aS(t,e,"…")}function Vl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cS(t,e){const n=t.length,r=e.length;let o=0,l=0;const c=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=r;d++)t[u-1]===e[d-1]&&(c[u][d]=c[u-1][d-1]+1,c[u][d]>o&&(o=c[u][d],l=u));return t.slice(l-o,l)}function uS(t,e){try{const n=Yi(e),r=n.parts[n.parts.length-1];if((r==null?void 0:r.name)==="internal:describe"){const o=JSON.parse(r.body);if(typeof o=="string")return o}return br(new cg[t],n,!1,1)[0]}catch{return e}}function Lr(t,e,n=!1){return ag(t,e,n,1)[0]}function ag(t,e,n=!1,r=20,o){try{return br(new cg[t](o),Yi(e),n,r)}catch{return[e]}}function br(t,e,n=!1,r=20){const o=[...e.parts],l=[];let c=n?"frame-locator":"page";for(let u=0;u<o.length;u++){const d=o[u],p=c;if(c="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?l.push([t.generateLocator(p,"first",""),t.generateLocator(p,"nth","0")]):d.body==="-1"?l.push([t.generateLocator(p,"last",""),t.generateLocator(p,"nth","-1")]):l.push([t.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){l.push([t.generateLocator(p,"visible",d.body),t.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:S}=Ti(d.body);l.push([t.generateLocator(p,"text",S,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:S}=Ti(d.body);if(!E){l.push([t.generateLocator(p,"has-text",S,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:S}=Ti(d.body);if(!E){l.push([t.generateLocator(p,"has-not-text",S,{exact:E})]);continue}}if(d.name==="internal:has"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"has",S)));continue}if(d.name==="internal:has-not"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"hasNot",S)));continue}if(d.name==="internal:and"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"and",S)));continue}if(d.name==="internal:or"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"or",S)));continue}if(d.name==="internal:chain"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"chain",S)));continue}if(d.name==="internal:label"){const{exact:E,text:S}=Ti(d.body);l.push([t.generateLocator(p,"label",S,{exact:E})]);continue}if(d.name==="internal:role"){const E=Ir(d.body,!0),S={attrs:[]};for(const k of E.attributes)k.name==="name"?(S.exact=k.caseSensitive,S.name=k.value):(k.name==="level"&&typeof k.value=="string"&&(k.value=+k.value),S.attrs.push({name:k.name==="include-hidden"?"includeHidden":k.name,value:k.value}));l.push([t.generateLocator(p,"role",E.name,S)]);continue}if(d.name==="internal:testid"){const E=Ir(d.body,!0),{value:S}=E.attributes[0];l.push([t.generateLocator(p,"test-id",S)]);continue}if(d.name==="internal:attr"){const E=Ir(d.body,!0),{name:S,value:k,caseSensitive:C}=E.attributes[0],A=k,U=!!C;if(S==="placeholder"){l.push([t.generateLocator(p,"placeholder",A,{exact:U})]);continue}if(S==="alt"){l.push([t.generateLocator(p,"alt",A,{exact:U})]);continue}if(S==="title"){l.push([t.generateLocator(p,"title",A,{exact:U})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=l[l.length-1],S=o[u-1],k=E.map(C=>t.chainLocators([C,t.generateLocator(p,"frame","")]));["xpath","css"].includes(S.name)&&k.push(t.generateLocator(p,"frame-locator",Tn({parts:[S]})),t.generateLocator(p,"frame-locator",Tn({parts:[S]},!0))),E.splice(0,E.length,...k),c="frame-locator";continue}const g=o[u+1],y=Tn({parts:[d]}),v=t.generateLocator(p,"default",y);if(g&&["internal:has-text","internal:has-not-text"].includes(g.name)){const{exact:E,text:S}=Ti(g.body);if(!E){const k=t.generateLocator("locator",g.name==="internal:has-text"?"has-text":"has-not-text",S,{exact:E}),C={};g.name==="internal:has-text"?C.hasText=S:C.hasNotText=S;const A=t.generateLocator(p,"default",y,C);l.push([t.chainLocators([v,k]),A]),u++;continue}}let x;if(["xpath","css"].includes(d.name)){const E=Tn({parts:[d]},!0);x=t.generateLocator(p,"default",E)}l.push([v,x].filter(Boolean))}return fS(t,l,r)}function fS(t,e,n){const r=e.map(()=>""),o=[],l=c=>{if(c===e.length)return o.push(t.chainLocators(r)),o.length<n;for(const u of e[c])if(r[c]=u,!l(c+1))return!1;return!0};return l(0),o}function Ti(t){let e=!1;const n=t.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(t.endsWith('"')?(t=JSON.parse(t),e=!0):t.endsWith('"s')?(t=JSON.parse(t.substring(0,t.length-1)),e=!0):t.endsWith('"i')&&(t=JSON.parse(t.substring(0,t.length-1)),e=!1),{exact:e,text:t})}class dS{constructor(e){this.preferredQuote=e}generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(o.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${r==="true"?"true":"false"} })`;case"role":const l=[];nt(o.name)?l.push(`name: ${this.regexToSourceString(o.name)}`):typeof o.name=="string"&&(l.push(`name: ${this.quote(o.name)}`),o.exact&&l.push("exact: true"));for(const{name:u,value:d}of o.attrs)l.push(`${u}: ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, { ${l.join(", ")} }`:"";return`getByRole(${this.quote(r)}${c})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!o.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("getByLabel",r,!!o.exact);case"title":return this.toCallWithExact("getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return ra(String(e))}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToSourceString(n)})`:r?`${e}(${this.quote(n)}, { exact: true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return na(e,this.preferredQuote??"'")}}class hS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(o.hasText)})`:o.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(o.hasNotText)})`:`locator(${this.quote(r)})`;case"frame-locator":return`frame_locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${r==="true"?"True":"False"})`;case"role":const l=[];nt(o.name)?l.push(`name=${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`name=${this.quote(o.name)}`),o.exact&&l.push("exact=True"));for(const{name:u,value:d}of o.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),l.push(`${og(u)}=${p}`)}const c=l.length?`, ${l.join(", ")}`:"";return`get_by_role(${this.quote(r)}${c})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!o.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!o.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!o.exact);case"label":return this.toCallWithExact("get_by_label",r,!!o.exact);case"title":return this.toCallWithExact("get_by_title",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${ra(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, exact=True)`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return na(e,'"')}}class pS{generateLocator(e,n,r,o={}){let l;switch(e){case"page":l="Page";break;case"frame-locator":l="FrameLocator";break;case"locator":l="Locator";break}switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasText(${this.toHasText(o.hasText)}))`:o.hasNotText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasNotText(${this.toHasText(o.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${l}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const c=[];nt(o.name)?c.push(`.setName(${this.regexToString(o.name)})`):typeof o.name=="string"&&(c.push(`.setName(${this.quote(o.name)})`),o.exact&&c.push(".setExact(true)"));for(const{name:d,value:p}of o.attrs)c.push(`.set${ql(d)}(${typeof p=="string"?this.quote(p):p})`);const u=c.length?`, new ${l}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${og(r).toUpperCase()}${u})`;case"has-text":return`filter(new ${l}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${l}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${l}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${l}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(l,"getByText",r,!!o.exact);case"alt":return this.toCallWithExact(l,"getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact(l,"getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact(l,"getByLabel",r,!!o.exact);case"title":return this.toCallWithExact(l,"getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(ra(e.source))}${n})`}toCallWithExact(e,n,r,o){return nt(r)?`${n}(${this.regexToString(r)})`:o?`${n}(${this.quote(r)}, new ${e}.${ql(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(e){return nt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return na(e,'"')}}class mS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(o.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame-locator":return`FrameLocator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${r==="true"?"true":"false"} })`;case"role":const l=[];nt(o.name)?l.push(`NameRegex = ${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`Name = ${this.quote(o.name)}`),o.exact&&l.push("Exact = true"));for(const{name:u,value:d}of o.attrs)l.push(`${ql(u)} = ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, new() { ${l.join(", ")} }`:"";return`GetByRole(AriaRole.${ql(r)}${c})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!o.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!o.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(ra(e.source))}${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, new() { Exact = true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return nt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return na(e,'"')}}class gS{generateLocator(e,n,r,o={}){return JSON.stringify({kind:n,body:r,options:o})}chainLocators(e){const n=e.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const cg={javascript:dS,python:hS,java:pS,csharp:mS,jsonl:gS};function nt(t){return t instanceof RegExp}const Hp=new Map;function yS({name:t,rootItem:e,render:n,title:r,icon:o,isError:l,isVisible:c,selectedItem:u,onAccepted:d,onSelected:p,onHighlighted:g,treeState:y,setTreeState:v,noItemsMessage:x,dataTestId:E,autoExpandDepth:S}){const k=$.useMemo(()=>vS(e,u,y.expandedItems,S||0,c),[e,u,y,S,c]),C=$.useRef(null),[A,U]=$.useState(),[R,D]=$.useState(!1);$.useEffect(()=>{g==null||g(A)},[g,A]),$.useEffect(()=>{const q=C.current;if(!q)return;const F=()=>{Hp.set(t,q.scrollTop)};return q.addEventListener("scroll",F,{passive:!0}),()=>q.removeEventListener("scroll",F)},[t]),$.useEffect(()=>{C.current&&(C.current.scrollTop=Hp.get(t)||0)},[t]);const z=$.useCallback(q=>{const{expanded:F}=k.get(q);if(F){for(let j=u;j;j=j.parent)if(j===q){p==null||p(q);break}y.expandedItems.set(q.id,!1)}else y.expandedItems.set(q.id,!0);v({...y})},[k,u,p,y,v]);return w.jsx("div",{className:ze("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":E||t+"-tree",children:w.jsxs("div",{className:ze("tree-view-content"),tabIndex:0,onKeyDown:q=>{if(u&&q.key==="Enter"){d==null||d(u);return}if(q.key!=="ArrowDown"&&q.key!=="ArrowUp"&&q.key!=="ArrowLeft"&&q.key!=="ArrowRight")return;if(q.stopPropagation(),q.preventDefault(),u&&q.key==="ArrowLeft"){const{expanded:j,parent:oe}=k.get(u);j?(y.expandedItems.set(u.id,!1),v({...y})):oe&&(p==null||p(oe));return}if(u&&q.key==="ArrowRight"){u.children.length&&(y.expandedItems.set(u.id,!0),v({...y}));return}let F=u;if(q.key==="ArrowDown"&&(u?F=k.get(u).next:k.size&&(F=[...k.keys()][0])),q.key==="ArrowUp"){if(u)F=k.get(u).prev;else if(k.size){const j=[...k.keys()];F=j[j.length-1]}}g==null||g(void 0),F&&(D(!0),p==null||p(F)),U(void 0)},ref:C,children:[x&&k.size===0&&w.jsx("div",{className:"tree-view-empty",children:x}),e.children.map(q=>k.get(q)&&w.jsx(ug,{item:q,treeItems:k,selectedItem:u,onSelected:p,onAccepted:d,isError:l,toggleExpanded:z,highlightedItem:A,setHighlightedItem:U,render:n,icon:o,title:r,isKeyboardNavigation:R,setIsKeyboardNavigation:D},q.id))]})})}function ug({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:o,setHighlightedItem:l,isError:c,onAccepted:u,toggleExpanded:d,render:p,title:g,icon:y,isKeyboardNavigation:v,setIsKeyboardNavigation:x}){const E=$.useId(),S=$.useRef(null);$.useEffect(()=>{n===t&&v&&S.current&&(Rm(S.current),x(!1))},[t,n,v,x]);const k=e.get(t),C=k.depth,A=k.expanded;let U="codicon-blank";typeof A=="boolean"&&(U=A?"codicon-chevron-down":"codicon-chevron-right");const R=p(t),D=A&&t.children.length?t.children:[],z=g==null?void 0:g(t),q=(y==null?void 0:y(t))||"codicon-blank";return w.jsxs("div",{ref:S,role:"treeitem","aria-selected":t===n,"aria-expanded":A,"aria-controls":E,title:z,className:"vbox",style:{flex:"none"},children:[w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(t),className:ze("tree-view-entry",n===t&&"selected",o===t&&"highlighted",(c==null?void 0:c(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>l(t),onMouseLeave:()=>l(void 0),children:[C?new Array(C).fill(0).map((F,j)=>w.jsx("div",{className:"tree-view-indent"},"indent-"+j)):void 0,w.jsx("div",{"aria-hidden":"true",className:"codicon "+U,style:{minWidth:16,marginRight:4},onDoubleClick:F=>{F.preventDefault(),F.stopPropagation()},onClick:F=>{F.stopPropagation(),F.preventDefault(),d(t)}}),y&&w.jsx("div",{className:"codicon "+q,style:{minWidth:16,marginRight:4},"aria-label":"["+q.replace("codicon","icon")+"]"}),typeof R=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:R}):R]}),!!D.length&&w.jsx("div",{id:E,role:"group",children:D.map(F=>e.get(F)&&w.jsx(ug,{item:F,treeItems:e,selectedItem:n,onSelected:r,onAccepted:u,isError:c,toggleExpanded:d,highlightedItem:o,setHighlightedItem:l,render:p,title:g,icon:y,isKeyboardNavigation:v,setIsKeyboardNavigation:x},F.id))})]})}function vS(t,e,n,r,o=()=>!0){if(!o(t))return new Map;const l=new Map,c=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)c.add(p.id);let u=null;const d=(p,g)=>{for(const y of p.children){if(!o(y))continue;const v=c.has(y.id)||n.get(y.id),x=r>g&&l.size<25&&v!==!1,E=y.children.length?v??x:void 0,S={depth:g,expanded:E,parent:t===p?null:p,next:null,prev:u};u&&(l.get(u).next=y),u=y,l.set(y,S),E&&d(y,g+1)}};return d(t,0),l}const Ht=$.forwardRef(function({children:e,title:n="",icon:r,disabled:o=!1,toggled:l=!1,onClick:c=()=>{},style:u,testId:d,className:p,ariaLabel:g},y){return w.jsxs("button",{ref:y,className:ze(p,"toolbar-button",r,l&&"toggled"),onMouseDown:qp,onClick:c,onDoubleClick:qp,title:n,disabled:!!o,style:u,"data-testid":d,"aria-label":g||n,children:[r&&w.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),qp=t=>{t.stopPropagation(),t.preventDefault()};function fg(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function wS(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const SS=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{internal:!0}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{internal:!0}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser"}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{internal:!0,title:"Create CDP session"}],["Browser.startTracing",{internal:!0}],["Browser.stopTracing",{internal:!0}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies"}],["BrowserContext.addInitScript",{title:"Add init script"}],["BrowserContext.clearCookies",{title:"Clear cookies"}],["BrowserContext.clearPermissions",{title:"Clear permissions"}],["BrowserContext.close",{title:"Close context"}],["BrowserContext.cookies",{title:"Get cookies"}],["BrowserContext.exposeBinding",{title:"Expose binding"}],["BrowserContext.grantPermissions",{title:"Grant permissions"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers"}],["BrowserContext.setGeolocation",{title:"Set geolocation"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials"}],["BrowserContext.setNetworkInterceptionPatterns",{internal:!0}],["BrowserContext.setWebSocketInterceptionPatterns",{internal:!0}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.setStorageState",{title:"Set storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{internal:!0}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["BrowserContext.clockUninstall",{title:"Uninstall clock"}],["Page.addInitScript",{}],["Page.close",{title:"Close page"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0}],["Page.exposeBinding",{title:"Expose binding"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0}],["Page.requestGC",{title:"Request garbage collection"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers"}],["Page.setNetworkInterceptionPatterns",{internal:!0}],["Page.setWebSocketInterceptionPatterns",{internal:!0}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0}],["Page.accessibilitySnapshot",{internal:!0,snapshot:!0}],["Page.pdf",{title:"PDF"}],["Page.snapshotForAI",{internal:!0,snapshot:!0}],["Page.startJSCoverage",{internal:!0}],["Page.stopJSCoverage",{internal:!0}],["Page.startCSSCoverage",{internal:!0}],["Page.stopCSSCoverage",{internal:!0}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0}],["Frame.frameElement",{internal:!0}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{internal:!0}],["Frame.getAttribute",{internal:!0,snapshot:!0}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0}],["Frame.innerText",{title:"Get inner text",snapshot:!0}],["Frame.inputValue",{title:"Get input value",snapshot:!0}],["Frame.isChecked",{title:"Is checked",snapshot:!0}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0}],["Frame.isHidden",{title:"Is hidden",snapshot:!0}],["Frame.isVisible",{title:"Is visible",snapshot:!0}],["Frame.isEditable",{title:"Is editable",snapshot:!0}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0}],["Frame.title",{internal:!0}],["Frame.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["JSHandle.dispose",{}],["ElementHandle.dispose",{}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["JSHandle.getPropertyList",{internal:!0}],["ElementHandle.getPropertyList",{internal:!0}],["JSHandle.getProperty",{internal:!0}],["ElementHandle.getProperty",{internal:!0}],["JSHandle.jsonValue",{internal:!0}],["ElementHandle.jsonValue",{internal:!0}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{internal:!0,snapshot:!0}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0}],["ElementHandle.getAttribute",{internal:!0}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0}],["ElementHandle.ownerFrame",{title:"Get owner frame"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{}],["Route.continue",{internal:!0}],["Route.fulfill",{internal:!0}],["WebSocketRoute.connect",{internal:!0}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{internal:!0}],["WebSocketRoute.sendToServer",{internal:!0}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{internal:!0}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{internal:!0}],["Tracing.tracingStartChunk",{internal:!0}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{internal:!0}],["Tracing.tracingStop",{internal:!0}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{internal:!0}],["CDPSession.detach",{internal:!0}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{internal:!0}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{internal:!0}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function xS(t,e){if(t)for(const n of e.split("|")){if(n==="url")try{const o=new URL(t[n]);return o.protocol==="data:"?o.protocol:o.protocol==="about:"?t[n]:o.pathname+o.search}catch{if(t[n]!==void 0)return t[n]}if(n==="timeNumber"&&t[n]!==void 0)return new Date(t[n]).toString();const r=_S(t,n);if(r!==void 0)return r}}function _S(t,e){const n=e.split(".");let r=t;for(const o of n){if(typeof r!="object"||r===null)return;r=r[o]}if(r!==void 0)return String(r)}const ES=yS,kS=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:o,onSelected:l,onHighlighted:c,revealConsole:u,revealAttachment:d,isLive:p})=>{const[g,y]=$.useState({expandedItems:new Map}),{rootItem:v,itemMap:x}=$.useMemo(()=>R0(t),[t]),{selectedItem:E}=$.useMemo(()=>({selectedItem:e?x.get(e.callId):void 0}),[x,e]),S=$.useCallback(D=>{var z,q;return!!((q=(z=D.action)==null?void 0:z.error)!=null&&q.message)},[]),k=$.useCallback(D=>r({minimum:D.action.startTime,maximum:D.action.endTime}),[r]),C=$.useCallback(D=>nf(D.action,{sdkLanguage:o,revealConsole:u,revealAttachment:d,isLive:p,showDuration:!0,showBadges:!0}),[p,u,d,o]),A=$.useCallback(D=>!n||!D.action||D.action.startTime<=n.maximum&&D.action.endTime>=n.minimum,[n]),U=$.useCallback(D=>{l==null||l(D.action)},[l]),R=$.useCallback(D=>{c==null||c(D==null?void 0:D.action)},[c]);return w.jsxs("div",{className:"vbox",children:[n&&w.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[w.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),w.jsx(ES,{name:"actions",rootItem:v,treeState:g,setTreeState:y,selectedItem:E,onSelected:U,onHighlighted:R,onAccepted:k,isError:S,isVisible:A,render:C})]})},nf=(t,e)=>{var k,C;const{sdkLanguage:n,revealConsole:r,revealAttachment:o,isLive:l,showDuration:c,showBadges:u}=e,{errors:d,warnings:p}=D0(t),g=!!((k=t.attachments)!=null&&k.length)&&!!o,y=t.params.selector?uS(n||"javascript",t.params.selector):void 0,v=t.class==="Test"&&t.method==="test.step"&&((C=t.annotations)==null?void 0:C.some(A=>A.type==="skip"));let x="";t.endTime?x=pt(t.endTime-t.startTime):t.error?x="Timed out":l||(x="-");const{elements:E,title:S}=bS(t);return w.jsxs("div",{className:"action-title vbox",children:[w.jsxs("div",{className:"hbox",children:[w.jsx("span",{className:"action-title-method",title:S,children:E}),(c||u||g||v)&&w.jsx("div",{className:"spacer"}),g&&w.jsx(Ht,{icon:"attach",title:"Open Attachment",onClick:()=>o(t.attachments[0])}),c&&!v&&w.jsx("div",{className:"action-duration",children:x||w.jsx("span",{className:"codicon codicon-loading"})}),v&&w.jsx("span",{className:ze("action-skipped","codicon",fg("skipped")),title:"skipped"}),u&&w.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!d&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-error"}),w.jsx("span",{className:"action-icon-value",children:d})]}),!!p&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-warning"}),w.jsx("span",{className:"action-icon-value",children:p})]})]})]}),y&&w.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function bS(t){var u;const e=t.title??((u=SS.get(t.class+"."+t.method))==null?void 0:u.title)??t.method,n=[],r=[];let o=0;const l=/\{([^}]+)\}/g;let c;for(;(c=l.exec(e))!==null;){const[d,p]=c,g=e.slice(o,c.index);n.push(g),r.push(g);const y=xS(t.params,p);y===void 0?(n.push(d),r.push(d)):c.index===0?(n.push(y),r.push(y)):(n.push(w.jsx("span",{className:"action-title-param",children:y})),r.push(y)),o=c.index+d.length}if(o<e.length){const d=e.slice(o);n.push(d),r.push(d)}return{elements:n,title:r.join("")}}const rf=({value:t,description:e})=>{const[n,r]=$.useState("copy"),o=$.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(c=>{navigator.clipboard.writeText(c).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return w.jsx(Ht,{title:e||"Copy",icon:n,onClick:o})},Ll=({value:t,description:e,copiedDescription:n=e,style:r})=>{const[o,l]=$.useState(!1),c=$.useCallback(async()=>{const u=typeof t=="function"?await t():t;await navigator.clipboard.writeText(u),l(!0),setTimeout(()=>l(!1),3e3)},[t]);return w.jsx(Ht,{style:r,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:o?n:e})},Pr=({text:t})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),TS=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=$.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(c=>c!=="info"),[t]);if(!t)return w.jsx(Pr,{text:"No action selected"});const o=t.startTime-e,l=pt(o);return w.jsxs("div",{className:"call-tab",children:[w.jsx("div",{className:"call-line",children:t.title}),w.jsx("div",{className:"call-section",children:"Time"}),w.jsx(Vp,{name:"start:",value:l}),w.jsx(Vp,{name:"duration:",value:CS(t)}),!!r.length&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Parameters"}),r.map(c=>Wp(Kp(t,c,t.params[c],n)))]}),!!t.result&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(c=>Wp(Kp(t,c,t.result[c],n)))]})]})},Vp=({name:t,value:e})=>w.jsxs("div",{className:"call-line",children:[t,w.jsx("span",{className:"call-value datetime",title:e,children:e})]});function CS(t){return t.endTime?pt(t.endTime-t.startTime):t.error?"Timed Out":"Running"}function Wp(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),w.jsxs("div",{className:"call-line",children:[t.name,":",w.jsx("span",{className:ze("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&w.jsx(rf,{value:t.text})]},t.name)}function Kp(t,e,n,r){const o=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&o)&&(n=Wl(n.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&o||e==="received"&&t.method==="expect")&&(n=Wl(n,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Lr(r||"javascript",t.params.selector),type:"locator",name:"locator"};const l=typeof n;return l!=="object"||n===null?{text:String(n),type:l,name:e}:n.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Wl(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Wl(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:o}of t.o)n[r]=Wl(o,e);return n}return t.h!==void 0?e===void 0?"<object>":e[t.h]:"<object>"}const Gp=new Map;function sa({name:t,items:e=[],id:n,render:r,icon:o,isError:l,isWarning:c,isInfo:u,selectedItem:d,onAccepted:p,onSelected:g,onHighlighted:y,onIconClicked:v,noItemsMessage:x,dataTestId:E,notSelectable:S,ariaLabel:k}){const C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{y==null||y(A)},[y,A]),$.useEffect(()=>{const R=C.current;if(!R)return;const D=()=>{Gp.set(t,R.scrollTop)};return R.addEventListener("scroll",D,{passive:!0}),()=>R.removeEventListener("scroll",D)},[t]),$.useEffect(()=>{C.current&&(C.current.scrollTop=Gp.get(t)||0)},[t]),w.jsx("div",{className:ze("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"aria-label":k,children:w.jsxs("div",{className:ze("list-view-content",S&&"not-selectable"),tabIndex:0,onKeyDown:R=>{var F;if(d&&R.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(R.key!=="ArrowDown"&&R.key!=="ArrowUp")return;R.stopPropagation(),R.preventDefault();const D=d?e.indexOf(d):-1;let z=D;R.key==="ArrowDown"&&(D===-1?z=0:z=Math.min(D+1,e.length-1)),R.key==="ArrowUp"&&(D===-1?z=e.length-1:z=Math.max(D-1,0));const q=(F=C.current)==null?void 0:F.children.item(z);Rm(q||void 0),y==null||y(void 0),g==null||g(e[z],z),U(void 0)},ref:C,children:[x&&e.length===0&&w.jsx("div",{className:"list-view-empty",children:x}),e.map((R,D)=>{const z=r(R,D);return w.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(R,D),role:"listitem",className:ze("list-view-entry",d===R&&"selected",!S&&A===R&&"highlighted",(l==null?void 0:l(R,D))&&"error",(c==null?void 0:c(R,D))&&"warning",(u==null?void 0:u(R,D))&&"info"),"aria-selected":d===R,onClick:()=>g==null?void 0:g(R,D),onMouseEnter:()=>U(R),onMouseLeave:()=>U(void 0),children:[o&&w.jsx("div",{className:"codicon "+(o(R,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:q=>{q.preventDefault(),q.stopPropagation()},onClick:q=>{q.stopPropagation(),q.preventDefault(),v==null||v(R,D)}}),typeof z=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:z}):z]},(n==null?void 0:n(R,D))||D)})]})})}const NS=sa,AS=({action:t,isLive:e})=>{const n=$.useMemo(()=>{var c;if(!t||!t.log.length)return[];const r=t.log,o=t.context.wallTime-t.context.startTime,l=[];for(let u=0;u<r.length;++u){let d="";if(r[u].time!==-1){const p=(c=r[u])==null?void 0:c.time;u+1<r.length?d=pt(r[u+1].time-p):t.endTime>0?d=pt(t.endTime-p):e?d=pt(Date.now()-o-p):d="-"}l.push({message:r[u].message,time:d})}return l},[t,e]);return n.length?w.jsx(NS,{name:"log",ariaLabel:"Log entries",items:n,render:r=>w.jsxs("div",{className:"log-list-item",children:[w.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):w.jsx(Pr,{text:"No log entries"})};function Wi(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let o,l={},c=!1,u=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(o=n.exec(t))!==null;){const[,,p,,g]=o;if(p){const y=+p;switch(y){case 0:l={};break;case 1:l["font-weight"]="bold";break;case 2:l.opacity="0.8";break;case 3:l["font-style"]="italic";break;case 4:l["text-decoration"]="underline";break;case 7:c=!0;break;case 8:l.display="none";break;case 9:l["text-decoration"]="line-through";break;case 22:delete l["font-weight"],delete l["font-style"],delete l.opacity,delete l["text-decoration"];break;case 23:delete l["font-weight"],delete l["font-style"],delete l.opacity;break;case 24:delete l["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:u=Qp[y-30];break;case 39:u=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=Qp[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:l["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:u=Jp[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=Jp[y-100];break}}else if(g){const y={...l},v=c?d:u;v!==void 0&&(y.color=v);const x=c?u:d;x!==void 0&&(y["background-color"]=x),r.push(`<span style="${LS(y)}">${IS(g)}</span>`)}}return r.join("")}const Qp={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)"},Jp={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 IS(t){return t.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function LS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const MS=({error:t})=>{const e=$.useMemo(()=>Wi(t),[t]);return w.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},dg=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(Mt.useEffect(()=>{const o=document.createElement("div");return o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.left="0",o.style.zIndex="9999",o.style.cursor=t,document.body.appendChild(o),e&&o.addEventListener("mousemove",e),n&&o.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&o.removeEventListener("mousemove",e),n&&o.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(o)}},[t,e,n,r]),w.jsx(w.Fragment,{})),jS={position:"absolute",top:0,right:0,bottom:0,left:0},hg=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:o,minColumnWidth:l})=>{const c=l||0,[u,d]=Mt.useState(null),[p,g]=jr(),y={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-o)/2,borderRightWidth:t==="horizontal"?(7-o)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-o)/2,borderLeftWidth:t==="horizontal"?(7-o)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return w.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-o)/2,zIndex:100,pointerEvents:"none"},ref:g,children:[!!u&&w.jsx(dg,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(u){const x=t==="horizontal"?v.clientX-u.clientX:v.clientY-u.clientY,E=u.offset+x,S=u.index>0?e[u.index-1]:0,k=t==="horizontal"?p.width:p.height,C=Math.min(Math.max(S+c,E),k-c)-e[u.index];for(let A=u.index;A<e.length;++A)e[A]=e[A]+C;n([...e])}}}),e.map((v,x)=>w.jsx("div",{style:{...y,top:t==="horizontal"?0:v,left:t==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:v,index:x}),children:w.jsx("div",{style:{...jS,background:r}})},x))]})};async function gu(t){const e=new Image;return t&&(e.src=t,await new Promise((n,r)=>{e.onload=n,e.onerror=n})),e}const Ru={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
42
+ `:this.value}}class Ls extends Ue{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class ef extends Ls{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Xi(this.value)}}class Di extends Ls{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Xi(this.value)+"("}}class Zm extends Ls{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Xi(this.value)}}class eg extends Ls{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+Xi(this.value):"#"+tS(this.value)}}class tf extends Ls{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+sg(this.value)+'"'}}class tg extends Ls{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+sg(this.value)+'")'}}class ng extends Ue{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class rg extends Ue{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class eS extends Ue{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let n=Xi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||Ve(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function Xi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);if(o===0)throw new Yu("Invalid character: the input contains U+0000.");Ve(o,1,31)||o===127||r===0&&Ve(o,48,57)||r===1&&Ve(o,48,57)&&n===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||Ve(o,48,57)||Ve(o,65,90)||Ve(o,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function tS(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Yu("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||Ve(r,48,57)||Ve(r,65,90)||Ve(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function sg(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Yu("Invalid character: the input contains U+0000.");Ve(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class Et extends Error{}function nS(t,e){let n;try{n=zm(t),n[n.length-1]instanceof Il||n.push(new Il)}catch(j){const oe=j.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,ae=(j.stack||"").indexOf(j.message);throw ae!==-1&&(j.stack=j.stack.substring(0,ae)+oe+j.stack.substring(ae+j.message.length)),j.message=oe,j}const r=n.find(j=>j instanceof Zm||j instanceof Um||j instanceof Al||j instanceof Ym||j instanceof Hm||j instanceof qm||j instanceof Wm||j instanceof Gm||j instanceof Qm||j instanceof tg||j instanceof rg);if(r)throw new Et(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function c(){return new Et(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Hl;)o++}function d(j=o){return n[j]instanceof ef}function p(j=o){return n[j]instanceof tf}function g(j=o){return n[j]instanceof ng}function y(j=o){return n[j]instanceof Km}function v(j=o){return n[j]instanceof Xm}function x(j=o){return n[j]instanceof Zu}function E(j=o){return n[j]instanceof Di}function S(j=o){return n[j]instanceof tt&&n[j].value==="*"}function k(j=o){return n[j]instanceof Il}function C(j=o){return n[j]instanceof tt&&[">","+","~"].includes(n[j].value)}function A(j=o){return y(j)||x(j)||k(j)||C(j)||n[j]instanceof Hl}function U(){const j=[R()];for(;u(),!!y();)o++,j.push(R());return j}function R(){return u(),g()||p()?n[o++].value:D()}function D(){const j={simples:[]};for(u(),C()?j.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):j.simples.push({selector:z(),combinator:""});;){if(u(),C())j.simples[j.simples.length-1].combinator=n[o++].value,u();else if(A())break;j.simples.push({combinator:"",selector:z()})}return j}function z(){let j="";const oe=[];for(;!A();)if(d()||S())j+=n[o++].toSource();else if(n[o]instanceof eg)j+=n[o++].toSource();else if(n[o]instanceof tt&&n[o].value===".")if(o++,d())j+="."+n[o++].toSource();else throw c();else if(n[o]instanceof Vm)if(o++,d())if(!e.has(n[o].value.toLowerCase()))j+=":"+n[o++].toSource();else{const ae=n[o++].value.toLowerCase();oe.push({name:ae,args:[]}),l.add(ae)}else if(E()){const ae=n[o++].value.toLowerCase();if(e.has(ae)?(oe.push({name:ae,args:U()}),l.add(ae)):j+=`:${ae}(${q()})`,u(),!x())throw c();o++}else throw c();else if(n[o]instanceof Jm){for(j+="[",o++;!(n[o]instanceof Pu)&&!k();)j+=n[o++].toSource();if(!(n[o]instanceof Pu))throw c();j+="]",o++}else throw c();if(!j&&!oe.length)throw c();return{css:j||void 0,functions:oe}}function q(){let j="",oe=1;for(;!k()&&((v()||E())&&oe++,x()&&oe--,!!oe);)j+=n[o++].toSource();return j}const F=U();if(!k())throw c();if(F.some(j=>typeof j!="object"||!("simples"in j)))throw new Et(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:F,names:Array.from(l)}}const Ou=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),rS=new Set(["left-of","right-of","above","below","near"]),ig=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 Yi(t){const e=oS(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const o=nS(r.body,ig);n.push({name:"css",body:o.selector,source:r.body});continue}if(Ou.has(r.name)){let o,l;try{const p=JSON.parse("["+r.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Et(`Malformed selector: ${r.name}=`+r.body);if(o=p[0],p.length===2){if(typeof p[1]!="number"||!rS.has(r.name))throw new Et(`Malformed selector: ${r.name}=`+r.body);l=p[1]}}catch{throw new Et(`Malformed selector: ${r.name}=`+r.body)}const c={name:r.name,source:r.body,body:{parsed:Yi(o),distance:l}},u=[...c.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=u?c.body.parsed.parts.indexOf(u):-1;d!==-1&&sS(c.body.parsed.parts.slice(0,d+1),n.slice(0,d+1))&&c.body.parsed.parts.splice(0,d+1),n.push(c);continue}n.push({...r,source:r.body})}if(Ou.has(n[0].name))throw new Et(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function sS(t,e){return Tn({parts:t})===Tn({parts:e})}function Tn(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let o=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(o=!1);const l=o?n.name+"=":"";return`${r===t.capture?"*":""}${l}${n.source}`}).join(" >> ")}function iS(t,e){const n=(r,o)=>{for(const l of r.parts)e(l,o),Ou.has(l.name)&&n(l.body.parsed,!0)};n(t,!1)}function oS(t){let e=0,n,r=0;const o={parts:[]},l=()=>{const u=t.substring(r,e).trim(),d=u.indexOf("=");let p,g;d!==-1&&u.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=u.substring(0,d).trim(),g=u.substring(d+1)):u.length>1&&u[0]==='"'&&u[u.length-1]==='"'||u.length>1&&u[0]==="'"&&u[u.length-1]==="'"?(p="text",g=u):/^\(*\/\//.test(u)||u.startsWith("..")?(p="xpath",g=u):(p="css",g=u);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),o.parts.push({name:p,body:g}),y){if(o.capture!==void 0)throw new Et("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!t.includes(">>"))return e=t.length,l(),o;const c=()=>{const d=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<t.length;){const u=t[e];u==="\\"&&e+1<t.length?e+=2:u===n?(n=void 0,e++):!n&&(u==='"'||u==="'"||u==="`")&&!c()?(n=u,e++):!n&&u===">"&&t[e+1]===">"?(l(),e+=2,r=e):e++}return l(),o}function Ir(t,e){let n=0,r=t.length===0;const o=()=>t[n]||"",l=()=>{const k=o();return++n,r=n>=t.length,k},c=k=>{throw r?new Et(`Unexpected end of selector while parsing selector \`${t}\``):new Et(`Error while parsing selector \`${t}\` - unexpected symbol "${o()}" at position ${n}`+(k?" during "+k:""))};function u(){for(;!r&&/\s/.test(o());)l()}function d(k){return k>="€"||k>="0"&&k<="9"||k>="A"&&k<="Z"||k>="a"&&k<="z"||k>="0"&&k<="9"||k==="_"||k==="-"}function p(){let k="";for(u();!r&&d(o());)k+=l();return k}function g(k){let C=l();for(C!==k&&c("parsing quoted string");!r&&o()!==k;)o()==="\\"&&l(),C+=l();return o()!==k&&c("parsing quoted string"),C+=l(),C}function y(){l()!=="/"&&c("parsing regular expression");let k="",C=!1;for(;!r;){if(o()==="\\")k+=l(),r&&c("parsing regular expression");else if(C&&o()==="]")C=!1;else if(!C&&o()==="[")C=!0;else if(!C&&o()==="/")break;k+=l()}l()!=="/"&&c("parsing regular expression");let A="";for(;!r&&o().match(/[dgimsuy]/);)A+=l();try{return new RegExp(k,A)}catch(U){throw new Et(`Error while parsing selector \`${t}\`: ${U.message}`)}}function v(){let k="";return u(),o()==="'"||o()==='"'?k=g(o()).slice(1,-1):k=p(),k||c("parsing property path"),k}function x(){u();let k="";return r||(k+=l()),!r&&k!=="="&&(k+=l()),["=","*=","^=","$=","|=","~="].includes(k)||c("parsing operator"),k}function E(){l();const k=[];for(k.push(v()),u();o()===".";)l(),k.push(v()),u();if(o()==="]")return l(),{name:k.join("."),jsonPath:k,op:"<truthy>",value:null,caseSensitive:!1};const C=x();let A,U=!0;if(u(),o()==="/"){if(C!=="=")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${C} in attribute with regular expression`);A=y()}else if(o()==="'"||o()==='"')A=g(o()).slice(1,-1),u(),o()==="i"||o()==="I"?(U=!1,l()):(o()==="s"||o()==="S")&&(U=!0,l());else{for(A="";!r&&(d(o())||o()==="+"||o()===".");)A+=l();A==="true"?A=!0:A==="false"?A=!1:e||(A=+A,Number.isNaN(A)&&c("parsing attribute value"))}if(u(),o()!=="]"&&c("parsing attribute value"),l(),C!=="="&&typeof A!="string")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${C} in attribute with non-string matching value - ${A}`);return{name:k.join("."),jsonPath:k,op:C,value:A,caseSensitive:U}}const S={name:"",attributes:[]};for(S.name=p(),u();o()==="[";)S.attributes.push(E()),u();if(r||c(void 0),!S.name&&!S.attributes.length)throw new Et(`Error while parsing selector \`${t}\` - selector cannot be empty`);return S}function na(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"`")+e;throw new Error("Invalid escape char")}function ql(t){return t.charAt(0).toUpperCase()+t.substring(1)}function og(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function gs(t){return`"${t.replace(/["\\]/g,e=>"\\"+e)}"`}let Er;function lS(){Er=new Map}function mt(t){let e=Er==null?void 0:Er.get(t);return e===void 0&&(e=t.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Er==null||Er.set(t,e)),e}function ra(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function lg(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function kt(t,e){return typeof t!="string"?lg(t):`${JSON.stringify(t)}${e?"s":"i"}`}function ht(t,e){return typeof t!="string"?lg(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function aS(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Up(t,e){return aS(t,e,"…")}function Vl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cS(t,e){const n=t.length,r=e.length;let o=0,l=0;const c=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=r;d++)t[u-1]===e[d-1]&&(c[u][d]=c[u-1][d-1]+1,c[u][d]>o&&(o=c[u][d],l=u));return t.slice(l-o,l)}function uS(t,e){try{const n=Yi(e),r=n.parts[n.parts.length-1];if((r==null?void 0:r.name)==="internal:describe"){const o=JSON.parse(r.body);if(typeof o=="string")return o}return br(new cg[t],n,!1,1)[0]}catch{return e}}function Lr(t,e,n=!1){return ag(t,e,n,1)[0]}function ag(t,e,n=!1,r=20,o){try{return br(new cg[t](o),Yi(e),n,r)}catch{return[e]}}function br(t,e,n=!1,r=20){const o=[...e.parts],l=[];let c=n?"frame-locator":"page";for(let u=0;u<o.length;u++){const d=o[u],p=c;if(c="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?l.push([t.generateLocator(p,"first",""),t.generateLocator(p,"nth","0")]):d.body==="-1"?l.push([t.generateLocator(p,"last",""),t.generateLocator(p,"nth","-1")]):l.push([t.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){l.push([t.generateLocator(p,"visible",d.body),t.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:S}=Ti(d.body);l.push([t.generateLocator(p,"text",S,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:S}=Ti(d.body);if(!E){l.push([t.generateLocator(p,"has-text",S,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:S}=Ti(d.body);if(!E){l.push([t.generateLocator(p,"has-not-text",S,{exact:E})]);continue}}if(d.name==="internal:has"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"has",S)));continue}if(d.name==="internal:has-not"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"hasNot",S)));continue}if(d.name==="internal:and"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"and",S)));continue}if(d.name==="internal:or"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"or",S)));continue}if(d.name==="internal:chain"){const E=br(t,d.body.parsed,!1,r);l.push(E.map(S=>t.generateLocator(p,"chain",S)));continue}if(d.name==="internal:label"){const{exact:E,text:S}=Ti(d.body);l.push([t.generateLocator(p,"label",S,{exact:E})]);continue}if(d.name==="internal:role"){const E=Ir(d.body,!0),S={attrs:[]};for(const k of E.attributes)k.name==="name"?(S.exact=k.caseSensitive,S.name=k.value):(k.name==="level"&&typeof k.value=="string"&&(k.value=+k.value),S.attrs.push({name:k.name==="include-hidden"?"includeHidden":k.name,value:k.value}));l.push([t.generateLocator(p,"role",E.name,S)]);continue}if(d.name==="internal:testid"){const E=Ir(d.body,!0),{value:S}=E.attributes[0];l.push([t.generateLocator(p,"test-id",S)]);continue}if(d.name==="internal:attr"){const E=Ir(d.body,!0),{name:S,value:k,caseSensitive:C}=E.attributes[0],A=k,U=!!C;if(S==="placeholder"){l.push([t.generateLocator(p,"placeholder",A,{exact:U})]);continue}if(S==="alt"){l.push([t.generateLocator(p,"alt",A,{exact:U})]);continue}if(S==="title"){l.push([t.generateLocator(p,"title",A,{exact:U})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=l[l.length-1],S=o[u-1],k=E.map(C=>t.chainLocators([C,t.generateLocator(p,"frame","")]));["xpath","css"].includes(S.name)&&k.push(t.generateLocator(p,"frame-locator",Tn({parts:[S]})),t.generateLocator(p,"frame-locator",Tn({parts:[S]},!0))),E.splice(0,E.length,...k),c="frame-locator";continue}const g=o[u+1],y=Tn({parts:[d]}),v=t.generateLocator(p,"default",y);if(g&&["internal:has-text","internal:has-not-text"].includes(g.name)){const{exact:E,text:S}=Ti(g.body);if(!E){const k=t.generateLocator("locator",g.name==="internal:has-text"?"has-text":"has-not-text",S,{exact:E}),C={};g.name==="internal:has-text"?C.hasText=S:C.hasNotText=S;const A=t.generateLocator(p,"default",y,C);l.push([t.chainLocators([v,k]),A]),u++;continue}}let x;if(["xpath","css"].includes(d.name)){const E=Tn({parts:[d]},!0);x=t.generateLocator(p,"default",E)}l.push([v,x].filter(Boolean))}return fS(t,l,r)}function fS(t,e,n){const r=e.map(()=>""),o=[],l=c=>{if(c===e.length)return o.push(t.chainLocators(r)),o.length<n;for(const u of e[c])if(r[c]=u,!l(c+1))return!1;return!0};return l(0),o}function Ti(t){let e=!1;const n=t.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(t.endsWith('"')?(t=JSON.parse(t),e=!0):t.endsWith('"s')?(t=JSON.parse(t.substring(0,t.length-1)),e=!0):t.endsWith('"i')&&(t=JSON.parse(t.substring(0,t.length-1)),e=!1),{exact:e,text:t})}class dS{constructor(e){this.preferredQuote=e}generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(o.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${r==="true"?"true":"false"} })`;case"role":const l=[];nt(o.name)?l.push(`name: ${this.regexToSourceString(o.name)}`):typeof o.name=="string"&&(l.push(`name: ${this.quote(o.name)}`),o.exact&&l.push("exact: true"));for(const{name:u,value:d}of o.attrs)l.push(`${u}: ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, { ${l.join(", ")} }`:"";return`getByRole(${this.quote(r)}${c})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!o.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("getByLabel",r,!!o.exact);case"title":return this.toCallWithExact("getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return ra(String(e))}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToSourceString(n)})`:r?`${e}(${this.quote(n)}, { exact: true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return na(e,this.preferredQuote??"'")}}class hS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(o.hasText)})`:o.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(o.hasNotText)})`:`locator(${this.quote(r)})`;case"frame-locator":return`frame_locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${r==="true"?"True":"False"})`;case"role":const l=[];nt(o.name)?l.push(`name=${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`name=${this.quote(o.name)}`),o.exact&&l.push("exact=True"));for(const{name:u,value:d}of o.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),l.push(`${og(u)}=${p}`)}const c=l.length?`, ${l.join(", ")}`:"";return`get_by_role(${this.quote(r)}${c})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!o.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!o.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!o.exact);case"label":return this.toCallWithExact("get_by_label",r,!!o.exact);case"title":return this.toCallWithExact("get_by_title",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${ra(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, exact=True)`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return na(e,'"')}}class pS{generateLocator(e,n,r,o={}){let l;switch(e){case"page":l="Page";break;case"frame-locator":l="FrameLocator";break;case"locator":l="Locator";break}switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasText(${this.toHasText(o.hasText)}))`:o.hasNotText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasNotText(${this.toHasText(o.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${l}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const c=[];nt(o.name)?c.push(`.setName(${this.regexToString(o.name)})`):typeof o.name=="string"&&(c.push(`.setName(${this.quote(o.name)})`),o.exact&&c.push(".setExact(true)"));for(const{name:d,value:p}of o.attrs)c.push(`.set${ql(d)}(${typeof p=="string"?this.quote(p):p})`);const u=c.length?`, new ${l}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${og(r).toUpperCase()}${u})`;case"has-text":return`filter(new ${l}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${l}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${l}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${l}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(l,"getByText",r,!!o.exact);case"alt":return this.toCallWithExact(l,"getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact(l,"getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact(l,"getByLabel",r,!!o.exact);case"title":return this.toCallWithExact(l,"getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(ra(e.source))}${n})`}toCallWithExact(e,n,r,o){return nt(r)?`${n}(${this.regexToString(r)})`:o?`${n}(${this.quote(r)}, new ${e}.${ql(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(e){return nt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}quote(e){return na(e,'"')}}class mS{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(o.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame-locator":return`FrameLocator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${r==="true"?"true":"false"} })`;case"role":const l=[];nt(o.name)?l.push(`NameRegex = ${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`Name = ${this.quote(o.name)}`),o.exact&&l.push("Exact = true"));for(const{name:u,value:d}of o.attrs)l.push(`${ql(u)} = ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, new() { ${l.join(", ")} }`:"";return`GetByRole(AriaRole.${ql(r)}${c})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!o.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!o.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(ra(e.source))}${n})`}toCallWithExact(e,n,r){return nt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, new() { Exact = true })`:`${e}(${this.quote(n)})`}toHasText(e){return nt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return nt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return nt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return na(e,'"')}}class gS{generateLocator(e,n,r,o={}){return JSON.stringify({kind:n,body:r,options:o})}chainLocators(e){const n=e.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const cg={javascript:dS,python:hS,java:pS,csharp:mS,jsonl:gS};function nt(t){return t instanceof RegExp}const Hp=new Map;function yS({name:t,rootItem:e,render:n,title:r,icon:o,isError:l,isVisible:c,selectedItem:u,onAccepted:d,onSelected:p,onHighlighted:g,treeState:y,setTreeState:v,noItemsMessage:x,dataTestId:E,autoExpandDepth:S}){const k=$.useMemo(()=>vS(e,u,y.expandedItems,S||0,c),[e,u,y,S,c]),C=$.useRef(null),[A,U]=$.useState(),[R,D]=$.useState(!1);$.useEffect(()=>{g==null||g(A)},[g,A]),$.useEffect(()=>{const q=C.current;if(!q)return;const F=()=>{Hp.set(t,q.scrollTop)};return q.addEventListener("scroll",F,{passive:!0}),()=>q.removeEventListener("scroll",F)},[t]),$.useEffect(()=>{C.current&&(C.current.scrollTop=Hp.get(t)||0)},[t]);const z=$.useCallback(q=>{const{expanded:F}=k.get(q);if(F){for(let j=u;j;j=j.parent)if(j===q){p==null||p(q);break}y.expandedItems.set(q.id,!1)}else y.expandedItems.set(q.id,!0);v({...y})},[k,u,p,y,v]);return w.jsx("div",{className:ze("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":E||t+"-tree",children:w.jsxs("div",{className:ze("tree-view-content"),tabIndex:0,onKeyDown:q=>{if(u&&q.key==="Enter"){d==null||d(u);return}if(q.key!=="ArrowDown"&&q.key!=="ArrowUp"&&q.key!=="ArrowLeft"&&q.key!=="ArrowRight")return;if(q.stopPropagation(),q.preventDefault(),u&&q.key==="ArrowLeft"){const{expanded:j,parent:oe}=k.get(u);j?(y.expandedItems.set(u.id,!1),v({...y})):oe&&(p==null||p(oe));return}if(u&&q.key==="ArrowRight"){u.children.length&&(y.expandedItems.set(u.id,!0),v({...y}));return}let F=u;if(q.key==="ArrowDown"&&(u?F=k.get(u).next:k.size&&(F=[...k.keys()][0])),q.key==="ArrowUp"){if(u)F=k.get(u).prev;else if(k.size){const j=[...k.keys()];F=j[j.length-1]}}g==null||g(void 0),F&&(D(!0),p==null||p(F)),U(void 0)},ref:C,children:[x&&k.size===0&&w.jsx("div",{className:"tree-view-empty",children:x}),e.children.map(q=>k.get(q)&&w.jsx(ug,{item:q,treeItems:k,selectedItem:u,onSelected:p,onAccepted:d,isError:l,toggleExpanded:z,highlightedItem:A,setHighlightedItem:U,render:n,icon:o,title:r,isKeyboardNavigation:R,setIsKeyboardNavigation:D},q.id))]})})}function ug({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:o,setHighlightedItem:l,isError:c,onAccepted:u,toggleExpanded:d,render:p,title:g,icon:y,isKeyboardNavigation:v,setIsKeyboardNavigation:x}){const E=$.useId(),S=$.useRef(null);$.useEffect(()=>{n===t&&v&&S.current&&(Rm(S.current),x(!1))},[t,n,v,x]);const k=e.get(t),C=k.depth,A=k.expanded;let U="codicon-blank";typeof A=="boolean"&&(U=A?"codicon-chevron-down":"codicon-chevron-right");const R=p(t),D=A&&t.children.length?t.children:[],z=g==null?void 0:g(t),q=(y==null?void 0:y(t))||"codicon-blank";return w.jsxs("div",{ref:S,role:"treeitem","aria-selected":t===n,"aria-expanded":A,"aria-controls":E,title:z,className:"vbox",style:{flex:"none"},children:[w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(t),className:ze("tree-view-entry",n===t&&"selected",o===t&&"highlighted",(c==null?void 0:c(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>l(t),onMouseLeave:()=>l(void 0),children:[C?new Array(C).fill(0).map((F,j)=>w.jsx("div",{className:"tree-view-indent"},"indent-"+j)):void 0,w.jsx("div",{"aria-hidden":"true",className:"codicon "+U,style:{minWidth:16,marginRight:4},onDoubleClick:F=>{F.preventDefault(),F.stopPropagation()},onClick:F=>{F.stopPropagation(),F.preventDefault(),d(t)}}),y&&w.jsx("div",{className:"codicon "+q,style:{minWidth:16,marginRight:4},"aria-label":"["+q.replace("codicon","icon")+"]"}),typeof R=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:R}):R]}),!!D.length&&w.jsx("div",{id:E,role:"group",children:D.map(F=>e.get(F)&&w.jsx(ug,{item:F,treeItems:e,selectedItem:n,onSelected:r,onAccepted:u,isError:c,toggleExpanded:d,highlightedItem:o,setHighlightedItem:l,render:p,title:g,icon:y,isKeyboardNavigation:v,setIsKeyboardNavigation:x},F.id))})]})}function vS(t,e,n,r,o=()=>!0){if(!o(t))return new Map;const l=new Map,c=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)c.add(p.id);let u=null;const d=(p,g)=>{for(const y of p.children){if(!o(y))continue;const v=c.has(y.id)||n.get(y.id),x=r>g&&l.size<25&&v!==!1,E=y.children.length?v??x:void 0,S={depth:g,expanded:E,parent:t===p?null:p,next:null,prev:u};u&&(l.get(u).next=y),u=y,l.set(y,S),E&&d(y,g+1)}};return d(t,0),l}const Ht=$.forwardRef(function({children:e,title:n="",icon:r,disabled:o=!1,toggled:l=!1,onClick:c=()=>{},style:u,testId:d,className:p,ariaLabel:g},y){return w.jsxs("button",{ref:y,className:ze(p,"toolbar-button",r,l&&"toggled"),onMouseDown:qp,onClick:c,onDoubleClick:qp,title:n,disabled:!!o,style:u,"data-testid":d,"aria-label":g||n,children:[r&&w.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),qp=t=>{t.stopPropagation(),t.preventDefault()};function fg(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function wS(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const SS=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser"}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context"}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.setStorageState",{title:"Set storage state",group:"configuration"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["BrowserContext.clockUninstall",{title:"Uninstall clock"}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0}],["Page.accessibilitySnapshot",{title:"Accessibility snapshot",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",snapshot:!0,group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0}],["ElementHandle.getAttribute",{title:"Get attribute",group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function xS(t,e){if(t)for(const n of e.split("|")){if(n==="url")try{const o=new URL(t[n]);return o.protocol==="data:"?o.protocol:o.protocol==="about:"?t[n]:o.pathname+o.search}catch{if(t[n]!==void 0)return t[n]}if(n==="timeNumber"&&t[n]!==void 0)return new Date(t[n]).toString();const r=_S(t,n);if(r!==void 0)return r}}function _S(t,e){const n=e.split(".");let r=t;for(const o of n){if(typeof r!="object"||r===null)return;r=r[o]}if(r!==void 0)return String(r)}const ES=yS,kS=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:o,onSelected:l,onHighlighted:c,revealConsole:u,revealAttachment:d,isLive:p})=>{const[g,y]=$.useState({expandedItems:new Map}),{rootItem:v,itemMap:x}=$.useMemo(()=>R0(t),[t]),{selectedItem:E}=$.useMemo(()=>({selectedItem:e?x.get(e.callId):void 0}),[x,e]),S=$.useCallback(D=>{var z,q;return!!((q=(z=D.action)==null?void 0:z.error)!=null&&q.message)},[]),k=$.useCallback(D=>r({minimum:D.action.startTime,maximum:D.action.endTime}),[r]),C=$.useCallback(D=>nf(D.action,{sdkLanguage:o,revealConsole:u,revealAttachment:d,isLive:p,showDuration:!0,showBadges:!0}),[p,u,d,o]),A=$.useCallback(D=>!n||!D.action||D.action.startTime<=n.maximum&&D.action.endTime>=n.minimum,[n]),U=$.useCallback(D=>{l==null||l(D.action)},[l]),R=$.useCallback(D=>{c==null||c(D==null?void 0:D.action)},[c]);return w.jsxs("div",{className:"vbox",children:[n&&w.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[w.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),w.jsx(ES,{name:"actions",rootItem:v,treeState:g,setTreeState:y,selectedItem:E,onSelected:U,onHighlighted:R,onAccepted:k,isError:S,isVisible:A,render:C})]})},nf=(t,e)=>{var k,C;const{sdkLanguage:n,revealConsole:r,revealAttachment:o,isLive:l,showDuration:c,showBadges:u}=e,{errors:d,warnings:p}=D0(t),g=!!((k=t.attachments)!=null&&k.length)&&!!o,y=t.params.selector?uS(n||"javascript",t.params.selector):void 0,v=t.class==="Test"&&t.method==="test.step"&&((C=t.annotations)==null?void 0:C.some(A=>A.type==="skip"));let x="";t.endTime?x=pt(t.endTime-t.startTime):t.error?x="Timed out":l||(x="-");const{elements:E,title:S}=bS(t);return w.jsxs("div",{className:"action-title vbox",children:[w.jsxs("div",{className:"hbox",children:[w.jsx("span",{className:"action-title-method",title:S,children:E}),(c||u||g||v)&&w.jsx("div",{className:"spacer"}),g&&w.jsx(Ht,{icon:"attach",title:"Open Attachment",onClick:()=>o(t.attachments[0])}),c&&!v&&w.jsx("div",{className:"action-duration",children:x||w.jsx("span",{className:"codicon codicon-loading"})}),v&&w.jsx("span",{className:ze("action-skipped","codicon",fg("skipped")),title:"skipped"}),u&&w.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!d&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-error"}),w.jsx("span",{className:"action-icon-value",children:d})]}),!!p&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-warning"}),w.jsx("span",{className:"action-icon-value",children:p})]})]})]}),y&&w.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function bS(t){var u;const e=t.title??((u=SS.get(t.class+"."+t.method))==null?void 0:u.title)??t.method,n=[],r=[];let o=0;const l=/\{([^}]+)\}/g;let c;for(;(c=l.exec(e))!==null;){const[d,p]=c,g=e.slice(o,c.index);n.push(g),r.push(g);const y=xS(t.params,p);y===void 0?(n.push(d),r.push(d)):c.index===0?(n.push(y),r.push(y)):(n.push(w.jsx("span",{className:"action-title-param",children:y})),r.push(y)),o=c.index+d.length}if(o<e.length){const d=e.slice(o);n.push(d),r.push(d)}return{elements:n,title:r.join("")}}const rf=({value:t,description:e})=>{const[n,r]=$.useState("copy"),o=$.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(c=>{navigator.clipboard.writeText(c).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return w.jsx(Ht,{title:e||"Copy",icon:n,onClick:o})},Ll=({value:t,description:e,copiedDescription:n=e,style:r})=>{const[o,l]=$.useState(!1),c=$.useCallback(async()=>{const u=typeof t=="function"?await t():t;await navigator.clipboard.writeText(u),l(!0),setTimeout(()=>l(!1),3e3)},[t]);return w.jsx(Ht,{style:r,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:o?n:e})},Pr=({text:t})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),TS=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=$.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(c=>c!=="info"),[t]);if(!t)return w.jsx(Pr,{text:"No action selected"});const o=t.startTime-e,l=pt(o);return w.jsxs("div",{className:"call-tab",children:[w.jsx("div",{className:"call-line",children:t.title}),w.jsx("div",{className:"call-section",children:"Time"}),w.jsx(Vp,{name:"start:",value:l}),w.jsx(Vp,{name:"duration:",value:CS(t)}),!!r.length&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Parameters"}),r.map(c=>Wp(Kp(t,c,t.params[c],n)))]}),!!t.result&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(c=>Wp(Kp(t,c,t.result[c],n)))]})]})},Vp=({name:t,value:e})=>w.jsxs("div",{className:"call-line",children:[t,w.jsx("span",{className:"call-value datetime",title:e,children:e})]});function CS(t){return t.endTime?pt(t.endTime-t.startTime):t.error?"Timed Out":"Running"}function Wp(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),w.jsxs("div",{className:"call-line",children:[t.name,":",w.jsx("span",{className:ze("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&w.jsx(rf,{value:t.text})]},t.name)}function Kp(t,e,n,r){const o=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&o)&&(n=Wl(n.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&o||e==="received"&&t.method==="expect")&&(n=Wl(n,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Lr(r||"javascript",t.params.selector),type:"locator",name:"locator"};const l=typeof n;return l!=="object"||n===null?{text:String(n),type:l,name:e}:n.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Wl(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Wl(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:o}of t.o)n[r]=Wl(o,e);return n}return t.h!==void 0?e===void 0?"<object>":e[t.h]:"<object>"}const Gp=new Map;function sa({name:t,items:e=[],id:n,render:r,icon:o,isError:l,isWarning:c,isInfo:u,selectedItem:d,onAccepted:p,onSelected:g,onHighlighted:y,onIconClicked:v,noItemsMessage:x,dataTestId:E,notSelectable:S,ariaLabel:k}){const C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{y==null||y(A)},[y,A]),$.useEffect(()=>{const R=C.current;if(!R)return;const D=()=>{Gp.set(t,R.scrollTop)};return R.addEventListener("scroll",D,{passive:!0}),()=>R.removeEventListener("scroll",D)},[t]),$.useEffect(()=>{C.current&&(C.current.scrollTop=Gp.get(t)||0)},[t]),w.jsx("div",{className:ze("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"aria-label":k,children:w.jsxs("div",{className:ze("list-view-content",S&&"not-selectable"),tabIndex:0,onKeyDown:R=>{var F;if(d&&R.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(R.key!=="ArrowDown"&&R.key!=="ArrowUp")return;R.stopPropagation(),R.preventDefault();const D=d?e.indexOf(d):-1;let z=D;R.key==="ArrowDown"&&(D===-1?z=0:z=Math.min(D+1,e.length-1)),R.key==="ArrowUp"&&(D===-1?z=e.length-1:z=Math.max(D-1,0));const q=(F=C.current)==null?void 0:F.children.item(z);Rm(q||void 0),y==null||y(void 0),g==null||g(e[z],z),U(void 0)},ref:C,children:[x&&e.length===0&&w.jsx("div",{className:"list-view-empty",children:x}),e.map((R,D)=>{const z=r(R,D);return w.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(R,D),role:"listitem",className:ze("list-view-entry",d===R&&"selected",!S&&A===R&&"highlighted",(l==null?void 0:l(R,D))&&"error",(c==null?void 0:c(R,D))&&"warning",(u==null?void 0:u(R,D))&&"info"),"aria-selected":d===R,onClick:()=>g==null?void 0:g(R,D),onMouseEnter:()=>U(R),onMouseLeave:()=>U(void 0),children:[o&&w.jsx("div",{className:"codicon "+(o(R,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:q=>{q.preventDefault(),q.stopPropagation()},onClick:q=>{q.stopPropagation(),q.preventDefault(),v==null||v(R,D)}}),typeof z=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:z}):z]},(n==null?void 0:n(R,D))||D)})]})})}const NS=sa,AS=({action:t,isLive:e})=>{const n=$.useMemo(()=>{var c;if(!t||!t.log.length)return[];const r=t.log,o=t.context.wallTime-t.context.startTime,l=[];for(let u=0;u<r.length;++u){let d="";if(r[u].time!==-1){const p=(c=r[u])==null?void 0:c.time;u+1<r.length?d=pt(r[u+1].time-p):t.endTime>0?d=pt(t.endTime-p):e?d=pt(Date.now()-o-p):d="-"}l.push({message:r[u].message,time:d})}return l},[t,e]);return n.length?w.jsx(NS,{name:"log",ariaLabel:"Log entries",items:n,render:r=>w.jsxs("div",{className:"log-list-item",children:[w.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):w.jsx(Pr,{text:"No log entries"})};function Wi(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let o,l={},c=!1,u=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(o=n.exec(t))!==null;){const[,,p,,g]=o;if(p){const y=+p;switch(y){case 0:l={};break;case 1:l["font-weight"]="bold";break;case 2:l.opacity="0.8";break;case 3:l["font-style"]="italic";break;case 4:l["text-decoration"]="underline";break;case 7:c=!0;break;case 8:l.display="none";break;case 9:l["text-decoration"]="line-through";break;case 22:delete l["font-weight"],delete l["font-style"],delete l.opacity,delete l["text-decoration"];break;case 23:delete l["font-weight"],delete l["font-style"],delete l.opacity;break;case 24:delete l["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:u=Qp[y-30];break;case 39:u=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=Qp[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:l["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:u=Jp[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=Jp[y-100];break}}else if(g){const y={...l},v=c?d:u;v!==void 0&&(y.color=v);const x=c?u:d;x!==void 0&&(y["background-color"]=x),r.push(`<span style="${LS(y)}">${IS(g)}</span>`)}}return r.join("")}const Qp={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)"},Jp={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 IS(t){return t.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function LS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const MS=({error:t})=>{const e=$.useMemo(()=>Wi(t),[t]);return w.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},dg=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(Mt.useEffect(()=>{const o=document.createElement("div");return o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.left="0",o.style.zIndex="9999",o.style.cursor=t,document.body.appendChild(o),e&&o.addEventListener("mousemove",e),n&&o.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&o.removeEventListener("mousemove",e),n&&o.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(o)}},[t,e,n,r]),w.jsx(w.Fragment,{})),jS={position:"absolute",top:0,right:0,bottom:0,left:0},hg=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:o,minColumnWidth:l})=>{const c=l||0,[u,d]=Mt.useState(null),[p,g]=jr(),y={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-o)/2,borderRightWidth:t==="horizontal"?(7-o)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-o)/2,borderLeftWidth:t==="horizontal"?(7-o)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return w.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-o)/2,zIndex:100,pointerEvents:"none"},ref:g,children:[!!u&&w.jsx(dg,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(u){const x=t==="horizontal"?v.clientX-u.clientX:v.clientY-u.clientY,E=u.offset+x,S=u.index>0?e[u.index-1]:0,k=t==="horizontal"?p.width:p.height,C=Math.min(Math.max(S+c,E),k-c)-e[u.index];for(let A=u.index;A<e.length;++A)e[A]=e[A]+C;n([...e])}}}),e.map((v,x)=>w.jsx("div",{style:{...y,top:t==="horizontal"?0:v,left:t==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:v,index:x}),children:w.jsx("div",{style:{...jS,background:r}})},x))]})};async function gu(t){const e=new Image;return t&&(e.src=t,await new Promise((n,r)=>{e.onload=n,e.onerror=n})),e}const Ru={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
43
43
  linear-gradient(-45deg, #80808020 25%, transparent 25%),
44
44
  linear-gradient(45deg, transparent 75%, #80808020 75%),
45
45
  linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
46
46
  rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
47
47
  rgb(0 0 0 / 10%) 0px -2px 4px,
48
48
  rgb(0 0 0 / 15%) 0px -6.1px 12px,
49
- rgb(0 0 0 / 25%) 0px 6px 12px`},PS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,E]=$.useState(null),[S,k]=jr();$.useEffect(()=>{(async()=>{var j,oe,ae,M;d(await gu((j=t.expected)==null?void 0:j.attachment.path)),g(((oe=t.expected)==null?void 0:oe.title)||"Expected"),v(await gu((ae=t.actual)==null?void 0:ae.attachment.path)),E(await gu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const C=u&&y&&x,A=C?Math.max(u.naturalWidth,y.naturalWidth,200):500,U=C?Math.max(u.naturalHeight,y.naturalHeight,200):500,R=Math.min(1,(S.width-30)/A),D=Math.min(1,(S.width-50)/A/2),z=A*R,q=U*R,F={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:k,children:C&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...F,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...F,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...F,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...F,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...F,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:q+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx(OS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*A,canvasHeight:D*U,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},OS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.useState(n/2),g=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!g&&w.jsx("span",{children:e.naturalWidth}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!g&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Ru},children:[w.jsx(hg,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Ru},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:o,height:l,margin:15,...Ru},children:w.jsx("img",{width:t.naturalWidth*c,height:t.naturalHeight*c,alt:e||n,style:{cursor:u?"pointer":"initial"},draggable:"false",src:t.src,onClick:u})})]}),RS="modulepreload",$S=function(t,e){return new URL(t,e).href},Xp={},DS=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const u=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(g=>{if(g=$S(g,r),g in Xp)return;Xp[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!r)for(let S=u.length-1;S>=0;S--){const k=u[S];if(k.href===g&&(!y||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":RS,y||(E.as="script"),E.crossOrigin="",E.href=g,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((S,k)=>{E.addEventListener("load",S),E.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},FS=20,Cs=({text:t,language:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:p,wrapLines:g,onChange:y,dataTestId:v,placeholder:x})=>{const[E,S]=jr(),[k]=$.useState(DS(()=>import("./codeMirrorModule-kKV6wiKW.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{(async()=>{var F,j;const R=await k;zS(R);const D=S.current;if(!D)return;const z=HS(e)||US(n)||(r?"text/linkified":"");if(C.current&&z===C.current.cm.getOption("mode")&&!!o===C.current.cm.getOption("readOnly")&&u===C.current.cm.getOption("lineNumbers")&&g===C.current.cm.getOption("lineWrapping")&&x===C.current.cm.getOption("placeholder"))return;(j=(F=C.current)==null?void 0:F.cm)==null||j.getWrapperElement().remove();const q=R(D,{value:"",mode:z,readOnly:!!o,lineNumbers:u,lineWrapping:g,placeholder:x});return C.current={cm:q},d&&q.focus(),U(q),q})()},[k,A,S,e,n,r,u,g,o,d,x]),$.useEffect(()=>{C.current&&C.current.cm.setSize(E.width,E.height)},[E]),$.useLayoutEffect(()=>{var z;if(!A)return;let R=!1;if(A.getValue()!==t&&(A.setValue(t),R=!0,p&&(A.execCommand("selectAll"),A.focus())),R||JSON.stringify(l)!==JSON.stringify(C.current.highlight)){for(const j of C.current.highlight||[])A.removeLineClass(j.line-1,"wrap");for(const j of l||[])A.addLineClass(j.line-1,"wrap",`source-line-${j.type}`);for(const j of C.current.widgets||[])A.removeLineWidget(j);for(const j of C.current.markers||[])j.clear();const q=[],F=[];for(const j of l||[]){if(j.type!=="subtle-error"&&j.type!=="error")continue;const oe=(z=C.current)==null?void 0:z.cm.getLine(j.line-1);if(oe){const ae={};ae.title=j.message||"",F.push(A.markText({line:j.line-1,ch:0},{line:j.line-1,ch:j.column||oe.length},{className:"source-line-error-underline",attributes:ae}))}if(j.type==="error"){const ae=document.createElement("div");ae.innerHTML=Wi(j.message||""),ae.className="source-line-error-widget",q.push(A.addLineWidget(j.line,ae,{above:!0,coverGutter:!1}))}}C.current.highlight=l,C.current.widgets=q,C.current.markers=F}typeof c=="number"&&C.current.cm.lineCount()>=c&&A.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return y&&(D=()=>y(A.getValue()),A.on("change",D)),()=>{D&&A.off("change",D)}},[A,t,l,c,p,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:BS})};function BS(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let Yp=!1;function zS(t){Yp||(Yp=!0,t.defineSimpleMode("text/linkified",{start:[{regex:$m,token:"linkified"}]}))}function US(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function HS(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}function qS(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const VS=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:o})=>{const l=$.useId();return w.jsxs("div",{className:ze("expandable",r&&"expanded"),children:[w.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":l,className:"expandable-title",onClick:()=>o&&n(!r),children:[w.jsx("div",{className:ze("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!o&&n(!r)}),t]}),r&&w.jsx("div",{id:l,role:"region",style:{marginLeft:25},children:e})]})};function pg(t){const e=[];let n=0,r;for(;(r=$m.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(WS(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function WS(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const KS=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,p]=_0(),g=$.useRef(null),y=qS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=g.current)==null||S.scrollIntoView({behavior:"smooth"}),p()},[e,p]),$.useEffect(()=>{n&&o===null&&c===null&&(u("Loading ..."),fetch(ia(t)).then(S=>S.text()).then(S=>{l(S),u(null)}).catch(S=>{u("Failed to load: "+S.message)}))},[n,o,c,t]);const x=$.useMemo(()=>{const S=o?o.split(`
49
+ rgb(0 0 0 / 25%) 0px 6px 12px`},PS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,E]=$.useState(null),[S,k]=jr();$.useEffect(()=>{(async()=>{var j,oe,ae,M;d(await gu((j=t.expected)==null?void 0:j.attachment.path)),g(((oe=t.expected)==null?void 0:oe.title)||"Expected"),v(await gu((ae=t.actual)==null?void 0:ae.attachment.path)),E(await gu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const C=u&&y&&x,A=C?Math.max(u.naturalWidth,y.naturalWidth,200):500,U=C?Math.max(u.naturalHeight,y.naturalHeight,200):500,R=Math.min(1,(S.width-30)/A),D=Math.min(1,(S.width-50)/A/2),z=A*R,q=U*R,F={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:k,children:C&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...F,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...F,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...F,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...F,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...F,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:q+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx(OS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*A,canvasHeight:D*U,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},OS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.useState(n/2),g=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!g&&w.jsx("span",{children:e.naturalWidth}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!g&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Ru},children:[w.jsx(hg,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Ru},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:o,height:l,margin:15,...Ru},children:w.jsx("img",{width:t.naturalWidth*c,height:t.naturalHeight*c,alt:e||n,style:{cursor:u?"pointer":"initial"},draggable:"false",src:t.src,onClick:u})})]}),RS="modulepreload",$S=function(t,e){return new URL(t,e).href},Xp={},DS=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const u=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(g=>{if(g=$S(g,r),g in Xp)return;Xp[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!r)for(let S=u.length-1;S>=0;S--){const k=u[S];if(k.href===g&&(!y||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":RS,y||(E.as="script"),E.crossOrigin="",E.href=g,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((S,k)=>{E.addEventListener("load",S),E.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},FS=20,Cs=({text:t,language:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:p,wrapLines:g,onChange:y,dataTestId:v,placeholder:x})=>{const[E,S]=jr(),[k]=$.useState(DS(()=>import("./codeMirrorModule-NFqbwr7X.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{(async()=>{var F,j;const R=await k;zS(R);const D=S.current;if(!D)return;const z=HS(e)||US(n)||(r?"text/linkified":"");if(C.current&&z===C.current.cm.getOption("mode")&&!!o===C.current.cm.getOption("readOnly")&&u===C.current.cm.getOption("lineNumbers")&&g===C.current.cm.getOption("lineWrapping")&&x===C.current.cm.getOption("placeholder"))return;(j=(F=C.current)==null?void 0:F.cm)==null||j.getWrapperElement().remove();const q=R(D,{value:"",mode:z,readOnly:!!o,lineNumbers:u,lineWrapping:g,placeholder:x});return C.current={cm:q},d&&q.focus(),U(q),q})()},[k,A,S,e,n,r,u,g,o,d,x]),$.useEffect(()=>{C.current&&C.current.cm.setSize(E.width,E.height)},[E]),$.useLayoutEffect(()=>{var z;if(!A)return;let R=!1;if(A.getValue()!==t&&(A.setValue(t),R=!0,p&&(A.execCommand("selectAll"),A.focus())),R||JSON.stringify(l)!==JSON.stringify(C.current.highlight)){for(const j of C.current.highlight||[])A.removeLineClass(j.line-1,"wrap");for(const j of l||[])A.addLineClass(j.line-1,"wrap",`source-line-${j.type}`);for(const j of C.current.widgets||[])A.removeLineWidget(j);for(const j of C.current.markers||[])j.clear();const q=[],F=[];for(const j of l||[]){if(j.type!=="subtle-error"&&j.type!=="error")continue;const oe=(z=C.current)==null?void 0:z.cm.getLine(j.line-1);if(oe){const ae={};ae.title=j.message||"",F.push(A.markText({line:j.line-1,ch:0},{line:j.line-1,ch:j.column||oe.length},{className:"source-line-error-underline",attributes:ae}))}if(j.type==="error"){const ae=document.createElement("div");ae.innerHTML=Wi(j.message||""),ae.className="source-line-error-widget",q.push(A.addLineWidget(j.line,ae,{above:!0,coverGutter:!1}))}}C.current.highlight=l,C.current.widgets=q,C.current.markers=F}typeof c=="number"&&C.current.cm.lineCount()>=c&&A.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return y&&(D=()=>y(A.getValue()),A.on("change",D)),()=>{D&&A.off("change",D)}},[A,t,l,c,p,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:BS})};function BS(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let Yp=!1;function zS(t){Yp||(Yp=!0,t.defineSimpleMode("text/linkified",{start:[{regex:$m,token:"linkified"}]}))}function US(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function HS(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}function qS(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const VS=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:o})=>{const l=$.useId();return w.jsxs("div",{className:ze("expandable",r&&"expanded"),children:[w.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":l,className:"expandable-title",onClick:()=>o&&n(!r),children:[w.jsx("div",{className:ze("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!o&&n(!r)}),t]}),r&&w.jsx("div",{id:l,role:"region",style:{marginLeft:25},children:e})]})};function pg(t){const e=[];let n=0,r;for(;(r=$m.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(WS(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function WS(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const KS=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,p]=_0(),g=$.useRef(null),y=qS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=g.current)==null||S.scrollIntoView({behavior:"smooth"}),p()},[e,p]),$.useEffect(()=>{n&&o===null&&c===null&&(u("Loading ..."),fetch(ia(t)).then(S=>S.text()).then(S=>{l(S),u(null)}).catch(S=>{u("Failed to load: "+S.message)}))},[n,o,c,t]);const x=$.useMemo(()=>{const S=o?o.split(`
50
50
  `).length:0;return Math.min(Math.max(5,S),20)*FS},[o]),E=w.jsxs("span",{style:{marginLeft:5},ref:g,"aria-label":t.name,children:[w.jsx("span",{children:pg(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Ml(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:E}):w.jsxs("div",{className:ze(d&&"yellow-flash"),children:[w.jsx(VS,{title:E,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:c&&w.jsx("i",{children:c})}),n&&o!==null&&w.jsx("div",{className:"vbox",style:{height:x},children:w.jsx(Cs,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},GS=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:o}=$.useMemo(()=>{const l=new Set((t==null?void 0:t.visibleAttachments)??[]),c=new Set,u=new Map;for(const d of l){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const g=p[1],y=p[2],v=u.get(g)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,u.set(g,v),l.delete(d)}else d.contentType.startsWith("image/")&&(c.add(d),l.delete(d))}return{diffMap:u,attachments:l,screenshots:c}},[t]);return!n.size&&!r.size&&!o.size?w.jsx(Pr,{text:"No attachments"}):w.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:l,actual:c,diff:u})=>w.jsxs(w.Fragment,{children:[l&&c&&w.jsx("div",{className:"attachments-section",children:"Image diff"}),l&&c&&w.jsx(PS,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...l,path:Ml(l)},title:"Expected"},actual:{attachment:{...c,path:Ml(c)}},diff:u?{attachment:{...u,path:Ml(u)}}:void 0}})]})),r.size?w.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((l,c)=>{const u=ia(l);return w.jsxs("div",{className:"attachment-item",children:[w.jsx("div",{children:w.jsx("img",{draggable:"false",src:u})}),w.jsx("div",{children:w.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:l.name})})]},`screenshot-${c}`)}),o.size?w.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((l,c)=>w.jsx("div",{className:"attachment-item",children:w.jsx(KS,{attachment:l,reveal:e&&QS(l,e[0])?e:void 0})},JS(l,c)))]})};function QS(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function ia(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function Ml(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),ia(t,e)}function JS(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const XS=`
51
51
  # Instructions
52
52
 
@@ -253,4 +253,4 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
253
253
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
254
254
  `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,l=o&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&n.sep&&!n.value){const u=[];for(let d=0;d<n.sep.length;++d){const p=n.sep[d];switch(p.type){case"newline":u.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(c.push(this.sourceToken),e.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Tr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(uv(n.key)&&!Tr(n.sep,"newline")){const u=ms(n.start),d=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:d,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(Tr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=ms(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?e.items.push({start:c,key:null,sep:[this.sourceToken]}):Tr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);l||n.value?(e.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(e);if(u){o&&u.type!=="block-seq"&&e.items.push({start:c}),this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Tr(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:o,sep:[]}):n.sep?this.stack.push(o):Object.assign(n,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const o=Tl(r),l=ms(o);Lm(e);const c=e.end.splice(1,e.end.length);c.push(this.sourceToken);const u={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:l,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
255
255
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
256
- `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Tl(e),r=ms(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Tl(e),r=ms(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function fv(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new cv||null,prettyErrors:e}}function lk(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new zf(n==null?void 0:n.addNewLine),l=new Bf(e),c=Array.from(l.compose(o.parse(t)));if(r&&n)for(const u of c)u.errors.forEach(ea(t,n)),u.warnings.forEach(ea(t,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function dv(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new zf(n==null?void 0:n.addNewLine),l=new Bf(e);let c=null;for(const u of l.compose(o.parse(t),!0,t.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new Ar(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(c.errors.forEach(ea(t,n)),c.warnings.forEach(ea(t,n))),c}function ak(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const o=dv(t,n);if(!o)return null;if(o.warnings.forEach(l=>My(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function ck(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){const{keepUndefined:o}=n??e??{};if(!o)return}return Rr(t)&&!r?t.toString(n):new Fs(t,r,n).toString(n)}const hv=Object.freeze(Object.defineProperty({__proto__:null,Alias:ca,CST:sk,Composer:Bf,Document:Fs,Lexer:av,LineCounter:cv,Pair:ct,Parser:zf,Scalar:ue,Schema:va,YAMLError:Df,YAMLMap:Lt,YAMLParseError:Ar,YAMLSeq:nr,YAMLWarning:Xy,isAlias:Or,isCollection:Re,isDocument:Rr,isMap:Os,isNode:$e,isPair:je,isScalar:Te,isSeq:Rs,parse:ak,parseAllDocuments:lk,parseDocument:dv,stringify:ck,visit:tr,visitAsync:aa},Symbol.toStringTag,{value:"Module"})),uk=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const[u,d]=$.useState("action"),[p]=Nn("shouldPopulateCanvasFromScreenshot",!1),g=$.useMemo(()=>pk(t),[t]),{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}=$.useMemo(()=>{const S=g[u];return S?mk(S,p):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[g,u,p]),E=$.useMemo(()=>y!==void 0?{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}:void 0,[y,v,x]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(sf,{children:[w.jsx(Ht,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>o(!r)}),["action","before","after"].map(S=>w.jsx(yg,{id:S,title:hk(S),selected:u===S,onSelect:()=>d(S)},S)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(Ht,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(E!=null&&E.popoutUrl),onClick:()=>{const S=window.open((E==null?void 0:E.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{new gy(S,{isUnderTest:mv,sdkLanguage:e,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(fk,{snapshotUrls:E,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})]})},fk=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const u=$.useRef(null),d=$.useRef(null),[p,g]=$.useState({viewport:gv,url:""}),y=$.useRef({iteration:0,visibleIframe:0});return $.useEffect(()=>{(async()=>{const v=y.current.iteration+1,x=1-y.current.visibleIframe;y.current.iteration=v;const E=await gk(t==null?void 0:t.snapshotInfoUrl);if(y.current.iteration!==v)return;const S=[u,d][x].current;if(S){let k=()=>{};const C=new Promise(A=>k=A);try{S.addEventListener("load",k),S.addEventListener("error",k);const A=(t==null?void 0:t.snapshotUrl)||yk;S.contentWindow?S.contentWindow.location.replace(A):S.src=A,await C}catch{}finally{S.removeEventListener("load",k),S.removeEventListener("error",k)}}y.current.iteration===v&&(y.current.visibleIframe=x,g(E))})()},[t]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&r&&o(!1)},children:[w.jsx(Mm,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:u.current,iteration:y.current.iteration}),w.jsx(Mm,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:d.current,iteration:y.current.iteration}),w.jsx(dk,{snapshotInfo:p,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:u,name:"snapshot",title:"DOM Snapshot",className:ze(y.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:ze(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},dk=({snapshotInfo:t,children:e})=>{const[n,r]=jr(),l={width:t.viewport.width,height:t.viewport.height+40},c=Math.min(n.width/l.width,n.height/l.height,1),u={x:(n.width-l.width)/2,y:(n.height-l.height)/2};return w.jsx("div",{ref:r,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:l.width+"px",height:l.height+"px",transform:`translate(${u.x}px, ${u.y}px) scale(${c})`},children:[w.jsx(eE,{url:t.url}),e]})})};function hk(t){return t==="before"?"Before":t==="after"?"After":t==="action"?"Action":t}const Mm=({iframe:t,isInspecting:e,sdkLanguage:n,testIdAttributeName:r,highlightedElement:o,setHighlightedElement:l,iteration:c})=>($.useEffect(()=>{const u=o.lastEdited==="ariaSnapshot"?o.ariaSnapshot:void 0,d=o.lastEdited==="locator"?o.locator:void 0,p=!!u||!!d||e,g=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{pv(g,p,n,r,y,"",t==null?void 0:t.contentWindow)}catch{}const v=u?of(hv,u):void 0,x=d?Y_(n,d,r):void 0;for(const{recorder:E,frameSelector:S}of g){const k=x!=null&&x.startsWith(S)?x.substring(S.length).trim():void 0,C=(v==null?void 0:v.errors.length)===0?v.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:k,ariaTemplate:C,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(A){l({locator:Lr(n,S+A.selector),ariaSnapshot:A.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const A of g)A.recorder!==E&&A.recorder.clearHighlight()}})}},[t,e,o,l,n,r,c]),w.jsx(w.Fragment,{}));function pv(t,e,n,r,o,l,c){if(!c)return;const u=c;if(!u._recorder&&e){const d=new gy(c,{isUnderTest:o,sdkLanguage:n,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new V_(d);u._injectedScript=d,u._recorder={recorder:p,frameSelector:l},o&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}u._recorder&&t.push(u._recorder);for(let d=0;d<c.frames.length;++d){const p=c.frames[d],g=p.frameElement?u._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";pv(t,e,n,r,o,l+g,p)}}function pk(t){if(!t)return{};let e=t.beforeSnapshot?{action:t,snapshotName:t.beforeSnapshot}:void 0;if(!e){for(let o=Dp(t);o;o=Dp(o))if(o.endTime<=t.startTime&&o.afterSnapshot){e={action:o,snapshotName:o.afterSnapshot};break}}let n=t.afterSnapshot?{action:t,snapshotName:t.afterSnapshot}:void 0;if(!n){let o;for(let l=Fp(t);l&&l.startTime<=t.endTime;l=Fp(l))l.endTime>t.endTime||!l.afterSnapshot||o&&o.endTime>l.endTime||(o=l);o?n={action:o,snapshotName:o.afterSnapshot}:n=e}const r=t.inputSnapshot?{action:t,snapshotName:t.inputSnapshot,hasInputTarget:!0}:n;return r&&(r.point=t.point),{action:r,before:e,after:n}}const mv=new URLSearchParams(window.location.search).has("isUnderTest"),jm=new URLSearchParams(window.location.search).get("server");function mk(t,e){const n=new URLSearchParams;n.set("trace",zl(t.action).traceUrl),n.set("name",t.snapshotName),mv&&n.set("isUnderTest","true"),t.point&&(n.set("pointX",String(t.point.x)),n.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1")),e&&n.set("shouldPopulateCanvasFromScreenshot","1");const r=new URL(`snapshot/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),l=new URLSearchParams;l.set("r",r),jm&&l.set("server",jm),l.set("trace",zl(t.action).traceUrl),t.point&&(l.set("pointX",String(t.point.x)),l.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1"));const c=new URL(`snapshot.html?${l.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:r,popoutUrl:c}}async function gk(t){const e={url:"",viewport:gv,timestamp:void 0,wallTime:void 0};if(t){const r=await(await fetch(t)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const gv={width:1280,height:720},yk='data:text/html,<body style="background: #ddd"></body>',yv={width:200,height:45},ys=2.5,vk=yv.height+ys*2,wk=({model:t,boundaries:e,previewPoint:n})=>{var g,y;const[r,o]=jr(),l=$.useRef(null);let c=0;if(l.current&&n){const v=l.current.getBoundingClientRect();c=(n.clientY-v.top+l.current.scrollTop)/vk|0}const u=(y=(g=t==null?void 0:t.pages)==null?void 0:g[c])==null?void 0:y.screencastFrames;let d,p;if(n!==void 0&&u&&u.length){const v=e.minimum+(e.maximum-e.minimum)*n.x/r.width;d=u[Om(u,v,vv)-1];const x={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?wv({width:d.width,height:d.height},x):void 0}return w.jsxs("div",{className:"film-strip",ref:o,children:[w.jsx("div",{className:"film-strip-lanes",ref:l,children:t==null?void 0:t.pages.map((v,x)=>v.screencastFrames.length?w.jsx(Sk,{boundaries:e,page:v,width:r.width},x):null)}),(n==null?void 0:n.x)!==void 0&&w.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(n.x,r.width-(p?p.width:0)-10)},children:[n.action&&w.jsx("div",{className:"film-strip-hover-title",children:nf(n.action,n)}),d&&p&&w.jsx("div",{style:{width:p.width,height:p.height},children:w.jsx("img",{src:`sha1/${d.sha1}`,width:p.width,height:p.height})})]})]})},Sk=({boundaries:t,page:e,width:n})=>{const r={width:0,height:0},o=e.screencastFrames;for(const S of o)r.width=Math.max(r.width,S.width),r.height=Math.max(r.height,S.height);const l=wv(r,yv),c=o[0].timestamp,u=o[o.length-1].timestamp,d=t.maximum-t.minimum,p=(c-t.minimum)/d*n,g=(t.maximum-u)/d*n,v=(u-c)/d*n/(l.width+2*ys)|0,x=(u-c)/v,E=[];for(let S=0;c&&x&&S<v;++S){const k=c+x*S,C=Om(o,k,vv)-1;E.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[C].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},S))}return E.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[o.length-1].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},E.length)),w.jsx("div",{className:"film-strip-lane",style:{marginLeft:p+"px",marginRight:g+"px"},children:E})};function vv(t,e){return t-e.timestamp}function wv(t,e){const n=Math.max(t.width/e.width,t.height/e.height);return{width:t.width/n|0,height:t.height/n|0}}const xk=({model:t,boundaries:e,consoleEntries:n,onSelected:r,highlightedAction:o,highlightedEntry:l,highlightedConsoleEntry:c,selectedTime:u,setSelectedTime:d,sdkLanguage:p})=>{const[g,y]=jr(),[v,x]=$.useState(),[E,S]=$.useState(),[k]=Nn("showAllActions",!1),{offsets:C,curtainLeft:A,curtainRight:U}=$.useMemo(()=>{let M=u||e;if(v&&v.startX!==v.endX){const pe=un(g.width,e,v.startX),ge=un(g.width,e,v.endX);M={minimum:Math.min(pe,ge),maximum:Math.max(pe,ge)}}const H=Ft(g.width,e,M.minimum),xe=Ft(g.width,e,e.maximum)-Ft(g.width,e,M.maximum);return{offsets:_k(g.width,e),curtainLeft:H,curtainRight:xe}},[u,e,v,g]),R=$.useMemo(()=>t==null?void 0:t.filteredActions(k),[t,k]),D=$.useMemo(()=>{const M=[];for(const H of R||[])H.class!=="Test"&&M.push({action:H,leftTime:H.startTime,rightTime:H.endTime||e.maximum,leftPosition:Ft(g.width,e,H.startTime),rightPosition:Ft(g.width,e,H.endTime||e.maximum),active:!1,error:!!H.error});for(const H of(t==null?void 0:t.resources)||[]){const fe=H._monotonicTime,xe=H._monotonicTime+H.time;M.push({resource:H,leftTime:fe,rightTime:xe,leftPosition:Ft(g.width,e,fe),rightPosition:Ft(g.width,e,xe),active:!1,error:!1})}for(const H of n||[])M.push({consoleMessage:H,leftTime:H.timestamp,rightTime:H.timestamp,leftPosition:Ft(g.width,e,H.timestamp),rightPosition:Ft(g.width,e,H.timestamp),active:!1,error:H.isError});return M},[t,R,n,e,g]);$.useMemo(()=>{for(const M of D)o?M.active=M.action===o:l?M.active=M.resource===l:c?M.active=M.consoleMessage===c:M.active=!1},[D,o,l,c]);const z=$.useCallback(M=>{if(S(void 0),!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(g.width,e,H),xe=u?Ft(g.width,e,u.minimum):0,pe=u?Ft(g.width,e,u.maximum):0;u&&Math.abs(H-xe)<10?x({startX:pe,endX:H,type:"resize"}):u&&Math.abs(H-pe)<10?x({startX:xe,endX:H,type:"resize"}):u&&fe>u.minimum&&fe<u.maximum&&M.clientY-y.current.getBoundingClientRect().top<20?x({startX:xe,endX:pe,pivot:H,type:"move"}):x({startX:H,endX:H,type:"resize"})},[e,g,y,u]),q=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(g.width,e,H),xe=R==null?void 0:R.findLast(ne=>ne.startTime<=fe);if(!M.buttons){x(void 0);return}if(xe&&r(xe),!v)return;let pe=v;if(v.type==="resize")pe={...v,endX:H};else{const ne=H-v.pivot;let J=v.startX+ne,I=v.endX+ne;J<0&&(J=0,I=J+(v.endX-v.startX)),I>g.width&&(I=g.width,J=I-(v.endX-v.startX)),pe={...v,startX:J,endX:I,pivot:H}}x(pe);const ge=un(g.width,e,pe.startX),Q=un(g.width,e,pe.endX);ge!==Q&&d({minimum:Math.min(ge,Q),maximum:Math.max(ge,Q)})},[e,v,g,R,r,y,d]),F=$.useCallback(()=>{if(S(void 0),!!v){if(v.startX!==v.endX){const M=un(g.width,e,v.startX),H=un(g.width,e,v.endX);d({minimum:Math.min(M,H),maximum:Math.max(M,H)})}else{const M=un(g.width,e,v.startX),H=R==null?void 0:R.findLast(fe=>fe.startTime<=M);H&&r(H),d(void 0)}x(void 0)}},[e,v,g,R,d,r]),j=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(g.width,e,H),xe=R==null?void 0:R.findLast(pe=>pe.startTime<=fe);S({x:H,clientY:M.clientY,action:xe,sdkLanguage:p})},[e,g,R,y,p]),oe=$.useCallback(()=>{S(void 0)},[]),ae=$.useCallback(()=>{d(void 0)},[d]);return w.jsxs("div",{style:{flex:"none",borderBottom:"1px solid var(--vscode-panel-border)"},children:[!!v&&w.jsx(dg,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:F,onPaneMouseMove:q,onPaneDoubleClick:ae}),w.jsxs("div",{ref:y,className:"timeline-view",onMouseDown:z,onMouseMove:j,onMouseLeave:oe,children:[w.jsx("div",{className:"timeline-grid",children:C.map((M,H)=>w.jsx("div",{className:"timeline-divider",style:{left:M.position+"px"},children:w.jsx("div",{className:"timeline-time",children:pt(M.time-e.minimum)})},H))}),w.jsx("div",{style:{height:8}}),w.jsx(wk,{model:t,boundaries:e,previewPoint:E}),w.jsx("div",{className:"timeline-bars",children:D.map((M,H)=>w.jsx("div",{className:ze("timeline-bar",M.action&&"action",M.resource&&"network",M.consoleMessage&&"console-message",M.active&&"active",M.error&&"error"),style:{left:M.leftPosition,width:Math.max(5,M.rightPosition-M.leftPosition),top:Ek(M),bottom:0}},H))}),w.jsx("div",{className:"timeline-marker",style:{display:E!==void 0?"block":"none",left:((E==null?void 0:E.x)||0)+"px"}}),u&&w.jsxs("div",{className:"timeline-window",children:[w.jsx("div",{className:"timeline-window-curtain left",style:{width:A}}),w.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),w.jsx("div",{className:"timeline-window-center",children:w.jsx("div",{className:"timeline-window-drag"})}),w.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),w.jsx("div",{className:"timeline-window-curtain right",style:{width:U}})]})]})]})};function _k(t,e){let r=t/64;const o=e.maximum-e.minimum,l=t/o;let c=o/r;const u=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,u),c*l>=5*64&&(c=c/5),c*l>=2*64&&(c=c/2);const d=e.minimum;let p=e.maximum;p+=64/l,r=Math.ceil((p-d)/c),c||(r=0);const g=[];for(let y=0;y<r;++y){const v=d+c*y;g.push({position:Ft(t,e,v),time:v})}return g}function Ft(t,e,n){return(n-e.minimum)/(e.maximum-e.minimum)*t}function un(t,e,n){return n/t*(e.maximum-e.minimum)+e.minimum}function Ek(t){return t.resource?25:20}const kk=({model:t})=>{var n,r;if(!t)return w.jsx(w.Fragment,{});const e=t.wallTime!==void 0?new Date(t.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return w.jsxs("div",{className:"vbox",style:{flexShrink:0},children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&w.jsxs("div",{className:"call-line",children:["start time:",w.jsx("span",{className:"call-value datetime",title:e,children:e})]}),w.jsxs("div",{className:"call-line",children:["duration:",w.jsx("span",{className:"call-value number",title:pt(t.endTime-t.startTime),children:pt(t.endTime-t.startTime)})]}),w.jsx("div",{className:"call-section",children:"Browser"}),w.jsxs("div",{className:"call-line",children:["engine:",w.jsx("span",{className:"call-value string",title:t.browserName,children:t.browserName})]}),t.channel&&w.jsxs("div",{className:"call-line",children:["channel:",w.jsx("span",{className:"call-value string",title:t.channel,children:t.channel})]}),t.platform&&w.jsxs("div",{className:"call-line",children:["platform:",w.jsx("span",{className:"call-value string",title:t.platform,children:t.platform})]}),t.options.userAgent&&w.jsxs("div",{className:"call-line",children:["user agent:",w.jsx("span",{className:"call-value datetime",title:t.options.userAgent,children:t.options.userAgent})]}),t.options.baseURL&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),w.jsxs("div",{className:"call-line",children:["baseURL:",w.jsx("a",{className:"call-value string",href:t.options.baseURL,title:t.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:t.options.baseURL})]})]}),w.jsx("div",{className:"call-section",children:"Viewport"}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["width:",w.jsx("span",{className:"call-value number",title:String(!!((n=t.options.viewport)!=null&&n.width)),children:t.options.viewport.width})]}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["height:",w.jsx("span",{className:"call-value number",title:String(!!((r=t.options.viewport)!=null&&r.height)),children:t.options.viewport.height})]}),w.jsxs("div",{className:"call-line",children:["is mobile:",w.jsx("span",{className:"call-value boolean",title:String(!!t.options.isMobile),children:String(!!t.options.isMobile)})]}),t.options.deviceScaleFactor&&w.jsxs("div",{className:"call-line",children:["device scale:",w.jsx("span",{className:"call-value number",title:String(t.options.deviceScaleFactor),children:String(t.options.deviceScaleFactor)})]}),w.jsx("div",{className:"call-section",children:"Counts"}),w.jsxs("div",{className:"call-line",children:["pages:",w.jsx("span",{className:"call-value number",children:t.pages.length})]}),w.jsxs("div",{className:"call-line",children:["actions:",w.jsx("span",{className:"call-value number",children:t.actions.length})]}),w.jsxs("div",{className:"call-line",children:["events:",w.jsx("span",{className:"call-value number",children:t.events.length})]})]})},bk=({annotations:t})=>t.length?w.jsx("div",{className:"annotations-tab",children:t.map((e,n)=>w.jsxs("div",{className:"annotation-item",children:[w.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&w.jsxs("span",{children:[": ",pg(e.description)]})]},`annotation-${n}`))}):w.jsx(Pr,{text:"No annotations"}),Tk=({sdkLanguage:t,setIsInspecting:e,highlightedElement:n,setHighlightedElement:r})=>{const[o,l]=$.useState(),c=$.useCallback(u=>{const{errors:d}=of(hv,u,{prettyErrors:!1}),p=d.map(g=>({message:g.message,line:g.range[1].line,column:g.range[1].col,type:"subtle-error"}));l(p),r({...n,ariaSnapshot:u,lastEdited:"ariaSnapshot"}),e(!1)},[n,r,e]);return w.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Locator"}),w.jsx(Ht,{icon:"files",title:"Copy locator",onClick:()=>{Ap(n.locator||"")}})]}),w.jsx("div",{style:{height:50},children:w.jsx(Cs,{text:n.locator||"",language:t,isFocused:!0,wrapLines:!0,onChange:u=>{r({...n,locator:u,lastEdited:"locator"}),e(!1)}})}),w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),w.jsx(Ht,{icon:"files",title:"Copy snapshot",onClick:()=>{Ap(n.ariaSnapshot||"")}})]}),w.jsx("div",{style:{height:150},children:w.jsx(Cs,{text:n.ariaSnapshot||"",language:"yaml",wrapLines:!1,highlight:o,onChange:c})})]})},Pk=({model:t,showSourcesFirst:e,rootDir:n,fallbackLocation:r,isLive:o,hideTimeline:l,status:c,annotations:u,inert:d,onOpenExternally:p,revealSource:g,testRunMetadata:y})=>{var lo;const[v,x]=$.useState(void 0),[E,S]=$.useState(void 0),[k,C]=$.useState(void 0),[A,U]=$.useState(),[R,D]=$.useState(),[z,q]=$.useState(),[F,j]=$.useState("actions"),[oe,ae]=Nn("propertiesTab",e?"source":"call"),[M,H]=$.useState(!1),[fe,xe]=$.useState({lastEdited:"none"}),[pe,ge]=$.useState(),[Q,ne]=Nn("propertiesSidebarLocation","bottom"),[J]=Nn("showAllActions",!1),I=$.useCallback(ie=>{x(ie==null?void 0:ie.callId),S(void 0)},[]),B=$.useMemo(()=>t==null?void 0:t.filteredActions(J),[t,J]),ce=$.useMemo(()=>B==null?void 0:B.find(ie=>ie.callId===A),[B,A]),de=$.useCallback(ie=>{U(ie==null?void 0:ie.callId)},[]),ye=$.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);$.useEffect(()=>{ge(void 0),S(void 0)},[t]);const me=$.useMemo(()=>{if(v){const Vt=B==null?void 0:B.find(Wt=>Wt.callId===v);if(Vt)return Vt}const ie=t==null?void 0:t.failedAction();if(ie)return ie;if(B!=null&&B.length){let Vt=B.length-1;for(let Wt=0;Wt<B.length;++Wt)if(B[Wt].title==="After Hooks"&&Wt){Vt=Wt-1;break}return B[Vt]}},[t,B,v]),ve=$.useMemo(()=>ce||me,[me,ce]),_e=$.useMemo(()=>E?E.stack:ve==null?void 0:ve.stack,[ve,E]),ke=$.useCallback(ie=>{I(ie),de(void 0)},[I,de]),Ne=$.useCallback(ie=>{ae(ie),ie!=="inspector"&&H(!1)},[ae]),sr=$.useCallback(ie=>{!M&&ie&&Ne("inspector"),H(ie)},[H,Ne,M]),no=$.useCallback(ie=>{xe(ie),Ne("inspector")},[Ne]),$r=$.useCallback(ie=>{Ne("attachments"),C(Vt=>{if(!Vt)return[ie,0];const Wt=Vt[1];return[ie,Wt+1]})},[Ne]);$.useEffect(()=>{g&&Ne("source")},[g,Ne]);const ir=f1(t,pe),Bs=R1(t,pe),zs=o1(t),rn=(t==null?void 0:t.sdkLanguage)||"javascript",ro={id:"inspector",title:"Locator",render:()=>w.jsx(Tk,{sdkLanguage:rn,setIsInspecting:sr,highlightedElement:fe,setHighlightedElement:xe})},Us={id:"call",title:"Call",render:()=>w.jsx(TS,{action:ve,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:rn})},or={id:"log",title:"Log",render:()=>w.jsx(AS,{action:ve,isLive:o})},In={id:"errors",title:"Errors",errorCount:zs.errors.size,render:()=>w.jsx(a1,{errorsModel:zs,model:t,testRunMetadata:y,sdkLanguage:rn,revealInSource:ie=>{ie.action?I(ie.action):S(ie),Ne("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let Dr;!me&&r&&(Dr=(lo=r.source)==null?void 0:lo.errors.length);const Fr={id:"source",title:"Source",errorCount:Dr,render:()=>w.jsx(r1,{stack:_e,sources:ye,rootDir:n,stackFrameLocation:Q==="bottom"?"right":"bottom",fallbackLocation:r,onOpenExternally:p})},so={id:"console",title:"Console",count:ir.entries.length,render:()=>w.jsx(d1,{consoleModel:ir,boundaries:Ln,selectedTime:pe,onAccepted:ie=>ge({minimum:ie.timestamp,maximum:ie.timestamp}),onEntryHovered:q})},io={id:"network",title:"Network",count:Bs.resources.length,render:()=>w.jsx($1,{boundaries:Ln,networkModel:Bs,onEntryHovered:D,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},oo={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>w.jsx(GS,{model:t,revealedAttachment:k})},hn=[ro,Us,or,In,so,io,Fr,oo];if(u!==void 0){const ie={id:"annotations",title:"Annotations",count:u.length,render:()=>w.jsx(bk,{annotations:u})};hn.push(ie)}if(e){const ie=hn.indexOf(Fr);hn.splice(ie,1),hn.splice(1,0,Fr)}const{boundaries:Ln}=$.useMemo(()=>{const ie={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return ie.minimum>ie.maximum&&(ie.minimum=0,ie.maximum=3e4),ie.maximum+=(ie.maximum-ie.minimum)/20,{boundaries:ie}},[t]);let lr=0;!o&&t&&t.endTime>=0?lr=t.endTime-t.startTime:t&&t.wallTime&&(lr=Date.now()-t.wallTime);const ar={id:"actions",title:"Actions",component:w.jsxs("div",{className:"vbox",children:[c&&w.jsxs("div",{className:"workbench-run-status",children:[w.jsx("span",{className:ze("codicon",fg(c))}),w.jsx("div",{children:wS(c)}),w.jsx("div",{className:"spacer"}),w.jsx("div",{className:"workbench-run-duration",children:lr?pt(lr):""})]}),w.jsx(kS,{sdkLanguage:rn,actions:B||[],selectedAction:t?me:void 0,selectedTime:pe,setSelectedTime:ge,onSelected:ke,onHighlighted:de,revealAttachment:$r,revealConsole:()=>Ne("console"),isLive:o})]})},cr={id:"metadata",title:"Metadata",component:w.jsx(kk,{model:t})};return w.jsxs("div",{className:"vbox workbench",...d?{inert:"true"}:{},children:[!l&&w.jsx(xk,{model:t,consoleEntries:ir.entries,boundaries:Ln,highlightedAction:ce,highlightedEntry:R,highlightedConsoleEntry:z,onSelected:ke,sdkLanguage:rn,selectedTime:pe,setSelectedTime:ge}),w.jsx(Ul,{sidebarSize:250,orientation:Q==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:w.jsx(Ul,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:w.jsx(uk,{action:ve,model:t,sdkLanguage:rn,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:M,setIsInspecting:sr,highlightedElement:fe,setHighlightedElement:no}),sidebar:w.jsx($u,{tabs:[ar,cr],selectedTab:F,setSelectedTab:j})}),sidebar:w.jsx($u,{tabs:hn,selectedTab:oe,setSelectedTab:Ne,rightToolbar:[Q==="bottom"?w.jsx(Ht,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{ne("right")}}):w.jsx(Ht,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{ne("bottom")}})],mode:Q==="bottom"?"default":"select"})})]})};var Pm;(t=>{function e(n){for(const r of n.splice(0))r.dispose()}t.disposeAll=e})(Pm||(Pm={}));class Mi{constructor(){this._listeners=new Set,this.event=(e,n)=>{this._listeners.add(e);let r=!1;const o=this,l={dispose(){r||(r=!0,o._listeners.delete(e))}};return n&&n.push(l),l}}fire(e){const n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(n){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:o,event:l}=this._deliveryQueue[r];o.call(null,l)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class Ok{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",n=>e(n.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class Rk{constructor(e){this._onCloseEmitter=new Mi,this._onReportEmitter=new Mi,this._onStdioEmitter=new Mi,this._onTestFilesChangedEmitter=new Mi,this._onLoadTraceRequestedEmitter=new Mi,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this._transport=e,this._transport.onmessage(r=>{const o=JSON.parse(r),{id:l,result:c,error:u,method:d,params:p}=o;if(l){const g=this._callbacks.get(l);if(!g)return;this._callbacks.delete(l),u?g.reject(new Error(u)):g.resolve(c)}else this._dispatchEvent(d,p)});const n=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,o)=>{this._transport.onopen(r),this._transport.onerror(o)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(n)})}isClosed(){return this._isClosed}async _sendMessage(e,n){const r=globalThis.__logForTest;r==null||r({method:e,params:n}),await this._connectedPromise;const o=++this._lastId,l={id:o,method:e,params:n};return this._transport.send(JSON.stringify(l)),new Promise((c,u)=>{this._callbacks.set(o,{resolve:c,reject:u})})}_sendMessageNoReply(e,n){this._sendMessage(e,n).catch(()=>{})}_dispatchEvent(e,n){e==="report"?this._onReportEmitter.fire(n):e==="stdio"?this._onStdioEmitter.fire(n):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(n):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(n)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const Ck=({settings:t})=>w.jsx("div",{className:"vbox settings-view",children:t.map(({value:e,set:n,name:r,title:o})=>{const l=`setting-${r}`;return w.jsxs("div",{className:"setting",title:o,children:[w.jsx("input",{type:"checkbox",id:l,checked:e,onChange:()=>n(!e)}),w.jsx("label",{htmlFor:l,children:r})]},r)})}),$k=()=>{const[t,e]=Nn("shouldPopulateCanvasFromScreenshot",!1),[n,r]=Nn("showAllActions",!1),[o,l]=k0();return w.jsx(Ck,{settings:[{value:o,set:l,name:"Dark mode"},{value:t,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."},{value:n,set:r,name:"Show all actions"}]})};export{$k as D,VS as E,jk as M,Mt as R,Ul as S,Ht as T,Ok as W,DS as _,Rk as a,Pk as b,Ak as c,Mk as d,ju as e,Ik as f,Lk as g,ze as h,yS as i,w as j,sf as k,Nn as l,pt as m,g0 as n,$ as r,kr as s,fg as t,jr as u};
256
+ `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Tl(e),r=ms(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Tl(e),r=ms(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function fv(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new cv||null,prettyErrors:e}}function lk(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new zf(n==null?void 0:n.addNewLine),l=new Bf(e),c=Array.from(l.compose(o.parse(t)));if(r&&n)for(const u of c)u.errors.forEach(ea(t,n)),u.warnings.forEach(ea(t,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function dv(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new zf(n==null?void 0:n.addNewLine),l=new Bf(e);let c=null;for(const u of l.compose(o.parse(t),!0,t.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new Ar(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(c.errors.forEach(ea(t,n)),c.warnings.forEach(ea(t,n))),c}function ak(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const o=dv(t,n);if(!o)return null;if(o.warnings.forEach(l=>My(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function ck(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){const{keepUndefined:o}=n??e??{};if(!o)return}return Rr(t)&&!r?t.toString(n):new Fs(t,r,n).toString(n)}const hv=Object.freeze(Object.defineProperty({__proto__:null,Alias:ca,CST:sk,Composer:Bf,Document:Fs,Lexer:av,LineCounter:cv,Pair:ct,Parser:zf,Scalar:ue,Schema:va,YAMLError:Df,YAMLMap:Lt,YAMLParseError:Ar,YAMLSeq:nr,YAMLWarning:Xy,isAlias:Or,isCollection:Re,isDocument:Rr,isMap:Os,isNode:$e,isPair:je,isScalar:Te,isSeq:Rs,parse:ak,parseAllDocuments:lk,parseDocument:dv,stringify:ck,visit:tr,visitAsync:aa},Symbol.toStringTag,{value:"Module"})),uk=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const[u,d]=$.useState("action"),[p]=Nn("shouldPopulateCanvasFromScreenshot",!1),g=$.useMemo(()=>pk(t),[t]),{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}=$.useMemo(()=>{const S=g[u];return S?mk(S,p):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[g,u,p]),E=$.useMemo(()=>y!==void 0?{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}:void 0,[y,v,x]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(sf,{children:[w.jsx(Ht,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>o(!r)}),["action","before","after"].map(S=>w.jsx(yg,{id:S,title:hk(S),selected:u===S,onSelect:()=>d(S)},S)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(Ht,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(E!=null&&E.popoutUrl),onClick:()=>{const S=window.open((E==null?void 0:E.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{new gy(S,{isUnderTest:mv,sdkLanguage:e,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(fk,{snapshotUrls:E,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})]})},fk=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const u=$.useRef(null),d=$.useRef(null),[p,g]=$.useState({viewport:gv,url:""}),y=$.useRef({iteration:0,visibleIframe:0});return $.useEffect(()=>{(async()=>{const v=y.current.iteration+1,x=1-y.current.visibleIframe;y.current.iteration=v;const E=await gk(t==null?void 0:t.snapshotInfoUrl);if(y.current.iteration!==v)return;const S=[u,d][x].current;if(S){let k=()=>{};const C=new Promise(A=>k=A);try{S.addEventListener("load",k),S.addEventListener("error",k);const A=(t==null?void 0:t.snapshotUrl)||yk;S.contentWindow?S.contentWindow.location.replace(A):S.src=A,await C}catch{}finally{S.removeEventListener("load",k),S.removeEventListener("error",k)}}y.current.iteration===v&&(y.current.visibleIframe=x,g(E))})()},[t]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&r&&o(!1)},children:[w.jsx(Mm,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:u.current,iteration:y.current.iteration}),w.jsx(Mm,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:d.current,iteration:y.current.iteration}),w.jsx(dk,{snapshotInfo:p,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:u,name:"snapshot",title:"DOM Snapshot",className:ze(y.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:ze(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},dk=({snapshotInfo:t,children:e})=>{const[n,r]=jr(),l={width:t.viewport.width,height:t.viewport.height+40},c=Math.min(n.width/l.width,n.height/l.height,1),u={x:(n.width-l.width)/2,y:(n.height-l.height)/2};return w.jsx("div",{ref:r,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:l.width+"px",height:l.height+"px",transform:`translate(${u.x}px, ${u.y}px) scale(${c})`},children:[w.jsx(eE,{url:t.url}),e]})})};function hk(t){return t==="before"?"Before":t==="after"?"After":t==="action"?"Action":t}const Mm=({iframe:t,isInspecting:e,sdkLanguage:n,testIdAttributeName:r,highlightedElement:o,setHighlightedElement:l,iteration:c})=>($.useEffect(()=>{const u=o.lastEdited==="ariaSnapshot"?o.ariaSnapshot:void 0,d=o.lastEdited==="locator"?o.locator:void 0,p=!!u||!!d||e,g=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{pv(g,p,n,r,y,"",t==null?void 0:t.contentWindow)}catch{}const v=u?of(hv,u):void 0,x=d?Y_(n,d,r):void 0;for(const{recorder:E,frameSelector:S}of g){const k=x!=null&&x.startsWith(S)?x.substring(S.length).trim():void 0,C=(v==null?void 0:v.errors.length)===0?v.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:k,ariaTemplate:C,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(A){l({locator:Lr(n,S+A.selector),ariaSnapshot:A.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const A of g)A.recorder!==E&&A.recorder.clearHighlight()}})}},[t,e,o,l,n,r,c]),w.jsx(w.Fragment,{}));function pv(t,e,n,r,o,l,c){if(!c)return;const u=c;if(!u._recorder&&e){const d=new gy(c,{isUnderTest:o,sdkLanguage:n,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new V_(d);u._injectedScript=d,u._recorder={recorder:p,frameSelector:l},o&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}u._recorder&&t.push(u._recorder);for(let d=0;d<c.frames.length;++d){const p=c.frames[d],g=p.frameElement?u._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";pv(t,e,n,r,o,l+g,p)}}function pk(t){if(!t)return{};let e=t.beforeSnapshot?{action:t,snapshotName:t.beforeSnapshot}:void 0;if(!e){for(let o=Dp(t);o;o=Dp(o))if(o.endTime<=t.startTime&&o.afterSnapshot){e={action:o,snapshotName:o.afterSnapshot};break}}let n=t.afterSnapshot?{action:t,snapshotName:t.afterSnapshot}:void 0;if(!n){let o;for(let l=Fp(t);l&&l.startTime<=t.endTime;l=Fp(l))l.endTime>t.endTime||!l.afterSnapshot||o&&o.endTime>l.endTime||(o=l);o?n={action:o,snapshotName:o.afterSnapshot}:n=e}const r=t.inputSnapshot?{action:t,snapshotName:t.inputSnapshot,hasInputTarget:!0}:n;return r&&(r.point=t.point),{action:r,before:e,after:n}}const mv=new URLSearchParams(window.location.search).has("isUnderTest"),jm=new URLSearchParams(window.location.search).get("server");function mk(t,e){const n=new URLSearchParams;n.set("trace",zl(t.action).traceUrl),n.set("name",t.snapshotName),mv&&n.set("isUnderTest","true"),t.point&&(n.set("pointX",String(t.point.x)),n.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1")),e&&n.set("shouldPopulateCanvasFromScreenshot","1");const r=new URL(`snapshot/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),l=new URLSearchParams;l.set("r",r),jm&&l.set("server",jm),l.set("trace",zl(t.action).traceUrl),t.point&&(l.set("pointX",String(t.point.x)),l.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1"));const c=new URL(`snapshot.html?${l.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:r,popoutUrl:c}}async function gk(t){const e={url:"",viewport:gv,timestamp:void 0,wallTime:void 0};if(t){const r=await(await fetch(t)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const gv={width:1280,height:720},yk='data:text/html,<body style="background: #ddd"></body>',yv={width:200,height:45},ys=2.5,vk=yv.height+ys*2,wk=({model:t,boundaries:e,previewPoint:n})=>{var g,y;const[r,o]=jr(),l=$.useRef(null);let c=0;if(l.current&&n){const v=l.current.getBoundingClientRect();c=(n.clientY-v.top+l.current.scrollTop)/vk|0}const u=(y=(g=t==null?void 0:t.pages)==null?void 0:g[c])==null?void 0:y.screencastFrames;let d,p;if(n!==void 0&&u&&u.length){const v=e.minimum+(e.maximum-e.minimum)*n.x/r.width;d=u[Om(u,v,vv)-1];const x={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?wv({width:d.width,height:d.height},x):void 0}return w.jsxs("div",{className:"film-strip",ref:o,children:[w.jsx("div",{className:"film-strip-lanes",ref:l,children:t==null?void 0:t.pages.map((v,x)=>v.screencastFrames.length?w.jsx(Sk,{boundaries:e,page:v,width:r.width},x):null)}),(n==null?void 0:n.x)!==void 0&&w.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(n.x,r.width-(p?p.width:0)-10)},children:[n.action&&w.jsx("div",{className:"film-strip-hover-title",children:nf(n.action,n)}),d&&p&&w.jsx("div",{style:{width:p.width,height:p.height},children:w.jsx("img",{src:`sha1/${d.sha1}`,width:p.width,height:p.height})})]})]})},Sk=({boundaries:t,page:e,width:n})=>{const r={width:0,height:0},o=e.screencastFrames;for(const S of o)r.width=Math.max(r.width,S.width),r.height=Math.max(r.height,S.height);const l=wv(r,yv),c=o[0].timestamp,u=o[o.length-1].timestamp,d=t.maximum-t.minimum,p=(c-t.minimum)/d*n,g=(t.maximum-u)/d*n,v=(u-c)/d*n/(l.width+2*ys)|0,x=(u-c)/v,E=[];for(let S=0;c&&x&&S<v;++S){const k=c+x*S,C=Om(o,k,vv)-1;E.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[C].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},S))}return E.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[o.length-1].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ys,marginRight:ys}},E.length)),w.jsx("div",{className:"film-strip-lane",style:{marginLeft:p+"px",marginRight:g+"px"},children:E})};function vv(t,e){return t-e.timestamp}function wv(t,e){const n=Math.max(t.width/e.width,t.height/e.height);return{width:t.width/n|0,height:t.height/n|0}}const xk=({model:t,boundaries:e,consoleEntries:n,onSelected:r,highlightedAction:o,highlightedEntry:l,highlightedConsoleEntry:c,selectedTime:u,setSelectedTime:d,sdkLanguage:p})=>{const[g,y]=jr(),[v,x]=$.useState(),[E,S]=$.useState(),[k]=Nn("showAllActions",!1),{offsets:C,curtainLeft:A,curtainRight:U}=$.useMemo(()=>{let M=u||e;if(v&&v.startX!==v.endX){const pe=un(g.width,e,v.startX),ge=un(g.width,e,v.endX);M={minimum:Math.min(pe,ge),maximum:Math.max(pe,ge)}}const H=Ft(g.width,e,M.minimum),xe=Ft(g.width,e,e.maximum)-Ft(g.width,e,M.maximum);return{offsets:_k(g.width,e),curtainLeft:H,curtainRight:xe}},[u,e,v,g]),R=$.useMemo(()=>t==null?void 0:t.filteredActions(k),[t,k]),D=$.useMemo(()=>{const M=[];for(const H of R||[])H.class!=="Test"&&M.push({action:H,leftTime:H.startTime,rightTime:H.endTime||e.maximum,leftPosition:Ft(g.width,e,H.startTime),rightPosition:Ft(g.width,e,H.endTime||e.maximum),active:!1,error:!!H.error});for(const H of(t==null?void 0:t.resources)||[]){const fe=H._monotonicTime,xe=H._monotonicTime+H.time;M.push({resource:H,leftTime:fe,rightTime:xe,leftPosition:Ft(g.width,e,fe),rightPosition:Ft(g.width,e,xe),active:!1,error:!1})}for(const H of n||[])M.push({consoleMessage:H,leftTime:H.timestamp,rightTime:H.timestamp,leftPosition:Ft(g.width,e,H.timestamp),rightPosition:Ft(g.width,e,H.timestamp),active:!1,error:H.isError});return M},[t,R,n,e,g]);$.useMemo(()=>{for(const M of D)o?M.active=M.action===o:l?M.active=M.resource===l:c?M.active=M.consoleMessage===c:M.active=!1},[D,o,l,c]);const z=$.useCallback(M=>{if(S(void 0),!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(g.width,e,H),xe=u?Ft(g.width,e,u.minimum):0,pe=u?Ft(g.width,e,u.maximum):0;u&&Math.abs(H-xe)<10?x({startX:pe,endX:H,type:"resize"}):u&&Math.abs(H-pe)<10?x({startX:xe,endX:H,type:"resize"}):u&&fe>u.minimum&&fe<u.maximum&&M.clientY-y.current.getBoundingClientRect().top<20?x({startX:xe,endX:pe,pivot:H,type:"move"}):x({startX:H,endX:H,type:"resize"})},[e,g,y,u]),q=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(g.width,e,H),xe=R==null?void 0:R.findLast(ne=>ne.startTime<=fe);if(!M.buttons){x(void 0);return}if(xe&&r(xe),!v)return;let pe=v;if(v.type==="resize")pe={...v,endX:H};else{const ne=H-v.pivot;let J=v.startX+ne,I=v.endX+ne;J<0&&(J=0,I=J+(v.endX-v.startX)),I>g.width&&(I=g.width,J=I-(v.endX-v.startX)),pe={...v,startX:J,endX:I,pivot:H}}x(pe);const ge=un(g.width,e,pe.startX),Q=un(g.width,e,pe.endX);ge!==Q&&d({minimum:Math.min(ge,Q),maximum:Math.max(ge,Q)})},[e,v,g,R,r,y,d]),F=$.useCallback(()=>{if(S(void 0),!!v){if(v.startX!==v.endX){const M=un(g.width,e,v.startX),H=un(g.width,e,v.endX);d({minimum:Math.min(M,H),maximum:Math.max(M,H)})}else{const M=un(g.width,e,v.startX),H=R==null?void 0:R.findLast(fe=>fe.startTime<=M);H&&r(H),d(void 0)}x(void 0)}},[e,v,g,R,d,r]),j=$.useCallback(M=>{if(!y.current)return;const H=M.clientX-y.current.getBoundingClientRect().left,fe=un(g.width,e,H),xe=R==null?void 0:R.findLast(pe=>pe.startTime<=fe);S({x:H,clientY:M.clientY,action:xe,sdkLanguage:p})},[e,g,R,y,p]),oe=$.useCallback(()=>{S(void 0)},[]),ae=$.useCallback(()=>{d(void 0)},[d]);return w.jsxs("div",{style:{flex:"none",borderBottom:"1px solid var(--vscode-panel-border)"},children:[!!v&&w.jsx(dg,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:F,onPaneMouseMove:q,onPaneDoubleClick:ae}),w.jsxs("div",{ref:y,className:"timeline-view",onMouseDown:z,onMouseMove:j,onMouseLeave:oe,children:[w.jsx("div",{className:"timeline-grid",children:C.map((M,H)=>w.jsx("div",{className:"timeline-divider",style:{left:M.position+"px"},children:w.jsx("div",{className:"timeline-time",children:pt(M.time-e.minimum)})},H))}),w.jsx("div",{style:{height:8}}),w.jsx(wk,{model:t,boundaries:e,previewPoint:E}),w.jsx("div",{className:"timeline-bars",children:D.map((M,H)=>w.jsx("div",{className:ze("timeline-bar",M.action&&"action",M.resource&&"network",M.consoleMessage&&"console-message",M.active&&"active",M.error&&"error"),style:{left:M.leftPosition,width:Math.max(5,M.rightPosition-M.leftPosition),top:Ek(M),bottom:0}},H))}),w.jsx("div",{className:"timeline-marker",style:{display:E!==void 0?"block":"none",left:((E==null?void 0:E.x)||0)+"px"}}),u&&w.jsxs("div",{className:"timeline-window",children:[w.jsx("div",{className:"timeline-window-curtain left",style:{width:A}}),w.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),w.jsx("div",{className:"timeline-window-center",children:w.jsx("div",{className:"timeline-window-drag"})}),w.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),w.jsx("div",{className:"timeline-window-curtain right",style:{width:U}})]})]})]})};function _k(t,e){let r=t/64;const o=e.maximum-e.minimum,l=t/o;let c=o/r;const u=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,u),c*l>=5*64&&(c=c/5),c*l>=2*64&&(c=c/2);const d=e.minimum;let p=e.maximum;p+=64/l,r=Math.ceil((p-d)/c),c||(r=0);const g=[];for(let y=0;y<r;++y){const v=d+c*y;g.push({position:Ft(t,e,v),time:v})}return g}function Ft(t,e,n){return(n-e.minimum)/(e.maximum-e.minimum)*t}function un(t,e,n){return n/t*(e.maximum-e.minimum)+e.minimum}function Ek(t){return t.resource?25:20}const kk=({model:t})=>{var n,r;if(!t)return w.jsx(w.Fragment,{});const e=t.wallTime!==void 0?new Date(t.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return w.jsxs("div",{className:"vbox",style:{flexShrink:0},children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&w.jsxs("div",{className:"call-line",children:["start time:",w.jsx("span",{className:"call-value datetime",title:e,children:e})]}),w.jsxs("div",{className:"call-line",children:["duration:",w.jsx("span",{className:"call-value number",title:pt(t.endTime-t.startTime),children:pt(t.endTime-t.startTime)})]}),w.jsx("div",{className:"call-section",children:"Browser"}),w.jsxs("div",{className:"call-line",children:["engine:",w.jsx("span",{className:"call-value string",title:t.browserName,children:t.browserName})]}),t.channel&&w.jsxs("div",{className:"call-line",children:["channel:",w.jsx("span",{className:"call-value string",title:t.channel,children:t.channel})]}),t.platform&&w.jsxs("div",{className:"call-line",children:["platform:",w.jsx("span",{className:"call-value string",title:t.platform,children:t.platform})]}),t.options.userAgent&&w.jsxs("div",{className:"call-line",children:["user agent:",w.jsx("span",{className:"call-value datetime",title:t.options.userAgent,children:t.options.userAgent})]}),t.options.baseURL&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),w.jsxs("div",{className:"call-line",children:["baseURL:",w.jsx("a",{className:"call-value string",href:t.options.baseURL,title:t.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:t.options.baseURL})]})]}),w.jsx("div",{className:"call-section",children:"Viewport"}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["width:",w.jsx("span",{className:"call-value number",title:String(!!((n=t.options.viewport)!=null&&n.width)),children:t.options.viewport.width})]}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["height:",w.jsx("span",{className:"call-value number",title:String(!!((r=t.options.viewport)!=null&&r.height)),children:t.options.viewport.height})]}),w.jsxs("div",{className:"call-line",children:["is mobile:",w.jsx("span",{className:"call-value boolean",title:String(!!t.options.isMobile),children:String(!!t.options.isMobile)})]}),t.options.deviceScaleFactor&&w.jsxs("div",{className:"call-line",children:["device scale:",w.jsx("span",{className:"call-value number",title:String(t.options.deviceScaleFactor),children:String(t.options.deviceScaleFactor)})]}),w.jsx("div",{className:"call-section",children:"Counts"}),w.jsxs("div",{className:"call-line",children:["pages:",w.jsx("span",{className:"call-value number",children:t.pages.length})]}),w.jsxs("div",{className:"call-line",children:["actions:",w.jsx("span",{className:"call-value number",children:t.actions.length})]}),w.jsxs("div",{className:"call-line",children:["events:",w.jsx("span",{className:"call-value number",children:t.events.length})]})]})},bk=({annotations:t})=>t.length?w.jsx("div",{className:"annotations-tab",children:t.map((e,n)=>w.jsxs("div",{className:"annotation-item",children:[w.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&w.jsxs("span",{children:[": ",pg(e.description)]})]},`annotation-${n}`))}):w.jsx(Pr,{text:"No annotations"}),Tk=({sdkLanguage:t,setIsInspecting:e,highlightedElement:n,setHighlightedElement:r})=>{const[o,l]=$.useState(),c=$.useCallback(u=>{const{errors:d}=of(hv,u,{prettyErrors:!1}),p=d.map(g=>({message:g.message,line:g.range[1].line,column:g.range[1].col,type:"subtle-error"}));l(p),r({...n,ariaSnapshot:u,lastEdited:"ariaSnapshot"}),e(!1)},[n,r,e]);return w.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Locator"}),w.jsx(Ht,{icon:"files",title:"Copy locator",onClick:()=>{Ap(n.locator||"")}})]}),w.jsx("div",{style:{height:50},children:w.jsx(Cs,{text:n.locator||"",language:t,isFocused:!0,wrapLines:!0,onChange:u=>{r({...n,locator:u,lastEdited:"locator"}),e(!1)}})}),w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),w.jsx(Ht,{icon:"files",title:"Copy snapshot",onClick:()=>{Ap(n.ariaSnapshot||"")}})]}),w.jsx("div",{style:{height:150},children:w.jsx(Cs,{text:n.ariaSnapshot||"",language:"yaml",wrapLines:!1,highlight:o,onChange:c})})]})},Pk=({model:t,showSourcesFirst:e,rootDir:n,fallbackLocation:r,isLive:o,hideTimeline:l,status:c,annotations:u,inert:d,onOpenExternally:p,revealSource:g,testRunMetadata:y})=>{var lo;const[v,x]=$.useState(void 0),[E,S]=$.useState(void 0),[k,C]=$.useState(void 0),[A,U]=$.useState(),[R,D]=$.useState(),[z,q]=$.useState(),[F,j]=$.useState("actions"),[oe,ae]=Nn("propertiesTab",e?"source":"call"),[M,H]=$.useState(!1),[fe,xe]=$.useState({lastEdited:"none"}),[pe,ge]=$.useState(),[Q,ne]=Nn("propertiesSidebarLocation","bottom"),[J]=Nn("showAllActions",!1),I=$.useCallback(ie=>{x(ie==null?void 0:ie.callId),S(void 0)},[]),B=$.useMemo(()=>t==null?void 0:t.filteredActions(J),[t,J]),ce=$.useMemo(()=>B==null?void 0:B.find(ie=>ie.callId===A),[B,A]),de=$.useCallback(ie=>{U(ie==null?void 0:ie.callId)},[]),ye=$.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);$.useEffect(()=>{ge(void 0),S(void 0)},[t]);const me=$.useMemo(()=>{if(v){const Vt=B==null?void 0:B.find(Wt=>Wt.callId===v);if(Vt)return Vt}const ie=t==null?void 0:t.failedAction();if(ie)return ie;if(B!=null&&B.length){let Vt=B.length-1;for(let Wt=0;Wt<B.length;++Wt)if(B[Wt].title==="After Hooks"&&Wt){Vt=Wt-1;break}return B[Vt]}},[t,B,v]),ve=$.useMemo(()=>ce||me,[me,ce]),_e=$.useMemo(()=>E?E.stack:ve==null?void 0:ve.stack,[ve,E]),ke=$.useCallback(ie=>{I(ie),de(void 0)},[I,de]),Ne=$.useCallback(ie=>{ae(ie),ie!=="inspector"&&H(!1)},[ae]),sr=$.useCallback(ie=>{!M&&ie&&Ne("inspector"),H(ie)},[H,Ne,M]),no=$.useCallback(ie=>{xe(ie),Ne("inspector")},[Ne]),$r=$.useCallback(ie=>{Ne("attachments"),C(Vt=>{if(!Vt)return[ie,0];const Wt=Vt[1];return[ie,Wt+1]})},[Ne]);$.useEffect(()=>{g&&Ne("source")},[g,Ne]);const ir=f1(t,pe),Bs=R1(t,pe),zs=o1(t),rn=(t==null?void 0:t.sdkLanguage)||"javascript",ro={id:"inspector",title:"Locator",render:()=>w.jsx(Tk,{sdkLanguage:rn,setIsInspecting:sr,highlightedElement:fe,setHighlightedElement:xe})},Us={id:"call",title:"Call",render:()=>w.jsx(TS,{action:ve,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:rn})},or={id:"log",title:"Log",render:()=>w.jsx(AS,{action:ve,isLive:o})},In={id:"errors",title:"Errors",errorCount:zs.errors.size,render:()=>w.jsx(a1,{errorsModel:zs,model:t,testRunMetadata:y,sdkLanguage:rn,revealInSource:ie=>{ie.action?I(ie.action):S(ie),Ne("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let Dr;!me&&r&&(Dr=(lo=r.source)==null?void 0:lo.errors.length);const Fr={id:"source",title:"Source",errorCount:Dr,render:()=>w.jsx(r1,{stack:_e,sources:ye,rootDir:n,stackFrameLocation:Q==="bottom"?"right":"bottom",fallbackLocation:r,onOpenExternally:p})},so={id:"console",title:"Console",count:ir.entries.length,render:()=>w.jsx(d1,{consoleModel:ir,boundaries:Ln,selectedTime:pe,onAccepted:ie=>ge({minimum:ie.timestamp,maximum:ie.timestamp}),onEntryHovered:q})},io={id:"network",title:"Network",count:Bs.resources.length,render:()=>w.jsx($1,{boundaries:Ln,networkModel:Bs,onEntryHovered:D,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},oo={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>w.jsx(GS,{model:t,revealedAttachment:k})},hn=[ro,Us,or,In,so,io,Fr,oo];if(u!==void 0){const ie={id:"annotations",title:"Annotations",count:u.length,render:()=>w.jsx(bk,{annotations:u})};hn.push(ie)}if(e){const ie=hn.indexOf(Fr);hn.splice(ie,1),hn.splice(1,0,Fr)}const{boundaries:Ln}=$.useMemo(()=>{const ie={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return ie.minimum>ie.maximum&&(ie.minimum=0,ie.maximum=3e4),ie.maximum+=(ie.maximum-ie.minimum)/20,{boundaries:ie}},[t]);let lr=0;!o&&t&&t.endTime>=0?lr=t.endTime-t.startTime:t&&t.wallTime&&(lr=Date.now()-t.wallTime);const ar={id:"actions",title:"Actions",component:w.jsxs("div",{className:"vbox",children:[c&&w.jsxs("div",{className:"workbench-run-status",children:[w.jsx("span",{className:ze("codicon",fg(c))}),w.jsx("div",{children:wS(c)}),w.jsx("div",{className:"spacer"}),w.jsx("div",{className:"workbench-run-duration",children:lr?pt(lr):""})]}),w.jsx(kS,{sdkLanguage:rn,actions:B||[],selectedAction:t?me:void 0,selectedTime:pe,setSelectedTime:ge,onSelected:ke,onHighlighted:de,revealAttachment:$r,revealConsole:()=>Ne("console"),isLive:o})]})},cr={id:"metadata",title:"Metadata",component:w.jsx(kk,{model:t})};return w.jsxs("div",{className:"vbox workbench",...d?{inert:"true"}:{},children:[!l&&w.jsx(xk,{model:t,consoleEntries:ir.entries,boundaries:Ln,highlightedAction:ce,highlightedEntry:R,highlightedConsoleEntry:z,onSelected:ke,sdkLanguage:rn,selectedTime:pe,setSelectedTime:ge}),w.jsx(Ul,{sidebarSize:250,orientation:Q==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:w.jsx(Ul,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:w.jsx(uk,{action:ve,model:t,sdkLanguage:rn,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:M,setIsInspecting:sr,highlightedElement:fe,setHighlightedElement:no}),sidebar:w.jsx($u,{tabs:[ar,cr],selectedTab:F,setSelectedTab:j})}),sidebar:w.jsx($u,{tabs:hn,selectedTab:oe,setSelectedTab:Ne,rightToolbar:[Q==="bottom"?w.jsx(Ht,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{ne("right")}}):w.jsx(Ht,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{ne("bottom")}})],mode:Q==="bottom"?"default":"select"})})]})};var Pm;(t=>{function e(n){for(const r of n.splice(0))r.dispose()}t.disposeAll=e})(Pm||(Pm={}));class Mi{constructor(){this._listeners=new Set,this.event=(e,n)=>{this._listeners.add(e);let r=!1;const o=this,l={dispose(){r||(r=!0,o._listeners.delete(e))}};return n&&n.push(l),l}}fire(e){const n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(n){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:o,event:l}=this._deliveryQueue[r];o.call(null,l)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class Ok{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",n=>e(n.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class Rk{constructor(e){this._onCloseEmitter=new Mi,this._onReportEmitter=new Mi,this._onStdioEmitter=new Mi,this._onTestFilesChangedEmitter=new Mi,this._onLoadTraceRequestedEmitter=new Mi,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this._transport=e,this._transport.onmessage(r=>{const o=JSON.parse(r),{id:l,result:c,error:u,method:d,params:p}=o;if(l){const g=this._callbacks.get(l);if(!g)return;this._callbacks.delete(l),u?g.reject(new Error(u)):g.resolve(c)}else this._dispatchEvent(d,p)});const n=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,o)=>{this._transport.onopen(r),this._transport.onerror(o)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(n)})}isClosed(){return this._isClosed}async _sendMessage(e,n){const r=globalThis.__logForTest;r==null||r({method:e,params:n}),await this._connectedPromise;const o=++this._lastId,l={id:o,method:e,params:n};return this._transport.send(JSON.stringify(l)),new Promise((c,u)=>{this._callbacks.set(o,{resolve:c,reject:u})})}_sendMessageNoReply(e,n){this._sendMessage(e,n).catch(()=>{})}_dispatchEvent(e,n){e==="report"?this._onReportEmitter.fire(n):e==="stdio"?this._onStdioEmitter.fire(n):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(n):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(n)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const Ck=({settings:t})=>w.jsx("div",{className:"vbox settings-view",children:t.map(({value:e,set:n,name:r,title:o})=>{const l=`setting-${r}`;return w.jsxs("div",{className:"setting",title:o,children:[w.jsx("input",{type:"checkbox",id:l,checked:e,onChange:()=>n(!e)}),w.jsx("label",{htmlFor:l,children:r})]},r)})}),$k=()=>{const[t,e]=Nn("shouldPopulateCanvasFromScreenshot",!1),[n,r]=Nn("showAllActions",!1),[o,l]=k0();return w.jsx(Ck,{settings:[{value:o,set:l,name:"Dark mode"},{value:t,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."},{value:n,set:r,name:"Show all actions",title:"Show all actions including routes, getters, boxed fixtures, etc."}]})};export{$k as D,VS as E,jk as M,Mt as R,Ul as S,Ht as T,Ok as W,DS as _,Rk as a,Pk as b,Ak as c,Mk as d,ju as e,Ik as f,Lk as g,ze as h,yS as i,w as j,sf as k,Nn as l,pt as m,g0 as n,$ as r,kr as s,fg as t,jr as u};