patchright-core 1.49.0 → 1.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/server/chromium/crNetworkManager.js +1 -1
- package/lib/server/chromium/crPage.js +0 -4
- package/lib/server/frames.js +12 -35
- package/lib/vite/{traceViewer/assets/codeMirrorModule-KatbITLF.js → recorder/assets/codeMirrorModule-AFvV6hAs.js} +1 -1
- package/lib/vite/recorder/assets/{index-CqeZmzx8.js → index-_cTWgVuJ.js} +2 -2
- package/lib/vite/recorder/index.html +1 -1
- package/lib/vite/{recorder/assets/codeMirrorModule-DUzBrnvO.js → traceViewer/assets/codeMirrorModule-BWCrdKft.js} +1 -1
- package/lib/vite/traceViewer/assets/{inspectorTab-DdpLd2bb.js → inspectorTab-C_9qyxv5.js} +3 -3
- package/lib/vite/traceViewer/assets/{workbench-CdYbzWFD.js → workbench-DsQEOQud.js} +1 -1
- package/lib/vite/traceViewer/{embedded.6m3UZh7r.js → embedded.D4x_-tXl.js} +1 -1
- package/lib/vite/traceViewer/embedded.html +3 -3
- package/lib/vite/traceViewer/{index.WUV-8boJ.js → index.BskMikzx.js} +1 -1
- package/lib/vite/traceViewer/index.html +3 -3
- package/lib/vite/traceViewer/{recorder.OT2tVHgn.js → recorder.Dsk1wX5k.js} +1 -1
- package/lib/vite/traceViewer/recorder.html +2 -2
- package/lib/vite/traceViewer/{uiMode.BZBTyvGn.js → uiMode.CzKr-TMc.js} +1 -1
- package/lib/vite/traceViewer/uiMode.html +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-BWCrdKft.js","../codeMirrorModule.ez37Vkbh.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Fp=Object.defineProperty;var Hp=(e,t,n)=>t in e?Fp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>Hp(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var tw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vc={exports:{}},Es={},Bc={exports:{}},j={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -39,7 +39,7 @@ var Fp=Object.defineProperty;var Hp=(e,t,n)=>t in e?Fp(e,t,{enumerable:!0,config
|
|
|
39
39
|
`).replace(Rm,"")}function gi(e,t,n){if(t=Mu(t),Mu(e)!==t&&n)throw Error(k(425))}function ts(){}var rl=null,il=null;function sl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ol=typeof setTimeout=="function"?setTimeout:void 0,$m=typeof clearTimeout=="function"?clearTimeout:void 0,Pu=typeof Promise=="function"?Promise:void 0,Om=typeof queueMicrotask=="function"?queueMicrotask:typeof Pu<"u"?function(e){return Pu.resolve(null).then(e).catch(jm)}:ol;function jm(e){setTimeout(function(){throw e})}function uo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),jr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);jr(t)}function jt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ru(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Xn=Math.random().toString(36).slice(2),ut="__reactFiber$"+Xn,Ur="__reactProps$"+Xn,xt="__reactContainer$"+Xn,ll="__reactEvents$"+Xn,zm="__reactListeners$"+Xn,Dm="__reactHandles$"+Xn;function Zt(e){var t=e[ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ru(e);e!==null;){if(n=e[ut])return n;e=Ru(e)}return t}e=n,n=e.parentNode}return null}function Zr(e){return e=e[ut]||e[xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(k(33))}function As(e){return e[Ur]||null}var al=[],Nn=-1;function qt(e){return{current:e}}function V(e){0>Nn||(e.current=al[Nn],al[Nn]=null,Nn--)}function F(e,t){Nn++,al[Nn]=e.current,e.current=t}var Vt={},we=qt(Vt),Ie=qt(!1),ln=Vt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Me(e){return e=e.childContextTypes,e!=null}function ns(){V(Ie),V(we)}function $u(e,t,n){if(we.current!==Vt)throw Error(k(168));F(we,t),F(Ie,n)}function Jd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(k(108,Eg(e)||"Unknown",i));return G({},n,r)}function rs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vt,ln=we.current,F(we,e),F(Ie,Ie.current),!0}function Ou(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=Jd(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,V(Ie),V(we),F(we,e)):V(Ie),F(Ie,n)}var gt=null,Ls=!1,co=!1;function Yd(e){gt===null?gt=[e]:gt.push(e)}function Fm(e){Ls=!0,Yd(e)}function Wt(){if(!co&>!==null){co=!0;var e=0,t=D;try{var n=gt;for(D=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}gt=null,Ls=!1}catch(i){throw gt!==null&&(gt=gt.slice(e+1)),Ed(Jl,Wt),i}finally{D=t,co=!1}}return null}var bn=[],An=0,is=null,ss=0,He=[],Ue=0,an=null,mt=1,vt="";function Gt(e,t){bn[An++]=ss,bn[An++]=is,is=e,ss=t}function Zd(e,t,n){He[Ue++]=mt,He[Ue++]=vt,He[Ue++]=an,an=e;var r=mt;e=vt;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var s=32-nt(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,mt=1<<32-nt(t)+i|n<<i|r,vt=s+e}else mt=1<<s|n<<i|r,vt=e}function oa(e){e.return!==null&&(Gt(e,1),Zd(e,1,0))}function la(e){for(;e===is;)is=bn[--An],bn[An]=null,ss=bn[--An],bn[An]=null;for(;e===an;)an=He[--Ue],He[Ue]=null,vt=He[--Ue],He[Ue]=null,mt=He[--Ue],He[Ue]=null}var Oe=null,$e=null,W=!1,Ye=null;function ef(e,t){var n=Be(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ju(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Oe=e,$e=jt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oe=e,$e=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=an!==null?{id:mt,overflow:vt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Be(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oe=e,$e=null,!0):!1;default:return!1}}function ul(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cl(e){if(W){var t=$e;if(t){var n=t;if(!ju(e,t)){if(ul(e))throw Error(k(418));t=jt(n.nextSibling);var r=Oe;t&&ju(e,t)?ef(r,n):(e.flags=e.flags&-4097|2,W=!1,Oe=e)}}else{if(ul(e))throw Error(k(418));e.flags=e.flags&-4097|2,W=!1,Oe=e}}}function zu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Oe=e}function mi(e){if(e!==Oe)return!1;if(!W)return zu(e),W=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!sl(e.type,e.memoizedProps)),t&&(t=$e)){if(ul(e))throw tf(),Error(k(418));for(;t;)ef(e,t),t=jt(t.nextSibling)}if(zu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$e=jt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$e=null}}else $e=Oe?jt(e.stateNode.nextSibling):null;return!0}function tf(){for(var e=$e;e;)e=jt(e.nextSibling)}function Vn(){$e=Oe=null,W=!1}function aa(e){Ye===null?Ye=[e]:Ye.push(e)}var Hm=kt.ReactCurrentBatchConfig;function Xe(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var os=qt(null),ls=null,Ln=null,ua=null;function ca(){ua=Ln=ls=null}function da(e){var t=os.current;V(os),e._currentValue=t}function dl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function zn(e,t){ls=e,ua=Ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Le=!0),e.firstContext=null)}function Qe(e){var t=e._currentValue;if(ua!==e)if(e={context:e,memoizedValue:t,next:null},Ln===null){if(ls===null)throw Error(k(308));Ln=e,ls.dependencies={lanes:0,firstContext:e}}else Ln=Ln.next=e;return t}var en=null;function fa(e){en===null?en=[e]:en.push(e)}function nf(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,fa(t)):(n.next=i.next,i.next=n),t.interleaved=n,St(e,r)}function St(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Nt=!1;function ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,St(e,n)}return i=r.interleaved,i===null?(t.next=t,fa(r)):(t.next=i.next,i.next=t),r.interleaved=t,St(e,n)}function Pi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yl(e,n)}}function Du(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function as(e,t,n,r){var i=e.updateQueue;Nt=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var f=i.baseState;o=0,c=u=a=null,l=s;do{var d=l.lane,g=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,y=l;switch(d=t,g=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){f=m.call(g,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,d=typeof m=="function"?m.call(g,f,d):m,d==null)break e;f=G({},f,d);break e;case 2:Nt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else g={eventTime:g,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=g,a=f):c=c.next=g,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);cn|=o,e.lanes=o,e.memoizedState=f}}function Fu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(k(191,i));i.call(r)}}}var sf=new nd.Component().refs;function fl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={isMounted:function(e){return(e=e._reactInternals)?pn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ee(),i=Ft(e),s=wt(r,i);s.payload=t,n!=null&&(s.callback=n),t=zt(e,s,i),t!==null&&(rt(t,e,i,r),Pi(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ee(),i=Ft(e),s=wt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=zt(e,s,i),t!==null&&(rt(t,e,i,r),Pi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ee(),r=Ft(e),i=wt(n,r);i.tag=2,t!=null&&(i.callback=t),t=zt(e,i,r),t!==null&&(rt(t,e,r,n),Pi(t,e,r))}};function Hu(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(i,s):!0}function of(e,t,n){var r=!1,i=Vt,s=t.contextType;return typeof s=="object"&&s!==null?s=Qe(s):(i=Me(t)?ln:we.current,r=t.contextTypes,s=(r=r!=null)?Un(e,i):Vt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Is,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Uu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function hl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=sf,ha(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Qe(s):(s=Me(t)?ln:we.current,i.context=Un(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(fl(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Is.enqueueReplaceState(i,i.state,null),as(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(k(309));var r=n.stateNode}if(!r)throw Error(k(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var l=i.refs;l===sf&&(l=i.refs={}),o===null?delete l[s]:l[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(k(284));if(!n._owner)throw Error(k(290,e))}return e}function vi(e,t){throw e=Object.prototype.toString.call(t),Error(k(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Vu(e){var t=e._init;return t(e._payload)}function lf(e){function t(p,h){if(e){var v=p.deletions;v===null?(p.deletions=[h],p.flags|=16):v.push(h)}}function n(p,h){if(!e)return null;for(;h!==null;)t(p,h),h=h.sibling;return null}function r(p,h){for(p=new Map;h!==null;)h.key!==null?p.set(h.key,h):p.set(h.index,h),h=h.sibling;return p}function i(p,h){return p=Ht(p,h),p.index=0,p.sibling=null,p}function s(p,h,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<h?(p.flags|=2,h):v):(p.flags|=2,h)):(p.flags|=1048576,h)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,h,v,x){return h===null||h.tag!==6?(h=yo(v,p.mode,x),h.return=p,h):(h=i(h,v),h.return=p,h)}function a(p,h,v,x){var E=v.type;return E===Sn?c(p,h,v.props.children,x,v.key):h!==null&&(h.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ct&&Vu(E)===h.type)?(x=i(h,v.props),x.ref=lr(p,h,v),x.return=p,x):(x=Di(v.type,v.key,v.props,null,p.mode,x),x.ref=lr(p,h,v),x.return=p,x)}function u(p,h,v,x){return h===null||h.tag!==4||h.stateNode.containerInfo!==v.containerInfo||h.stateNode.implementation!==v.implementation?(h=wo(v,p.mode,x),h.return=p,h):(h=i(h,v.children||[]),h.return=p,h)}function c(p,h,v,x,E){return h===null||h.tag!==7?(h=sn(v,p.mode,x,E),h.return=p,h):(h=i(h,v),h.return=p,h)}function f(p,h,v){if(typeof h=="string"&&h!==""||typeof h=="number")return h=yo(""+h,p.mode,v),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case oi:return v=Di(h.type,h.key,h.props,null,p.mode,v),v.ref=lr(p,null,h),v.return=p,v;case xn:return h=wo(h,p.mode,v),h.return=p,h;case Ct:var x=h._init;return f(p,x(h._payload),v)}if(mr(h)||nr(h))return h=sn(h,p.mode,v,null),h.return=p,h;vi(p,h)}return null}function d(p,h,v,x){var E=h!==null?h.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return E!==null?null:l(p,h,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case oi:return v.key===E?a(p,h,v,x):null;case xn:return v.key===E?u(p,h,v,x):null;case Ct:return E=v._init,d(p,h,E(v._payload),x)}if(mr(v)||nr(v))return E!==null?null:c(p,h,v,x,null);vi(p,v)}return null}function g(p,h,v,x,E){if(typeof x=="string"&&x!==""||typeof x=="number")return p=p.get(v)||null,l(h,p,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case oi:return p=p.get(x.key===null?v:x.key)||null,a(h,p,x,E);case xn:return p=p.get(x.key===null?v:x.key)||null,u(h,p,x,E);case Ct:var C=x._init;return g(p,h,v,C(x._payload),E)}if(mr(x)||nr(x))return p=p.get(v)||null,c(h,p,x,E,null);vi(h,x)}return null}function m(p,h,v,x){for(var E=null,C=null,N=h,b=h=0,S=null;N!==null&&b<v.length;b++){N.index>b?(S=N,N=null):S=N.sibling;var I=d(p,N,v[b],x);if(I===null){N===null&&(N=S);break}e&&N&&I.alternate===null&&t(p,N),h=s(I,h,b),C===null?E=I:C.sibling=I,C=I,N=S}if(b===v.length)return n(p,N),W&&Gt(p,b),E;if(N===null){for(;b<v.length;b++)N=f(p,v[b],x),N!==null&&(h=s(N,h,b),C===null?E=N:C.sibling=N,C=N);return W&&Gt(p,b),E}for(N=r(p,N);b<v.length;b++)S=g(N,p,b,v[b],x),S!==null&&(e&&S.alternate!==null&&N.delete(S.key===null?b:S.key),h=s(S,h,b),C===null?E=S:C.sibling=S,C=S);return e&&N.forEach(function(O){return t(p,O)}),W&&Gt(p,b),E}function y(p,h,v,x){var E=nr(v);if(typeof E!="function")throw Error(k(150));if(v=E.call(v),v==null)throw Error(k(151));for(var C=E=null,N=h,b=h=0,S=null,I=v.next();N!==null&&!I.done;b++,I=v.next()){N.index>b?(S=N,N=null):S=N.sibling;var O=d(p,N,I.value,x);if(O===null){N===null&&(N=S);break}e&&N&&O.alternate===null&&t(p,N),h=s(O,h,b),C===null?E=O:C.sibling=O,C=O,N=S}if(I.done)return n(p,N),W&&Gt(p,b),E;if(N===null){for(;!I.done;b++,I=v.next())I=f(p,I.value,x),I!==null&&(h=s(I,h,b),C===null?E=I:C.sibling=I,C=I);return W&&Gt(p,b),E}for(N=r(p,N);!I.done;b++,I=v.next())I=g(N,p,b,I.value,x),I!==null&&(e&&I.alternate!==null&&N.delete(I.key===null?b:I.key),h=s(I,h,b),C===null?E=I:C.sibling=I,C=I);return e&&N.forEach(function(T){return t(p,T)}),W&&Gt(p,b),E}function _(p,h,v,x){if(typeof v=="object"&&v!==null&&v.type===Sn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case oi:e:{for(var E=v.key,C=h;C!==null;){if(C.key===E){if(E=v.type,E===Sn){if(C.tag===7){n(p,C.sibling),h=i(C,v.props.children),h.return=p,p=h;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ct&&Vu(E)===C.type){n(p,C.sibling),h=i(C,v.props),h.ref=lr(p,C,v),h.return=p,p=h;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Sn?(h=sn(v.props.children,p.mode,x,v.key),h.return=p,p=h):(x=Di(v.type,v.key,v.props,null,p.mode,x),x.ref=lr(p,h,v),x.return=p,p=x)}return o(p);case xn:e:{for(C=v.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){n(p,h.sibling),h=i(h,v.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=wo(v,p.mode,x),h.return=p,p=h}return o(p);case Ct:return C=v._init,_(p,h,C(v._payload),x)}if(mr(v))return m(p,h,v,x);if(nr(v))return y(p,h,v,x);vi(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,v),h.return=p,p=h):(n(p,h),h=yo(v,p.mode,x),h.return=p,p=h),o(p)):n(p,h)}return _}var Bn=lf(!0),af=lf(!1),ei={},dt=qt(ei),Vr=qt(ei),Br=qt(ei);function tn(e){if(e===ei)throw Error(k(174));return e}function pa(e,t){switch(F(Br,t),F(Vr,e),F(dt,ei),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qo(t,e)}V(dt),F(dt,t)}function qn(){V(dt),V(Vr),V(Br)}function uf(e){tn(Br.current);var t=tn(dt.current),n=qo(t,e.type);t!==n&&(F(Vr,e),F(dt,n))}function ga(e){Vr.current===e&&(V(dt),V(Vr))}var Q=qt(0);function us(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fo=[];function ma(){for(var e=0;e<fo.length;e++)fo[e]._workInProgressVersionPrimary=null;fo.length=0}var Ri=kt.ReactCurrentDispatcher,ho=kt.ReactCurrentBatchConfig,un=0,K=null,ie=null,le=null,cs=!1,br=!1,qr=0,Um=0;function he(){throw Error(k(321))}function va(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!it(e[n],t[n]))return!1;return!0}function ya(e,t,n,r,i,s){if(un=s,K=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ri.current=e===null||e.memoizedState===null?Wm:Qm,e=n(r,i),br){s=0;do{if(br=!1,qr=0,25<=s)throw Error(k(301));s+=1,le=ie=null,t.updateQueue=null,Ri.current=Km,e=n(r,i)}while(br)}if(Ri.current=ds,t=ie!==null&&ie.next!==null,un=0,le=ie=K=null,cs=!1,t)throw Error(k(300));return e}function wa(){var e=qr!==0;return qr=0,e}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return le===null?K.memoizedState=le=e:le=le.next=e,le}function Ke(){if(ie===null){var e=K.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=le===null?K.memoizedState:le.next;if(t!==null)le=t,ie=e;else{if(e===null)throw Error(k(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},le===null?K.memoizedState=le=e:le=le.next=e}return le}function Wr(e,t){return typeof t=="function"?t(e):t}function po(e){var t=Ke(),n=t.queue;if(n===null)throw Error(k(311));n.lastRenderedReducer=e;var r=ie,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,a=null,u=s;do{var c=u.lane;if((un&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,o=r):a=a.next=f,K.lanes|=c,cn|=c}u=u.next}while(u!==null&&u!==s);a===null?o=r:a.next=l,it(r,t.memoizedState)||(Le=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,K.lanes|=s,cn|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function go(e){var t=Ke(),n=t.queue;if(n===null)throw Error(k(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);it(s,t.memoizedState)||(Le=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function cf(){}function df(e,t){var n=K,r=Ke(),i=t(),s=!it(r.memoizedState,i);if(s&&(r.memoizedState=i,Le=!0),r=r.queue,_a(pf.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||le!==null&&le.memoizedState.tag&1){if(n.flags|=2048,Qr(9,hf.bind(null,n,r,i,t),void 0,null),ae===null)throw Error(k(349));un&30||ff(n,t,i)}return i}function ff(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=K.updateQueue,t===null?(t={lastEffect:null,stores:null},K.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hf(e,t,n,r){t.value=n,t.getSnapshot=r,gf(t)&&mf(e)}function pf(e,t,n){return n(function(){gf(t)&&mf(e)})}function gf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!it(e,n)}catch{return!0}}function mf(e){var t=St(e,1);t!==null&&rt(t,e,1,-1)}function Bu(e){var t=lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:e},t.queue=e,e=e.dispatch=qm.bind(null,K,e),[t.memoizedState,e]}function Qr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=K.updateQueue,t===null?(t={lastEffect:null,stores:null},K.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function vf(){return Ke().memoizedState}function $i(e,t,n,r){var i=lt();K.flags|=e,i.memoizedState=Qr(1|t,n,void 0,r===void 0?null:r)}function Ms(e,t,n,r){var i=Ke();r=r===void 0?null:r;var s=void 0;if(ie!==null){var o=ie.memoizedState;if(s=o.destroy,r!==null&&va(r,o.deps)){i.memoizedState=Qr(t,n,s,r);return}}K.flags|=e,i.memoizedState=Qr(1|t,n,s,r)}function qu(e,t){return $i(8390656,8,e,t)}function _a(e,t){return Ms(2048,8,e,t)}function yf(e,t){return Ms(4,2,e,t)}function wf(e,t){return Ms(4,4,e,t)}function _f(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xf(e,t,n){return n=n!=null?n.concat([e]):null,Ms(4,4,_f.bind(null,t,e),n)}function xa(){}function Sf(e,t){var n=Ke();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&va(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ef(e,t){var n=Ke();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&va(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function kf(e,t,n){return un&21?(it(n,t)||(n=Cd(),K.lanes|=n,cn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Le=!0),e.memoizedState=n)}function Vm(e,t){var n=D;D=n!==0&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{D=n,ho.transition=r}}function Tf(){return Ke().memoizedState}function Bm(e,t,n){var r=Ft(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cf(e))Nf(t,n);else if(n=nf(e,t,n,r),n!==null){var i=Ee();rt(n,e,r,i),bf(n,t,r)}}function qm(e,t,n){var r=Ft(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cf(e))Nf(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,it(l,o)){var a=t.interleaved;a===null?(i.next=i,fa(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=nf(e,t,i,r),n!==null&&(i=Ee(),rt(n,e,r,i),bf(n,t,r))}}function Cf(e){var t=e.alternate;return e===K||t!==null&&t===K}function Nf(e,t){br=cs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yl(e,n)}}var ds={readContext:Qe,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},Wm={readContext:Qe,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:qu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$i(4194308,4,_f.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $i(4194308,4,e,t)},useInsertionEffect:function(e,t){return $i(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Bm.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:Bu,useDebugValue:xa,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=Bu(!1),t=e[0];return e=Vm.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,i=lt();if(W){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),ae===null)throw Error(k(349));un&30||ff(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,qu(pf.bind(null,r,s,e),[e]),r.flags|=2048,Qr(9,hf.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=lt(),t=ae.identifierPrefix;if(W){var n=vt,r=mt;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Um++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Qm={readContext:Qe,useCallback:Sf,useContext:Qe,useEffect:_a,useImperativeHandle:xf,useInsertionEffect:yf,useLayoutEffect:wf,useMemo:Ef,useReducer:po,useRef:vf,useState:function(){return po(Wr)},useDebugValue:xa,useDeferredValue:function(e){var t=Ke();return kf(t,ie.memoizedState,e)},useTransition:function(){var e=po(Wr)[0],t=Ke().memoizedState;return[e,t]},useMutableSource:cf,useSyncExternalStore:df,useId:Tf,unstable_isNewReconciler:!1},Km={readContext:Qe,useCallback:Sf,useContext:Qe,useEffect:_a,useImperativeHandle:xf,useInsertionEffect:yf,useLayoutEffect:wf,useMemo:Ef,useReducer:go,useRef:vf,useState:function(){return go(Wr)},useDebugValue:xa,useDeferredValue:function(e){var t=Ke();return ie===null?t.memoizedState=e:kf(t,ie.memoizedState,e)},useTransition:function(){var e=go(Wr)[0],t=Ke().memoizedState;return[e,t]},useMutableSource:cf,useSyncExternalStore:df,useId:Tf,unstable_isNewReconciler:!1};function Wn(e,t){try{var n="",r=t;do n+=Sg(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
40
40
|
Error generating stack: `+s.message+`
|
|
41
41
|
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function mo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Gm=typeof WeakMap=="function"?WeakMap:Map;function Af(e,t,n){n=wt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hs||(hs=!0,kl=r),pl(e,t)},n}function Lf(e,t,n){n=wt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){pl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){pl(e,t),typeof r!="function"&&(Dt===null?Dt=new Set([this]):Dt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gm;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=uv.bind(null,e,t,n),t.then(e,e))}function Qu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ku(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=wt(-1,1),t.tag=2,zt(n,t,1))),n.lanes|=1),e)}var Xm=kt.ReactCurrentOwner,Le=!1;function _e(e,t,n,r){t.child=e===null?af(t,null,n,r):Bn(t,e.child,n,r)}function Gu(e,t,n,r,i){n=n.render;var s=t.ref;return zn(t,i),r=ya(e,t,n,r,s,i),n=wa(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Et(e,t,i)):(W&&n&&oa(t),t.flags|=1,_e(e,t,r,i),t.child)}function Xu(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Aa(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,If(e,t,s,r,i)):(e=Di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Dr,n(o,r)&&e.ref===t.ref)return Et(e,t,i)}return t.flags|=1,e=Ht(s,r),e.ref=t.ref,e.return=t,t.child=e}function If(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Dr(s,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,Et(e,t,i)}return gl(e,t,n,r,i)}function Mf(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},F(Mn,Re),Re|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,F(Mn,Re),Re|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,F(Mn,Re),Re|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,F(Mn,Re),Re|=r;return _e(e,t,i,n),t.child}function Pf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gl(e,t,n,r,i){var s=Me(n)?ln:we.current;return s=Un(t,s),zn(t,i),n=ya(e,t,n,r,s,i),r=wa(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Et(e,t,i)):(W&&r&&oa(t),t.flags|=1,_e(e,t,n,i),t.child)}function Ju(e,t,n,r,i){if(Me(n)){var s=!0;rs(t)}else s=!1;if(zn(t,i),t.stateNode===null)Oi(e,t),of(t,n,r),hl(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Qe(u):(u=Me(n)?ln:we.current,u=Un(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Uu(t,o,r,u),Nt=!1;var d=t.memoizedState;o.state=d,as(t,r,o,i),a=t.memoizedState,l!==r||d!==a||Ie.current||Nt?(typeof c=="function"&&(fl(t,n,c,r),a=t.memoizedState),(l=Nt||Hu(t,n,l,r,d,a,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),o.props=r,o.state=a,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,rf(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Xe(t.type,l),o.props=u,f=t.pendingProps,d=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Qe(a):(a=Me(n)?ln:we.current,a=Un(t,a));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||d!==a)&&Uu(t,o,r,a),Nt=!1,d=t.memoizedState,o.state=d,as(t,r,o,i);var m=t.memoizedState;l!==f||d!==m||Ie.current||Nt?(typeof g=="function"&&(fl(t,n,g,r),m=t.memoizedState),(u=Nt||Hu(t,n,u,r,d,m,a)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ml(e,t,n,r,s,i)}function ml(e,t,n,r,i,s){Pf(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Ou(t,n,!1),Et(e,t,s);r=t.stateNode,Xm.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Bn(t,e.child,null,s),t.child=Bn(t,null,l,s)):_e(e,t,l,s),t.memoizedState=r.state,i&&Ou(t,n,!0),t.child}function Rf(e){var t=e.stateNode;t.pendingContext?$u(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$u(e,t.context,!1),pa(e,t.containerInfo)}function Yu(e,t,n,r,i){return Vn(),aa(i),t.flags|=256,_e(e,t,n,r),t.child}var vl={dehydrated:null,treeContext:null,retryLane:0};function yl(e){return{baseLanes:e,cachePool:null,transitions:null}}function $f(e,t,n){var r=t.pendingProps,i=Q.current,s=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),F(Q,i&1),e===null)return cl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=$s(o,r,0,null),e=sn(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=yl(n),t.memoizedState=vl,e):Sa(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Jm(e,t,o,r,l,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Ht(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Ht(l,s):(s=sn(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?yl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=vl,r}return s=e.child,e=s.sibling,r=Ht(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Sa(e,t){return t=$s({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yi(e,t,n,r){return r!==null&&aa(r),Bn(t,e.child,null,n),e=Sa(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jm(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=mo(Error(k(422))),yi(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=$s({mode:"visible",children:r.children},i,0,null),s=sn(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Bn(t,e.child,null,o),t.child.memoizedState=yl(o),t.memoizedState=vl,s);if(!(t.mode&1))return yi(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(k(419)),r=mo(s,r,void 0),yi(e,t,o,r)}if(l=(o&e.childLanes)!==0,Le||l){if(r=ae,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,St(e,i),rt(r,e,i,-1))}return ba(),r=mo(Error(k(421))),yi(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=cv.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,$e=jt(i.nextSibling),Oe=t,W=!0,Ye=null,e!==null&&(He[Ue++]=mt,He[Ue++]=vt,He[Ue++]=an,mt=e.id,vt=e.overflow,an=t),t=Sa(t,r.children),t.flags|=4096,t)}function Zu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dl(e.return,t,n)}function vo(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Of(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(_e(e,t,r.children,n),r=Q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zu(e,n,t);else if(e.tag===19)Zu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(F(Q,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&us(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vo(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&us(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vo(t,!0,n,null,s);break;case"together":vo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Oi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Et(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(k(153));if(t.child!==null){for(e=t.child,n=Ht(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ht(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ym(e,t,n){switch(t.tag){case 3:Rf(t),Vn();break;case 5:uf(t);break;case 1:Me(t.type)&&rs(t);break;case 4:pa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;F(os,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(F(Q,Q.current&1),t.flags|=128,null):n&t.child.childLanes?$f(e,t,n):(F(Q,Q.current&1),e=Et(e,t,n),e!==null?e.sibling:null);F(Q,Q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Of(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),F(Q,Q.current),r)break;return null;case 22:case 23:return t.lanes=0,Mf(e,t,n)}return Et(e,t,n)}var jf,wl,zf,Df;jf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};wl=function(){};zf=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,tn(dt.current);var s=null;switch(n){case"input":i=Ho(e,i),r=Ho(e,r),s=[];break;case"select":i=G({},i,{value:void 0}),r=G({},r,{value:void 0}),s=[];break;case"textarea":i=Bo(e,i),r=Bo(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ts)}Wo(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Mr.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Mr.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&U("scroll",e),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Df=function(e,t,n,r){n!==r&&(t.flags|=4)};function ar(e,t){if(!W)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zm(e,t,n){var r=t.pendingProps;switch(la(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pe(t),null;case 1:return Me(t.type)&&ns(),pe(t),null;case 3:return r=t.stateNode,qn(),V(Ie),V(we),ma(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(mi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ye!==null&&(Nl(Ye),Ye=null))),wl(e,t),pe(t),null;case 5:ga(t);var i=tn(Br.current);if(n=t.type,e!==null&&t.stateNode!=null)zf(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(k(166));return pe(t),null}if(e=tn(dt.current),mi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ut]=t,r[Ur]=s,e=(t.mode&1)!==0,n){case"dialog":U("cancel",r),U("close",r);break;case"iframe":case"object":case"embed":U("load",r);break;case"video":case"audio":for(i=0;i<yr.length;i++)U(yr[i],r);break;case"source":U("error",r);break;case"img":case"image":case"link":U("error",r),U("load",r);break;case"details":U("toggle",r);break;case"input":au(r,s),U("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},U("invalid",r);break;case"textarea":cu(r,s),U("invalid",r)}Wo(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&gi(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&gi(r.textContent,l,e),i=["children",""+l]):Mr.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&U("scroll",r)}switch(n){case"input":li(r),uu(r,s,!0);break;case"textarea":li(r),du(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ts)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=dd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ut]=t,e[Ur]=r,jf(e,t,!1,!1),t.stateNode=e;e:{switch(o=Qo(n,r),n){case"dialog":U("cancel",e),U("close",e),i=r;break;case"iframe":case"object":case"embed":U("load",e),i=r;break;case"video":case"audio":for(i=0;i<yr.length;i++)U(yr[i],e);i=r;break;case"source":U("error",e),i=r;break;case"img":case"image":case"link":U("error",e),U("load",e),i=r;break;case"details":U("toggle",e),i=r;break;case"input":au(e,r),i=Ho(e,r),U("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=G({},r,{value:void 0}),U("invalid",e);break;case"textarea":cu(e,r),i=Bo(e,r),U("invalid",e);break;default:i=r}Wo(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?pd(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&fd(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Pr(e,a):typeof a=="number"&&Pr(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Mr.hasOwnProperty(s)?a!=null&&s==="onScroll"&&U("scroll",e):a!=null&&Wl(e,s,a,o))}switch(n){case"input":li(e),uu(e,r,!1);break;case"textarea":li(e),du(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ut(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Rn(e,!!r.multiple,s,!1):r.defaultValue!=null&&Rn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ts)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pe(t),null;case 6:if(e&&t.stateNode!=null)Df(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(k(166));if(n=tn(Br.current),tn(dt.current),mi(t)){if(r=t.stateNode,n=t.memoizedProps,r[ut]=t,(s=r.nodeValue!==n)&&(e=Oe,e!==null))switch(e.tag){case 3:gi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&gi(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ut]=t,t.stateNode=r}return pe(t),null;case 13:if(V(Q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(W&&$e!==null&&t.mode&1&&!(t.flags&128))tf(),Vn(),t.flags|=98560,s=!1;else if(s=mi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(k(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(k(317));s[ut]=t}else Vn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pe(t),s=!1}else Ye!==null&&(Nl(Ye),Ye=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Q.current&1?se===0&&(se=3):ba())),t.updateQueue!==null&&(t.flags|=4),pe(t),null);case 4:return qn(),wl(e,t),e===null&&Fr(t.stateNode.containerInfo),pe(t),null;case 10:return da(t.type._context),pe(t),null;case 17:return Me(t.type)&&ns(),pe(t),null;case 19:if(V(Q),s=t.memoizedState,s===null)return pe(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)ar(s,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=us(e),o!==null){for(t.flags|=128,ar(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return F(Q,Q.current&1|2),t.child}e=e.sibling}s.tail!==null&&Z()>Qn&&(t.flags|=128,r=!0,ar(s,!1),t.lanes=4194304)}else{if(!r)if(e=us(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ar(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!W)return pe(t),null}else 2*Z()-s.renderingStartTime>Qn&&n!==1073741824&&(t.flags|=128,r=!0,ar(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Z(),t.sibling=null,n=Q.current,F(Q,r?n&1|2:n&1),t):(pe(t),null);case 22:case 23:return Na(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Re&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function ev(e,t){switch(la(t),t.tag){case 1:return Me(t.type)&&ns(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qn(),V(Ie),V(we),ma(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ga(t),null;case 13:if(V(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Q),null;case 4:return qn(),null;case 10:return da(t.type._context),null;case 22:case 23:return Na(),null;case 24:return null;default:return null}}var wi=!1,me=!1,tv=typeof WeakSet=="function"?WeakSet:Set,A=null;function In(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function _l(e,t,n){try{n()}catch(r){X(e,t,r)}}var ec=!1;function nv(e,t){if(rl=Yi,e=Ud(),sa(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(l=o+i),f!==s||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=o),d===s&&++c===r&&(a=o),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(il={focusedElem:e,selectionRange:n},Yi=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,_=m.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:Xe(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(x){X(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return m=ec,ec=!1,m}function Ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&_l(t,n,s)}i=i.next}while(i!==r)}}function Ps(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ff(e){var t=e.alternate;t!==null&&(e.alternate=null,Ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[Ur],delete t[ll],delete t[zm],delete t[Dm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hf(e){return e.tag===5||e.tag===3||e.tag===4}function tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ts));else if(r!==4&&(e=e.child,e!==null))for(Sl(e,t,n),e=e.sibling;e!==null;)Sl(e,t,n),e=e.sibling}function El(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(El(e,t,n),e=e.sibling;e!==null;)El(e,t,n),e=e.sibling}var ue=null,Je=!1;function Tt(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Ts,n)}catch{}switch(n.tag){case 5:me||In(n,t);case 6:var r=ue,i=Je;ue=null,Tt(e,t,n),ue=r,Je=i,ue!==null&&(Je?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(Je?(e=ue,n=n.stateNode,e.nodeType===8?uo(e.parentNode,n):e.nodeType===1&&uo(e,n),jr(e)):uo(ue,n.stateNode));break;case 4:r=ue,i=Je,ue=n.stateNode.containerInfo,Je=!0,Tt(e,t,n),ue=r,Je=i;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&_l(n,t,o),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!me&&(In(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){X(n,t,l)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,Tt(e,t,n),me=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function nc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tv),t.forEach(function(r){var i=dv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ge(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:ue=l.stateNode,Je=!1;break e;case 3:ue=l.stateNode.containerInfo,Je=!0;break e;case 4:ue=l.stateNode.containerInfo,Je=!0;break e}l=l.return}if(ue===null)throw Error(k(160));Uf(s,o,i),ue=null,Je=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){X(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Vf(t,e),t=t.sibling}function Vf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ge(t,e),ot(e),r&4){try{Ar(3,e,e.return),Ps(3,e)}catch(y){X(e,e.return,y)}try{Ar(5,e,e.return)}catch(y){X(e,e.return,y)}}break;case 1:Ge(t,e),ot(e),r&512&&n!==null&&In(n,n.return);break;case 5:if(Ge(t,e),ot(e),r&512&&n!==null&&In(n,n.return),e.flags&32){var i=e.stateNode;try{Pr(i,"")}catch(y){X(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&ud(i,s),Qo(l,o);var u=Qo(l,s);for(o=0;o<a.length;o+=2){var c=a[o],f=a[o+1];c==="style"?pd(i,f):c==="dangerouslySetInnerHTML"?fd(i,f):c==="children"?Pr(i,f):Wl(i,c,f,u)}switch(l){case"input":Uo(i,s);break;case"textarea":cd(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?Rn(i,!!s.multiple,g,!1):d!==!!s.multiple&&(s.defaultValue!=null?Rn(i,!!s.multiple,s.defaultValue,!0):Rn(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ur]=s}catch(y){X(e,e.return,y)}}break;case 6:if(Ge(t,e),ot(e),r&4){if(e.stateNode===null)throw Error(k(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){X(e,e.return,y)}}break;case 3:if(Ge(t,e),ot(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{jr(t.containerInfo)}catch(y){X(e,e.return,y)}break;case 4:Ge(t,e),ot(e);break;case 13:Ge(t,e),ot(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Ta=Z())),r&4&&nc(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(me=(u=me)||c,Ge(t,e),me=u):Ge(t,e),ot(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(A=e,c=e.child;c!==null;){for(f=A=c;A!==null;){switch(d=A,g=d.child,d.tag){case 0:case 11:case 14:case 15:Ar(4,d,d.return);break;case 1:In(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){X(r,n,y)}}break;case 5:In(d,d.return);break;case 22:if(d.memoizedState!==null){ic(f);continue}}g!==null?(g.return=d,A=g):ic(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,a=f.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=hd("display",o))}catch(y){X(e,e.return,y)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){X(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ge(t,e),ot(e),r&4&&nc(e);break;case 21:break;default:Ge(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Hf(n)){var r=n;break e}n=n.return}throw Error(k(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Pr(i,""),r.flags&=-33);var s=tc(e);El(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=tc(e);Sl(e,l,o);break;default:throw Error(k(161))}}catch(a){X(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rv(e,t,n){A=e,Bf(e)}function Bf(e,t,n){for(var r=(e.mode&1)!==0;A!==null;){var i=A,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||wi;if(!o){var l=i.alternate,a=l!==null&&l.memoizedState!==null||me;l=wi;var u=me;if(wi=o,(me=a)&&!u)for(A=i;A!==null;)o=A,a=o.child,o.tag===22&&o.memoizedState!==null?sc(i):a!==null?(a.return=o,A=a):sc(i);for(;s!==null;)A=s,Bf(s),s=s.sibling;A=i,wi=l,me=u}rc(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,A=s):rc(e)}}function rc(e){for(;A!==null;){var t=A;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:me||Ps(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!me)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Xe(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Fu(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Fu(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&jr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(k(163))}me||t.flags&512&&xl(t)}catch(d){X(t,t.return,d)}}if(t===e){A=null;break}if(n=t.sibling,n!==null){n.return=t.return,A=n;break}A=t.return}}function ic(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var n=t.sibling;if(n!==null){n.return=t.return,A=n;break}A=t.return}}function sc(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ps(4,t)}catch(a){X(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){X(t,i,a)}}var s=t.return;try{xl(t)}catch(a){X(t,s,a)}break;case 5:var o=t.return;try{xl(t)}catch(a){X(t,o,a)}}}catch(a){X(t,t.return,a)}if(t===e){A=null;break}var l=t.sibling;if(l!==null){l.return=t.return,A=l;break}A=t.return}}var iv=Math.ceil,fs=kt.ReactCurrentDispatcher,Ea=kt.ReactCurrentOwner,We=kt.ReactCurrentBatchConfig,z=0,ae=null,ne=null,de=0,Re=0,Mn=qt(0),se=0,Kr=null,cn=0,Rs=0,ka=0,Lr=null,Ne=null,Ta=0,Qn=1/0,pt=null,hs=!1,kl=null,Dt=null,_i=!1,Pt=null,ps=0,Ir=0,Tl=null,ji=-1,zi=0;function Ee(){return z&6?Z():ji!==-1?ji:ji=Z()}function Ft(e){return e.mode&1?z&2&&de!==0?de&-de:Hm.transition!==null?(zi===0&&(zi=Cd()),zi):(e=D,e!==0||(e=window.event,e=e===void 0?16:Pd(e.type)),e):1}function rt(e,t,n,r){if(50<Ir)throw Ir=0,Tl=null,Error(k(185));Jr(e,n,r),(!(z&2)||e!==ae)&&(e===ae&&(!(z&2)&&(Rs|=n),se===4&&It(e,de)),Pe(e,r),n===1&&z===0&&!(t.mode&1)&&(Qn=Z()+500,Ls&&Wt()))}function Pe(e,t){var n=e.callbackNode;Hg(e,t);var r=Ji(e,e===ae?de:0);if(r===0)n!==null&&pu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&pu(n),t===1)e.tag===0?Fm(oc.bind(null,e)):Yd(oc.bind(null,e)),Om(function(){!(z&6)&&Wt()}),n=null;else{switch(Nd(r)){case 1:n=Jl;break;case 4:n=kd;break;case 16:n=Xi;break;case 536870912:n=Td;break;default:n=Xi}n=Yf(n,qf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qf(e,t){if(ji=-1,zi=0,z&6)throw Error(k(327));var n=e.callbackNode;if(Dn()&&e.callbackNode!==n)return null;var r=Ji(e,e===ae?de:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=gs(e,r);else{t=r;var i=z;z|=2;var s=Qf();(ae!==e||de!==t)&&(pt=null,Qn=Z()+500,rn(e,t));do try{lv();break}catch(l){Wf(e,l)}while(!0);ca(),fs.current=s,z=i,ne!==null?t=0:(ae=null,de=0,t=se)}if(t!==0){if(t===2&&(i=Yo(e),i!==0&&(r=i,t=Cl(e,i))),t===1)throw n=Kr,rn(e,0),It(e,r),Pe(e,Z()),n;if(t===6)It(e,r);else{if(i=e.current.alternate,!(r&30)&&!sv(i)&&(t=gs(e,r),t===2&&(s=Yo(e),s!==0&&(r=s,t=Cl(e,s))),t===1))throw n=Kr,rn(e,0),It(e,r),Pe(e,Z()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(k(345));case 2:Xt(e,Ne,pt);break;case 3:if(It(e,r),(r&130023424)===r&&(t=Ta+500-Z(),10<t)){if(Ji(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ee(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ol(Xt.bind(null,e,Ne,pt),t);break}Xt(e,Ne,pt);break;case 4:if(It(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-nt(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*iv(r/1960))-r,10<r){e.timeoutHandle=ol(Xt.bind(null,e,Ne,pt),r);break}Xt(e,Ne,pt);break;case 5:Xt(e,Ne,pt);break;default:throw Error(k(329))}}}return Pe(e,Z()),e.callbackNode===n?qf.bind(null,e):null}function Cl(e,t){var n=Lr;return e.current.memoizedState.isDehydrated&&(rn(e,t).flags|=256),e=gs(e,t),e!==2&&(t=Ne,Ne=n,t!==null&&Nl(t)),e}function Nl(e){Ne===null?Ne=e:Ne.push.apply(Ne,e)}function sv(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!it(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function It(e,t){for(t&=~ka,t&=~Rs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nt(t),r=1<<n;e[n]=-1,t&=~r}}function oc(e){if(z&6)throw Error(k(327));Dn();var t=Ji(e,0);if(!(t&1))return Pe(e,Z()),null;var n=gs(e,t);if(e.tag!==0&&n===2){var r=Yo(e);r!==0&&(t=r,n=Cl(e,r))}if(n===1)throw n=Kr,rn(e,0),It(e,t),Pe(e,Z()),n;if(n===6)throw Error(k(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xt(e,Ne,pt),Pe(e,Z()),null}function Ca(e,t){var n=z;z|=1;try{return e(t)}finally{z=n,z===0&&(Qn=Z()+500,Ls&&Wt())}}function dn(e){Pt!==null&&Pt.tag===0&&!(z&6)&&Dn();var t=z;z|=1;var n=We.transition,r=D;try{if(We.transition=null,D=1,e)return e()}finally{D=r,We.transition=n,z=t,!(z&6)&&Wt()}}function Na(){Re=Mn.current,V(Mn)}function rn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,$m(n)),ne!==null)for(n=ne.return;n!==null;){var r=n;switch(la(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ns();break;case 3:qn(),V(Ie),V(we),ma();break;case 5:ga(r);break;case 4:qn();break;case 13:V(Q);break;case 19:V(Q);break;case 10:da(r.type._context);break;case 22:case 23:Na()}n=n.return}if(ae=e,ne=e=Ht(e.current,null),de=Re=t,se=0,Kr=null,ka=Rs=cn=0,Ne=Lr=null,en!==null){for(t=0;t<en.length;t++)if(n=en[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}en=null}return e}function Wf(e,t){do{var n=ne;try{if(ca(),Ri.current=ds,cs){for(var r=K.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}cs=!1}if(un=0,le=ie=K=null,br=!1,qr=0,Ea.current=null,n===null||n.return===null){se=1,Kr=t,ne=null;break}e:{var s=e,o=n.return,l=n,a=t;if(t=de,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=Qu(o);if(g!==null){g.flags&=-257,Ku(g,o,l,s,t),g.mode&1&&Wu(s,u,t),t=g,a=u;var m=t.updateQueue;if(m===null){var y=new Set;y.add(a),t.updateQueue=y}else m.add(a);break e}else{if(!(t&1)){Wu(s,u,t),ba();break e}a=Error(k(426))}}else if(W&&l.mode&1){var _=Qu(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ku(_,o,l,s,t),aa(Wn(a,l));break e}}s=a=Wn(a,l),se!==4&&(se=2),Lr===null?Lr=[s]:Lr.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Af(s,a,t);Du(s,p);break e;case 1:l=a;var h=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof h.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Dt===null||!Dt.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var x=Lf(s,l,t);Du(s,x);break e}}s=s.return}while(s!==null)}Gf(n)}catch(E){t=E,ne===n&&n!==null&&(ne=n=n.return);continue}break}while(!0)}function Qf(){var e=fs.current;return fs.current=ds,e===null?ds:e}function ba(){(se===0||se===3||se===2)&&(se=4),ae===null||!(cn&268435455)&&!(Rs&268435455)||It(ae,de)}function gs(e,t){var n=z;z|=2;var r=Qf();(ae!==e||de!==t)&&(pt=null,rn(e,t));do try{ov();break}catch(i){Wf(e,i)}while(!0);if(ca(),z=n,fs.current=r,ne!==null)throw Error(k(261));return ae=null,de=0,se}function ov(){for(;ne!==null;)Kf(ne)}function lv(){for(;ne!==null&&!Mg();)Kf(ne)}function Kf(e){var t=Jf(e.alternate,e,Re);e.memoizedProps=e.pendingProps,t===null?Gf(e):ne=t,Ea.current=null}function Gf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ev(n,t),n!==null){n.flags&=32767,ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,ne=null;return}}else if(n=Zm(n,t,Re),n!==null){ne=n;return}if(t=t.sibling,t!==null){ne=t;return}ne=t=e}while(t!==null);se===0&&(se=5)}function Xt(e,t,n){var r=D,i=We.transition;try{We.transition=null,D=1,av(e,t,n,r)}finally{We.transition=i,D=r}return null}function av(e,t,n,r){do Dn();while(Pt!==null);if(z&6)throw Error(k(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(k(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Ug(e,s),e===ae&&(ne=ae=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_i||(_i=!0,Yf(Xi,function(){return Dn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=We.transition,We.transition=null;var o=D;D=1;var l=z;z|=4,Ea.current=null,nv(e,n),Vf(n,e),bm(il),Yi=!!rl,il=rl=null,e.current=n,rv(n),Pg(),z=l,D=o,We.transition=s}else e.current=n;if(_i&&(_i=!1,Pt=e,ps=i),s=e.pendingLanes,s===0&&(Dt=null),Og(n.stateNode),Pe(e,Z()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(hs)throw hs=!1,e=kl,kl=null,e;return ps&1&&e.tag!==0&&Dn(),s=e.pendingLanes,s&1?e===Tl?Ir++:(Ir=0,Tl=e):Ir=0,Wt(),null}function Dn(){if(Pt!==null){var e=Nd(ps),t=We.transition,n=D;try{if(We.transition=null,D=16>e?16:e,Pt===null)var r=!1;else{if(e=Pt,Pt=null,ps=0,z&6)throw Error(k(331));var i=z;for(z|=4,A=e.current;A!==null;){var s=A,o=s.child;if(A.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(A=u;A!==null;){var c=A;switch(c.tag){case 0:case 11:case 15:Ar(8,c,s)}var f=c.child;if(f!==null)f.return=c,A=f;else for(;A!==null;){c=A;var d=c.sibling,g=c.return;if(Ff(c),c===u){A=null;break}if(d!==null){d.return=g,A=d;break}A=g}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}A=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,A=o;else e:for(;A!==null;){if(s=A,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ar(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,A=p;break e}A=s.return}}var h=e.current;for(A=h;A!==null;){o=A;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,A=v;else e:for(o=h;A!==null;){if(l=A,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Ps(9,l)}}catch(E){X(l,l.return,E)}if(l===o){A=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,A=x;break e}A=l.return}}if(z=i,Wt(),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(Ts,e)}catch{}r=!0}return r}finally{D=n,We.transition=t}}return!1}function lc(e,t,n){t=Wn(n,t),t=Af(e,t,1),e=zt(e,t,1),t=Ee(),e!==null&&(Jr(e,1,t),Pe(e,t))}function X(e,t,n){if(e.tag===3)lc(e,e,n);else for(;t!==null;){if(t.tag===3){lc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Dt===null||!Dt.has(r))){e=Wn(n,e),e=Lf(t,e,1),t=zt(t,e,1),e=Ee(),t!==null&&(Jr(t,1,e),Pe(t,e));break}}t=t.return}}function uv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ee(),e.pingedLanes|=e.suspendedLanes&n,ae===e&&(de&n)===n&&(se===4||se===3&&(de&130023424)===de&&500>Z()-Ta?rn(e,0):ka|=n),Pe(e,t)}function Xf(e,t){t===0&&(e.mode&1?(t=ci,ci<<=1,!(ci&130023424)&&(ci=4194304)):t=1);var n=Ee();e=St(e,t),e!==null&&(Jr(e,t,n),Pe(e,n))}function cv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xf(e,n)}function dv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(k(314))}r!==null&&r.delete(t),Xf(e,n)}var Jf;Jf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Le=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Le=!1,Ym(e,t,n);Le=!!(e.flags&131072)}else Le=!1,W&&t.flags&1048576&&Zd(t,ss,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Oi(e,t),e=t.pendingProps;var i=Un(t,we.current);zn(t,n),i=ya(null,t,r,e,i,n);var s=wa();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Me(r)?(s=!0,rs(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ha(t),i.updater=Is,t.stateNode=i,i._reactInternals=t,hl(t,r,e,n),t=ml(null,t,r,!0,s,n)):(t.tag=0,W&&s&&oa(t),_e(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Oi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=hv(r),e=Xe(r,e),i){case 0:t=gl(null,t,r,e,n);break e;case 1:t=Ju(null,t,r,e,n);break e;case 11:t=Gu(null,t,r,e,n);break e;case 14:t=Xu(null,t,r,Xe(r.type,e),n);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),gl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),Ju(e,t,r,i,n);case 3:e:{if(Rf(t),e===null)throw Error(k(387));r=t.pendingProps,s=t.memoizedState,i=s.element,rf(e,t),as(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Wn(Error(k(423)),t),t=Yu(e,t,r,n,i);break e}else if(r!==i){i=Wn(Error(k(424)),t),t=Yu(e,t,r,n,i);break e}else for($e=jt(t.stateNode.containerInfo.firstChild),Oe=t,W=!0,Ye=null,n=af(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===i){t=Et(e,t,n);break e}_e(e,t,r,n)}t=t.child}return t;case 5:return uf(t),e===null&&cl(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,sl(r,i)?o=null:s!==null&&sl(r,s)&&(t.flags|=32),Pf(e,t),_e(e,t,o,n),t.child;case 6:return e===null&&cl(t),null;case 13:return $f(e,t,n);case 4:return pa(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):_e(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),Gu(e,t,r,i,n);case 7:return _e(e,t,t.pendingProps,n),t.child;case 8:return _e(e,t,t.pendingProps.children,n),t.child;case 12:return _e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,F(os,r._currentValue),r._currentValue=o,s!==null)if(it(s.value,o)){if(s.children===i.children&&!Ie.current){t=Et(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=wt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),dl(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(k(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),dl(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}_e(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zn(t,n),i=Qe(i),r=r(i),t.flags|=1,_e(e,t,r,n),t.child;case 14:return r=t.type,i=Xe(r,t.pendingProps),i=Xe(r.type,i),Xu(e,t,r,i,n);case 15:return If(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),Oi(e,t),t.tag=1,Me(r)?(e=!0,rs(t)):e=!1,zn(t,n),of(t,r,i),hl(t,r,i,n),ml(null,t,r,!0,e,n);case 19:return Of(e,t,n);case 22:return Mf(e,t,n)}throw Error(k(156,t.tag))};function Yf(e,t){return Ed(e,t)}function fv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new fv(e,t,n,r)}function Aa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hv(e){if(typeof e=="function")return Aa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kl)return 11;if(e===Gl)return 14}return 2}function Ht(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Di(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Aa(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Sn:return sn(n.children,i,s,t);case Ql:o=8,i|=8;break;case jo:return e=Be(12,n,t,i|2),e.elementType=jo,e.lanes=s,e;case zo:return e=Be(13,n,t,i),e.elementType=zo,e.lanes=s,e;case Do:return e=Be(19,n,t,i),e.elementType=Do,e.lanes=s,e;case od:return $s(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case id:o=10;break e;case sd:o=9;break e;case Kl:o=11;break e;case Gl:o=14;break e;case Ct:o=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Be(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function sn(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function $s(e,t,n,r){return e=Be(22,e,r,t),e.elementType=od,e.lanes=n,e.stateNode={isHidden:!1},e}function yo(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function wo(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pv(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ys(0),this.expirationTimes=Ys(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ys(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function La(e,t,n,r,i,s,o,l,a){return e=new pv(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Be(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ha(s),e}function gv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Zf(e){if(!e)return Vt;e=e._reactInternals;e:{if(pn(e)!==e||e.tag!==1)throw Error(k(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Me(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(k(171))}if(e.tag===1){var n=e.type;if(Me(n))return Jd(e,n,t)}return t}function eh(e,t,n,r,i,s,o,l,a){return e=La(n,r,!0,e,i,s,o,l,a),e.context=Zf(null),n=e.current,r=Ee(),i=Ft(n),s=wt(r,i),s.callback=t??null,zt(n,s,i),e.current.lanes=i,Jr(e,i,r),Pe(e,r),e}function Os(e,t,n,r){var i=t.current,s=Ee(),o=Ft(i);return n=Zf(n),t.context===null?t.context=n:t.pendingContext=n,t=wt(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=zt(i,t,o),e!==null&&(rt(e,i,o,s),Pi(e,i,o)),o}function ms(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ac(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ia(e,t){ac(e,t),(e=e.alternate)&&ac(e,t)}function mv(){return null}var th=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ma(e){this._internalRoot=e}js.prototype.render=Ma.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(k(409));Os(e,t,null,null)};js.prototype.unmount=Ma.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dn(function(){Os(null,e,null,null)}),t[xt]=null}};function js(e){this._internalRoot=e}js.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ld();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&t!==0&&t<Lt[n].priority;n++);Lt.splice(n,0,e),n===0&&Md(e)}};function Pa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function uc(){}function vv(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=ms(o);s.call(u)}}var o=eh(t,r,e,0,null,!1,!1,"",uc);return e._reactRootContainer=o,e[xt]=o.current,Fr(e.nodeType===8?e.parentNode:e),dn(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=ms(a);l.call(u)}}var a=La(e,0,!1,null,null,!1,!1,"",uc);return e._reactRootContainer=a,e[xt]=a.current,Fr(e.nodeType===8?e.parentNode:e),dn(function(){Os(t,a,n,r)}),a}function Ds(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var a=ms(o);l.call(a)}}Os(t,o,e,i)}else o=vv(n,t,e,i,r);return ms(o)}bd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vr(t.pendingLanes);n!==0&&(Yl(t,n|1),Pe(t,Z()),!(z&6)&&(Qn=Z()+500,Wt()))}break;case 13:dn(function(){var r=St(e,1);if(r!==null){var i=Ee();rt(r,e,1,i)}}),Ia(e,1)}};Zl=function(e){if(e.tag===13){var t=St(e,134217728);if(t!==null){var n=Ee();rt(t,e,134217728,n)}Ia(e,134217728)}};Ad=function(e){if(e.tag===13){var t=Ft(e),n=St(e,t);if(n!==null){var r=Ee();rt(n,e,t,r)}Ia(e,t)}};Ld=function(){return D};Id=function(e,t){var n=D;try{return D=e,t()}finally{D=n}};Go=function(e,t,n){switch(t){case"input":if(Uo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=As(r);if(!i)throw Error(k(90));ad(r),Uo(r,i)}}}break;case"textarea":cd(e,n);break;case"select":t=n.value,t!=null&&Rn(e,!!n.multiple,t,!1)}};vd=Ca;yd=dn;var yv={usingClientEntryPoint:!1,Events:[Zr,Cn,As,gd,md,Ca]},ur={findFiberByHostInstance:Zt,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},wv={bundleType:ur.bundleType,version:ur.version,rendererPackageName:ur.rendererPackageName,rendererConfig:ur.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:kt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xd(e),e===null?null:e.stateNode},findFiberByHostInstance:ur.findFiberByHostInstance||mv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xi.isDisabled&&xi.supportsFiber)try{Ts=xi.inject(wv),ct=xi}catch{}}De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yv;De.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pa(t))throw Error(k(200));return gv(e,t,null,n)};De.createRoot=function(e,t){if(!Pa(e))throw Error(k(299));var n=!1,r="",i=th;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=La(e,1,!1,null,null,n,!1,r,i),e[xt]=t.current,Fr(e.nodeType===8?e.parentNode:e),new Ma(t)};De.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(k(188)):(e=Object.keys(e).join(","),Error(k(268,e)));return e=xd(t),e=e===null?null:e.stateNode,e};De.flushSync=function(e){return dn(e)};De.hydrate=function(e,t,n){if(!zs(t))throw Error(k(200));return Ds(null,e,t,!0,n)};De.hydrateRoot=function(e,t,n){if(!Pa(e))throw Error(k(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=th;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=eh(t,null,e,1,n??null,i,!1,s,o),e[xt]=t.current,Fr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new js(t)};De.render=function(e,t,n){if(!zs(t))throw Error(k(200));return Ds(null,e,t,!1,n)};De.unmountComponentAtNode=function(e){if(!zs(e))throw Error(k(40));return e._reactRootContainer?(dn(function(){Ds(null,null,e,!1,function(){e._reactRootContainer=null,e[xt]=null})}),!0):!1};De.unstable_batchedUpdates=Ca;De.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zs(n))throw Error(k(200));if(e==null||e._reactInternals===void 0)throw Error(k(38));return Ds(e,t,n,!1,r)};De.version="18.2.0-next-9e3b772b8-20220608";function nh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nh)}catch(e){console.error(e)}}nh(),Zc.exports=De;var _v=Zc.exports,xv,cc=_v;xv=cc.createRoot,cc.hydrateRoot;const fn=({children:e,title:t="",icon:n,disabled:r=!1,toggled:i=!1,onClick:s=()=>{},style:o,testId:l,className:a,ariaLabel:u})=>w.jsxs("button",{className:tt(a,"toolbar-button",n,i&&"toggled"),onMouseDown:dc,onClick:s,onDoubleClick:dc,title:t,disabled:!!r,style:o,"data-testid":l,"aria-label":u||t,children:[n&&w.jsx("span",{className:`codicon codicon-${n}`,style:e?{marginRight:5}:{}}),e]}),aw=({style:e})=>w.jsx("div",{className:"toolbar-separator",style:e}),dc=e=>{e.stopPropagation(),e.preventDefault()},wr=Symbol("context"),rh=Symbol("next"),ih=Symbol("prev"),fc=Symbol("events");class uw{constructor(t){H(this,"startTime");H(this,"endTime");H(this,"browserName");H(this,"channel");H(this,"platform");H(this,"wallTime");H(this,"title");H(this,"options");H(this,"pages");H(this,"actions");H(this,"events");H(this,"stdio");H(this,"errors");H(this,"errorDescriptors");H(this,"hasSource");H(this,"hasStepData");H(this,"sdkLanguage");H(this,"testIdAttributeName");H(this,"sources");H(this,"resources");t.forEach(r=>Sv(r));const n=t.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=Ev(t),this.pages=[].concat(...t.map(r=>r.pages)),this.wallTime=t.map(r=>r.wallTime).reduce((r,i)=>Math.min(r||Number.MAX_VALUE,i),Number.MAX_VALUE),this.startTime=t.map(r=>r.startTime).reduce((r,i)=>Math.min(r,i),Number.MAX_VALUE),this.endTime=t.map(r=>r.endTime).reduce((r,i)=>Math.max(r,i),Number.MIN_VALUE),this.events=[].concat(...t.map(r=>r.events)),this.stdio=[].concat(...t.map(r=>r.stdio)),this.errors=[].concat(...t.map(r=>r.errors)),this.hasSource=t.some(r=>r.hasSource),this.hasStepData=t.some(r=>r.origin==="testRunner"),this.resources=[...t.map(r=>r.resources)].flat(),this.events.sort((r,i)=>r.time-i.time),this.resources.sort((r,i)=>r._monotonicTime-i._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Iv(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(t=>t.error)}_errorDescriptorsFromActions(){var n;const t=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&t.push({action:r,stack:r.stack,message:r.error.message});return t}_errorDescriptorsFromTestRunner(){const t=[];for(const n of this.errors||[])n.message&&t.push({stack:n.stack,message:n.message});return t}}function Sv(e){for(const n of e.pages)n[wr]=e;for(let n=0;n<e.actions.length;++n){const r=e.actions[n];r[wr]=e}let t;for(let n=e.actions.length-1;n>=0;n--){const r=e.actions[n];r[rh]=t,r.apiName.includes("route.")||(t=r)}for(const n of e.events)n[wr]=e;for(const n of e.resources)n[wr]=e}function Ev(e){const t=new Map;for(const i of e){const s=i.traceUrl;let o=t.get(s);o||(o=[],t.set(s,o)),o.push(i)}const n=[];let r=0;for(const[,i]of t){t.size>1&&kv(i,++r);const s=Tv(i);n.push(...s)}n.sort((i,s)=>s.parentId===i.callId?-1:i.parentId===s.callId?1:i.startTime-s.startTime);for(let i=1;i<n.length;++i)n[i][ih]=n[i-1];return n}function kv(e,t){for(const n of e)for(const r of n.actions)r.callId&&(r.callId=`${t}:${r.callId}`),r.parentId&&(r.parentId=`${t}:${r.parentId}`)}function Tv(e){const t=new Map,n=e.filter(l=>l.origin==="library"),r=e.filter(l=>l.origin==="testRunner");if(!r.length||!n.length)return e.map(l=>l.actions.map(a=>({...a,context:l}))).flat();const i=n.some(l=>l.actions.some(a=>!!a.stepId));for(const l of n)for(const a of l.actions){const u=i?a.stepId:`${a.apiName}@${a.wallTime}`;t.set(u,{...a,context:l})}const s=Nv(r,t,i);s&&Cv(n,s);const o=new Map;for(const l of r)for(const a of l.actions){const u=i?a.callId:`${a.apiName}@${a.wallTime}`,c=t.get(u);if(c){o.set(a.callId,c.callId),a.error&&(c.error=a.error),a.attachments&&(c.attachments=a.attachments),a.parentId&&(c.parentId=o.get(a.parentId)??a.parentId),c.startTime=a.startTime,c.endTime=a.endTime;continue}a.parentId&&(a.parentId=o.get(a.parentId)??a.parentId),t.set(u,{...a,context:l})}return[...t.values()]}function Cv(e,t){for(const n of e){n.startTime+=t,n.endTime+=t;for(const r of n.actions)r.startTime&&(r.startTime+=t),r.endTime&&(r.endTime+=t);for(const r of n.events)r.time+=t;for(const r of n.stdio)r.timestamp+=t;for(const r of n.pages)for(const i of r.screencastFrames)i.timestamp+=t;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=t)}}function Nv(e,t,n){for(const r of e)for(const i of r.actions){if(!i.startTime)continue;const s=n?i.callId:`${i.apiName}@${i.wallTime}`,o=t.get(s);if(o)return i.startTime-o.startTime}return 0}function cw(e){const t=new Map;for(const r of e)t.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of t.values()){const i=r.action.parentId&&t.get(r.action.parentId)||n;i.children.push(r),r.parent=i}return{rootItem:n,itemMap:t}}function vs(e){return e[wr]}function bv(e){return e[rh]}function Av(e){return e[ih]}function dw(e){let t=0,n=0;for(const r of Lv(e)){if(r.type==="console"){const i=r.messageType;i==="warning"?++n:i==="error"&&++t}r.type==="event"&&r.method==="pageError"&&++t}return{errors:t,warnings:n}}function Lv(e){let t=e[fc];if(t)return t;const n=bv(e);return t=vs(e).events.filter(r=>r.time>=e.startTime&&(!n||r.time<n.startTime)),e[fc]=t,t}function Iv(e,t){var r;const n=new Map;for(const i of e)for(const s of i.stack||[]){let o=n.get(s.file);o||(o={errors:[],content:void 0},n.set(s.file,o))}for(const i of t){const{action:s,stack:o,message:l}=i;!s||!o||(r=n.get(o[0].file))==null||r.errors.push({line:o[0].line||0,message:l})}return n}const _o=new Set(["page.route","page.routefromhar","page.unroute","page.unrouteall","browsercontext.route","browsercontext.routefromhar","browsercontext.unroute","browsercontext.unrouteall"]);{for(const e of[..._o])_o.add(e+"async");for(const e of["page.route_from_har","page.unroute_all","context.route_from_har","context.unroute_all"])_o.add(e)}const Mv=50,sh=({sidebarSize:e,sidebarHidden:t=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:i=Mv,settingName:s,sidebar:o,main:l})=>{const a=Math.max(i,e)*window.devicePixelRatio,[u,c]=ru(s?s+"."+r+":size":void 0,a),[f,d]=ru(s?s+"."+r+":size":void 0,a),[g,m]=M.useState(null),[y,_]=ks();let p;r==="vertical"?(p=f/window.devicePixelRatio,y&&y.height<p&&(p=y.height-10)):(p=u/window.devicePixelRatio,y&&y.width<p&&(p=y.width-10)),document.body.style.userSelect=g?"none":"inherit";let h={};return r==="vertical"?n?h={top:g?0:p-4,bottom:g?0:void 0,height:g?"initial":8}:h={bottom:g?0:p-4,top:g?0:void 0,height:g?"initial":8}:n?h={left:g?0:p-4,right:g?0:void 0,width:g?"initial":8}:h={right:g?0:p-4,left:g?0:void 0,width:g?"initial":8},w.jsxs("div",{className:tt("split-view",r,n&&"sidebar-first"),ref:_,children:[w.jsx("div",{className:"split-view-main",children:l}),!t&&w.jsx("div",{style:{flexBasis:p},className:"split-view-sidebar",children:o}),!t&&w.jsx("div",{style:h,className:"split-view-resizer",onMouseDown:v=>m({offset:r==="vertical"?v.clientY:v.clientX,size:p}),onMouseUp:()=>m(null),onMouseMove:v=>{if(!v.buttons)m(null);else if(g){const E=(r==="vertical"?v.clientY:v.clientX)-g.offset,C=n?g.size+E:g.size-E,b=v.target.parentElement.getBoundingClientRect(),S=Math.min(Math.max(i,C),(r==="vertical"?b.height:b.width)-i);r==="vertical"?d(S*window.devicePixelRatio):c(S*window.devicePixelRatio)}}})]})};function Fs(e,t="'"){const n=JSON.stringify(e),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(t==="'")return t+r.replace(/[']/g,"\\'")+t;if(t==='"')return t+r.replace(/["]/g,'\\"')+t;if(t==="`")return t+r.replace(/[`]/g,"`")+t;throw new Error("Invalid escape char")}function ys(e){return e.charAt(0).toUpperCase()+e.substring(1)}function oh(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Ve(e){let t="";for(let n=0;n<e.length;n++)t+=Pv(e,n);return t}function cr(e){return`"${Ve(e).replace(/\\ /g," ")}"`}function Pv(e,t){const n=e.charCodeAt(t);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(t===0||t===1&&e.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":t===0&&n===45&&e.length===1?"\\"+e.charAt(t):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?e.charAt(t):"\\"+e.charAt(t)}let Jt;function Rv(){Jt=new Map}function ze(e){let t=Jt==null?void 0:Jt.get(e);return t===void 0&&(t=e.replace(/\u200b/g,"").trim().replace(/\s+/g," "),Jt==null||Jt.set(e,t)),t}function Hs(e){return e.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function lh(e){return e.unicode||e.unicodeSets?String(e):String(e).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function qe(e,t){return typeof e!="string"?lh(e):`${JSON.stringify(e)}${t?"s":"i"}`}function xe(e,t){return typeof e!="string"?lh(e):`"${e.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${t?"s":"i"}`}function $v(e,t,n=""){if(e.length<=t)return e;const r=[...e];return r.length>t?r.slice(0,t-n.length).join("")+n:r.join("")}function hc(e,t){return $v(e,t,"…")}function bl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ov(e,t){const n=e.length,r=t.length;let i=0,s=0;const o=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let l=1;l<=n;l++)for(let a=1;a<=r;a++)e[l-1]===t[a-1]&&(o[l][a]=o[l-1][a-1]+1,o[l][a]>i&&(i=o[l][a],s=l));return e.slice(s-i,s)}const te=function(e,t,n){return e>=t&&e<=n};function Ce(e){return te(e,48,57)}function pc(e){return Ce(e)||te(e,65,70)||te(e,97,102)}function jv(e){return te(e,65,90)}function zv(e){return te(e,97,122)}function Dv(e){return jv(e)||zv(e)}function Fv(e){return e>=128}function Fi(e){return Dv(e)||Fv(e)||e===95}function gc(e){return Fi(e)||Ce(e)||e===45}function Hv(e){return te(e,0,8)||e===11||te(e,14,31)||e===127}function Hi(e){return e===10}function ft(e){return Hi(e)||e===9||e===32}const Uv=1114111;class Ra extends Error{constructor(t){super(t),this.name="InvalidCharacterError"}}function Vv(e){const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===13&&e.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),te(r,55296,56319)&&te(e.charCodeAt(n+1),56320,57343)){const i=r-55296,s=e.charCodeAt(n+1)-56320;r=Math.pow(2,16)+i*Math.pow(2,10)+s,n++}t.push(r)}return t}function re(e){if(e<=65535)return String.fromCharCode(e);e-=Math.pow(2,16);const t=Math.floor(e/Math.pow(2,10))+55296,n=e%Math.pow(2,10)+56320;return String.fromCharCode(t)+String.fromCharCode(n)}function Bv(e){const t=Vv(e);let n=-1;const r=[];let i;const s=function(T){return T>=t.length?-1:t[T]},o=function(T){if(T===void 0&&(T=1),T>3)throw"Spec Error: no more than three codepoints of lookahead.";return s(n+T)},l=function(T){return T===void 0&&(T=1),n+=T,i=s(n),!0},a=function(){return n-=1,!0},u=function(T){return T===void 0&&(T=i),T===-1},c=function(){if(f(),l(),ft(i)){for(;ft(o());)l();return new Al}else{if(i===34)return m();if(i===35)if(gc(o())||p(o(1),o(2))){const T=new Sh("");return v(o(1),o(2),o(3))&&(T.type="id"),T.value=N(),T}else return new ge(i);else return i===36?o()===61?(l(),new Kv):new ge(i):i===39?m():i===40?new vh:i===41?new yh:i===42?o()===61?(l(),new Gv):new ge(i):i===43?C()?(a(),d()):new ge(i):i===44?new hh:i===45?C()?(a(),d()):o(1)===45&&o(2)===62?(l(2),new ch):x()?(a(),g()):new ge(i):i===46?C()?(a(),d()):new ge(i):i===58?new dh:i===59?new fh:i===60?o(1)===33&&o(2)===45&&o(3)===45?(l(3),new uh):new ge(i):i===64?v(o(1),o(2),o(3))?new xh(N()):new ge(i):i===91?new mh:i===92?h()?(a(),g()):new ge(i):i===93?new Ll:i===94?o()===61?(l(),new Qv):new ge(i):i===123?new ph:i===124?o()===61?(l(),new Wv):o()===124?(l(),new wh):new ge(i):i===125?new gh:i===126?o()===61?(l(),new qv):new ge(i):Ce(i)?(a(),d()):Fi(i)?(a(),g()):u()?new Vi:new ge(i)}},f=function(){for(;o(1)===47&&o(2)===42;)for(l(2);;)if(l(),i===42&&o()===47){l();break}else if(u())return},d=function(){const T=b();if(v(o(1),o(2),o(3))){const P=new Xv;return P.value=T.value,P.repr=T.repr,P.type=T.type,P.unit=N(),P}else if(o()===37){l();const P=new Ch;return P.value=T.value,P.repr=T.repr,P}else{const P=new Th;return P.value=T.value,P.repr=T.repr,P.type=T.type,P}},g=function(){const T=N();if(T.toLowerCase()==="url"&&o()===40){for(l();ft(o(1))&&ft(o(2));)l();return o()===34||o()===39?new Bi(T):ft(o())&&(o(2)===34||o(2)===39)?new Bi(T):y()}else return o()===40?(l(),new Bi(T)):new _h(T)},m=function(T){T===void 0&&(T=i);let P="";for(;l();){if(i===T||u())return new Eh(P);if(Hi(i))return a(),new ah;i===92?u(o())||(Hi(o())?l():P+=re(_())):P+=re(i)}throw new Error("Internal error")},y=function(){const T=new kh("");for(;ft(o());)l();if(u(o()))return T;for(;l();){if(i===41||u())return T;if(ft(i)){for(;ft(o());)l();return o()===41||u(o())?(l(),T):(I(),new Ui)}else{if(i===34||i===39||i===40||Hv(i))return I(),new Ui;if(i===92)if(h())T.value+=re(_());else return I(),new Ui;else T.value+=re(i)}}throw new Error("Internal error")},_=function(){if(l(),pc(i)){const T=[i];for(let J=0;J<5&&pc(o());J++)l(),T.push(i);ft(o())&&l();let P=parseInt(T.map(function(J){return String.fromCharCode(J)}).join(""),16);return P>Uv&&(P=65533),P}else return u()?65533:i},p=function(T,P){return!(T!==92||Hi(P))},h=function(){return p(i,o())},v=function(T,P,J){return T===45?Fi(P)||P===45||p(P,J):Fi(T)?!0:T===92?p(T,P):!1},x=function(){return v(i,o(1),o(2))},E=function(T,P,J){return T===43||T===45?!!(Ce(P)||P===46&&Ce(J)):T===46?!!Ce(P):!!Ce(T)},C=function(){return E(i,o(1),o(2))},N=function(){let T="";for(;l();)if(gc(i))T+=re(i);else if(h())T+=re(_());else return a(),T;throw new Error("Internal parse error")},b=function(){let T="",P="integer";for((o()===43||o()===45)&&(l(),T+=re(i));Ce(o());)l(),T+=re(i);if(o(1)===46&&Ce(o(2)))for(l(),T+=re(i),l(),T+=re(i),P="number";Ce(o());)l(),T+=re(i);const J=o(1),st=o(2),er=o(3);if((J===69||J===101)&&Ce(st))for(l(),T+=re(i),l(),T+=re(i),P="number";Ce(o());)l(),T+=re(i);else if((J===69||J===101)&&(st===43||st===45)&&Ce(er))for(l(),T+=re(i),l(),T+=re(i),l(),T+=re(i),P="number";Ce(o());)l(),T+=re(i);const tr=S(T);return{type:P,value:tr,repr:T}},S=function(T){return+T},I=function(){for(;l();){if(i===41||u())return;h()&&_()}};let O=0;for(;!u(o());)if(r.push(c()),O++,O>t.length*2)throw new Error("I'm infinite-looping!");return r}class ee{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class ah extends ee{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Ui extends ee{constructor(){super(...arguments),this.tokenType="BADURL"}}class Al extends ee{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class uh extends ee{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class ch extends ee{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class dh extends ee{constructor(){super(...arguments),this.tokenType=":"}}class fh extends ee{constructor(){super(...arguments),this.tokenType=";"}}class hh extends ee{constructor(){super(...arguments),this.tokenType=","}}class Jn extends ee{constructor(){super(...arguments),this.value="",this.mirror=""}}class ph extends Jn{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class gh extends Jn{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class mh extends Jn{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Ll extends Jn{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class vh extends Jn{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class yh extends Jn{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class qv extends ee{constructor(){super(...arguments),this.tokenType="~="}}class Wv extends ee{constructor(){super(...arguments),this.tokenType="|="}}class Qv extends ee{constructor(){super(...arguments),this.tokenType="^="}}class Kv extends ee{constructor(){super(...arguments),this.tokenType="$="}}class Gv extends ee{constructor(){super(...arguments),this.tokenType="*="}}class wh extends ee{constructor(){super(...arguments),this.tokenType="||"}}class Vi extends ee{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ge extends ee{constructor(t){super(),this.tokenType="DELIM",this.value="",this.value=re(t)}toString(){return"DELIM("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}toSource(){return this.value==="\\"?`\\
|
|
42
|
-
`:this.value}}class Yn extends ee{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class _h extends Yn{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return ti(this.value)}}class Bi extends Yn{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ti(this.value)+"("}}class xh extends Yn{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+ti(this.value)}}class Sh extends Yn{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+ti(this.value):"#"+Jv(this.value)}}class Eh extends Yn{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+Nh(this.value)+'"'}}class kh extends Yn{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Nh(this.value)+'")'}}class Th extends ee{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class Ch extends ee{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class Xv extends ee{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=ti(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||te(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function ti(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i===0)throw new Ra("Invalid character: the input contains U+0000.");te(i,1,31)||i===127||r===0&&te(i,48,57)||r===1&&te(i,48,57)&&n===45?t+="\\"+i.toString(16)+" ":i>=128||i===45||i===95||te(i,48,57)||te(i,65,90)||te(i,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function Jv(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Ra("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||te(r,48,57)||te(r,65,90)||te(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function Nh(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Ra("Invalid character: the input contains U+0000.");te(r,1,31)||r===127?t+="\\"+r.toString(16)+" ":r===34||r===92?t+="\\"+e[n]:t+=e[n]}return t}class be extends Error{}function Yv(e,t){let n;try{n=Bv(e),n[n.length-1]instanceof Vi||n.push(new Vi)}catch(S){const I=S.message+` while parsing selector "${e}"`,O=(S.stack||"").indexOf(S.message);throw O!==-1&&(S.stack=S.stack.substring(0,O)+I+S.stack.substring(O+S.message.length)),S.message=I,S}const r=n.find(S=>S instanceof xh||S instanceof ah||S instanceof Ui||S instanceof wh||S instanceof uh||S instanceof ch||S instanceof fh||S instanceof ph||S instanceof gh||S instanceof kh||S instanceof Ch);if(r)throw new be(`Unsupported token "${r.toSource()}" while parsing selector "${e}"`);let i=0;const s=new Set;function o(){return new be(`Unexpected token "${n[i].toSource()}" while parsing selector "${e}"`)}function l(){for(;n[i]instanceof Al;)i++}function a(S=i){return n[S]instanceof _h}function u(S=i){return n[S]instanceof Eh}function c(S=i){return n[S]instanceof Th}function f(S=i){return n[S]instanceof hh}function d(S=i){return n[S]instanceof vh}function g(S=i){return n[S]instanceof yh}function m(S=i){return n[S]instanceof Bi}function y(S=i){return n[S]instanceof ge&&n[S].value==="*"}function _(S=i){return n[S]instanceof Vi}function p(S=i){return n[S]instanceof ge&&[">","+","~"].includes(n[S].value)}function h(S=i){return f(S)||g(S)||_(S)||p(S)||n[S]instanceof Al}function v(){const S=[x()];for(;l(),!!f();)i++,S.push(x());return S}function x(){return l(),c()||u()?n[i++].value:E()}function E(){const S={simples:[]};for(l(),p()?S.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):S.simples.push({selector:C(),combinator:""});;){if(l(),p())S.simples[S.simples.length-1].combinator=n[i++].value,l();else if(h())break;S.simples.push({combinator:"",selector:C()})}return S}function C(){let S="";const I=[];for(;!h();)if(a()||y())S+=n[i++].toSource();else if(n[i]instanceof Sh)S+=n[i++].toSource();else if(n[i]instanceof ge&&n[i].value===".")if(i++,a())S+="."+n[i++].toSource();else throw o();else if(n[i]instanceof dh)if(i++,a())if(!t.has(n[i].value.toLowerCase()))S+=":"+n[i++].toSource();else{const O=n[i++].value.toLowerCase();I.push({name:O,args:[]}),s.add(O)}else if(m()){const O=n[i++].value.toLowerCase();if(t.has(O)?(I.push({name:O,args:v()}),s.add(O)):S+=`:${O}(${N()})`,l(),!g())throw o();i++}else throw o();else if(n[i]instanceof mh){for(S+="[",i++;!(n[i]instanceof Ll)&&!_();)S+=n[i++].toSource();if(!(n[i]instanceof Ll))throw o();S+="]",i++}else throw o();if(!S&&!I.length)throw o();return{css:S||void 0,functions:I}}function N(){let S="",I=1;for(;!_()&&((d()||m())&&I++,g()&&I--,!!I);)S+=n[i++].toSource();return S}const b=v();if(!_())throw o();if(b.some(S=>typeof S!="object"||!("simples"in S)))throw new be(`Error while parsing selector "${e}"`);return{selector:b,names:Array.from(s)}}const Il=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Zv=new Set(["left-of","right-of","above","below","near"]),bh=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function Us(e){const t=n0(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const i=Yv(r.body,bh);n.push({name:"css",body:i.selector,source:r.body});continue}if(Il.has(r.name)){let i,s;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new be(`Malformed selector: ${r.name}=`+r.body);if(i=u[0],u.length===2){if(typeof u[1]!="number"||!Zv.has(r.name))throw new be(`Malformed selector: ${r.name}=`+r.body);s=u[1]}}catch{throw new be(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:Us(i),distance:s}},l=[...o.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&e0(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if(Il.has(n[0].name))throw new be(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function e0(e,t){return yt({parts:e})===yt({parts:t})}function yt(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let i=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(i=!1);const s=i?n.name+"=":"";return`${r===e.capture?"*":""}${s}${n.source}`}).join(" >> ")}function t0(e,t){const n=(r,i)=>{for(const s of r.parts)t(s,i),Il.has(s.name)&&n(s.body.parsed,!0)};n(e,!1)}function n0(e){let t=0,n,r=0;const i={parts:[]},s=()=>{const l=e.substring(r,t).trim(),a=l.indexOf("=");let u,c;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=l.substring(0,a).trim(),c=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(u="text",c=l):/^\(*\/\//.test(l)||l.startsWith("..")?(u="xpath",c=l):(u="css",c=l);let f=!1;if(u[0]==="*"&&(f=!0,u=u.substring(1)),i.parts.push({name:u,body:c}),f){if(i.capture!==void 0)throw new be("Only one of the selectors can capture using * modifier");i.capture=i.parts.length-1}};if(!e.includes(">>"))return t=e.length,s(),i;const o=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t<e.length;){const l=e[t];l==="\\"&&t+1<e.length?t+=2:l===n?(n=void 0,t++):!n&&(l==='"'||l==="'"||l==="`")&&!o()?(n=l,t++):!n&&l===">"&&e[t+1]===">"?(s(),t+=2,r=t):t++}return s(),i}function on(e,t){let n=0,r=e.length===0;const i=()=>e[n]||"",s=()=>{const _=i();return++n,r=n>=e.length,_},o=_=>{throw r?new be(`Unexpected end of selector while parsing selector \`${e}\``):new be(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(_?" during "+_:""))};function l(){for(;!r&&/\s/.test(i());)s()}function a(_){return _>=""||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function u(){let _="";for(l();!r&&a(i());)_+=s();return _}function c(_){let p=s();for(p!==_&&o("parsing quoted string");!r&&i()!==_;)i()==="\\"&&s(),p+=s();return i()!==_&&o("parsing quoted string"),p+=s(),p}function f(){s()!=="/"&&o("parsing regular expression");let _="",p=!1;for(;!r;){if(i()==="\\")_+=s(),r&&o("parsing regular expression");else if(p&&i()==="]")p=!1;else if(!p&&i()==="[")p=!0;else if(!p&&i()==="/")break;_+=s()}s()!=="/"&&o("parsing regular expression");let h="";for(;!r&&i().match(/[dgimsuy]/);)h+=s();try{return new RegExp(_,h)}catch(v){throw new be(`Error while parsing selector \`${e}\`: ${v.message}`)}}function d(){let _="";return l(),i()==="'"||i()==='"'?_=c(i()).slice(1,-1):_=u(),_||o("parsing property path"),_}function g(){l();let _="";return r||(_+=s()),!r&&_!=="="&&(_+=s()),["=","*=","^=","$=","|=","~="].includes(_)||o("parsing operator"),_}function m(){s();const _=[];for(_.push(d()),l();i()===".";)s(),_.push(d()),l();if(i()==="]")return s(),{name:_.join("."),jsonPath:_,op:"<truthy>",value:null,caseSensitive:!1};const p=g();let h,v=!0;if(l(),i()==="/"){if(p!=="=")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with regular expression`);h=f()}else if(i()==="'"||i()==='"')h=c(i()).slice(1,-1),l(),i()==="i"||i()==="I"?(v=!1,s()):(i()==="s"||i()==="S")&&(v=!0,s());else{for(h="";!r&&(a(i())||i()==="+"||i()===".");)h+=s();h==="true"?h=!0:h==="false"?h=!1:t||(h=+h,Number.isNaN(h)&&o("parsing attribute value"))}if(l(),i()!=="]"&&o("parsing attribute value"),s(),p!=="="&&typeof h!="string")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with non-string matching value - ${h}`);return{name:_.join("."),jsonPath:_,op:p,value:h,caseSensitive:v}}const y={name:"",attributes:[]};for(y.name=u(),l();i()==="[";)y.attributes.push(m()),l();if(r||o(void 0),!y.name&&!y.attributes.length)throw new be(`Error while parsing selector \`${e}\` - selector cannot be empty`);return y}function Fn(e,t,n=!1){return Ah(e,t,n)[0]}function Ah(e,t,n=!1,r=20,i){try{return _n(new u0[e](i),Us(t),n,r)}catch{return[t]}}function _n(e,t,n=!1,r=20){const i=[...t.parts],s=[];let o=n?"frame-locator":"page";for(let l=0;l<i.length;l++){const a=i[l],u=o;if(o="locator",a.name==="nth"){a.body==="0"?s.push([e.generateLocator(u,"first",""),e.generateLocator(u,"nth","0")]):a.body==="-1"?s.push([e.generateLocator(u,"last",""),e.generateLocator(u,"nth","-1")]):s.push([e.generateLocator(u,"nth",a.body)]);continue}if(a.name==="internal:text"){const{exact:m,text:y}=dr(a.body);s.push([e.generateLocator(u,"text",y,{exact:m})]);continue}if(a.name==="internal:has-text"){const{exact:m,text:y}=dr(a.body);if(!m){s.push([e.generateLocator(u,"has-text",y,{exact:m})]);continue}}if(a.name==="internal:has-not-text"){const{exact:m,text:y}=dr(a.body);if(!m){s.push([e.generateLocator(u,"has-not-text",y,{exact:m})]);continue}}if(a.name==="internal:has"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"has",y)));continue}if(a.name==="internal:has-not"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"hasNot",y)));continue}if(a.name==="internal:and"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"and",y)));continue}if(a.name==="internal:or"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"or",y)));continue}if(a.name==="internal:chain"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"chain",y)));continue}if(a.name==="internal:label"){const{exact:m,text:y}=dr(a.body);s.push([e.generateLocator(u,"label",y,{exact:m})]);continue}if(a.name==="internal:role"){const m=on(a.body,!0),y={attrs:[]};for(const _ of m.attributes)_.name==="name"?(y.exact=_.caseSensitive,y.name=_.value):(_.name==="level"&&typeof _.value=="string"&&(_.value=+_.value),y.attrs.push({name:_.name==="include-hidden"?"includeHidden":_.name,value:_.value}));s.push([e.generateLocator(u,"role",m.name,y)]);continue}if(a.name==="internal:testid"){const m=on(a.body,!0),{value:y}=m.attributes[0];s.push([e.generateLocator(u,"test-id",y)]);continue}if(a.name==="internal:attr"){const m=on(a.body,!0),{name:y,value:_,caseSensitive:p}=m.attributes[0],h=_,v=!!p;if(y==="placeholder"){s.push([e.generateLocator(u,"placeholder",h,{exact:v})]);continue}if(y==="alt"){s.push([e.generateLocator(u,"alt",h,{exact:v})]);continue}if(y==="title"){s.push([e.generateLocator(u,"title",h,{exact:v})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){const m=s[s.length-1],y=i[l-1],_=m.map(p=>e.chainLocators([p,e.generateLocator(u,"frame","")]));["xpath","css"].includes(y.name)&&_.push(e.generateLocator(u,"frame-locator",yt({parts:[y]})),e.generateLocator(u,"frame-locator",yt({parts:[y]},!0))),m.splice(0,m.length,..._),o="frame-locator";continue}const c=i[l+1],f=yt({parts:[a]}),d=e.generateLocator(u,"default",f);if(c&&["internal:has-text","internal:has-not-text"].includes(c.name)){const{exact:m,text:y}=dr(c.body);if(!m){const _=e.generateLocator("locator",c.name==="internal:has-text"?"has-text":"has-not-text",y,{exact:m}),p={};c.name==="internal:has-text"?p.hasText=y:p.hasNotText=y;const h=e.generateLocator(u,"default",f,p);s.push([e.chainLocators([d,_]),h]),l++;continue}}let g;if(["xpath","css"].includes(a.name)){const m=yt({parts:[a]},!0);g=e.generateLocator(u,"default",m)}s.push([d,g].filter(Boolean))}return r0(e,s,r)}function r0(e,t,n){const r=t.map(()=>""),i=[],s=o=>{if(o===t.length)return i.push(e.chainLocators(r)),r.length<n;for(const l of t[o])if(r[o]=l,!s(o+1))return!1;return!0};return s(0),i}function dr(e){let t=!1;const n=e.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(e.endsWith('"')?(e=JSON.parse(e),t=!0):e.endsWith('"s')?(e=JSON.parse(e.substring(0,e.length-1)),t=!0):e.endsWith('"i')&&(e=JSON.parse(e.substring(0,e.length-1)),t=!1),{exact:t,text:e})}class i0{constructor(t){this.preferredQuote=t}generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(i.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"role":const s=[];ce(i.name)?s.push(`name: ${this.regexToSourceString(i.name)}`):typeof i.name=="string"&&(s.push(`name: ${this.quote(i.name)}`),i.exact&&s.push("exact: true"));for(const{name:l,value:a}of i.attrs)s.push(`${l}: ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, { ${s.join(", ")} }`:"";return`getByRole(${this.quote(r)}${o})`;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,!!i.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("getByLabel",r,!!i.exact);case"title":return this.toCallWithExact("getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToSourceString(t){return Hs(String(t))}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToSourceString(n)})`:r?`${t}(${this.quote(n)}, { exact: true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}quote(t){return Fs(t,this.preferredQuote??"'")}}class s0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(i.hasText)})`:i.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(i.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"role":const s=[];ce(i.name)?s.push(`name=${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`name=${this.quote(i.name)}`),i.exact&&s.push("exact=True"));for(const{name:l,value:a}of i.attrs){let u=typeof a=="string"?this.quote(a):a;typeof a=="boolean"&&(u=a?"True":"False"),s.push(`${oh(l)}=${u}`)}const o=s.length?`, ${s.join(", ")}`:"";return`get_by_role(${this.quote(r)}${o})`;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,!!i.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!i.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!i.exact);case"label":return this.toCallWithExact("get_by_label",r,!!i.exact);case"title":return this.toCallWithExact("get_by_title",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Hs(t.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, exact=True)`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToString(t):`${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fs(t,'"')}}class o0{generateLocator(t,n,r,i={}){let s;switch(t){case"page":s="Page";break;case"frame-locator":s="FrameLocator";break;case"locator":s="Locator";break}switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasText(${this.toHasText(i.hasText)}))`:i.hasNotText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasNotText(${this.toHasText(i.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"role":const o=[];ce(i.name)?o.push(`.setName(${this.regexToString(i.name)})`):typeof i.name=="string"&&(o.push(`.setName(${this.quote(i.name)})`),i.exact&&o.push(".setExact(true)"));for(const{name:a,value:u}of i.attrs)o.push(`.set${ys(a)}(${typeof u=="string"?this.quote(u):u})`);const l=o.length?`, new ${s}.GetByRoleOptions()${o.join("")}`:"";return`getByRole(AriaRole.${oh(r).toUpperCase()}${l})`;case"has-text":return`filter(new ${s}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${s}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${s}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${s}.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(s,"getByText",r,!!i.exact);case"alt":return this.toCallWithExact(s,"getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact(s,"getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact(s,"getByLabel",r,!!i.exact);case"title":return this.toCallWithExact(s,"getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Hs(t.source))}${n})`}toCallWithExact(t,n,r,i){return ce(r)?`${n}(${this.regexToString(r)})`:i?`${n}(${this.quote(r)}, new ${t}.${ys(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(t){return ce(t)?this.regexToString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fs(t,'"')}}class l0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(i.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"role":const s=[];ce(i.name)?s.push(`NameRegex = ${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`Name = ${this.quote(i.name)}`),i.exact&&s.push("Exact = true"));for(const{name:l,value:a}of i.attrs)s.push(`${ys(l)} = ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, new() { ${s.join(", ")} }`:"";return`GetByRole(AriaRole.${ys(r)}${o})`;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,!!i.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!i.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Hs(t.source))}${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, new() { Exact = true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?`HasTextRegex = ${this.regexToString(t)}`:`HasText = ${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}toHasNotText(t){return ce(t)?`HasNotTextRegex = ${this.regexToString(t)}`:`HasNotText = ${this.quote(t)}`}quote(t){return Fs(t,'"')}}class a0{generateLocator(t,n,r,i={}){return JSON.stringify({kind:n,body:r,options:i})}chainLocators(t){const n=t.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 u0={javascript:i0,python:s0,java:o0,csharp:l0,jsonl:a0};function ce(e){return e instanceof RegExp}const c0=({value:e,description:t})=>{const[n,r]=M.useState("copy"),i=M.useCallback(()=>{(typeof e=="function"?e():Promise.resolve(e)).then(o=>{navigator.clipboard.writeText(o).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[e]);return w.jsx(fn,{title:t||"Copy",icon:n,onClick:i})},mc=({value:e,description:t})=>{const n=M.useCallback(async()=>{const r=typeof e=="function"?await e():e;await navigator.clipboard.writeText(r)},[e]);return w.jsx(fn,{title:t,onClick:n,className:"copy-to-clipboard-text-button",children:t})},Lh=({text:e})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:e}),vc=new Map;function $a({name:e,items:t=[],id:n,render:r,icon:i,isError:s,isWarning:o,isInfo:l,selectedItem:a,onAccepted:u,onSelected:c,onHighlighted:f,onIconClicked:d,noItemsMessage:g,dataTestId:m,notSelectable:y}){const _=M.useRef(null),[p,h]=M.useState();return M.useEffect(()=>{f==null||f(p)},[f,p]),M.useEffect(()=>{const v=_.current;if(!v)return;const x=()=>{vc.set(e,v.scrollTop)};return v.addEventListener("scroll",x,{passive:!0}),()=>v.removeEventListener("scroll",x)},[e]),M.useEffect(()=>{_.current&&(_.current.scrollTop=vc.get(e)||0)},[e]),w.jsx("div",{className:tt("list-view vbox",e+"-list-view"),role:t.length>0?"list":void 0,"data-testid":m||e+"-list",children:w.jsxs("div",{className:tt("list-view-content",y&&"not-selectable"),tabIndex:0,onKeyDown:v=>{var N;if(a&&v.key==="Enter"){u==null||u(a,t.indexOf(a));return}if(v.key!=="ArrowDown"&&v.key!=="ArrowUp")return;v.stopPropagation(),v.preventDefault();const x=a?t.indexOf(a):-1;let E=x;v.key==="ArrowDown"&&(x===-1?E=0:E=Math.min(x+1,t.length-1)),v.key==="ArrowUp"&&(x===-1?E=t.length-1:E=Math.max(x-1,0));const C=(N=_.current)==null?void 0:N.children.item(E);pg(C||void 0),f==null||f(void 0),c==null||c(t[E],E),h(void 0)},ref:_,children:[g&&t.length===0&&w.jsx("div",{className:"list-view-empty",children:g}),t.map((v,x)=>{const E=r(v,x);return w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(v,x),role:"listitem",className:tt("list-view-entry",a===v&&"selected",!y&&p===v&&"highlighted",(s==null?void 0:s(v,x))&&"error",(o==null?void 0:o(v,x))&&"warning",(l==null?void 0:l(v,x))&&"info"),onClick:()=>c==null?void 0:c(v,x),onMouseEnter:()=>h(v),onMouseLeave:()=>h(void 0),children:[i&&w.jsx("div",{className:"codicon "+(i(v,x)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:C=>{C.preventDefault(),C.stopPropagation()},onClick:C=>{C.stopPropagation(),C.preventDefault(),d==null||d(v,x)}}),typeof E=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:E}):E]},(n==null?void 0:n(v,x))||x)})]})})}function ws(e,t){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let i,s={},o=!1,l=t==null?void 0:t.fg,a=t==null?void 0:t.bg;for(;(i=n.exec(e))!==null;){const[,,u,,c]=i;if(u){const f=+u;switch(f){case 0:s={};break;case 1:s["font-weight"]="bold";break;case 2:s.opacity="0.8";break;case 3:s["font-style"]="italic";break;case 4:s["text-decoration"]="underline";break;case 7:o=!0;break;case 8:s.display="none";break;case 9:s["text-decoration"]="line-through";break;case 22:delete s["font-weight"],delete s["font-style"],delete s.opacity,delete s["text-decoration"];break;case 23:delete s["font-weight"],delete s["font-style"],delete s.opacity;break;case 24:delete s["text-decoration"];break;case 27:o=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:l=yc[f-30];break;case 39:l=t==null?void 0:t.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:a=yc[f-40];break;case 49:a=t==null?void 0:t.bg;break;case 53:s["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:l=wc[f-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:a=wc[f-100];break}}else if(c){const f={...s},d=o?a:l;d!==void 0&&(f.color=d);const g=o?l:a;g!==void 0&&(f["background-color"]=g),r.push(`<span style="${f0(f)}">${d0(c)}</span>`)}}return r.join("")}const yc={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},wc={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function d0(e){return e.replace(/[&"<>]/g,t=>({"&":"&",'"':""","<":"<",">":">"})[t])}function f0(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const h0=$a;function fw(e,t){const{entries:n}=M.useMemo(()=>{if(!e)return{entries:[]};const i=[];for(const s of e.events){if(s.type==="console"){const o=s.args&&s.args.length?p0(s.args):Ih(s.text),l=s.location.url,u=`${l?l.substring(l.lastIndexOf("/")+1):"<anonymous>"}:${s.location.lineNumber}`;i.push({browserMessage:{body:o,location:u},isError:s.messageType==="error",isWarning:s.messageType==="warning",timestamp:s.time})}s.type==="event"&&s.method==="pageError"&&i.push({browserError:s.params.error,isError:!0,isWarning:!1,timestamp:s.time})}for(const s of e.stdio){let o="";s.text&&(o=ws(s.text.trim())||""),s.base64&&(o=ws(atob(s.base64).trim())||""),i.push({nodeMessage:{html:o},isError:s.type==="stderr",isWarning:!1,timestamp:s.timestamp})}return i.sort((s,o)=>s.timestamp-o.timestamp),{entries:i}},[e]);return{entries:M.useMemo(()=>t?n.filter(i=>i.timestamp>=t.minimum&&i.timestamp<=t.maximum):n,[n,t])}}const hw=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(h0,{name:"console",onAccepted:r,onHighlighted:n,items:e.entries,isError:i=>i.isError,isWarning:i=>i.isWarning,render:i=>{const s=Ro(i.timestamp-t.minimum),o=w.jsx("span",{className:"console-time",children:s}),l=i.isError?"status-error":i.isWarning?"status-warning":"status-none",a=i.browserMessage||i.browserError?w.jsx("span",{className:tt("codicon","codicon-browser",l),title:"Browser message"}):w.jsx("span",{className:tt("codicon","codicon-file",l),title:"Runner message"});let u,c,f,d;const{browserMessage:g,browserError:m,nodeMessage:y}=i;if(g&&(u=g.location,c=g.body),m){const{error:_,value:p}=m;_?(c=_.message,d=_.stack):c=String(p)}return y&&(f=y.html),w.jsxs("div",{className:"console-line",children:[o,a,u&&w.jsx("span",{className:"console-location",children:u}),c&&w.jsx("span",{className:"console-line-message",children:c}),f&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&w.jsx("div",{className:"console-stack",children:d})]})}})}):w.jsx(Lh,{text:"No console entries"});function p0(e){if(e.length===1)return Ih(e[0].preview);const t=typeof e[0].value=="string"&&e[0].value.includes("%"),n=t?e[0].value:"",r=t?e.slice(1):e;let i=0;const s=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(w.jsx("span",{children:a}));let u=0;for(;(o=s.exec(n))!==null;){const c=n.substring(u,o.index);a.push(w.jsx("span",{children:c})),u=o.index+2;const f=o[0][1];if(f==="%")a.push(w.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[i++],g={};typeof(d==null?void 0:d.value)!="string"&&(g.color="var(--vscode-debugTokenExpression-number)"),a.push(w.jsx("span",{style:g,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[i++],g=d?g0(d.preview):{};l.push(w.jsx("span",{style:g,children:a}))}}for(u<n.length&&a.push(w.jsx("span",{children:n.substring(u)}));i<r.length;i++){const c=r[i],f={};a.length&&a.push(w.jsx("span",{children:" "})),typeof(c==null?void 0:c.value)!="string"&&(f.color="var(--vscode-debugTokenExpression-number)"),a.push(w.jsx("span",{style:f,children:(c==null?void 0:c.preview)||""}))}return l}function Ih(e){return[w.jsx("span",{dangerouslySetInnerHTML:{__html:ws(e.trim())}})]}function g0(e){try{const t={},n=e.split(";");for(const r of n){const i=r.trim();if(!i)continue;let[s,o]=i.split(":");if(s=s.trim(),o=o.trim(),!m0(s))continue;const l=s.replace(/-([a-z])/g,a=>a[1].toUpperCase());t[l]=o}return t}catch{return{}}}function m0(e){return["background","border","color","font","line","margin","padding","text"].some(n=>e.startsWith(n))}const Oa=({noShadow:e,children:t,noMinHeight:n,className:r,sidebarBackground:i,onClick:s})=>w.jsx("div",{className:tt("toolbar",e&&"no-shadow",n&&"no-min-height",r,i&&"toolbar-sidebar-background"),onClick:s,children:t}),v0=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:s,mode:o})=>{const l=M.useId();return t||(t=e[0].id),o||(o="default"),w.jsx("div",{className:"tabbed-pane","data-testid":s,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(Oa,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...e.map(a=>w.jsx(Mh,{id:a.id,ariaControls:`${l}-${a.id}`,title:a.title,count:a.count,errorCount:a.errorCount,selected:t===a.id,onSelect:n},a.id))]}),o==="select"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:w.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:a=>{n==null||n(e[a.currentTarget.selectedIndex].id)},children:e.map(a=>{let u="";return a.count&&(u=` (${a.count})`),a.errorCount&&(u=` (${a.errorCount})`),w.jsxs("option",{value:a.id,selected:a.id===t,role:"tab","aria-controls":`${l}-${a.id}`,children:[a.title,u]},a.id)})})}),i&&w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...i]})]}),e.map(a=>{const u="tab-content tab-"+a.id;if(a.component)return w.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,style:{display:t===a.id?"inherit":"none"},children:a.component},a.id);if(t===a.id)return w.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,children:a.render()},a.id)})]})})},Mh=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:s,ariaControls:o})=>w.jsxs("div",{className:tt("tabbed-pane-tab",i&&"selected"),onClick:()=>s==null?void 0:s(e),role:"tab",title:t,"aria-controls":o,children:[w.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&w.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&w.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]}),y0="modulepreload",w0=function(e,t){return new URL(e,t).href},_c={},_0=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=w0(u,r),u in _c)return;_c[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let m=o.length-1;m>=0;m--){const y=o[m];if(y.href===u&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":y0,c||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((m,y)=>{g.addEventListener("load",m),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},pw=20,Vs=({text:e,language:t,mimeType:n,linkify:r,readOnly:i,highlight:s,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:u,wrapLines:c,onChange:f,dataTestId:d,placeholder:g})=>{const[m,y]=ks(),[_]=M.useState(_0(()=>import("./codeMirrorModule-KatbITLF.js"),__vite__mapDeps([0,1]),import.meta.url).then(x=>x.default)),p=M.useRef(null),[h,v]=M.useState();return M.useEffect(()=>{(async()=>{var b,S;const x=await _;S0(x);const E=y.current;if(!E)return;const C=k0(t)||E0(n)||(r?"text/linkified":"");if(p.current&&C===p.current.cm.getOption("mode")&&!!i===p.current.cm.getOption("readOnly")&&l===p.current.cm.getOption("lineNumbers")&&c===p.current.cm.getOption("lineWrapping")&&g===p.current.cm.getOption("placeholder"))return;(S=(b=p.current)==null?void 0:b.cm)==null||S.getWrapperElement().remove();const N=x(E,{value:"",mode:C,readOnly:!!i,lineNumbers:l,lineWrapping:c,placeholder:g});return p.current={cm:N},a&&N.focus(),v(N),N})()},[_,h,y,t,n,r,l,c,i,a,g]),M.useEffect(()=>{p.current&&p.current.cm.setSize(m.width,m.height)},[m]),M.useLayoutEffect(()=>{var C;if(!h)return;let x=!1;if(h.getValue()!==e&&(h.setValue(e),x=!0,u&&(h.execCommand("selectAll"),h.focus())),x||JSON.stringify(s)!==JSON.stringify(p.current.highlight)){for(const S of p.current.highlight||[])h.removeLineClass(S.line-1,"wrap");for(const S of s||[])h.addLineClass(S.line-1,"wrap",`source-line-${S.type}`);for(const S of p.current.widgets||[])h.removeLineWidget(S);for(const S of p.current.markers||[])S.clear();const N=[],b=[];for(const S of s||[]){if(S.type!=="subtle-error"&&S.type!=="error")continue;const I=(C=p.current)==null?void 0:C.cm.getLine(S.line-1);if(I){const O={};O.title=S.message||"",b.push(h.markText({line:S.line-1,ch:0},{line:S.line-1,ch:S.column||I.length},{className:"source-line-error-underline",attributes:O}))}if(S.type==="error"){const O=document.createElement("div");O.innerHTML=ws(S.message||""),O.className="source-line-error-widget",N.push(h.addLineWidget(S.line,O,{above:!0,coverGutter:!1}))}}p.current.highlight=s,p.current.widgets=N,p.current.markers=b}typeof o=="number"&&p.current.cm.lineCount()>=o&&h.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let E;return f&&(E=()=>f(h.getValue()),h.on("change",E)),()=>{E&&h.off("change",E)}},[h,e,s,o,u,f]),w.jsx("div",{"data-testid":d,className:"cm-wrapper",ref:y,onClick:x0})};function x0(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let xc=!1;function S0(e){xc||(xc=!0,e.defineSimpleMode("text/linkified",{start:[{regex:gg,token:"linkified"}]}))}function E0(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function k0(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[e]}async function T0(e){const t=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function i(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
|
|
42
|
+
`:this.value}}class Yn extends ee{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class _h extends Yn{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return ti(this.value)}}class Bi extends Yn{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ti(this.value)+"("}}class xh extends Yn{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+ti(this.value)}}class Sh extends Yn{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+ti(this.value):"#"+Jv(this.value)}}class Eh extends Yn{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+Nh(this.value)+'"'}}class kh extends Yn{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Nh(this.value)+'")'}}class Th extends ee{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class Ch extends ee{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class Xv extends ee{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=ti(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||te(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function ti(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i===0)throw new Ra("Invalid character: the input contains U+0000.");te(i,1,31)||i===127||r===0&&te(i,48,57)||r===1&&te(i,48,57)&&n===45?t+="\\"+i.toString(16)+" ":i>=128||i===45||i===95||te(i,48,57)||te(i,65,90)||te(i,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function Jv(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Ra("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||te(r,48,57)||te(r,65,90)||te(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function Nh(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Ra("Invalid character: the input contains U+0000.");te(r,1,31)||r===127?t+="\\"+r.toString(16)+" ":r===34||r===92?t+="\\"+e[n]:t+=e[n]}return t}class be extends Error{}function Yv(e,t){let n;try{n=Bv(e),n[n.length-1]instanceof Vi||n.push(new Vi)}catch(S){const I=S.message+` while parsing selector "${e}"`,O=(S.stack||"").indexOf(S.message);throw O!==-1&&(S.stack=S.stack.substring(0,O)+I+S.stack.substring(O+S.message.length)),S.message=I,S}const r=n.find(S=>S instanceof xh||S instanceof ah||S instanceof Ui||S instanceof wh||S instanceof uh||S instanceof ch||S instanceof fh||S instanceof ph||S instanceof gh||S instanceof kh||S instanceof Ch);if(r)throw new be(`Unsupported token "${r.toSource()}" while parsing selector "${e}"`);let i=0;const s=new Set;function o(){return new be(`Unexpected token "${n[i].toSource()}" while parsing selector "${e}"`)}function l(){for(;n[i]instanceof Al;)i++}function a(S=i){return n[S]instanceof _h}function u(S=i){return n[S]instanceof Eh}function c(S=i){return n[S]instanceof Th}function f(S=i){return n[S]instanceof hh}function d(S=i){return n[S]instanceof vh}function g(S=i){return n[S]instanceof yh}function m(S=i){return n[S]instanceof Bi}function y(S=i){return n[S]instanceof ge&&n[S].value==="*"}function _(S=i){return n[S]instanceof Vi}function p(S=i){return n[S]instanceof ge&&[">","+","~"].includes(n[S].value)}function h(S=i){return f(S)||g(S)||_(S)||p(S)||n[S]instanceof Al}function v(){const S=[x()];for(;l(),!!f();)i++,S.push(x());return S}function x(){return l(),c()||u()?n[i++].value:E()}function E(){const S={simples:[]};for(l(),p()?S.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):S.simples.push({selector:C(),combinator:""});;){if(l(),p())S.simples[S.simples.length-1].combinator=n[i++].value,l();else if(h())break;S.simples.push({combinator:"",selector:C()})}return S}function C(){let S="";const I=[];for(;!h();)if(a()||y())S+=n[i++].toSource();else if(n[i]instanceof Sh)S+=n[i++].toSource();else if(n[i]instanceof ge&&n[i].value===".")if(i++,a())S+="."+n[i++].toSource();else throw o();else if(n[i]instanceof dh)if(i++,a())if(!t.has(n[i].value.toLowerCase()))S+=":"+n[i++].toSource();else{const O=n[i++].value.toLowerCase();I.push({name:O,args:[]}),s.add(O)}else if(m()){const O=n[i++].value.toLowerCase();if(t.has(O)?(I.push({name:O,args:v()}),s.add(O)):S+=`:${O}(${N()})`,l(),!g())throw o();i++}else throw o();else if(n[i]instanceof mh){for(S+="[",i++;!(n[i]instanceof Ll)&&!_();)S+=n[i++].toSource();if(!(n[i]instanceof Ll))throw o();S+="]",i++}else throw o();if(!S&&!I.length)throw o();return{css:S||void 0,functions:I}}function N(){let S="",I=1;for(;!_()&&((d()||m())&&I++,g()&&I--,!!I);)S+=n[i++].toSource();return S}const b=v();if(!_())throw o();if(b.some(S=>typeof S!="object"||!("simples"in S)))throw new be(`Error while parsing selector "${e}"`);return{selector:b,names:Array.from(s)}}const Il=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Zv=new Set(["left-of","right-of","above","below","near"]),bh=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function Us(e){const t=n0(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const i=Yv(r.body,bh);n.push({name:"css",body:i.selector,source:r.body});continue}if(Il.has(r.name)){let i,s;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new be(`Malformed selector: ${r.name}=`+r.body);if(i=u[0],u.length===2){if(typeof u[1]!="number"||!Zv.has(r.name))throw new be(`Malformed selector: ${r.name}=`+r.body);s=u[1]}}catch{throw new be(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:Us(i),distance:s}},l=[...o.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&e0(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if(Il.has(n[0].name))throw new be(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function e0(e,t){return yt({parts:e})===yt({parts:t})}function yt(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let i=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(i=!1);const s=i?n.name+"=":"";return`${r===e.capture?"*":""}${s}${n.source}`}).join(" >> ")}function t0(e,t){const n=(r,i)=>{for(const s of r.parts)t(s,i),Il.has(s.name)&&n(s.body.parsed,!0)};n(e,!1)}function n0(e){let t=0,n,r=0;const i={parts:[]},s=()=>{const l=e.substring(r,t).trim(),a=l.indexOf("=");let u,c;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=l.substring(0,a).trim(),c=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(u="text",c=l):/^\(*\/\//.test(l)||l.startsWith("..")?(u="xpath",c=l):(u="css",c=l);let f=!1;if(u[0]==="*"&&(f=!0,u=u.substring(1)),i.parts.push({name:u,body:c}),f){if(i.capture!==void 0)throw new be("Only one of the selectors can capture using * modifier");i.capture=i.parts.length-1}};if(!e.includes(">>"))return t=e.length,s(),i;const o=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t<e.length;){const l=e[t];l==="\\"&&t+1<e.length?t+=2:l===n?(n=void 0,t++):!n&&(l==='"'||l==="'"||l==="`")&&!o()?(n=l,t++):!n&&l===">"&&e[t+1]===">"?(s(),t+=2,r=t):t++}return s(),i}function on(e,t){let n=0,r=e.length===0;const i=()=>e[n]||"",s=()=>{const _=i();return++n,r=n>=e.length,_},o=_=>{throw r?new be(`Unexpected end of selector while parsing selector \`${e}\``):new be(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(_?" during "+_:""))};function l(){for(;!r&&/\s/.test(i());)s()}function a(_){return _>=""||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function u(){let _="";for(l();!r&&a(i());)_+=s();return _}function c(_){let p=s();for(p!==_&&o("parsing quoted string");!r&&i()!==_;)i()==="\\"&&s(),p+=s();return i()!==_&&o("parsing quoted string"),p+=s(),p}function f(){s()!=="/"&&o("parsing regular expression");let _="",p=!1;for(;!r;){if(i()==="\\")_+=s(),r&&o("parsing regular expression");else if(p&&i()==="]")p=!1;else if(!p&&i()==="[")p=!0;else if(!p&&i()==="/")break;_+=s()}s()!=="/"&&o("parsing regular expression");let h="";for(;!r&&i().match(/[dgimsuy]/);)h+=s();try{return new RegExp(_,h)}catch(v){throw new be(`Error while parsing selector \`${e}\`: ${v.message}`)}}function d(){let _="";return l(),i()==="'"||i()==='"'?_=c(i()).slice(1,-1):_=u(),_||o("parsing property path"),_}function g(){l();let _="";return r||(_+=s()),!r&&_!=="="&&(_+=s()),["=","*=","^=","$=","|=","~="].includes(_)||o("parsing operator"),_}function m(){s();const _=[];for(_.push(d()),l();i()===".";)s(),_.push(d()),l();if(i()==="]")return s(),{name:_.join("."),jsonPath:_,op:"<truthy>",value:null,caseSensitive:!1};const p=g();let h,v=!0;if(l(),i()==="/"){if(p!=="=")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with regular expression`);h=f()}else if(i()==="'"||i()==='"')h=c(i()).slice(1,-1),l(),i()==="i"||i()==="I"?(v=!1,s()):(i()==="s"||i()==="S")&&(v=!0,s());else{for(h="";!r&&(a(i())||i()==="+"||i()===".");)h+=s();h==="true"?h=!0:h==="false"?h=!1:t||(h=+h,Number.isNaN(h)&&o("parsing attribute value"))}if(l(),i()!=="]"&&o("parsing attribute value"),s(),p!=="="&&typeof h!="string")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with non-string matching value - ${h}`);return{name:_.join("."),jsonPath:_,op:p,value:h,caseSensitive:v}}const y={name:"",attributes:[]};for(y.name=u(),l();i()==="[";)y.attributes.push(m()),l();if(r||o(void 0),!y.name&&!y.attributes.length)throw new be(`Error while parsing selector \`${e}\` - selector cannot be empty`);return y}function Fn(e,t,n=!1){return Ah(e,t,n)[0]}function Ah(e,t,n=!1,r=20,i){try{return _n(new u0[e](i),Us(t),n,r)}catch{return[t]}}function _n(e,t,n=!1,r=20){const i=[...t.parts],s=[];let o=n?"frame-locator":"page";for(let l=0;l<i.length;l++){const a=i[l],u=o;if(o="locator",a.name==="nth"){a.body==="0"?s.push([e.generateLocator(u,"first",""),e.generateLocator(u,"nth","0")]):a.body==="-1"?s.push([e.generateLocator(u,"last",""),e.generateLocator(u,"nth","-1")]):s.push([e.generateLocator(u,"nth",a.body)]);continue}if(a.name==="internal:text"){const{exact:m,text:y}=dr(a.body);s.push([e.generateLocator(u,"text",y,{exact:m})]);continue}if(a.name==="internal:has-text"){const{exact:m,text:y}=dr(a.body);if(!m){s.push([e.generateLocator(u,"has-text",y,{exact:m})]);continue}}if(a.name==="internal:has-not-text"){const{exact:m,text:y}=dr(a.body);if(!m){s.push([e.generateLocator(u,"has-not-text",y,{exact:m})]);continue}}if(a.name==="internal:has"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"has",y)));continue}if(a.name==="internal:has-not"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"hasNot",y)));continue}if(a.name==="internal:and"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"and",y)));continue}if(a.name==="internal:or"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"or",y)));continue}if(a.name==="internal:chain"){const m=_n(e,a.body.parsed,!1,r);s.push(m.map(y=>e.generateLocator(u,"chain",y)));continue}if(a.name==="internal:label"){const{exact:m,text:y}=dr(a.body);s.push([e.generateLocator(u,"label",y,{exact:m})]);continue}if(a.name==="internal:role"){const m=on(a.body,!0),y={attrs:[]};for(const _ of m.attributes)_.name==="name"?(y.exact=_.caseSensitive,y.name=_.value):(_.name==="level"&&typeof _.value=="string"&&(_.value=+_.value),y.attrs.push({name:_.name==="include-hidden"?"includeHidden":_.name,value:_.value}));s.push([e.generateLocator(u,"role",m.name,y)]);continue}if(a.name==="internal:testid"){const m=on(a.body,!0),{value:y}=m.attributes[0];s.push([e.generateLocator(u,"test-id",y)]);continue}if(a.name==="internal:attr"){const m=on(a.body,!0),{name:y,value:_,caseSensitive:p}=m.attributes[0],h=_,v=!!p;if(y==="placeholder"){s.push([e.generateLocator(u,"placeholder",h,{exact:v})]);continue}if(y==="alt"){s.push([e.generateLocator(u,"alt",h,{exact:v})]);continue}if(y==="title"){s.push([e.generateLocator(u,"title",h,{exact:v})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){const m=s[s.length-1],y=i[l-1],_=m.map(p=>e.chainLocators([p,e.generateLocator(u,"frame","")]));["xpath","css"].includes(y.name)&&_.push(e.generateLocator(u,"frame-locator",yt({parts:[y]})),e.generateLocator(u,"frame-locator",yt({parts:[y]},!0))),m.splice(0,m.length,..._),o="frame-locator";continue}const c=i[l+1],f=yt({parts:[a]}),d=e.generateLocator(u,"default",f);if(c&&["internal:has-text","internal:has-not-text"].includes(c.name)){const{exact:m,text:y}=dr(c.body);if(!m){const _=e.generateLocator("locator",c.name==="internal:has-text"?"has-text":"has-not-text",y,{exact:m}),p={};c.name==="internal:has-text"?p.hasText=y:p.hasNotText=y;const h=e.generateLocator(u,"default",f,p);s.push([e.chainLocators([d,_]),h]),l++;continue}}let g;if(["xpath","css"].includes(a.name)){const m=yt({parts:[a]},!0);g=e.generateLocator(u,"default",m)}s.push([d,g].filter(Boolean))}return r0(e,s,r)}function r0(e,t,n){const r=t.map(()=>""),i=[],s=o=>{if(o===t.length)return i.push(e.chainLocators(r)),r.length<n;for(const l of t[o])if(r[o]=l,!s(o+1))return!1;return!0};return s(0),i}function dr(e){let t=!1;const n=e.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(e.endsWith('"')?(e=JSON.parse(e),t=!0):e.endsWith('"s')?(e=JSON.parse(e.substring(0,e.length-1)),t=!0):e.endsWith('"i')&&(e=JSON.parse(e.substring(0,e.length-1)),t=!1),{exact:t,text:e})}class i0{constructor(t){this.preferredQuote=t}generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(i.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"role":const s=[];ce(i.name)?s.push(`name: ${this.regexToSourceString(i.name)}`):typeof i.name=="string"&&(s.push(`name: ${this.quote(i.name)}`),i.exact&&s.push("exact: true"));for(const{name:l,value:a}of i.attrs)s.push(`${l}: ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, { ${s.join(", ")} }`:"";return`getByRole(${this.quote(r)}${o})`;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,!!i.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("getByLabel",r,!!i.exact);case"title":return this.toCallWithExact("getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToSourceString(t){return Hs(String(t))}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToSourceString(n)})`:r?`${t}(${this.quote(n)}, { exact: true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}quote(t){return Fs(t,this.preferredQuote??"'")}}class s0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(i.hasText)})`:i.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(i.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"role":const s=[];ce(i.name)?s.push(`name=${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`name=${this.quote(i.name)}`),i.exact&&s.push("exact=True"));for(const{name:l,value:a}of i.attrs){let u=typeof a=="string"?this.quote(a):a;typeof a=="boolean"&&(u=a?"True":"False"),s.push(`${oh(l)}=${u}`)}const o=s.length?`, ${s.join(", ")}`:"";return`get_by_role(${this.quote(r)}${o})`;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,!!i.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!i.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!i.exact);case"label":return this.toCallWithExact("get_by_label",r,!!i.exact);case"title":return this.toCallWithExact("get_by_title",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Hs(t.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, exact=True)`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToString(t):`${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fs(t,'"')}}class o0{generateLocator(t,n,r,i={}){let s;switch(t){case"page":s="Page";break;case"frame-locator":s="FrameLocator";break;case"locator":s="Locator";break}switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasText(${this.toHasText(i.hasText)}))`:i.hasNotText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasNotText(${this.toHasText(i.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"role":const o=[];ce(i.name)?o.push(`.setName(${this.regexToString(i.name)})`):typeof i.name=="string"&&(o.push(`.setName(${this.quote(i.name)})`),i.exact&&o.push(".setExact(true)"));for(const{name:a,value:u}of i.attrs)o.push(`.set${ys(a)}(${typeof u=="string"?this.quote(u):u})`);const l=o.length?`, new ${s}.GetByRoleOptions()${o.join("")}`:"";return`getByRole(AriaRole.${oh(r).toUpperCase()}${l})`;case"has-text":return`filter(new ${s}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${s}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${s}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${s}.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(s,"getByText",r,!!i.exact);case"alt":return this.toCallWithExact(s,"getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact(s,"getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact(s,"getByLabel",r,!!i.exact);case"title":return this.toCallWithExact(s,"getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Hs(t.source))}${n})`}toCallWithExact(t,n,r,i){return ce(r)?`${n}(${this.regexToString(r)})`:i?`${n}(${this.quote(r)}, new ${t}.${ys(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(t){return ce(t)?this.regexToString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fs(t,'"')}}class l0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(i.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"role":const s=[];ce(i.name)?s.push(`NameRegex = ${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`Name = ${this.quote(i.name)}`),i.exact&&s.push("Exact = true"));for(const{name:l,value:a}of i.attrs)s.push(`${ys(l)} = ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, new() { ${s.join(", ")} }`:"";return`GetByRole(AriaRole.${ys(r)}${o})`;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,!!i.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!i.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Hs(t.source))}${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, new() { Exact = true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?`HasTextRegex = ${this.regexToString(t)}`:`HasText = ${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}toHasNotText(t){return ce(t)?`HasNotTextRegex = ${this.regexToString(t)}`:`HasNotText = ${this.quote(t)}`}quote(t){return Fs(t,'"')}}class a0{generateLocator(t,n,r,i={}){return JSON.stringify({kind:n,body:r,options:i})}chainLocators(t){const n=t.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 u0={javascript:i0,python:s0,java:o0,csharp:l0,jsonl:a0};function ce(e){return e instanceof RegExp}const c0=({value:e,description:t})=>{const[n,r]=M.useState("copy"),i=M.useCallback(()=>{(typeof e=="function"?e():Promise.resolve(e)).then(o=>{navigator.clipboard.writeText(o).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[e]);return w.jsx(fn,{title:t||"Copy",icon:n,onClick:i})},mc=({value:e,description:t})=>{const n=M.useCallback(async()=>{const r=typeof e=="function"?await e():e;await navigator.clipboard.writeText(r)},[e]);return w.jsx(fn,{title:t,onClick:n,className:"copy-to-clipboard-text-button",children:t})},Lh=({text:e})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:e}),vc=new Map;function $a({name:e,items:t=[],id:n,render:r,icon:i,isError:s,isWarning:o,isInfo:l,selectedItem:a,onAccepted:u,onSelected:c,onHighlighted:f,onIconClicked:d,noItemsMessage:g,dataTestId:m,notSelectable:y}){const _=M.useRef(null),[p,h]=M.useState();return M.useEffect(()=>{f==null||f(p)},[f,p]),M.useEffect(()=>{const v=_.current;if(!v)return;const x=()=>{vc.set(e,v.scrollTop)};return v.addEventListener("scroll",x,{passive:!0}),()=>v.removeEventListener("scroll",x)},[e]),M.useEffect(()=>{_.current&&(_.current.scrollTop=vc.get(e)||0)},[e]),w.jsx("div",{className:tt("list-view vbox",e+"-list-view"),role:t.length>0?"list":void 0,"data-testid":m||e+"-list",children:w.jsxs("div",{className:tt("list-view-content",y&&"not-selectable"),tabIndex:0,onKeyDown:v=>{var N;if(a&&v.key==="Enter"){u==null||u(a,t.indexOf(a));return}if(v.key!=="ArrowDown"&&v.key!=="ArrowUp")return;v.stopPropagation(),v.preventDefault();const x=a?t.indexOf(a):-1;let E=x;v.key==="ArrowDown"&&(x===-1?E=0:E=Math.min(x+1,t.length-1)),v.key==="ArrowUp"&&(x===-1?E=t.length-1:E=Math.max(x-1,0));const C=(N=_.current)==null?void 0:N.children.item(E);pg(C||void 0),f==null||f(void 0),c==null||c(t[E],E),h(void 0)},ref:_,children:[g&&t.length===0&&w.jsx("div",{className:"list-view-empty",children:g}),t.map((v,x)=>{const E=r(v,x);return w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(v,x),role:"listitem",className:tt("list-view-entry",a===v&&"selected",!y&&p===v&&"highlighted",(s==null?void 0:s(v,x))&&"error",(o==null?void 0:o(v,x))&&"warning",(l==null?void 0:l(v,x))&&"info"),onClick:()=>c==null?void 0:c(v,x),onMouseEnter:()=>h(v),onMouseLeave:()=>h(void 0),children:[i&&w.jsx("div",{className:"codicon "+(i(v,x)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:C=>{C.preventDefault(),C.stopPropagation()},onClick:C=>{C.stopPropagation(),C.preventDefault(),d==null||d(v,x)}}),typeof E=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:E}):E]},(n==null?void 0:n(v,x))||x)})]})})}function ws(e,t){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let i,s={},o=!1,l=t==null?void 0:t.fg,a=t==null?void 0:t.bg;for(;(i=n.exec(e))!==null;){const[,,u,,c]=i;if(u){const f=+u;switch(f){case 0:s={};break;case 1:s["font-weight"]="bold";break;case 2:s.opacity="0.8";break;case 3:s["font-style"]="italic";break;case 4:s["text-decoration"]="underline";break;case 7:o=!0;break;case 8:s.display="none";break;case 9:s["text-decoration"]="line-through";break;case 22:delete s["font-weight"],delete s["font-style"],delete s.opacity,delete s["text-decoration"];break;case 23:delete s["font-weight"],delete s["font-style"],delete s.opacity;break;case 24:delete s["text-decoration"];break;case 27:o=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:l=yc[f-30];break;case 39:l=t==null?void 0:t.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:a=yc[f-40];break;case 49:a=t==null?void 0:t.bg;break;case 53:s["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:l=wc[f-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:a=wc[f-100];break}}else if(c){const f={...s},d=o?a:l;d!==void 0&&(f.color=d);const g=o?l:a;g!==void 0&&(f["background-color"]=g),r.push(`<span style="${f0(f)}">${d0(c)}</span>`)}}return r.join("")}const yc={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},wc={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function d0(e){return e.replace(/[&"<>]/g,t=>({"&":"&",'"':""","<":"<",">":">"})[t])}function f0(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const h0=$a;function fw(e,t){const{entries:n}=M.useMemo(()=>{if(!e)return{entries:[]};const i=[];for(const s of e.events){if(s.type==="console"){const o=s.args&&s.args.length?p0(s.args):Ih(s.text),l=s.location.url,u=`${l?l.substring(l.lastIndexOf("/")+1):"<anonymous>"}:${s.location.lineNumber}`;i.push({browserMessage:{body:o,location:u},isError:s.messageType==="error",isWarning:s.messageType==="warning",timestamp:s.time})}s.type==="event"&&s.method==="pageError"&&i.push({browserError:s.params.error,isError:!0,isWarning:!1,timestamp:s.time})}for(const s of e.stdio){let o="";s.text&&(o=ws(s.text.trim())||""),s.base64&&(o=ws(atob(s.base64).trim())||""),i.push({nodeMessage:{html:o},isError:s.type==="stderr",isWarning:!1,timestamp:s.timestamp})}return i.sort((s,o)=>s.timestamp-o.timestamp),{entries:i}},[e]);return{entries:M.useMemo(()=>t?n.filter(i=>i.timestamp>=t.minimum&&i.timestamp<=t.maximum):n,[n,t])}}const hw=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(h0,{name:"console",onAccepted:r,onHighlighted:n,items:e.entries,isError:i=>i.isError,isWarning:i=>i.isWarning,render:i=>{const s=Ro(i.timestamp-t.minimum),o=w.jsx("span",{className:"console-time",children:s}),l=i.isError?"status-error":i.isWarning?"status-warning":"status-none",a=i.browserMessage||i.browserError?w.jsx("span",{className:tt("codicon","codicon-browser",l),title:"Browser message"}):w.jsx("span",{className:tt("codicon","codicon-file",l),title:"Runner message"});let u,c,f,d;const{browserMessage:g,browserError:m,nodeMessage:y}=i;if(g&&(u=g.location,c=g.body),m){const{error:_,value:p}=m;_?(c=_.message,d=_.stack):c=String(p)}return y&&(f=y.html),w.jsxs("div",{className:"console-line",children:[o,a,u&&w.jsx("span",{className:"console-location",children:u}),c&&w.jsx("span",{className:"console-line-message",children:c}),f&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&w.jsx("div",{className:"console-stack",children:d})]})}})}):w.jsx(Lh,{text:"No console entries"});function p0(e){if(e.length===1)return Ih(e[0].preview);const t=typeof e[0].value=="string"&&e[0].value.includes("%"),n=t?e[0].value:"",r=t?e.slice(1):e;let i=0;const s=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(w.jsx("span",{children:a}));let u=0;for(;(o=s.exec(n))!==null;){const c=n.substring(u,o.index);a.push(w.jsx("span",{children:c})),u=o.index+2;const f=o[0][1];if(f==="%")a.push(w.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[i++],g={};typeof(d==null?void 0:d.value)!="string"&&(g.color="var(--vscode-debugTokenExpression-number)"),a.push(w.jsx("span",{style:g,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[i++],g=d?g0(d.preview):{};l.push(w.jsx("span",{style:g,children:a}))}}for(u<n.length&&a.push(w.jsx("span",{children:n.substring(u)}));i<r.length;i++){const c=r[i],f={};a.length&&a.push(w.jsx("span",{children:" "})),typeof(c==null?void 0:c.value)!="string"&&(f.color="var(--vscode-debugTokenExpression-number)"),a.push(w.jsx("span",{style:f,children:(c==null?void 0:c.preview)||""}))}return l}function Ih(e){return[w.jsx("span",{dangerouslySetInnerHTML:{__html:ws(e.trim())}})]}function g0(e){try{const t={},n=e.split(";");for(const r of n){const i=r.trim();if(!i)continue;let[s,o]=i.split(":");if(s=s.trim(),o=o.trim(),!m0(s))continue;const l=s.replace(/-([a-z])/g,a=>a[1].toUpperCase());t[l]=o}return t}catch{return{}}}function m0(e){return["background","border","color","font","line","margin","padding","text"].some(n=>e.startsWith(n))}const Oa=({noShadow:e,children:t,noMinHeight:n,className:r,sidebarBackground:i,onClick:s})=>w.jsx("div",{className:tt("toolbar",e&&"no-shadow",n&&"no-min-height",r,i&&"toolbar-sidebar-background"),onClick:s,children:t}),v0=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:s,mode:o})=>{const l=M.useId();return t||(t=e[0].id),o||(o="default"),w.jsx("div",{className:"tabbed-pane","data-testid":s,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(Oa,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...e.map(a=>w.jsx(Mh,{id:a.id,ariaControls:`${l}-${a.id}`,title:a.title,count:a.count,errorCount:a.errorCount,selected:t===a.id,onSelect:n},a.id))]}),o==="select"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:w.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:a=>{n==null||n(e[a.currentTarget.selectedIndex].id)},children:e.map(a=>{let u="";return a.count&&(u=` (${a.count})`),a.errorCount&&(u=` (${a.errorCount})`),w.jsxs("option",{value:a.id,selected:a.id===t,role:"tab","aria-controls":`${l}-${a.id}`,children:[a.title,u]},a.id)})})}),i&&w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...i]})]}),e.map(a=>{const u="tab-content tab-"+a.id;if(a.component)return w.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,style:{display:t===a.id?"inherit":"none"},children:a.component},a.id);if(t===a.id)return w.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,children:a.render()},a.id)})]})})},Mh=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:s,ariaControls:o})=>w.jsxs("div",{className:tt("tabbed-pane-tab",i&&"selected"),onClick:()=>s==null?void 0:s(e),role:"tab",title:t,"aria-controls":o,children:[w.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&w.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&w.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]}),y0="modulepreload",w0=function(e,t){return new URL(e,t).href},_c={},_0=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=w0(u,r),u in _c)return;_c[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let m=o.length-1;m>=0;m--){const y=o[m];if(y.href===u&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":y0,c||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((m,y)=>{g.addEventListener("load",m),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},pw=20,Vs=({text:e,language:t,mimeType:n,linkify:r,readOnly:i,highlight:s,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:u,wrapLines:c,onChange:f,dataTestId:d,placeholder:g})=>{const[m,y]=ks(),[_]=M.useState(_0(()=>import("./codeMirrorModule-BWCrdKft.js"),__vite__mapDeps([0,1]),import.meta.url).then(x=>x.default)),p=M.useRef(null),[h,v]=M.useState();return M.useEffect(()=>{(async()=>{var b,S;const x=await _;S0(x);const E=y.current;if(!E)return;const C=k0(t)||E0(n)||(r?"text/linkified":"");if(p.current&&C===p.current.cm.getOption("mode")&&!!i===p.current.cm.getOption("readOnly")&&l===p.current.cm.getOption("lineNumbers")&&c===p.current.cm.getOption("lineWrapping")&&g===p.current.cm.getOption("placeholder"))return;(S=(b=p.current)==null?void 0:b.cm)==null||S.getWrapperElement().remove();const N=x(E,{value:"",mode:C,readOnly:!!i,lineNumbers:l,lineWrapping:c,placeholder:g});return p.current={cm:N},a&&N.focus(),v(N),N})()},[_,h,y,t,n,r,l,c,i,a,g]),M.useEffect(()=>{p.current&&p.current.cm.setSize(m.width,m.height)},[m]),M.useLayoutEffect(()=>{var C;if(!h)return;let x=!1;if(h.getValue()!==e&&(h.setValue(e),x=!0,u&&(h.execCommand("selectAll"),h.focus())),x||JSON.stringify(s)!==JSON.stringify(p.current.highlight)){for(const S of p.current.highlight||[])h.removeLineClass(S.line-1,"wrap");for(const S of s||[])h.addLineClass(S.line-1,"wrap",`source-line-${S.type}`);for(const S of p.current.widgets||[])h.removeLineWidget(S);for(const S of p.current.markers||[])S.clear();const N=[],b=[];for(const S of s||[]){if(S.type!=="subtle-error"&&S.type!=="error")continue;const I=(C=p.current)==null?void 0:C.cm.getLine(S.line-1);if(I){const O={};O.title=S.message||"",b.push(h.markText({line:S.line-1,ch:0},{line:S.line-1,ch:S.column||I.length},{className:"source-line-error-underline",attributes:O}))}if(S.type==="error"){const O=document.createElement("div");O.innerHTML=ws(S.message||""),O.className="source-line-error-widget",N.push(h.addLineWidget(S.line,O,{above:!0,coverGutter:!1}))}}p.current.highlight=s,p.current.widgets=N,p.current.markers=b}typeof o=="number"&&p.current.cm.lineCount()>=o&&h.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let E;return f&&(E=()=>f(h.getValue()),h.on("change",E)),()=>{E&&h.off("change",E)}},[h,e,s,o,u,f]),w.jsx("div",{"data-testid":d,className:"cm-wrapper",ref:y,onClick:x0})};function x0(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let xc=!1;function S0(e){xc||(xc=!0,e.defineSimpleMode("text/linkified",{start:[{regex:gg,token:"linkified"}]}))}function E0(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function k0(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[e]}async function T0(e){const t=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function i(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
|
|
43
43
|
|
|
44
44
|
`)+d}function s(f){function d(g){let y=g.charCodeAt(0).toString(16);for(;y.length<4;)y="0"+y;return"\\u"+y}return/[\0-\x1F\x7F-\x9F!]|\'/.test(f)?"$'"+f.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,d)+"'":"'"+f+"'"}const o=t==="win"?i:s;n.push(o(e.request.url).replace(/[[{}\]]/g,"\\$&"));let l="GET";const a=[],u=await Ph(e);u&&(a.push("--data-raw "+o(u)),r.add("content-length"),l="POST"),e.request.method!==l&&n.push("-X "+o(e.request.method));const c=e.request.headers;for(let f=0;f<c.length;f++){const d=c[f],g=d.name.replace(/^:/,"");r.has(g.toLowerCase())||(d.value.trim()?n.push("-H "+o(g+": "+d.value)):n.push("-H "+o(g+";")))}return n=n.concat(a),"curl "+n.join(n.length>=3?t==="win"?` ^
|
|
45
45
|
`:` \\
|
|
@@ -65,4 +65,4 @@ Error generating stack: `+s.message+`
|
|
|
65
65
|
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|
66
66
|
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|
67
67
|
`),this.installListeners(),t.utils.cacheNormalizedWhitespaces(),t.isUnderTest&&console.error("Recorder script ready for test")}installListeners(){var r;$p(this._listeners),this._listeners=[B(this.document,"click",i=>this._onClick(i),!0),B(this.document,"auxclick",i=>this._onClick(i),!0),B(this.document,"dblclick",i=>this._onDblClick(i),!0),B(this.document,"contextmenu",i=>this._onContextMenu(i),!0),B(this.document,"dragstart",i=>this._onDragStart(i),!0),B(this.document,"input",i=>this._onInput(i),!0),B(this.document,"keydown",i=>this._onKeyDown(i),!0),B(this.document,"keyup",i=>this._onKeyUp(i),!0),B(this.document,"pointerdown",i=>this._onPointerDown(i),!0),B(this.document,"pointerup",i=>this._onPointerUp(i),!0),B(this.document,"mousedown",i=>this._onMouseDown(i),!0),B(this.document,"mouseup",i=>this._onMouseUp(i),!0),B(this.document,"mousemove",i=>this._onMouseMove(i),!0),B(this.document,"mouseleave",i=>this._onMouseLeave(i),!0),B(this.document,"mouseenter",i=>this._onMouseEnter(i),!0),B(this.document,"focus",i=>this._onFocus(i),!0),B(this.document,"scroll",i=>this._onScroll(i),!0)],this.highlight.install();let t;const n=()=>{this.highlight.install(),t=this.injectedScript.builtinSetTimeout(n,500)};t=this.injectedScript.builtinSetTimeout(n,500),this._listeners.push(()=>this.injectedScript.builtinClearTimeout(t)),this.highlight.appendChild(Op(this.document,S1)),(r=this.overlay)==null||r.install(),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var n,r,i;const t=this._tools[this.state.mode];t!==this._currentTool&&((r=(n=this._currentTool).cleanup)==null||r.call(n),this.clearHighlight(),this._currentTool=t,(i=this.injectedScript.document.body)==null||i.setAttribute("data-pw-cursor",t.cursor()))}setUIState(t,n){var s;this._delegate=n,t.actionPoint&&this.state.actionPoint&&t.actionPoint.x===this.state.actionPoint.x&&t.actionPoint.y===this.state.actionPoint.y||!t.actionPoint&&!this.state.actionPoint||(t.actionPoint?this.highlight.showActionPoint(t.actionPoint.x,t.actionPoint.y):this.highlight.hideActionPoint()),this.state=t,this.highlight.setLanguage(t.language),this._switchCurrentTool(),(s=this.overlay)==null||s.setUIState(t);let r="noop";if(t.actionSelector!==this._lastHighlightedSelector){this._lastHighlightedSelector=t.actionSelector;const o=t.actionSelector?b1(this.injectedScript,t.actionSelector,this.document):null;r=o!=null&&o.elements.length?o:"clear"}const i=JSON.stringify(t.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==i){this._lastHighlightedAriaTemplateJSON=i;const o=t.ariaTemplate?this.injectedScript.utils.parseYamlTemplate(t.ariaTemplate):void 0,l=o?this.injectedScript.getAllByAria(this.document,o):[];l.length?r={elements:l}:r="clear"}r==="clear"?this.clearHighlight():r!=="noop"&&this.updateHighlight(r,!1)}clearHighlight(){var t,n;(n=(t=this._currentTool).cleanup)==null||n.call(t),this.updateHighlight(null,!1)}_onClick(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onClick(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onClick)==null||i.call(r,t))}_onDblClick(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onDblClick)==null||i.call(r,t))}_onContextMenu(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onContextMenu)==null||r.call(n,t))}_onDragStart(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,t))}_onPointerDown(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,t))}_onPointerUp(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,t))}_onMouseDown(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,t))}_onMouseUp(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onMouseUp)==null||i.call(r,t))}_onMouseMove(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onMouseMove)==null||i.call(r,t))}_onMouseEnter(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,t))}_onMouseLeave(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,t))}_onFocus(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onFocus)==null||r.call(n,t))}_onScroll(t){var n,r;t.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(n=this._currentTool).onScroll)==null||r.call(n,t))}_onInput(t){var n,r;this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onInput)==null||r.call(n,t)}_onKeyDown(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onKeyDown)==null||r.call(n,t))}_onKeyUp(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onKeyUp)==null||r.call(n,t))}updateHighlight(t,n){var i,s;let r=t==null?void 0:t.tooltipText;r===void 0&&!(t!=null&&t.tooltipList)&&(t!=null&&t.selector)&&(r=this.injectedScript.utils.asLocator(this.state.language,t.selector)),this.highlight.updateHighlight((t==null?void 0:t.elements)||[],{...t,tooltipText:r}),n&&((s=(i=this._delegate).highlightUpdated)==null||s.call(i))}_ignoreOverlayEvent(t){return t.composedPath().some(n=>(n.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(t){var n;for(const r of t.composedPath())if(!((n=this.overlay)!=null&&n.contains(r)))return r;return t.composedPath()[0]}setMode(t){var n,r;(r=(n=this._delegate).setMode)==null||r.call(n,t)}async performAction(t){var n,r;await((r=(n=this._delegate).performAction)==null?void 0:r.call(n,t).catch(()=>{}))}recordAction(t){var n,r;(r=(n=this._delegate).recordAction)==null||r.call(n,t)}setOverlayState(t){var n,r;(r=(n=this._delegate).setOverlayState)==null||r.call(n,t)}elementPicked(t,n){var i,s;const r=this.injectedScript.ariaSnapshot(n.elements[0]);(s=(i=this._delegate).elementPicked)==null||s.call(i,{selector:t,ariaSnapshot:r})}}class C1{constructor(t){this._dialogElement=null,this._recorder=t}isShowing(){return!!this._dialogElement}show(t){const n=this._recorder.document.createElement("x-pw-tool-item");n.title="Accept",n.classList.add("accept"),n.appendChild(this._recorder.document.createElement("x-div")),n.addEventListener("click",()=>t.onCommit());const r=this._recorder.document.createElement("x-pw-tool-item");r.title="Close",r.classList.add("cancel"),r.appendChild(this._recorder.document.createElement("x-div")),r.addEventListener("click",()=>{var l;this.close(),(l=t.onCancel)==null||l.call(t)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),this._keyboardListener=l=>{var a;if(l.key==="Escape"){this.close(),(a=t.onCancel)==null||a.call(t);return}if(l.key==="Enter"&&(l.ctrlKey||l.metaKey)){this._dialogElement&&t.onCommit();return}},this._recorder.document.addEventListener("keydown",this._keyboardListener,!0);const i=this._recorder.document.createElement("x-pw-tools-list"),s=this._recorder.document.createElement("label");s.textContent=t.label,i.appendChild(s),i.appendChild(this._recorder.document.createElement("x-spacer")),i.appendChild(n),i.appendChild(r),this._dialogElement.appendChild(i);const o=this._recorder.document.createElement("x-pw-dialog-body");return o.appendChild(t.body),this._dialogElement.appendChild(o),this._recorder.highlight.appendChild(this._dialogElement),this._dialogElement}moveTo(t,n){this._dialogElement&&(this._dialogElement.style.top=t+"px",this._dialogElement.style.left=n+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}}function N1(e){let t=e.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Lo(e){return(e.altKey?1:0)|(e.ctrlKey?2:0)|(e.metaKey?4:0)|(e.shiftKey?8:0)}function zc(e){switch(e.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Io(e){if(e.target.nodeName==="CANVAS")return{x:e.offsetX,y:e.offsetY}}function q(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}function Mo(e){if(!e||e.nodeName!=="INPUT")return null;const t=e;return["checkbox","radio"].includes(t.type)?t:null}function Po(e){return!e||e.nodeName!=="INPUT"?!1:e.type.toLowerCase()==="range"}function B(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function $p(e){for(const t of e)t();e.splice(0,e.length)}function b1(e,t,n){try{const r=e.parseSelector(t);return{selector:t,elements:e.querySelectorAll(r,n)}}catch{return{selector:t,elements:[]}}}function Op(e,{tagName:t,attrs:n,children:r}){const i=e.createElementNS("http://www.w3.org/2000/svg",t);if(n)for(const[s,o]of Object.entries(n))i.setAttribute(s,o);if(r)for(const s of r)i.appendChild(Op(e,s));return i}function Za(e,t,n){return`internal:attr=[${e}=${xe(t,(n==null?void 0:n.exact)||!1)}]`}function A1(e,t){return`internal:testid=[${e}=${xe(t,!0)}]`}function L1(e,t){return"internal:label="+qe(e,!!(t!=null&&t.exact))}function I1(e,t){return Za("alt",e,t)}function M1(e,t){return Za("title",e,t)}function P1(e,t){return Za("placeholder",e,t)}function R1(e,t){return"internal:text="+qe(e,!!(t!=null&&t.exact))}function $1(e,t={}){const n=[];return t.checked!==void 0&&n.push(["checked",String(t.checked)]),t.disabled!==void 0&&n.push(["disabled",String(t.disabled)]),t.selected!==void 0&&n.push(["selected",String(t.selected)]),t.expanded!==void 0&&n.push(["expanded",String(t.expanded)]),t.includeHidden!==void 0&&n.push(["include-hidden",String(t.includeHidden)]),t.level!==void 0&&n.push(["level",String(t.level)]),t.name!==void 0&&n.push(["name",xe(t.name,!!t.exact)]),t.pressed!==void 0&&n.push(["pressed",String(t.pressed)]),`internal:role=${e}${n.map(([r,i])=>`[${r}=${i}]`).join("")}`}const pr=Symbol("selector"),O1=class Sr{constructor(t,n,r){if(r!=null&&r.hasText&&(n+=` >> internal:has-text=${qe(r.hasText,!1)}`),r!=null&&r.hasNotText&&(n+=` >> internal:has-not-text=${qe(r.hasNotText,!1)}`),r!=null&&r.has&&(n+=" >> internal:has="+JSON.stringify(r.has[pr])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[pr])),this[pr]=n,n){const o=t.parseSelector(n);this.element=t.querySelector(o,t.document,!1),this.elements=t.querySelectorAll(o,t.document)}const i=n,s=this;s.locator=(o,l)=>new Sr(t,i?i+" >> "+o:o,l),s.getByTestId=o=>s.locator(A1(t.testIdAttributeNameForStrictErrorAndConsoleCodegen(),o)),s.getByAltText=(o,l)=>s.locator(I1(o,l)),s.getByLabel=(o,l)=>s.locator(L1(o,l)),s.getByPlaceholder=(o,l)=>s.locator(P1(o,l)),s.getByText=(o,l)=>s.locator(R1(o,l)),s.getByTitle=(o,l)=>s.locator(M1(o,l)),s.getByRole=(o,l={})=>s.locator($1(o,l)),s.filter=o=>new Sr(t,n,o),s.first=()=>s.locator("nth=0"),s.last=()=>s.locator("nth=-1"),s.nth=o=>s.locator(`nth=${o}`),s.and=o=>new Sr(t,i+" >> internal:and="+JSON.stringify(o[pr])),s.or=o=>new Sr(t,i+" >> internal:or="+JSON.stringify(o[pr]))}};let j1=O1;class z1{constructor(t){this._injectedScript=t,!this._injectedScript.window.playwright&&(this._injectedScript.window.playwright={$:(n,r)=>this._querySelector(n,!!r),$$:n=>this._querySelectorAll(n),inspect:n=>this._inspect(n),selector:n=>this._selector(n),generateLocator:(n,r)=>this._generateLocator(n,r),ariaSnapshot:n=>{const r=this._injectedScript.ariaSnapshot(n||this._injectedScript.document.body);console.log(r)},resume:()=>this._resume(),...new j1(t,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(t,n){if(typeof t!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const r=this._injectedScript.parseSelector(t);return this._injectedScript.querySelector(r,this._injectedScript.document,n)}_querySelectorAll(t){if(typeof t!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const n=this._injectedScript.parseSelector(t);return this._injectedScript.querySelectorAll(n,this._injectedScript.document)}_inspect(t){if(typeof t!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(t,!1))}_selector(t){if(!(t instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(t)}_generateLocator(t,n){if(!(t instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(t);return Fn(n||"javascript",r)}_resume(){this._injectedScript.window.__pw_resume().catch(()=>{})}}function D1(e,t){e=e.replace(/AriaRole\s*\.\s*([\w]+)/g,(s,o)=>o.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(s,o,l)=>`${o}(${l.toLowerCase()}`);const n=[];let r="";for(let s=0;s<e.length;++s){const o=e[s];if(o!=='"'&&o!=="'"&&o!=="`"&&o!=="/"){r+=o;continue}const l=e[s-1]==="r"||e[s]==="/";++s;let a="";for(;s<e.length;){if(e[s]==="\\"){l?(e[s+1]!==o&&(a+=e[s]),++s,a+=e[s]):(++s,e[s]==="n"?a+=`
|
|
68
|
-
`:e[s]==="r"?a+="\r":e[s]==="t"?a+=" ":a+=e[s]),++s;continue}if(e[s]!==o){a+=e[s++];continue}break}n.push({quote:o,text:a}),r+=(o==="/"?"r":"")+"$"+n.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",");const i=n.map(s=>s.quote).filter(s=>"'\"`".includes(s))[0];return{selector:jp(r,n,t),preferredQuote:i}}function Dc(e){return[...e.matchAll(/\$\d+/g)].length}function Fc(e,t){return e.replace(/\$(\d+)/g,(n,r)=>`$${r-t}`)}function jp(e,t,n){for(;;){const i=e.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!i)break;const s=i.index+i[0].length;let o=0,l=s;for(;l<e.length&&(e[l]==="("?o++:e[l]===")"&&o--,!(o<0));l++);let a=e.substring(0,s),u=0;["sethas(","sethasnot("].includes(i[1])&&(u=1,a=a.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const c=Dc(e.substring(0,s)),f=Fc(e.substring(s,l),c),d=Dc(f),g=t.slice(c,c+d),m=JSON.stringify(jp(f,g,n));e=a.replace(/=$/,"2=")+`$${c+1}`+Fc(e.substring(l+u),d-1);const y=t.slice(0,c),_=t.slice(c+d);t=y.concat([{quote:'"',text:m}]).concat(_)}e=e.replace(/\,set([\w]+)\(([^)]+)\)/g,(i,s,o)=>","+s.toLowerCase()+"="+o.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${n}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/\,/g,"][");const r=e.split(".");for(let i=0;i<r.length-1;i++)if(r[i]==="internal:control=enter-frame"&&r[i+1].startsWith("nth=")){const[s]=r.splice(i,1);r.splice(i+1,0,s)}return r.map(i=>!i.startsWith("internal:")||i==="internal:control"?i.replace(/\$(\d+)/g,(s,o)=>t[+o-1].text):(i=i.includes("[")?i.replace(/\]/,"")+"]":i,i=i.replace(/(?:r)\$(\d+)(i)?/g,(s,o,l)=>{const a=t[+o-1];return i.startsWith("internal:attr")||i.startsWith("internal:testid")||i.startsWith("internal:role")?xe(new RegExp(a.text),!1)+(l||""):qe(new RegExp(a.text,l),!1)}).replace(/\$(\d+)(i|s)?/g,(s,o,l)=>{const a=t[+o-1];return i.startsWith("internal:has=")||i.startsWith("internal:has-not=")?a.text:i.startsWith("internal:testid")?xe(a.text,!0):i.startsWith("internal:attr")||i.startsWith("internal:role")?xe(a.text,l==="s"):qe(a.text,l==="s")}),i)).join(" >> ")}function F1(e,t,n){try{return Us(t),t}catch{}try{const{selector:r,preferredQuote:i}=D1(t,n),s=Ah(e,r,void 0,void 0,i),o=Hc(e,t);if(s.some(l=>Hc(e,l)===o))return r}catch{}return""}function Hc(e,t){return t=t.replace(/\s/g,""),e==="javascript"&&(t=t.replace(/\\?["`]/g,"'")),t}const H1=({url:e})=>w.jsxs("div",{className:"browser-frame-header",children:[w.jsxs("div",{style:{whiteSpace:"nowrap"},children:[w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),w.jsx("div",{className:"browser-frame-address-bar",title:e||"about:blank",children:e||"about:blank"}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsxs("div",{children:[w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),vw=({action:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:s,setHighlightedLocator:o,openPage:l})=>{const[a,u]=M.useState("action"),c=M.useMemo(()=>q1(e),[e]),f=M.useMemo(()=>{const d=c[a];return d?Q1(d):void 0},[c,a]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(Oa,{children:[w.jsx(fn,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>i(!r)}),["action","before","after"].map(d=>w.jsx(Mh,{id:d,title:B1(d),selected:a===d,onSelect:()=>u(d)},d)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(fn,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(f!=null&&f.popoutUrl),onClick:()=>{l||(l=window.open);const d=l((f==null?void 0:f.popoutUrl)||"","_blank");d==null||d.addEventListener("DOMContentLoaded",()=>{const g=new Ip(d,!1,t,n,1,"chromium",[]);new z1(g)})}})]}),w.jsx(U1,{snapshotUrls:f,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:s,setHighlightedLocator:o})]})},U1=({snapshotUrls:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:s,setHighlightedLocator:o})=>{const l=M.useRef(null),a=M.useRef(null),[u,c]=M.useState({viewport:Dp,url:""}),f=M.useRef({iteration:0,visibleIframe:0});return M.useEffect(()=>{(async()=>{const d=f.current.iteration+1,g=1-f.current.visibleIframe;f.current.iteration=d;const m=await K1(e==null?void 0:e.snapshotInfoUrl);if(f.current.iteration!==d)return;const y=[l,a][g].current;if(y){let _=()=>{};const p=new Promise(h=>_=h);try{y.addEventListener("load",_),y.addEventListener("error",_);const h=(e==null?void 0:e.snapshotUrl)||G1;y.contentWindow?y.contentWindow.location.replace(h):y.src=h,await p}catch{}finally{y.removeEventListener("load",_),y.removeEventListener("error",_)}}f.current.iteration===d&&(f.current.visibleIframe=g,c(m))})()},[e]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:d=>{d.key==="Escape"&&r&&i(!1)},children:[w.jsx(Uc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:s,setHighlightedLocator:o,iframe:l.current,iteration:f.current.iteration}),w.jsx(Uc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:s,setHighlightedLocator:o,iframe:a.current,iteration:f.current.iteration}),w.jsx(V1,{snapshotInfo:u,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:l,name:"snapshot",title:"DOM Snapshot",className:tt(f.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:a,name:"snapshot",title:"DOM Snapshot",className:tt(f.current.visibleIframe===1&&"snapshot-visible")})]})})]})},V1=({snapshotInfo:e,children:t})=>{const[n,r]=ks(),s={width:e.viewport.width,height:e.viewport.height+40},o=Math.min(n.width/s.width,n.height/s.height,1),l={x:(n.width-s.width)/2,y:(n.height-s.height)/2};return w.jsx("div",{ref:r,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:s.width+"px",height:s.height+"px",transform:`translate(${l.x}px, ${l.y}px) scale(${o})`},children:[w.jsx(H1,{url:e.url}),t]})})};function B1(e){return e==="before"?"Before":e==="after"?"After":e==="action"?"Action":e}const Uc=({iframe:e,isInspecting:t,sdkLanguage:n,testIdAttributeName:r,highlightedLocator:i,setHighlightedLocator:s,iteration:o})=>(M.useEffect(()=>{const l=[],a=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{zp(l,n,r,a,"",e==null?void 0:e.contentWindow)}catch{}for(const{recorder:u,frameSelector:c}of l){const f=F1(n,i,r);u.setUIState({mode:t?"inspecting":"none",actionSelector:f.startsWith(c)?f.substring(c.length).trim():void 0,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(d){s(Fn(n,c+d.selector))},highlightUpdated(){for(const d of l)d.recorder!==u&&d.recorder.clearHighlight()}})}},[e,t,i,s,n,r,o]),w.jsx(w.Fragment,{}));function zp(e,t,n,r,i,s){if(!s)return;const o=s;if(!o._recorder){const l=new Ip(s,r,t,n,1,"chromium",[]),a=new T1(l);o._injectedScript=l,o._recorder={recorder:a,frameSelector:i},r&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(a)))}e.push(o._recorder);for(let l=0;l<s.frames.length;++l){const a=s.frames[l],u=a.frameElement?o._injectedScript.generateSelectorSimple(a.frameElement,{omitInternalEngines:!0,testIdAttributeName:n})+" >> internal:control=enter-frame >> ":"";zp(e,t,n,r,i+u,a)}}function q1(e){if(!e)return{};let t=e.beforeSnapshot?{action:e,snapshotName:e.beforeSnapshot}:void 0,n=e;for(;!t&&n;)n=Av(n),t=n!=null&&n.afterSnapshot?{action:n,snapshotName:n==null?void 0:n.afterSnapshot}:void 0;const r=e.afterSnapshot?{action:e,snapshotName:e.afterSnapshot}:t,i=e.inputSnapshot?{action:e,snapshotName:e.inputSnapshot,hasInputTarget:!0}:r;return i&&(i.point=e.point),{action:i,before:t,after:r}}const W1=new URLSearchParams(window.location.search).has("isUnderTest");function Q1(e){const t=new URLSearchParams;t.set("trace",vs(e.action).traceUrl),t.set("name",e.snapshotName),W1&&t.set("isUnderTest","true"),e.point&&(t.set("pointX",String(e.point.x)),t.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const n=new URL(`snapshot/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),r=new URL(`snapshotInfo/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),i=new URLSearchParams;i.set("r",n),i.set("trace",vs(e.action).traceUrl),e.point&&(i.set("pointX",String(e.point.x)),i.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const s=new URL(`snapshot.html?${i.toString()}`,window.location.href).toString();return{snapshotInfoUrl:r,snapshotUrl:n,popoutUrl:s}}async function K1(e){const t={url:"",viewport:Dp,timestamp:void 0,wallTime:void 0};if(e){const r=await(await fetch(e)).json();r.error||(t.url=r.url,t.viewport=r.viewport,t.timestamp=r.timestamp,t.wallTime=r.wallTime)}return t}const Dp={width:1280,height:720},G1='data:text/html,<body style="background: #ddd"></body>',X1=$a,J1=({stack:e,setSelectedFrame:t,selectedFrame:n})=>{const r=e||[];return w.jsx(X1,{name:"stack-trace",items:r,selectedItem:r[n],render:i=>{const s=i.file[1]===":"?"\\":"/";return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"stack-trace-frame-function",children:i.function||"(anonymous)"}),w.jsx("span",{className:"stack-trace-frame-location",children:i.file.split(s).pop()}),w.jsx("span",{className:"stack-trace-frame-line",children:":"+i.line})]})},onSelected:i=>t(r.indexOf(i))})},yw=({stack:e,sources:t,rootDir:n,fallbackLocation:r,stackFrameLocation:i,onOpenExternally:s})=>{const[o,l]=M.useState(),[a,u]=M.useState(0);M.useEffect(()=>{o!==e&&(l(e),u(0))},[e,o,l,u]);const{source:c,highlight:f,targetLine:d,fileName:g,location:m}=cg(async()=>{var I,O,T,P;const h=e==null?void 0:e[a],v=!(h!=null&&h.file);if(v&&!r)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const x=v?r.file:h.file;let E=t.get(x);E||(E={errors:((I=r==null?void 0:r.source)==null?void 0:I.errors)||[],content:(O=r==null?void 0:r.source)==null?void 0:O.content},t.set(x,E));const C=v?r:h,N=v?(r==null?void 0:r.line)||((T=E.errors[0])==null?void 0:T.line)||0:h.line,b=n&&x.startsWith(n)?x.substring(n.length+1):x,S=E.errors.map(J=>({type:"error",line:J.line,message:J.message}));if(S.push({line:N,type:"running"}),((P=r==null?void 0:r.source)==null?void 0:P.content)!==void 0)E.content=r.source.content;else if(E.content===void 0||v){const J=await Y1(x);try{let st=await fetch(`sha1/src@${J}.txt`);st.status===404&&(st=await fetch(`file?path=${encodeURIComponent(x)}`)),st.status>=400?E.content=`<Unable to read "${x}">`:E.content=await st.text()}catch{E.content=`<Unable to read "${x}">`}}return{source:E,highlight:S,targetLine:N,fileName:b,location:C}},[e,a,n,r],{source:{errors:[],content:"Loading…"},highlight:[]}),y=M.useCallback(()=>{m&&(s?s(m):window.location.href=`vscode://file//${m.file}:${m.line}`)},[s,m]),_=((e==null?void 0:e.length)??0)>1,p=Z1(g);return w.jsx(sh,{sidebarSize:200,orientation:i==="bottom"?"vertical":"horizontal",sidebarHidden:!_,main:w.jsxs("div",{className:"vbox","data-testid":"source-code",children:[g&&w.jsxs(Oa,{children:[w.jsx("div",{className:"source-tab-file-name",title:g,children:w.jsx("div",{children:p})}),w.jsx(c0,{description:"Copy filename",value:p}),m&&w.jsx(fn,{icon:"link-external",title:"Open in VS Code",onClick:y})]}),w.jsx(Vs,{text:c.content||"",language:"javascript",highlight:f,revealLine:d,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:w.jsx(J1,{stack:e,selectedFrame:a,setSelectedFrame:u})})};async function Y1(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t),r=[],i=new DataView(n);for(let s=0;s<i.byteLength;s+=1){const o=i.getUint8(s).toString(16).padStart(2,"0");r.push(o)}return r.join("")}function Z1(e){if(!e)return"";const t=e!=null&&e.includes("/")?"/":"\\";return(e==null?void 0:e.split(t).pop())??""}const ww=({sdkLanguage:e,setIsInspecting:t,highlightedLocator:n,setHighlightedLocator:r})=>w.jsxs("div",{className:"vbox",style:{backgroundColor:"var(--vscode-sideBar-background)"},children:[w.jsx("div",{style:{margin:"10px 0px 10px 10px",color:"var(--vscode-editorCodeLens-foreground)",flex:"none"},children:"Locator"}),w.jsx("div",{style:{margin:"0 10px 10px",flex:"auto"},children:w.jsx(Vs,{text:n,language:e,focusOnChange:!0,isFocused:!0,wrapLines:!0,onChange:i=>{r(i),t(!1)}})}),w.jsx("div",{style:{position:"absolute",right:5,top:5},children:w.jsx(fn,{icon:"files",title:"Copy locator",onClick:()=>{fg(n)}})})]});export{gw as A,hw as B,c0 as C,vw as D,v0 as E,yw as F,P0 as G,rw as H,ww as I,aw as J,fg as K,$a as L,uw as M,mw as N,q1 as O,Lh as P,Q1 as Q,et as R,sh as S,fn as T,U1 as U,tw as V,Up as W,_0 as _,iw as a,$o as b,xv as c,sw as d,ow as e,tt as f,Oa as g,ru as h,lw as i,w as j,pg as k,cw as l,Ro as m,dw as n,Fn as o,ws as p,nw as q,M as r,Yt as s,mg as t,ks as u,$0 as v,gg as w,pw as x,Vs as y,fw as z};
|
|
68
|
+
`:e[s]==="r"?a+="\r":e[s]==="t"?a+=" ":a+=e[s]),++s;continue}if(e[s]!==o){a+=e[s++];continue}break}n.push({quote:o,text:a}),r+=(o==="/"?"r":"")+"$"+n.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",");const i=n.map(s=>s.quote).filter(s=>"'\"`".includes(s))[0];return{selector:jp(r,n,t),preferredQuote:i}}function Dc(e){return[...e.matchAll(/\$\d+/g)].length}function Fc(e,t){return e.replace(/\$(\d+)/g,(n,r)=>`$${r-t}`)}function jp(e,t,n){for(;;){const i=e.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!i)break;const s=i.index+i[0].length;let o=0,l=s;for(;l<e.length&&(e[l]==="("?o++:e[l]===")"&&o--,!(o<0));l++);let a=e.substring(0,s),u=0;["sethas(","sethasnot("].includes(i[1])&&(u=1,a=a.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const c=Dc(e.substring(0,s)),f=Fc(e.substring(s,l),c),d=Dc(f),g=t.slice(c,c+d),m=JSON.stringify(jp(f,g,n));e=a.replace(/=$/,"2=")+`$${c+1}`+Fc(e.substring(l+u),d-1);const y=t.slice(0,c),_=t.slice(c+d);t=y.concat([{quote:'"',text:m}]).concat(_)}e=e.replace(/\,set([\w]+)\(([^)]+)\)/g,(i,s,o)=>","+s.toLowerCase()+"="+o.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${n}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/\,/g,"][");const r=e.split(".");for(let i=0;i<r.length-1;i++)if(r[i]==="internal:control=enter-frame"&&r[i+1].startsWith("nth=")){const[s]=r.splice(i,1);r.splice(i+1,0,s)}return r.map(i=>!i.startsWith("internal:")||i==="internal:control"?i.replace(/\$(\d+)/g,(s,o)=>t[+o-1].text):(i=i.includes("[")?i.replace(/\]/,"")+"]":i,i=i.replace(/(?:r)\$(\d+)(i)?/g,(s,o,l)=>{const a=t[+o-1];return i.startsWith("internal:attr")||i.startsWith("internal:testid")||i.startsWith("internal:role")?xe(new RegExp(a.text),!1)+(l||""):qe(new RegExp(a.text,l),!1)}).replace(/\$(\d+)(i|s)?/g,(s,o,l)=>{const a=t[+o-1];return i.startsWith("internal:has=")||i.startsWith("internal:has-not=")?a.text:i.startsWith("internal:testid")?xe(a.text,!0):i.startsWith("internal:attr")||i.startsWith("internal:role")?xe(a.text,l==="s"):qe(a.text,l==="s")}),i)).join(" >> ")}function F1(e,t,n){try{return Us(t),t}catch{}try{const{selector:r,preferredQuote:i}=D1(t,n),s=Ah(e,r,void 0,void 0,i),o=Hc(e,t);if(s.some(l=>Hc(e,l)===o))return r}catch{}return""}function Hc(e,t){return t=t.replace(/\s/g,""),e==="javascript"&&(t=t.replace(/\\?["`]/g,"'")),t}const H1=({url:e})=>w.jsxs("div",{className:"browser-frame-header",children:[w.jsxs("div",{style:{whiteSpace:"nowrap"},children:[w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),w.jsx("div",{className:"browser-frame-address-bar",title:e||"about:blank",children:e||"about:blank"}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsxs("div",{children:[w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),vw=({action:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:s,setHighlightedLocator:o,openPage:l})=>{const[a,u]=M.useState("action"),c=M.useMemo(()=>q1(e),[e]),f=M.useMemo(()=>{const d=c[a];return d?Q1(d):void 0},[c,a]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(Oa,{children:[w.jsx(fn,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>i(!r)}),["action","before","after"].map(d=>w.jsx(Mh,{id:d,title:B1(d),selected:a===d,onSelect:()=>u(d)},d)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(fn,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(f!=null&&f.popoutUrl),onClick:()=>{l||(l=window.open);const d=l((f==null?void 0:f.popoutUrl)||"","_blank");d==null||d.addEventListener("DOMContentLoaded",()=>{const g=new Ip(d,!1,t,n,1,"chromium",[]);new z1(g)})}})]}),w.jsx(U1,{snapshotUrls:f,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:s,setHighlightedLocator:o})]})},U1=({snapshotUrls:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:s,setHighlightedLocator:o})=>{const l=M.useRef(null),a=M.useRef(null),[u,c]=M.useState({viewport:Dp,url:""}),f=M.useRef({iteration:0,visibleIframe:0});return M.useEffect(()=>{(async()=>{const d=f.current.iteration+1,g=1-f.current.visibleIframe;f.current.iteration=d;const m=await K1(e==null?void 0:e.snapshotInfoUrl);if(f.current.iteration!==d)return;const y=[l,a][g].current;if(y){let _=()=>{};const p=new Promise(h=>_=h);try{y.addEventListener("load",_),y.addEventListener("error",_);const h=(e==null?void 0:e.snapshotUrl)||G1;y.contentWindow?y.contentWindow.location.replace(h):y.src=h,await p}catch{}finally{y.removeEventListener("load",_),y.removeEventListener("error",_)}}f.current.iteration===d&&(f.current.visibleIframe=g,c(m))})()},[e]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:d=>{d.key==="Escape"&&r&&i(!1)},children:[w.jsx(Uc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:s,setHighlightedLocator:o,iframe:l.current,iteration:f.current.iteration}),w.jsx(Uc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:s,setHighlightedLocator:o,iframe:a.current,iteration:f.current.iteration}),w.jsx(V1,{snapshotInfo:u,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:l,name:"snapshot",title:"DOM Snapshot",className:tt(f.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:a,name:"snapshot",title:"DOM Snapshot",className:tt(f.current.visibleIframe===1&&"snapshot-visible")})]})})]})},V1=({snapshotInfo:e,children:t})=>{const[n,r]=ks(),s={width:e.viewport.width,height:e.viewport.height+40},o=Math.min(n.width/s.width,n.height/s.height,1),l={x:(n.width-s.width)/2,y:(n.height-s.height)/2};return w.jsx("div",{ref:r,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:s.width+"px",height:s.height+"px",transform:`translate(${l.x}px, ${l.y}px) scale(${o})`},children:[w.jsx(H1,{url:e.url}),t]})})};function B1(e){return e==="before"?"Before":e==="after"?"After":e==="action"?"Action":e}const Uc=({iframe:e,isInspecting:t,sdkLanguage:n,testIdAttributeName:r,highlightedLocator:i,setHighlightedLocator:s,iteration:o})=>(M.useEffect(()=>{const l=[],a=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{zp(l,n,r,a,"",e==null?void 0:e.contentWindow)}catch{}for(const{recorder:u,frameSelector:c}of l){const f=F1(n,i,r);u.setUIState({mode:t?"inspecting":"none",actionSelector:f.startsWith(c)?f.substring(c.length).trim():void 0,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(d){s(Fn(n,c+d.selector))},highlightUpdated(){for(const d of l)d.recorder!==u&&d.recorder.clearHighlight()}})}},[e,t,i,s,n,r,o]),w.jsx(w.Fragment,{}));function zp(e,t,n,r,i,s){if(!s)return;const o=s;if(!o._recorder){const l=new Ip(s,r,t,n,1,"chromium",[]),a=new T1(l);o._injectedScript=l,o._recorder={recorder:a,frameSelector:i},r&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(a)))}e.push(o._recorder);for(let l=0;l<s.frames.length;++l){const a=s.frames[l],u=a.frameElement?o._injectedScript.generateSelectorSimple(a.frameElement,{omitInternalEngines:!0,testIdAttributeName:n})+" >> internal:control=enter-frame >> ":"";zp(e,t,n,r,i+u,a)}}function q1(e){if(!e)return{};let t=e.beforeSnapshot?{action:e,snapshotName:e.beforeSnapshot}:void 0,n=e;for(;!t&&n;)n=Av(n),t=n!=null&&n.afterSnapshot?{action:n,snapshotName:n==null?void 0:n.afterSnapshot}:void 0;const r=e.afterSnapshot?{action:e,snapshotName:e.afterSnapshot}:t,i=e.inputSnapshot?{action:e,snapshotName:e.inputSnapshot,hasInputTarget:!0}:r;return i&&(i.point=e.point),{action:i,before:t,after:r}}const W1=new URLSearchParams(window.location.search).has("isUnderTest");function Q1(e){const t=new URLSearchParams;t.set("trace",vs(e.action).traceUrl),t.set("name",e.snapshotName),W1&&t.set("isUnderTest","true"),e.point&&(t.set("pointX",String(e.point.x)),t.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const n=new URL(`snapshot/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),r=new URL(`snapshotInfo/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),i=new URLSearchParams;i.set("r",n),i.set("trace",vs(e.action).traceUrl),e.point&&(i.set("pointX",String(e.point.x)),i.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const s=new URL(`snapshot.html?${i.toString()}`,window.location.href).toString();return{snapshotInfoUrl:r,snapshotUrl:n,popoutUrl:s}}async function K1(e){const t={url:"",viewport:Dp,timestamp:void 0,wallTime:void 0};if(e){const r=await(await fetch(e)).json();r.error||(t.url=r.url,t.viewport=r.viewport,t.timestamp=r.timestamp,t.wallTime=r.wallTime)}return t}const Dp={width:1280,height:720},G1='data:text/html,<body style="background: #ddd"></body>',X1=$a,J1=({stack:e,setSelectedFrame:t,selectedFrame:n})=>{const r=e||[];return w.jsx(X1,{name:"stack-trace",items:r,selectedItem:r[n],render:i=>{const s=i.file[1]===":"?"\\":"/";return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"stack-trace-frame-function",children:i.function||"(anonymous)"}),w.jsx("span",{className:"stack-trace-frame-location",children:i.file.split(s).pop()}),w.jsx("span",{className:"stack-trace-frame-line",children:":"+i.line})]})},onSelected:i=>t(r.indexOf(i))})},yw=({stack:e,sources:t,rootDir:n,fallbackLocation:r,stackFrameLocation:i,onOpenExternally:s})=>{const[o,l]=M.useState(),[a,u]=M.useState(0);M.useEffect(()=>{o!==e&&(l(e),u(0))},[e,o,l,u]);const{source:c,highlight:f,targetLine:d,fileName:g,location:m}=cg(async()=>{var I,O,T,P;const h=e==null?void 0:e[a],v=!(h!=null&&h.file);if(v&&!r)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const x=v?r.file:h.file;let E=t.get(x);E||(E={errors:((I=r==null?void 0:r.source)==null?void 0:I.errors)||[],content:(O=r==null?void 0:r.source)==null?void 0:O.content},t.set(x,E));const C=v?r:h,N=v?(r==null?void 0:r.line)||((T=E.errors[0])==null?void 0:T.line)||0:h.line,b=n&&x.startsWith(n)?x.substring(n.length+1):x,S=E.errors.map(J=>({type:"error",line:J.line,message:J.message}));if(S.push({line:N,type:"running"}),((P=r==null?void 0:r.source)==null?void 0:P.content)!==void 0)E.content=r.source.content;else if(E.content===void 0||v){const J=await Y1(x);try{let st=await fetch(`sha1/src@${J}.txt`);st.status===404&&(st=await fetch(`file?path=${encodeURIComponent(x)}`)),st.status>=400?E.content=`<Unable to read "${x}">`:E.content=await st.text()}catch{E.content=`<Unable to read "${x}">`}}return{source:E,highlight:S,targetLine:N,fileName:b,location:C}},[e,a,n,r],{source:{errors:[],content:"Loading…"},highlight:[]}),y=M.useCallback(()=>{m&&(s?s(m):window.location.href=`vscode://file//${m.file}:${m.line}`)},[s,m]),_=((e==null?void 0:e.length)??0)>1,p=Z1(g);return w.jsx(sh,{sidebarSize:200,orientation:i==="bottom"?"vertical":"horizontal",sidebarHidden:!_,main:w.jsxs("div",{className:"vbox","data-testid":"source-code",children:[g&&w.jsxs(Oa,{children:[w.jsx("div",{className:"source-tab-file-name",title:g,children:w.jsx("div",{children:p})}),w.jsx(c0,{description:"Copy filename",value:p}),m&&w.jsx(fn,{icon:"link-external",title:"Open in VS Code",onClick:y})]}),w.jsx(Vs,{text:c.content||"",language:"javascript",highlight:f,revealLine:d,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:w.jsx(J1,{stack:e,selectedFrame:a,setSelectedFrame:u})})};async function Y1(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t),r=[],i=new DataView(n);for(let s=0;s<i.byteLength;s+=1){const o=i.getUint8(s).toString(16).padStart(2,"0");r.push(o)}return r.join("")}function Z1(e){if(!e)return"";const t=e!=null&&e.includes("/")?"/":"\\";return(e==null?void 0:e.split(t).pop())??""}const ww=({sdkLanguage:e,setIsInspecting:t,highlightedLocator:n,setHighlightedLocator:r})=>w.jsxs("div",{className:"vbox",style:{backgroundColor:"var(--vscode-sideBar-background)"},children:[w.jsx("div",{style:{margin:"10px 0px 10px 10px",color:"var(--vscode-editorCodeLens-foreground)",flex:"none"},children:"Locator"}),w.jsx("div",{style:{margin:"0 10px 10px",flex:"auto"},children:w.jsx(Vs,{text:n,language:e,focusOnChange:!0,isFocused:!0,wrapLines:!0,onChange:i=>{r(i),t(!1)}})}),w.jsx("div",{style:{position:"absolute",right:5,top:5},children:w.jsx(fn,{icon:"files",title:"Copy locator",onClick:()=>{fg(n)}})})]});export{gw as A,hw as B,c0 as C,vw as D,v0 as E,yw as F,P0 as G,rw as H,ww as I,aw as J,fg as K,$a as L,uw as M,mw as N,q1 as O,Lh as P,Q1 as Q,et as R,sh as S,fn as T,U1 as U,Up as V,tw as W,_0 as _,iw as a,$o as b,xv as c,sw as d,ow as e,tt as f,Oa as g,ru as h,lw as i,w as j,pg as k,cw as l,Ro as m,dw as n,Fn as o,ws as p,nw as q,M as r,Yt as s,mg as t,ks as u,$0 as v,gg as w,pw as x,Vs as y,fw as z};
|