UNPKG

playwright-core

Version:

A high-level API to automate web browsers

184 lines • 669 kB
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-DzZ7CnBb.js","../codeMirrorModule.-QdMvsKi.css"])))=>i.map(i=>d[i]);
import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./urlMatch-L3liM589.js";var m=Object.create,h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,b=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),x=(e,t)=>{let n={};for(var r in e)h(n,r,{get:e[r],enumerable:!0});return t||h(n,Symbol.toStringTag,{value:`Module`}),n},S=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=_(t),a=0,o=i.length,s;a<o;a++)s=i[a],!y.call(e,s)&&s!==n&&h(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=g(t,s))||r.enumerable});return e},C=(e,t,n)=>(n=e==null?{}:m(v(e)),S(t||!e||!e.__esModule?h(n,`default`,{value:e,enumerable:!0}):n,e)),w=b((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return T(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function D(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function O(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var se=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ce={map:D,forEach:function(e,t,n){D(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return D(e,function(){t++}),t},toArray:function(e){return D(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ce,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ee.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ee.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:O}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,se)}catch(e){se(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),ee=b(((e,t)=>{t.exports=w()})),T=C(ee());function te(e,t,n,r){let[i,a]=T.useState(n);return T.useEffect(()=>{let t=!1;return r!==void 0&&a(r),e().then(e=>{t||a(e)}),()=>{t=!0}},t),i}function E(){let e=T.useRef(null),[t]=ne(e);return[t,e]}function ne(e){let[t,n]=T.useState(new DOMRect(0,0,10,10)),r=T.useCallback(()=>{let t=e?.current;t&&n(t.getBoundingClientRect())},[e]);return T.useLayoutEffect(()=>{let t=e?.current;if(!t)return;r();let n=new ResizeObserver(r);return n.observe(t),window.addEventListener(`resize`,r),()=>{n.disconnect(),window.removeEventListener(`resize`,r)}},[r,e]),[t,r]}function re(e,t,n,r,i){let a=r||0,o=i===void 0?e.length:i;for(;a<o;){let r=a+o>>1;n(t,e[r])>=0?a=r+1:o=r}return o}function ie(e){let t=document.createElement(`textarea`);t.style.position=`absolute`,t.style.zIndex=`-1000`,t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),t.remove()}function ae(e,t){e&&(t=le.getObject(e,t));let[n,r]=T.useState(t),i=T.useCallback(t=>{e?le.setObject(e,t):r(t)},[e,r]);return T.useEffect(()=>{if(e){let n=()=>r(le.getObject(e,t));return le.onChangeEmitter.addEventListener(e,n),()=>le.onChangeEmitter.removeEventListener(e,n)}},[t,e]),[n,i]}var oe=new Map,D=new Map,O;function se(e,t){let[n,r]=T.useState();return D.set(e,{setter:r,defaultValue:t}),[n,T.useCallback(t=>{let n=oe.get(O||`default`)||{};n[e]=t,oe.set(O||`default`,n),r(t)},[e])]}function ce(e){if(O===e)return;O=e;let t=oe.get(e)||{};for(let[e,n]of D.entries())n.setter(t[e]||n.defaultValue)}var le=new class{constructor(){this.onChangeEmitter=new EventTarget}getString(e,t){return localStorage[e]||t}setString(e,t){localStorage[e]=t,this.onChangeEmitter.dispatchEvent(new Event(e)),window.saveSettings?.()}getObject(e,t){if(!localStorage[e])return t;try{return JSON.parse(localStorage[e])}catch{return t}}setObject(e,t){localStorage[e]=JSON.stringify(t),this.onChangeEmitter.dispatchEvent(new Event(e)),window.saveSettings?.()}};function k(...e){return e.filter(Boolean).join(` `)}function ue(e){e&&(e?.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e?.scrollIntoView())}var A=RegExp(`(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s\\u0000-\\u0020\\u007f-\\u009f"]{2,}[^\\s\\u0000-\\u0020\\u007f-\\u009f"')}\\],:;.!?]`,`ug`);function de(){let[e,t]=T.useState(!1);return[e,T.useCallback(()=>{let e=[];return t(n=>(e.push(setTimeout(()=>t(!1),1e3)),n?(e.push(setTimeout(()=>t(!0),50)),!1):!0)),()=>e.forEach(clearTimeout)},[t])]}var fe=`system`,pe=`theme`,me=[{label:`Dark mode`,value:`dark-mode`},{label:`Light mode`,value:`light-mode`},{label:`System`,value:`system`}],he=window.matchMedia(`(prefers-color-scheme: dark)`);function ge(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener(`focus`,e=>{e.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove(`inactive`)},!1),document.defaultView.addEventListener(`blur`,e=>{document.body.classList.add(`inactive`)},!1),ve(xe()),he.addEventListener(`change`,()=>{ve(xe())}))}var _e=new Set;function ve(e){let t=Se(),n=e===`system`?he.matches?`dark-mode`:`light-mode`:e;if(t!==n){t&&document.documentElement.classList.remove(t),document.documentElement.classList.add(n);for(let e of _e)e(n)}}function ye(e){_e.add(e)}function be(e){_e.delete(e)}function xe(){return le.getString(pe,fe)}function Se(){return document.documentElement.classList.contains(`dark-mode`)?`dark-mode`:document.documentElement.classList.contains(`light-mode`)?`light-mode`:null}function Ce(){let[e,t]=T.useState(xe());return T.useEffect(()=>{le.setString(pe,e),ve(e)},[e]),[e,t]}var we=b((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,E());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,ee=-1;function T(){return g?!0:!(e.unstable_now()-ee<w)}function te(){if(g=!1,S){var t=e.unstable_now();ee=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():S=!1}}}var E;if(typeof y==`function`)E=function(){y(te)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=te,E=function(){re.postMessage(null)}}else E=function(){_(te,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,E()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Te=b(((e,t)=>{t.exports=we()})),Ee=b((e=>{var t=ee();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),De=b(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ee()})),Oe=b((e=>{var t=Te(),n=ee(),r=De();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),te=Symbol.for(`react.activity`),E=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case te:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function k(e){return{current:e}}function ue(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function A(e,t){le++,ce[le]=e.current,e.current=t}var de=k(null),fe=k(null),pe=k(null),me=k(null);function he(e,t){switch(A(pe,t),A(fe,e),A(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ue(de),A(de,e)}function ge(){ue(de),ue(fe),ue(pe)}function _e(e){e.memoizedState!==null&&A(me,e);var t=de.current,n=Ud(t,e.type);t!==n&&(A(fe,e),A(de,n))}function ve(e){fe.current===e&&(ue(de),ue(fe)),me.current===e&&(ue(me),Qf._currentValue=se)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
`+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
`),l=s.split(`
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);default:return``}}function Ee(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
Error generating stack: `+e.message+`
`+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,j=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Pe=t.unstable_ImmediatePriority,Fe=t.unstable_UserBlockingPriority,Ie=t.unstable_NormalPriority,Le=t.unstable_LowPriority,Re=t.unstable_IdlePriority,ze=t.log,Be=t.unstable_setDisableYieldValue,Ve=null,He=null;function Ue(e){if(typeof ze==`function`&&Be(e),He&&typeof He.setStrictMode==`function`)try{He.setStrictMode(Ve,e)}catch{}}var We=Math.clz32?Math.clz32:qe,Ge=Math.log,Ke=Math.LN2;function qe(e){return e>>>=0,e===0?32:31-(Ge(e)/Ke|0)|0}var Je=256,Ye=262144,Xe=4194304;function Ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ze(n))):i=Ze(o):i=Ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ze(n))):i=Ze(o)):i=Ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tt(){var e=Xe;return Xe<<=1,!(Xe&62914560)&&(Xe=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-We(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&at(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function at(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-We(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ot(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-We(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function st(e,t){var n=t&-t;return n=n&42?1:ct(n),(n&(e.suspendedLanes|t))===0?n:0}function ct(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function lt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ut(){var e=O.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function dt(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var ft=Math.random().toString(36).slice(2),pt=`__reactFiber$`+ft,mt=`__reactProps$`+ft,ht=`__reactContainer$`+ft,gt=`__reactEvents$`+ft,_t=`__reactListeners$`+ft,vt=`__reactHandles$`+ft,yt=`__reactResources$`+ft,bt=`__reactMarker$`+ft;function xt(e){delete e[pt],delete e[mt],delete e[gt],delete e[_t],delete e[vt]}function St(e){var t=e[pt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ht]||n[pt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[pt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function Ct(e){if(e=e[pt]||e[ht]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Tt(e){var t=e[yt];return t||=e[yt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Et(e){e[bt]=!0}var Dt=new Set,Ot={};function kt(e,t){At(e,t),At(e+`Capture`,t)}function At(e,t){for(Ot[e]=t,e=0;e<t.length;e++)Dt.add(t[e])}var jt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Mt={},Nt={};function Pt(e){return Oe.call(Nt,e)?!0:Oe.call(Mt,e)?!1:jt.test(e)?Nt[e]=!0:(Mt[e]=!0,!1)}function Ft(e,t,n){if(Pt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function It(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Lt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Rt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Bt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vt(e){if(!e._valueTracker){var t=zt(e)?`checked`:`value`;e._valueTracker=Bt(e,t,``+e[t])}}function Ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=zt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ut(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Wt=/[\n"\\]/g;function Gt(e){return e.replace(Wt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Kt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Rt(t)):e.value!==``+Rt(t)&&(e.value=``+Rt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Jt(e,o,Rt(n)):Jt(e,o,Rt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Rt(s):e.removeAttribute(`name`)}function qt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Vt(e);return}n=n==null?``:``+Rt(n),t=t==null?n:``+Rt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Vt(e)}function Jt(e,t,n){t===`number`&&Ut(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Yt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Rt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Xt(e,t,n){if(t!=null&&(t=``+Rt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Rt(n)}function Zt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(oe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Rt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Vt(e)}function Qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $t=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function en(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||$t.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function tn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&en(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&en(e,o,t[o])}function nn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var rn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),an=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function on(e){return an.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function sn(){}var cn=null;function ln(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var un=null,dn=null;function fn(e){var t=Ct(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Kt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Gt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[mt]||null;if(!a)throw Error(i(90));Kt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ht(r)}break a;case`textarea`:Xt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Yt(e,!!n.multiple,t,!1)}}}var pn=!1;function mn(e,t,n){if(pn)return e(t,n);pn=!0;try{return e(t)}finally{if(pn=!1,(un!==null||dn!==null)&&(Cu(),un&&(t=un,e=dn,dn=un=null,fn(t),e)))for(t=0;t<e.length;t++)fn(e[t])}}function hn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[mt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var gn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),_n=!1;if(gn)try{var vn={};Object.defineProperty(vn,"passive",{get:function(){_n=!0}}),window.addEventListener(`test`,vn,vn),window.removeEventListener(`test`,vn,vn)}catch{_n=!1}var yn=null,bn=null,xn=null;function M(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in yn?yn.value:yn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return xn=i.slice(e,1<r?1-r:void 0)}function Sn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Cn(){return!0}function wn(){return!1}function Tn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Cn:wn,this.isPropagationStopped=wn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Cn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Cn)},persist:function(){},isPersistent:Cn}),t}var En={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dn=Tn(En),On=f({},En,{view:0,detail:0}),kn=Tn(On),An,jn,Mn,N=f({},On,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Un,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Mn&&(Mn&&e.type===`mousemove`?(An=e.screenX-Mn.screenX,jn=e.screenY-Mn.screenY):jn=An=0,Mn=e),An)},movementY:function(e){return`movementY`in e?e.movementY:jn}}),Nn=Tn(N),Pn=Tn(f({},N,{dataTransfer:0})),Fn=Tn(f({},On,{relatedTarget:0})),In=Tn(f({},En,{animationName:0,elapsedTime:0,pseudoElement:0})),Ln=Tn(f({},En,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Rn=Tn(f({},En,{data:0})),zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Bn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Vn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Hn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vn[e])?!!t[e]:!1}function Un(){return Hn}var Wn=Tn(f({},On,{key:function(e){if(e.key){var t=zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Sn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Bn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Un,charCode:function(e){return e.type===`keypress`?Sn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Sn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Gn=Tn(f({},N,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Kn=Tn(f({},On,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Un})),qn=Tn(f({},En,{propertyName:0,elapsedTime:0,pseudoElement:0})),Jn=Tn(f({},N,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Yn=Tn(f({},En,{newState:0,oldState:0})),Xn=[9,13,27,32],Zn=gn&&`CompositionEvent`in window,Qn=null;gn&&`documentMode`in document&&(Qn=document.documentMode);var $n=gn&&`TextEvent`in window&&!Qn,er=gn&&(!Zn||Qn&&8<Qn&&11>=Qn),tr=` `,nr=!1;function rr(e,t){switch(e){case`keyup`:return Xn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ir(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ar=!1;function or(e,t){switch(e){case`compositionend`:return ir(t);case`keypress`:return t.which===32?(nr=!0,tr):null;case`textInput`:return e=t.data,e===tr&&nr?null:e;default:return null}}function sr(e,t){if(ar)return e===`compositionend`||!Zn&&rr(e,t)?(e=M(),xn=bn=yn=null,ar=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return er&&t.locale!==`ko`?null:t.data;default:return null}}var cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!cr[e.type]:t===`textarea`}function ur(e,t,n,r){un?dn?dn.push(r):dn=[r]:un=r,t=Od(t,`onChange`),0<t.length&&(n=new Dn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var dr=null,fr=null;function pr(e){xd(e,0)}function mr(e){if(Ht(wt(e)))return e}function hr(e,t){if(e===`change`)return t}var gr=!1;if(gn){var _r;if(gn){var vr=`oninput`in document;if(!vr){var yr=document.createElement(`div`);yr.setAttribute(`oninput`,`return;`),vr=typeof yr.oninput==`function`}_r=vr}else _r=!1;gr=_r&&(!document.documentMode||9<document.documentMode)}function br(){dr&&(dr.detachEvent(`onpropertychange`,xr),fr=dr=null)}function xr(e){if(e.propertyName===`value`&&mr(fr)){var t=[];ur(t,fr,e,ln(e)),mn(pr,t)}}function Sr(e,t,n){e===`focusin`?(br(),dr=t,fr=n,dr.attachEvent(`onpropertychange`,xr)):e===`focusout`&&br()}function Cr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return mr(fr)}function wr(e,t){if(e===`click`)return mr(t)}function Tr(e,t){if(e===`input`||e===`change`)return mr(t)}function Er(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Dr=typeof Object.is==`function`?Object.is:Er;function Or(e,t){if(Dr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Oe.call(t,i)||!Dr(e[i],t[i]))return!1}return!0}function kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ar(e,t){var n=kr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=kr(n)}}function jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ut(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ut(e.document)}return t}function Nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Pr=gn&&`documentMode`in document&&11>=document.documentMode,Fr=null,Ir=null,Lr=null,Rr=!1;function zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rr||Fr==null||Fr!==Ut(r)||(r=Fr,`selectionStart`in r&&Nr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Lr&&Or(Lr,r)||(Lr=r,r=Od(Ir,`onSelect`),0<r.length&&(t=new Dn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Fr)))}function Br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Vr={animationend:Br(`Animation`,`AnimationEnd`),animationiteration:Br(`Animation`,`AnimationIteration`),animationstart:Br(`Animation`,`AnimationStart`),transitionrun:Br(`Transition`,`TransitionRun`),transitionstart:Br(`Transition`,`TransitionStart`),transitioncancel:Br(`Transition`,`TransitionCancel`),transitionend:Br(`Transition`,`TransitionEnd`)},Hr={},Ur={};gn&&(Ur=document.createElement(`div`).style,`AnimationEvent`in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),`TransitionEvent`in window||delete Vr.transitionend.transition);function Wr(e){if(Hr[e])return Hr[e];if(!Vr[e])return e;var t=Vr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ur)return Hr[e]=t[n];return e}var Gr=Wr(`animationend`),Kr=Wr(`animationiteration`),qr=Wr(`animationstart`),Jr=Wr(`transitionrun`),Yr=Wr(`transitionstart`),Xr=Wr(`transitioncancel`),Zr=Wr(`transitionend`),Qr=new Map,$r=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);$r.push(`scrollEnd`);function ei(e,t){Qr.set(e,t),kt(t,[e])}var ti=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ni=[],ri=0,ii=0;function ai(){for(var e=ri,t=ii=ri=0;t<e;){var n=ni[t];ni[t++]=null;var r=ni[t];ni[t++]=null;var i=ni[t];ni[t++]=null;var a=ni[t];if(ni[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&li(n,i,a)}}function oi(e,t,n,r){ni[ri++]=e,ni[ri++]=t,ni[ri++]=n,ni[ri++]=r,ii|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function si(e,t,n,r){return oi(e,t,n,r),ui(e)}function ci(e,t){return oi(e,null,null,t),ui(e)}function li(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-We(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ui(e){if(50<q)throw q=0,hu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var di={};function fi(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.refCleanup=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 pi(e,t,n,r){return new fi(e,t,n,r)}function mi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hi(e,t){var n=e.alternate;return n===null?(n=pi(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&65011712,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.refCleanup=e.refCleanup,n}function gi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _i(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)mi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,de.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case te:return e=pi(31,n,t,a),e.elementType=te,e.lanes=o,e;case g:return vi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=pi(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=pi(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=pi(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=pi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function vi(e,t,n,r){return e=pi(7,e,r,t),e.lanes=n,e}function yi(e,t,n){return e=pi(6,e,null,t),e.lanes=n,e}function bi(e){var t=pi(18,null,null,0);return t.stateNode=e,t}function xi(e,t,n){return t=pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Si=new WeakMap;function Ci(e,t){if(typeof e==`object`&&e){var n=Si.get(e);return n===void 0?(t={value:e,source:t,stack:Ee(t)},Si.set(e,t),t):n}return{value:e,source:t,stack:Ee(t)}}var wi=[],Ti=0,Ei=null,Di=0,Oi=[],ki=0,Ai=null,ji=1,Mi=``;function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Ei,Ei=e,Di=t}function Pi(e,t,n){Oi[ki++]=ji,Oi[ki++]=Mi,Oi[ki++]=Ai,Ai=e;var r=ji;e=Mi;var i=32-We(r)-1;r&=~(1<<i),n+=1;var a=32-We(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ji=1<<32-We(t)+i|n<<i|r,Mi=a+e}else ji=1<<a|n<<i|r,Mi=e}function Fi(e){e.return!==null&&(Ni(e,1),Pi(e,1,0))}function Ii(e){for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null;for(;e===Ai;)Ai=Oi[--ki],Oi[ki]=null,Mi=Oi[--ki],Oi[ki]=null,ji=Oi[--ki],Oi[ki]=null}function Li(e,t){Oi[ki++]=ji,Oi[ki++]=Mi,Oi[ki++]=Ai,ji=t.id,Mi=t.overflow,Ai=e}var Ri=null,P=null,F=!1,zi=null,Bi=!1,Vi=Error(i(519));function Hi(e){throw Ji(Ci(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Vi}function Ui(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[pt]=e,t[mt]=r,n){case`dialog`:X(`cancel`,t),X(`close`,t);break;case`iframe`:case`object`:case`embed`:X(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)X(yd[n],t);break;case`source`:X(`error`,t);break;case`img`:case`image`:case`link`:X(`error`,t),X(`load`,t);break;case`details`:X(`toggle`,t);break;case`input`:X(`invalid`,t),qt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:X(`invalid`,t);break;case`textarea`:X(`invalid`,t),Zt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(X(`beforetoggle`,t),X(`toggle`,t)),r.onScroll!=null&&X(`scroll`,t),r.onScrollEnd!=null&&X(`scrollend`,t),r.onClick!=null&&(t.onclick=sn),t=!0):t=!1,t||Hi(e,!0)}function Wi(e){for(Ri=e.return;Ri;)switch(Ri.tag){case 5:case 31:case 13:Bi=!1;return;case 27:case 3:Bi=!0;return;default:Ri=Ri.return}}function Gi(e){if(e!==Ri)return!1;if(!F)return Wi(e),F=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&P&&Hi(e),Wi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));P=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));P=uf(e)}else t===27?(t=P,Qd(e.type)?(e=lf,lf=null,P=e):P=t):P=Ri?cf(e.stateNode.nextSibling):null;return!0}function Ki(){P=Ri=null,F=!1}function qi(){var e=zi;return e!==null&&(tu===null?tu=e:tu.push.apply(tu,e),zi=null),e}function Ji(e){zi===null?zi=[e]:zi.push(e)}var Yi=k(null),Xi=null,Zi=null;function Qi(e,t,n){A(Yi,t._currentValue),t._currentValue=n}function $i(e){e._currentValue=Yi.current,ue(Yi)}function ea(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ta(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ea(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ea(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function na(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Dr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ta(t,e,n,r),t.flags|=262144}function ra(e){for(e=e.firstContext;e!==null;){if(!Dr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ia(e){Xi=e,Zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return sa(Xi,e)}function oa(e,t){return Xi===null&&ia(e),sa(e,t)}function sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zi===null){if(e===null)throw Error(i(308));Zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zi=Zi.next=t;return n}var ca=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},la=t.unstable_scheduleCallback,ua=t.unstable_NormalPriority,da={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fa(){return{controller:new ca,data:new Map,refCount:0}}function pa(e){e.refCount--,e.refCount===0&&la(ua,function(){e.controller.abort()})}var ma=null,ha=0,ga=0,_a=null;function va(e,t){if(ma===null){var n=ma=[];ha=0,ga=pd(),_a={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ha++,t.then(ya,ya),t}function ya(){if(--ha===0&&ma!==null){_a!==null&&(_a.status=`fulfilled`);var e=ma;ma=null,ga=0,_a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ba(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var xa=D.S;D.S=function(e,t){iu=j(),typeof t==`object`&&t&&typeof t.then==`function`&&va(e,t),xa!==null&&xa(e,t)};var Sa=k(null);function Ca(){var e=Sa.current;return e===null?H.pooledCache:e}function wa(e,t){t===null?A(Sa,Sa.current):A(Sa,t.pool)}function Ta(){var e=Ca();return e===null?null:{parent:da._currentValue,pool:e}}var Ea=Error(i(460)),Da=Error(i(474)),Oa=Error(i(542)),ka={then:function(){}};function Aa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(sn,sn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e;default:if(typeof t.status==`string`)t.then(sn,sn);else{if(e=H,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e}throw Na=t,Ea}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Na=e,Ea):e}}var Na=null;function Pa(){if(Na===null)throw Error(i(459));var e=Na;return Na=null,e}function Fa(e){if(e===Ea||e===Oa)throw Error(i(483))}var Ia=null,La=0;function Ra(e){var t=La;return La+=1,Ia===null&&(Ia=[]),ja(Ia,e,t)}function za(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ba(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Va(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=hi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=yi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ma(i)===t.type)?(t=a(t,n.props),za(t,n),t.return=e,t):(t=_i(n.type,n.key,n.props,null,e.mode,r),za(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=xi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=vi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=yi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=_i(t.type,t.key,t.props,null,e.mode,n),za(n,t),n.return=e,n;case h:return t=xi(t,e.mode,n),t.return=e,t;case T:return t=Ma(t),f(e,t,n)}if(oe(t)||re(t))return t=vi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ra(t),n);if(t.$$typeof===b)return f(e,oa(e,t),n);Ba(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ma(n),p(e,t,n,r)}if(oe(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ra(n),r);if(n.$$typeof===b)return p(e,t,oa(e,n),r);Ba(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ma(r),_(e,t,n,r,i)}if(oe(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ra(r),i);if(r.$$typeof===b)return _(e,t,n,oa(t,r),i);Ba(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),F&&Ni(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return F&&Ni(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),F&&Ni(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),F&&Ni(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return F&&Ni(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),F&&Ni(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),za(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=vi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=_i(o.type,o.key,o.props,null,e.mode,c),za(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=xi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ma(o),x(e,r,o,c)}if(oe(o))return v(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ra(o),c);if(o.$$typeof===b)return x(e,r,oa(e,o),c);Ba(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=yi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=x(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function I(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,V&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ui(e),li(e,null,n),t}return oi(e,r,t,n),ui(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=_a;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Wa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(W&p)===p:(r&p)===p){p!==0&&p===ga&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Wa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Yl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=k(null),no=k(0);function ro(e,t){e=Jl,A(no,e),A(to,t),Jl=e|t.baseLanes}function io(){A(no,Jl),A(to,to.current)}function ao(){Jl=no.current,ue(to),ue(no)}var oo=k(null),so=null;function co(e){var t=e.alternate;A(mo,mo.current&1),A(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){A(mo,mo.current),A(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(A(mo,mo.current),A(oo,e),so===null&&(so=e)):fo(e)}function fo(){A(mo,mo.current),A(oo,oo.current)}function po(e){ue(oo),so===e&&(so=null),ue(mo)}var mo=k(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)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 go=0,L=null,R=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function z(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Us:Ws,bo=!1,a=n(r,i),bo=!1,yo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){D.H=Hs;var t=R!==null&&R.next!==null;if(go=0,_o=R=L=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&ra(e)&&(sc=!0))}function Oo(e,t,n,r){L=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=R=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Gs,o=t(n,r)}while(yo);return o}function ko(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(R===null?null:R.memoizedState)!==e&&(L.flags|=1024),t}function Ao(){var e=xo!==0;return xo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}go=0,_o=R=L=null,yo=!1,So=xo=0,Co=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?L.memoizedState=_o=e:_o=_o.next=e,_o}function Po(){if(R===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=R.next;var t=_o===null?L.memoizedState:_o.next;if(t!==null)_o=t,R=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));R=e,e={memoizedState:R.memoizedState,baseState:R.baseState,baseQueue:R.baseQueue,queue:R.queue,next:null},_o===null?L.memoizedState=_o=e:_o=_o.next=e}return _o}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=So;return So+=1,Co===null&&(Co=[]),e=ja(Co,e,t),t=L,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===b)return aa(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),L.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=E;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),R,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(W&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ga&&(d=!0);else if((go&p)===p){u=u.next,p===ga&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,L.lanes|=p,Yl|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,L.lanes|=f,Yl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Dr(o,e.memoizedState)&&(sc=!0,d&&(n=_a,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Dr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=L,a=Po(),o=F;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Dr((R||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),H===null)throw Error(i(349));o||go&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Fo(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dr(e,n)}catch{return!0}}function Jo(e){var t=ci(e,2);t!==null&&vu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),bo){Ue(!0);try{n()}finally{Ue(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,R,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(F){var n=H.formState;if(n!==null){a:{var r=L;if(F){if(P){b:{for(var i=P,a=Bi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){P=cf(i.nextSibling),r=i.data===`F!`;break a}}Hi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,L,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,L,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),R,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Ea?Oa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=R;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Fo(),L.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();L.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;R!==null&&r!==null&&To(r,R.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(L.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Fo(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(V&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),bo){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||go&1073741824&&!(W&261930)?e.memoizedState=t:(e.memoizedState=n,e=_u(),L.lanes|=e,Yl|=e,n)}function Ts(e,t,n,r){return Dr(n,t)?n:to.current===null?!(go&42)||go&1073741824&&!(W&261930)?(sc=!0,e.memoizedState=n):(e=_u(),L.lanes|=e,Yl|=e,t):(e=ws(e,n,r),Dr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Rs(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ba(c,r),gu(e)):Ls(e,t,r,gu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,se,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},gu())}function js(){return aa(Qf)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=I(n);var r=qa(t,e,n);r!==null&&(vu(r,t,n),Ja(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=si(e,t,n,r),n!==null&&(vu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,gu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Dr(s,o))return oi(e,t,i,0),H===null&&ai(),!1}catch{}if(n=si(e,t,i,r),n!==null)return vu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=si(e,n,r,2),t!==null&&vu(t,e,2)}function zs(e){var t=e.alternate;return e===L||t!==null&&t===L}function Bs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Hs={readContext:aa,use:Lo,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Hs.useEffectEvent=z;var Us={readContext:aa,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(bo){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(bo){Ue(!0);try{n(t)}finally{Ue(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,L,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=No();if(F){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),H===null)throw Error(i(349));W&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=H.identifierPrefix;if(F){var n=Mi,r=ji;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,L)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(V&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:aa,use:Lo,useCallback:Ss,useContext:aa,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),R.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),R,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:aa,use:Lo,useCallback:Ss,useContext:aa,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return R===null?ws(n,e,t):Ts(n,R.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return R===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,R,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gu(),i=I(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(vu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gu(),i=I(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(vu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gu(),r=I(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(vu(t,e,n),Ja(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Or(n,r)||!Or(i,a):!0}function Ys(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&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){ti(e)}function Qs(e){console.error(e)}function $s(e){ti(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=I(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=I(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&na(t,n,a,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?Au():n.alternate===null&&K===0&&(K=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),qu(e,r,a)),!1;case 22:return n.flags|=65536,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),qu(e,r,a)),!1}throw Error(i(435,n.tag))}return qu(e,r,a),Au(),!1}if(F)return t=oo.current,t===null?(r!==Vi&&(t=Error(i(423),{cause:r}),Ji(Ci(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ci(r,n),a=nc(e.stateNode,r,a),Ya(e,a),K!==4&&(K=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Vi&&(e=Error(i(422),{cause:r}),Ji(Ci(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ci(o,n),eu===null?eu=[o]:eu.push(o),K!==4&&(K=2),t===null)return!0;r=Ci(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(su===null||!su.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ya(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?Ua(t,null,n,r):Ha(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ia(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(F&&s&&Fi(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!mi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=_i(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Or:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=hi(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Or(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wa(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&wa(t,null),io(),fo(t)):(wa(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=Ca();return a=a===null?null:{parent:da._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&wa(t,null),io(),uo(t),e!==null&&na(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ha(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(F){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(lo(t),(e=P)?(e=rf(e,Bi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai===null?null:{id:ji,overflow:Mi},retryLane:536870912,hydrationErrors:null},n=bi(e),n.return=t,t.child=n,Ri=t,P=null)):e=null,e===null)throw Hi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(lo(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||na(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=H,r!==null&&(s=st(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ci(e,s),vu(r,e,s),oc;Au(),t=gc(e,t,n)}else e=o.treeContext,P=cf(s.nextSibling),Ri=t,F=!0,zi=null,Bi=!1,e!==null&&Li(t,e),t=hc(t,r),t.flags|=4096;return t}return e=hi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return ia(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(F&&r&&Fi(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return ia(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(F&&r&&Fi(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(ia(t),t.stateNode===null){var a=di,o=n.contextType;typeof o==`object`&&o&&(a=aa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ga(t),o=n.contextType,a.context=typeof o==`object`&&o?aa(o):di,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=di,typeof u==`object`&&u&&(o=aa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Wa=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Wa?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Wa||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ka(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=di,typeof l==`object`&&l&&(c=aa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Wa=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Wa||e!==null&&e.dependencies!==null&&ra(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Wa||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ra(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ha(t,e.child,null,i),t.child=Ha(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Ki(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:Ta()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(mo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(F){if(a?co(t):fo(t),(e=P)?(e=rf(e,Bi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai===null?null:{id:ji,overflow:Mi},retryLane:536870912,hydrationErrors:null},n=bi(e),n.return=t,t.child=n,Ri=t,P=null)):e=null,e===null)throw Hi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(fo(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=vi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(co(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(co(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=vi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ha(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ji({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||na(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=H,s!==null&&(r=st(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ci(e,r),vu(s,e,r),oc;af(c)||Au(),t=kc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,P=cf(c.nextSibling),Ri=t,F=!0,zi=null,Bi=!1,e!==null&&Li(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(fo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=hi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=vi(c,a,n,null),c.flags|=2):c=hi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=Ta():(l=da._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=hi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=pi(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ha(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ea(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=mo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,A(mo,o),cc(e,t,r,n),r=F?Di:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(na(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=hi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=hi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ra(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:he(t,t.stateNode.containerInfo),Qi(t,da,e.memoizedState.cache),Ki();break;case 27:case 5:_e(t);break;case 4:he(t,t.stateNode.containerInfo);break;case 10:Qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(na(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(mo,mo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Qi(t,da,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,F&&t.flags&1048576&&Pi(t,Di,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e==`function`)mi(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ae(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ka(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Qi(t,da,r),r!==o.cache&&ta(t,[da],n,!0),Za(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=Ci(Error(i(424)),t),Ji(a),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(P=cf(e.firstChild),Ri=t,F=!0,zi=null,Bi=!0,n=Ua(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ki(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:F||(n=t.type,e=t.pendingProps,r=Vd(pe.current).createElement(n),r[pt]=t,r[mt]=e,Fd(r,n,e),Et(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&F&&(r=t.stateNode=ff(t.type,t.pendingProps,pe.current),Ri=t,Bi=!0,a=P,Qd(t.type)?(lf=a,P=cf(r.firstChild)):P=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&F&&((a=r=P)&&(r=$(r,t.type,t.pendingProps,Bi),r===null?a=!1:(t.stateNode=r,Ri=t,P=cf(r.firstChild),Bi=!1,a=!0)),a||Hi(t)),_e(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&F&&((e=n=P)&&(n=nf(n,t.pendingProps,Bi),n===null?e=!1:(t.stateNode=n,Ri=t,P=null,e=!0)),e||Hi(t)),null;case 13:return Ec(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ha(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Qi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ia(t),a=aa(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ia(t),r=aa(da),e===null?(a=Ca(),a===null&&(a=H,o=fa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ga(t),Qi(t,da,a)):((e.lanes&n)!==0&&(Ka(e,t),Qa(t,null,null,n),Za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Qi(t,da,r),r!==a.cache&&ta(t,[da],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Qi(t,da,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Du())e.flags|=8192;else throw Na=ka,Da}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Du())e.flags|=8192;else throw Na=ka,Da}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:tt(),e.lanes|=t,$l|=t)}function Vc(e,t){if(!F)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 B(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&65011712,r|=i.flags&65011712,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 Hc(e,t,n){var r=t.pendingProps;switch(Ii(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return B(t),null;case 1:return B(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),$i(da),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qi())),B(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(B(t),Rc(t,a,null,r,n)):(B(t),zc(t,o))):o?o===e.memoizedState?(B(t),t.flags&=-16777217):(Lc(t),B(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),B(t),Rc(t,a,e,r,n)),null;case 27:if(ve(t),n=pe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}e=de.current,Gi(t)?Ui(t,e):(e=ff(a,r,n),t.stateNode=e,Lc(t))}return B(t),null;case 5:if(ve(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}if(o=de.current,Gi(t))Ui(t,o);else{var s=Vd(pe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[pt]=t,o[mt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return B(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=pe.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ri,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Hi(t,!0)}else e=Vd(e).createTextNode(r),e[pt]=t,t.stateNode=e}return B(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[pt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return B(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[pt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),B(t),null);case 4:return ge(),e===null&&wd(t.stateNode.containerInfo),B(t),null;case 10:return $i(t.type),B(t),null;case 19:if(ue(mo),r=t.memoizedState,r===null)return B(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(K!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)gi(n,e),n=n.sibling;return A(mo,mo.current&1|2),F&&Ni(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&j()>au&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!F)return B(t),null}else 2*j()-r.renderingStartTime>au&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(B(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=j(),e.sibling=null,n=mo.current,A(mo,a?n&1|2:n&1),F&&Ni(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(B(t),t.subtreeFlags&6&&(t.flags|=8192)):B(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ue(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(da),B(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Uc(e,t){switch(Ii(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(da),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(mo),null;case 4:return ge(),null;case 10:return $i(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&ue(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(da),null;case 25:return null;default:return null}}function Wc(e,t){switch(Ii(t),t.tag){case 3:$i(da),ge();break;case 26:case 27:case 5:ve(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:ue(mo);break;case 10:$i(t.type);break;case 22:case 23:po(t),ao(),e!==null&&ue(Sa);break;case 24:$i(da)}}function Gc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Y(t,t.return,e)}}function Kc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Y(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Y(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Y(e,e.return,t)}}}function Jc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Y(e,t,n)}}function Yc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Y(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Y(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Y(e,t,n)}else n.current=null}function Zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Y(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[mt]=t}catch(t){Y(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sn));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(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&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[pt]=e,t[mt]=n}catch(t){Y(e,e.return,t)}}var il=!1,al=!1,ol=!1,sl=typeof WeakSet==`function`?WeakSet:Set,cl=null;function ll(e,t){if(e=e.containerInfo,zd=sp,e=Mr(e),Nr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},sp=!1,cl=t;cl!==null;)if(t=cl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,cl=e;else for(;cl!==null;){switch(t=cl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Y(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,cl=e;break}cl=t.return}}function ul(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Tl(e,n),r&4&&Gc(5,n);break;case 1:if(Tl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Y(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Y(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(Tl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{eo(e,t)}catch(e){Y(n,n.return,e)}}break;case 27:t===null&&r&4&&rl(n);case 26:case 5:Tl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:Tl(e,n);break;case 31:Tl(e,n),r&4&&gl(e,n);break;case 13:Tl(e,n),r&4&&_l(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||il,!r){t=t!==null&&t.memoizedState!==null||al,i=il;var a=al;il=r,(al=t)&&!a?Dl(e,n,(n.subtreeFlags&8772)!=0):Tl(e,n),il=i,al=a}break;case 30:break;default:Tl(e,n)}}function dl(e){var t=e.alternate;t!==null&&(e.alternate=null,dl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&xt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var fl=null,pl=!1;function ml(e,t,n){for(n=n.child;n!==null;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(He&&typeof He.onCommitFiberUnmount==`function`)try{He.onCommitFiberUnmount(Ve,n)}catch{}switch(n.tag){case 26:al||Xc(n,t),ml(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:al||Xc(n,t);var r=fl,i=pl;Qd(n.type)&&(fl=n.stateNode,pl=!1),ml(e,t,n),pf(n.stateNode),fl=r,pl=i;break;case 5:al||Xc(n,t);case 6:if(r=fl,i=pl,fl=null,ml(e,t,n),fl=r,pl=i,fl!==null)if(pl)try{(fl.nodeType===9?fl.body:fl.nodeName===`HTML`?fl.ownerDocument.body:fl).removeChild(n.stateNode)}catch(e){Y(n,t,e)}else try{fl.removeChild(n.stateNode)}catch(e){Y(n,t,e)}break;case 18:fl!==null&&(pl?(e=fl,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):$d(fl,n.stateNode));break;case 4:r=fl,i=pl,fl=n.stateNode.containerInfo,pl=!0,ml(e,t,n),fl=r,pl=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),al||Kc(4,n,t),ml(e,t,n);break;case 1:al||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:al=(r=al)||n.memoizedState!==null,ml(e,t,n),al=r;break;default:ml(e,t,n)}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Y(t,t.return,e)}}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Y(t,t.return,e)}}function vl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sl),t;default:throw Error(i(435,e.tag))}}function yl(e,t){var n=vl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Zu.bind(null,e,t);t.then(r,r)}})}function bl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){fl=c.stateNode,pl=!1;break a}break;case 5:fl=c.stateNode,pl=!1;break a;case 3:case 4:fl=c.stateNode.containerInfo,pl=!0;break a}c=c.return}if(fl===null)throw Error(i(160));hl(o,s,a),fl=null,pl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var xl=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(t,e),Cl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),r&64&&il&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=xl;if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[bt]||o[pt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[pt]=e,Et(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[pt]=e,Et(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),e.flags&32){a=e.stateNode;try{Qt(a,``)}catch(t){Y(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(ol=!0);break;case 6:if(bl(t,e),Cl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Y(e,e.return,t)}}break;case 3:if(Bf=null,a=xl,xl=gf(t.containerInfo),bl(t,e),xl=a,Cl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Y(e,e.return,t)}ol&&(ol=!1,wl(e));break;case 4:r=xl,xl=gf(e.stateNode.containerInfo),bl(t,e),Cl(e),xl=r;break;case 12:bl(t,e),Cl(e);break;case 31:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 13:bl(t,e),Cl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ru=j()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=il,d=al;if(il=u||a,al=d||l,bl(t,e),al=d,il=u,Cl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||il||al||El(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Y(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Y(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){Y(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,yl(e,n))));break;case 19:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 30:break;case 21:break;default:bl(t,e),Cl(e)}}function Cl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;nl(e,el(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Qt(o,``),n.flags&=-33),nl(e,el(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;tl(e,el(e),s);break;default:throw Error(i(161))}}catch(t){Y(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ul(e,t.alternate,t),t=t.sibling}function El(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),El(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),El(t);break;case 27:pf(t.stateNode);case 26:case 5:Xc(t,t.return),El(t);break;case 22:t.memoizedState===null&&El(t);break;case 30:El(t);break;default:El(t)}e=e.sibling}}function Dl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Dl(i,a,n),Gc(4,a);break;case 1:if(Dl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Y(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)$a(c[i],s)}catch(e){Y(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:rl(a);case 26:case 5:Dl(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:Dl(i,a,n);break;case 31:Dl(i,a,n),n&&o&4&&gl(i,a);break;case 13:Dl(i,a,n),n&&o&4&&_l(i,a);break;case 22:a.memoizedState===null&&Dl(i,a,n),Yc(a,a.return);break;case 30:break;default:Dl(i,a,n)}t=t.sibling}}function Ol(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&pa(n))}function kl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e))}function Al(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jl(e,t,n,r),t=t.sibling}function jl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Al(e,t,n,r),i&2048&&Gc(9,t);break;case 1:Al(e,t,n,r);break;case 3:Al(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e)));break;case 12:if(i&2048){Al(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Y(t,t.return,e)}}else Al(e,t,n,r);break;case 31:Al(e,t,n,r);break;case 13:Al(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Al(e,t,n,r):(a._visibility|=2,Ml(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Al(e,t,n,r):Nl(e,t),i&2048&&Ol(o,t);break;case 24:Al(e,t,n,r),i&2048&&kl(t.alternate,t);break;default:Al(e,t,n,r)}}function Ml(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ml(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ml(a,o,s,c,i)):u._visibility&2?Ml(a,o,s,c,i):Nl(a,o),i&&l&2048&&Ol(o.alternate,o);break;case 24:Ml(a,o,s,c,i),i&&l&2048&&kl(o.alternate,o);break;default:Ml(a,o,s,c,i)}t=t.sibling}}function Nl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Nl(n,r),i&2048&&Ol(r.alternate,r);break;case 24:Nl(n,r),i&2048&&kl(r.alternate,r);break;default:Nl(n,r)}t=t.sibling}}var Pl=8192;function Fl(e,t,n){if(e.subtreeFlags&Pl)for(e=e.child;e!==null;)Il(e,t,n),e=e.sibling}function Il(e,t,n){switch(e.tag){case 26:Fl(e,t,n),e.flags&Pl&&e.memoizedState!==null&&Gf(n,xl,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,n);break;case 3:case 4:var r=xl;xl=gf(e.stateNode.containerInfo),Fl(e,t,n),xl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pl,Pl=16777216,Fl(e,t,n),Pl=r):Fl(e,t,n));break;default:Fl(e,t,n)}}function Ll(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Vl(r,e)}Ll(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zl(e),e=e.sibling}function zl(e){switch(e.tag){case 0:case 11:case 15:Rl(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Rl(e);break;case 12:Rl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bl(e)):Rl(e);break;default:Rl(e)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Vl(r,e)}Ll(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),Bl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bl(t));break;default:Bl(t)}e=e.sibling}}function Vl(e,t){for(;cl!==null;){var n=cl;switch(n.tag){case 0:case 11:case 15:Kc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cl=r;else a:for(n=e;cl!==null;){r=cl;var i=r.sibling,a=r.return;if(dl(r),r===n){cl=null;break a}if(i!==null){i.return=a,cl=i;break a}cl=a}}}var Hl={getCacheForType:function(e){var t=aa(da),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return aa(da).controller.signal}},Ul=typeof WeakMap==`function`?WeakMap:Map,V=0,H=null,U=null,W=0,G=0,Wl=null,Gl=!1,Kl=!1,ql=!1,Jl=0,K=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=null,tu=null,nu=!1,ru=0,iu=0,au=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,q=0,hu=null;function gu(){return V&2&&W!==0?W&-W:D.T===null?ut():pd()}function _u(){if(Ql===0)if(!(W&536870912)||F){var e=Ye;Ye<<=1,!(Ye&3932160)&&(Ye=262144),Ql=e}else Ql=536870912;return e=oo.current,e!==null&&(e.flags|=32),Ql}function vu(e,t,n){(e===H&&(G===2||G===9)||e.cancelPendingCommit!==null)&&(Tu(e,0),Su(e,W,Ql,!1)),rt(e,n),(!(V&2)||e!==H)&&(e===H&&(!(V&2)&&(Xl|=n),K===4&&Su(e,W,Ql,!1)),ad(e))}function yu(e,t,n){if(V&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||$e(e,t),a=r?Nu(e,t):ju(e,t,!0),o=r;do{if(a===0){Kl&&!r&&Su(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!xu(n)){a=ju(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=eu;var l=c.current.memoizedState.isDehydrated;if(l&&(Tu(c,s).flags|=256),s=ju(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=o,Xl|=o,a=4;break a}o=tu,tu=a,o!==null&&(tu===null?tu=o:tu.push.apply(tu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Tu(e,0),Su(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Su(r,t,Ql,!Gl);break a;case 2:tu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ru+300-j(),10<a)){if(Su(r,t,Ql,!Gl),Qe(r,0,!0)!==0)break a;du=t,r.timeoutHandle=qd(bu.bind(null,r,n,tu,ou,nu,t,Ql,Xl,$l,Gl,o,`Throttled`,-0,0),a);break a}bu(r,n,tu,ou,nu,t,Ql,Xl,$l,Gl,o,null,-0,0)}}break}while(1);ad(e)}function bu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:sn},Il(t,a,d);var m=(a&62914560)===a?ru-j():(a&4194048)===a?iu-j():0;if(m=qf(d,m),m!==null){du=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Su(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function xu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Dr(a(),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 Su(e,t,n,r){t&=~Zl,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-We(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&at(e,n,t)}function Cu(){return V&6?!0:(od(0,!1),!1)}function wu(){if(U!==null){if(G===0)var e=U.return;else e=U,Zi=Xi=null,Mo(e),Ia=null,La=0,e=U;for(;e!==null;)Wc(e.alternate,e),e=e.return;U=null}}function Tu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,wu(),H=e,U=n=hi(e.current,null),W=t,G=0,Wl=null,Gl=!1,Kl=$e(e,t),ql=!1,$l=Ql=Zl=Xl=Yl=K=0,tu=eu=null,nu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-We(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,ai(),n}function Eu(e,t){L=null,D.H=Hs,t===Ea||t===Oa?(t=Pa(),G=3):t===Da?(t=Pa(),G=4):G=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,U===null&&(K=1,ec(e,Ci(t,e.current)))}function Du(){var e=oo.current;return e===null?!0:(W&4194048)===W?so===null:(W&62914560)===W||W&536870912?e===so:!1}function Ou(){var e=D.H;return D.H=Hs,e===null?Hs:e}function ku(){var e=D.A;return D.A=Hl,e}function Au(){K=4,Gl||(W&4194048)!==W&&oo.current!==null||(Kl=!0),!(Yl&134217727)&&!(Xl&134217727)||H===null||Su(H,W,Ql,!1)}function ju(e,t,n){var r=V;V|=2;var i=Ou(),a=ku();(H!==e||W!==t)&&(ou=null,Tu(e,t)),t=!1;var o=K;a:do try{if(G!==0&&U!==null){var s=U,c=Wl;switch(G){case 8:wu(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=G;if(G=0,Wl=null,J(e,s,c,l),n&&Kl){o=0;break a}break;default:l=G,G=0,Wl=null,J(e,s,c,l)}}Mu(),o=K;break}catch(t){Eu(e,t)}while(1);return t&&e.shellSuspendCounter++,Zi=Xi=null,V=r,D.H=i,D.A=a,U===null&&(H=null,W=0,ai()),o}function Mu(){for(;U!==null;)Fu(U)}function Nu(e,t){var n=V;V|=2;var r=Ou(),a=ku();H!==e||W!==t?(ou=null,au=j()+500,Tu(e,t)):Kl=$e(e,t);a:do try{if(G!==0&&U!==null){t=U;var o=Wl;b:switch(G){case 1:G=0,Wl=null,J(e,t,o,1);break;case 2:case 9:if(Aa(o)){G=0,Wl=null,Iu(t);break}t=function(){G!==2&&G!==9||H!==e||(G=7),ad(e)},o.then(t,t);break a;case 3:G=7;break a;case 4:G=5;break a;case 7:Aa(o)?(G=0,Wl=null,Iu(t)):(G=0,Wl=null,J(e,t,o,7));break;case 5:var s=null;switch(U.tag){case 26:s=U.memoizedState;case 5:case 27:var c=U;if(s?Wf(s):c.stateNode.complete){G=0,Wl=null;var l=c.sibling;if(l!==null)U=l;else{var u=c.return;u===null?U=null:(U=u,Lu(u))}break b}}G=0,Wl=null,J(e,t,o,5);break;case 6:G=0,Wl=null,J(e,t,o,6);break;case 8:wu(),K=6;break a;default:throw Error(i(462))}}Pu();break}catch(t){Eu(e,t)}while(1);return Zi=Xi=null,D.H=r,D.A=a,V=n,U===null?(H=null,W=0,ai(),K):0}function Pu(){for(;U!==null&&!je();)Fu(U)}function Fu(e){var t=Ic(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?Lu(e):U=t}function Iu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,W);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,W);break;case 5:Mo(t);default:Wc(n,t),t=U=gi(t,Jl),t=Ic(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):U=t}function J(e,t,n,r){Zi=Xi=null,Mo(t),Ia=null,La=0;var i=t.return;try{if(ac(e,i,t,n,W)){K=1,ec(e,Ci(n,e.current)),U=null;return}}catch(t){if(i!==null)throw U=i,t;K=1,ec(e,Ci(n,e.current)),U=null;return}t.flags&32768?(F||r===1?e=!0:Kl||W&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Gl);return}e=t.return;var n=Hc(t.alternate,t,Jl);if(n!==null){U=n;return}if(t=t.sibling,t!==null){U=t;return}U=t=e}while(t!==null);K===0&&(K=5)}function Ru(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,U=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){U=e;return}U=e=n}while(e!==null);K=6,U=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Wu();while(cu!==0);if(V&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ii,it(e,n,o,s,c,l),e===H&&(U=H=null,W=0),uu=t,lu=e,du=n,fu=o,pu=a,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(Ie,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=D.T,D.T=null,a=O.p,O.p=2,s=V,V|=4;try{ll(e,t,n)}finally{V=s,O.p=a,D.T=r}}cu=1,Bu(),Vu(),Hu()}}function Bu(){if(cu===1){cu=0;var e=lu,t=uu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=V;V|=4;try{Sl(t,e);var a=Bd,o=Mr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&jr(s.ownerDocument.documentElement,s)){if(c!==null&&Nr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Ar(s,h),v=Ar(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!zd,Bd=zd=null}finally{V=i,O.p=r,D.T=n}}e.current=t,cu=2}}function Vu(){if(cu===2){cu=0;var e=lu,t=uu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=V;V|=4;try{ul(e,t.alternate,t)}finally{V=i,O.p=r,D.T=n}}cu=3}}function Hu(){if(cu===4||cu===3){cu=0,Me();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),lt(n),t=t.stateNode,He&&typeof He.onCommitFiberRoot==`function`)try{He.onCommitFiberRoot(Ve,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{D.T=t,O.p=i}}du&3&&Wu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===hu?q++:(q=0,hu=e):q=0,od(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pa(t)))}function Wu(){return Bu(),Vu(),Hu(),Gu()}function Gu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=lt(du),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=pu,pu=null;var o=lu,s=du;if(cu=0,uu=lu=null,du=0,V&6)throw Error(i(331));var c=V;if(V|=4,zl(o.current),jl(o,o.current,s,n),V=c,od(0,!1),He&&typeof He.onPostCommitFiberRoot==`function`)try{He.onPostCommitFiberRoot(Ve,o)}catch{}return!0}finally{O.p=a,D.T=r,Uu(e,t)}}function Ku(e,t,n){t=Ci(n,t),t=nc(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(rt(e,2),ad(e))}function Y(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=Ci(n,e),n=rc(2),r=qa(t,n,2),r!==null&&(ic(n,r,t,e),rt(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ul;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)||(ql=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,H===e&&(W&n)===n&&(K===4||K===3&&(W&62914560)===W&&300>j()-ru?!(V&2)&&Tu(e,0):Zl|=n,$l===W&&($l=0)),ad(e)}function Yu(e,t){t===0&&(t=tt()),e=ci(e,t),e!==null&&(rt(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return ke(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-We(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=W,a=Qe(r,r===H?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||$e(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Kd()&&(e=id);for(var t=j(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}cu!==0&&cu!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-We(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=et(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=H,n=W,n=Qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(G===2||G===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||$e(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),lt(n)){case 2:case 8:n=Fe;break;case 32:n=Ie;break;case 268435456:n=Re;break;default:n=Ie}return r=ud.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=W;return r=Qe(e,e===H?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yu(e,r,t),ld(e,j()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Wu())return null;yu(e,t,!0)}function fd(){Xd(function(){V&6?ke(Pe,sd):cd()})}function pd(){if(id===0){var e=ga;e===0&&(e=Je,Je<<=1,!(Je&261888)&&(Je=256)),id=e}return id}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:on(``+e)}function hd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[mt]||null).action),o=r.submitter;o&&(t=(t=o[mt]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Dn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?hd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<$r.length;_d++){var vd=$r[_d];ei(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}ei(Gr,`onAnimationEnd`),ei(Kr,`onAnimationIteration`),ei(qr,`onAnimationStart`),ei(`dblclick`,`onDoubleClick`),ei(`focusin`,`onFocus`),ei(`focusout`,`onBlur`),ei(Jr,`onTransitionRun`),ei(Yr,`onTransitionStart`),ei(Xr,`onTransitionCancel`),ei(Zr,`onTransitionEnd`),At(`onMouseEnter`,[`mouseout`,`mouseover`]),At(`onMouseLeave`,[`mouseout`,`mouseover`]),At(`onPointerEnter`,[`pointerout`,`pointerover`]),At(`onPointerLeave`,[`pointerout`,`pointerover`]),kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ti(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ti(e)}i.currentTarget=null,a=c}}}}function X(e,t){var n=t[gt];n===void 0&&(n=t[gt]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,Dt.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!_n||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ed(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=St(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}mn(function(){var r=a,i=ln(n),s=[];a:{var c=Qr.get(e);if(c!==void 0){var l=Dn,u=e;switch(e){case`keypress`:if(Sn(n)===0)break a;case`keydown`:case`keyup`:l=Wn;break;case`focusin`:u=`focus`,l=Fn;break;case`focusout`:u=`blur`,l=Fn;break;case`beforeblur`:case`afterblur`:l=Fn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Nn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Pn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Kn;break;case Gr:case Kr:case qr:l=In;break;case Zr:l=qn;break;case`scroll`:case`scrollend`:l=kn;break;case`wheel`:l=Jn;break;case`copy`:case`cut`:case`paste`:l=Ln;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Gn;break;case`toggle`:case`beforetoggle`:l=Yn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=hn(m,p),g!=null&&d.push(Dd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==cn&&(u=n.relatedTarget||n.fromElement)&&(St(u)||u[ht]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?St(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Nn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Gn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:wt(l),h=u==null?c:wt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,St(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=kd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Z(s,c,l,d,!1),u!==null&&f!==null&&Z(s,f,u,d,!0)}}a:{if(c=r?wt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=hr;else if(lr(c))if(gr)v=Tr;else{v=Cr;var y=Sr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&nn(r.elementType)&&(v=hr):v=wr;if(v&&=v(e,r)){ur(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Jt(c,`number`,c.value)}switch(y=r?wt(r):window,e){case`focusin`:(lr(y)||y.contentEditable===`true`)&&(Fr=y,Ir=r,Lr=null);break;case`focusout`:Lr=Ir=Fr=null;break;case`mousedown`:Rr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Rr=!1,zr(s,n,i);break;case`selectionchange`:if(Pr)break;case`keydown`:case`keyup`:zr(s,n,i)}var b;if(Zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ar?rr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(er&&n.locale!==`ko`&&(ar||x!==`onCompositionStart`?x===`onCompositionEnd`&&ar&&(b=M()):(yn=i,bn=`value`in yn?yn.value:yn.textContent,ar=!0)),y=Od(r,x),0<y.length&&(x=new Rn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=ir(n),b!==null&&(x.data=b)))),(b=$n?or(e,n):sr(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new Rn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),gd(s,e,r,n,i)}xd(s,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=hn(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=hn(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Z(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=hn(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=hn(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
`).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Q(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Qt(e,``+r);break;case`className`:It(e,`class`,r);break;case`tabIndex`:It(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:It(e,n,r);break;case`style`:tn(e,r,o);break;case`data`:if(t!==`object`){It(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Q(e,t,`name`,a.name,a,null),Q(e,t,`formEncType`,a.formEncType,a,null),Q(e,t,`formMethod`,a.formMethod,a,null),Q(e,t,`formTarget`,a.formTarget,a,null)):(Q(e,t,`encType`,a.encType,a,null),Q(e,t,`method`,a.method,a,null),Q(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=sn);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=on(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:X(`beforetoggle`,e),X(`toggle`,e),Ft(e,`popover`,r);break;case`xlinkActuate`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ft(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=rn.get(n)||n,Ft(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:tn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Qt(e,``+r);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=sn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ot.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[mt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ft(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:X(`error`,e),X(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,o,s,n,null)}}a&&Q(e,t,`srcSet`,n.srcSet,n,null),r&&Q(e,t,`src`,n.src,n,null);return;case`input`:X(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Q(e,t,r,d,n,null)}}qt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in X(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Q(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Yt(e,!!r,n,!0):Yt(e,!!r,t,!1);return;case`textarea`:for(s in X(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Q(e,t,s,c,n,null)}Zt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Q(e,t,l,r,n,null)}return;case`dialog`:X(`beforetoggle`,e),X(`toggle`,e),X(`cancel`,e),X(`close`,e);break;case`iframe`:case`object`:X(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)X(yd[r],e);break;case`image`:X(`error`,e),X(`load`,e);break;case`details`:X(`toggle`,e);break;case`embed`:case`source`:case`link`:X(`error`,e),X(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,u,r,n,null)}return;default:if(nn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Q(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Q(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Q(e,t,p,m,r,f)}}Kt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Q(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Q(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Yt(e,!!n,n?[]:``,!1):Yt(e,!!n,t,!0)):Yt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Q(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Q(e,t,s,a,r,o)}Xt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Q(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Q(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Q(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Q(e,t,u,p,r,m)}return;default:if(nn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Q(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Q(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(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===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[bt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),xt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function $(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[bt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=O.d;O.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=Cu();return e||t}function yf(e){var t=Ct(e);t!==null&&t.tag===5&&t.type===`form`?As(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Gt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Gt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Gt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Gt(n.imageSizes)+`"]`)):i+=`[href="`+Gt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Fd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Gt(r)+`"][href="`+Gt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Tt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Et(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Tt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Et(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Tt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Et(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=pe.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Tt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Tt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Tt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Gt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),Et(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Gt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Gt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),Fd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Et(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Et(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Et(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Et(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[bt]||a[pt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:b,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nt(0),this.hiddenUpdates=nt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=pi(3,null,null,t),e.current=a,a.stateNode=e,t=fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ga(a),e}function tp(e){return e?(e=di,e):di}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=I(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(vu(n,e,t),Ja(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ci(e,67108864);t!==null&&vu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=gu();t=ct(t);var n=ci(e,t);n!==null&&vu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,up(e,t,n,r)}finally{O.p=a,D.T=i}}function lp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,up(e,t,n,r)}finally{O.p=a,D.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Ed(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-We(o);s.entanglements[1]|=c,o&=~c}ad(a),!(V&6)&&(au=j()+500,od(0,!1))}}break;case 31:case 13:s=ci(a,2),s!==null&&vu(s,a,2),Cu(),ip(a,2)}if(a=dp(r),a===null&&Ed(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function dp(e){return e=ln(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=St(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ne()){case Pe:return 2;case Fe:return 8;case Ie:case Le:return 32;case Re:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ct(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=St(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,dt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,dt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cn=r,n.target.dispatchEvent(r),cn=null}else return t=Ct(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Ct(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[mt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[mt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,gu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),Cu(),t[ht]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ut();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ve=zp.inject(Rp),He=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[ht]=t.current,wd(e),new Fp(t)}})),ke=b(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Oe()})),Ae=new Map([[`Android.devices`,{internal:!0}],[`AndroidSocket.write`,{internal:!0}],[`AndroidSocket.close`,{internal:!0}],[`AndroidDevice.wait`,{title:`Wait`}],[`AndroidDevice.fill`,{title:`Fill "{text}"`}],[`AndroidDevice.tap`,{title:`Tap`}],[`AndroidDevice.drag`,{title:`Drag`}],[`AndroidDevice.fling`,{title:`Fling`}],[`AndroidDevice.longTap`,{title:`Long tap`}],[`AndroidDevice.pinchClose`,{title:`Pinch close`}],[`AndroidDevice.pinchOpen`,{title:`Pinch open`}],[`AndroidDevice.scroll`,{title:`Scroll`}],[`AndroidDevice.swipe`,{title:`Swipe`}],[`AndroidDevice.info`,{internal:!0}],[`AndroidDevice.screenshot`,{title:`Screenshot`}],[`AndroidDevice.inputType`,{title:`Type`}],[`AndroidDevice.inputPress`,{title:`Press`}],[`AndroidDevice.inputTap`,{title:`Tap`}],[`AndroidDevice.inputSwipe`,{title:`Swipe`}],[`AndroidDevice.inputDrag`,{title:`Drag`}],[`AndroidDevice.launchBrowser`,{title:`Launch browser`}],[`AndroidDevice.open`,{title:`Open app`}],[`AndroidDevice.shell`,{title:`Execute shell command`,group:`configuration`}],[`AndroidDevice.installApk`,{title:`Install apk`}],[`AndroidDevice.push`,{title:`Push`}],[`AndroidDevice.connectToWebView`,{title:`Connect to Web View`}],[`AndroidDevice.close`,{internal:!0}],[`APIRequestContext.fetch`,{title:`{method}`,subtitle:`{url}`,renderParams:[`url`,`method`]}],[`APIRequestContext.fetchResponseBody`,{title:`Get response body`,group:`getter`}],[`APIRequestContext.fetchLog`,{internal:!0}],[`APIRequestContext.addCookies`,{title:`Add cookies`,group:`configuration`}],[`APIRequestContext.clearCookies`,{title:`Clear cookies`,group:`configuration`}],[`APIRequestContext.cookies`,{title:`Get cookies`,group:`getter`}],[`APIRequestContext.storageState`,{title:`Get storage state`,group:`configuration`}],[`APIRequestContext.disposeAPIResponse`,{internal:!0}],[`APIRequestContext.dispose`,{internal:!0}],[`Artifact.pathAfterFinished`,{internal:!0}],[`Artifact.saveAs`,{internal:!0}],[`Artifact.saveAsStream`,{internal:!0}],[`Artifact.failure`,{internal:!0}],[`Artifact.stream`,{internal:!0}],[`Artifact.cancel`,{internal:!0}],[`Artifact.delete`,{internal:!0}],[`Stream.read`,{internal:!0}],[`Stream.close`,{internal:!0}],[`WritableStream.write`,{internal:!0}],[`WritableStream.close`,{internal:!0}],[`Browser.startServer`,{title:`Start server`}],[`Browser.stopServer`,{title:`Stop server`}],[`Browser.close`,{title:`Close browser`,pause:!0}],[`Browser.killForTests`,{internal:!0}],[`Browser.defaultUserAgentForTest`,{internal:!0}],[`Browser.newContext`,{title:`Create context`}],[`Browser.newContextForReuse`,{internal:!0}],[`Browser.disconnectFromReusedContext`,{internal:!0}],[`Browser.newBrowserCDPSession`,{title:`Create CDP session`,group:`configuration`}],[`Browser.startTracing`,{title:`Start browser tracing`,group:`configuration`}],[`Browser.stopTracing`,{title:`Stop browser tracing`,group:`configuration`}],[`BrowserContext.addCookies`,{title:`Add cookies`,group:`configuration`}],[`BrowserContext.addInitScript`,{title:`Add init script`,group:`configuration`}],[`BrowserContext.clearCookies`,{title:`Clear cookies`,group:`configuration`}],[`BrowserContext.clearPermissions`,{title:`Clear permissions`,group:`configuration`}],[`BrowserContext.close`,{title:`Close context`,pause:!0}],[`BrowserContext.cookies`,{title:`Get cookies`,group:`getter`}],[`BrowserContext.exposeBinding`,{title:`Expose binding`,group:`configuration`}],[`BrowserContext.grantPermissions`,{title:`Grant permissions`,group:`configuration`}],[`BrowserContext.newPage`,{title:`Create page`}],[`BrowserContext.registerSelectorEngine`,{internal:!0}],[`BrowserContext.setTestIdAttributeName`,{internal:!0}],[`BrowserContext.setExtraHTTPHeaders`,{title:`Set extra HTTP headers`,group:`configuration`}],[`BrowserContext.setGeolocation`,{title:`Set geolocation`,group:`configuration`}],[`BrowserContext.setHTTPCredentials`,{title:`Set HTTP credentials`,group:`configuration`}],[`BrowserContext.setNetworkInterceptionPatterns`,{title:`Route requests`,group:`route`}],[`BrowserContext.setWebSocketInterceptionPatterns`,{title:`Route WebSockets`,group:`route`}],[`BrowserContext.setOffline`,{title:`Set offline mode`,renderParams:[`offline`]}],[`BrowserContext.storageState`,{title:`Get storage state`,group:`configuration`}],[`BrowserContext.setStorageState`,{title:`Set storage state`,group:`configuration`}],[`BrowserContext.pause`,{title:`Pause`}],[`BrowserContext.showRecorder`,{internal:!0}],[`BrowserContext.startRecording`,{internal:!0}],[`BrowserContext.stopRecording`,{internal:!0}],[`BrowserContext.exposeConsoleApi`,{internal:!0}],[`BrowserContext.newCDPSession`,{title:`Create CDP session`,group:`configuration`}],[`BrowserContext.createTempFiles`,{internal:!0}],[`BrowserContext.updateSubscription`,{internal:!0}],[`BrowserContext.clockFastForward`,{title:`Fast forward clock "{ticksNumber|ticksString}"`}],[`BrowserContext.clockInstall`,{title:`Install clock "{timeNumber|timeString}"`}],[`BrowserContext.clockPauseAt`,{title:`Pause clock "{timeNumber|timeString}"`}],[`BrowserContext.clockResume`,{title:`Resume clock`}],[`BrowserContext.clockRunFor`,{title:`Run clock "{ticksNumber|ticksString}"`}],[`BrowserContext.clockSetFixedTime`,{title:`Set fixed time "{timeNumber|timeString}"`}],[`BrowserContext.clockSetSystemTime`,{title:`Set system time "{timeNumber|timeString}"`}],[`BrowserContext.credentialsInstall`,{title:`Install virtual WebAuthn authenticator`,group:`configuration`}],[`BrowserContext.credentialsCreate`,{title:`Create virtual credential for "{rpId}"`,group:`configuration`}],[`BrowserContext.credentialsGet`,{title:`Get virtual credentials`,group:`configuration`}],[`BrowserContext.credentialsDelete`,{title:`Delete virtual credential`,group:`configuration`}],[`BrowserType.launch`,{title:`Launch browser`}],[`BrowserType.launchPersistentContext`,{title:`Launch persistent context`}],[`BrowserType.connectOverCDP`,{title:`Connect over CDP`}],[`BrowserType.connectToWorker`,{title:`Connect to worker`}],[`Disposable.dispose`,{internal:!0}],[`Electron.launch`,{title:`Launch electron`}],[`ElectronApplication.browserWindow`,{internal:!0}],[`ElectronApplication.evaluateExpression`,{title:`Evaluate`}],[`ElectronApplication.evaluateExpressionHandle`,{title:`Evaluate`}],[`ElectronApplication.updateSubscription`,{internal:!0}],[`Frame.evalOnSelector`,{title:`Evaluate`,subtitle:`{selector}`,snapshot:!0,pause:!0}],[`Frame.evalOnSelectorAll`,{title:`Evaluate`,subtitle:`{selector}`,snapshot:!0,pause:!0}],[`Frame.addScriptTag`,{title:`Add script tag`,renderParams:[`url`],snapshot:!0,pause:!0}],[`Frame.addStyleTag`,{title:`Add style tag`,renderParams:[`url`],snapshot:!0,pause:!0}],[`Frame.ariaSnapshot`,{title:`Aria snapshot`,subtitle:`{selector}`,group:`getter`}],[`Frame.ariaSnapshotJSON`,{title:`Aria snapshot JSON`,subtitle:`{selector}`,group:`getter`}],[`Frame.blur`,{title:`Blur`,subtitle:`{selector}`,slowMo:!0,snapshot:!0,pause:!0}],[`Frame.check`,{title:`Check`,subtitle:`{selector}`,renderParams:[`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.click`,{title:`Click`,subtitle:`{selector}`,renderParams:[`button`,`clickCount`,`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.content`,{title:`Get content`,snapshot:!0,pause:!0}],[`Frame.dragAndDrop`,{title:`Drag and drop`,renderParams:[`source:selector`,`target:selector`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.drop`,{title:`Drop files or data onto an element`,subtitle:`{selector}`,slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.dblclick`,{title:`Double click`,subtitle:`{selector}`,renderParams:[`button`,`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.dispatchEvent`,{title:`Dispatch "{type}"`,subtitle:`{selector}`,renderParams:[`type`],slowMo:!0,snapshot:!0,pause:!0}],[`Frame.evaluateExpression`,{title:`Evaluate`,snapshot:!0,pause:!0}],[`Frame.evaluateExpressionHandle`,{title:`Evaluate`,snapshot:!0,pause:!0}],[`Frame.fill`,{title:`Fill "{value}"`,subtitle:`{selector}`,renderParams:[`value`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.focus`,{title:`Focus`,subtitle:`{selector}`,slowMo:!0,snapshot:!0,pause:!0}],[`Frame.frameElement`,{title:`Get frame element`,group:`getter`}],[`Frame.resolveSelector`,{internal:!0}],[`Frame.highlight`,{internal:!0}],[`Frame.hideHighlight`,{internal:!0}],[`Frame.getAttribute`,{title:`Get attribute "{name}"`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.goto`,{title:`Navigate`,subtitle:`{url}`,renderParams:[`url`],slowMo:!0,snapshot:!0,pause:!0}],[`Frame.hover`,{title:`Hover`,subtitle:`{selector}`,renderParams:[`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.innerHTML`,{title:`Get HTML`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.innerText`,{title:`Get inner text`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.inputValue`,{title:`Get input value`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.isChecked`,{title:`Is checked`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.isDisabled`,{title:`Is disabled`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.isEnabled`,{title:`Is enabled`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.isHidden`,{title:`Is hidden`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.isVisible`,{title:`Is visible`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.isEditable`,{title:`Is editable`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.press`,{title:`Press "{key}"`,subtitle:`{selector}`,renderParams:[`key`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.querySelector`,{title:`Query selector`,subtitle:`{selector}`,snapshot:!0}],[`Frame.querySelectorAll`,{title:`Query selector all`,subtitle:`{selector}`,snapshot:!0}],[`Frame.queryCount`,{title:`Query count`,subtitle:`{selector}`,snapshot:!0,pause:!0}],[`Frame.selectOption`,{title:`Select option`,subtitle:`{selector}`,renderParams:[`options`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.setContent`,{title:`Set content`,snapshot:!0,pause:!0}],[`Frame.setInputFiles`,{title:`Set input files`,subtitle:`{selector}`,renderParams:[`files=localPaths`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.tap`,{title:`Tap`,subtitle:`{selector}`,renderParams:[`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.textContent`,{title:`Get text content`,subtitle:`{selector}`,snapshot:!0,pause:!0,group:`getter`}],[`Frame.title`,{title:`Get page title`,group:`getter`}],[`Frame.type`,{title:`Type "{text}"`,subtitle:`{selector}`,renderParams:[`text`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.uncheck`,{title:`Uncheck`,subtitle:`{selector}`,renderParams:[`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`Frame.waitForTimeout`,{title:`Wait for timeout`,renderParams:[`timeout=waitTimeout`],snapshot:!0}],[`Frame.waitForFunction`,{title:`Wait for function`,subtitle:`{selector}`,snapshot:!0,pause:!0}],[`Frame.waitForSelector`,{title:`Wait for selector`,subtitle:`{selector}`,renderParams:[`state`],snapshot:!0}],[`Frame.expect`,{title:`Expect "{expression}"`,subtitle:`{selector}`,snapshot:!0,pause:!0}],[`Frame.webmcpTools`,{title:`List WebMCP tools`,group:`getter`}],[`Frame.webmcpCallTool`,{title:`Call WebMCP tool`}],[`JSHandle.dispose`,{internal:!0}],[`ElementHandle.dispose`,{internal:!0}],[`JSHandle.evaluateExpression`,{title:`Evaluate`,snapshot:!0,pause:!0}],[`ElementHandle.evaluateExpression`,{title:`Evaluate`,snapshot:!0,pause:!0}],[`JSHandle.evaluateExpressionHandle`,{title:`Evaluate`,snapshot:!0,pause:!0}],[`ElementHandle.evaluateExpressionHandle`,{title:`Evaluate`,snapshot:!0,pause:!0}],[`JSHandle.getPropertyList`,{title:`Get property list`,group:`getter`}],[`ElementHandle.getPropertyList`,{title:`Get property list`,group:`getter`}],[`JSHandle.getProperty`,{title:`Get JS property`,group:`getter`}],[`ElementHandle.getProperty`,{title:`Get JS property`,group:`getter`}],[`JSHandle.jsonValue`,{title:`Get JSON value`,group:`getter`}],[`ElementHandle.jsonValue`,{title:`Get JSON value`,group:`getter`}],[`ElementHandle.evalOnSelector`,{title:`Evaluate`,subtitle:`{selector}`,snapshot:!0,pause:!0}],[`ElementHandle.evalOnSelectorAll`,{title:`Evaluate`,subtitle:`{selector}`,snapshot:!0,pause:!0}],[`ElementHandle.boundingBox`,{title:`Get bounding box`,snapshot:!0,pause:!0}],[`ElementHandle.check`,{title:`Check`,renderParams:[`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.click`,{title:`Click`,renderParams:[`button`,`clickCount`,`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.contentFrame`,{title:`Get content frame`,group:`getter`}],[`ElementHandle.dblclick`,{title:`Double click`,renderParams:[`button`,`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.dispatchEvent`,{title:`Dispatch event`,renderParams:[`type`],slowMo:!0,snapshot:!0,pause:!0}],[`ElementHandle.fill`,{title:`Fill "{value}"`,renderParams:[`value`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.focus`,{title:`Focus`,slowMo:!0,snapshot:!0,pause:!0}],[`ElementHandle.getAttribute`,{title:`Get attribute`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.hover`,{title:`Hover`,renderParams:[`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.innerHTML`,{title:`Get HTML`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.innerText`,{title:`Get inner text`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.inputValue`,{title:`Get input value`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.isChecked`,{title:`Is checked`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.isDisabled`,{title:`Is disabled`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.isEditable`,{title:`Is editable`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.isEnabled`,{title:`Is enabled`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.isHidden`,{title:`Is hidden`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.isVisible`,{title:`Is visible`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.ownerFrame`,{title:`Get owner frame`,group:`getter`}],[`ElementHandle.press`,{title:`Press "{key}"`,renderParams:[`key`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.querySelector`,{title:`Query selector`,subtitle:`{selector}`,snapshot:!0}],[`ElementHandle.querySelectorAll`,{title:`Query selector all`,subtitle:`{selector}`,snapshot:!0}],[`ElementHandle.screenshot`,{title:`Screenshot`,renderParams:[`type`],snapshot:!0,pause:!0}],[`ElementHandle.scrollIntoViewIfNeeded`,{title:`Scroll into view`,slowMo:!0,snapshot:!0,pause:!0}],[`ElementHandle.selectOption`,{title:`Select option`,renderParams:[`options`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.selectText`,{title:`Select text`,slowMo:!0,snapshot:!0,pause:!0}],[`ElementHandle.setInputFiles`,{title:`Set input files`,renderParams:[`files=localPaths`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.tap`,{title:`Tap`,renderParams:[`modifiers`,`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.textContent`,{title:`Get text content`,snapshot:!0,pause:!0,group:`getter`}],[`ElementHandle.type`,{title:`Type`,renderParams:[`text`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.uncheck`,{title:`Uncheck`,renderParams:[`position`],slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],[`ElementHandle.waitForElementState`,{title:`Wait for state`,renderParams:[`state`],snapshot:!0,pause:!0}],[`ElementHandle.waitForSelector`,{title:`Wait for selector`,subtitle:`{selector}`,renderParams:[`state`],snapshot:!0}],[`LocalUtils.zip`,{internal:!0}],[`LocalUtils.harOpen`,{internal:!0}],[`LocalUtils.harLookup`,{internal:!0}],[`LocalUtils.harClose`,{internal:!0}],[`LocalUtils.harUnzip`,{internal:!0}],[`LocalUtils.connect`,{internal:!0}],[`LocalUtils.tracingStarted`,{internal:!0}],[`LocalUtils.addStackToTracingNoReply`,{internal:!0}],[`LocalUtils.traceDiscarded`,{internal:!0}],[`LocalUtils.globToRegex`,{internal:!0}],[`LocalUtils.asLocatorDescription`,{internal:!0}],[`Request.response`,{internal:!0}],[`Request.rawRequestHeaders`,{internal:!0}],[`Route.redirectNavigationRequest`,{internal:!0}],[`Route.abort`,{title:`Abort request`,group:`route`}],[`Route.continue`,{title:`Continue request`,group:`route`}],[`Route.fulfill`,{title:`Fulfill request`,group:`route`}],[`WebSocketRoute.connect`,{title:`Connect WebSocket to server`,group:`route`}],[`WebSocketRoute.ensureOpened`,{internal:!0}],[`WebSocketRoute.sendToPage`,{title:`Send WebSocket message`,group:`route`}],[`WebSocketRoute.sendToServer`,{title:`Send WebSocket message`,group:`route`}],[`WebSocketRoute.closePage`,{internal:!0}],[`WebSocketRoute.closeServer`,{internal:!0}],[`Response.body`,{title:`Get response body`,group:`getter`}],[`Response.securityDetails`,{internal:!0}],[`Response.serverAddr`,{internal:!0}],[`Response.rawResponseHeaders`,{internal:!0}],[`Response.httpVersion`,{internal:!0}],[`Response.sizes`,{internal:!0}],[`Page.addInitScript`,{title:`Add init script`,group:`configuration`}],[`Page.close`,{title:`Close page`,pause:!0}],[`Page.runBeforeUnload`,{title:`Run beforeunload`,pause:!0}],[`Page.clearConsoleMessages`,{title:`Clear console messages`}],[`Page.consoleMessages`,{title:`Get console messages`,group:`getter`}],[`Page.emulateMedia`,{title:`Emulate media`,renderParams:[`media`,`colorScheme`,`reducedMotion`,`forcedColors`,`contrast`],snapshot:!0,pause:!0}],[`Page.exposeBinding`,{title:`Expose binding`,group:`configuration`}],[`Page.goBack`,{title:`Go back`,slowMo:!0,snapshot:!0,pause:!0}],[`Page.goForward`,{title:`Go forward`,slowMo:!0,snapshot:!0,pause:!0}],[`Page.requestGC`,{title:`Request garbage collection`,group:`configuration`}],[`Page.registerLocatorHandler`,{title:`Register locator handler`,subtitle:`{selector}`}],[`Page.resolveLocatorHandlerNoReply`,{internal:!0}],[`Page.unregisterLocatorHandler`,{title:`Unregister locator handler`}],[`Page.reload`,{title:`Reload`,slowMo:!0,snapshot:!0,pause:!0}],[`Page.expectScreenshot`,{title:`Expect screenshot`,subtitle:`{locator.selector}`,snapshot:!0,pause:!0}],[`Page.screenshot`,{title:`Screenshot`,renderParams:[`type`,`fullPage`],snapshot:!0,pause:!0}],[`Page.setExtraHTTPHeaders`,{title:`Set extra HTTP headers`,group:`configuration`}],[`Page.setNetworkInterceptionPatterns`,{title:`Route requests`,group:`route`}],[`Page.setWebSocketInterceptionPatterns`,{title:`Route WebSockets`,group:`route`}],[`Page.setViewportSize`,{title:`Set viewport size`,renderParams:[`viewportSize.width`,`viewportSize.height`],snapshot:!0,pause:!0}],[`Page.keyboardDown`,{title:`Key down "{key}"`,renderParams:[`key`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.keyboardUp`,{title:`Key up "{key}"`,renderParams:[`key`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.keyboardInsertText`,{title:`Insert "{text}"`,renderParams:[`text`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.keyboardType`,{title:`Type "{text}"`,renderParams:[`text`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.keyboardPress`,{title:`Press "{key}"`,renderParams:[`key`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.mouseMove`,{title:`Mouse move`,renderParams:[`x`,`y`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.mouseDown`,{title:`Mouse down`,renderParams:[`button`,`clickCount`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.mouseUp`,{title:`Mouse up`,renderParams:[`button`,`clickCount`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.mouseClick`,{title:`Click`,renderParams:[`x`,`y`,`button`,`clickCount`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.mouseWheel`,{title:`Mouse wheel`,renderParams:[`deltaX`,`deltaY`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.touchscreenTap`,{title:`Tap`,renderParams:[`x`,`y`],slowMo:!0,snapshot:!0,pause:!0,input:!0}],[`Page.clearPageErrors`,{title:`Clear page errors`}],[`Page.pageErrors`,{title:`Get page errors`,group:`getter`}],[`Page.pdf`,{title:`PDF`}],[`Page.requests`,{title:`Get network requests`,group:`getter`}],[`Page.startJSCoverage`,{title:`Start JS coverage`,group:`configuration`}],[`Page.stopJSCoverage`,{title:`Stop JS coverage`,group:`configuration`}],[`Page.startCSSCoverage`,{title:`Start CSS coverage`,group:`configuration`}],[`Page.stopCSSCoverage`,{title:`Stop CSS coverage`,group:`configuration`}],[`Page.bringToFront`,{title:`Bring to front`}],[`Page.pickLocator`,{title:`Pick locator`,group:`configuration`}],[`Page.cancelPickLocator`,{title:`Cancel pick locator`,group:`configuration`}],[`Page.hideHighlight`,{title:`Hide all element highlights`,group:`configuration`}],[`Page.screencastShowOverlay`,{title:`Show overlay`,group:`configuration`}],[`Page.screencastRemoveOverlay`,{title:`Remove overlay`,group:`configuration`}],[`Page.screencastChapter`,{title:`Show chapter overlay`,group:`configuration`}],[`Page.screencastSetOverlayVisible`,{title:`Set overlay visibility`,group:`configuration`}],[`Page.screencastShowActions`,{title:`Show actions`,group:`configuration`}],[`Page.screencastHideActions`,{title:`Remove actions`,group:`configuration`}],[`Page.screencastStart`,{title:`Start screencast`,group:`configuration`}],[`Page.screencastFrameAck`,{internal:!0}],[`Page.screencastStop`,{title:`Stop screencast`,group:`configuration`}],[`Page.updateSubscription`,{internal:!0}],[`Page.setDockTile`,{internal:!0}],[`Page.webStorageItems`,{title:`Get WebStorage items`,group:`getter`}],[`Page.webStorageGetItem`,{title:`Get WebStorage item`,group:`getter`}],[`Page.webStorageSetItem`,{title:`Set WebStorage item`,group:`configuration`}],[`Page.webStorageRemoveItem`,{title:`Remove WebStorage item`,group:`configuration`}],[`Page.webStorageClear`,{title:`Clear WebStorage`,group:`configuration`}],[`Root.initialize`,{internal:!0}],[`Playwright.newRequest`,{title:`Create request context`}],[`DebugController.initialize`,{internal:!0}],[`DebugController.setReportStateChanged`,{internal:!0}],[`DebugController.setRecorderMode`,{internal:!0}],[`DebugController.highlight`,{internal:!0}],[`DebugController.hideHighlight`,{internal:!0}],[`DebugController.resume`,{internal:!0}],[`DebugController.kill`,{internal:!0}],[`SocksSupport.socksConnected`,{internal:!0}],[`SocksSupport.socksFailed`,{internal:!0}],[`SocksSupport.socksData`,{internal:!0}],[`SocksSupport.socksError`,{internal:!0}],[`SocksSupport.socksEnd`,{internal:!0}],[`JsonPipe.send`,{internal:!0}],[`JsonPipe.close`,{internal:!0}],[`CDPSession.send`,{title:`Send CDP command`,group:`configuration`}],[`CDPSession.detach`,{title:`Detach CDP session`,group:`configuration`}],[`BindingCall.reject`,{internal:!0}],[`BindingCall.resolve`,{internal:!0}],[`Debugger.requestPause`,{title:`Pause on next call`,group:`configuration`}],[`Debugger.resume`,{title:`Resume`,group:`configuration`}],[`Debugger.next`,{title:`Step to next call`,group:`configuration`}],[`Debugger.runTo`,{title:`Run to location`,group:`configuration`}],[`Debugger.enable`,{internal:!0}],[`Dialog.accept`,{title:`Accept dialog`,renderParams:[`promptText`]}],[`Dialog.dismiss`,{title:`Dismiss dialog`}],[`Tracing.tracingStart`,{title:`Start tracing`,group:`configuration`}],[`Tracing.tracingStartChunk`,{title:`Start tracing`,group:`configuration`}],[`Tracing.tracingGroup`,{title:`Trace "{name}"`,renderParams:[`name`]}],[`Tracing.tracingGroupEnd`,{title:`Group end`}],[`Tracing.tracingStopChunk`,{title:`Stop tracing`,group:`configuration`}],[`Tracing.tracingStop`,{title:`Stop tracing`,group:`configuration`}],[`Tracing.harStart`,{internal:!0}],[`Tracing.harExport`,{internal:!0}],[`Worker.disconnect`,{title:`Disconnect from worker`}],[`Worker.evaluateExpression`,{title:`Evaluate`}],[`Worker.evaluateExpressionHandle`,{title:`Evaluate`}],[`Worker.updateSubscription`,{internal:!0}]]);function je(e){return Ae.get(e.type+`.`+e.method)}var Me=function(e,t,n){return e>=t&&e<=n};function j(e){return Me(e,48,57)}function Ne(e){return j(e)||Me(e,65,70)||Me(e,97,102)}function Pe(e){return Me(e,65,90)}function Fe(e){return Me(e,97,122)}function Ie(e){return Pe(e)||Fe(e)}function Le(e){return e>=128}function Re(e){return Ie(e)||Le(e)||e===95}function ze(e){return Re(e)||j(e)||e===45}function Be(e){return Me(e,0,8)||e===11||Me(e,14,31)||e===127}function Ve(e){return e===10}function He(e){return Ve(e)||e===9||e===32}var Ue=1114111,We=class extends Error{constructor(e){super(e),this.name=`InvalidCharacterError`}};function Ge(e){let 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),Me(r,55296,56319)&&Me(e.charCodeAt(n+1),56320,57343)){let t=r-55296,i=e.charCodeAt(n+1)-56320;r=2**16+t*2**10+i,n++}t.push(r)}return t}function Ke(e){if(e<=65535)return String.fromCharCode(e);e-=2**16;let t=Math.floor(e/2**10)+55296,n=e%2**10+56320;return String.fromCharCode(t)+String.fromCharCode(n)}function qe(e){let t=Ge(e),n=-1,r=[],i,a=0,o=0,s=0,c=function(){a+=1,s=o,o=0},l={line:a,column:o},u=function(e){return e>=t.length?-1:t[e]},d=function(e){if(e===void 0&&(e=1),e>3)throw`Spec Error: no more than three codepoints of lookahead.`;return u(n+e)},f=function(e){return e===void 0&&(e=1),n+=e,i=u(n),Ve(i)?c():o+=e,!0},p=function(){return--n,Ve(i)?(--a,o=s):--o,l.line=a,l.column=o,!0},m=function(e){return e===void 0&&(e=i),e===-1},h=function(){if(g(),f(),He(i)){for(;He(d());)f();return new Ze}else if(i===34)return y();else if(i===35)if(ze(d())||S(d(1),d(2))){let e=new St(``);return w(d(1),d(2),d(3))&&(e.type=`id`),e.value=E(),e}else return new _t(i);else if(i===36)return d()===61?(f(),new pt):new _t(i);else if(i===39)return y();else if(i===40)return new ct;else if(i===41)return new lt;else if(i===42)return d()===61?(f(),new mt):new _t(i);else if(i===43)return te()?(p(),_()):new _t(i);else if(i===44)return new nt;else if(i===45)return te()?(p(),_()):d(1)===45&&d(2)===62?(f(2),new $e):ee()?(p(),v()):new _t(i);else if(i===46)return te()?(p(),_()):new _t(i);else if(i===58)return new et;else if(i===59)return new tt;else if(i===60)return d(1)===33&&d(2)===45&&d(3)===45?(f(3),new Qe):new _t(i);else if(i===64)return w(d(1),d(2),d(3))?new xt(E()):new _t(i);else if(i===91)return new ot;else if(i===92)return C()?(p(),v()):new _t(i);else if(i===93)return new st;else if(i===94)return d()===61?(f(),new ft):new _t(i);else if(i===123)return new it;else if(i===124)return d()===61?(f(),new dt):d()===124?(f(),new ht):new _t(i);else if(i===125)return new at;else if(i===126)return d()===61?(f(),new ut):new _t(i);else if(j(i))return p(),_();else if(Re(i))return p(),v();else if(m())return new gt;else return new _t(i)},g=function(){for(;d(1)===47&&d(2)===42;)for(f(2);;)if(f(),i===42&&d()===47){f();break}else if(m())return},_=function(){let e=ne();if(w(d(1),d(2),d(3))){let t=new Dt;return t.value=e.value,t.repr=e.repr,t.type=e.type,t.unit=E(),t}else if(d()===37){f();let t=new Et;return t.value=e.value,t.repr=e.repr,t}else{let t=new Tt;return t.value=e.value,t.repr=e.repr,t.type=e.type,t}},v=function(){let e=E();if(e.toLowerCase()===`url`&&d()===40){for(f();He(d(1))&&He(d(2));)f();return d()===34||d()===39||He(d())&&(d(2)===34||d(2)===39)?new bt(e):b()}else if(d()===40)return f(),new bt(e);else return new yt(e)},y=function(e){e===void 0&&(e=i);let t=``;for(;f();)if(i===e||m())return new Ct(t);else if(Ve(i))return p(),new Ye;else i===92?m(d())||(Ve(d())?f():t+=Ke(x())):t+=Ke(i);throw Error(`Internal error`)},b=function(){let e=new wt(``);for(;He(d());)f();if(m(d()))return e;for(;f();)if(i===41||m())return e;else if(He(i)){for(;He(d());)f();return d()===41||m(d())?(f(),e):(ie(),new Xe)}else if(i===34||i===39||i===40||Be(i))return ie(),new Xe;else if(i===92)if(C())e.value+=Ke(x());else return ie(),new Xe;else e.value+=Ke(i);throw Error(`Internal error`)},x=function(){if(f(),Ne(i)){let e=[i];for(let t=0;t<5&&Ne(d());t++)f(),e.push(i);He(d())&&f();let t=parseInt(e.map(function(e){return String.fromCharCode(e)}).join(``),16);return t>Ue&&(t=65533),t}else if(m())return 65533;else return i},S=function(e,t){return!(e!==92||Ve(t))},C=function(){return S(i,d())},w=function(e,t,n){return e===45?Re(t)||t===45||S(t,n):Re(e)?!0:e===92?S(e,t):!1},ee=function(){return w(i,d(1),d(2))},T=function(e,t,n){return e===43||e===45?!!(j(t)||t===46&&j(n)):e===46?!!j(t):!!j(e)},te=function(){return T(i,d(1),d(2))},E=function(){let e=``;for(;f();)if(ze(i))e+=Ke(i);else if(C())e+=Ke(x());else return p(),e;throw Error(`Internal parse error`)},ne=function(){let e=``,t=`integer`;for((d()===43||d()===45)&&(f(),e+=Ke(i));j(d());)f(),e+=Ke(i);if(d(1)===46&&j(d(2)))for(f(),e+=Ke(i),f(),e+=Ke(i),t=`number`;j(d());)f(),e+=Ke(i);let n=d(1),r=d(2),a=d(3);if((n===69||n===101)&&j(r))for(f(),e+=Ke(i),f(),e+=Ke(i),t=`number`;j(d());)f(),e+=Ke(i);else if((n===69||n===101)&&(r===43||r===45)&&j(a))for(f(),e+=Ke(i),f(),e+=Ke(i),f(),e+=Ke(i),t=`number`;j(d());)f(),e+=Ke(i);let o=re(e);return{type:t,value:o,repr:e}},re=function(e){return+e},ie=function(){for(;f();)if(i===41||m())return;else C()&&x()},ae=0;for(;!m(d());)if(r.push(h()),ae++,ae>t.length*2)throw Error(`I'm infinite-looping!`);return r}var Je=class{constructor(){this.tokenType=``}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return``+this}},Ye=class extends Je{constructor(...e){super(...e),this.tokenType=`BADSTRING`}},Xe=class extends Je{constructor(...e){super(...e),this.tokenType=`BADURL`}},Ze=class extends Je{constructor(...e){super(...e),this.tokenType=`WHITESPACE`}toString(){return`WS`}toSource(){return` `}},Qe=class extends Je{constructor(...e){super(...e),this.tokenType=`CDO`}toSource(){return`<!--`}},$e=class extends Je{constructor(...e){super(...e),this.tokenType=`CDC`}toSource(){return`-->`}},et=class extends Je{constructor(...e){super(...e),this.tokenType=`:`}},tt=class extends Je{constructor(...e){super(...e),this.tokenType=`;`}},nt=class extends Je{constructor(...e){super(...e),this.tokenType=`,`}},rt=class extends Je{constructor(...e){super(...e),this.value=``,this.mirror=``}},it=class extends rt{constructor(){super(),this.tokenType=`{`,this.value=`{`,this.mirror=`}`}},at=class extends rt{constructor(){super(),this.tokenType=`}`,this.value=`}`,this.mirror=`{`}},ot=class extends rt{constructor(){super(),this.tokenType=`[`,this.value=`[`,this.mirror=`]`}},st=class extends rt{constructor(){super(),this.tokenType=`]`,this.value=`]`,this.mirror=`[`}},ct=class extends rt{constructor(){super(),this.tokenType=`(`,this.value=`(`,this.mirror=`)`}},lt=class extends rt{constructor(){super(),this.tokenType=`)`,this.value=`)`,this.mirror=`(`}},ut=class extends Je{constructor(...e){super(...e),this.tokenType=`~=`}},dt=class extends Je{constructor(...e){super(...e),this.tokenType=`|=`}},ft=class extends Je{constructor(...e){super(...e),this.tokenType=`^=`}},pt=class extends Je{constructor(...e){super(...e),this.tokenType=`$=`}},mt=class extends Je{constructor(...e){super(...e),this.tokenType=`*=`}},ht=class extends Je{constructor(...e){super(...e),this.tokenType=`||`}},gt=class extends Je{constructor(...e){super(...e),this.tokenType=`EOF`}toSource(){return``}},_t=class extends Je{constructor(e){super(),this.tokenType=`DELIM`,this.value=``,this.value=Ke(e)}toString(){return`DELIM(`+this.value+`)`}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value===`\\`?`\\
`:this.value}},vt=class extends Je{constructor(...e){super(...e),this.value=``}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}},yt=class extends vt{constructor(e){super(),this.tokenType=`IDENT`,this.value=e}toString(){return`IDENT(`+this.value+`)`}toSource(){return Ot(this.value)}},bt=class extends vt{constructor(e){super(),this.tokenType=`FUNCTION`,this.value=e,this.mirror=`)`}toString(){return`FUNCTION(`+this.value+`)`}toSource(){return Ot(this.value)+`(`}},xt=class extends vt{constructor(e){super(),this.tokenType=`AT-KEYWORD`,this.value=e}toString(){return`AT(`+this.value+`)`}toSource(){return`@`+Ot(this.value)}},St=class extends vt{constructor(e){super(),this.tokenType=`HASH`,this.value=e,this.type=`unrestricted`}toString(){return`HASH(`+this.value+`)`}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type===`id`?`#`+Ot(this.value):`#`+kt(this.value)}},Ct=class extends vt{constructor(e){super(),this.tokenType=`STRING`,this.value=e}toString(){return`"`+At(this.value)+`"`}},wt=class extends vt{constructor(e){super(),this.tokenType=`URL`,this.value=e}toString(){return`URL(`+this.value+`)`}toSource(){return`url("`+At(this.value)+`")`}},Tt=class extends Je{constructor(){super(),this.tokenType=`NUMBER`,this.type=`integer`,this.repr=``}toString(){return this.type===`integer`?`INT(`+this.value+`)`:`NUMBER(`+this.value+`)`}toJSON(){let e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}},Et=class extends Je{constructor(){super(),this.tokenType=`PERCENTAGE`,this.repr=``}toString(){return`PERCENTAGE(`+this.value+`)`}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+`%`}},Dt=class extends Je{constructor(){super(),this.tokenType=`DIMENSION`,this.type=`integer`,this.repr=``,this.unit=``}toString(){return`DIM(`+this.value+`,`+this.unit+`)`}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){let e=this.repr,t=Ot(this.unit);return t[0].toLowerCase()===`e`&&(t[1]===`-`||Me(t.charCodeAt(1),48,57))&&(t=`\\65 `+t.slice(1,t.length)),e+t}};function Ot(e){e=``+e;let t=``,n=e.charCodeAt(0);for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i===0)throw new We(`Invalid character: the input contains U+0000.`);Me(i,1,31)||i===127||r===0&&Me(i,48,57)||r===1&&Me(i,48,57)&&n===45?t+=`\\`+i.toString(16)+` `:i>=128||i===45||i===95||Me(i,48,57)||Me(i,65,90)||Me(i,97,122)?t+=e[r]:t+=`\\`+e[r]}return t}function kt(e){e=``+e;let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0)throw new We(`Invalid character: the input contains U+0000.`);r>=128||r===45||r===95||Me(r,48,57)||Me(r,65,90)||Me(r,97,122)?t+=e[n]:t+=`\\`+r.toString(16)+` `}return t}function At(e){e=``+e;let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0)throw new We(`Invalid character: the input contains U+0000.`);Me(r,1,31)||r===127?t+=`\\`+r.toString(16)+` `:r===34||r===92?t+=`\\`+e[n]:t+=e[n]}return t}var jt=class extends Error{};function Mt(e,t){let n;try{n=qe(e),n[n.length-1]instanceof gt||n.push(new gt)}catch(t){let n=t.message+` while parsing css selector "${e}". Did you mean to CSS.escape it?`,r=(t.stack||``).indexOf(t.message);throw r!==-1&&(t.stack=t.stack.substring(0,r)+n+t.stack.substring(r+t.message.length)),t.message=n,t}let r=n.find(e=>e instanceof xt||e instanceof Ye||e instanceof Xe||e instanceof ht||e instanceof Qe||e instanceof $e||e instanceof tt||e instanceof it||e instanceof at||e instanceof wt||e instanceof Et);if(r)throw new jt(`Unsupported token "${r.toSource()}" while parsing css selector "${e}". Did you mean to CSS.escape it?`);let i=0,a=new Set;function o(){return new jt(`Unexpected token "${n[i].toSource()}" while parsing css selector "${e}". Did you mean to CSS.escape it?`)}function s(){for(;n[i]instanceof Ze;)i++}function c(e=i){return n[e]instanceof yt}function l(e=i){return n[e]instanceof Ct}function u(e=i){return n[e]instanceof Tt}function d(e=i){return n[e]instanceof nt}function f(e=i){return n[e]instanceof ct}function p(e=i){return n[e]instanceof lt}function m(e=i){return n[e]instanceof bt}function h(e=i){return n[e]instanceof _t&&n[e].value===`*`}function g(e=i){return n[e]instanceof gt}function _(e=i){return n[e]instanceof _t&&[`>`,`+`,`~`].includes(n[e].value)}function v(e=i){return d(e)||p(e)||g(e)||_(e)||n[e]instanceof Ze}function y(){let e=[b()];for(;s(),d();)i++,e.push(b());return e}function b(){return s(),u()||l()?n[i++].value:x()}function x(){let e={simples:[]};for(s(),_()?e.simples.push({selector:{functions:[{name:`scope`,args:[]}]},combinator:``}):e.simples.push({selector:S(),combinator:``});;){if(s(),_())e.simples[e.simples.length-1].combinator=n[i++].value,s();else if(v())break;e.simples.push({combinator:``,selector:S()})}return e}function S(){let e=``,r=[];for(;!v();)if(c()||h())e+=n[i++].toSource();else if(n[i]instanceof St)e+=n[i++].toSource();else if(n[i]instanceof _t&&n[i].value===`.`)if(i++,c())e+=`.`+n[i++].toSource();else throw o();else if(n[i]instanceof et)if(i++,c())if(!t.has(n[i].value.toLowerCase()))e+=`:`+n[i++].toSource();else{let e=n[i++].value.toLowerCase();r.push({name:e,args:[]}),a.add(e)}else if(m()){let c=n[i++].value.toLowerCase();if(t.has(c)?(r.push({name:c,args:y()}),a.add(c)):e+=`:${c}(${C()})`,s(),!p())throw o();i++}else throw o();else if(n[i]instanceof ot){for(e+=`[`,i++;!(n[i]instanceof st)&&!g();)e+=n[i++].toSource();if(!(n[i]instanceof st))throw o();e+=`]`,i++}else throw o();if(!e&&!r.length)throw o();return{css:e||void 0,functions:r}}function C(){let e=``,t=1;for(;!g()&&((f()||m())&&t++,p()&&t--,t);)e+=n[i++].toSource();return e}let w=y();if(!g())throw o();if(w.some(e=>typeof e!=`object`||!(`simples`in e)))throw new jt(`Error while parsing css selector "${e}". Did you mean to CSS.escape it?`);return{selector:w,names:Array.from(a)}}var Nt=new Set([`internal:has`,`internal:has-not`,`internal:and`,`internal:or`,`internal:chain`,`left-of`,`right-of`,`above`,`below`,`near`]),Pt=new Set([`left-of`,`right-of`,`above`,`below`,`near`]),Ft=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 It(e){let t=Vt(e),n=[];for(let e of t.parts){if(e.name===`css`||e.name===`css:light`){e.name===`css:light`&&(e.body=`:light(`+e.body+`)`);let t=Mt(e.body,Ft);n.push({name:`css`,body:t.selector,source:e.body});continue}if(Nt.has(e.name)){let t,r;try{let n=JSON.parse(`[`+e.body+`]`);if(!Array.isArray(n)||n.length<1||n.length>2||typeof n[0]!=`string`)throw new jt(`Malformed selector: ${e.name}=`+e.body);if(t=n[0],n.length===2){if(typeof n[1]!=`number`||!Pt.has(e.name))throw new jt(`Malformed selector: ${e.name}=`+e.body);r=n[1]}}catch{throw new jt(`Malformed selector: ${e.name}=`+e.body)}let i={name:e.name,source:e.body,body:{parsed:It(t),distance:r}},a=[...i.body.parsed.parts].reverse().find(e=>e.name===`internal:control`&&e.body===`enter-frame`),o=a?i.body.parsed.parts.indexOf(a):-1,s=n[0]?.name===`internal:control`&&n[0].body===`any-frame`?n.slice(1):n;if(o!==-1&&Rt(i.body.parsed.parts.slice(0,o+1),s.slice(0,o+1))&&(i.body.parsed.parts.splice(0,o+1),i.body.parsed.capture!==void 0)){if(i.body.parsed.capture<=o)throw new jt(`Can not capture the selector before diving into the frame. Only use * after the last frame has been selected`);i.body.parsed.capture-=o+1}n.push(i);continue}n.push({...e,source:e.body})}if(Nt.has(n[0].name))throw new jt(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}var Lt=`internal:control=any-frame`;function Rt(e,t){return zt({parts:e})===zt({parts:t})}function zt(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);let a=i?n.name+`=`:``;return`${r===e.capture?`*`:``}${a}${n.source}`}).join(` >> `)}function Bt(e,t){let n=(e,r)=>{for(let i of e.parts)t(i,r),Nt.has(i.name)&&n(i.body.parsed,!0)};n(e,!1)}function Vt(e){let t=0,n,r=0,i={parts:[]},a=()=>{let n=e.substring(r,t).trim(),a=n.indexOf(`=`),o,s;a!==-1&&n.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(o=n.substring(0,a).trim(),s=n.substring(a+1)):n.length>1&&n[0]===`"`&&n[n.length-1]===`"`||n.length>1&&n[0]===`'`&&n[n.length-1]===`'`?(o=`text`,s=n):/^\(*\/\//.test(n)||n.startsWith(`..`)?(o=`xpath`,s=n):(o=`css`,s=n);let c=!1;if(o[0]===`*`&&(c=!0,o=o.substring(1)),i.parts.push({name:o,body:s}),c){if(i.capture!==void 0)throw new jt(`Only one of the selectors can capture using * modifier`);i.capture=i.parts.length-1}};if(!e.includes(`>>`))return t=e.length,a(),i;let o=()=>{let n=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!n&&!!n[1]};for(;t<e.length;){let i=e[t];i===`\\`&&t+1<e.length?t+=2:i===n?(n=void 0,t++):!n&&(i===`"`||i===`'`||i==="`")&&!o()?(n=i,t++):!n&&i===`>`&&e[t+1]===`>`?(a(),t+=2,r=t):t++}return a(),i}function Ht(e,t){let n=0,r=e.length===0,i=()=>e[n]||``,a=()=>{let t=i();return++n,r=n>=e.length,t},o=t=>{throw r?new jt(`Unexpected end of selector while parsing selector \`${e}\``):new jt(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(t?` during `+t:``))};function s(){for(;!r&&/\s/.test(i());)a()}function c(e){return e>=`€`||e>=`0`&&e<=`9`||e>=`A`&&e<=`Z`||e>=`a`&&e<=`z`||e>=`0`&&e<=`9`||e===`_`||e===`-`}function l(){let e=``;for(s();!r&&c(i());)e+=a();return e}function u(e){let t=a();for(t!==e&&o(`parsing quoted string`);!r&&i()!==e;)i()===`\\`&&a(),t+=a();return i()!==e&&o(`parsing quoted string`),t+=a(),t}function d(){a()!==`/`&&o(`parsing regular expression`);let t=``,n=!1;for(;!r;){if(i()===`\\`)t+=a(),r&&o(`parsing regular expression`);else if(n&&i()===`]`)n=!1;else if(!n&&i()===`[`)n=!0;else if(!n&&i()===`/`)break;t+=a()}a()!==`/`&&o(`parsing regular expression`);let s=``;for(;!r&&i().match(/[dgimsuvy]/);)s+=a();try{return new RegExp(t,s)}catch(t){throw new jt(`Error while parsing selector \`${e}\`: ${t.message}`)}}function f(){let e=``;return s(),e=i()===`'`||i()===`"`?u(i()).slice(1,-1):l(),e||o(`parsing property path`),e}function p(){s();let e=``;return r||(e+=a()),!r&&e!==`=`&&(e+=a()),[`=`,`*=`,`^=`,`$=`,`|=`,`~=`].includes(e)||o(`parsing operator`),e}function m(){a();let n=[];for(n.push(f()),s();i()===`.`;)a(),n.push(f()),s();if(i()===`]`)return a(),{name:n.join(`.`),jsonPath:n,op:`<truthy>`,value:null,caseSensitive:!1};let l=p(),m,h=!0;if(s(),i()===`/`){if(l!==`=`)throw new jt(`Error while parsing selector \`${e}\` - cannot use ${l} in attribute with regular expression`);m=d()}else if(i()===`'`||i()===`"`)m=u(i()).slice(1,-1),s(),i()===`i`||i()===`I`?(h=!1,a()):(i()===`s`||i()===`S`)&&(h=!0,a());else{for(m=``;!r&&(c(i())||i()===`+`||i()===`.`);)m+=a();m===`true`?m=!0:m===`false`?m=!1:t||(m=+m,Number.isNaN(m)&&o(`parsing attribute value`))}if(s(),i()!==`]`&&o(`parsing attribute value`),a(),l!==`=`&&typeof m!=`string`)throw new jt(`Error while parsing selector \`${e}\` - cannot use ${l} in attribute with non-string matching value - ${m}`);return{name:n.join(`.`),jsonPath:n,op:l,value:m,caseSensitive:h}}let h={name:``,attributes:[]};for(h.name=l(),s();i()===`[`;)h.attributes.push(m()),s();if(r||o(void 0),!h.name&&!h.attributes.length)throw new jt(`Error while parsing selector \`${e}\` - selector cannot be empty`);return h}function Ut(e,t){try{let n=It(t);return Wt(n)||qt(new Xt[e],n,!1,1)[0]}catch{return t}}function Wt(e){let t=e.parts[e.parts.length-1];if(t?.name===`internal:describe`){let e=JSON.parse(t.body);if(typeof e==`string`)return e}}function Gt(e,t,n=!1){return Kt(e,t,n,1)[0]}function Kt(e,t,n=!1,r=20,i){try{return qt(new Xt[e](i),It(t),n,r)}catch{return[t]}}function qt(e,t,n=!1,r=20){let i=[...t.parts],a=[],o=n?`frame-locator`:`page`;for(let t=0;t<i.length;t++){let n=i[t],s=o;if(o=`locator`,n.name===`internal:describe`)continue;if(n.name===`nth`){n.body===`0`?a.push([e.generateLocator(s,`first`,``),e.generateLocator(s,`nth`,`0`)]):n.body===`-1`?a.push([e.generateLocator(s,`last`,``),e.generateLocator(s,`nth`,`-1`)]):a.push([e.generateLocator(s,`nth`,n.body)]);continue}if(n.name===`visible`){let t=[];n.body===`true`&&t.push(e.generateLocator(s,`visible`,``)),t.push(e.generateLocator(s,`filter-visible`,n.body),e.generateLocator(s,`default`,`visible=${n.body}`)),a.push(t);continue}if(n.name===`internal:text`){let{exact:t,text:r}=Yt(n.body);a.push([e.generateLocator(s,`text`,r,{exact:t})]);continue}if(n.name===`internal:has-text`){let{exact:t,text:r}=Yt(n.body);if(!t){a.push([e.generateLocator(s,`has-text`,r,{exact:t})]);continue}}if(n.name===`internal:has-not-text`){let{exact:t,text:r}=Yt(n.body);if(!t){a.push([e.generateLocator(s,`has-not-text`,r,{exact:t})]);continue}}if(n.name===`internal:has`){let t=qt(e,n.body.parsed,!1,r);a.push(t.map(t=>e.generateLocator(s,`has`,t)));continue}if(n.name===`internal:has-not`){let t=qt(e,n.body.parsed,!1,r);a.push(t.map(t=>e.generateLocator(s,`hasNot`,t)));continue}if(n.name===`internal:and`){let t=qt(e,n.body.parsed,!1,r);a.push(t.map(t=>e.generateLocator(s,`and`,t)));continue}if(n.name===`internal:or`){let t=qt(e,n.body.parsed,!1,r);a.push(t.map(t=>e.generateLocator(s,`or`,t)));continue}if(n.name===`internal:chain`){let t=qt(e,n.body.parsed,!1,r);a.push(t.map(t=>e.generateLocator(s,`chain`,t)));continue}if(n.name===`internal:label`){let{exact:t,text:r}=Yt(n.body);a.push([e.generateLocator(s,`label`,r,{exact:t})]);continue}if(n.name===`internal:role`){let t=Ht(n.body,!0),r={attrs:[]};for(let e of t.attributes)if(e.name===`name`||e.name===`description`){if(typeof e.value==`string`){if(r.exact!==void 0&&r.exact!==e.caseSensitive)throw Error(`Conflicting exactness in internal:role selector: ${zt({parts:[n]})}`);r.exact=e.caseSensitive}r[e.name]=e.value}else e.name===`level`&&typeof e.value==`string`&&(e.value=+e.value),r.attrs.push({name:e.name===`include-hidden`?`includeHidden`:e.name,value:e.value});a.push([e.generateLocator(s,`role`,t.name,r)]);continue}if(n.name===`internal:testid`){let{value:t}=Ht(n.body,!0).attributes[0];a.push([e.generateLocator(s,`test-id`,t)]);continue}if(n.name===`internal:attr`){let{name:t,value:r,caseSensitive:i}=Ht(n.body,!0).attributes[0],o=r,c=!!i;if(t===`placeholder`){a.push([e.generateLocator(s,`placeholder`,o,{exact:c})]);continue}if(t===`alt`){a.push([e.generateLocator(s,`alt`,o,{exact:c})]);continue}if(t===`title`){a.push([e.generateLocator(s,`title`,o,{exact:c})]);continue}}if(n.name===`internal:control`&&n.body===`any-frame`){a.push([e.generateLocator(s,`any-frame`,``)]),o=`frame-locator`;continue}if(n.name===`internal:control`&&n.body===`enter-frame`){let n=a[a.length-1],r=i[t-1],c=n.map(t=>e.chainLocators([t,e.generateLocator(s,`frame`,``)]));[`xpath`,`css`].includes(r.name)&&c.push(e.generateLocator(s,`frame-locator`,zt({parts:[r]})),e.generateLocator(s,`frame-locator`,zt({parts:[r]},!0))),n.splice(0,n.length,...c),o=`frame-locator`;continue}let c=i[t+1],l=zt({parts:[n]}),u=e.generateLocator(s,`default`,l);if(c&&[`internal:has-text`,`internal:has-not-text`].includes(c.name)){let{exact:n,text:r}=Yt(c.body);if(!n){let i=e.generateLocator(`locator`,c.name===`internal:has-text`?`has-text`:`has-not-text`,r,{exact:n}),o={};c.name===`internal:has-text`?o.hasText=r:o.hasNotText=r;let d=e.generateLocator(s,`default`,l,o);a.push([e.chainLocators([u,i]),d]),t++;continue}}let d;if([`xpath`,`css`].includes(n.name)){let t=zt({parts:[n]},!0);d=e.generateLocator(s,`default`,t)}a.push([u,d].filter(Boolean))}return Jt(e,a,r)}function Jt(e,t,n){let r=t.map(()=>``),i=[],a=o=>{if(o===t.length)return i.push(e.chainLocators(r)),i.length<n;for(let e of t[o])if(r[o]=e,!a(o+1))return!1;return!0};return a(0),i}function Yt(e){let t=!1,n=e.match(/^\/(.*)\/([dgimsuvy]*)$/);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})}var Xt={javascript:class{constructor(e){this.preferredQuote=e}generateLocator(e,t,n,r={}){switch(t){case`default`:return r.hasText===void 0?r.hasNotText===void 0?`locator(${this.quote(n)})`:`locator(${this.quote(n)}, { hasNotText: ${this.toHasText(r.hasNotText)} })`:`locator(${this.quote(n)}, { hasText: ${this.toHasText(r.hasText)} })`;case`frame-locator`:return`frameLocator(${this.quote(n)})`;case`frame`:return`contentFrame()`;case`any-frame`:return`frameLocator()`;case`nth`:return`nth(${n})`;case`first`:return`first()`;case`last`:return`last()`;case`visible`:return`visible()`;case`filter-visible`:return`filter({ visible: ${n===`true`?`true`:`false`} })`;case`role`:let e=[];$t(r.name)?e.push(`name: ${this.regexToSourceString(r.name)}`):typeof r.name==`string`&&e.push(`name: ${this.quote(r.name)}`),$t(r.description)?e.push(`description: ${this.regexToSourceString(r.description)}`):typeof r.description==`string`&&e.push(`description: ${this.quote(r.description)}`),r.exact&&(typeof r.name==`string`||typeof r.description==`string`)&&e.push(`exact: true`);for(let{name:t,value:n}of r.attrs)e.push(`${t}: ${typeof n==`string`?this.quote(n):n}`);let i=e.length?`, { ${e.join(`, `)} }`:``;return`getByRole(${this.quote(n)}${i})`;case`has-text`:return`filter({ hasText: ${this.toHasText(n)} })`;case`has-not-text`:return`filter({ hasNotText: ${this.toHasText(n)} })`;case`has`:return`filter({ has: ${n} })`;case`hasNot`:return`filter({ hasNot: ${n} })`;case`and`:return`and(${n})`;case`or`:return`or(${n})`;case`chain`:return`locator(${n})`;case`test-id`:return`getByTestId(${this.toTestIdValue(n)})`;case`text`:return this.toCallWithExact(`getByText`,n,!!r.exact);case`alt`:return this.toCallWithExact(`getByAltText`,n,!!r.exact);case`placeholder`:return this.toCallWithExact(`getByPlaceholder`,n,!!r.exact);case`label`:return this.toCallWithExact(`getByLabel`,n,!!r.exact);case`title`:return this.toCallWithExact(`getByTitle`,n,!!r.exact);default:throw Error(`Unknown selector kind `+t)}}chainLocators(e){return e.join(`.`)}regexToSourceString(e){return t(String(e))}toCallWithExact(e,t,n){return $t(t)?`${e}(${this.regexToSourceString(t)})`:n?`${e}(${this.quote(t)}, { exact: true })`:`${e}(${this.quote(t)})`}toHasText(e){return $t(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return $t(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return c(e,this.preferredQuote??`'`)}},python:class{generateLocator(e,t,r,i={}){switch(t){case`default`:return i.hasText===void 0?i.hasNotText===void 0?`locator(${this.quote(r)})`:`locator(${this.quote(r)}, has_not_text=${this.toHasText(i.hasNotText)})`:`locator(${this.quote(r)}, has_text=${this.toHasText(i.hasText)})`;case`frame-locator`:return`frame_locator(${this.quote(r)})`;case`frame`:return`content_frame`;case`any-frame`:return`frame_locator()`;case`nth`:return`nth(${r})`;case`first`:return`first`;case`last`:return`last`;case`visible`:return`visible`;case`filter-visible`:return`filter(visible=${r===`true`?`True`:`False`})`;case`role`:let e=[];$t(i.name)?e.push(`name=${this.regexToString(i.name)}`):typeof i.name==`string`&&e.push(`name=${this.quote(i.name)}`),$t(i.description)?e.push(`description=${this.regexToString(i.description)}`):typeof i.description==`string`&&e.push(`description=${this.quote(i.description)}`),i.exact&&(typeof i.name==`string`||typeof i.description==`string`)&&e.push(`exact=True`);for(let{name:t,value:r}of i.attrs){let i=typeof r==`string`?this.quote(r):r;typeof r==`boolean`&&(i=r?`True`:`False`),e.push(`${n(t)}=${i}`)}let a=e.length?`, ${e.join(`, `)}`:``;return`get_by_role(${this.quote(r)}${a})`;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 Error(`Unknown selector kind `+t)}}chainLocators(e){return e.join(`.`)}regexToString(e){let n=Qt(e,`re`,Zt.python);return`re.compile(r"${t(e.source).replace(/\\\//,`/`).replace(/"/g,`\\"`)}"${n})`}toCallWithExact(e,t,n){return $t(t)?`${e}(${this.regexToString(t)})`:n?`${e}(${this.quote(t)}, exact=True)`:`${e}(${this.quote(t)})`}toHasText(e){return $t(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return $t(e)?this.regexToString(e):this.quote(e)}quote(e){return c(e,`"`)}},java:class{generateLocator(e,t,i,a={}){let o;switch(e){case`page`:o=`Page`;break;case`frame-locator`:o=`FrameLocator`;break;case`locator`:o=`Locator`;break}switch(t){case`default`:return a.hasText===void 0?a.hasNotText===void 0?`locator(${this.quote(i)})`:`locator(${this.quote(i)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(a.hasNotText)}))`:`locator(${this.quote(i)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(a.hasText)}))`;case`frame-locator`:return`frameLocator(${this.quote(i)})`;case`frame`:return`contentFrame()`;case`any-frame`:return`frameLocator()`;case`nth`:return`nth(${i})`;case`first`:return`first()`;case`last`:return`last()`;case`visible`:return`visible()`;case`filter-visible`:return`filter(new ${o}.FilterOptions().setVisible(${i===`true`?`true`:`false`}))`;case`role`:let e=[];$t(a.name)?e.push(`.setName(${this.regexToString(a.name)})`):typeof a.name==`string`&&e.push(`.setName(${this.quote(a.name)})`),$t(a.description)?e.push(`.setDescription(${this.regexToString(a.description)})`):typeof a.description==`string`&&e.push(`.setDescription(${this.quote(a.description)})`),a.exact&&(typeof a.name==`string`||typeof a.description==`string`)&&e.push(`.setExact(true)`);for(let{name:t,value:n}of a.attrs)e.push(`.set${r(t)}(${typeof n==`string`?this.quote(n):n})`);let s=e.length?`, new ${o}.GetByRoleOptions()${e.join(``)}`:``;return`getByRole(AriaRole.${n(i).toUpperCase()}${s})`;case`has-text`:return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(i)}))`;case`has-not-text`:return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(i)}))`;case`has`:return`filter(new ${o}.FilterOptions().setHas(${i}))`;case`hasNot`:return`filter(new ${o}.FilterOptions().setHasNot(${i}))`;case`and`:return`and(${i})`;case`or`:return`or(${i})`;case`chain`:return`locator(${i})`;case`test-id`:return`getByTestId(${this.toTestIdValue(i)})`;case`text`:return this.toCallWithExact(o,`getByText`,i,!!a.exact);case`alt`:return this.toCallWithExact(o,`getByAltText`,i,!!a.exact);case`placeholder`:return this.toCallWithExact(o,`getByPlaceholder`,i,!!a.exact);case`label`:return this.toCallWithExact(o,`getByLabel`,i,!!a.exact);case`title`:return this.toCallWithExact(o,`getByTitle`,i,!!a.exact);default:throw Error(`Unknown selector kind `+t)}}chainLocators(e){return e.join(`.`)}regexToString(e){let n=Qt(e,`Pattern`,Zt.java);return`Pattern.compile(${this.quote(t(e.source))}${n})`}toCallWithExact(e,t,n,i){return $t(n)?`${t}(${this.regexToString(n)})`:i?`${t}(${this.quote(n)}, new ${e}.${r(t)}Options().setExact(true))`:`${t}(${this.quote(n)})`}toHasText(e){return $t(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return $t(e)?this.regexToString(e):this.quote(e)}quote(e){return c(e,`"`)}},csharp:class{generateLocator(e,t,n,i={}){switch(t){case`default`:return i.hasText===void 0?i.hasNotText===void 0?`Locator(${this.quote(n)})`:`Locator(${this.quote(n)}, new() { ${this.toHasNotText(i.hasNotText)} })`:`Locator(${this.quote(n)}, new() { ${this.toHasText(i.hasText)} })`;case`frame-locator`:return`FrameLocator(${this.quote(n)})`;case`frame`:return`ContentFrame`;case`any-frame`:return`FrameLocator()`;case`nth`:return`Nth(${n})`;case`first`:return`First`;case`last`:return`Last`;case`visible`:return`Visible`;case`filter-visible`:return`Filter(new() { Visible = ${n===`true`?`true`:`false`} })`;case`role`:let e=[];$t(i.name)?e.push(`NameRegex = ${this.regexToString(i.name)}`):typeof i.name==`string`&&e.push(`Name = ${this.quote(i.name)}`),$t(i.description)?e.push(`DescriptionRegex = ${this.regexToString(i.description)}`):typeof i.description==`string`&&e.push(`Description = ${this.quote(i.description)}`),i.exact&&(typeof i.name==`string`||typeof i.description==`string`)&&e.push(`Exact = true`);for(let{name:t,value:n}of i.attrs)e.push(`${r(t)} = ${typeof n==`string`?this.quote(n):n}`);let a=e.length?`, new() { ${e.join(`, `)} }`:``;return`GetByRole(AriaRole.${r(n)}${a})`;case`has-text`:return`Filter(new() { ${this.toHasText(n)} })`;case`has-not-text`:return`Filter(new() { ${this.toHasNotText(n)} })`;case`has`:return`Filter(new() { Has = ${n} })`;case`hasNot`:return`Filter(new() { HasNot = ${n} })`;case`and`:return`And(${n})`;case`or`:return`Or(${n})`;case`chain`:return`Locator(${n})`;case`test-id`:return`GetByTestId(${this.toTestIdValue(n)})`;case`text`:return this.toCallWithExact(`GetByText`,n,!!i.exact);case`alt`:return this.toCallWithExact(`GetByAltText`,n,!!i.exact);case`placeholder`:return this.toCallWithExact(`GetByPlaceholder`,n,!!i.exact);case`label`:return this.toCallWithExact(`GetByLabel`,n,!!i.exact);case`title`:return this.toCallWithExact(`GetByTitle`,n,!!i.exact);default:throw Error(`Unknown selector kind `+t)}}chainLocators(e){return e.join(`.`)}regexToString(e){let n=Qt(e,`RegexOptions`,Zt.csharp);return`new Regex(${this.quote(t(e.source))}${n})`}toCallWithExact(e,t,n){return $t(t)?`${e}(${this.regexToString(t)})`:n?`${e}(${this.quote(t)}, new() { Exact = true })`:`${e}(${this.quote(t)})`}toHasText(e){return $t(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return $t(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return $t(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return c(e,`"`)}},jsonl:class{generateLocator(e,t,n,r={}){return JSON.stringify({kind:t,body:n,options:r})}chainLocators(e){let t=e.map(e=>JSON.parse(e));for(let e=0;e<t.length-1;++e){let n=t[e];for(;n.next;)n=n.next;n.next=t[e+1]}return JSON.stringify(t[0])}}},Zt={python:{i:`IGNORECASE`,m:`MULTILINE`,s:`DOTALL`},java:{i:`CASE_INSENSITIVE`,m:`MULTILINE`,s:`DOTALL`},csharp:{i:`IgnoreCase`,m:`Multiline`,s:`Singleline`}};function Qt(e,t,n){let r=[...e.flags].filter(e=>e in n).map(e=>`${t}.${n[e]}`);return r.length?`, ${r.join(` | `)}`:``}function $t(e){return e instanceof RegExp}function en(e,t,n){return tn(e,t,n)?.replaceAll(`
`,`\\n`)}function tn(e,t,n){if(e)for(let r of t.split(`|`)){if(r===`url`)try{let t=new URL(e[r]);return t.protocol===`data:`?t.protocol:[`about:`,`chrome:`,`edge:`].includes(t.protocol)?e[r]:t.host+t.pathname+t.search}catch{if(e[r]!==void 0)return e[r]}if(r===`timeNumber`&&e[r]!==void 0)return new Date(e[r]).toString();let t=nn(e,r);if(t!==void 0)return r===`selector`||r.endsWith(`.selector`)?Ut(n??`javascript`,t):t}}function nn(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}if(r!==void 0)return String(r)}function rn(e,t){return(e.title??je(e)?.title??e.method).replace(/\{([^}]+)\}/g,(n,r)=>en(e.params,r,t)??n)}function an(e,t){let n=e.subtitle??je(e)?.subtitle;if(n===void 0)return;let r=!0,i=n.replace(/\{([^}]+)\}/g,(n,i)=>{let a=en(e.params,i,t);return a===void 0&&(r=!1),a??n});return r?i:void 0}function on(e,t){let n=rn(e,t),r=an(e,t);return r?`${n} ${r}`:n}function sn(e){return je(e)?.group}var cn=Symbol(`prevByEndTime`),ln=Symbol(`nextByStartTime`);function un(e){return e.pageref??e._serviceWorkerRef??e._apiRequestRef}var dn=class{constructor(e,t){this.resourceOwnerRefToTitle=new Map,this._eventsForAction=new Map,this._screenshots=new Map,this._ariaSnapshots=new Map,this._domSnapshots=new Set;let n=t.find(e=>e.origin===`library`);this.traceUri=e,this.browserName=n?.browserName||``,this.sdkLanguage=n?.sdkLanguage,this.channel=n?.channel,this.testIdAttributeName=n?.testIdAttributeName,this.platform=n?.platform||``,this.playwrightVersion=t.find(e=>e.playwrightVersion)?.playwrightVersion,this.title=n?.title||``,this.options=n?.options||{},this.testTimeout=t.find(e=>e.origin===`testRunner`)?.testTimeout,this.annotations=t.find(e=>e.origin===`testRunner`)?.annotations,this.actions=fn(t),this.pages=[].concat(...t.map(e=>e.pages)),this.videos=[],this.wallTime=t.map(e=>e.wallTime).reduce((e,t)=>Math.min(e||Number.MAX_VALUE,t),Number.MAX_VALUE),this.startTime=t.map(e=>e.startTime).reduce((e,t)=>Math.min(e,t),Number.MAX_VALUE),this.endTime=t.map(e=>e.endTime).reduce((e,t)=>Math.max(e,t),Number.MIN_VALUE),this.events=[].concat(...t.map(e=>e.events)),this.stdio=[].concat(...t.map(e=>e.stdio)),this.errors=[].concat(...t.map(e=>e.errors)),this.hasSource=t.some(e=>e.hasSource),this.hasStepData=t.some(e=>e.origin===`testRunner`),this.resources=[];for(let e=0;e<t.length;++e)for(let n of t[e].resources)this.resources.push({...n,id:`${un(n)??e}-${n.startedDateTime}-${n.request.url}`});for(let e of t){for(let t of e.screenshots||[])this._screenshots.set(`${t.callId}/${t.phase}`,t);for(let t of e.ariaSnapshots||[])this._ariaSnapshots.set(`${t.callId}/${t.phase}`,t);for(let t of e.domSnapshots||[])this._domSnapshots.add(`${t.callId}/${t.phase}`);this.videos.push(...e.videos||[])}this.hasDomSnapshots=!!this._domSnapshots.size,this.hasAriaSnapshots=!!this._screenshots.size||!!this._ariaSnapshots.size,this.attachments=this.actions.flatMap(t=>t.attachments?.map(n=>({...n,callId:t.callId,traceUri:e}))??[]),this.visibleAttachments=this.attachments.filter(e=>!e.name.startsWith(`_`)),this.pages.forEach((e,t)=>this.resourceOwnerRefToTitle.set(e.pageId,`page#`+(t+1))),this.events.sort((e,t)=>e.time-t.time),this.resources.sort((e,t)=>e._monotonicTime-t._monotonicTime);let r=0,i=0;for(let e of this.resources)e._serviceWorkerRef&&!this.resourceOwnerRefToTitle.has(e._serviceWorkerRef)&&this.resourceOwnerRefToTitle.set(e._serviceWorkerRef,`service-worker#${++r}`),e._apiRequestRef&&!this.resourceOwnerRefToTitle.has(e._apiRequestRef)&&this.resourceOwnerRefToTitle.set(e._apiRequestRef,`api#${++i}`);this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=vn(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(let e of this.actions)e.group=e.group??sn({type:e.class,method:e.method}),e.group&&this.actionCounters.set(e.group,1+(this.actionCounters.get(e.group)||0))}createRelativeUrl(e){let t=new URL(`http://localhost/`+e);return t.searchParams.set(`trace`,this.traceUri),t.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}screenshotForCall(e,t){return this._screenshots.get(`${e}/${t}`)}hasDomSnapshotForCall(e,t){return this._domSnapshots.has(`${e}/${t}`)}ariaSnapshotForCall(e,t){return this._ariaSnapshots.get(`${e}/${t}`)}eventsForAction(e){let t=this._eventsForAction.get(e);if(t)return t;let n=_n(e);for(;n&&n.class===`Route`;)n=_n(n);return t=this.events.filter(t=>t.time>=e.startTime&&(!n||t.time<n.startTime)),this._eventsForAction.set(e,t),t}stats(e){let t=0,n=0;for(let r of this.eventsForAction(e)){if(r.type===`console`){let e=r.messageType;e===`warning`?++n:e===`error`&&++t}r.type===`event`&&r.method===`pageError`&&++t}return{errors:t,warnings:n}}filteredActions(e){let t=new Set(e);return this.actions.filter(e=>!e.group||t.has(e.group))}renderActionTree(e){let{rootItem:t}=hn(this.filteredActions(e??[])),n=[],r=(e,t)=>{let i=on({...e.action,type:e.action.class});n.push(`${t}${i||e.id}`);for(let n of e.children)r(n,t+`  `)};return t.children.forEach(e=>r(e,``)),n}_errorDescriptorsFromActions(){let e=[];for(let t of this.actions||[])t.error?.message&&e.push({action:t,stack:t.stack,message:t.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,t)=>({stack:e.stack,message:e.message}))}};function fn(e){let t=pn(e);t.sort((e,t)=>t.parentId===e.callId?1:e.parentId===t.callId?-1:e.endTime-t.endTime);for(let e=1;e<t.length;++e)t[e][cn]=t[e-1];t.sort((e,t)=>t.parentId===e.callId?-1:e.parentId===t.callId?1:e.startTime-t.startTime);for(let e=0;e+1<t.length;++e)t[e][ln]=t[e+1];return t}function pn(e){let t=new Map,n=e.filter(e=>e.origin===`library`),r=e.filter(e=>e.origin===`testRunner`);if(!r.length||!n.length)return e.map(e=>e.actions.map(e=>({...e}))).flat();let i=e=>e.wallTime-e.monotonicTime,a=r.find(e=>e.monotonicTime);for(let e of n)a&&e.monotonicTime&&mn(e,i(e)-i(a));for(let e of n)for(let n of e.actions)t.set(n.callId,{...n});for(let e of r)for(let n of e.actions){let e=t.get(n.callId);if(!e){t.set(n.callId,{...n});continue}n.error&&(e.error=n.error),n.attachments&&(e.attachments=n.attachments),n.annotations&&(e.annotations=n.annotations),n.parentId&&(e.parentId=n.parentId),n.group&&(e.group=n.group),e.startTime=n.startTime,e.endTime=n.endTime}return[...t.values()]}function mn(e,t){if(t){e.startTime+=t,e.endTime+=t,e.monotonicTime+=t;for(let n of e.actions)n.startTime&&(n.startTime+=t),n.endTime&&(n.endTime+=t);for(let n of e.events)n.time+=t;for(let n of e.stdio)n.timestamp+=t;for(let n of e.pages)for(let e of n.screencastFrames)e.timestamp+=t;for(let n of e.videos||[])n.timestamp+=t;for(let n of e.screenshots||[])n.timestamp+=t;for(let n of e.ariaSnapshots||[])n.timestamp+=t;for(let n of e.resources)n._monotonicTime&&(n._monotonicTime+=t)}}function hn(e){let t=new Map;for(let n of e)t.set(n.callId,{id:n.callId,parent:void 0,children:[],action:n});let n={action:{...yn},id:``,parent:void 0,children:[]};for(let e of t.values()){n.action.startTime=Math.min(n.action.startTime,e.action.startTime),n.action.endTime=Math.max(n.action.endTime,e.action.endTime);let r=e.action.parentId&&t.get(e.action.parentId)||n;r.children.push(e),e.parent=r}let r=e=>{for(let t of e.children)t.action.stack=t.action.stack??e.action.stack,r(t)};return r(n),{rootItem:n,itemMap:t}}function gn(e){return e[cn]}function _n(e){return e[ln]}function vn(e,t){let n=new Map;for(let t of e)for(let e of t.stack||[]){let t=n.get(e.file);t||(t={errors:[],content:void 0},n.set(e.file,t))}for(let e of t){let{action:t,stack:r,message:i}=e;!t||!r||n.get(r[0].file)?.errors.push({line:r[0].line||0,message:i})}return n}var yn={type:`action`,callId:``,startTime:0,endTime:0,class:``,method:``,params:{},log:[]},bn=b((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),xn=b(((e,t)=>{t.exports=bn()})),M=xn(),Sn=50,Cn=({sidebarSize:e,sidebarHidden:t=!1,sidebarIsFirst:n=!1,orientation:r=`vertical`,minSidebarSize:i=Sn,settingName:a,sidebar:o,main:s})=>{let c=Math.max(i,e)*window.devicePixelRatio,[l,u]=ae(a?a+`.`+r+`:size`:void 0,c),[d,f]=ae(a?a+`.`+r+`:size`:void 0,c),[p,m]=T.useState(null),[h,g]=E(),_;r===`vertical`?(_=d/window.devicePixelRatio,h&&h.height<_&&(_=h.height-10)):(_=l/window.devicePixelRatio,h&&h.width<_&&(_=h.width-10)),document.body.style.userSelect=p?`none`:`inherit`;let v={};return v=r===`vertical`?n?{top:p?0:_-4,bottom:p?0:void 0,height:p?`initial`:8}:{bottom:p?0:_-4,top:p?0:void 0,height:p?`initial`:8}:n?{left:p?0:_-4,right:p?0:void 0,width:p?`initial`:8}:{right:p?0:_-4,left:p?0:void 0,width:p?`initial`:8},(0,M.jsxs)(`div`,{className:k(`split-view`,r,n&&`sidebar-first`),ref:g,children:[(0,M.jsx)(`div`,{className:`split-view-main`,children:s}),!t&&(0,M.jsx)(`div`,{style:{flexBasis:_},className:`split-view-sidebar`,children:o}),!t&&(0,M.jsx)(`div`,{style:v,className:`split-view-resizer`,onMouseDown:e=>m({offset:r===`vertical`?e.clientY:e.clientX,size:_}),onMouseUp:()=>m(null),onMouseMove:e=>{if(!e.buttons)m(null);else if(p){let t=(r===`vertical`?e.clientY:e.clientX)-p.offset,a=n?p.size+t:p.size-t,o=e.target.parentElement.getBoundingClientRect(),s=Math.min(Math.max(i,a),(r===`vertical`?o.height:o.width)-i);r===`vertical`?f(s*window.devicePixelRatio):u(s*window.devicePixelRatio)}}})]})};function wn(e){if(e<0||!isFinite(e))return`-`;if(e===0)return`0ms`;if(e<1e3)return e.toFixed(0)+`ms`;let t=e/1e3;if(t<60)return t.toFixed(1)+`s`;let n=t/60;if(n<60)return n.toFixed(1)+`m`;let r=n/60;return r<24?r.toFixed(1)+`h`:(r/24).toFixed(1)+`d`}function Tn(e){if(e<0||!isFinite(e))return`-`;if(e===0)return`0`;if(e<1e3)return e.toFixed(0);let t=e/1024;if(t<1e3)return t.toFixed(1)+`K`;let n=t/1024;return n<1e3?n.toFixed(1)+`M`:(n/1024).toFixed(1)+`G`}var En=new Map;function Dn({name:e,rootItem:t,render:n,title:r,icon:i,isError:a,isVisible:o,selectedItem:s,onAccepted:c,onSelected:l,onHighlighted:u,treeState:d,setTreeState:f,noItemsMessage:p,dataTestId:m,autoExpandDepth:h,revealSelectedKey:g}){let _=T.useMemo(()=>An(t,s,d.expandedItems,h||0,o),[t,s,d,h,o]),v=T.useRef(null),[y,b]=T.useState();T.useEffect(()=>{u?.(y)},[u,y]),T.useEffect(()=>{let t=v.current;if(!t)return;let n=()=>{En.set(e,t.scrollTop)};return t.addEventListener(`scroll`,n,{passive:!0}),()=>t.removeEventListener(`scroll`,n)},[e]),T.useEffect(()=>{v.current&&(v.current.scrollTop=En.get(e)||0)},[e]),T.useEffect(()=>{if(g===void 0)return;let e=v.current?.querySelector(`[aria-selected="true"]`);e&&ue(e)},[g]);let x=T.useCallback(e=>{let{expanded:t}=_.get(e);if(t){for(let t=s;t;t=t.parent)if(t===e){l?.(e);break}d.expandedItems.set(e.id,!1)}else d.expandedItems.set(e.id,!0);f({...d})},[_,s,l,d,f]),S=T.useCallback(e=>{let{expanded:t}=_.get(e),n=[e];for(;n.length;){let e=n.pop();n.push(...e.children),d.expandedItems.set(e.id,!t)}f({...d})},[_,d,f]);return(0,M.jsx)(`div`,{className:k(`tree-view vbox`,e+`-tree-view`),"data-testid":m||e+`-tree`,children:(0,M.jsxs)(`div`,{className:k(`tree-view-content`),role:_.size>0?`tree`:void 0,tabIndex:0,onKeyDown:e=>{if(s&&e.key===`Enter`&&e.target===e.currentTarget){c?.(s);return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`&&e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;if(e.stopPropagation(),e.preventDefault(),s&&e.key===`ArrowLeft`){let{expanded:e,parent:t}=_.get(s);e?(d.expandedItems.set(s.id,!1),f({...d})):t&&l?.(t);return}if(s&&e.key===`ArrowRight`){s.children.length&&(d.expandedItems.set(s.id,!0),f({...d}));return}let t=s;if(e.key===`ArrowDown`&&(s?t=_.get(s).next:_.size&&(t=[..._.keys()][0])),e.key===`ArrowUp`){if(s)t=_.get(s).prev;else if(_.size){let e=[..._.keys()];t=e[e.length-1]}}u?.(void 0),t&&l?.(t),b(void 0)},ref:v,children:[p&&_.size===0&&(0,M.jsx)(`div`,{className:`tree-view-empty`,children:p}),t.children.map(e=>_.get(e)&&(0,M.jsx)(On,{item:e,treeItems:_,selectedItem:s,onSelected:l,onAccepted:c,isError:a,toggleExpanded:x,toggleSubtree:S,highlightedItem:y,setHighlightedItem:b,render:n,icon:i,title:r},e.id))]})})}function On({item:e,treeItems:t,selectedItem:n,onSelected:r,highlightedItem:i,setHighlightedItem:a,isError:o,onAccepted:s,toggleExpanded:c,toggleSubtree:l,render:u,title:d,icon:f}){let p=T.useId(),m=T.useRef(null);T.useEffect(()=>{n?.id===e.id&&m.current&&ue(m.current)},[e.id,n?.id]);let h=t.get(e),g=h.depth,_=h.expanded,v=`codicon-blank`;typeof _==`boolean`&&(v=_?`codicon-chevron-down`:`codicon-chevron-right`);let y=u(e),b=_&&e.children.length?e.children:[],x=d?.(e),S=f?.(e)||`codicon-blank`;return(0,M.jsxs)(`div`,{ref:m,role:`treeitem`,"aria-selected":e===n,"aria-expanded":_,"aria-controls":p,title:x,className:`vbox`,style:{flex:`none`},children:[(0,M.jsxs)(`div`,{onDoubleClick:()=>s?.(e),className:k(`tree-view-entry`,n===e&&`selected`,i===e&&`highlighted`,o?.(e)&&`error`),onClick:()=>r?.(e),onMouseEnter:()=>a(e),onMouseLeave:()=>a(void 0),children:[g?Array(g).fill(0).map((e,t)=>(0,M.jsx)(`div`,{className:`tree-view-indent`},`indent-`+t)):void 0,(0,M.jsx)(`div`,{"aria-hidden":`true`,className:`codicon `+v,style:{minWidth:16,marginRight:4},onDoubleClick:e=>{e.preventDefault(),e.stopPropagation()},onClick:t=>{t.stopPropagation(),t.preventDefault(),t.altKey?l(e):c(e)}}),f&&(0,M.jsx)(`div`,{className:`codicon `+S,style:{minWidth:16,marginRight:4},"aria-label":`[`+S.replace(`codicon`,`icon`)+`]`}),typeof y==`string`?(0,M.jsx)(`div`,{style:{textOverflow:`ellipsis`,overflow:`hidden`},children:y}):y]}),!!b.length&&(0,M.jsx)(`div`,{id:p,role:`group`,children:b.map(e=>t.get(e)&&(0,M.jsx)(On,{item:e,treeItems:t,selectedItem:n,onSelected:r,onAccepted:s,isError:o,toggleExpanded:c,toggleSubtree:l,highlightedItem:i,setHighlightedItem:a,render:u,title:d,icon:f},e.id))})]})}function kn(e,t,n){let r=n.get(e.id);if(r!==void 0)return r;let i=t(e),a=i===`if-needed`?e.children.some(e=>kn(e,t,n)):i;return n.set(e.id,a),a}function An(e,t,n,r,i=()=>!0){let a=new Map;if(!kn(e,i,a))return new Map;let o=new Map,s=new Set;for(let e=t?.parent;e;e=e.parent)s.add(e.id);let c=null,l=(t,u)=>{for(let d of t.children){if(!kn(d,i,a))continue;let f=s.has(d.id)||n.get(d.id),p=r>u&&o.size<25&&f!==!1,m=d.children.length?f??p:void 0,h={depth:u,expanded:m,parent:e===t?null:t,next:null,prev:c};c&&(o.get(c).next=d),c=d,o.set(d,h),m&&l(d,u+1)}};return l(e,0),o}var jn=T.createContext(void 0),Mn=()=>T.useContext(jn),N=T.forwardRef(function({children:e,title:t=``,icon:n,disabled:r=!1,toggled:i=!1,onClick:a=()=>{},style:o,testId:s,className:c,ariaLabel:l,errorBadge:u},d){let f=T.useId();return(0,M.jsxs)(`button`,{ref:d,className:k(c,`toolbar-button`,n,i&&`toggled`),onMouseDown:Nn,onClick:a,onDoubleClick:Nn,title:t,disabled:!!r,style:o,"data-testid":s,"aria-label":l||t,"aria-describedby":u?f:void 0,children:[n&&(0,M.jsx)(`span`,{className:`codicon codicon-${n}`,style:e?{marginRight:5}:{}}),e,u&&(0,M.jsx)(`span`,{id:f,className:`toolbar-button-error-badge`,title:u,"aria-label":u})]})}),Nn=e=>{e.stopPropagation(),e.preventDefault()};function Pn(e){return e===`scheduled`?`codicon-clock`:e===`running`?`codicon-loading`:e===`failed`?`codicon-error`:e===`passed`?`codicon-check`:e===`skipped`?`codicon-circle-slash`:`codicon-circle-outline`}function Fn(e){return e===`scheduled`?`Pending`:e===`running`?`Running`:e===`failed`?`Failed`:e===`passed`?`Passed`:e===`skipped`?`Skipped`:`Did not run`}var In=Dn,Ln=({actions:e,selectedAction:t,selectedTime:n,setSelectedTime:r,treeState:i,setTreeState:a,sdkLanguage:o,onSelected:s,onHighlighted:c,revealConsole:l,revealActionAttachment:u,isLive:d,actionFilterText:f})=>{let p=Mn(),{rootItem:m,itemMap:h}=T.useMemo(()=>hn(e),[e]),{selectedItem:g}=T.useMemo(()=>({selectedItem:t?h.get(t.callId):void 0}),[h,t]),_=T.useCallback(e=>!!e.action.error?.message,[]),v=T.useCallback(e=>r({minimum:e.action.startTime,maximum:e.action.endTime}),[r]),y=T.useCallback(e=>{let t=!!u&&!!e.action.attachments?.length;return Rn(e.action,{model:p,sdkLanguage:o,revealConsole:l,revealActionAttachment:()=>u?.(e.action.callId),isLive:d,showDuration:!0,showBadges:!0,showAttachments:t})},[p,d,l,u,o]),b=T.useCallback(e=>{if(!(!n||!e.action||e.action.startTime<=n.maximum&&e.action.endTime>=n.minimum))return!1;if(!f)return!0;let{title:t,subtitle:r}=zn(e.action,o);return(r?`${t} ${r}`:t).toLowerCase().includes(f.toLowerCase())?!0:`if-needed`},[n,f,o]),x=T.useCallback(e=>{s?.(e.action)},[s]),S=T.useCallback(e=>{c?.(e?.action)},[c]),[C,w]=T.useState(),ee=T.useCallback(()=>{r(void 0),w(e=>(e??0)+1)},[r]);return(0,M.jsxs)(`div`,{className:`vbox action-list-container`,children:[n&&(0,M.jsx)(N,{className:`action-list-show-all`,icon:`triangle-left`,onClick:ee,children:`Show all`}),(0,M.jsx)(In,{name:`actions`,rootItem:m,treeState:i,setTreeState:a,selectedItem:g,onSelected:x,onHighlighted:S,onAccepted:v,isError:_,isVisible:b,render:y,autoExpandDepth:f?.trim()?5:0,revealSelectedKey:C})]})},Rn=(e,t)=>{let{model:n,sdkLanguage:r,revealConsole:i,revealActionAttachment:a,isLive:o,showDuration:s,showBadges:c,showAttachments:l}=t,{errors:u,warnings:d}=n?.stats(e)??{errors:0,warnings:0},f=[Bn(u,`error`),Bn(d,`warning`)].filter(Boolean).join(`, `),p=e.class===`Test`&&e.method===`test.step`&&e.annotations?.some(e=>e.type===`skip`),m=``;e.endTime?m=wn(e.endTime-e.startTime):e.error?m=`Timed out`:o||(m=`-`);let{elements:h,title:g,subtitle:_}=zn(e,r);return(0,M.jsxs)(`div`,{className:`action-title vbox`,children:[(0,M.jsxs)(`div`,{className:`hbox`,children:[(0,M.jsx)(`span`,{className:`action-title-method`,title:g,children:h}),(s||c||l||p)&&(0,M.jsx)(`div`,{className:`spacer`}),l&&(0,M.jsx)(N,{icon:`attach`,title:`Open Attachment`,onClick:()=>a?.()}),s&&!p&&(0,M.jsx)(`div`,{className:`action-duration`,children:m||(0,M.jsx)(`span`,{className:`codicon codicon-loading`})}),p&&(0,M.jsx)(`span`,{className:k(`action-skipped`,`codicon`,Pn(`skipped`)),title:`skipped`}),c&&!!f&&(0,M.jsxs)(N,{className:`action-icons`,title:`Reveal console`,ariaLabel:`Reveal console, ${f}`,onClick:()=>i?.(),children:[!!u&&(0,M.jsxs)(`span`,{className:`action-icon`,children:[(0,M.jsx)(`span`,{className:`codicon codicon-error`}),(0,M.jsx)(`span`,{className:`action-icon-value`,children:u})]}),!!d&&(0,M.jsxs)(`span`,{className:`action-icon`,children:[(0,M.jsx)(`span`,{className:`codicon codicon-warning`}),(0,M.jsx)(`span`,{className:`action-icon-value`,children:d})]})]})]}),_&&(0,M.jsx)(`div`,{className:`action-title-subtitle`,title:_,children:_})]})};function zn(e,t){let n=e.title??je({type:e.class,method:e.method})?.title??e.method;n=n.replace(/\n/g,` `);let r=[],i=[],a=0,o=/\{([^}]+)\}/g,s;for(;(s=o.exec(n))!==null;){let[o,c]=s,l=n.slice(a,s.index);r.push(l),i.push(l);let u=en(e.params,c,t);u===void 0?(r.push(o),i.push(o)):s.index===0?(r.push(u),i.push(u)):(r.push((0,M.jsx)(`span`,{className:`action-title-param`,children:u},r.length)),i.push(u)),a=s.index+o.length}if(a<n.length){let e=n.slice(a);r.push(e),i.push(e)}let c=an({type:e.class,method:e.method,params:e.params,subtitle:e.subtitle},t);return{elements:r,title:i.join(``),subtitle:c}}function Bn(e,t){return e?`${e} ${t}${e===1?``:`s`}`:``}var Vn=({value:e,description:t})=>{let[n,r]=T.useState(`copy`),i=T.useCallback(()=>{(typeof e==`function`?e():Promise.resolve(e)).then(e=>{navigator.clipboard.writeText(e).then(()=>{r(`check`),setTimeout(()=>{r(`copy`)},3e3)},()=>{r(`close`)})},()=>{r(`close`)})},[e]);return(0,M.jsx)(N,{title:t||`Copy`,icon:n,onClick:i})},Hn=({value:e,description:t,copiedDescription:n=t,style:r})=>{let[i,a]=T.useState(!1);return(0,M.jsx)(N,{style:r,title:t,onClick:T.useCallback(async()=>{let t=typeof e==`function`?await e():e;await navigator.clipboard.writeText(t),a(!0),setTimeout(()=>a(!1),3e3)},[e]),className:`copy-to-clipboard-text-button`,children:i?n:t})},Un=({text:e})=>(0,M.jsx)(`div`,{className:`fill`,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:24,fontWeight:`bold`,opacity:.5},children:e}),Wn=({action:e,startTimeOffset:t,sdkLanguage:n})=>{let r=T.useMemo(()=>Object.keys(e?.params??{}).filter(e=>e!==`info`),[e]);if(!e)return(0,M.jsx)(Un,{text:`No action selected`});let i=wn(e.startTime-t),{title:a,subtitle:o}=zn(e,n);return(0,M.jsxs)(`div`,{className:`call-tab`,children:[(0,M.jsx)(`div`,{className:`call-line`,children:o?`${a} ${o}`:a}),(0,M.jsx)(`div`,{className:`call-section`,children:`Time`}),Kn({name:`start`,type:`literal`,text:i}),Kn({name:`duration`,type:`literal`,text:Gn(e)}),!!r.length&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`call-section`,children:`Parameters`}),r.map(t=>Kn(qn(e,t,e.params[t],n)))]}),!!e.result&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`call-section`,children:`Return value`}),Object.keys(e.result).map(t=>Kn(qn(e,t,e.result[t],n)))]})]})};function Gn(e){return e.endTime?wn(e.endTime-e.startTime):e.error?`Timed Out`:`Running`}function Kn(e){let t=e.text;return t.length>1e3&&(t=t.slice(0,1e3)+`…`),t=t.replace(/\n/g,`↵`),e.type===`string`&&(t=`"${t}"`),(0,M.jsxs)(`div`,{className:`call-line`,children:[e.name,`:`,(0,M.jsx)(`span`,{className:k(`call-value`,e.type),title:t,children:t}),[`literal`,`string`,`number`,`object`,`locator`].includes(e.type)&&(0,M.jsx)(Vn,{value:e.text})]},e.name)}function qn(e,t,n,r){let i=e.method.includes(`eval`)||e.method===`waitForFunction`;if(t===`files`)return{text:`<files>`,type:`string`,name:t};if((t===`eventInit`||t===`expectedValue`||t===`arg`&&i)&&(n=Jn(n.value,Array(10).fill({handle:`<handle>`}))),t===`value`&&i&&(n=Jn(n,Array(10).fill({handle:`<handle>`}))),t===`received`&&e.method===`expect`){let e=n&&typeof n==`object`&&(`value`in n||`ariaSnapshot`in n)?n.value:n;n=e===void 0?void 0:Jn(e,Array(10).fill({handle:`<handle>`}))}if(t===`selector`)return{text:Gt(r||`javascript`,e.params.selector),type:`locator`,name:`locator`};let a=typeof n;return a!==`object`||n===null?{text:String(n),type:a,name:t}:n.guid?{text:`<handle>`,type:`handle`,name:t}:{text:JSON.stringify(n),type:`object`,name:t}}function Jn(e,t){if(e.n!==void 0)return e.n;if(e.s!==void 0)return e.s;if(e.b!==void 0)return e.b;if(e.v!==void 0){if(e.v===`undefined`)return;if(e.v===`null`)return null;if(e.v===`NaN`)return NaN;if(e.v===`Infinity`)return 1/0;if(e.v===`-Infinity`)return-1/0;if(e.v===`-0`)return-0}if(e.d!==void 0)return new Date(e.d);if(e.r!==void 0)return new RegExp(e.r.p,e.r.f);if(e.a!==void 0)return e.a.map(e=>Jn(e,t));if(e.o!==void 0){let n={};for(let{k:r,v:i}of e.o)n[r]=Jn(i,t);return n}return e.h===void 0||t===void 0?`<object>`:t[e.h]}var Yn=new Map;function Xn({name:e,items:t=[],id:n,render:r,icon:i,isError:a,isWarning:o,isInfo:s,selectedItem:c,onAccepted:l,onSelected:u,onHighlighted:d,onIconClicked:f,noItemsMessage:p,dataTestId:m,notSelectable:h,ariaLabel:g}){let _=T.useRef(null),[v,y]=T.useState();return T.useEffect(()=>{d?.(v)},[d,v]),T.useEffect(()=>{let t=_.current;if(!t)return;let n=()=>{Yn.set(e,t.scrollTop)};return t.addEventListener(`scroll`,n,{passive:!0}),()=>t.removeEventListener(`scroll`,n)},[e]),T.useEffect(()=>{_.current&&(_.current.scrollTop=Yn.get(e)||0)},[e]),(0,M.jsx)(`div`,{className:k(`list-view vbox`,e+`-list-view`),role:t.length>0?`listbox`:void 0,"aria-label":g,children:(0,M.jsxs)(`div`,{className:k(`list-view-content`,h&&`not-selectable`),tabIndex:0,onKeyDown:e=>{if(c&&e.key===`Enter`){l?.(c,t.indexOf(c));return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.stopPropagation(),e.preventDefault();let n=c?t.indexOf(c):-1,r=n;e.key===`ArrowDown`&&(r=n===-1?0:Math.min(n+1,t.length-1)),e.key===`ArrowUp`&&(r=n===-1?t.length-1:Math.max(n-1,0));let i=_.current?.children.item(r);ue(i||void 0),d?.(void 0),u?.(t[r],r),y(void 0)},ref:_,children:[p&&t.length===0&&(0,M.jsx)(`div`,{className:`list-view-empty`,children:p}),t.map((e,t)=>{let d=r(e,t);return(0,M.jsxs)(`div`,{onDoubleClick:()=>l?.(e,t),role:`option`,className:k(`list-view-entry`,c===e&&`selected`,!h&&v===e&&`highlighted`,a?.(e,t)&&`error`,o?.(e,t)&&`warning`,s?.(e,t)&&`info`),"aria-selected":c===e,onClick:()=>u?.(e,t),onMouseEnter:()=>y(e),onMouseLeave:()=>y(void 0),children:[i&&(0,M.jsx)(`div`,{className:`codicon `+(i(e,t)||`codicon-blank`),style:{minWidth:16,marginRight:4},onDoubleClick:e=>{e.preventDefault(),e.stopPropagation()},onClick:n=>{n.stopPropagation(),n.preventDefault(),f?.(e,t)}}),typeof d==`string`?(0,M.jsx)(`div`,{style:{textOverflow:`ellipsis`,overflow:`hidden`},children:d}):d]},n?.(e,t)||t)})]})})}var Zn=Xn,Qn=({action:e,isLive:t})=>{let n=Mn(),r=T.useMemo(()=>{if(!e||!e.log.length)return[];let r=e.log,i=n?(n.wallTime??0)-n.startTime:0,a=[];for(let n=0;n<r.length;++n){let o=``;if(r[n].time!==-1){let a=r[n]?.time;o=n+1<r.length?wn(r[n+1].time-a):e.endTime>0?wn(e.endTime-a):t?wn(Date.now()-i-a):`-`}a.push({message:r[n].message,time:o})}return a},[n,e,t]);return r.length?(0,M.jsx)(Zn,{name:`log`,ariaLabel:`Log entries`,items:r,render:e=>(0,M.jsxs)(`div`,{className:`log-list-item`,children:[(0,M.jsx)(`span`,{className:`log-list-duration`,children:e.time}),e.message]}),notSelectable:!0}):(0,M.jsx)(Un,{text:`No log entries`})};function $n(e,t){let n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[],i,a={},o=!1,s=t?.fg,c=t?.bg;for(;(i=n.exec(e))!==null;){let[,,e,,n]=i;if(e)for(let n of e.split(`;`)){let e=+n;switch(e){case 0:a={};break;case 1:a[`font-weight`]=`bold`;break;case 2:a.opacity=`0.8`;break;case 3:a[`font-style`]=`italic`;break;case 4:a[`text-decoration`]=`underline`;break;case 7:o=!0;break;case 8:a.display=`none`;break;case 9:a[`text-decoration`]=`line-through`;break;case 22:delete a[`font-weight`],delete a[`font-style`],delete a.opacity,delete a[`text-decoration`];break;case 23:delete a[`font-weight`],delete a[`font-style`],delete a.opacity;break;case 24:delete a[`text-decoration`];break;case 27:o=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:s=er[e-30];break;case 39:s=t?.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:c=er[e-40];break;case 49:c=t?.bg;break;case 53:a[`text-decoration`]=`overline`;break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:s=tr[e-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:c=tr[e-100];break}}else if(n){let e={...a},t=o?c:s;t!==void 0&&(e.color=t),o&&s&&(e[`background-color`]=s),r.push(`<span style="${rr(e)}">${nr(n)}</span>`)}}return r.join(``)}var er={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)`},tr={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 nr(e){return e.replace(/[&"<>]/g,e=>({"&":`&amp;`,'"':`&quot;`,"<":`&lt;`,">":`&gt;`})[e])}function rr(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}var ir=({error:e})=>(0,M.jsx)(`div`,{className:`error-message`,dangerouslySetInnerHTML:{__html:T.useMemo(()=>$n(e,{bg:`var(--vscode-editor-background)`,fg:`var(--vscode-editor-foreground)`}),[e])||``}}),ar=({cursor:e,onPaneMouseMove:t,onPaneMouseUp:n,onPaneDoubleClick:r})=>(T.useEffect(()=>{let i=document.createElement(`div`);return i.style.position=`fixed`,i.style.top=`0`,i.style.right=`0`,i.style.bottom=`0`,i.style.left=`0`,i.style.zIndex=`9999`,i.style.cursor=e,document.body.appendChild(i),t&&i.addEventListener(`mousemove`,t),n&&i.addEventListener(`mouseup`,n),r&&document.body.addEventListener(`dblclick`,r),()=>{t&&i.removeEventListener(`mousemove`,t),n&&i.removeEventListener(`mouseup`,n),r&&document.body.removeEventListener(`dblclick`,r),document.body.removeChild(i)}},[e,t,n,r]),(0,M.jsx)(M.Fragment,{})),or={position:`absolute`,top:0,right:0,bottom:0,left:0},sr=({orientation:e,offsets:t,setOffsets:n,resizerColor:r,resizerWidth:i,minColumnWidth:a})=>{let o=a||0,[s,c]=T.useState(null),[l,u]=E(),d={position:`absolute`,right:e===`horizontal`?void 0:0,bottom:e===`horizontal`?0:void 0,width:e===`horizontal`?7:void 0,height:e===`horizontal`?void 0:7,borderTopWidth:e===`horizontal`?void 0:(7-i)/2,borderRightWidth:e===`horizontal`?(7-i)/2:void 0,borderBottomWidth:e===`horizontal`?void 0:(7-i)/2,borderLeftWidth:e===`horizontal`?(7-i)/2:void 0,borderColor:`transparent`,borderStyle:`solid`,cursor:e===`horizontal`?`ew-resize`:`ns-resize`};return(0,M.jsxs)(`div`,{style:{position:`absolute`,top:0,right:0,bottom:0,left:-(7-i)/2,zIndex:100,pointerEvents:`none`},ref:u,children:[!!s&&(0,M.jsx)(ar,{cursor:e===`horizontal`?`ew-resize`:`ns-resize`,onPaneMouseUp:()=>c(null),onPaneMouseMove:r=>{if(!r.buttons)c(null);else if(s){let i=e===`horizontal`?r.clientX-s.clientX:r.clientY-s.clientY,a=s.offset+i,c=s.index>0?t[s.index-1]:0,u=e===`horizontal`?l.width:l.height,d=Math.min(Math.max(c+o,a),u-o)-t[s.index];for(let e=s.index;e<t.length;++e)t[e]=t[e]+d;n([...t])}}}),t.map((t,n)=>(0,M.jsx)(`div`,{style:{...d,top:e===`horizontal`?0:t,left:e===`horizontal`?t:0,pointerEvents:`initial`},onMouseDown:e=>c({clientX:e.clientX,clientY:e.clientY,offset:t,index:n}),children:(0,M.jsx)(`div`,{style:{...or,background:r}})},n))]})};async function cr(e){let t=new Image;return e&&(t.src=e,await new Promise((e,n)=>{t.onload=e,t.onerror=e})),t}var lr={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
                    linear-gradient(-45deg, #80808020 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #80808020 75%),
                    linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:`20px 20px`,backgroundPosition:`0 0, 0 10px, 10px -10px, -10px 0px`,boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
              rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
              rgb(0 0 0 / 10%) 0px -2px 4px,
              rgb(0 0 0 / 15%) 0px -6.1px 12px,
              rgb(0 0 0 / 25%) 0px 6px 12px`},ur=({diff:e,noTargetBlank:t,hideDetails:n})=>{let[r,i]=T.useState(e.diff?`diff`:`actual`),[a,o]=T.useState(!1),[s,c]=T.useState(null),[l,u]=T.useState(`Expected`),[d,f]=T.useState(null),[p,m]=T.useState(null),[h,g]=E();T.useEffect(()=>{(async()=>{c(await cr(e.expected?.attachment.path)),u(e.expected?.title||`Expected`),f(await cr(e.actual?.attachment.path)),m(await cr(e.diff?.attachment.path))})()},[e]);let _=s&&d&&p,v=_?Math.max(s.naturalWidth,d.naturalWidth,200):500,y=_?Math.max(s.naturalHeight,d.naturalHeight,200):500,b=Math.min(1,(h.width-30)/v),x=Math.min(1,(h.width-50)/v/2),S=v*b,C=y*b,w=(e,t)=>(0,M.jsx)(`button`,{role:`tab`,"aria-selected":r===e,className:`image-diff-mode`,style:{fontWeight:r===e?600:`initial`},onClick:()=>i(e),children:t});return(0,M.jsx)(`div`,{"data-testid":`test-result-image-mismatch`,style:{display:`flex`,flexDirection:`column`,alignItems:`center`,flex:`auto`},ref:g,children:_&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{role:`tablist`,"data-testid":`test-result-image-mismatch-tabs`,style:{display:`flex`,margin:`10px 0 20px`},children:[e.diff&&w(`diff`,`Diff`),w(`actual`,`Actual`),w(`expected`,l),w(`sxs`,`Side by side`),w(`slider`,`Slider`)]}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`center`,flex:`auto`,minHeight:C+60},children:[e.diff&&r===`diff`&&(0,M.jsx)(fr,{image:p,alt:`Diff`,hideSize:n,canvasWidth:S,canvasHeight:C,scale:b}),e.diff&&r===`actual`&&(0,M.jsx)(fr,{image:d,alt:`Actual`,hideSize:n,canvasWidth:S,canvasHeight:C,scale:b}),e.diff&&r===`expected`&&(0,M.jsx)(fr,{image:s,alt:l,hideSize:n,canvasWidth:S,canvasHeight:C,scale:b}),e.diff&&r===`slider`&&(0,M.jsx)(dr,{expectedImage:s,actualImage:d,hideSize:n,canvasWidth:S,canvasHeight:C,scale:b,expectedTitle:l}),e.diff&&r===`sxs`&&(0,M.jsxs)(`div`,{style:{display:`flex`},children:[(0,M.jsx)(fr,{image:s,title:l,hideSize:n,canvasWidth:x*v,canvasHeight:x*y,scale:x}),(0,M.jsx)(fr,{image:a?p:d,title:a?`Diff`:`Actual`,onClick:()=>o(!a),hideSize:n,canvasWidth:x*v,canvasHeight:x*y,scale:x})]}),!e.diff&&r===`actual`&&(0,M.jsx)(fr,{image:d,title:`Actual`,hideSize:n,canvasWidth:S,canvasHeight:C,scale:b}),!e.diff&&r===`expected`&&(0,M.jsx)(fr,{image:s,title:l,hideSize:n,canvasWidth:S,canvasHeight:C,scale:b}),!e.diff&&r===`sxs`&&(0,M.jsxs)(`div`,{style:{display:`flex`},children:[(0,M.jsx)(fr,{image:s,title:l,canvasWidth:x*v,canvasHeight:x*y,scale:x}),(0,M.jsx)(fr,{image:d,title:`Actual`,canvasWidth:x*v,canvasHeight:x*y,scale:x})]})]}),!n&&(0,M.jsxs)(`div`,{style:{alignSelf:`start`,lineHeight:`18px`,marginLeft:`15px`},children:[(0,M.jsx)(`div`,{children:e.diff&&(0,M.jsx)(`a`,{target:`_blank`,href:e.diff.attachment.path,rel:`noreferrer`,children:e.diff.attachment.name})}),(0,M.jsx)(`div`,{children:(0,M.jsx)(`a`,{target:t?``:`_blank`,href:e.actual.attachment.path,rel:`noreferrer`,children:e.actual.attachment.name})}),(0,M.jsx)(`div`,{children:(0,M.jsx)(`a`,{target:t?``:`_blank`,href:e.expected.attachment.path,rel:`noreferrer`,children:e.expected.attachment.name})})]})]})})},dr=({expectedImage:e,actualImage:t,canvasWidth:n,canvasHeight:r,scale:i,expectedTitle:a,hideSize:o})=>{let s={position:`absolute`,top:0,left:0},[c,l]=T.useState(n/2),u=e.naturalWidth===t.naturalWidth&&e.naturalHeight===t.naturalHeight;return(0,M.jsxs)(`div`,{style:{flex:`none`,display:`flex`,alignItems:`center`,flexDirection:`column`,userSelect:`none`},children:[!o&&(0,M.jsxs)(`div`,{style:{margin:5},children:[!u&&(0,M.jsx)(`span`,{style:{flex:`none`,margin:`0 5px`},children:`Actual `}),!u&&(0,M.jsx)(`span`,{children:t.naturalWidth}),!u&&(0,M.jsx)(`span`,{style:{flex:`none`,margin:`0 5px`},children:`x`}),!u&&(0,M.jsx)(`span`,{children:t.naturalHeight}),!u&&(0,M.jsxs)(`span`,{style:{flex:`none`,margin:`0 5px 0 15px`},children:[a,` `]}),(0,M.jsx)(`span`,{children:e.naturalWidth}),(0,M.jsx)(`span`,{style:{flex:`none`,margin:`0 5px`},children:`x`}),(0,M.jsx)(`span`,{children:e.naturalHeight})]}),(0,M.jsxs)(`div`,{style:{position:`relative`,width:n,height:r,margin:15,...lr},children:[(0,M.jsx)(sr,{orientation:`horizontal`,offsets:[c],setOffsets:e=>l(e[0]),resizerColor:`#57606a80`,resizerWidth:6}),(0,M.jsx)(`img`,{alt:a,style:{width:e.naturalWidth*i,height:e.naturalHeight*i},draggable:`false`,src:e.src}),(0,M.jsx)(`div`,{style:{...s,bottom:0,overflow:`hidden`,width:c,...lr},children:(0,M.jsx)(`img`,{alt:`Actual`,style:{width:t.naturalWidth*i,height:t.naturalHeight*i},draggable:`false`,src:t.src})})]})]})},fr=({image:e,title:t,alt:n,hideSize:r,canvasWidth:i,canvasHeight:a,scale:o,onClick:s})=>(0,M.jsxs)(`div`,{style:{flex:`none`,display:`flex`,alignItems:`center`,flexDirection:`column`},children:[!r&&(0,M.jsxs)(`div`,{style:{margin:5},children:[t&&(0,M.jsx)(`span`,{style:{flex:`none`,margin:`0 5px`},children:t}),(0,M.jsx)(`span`,{children:e.naturalWidth}),(0,M.jsx)(`span`,{style:{flex:`none`,margin:`0 5px`},children:`x`}),(0,M.jsx)(`span`,{children:e.naturalHeight})]}),(0,M.jsx)(`div`,{style:{display:`flex`,flex:`none`,width:i,height:a,margin:15,...lr},children:(0,M.jsx)(`img`,{width:e.naturalWidth*o,height:e.naturalHeight*o,alt:t||n,style:{cursor:s?`pointer`:`initial`},draggable:`false`,src:e.src,onClick:s})})]}),pr=`modulepreload`,mr=function(e,t){return new URL(e,t).href},hr={},gr=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=mr(t,n),t=s(t),t in hr)return;hr[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:pr,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},_r=({text:e,highlighter:t,mimeType:n,linkify:r,readOnly:i,highlight:a,revealLine:o,lineNumbers:s,isFocused:c,focusOnChange:l,wrapLines:u,onChange:d,dataTestId:f,placeholder:p})=>{let[m,h]=E(),[g]=T.useState(gr(()=>import(`./codeMirrorModule-DzZ7CnBb.js`).then(e=>e.default),__vite__mapDeps([0,1]),import.meta.url)),_=T.useRef(null),[v,y]=T.useState();return T.useEffect(()=>{(async()=>{let e=await g;br(e);let a=h.current;if(!a)return;let o=Sr(t)||xr(n)||(r?`text/linkified`:``);if(_.current&&o===_.current.cm.getOption(`mode`)&&!!i===_.current.cm.getOption(`readOnly`)&&s===_.current.cm.getOption(`lineNumbers`)&&u===_.current.cm.getOption(`lineWrapping`)&&p===_.current.cm.getOption(`placeholder`))return;_.current?.cm?.getWrapperElement().remove();let l=e(a,{value:``,mode:o,readOnly:!!i,lineNumbers:s,lineWrapping:u,placeholder:p,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":`findPersistent`,"Cmd-F":`findPersistent`,Tab:!1,"Shift-Tab":!1}});return _.current={cm:l},c&&l.focus(),y(l),l})()},[g,v,h,t,n,r,s,u,i,c,p]),T.useEffect(()=>{_.current&&_.current.cm.setSize(m.width,m.height)},[m]),T.useLayoutEffect(()=>{if(!v)return;let t=!1;if(v.getValue()!==e&&(v.setValue(e),t=!0,l&&(v.execCommand(`selectAll`),v.focus())),t||JSON.stringify(a)!==JSON.stringify(_.current.highlight)){for(let e of _.current.highlight||[])v.removeLineClass(e.line-1,`wrap`);for(let e of a||[])v.addLineClass(e.line-1,`wrap`,`source-line-${e.type}`);for(let e of _.current.widgets||[])v.removeLineWidget(e);for(let e of _.current.markers||[])e.clear();let e=[],t=[];for(let n of a||[]){if(n.type!==`subtle-error`&&n.type!==`error`)continue;let r=_.current?.cm.getLine(n.line-1);if(r){let e={};e.title=n.message||``,t.push(v.markText({line:n.line-1,ch:0},{line:n.line-1,ch:n.column||r.length},{className:`source-line-error-underline`,attributes:e}))}if(n.type===`error`){let t=document.createElement(`div`);t.innerHTML=$n(n.message||``,{bg:`var(--vscode-inputValidation-errorBackground)`,fg:`var(--vscode-editor-foreground)`}),t.className=`source-line-error-widget`,e.push(v.addLineWidget(n.line,t,{above:!0,coverGutter:!1}))}}_.current.highlight=a,_.current.widgets=e,_.current.markers=t}typeof o==`number`&&_.current.cm.lineCount()>=o&&v.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let n;return d&&(n=()=>d(v.getValue()),v.on(`change`,n)),()=>{n&&v.off(`change`,n)}},[v,e,a,o,l,d]),(0,M.jsx)(`div`,{"data-testid":f,className:`cm-wrapper`,ref:h,onClick:vr})};function vr(e){if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains(`cm-linkified`)?t=e.target.textContent:e.target.classList.contains(`cm-link`)&&e.target.nextElementSibling?.classList.contains(`cm-url`)&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,`_blank`))}var yr=!1;function br(e){yr||(yr=!0,e.defineSimpleMode(`text/linkified`,{start:[{regex:A,token:`linkified`}]}))}function xr(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 Sr(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]}function Cr(e){return!!e.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function wr(e){return!!e.match(/^(application\/xml|application\/.*?\+xml|text\/xml)(;\s*charset=.*)?$/)}function Tr(e){return!!e.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}var Er=({title:e,children:t,setExpanded:n,expanded:r,expandOnTitleClick:i,titleSuffix:a,className:o})=>{let s=T.useId(),c=T.useId(),l=T.useCallback(()=>n(!r),[r,n]),u=(0,M.jsx)(`div`,{className:k(`codicon`,r?`codicon-chevron-down`:`codicon-chevron-right`),style:{color:`var(--vscode-foreground)`,marginLeft:`5px`}});return(0,M.jsxs)(`div`,{className:k(`expandable`,r&&`expanded`,o),children:[(0,M.jsxs)(`div`,{className:`expandable-title`,id:i?void 0:s,children:[i?(0,M.jsxs)(`button`,{id:s,"aria-expanded":r,"aria-controls":c,className:`expandable-title-button`,onClick:l,children:[u,e]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{"aria-expanded":r,"aria-controls":c,"aria-label":r?`Collapse`:`Expand`,className:`expandable-title-button`,onClick:l,children:u}),e]}),a]}),r&&(0,M.jsx)(`div`,{id:c,"aria-labelledby":s,role:`region`,className:`expandable-content`,children:t})]})};function Dr(e){let t=[],n=0,r;for(;(r=A.exec(e))!==null;){let i=e.substring(n,r.index);i&&t.push(i);let a=r[0];t.push(Or(a)),n=r.index+a.length}let i=e.substring(n);return i&&t.push(i),t}function Or(e){let t=e;return t.startsWith(`www.`)&&(t=`https://`+t),(0,M.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,children:e})}var kr=({attachment:e,reveal:t})=>{let n=Mn(),[r,i]=T.useState(!1),[a,o]=T.useState(null),[s,c]=T.useState(null),[l,u]=de(),d=T.useRef(null),f=Tr(e.contentType),p=!!e.file||!!e.path;T.useEffect(()=>{if(t)return d.current?.scrollIntoView({behavior:`smooth`}),u()},[t,u]),T.useEffect(()=>{r&&a===null&&s===null&&(c(`Loading ...`),fetch(jr(n,e)).then(e=>e.text()).then(e=>{o(e),c(null)}).catch(e=>{c(`Failed to load: `+e.message)}))},[n,r,a,s,e]);let m=T.useMemo(()=>{let e=a?a.split(`
`).length:0;return Math.min(Math.max(5,e),20)*20},[a]),h=(0,M.jsx)(`span`,{style:{marginLeft:5},ref:d,"aria-label":e.name,children:Dr(e.name)}),g=p&&(0,M.jsx)(`a`,{style:{marginLeft:5},href:Mr(n,e),children:`download`});return!f||!p?(0,M.jsxs)(`div`,{style:{marginLeft:20},children:[h,g]}):(0,M.jsxs)(`div`,{className:k(l&&`yellow-flash`),children:[(0,M.jsx)(Er,{title:h,titleSuffix:g,expanded:r,setExpanded:i,expandOnTitleClick:!0,children:s&&(0,M.jsx)(`i`,{children:s})}),r&&a!==null&&(0,M.jsx)(`div`,{className:`vbox`,style:{height:m},children:(0,M.jsx)(_r,{text:a,readOnly:!0,mimeType:e.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},Ar=({revealedAttachmentCallId:e})=>{let t=Mn(),{diffMap:n,screenshots:r,attachments:i}=T.useMemo(()=>{let e=new Set(t?.visibleAttachments??[]),n=new Set,r=new Map;for(let t of e){if(!t.path&&!t.file)continue;let i=t.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(i){let n=i[1],a=i[2],o=r.get(n)||{expected:void 0,actual:void 0,diff:void 0};o[a]=t,r.set(n,o),e.delete(t)}else t.contentType.startsWith(`image/`)&&(n.add(t),e.delete(t))}return{diffMap:r,attachments:e,screenshots:n}},[t]);return!n.size&&!r.size&&!i.size?(0,M.jsx)(Un,{text:`No attachments`}):(0,M.jsxs)(`div`,{className:`attachments-tab`,children:[[...n.values()].map(({expected:e,actual:n,diff:r})=>(0,M.jsxs)(M.Fragment,{children:[e&&n&&(0,M.jsx)(`div`,{className:`attachments-section`,children:`Image diff`}),e&&n&&(0,M.jsx)(ur,{noTargetBlank:!0,diff:{name:`Image diff`,expected:{attachment:{...e,path:Mr(t,e)},title:`Expected`},actual:{attachment:{...n,path:Mr(t,n)}},diff:r?{attachment:{...r,path:Mr(t,r)}}:void 0}})]})),r.size?(0,M.jsx)(`div`,{className:`attachments-section`,children:`Screenshots`}):void 0,[...r.values()].map((e,n)=>{let r=jr(t,e);return(0,M.jsxs)(`div`,{className:`attachment-item`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`img`,{draggable:`false`,src:r})}),(0,M.jsx)(`div`,{children:(0,M.jsx)(`a`,{target:`_blank`,href:r,rel:`noreferrer`,children:e.name})})]},`screenshot-${n}`)}),i.size?(0,M.jsx)(`div`,{className:`attachments-section`,children:`Attachments`}):void 0,[...i.values()].map((t,n)=>(0,M.jsx)(`div`,{className:`attachment-item`,children:(0,M.jsx)(kr,{attachment:t,reveal:e&&t.callId===e.callId?e:void 0})},Nr(t,n)))]})};function jr(e,t){return e&&t.file?e.createRelativeUrl(`file/${t.file}`):`file?path=${encodeURIComponent(t.path)}`}function Mr(e,t){let n=t.contentType?`&dn=${encodeURIComponent(t.name)}`:``;return t.contentType&&(n+=`&dct=${encodeURIComponent(t.contentType)}`),jr(e,t)+n}function Nr(e,t){return t+`-`+(e.file?`file-`+e.file:`path-`+e.path)}var Pr=({prompt:e})=>(0,M.jsx)(Hn,{value:e,description:`Copy prompt`,copiedDescription:(0,M.jsxs)(M.Fragment,{children:[`Copied `,(0,M.jsx)(`span`,{className:`codicon codicon-copy`,style:{marginLeft:`5px`}})]}),style:{width:`120px`,justifyContent:`center`}});function Fr(e){return T.useMemo(()=>{if(!e)return{errors:new Map};let t=new Map;for(let n of e.errorDescriptors)t.set(n.message,n);return{errors:t}},[e])}function Ir({message:e,error:t,sdkLanguage:n,revealInSource:r}){let i,a,o=t.stack?.[0];return o&&(i=o.file.replace(/.*[/\\](.*)/,`$1`)+`:`+o.line,a=o.file+`:`+o.line),(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,overflowX:`clip`},children:[(0,M.jsxs)(`div`,{className:`hbox`,style:{alignItems:`center`,padding:`5px 10px`,minHeight:36,fontWeight:`bold`,color:`var(--vscode-errorForeground)`,flex:0},children:[t.action&&Rn(t.action,{sdkLanguage:n}),i&&(0,M.jsxs)(`div`,{className:`action-location`,children:[`@ `,(0,M.jsx)(`button`,{type:`button`,title:a,"aria-label":`Go to source: ${a}`,onClick:()=>r(t),children:i})]})]}),(0,M.jsx)(ir,{error:e})]})}var Lr=({errorsModel:e,sdkLanguage:t,revealInSource:n,wallTime:r,testRunMetadata:i})=>{let a=Mn(),o=te(async()=>{let e=a?.attachments.find(e=>e.name===`error-context`);if(!e)return;let t=await fetch(jr(a,e)).then(e=>e.text());if(t)return i?.gitDiff&&(t+=`

# Local changes

\`\`\`diff
`+i.gitDiff+"\n```"),t},[a,i],void 0);return e.errors.size?(0,M.jsxs)(`div`,{className:`fill`,style:{overflow:`auto`},children:[(0,M.jsx)(`span`,{style:{position:`absolute`,right:`5px`,top:`5px`,zIndex:1},children:o&&(0,M.jsx)(Pr,{prompt:o})}),[...e.errors.entries()].map(([e,i])=>{let a=`error-${r}-${e}`;return(0,M.jsx)(Ir,{message:e,error:i,revealInSource:n,sdkLanguage:t},a)})]}):(0,M.jsx)(Un,{text:`No errors`})},Rr=Xn,zr={log:{bg:`var(--vscode-editor-background)`,fg:`var(--vscode-editor-foreground)`},warning:{fg:`var(--vscode-list-warningForeground)`,bg:`var(--vscode-inputValidation-warningBackground)`},error:{fg:`var(--vscode-list-errorForeground)`,bg:`var(--vscode-inputValidation-errorBackground)`}};function Br(e,t,n){let{entries:r}=T.useMemo(()=>{if(!e)return{entries:[]};let t=t=>t&&e.resourceOwnerRefToTitle.get(t)||``,r=[];function i(e){let t=r[r.length-1];t&&e.browserMessage?.bodyString===t.browserMessage?.bodyString&&e.browserMessage?.location===t.browserMessage?.location&&e.browserError===t.browserError&&e.nodeMessage?.html===t.nodeMessage?.html&&e.isError===t.isError&&e.isWarning===t.isWarning&&e.pageId===t.pageId&&e.timestamp-t.timestamp<1e3?t.repeat++:r.push({...e,repeat:1})}let a=[...e.events,...e.stdio].sort((e,t)=>(`time`in e?e.time:e.timestamp)-(`time`in t?t.time:t.timestamp));for(let e of a){if(e.type===`console`){if(n&&e.pageId!==n)continue;let r=e.messageType===`error`?zr.error:e.messageType===`warning`?zr.warning:zr.log,a=e.args&&e.args.length?Hr(e.args,r):Ur(e.text,r),o=e.location.url,s=`${o?o.substring(o.lastIndexOf(`/`)+1):`<anonymous>`}:${e.location.lineNumber}`;i({browserMessage:{body:a,bodyString:e.text,location:s},isError:e.messageType===`error`,isWarning:e.messageType===`warning`,pageId:t(e.pageId),timestamp:e.time})}if(e.type===`event`&&e.method===`pageError`){if(n&&e.pageId!==n)continue;i({browserError:e.params.error,isError:!0,isWarning:!1,pageId:t(e.pageId),timestamp:e.time})}if(e.type===`stderr`||e.type===`stdout`){let t=``,n=e.type===`stderr`?zr.error:zr.log;e.text&&(t=$n(e.text.trim(),n)||``),e.base64&&(t=$n(atob(e.base64).trim(),n)||``),i({nodeMessage:{html:t},isError:e.type===`stderr`,isWarning:!1,pageId:``,timestamp:e.timestamp})}}return{entries:r}},[e,n]),i=T.useMemo(()=>t?r.filter(e=>e.timestamp>=t.minimum&&e.timestamp<=t.maximum):r,[r,t]),a=T.useMemo(()=>new Set(i.map(e=>e.pageId).filter(Boolean)).size>1,[i]);return{entries:i,hasMultiplePages:a,showSource:T.useMemo(()=>a||i.some(e=>!e.browserMessage&&!e.browserError),[i,a])}}var Vr=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?(0,M.jsx)(`div`,{className:`console-tab`,children:(0,M.jsx)(Rr,{name:`console`,onAccepted:r,onHighlighted:e=>n?.(e?{minimum:e.timestamp,maximum:e.timestamp}:void 0),items:e.entries,isError:e=>e.isError,isWarning:e=>e.isWarning,render:n=>{let r=(0,M.jsx)(`span`,{className:`console-time`,children:wn(n.timestamp-t.minimum)}),i=!!(n.browserMessage||n.browserError),a=i?e.hasMultiplePages&&n.pageId||`page`:`test`,o=e.showSource?(0,M.jsx)(`span`,{className:`console-source`,title:i?`Browser message`:`Runner message`,children:a}):void 0,s,c,l,u,{browserMessage:d,browserError:f,nodeMessage:p}=n;if(d&&(s=d.location,c=d.body),f){let{error:e,value:t}=f;e?(c=e.message,u=e.stack):c=String(t)}return p&&(l=p.html),(0,M.jsxs)(`div`,{className:`console-line`,children:[r,o,s&&(0,M.jsx)(`span`,{className:`console-location`,children:s}),n.repeat>1&&(0,M.jsx)(`span`,{className:`console-repeat`,children:n.repeat}),c&&(0,M.jsx)(`span`,{className:`console-line-message`,children:c}),l&&(0,M.jsx)(`span`,{className:`console-line-message`,dangerouslySetInnerHTML:{__html:l}}),u&&(0,M.jsx)(`div`,{className:`console-stack`,children:u})]})}})}):(0,M.jsx)(Un,{text:`No console entries`});function Hr(e,t){if(e.length===1)return Ur(e[0].preview,t);let n=typeof e[0].value==`string`&&e[0].value.includes(`%`),r=n?e[0].value:``,i=n?e.slice(1):e,a=0,o=/%([%sdifoOc])/g,s,c=[],l=[];c.push((0,M.jsx)(`span`,{children:l},c.length+1));let u=0;for(;(s=o.exec(r))!==null;){let e=r.substring(u,s.index);l.push((0,M.jsx)(`span`,{children:e},l.length+1)),u=s.index+2;let t=s[0][1];if(t===`%`)l.push((0,M.jsx)(`span`,{children:`%`},l.length+1));else if(t===`s`||t===`o`||t===`O`||t===`d`||t===`i`||t===`f`){let e=i[a++],t={};typeof e?.value!=`string`&&(t.color=`var(--vscode-debugTokenExpression-number)`),l.push((0,M.jsx)(`span`,{style:t,children:e?.preview||``},l.length+1))}else if(t===`c`){l=[];let e=i[a++],t=e?Wr(e.preview):{};c.push((0,M.jsx)(`span`,{style:t,children:l},c.length+1))}}for(u<r.length&&l.push((0,M.jsx)(`span`,{children:r.substring(u)},l.length+1));a<i.length;a++){let e=i[a],t={};l.length&&l.push((0,M.jsx)(`span`,{children:` `},l.length+1)),typeof e?.value!=`string`&&(t.color=`var(--vscode-debugTokenExpression-number)`),l.push((0,M.jsx)(`span`,{style:t,children:e?.preview||``},l.length+1))}return c}function Ur(e,t){return[(0,M.jsx)(`span`,{dangerouslySetInnerHTML:{__html:$n(e.trim(),t)}})]}function Wr(e){try{let t={},n=e.split(`;`);for(let e of n){let n=e.trim();if(!n)continue;let[r,i]=n.split(`:`);if(r=r.trim(),i=i.trim(),!Gr(r))continue;let a=r.replace(/-([a-z])/g,e=>e[1].toUpperCase());t[a]=i}return t}catch{return{}}}function Gr(e){return[`background`,`border`,`color`,`font`,`line`,`margin`,`padding`,`text`].some(t=>e.startsWith(t))}var Kr=({noShadow:e,children:t,noMinHeight:n,className:r,sidebarBackground:i,onClick:a})=>(0,M.jsx)(`div`,{className:k(`toolbar`,e&&`no-shadow`,n&&`no-min-height`,r,i&&`toolbar-sidebar-background`),onClick:a,children:t}),qr=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:a,mode:o})=>{let s=T.useId();return t||=e[0].id,o||=`default`,(0,M.jsx)(`div`,{className:`tabbed-pane`,"data-testid":a,children:(0,M.jsxs)(`div`,{className:`vbox`,children:[(0,M.jsxs)(Kr,{children:[r&&(0,M.jsx)(`div`,{style:{flex:`none`,display:`flex`,margin:`0 4px`,alignItems:`center`},children:[...r]}),o==="default"&&(0,M.jsx)(`div`,{style:{flex:`auto`,display:`flex`,height:`100%`,overflow:`hidden`},role:`tablist`,children:[...e.map(e=>(0,M.jsx)(Jr,{id:e.id,ariaControls:`${s}-${e.id}`,title:e.title,count:e.count,errorCount:e.errorCount,selected:t===e.id,onSelect:n},e.id))]}),o===`select`&&(0,M.jsx)(`div`,{style:{flex:`auto`,display:`flex`,height:`100%`,overflow:`hidden`},role:`tablist`,children:(0,M.jsx)(`select`,{style:{width:`100%`,background:`none`,cursor:`pointer`},value:t,onChange:t=>{n?.(e[t.currentTarget.selectedIndex].id)},children:e.map(e=>{let t=``;return e.count&&(t=` (${e.count})`),e.errorCount&&(t=` (${e.errorCount})`),(0,M.jsxs)(`option`,{value:e.id,role:`tab`,"aria-controls":`${s}-${e.id}`,children:[e.title,t]},e.id)})})}),i&&(0,M.jsx)(`div`,{style:{flex:`none`,display:`flex`,alignItems:`center`},children:[...i]})]}),e.map(e=>{let n=`tab-content tab-`+e.id;if(e.component)return(0,M.jsx)(`div`,{id:`${s}-${e.id}`,role:`tabpanel`,"aria-label":e.title,className:n,style:{display:t===e.id?`inherit`:`none`},children:e.component},e.id);if(t===e.id)return(0,M.jsx)(`div`,{id:`${s}-${e.id}`,role:`tabpanel`,"aria-label":e.title,className:n,children:e.render()},e.id)})]})})},Jr=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:a,ariaControls:o})=>(0,M.jsxs)(`button`,{className:k(`tabbed-pane-tab`,i&&`selected`),onClick:()=>a?.(e),role:`tab`,title:t,"aria-controls":o,"aria-selected":i,children:[(0,M.jsx)(`div`,{className:`tabbed-pane-tab-label`,children:t}),!!n&&(0,M.jsx)(`div`,{className:`tabbed-pane-tab-counter`,children:n}),!!r&&(0,M.jsx)(`div`,{className:`tabbed-pane-tab-counter error`,children:r})]});async function Yr(e,t){let n=navigator.platform.includes(`Win`)?`win`:`unix`,r=[],i=new Set([`accept-encoding`,`host`,`method`,`path`,`scheme`,`version`,`authority`,`protocol`]);function a(e){return`^"`+e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,`^$&`).replace(/%(?=[a-zA-Z0-9_])/g,`%^`).replace(/[^ -~\r\n]/g,` `).replace(/\r?\n|\r/g,`^

`)+`^"`}function o(e){function t(e){let t=e.charCodeAt(0).toString(16);for(;t.length<4;)t=`0`+t;return`\\u`+t}return/[\0-\x1F\x7F-\x9F!]|\'/.test(e)?`$'`+e.replace(/\\/g,`\\\\`).replace(/\'/g,`\\'`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/[\0-\x1F\x7F-\x9F!]/g,t)+`'`:`'`+e+`'`}let s=n===`win`?a:o;r.push(s(t.request.url).replace(/[[{}\]]/g,`\\$&`));let c=`GET`,l=[],u=await Zr(e,t);u&&(l.push(`--data-raw `+s(u)),i.add(`content-length`),c=`POST`),t.request.method!==c&&r.push(`-X `+s(t.request.method));let d=t.request.headers;for(let e=0;e<d.length;e++){let t=d[e],n=t.name.replace(/^:/,``);if(i.has(n.toLowerCase()))continue;let a=t.value;a.trim()?n.toLowerCase()===`cookie`?r.push(`-b `+s(a)):r.push(`-H `+s(n+`: `+a)):r.push(`-H `+s(n+`;`))}return r=r.concat(l),`curl `+r.join(r.length>=3?n===`win`?` ^
  `:` \\
  `:` `)}async function Xr(e,t,n=0){let r=new Set([`method`,`path`,`scheme`,`version`,`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`cookie`,`cookie2`,`date`,`dnt`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`,`user-agent`]),i=new Set([`cookie`,`authorization`]),a=JSON.stringify(t.request.url),o=t.request.headers,s=o.reduce((e,t)=>{let n=t.name;return!r.has(n.toLowerCase())&&!n.includes(`:`)&&e.append(n,t.value),e},new Headers),c={};for(let e of s)c[e[0]]=e[1];let l=t.request.cookies.length||o.some(({name:e})=>i.has(e.toLowerCase()))?`include`:`omit`,u=o.find(({name:e})=>e.toLowerCase()===`referer`),d=u?u.value:void 0,f=await Zr(e,t),p={headers:Object.keys(c).length?c:void 0,referrer:d,body:f,method:t.request.method,mode:`cors`};if(n===1){let e=o.find(e=>e.name.toLowerCase()===`cookie`),t={};delete p.mode,e&&(t.cookie=e.value),d&&(delete p.referrer,t.Referer=d),Object.keys(t).length&&(p.headers={...c,...t})}else p.credentials=l;return`fetch(${a}, ${JSON.stringify(p,null,2)});`}async function Zr(e,t){return e&&t.request.postData?._file?await fetch(e.createRelativeUrl(`file/${t.request.postData._file}`)).then(e=>e.text()):t.request.postData?.text}var Qr=class{generatePlaywrightRequestCall(e,t){let n=e.method.toLowerCase(),r=new URL(e.url),i=`${r.origin}${r.pathname}`,a={};[`delete`,`get`,`head`,`post`,`put`,`patch`].includes(n)||(a.method=n,n=`fetch`),r.searchParams.size&&(a.params=Object.fromEntries(r.searchParams.entries())),t&&(a.data=t),e.headers.length&&(a.headers=Object.fromEntries(e.headers.map(e=>[e.name,e.value])));let o=[`'${i}'`];return Object.keys(a).length>0&&o.push(this.prettyPrintObject(a)),`await page.request.${n}(${o.join(`, `)});`}prettyPrintObject(e,t=2,n=0){if(e===null)return`null`;if(e===void 0)return`undefined`;if(typeof e!=`object`)return typeof e==`string`?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return`[]`;let r=` `.repeat(n*t),i=` `.repeat((n+1)*t);return`[\n${e.map(e=>`${i}${this.prettyPrintObject(e,t,n+1)}`).join(`,
`)}\n${r}]`}if(Object.keys(e).length===0)return`{}`;let r=` `.repeat(n*t),i=` `.repeat((n+1)*t);return`{\n${Object.entries(e).map(([e,r])=>{let a=this.prettyPrintObject(r,t,n+1);return`${i}${/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e)?e:this.stringLiteral(e)}: ${a}`}).join(`,
`)}\n${r}}`}stringLiteral(e){return e=e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`),e.includes(`
`)||e.includes(`\r`)||e.includes(`	`)?"`"+e+"`":`'${e}'`}},$r=class{generatePlaywrightRequestCall(e,t){let n=new URL(e.url),r=[`"${`${n.origin}${n.pathname}`}"`],i=e.method.toLowerCase();[`delete`,`get`,`head`,`post`,`put`,`patch`].includes(i)||(r.push(`method="${i}"`),i=`fetch`),n.searchParams.size&&r.push(`params=${this.prettyPrintObject(Object.fromEntries(n.searchParams.entries()))}`),t&&r.push(`data=${this.prettyPrintObject(t)}`),e.headers.length&&r.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(e=>[e.name,e.value])))}`);let a=r.length===1?r[0]:`\n${r.map(e=>this.indent(e,2)).join(`,
`)}\n`;return`await page.request.${i}(${a})`}indent(e,t){return e.split(`
`).map(e=>` `.repeat(t)+e).join(`
`)}prettyPrintObject(e,t=2,n=0){if(e==null)return`None`;if(typeof e!=`object`)return typeof e==`string`?this.stringLiteral(e):typeof e==`boolean`?e?`True`:`False`:String(e);if(Array.isArray(e)){if(e.length===0)return`[]`;let r=` `.repeat(n*t),i=` `.repeat((n+1)*t);return`[\n${e.map(e=>`${i}${this.prettyPrintObject(e,t,n+1)}`).join(`,
`)}\n${r}]`}if(Object.keys(e).length===0)return`{}`;let r=` `.repeat(n*t),i=` `.repeat((n+1)*t);return`{\n${Object.entries(e).map(([e,r])=>{let a=this.prettyPrintObject(r,t,n+1);return`${i}${this.stringLiteral(e)}: ${a}`}).join(`,
`)}\n${r}}`}stringLiteral(e){return JSON.stringify(e)}},ei=class{generatePlaywrightRequestCall(e,t){let n=new URL(e.url),r=`${n.origin}${n.pathname}`,i={},a=[],o=e.method.toLowerCase();[`delete`,`get`,`head`,`post`,`put`,`patch`].includes(o)||(i.Method=o,o=`fetch`),n.searchParams.size&&(i.Params=Object.fromEntries(n.searchParams.entries())),t&&(i.Data=t),e.headers.length&&(i.Headers=Object.fromEntries(e.headers.map(e=>[e.name,e.value])));let s=[`"${r}"`];return Object.keys(i).length>0&&s.push(this.prettyPrintObject(i)),`${a.join(`
`)}${a.length?`
`:``}await request.${this.toFunctionName(o)}(${s.join(`, `)});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+`Async`}prettyPrintObject(e,t=2,n=0){if(e==null)return`null`;if(typeof e!=`object`)return typeof e==`string`?this.stringLiteral(e):typeof e==`boolean`?e?`true`:`false`:String(e);if(Array.isArray(e)){if(e.length===0)return`new object[] {}`;let r=` `.repeat(n*t),i=` `.repeat((n+1)*t);return`new object[] {\n${e.map(e=>`${i}${this.prettyPrintObject(e,t,n+1)}`).join(`,
`)}\n${r}}`}if(Object.keys(e).length===0)return`new {}`;let r=` `.repeat(n*t),i=` `.repeat((n+1)*t);return`new() {\n${Object.entries(e).map(([e,r])=>{let a=this.prettyPrintObject(r,t,n+1);return`${i}${n===0?e:`[${this.stringLiteral(e)}]`} = ${a}`}).join(`,
`)}\n${r}}`}stringLiteral(e){return JSON.stringify(e)}},ti=class{generatePlaywrightRequestCall(e,t){let n=new URL(e.url),r=[`"${n.origin}${n.pathname}"`],i=[],a=e.method.toLowerCase();[`delete`,`get`,`head`,`post`,`put`,`patch`].includes(a)||(i.push(`setMethod("${a}")`),a=`fetch`);for(let[e,t]of n.searchParams)i.push(`setQueryParam(${this.stringLiteral(e)}, ${this.stringLiteral(t)})`);t&&i.push(`setData(${this.stringLiteral(t)})`);for(let t of e.headers)i.push(`setHeader(${this.stringLiteral(t.name)}, ${this.stringLiteral(t.value)})`);return i.length>0&&r.push(`RequestOptions.create()\n  .${i.join(`
  .`)}\n`),`request.${a}(${r.join(`, `)});`}stringLiteral(e){return JSON.stringify(e)}};function ni(e){if(e===`javascript`)return new Qr;if(e===`python`)return new $r;if(e===`csharp`)return new ei;if(e===`java`)return new ti;throw Error(`Unsupported language: `+e)}var ri=({resource:e,sdkLanguage:t,startTimeOffset:n,onClose:r})=>{let[i,a]=T.useState(`headers`),o=Mn(),s=te(async()=>{if(o&&e.request.postData){let t=e.request.headers.find(e=>e.name.toLowerCase()===`content-type`),n=t?t.value:``;return e.request.postData._file?{text:await(await fetch(o.createRelativeUrl(`file/${e.request.postData._file}`))).text(),mimeType:n}:{text:e.request.postData.text,mimeType:n}}else return null},[e],null);return(0,M.jsx)(qr,{leftToolbar:[(0,M.jsx)(N,{icon:`close`,title:`Close`,onClick:r},`close`)],rightToolbar:[(0,M.jsx)(ii,{requestBody:s,resource:e,sdkLanguage:t},`dropdown`)],tabs:[{id:`headers`,title:`Headers`,render:()=>(0,M.jsx)(si,{resource:e,startTimeOffset:n})},{id:`payload`,title:`Payload`,render:()=>(0,M.jsx)(ci,{resource:e,requestBody:s})},{id:`response`,title:`Response`,render:()=>(0,M.jsx)(li,{resource:e})}],selectedTab:i,setSelectedTab:a})},ii=({resource:e,sdkLanguage:t,requestBody:n})=>{let r=Mn(),i=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`codicon codicon-check`,style:{marginRight:`5px`}}),` Copied `]});return(0,M.jsxs)(`div`,{className:`copy-request-dropdown`,children:[(0,M.jsxs)(N,{className:`copy-request-dropdown-toggle`,children:[(0,M.jsx)(`span`,{className:`codicon codicon-copy`,style:{marginRight:`5px`}}),`Copy request`,(0,M.jsx)(`span`,{className:`codicon codicon-chevron-down`,style:{marginLeft:`5px`}})]}),(0,M.jsxs)(`div`,{className:`copy-request-dropdown-menu`,children:[(0,M.jsx)(Hn,{description:`Copy as cURL`,copiedDescription:i,value:()=>Yr(r,e)}),(0,M.jsx)(Hn,{description:`Copy as Fetch`,copiedDescription:i,value:()=>Xr(r,e)}),(0,M.jsx)(Hn,{description:`Copy as Playwright`,copiedDescription:i,value:async()=>ni(t).generatePlaywrightRequestCall(e.request,n?.text)})]})]})},ai=({toggled:e,error:t,onToggle:n})=>(0,M.jsx)(N,{icon:`json`,title:`Pretty print`,toggled:e,errorBadge:t?`Formatting failed`:void 0,onClick:e=>{e.stopPropagation(),n()}}),oi=({title:e,data:t,showCount:n,children:r,titleChildren:i,className:a})=>{let[o,s]=ae(`trace-viewer-network-details-${e.replaceAll(` `,`-`)}`,!0);return(0,M.jsxs)(Er,{expanded:o,setExpanded:s,expandOnTitleClick:!0,title:(0,M.jsxs)(`span`,{className:`network-request-details-header`,children:[e,n&&(0,M.jsxs)(`span`,{className:`network-request-details-header-count`,children:[` Ă— `,t?.length??0]})]}),titleSuffix:i,className:a,children:[t&&(0,M.jsx)(`table`,{className:`network-request-details-table`,children:(0,M.jsx)(`tbody`,{children:t.map(({name:e,value:t},n)=>t!==null&&(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{children:e}),(0,M.jsx)(`td`,{children:t})]},n))})}),r]})},si=({resource:e,startTimeOffset:t})=>(0,M.jsxs)(`div`,{className:`vbox network-request-details-tab`,children:[(0,M.jsx)(oi,{title:`General`,data:T.useMemo(()=>Object.entries({URL:e.request.url,Method:e.request.method,"Status Code":e.response.status===-1?`canceled`:e.response.status>0&&(0,M.jsxs)(`span`,{className:yi(e.response.status),children:[` `,e.response.status,` `,e.response.statusText]}),Start:wn(t),Duration:wn(e.time)}).map(([e,t])=>({name:e,value:t})),[e,t])}),(0,M.jsx)(oi,{title:`Request Headers`,showCount:!0,data:e.request.headers}),(0,M.jsx)(oi,{title:`Response Headers`,showCount:!0,data:e.response.headers})]}),ci=({resource:e,requestBody:t})=>{let[n,r]=ae(`trace-viewer-network-details-show-formatted-payload`,!0),i=e.request.queryString.length>0,a=!!(t||e.request.postData),o=wi(t,n);return(0,M.jsxs)(`div`,{className:`vbox network-request-details-tab`,children:[!i&&!a&&(0,M.jsx)(`em`,{className:`network-request-no-payload`,children:`No payload for this request.`}),i&&(0,M.jsx)(oi,{title:`Query String Parameters`,showCount:!0,data:e.request.queryString}),t&&(0,M.jsx)(oi,{title:`Request Body`,className:`network-request-request-body`,titleChildren:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{style:{margin:`auto`}}),(0,M.jsx)(ai,{toggled:n,error:o.error,onToggle:()=>r(!n)})]}),children:(0,M.jsx)(_r,{text:o.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})})]})},li=({resource:e})=>{let t=Mn(),[n,r]=T.useState(null);T.useEffect(()=>{(async()=>{if(t&&e.response.content._file){let n=e.response.content.mimeType.includes(`image`),i=e.response.content.mimeType.includes(`font`),a=await fetch(t.createRelativeUrl(`file/${e.response.content._file}`));if(n){let e=await a.blob(),t=new FileReader,n=new Promise(e=>t.onload=e);t.readAsDataURL(e),r({dataUrl:(await n).target.result})}else r(i?{font:await a.arrayBuffer()}:{text:await a.text(),mimeType:e.response.content.mimeType})}else r(null)})()},[e,t]);let[i,a]=ae(`trace-viewer-network-details-show-formatted-response`,!0),o=wi(n,i);return(0,M.jsxs)(`div`,{className:`vbox network-request-details-tab`,children:[!e.response.content._file&&(0,M.jsx)(`div`,{children:`Response body is not available for this request.`}),n&&n.font&&(0,M.jsx)(ui,{font:n.font}),n&&n.dataUrl&&(0,M.jsx)(`div`,{children:(0,M.jsx)(`img`,{draggable:`false`,src:n.dataUrl})}),n&&n.text!==void 0&&(0,M.jsxs)(`div`,{className:`vbox network-response-body`,children:[(0,M.jsx)(_r,{text:o.text,mimeType:n.mimeType,readOnly:!0,lineNumbers:!0}),(0,M.jsxs)(Kr,{noShadow:!0,noMinHeight:!0,className:`network-response-toolbar`,children:[(0,M.jsx)(`div`,{style:{margin:`auto`}}),(0,M.jsx)(ai,{toggled:i,error:o.error,onToggle:()=>a(!i)})]})]})]})},ui=({font:e})=>{let[t,n]=T.useState(!1);return T.useEffect(()=>{let t;try{t=new FontFace(`font-preview`,e),t.status===`loaded`&&document.fonts.add(t),t.status===`error`&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(t)}},[e]),t?(0,M.jsx)(`div`,{className:`network-font-preview-error`,children:`Could not load font preview`}):(0,M.jsxs)(`div`,{className:`network-font-preview`,children:[`ABCDEFGHIJKLM`,(0,M.jsx)(`br`,{}),`NOPQRSTUVWXYZ`,(0,M.jsx)(`br`,{}),`abcdefghijklm`,(0,M.jsx)(`br`,{}),`nopqrstuvwxyz`,(0,M.jsx)(`br`,{}),`1234567890`]})},di=({resource:e,startTimeOffset:t,onClose:n})=>{let[r,i]=T.useState(`messages`);return(0,M.jsx)(qr,{leftToolbar:[(0,M.jsx)(N,{icon:`close`,title:`Close`,onClick:n},`close`)],tabs:[{id:`headers`,title:`Headers`,render:()=>(0,M.jsx)(si,{resource:e,startTimeOffset:t})},{id:`messages`,title:`Messages`,render:()=>(0,M.jsx)(fi,{resource:e})}],selectedTab:r,setSelectedTab:i})},fi=({resource:e})=>{let t=Mn(),n=te(async()=>{if(e._webSocketMessages)return e._webSocketMessages.map((e,t)=>({...e,index:t,byteLength:_i(e)}));if(t&&e.response.content._file)try{let n=await fetch(t.createRelativeUrl(`file/${e.response.content._file}`));return n.ok?(await n.text()).split(`
`).filter(Boolean).map(e=>JSON.parse(e)).map((e,t)=>({...e,index:t,byteLength:_i(e)})):[]}catch{return[]}return[]},[e,t],void 0),[r,i]=T.useState(void 0),a=r===void 0?void 0:n?.[r],o=T.useMemo(()=>{if(n){for(let e of n)if(e.time>0)return e.time}},[n]);if(n===void 0)return(0,M.jsx)(Un,{text:`Loading...`});if(n.length===0)return(0,M.jsx)(Un,{text:`No messages captured`});let s=(0,M.jsx)(pi,{name:`network-websocket-messages`,ariaLabel:`WebSocket messages`,items:n,id:e=>String(e.index),selectedItem:a,onSelected:e=>i(e.index),render:e=>hi(e,o)});return a?(0,M.jsx)(Cn,{sidebarSize:200,orientation:`vertical`,sidebarIsFirst:!1,settingName:`networkWebSocketMessageDetails`,main:s,sidebar:(0,M.jsx)(mi,{message:a})}):s},pi=Xn,mi=({message:e})=>{let[t,n]=ae(`trace-viewer-network-details-show-formatted-message`,!0),r=T.useMemo(()=>{if(e.opcode===1){let t=e.data,n;try{JSON.parse(t),n=`application/json`}catch{n=`text/plain`}return{text:t,mimeType:n}}if(e.opcode===8||e.opcode===9||e.opcode===10){if(!e.data)return{text:``};try{return{text:Ei(e.data),mimeType:`text/plain`}}catch{return{text:Di(e.data)}}}return{text:Di(e.data)}},[e]),i=wi(r,t);return(0,M.jsxs)(`div`,{className:`vbox network-websocket-message-detail`,children:[(0,M.jsxs)(Kr,{noShadow:!0,noMinHeight:!0,className:`network-websocket-message-detail-toolbar`,children:[(0,M.jsxs)(`span`,{className:`network-websocket-message-detail-summary`,children:[e.type===`send`?`Sent`:`Received`,` · `,gi(e.opcode),` · `,Tn(_i(e))]}),(0,M.jsx)(`div`,{style:{margin:`auto`}}),(0,M.jsx)(ai,{toggled:t,error:i.error,onToggle:()=>n(!t)})]}),(0,M.jsx)(`div`,{className:`vbox network-websocket-message-detail-body`,children:(0,M.jsx)(_r,{text:i.text,mimeType:r.mimeType,readOnly:!0,lineNumbers:!0})})]})};function hi(e,t){let n=e.type===`send`?`codicon-arrow-up`:`codicon-arrow-down`,r=e.type===`send`?`Sent`:`Received`,i=gi(e.opcode),a=e.time>0&&t!==void 0?wn(e.time-t):`-`,o=vi(e);return(0,M.jsxs)(`div`,{className:`network-websocket-message-row`,children:[(0,M.jsx)(`span`,{className:`network-websocket-message-direction-${e.type} codicon ${n}`,title:r}),(0,M.jsx)(`span`,{className:`network-websocket-message-preview`,title:o,children:o}),(0,M.jsx)(`span`,{className:`network-websocket-message-opcode`,title:`Opcode ${e.opcode}`,children:i}),(0,M.jsx)(`span`,{className:`network-websocket-message-length`,title:`${e.byteLength} bytes`,children:Tn(e.byteLength)}),(0,M.jsx)(`span`,{className:`network-websocket-message-time`,children:a})]})}function gi(e){switch(e){case 0:return`Continuation`;case 1:return`Text`;case 2:return`Binary`;case 8:return`Close`;case 9:return`Ping`;case 10:return`Pong`;default:return`Opcode ${e}`}}function _i(e){return e.opcode===1?new TextEncoder().encode(e.data).length:Ti(e.data)}function vi(e){if(e.opcode===1){let t=e.data.replace(/\s+/g,` `);return t.length>200?t.substring(0,200)+`…`:t}return e.opcode===8?`(close)`:e.opcode===9?`(ping)`:e.opcode===10?`(pong)`:`(binary, ${Tn(Ti(e.data))})`}function yi(e){return e<300||e===304?`green-circle`:e<400?`yellow-circle`:`red-circle`}var bi=/<[^>]+>[^<]*<\//;function xi(e,t=`  `){let n=0,r=[],i=e.replace(/>\s*</g,`>
<`).split(`
`);for(let e of i){let i=e.trim();i&&(i.startsWith(`</`)?(n=Math.max(n-1,0),r.push(t.repeat(n)+i)):i.endsWith(`/>`)||i.startsWith(`<?`)||bi.test(i)?r.push(t.repeat(n)+i):i.startsWith(`<`)?(r.push(t.repeat(n)+i),n++):r.push(t.repeat(n)+i))}return r.join(`
`)}function Si(e){let t=JSON.rawJSON;return JSON.stringify(JSON.parse(e,t&&((e,n,r)=>typeof n==`number`&&r?.source!==void 0?t(r.source):n)),null,2)}function Ci(e,t){return!e.trim()||!t?e:Cr(t)?Si(e):wr(t)?xi(e):t.includes(`application/x-www-form-urlencoded`)?decodeURIComponent(e):e}var wi=(e,t)=>T.useMemo(()=>{if(e?.text===void 0)return{text:``};if(!t)return{text:e.text};try{return{text:Ci(e.text,e.mimeType)}}catch{return{text:e.text,error:!0}}},[e,t]);function Ti(e){if(!e)return 0;let t=e[e.length-2]===`=`?2:+(e[e.length-1]===`=`);return Math.max(0,Math.floor(e.length*3/4)-t)}function Ei(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return new TextDecoder(`utf-8`,{fatal:!1}).decode(n)}function Di(e){if(!e)return``;let t=atob(e),n=[];for(let e=0;e<t.length;e+=16){let r=Math.min(16,t.length-e),i=[],a=[];for(let n=0;n<16;++n){if(n<r){let r=t.charCodeAt(e+n);i.push(r.toString(16).padStart(2,`0`)),a.push(r>=32&&r<127?t[e+n]:`.`)}else i.push(`  `);n===7&&i.push(``)}n.push(`${e.toString(16).padStart(8,`0`)}  ${i.join(` `)}  ${a.join(``)}`)}return n.join(`
`)}function Oi(e){let[t,n]=T.useState([]);T.useEffect(()=>{let t=[];for(let n=0;n<e.columns.length-1;++n){let r=e.columns[n];t[n]=(t[n-1]||0)+e.columnWidths.get(r)}n(t)},[e.columns,e.columnWidths]);function r(t){let n=new Map(e.columnWidths.entries());for(let r=0;r<t.length;++r){let i=t[r]-(t[r-1]||0),a=e.columns[r];n.set(a,i)}e.setColumnWidths(n)}let i=T.useCallback(t=>{e.setSorting?.({by:t,negate:e.sorting?.by===t?!e.sorting.negate:!1})},[e]);return(0,M.jsxs)(`div`,{className:`grid-view ${e.name}-grid-view`,children:[(0,M.jsx)(sr,{orientation:`horizontal`,offsets:t,setOffsets:r,resizerColor:`var(--vscode-panel-border)`,resizerWidth:1,minColumnWidth:25}),(0,M.jsxs)(`div`,{className:`vbox`,children:[(0,M.jsx)(`div`,{className:`grid-view-header`,children:e.columns.map((t,n)=>(0,M.jsxs)(`div`,{className:`grid-view-header-cell `+ki(t,e.sorting),style:{width:n<e.columns.length-1?e.columnWidths.get(t):void 0},onClick:()=>e.setSorting&&i(t),children:[(0,M.jsx)(`span`,{className:`grid-view-header-cell-title`,children:e.columnTitle(t)}),(0,M.jsx)(`span`,{className:`codicon codicon-triangle-up`}),(0,M.jsx)(`span`,{className:`codicon codicon-triangle-down`})]},e.columnTitle(t)))}),(0,M.jsx)(Xn,{name:e.name,items:e.items,ariaLabel:e.ariaLabel,id:e.id,render:(t,n)=>(0,M.jsx)(M.Fragment,{children:e.columns.map((r,i)=>{let{body:a,title:o}=e.render(t,r,n);return(0,M.jsx)(`div`,{className:`grid-view-cell grid-view-column-${String(r)}`,title:o,style:{width:i<e.columns.length-1?e.columnWidths.get(r):void 0},children:a},e.columnTitle(r))})}),icon:e.icon,isError:e.isError,isWarning:e.isWarning,isInfo:e.isInfo,selectedItem:e.selectedItem,onAccepted:e.onAccepted,onSelected:e.onSelected,onHighlighted:e.onHighlighted,onIconClicked:e.onIconClicked,noItemsMessage:e.noItemsMessage,dataTestId:e.dataTestId,notSelectable:e.notSelectable})]})]})}function ki(e,t){return e===t?.by?` filter-`+(t.negate?`negative`:`positive`):``}var Ai=[`Fetch`,`HTML`,`JS`,`CSS`,`Font`,`Image`,`WS`],ji={searchValue:``,resourceTypes:new Set},Mi=({filterState:e,onFilterStateChange:t})=>(0,M.jsxs)(`div`,{className:`network-filters`,children:[(0,M.jsx)(`input`,{type:`search`,placeholder:`Filter network`,"aria-label":`Filter network`,spellCheck:!1,value:e.searchValue,onChange:n=>t({...e,searchValue:n.target.value})}),(0,M.jsxs)(`div`,{className:`network-filters-resource-types`,role:`tablist`,"aria-multiselectable":`true`,children:[(0,M.jsx)(`button`,{title:`All`,onClick:()=>t({...e,resourceTypes:new Set}),className:`network-filters-resource-type ${e.resourceTypes.size===0?`selected`:``}`,role:`tab`,"aria-selected":e.resourceTypes.size===0,children:`All`}),Ai.map(n=>(0,M.jsx)(`button`,{title:n,onClick:r=>{let i;i=r.ctrlKey||r.metaKey?e.resourceTypes.symmetricDifference(new Set([n])):new Set([n]),t({...e,resourceTypes:i})},className:`network-filters-resource-type ${e.resourceTypes.has(n)?`selected`:``}`,role:`tab`,"aria-selected":e.resourceTypes.has(n),children:n},n))]})]}),Ni=Oi;function Pi(e,t,n){return{resources:T.useMemo(()=>(e?.resources||[]).filter(e=>n&&e.pageref!==n?!1:t?!!e._monotonicTime&&e._monotonicTime>=t.minimum&&e._monotonicTime<=t.maximum:!0),[e,t,n]),model:e}}var Fi=({boundaries:e,networkModel:t,onResourceHovered:n,sdkLanguage:r})=>{let[i,a]=T.useState(void 0),[o,s]=T.useState(void 0),[c,l]=T.useState(ji),{renderedEntries:u,multipleContexts:d}=T.useMemo(()=>{let n=t.resources.map(n=>Bi(n,e,t.model)).filter(Ki(c));return i&&Ui(n,i),{renderedEntries:n,multipleContexts:new Set(n.map(e=>e.contextId).filter(Boolean)).size>1}},[t.resources,t.model,c,i,e]),f=T.useMemo(()=>o?u.find(e=>e.resource.id===o):void 0,[o,u]),[p,m]=T.useState(()=>new Map(P().map(e=>[e,Li(e)]))),h=T.useCallback(e=>{l(e),s(void 0)},[]);if(!t.resources.length)return(0,M.jsx)(Un,{text:`No network calls`});let g=(0,M.jsx)(Ni,{name:`network`,ariaLabel:`Network requests`,items:u,selectedItem:f,onSelected:e=>s(e.resource.id),onHighlighted:e=>n?.(e?Vi(e.resource):void 0),columns:Ri(!!f,d),columnTitle:Ii,columnWidths:p,setColumnWidths:m,isError:e=>e.status.code>=400||e.status.code===-1,isInfo:e=>!!e.route,render:(e,t)=>F(e,t),sorting:i,setSorting:a});return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Mi,{filterState:c,onFilterStateChange:h}),!f&&g,f&&(0,M.jsx)(Cn,{sidebarSize:p.get(`name`),sidebarIsFirst:!0,orientation:`horizontal`,settingName:`networkResourceDetails`,main:f.resource._resourceType===`websocket`?(0,M.jsx)(di,{resource:f.resource,startTimeOffset:f.start,onClose:()=>s(void 0)}):(0,M.jsx)(ri,{resource:f.resource,sdkLanguage:r,startTimeOffset:f.start,onClose:()=>s(void 0)}),sidebar:g})]})},Ii=e=>e===`contextId`?`Source`:e===`name`?`Name`:e===`method`?`Method`:e===`status`?`Status`:e===`contentType`?`Content Type`:e===`duration`?`Duration`:e===`size`?`Size`:e===`start`?`Start`:e===`route`?`Route`:``,Li=e=>e===`name`?200:e===`method`||e===`status`?60:e===`contentType`?200:e===`contextId`?60:100;function Ri(e,t){if(e){let e=[`name`];return t&&e.unshift(`contextId`),e}let n=P();return t||(n=n.filter(e=>e!==`contextId`)),n}function P(){return[`contextId`,`name`,`method`,`status`,`contentType`,`duration`,`size`,`start`,`route`]}var F=(e,t)=>t===`contextId`?{body:e.contextId,title:e.name.url}:t===`name`?{body:e.name.name,title:e.name.url}:t===`method`?{body:e.method}:t===`status`?{body:e.status.code===-1?`canceled`:e.status.code>0?e.status.code:``,title:e.status.code===-1?`canceled`:e.status.text}:t===`contentType`?{body:e.contentType}:t===`duration`?{body:wn(e.duration)}:t===`size`?{body:Tn(e.size)}:t===`start`?{body:wn(e.start)}:t===`route`?{body:e.route}:{body:``};function zi(e,t){let n=un(t);return!e||!n?``:e.resourceOwnerRefToTitle.get(n)||``}var Bi=(e,t,n)=>{let r=Hi(e),i;try{let t=new URL(e.request.url);i=t.pathname.substring(t.pathname.lastIndexOf(`/`)+1),i||=t.host,t.search&&(i+=t.search)}catch{i=e.request.url}let a;if(e._resourceType===`websocket`)a=`websocket`;else{a=e.response.content.mimeType;let t=a.match(/^(.*);\s*charset=.*$/);t&&(a=t[1])}return{name:{name:i,url:e.request.url},method:e.request.method,status:{code:e.response.status,text:e.response.statusText},contentType:a,duration:e.time,size:e.response._transferSize>0?e.response._transferSize:e.response.bodySize,start:e._monotonicTime-t.minimum,route:r,resource:e,contextId:zi(n,e)}};function Vi(e){if(e._monotonicTime)return{minimum:e._monotonicTime,maximum:e._monotonicTime+e.time}}function Hi(e){return e._wasAborted?`aborted`:e._wasContinued?`continued`:e._wasFulfilled?`fulfilled`:e._apiRequestRef?`api`:``}function Ui(e,t){let n=Wi(t?.by);n&&e.sort(n),t.negate&&e.reverse()}function Wi(e){if(e===`start`)return(e,t)=>e.start-t.start;if(e===`duration`)return(e,t)=>e.duration-t.duration;if(e===`status`)return(e,t)=>e.status.code-t.status.code;if(e===`method`)return(e,t)=>{let n=e.method,r=t.method;return n.localeCompare(r)};if(e===`size`)return(e,t)=>e.size-t.size;if(e===`contentType`)return(e,t)=>e.contentType.localeCompare(t.contentType);if(e===`name`)return(e,t)=>e.name.name.localeCompare(t.name.name);if(e===`route`)return(e,t)=>e.route.localeCompare(t.route);if(e===`contextId`)return(e,t)=>e.contextId.localeCompare(t.contextId)}var Gi={Fetch:e=>e.contentType===`application/json`,HTML:e=>e.contentType===`text/html`,CSS:e=>e.contentType===`text/css`,JS:e=>e.contentType.includes(`javascript`),Font:e=>e.contentType.includes(`font`),Image:e=>e.contentType.includes(`image`),WS:e=>e.resource._resourceType===`websocket`};function Ki({searchValue:e,resourceTypes:t}){return n=>(t.size===0||Array.from(t).some(e=>Gi[e](n)))&&n.name.url.toLowerCase().includes(e.toLowerCase())}function qi(e){return e.box.cursor===`pointer`}function Ji(e,t,n={}){let r=new e.LineCounter,i={keepSourceTokens:!0,lineCounter:r,...n},a=e.parseDocument(t,i),o=[],s=e=>[r.linePos(e[0]),r.linePos(e[1])],c=e=>{o.push({message:e.message,range:[r.linePos(e.pos[0]),r.linePos(e.pos[1])]})},l=(t,n)=>{for(let r of n.items){if(r instanceof e.Scalar&&typeof r.value==`string`){let e=Qi.parse(r,i,o);e&&(t.children=t.children||[],t.children.push(e));continue}if(r instanceof e.YAMLMap){u(t,r);continue}o.push({message:`Sequence items should be strings or maps`,range:s(r.range||n.range)})}},u=(t,n)=>{for(let r of n.items){if(t.children=t.children||[],!(r.key instanceof e.Scalar&&typeof r.key.value==`string`)){o.push({message:`Only string keys are supported`,range:s(r.key.range||n.range)});continue}let a=r.key,c=r.value;if(a.value===`text`){if(!(c instanceof e.Scalar&&typeof c.value==`string`)){o.push({message:`Text value should be a string`,range:s(r.value.range||n.range)});continue}t.children.push({kind:`text`,text:Zi(c.value)});continue}if(a.value===`/children`){if(!(c instanceof e.Scalar&&typeof c.value==`string`)||c.value!==`contain`&&c.value!==`equal`&&c.value!==`deep-equal`){o.push({message:`Strict value should be "contain", "equal" or "deep-equal"`,range:s(r.value.range||n.range)});continue}t.containerMode=c.value;continue}if(a.value.startsWith(`/`)){if(!(c instanceof e.Scalar&&typeof c.value==`string`)){o.push({message:`Property value should be a string`,range:s(r.value.range||n.range)});continue}t.props=t.props??{},t.props[a.value.slice(1)]=Zi(c.value);continue}let u=Qi.parse(a,i,o);if(u){if(c instanceof e.Scalar){let e=typeof c.value;if(e!==`string`&&e!==`number`&&e!==`boolean`){o.push({message:`Node value should be a string or a sequence`,range:s(r.value.range||n.range)});continue}t.children.push({...u,children:[{kind:`text`,text:Zi(String(c.value))}]});continue}if(c instanceof e.YAMLSeq){t.children.push(u),l(u,c);continue}o.push({message:`Map values should be strings or sequences`,range:s(r.value.range||n.range)})}}},d={kind:`role`,role:`fragment`};return a.errors.forEach(c),o.length||(a.contents instanceof e.YAMLSeq||o.push({message:`Aria snapshot must be a YAML sequence, elements starting with " -"`,range:a.contents?s(a.contents.range):[{line:0,col:0},{line:0,col:0}]}),o.length)?{errors:o,fragment:d}:(l(d,a.contents),o.length?{errors:o,fragment:Yi}:d.children?.length===1&&(!d.containerMode||d.containerMode===`contain`)?{fragment:d.children[0],errors:[]}:{fragment:d,errors:[]})}var Yi={kind:`role`,role:`fragment`};function Xi(e){return e.replace(/[\u200b\u00ad]/g,``).replace(/[\r\n\s\t]+/g,` `).trim()}function Zi(e){return{raw:e,normalized:Xi(e)}}var Qi=class e{static parse(t,n,r){try{return new e(t.value)._parse()}catch(e){if(e instanceof $i){let i=n.prettyErrors===!1?e.message:e.message+`:

`+t.value+`
`+` `.repeat(e.pos)+`^
`;return r.push({message:i,range:[n.lineCounter.linePos(t.range[0]),n.lineCounter.linePos(t.range[0]+e.pos)]}),null}throw e}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||``}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);let t=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(t,this._pos)}_readString(){let e=``,t=!1;for(;!this._eof();){let n=this._next();if(t)e+=n,t=!1;else if(n===`\\`)t=!0;else if(n===`"`)return e;else e+=n}this._throwError(`Unterminated string`)}_throwError(e,t=0){throw new $i(e,t||this._pos)}_readRegex(){let e=``,t=!1,n=!1;for(;!this._eof();){let r=this._next();if(t)e+=r,t=!1;else if(r===`\\`)t=!0,e+=r;else if(r===`/`&&!n)return{pattern:e};else r===`[`?(n=!0,e+=r):r===`]`&&n?(e+=r,n=!1):e+=r}this._throwError(`Unterminated regex`)}_readStringOrRegex(){let e=this._peek();return e===`"`?(this._next(),Xi(this._readString())):e===`/`?(this._next(),this._readRegex()):null}_readAttributes(e){let t=this._pos;for(;this._skipWhitespace(),this._peek()===`[`;){this._next(),this._skipWhitespace(),t=this._pos;let n=this._readIdentifier(`attribute`);this._skipWhitespace();let r=``;if(this._peek()===`=`)for(this._next(),this._skipWhitespace(),t=this._pos;this._peek()!==`]`&&!this._isWhitespace()&&!this._eof();)r+=this._next();this._skipWhitespace(),this._peek()!==`]`&&this._throwError(`Expected ]`),this._next(),this._applyAttribute(e,n,r||`true`,t)}}_parse(){this._skipWhitespace();let e=this._readIdentifier(`role`);this._skipWhitespace();let t={kind:`role`,role:e,name:this._readStringOrRegex()||``};return this._readAttributes(t),this._skipWhitespace(),this._eof()||this._throwError(`Unexpected input`),t}_applyAttribute(e,t,n,r){if(t===`checked`){this._assert(n===`true`||n===`false`||n===`mixed`,`Value of "checked" attribute must be a boolean or "mixed"`,r),e.checked=n===`true`?!0:n===`false`?!1:`mixed`;return}if(t===`disabled`){this._assert(n===`true`||n===`false`,`Value of "disabled" attribute must be a boolean`,r),e.disabled=n===`true`;return}if(t===`expanded`){this._assert(n===`true`||n===`false`,`Value of "expanded" attribute must be a boolean`,r),e.expanded=n===`true`;return}if(t===`active`){this._assert(n===`true`||n===`false`,`Value of "active" attribute must be a boolean`,r),e.active=n===`true`;return}if(t===`invalid`){this._assert(n===`true`||n===`false`||n===`grammar`||n===`spelling`,`Value of "invalid" attribute must be a boolean, "grammar" or "spelling"`,r),e.invalid=n===`true`?!0:n===`false`?!1:n;return}if(t===`level`){this._assert(!isNaN(Number(n)),`Value of "level" attribute must be a number`,r),e.level=Number(n);return}if(t===`pressed`){this._assert(n===`true`||n===`false`||n===`mixed`,`Value of "pressed" attribute must be a boolean or "mixed"`,r),e.pressed=n===`true`?!0:n===`false`?!1:`mixed`;return}if(t===`selected`){this._assert(n===`true`||n===`false`,`Value of "selected" attribute must be a boolean`,r),e.selected=n===`true`;return}this._assert(!1,`Unsupported attribute [${t}]`,r)}_assert(e,t,n){e||this._throwError(t||`Assertion error`,n)}},$i=class extends Error{constructor(e,t){super(e),this.pos=t}};function ea(e,t){function n(e,t,r){let i=1,a=r+i;for(let r of e.children||[])typeof r==`string`?(i++,a++):(i+=n(r,t,a),a+=i);if(![`none`,`presentation`,`fragment`,`iframe`,`generic`].includes(e.role)&&e.name){let n=t.get(e.role);n||(n=new Map,t.set(e.role,n));let a=n.get(e.name),o=i*100-r;(!a||a.sizeAndPosition<o)&&n.set(e.name,{node:e,sizeAndPosition:o})}return i}let r=new Map;e&&n(e,r,0);let i=new Map;n(t,i,0);let a=[];for(let[e,t]of i)for(let[n,i]of t)r.get(e)?.get(n)||a.push(i);return a.sort((e,t)=>t.sizeAndPosition-e.sizeAndPosition),a[0]?.node}function ta(e){return ra(e)?`'`+e.replace(/'/g,`''`)+`'`:e}function na(e){return ra(e)?`"`+e.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case`\\`:return`\\\\`;case`"`:return`\\"`;case`\b`:return`\\b`;case`\f`:return`\\f`;case`
`:return`\\n`;case`\r`:return`\\r`;case`	`:return`\\t`;default:return`\\x`+e.charCodeAt(0).toString(16).padStart(2,`0`)}})+`"`:e}function ra(e){return!!(e.length===0||/^\s|\s$/.test(e)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(e)||/^-/.test(e)||/[\n:](\s|$)/.test(e)||/\s#/.test(e)||/[\n\r]/.test(e)||/^[&*\],?!>|@"'#%]/.test(e)||/[{}`]/.test(e)||/^\[/.test(e)||!isNaN(Number(e))||[`y`,`n`,`yes`,`no`,`true`,`false`,`on`,`off`,`null`,`~`].includes(e.toLowerCase())||/^[-+]?\.(inf|nan)$/i.test(e))}function ia(e,t={}){let n=[],r=t.convertStringsToRegex?sa:()=>!0,i=t.convertStringsToRegex?oa:e=>e,a=(e,t)=>{let r=na(i(e));r&&n.push(aa(t)+`- text: `+r)},o=e=>{let n=e.role;if(e.name&&e.name.length<=900){let r=i(e.name);if(r){let i=t.convertStringsToRegex&&r!==e.name;n+=` `+(i?r:JSON.stringify(r))}}return e.checked===`mixed`&&(n+=` [checked=mixed]`),e.checked===!0&&(n+=` [checked]`),e.disabled&&(n+=` [disabled]`),e.expanded&&(n+=` [expanded]`),e.active&&(n+=` [active]`),(e.invalid===`grammar`||e.invalid===`spelling`)&&(n+=` [invalid=${e.invalid}]`),e.invalid===!0&&(n+=` [invalid]`),e.level&&(n+=` [level=${e.level}]`),e.pressed===`mixed`&&(n+=` [pressed=mixed]`),e.pressed===!0&&(n+=` [pressed]`),e.selected===!0&&(n+=` [selected]`),e.ariaHidden&&(n+=` [aria-hidden]`),e.ref&&(n+=` [ref=${e.ref}]`,e.cursor===`pointer`&&(n+=` [cursor=pointer]`)),e.box&&(n+=` [box=${e.box.x},${e.box.y},${e.box.width},${e.box.height}]`),n},s=(e,c)=>{if(e.role===`text`){a(e.text||``,c);return}t.lineToNode?.set(n.length,e);let l=aa(c)+`- `+ta(o(e)),u=[];if(e.url!==void 0&&u.push([`url`,e.url]),e.placeholder!==void 0&&u.push([`placeholder`,e.placeholder]),e.text===void 0&&!u.length&&!e.children?.length)n.push(l);else if(e.text!==void 0&&!u.length)r(e,e.text)?n.push(l+`: `+na(i(e.text))):n.push(l);else{n.push(l+`:`);for(let[e,t]of u)n.push(aa(c+1)+`- /`+e+`: `+na(t));if(e.text!==void 0)a(r(e,e.text)?e.text:``,c+1);else for(let t of e.children||[])typeof t==`string`?a(r(e,t)?t:``,c+1):s(t,c+1)}};for(let t of e)s(t,0);return n.join(`
`)}function aa(e){return`  `.repeat(e)}function oa(t){let n=[{regex:/\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/,replacement:`[0-9a-fA-F-]+`},{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:`[\\d,.]+[bkmBKM]+`},{regex:/\b\d+[hmsp]+\b/,replacement:`\\d+[hmsp]+`},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:`[\\d,.]+[hmsp]+`},{regex:/\b\d+,\d+\b/,replacement:`\\d+,\\d+`},{regex:/\b\d+\.\d{2,}\b/,replacement:`\\d+\\.\\d+`},{regex:/\b\d{2,}\.\d+\b/,replacement:`\\d+\\.\\d+`},{regex:/\b\d{2,}\b/,replacement:`\\d+`}],r=``,i=0,a=new RegExp(n.map(e=>`(`+e.regex.source+`)`).join(`|`),`g`);return t.replace(a,(a,...o)=>{let s=o[o.length-2],c=o.slice(0,-2);r+=e(t.slice(i,s));for(let e=0;e<c.length;e++)if(c[e]){let{replacement:t}=n[e];r+=t;break}return i=s+a.length,a}),r?(r+=e(t.slice(i)),String(new RegExp(r))):t}function sa(e,t){if(!t.length)return!1;if(!e.name)return!0;let n=t.length<=200&&e.name.length<=200?d(t,e.name):``,r=t;for(;n&&r.includes(n);)r=r.replace(n,``);return r.trim().length/t.length>.1}function ca(e,t,n){return`internal:attr=[${e}=${u(t,n?.exact||!1)}]`}function la(e){return e.split(`,`)}function ua(e){return e.includes(`,`)?JSON.stringify(e):e}function da(e,t){return`internal:testid=[${ua(e)}=${u(t,!0)}]`}function fa(e,t){return`internal:label=`+i(e,!!t?.exact)}function pa(e,t){return ca(`alt`,e,t)}function ma(e,t){return ca(`title`,e,t)}function ha(e,t){return ca(`placeholder`,e,t)}function ga(e,t){return`internal:text=`+i(e,!!t?.exact)}function _a(e,t={}){let 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`,u(t.name,!!t.exact)]),t.description!==void 0&&n.push([`description`,u(t.description,!!t.exact)]),t.pressed!==void 0&&n.push([`pressed`,String(t.pressed)]),`internal:role=${e}${n.map(([e,t])=>`[${e}=${t}]`).join(``)}`}function va(e,t){ya(e,t.mode===`ai`?ka:Oa,t)}function ya(e,t,n){let r={snapshot:e,depth:-1,maxDepth:n.depth,ancestors:[],pendingContentRefs:new Set},i=(e,n)=>{let a=[],o=e=>{if(typeof e==`string`){a.push(e);return}r.depth=n+1;for(let n of t){let t=n.enter?.(e,r);if(t===`remove`)return;if(t===`unwrap`){e.children.forEach(o);return}}i(e,n+1),r.depth=n+1;for(let n of t){let t=n.exit?.(e,r);if(t===`remove`)return;if(t===`unwrap`){a.push(...e.children);return}}a.push(e)};r.ancestors.push(e),e.children.forEach(o),r.ancestors.pop(),e.children=a};for(let n of t)n.enter?.(e.root,r);i(e.root,-1),r.depth=-1;for(let n of t)n.exit?.(e.root,r)}function ba(e){return e.role===`generic`&&e.children.every(e=>typeof e==`string`)}function xa(e,t){return!!e.ref&&qi(e)&&!t.ancestors.some(e=>!!e.ref&&qi(e))}var Sa={name:`mergeStringChildren`,exit(e){let t=[],n=[],r=()=>{if(!n.length)return;let e=a(n.join(``));e&&t.push(e),n.length=0};for(let i of e.children)typeof i==`string`?n.push(i):(r(),t.push(i));r(),e.children=t,e.children.length===1&&e.children[0]===e.name&&(e.children=[])}},Ca={name:`unwrapSingleChildGenerics`,exit(e,t){if(!(e.role!==`generic`||e.name||e.children.length>1||!e.children.every(e=>typeof e!=`string`&&!!e.ref))&&!(!e.children.length&&xa(e,t)))return`unwrap`}},wa={name:`removeNamelessImages`,exit(e,t){if(e.role===`img`&&!e.name&&!e.children.length&&!xa(e,t))return`remove`}},Ta={name:`removeRedundantNames`,enter(e,t){if(e.ref){for(let n of t.snapshot.info.get(e.ref)?.nameFromContentRefs||[])t.pendingContentRefs.add(n);!(t.maxDepth&&t.depth>t.maxDepth)&&!ba(e)&&t.pendingContentRefs.delete(e.ref)}},exit(e,t){if(!e.ref)return;let n=t.snapshot.info.get(e.ref)?.nameFromContentRefs;if(n?.length)if(n.every(e=>!t.pendingContentRefs.has(e)))e.name=``;else for(let e of n)t.pendingContentRefs.delete(e)}},Ea={name:`removeNameRepeatingChild`,exit(e,t){let n=t.ancestors[t.ancestors.length-1];if(!n?.name||e.role!==`generic`||e.active||Object.keys(e.props).length)return;let r=e.children.length===1&&typeof e.children[0]==`string`?e.children[0]:void 0,i=e.name?e.children.length?void 0:e.name:r;if(i&&i===n.name)return e.ref&&t.pendingContentRefs.add(e.ref),`remove`}},Da={name:`inlineTextIntoGeneric`,exit(e){if(e.role!==`generic`||Object.keys(e.props).length||e.children.length!==1)return;let t=e.children[0];typeof t!=`string`&&(t.role!==`generic`||t.name||t.active||Object.keys(t.props).length||t.children.length===1&&typeof t.children[0]==`string`&&(e.children=[t.children[0]]))}},Oa=[Sa,Ca],ka=[Sa,wa,Ta,Da,Ea,Ca],Aa={};function ja(e){Aa=e}function Ma(){return Aa}function Na(e,t){for(;t;){if(e.contains(t))return!0;t=Ia(t)}return!1}function Pa(e){if(e.parentElement)return e.parentElement;if(e.parentNode&&e.parentNode.nodeType===11&&e.parentNode.host)return e.parentNode.host}function Fa(e){let t=e;for(;t.parentNode;)t=t.parentNode;if(t.nodeType===11||t.nodeType===9)return t}function Ia(e){for(;e.parentElement;)e=e.parentElement;return Pa(e)}function La(e,t,n){for(;e;){let r=e.closest(t);if(n&&r!==n&&r?.contains(n))return;if(r)return r;e=Ia(e)}}function Ra(e,t){let n=t===`::before`?Ja:t===`::after`?Ya:qa;if(n&&n.has(e))return n.get(e);let r=e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,t):void 0;return n?.set(e,r),r}function za(e,t){let n=Xa?.get(e);if(n!==void 0)return n;let r=Ba(e,t);return Xa?.set(e,r),r}function Ba(e,t){return t??=Ra(e),t?!(!e.checkVisibility()&&!Ha(e,t)||t.visibility!==`visible`):!0}function Va(e){return e.multiple||e.size>1}function Ha(e,t){if(Aa.browserNameForWorkarounds!==`webkit`||e.nodeName!==`OPTION`||t.display===`none`)return!1;let n=e.closest(`select`);if(!n||!Va(n))return!1;for(let t=e.parentElement;t&&t!==n;t=t.parentElement)if(Ra(t)?.display===`none`)return!1;return za(n)}function Ua(e){let t=Ra(e);if(!t)return{visible:!0,inline:!1};let n=t.cursor;if(t.display===`contents`){for(let t=e.firstChild;t;t=t.nextSibling){if(t.nodeType===1&&Wa(t))return{visible:!0,inline:!1,cursor:n};if(t.nodeType===3&&Ka(t))return{visible:!0,inline:!0,cursor:n}}return{visible:!1,inline:!1,cursor:n}}if(!za(e,t))return{cursor:n,visible:!1,inline:!1};let r=e.getBoundingClientRect();return{cursor:n,visible:r.width>0&&r.height>0,inline:t.display===`inline`}}function Wa(e){return Ua(e).visible}var Ga=Symbol(`playwrightTextNodeRange`);function Ka(e){let t=e.ownerDocument,n=t[Ga]??=t.createRange();n.selectNode(e);let r=n.getBoundingClientRect(),i=r.width>0&&r.height>0;return n.setStart(t,0),n.collapse(!0),i}function I(e){let t=e.tagName;if(typeof t==`string`){let e=t.charCodeAt(0);return e>=97&&e<=122?t.toUpperCase():t}return e instanceof HTMLFormElement?`FORM`:e.tagName.toUpperCase()}var qa,Ja,Ya,Xa,Za=0;function Qa(){++Za,qa??=new Map,Ja??=new Map,Ya??=new Map,Xa??=new Map}function $a(){--Za||(qa=void 0,Ja=void 0,Ya=void 0,Xa=void 0)}function eo(e){return e.hasAttribute(`aria-label`)||e.hasAttribute(`aria-labelledby`)}var to=`article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]`,no=[[`aria-atomic`,void 0],[`aria-busy`,void 0],[`aria-controls`,void 0],[`aria-current`,void 0],[`aria-describedby`,void 0],[`aria-details`,void 0],[`aria-dropeffect`,void 0],[`aria-flowto`,void 0],[`aria-grabbed`,void 0],[`aria-hidden`,void 0],[`aria-keyshortcuts`,void 0],[`aria-label`,[`caption`,`code`,`deletion`,`emphasis`,`generic`,`insertion`,`paragraph`,`presentation`,`strong`,`subscript`,`superscript`]],[`aria-labelledby`,[`caption`,`code`,`deletion`,`emphasis`,`generic`,`insertion`,`paragraph`,`presentation`,`strong`,`subscript`,`superscript`]],[`aria-live`,void 0],[`aria-owns`,void 0],[`aria-relevant`,void 0],[`aria-roledescription`,[`generic`]]];function ro(e,t){return no.some(([n,r])=>!r?.includes(t||``)&&e.hasAttribute(n))}function io(e){return!Number.isNaN(Number(String(e.getAttribute(`tabindex`))))}function ao(e){return!os(e)&&(oo(e)||io(e))}function oo(e){let t=I(e);return[`BUTTON`,`DETAILS`,`SELECT`,`TEXTAREA`].includes(t)?!0:t===`A`||t===`AREA`?e.hasAttribute(`href`):t===`INPUT`?!e.hidden:!1}var so={A:e=>e.hasAttribute(`href`)?`link`:null,AREA:e=>e.hasAttribute(`href`)?`link`:null,ARTICLE:()=>`article`,ASIDE:()=>`complementary`,BLOCKQUOTE:()=>`blockquote`,BUTTON:()=>`button`,CAPTION:()=>`caption`,CODE:()=>`code`,DATALIST:()=>`listbox`,DD:()=>`definition`,DEL:()=>`deletion`,DETAILS:()=>`group`,DFN:()=>`term`,DIALOG:()=>`dialog`,DT:()=>`term`,EM:()=>`emphasis`,FIELDSET:()=>`group`,FIGURE:()=>`figure`,FOOTER:e=>La(e,to)?null:`contentinfo`,FORM:e=>eo(e)?`form`:null,H1:()=>`heading`,H2:()=>`heading`,H3:()=>`heading`,H4:()=>`heading`,H5:()=>`heading`,H6:()=>`heading`,HEADER:e=>La(e,to)?null:`banner`,HR:()=>`separator`,HTML:()=>`document`,IMG:e=>e.getAttribute(`alt`)===``&&!e.getAttribute(`title`)&&!ro(e)&&!io(e)?`presentation`:`img`,INPUT:e=>{let t=e.type.toLowerCase();if([`email`,`search`,`tel`,`text`,`url`,``].includes(t)){let n=wo(e,e.getAttribute(`list`))[0];return n&&I(n)===`DATALIST`?`combobox`:t===`search`?`searchbox`:`textbox`}return t===`hidden`?null:t===`file`?`button`:Ms[t]||`textbox`},INS:()=>`insertion`,LI:()=>`listitem`,MAIN:()=>`main`,MARK:()=>`mark`,MATH:()=>`math`,MENU:()=>`list`,METER:()=>`meter`,NAV:()=>`navigation`,OL:()=>`list`,OPTGROUP:()=>`group`,OPTION:()=>`option`,OUTPUT:()=>`status`,P:()=>`paragraph`,PROGRESS:()=>`progressbar`,SEARCH:()=>`search`,SECTION:e=>eo(e)?`region`:null,SELECT:e=>Va(e)?`listbox`:`combobox`,STRONG:()=>`strong`,SUB:()=>`subscript`,SUP:()=>`superscript`,SVG:()=>`img`,TABLE:()=>`table`,TBODY:()=>`rowgroup`,TD:e=>{let t=La(e,`table`),n=t?mo(t):``;return n===`grid`||n===`treegrid`?`gridcell`:`cell`},TEXTAREA:()=>`textbox`,TFOOT:()=>`rowgroup`,TH:e=>{let t=e.getAttribute(`scope`);if(t===`col`||t===`colgroup`)return`columnheader`;if(t===`row`||t===`rowgroup`)return`rowheader`;let n=e.nextElementSibling,r=e.previousElementSibling,i=e.parentElement&&I(e.parentElement)===`TR`?e.parentElement:void 0;if(!n&&!r){if(i){let e=La(i,`table`);if(e&&e.rows.length<=1)return null}return`columnheader`}return co(n)&&co(r)?`columnheader`:lo(n)||lo(r)?`rowheader`:`columnheader`},THEAD:()=>`rowgroup`,TIME:()=>`time`,TR:()=>`row`,UL:()=>`list`};function co(e){return!!e&&I(e)===`TH`}function lo(e){return!e||I(e)!==`TD`?!1:!!(e.textContent?.trim()||e.children.length>0)}var uo={DD:[`DL`,`DIV`],DIV:[`DL`],DT:[`DL`,`DIV`],LI:[`OL`,`UL`],TBODY:[`TABLE`],TD:[`TR`],TFOOT:[`TABLE`],TH:[`TR`],THEAD:[`TABLE`],TR:[`THEAD`,`TBODY`,`TFOOT`,`TABLE`]};function fo(e){let t=so[I(e)]?.(e)||``;if(!t)return null;let n=e;for(;n;){let e=Pa(n),t=uo[I(n)];if(!t||!e||!t.includes(I(e)))break;let r=mo(e);if((r===`none`||r===`presentation`)&&!ho(e,r))return r;n=e}return t}var po=`alert.alertdialog.application.article.banner.blockquote.button.caption.cell.checkbox.code.columnheader.combobox.complementary.contentinfo.definition.deletion.dialog.directory.document.emphasis.feed.figure.form.generic.grid.gridcell.group.heading.img.insertion.link.list.listbox.listitem.log.main.mark.marquee.math.meter.menu.menubar.menuitem.menuitemcheckbox.menuitemradio.navigation.none.note.option.paragraph.presentation.progressbar.radio.radiogroup.region.row.rowgroup.rowheader.scrollbar.search.searchbox.separator.slider.spinbutton.status.strong.subscript.superscript.switch.tab.table.tablist.tabpanel.term.textbox.time.timer.toolbar.tooltip.tree.treegrid.treeitem`.split(`.`);function mo(e){return(e.getAttribute(`role`)||``).split(` `).map(e=>e.trim()).find(e=>po.includes(e))||null}function ho(e,t){return ro(e,t)||ao(e)}function go(e){let t=Ds?.get(e);if(t!==void 0)return t;let n=L(e);return Ds?.set(e,n),n}function L(e){let t=mo(e);if(!t)return fo(e);if(t===`none`||t===`presentation`){let t=fo(e);if(ho(e,t))return t}return t}function R(e){return e===null?void 0:e.toLowerCase()===`true`}function _o(e){return[`STYLE`,`SCRIPT`,`NOSCRIPT`,`TEMPLATE`].includes(I(e))}function vo(e){if(_o(e))return!0;let t=Ra(e),n=e.nodeName===`SLOT`;if(t?.display===`contents`&&!n){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===1&&!vo(t)||t.nodeType===3&&Ka(t))return!1;return!0}return!(e.nodeName===`OPTION`&&e.closest(`select`))&&!n&&!za(e,t)?!0:So(e)||yo(e)}function yo(e){if(Ma().skipInertCheck)return!1;let t=xs?.get(e);if(t===void 0){if(e.hasAttribute(`inert`))t=!0;else if(e===xo(e.ownerDocument)?.dialog)t=!1;else{let n=Pa(e);t=n?yo(n):e.isConnected&&!!xo(e.ownerDocument)}xs?.set(e,t)}return t}function bo(e){return!!xo(e.ownerDocument)?.ancestors.has(e)}function xo(e){if(Ma().skipInertCheck||Ma().skipDialogCheck)return;let t=Ss?.get(e);if(t===void 0){t=null;try{let n=e.querySelectorAll(`dialog:modal`);if(n.length){let e=n[n.length-1],r=new Set;for(let t=Pa(e);t;t=Pa(t))r.add(t);t={dialog:e,ancestors:r}}}catch{}Ss?.set(e,t)}return t||void 0}function So(e){let t=bs?.get(e);if(t===void 0){if(t=!1,e.parentElement&&e.parentElement.shadowRoot&&!e.assignedSlot&&(t=!0),!t){let n=Ra(e);t=!n||n.display===`none`||R(e.getAttribute(`aria-hidden`))===!0}if(!t){let n=Pa(e);n&&(t=So(n))}bs?.set(e,t)}return t}function Co(e){let t=e.parentElement;return t?!!(t.shadowRoot&&!e.assignedSlot||I(t)===`DETAILS`&&!t.open):!1}function wo(e,t){if(!t)return[];let n=Fa(e);if(!n)return[];try{let e=t.split(/[ \t\n\f\r]+/).filter(e=>!!e),r=[];for(let t of e){let e=n.querySelector(`#`+CSS.escape(t));e&&!r.includes(e)&&r.push(e)}return r}catch{return[]}}function z(e){return e.trim()}function To(e){return e.split(`\xA0`).map(e=>e.replace(/\r\n/g,`
`).replace(/[\u200b\u00ad]/g,``).replace(/\s\s*/g,` `)).join(`\xA0`).trim()}function Eo(e,t){let n=[...e.querySelectorAll(t)];for(let r of wo(e,e.getAttribute(`aria-owns`)))r.matches(t)&&n.push(r),n.push(...r.querySelectorAll(t));return n}function Do(e,t){let n=t===`::before`?ws:t===`::after`?Ts:Cs;if(n?.has(e))return n?.get(e);let r=Ra(e,t),i;if(r){let n=r.content;n&&n!==`none`&&n!==`normal`&&r.display!==`none`&&r.visibility!==`hidden`&&(i=Oo(e,n,!!t))}return t&&i!==void 0&&(r?.display||`inline`)!==`inline`&&(i=` `+i+` `),n&&n.set(e,i),i}function Oo(e,t,n){if(!(!t||t===`none`||t===`normal`))try{let r=qe(t).filter(e=>!(e instanceof Ze)),i=r.findIndex(e=>e instanceof _t&&e.value===`/`);if(i!==-1)r=r.slice(i+1);else if(!n)return;let a=[],o=0;for(;o<r.length;)if(r[o]instanceof Ct)a.push(r[o].value),o++;else if(o+2<r.length&&r[o]instanceof bt&&r[o].value===`attr`&&r[o+1]instanceof yt&&r[o+2]instanceof lt){let t=r[o+1].value;a.push(e.getAttribute(t)||``),o+=3}else return;return a.join(``)}catch{}}function ko(e){let t=e.getAttribute(`aria-labelledby`);if(t===null)return null;let n=wo(e,t);return n.length?n:null}function Ao(e,t){let n=[`button`,`cell`,`checkbox`,`columnheader`,`gridcell`,`heading`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`row`,`rowheader`,`switch`,`tab`,`tooltip`,`treeitem`].includes(e),r=t&&[``,`caption`,`code`,`contentinfo`,`definition`,`deletion`,`emphasis`,`insertion`,`list`,`listitem`,`mark`,`none`,`paragraph`,`presentation`,`region`,`row`,`rowgroup`,`section`,`strong`,`subscript`,`superscript`,`table`,`term`,`time`].includes(e);return n||r}function jo(e,t,n){if([`caption`,`code`,`definition`,`deletion`,`emphasis`,`generic`,`insertion`,`mark`,`paragraph`,`presentation`,`strong`,`subscript`,`suggestion`,`superscript`,`term`,`time`].includes(go(e)||``))return{...Ns(),derivedFromContent:!1};let r={value:!1},i=Bo(e,{includeHidden:t,collectElements:n,outDerivedFromContent:r,visitedElements:new Set,embeddedInTargetElement:`self`});return{text:To(i.text),elements:i.elements,derivedFromContent:r.value}}function Mo(e,t){let n=t?ms:ps,r=n?.get(e);return r===void 0&&(r=jo(e,t,!0),n?.set(e,r)),r}function No(e,t){let n=(t?ms:ps)?.get(e);if(n!==void 0)return n.text;let r=t?gs:hs,i=r?.get(e);return i===void 0&&(i=jo(e,t,!1).text,r?.set(e,i)),i}function Po(e,t){let n=t?vs:_s,r=n?.get(e);if(r===void 0){if(r={text:``,derivedFromContent:!1},e.hasAttribute(`aria-describedby`)){let n=wo(e,e.getAttribute(`aria-describedby`));r.text=To(n.map(e=>Bo(e,{includeHidden:t,visitedElements:new Set,embeddedInDescribedBy:{element:e,hidden:vo(e)}}).text).join(` `)),r.derivedFromContent=n.some(t=>t===e||e.contains(t))}else e.hasAttribute(`aria-description`)?r.text=To(e.getAttribute(`aria-description`)||``):r.text=To(e.getAttribute(`title`)||``);n?.set(e,r)}return r}var Fo=[`application`,`checkbox`,`columnheader`,`combobox`,`gridcell`,`listbox`,`radiogroup`,`rowheader`,`searchbox`,`slider`,`spinbutton`,`switch`,`textbox`,`tree`];function Io(e){let t=e.getAttribute(`aria-invalid`);return!t||t.trim()===``||t.toLocaleLowerCase()===`false`?`false`:t===`true`||t===`grammar`||t===`spelling`?t:`true`}function Lo(e){return`validity`in e?e.validity?.valid===!1:!1}function Ro(e){let t=ys,n=ys?.get(e);if(n===void 0){n=``;let r=Io(e)!==`false`,i=Lo(e);(r||i)&&(n=wo(e,e.getAttribute(`aria-errormessage`)).map(e=>To(Bo(e,{visitedElements:new Set,embeddedInDescribedBy:{element:e,hidden:vo(e)}}).text)).join(` `).trim()),t?.set(e,n)}return n}function zo(e){return e.embeddedInTargetElement===`self`||e.embeddedInTargetElement===`descendant`}function Bo(e,t){if(t.visitedElements.has(e))return Ns();let n={...t,embeddedInTargetElement:t.embeddedInTargetElement===`self`?`descendant`:t.embeddedInTargetElement};if(!t.includeHidden&&(_o(e)||!Vo(t)&&vo(e)))return t.visitedElements.add(e),Ns();let r=ko(e);if(!t.embeddedInLabelledBy){let n=Fs((r||[]).map(e=>Bo(e,{...t,embeddedInLabelledBy:{element:e,hidden:vo(e)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})),` `,t.collectElements);if(n.text)return t.outDerivedFromContent&&zo(t)&&(r||[]).some(t=>t===e||e.contains(t))&&(t.outDerivedFromContent.value=!0),n}let i=go(e)||``,a=I(e);if(t.embeddedInLabel||t.embeddedInLabelledBy||t.embeddedInTargetElement===`descendant`){let o=[...e.labels||[]].includes(e),s=(r||[]).includes(e);if(!o&&!s){if(i===`textbox`||i===`searchbox`)return t.visitedElements.add(e),Ps(a===`INPUT`||a===`TEXTAREA`?e.value:e.textContent,e,t.collectElements);if([`combobox`,`listbox`].includes(i)){t.visitedElements.add(e);let r;if(a===`SELECT`)r=[...e.selectedOptions],!r.length&&e.options.length&&r.push(e.options[0]);else{let t=i===`combobox`?Eo(e,`*`).find(e=>go(e)===`listbox`):e;r=t?Eo(t,`[aria-selected="true"]`).filter(e=>go(e)===`option`):[]}return!r.length&&a===`INPUT`?Ps(e.value,e,t.collectElements):Fs(r.map(e=>Bo(e,n)),` `,t.collectElements)}if([`progressbar`,`scrollbar`,`slider`,`spinbutton`,`meter`].includes(i))return t.visitedElements.add(e),e.hasAttribute(`aria-valuetext`)?Ps(e.getAttribute(`aria-valuetext`),e,t.collectElements):e.hasAttribute(`aria-valuenow`)?Ps(e.getAttribute(`aria-valuenow`),e,t.collectElements):Ps(e.getAttribute(`value`),e,t.collectElements);if([`menu`].includes(i))return t.visitedElements.add(e),Ns()}}let o=e.getAttribute(`aria-label`)||``;if(z(o))return t.visitedElements.add(e),Ps(o,e,t.collectElements);if(![`presentation`,`none`].includes(i)){if(a===`INPUT`&&[`button`,`submit`,`reset`].includes(e.type)){t.visitedElements.add(e);let n=e.value||``;return z(n)?Ps(n,e,t.collectElements):e.type===`submit`?Ps(`Submit`,e,t.collectElements):e.type===`reset`?Ps(`Reset`,e,t.collectElements):Ps(e.getAttribute(`title`)||``,e,t.collectElements)}if(a===`INPUT`&&e.type===`file`){t.visitedElements.add(e);let n=e.labels||[];return n.length&&!t.embeddedInLabelledBy?ds(n,t):Ps(`Choose File`,e,t.collectElements)}if(a===`INPUT`&&e.type===`image`){t.visitedElements.add(e);let n=e.labels||[];if(n.length&&!t.embeddedInLabelledBy)return ds(n,t);let r=e.getAttribute(`alt`)||``;if(z(r))return Ps(r,e,t.collectElements);let i=e.getAttribute(`title`)||``;return z(i)?Ps(i,e,t.collectElements):Ps(`Submit`,e,t.collectElements)}if(!r&&a===`BUTTON`){t.visitedElements.add(e);let n=e.labels||[];if(n.length)return ds(n,t)}if(!r&&a===`OUTPUT`){t.visitedElements.add(e);let n=e.labels||[];return n.length?ds(n,t):Ps(e.getAttribute(`title`)||``,e,t.collectElements)}if(!r&&(a===`TEXTAREA`||a===`SELECT`||a===`INPUT`||a===`METER`||a===`PROGRESS`)){t.visitedElements.add(e);let n=e.labels||[];if(n.length)return ds(n,t);let r=a===`INPUT`&&[`text`,`password`,`number`,`search`,`tel`,`email`,`url`].includes(e.type)||a===`TEXTAREA`,i=e.getAttribute(`placeholder`)||``,o=e.getAttribute(`title`)||``;return Ps(!r||o?o:i,e,t.collectElements)}if(!r&&a===`FIELDSET`){t.visitedElements.add(e);for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(I(t)===`LEGEND`)return Bo(t,{...n,embeddedInNativeTextAlternative:{element:t,hidden:vo(t)}});return Ps(e.getAttribute(`title`)||``,e,t.collectElements)}if(!r&&a===`FIGURE`){t.visitedElements.add(e);for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(I(t)===`FIGCAPTION`)return Bo(t,{...n,embeddedInNativeTextAlternative:{element:t,hidden:vo(t)}});return Ps(e.getAttribute(`title`)||``,e,t.collectElements)}if(a===`IMG`){t.visitedElements.add(e);let n=e.getAttribute(`alt`)||``;return z(n)?Ps(n,e,t.collectElements):Ps(e.getAttribute(`title`)||``,e,t.collectElements)}if(a===`TABLE`){t.visitedElements.add(e);for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(I(t)===`CAPTION`)return Bo(t,{...n,embeddedInNativeTextAlternative:{element:t,hidden:vo(t)}});let r=e.getAttribute(`summary`)||``;if(r)return Ps(r,e,t.collectElements)}if(a===`AREA`){t.visitedElements.add(e);let n=e.getAttribute(`alt`)||``;return z(n)?Ps(n,e,t.collectElements):Ps(e.getAttribute(`title`)||``,e,t.collectElements)}if(a===`SVG`||e.ownerSVGElement){t.visitedElements.add(e);for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(I(t)===`TITLE`&&t.ownerSVGElement)return Bo(t,{...n,embeddedInLabelledBy:{element:t,hidden:vo(t)}})}if(e.ownerSVGElement&&a===`A`){let n=e.getAttribute(`xlink:title`)||``;if(z(n))return t.visitedElements.add(e),Ps(n,e,t.collectElements)}}let s=a===`SUMMARY`&&![`presentation`,`none`].includes(i);if(Ao(i,t.embeddedInTargetElement===`descendant`)||s||t.embeddedInLabelledBy||t.embeddedInDescribedBy||t.embeddedInLabel||t.embeddedInNativeTextAlternative){t.visitedElements.add(e);let r=Ho(e,n);if(t.embeddedInTargetElement===`self`?z(r.text):r.text)return t.outDerivedFromContent&&zo(t)&&z(r.text)&&(t.outDerivedFromContent.value=!0),z(r.text)&&r.elements?.add(e),r}if(![`presentation`,`none`].includes(i)||a===`IFRAME`||a===`FRAME`){t.visitedElements.add(e);let n=e.getAttribute(`title`)||``;if(z(n))return Ps(n,e,t.collectElements)}return t.visitedElements.add(e),Ns()}function Vo(e){return!!e.embeddedInLabelledBy?.hidden||!!e.embeddedInDescribedBy?.hidden||!!e.embeddedInNativeTextAlternative?.hidden||!!e.embeddedInLabel?.hidden}function Ho(e,t){let n=[],r=!t.includeHidden&&!Vo(t),i=t.collectElements?new Set:void 0,a=(e,a)=>{if(!(a&&e.assignedSlot)){if(e.nodeType===1){let r=Ra(e)?.display||`inline`,a=Bo(e,t),o=a.text;for(let e of a.elements||[])i?.add(e);(r!==`inline`||e.nodeName===`BR`)&&(o=` `+o+` `),n.push(o)}else if(e.nodeType===3){if(r&&Co(e))return;n.push(e.textContent||``)}}};n.push(Do(e,`::before`)||``);let o=Do(e);if(o!==void 0)n.push(o);else{let t=e.nodeName===`SLOT`?e.assignedNodes():[];if(t.length)for(let e of t)a(e,!1);else{for(let t=e.firstChild;t;t=t.nextSibling)a(t,!0);if(e.shadowRoot)for(let t=e.shadowRoot.firstChild;t;t=t.nextSibling)a(t,!0);for(let t of wo(e,e.getAttribute(`aria-owns`)))a(t,!0)}}return n.push(Do(e,`::after`)||``),{text:n.join(``),elements:i}}var Uo=[`gridcell`,`option`,`row`,`tab`,`rowheader`,`columnheader`,`treeitem`];function Wo(e){return I(e)===`OPTION`?e.selected:Uo.includes(go(e)||``)?R(e.getAttribute(`aria-selected`))===!0:!1}var Go=[`checkbox`,`menuitemcheckbox`,`option`,`radio`,`switch`,`menuitemradio`,`treeitem`];function Ko(e){let t=Yo(e,!0);return t===`error`?!1:t}function qo(e){return Yo(e,!0)}function Jo(e){return Yo(e,!1)}function Yo(e,t){let n=I(e);if(t&&n===`INPUT`&&e.indeterminate)return`mixed`;if(n===`INPUT`&&[`checkbox`,`radio`].includes(e.type))return e.checked;if(Go.includes(go(e)||``)){let n=e.getAttribute(`aria-checked`);return n===`true`?!0:t&&n===`mixed`?`mixed`:!1}return`error`}var Xo=[`checkbox`,`combobox`,`grid`,`gridcell`,`listbox`,`radiogroup`,`slider`,`spinbutton`,`textbox`,`columnheader`,`rowheader`,`searchbox`,`switch`,`treegrid`];function Zo(e){let t=I(e);return[`INPUT`,`TEXTAREA`,`SELECT`].includes(t)?e.hasAttribute(`readonly`):Xo.includes(go(e)||``)?e.getAttribute(`aria-readonly`)===`true`:e.isContentEditable?!1:`error`}var Qo=[`button`];function $o(e){if(Qo.includes(go(e)||``)){let t=e.getAttribute(`aria-pressed`);if(t===`true`)return!0;if(t===`mixed`)return`mixed`}return!1}var es=[`application`,`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`row`,`rowheader`,`tab`,`treeitem`,`columnheader`,`menuitemcheckbox`,`menuitemradio`,`rowheader`,`switch`];function ts(e){if(I(e)===`DETAILS`)return e.open;if(es.includes(go(e)||``)){let t=e.getAttribute(`aria-expanded`);return t===null?void 0:t===`true`}}var ns=[`heading`,`listitem`,`row`,`treeitem`];function rs(e){let t={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[I(e)];if(t)return t;if(ns.includes(go(e)||``)){let t=e.getAttribute(`aria-level`),n=t===null?NaN:Number(t);if(Number.isInteger(n)&&n>=1)return n}return 0}var is=`application.button.composite.gridcell.group.input.link.menuitem.scrollbar.separator.tab.checkbox.columnheader.combobox.grid.listbox.menu.menubar.menuitemcheckbox.menuitemradio.option.radio.radiogroup.row.rowheader.searchbox.select.slider.spinbutton.switch.tablist.textbox.toolbar.tree.treegrid.treeitem`.split(`.`);function as(e){return os(e)||ls(e)}function os(e){return[`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`OPTION`,`OPTGROUP`].includes(I(e))&&(e.hasAttribute(`disabled`)||ss(e)||cs(e))}function ss(e){return I(e)===`OPTION`&&!!e.closest(`OPTGROUP[DISABLED]`)}function cs(e){let t=e?.closest(`FIELDSET[DISABLED]`);if(!t)return!1;let n=t.querySelector(`:scope > LEGEND`);return!n||!n.contains(e)}function ls(e){return is.includes(go(e)||``)?us(e):!1}function us(e){let t=Os?.get(e);if(t===void 0){let n=(e.getAttribute(`aria-disabled`)||``).toLowerCase();if(n===`true`)t=!0;else if(n===`false`)t=!1;else{let n=Pa(e);t=n?us(n):!1}Os?.set(e,t)}return t}function ds(e,t){return Fs([...e].map(e=>Bo(e,{...t,embeddedInLabel:{element:e,hidden:vo(e)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(e=>!!e.text),` `,t.collectElements)}function fs(e){if(yo(e))return!1;let t=Es,n=e,r,i=[];for(;n;n=Pa(n)){let e=t.get(n);if(e!==void 0){r=e;break}i.push(n);let a=Ra(n);if(!a){r=!0;break}let o=a.pointerEvents;if(o){r=o!==`none`;break}}r===void 0&&(r=!0);for(let e of i)t.set(e,r);return r}var ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks=0;function As(){Qa(),++ks,Ds??=new Map,Os??=new Map,ps??=new Map,ms??=new Map,hs??=new Map,gs??=new Map,_s??=new Map,vs??=new Map,ys??=new Map,bs??=new Map,xs??=new Map,Ss??=new Map,Cs??=new Map,ws??=new Map,Ts??=new Map,Es??=new Map}function js(){--ks||(ps=void 0,ms=void 0,hs=void 0,gs=void 0,_s=void 0,vs=void 0,ys=void 0,bs=void 0,xs=void 0,Ss=void 0,Cs=void 0,ws=void 0,Ts=void 0,Es=void 0,Ds=void 0,Os=void 0),$a()}var Ms={button:`button`,checkbox:`checkbox`,image:`button`,number:`spinbutton`,radio:`radio`,range:`slider`,reset:`button`,submit:`button`};function Ns(){return{text:``}}function Ps(e,t,n){return{text:e||``,elements:e&&n?new Set([t]):void 0}}function Fs(e,t,n){let r;if(n){r=new Set;for(let t of e)for(let e of t.elements||[])r.add(e)}return{text:e.map(e=>e.text).join(t),elements:r}}var Is=0;function Ls(e){let t=e.boxes;return e.mode===`ai`?{visibility:`ariaOrVisible`,refs:`interactable`,refPrefix:e.refPrefix,includeGenericRole:!0,renderActive:!e.doNotRenderActive,renderCursorPointer:!0,renderBoxes:t}:e.mode===`autoexpect`?{visibility:`ariaAndVisible`,refs:`none`,renderBoxes:t}:{visibility:`aria`,refs:`none`,renderBoxes:t}}function Rs(e,t){let n=Ls(t),r=new Set,i=new Map,a={root:{role:`fragment`,name:``,children:[],props:{},box:Ua(e),receivesPointerEvents:!0},info:new Map,refs:new Map,iframeRefs:[]};ec(a.root,e);let s=(t,o,s)=>{if(r.has(o))return;if(r.add(o),o.nodeType===Node.TEXT_NODE&&o.nodeValue){if(!s||Co(o))return;let e=o.nodeValue;t.role!==`textbox`&&e&&t.children.push(o.nodeValue||``);return}if(o.nodeType!==Node.ELEMENT_NODE)return;let l=o,u=!vo(l),d=u;if(n.visibility===`ariaOrVisible`&&(d=u||Wa(l)),n.visibility===`ariaAndVisible`&&(d=u&&Wa(l)),n.visibility===`aria`&&!d&&!bo(l))return;let f=[];if(l.hasAttribute(`aria-owns`)){let t=l.getAttribute(`aria-owns`).split(/\s+/);for(let n of t){let t=e.ownerDocument.getElementById(n);t&&f.push(t)}}let p=d?Bs(l,n,i):null;p&&l.getAttribute(`aria-hidden`)?.toLowerCase()===`true`&&(p.props[`aria-hidden`]=`true`);let m;if(p&&(p.ref&&(m={element:l,nameFromContentRefs:[]},a.info.set(p.ref,m),a.refs.set(l,p.ref),p.role===`iframe`&&a.iframeRefs.push(p.ref)),t.children.push(p)),c(p||t,l,f,d),m)for(let e of i.get(p)||[]){let t=a.refs.get(e);t&&t!==p.ref&&m.nameFromContentRefs.push(t)}};function c(e,t,n,r){let i=(Ra(t)?.display||`inline`)!==`inline`||t.nodeName===`BR`?` `:``;i&&e.children.push(i),e.children.push(Do(t,`::before`)||``);let a=t.nodeName===`SLOT`?t.assignedNodes():[];if(a.length)for(let t of a)s(e,t,r);else{for(let n=t.firstChild;n;n=n.nextSibling)n.assignedSlot||s(e,n,r);if(t.shadowRoot)for(let n=t.shadowRoot.firstChild;n;n=n.nextSibling)s(e,n,r)}for(let t of n)s(e,t,r);if(e.children.push(Do(t,`::after`)||``),i&&e.children.push(i),e.children.length===1&&e.name===e.children[0]&&(e.children=[]),e.role===`link`&&t.hasAttribute(`href`)){let n=t.getAttribute(`href`);e.props.url=o(n)}if(e.role===`textbox`&&t.hasAttribute(`placeholder`)&&t.getAttribute(`placeholder`)!==e.name){let n=t.getAttribute(`placeholder`);e.props.placeholder=n}}As();try{s(a.root,e,!0)}finally{js()}return va(a,t),a}function zs(e,t){if(t.refs===`none`||t.refs===`interactable`&&(!e.box.visible||!e.receivesPointerEvents))return;let n=$s(e),r=n._ariaRef;(!r||r.role!==e.role||r.name!==e.name)&&(r={role:e.role,name:e.name,ref:(t.refPrefix??``)+`e`+ ++Is},n._ariaRef=r),e.ref=r.ref}function Bs(e,t,n){let r=e.ownerDocument.activeElement===e&&e.ownerDocument.hasFocus();if(e.nodeName===`IFRAME`||e.nodeName===`FRAME`){let n={role:`iframe`,name:``,children:[],props:{},box:Ua(e),receivesPointerEvents:!0,active:r};return ec(n,e),zs(n,t),n}let i=t.includeGenericRole?`generic`:null,o=go(e)??i;if(!o||o===`presentation`||o===`none`)return null;let s=Mo(e,!1),c=fs(e),l=Ua(e);if(o===`generic`&&l.inline&&e.childNodes.length===1&&e.childNodes[0].nodeType===Node.TEXT_NODE)return null;let u={role:o,name:a(s.text),children:[],props:{},box:l,receivesPointerEvents:c,active:r};if(ec(u,e),n.set(u,s.elements),zs(u,t),Go.includes(o)&&(u.checked=Ko(e)),is.includes(o)&&(u.disabled=as(e)),es.includes(o)&&(u.expanded=ts(e)),Fo.includes(o)){let t=Io(e);u.invalid=t===`false`?!1:t===`true`?!0:t}return ns.includes(o)&&(u.level=rs(e)),Qo.includes(o)&&(u.pressed=$o(e)),Uo.includes(o)&&(u.selected=Wo(e)),(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.type!==`checkbox`&&e.type!==`radio`&&e.type!==`file`&&(u.children=[e.value]),u}function Vs(e,t){return t?e?typeof t==`string`?e===t:!!e.match(new RegExp(t.pattern)):!1:!0}function Hs(e,t){if(!t?.normalized)return!0;if(!e)return!1;if(e===t.normalized||e===t.raw)return!0;let n=Ws(t);return n?!!e.match(n):!1}var Us=Symbol(`cachedRegex`);function Ws(e){if(e[Us]!==void 0)return e[Us];let{raw:t}=e,n=t.startsWith(`/`)&&t.endsWith(`/`)&&t.length>1,r;try{r=n?new RegExp(t.slice(1,-1)):null}catch{r=null}return e[Us]=r,r}function Gs(e,t){let n=Rs(e,{mode:`default`}),r=Xs(n.root,t,!1,!1),{json:i}=Zs(n,{mode:`default`});return{matches:r,received:{raw:ia(i),regex:ia(i,{convertStringsToRegex:!0})}}}function Ks(e,t){let n=Rs(e,{mode:`default`}).root;return Xs(n,t,!0,!1).map(e=>$s(e))}function qs(e,t,n){return typeof e==`string`&&t.kind===`text`?Hs(e,t.text):typeof e!=`object`||!e||t.kind!==`role`||t.role!==`fragment`&&t.role!==e.role||t.checked!==void 0&&t.checked!==e.checked||t.disabled!==void 0&&t.disabled!==e.disabled||t.expanded!==void 0&&t.expanded!==e.expanded||t.invalid!==void 0&&t.invalid!==e.invalid||t.level!==void 0&&t.level!==e.level||t.pressed!==void 0&&t.pressed!==e.pressed||t.selected!==void 0&&t.selected!==e.selected||!Vs(e.name,t.name)||!Hs(e.props.url,t.props?.url)?!1:t.containerMode===`contain`?Ys(e.children||[],t.children||[]):t.containerMode===`equal`?Js(e.children||[],t.children||[],!1):t.containerMode===`deep-equal`||n?Js(e.children||[],t.children||[],!0):Ys(e.children||[],t.children||[])}function Js(e,t,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!qs(e[r],t[r],n))return!1;return!0}function Ys(e,t){if(t.length>e.length)return!1;let n=e.slice(),r=t.slice();for(let e of r){let t=n.shift();for(;t&&!qs(t,e,!1);)t=n.shift();if(!t)return!1}return!0}function Xs(e,t,n,r){let i=[],a=(e,o)=>{if(qs(e,t,r)){let t=typeof e==`string`?o:e;return t&&i.push(t),!n}if(typeof e==`string`)return!1;for(let t of e.children||[])if(a(t,e))return!0;return!1};return a(e,null),i}function Zs(e,t){let n=Ls(t),r={},i=(e,a,o)=>{e.role===`iframe`&&e.ref&&(r[e.ref]=a);let s={role:e.role};if(e.name&&(s.name=e.name),(e.checked===`mixed`||e.checked===!0)&&(s.checked=e.checked),e.disabled&&(s.disabled=!0),e.expanded&&(s.expanded=!0),e.active&&n.renderActive&&(s.active=!0),e.invalid&&(s.invalid=e.invalid),e.level&&(s.level=e.level),(e.pressed===`mixed`||e.pressed===!0)&&(s.pressed=e.pressed),e.selected===!0&&(s.selected=!0),e.ref&&(s.ref=e.ref,o&&qi(e)&&(s.cursor=`pointer`)),n.renderBoxes){let t=$s(e);if(t){let e=t.getBoundingClientRect();s.box={x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}}e.props.url!==void 0&&(s.url=e.props.url),e.props.placeholder!==void 0&&(s.placeholder=e.props.placeholder),e.props[`aria-hidden`]!==void 0&&(s.ariaHidden=!0);let c=e.children.length===1&&typeof e.children[0]==`string`?e.children[0]:void 0,l=!!t.depth&&a===t.depth;if(c!==void 0)s.text=c;else if(!l&&e.children.length){let t=!!e.ref&&o&&qi(e);s.children=e.children.map(e=>typeof e==`string`?e:i(e,a+1,o&&!t))}return s},a=[],o=e.root.role===`fragment`?e.root.children:[e.root];for(let e of o)typeof e==`string`?a.push({role:`text`,text:e}):a.push(i(e,0,!!n.renderCursorPointer));return{json:a,iframeDepths:r}}var Qs=Symbol(`element`);function $s(e){return e[Qs]}function ec(e,t){e[Qs]=t}function tc(e,t){let n=ea(e,t);return n?$s(n):void 0}var nc=`:host{color:#333;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;font-size:13px}svg{height:0;position:absolute}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;flex-direction:column;max-width:600px;padding:0;font-size:12.8px;font-weight:400;line-height:1.5;display:none;position:absolute;top:0;left:0;overflow:hidden;box-shadow:0 .5rem 1.2rem #0000004d}x-pw-tooltip-line{-webkit-user-select:none;user-select:none;cursor:pointer;max-width:600px;padding:6px;display:flex}x-pw-tooltip-footer{-webkit-user-select:none;user-select:none;color:#777;max-width:600px;padding:6px;display:flex}x-pw-dialog{pointer-events:auto;z-index:10;background-color:#fff;border-radius:6px;flex-direction:column;font-size:13px;display:flex;position:absolute;box-shadow:0 .5rem 1.2rem #0000004d}x-pw-dialog:not(.autosize){width:400px;height:150px}x-pw-dialog-body{flex-direction:column;flex:auto;display:flex}x-pw-dialog-body label{flex-direction:row;align-items:center;margin:5px 8px;display:flex}x-pw-highlight{width:0;height:0;position:absolute;top:0;left:0}x-pw-action-point{z-index:2;background:red;border-radius:10px;width:20px;height:20px;margin:-10px 0 0 -10px;position:absolute}x-pw-screencast-highlight,x-pw-screencast-point,x-pw-title{animation:pw-fade-out var(--pw-fade-duration) ease-out var(--pw-fade-delay,0s) forwards}x-pw-screencast-highlight,x-pw-screencast-point{pointer-events:none;position:absolute}x-pw-screencast-highlight{z-index:1}x-pw-screencast-point{z-index:2;width:0;height:0;overflow:visible;translate:-50% -50%}x-pw-action-cursor{pointer-events:none;z-index:4;filter:drop-shadow(0 1px 1.5px #00000059);width:14px;height:21px;position:absolute}x-pw-action-cursor svg{width:100%;height:100%;position:static;overflow:visible}x-pw-title{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);color:#fff;white-space:nowrap;-webkit-user-select:none;user-select:none;z-index:3;background-color:#00000080;border-radius:6px;padding:6px;font-size:24px;line-height:1.4;position:absolute}x-pw-user-overlays,x-pw-user-overlay{position:absolute;inset:0}@keyframes pw-fade-out{0%{opacity:1}to{opacity:0}}x-pw-separator{background:#949494e6;height:1px;margin:6px 9px}x-pw-tool-gripper{cursor:grab;width:24px;height:28px;margin:2px 0}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{clip-path:url(#icon-gripper);background-color:#555;width:16px;height:16px;margin:6px 4px}x-pw-tools-list>label{-webkit-user-select:none;user-select:none;align-items:center;margin:0 10px;display:flex}x-pw-tools-list{border-bottom:1px solid #ddd;width:100%;display:flex}x-pw-tool-item{pointer-events:auto;border-radius:3px;width:28px;height:28px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{background-color:#3a3a3a;width:16px;height:16px;margin:6px}x-pw-tool-item.disabled>x-div{cursor:default;background-color:#61616180}x-pw-tool-item.record.toggled{background-color:#0000}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.record.toggled>x-div{clip-path:url(#icon-stop-circle)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{z-index:2147483647;pointer-events:auto;background:0 0;max-width:min-content;position:absolute;top:0}x-pw-overlay x-pw-tools-list{background-color:#fffd;border-bottom:none;border-radius:3px;box-shadow:0 5px 5px #0000001a}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{color:#333;resize:none;border:none;flex:auto;margin:6px 10px;padding:0;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;font-size:13px;outline:1px solid #0000!important}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}[hidden]{display:none!important}x-locator-editor{border-bottom:1px solid #ddd;outline:1px solid #0000;flex:none;width:100%;height:60px;padding:4px}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}x-pw-action-list{-webkit-user-select:none;user-select:none;flex-direction:column;flex:auto;display:flex}x-pw-action-item{cursor:pointer;padding:6px 10px;overflow:hidden}x-pw-action-item:hover{background-color:#f2f2f2}x-pw-action-item:last-child{border-bottom-right-radius:6px;border-bottom-left-radius:6px}`,rc=class{constructor(e){this._renderedEntries=[],this._screencastDecorations=[],this._userOverlays=new Map,this._userOverlayHidden=!1,this._language=`javascript`,this._elementHighlights=[],this._injectedScript=e;let t=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=t.createElement(`x-pw-glass`),this._glassPaneElement.setAttribute(`popover`,`manual`),this._glassPaneElement.style.inset=`0`,this._glassPaneElement.style.width=`100%`,this._glassPaneElement.style.height=`100%`,this._glassPaneElement.style.maxWidth=`none`,this._glassPaneElement.style.maxHeight=`none`,this._glassPaneElement.style.padding=`0`,this._glassPaneElement.style.margin=`0`,this._glassPaneElement.style.border=`none`,this._glassPaneElement.style.overflow=`visible`,this._glassPaneElement.style.pointerEvents=`none`,this._glassPaneElement.style.display=`flex`,this._glassPaneElement.style.backgroundColor=`transparent`,this._actionCursorElement=t.createElement(`x-pw-action-cursor`),this._actionCursorElement.style.visibility=`hidden`,this._actionCursorElement.appendChild(this._createCursorSvg(t)),this._titleElement=t.createElement(`x-pw-title`),this._titleElement.setAttribute(`hidden`,`true`),this._userOverlayContainer=t.createElement(`x-pw-user-overlays`),this._userOverlayContainer.setAttribute(`hidden`,`true`),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?`open`:`closed`}),typeof this._glassPaneShadow.adoptedStyleSheets.push==`function`){let e=new this._injectedScript.window.CSSStyleSheet;e.replaceSync(nc),this._glassPaneShadow.adoptedStyleSheets.push(e)}else{let e=this._injectedScript.document.createElement(`style`);e.textContent=nc,this._glassPaneShadow.appendChild(e)}this._glassPaneShadow.appendChild(this._actionCursorElement),this._glassPaneShadow.appendChild(this._titleElement),this._glassPaneShadow.appendChild(this._userOverlayContainer)}install(){this._injectedScript.document.documentElement&&((!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement),this._bringToFront())}_bringToFront(){this._glassPaneElement.hidePopover(),this._glassPaneElement.showPopover()}setLanguage(e){this._language=e}setElementHighlights(e){let t=this._elementHighlights.length>0;this._elementHighlights=e,this._elementHighlights.length?this._ensureElementHighlightRaf():t&&(this._rafRequest&&=(this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),void 0),this.clearHighlight())}_ensureElementHighlightRaf(){if(this._rafRequest)return;let e=()=>{let t=[],n=[...this._injectedScript.document.querySelectorAll(`x-pw-glass`)];for(let{selector:e,cssStyle:r}of this._elementHighlights){let i=[];try{i=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement)}catch{}i=i.filter(e=>!n.some(t=>this._injectedScript.utils.isInsideScope(t,e)));let a=e.parts.some(e=>e.name===`aria-template`)?void 0:Gt(this._language,zt(e)),o=i.length>1?`#f6b26b7f`:`#6fa8dc7f`;for(let e=0;e<i.length;++e){let n=i.length>1?` [${e+1} of ${i.length}]`:``;t.push({element:i[e],color:o,tooltipText:a===void 0?void 0:a+n,cssStyle:r})}}this.updateHighlight(t),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(e)};this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(e)}uninstall(){this._rafRequest&&=(this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),void 0),this._elementHighlights=[],this._clearUserOverlayTimer(),this._glassPaneElement.remove()}showActionPoint(e,t){this._actionPointElement||(this._actionPointElement=this._injectedScript.document.createElement(`x-pw-action-point`),this._glassPaneShadow.appendChild(this._actionPointElement)),this._actionPointElement.style.top=t+`px`,this._actionPointElement.style.left=e+`px`,this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement&&(this._actionPointElement.hidden=!0)}showScreencastHighlight(e,t,n){let r=this._createScreencastDecoration(`x-pw-screencast-highlight`,t,n);r.style.left=e.x+`px`,r.style.top=e.y+`px`,r.style.width=e.width+`px`,r.style.height=e.height+`px`}showScreencastPoint(e,t,n,r){let i=this._createScreencastDecoration(`x-pw-screencast-point`,n,r);i.style.left=e+`px`,i.style.top=t+`px`}hideScreencastDecorations(){for(let e of this._screencastDecorations)e.remove();this._screencastDecorations=[]}_createScreencastDecoration(e,t,n){let r=this._injectedScript.document.createElement(e);return r.style.cssText=t,n&&r.style.setProperty(`--pw-fade-duration`,n+`ms`),this._glassPaneShadow.appendChild(r),this._screencastDecorations.push(r),r}moveActionCursor(e,t,n){let r=this._actionCursorElement,i=r.getBoundingClientRect(),a=r.style.visibility===`visible`;this._actionCursorAnimation?.cancel(),this._actionCursorAnimation=void 0,r.style.left=e+`px`,r.style.top=t+`px`,r.style.visibility=`visible`;let o=i.left-e,s=i.top-t;if(!a||!n||Math.hypot(o,s)<1)return;let c=Math.max(80,Math.min(n*.6,400));this._actionCursorAnimation=r.animate(ic(o,s,e+t+o+s),{duration:c,easing:`cubic-bezier(0.5, 0, 0.3, 1)`})}restoreActionCursor(e,t){this._actionCursorElement.style.visibility!==`visible`&&this.moveActionCursor(e,t)}hideActionCursor(){this._actionCursorElement.style.visibility=`hidden`}_createCursorSvg(e){let t=`http://www.w3.org/2000/svg`,n=e.createElementNS(t,`svg`);n.setAttribute(`viewBox`,`0 0 12 18`);let r=e.createElementNS(t,`path`);return r.setAttribute(`d`,`M0 0 L0 15.8 L3.9 12.4 L6.6 18.6 L8.9 17.6 L6.2 11.4 L11.2 11.4 Z`),r.setAttribute(`fill`,`black`),r.setAttribute(`stroke`,`white`),r.setAttribute(`stroke-width`,`1.6`),r.setAttribute(`stroke-linejoin`,`round`),r.setAttribute(`paint-order`,`stroke`),n.appendChild(r),n}showActionTitle(e,t,n,r){if(this._titleElement.textContent=e,this._titleElement.hidden=!1,this._titleElement.style.cssText=r??``,t){let e=t/4;this._titleElement.style.setProperty(`--pw-fade-duration`,e+`ms`),this._titleElement.style.setProperty(`--pw-fade-delay`,t-e+`ms`)}switch(n){case`top-left`:this._titleElement.style.top=`6px`,this._titleElement.style.left=`6px`;break;case`top`:this._titleElement.style.top=`6px`,this._titleElement.style.left=`50%`,this._titleElement.style.transform=`translateX(-50%)`;break;case`bottom-left`:this._titleElement.style.bottom=`6px`,this._titleElement.style.left=`6px`;break;case`bottom`:this._titleElement.style.bottom=`6px`,this._titleElement.style.left=`50%`,this._titleElement.style.transform=`translateX(-50%)`;break;case`bottom-right`:this._titleElement.style.bottom=`6px`,this._titleElement.style.right=`6px`;break;default:this._titleElement.style.top=`6px`,this._titleElement.style.right=`6px`;break}}hideActionTitle(){this._titleElement.hidden=!0}addUserOverlay(e,t){let n=this._injectedScript.document.createElement(`div`);n.className=`x-pw-user-overlay`,n.innerHTML=t;for(let e of n.querySelectorAll(`script`))e.remove();for(let e of n.querySelectorAll(`*`))for(let t of[...e.attributes])t.name.startsWith(`on`)&&e.removeAttribute(t.name);return this._userOverlays.set(e,n),this._userOverlayContainer.appendChild(n),this._userOverlayContainer.hidden=this._userOverlayHidden,this._ensureUserOverlayTimer(),e}getUserOverlay(e){return this._userOverlays.get(e)}removeUserOverlay(e){let t=this._userOverlays.get(e);t&&(t.remove(),this._userOverlays.delete(e)),this._userOverlays.size===0&&(this._userOverlayContainer.hidden=!0,this._clearUserOverlayTimer())}_ensureUserOverlayTimer(){if(this._userOverlayTimer!==void 0)return;let e=()=>{this.install(),this._userOverlayTimer=this._injectedScript.utils.builtins.setTimeout(e,500)};this._userOverlayTimer=this._injectedScript.utils.builtins.setTimeout(e,500)}_clearUserOverlayTimer(){this._userOverlayTimer!==void 0&&(this._injectedScript.utils.builtins.clearTimeout(this._userOverlayTimer),this._userOverlayTimer=void 0)}setUserOverlaysVisible(e){this._userOverlayHidden=!e,this._userOverlayContainer.hidden=!e||this._userOverlays.size===0}clearHighlight(){for(let e of this._renderedEntries)e.highlightElement?.remove(),e.tooltipElement?.remove();this._renderedEntries=[]}addMaskedElements(e,t){let n=this._renderedEntries.map(e=>({element:e.targetElement,color:e.color})),r=e.map(e=>({element:e,color:t}));this.updateHighlight([...n,...r])}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(let t of e){let e=this._createHighlightElement();this._glassPaneShadow.appendChild(e);let n;if(t.tooltipText){n=this._injectedScript.document.createElement(`x-pw-tooltip`),this._glassPaneShadow.appendChild(n),n.style.top=`0`,n.style.left=`0`,n.style.display=`flex`;let e=this._injectedScript.document.createElement(`x-pw-tooltip-line`);e.textContent=t.tooltipText,n.appendChild(e)}this._renderedEntries.push({targetElement:t.element,box:ac(t.box),color:t.color,cssStyle:t.cssStyle,tooltipElement:n,highlightElement:e})}for(let e of this._renderedEntries){if(!e.box&&!e.targetElement||(e.box=e.box||e.targetElement.getBoundingClientRect(),!e.tooltipElement))continue;let{anchorLeft:t,anchorTop:n}=this.tooltipPosition(e.box,e.tooltipElement);e.tooltipTop=n,e.tooltipLeft=t}for(let e of this._renderedEntries){e.tooltipElement&&(e.tooltipElement.style.top=e.tooltipTop+`px`,e.tooltipElement.style.left=e.tooltipLeft+`px`);let t=e.box;e.highlightElement.style.backgroundColor=e.color,e.highlightElement.style.left=t.x+`px`,e.highlightElement.style.top=t.y+`px`,e.highlightElement.style.width=t.width+`px`,e.highlightElement.style.height=t.height+`px`,e.highlightElement.style.display=`block`,e.cssStyle&&(e.highlightElement.style.cssText+=`;`+e.cssStyle),this._isUnderTest&&console.error(`Highlight box for test: `+JSON.stringify({x:t.x,y:t.y,width:t.width,height:t.height}))}}}firstBox(){return this._renderedEntries[0]?.box}firstTooltipBox(){let e=this._renderedEntries[0];if(!(!e||!e.tooltipElement||e.tooltipLeft===void 0||e.tooltipTop===void 0))return{x:e.tooltipLeft,y:e.tooltipTop,left:e.tooltipLeft,top:e.tooltipTop,width:e.tooltipElement.offsetWidth,height:e.tooltipElement.offsetHeight,bottom:e.tooltipTop+e.tooltipElement.offsetHeight,right:e.tooltipLeft+e.tooltipElement.offsetWidth,toJSON:()=>{}}}tooltipPosition(e,t){let n=t.offsetWidth,r=t.offsetHeight,i=this._glassPaneElement.offsetWidth,a=this._glassPaneElement.offsetHeight,o=Math.max(5,e.left);o+n>i-5&&(o=i-n-5);let s=Math.max(0,e.bottom)+5;return s+r>a-5&&(s=Math.max(0,e.top)>r+5?Math.max(0,e.top)-r-5:a-5-r),{anchorLeft:o,anchorTop:s}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let t=0;t<this._renderedEntries.length;++t){if(e[t].element!==this._renderedEntries[t].targetElement||e[t].color!==this._renderedEntries[t].color||e[t].cssStyle!==this._renderedEntries[t].cssStyle)return!1;let n=this._renderedEntries[t].box;if(!n)return!1;let r=e[t].box?ac(e[t].box):e[t].element.getBoundingClientRect();if(r.top!==n.top||r.right!==n.right||r.bottom!==n.bottom||r.left!==n.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement(`x-pw-highlight`)}appendChild(e){this._glassPaneShadow.appendChild(e)}onGlassPaneClick(e){this._glassPaneElement.style.pointerEvents=`auto`,this._glassPaneElement.style.backgroundColor=`rgba(0, 0, 0, 0.3)`,this._glassPaneElement.addEventListener(`click`,e)}offGlassPaneClick(e){this._glassPaneElement.style.pointerEvents=`none`,this._glassPaneElement.style.backgroundColor=`transparent`,this._glassPaneElement.removeEventListener(`click`,e)}};function ic(e,t,n){let r=e=>{let t=Math.sin(n*12.9898+e*78.233)*43758.5453;return t-Math.floor(t)},i=Math.hypot(e,t),a=-t/i,o=e/i,s=r(1)<.5?-1:1,c=s*i*(.03+.03*r(2)),l=s*i*(.01+.02*r(3)),u=e*2/3+a*c,d=t*2/3+o*c,f=e/3+a*l,p=t/3+o*l,m=[];for(let n=0;n<=30;n++){let r=n/30,i=1-r,a=i*i*i*e+3*i*i*r*u+3*i*r*r*f,o=i*i*i*t+3*i*i*r*d+3*i*r*r*p;m.push({transform:`translate(${a}px, ${o}px)`})}return m}function ac(e){if(e)return new DOMRect(e.x,e.y,e.width,e.height)}function oc(e,t,n){let r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.bottom-e.bottom,0)+Math.max(e.top-t.top,0)}function sc(e,t,n){let r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.bottom-e.bottom,0)+Math.max(e.top-t.top,0)}function cc(e,t,n){let r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.left-t.left,0)+Math.max(t.right-e.right,0)}function lc(e,t,n){let r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.left-t.left,0)+Math.max(t.right-e.right,0)}function uc(e,t,n){let r=n===void 0?50:n,i=0;return e.left-t.right>=0&&(i+=e.left-t.right),t.left-e.right>=0&&(i+=t.left-e.right),t.top-e.bottom>=0&&(i+=t.top-e.bottom),e.top-t.bottom>=0&&(i+=e.top-t.bottom),i>r?void 0:i}var dc=[`left-of`,`right-of`,`above`,`below`,`near`];function fc(e,t,n,r){let i=t.getBoundingClientRect(),a={"left-of":sc,"right-of":oc,above:cc,below:lc,near:uc}[e],o;for(let e of n){if(e===t)continue;let n=a(i,e.getBoundingClientRect(),r);n!==void 0&&(o===void 0||n<o)&&(o=n)}return o}function pc(e,t){let n=typeof e==`string`&&!t.caseSensitive?e.toUpperCase():e,r=typeof t.value==`string`&&!t.caseSensitive?t.value.toUpperCase():t.value;return t.op===`<truthy>`?!!n:t.op===`=`?r instanceof RegExp?(r.lastIndex=0,typeof n==`string`&&!!n.match(r)):n===r:typeof n!=`string`||typeof r!=`string`?!1:t.op===`*=`?n.includes(r):t.op===`^=`?n.startsWith(r):t.op===`$=`?n.endsWith(r):t.op===`|=`?n===r||n.startsWith(r+`-`):t.op===`~=`?n.split(` `).includes(r):!1}function mc(e){let t=e.ownerDocument;return e.nodeName===`SCRIPT`||e.nodeName===`NOSCRIPT`||e.nodeName===`STYLE`||t.head&&t.head.contains(e)}function hc(e,t){let n=e.get(t);if(n===void 0){if(n={full:``,normalized:``,immediate:[]},!mc(t)){let r=``;if(t instanceof HTMLInputElement&&(t.type===`submit`||t.type===`button`||t.type===`reset`))n={full:t.value,normalized:a(t.value),immediate:[t.value]};else{for(let i=t.firstChild;i;i=i.nextSibling)if(i.nodeType===Node.TEXT_NODE)n.full+=i.nodeValue||``,r+=i.nodeValue||``;else if(i.nodeType===Node.COMMENT_NODE)continue;else r&&n.immediate.push(r),r=``,i.nodeType===Node.ELEMENT_NODE&&(n.full+=hc(e,i).full);r&&n.immediate.push(r),t.shadowRoot&&(n.full+=hc(e,t.shadowRoot).full),n.full&&(n.normalized=a(n.full))}}e.set(t,n)}return n}function gc(e,t,n){if(mc(t)||!n(hc(e,t)))return`none`;for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(hc(e,r)))return`selfAndChildren`;return t.shadowRoot&&n(hc(e,t.shadowRoot))?`selfAndChildren`:`self`}function _c(e,t,n){let r=ko(t);if(r)return n?.skipRefsInsideElement&&(r=r.filter(e=>e!==t&&!t.contains(e))),r.map(t=>hc(e,t));let i=t.getAttribute(`aria-label`);if(i!==null&&i.trim())return[{full:i,normalized:a(i),immediate:[i]}];let o=t.nodeName===`INPUT`&&t.type!==`hidden`;if([`BUTTON`,`METER`,`OUTPUT`,`PROGRESS`,`SELECT`,`TEXTAREA`].includes(t.nodeName)||o){let n=t.labels;if(n)return[...n].map(t=>hc(e,t))}return[]}var vc=[`selected`,`checked`,`pressed`,`expanded`,`level`,`disabled`,`name`,`description`,`include-hidden`];vc.sort();function yc(e,t,n){if(!t.includes(n))throw Error(`"${e}" attribute is only supported for roles: ${t.slice().sort().map(e=>`"${e}"`).join(`, `)}`)}function bc(e,t){if(e.op!==`<truthy>`&&!t.includes(e.value))throw Error(`"${e.name}" must be one of ${t.map(e=>JSON.stringify(e)).join(`, `)}`)}function xc(e,t){if(!t.includes(e.op))throw Error(`"${e.name}" does not support "${e.op}" matcher`)}function Sc(e,t){let n={role:t};for(let r of e)switch(r.name){case`checked`:yc(r.name,Go,t),bc(r,[!0,!1,`mixed`]),xc(r,[`<truthy>`,`=`]),n.checked=r.op===`<truthy>`?!0:r.value;break;case`pressed`:yc(r.name,Qo,t),bc(r,[!0,!1,`mixed`]),xc(r,[`<truthy>`,`=`]),n.pressed=r.op===`<truthy>`?!0:r.value;break;case`selected`:yc(r.name,Uo,t),bc(r,[!0,!1]),xc(r,[`<truthy>`,`=`]),n.selected=r.op===`<truthy>`?!0:r.value;break;case`expanded`:yc(r.name,es,t),bc(r,[!0,!1]),xc(r,[`<truthy>`,`=`]),n.expanded=r.op===`<truthy>`?!0:r.value;break;case`level`:if(yc(r.name,ns,t),typeof r.value==`string`&&(r.value=+r.value),r.op!==`=`||typeof r.value!=`number`||Number.isNaN(r.value))throw Error(`"level" attribute must be compared to a number`);n.level=r.value;break;case`disabled`:bc(r,[!0,!1]),xc(r,[`<truthy>`,`=`]),n.disabled=r.op===`<truthy>`?!0:r.value;break;case`name`:if(r.op===`<truthy>`)throw Error(`"name" attribute must have a value`);if(typeof r.value!=`string`&&!(r.value instanceof RegExp))throw Error(`"name" attribute must be a string or a regular expression`);n.name=r.value,n.nameOp=r.op,n.nameExact=r.caseSensitive;break;case`description`:if(r.op===`<truthy>`)throw Error(`"description" attribute must have a value`);if(typeof r.value!=`string`&&!(r.value instanceof RegExp))throw Error(`"description" attribute must be a string or a regular expression`);n.description=r.value,n.descriptionOp=r.op,n.descriptionExact=r.caseSensitive;break;case`include-hidden`:bc(r,[!0,!1]),xc(r,[`<truthy>`,`=`]),n.includeHidden=r.op===`<truthy>`?!0:r.value;break;default:throw Error(`Unknown attribute "${r.name}", must be one of ${vc.map(e=>`"${e}"`).join(`, `)}.`)}return n}function Cc(e,t,n){let r=[],i=e=>{if(go(e)===t.role&&!(t.selected!==void 0&&Wo(e)!==t.selected)&&!(t.checked!==void 0&&Ko(e)!==t.checked)&&!(t.pressed!==void 0&&$o(e)!==t.pressed)&&!(t.expanded!==void 0&&ts(e)!==t.expanded)&&!(t.level!==void 0&&rs(e)!==t.level)&&!(t.disabled!==void 0&&as(e)!==t.disabled)&&!(!t.includeHidden&&vo(e))){if(t.name!==void 0){let r=a(No(e,!!t.includeHidden));if(typeof t.name==`string`&&(t.name=a(t.name)),n&&!t.nameExact&&t.nameOp===`=`&&(t.nameOp=`*=`),!pc(r,{name:``,jsonPath:[],op:t.nameOp||`=`,value:t.name,caseSensitive:!!t.nameExact}))return}if(t.description!==void 0){let r=a(Po(e,!!t.includeHidden).text);if(typeof t.description==`string`&&(t.description=a(t.description)),n&&!t.descriptionExact&&t.descriptionOp===`=`&&(t.descriptionOp=`*=`),!pc(r,{name:``,jsonPath:[],op:t.descriptionOp||`=`,value:t.description,caseSensitive:!!t.descriptionExact}))return}r.push(e)}},o=e=>{let t=[];e.shadowRoot&&t.push(e.shadowRoot);for(let n of e.querySelectorAll(`*`))i(n),n.shadowRoot&&t.push(n.shadowRoot);t.forEach(o)};return o(e),r}function wc(e){return{queryAll:(t,n)=>{let r=Ht(n,!0),i=r.name.toLowerCase();if(!i)throw Error(`Role must not be empty`);let a=Sc(r.attributes,i);As();try{return Cc(t,a,e)}finally{js()}}}}var Tc=class{constructor(){this._retainCacheCounter=0,this._cacheText=new Map,this._cacheQueryCSS=new Map,this._cacheMatches=new Map,this._cacheQuery=new Map,this._cacheMatchesSimple=new Map,this._cacheMatchesParents=new Map,this._cacheCallMatches=new Map,this._cacheCallQuery=new Map,this._cacheQuerySimple=new Map,this._engines=new Map,this._engines.set(`not`,kc),this._engines.set(`is`,Ec),this._engines.set(`where`,Ec),this._engines.set(`has`,Dc),this._engines.set(`scope`,Oc),this._engines.set(`light`,Ac),this._engines.set(`visible`,jc),this._engines.set(`text`,Mc),this._engines.set(`text-is`,Nc),this._engines.set(`text-matches`,Pc),this._engines.set(`has-text`,Fc),this._engines.set(`right-of`,Ic(`right-of`)),this._engines.set(`left-of`,Ic(`left-of`)),this._engines.set(`above`,Ic(`above`)),this._engines.set(`below`,Ic(`below`)),this._engines.set(`near`,Ic(`near`)),this._engines.set(`nth-match`,Lc);let e=[...this._engines.keys()];e.sort();let t=[...Ft];if(t.sort(),e.join(`|`)!==t.join(`|`))throw Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join(`|`)} vs ${t.join(`|`)}`)}begin(){++this._retainCacheCounter}end(){--this._retainCacheCounter,this._retainCacheCounter||(this._cacheQueryCSS.clear(),this._cacheMatches.clear(),this._cacheQuery.clear(),this._cacheMatchesSimple.clear(),this._cacheMatchesParents.clear(),this._cacheCallMatches.clear(),this._cacheCallQuery.clear(),this._cacheQuerySimple.clear(),this._cacheText.clear())}_cached(e,t,n,r){e.has(t)||e.set(t,[]);let i=e.get(t),a=i.find(e=>n.every((t,n)=>e.rest[n]===t));if(a)return a.result;let o=r();return i.push({rest:n,result:o}),o}_checkSelector(e){if(!(typeof e==`object`&&e&&(Array.isArray(e)||`simples`in e&&e.simples.length)))throw Error(`Malformed selector "${e}"`);return e}matches(e,t,n){let r=this._checkSelector(t);this.begin();try{return this._cached(this._cacheMatches,e,[r,n.scope,n.pierceShadow,n.originalScope],()=>Array.isArray(r)?this._matchesEngine(Ec,e,r,n):(this._hasScopeClause(r)&&(n=this._expandContextForScopeMatching(n)),this._matchesSimple(e,r.simples[r.simples.length-1].selector,n)?this._matchesParents(e,r,r.simples.length-2,n):!1))}finally{this.end()}}query(e,t){let n=this._checkSelector(t);this.begin();try{return this._cached(this._cacheQuery,n,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(n))return this._queryEngine(Ec,e,n);this._hasScopeClause(n)&&(e=this._expandContextForScopeMatching(e));let t=this._scoreMap;this._scoreMap=new Map;let r=this._querySimple(e,n.simples[n.simples.length-1].selector);return r=r.filter(t=>this._matchesParents(t,n,n.simples.length-2,e)),this._scoreMap.size&&r.sort((e,t)=>{let n=this._scoreMap.get(e),r=this._scoreMap.get(t);return n===r?0:n===void 0?1:r===void 0?-1:n-r}),this._scoreMap=t,r})}finally{this.end()}}_markScore(e,t){this._scoreMap&&this._scoreMap.set(e,t)}_hasScopeClause(e){return e.simples.some(e=>e.selector.functions.some(e=>e.name===`scope`))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;let t=Pa(e.scope);return t?{...e,scope:t,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,t,n){return this._cached(this._cacheMatchesSimple,e,[t,n.scope,n.pierceShadow,n.originalScope],()=>{if(e===n.scope||t.css&&!this._matchesCSS(e,t.css))return!1;for(let r of t.functions)if(!this._matchesEngine(this._getEngine(r.name),e,r.args,n))return!1;return!0})}_querySimple(e,t){return t.functions.length?this._cached(this._cacheQuerySimple,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let n=t.css,r=t.functions;n===`*`&&r.length&&(n=void 0);let i,a=-1;n===void 0?(a=r.findIndex(e=>this._getEngine(e.name).query!==void 0),a===-1&&(a=0),i=this._queryEngine(this._getEngine(r[a].name),e,r[a].args)):i=this._queryCSS(e,n);for(let t=0;t<r.length;t++){if(t===a)continue;let n=this._getEngine(r[t].name);n.matches!==void 0&&(i=i.filter(i=>this._matchesEngine(n,i,r[t].args,e)))}for(let t=0;t<r.length;t++){if(t===a)continue;let n=this._getEngine(r[t].name);n.matches===void 0&&(i=i.filter(i=>this._matchesEngine(n,i,r[t].args,e)))}return i}):this._queryCSS(e,t.css||`*`)}_matchesParents(e,t,n,r){return n<0?!0:this._cached(this._cacheMatchesParents,e,[t,n,r.scope,r.pierceShadow,r.originalScope],()=>{let{selector:i,combinator:a}=t.simples[n];if(a===`>`){let a=Rc(e,r);return!a||!this._matchesSimple(a,i,r)?!1:this._matchesParents(a,t,n-1,r)}if(a===`+`){let a=zc(e,r);return!a||!this._matchesSimple(a,i,r)?!1:this._matchesParents(a,t,n-1,r)}if(a===``){let a=Rc(e,r);for(;a;){if(this._matchesSimple(a,i,r)){if(this._matchesParents(a,t,n-1,r))return!0;if(t.simples[n-1].combinator===``)break}a=Rc(a,r)}return!1}if(a===`~`){let a=zc(e,r);for(;a;){if(this._matchesSimple(a,i,r)){if(this._matchesParents(a,t,n-1,r))return!0;if(t.simples[n-1].combinator===`~`)break}a=zc(a,r)}return!1}if(a===`>=`){let a=e;for(;a;){if(this._matchesSimple(a,i,r)){if(this._matchesParents(a,t,n-1,r))return!0;if(t.simples[n-1].combinator===``)break}a=Rc(a,r)}return!1}throw Error(`Unsupported combinator "${a}"`)})}_matchesEngine(e,t,n,r){if(e.matches)return this._callMatches(e,t,n,r);if(e.query)return this._callQuery(e,n,r).includes(t);throw Error(`Selector engine should implement "matches" or "query"`)}_queryEngine(e,t,n){if(e.query)return this._callQuery(e,n,t);if(e.matches)return this._queryCSS(t,`*`).filter(r=>this._callMatches(e,r,n,t));throw Error(`Selector engine should implement "matches" or "query"`)}_callMatches(e,t,n,r){return this._cached(this._cacheCallMatches,t,[e,r.scope,r.pierceShadow,r.originalScope,...n],()=>e.matches(t,n,r,this))}_callQuery(e,t,n){return this._cached(this._cacheCallQuery,e,[n.scope,n.pierceShadow,n.originalScope,...t],()=>e.query(n,t,this))}_matchesCSS(e,t){return e.matches(t)}_queryCSS(e,t){return this._cached(this._cacheQueryCSS,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let n=[];function r(i){if(n=n.concat([...i.querySelectorAll(t)]),e.pierceShadow){i.shadowRoot&&r(i.shadowRoot);for(let e of i.querySelectorAll(`*`))e.shadowRoot&&r(e.shadowRoot)}}return r(e.scope),n})}_getEngine(e){let t=this._engines.get(e);if(!t)throw Error(`Unknown selector engine "${e}"`);return t}},Ec={matches(e,t,n,r){if(t.length===0)throw Error(`"is" engine expects non-empty selector list`);return t.some(t=>r.matches(e,t,n))},query(e,t,n){if(t.length===0)throw Error(`"is" engine expects non-empty selector list`);let r=[];for(let i of t)r=r.concat(n.query(e,i));return t.length===1?r:Bc(r)}},Dc={matches(e,t,n,r){if(t.length===0)throw Error(`"has" engine expects non-empty selector list`);return r.query({...n,scope:e},t).length>0}},Oc={matches(e,t,n,r){if(t.length!==0)throw Error(`"scope" engine expects no arguments`);let i=n.originalScope||n.scope;return i.nodeType===9?e===i.documentElement:e===i},query(e,t,n){if(t.length!==0)throw Error(`"scope" engine expects no arguments`);let r=e.originalScope||e.scope;if(r.nodeType===9){let e=r.documentElement;return e?[e]:[]}return r.nodeType===1?[r]:[]}},kc={matches(e,t,n,r){if(t.length===0)throw Error(`"not" engine expects non-empty selector list`);return!r.matches(e,t,n)}},Ac={query(e,t,n){return n.query({...e,pierceShadow:!1},t)},matches(e,t,n,r){return r.matches(e,t,{...n,pierceShadow:!1})}},jc={matches(e,t,n,r){if(t.length)throw Error(`"visible" engine expects no arguments`);return Wa(e)}},Mc={matches(e,t,n,r){if(t.length!==1||typeof t[0]!=`string`)throw Error(`"text" engine expects a single string`);let i=a(t[0]).toLowerCase();return gc(r._cacheText,e,e=>e.normalized.toLowerCase().includes(i))===`self`}},Nc={matches(e,t,n,r){if(t.length!==1||typeof t[0]!=`string`)throw Error(`"text-is" engine expects a single string`);let i=a(t[0]);return gc(r._cacheText,e,e=>!i&&!e.immediate.length?!0:e.immediate.some(e=>a(e)===i))!==`none`}},Pc={matches(e,t,n,r){if(t.length===0||typeof t[0]!=`string`||t.length>2||t.length===2&&typeof t[1]!=`string`)throw Error(`"text-matches" engine expects a regexp body and optional regexp flags`);let i=new RegExp(t[0],t.length===2?t[1]:void 0);return gc(r._cacheText,e,e=>(i.lastIndex=0,i.test(e.full)))===`self`}},Fc={matches(e,t,n,r){if(t.length!==1||typeof t[0]!=`string`)throw Error(`"has-text" engine expects a single string`);if(mc(e))return!1;let i=a(t[0]).toLowerCase();return(e=>e.normalized.toLowerCase().includes(i))(hc(r._cacheText,e))}};function Ic(e){return{matches(t,n,r,i){let a=n.length&&typeof n[n.length-1]==`number`?n[n.length-1]:void 0,o=a===void 0?n:n.slice(0,n.length-1);if(n.length<1+(a===void 0?0:1))throw Error(`"${e}" engine expects a selector list and optional maximum distance in pixels`);let s=fc(e,t,i.query(r,o),a);return s===void 0?!1:(i._markScore(t,s),!0)}}}var Lc={query(e,t,n){let r=t[t.length-1];if(t.length<2)throw Error(`"nth-match" engine expects non-empty selector list and an index argument`);if(typeof r!=`number`||r<1)throw Error(`"nth-match" engine expects a one-based index as the last argument`);let i=Ec.query(e,t.slice(0,t.length-1),n);return r--,r<i.length?[i[r]]:[]}};function Rc(e,t){if(e!==t.scope)return t.pierceShadow?Pa(e):e.parentElement||void 0}function zc(e,t){if(e!==t.scope)return e.previousElementSibling||void 0}function Bc(e){let t=new Map,n=[],r=[];function i(e){let r=t.get(e);if(r)return r;let a=Pa(e);return a?i(a).children.push(e):n.push(e),r={children:[],taken:!1},t.set(e,r),r}for(let t of e)i(t).taken=!0;function a(e){let n=t.get(e);if(n.taken&&r.push(e),n.children.length>1){let t=new Set(n.children);n.children=[];let r=e.firstElementChild;for(;r&&n.children.length<t.size;)t.has(r)&&n.children.push(r),r=r.nextElementSibling;for(r=e.shadowRoot?e.shadowRoot.firstElementChild:null;r&&n.children.length<t.size;)t.has(r)&&n.children.push(r),r=r.nextElementSibling}n.children.forEach(a)}return n.forEach(a),r}var Vc=10,B=1,Hc=2,Uc=10,Wc=50,Gc=100,Kc=120,qc=140,Jc=160,Yc=180,Xc=200,Zc=250,Qc=125,$c=145,el=105,tl=165,nl=185,rl=205,il=300,al=500,ol=510,sl=520,cl=530,ll=1e4,ul=1e7,dl=1e3;function fl(e,t,n){e._evaluator.begin();let r={allowText:new Map,disallowText:new Map};As(),Qa();try{let i;if(n.forTextExpect){i=_l(e,t.ownerDocument.documentElement,n);for(let a=t;a;a=Pa(a)){let t=pl(r,e,a,{...n,noText:!0});if(t&&bl(t)<=dl){i=t;break}}}else{if(!t.matches(`input,textarea,select`)&&!t.isContentEditable){let e=La(t,`button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]`,n.root);e&&Wa(e)&&(t=e)}i=pl(r,e,t,n)||_l(e,t,n)}let a=yl(i),o=e.parseSelector(a);return{selector:a,elements:e.querySelectorAll(o,n.root??t.ownerDocument)}}finally{$a(),js(),e._evaluator.end()}}function pl(e,t,n,r){if(r.root&&!Na(r.root,n))throw Error(`Target element must belong to the root's subtree`);if(n===r.root)return[{engine:`css`,selector:`:scope`,score:1}];if(n.ownerDocument.documentElement===n)return[{engine:`css`,selector:`html`,score:1}];let i=null,a=e=>{(!i||bl(e)<bl(i))&&(i=e)},o=[];for(let e of hl(t,n,!r.isRecursive,r))o.push({candidate:e,isTextCandidate:!0});for(let e of ml(t,n,r))r.omitInternalEngines&&e.engine.startsWith(`internal:`)||o.push({candidate:[e],isTextCandidate:!1});o.sort((e,t)=>bl(e.candidate)-bl(t.candidate));for(let{candidate:s,isTextCandidate:c}of o){let o=t.querySelectorAll(t.parseSelector(yl(s)),r.root??n.ownerDocument);if(!o.includes(n))continue;if(o.length===1){a(s);break}let l=o.indexOf(n);if(!(l>5)&&(a([...s,{engine:`nth`,selector:String(l),score:ll}]),!r.isRecursive))for(let u=Pa(n);u&&u!==r.root;u=Pa(u)){let d=o.filter(e=>Na(u,e)&&e!==u),f=d.indexOf(n);if(d.length>5||f===-1||f===l&&d.length>1)continue;let p=d.length===1?s:[...s,{engine:`nth`,selector:String(f),score:ll}];if(i&&bl([{engine:``,selector:``,score:1},...p])>=bl(i))continue;let m=!!r.noText||c,h=m?e.disallowText:e.allowText,g=h.get(u);g===void 0&&(g=pl(e,t,u,{...r,isRecursive:!0,noText:m})||_l(t,u,r),h.set(u,g)),g&&a([...g,...p])}}return i}function ml(e,t,n){let r=[],a=la(n.testIdAttributeName);{for(let e of[`data-testid`,`data-test-id`,`data-test`])!a.includes(e)&&t.getAttribute(e)&&r.push({engine:`css`,selector:`[${e}=${p(t.getAttribute(e))}]`,score:Hc});let e=t.getAttribute(`id`);e&&!xl(e)&&r.push({engine:`css`,selector:gl(e),score:al}),r.push({engine:`css`,selector:wl(t),score:cl})}if(t.nodeName===`IFRAME`||t.nodeName===`FRAME`){for(let e of[`name`,`title`])t.getAttribute(e)&&r.push({engine:`css`,selector:`${wl(t)}[${e}=${p(t.getAttribute(e))}]`,score:Uc});for(let e of a)t.getAttribute(e)&&r.push({engine:`css`,selector:`[${e}=${p(t.getAttribute(e))}]`,score:B});return vl([r]),r}for(let e of a)t.getAttribute(e)&&r.push({engine:`internal:testid`,selector:`[${e}=${u(t.getAttribute(e),!0)}]`,score:B});if(t.nodeName===`INPUT`||t.nodeName===`TEXTAREA`){let e=t;if(e.placeholder){r.push({engine:`internal:attr`,selector:`[placeholder=${u(e.placeholder,!0)}]`,score:Qc});for(let t of Cl(e.placeholder))r.push({engine:`internal:attr`,selector:`[placeholder=${u(t.text,!1)}]`,score:Kc-t.scoreBonus})}}let o=_c(e._evaluator._cacheText,t,{skipRefsInsideElement:n.noText});for(let e of o){let t=e.normalized;r.push({engine:`internal:label`,selector:i(t,!0),score:$c});for(let e of Cl(t))r.push({engine:`internal:label`,selector:i(e.text,!1),score:qc-e.scoreBonus})}let s=go(t);return s&&![`none`,`presentation`].includes(s)&&r.push({engine:`internal:role`,selector:s,score:ol}),t.getAttribute(`name`)&&[`BUTTON`,`FORM`,`FIELDSET`,`FRAME`,`IFRAME`,`INPUT`,`KEYGEN`,`OBJECT`,`OUTPUT`,`SELECT`,`TEXTAREA`,`MAP`,`META`,`PARAM`].includes(t.nodeName)&&r.push({engine:`css`,selector:`${wl(t)}[name=${p(t.getAttribute(`name`))}]`,score:sl}),[`INPUT`,`TEXTAREA`].includes(t.nodeName)&&t.getAttribute(`type`)!==`hidden`&&t.getAttribute(`type`)&&r.push({engine:`css`,selector:`${wl(t)}[type=${p(t.getAttribute(`type`))}]`,score:sl}),[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.nodeName)&&t.getAttribute(`type`)!==`hidden`&&r.push({engine:`css`,selector:wl(t),score:521}),vl([r]),r}function hl(t,n,r,a){if(n.nodeName===`SELECT`)return[];let o=[];if(!a.noText){let e=n.getAttribute(`title`);if(e){o.push([{engine:`internal:attr`,selector:`[title=${u(e,!0)}]`,score:rl}]);for(let t of Cl(e))o.push([{engine:`internal:attr`,selector:`[title=${u(t.text,!1)}]`,score:Xc-t.scoreBonus}])}let t=n.getAttribute(`alt`);if(t&&[`APPLET`,`AREA`,`IMG`,`INPUT`].includes(n.nodeName)){o.push([{engine:`internal:attr`,selector:`[alt=${u(t,!0)}]`,score:tl}]);for(let e of Cl(t))o.push([{engine:`internal:attr`,selector:`[alt=${u(e.text,!1)}]`,score:Jc-e.scoreBonus}])}}let s=a.noText?``:hc(t._evaluator._cacheText,n).normalized,c=s?Cl(s):[];if(s){if(r){s.length<=80&&o.push([{engine:`internal:text`,selector:i(s,!0),score:nl}]);for(let e of c)o.push([{engine:`internal:text`,selector:i(e.text,!1),score:Yc-e.scoreBonus}])}let t={engine:`css`,selector:wl(n),score:cl};for(let e of c)o.push([t,{engine:`internal:has-text`,selector:i(e.text,!1),score:Yc-e.scoreBonus}]);if(r&&s.length<=80){let n=RegExp(`^`+e(s)+`$`);o.push([t,{engine:`internal:has-text`,selector:i(n,!1),score:Zc}])}}let l=go(n);if(l&&![`none`,`presentation`].includes(l)){let t=Mo(n,!1),d=a.noText&&t.derivedFromContent?``:t.text,f=Po(n,!1),p=a.noText&&f.derivedFromContent?``:f.text;if(d&&!d.match(/^\p{Co}+$/u)){let e={engine:`internal:role`,selector:`${l}[name=${u(d,!0)}]`,score:el};o.push([e]);for(let e of Cl(d))o.push([{engine:`internal:role`,selector:`${l}[name=${u(e.text,!1)}]`,score:Gc-e.scoreBonus}]);if(p){o.push([{engine:`internal:role`,selector:`${l}[name=${u(d,!0)}][description=${u(p,!0)}]`,score:106}]);for(let e of Cl(d))o.push([{engine:`internal:role`,selector:`${l}[name=${u(e.text,!1)}][description=${u(p,!1)}]`,score:Gc-e.scoreBonus+1}])}}else{let t={engine:`internal:role`,selector:`${l}`,score:ol};p&&o.push([{engine:`internal:role`,selector:`${l}[description=${u(p,!0)}]`,score:511}]);for(let e of c)o.push([t,{engine:`internal:has-text`,selector:i(e.text,!1),score:Yc-e.scoreBonus}]);if(!a.noText&&r&&s.length<=80){let n=RegExp(`^`+e(s)+`$`);o.push([t,{engine:`internal:has-text`,selector:i(n,!1),score:Zc}])}}}return vl(o),o}function gl(e){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(e)?`#`+e:`[id=${p(e)}]`}function _l(e,t,n){let r=n.root??t.ownerDocument,i=[];function a(n){let a=i.slice();n&&a.unshift(n);let o=a.join(` > `),s=e.parseSelector(o);return e.querySelector(s,r,!1)===t?o:void 0}function o(n){let i={engine:`css`,selector:n,score:ul},a=e.parseSelector(n),o=e.querySelectorAll(a,r);return o.length===1?[i]:[i,{engine:`nth`,selector:String(o.indexOf(t)),score:ll}]}for(let e=t;e&&e!==r;e=Pa(e)){let t=``;if(e.id){let n=gl(e.id),r=a(n);if(r)return o(r);t=n}let n=e.parentNode,r=[...e.classList].map(Tl);for(let e=0;e<r.length;++e){let i=`.`+r.slice(0,e+1).join(`.`),s=a(i);if(s)return o(s);!t&&n&&n.querySelectorAll(i).length===1&&(t=i)}if(n){let r=[...n.children],i=e.nodeName,s=r.filter(e=>e.nodeName===i).indexOf(e)===0?wl(e):`${wl(e)}:nth-child(${1+r.indexOf(e)})`,c=a(s);if(c)return o(c);t||=s}else t||=wl(e);i.unshift(t)}return o(a())}function vl(e){for(let t of e)for(let e of t)e.score>Wc&&e.score<il&&(e.score+=Math.min(Vc,e.selector.length/10|0))}function yl(e){let t=[],n=``;for(let{engine:r,selector:i}of e)t.length&&(n!==`css`||r!==`css`||i.startsWith(`:nth-match(`))&&t.push(`>>`),n=r,r===`css`?t.push(i):t.push(`${r}=${i}`);return t.join(` `)}function bl(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n].score*(e.length-n);return t}function xl(e){let t,n=0;for(let r=0;r<e.length;++r){let i=e[r],a;if(!(i===`-`||i===`_`)){if(a=i>=`a`&&i<=`z`?`lower`:i>=`A`&&i<=`Z`?`upper`:i>=`0`&&i<=`9`?`digit`:`other`,a===`lower`&&t===`upper`){t=a;continue}t&&t!==a&&++n,t=a}}return n>=e.length/4}function Sl(e,t){if(e.length<=t)return e;e=e.substring(0,t);let n=e.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():``}function Cl(e){let t=[];{let n=e.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){let n=Sl(e.substring(r).trimStart(),80);t.push({text:n,scoreBonus:n.length<=30?2:1})}}{let n=e.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){let n=Sl(e.substring(0,e.length-r).trimEnd(),80);t.push({text:n,scoreBonus:n.length<=30?2:1})}}return e.length<=30?t.push({text:e,scoreBonus:0}):(t.push({text:Sl(e,80),scoreBonus:0}),t.push({text:Sl(e,30),scoreBonus:1})),t=t.filter(e=>e.text),t.length||t.push({text:e.substring(0,80),scoreBonus:0}),t}function wl(e){return e.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>`\\`+e)}function Tl(e){let t=``;for(let n=0;n<e.length;n++)t+=El(e,n);return t}function El(e,t){let 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)}var Dl={queryAll(e,t){t.startsWith(`/`)&&e.nodeType!==Node.DOCUMENT_NODE&&(t=`.`+t);let n=[],r=e.ownerDocument||e;if(!r)return n;let i=r.evaluate(t,e,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let e=i.iterateNext();e;e=i.iterateNext())e.nodeType===Node.ELEMENT_NODE&&n.push(e);return n}},Ol=Symbol(`selector`),kl=class e{constructor(t,n,r){if(r?.hasText&&(n+=` >> internal:has-text=${i(r.hasText,!1)}`),r?.hasNotText&&(n+=` >> internal:has-not-text=${i(r.hasNotText,!1)}`),r?.has&&(n+=` >> internal:has=`+JSON.stringify(r.has[Ol])),r?.hasNot&&(n+=` >> internal:has-not=`+JSON.stringify(r.hasNot[Ol])),r?.visible!==void 0&&(n+=` >> visible=${r.visible?`true`:`false`}`),this[Ol]=n,n){let e=t.parseSelector(n);this.element=t.querySelector(e,t.document,!1),this.elements=t.querySelectorAll(e,t.document)}let a=n,o=this;o.locator=(n,r)=>new e(t,a?a+` >> `+n:n,r),o.getByTestId=e=>o.locator(da(t.testIdAttributeNameForStrictErrorAndConsoleCodegen(),e)),o.getByAltText=(e,t)=>o.locator(pa(e,t)),o.getByLabel=(e,t)=>o.locator(fa(e,t)),o.getByPlaceholder=(e,t)=>o.locator(ha(e,t)),o.getByText=(e,t)=>o.locator(ga(e,t)),o.getByTitle=(e,t)=>o.locator(ma(e,t)),o.getByRole=(e,t={})=>o.locator(_a(e,t)),o.filter=r=>new e(t,n,r),o.visible=()=>new e(t,n,{visible:!0}),o.first=()=>o.locator(`nth=0`),o.last=()=>o.locator(`nth=-1`),o.nth=e=>o.locator(`nth=${e}`),o.and=n=>new e(t,a+` >> internal:and=`+JSON.stringify(n[Ol])),o.or=n=>new e(t,a+` >> internal:or=`+JSON.stringify(n[Ol]))}},Al=class{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,t)=>this._querySelector(e,!!t),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,t)=>this._generateLocator(e,t),ariaSnapshot:(e,t)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,t||{mode:`default`}),resume:()=>this._resume(),...new kl(this._injectedScript,``)},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.visible,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(e,t){if(typeof e!=`string`)throw Error(`Usage: playwright.query('Playwright >> selector').`);let n=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(n,this._injectedScript.document,t)}_querySelectorAll(e){if(typeof e!=`string`)throw Error(`Usage: playwright.$$('Playwright >> selector').`);let t=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(t,this._injectedScript.document)}_inspect(e){if(typeof e!=`string`)throw Error(`Usage: playwright.inspect('Playwright >> selector').`);this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw Error(`Usage: playwright.selector(element).`);return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,t){if(!(e instanceof Element))throw Error(`Usage: playwright.locator(element).`);let n=this._injectedScript.generateSelectorSimple(e);return Gt(t||`javascript`,n)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}},jl=`__playwright__binding__controller__`;function Ml(e){try{return e instanceof RegExp||Object.prototype.toString.call(e)===`[object RegExp]`}catch{return!1}}function Nl(e){try{return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}catch{return!1}}function Pl(e){try{return e instanceof URL||Object.prototype.toString.call(e)===`[object URL]`}catch{return!1}}function Fl(e){try{return e instanceof Error||e&&Object.getPrototypeOf(e)?.name===`Error`}catch{return!1}}function Il(e,t){try{return e instanceof t||Object.prototype.toString.call(e)===`[object ${t.name}]`}catch{return!1}}function Ll(e){try{return e instanceof ArrayBuffer||Object.prototype.toString.call(e)===`[object ArrayBuffer]`}catch{return!1}}function Rl(e){try{return e instanceof Map||Object.prototype.toString.call(e)===`[object Map]`}catch{return!1}}function zl(e){try{return e instanceof Set||Object.prototype.toString.call(e)===`[object Set]`}catch{return!1}}var Bl={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function Vl(e){if(`toBase64`in e)return e.toBase64();let t=Array.from(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).map(e=>String.fromCharCode(e)).join(``);return btoa(t)}function Hl(e,t){let n=atob(e),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return new t(r.buffer)}function Ul(e,t=[],n=new Map){if(!Object.is(e,void 0)){if(typeof e==`object`&&e){if(`ref`in e)return n.get(e.ref);if(`v`in e)return e.v===`undefined`?void 0:e.v===`null`?null:e.v===`NaN`?NaN:e.v===`Infinity`?1/0:e.v===`-Infinity`?-1/0:e.v===`-0`?-0:void 0;if(`d`in e)return new Date(e.d);if(`u`in e)return new URL(e.u);if(`bi`in e)return BigInt(e.bi);if(`e`in e){let t=Error(e.e.m);return t.name=e.e.n,t.stack=e.e.s,t}if(`r`in e)return new RegExp(e.r.p,e.r.f);if(`a`in e){let r=[];n.set(e.id,r);for(let i of e.a)r.push(Ul(i,t,n));return r}if(`o`in e){let r={};n.set(e.id,r);for(let{k:i,v:a}of e.o)i!==`__proto__`&&(r[i]=Ul(a,t,n));return r}if(`m`in e){let r=new Map;n.set(e.id,r);for(let{k:i,v:a}of e.m)r.set(Ul(i,t,n),Ul(a,t,n));return r}if(`s`in e){let r=new Set;n.set(e.id,r);for(let i of e.s)r.add(Ul(i,t,n));return r}if(`h`in e)return t[e.h];if(`fn`in e){let t=e.fn;return(...e)=>globalThis[jl].callBinding(t,...e)}if(`ta`in e)return Hl(e.ta.b,Bl[e.ta.k]);if(`ab`in e)return Hl(e.ab.b,Uint8Array).buffer}return e}}function V(e,t,n={}){return H(e,t,{visited:new Map,lastId:0,extendedSerialization:n.extendedSerialization})}function H(e,t,n){if(e&&typeof e==`object`){if(typeof globalThis.Window==`function`&&e instanceof globalThis.Window)return`ref: <Window>`;if(typeof globalThis.Document==`function`&&e instanceof globalThis.Document)return`ref: <Document>`;if(typeof globalThis.Node==`function`&&e instanceof globalThis.Node)return`ref: <Node>`}return U(e,t,n)}function U(e,t,n){let r=t(e);if(`fallThrough`in r)e=r.fallThrough;else return r;if(typeof e==`symbol`||Object.is(e,void 0))return{v:`undefined`};if(Object.is(e,null))return{v:`null`};if(Object.is(e,NaN))return{v:`NaN`};if(Object.is(e,1/0))return{v:`Infinity`};if(Object.is(e,-1/0))return{v:`-Infinity`};if(Object.is(e,-0))return{v:`-0`};if(typeof e==`boolean`||typeof e==`number`||typeof e==`string`)return e;if(typeof e==`bigint`)return{bi:e.toString()};if(Fl(e)){let t;return t=e.stack?.startsWith(e.name+`: `+e.message)?e.stack:`${e.name}: ${e.message}\n${e.stack}`,{e:{n:e.name,m:e.message,s:t}}}if(Nl(e))return{d:e.toJSON()};if(Pl(e))return{u:e.toJSON()};if(Ml(e))return{r:{p:e.source,f:e.flags}};for(let[t,n]of Object.entries(Bl))if(Il(e,n))return{ta:{b:Vl(e),k:t}};if(Ll(e))return{ab:{b:Vl(new Uint8Array(e))}};let i=n.visited.get(e);if(i)return{ref:i};if(n.extendedSerialization){if(Rl(e)){let r=[],i=++n.lastId;n.visited.set(e,i);let a=e.entries(),o=new Map().entries().next;for(;;){let e=o.call(a);if(e.done)break;r.push({k:H(e.value[0],t,n),v:H(e.value[1],t,n)})}return{m:r,id:i}}if(zl(e)){let r=[],i=++n.lastId;n.visited.set(e,i);let a=e.values(),o=new Set().values().next;for(;;){let e=o.call(a);if(e.done)break;r.push(H(e.value,t,n))}return{s:r,id:i}}}if(Array.isArray(e)){let r=[],i=++n.lastId;n.visited.set(e,i);for(let i=0;i<e.length;++i)r.push(H(e[i],t,n));return{a:r,id:i}}if(typeof e==`object`){let r=[],i=++n.lastId;n.visited.set(e,i);for(let i of Object.keys(e)){let a;try{a=e[i]}catch{continue}i===`toJSON`&&typeof a==`function`?r.push({k:i,v:{o:[],id:0}}):r.push({k:i,v:H(a,t,n)})}let a;try{r.length===0&&e.toJSON&&typeof e.toJSON==`function`&&(a={value:e.toJSON()})}catch{}return a?U(a.value,t,n):{o:r,id:i}}if(typeof e==`function`&&e.name.startsWith(`__pw_fn_`))return{fn:e.name}}var W=class{constructor(e,t){this.global=e,this.isUnderTest=t,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:e.setTimeout?.bind(e),clearTimeout:e.clearTimeout?.bind(e),setInterval:e.setInterval?.bind(e),clearInterval:e.clearInterval?.bind(e),requestAnimationFrame:e.requestAnimationFrame?.bind(e),cancelAnimationFrame:e.cancelAnimationFrame?.bind(e),requestIdleCallback:e.requestIdleCallback?.bind(e),cancelIdleCallback:e.cancelIdleCallback?.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date,AbortSignal:e.AbortSignal,Temporal:e.Temporal},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,t,n,r,...i){let a=i.slice(0,r),o=i.slice(r),s=[];for(let e=0;e<a.length;e++)s[e]=Ul(a[e],o);let c=this.global.eval(n);return e===!0?c=c(...s):e===!1?c=c:typeof c==`function`&&(c=c(...s)),G(c)?(async()=>{let e=await c;return t?this._jsonValueNoThrow(e):e})():t?this._jsonValueNoThrow(c):c}jsonValue(e,t){if(t!==void 0)return V(t,e=>({fallThrough:e}))}_jsonValueNoThrow(e){try{return this.jsonValue(!0,e)}catch{return}}};function G(e){return e&&typeof e==`object`&&typeof e.then==`function`}var Wl=class{constructor(e,t){this._testIdAttributeNameForStrictErrorAndConsoleCodegen=`data-testid`,this.utils={asLocator:Gt,cacheNormalizedWhitespaces:s,elementText:hc,getAriaRole:go,getElementAccessibleNameText:No,getElementAccessibleDescription:Po,isElementVisible:Wa,isInsideScope:Na,normalizeWhiteSpace:a,parseAriaSnapshot:Ji,generateAriaTree:Rs,findNewElement:tc,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=t.isUnderTest,this.utils.builtins=new W(e,t.isUnderTest).builtins,this._sdkLanguage=t.sdkLanguage,this._frameSeq=t.frameSeq,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=t.testIdAttributeName,this._evaluator=new Tc,this.consoleApi=new Al(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set([`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`MENUITEM`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`]),this._booleanAttributes=new Set([`checked`,`selected`,`disabled`,`readonly`,`multiple`]),this._eventTypes=new Map([[`auxclick`,`mouse`],[`click`,`mouse`],[`dblclick`,`mouse`],[`mousedown`,`mouse`],[`mouseeenter`,`mouse`],[`mouseleave`,`mouse`],[`mousemove`,`mouse`],[`mouseout`,`mouse`],[`mouseover`,`mouse`],[`mouseup`,`mouse`],[`mouseleave`,`mouse`],[`mousewheel`,`mouse`],[`keydown`,`keyboard`],[`keyup`,`keyboard`],[`keypress`,`keyboard`],[`textInput`,`keyboard`],[`touchstart`,`touch`],[`touchmove`,`touch`],[`touchend`,`touch`],[`touchcancel`,`touch`],[`pointerover`,`pointer`],[`pointerout`,`pointer`],[`pointerenter`,`pointer`],[`pointerleave`,`pointer`],[`pointerdown`,`pointer`],[`pointerup`,`pointer`],[`pointermove`,`pointer`],[`pointercancel`,`pointer`],[`gotpointercapture`,`pointer`],[`lostpointercapture`,`pointer`],[`focus`,`focus`],[`blur`,`focus`],[`drag`,`drag`],[`dragstart`,`drag`],[`dragend`,`drag`],[`dragover`,`drag`],[`dragenter`,`drag`],[`dragleave`,`drag`],[`dragexit`,`drag`],[`drop`,`drag`],[`wheel`,`wheel`],[`deviceorientation`,`deviceorientation`],[`deviceorientationabsolute`,`deviceorientation`],[`devicemotion`,`devicemotion`]]),this._hoverHitTargetInterceptorEvents=new Set([`mousemove`]),this._tapHitTargetInterceptorEvents=new Set([`pointerdown`,`pointerup`,`touchstart`,`touchend`,`touchcancel`]),this._mouseHitTargetInterceptorEvents=new Set([`mousedown`,`mouseup`,`pointerdown`,`pointerup`,`click`,`auxclick`,`dblclick`,`contextmenu`]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set(`xpath`,Dl),this._engines.set(`xpath:light`,Dl),this._engines.set(`role`,wc(!1)),this._engines.set(`text`,this._createTextEngine(!0,!1)),this._engines.set(`text:light`,this._createTextEngine(!1,!1)),this._engines.set(`id`,this._createAttributeEngine(`id`,!0)),this._engines.set(`id:light`,this._createAttributeEngine(`id`,!1)),this._engines.set(`data-testid`,this._createAttributeEngine(`data-testid`,!0)),this._engines.set(`data-testid:light`,this._createAttributeEngine(`data-testid`,!1)),this._engines.set(`data-test-id`,this._createAttributeEngine(`data-test-id`,!0)),this._engines.set(`data-test-id:light`,this._createAttributeEngine(`data-test-id`,!1)),this._engines.set(`data-test`,this._createAttributeEngine(`data-test`,!0)),this._engines.set(`data-test:light`,this._createAttributeEngine(`data-test`,!1)),this._engines.set(`css`,this._createCSSEngine()),this._engines.set(`nth`,{queryAll:()=>[]}),this._engines.set(`visible`,this._createVisibleEngine()),this._engines.set(`internal:control`,this._createControlEngine()),this._engines.set(`internal:has`,this._createHasEngine()),this._engines.set(`internal:has-not`,this._createHasNotEngine()),this._engines.set(`internal:and`,{queryAll:()=>[]}),this._engines.set(`internal:or`,{queryAll:()=>[]}),this._engines.set(`internal:chain`,this._createInternalChainEngine()),this._engines.set(`internal:label`,this._createInternalLabelEngine()),this._engines.set(`internal:text`,this._createTextEngine(!0,!0)),this._engines.set(`internal:has-text`,this._createInternalHasTextEngine()),this._engines.set(`internal:has-not-text`,this._createInternalHasNotTextEngine()),this._engines.set(`internal:attr`,this._createNamedAttributeEngine()),this._engines.set(`internal:testid`,this._createTestIdEngine()),this._engines.set(`internal:role`,wc(!0)),this._engines.set(`internal:describe`,this._createDescribeEngine()),this._engines.set(`aria-ref`,this._createAriaRefEngine()),this._engines.set(`aria-template`,this._createAriaTemplateEngine());for(let{name:e,source:n}of t.customEngines)this._engines.set(e,this.eval(n));this._stableRafCount=t.stableRafCount,this._browserName=t.browserName,this._shouldPrependErrorPrefix=!!t.shouldPrependErrorPrefix,this._isUtilityWorld=!!t.isUtilityWorld,ja({browserNameForWorkarounds:t.browserName,skipInertCheck:t.skipInertCheck,skipDialogCheck:t.skipDialogCheck}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){let t=It(e);return Bt(t,t=>{if(!this._engines.has(t.name))throw this.createStacklessError(`Unknown engine "${t.name}" while parsing selector ${e}`)}),t}generateSelector(e,t){return fl(this,e,t)}generateSelectorSimple(e,t){return fl(this,e,{...t,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,t,n){let r=this.querySelectorAll(e,t);if(n&&r.length>1)throw this.strictModeViolationError(e,r);return this.checkDeprecatedSelectorUsage(e,r),r[0]}_queryNth(e,t){let n=[...e],r=+t.body;return r===-1&&(r=n.length-1),new Set(n.slice(r,r+1))}_queryLayoutSelector(e,t,n){let r=t.name,i=t.body,a=[],o=this.querySelectorAll(i.parsed,n);for(let t of e){let e=fc(r,t,o,i.distance);e!==void 0&&a.push({element:t,score:e})}return a.sort((e,t)=>e.score-t.score),new Set(a.map(e=>e.element))}ariaSnapshot(e,t){let{json:n}=this.ariaSnapshotJSON(e,t);return ia(n,{convertStringsToRegex:t.mode===`codegen`})}ariaSnapshotJSON(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError(`Can only capture aria snapshot of Element nodes.`);t={...t,refPrefix:this._frameSeq&&t.mode===`ai`?`f`+this._frameSeq:``};let n=Rs(e,t),r=Zs(n,t);return this._lastAriaSnapshotForQuery=n,{json:r.json,iframeRefs:n.iframeRefs,iframeDepths:r.iframeDepths}}ariaSnapshotForRecorder(){let e=Rs(this.document.body,{mode:`ai`}),{json:t}=Zs(e,{mode:`ai`});return{ariaSnapshot:ia(t),refs:e.refs}}ariaSnapshotForExpectFailure(e,t){let{json:n}=Zs(Rs(e,t),t);return ia(n)}documentContent(e){let t=``;this.document.doctype&&(t=new XMLSerializer().serializeToString(this.document.doctype));let n=this.document.documentElement;if(!n)return t;if(!e)return t+n.outerHTML;let r=[],i=e=>{for(let t of e.querySelectorAll(`*`))t.shadowRoot&&(r.push(t.shadowRoot),i(t.shadowRoot))};i(this.document);let a=n.cloneNode(!1).outerHTML,o=a.lastIndexOf(`</`);return t+a.slice(0,o)+n.getHTML({shadowRoots:r})+a.slice(o)}getAllElementsMatchingExpectAriaTemplate(e,t){return Ks(e.documentElement,t)}querySelectorAll(e,t){if(e.capture!==void 0){if(e.parts.some(e=>e.name===`nth`))throw this.createStacklessError(`Can't query n-th element in a request with the capture.`);let n={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){let t={parts:e.parts.slice(e.capture+1)},r={name:`internal:has`,body:{parsed:t},source:zt(t)};n.parts.push(r)}return this.querySelectorAll(n,t)}if(!t.querySelectorAll)throw this.createStacklessError(`Node is not queryable.`);if(e.capture!==void 0)throw this.createStacklessError(`Internal error: there should not be a capture in the selector.`);if(t.nodeType===11&&e.parts.length===1&&e.parts[0].name===`css`&&e.parts[0].source===`:scope`)return[t];this._evaluator.begin();try{let n=new Set([t]);for(let r of e.parts)if(r.name===`nth`)n=this._queryNth(n,r);else if(r.name===`internal:and`){let e=this.querySelectorAll(r.body.parsed,t);n=new Set(e.filter(e=>n.has(e)))}else if(r.name===`internal:or`){let e=this.querySelectorAll(r.body.parsed,t);n=new Set(Bc(new Set([...n,...e])))}else if(dc.includes(r.name))n=this._queryLayoutSelector(n,r,t);else{let e=new Set;for(let t of n){let n=this._queryEngineAll(r,t);for(let t of n)e.add(t)}n=e}return[...n]}finally{this._evaluator.end()}}_queryEngineAll(e,t){let n=this._engines.get(e.name).queryAll(t,e.body);for(let e of n)if(!(`nodeName`in e))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(e)}`);return n}_createAttributeEngine(e,t){let n=t=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(t)}]`,functions:[]},combinator:``}]}];return{queryAll:(e,r)=>this._evaluator.query({scope:e,pierceShadow:t},n(r))}}_createCSSEngine(){return{queryAll:(e,t)=>this._evaluator.query({scope:e,pierceShadow:!0},t)}}_createTextEngine(e,t){return{queryAll:(n,r)=>{let{matcher:i,kind:a}=Jl(r,t),o=[],s=null,c=e=>{if(a===`lax`&&s&&s.contains(e))return!1;let n=gc(this._evaluator._cacheText,e,i);n===`none`&&(s=e),(n===`self`||n===`selfAndChildren`&&a===`strict`&&!t)&&o.push(e)};n.nodeType===Node.ELEMENT_NODE&&c(n);let l=this._evaluator._queryCSS({scope:n,pierceShadow:e},`*`);for(let e of l)c(e);return o}}}_createInternalHasTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];let n=e,r=hc(this._evaluator._cacheText,n),{matcher:i}=Jl(t,!0);return i(r)?[n]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];let n=e,r=hc(this._evaluator._cacheText,n),{matcher:i}=Jl(t,!0);return i(r)?[]:[n]}}}_createInternalLabelEngine(){return{queryAll:(e,t)=>{let{matcher:n}=Jl(t,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},`*`).filter(e=>_c(this._evaluator._cacheText,e).some(e=>n(e)))}}}_createNamedAttributeEngine(){return{queryAll:(e,t)=>{let n=Ht(t,!0);if(n.name||n.attributes.length!==1)throw Error(`Malformed attribute selector: `+t);let{name:r}=n.attributes[0],i=Kl(n.attributes[0]);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},`[${r}]`).filter(e=>i(e.getAttribute(r)))}}}_createTestIdEngine(){return{queryAll:(e,t)=>{let n=Ht(t,!0);if(n.name||n.attributes.length!==1)throw Error(`Malformed test id selector: `+t);let r=la(n.attributes[0].name),i=Kl(n.attributes[0]),a=r.map(e=>`[${e}]`).join(`,`);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},a).filter(e=>r.some(t=>{let n=e.getAttribute(t);return n!==null&&i(n)}))}}}_createDescribeEngine(){return{queryAll:e=>e.nodeType===1?[e]:[]}}_createControlEngine(){return{queryAll(e,t){if(t===`enter-frame`||t===`any-frame`||t===`return-empty`)return[];if(t===`component`)return e.nodeType===1?[e.childElementCount===1?e.firstElementChild:e]:[];throw Error(`Internal error, unknown internal:control selector ${t}`)}}}_createHasEngine(){return{queryAll:(e,t)=>e.nodeType===1&&this.querySelector(t.parsed,e,!1)?[e]:[]}}_createHasNotEngine(){return{queryAll:(e,t)=>e.nodeType===1?this.querySelector(t.parsed,e,!1)?[]:[e]:[]}}_createVisibleEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];let n=t===`true`;return Wa(e)===n?[e]:[]}}}_createInternalChainEngine(){return{queryAll:(e,t)=>this.querySelectorAll(t.parsed,e)}}extend(e,t){return new(this.window.eval(`
    (() => {
      const module = {};
      ${e}
      return module.exports.default();
    })()`))(this,t)}async viewportRatio(e){return await new Promise(t=>{let n=new IntersectionObserver(e=>{t(e[0].intersectionRatio),n.disconnect()});n.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};let t=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(t.borderLeftWidth||``,10),top:parseInt(t.borderTopWidth||``,10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return`error:notconnected`;let t=e.ownerDocument.defaultView;for(let n=e;n;n=Pa(n))if(t.getComputedStyle(n).transform!==`none`)return`transformed`;let n=t.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||``,10)+parseInt(n.paddingLeft||``,10),top:parseInt(n.borderTopWidth||``,10)+parseInt(n.paddingTop||``,10)}}retarget(e,t){let n=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!n)return null;if(t===`none`)return n;if(!n.matches(`input, textarea, select`)&&!n.isContentEditable&&(n=t===`button-link`?n.closest(`button, [role=button], a, [role=link]`)||n:n.closest(`button, [role=button], [role=checkbox], [role=radio]`)||n),t===`follow-label`&&!n.matches(`a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]`)&&!n.isContentEditable){let e=n.closest(`label`);e&&e.control&&(n=e.control)}return n}async checkElementStates(e,t,n){if(t.includes(`stable`)){let t=await this._checkElementIsStable(e);if(t===!1)return{missingState:`stable`};if(t===`error:notconnected`)return`error:notconnected`}for(let r of t)if(r!==`stable`){let t=this.elementState(e,r,n);if(t.received===`error:notconnected`)return`error:notconnected`;if(!t.matches)return{missingState:r}}}async _checkElementIsStable(e){let t=Symbol(`continuePolling`),n,r=0,i=0,a=()=>{let a=this.retarget(e,`no-follow-label`);if(!a)return`error:notconnected`;let o=this.utils.builtins.performance.now();if(this._stableRafCount>1&&o-i<15)return t;i=o;let s=a.getBoundingClientRect(),c={x:s.top,y:s.left,width:s.width,height:s.height};if(n){if(!(c.x===n.x&&c.y===n.y&&c.width===n.width&&c.height===n.height))return!1;if(++r>=this._stableRafCount)return!0}return n=c,t},o,s,c=new Promise((e,t)=>{o=e,s=t}),l=()=>{try{let e=a();e===t?this.utils.builtins.requestAnimationFrame(l):o(e)}catch(e){s(e)}};return this.utils.builtins.requestAnimationFrame(l),c}_createAriaRefEngine(){return{queryAll:(e,t)=>{let n=this._lastAriaSnapshotForQuery?.info?.get(t);return n&&n.element.isConnected?[n.element]:[]}}}_createAriaTemplateEngine(){return{queryAll:(e,t)=>{let n=JSON.parse(t),r=e.nodeType===9?e.documentElement:e;return r?Ks(r,n):[]}}}elementState(e,t,n){let r=this.retarget(e,[`visible`,`hidden`].includes(t)?`none`:`follow-label`);if(!r||!r.isConnected)return t===`hidden`?{matches:!0,received:`hidden`}:{matches:!1,received:`error:notconnected`};if(t===`visible`||t===`hidden`){let e=!!n&&Wa(r);return{matches:t===`visible`?e:!e,received:e?`visible`:`hidden`}}if(t===`disabled`||t===`enabled`){let e=as(r);return{matches:t===`disabled`?e:!e,received:e?`disabled`:`enabled`}}if(t===`non-inert`){let e=yo(r);return{matches:!e,received:e?`inert`:`non-inert`}}if(t===`editable`){let e=as(r),t=Zo(r);if(t===`error`)throw this.createStacklessError(`Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]`);return{matches:!e&&!t,received:e?`disabled`:t?`readOnly`:`editable`}}if(t===`checked`||t===`unchecked`){let e=t===`checked`,n=Jo(r);if(n===`error`)throw this.createStacklessError(`Not a checkbox or radio button`);let i=r.nodeName===`INPUT`&&r.type===`radio`;return{matches:e===n,received:n?`checked`:`unchecked`,isRadio:i}}if(t===`indeterminate`){let e=qo(r);if(e===`error`)throw this.createStacklessError(`Not a checkbox or radio button`);return{matches:e===`mixed`,received:e===!0?`checked`:e===!1?`unchecked`:`mixed`}}throw this.createStacklessError(`Unexpected element state "${t}"`)}selectOptions(e,t){let n=this.retarget(e,`follow-label`);if(!n)return`error:notconnected`;if(n.nodeName.toLowerCase()!==`select`)throw this.createStacklessError(`Element is not a <select> element`);let r=n,i=[...r.options],o=[],s=t.slice();for(let e=0;e<i.length;e++){let t=i[e],n=a(t.label),c=r=>{if(r instanceof Node)return t===r;let i=e=>e===t.label||a(e)===n,o=!0;return r.valueOrLabel!==void 0&&(o&&=r.valueOrLabel===t.value||i(r.valueOrLabel)),r.value!==void 0&&(o&&=r.value===t.value),r.label!==void 0&&(o&&=i(r.label)),r.index!==void 0&&(o&&=r.index===e),o};if(s.some(c)){if(!this.elementState(t,`enabled`).matches)return`error:optionnotenabled`;if(o.push(t),r.multiple)s=s.filter(e=>!c(e));else{s=[];break}}}return s.length?`error:optionsnotfound`:(r.value=void 0,o.forEach(e=>e.selected=!0),r.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),r.dispatchEvent(new Event(`change`,{bubbles:!0})),o.map(e=>e.value))}fill(e,t){let n=this.retarget(e,`follow-label`);if(!n)return`error:notconnected`;if(n.nodeName.toLowerCase()===`input`){let e=n,r=e.type.toLowerCase(),i=new Set([`color`,`date`,`time`,`datetime-local`,`month`,`range`,`week`]);if(!new Set([``,`email`,`number`,`password`,`search`,`tel`,`text`,`url`]).has(r)&&!i.has(r))throw this.createStacklessError(`Input of type "${r}" cannot be filled`);if(r===`number`&&(t=t.trim(),isNaN(Number(t))))throw this.createStacklessError(`Cannot type text into input[type=number]`);if(i.has(r))return t=t.trim(),e.focus(),e.value=t,n.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),n.dispatchEvent(new Event(`change`,{bubbles:!0})),`done`}else if(n.nodeName.toLowerCase()!==`textarea`&&!n.isContentEditable)throw this.createStacklessError(`Element is not an <input>, <textarea> or [contenteditable] element`);return this.selectText(n),`needsinput`}selectText(e){let t=this.retarget(e,`follow-label`);if(!t)return`error:notconnected`;if(t.nodeName.toLowerCase()===`input`){let e=t;return e.select(),e.focus(),`done`}if(t.nodeName.toLowerCase()===`textarea`){let e=t;return e.selectionStart=0,e.selectionEnd=e.value.length,e.focus(),`done`}let n=t;for(;n.isContentEditable&&n.parentElement?.isContentEditable;)n=n.parentElement;n.focus();let r=t.ownerDocument.createRange();r.selectNodeContents(t);let i=t.ownerDocument.defaultView.getSelection();return i&&(i.removeAllRanges(),i.addRange(r)),`done`}_activelyFocused(e){let t=e.getRootNode().activeElement;return{activeElement:t,isFocused:t===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus()}}focusNode(e,t){if(!e.isConnected)return`error:notconnected`;if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError(`Node is not an element`);let{activeElement:n,isFocused:r}=this._activelyFocused(e);if(e.isContentEditable&&!r&&n&&n.blur&&n.blur(),e.focus(),e.focus(),t&&!r&&e.nodeName.toLowerCase()===`input`)try{e.setSelectionRange(0,0)}catch{}return`done`}blurNode(e){if(!e.isConnected)return`error:notconnected`;if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError(`Node is not an element`);return e.blur(),`done`}setInputFiles(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return`Node is not of type HTMLElement`;let n=e;if(n.nodeName!==`INPUT`)return`Not an <input> element`;let r=n;if((r.getAttribute(`type`)||``).toLowerCase()!==`file`)return`Not an input[type=file] element`;let i=t.map(e=>{let t=Uint8Array.from(atob(e.buffer),e=>e.charCodeAt(0));return new File([t],e.name,{type:e.mimeType,lastModified:e.lastModifiedMs})}),a=new DataTransfer;for(let e of i)a.items.add(e);r.files=a.files,r.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),r.dispatchEvent(new Event(`change`,{bubbles:!0}))}expectHitTarget(e,t){let n=[],r=t;for(;r;){let e=Fa(r);if(!e||(n.push(e),e.nodeType===9))break;r=e.host}let i;for(let t=n.length-1;t>=0;t--){let r=n[t],a=r.elementsFromPoint(e.x,e.y),o=r.elementFromPoint(e.x,e.y);o&&a[0]&&Pa(o)===a[0]&&this.window.getComputedStyle(o)?.display===`contents`&&a.unshift(o),a[0]&&a[1]===o&&n.slice(t).some(e=>e.host===a[0])&&a.shift();let s=a[0];if(!s||(i=s,t&&s!==n[t-1].host))break}let a=[];for(;i&&i!==t;)a.push(i),i=i.assignedSlot??Pa(i);if(i===t)return`done`;let o=this.previewNode(a[0]||this.document.documentElement),s,c=t;for(;c;){let e=a.indexOf(c);if(e!==-1){e>1&&(s=this.previewNode(a[e-1]));break}c=Pa(c)}return s?{hitTargetDescription:`${o} from ${s} subtree`}:{hitTargetDescription:o}}setupHitTargetInterceptor(e,t,n,r){let i=this.retarget(e,`button-link`);if(!i||!i.isConnected)return`error:notconnected`;if(n){let e=this.expectHitTarget(n,i);if(e!==`done`)return e.hitTargetDescription}if(t===`drag`)return{stop:()=>`done`};let a={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[t],o,s=e=>{if(!a.has(e.type)||!e.isTrusted&&!e.__pwTrustedSynthetic)return;let t=this.window.TouchEvent&&e instanceof this.window.TouchEvent?e.touches[0]:e;o===void 0&&t&&(o=this.expectHitTarget({x:t.clientX,y:t.clientY},i)),(r||o!==`done`&&o!==void 0)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())},c=()=>(this._hitTargetInterceptor===s&&(this._hitTargetInterceptor=void 0),s=void 0,o||`done`);return this._hitTargetInterceptor=s,{stop:c}}dispatchEvent(e,t,n){let r,i={bubbles:!0,cancelable:!0,composed:!0,...n};switch(this._eventTypes.get(t)){case`mouse`:r=new MouseEvent(t,i);break;case`keyboard`:r=new KeyboardEvent(t,i);break;case`touch`:if(this._browserName===`webkit`){let n=t=>{if(t instanceof Touch)return t;let n=t.pageX;n===void 0&&t.clientX!==void 0&&(n=t.clientX+(this.document.scrollingElement?.scrollLeft||0));let r=t.pageY;return r===void 0&&t.clientY!==void 0&&(r=t.clientY+(this.document.scrollingElement?.scrollTop||0)),this.document.createTouch(this.window,t.target??e,t.identifier,n,r,t.screenX,t.screenY,t.radiusX,t.radiusY,t.rotationAngle,t.force)},a=e=>e instanceof TouchList||!e?e:this.document.createTouchList(...e.map(n));i.target??=e,i.touches=a(i.touches),i.targetTouches=a(i.targetTouches),i.changedTouches=a(i.changedTouches),r=new TouchEvent(t,i)}else i.target??=e,i.touches=i.touches?.map(t=>t instanceof Touch?t:new Touch({...t,target:t.target??e})),i.targetTouches=i.targetTouches?.map(t=>t instanceof Touch?t:new Touch({...t,target:t.target??e})),i.changedTouches=i.changedTouches?.map(t=>t instanceof Touch?t:new Touch({...t,target:t.target??e})),r=new TouchEvent(t,i);break;case`pointer`:r=new PointerEvent(t,i);break;case`focus`:r=new FocusEvent(t,i);break;case`drag`:r=new DragEvent(t,i);break;case`wheel`:r=new WheelEvent(t,i);break;case`deviceorientation`:try{r=new DeviceOrientationEvent(t,i)}catch{let{bubbles:e,cancelable:n,alpha:a,beta:o,gamma:s,absolute:c}=i;r=this.document.createEvent(`DeviceOrientationEvent`),r.initDeviceOrientationEvent(t,e,n,a,o,s,c)}break;case`devicemotion`:try{r=new DeviceMotionEvent(t,i)}catch{let{bubbles:e,cancelable:n,acceleration:a,accelerationIncludingGravity:o,rotationRate:s,interval:c}=i;r=this.document.createEvent(`DeviceMotionEvent`),r.initDeviceMotionEvent(t,e,n,a,o,s,c)}break;default:r=new Event(t,i);break}e.dispatchEvent(r)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Gl(`#text=${e.nodeValue||``}`);if(e.nodeType!==Node.ELEMENT_NODE)return Gl(`<${e.nodeName.toLowerCase()} />`);let t=e,n=[];for(let e=0;e<t.attributes.length;e++){let{name:r,value:i}=t.attributes[e];r!==`style`&&(!i&&this._booleanAttributes.has(r)?n.push(` ${r}`):n.push(` ${r}="${i}"`))}n.sort((e,t)=>e.length-t.length);let r=l(n.join(``),500);if(this._autoClosingTags.has(t.nodeName))return Gl(`<${t.nodeName.toLowerCase()}${r}/>`);let i=t.childNodes,a=!1;if(i.length<=5){a=!0;for(let e=0;e<i.length;e++)a&&=i[e].nodeType===Node.TEXT_NODE}let o=a?t.textContent||``:i.length?`…`:``;return Gl(`<${t.nodeName.toLowerCase()}${r}>${l(o,50)}</${t.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),As(),Qa();try{let t=this._isUtilityWorld&&this._browserName===`firefox`?2:10;return e.slice(0,t).map(e=>({preview:this.previewNode(e),selector:this.generateSelectorSimple(e)})).map((e,t)=>`${t+1}) ${e.preview} aka ${Gt(this._sdkLanguage,e.selector)}`)}finally{$a(),js(),this._evaluator.end()}}strictModeViolationError(e,t){let n=this._generateSelectors(t).map(e=>`
    `+e);return n.length<t.length&&n.push(`
    ...`),this.createStacklessError(`strict mode violation: ${Gt(this._sdkLanguage,zt(e))} resolved to ${t.length} elements:${n.join(``)}\n`)}checkDeprecatedSelectorUsage(e,t){let n=new Set([`_react`,`_vue`,`xpath:light`,`text:light`,`id:light`,`data-testid:light`,`data-test-id:light`,`data-test:light`]);if(!t.length)return;let r=e.parts.find(e=>n.has(e.name));if(!r)return;let i=this._generateSelectors(t).map(e=>`
    `+e);throw i.length<t.length&&i.push(`
    ...`),this.createStacklessError(`"${r.name}" selector is not supported: ${Gt(this._sdkLanguage,zt(e))} resolved to ${t.length} element${t.length===1?``:`s`}:${i.join(``)}\n`)}createStacklessError(e){let t=this._shouldPrependErrorPrefix?Error(`Error: `+e):Error(e);return this._browserName===`firefox`?(t.stack=``,t):(delete t.stack,t)}createHighlight(){return new rc(this)}addMaskedElements(e,t){this._ensureHighlight().addMaskedElements(e,t)}_ensureHighlight(){return this._highlight||=new rc(this),this._highlight.install(),this._highlight}setHighlights(e){!e.length&&!this._highlight||this._ensureHighlight().setElementHighlights(e)}setScreencastAnnotation(e){let t=this._ensureHighlight();if(t.hideScreencastDecorations(),!e){t.hideActionTitle();return}let n=e.duration??500;e.box&&e.style?.highlight&&t.showScreencastHighlight(e.box,e.style.highlight,n),e.point&&(e.cursor!==`none`&&(e.lastCursorPoint&&t.restoreActionCursor(e.lastCursorPoint.x,e.lastCursorPoint.y),t.moveActionCursor(e.point.x,e.point.y,n)),e.style?.point&&t.showScreencastPoint(e.point.x,e.point.y,e.style.point,n)),e.actionTitle&&t.showActionTitle(e.actionTitle,n,e.position,e.style?.title)}restoreScreencastCursor(e){this._ensureHighlight().restoreActionCursor(e.x,e.y)}hideScreencastCursor(){this._highlight?.hideActionCursor()}addUserOverlay(e,t){this._ensureHighlight().addUserOverlay(e,t)}getUserOverlay(e){return this._ensureHighlight().getUserOverlay(e)}removeUserOverlay(e){this._ensureHighlight().removeUserOverlay(e)}setUserOverlaysVisible(e){this._ensureHighlight().setUserOverlaysVisible(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e){let t=new CustomEvent(`__playwright_reset_targets__`,{bubbles:!0,cancelable:!0,composed:!0});this.document.dispatchEvent(t);let n=new CustomEvent(`__playwright_mark_target__`,{bubbles:!0,cancelable:!0,composed:!0});for(let t of e)t.dispatchEvent(n)}_setupGlobalListenersRemovalDetection(){let e=`__playwright_global_listeners_check__`,t=!1,n=()=>t=!0;this.window.addEventListener(e,n),new MutationObserver(r=>{if(r.some(e=>Array.from(e.addedNodes).includes(this.document.documentElement))&&(t=!1,this.window.dispatchEvent(new CustomEvent(e)),!t)){this.window.addEventListener(e,n);for(let e of this.onGlobalListenersRemoved)e()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){let e=e=>this._hitTargetInterceptor?.(e),t=()=>{for(let t of this._allHitTargetInterceptorEvents)this.window.addEventListener(t,e,{capture:!0,passive:!1})};t(),this.onGlobalListenersRemoved.add(t)}async expect(e,t,n,r){let i=t.expression===`to.have.count`||t.expression.endsWith(`.array`)?this.expectArray(n,t):await this.expectSingleElement(e,t,r),a=i.matches===t.isNot?this._ariaSnapshotForExpect(e,t,r):void 0;return i.received===void 0&&a===void 0?{matches:i.matches}:{matches:i.matches,received:{value:i.received,ariaSnapshot:a}}}_ariaSnapshotForExpect(e,t,n){let r=t.expression;if(!(r===`to.have.count`||r.endsWith(`.array`)||r===`to.match.aria`)){if(n&&Wa(e)&&r!==`to.have.title`&&r!==`to.have.url`){let t=r===`to.have.text`;return this.ariaSnapshotForExpectFailure(e,{mode:`default`,depth:t?void 0:1})}if(this.document.body)return this.ariaSnapshotForExpectFailure(this.document.body,{mode:`default`})}}async expectSingleElement(e,t,n){let r=t.expression;if(r===`to.have.title`){let e=this.document.title;return{received:e,matches:new K(t.expectedText[0]).matches(e)}}if(r===`to.have.url`){let e=this.document.location.href;return{received:e,matches:new K(t.expectedText[0]).matches(e)}}{let i;if(r===`to.have.attribute`){let n=e.hasAttribute(t.expressionArg);i={matches:n,received:n?`attribute present`:`attribute not present`}}else if(r===`to.be.checked`){let{checked:n,indeterminate:r}=t.expectedValue;if(r){if(n!==void 0)throw this.createStacklessError(`Can't assert indeterminate and checked at the same time`);i=this.elementState(e,`indeterminate`)}else i=this.elementState(e,n===!1?`unchecked`:`checked`)}else if(r===`to.be.disabled`)i=this.elementState(e,`disabled`);else if(r===`to.be.editable`)i=this.elementState(e,`editable`);else if(r===`to.be.readonly`)i=this.elementState(e,`editable`),i.matches=!i.matches;else if(r===`to.be.empty`)if(e.nodeName===`INPUT`||e.nodeName===`TEXTAREA`){let t=e.value;i={matches:!t,received:t?`notEmpty`:`empty`}}else{let t=e.textContent?.trim();i={matches:!t,received:t?`notEmpty`:`empty`}}else if(r===`to.be.enabled`)i=this.elementState(e,`enabled`);else if(r===`to.be.focused`){let t=this._activelyFocused(e).isFocused;i={matches:t,received:t?`focused`:`inactive`}}else r===`to.be.hidden`?i=this.elementState(e,`hidden`,n):r===`to.be.visible`?i=this.elementState(e,`visible`,n):r===`to.be.attached`?i={matches:!0,received:`attached`}:r===`to.be.detached`&&(i={matches:!1,received:`attached`});if(i){if(i.received===`error:notconnected`)throw this.createStacklessError(`Element is not connected`);return i}}if(r===`to.have.property`){let n=e,r=t.expressionArg.split(`.`);for(let e=0;e<r.length-1;e++){if(typeof n!=`object`||!(r[e]in n))return{received:void 0,matches:!1};n=n[r[e]]}let i=n[r[r.length-1]];return{received:i,matches:Yl(i,t.expectedValue)}}if(r===`to.be.in.viewport`){let n=await this.viewportRatio(e);return{received:`viewport ratio ${n}`,matches:n>0&&n>(t.expectedNumber??0)-1e-9}}if(r===`to.have.values`){if(e=this.retarget(e,`follow-label`),e.nodeName!==`SELECT`||!e.multiple)throw this.createStacklessError(`Not a select element with a multiple attribute`);let n=[...e.selectedOptions].map(e=>e.value);return n.length===t.expectedText.length?{received:n,matches:n.map((e,n)=>new K(t.expectedText[n]).matches(e)).every(Boolean)}:{received:n,matches:!1}}if(r===`to.match.aria`){let n=Gs(e,t.expectedValue);return{received:n.received,matches:!!n.matches.length}}{let n;if(r===`to.have.attribute.value`){let r=e.getAttribute(t.expressionArg);if(r===null)return{received:null,matches:!1};n=r}else if([`to.have.class`,`to.contain.class`].includes(r)){if(!t.expectedText)throw this.createStacklessError(`Expected text is not provided for `+r);return{received:e.classList.toString(),matches:new K(t.expectedText[0]).matchesClassList(this,e.classList,r===`to.contain.class`)}}else if(r===`to.have.css`)n=this.window.getComputedStyle(e,t.pseudo?`::${t.pseudo}`:void 0).getPropertyValue(t.expressionArg);else if(r===`to.have.id`)n=e.id;else if(r===`to.have.text`)n=t.useInnerText?e.innerText:hc(new Map,e).full;else if(r===`to.have.accessible.name`)n=No(e,!1);else if(r===`to.have.accessible.description`)n=Po(e,!1).text;else if(r===`to.have.accessible.error.message`)n=Ro(e);else if(r===`to.have.role`)n=go(e)||``;else if(r===`to.have.value`){if(e=this.retarget(e,`follow-label`),e.nodeName!==`INPUT`&&e.nodeName!==`TEXTAREA`&&e.nodeName!==`SELECT`)throw this.createStacklessError(`Not an input element`);n=e.value}if(n!==void 0&&t.expectedText){let e=new K(t.expectedText[0]);return{received:n,matches:e.matches(n)}}}throw this.createStacklessError(`Unknown expect matcher: `+r)}expectArray(e,t){let n=t.expression;if(n===`to.have.count`){let n=e.length;return{received:n,matches:n===t.expectedNumber}}if(!t.expectedText)throw this.createStacklessError(`Expected text is not provided for `+n);if([`to.have.class.array`,`to.contain.class.array`].includes(n)){let r=e.map(e=>e.classList),i=r.map(String);return r.length===t.expectedText.length?{received:i,matches:this._matchSequentially(t.expectedText,r,(e,t)=>e.matchesClassList(this,t,n===`to.contain.class.array`))}:{received:i,matches:!1}}if(![`to.contain.text.array`,`to.have.text.array`].includes(n))throw this.createStacklessError(`Unknown expect matcher: `+n);let r=e.map(e=>t.useInnerText?e.innerText:hc(new Map,e).full),i=n!==`to.contain.text.array`;return r.length===t.expectedText.length||!i?{received:r,matches:this._matchSequentially(t.expectedText,r,(e,t)=>e.matches(t))}:{received:r,matches:!1}}_matchSequentially(e,t,n){let r=e.map(e=>new K(e)),i=0,a=0;for(;i<r.length&&a<t.length;)n(r[i],t[a])&&++i,++a;return i===r.length}};function Gl(e){return e.replace(/\n/g,`↵`).replace(/\t/g,`⇆`)}function Kl(e){let{value:t,caseSensitive:n}=e;if(t instanceof RegExp)return e=>(t.lastIndex=0,!!e.match(t));if(n)return e=>e===t;let r=t.toLowerCase();return e=>e.toLowerCase().includes(r)}function ql(e){if(e=e.substring(1,e.length-1),!e.includes(`\\`))return e;let t=[],n=0;for(;n<e.length;)e[n]===`\\`&&n+1<e.length&&n++,t.push(e[n++]);return t.join(``)}function Jl(e,t){if(e[0]===`/`&&e.lastIndexOf(`/`)>0){let t=e.lastIndexOf(`/`),n=new RegExp(e.substring(1,t),e.substring(t+1));return{matcher:e=>(n.lastIndex=0,n.test(e.full)),kind:`regex`}}let n=t?JSON.parse.bind(JSON):ql,r=!1;return e.length>1&&e[0]===`"`&&e[e.length-1]===`"`?(e=n(e),r=!0):t&&e.length>1&&e[0]===`"`&&e[e.length-2]===`"`&&e[e.length-1]===`i`?(e=n(e.substring(0,e.length-1)),r=!1):t&&e.length>1&&e[0]===`"`&&e[e.length-2]===`"`&&e[e.length-1]===`s`?(e=n(e.substring(0,e.length-1)),r=!0):e.length>1&&e[0]===`'`&&e[e.length-1]===`'`&&(e=n(e),r=!0),e=a(e),r?t?{kind:`strict`,matcher:t=>t.normalized===e}:{matcher:t=>!e&&!t.immediate.length?!0:t.immediate.some(t=>a(t)===e),kind:`strict`}:(e=e.toLowerCase(),{kind:`lax`,matcher:t=>t.normalized.toLowerCase().includes(e)})}var K=class{constructor(e){if(this._normalizeWhiteSpace=e.normalizeWhiteSpace,this._ignoreCase=e.ignoreCase,this._string=e.matchSubstring?void 0:this.normalize(e.string),this._substring=e.matchSubstring?this.normalize(e.string):void 0,e.regexSource){let t=new Set((e.regexFlags||``).split(``));e.ignoreCase===!1&&t.delete(`i`),e.ignoreCase===!0&&t.add(`i`),this._regex=new RegExp(e.regexSource,[...t].join(``))}}matches(e){return this._regex||(e=this.normalize(e)),this._string===void 0?this._substring===void 0?this._regex?(this._regex.lastIndex=0,!!this._regex.test(e)):!1:e.includes(this._substring):e===this._string}matchesClassList(e,t,n){if(n){if(this._regex)throw e.createStacklessError(`Partial matching does not support regular expressions. Please provide a string value.`);return this._string.split(/\s+/g).filter(Boolean).every(e=>t.contains(e))}return this.matches(t.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=a(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}};function Yl(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!Yl(e[n],t[n]))return!1;return!0}if(e instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let e=0;e<n.length;++e)if(!t.hasOwnProperty(n[e]))return!1;for(let r of n)if(!Yl(e[r],t[r]))return!1;return!0}return typeof e==`number`&&typeof t==`number`?isNaN(e)&&isNaN(t):!1}var Xl={tagName:`svg`,children:[{tagName:`defs`,children:[{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-gripper`},children:[{tagName:`path`,attrs:{d:`M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-circle-large-filled`},children:[{tagName:`path`,attrs:{d:`M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-stop-circle`},children:[{tagName:`path`,attrs:{d:`M6 6h4v4H6z`}},{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-inspect`},children:[{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-whole-word`},children:[{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M0 11H1V13H15V11H16V14H15H1H0V11Z`}},{tagName:`path`,attrs:{d:`M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z`}},{tagName:`path`,attrs:{d:`M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-eye`},children:[{tagName:`path`,attrs:{d:`M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-symbol-constant`},children:[{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M4 6h8v1H4V6zm8 3H4v1h8V9z`}},{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-check`},children:[{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-close`},children:[{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-pass`},children:[{tagName:`path`,attrs:{d:`M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z`}},{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z`}}]},{tagName:`clipPath`,attrs:{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`currentColor`,id:`icon-gist`},children:[{tagName:`path`,attrs:{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z`}}]}]}]},Zl={multiple:`#f6b26b7f`,single:`#6fa8dc7f`,assert:`#8acae480`,action:`#dc6f6f7f`},Ql=class{},$l=class{constructor(e,t){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=t}cursor(){return`pointer`}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){uu(e),e.button===0&&this._hoveredModel?.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){uu(e)}onPointerUp(e){uu(e)}onMouseDown(e){uu(e)}onMouseUp(e){uu(e)}onMouseMove(e){uu(e);let t=this._recorder.deepEventTarget(e);if(t.isConnected||(t=null),this._hoveredElement===t)return;this._hoveredElement=t;let n=null;if(this._hoveredElement){let e=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});n={selector:e.selector,elements:e.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,e.selector),color:this._assertVisibility?Zl.assert:Zl.single}}this._hoveredModel?.selector!==n?.selector&&(this._hoveredModel=n,this._recorder.updateHighlight(n,!0))}onMouseEnter(e){uu(e)}onMouseLeave(e){uu(e);let t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){uu(e),e.key===`Escape`&&this._assertVisibility&&this._recorder.setMode(`recording`)}onKeyUp(e){uu(e)}onScroll(e){this._reset(!1)}_commit(e,t){this._assertVisibility?(this._recorder.recordAction({name:`assertVisible`,selector:e}),this._recorder.setMode(`recording`),this._recorder.overlay?.flashToolSucceeded(`assertingVisibility`)):this._recorder.elementPicked(e,t)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}},eu=class{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._observer=null,this._recorder=e,this._performingActions=new Set,this._dialog=new au(e)}cursor(){return`pointer`}_installObserverIfNeeded(){this._observer||this._recorder.injectedScript.document?.body&&(this._observer=new MutationObserver(e=>{if(this._hoveredElement)for(let t of e)for(let e of t.removedNodes)(e===this._hoveredElement||e.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){this._observer?.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._dialog.close()}onClick(e){if(this._dialog.isShowing()){e.button===2&&e.type===`auxclick`&&uu(e);return}if(fu(this._hoveredElement)||this._shouldIgnoreMouseEvent(e))return;if(e.button===2&&e.type===`auxclick`){this._performingActions.size||this._showActionListDialog(e);return}if(e.detail===0)return;let t=this._recorder.deepEventTarget(e),n=du(t);if(n&&e.detail===1){this._recordAction({name:n.checked?`check`:`uncheck`,selector:this._hoveredModel?.selector??this._selectorForElement(t)},{autoExpect:!0});return}this._recordAction({name:`click`,selector:this._hoveredModel?.selector??this._selectorForElement(t),position:lu(e),button:cu(e),modifiers:su(e),clickCount:e.detail},{autoExpect:!0})}onContextMenu(e){if(this._dialog.isShowing()){uu(e);return}if(!this._shouldIgnoreMouseEvent(e)){if(this._performingActions.size){let t=this._recorder.deepEventTarget(e);this._recordAction({name:`click`,selector:this._hoveredModel?.selector??this._selectorForElement(t),position:lu(e),button:`right`,modifiers:su(e),clickCount:1},{autoExpect:!0});return}this._showActionListDialog(e)}}onPointerDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeRightButtonEvent(e)}onPointerUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeRightButtonEvent(e)}onMouseDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||(this._consumeRightButtonEvent(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeRightButtonEvent(e)}onMouseMove(e){if(this._dialog.isShowing())return;let t=this._recorder.deepEventTarget(e);this._hoveredElement!==t&&(this._hoveredElement=t,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;let t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(!0)}onInput(e){if(this._dialog.isShowing())return;let t=this._recorder.deepEventTarget(e);if(t.nodeName===`INPUT`&&t.type.toLowerCase()===`file`){let e=t===this._hoveredElement&&this._hoveredModel?this._hoveredModel.selector:this._selectorForElement(t);this._recordAction({name:`setInputFiles`,selector:e,files:[...t.files||[]].map(e=>e.name)});return}if(fu(t)){this._recordAction({name:`fill`,selector:this._hoveredModel?.selector??this._selectorForElement(t),text:t.value});return}if([`INPUT`,`TEXTAREA`].includes(t.nodeName)||t.isContentEditable){if(t.nodeName===`INPUT`&&[`checkbox`,`radio`].includes(t.type.toLowerCase()))return;let n=t.isContentEditable?this._selectorForElement(t,{noText:!0}):this._activeSelectorForEvent(e);this._recordAction({name:`fill`,selector:n,text:t.isContentEditable?t.innerText:t.value})}if(t.nodeName===`SELECT`){let n=t;this._recordAction({name:`select`,selector:this._activeSelectorForEvent(e),options:[...n.selectedOptions].map(e=>e.value)})}}onKeyDown(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(e.key===` `){let t=du(this._recorder.deepEventTarget(e));if(t&&e.detail===0){this._recordAction({name:t.checked?`uncheck`:`check`,selector:this._activeSelectorForEvent(e)},{autoExpect:!0});return}}this._recordAction({name:`press`,selector:this._activeSelectorForEvent(e),key:e.key,modifiers:su(e)},{autoExpect:!0})}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e){uu(e);let t=this._hoveredModel??this._modelForElement(this._recorder.deepEventTarget(e));if(!t)return;let n=lu(e),r=[{title:`Click`,cb:()=>this._performAction({name:`click`,selector:t.selector,position:n,button:`left`,modifiers:0,clickCount:1})},{title:`Right click`,cb:()=>this._performAction({name:`click`,selector:t.selector,position:n,button:`right`,modifiers:0,clickCount:1})},{title:`Double click`,cb:()=>this._performAction({name:`click`,selector:t.selector,position:n,button:`left`,modifiers:0,clickCount:2})},{title:`Hover`,cb:()=>this._recordAction({name:`hover`,selector:t.selector,position:n})},{title:`Pick locator`,cb:()=>this._recorder.elementPicked(t.selector,t)}],i=this._recorder.document.createElement(`x-pw-action-list`);i.setAttribute(`role`,`list`),i.setAttribute(`aria-label`,`Choose action`);for(let e of r){let t=this._recorder.document.createElement(`x-pw-action-item`);t.setAttribute(`role`,`listitem`),t.textContent=e.title,t.setAttribute(`aria-label`,e.title),t.addEventListener(`click`,()=>{this._dialog.close(),e.cb()}),i.appendChild(t)}let a=this._dialog.show({label:`Choose action`,body:i,autosize:!0}),o=this._recorder.highlight.firstTooltipBox()||t.elements[0].getBoundingClientRect(),s=this._recorder.highlight.tooltipPosition(o,a);this._dialog.moveTo(s.anchorTop,s.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){let t=ou(this._recorder.document);if(e&&t===this._recorder.document.body)return;let n=t?this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=n&&n.selector?{...n,color:Zl.action}:null,e&&(this._hoveredElement=t,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){return mu(this._recorder.deepEventTarget(e))}_consumeRightButtonEvent(e){e.button===2&&!this._performingActions.size&&uu(e)}_selectorForElement(e,t){return this._recorder.injectedScript.generateSelector(e,{...t,testIdAttributeName:this._recorder.state.testIdAttributeName}).selector}_modelForElement(e){let{selector:t,elements:n}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return t?{selector:t,elements:n,color:Zl.action}:null}_activeSelectorForEvent(e){let t=this._recorder.deepEventTarget(e);return this._activeModel&&this._activeModel.elements[0]===t?this._activeModel.selector:this._selectorForElement(t)}_reportPerformedActionForTests(){this._recorder.injectedScript.isUnderTest&&console.error(`Action performed for test: `+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))}_recordAction(e,t){this._recorder.recordAction(e,t).then(()=>this._reportPerformedActionForTests())}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e),this._recorder.performAction(e).finally(()=>{this._performingActions.delete(e),this._onFocus(!1)}).then(()=>this._reportPerformedActionForTests())}_shouldGenerateKeyPressFor(e){if(typeof e.key!=`string`||e.key===`Enter`&&(this._recorder.deepEventTarget(e).nodeName===`TEXTAREA`||this._recorder.deepEventTarget(e).isContentEditable)||[`Backspace`,`Delete`,`AltGraph`].includes(e.key)||e.key===`@`&&e.code===`KeyL`)return!1;if(navigator.platform.includes(`Mac`)){if(e.key===`v`&&e.metaKey)return!1}else if(e.key===`v`&&e.ctrlKey||e.key===`Insert`&&e.shiftKey)return!1;if([`Shift`,`Control`,`Meta`,`Alt`,`Process`].includes(e.key))return!1;let t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!!du(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._installObserverIfNeeded(),this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!0);return}let{selector:e,elements:t}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:t,color:Zl.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}},tu=class{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){let t=this._recorder.deepEventTarget(e);if(fu(t)||e.button===2&&e.type===`auxclick`||this._shouldIgnoreMouseEvent(e))return;let n=du(t),{ariaSnapshot:r,selector:i,ref:a}=this._ariaSnapshot(t);if(n&&e.detail===1){this._recorder.recordAction({name:n.checked?`check`:`uncheck`,selector:i,ref:a,ariaSnapshot:r});return}this._recorder.recordAction({name:`click`,selector:i,ref:a,ariaSnapshot:r,position:lu(e),button:cu(e),modifiers:su(e),clickCount:e.detail})}onContextMenu(e){let t=this._recorder.deepEventTarget(e),{ariaSnapshot:n,selector:r,ref:i}=this._ariaSnapshot(t);this._recorder.recordAction({name:`click`,selector:r,ref:i,ariaSnapshot:n,position:lu(e),button:`right`,modifiers:su(e),clickCount:1})}onInput(e){let t=this._recorder.deepEventTarget(e),{ariaSnapshot:n,selector:r,ref:i}=this._ariaSnapshot(t);if(fu(t)){this._recorder.recordAction({name:`fill`,selector:r,ref:i,ariaSnapshot:n,text:t.value});return}if([`INPUT`,`TEXTAREA`].includes(t.nodeName)||t.isContentEditable){if(t.nodeName===`INPUT`&&[`checkbox`,`radio`].includes(t.type.toLowerCase()))return;this._recorder.recordAction({name:`fill`,ref:i,selector:r,ariaSnapshot:n,text:t.isContentEditable?t.innerText:t.value});return}if(t.nodeName===`SELECT`){let e=t;this._recorder.recordAction({name:`select`,selector:r,ref:i,ariaSnapshot:n,options:[...e.selectedOptions].map(e=>e.value)});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;let t=this._recorder.deepEventTarget(e),{ariaSnapshot:n,selector:r,ref:i}=this._ariaSnapshot(t);if(e.key===` `){let a=du(t);if(a&&e.detail===0){this._recorder.recordAction({name:a.checked?`uncheck`:`check`,selector:r,ref:i,ariaSnapshot:n});return}}this._recorder.recordAction({name:`press`,selector:r,ref:i,ariaSnapshot:n,key:e.key,modifiers:su(e)})}_shouldIgnoreMouseEvent(e){return mu(this._recorder.deepEventTarget(e))}_shouldGenerateKeyPressFor(e){if(typeof e.key!=`string`||e.key===`Enter`&&(this._recorder.deepEventTarget(e).nodeName===`TEXTAREA`||this._recorder.deepEventTarget(e).isContentEditable)||[`Backspace`,`Delete`,`AltGraph`].includes(e.key)||e.key===`@`&&e.code===`KeyL`)return!1;if(navigator.platform.includes(`Mac`)){if(e.key===`v`&&e.metaKey)return!1}else if(e.key===`v`&&e.ctrlKey||e.key===`Insert`&&e.shiftKey)return!1;if([`Shift`,`Control`,`Meta`,`Alt`,`Process`].includes(e.key))return!1;let t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName===`TEXTAREA`||e.nodeName===`INPUT`||e.isContentEditable)}_ariaSnapshot(e){let{ariaSnapshot:t,refs:n}=this._recorder.injectedScript.ariaSnapshotForRecorder(),r=e?n.get(e):void 0;return{ariaSnapshot:t,selector:(e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0)?.selector,ref:r}}},nu=class{constructor(e,t){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=t,this._dialog=new au(e)}cursor(){return`pointer`}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){uu(e),this._kind===`value`?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){let t=this._recorder.deepEventTarget(e);this._elementHasValue(t)&&e.preventDefault()}onPointerUp(e){let t=this._hoverHighlight?.elements[0];this._kind===`value`&&t&&(t.nodeName===`INPUT`||t.nodeName===`SELECT`)&&t.disabled&&this._commitAssertValue()}onMouseMove(e){if(this._dialog.isShowing())return;let t=this._recorder.deepEventTarget(e);if(this._hoverHighlight?.elements[0]!==t){if(this._kind===`text`||this._kind===`snapshot`)this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,t).full?{elements:[t],selector:``,color:Zl.assert}:null;else if(this._elementHasValue(t)){let e=this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:e.selector,elements:e.elements,color:Zl.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key===`Escape`&&this._recorder.setMode(`recording`),uu(e)}onScroll(e){this._recorder.updateHighlight(this._hoverHighlight,!1)}_elementHasValue(e){return e.nodeName===`TEXTAREA`||e.nodeName===`SELECT`||e.nodeName===`INPUT`&&![`button`,`image`,`reset`,`submit`].includes(e.type)}_generateAction(){this._textCache.clear();let e=this._hoverHighlight?.elements[0];if(!e)return null;if(this._kind===`value`){if(!this._elementHasValue(e))return null;let{selector:t}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName===`INPUT`&&[`checkbox`,`radio`].includes(e.type.toLowerCase())?{name:`assertChecked`,selector:t,checked:!e.checked}:{name:`assertValue`,selector:t,value:e.value}}else if(this._kind===`snapshot`){let t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:t.selector,elements:t.elements,color:Zl.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:`assertSnapshot`,selector:this._hoverHighlight.selector,ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:`codegen`})}}else{let t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:t.selector,elements:t.elements,color:Zl.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:`assertText`,selector:this._hoverHighlight.selector,text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0}}}_renderValue(e){return e?.name===`assertText`?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):e?.name===`assertChecked`?String(e.checked):e?.name===`assertValue`?e.value:e?.name===`assertSnapshot`?e.ariaSnapshot:``}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode(`recording`))}_showDialog(){this._hoverHighlight?.elements[0]&&(this._action=this._generateAction(),this._action?.name===`assertText`?this._showTextDialog(this._action):this._action?.name===`assertSnapshot`&&(this._recorder.recordAction(this._action),this._recorder.setMode(`recording`),this._recorder.overlay?.flashToolSucceeded(`assertingSnapshot`)))}_showTextDialog(e){let t=this._recorder.document.createElement(`textarea`);t.setAttribute(`spellcheck`,`false`),t.value=this._renderValue(e),t.classList.add(`text-editor`),t.addEventListener(`input`,()=>{let n=this._recorder.injectedScript.utils.normalizeWhiteSpace(t.value),r=this._hoverHighlight?.elements[0];if(!r)return;e.text=n;let i=this._recorder.injectedScript.utils.elementText(this._textCache,r).normalized,a=n&&i.includes(n);t.classList.toggle(`does-not-match`,!a)});let n=this._dialog.show({label:`Assert that element contains text`,body:t,onCommit:()=>this._commit()}),r=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),n);this._dialog.moveTo(r.anchorTop,r.anchorLeft),t.focus()}_commitAssertValue(){if(this._kind!==`value`)return;let e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode(`recording`),this._recorder.overlay?.flashToolSucceeded(`assertingValue`))}},ru=class{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;let t=this._recorder.document;this._overlayElement=t.createElement(`x-pw-overlay`);let n=t.createElement(`x-pw-tools-list`);this._overlayElement.appendChild(n),this._dragHandle=t.createElement(`x-pw-tool-gripper`),this._dragHandle.appendChild(t.createElement(`x-div`)),n.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement(`x-pw-tool-item`),this._recordToggle.title=`Record`,this._recordToggle.classList.add(`record`),this._recordToggle.appendChild(this._recorder.document.createElement(`x-div`)),n.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement(`x-pw-tool-item`),this._pickLocatorToggle.title=`Pick locator`,this._pickLocatorToggle.classList.add(`pick-locator`),this._pickLocatorToggle.appendChild(this._recorder.document.createElement(`x-div`)),n.appendChild(this._pickLocatorToggle),this._assertVisibilityToggle=this._recorder.document.createElement(`x-pw-tool-item`),this._assertVisibilityToggle.title=`Assert visibility`,this._assertVisibilityToggle.classList.add(`visibility`),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement(`x-div`)),n.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement(`x-pw-tool-item`),this._assertTextToggle.title=`Assert text`,this._assertTextToggle.classList.add(`text`),this._assertTextToggle.appendChild(this._recorder.document.createElement(`x-div`)),n.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement(`x-pw-tool-item`),this._assertValuesToggle.title=`Assert value`,this._assertValuesToggle.classList.add(`value`),this._assertValuesToggle.appendChild(this._recorder.document.createElement(`x-div`)),n.appendChild(this._assertValuesToggle),this._assertSnapshotToggle=this._recorder.document.createElement(`x-pw-tool-item`),this._assertSnapshotToggle.title=`Assert snapshot`,this._assertSnapshotToggle.classList.add(`snapshot`),this._assertSnapshotToggle.appendChild(this._recorder.document.createElement(`x-div`)),n.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){hu(this._listeners),this._listeners=[q(this._dragHandle,`mousedown`,e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),q(this._recordToggle,`click`,()=>{this._recordToggle.classList.contains(`disabled`)||this._recorder.setMode(this._recorder.state.mode===`none`||this._recorder.state.mode===`standby`||this._recorder.state.mode===`inspecting`?`recording`:`standby`)}),q(this._pickLocatorToggle,`click`,()=>{this._pickLocatorToggle.classList.contains(`disabled`)||this._recorder.setMode({inspecting:`standby`,none:`inspecting`,standby:`inspecting`,recording:`recording-inspecting`,"recording-inspecting":`recording`,assertingText:`recording-inspecting`,assertingVisibility:`recording-inspecting`,assertingValue:`recording-inspecting`,assertingSnapshot:`recording-inspecting`}[this._recorder.state.mode])}),q(this._assertVisibilityToggle,`click`,()=>{this._assertVisibilityToggle.classList.contains(`disabled`)||this._recorder.setMode(this._recorder.state.mode===`assertingVisibility`?`recording`:`assertingVisibility`)}),q(this._assertTextToggle,`click`,()=>{this._assertTextToggle.classList.contains(`disabled`)||this._recorder.setMode(this._recorder.state.mode===`assertingText`?`recording`:`assertingText`)}),q(this._assertValuesToggle,`click`,()=>{this._assertValuesToggle.classList.contains(`disabled`)||this._recorder.setMode(this._recorder.state.mode===`assertingValue`?`recording`:`assertingValue`)}),q(this._assertSnapshotToggle,`click`,()=>{this._assertSnapshotToggle.classList.contains(`disabled`)||this._recorder.setMode(this._recorder.state.mode===`assertingSnapshot`?`recording`:`assertingSnapshot`)})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition()}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){let t=e.mode===`recording`||e.mode===`assertingText`||e.mode===`assertingVisibility`||e.mode===`assertingValue`||e.mode===`assertingSnapshot`||e.mode===`recording-inspecting`;this._recordToggle.classList.toggle(`toggled`,t),this._recordToggle.title=t?`Stop Recording`:`Start Recording`,this._pickLocatorToggle.classList.toggle(`toggled`,e.mode===`inspecting`||e.mode===`recording-inspecting`),this._assertVisibilityToggle.classList.toggle(`toggled`,e.mode===`assertingVisibility`),this._assertVisibilityToggle.classList.toggle(`disabled`,e.mode===`none`||e.mode===`standby`||e.mode===`inspecting`),this._assertTextToggle.classList.toggle(`toggled`,e.mode===`assertingText`),this._assertTextToggle.classList.toggle(`disabled`,e.mode===`none`||e.mode===`standby`||e.mode===`inspecting`),this._assertValuesToggle.classList.toggle(`toggled`,e.mode===`assertingValue`),this._assertValuesToggle.classList.toggle(`disabled`,e.mode===`none`||e.mode===`standby`||e.mode===`inspecting`),this._assertSnapshotToggle.classList.toggle(`toggled`,e.mode===`assertingSnapshot`),this._assertSnapshotToggle.classList.toggle(`disabled`,e.mode===`none`||e.mode===`standby`||e.mode===`inspecting`),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode===`none`?this._hideOverlay():this._showOverlay()}flashToolSucceeded(e){let t;t=e===`assertingVisibility`?this._assertVisibilityToggle:e===`assertingSnapshot`?this._assertSnapshotToggle:this._assertValuesToggle,t.classList.add(`succeeded`),this._recorder.injectedScript.utils.builtins.setTimeout(()=>t.classList.remove(`succeeded`),2e3)}_hideOverlay(){this._overlayElement.setAttribute(`hidden`,`true`)}_showOverlay(){this._overlayElement.hasAttribute(`hidden`)&&(this._overlayElement.removeAttribute(`hidden`),this._updateVisualPosition())}_updateVisualPosition(){this._measure=this._overlayElement.getBoundingClientRect(),this._overlayElement.style.left=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2+this._offsetX+`px`}onMouseMove(e){if(!e.buttons)return this._dragState=void 0,!1;if(this._dragState){this._offsetX=this._dragState.offsetX+e.clientX-this._dragState.dragStart.x;let t=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-t,Math.min(t,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),uu(e),!0}return!1}onMouseUp(e){return this._dragState?(uu(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,uu(e),!0):!1}onDblClick(e){return!1}},iu=class{constructor(e,t){this._listeners=[],this.state={mode:`none`,testIdAttributeName:`data-testid`,language:`javascript`,overlay:{offsetX:0}},this._delegate={},this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._tools={none:new Ql,standby:new Ql,inspecting:new $l(this,!1),recording:t?.recorderMode===`api`?new tu(this):new eu(this),"recording-inspecting":new $l(this,!1),assertingText:new nu(this,`text`),assertingVisibility:new $l(this,!0),assertingValue:new nu(this,`value`),assertingSnapshot:new nu(this,`snapshot`)},this._currentTool=this._tools.none,this._currentTool.install?.(),e.window.top===e.window&&!t?.hideToolbar&&(this.overlay=new ru(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
      body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
      body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
    `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error(`Recorder script ready for test`),e.consoleApi.install()}installListeners(){hu(this._listeners),this._listeners=[q(this.document,`click`,e=>this._onClick(e),!0),q(this.document,`auxclick`,e=>this._onClick(e),!0),q(this.document,`dblclick`,e=>this._onDblClick(e),!0),q(this.document,`contextmenu`,e=>this._onContextMenu(e),!0),q(this.document,`dragstart`,e=>this._onDragStart(e),!0),q(this.document,`input`,e=>this._onInput(e),!0),q(this.document,`keydown`,e=>this._onKeyDown(e),!0),q(this.document,`keyup`,e=>this._onKeyUp(e),!0),q(this.document,`pointerdown`,e=>this._onPointerDown(e),!0),q(this.document,`pointerup`,e=>this._onPointerUp(e),!0),q(this.document,`mousedown`,e=>this._onMouseDown(e),!0),q(this.document,`mouseup`,e=>this._onMouseUp(e),!0),q(this.document,`mousemove`,e=>this._onMouseMove(e),!0),q(this.document,`mouseleave`,e=>this._onMouseLeave(e),!0),q(this.document,`mouseenter`,e=>this._onMouseEnter(e),!0),q(this.document,`focus`,e=>this._onFocus(e),!0),q(this.document,`scroll`,e=>this._onScroll(e),!0)],this.highlight.install();let e,t=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(t,500)};e=this.injectedScript.utils.builtins.setTimeout(t,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(gu(this.document,Xl)),this.overlay?.install(),this._currentTool?.install?.(),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){let e=this._tools[this.state.mode];if(e===this._currentTool)return;this._currentTool.uninstall?.(),this.clearHighlight(),this._currentTool=e,this._currentTool.install?.();let t=e.cursor?.();t&&this.injectedScript.document.body?.setAttribute(`data-pw-cursor`,t)}setUIState(e,t){this._delegate=t,e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),this.overlay?.setUIState(e)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){e.isTrusted&&(this.overlay?.onClick(e)||this._ignoreOverlayEvent(e)||this._currentTool.onClick?.(e))}_onDblClick(e){e.isTrusted&&(this.overlay?.onDblClick(e)||this._ignoreOverlayEvent(e)||this._currentTool.onDblClick?.(e))}_onContextMenu(e){e.isTrusted&&this._currentTool.onContextMenu?.(e)}_onDragStart(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onDragStart?.(e))}_onPointerDown(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onPointerDown?.(e))}_onPointerUp(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onPointerUp?.(e))}_onMouseDown(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onMouseDown?.(e))}_onMouseUp(e){e.isTrusted&&(this.overlay?.onMouseUp(e)||this._ignoreOverlayEvent(e)||this._currentTool.onMouseUp?.(e))}_onMouseMove(e){e.isTrusted&&(this.overlay?.onMouseMove(e)||this._ignoreOverlayEvent(e)||this._currentTool.onMouseMove?.(e))}_onMouseEnter(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onMouseEnter?.(e))}_onMouseLeave(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onMouseLeave?.(e))}_onFocus(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onFocus?.(e))}_onScroll(e){e.isTrusted&&(this.highlight.hideActionPoint(),this._currentTool.onScroll?.(e))}_onInput(e){this._ignoreOverlayEvent(e)||this._currentTool.onInput?.(e)}_onKeyDown(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onKeyDown?.(e))}_onKeyUp(e){e.isTrusted&&(this._ignoreOverlayEvent(e)||this._currentTool.onKeyUp?.(e))}updateHighlight(e,t){this._updateHighlight(e,t)}_updateHighlight(e,t){let n=e?.tooltipText;n===void 0&&e?.selector&&(n=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(t=>({element:t,color:e.color,tooltipText:n}))):this.highlight.clearHighlight(),t&&this._delegate.highlightUpdated?.()}_ignoreOverlayEvent(e){return e.composedPath().some(e=>(e.nodeName||``).toLowerCase()===`x-pw-glass`)}deepEventTarget(e){for(let t of e.composedPath())if(!this.overlay?.contains(t))return t;return e.composedPath()[0]}setMode(e){this._delegate.setMode?.(e)}_captureAutoExpectSnapshot(){let e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:`autoexpect`}):void 0}_computeAutoExpectPrecondition(e,t){let n=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!t||_u(e)||!this._lastActionAutoexpectSnapshot)return;let r=this.injectedScript.utils.findNewElement(n?.root,this._lastActionAutoexpectSnapshot.root),i=r?this.injectedScript.generateSelector(r,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0;return`selector`in e&&i===e.selector&&(i=void 0),i}async performAction(e){await this._delegate.performAction?.(e).catch(()=>{})}async recordAction(e,t){let n=this._computeAutoExpectPrecondition(e,!!t?.autoExpect);await this._delegate.recordAction?.(e,n)}setOverlayState(e){this._delegate.setOverlayState?.(e)}elementPicked(e,t){let n=this.injectedScript.ariaSnapshot(t.elements[0],{mode:`default`});this._delegate.elementPicked?.({selector:e,ariaSnapshot:n})}},au=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){let t=this._recorder.document.createElement(`x-pw-tool-item`);t.title=`Accept`,t.classList.add(`accept`),t.appendChild(this._recorder.document.createElement(`x-div`)),t.addEventListener(`click`,()=>e.onCommit?.());let n=this._recorder.document.createElement(`x-pw-tool-item`);n.title=`Close`,n.classList.add(`cancel`),n.appendChild(this._recorder.document.createElement(`x-div`)),n.addEventListener(`click`,()=>{this.close(),e.onCancel?.()}),this._dialogElement=this._recorder.document.createElement(`x-pw-dialog`),e.autosize&&this._dialogElement.classList.add(`autosize`),this._keyboardListener=t=>{if(t.key===`Escape`){this.close(),e.onCancel?.();return}if(e.onCommit&&t.key===`Enter`&&(t.ctrlKey||t.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=t=>{this.close(),e.onCancel?.()},this._dialogElement.addEventListener(`click`,e=>e.stopPropagation());let r=this._recorder.document.createElement(`x-pw-tools-list`),i=this._recorder.document.createElement(`label`);i.textContent=e.label,r.appendChild(i),r.appendChild(this._recorder.document.createElement(`x-spacer`)),e.onCommit&&r.appendChild(t),r.appendChild(n),this._dialogElement.appendChild(r);let a=this._recorder.document.createElement(`x-pw-dialog-body`);return a.appendChild(e.body),this._dialogElement.appendChild(a),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener(`keydown`,this._keyboardListener,!0),this._dialogElement}moveTo(e,t){this._dialogElement&&(this._dialogElement.style.top=e+`px`,this._dialogElement.style.left=t+`px`)}close(){this._dialogElement&&=(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener(`keydown`,this._keyboardListener),null)}};function ou(e){let t=e.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function su(e){return!!e.altKey|(e.ctrlKey?2:0)|(e.metaKey?4:0)|(e.shiftKey?8:0)}function cu(e){switch(e.which){case 1:return`left`;case 2:return`middle`;case 3:return`right`}return`left`}function lu(e){if(e.target.nodeName===`CANVAS`)return{x:e.offsetX,y:e.offsetY}}function uu(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}function du(e){if(!e||e.nodeName!==`INPUT`)return null;let t=e;return[`checkbox`,`radio`].includes(t.type)?t:null}function fu(e){return!e||e.nodeName!==`INPUT`?!1:e.type.toLowerCase()===`range`}var pu=new Set([`color`,`date`,`datetime-local`,`file`,`month`,`range`,`time`,`week`]);function mu(e){let t=e.nodeName;return!!(t===`SELECT`||t===`OPTION`||t===`INPUT`&&pu.has(e.type))}function q(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function hu(e){for(let t of e)t();e.splice(0,e.length)}function gu(e,{tagName:t,attrs:n,children:r}){let i=e.createElementNS(`http://www.w3.org/2000/svg`,t);if(n)for(let[e,t]of Object.entries(n))i.setAttribute(e,t);if(r)for(let t of r)i.appendChild(gu(e,t));return i}function _u(e){return e.name.startsWith(`assert`)}var vu=`data:text/html;base64,`+btoa(`<body></body><style>body { color-scheme: light dark; background: light-dark(white, #333) }</style>`),yu=new Map([[`n`,`
`],[`r`,`\r`],[`t`,`	`],[`b`,`\b`],[`f`,`\f`]]),bu=/[A-Za-z_$][\w$]*/y,xu=/-?\d+(\.\d+)?/y,Su=/[a-z]*/y;function Cu(e,t){let n=[],r=0,i=t=>{t.lastIndex=r;let n=t.exec(e)?.[0];return n&&(r+=n.length),n},a=(n,a,o=!1)=>{let s=``,c=!1;for(++r;r<e.length&&(e[r]!==n||c);){if(n==="`"&&e.startsWith("${",r))throw Error(`Template literal placeholders are not supported in ${e}`);if(e[r]!==`\\`){let t=e[r++];o&&(t===`[`?c=!0:t===`]`&&(c=!1)),s+=t;continue}let l=e[r+1]??``;if(r+=2,a){s+=l===n?l:`\\`+l;continue}let u=t.escape(l,i);if(u===void 0)throw Error(`Invalid escape sequence in ${e}`);s+=u}if(r>=e.length)throw Error(`Unterminated ${o?`regular expression`:`string`} in ${e}`);return++r,s},o=()=>{let t=``;for(r+=2;r<e.length;){if(e[r]===`"`&&e[r+1]!==`"`)return++r,t;e[r]===`"`&&++r,t+=e[r++]}throw Error(`Unterminated string in ${e}`)};for(;r<e.length;){let s=e[r],c;if(/\s/.test(s))++r;else if(t.quotes.includes(s))n.push({kind:`string`,value:a(s,!1)});else if(t.rawStrings&&s===`r`&&t.quotes.includes(e[r+1]))n.push({kind:`string`,value:a(e[++r],!0)});else if(t.verbatimStrings&&s===`@`&&e[r+1]===`"`)n.push({kind:`string`,value:o()});else if(t.regexLiterals&&s===`/`){let e=a(`/`,!0,!0);n.push({kind:`regex`,value:new RegExp(e,i(Su))})}else if(`(){}.,:=|`.includes(s))n.push({kind:`punctuation`,value:s}),++r;else if(c=i(bu))n.push({kind:`identifier`,value:c});else if(c=i(xu))n.push({kind:`number`,value:+c});else throw Error(`Unexpected character "${s}" in ${e}`)}return n.push({kind:`end`}),n}function wu(e){let t=parseInt(e??``,16);return Number.isNaN(t)||t>1114111?void 0:String.fromCodePoint(t)}function Tu(e,t){return e===`x`?wu(t(/[\da-f]{2}/iy)):e===`u`?wu(t(/[\da-f]{4}/iy)??t(/\{[\da-f]{1,6}\}/iy)?.slice(1,-1)):yu.get(e)??e}function Eu(e,t){return e===`x`?wu(t(/[\da-f]{2}/iy)):e===`u`?wu(t(/[\da-f]{4}/iy)):e===`U`?wu(t(/[\da-f]{8}/iy)):yu.get(e)??(`\\'"`.includes(e)?e:`\\`+e)}function Du(e,t){return e===`u`?wu(t(/[\da-f]{4}/iy)):yu.get(e)??e}function Ou(e,t){return e===`x`?wu(t(/[\da-f]{1,4}/iy)):e===`u`?wu(t(/[\da-f]{4}/iy)):e===`U`?wu(t(/[\da-f]{8}/iy)):yu.get(e)??e}function ku(e,t,n){return e.kind===t&&e.value===n}var Au=class{constructor(e,t,n){this._pos=0,this._tokens=Cu(e,t),this._methods=t.methods,this._booleans=t.booleans??[`true`,`false`],this._trailingCommas=!!t.trailingCommas,this._testIdAttributeName=n}parse(){let e=this.parseLocator();return this.peek().kind!==`end`&&this.unexpected(),{parts:e.type===`FrameLocator`?td(e,[]):e.parts}}parseLocator(){let e={type:`Page`,parts:[]};do{let t=this.expectIdentifier(),n=this._methods.get(t);if(!n)throw Error(`Unsupported locator method ${t}`);e=n(this.parseArguments(t),e,this._testIdAttributeName)}while(this.eat(`.`));return e}parseArguments(e){let t={method:e,args:[],options:new Map,hasOptions:!1};if(this.eat(`(`)&&!this.eat(`)`)){do this.parseArgument(t);while(this.eat(`,`)&&!(this._trailingCommas&&ku(this.peek(),`punctuation`,`)`)));this.expect(`)`)}return t}addArgument(e,t){if(e.hasOptions)throw Error(`Unexpected argument after options for ${e.method}`);e.args.push(t)}startOptions(e){if(e.hasOptions)throw Error(`Unexpected options for ${e.method}`);e.hasOptions=!0}parseValue(){let e=this.peek();if(e.kind===`string`||e.kind===`number`||e.kind===`regex`)return this.next(),e.value;e.kind!==`identifier`&&this.unexpected();let[t,n]=this._booleans;if(this.eatIdentifier(t))return!0;if(this.eatIdentifier(n))return!1;if(this.eatIdentifier(`AriaRole`))return this.expect(`.`),this.expectIdentifier().toLowerCase();let r=this.parseRegex();if(r)return r;let i=this.parseLocator();if(i.type!==`Locator`)throw Error(`Expected a locator, got ${i.type}`);return{parts:i.parts}}parseOptionsBag(e,t,n){for(this.startOptions(e);!this.eat(`}`);){let r=n(this.expectIdentifier());if(this.expect(t),e.options.set(r,this.parseValue()),!this.eat(`,`)){this.expect(`}`);break}}}parseRegexArguments(e,t,n){this.expect(`(`);let r=this.expectString(),i=``;if(this.eat(`,`)){n&&ku(this.peek(1),`punctuation`,`=`)&&(this.expectIdentifier(n),this.expect(`=`));do{this.expectIdentifier(e),this.expect(`.`);let n=this.expectIdentifier(),r=t.get(n);if(!r)throw Error(`Unsupported regular expression flag ${e}.${n}`);i+=r}while(this.eat(`|`))}return this.expect(`)`),new RegExp(r,i)}peek(e=0){return this._tokens[Math.min(this._pos+e,this._tokens.length-1)]}next(){let e=this.peek();return e.kind!==`end`&&++this._pos,e}eat(e){return ku(this.peek(),`punctuation`,e)?(this.next(),!0):!1}eatIdentifier(e){return ku(this.peek(),`identifier`,e)?(this.next(),!0):!1}expect(e){this.eat(e)||this.unexpected()}expectIdentifier(e){let t=this.peek();return(t.kind!==`identifier`||e!==void 0&&t.value!==e)&&this.unexpected(),this.next(),t.value}expectString(){let e=this.next();return e.kind!==`string`&&this.unexpected(),e.value}unexpected(){let e=this.peek();throw Error(`Unexpected ${e.kind===`end`?`end of input`:`token "${e.value}"`}`)}},ju={javascript:class extends Au{constructor(e,t){super(e,{methods:Qu,quotes:`'"\``,escape:Tu,regexLiterals:!0,trailingCommas:!0},t)}parseArgument(e){this.eat(`{`)?this.parseOptionsBag(e,`:`,e=>e):this.addArgument(e,this.parseValue())}parseRegex(){if(!this.eatIdentifier(`new`))return;this.expectIdentifier(`RegExp`),this.expect(`(`);let e=this.expectString(),t=this.eat(`,`)?this.expectString():``;return this.expect(`)`),new RegExp(e,t)}},python:class extends Au{constructor(e,t){super(e,{methods:$u,quotes:`'"`,escape:Eu,rawStrings:!0,trailingCommas:!0,booleans:[`True`,`False`]},t)}parseArgument(e){if(!ku(this.peek(1),`punctuation`,`=`)){this.addArgument(e,this.parseValue());return}let t=this.expectIdentifier();this.expect(`=`),e.hasOptions=!0,e.options.set(t.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),this.parseValue())}parseRegex(){if(this.eatIdentifier(`re`))return this.expect(`.`),this.expectIdentifier(`compile`),this.parseRegexArguments(`re`,Nu,`flags`)}},java:class extends Au{constructor(e,t){super(e,{methods:Qu,quotes:`"`,escape:Du},t)}parseArgument(e){if(!this.eatIdentifier(`new`)){this.addArgument(e,this.parseValue());return}for(this.startOptions(e),this.expectIdentifier(),this.expect(`.`),this.expectIdentifier(),this.expect(`(`),this.expect(`)`);this.eat(`.`);){let t=this.expectIdentifier();if(!t.startsWith(`set`))throw Error(`Unexpected options method ${t}`);this.expect(`(`),e.options.set(gd(t.substring(3)),this.parseValue()),this.expect(`)`)}}parseRegex(){if(this.eatIdentifier(`Pattern`))return this.expect(`.`),this.expectIdentifier(`compile`),this.parseRegexArguments(`Pattern`,Mu(Zt.java))}},csharp:class extends Au{constructor(e,t){super(e,{methods:ed,quotes:`"`,escape:Ou,verbatimStrings:!0},t)}parseArgument(e){if(!this.eatOptionsType()){this.addArgument(e,this.parseValue());return}this.expect(`{`),this.parseOptionsBag(e,`=`,e=>gd(e.replace(/Regex$/,``)))}eatOptionsType(){if(!ku(this.peek(),`identifier`,`new`))return!1;let e=this.peek(1);return ku(e,`punctuation`,`(`)?(this.next(),this.expect(`(`),this.expect(`)`),!0):e.kind!==`identifier`||!e.value.endsWith(`Options`)?!1:(this.next(),this.next(),this.eat(`(`)&&this.expect(`)`),!0)}parseRegex(){if(this.eatIdentifier(`new`))return this.expectIdentifier(`Regex`),this.parseRegexArguments(`RegexOptions`,Mu(Zt.csharp))}}};function Mu(e){return new Map(Object.entries(e).map(([e,t])=>[t,e]))}var Nu=new Map([...Mu(Zt.python),[`I`,`i`],[`M`,`m`],[`S`,`s`]]),Pu=[`hasText`,`hasNotText`,`has`,`hasNot`],Fu=[...Pu,`visible`],Iu=[`checked`,`disabled`,`selected`,`expanded`,`includeHidden`,`level`,`name`,`description`,`pressed`,`exact`];function J(e,t){return(n,r,i)=>{if(!e.includes(r.type))throw Error(`Unsupported method ${n.method} for ${r.type}`);return t(n,r,i)}}function Lu(e,t){od(e,1,Pu);let n=t.type===`Page`?sd(e,0,ld):sd(e,0,hd),r;return r=ld(n)?It(n).parts:t.type===`FrameLocator`?n.parts:[ad(`internal:chain`,n)],{type:`Locator`,parts:[...td(t,r),...rd(e)]}}function Ru(e,t){return od(e,0,Fu),{type:`Locator`,parts:[...t.parts,...rd(e)]}}function zu(e,t){return od(e,1,[]),{type:`Locator`,parts:[...sd(e,0,md).parts,ad(`internal:chain`,{parts:t.parts})]}}function Bu(e){return(t,n)=>(od(t,1,[]),{type:`Locator`,parts:[...n.parts,ad(e,sd(t,0,md))]})}function Vu(e,t){return od(e,1,[]),t.type===`Page`&&!e.args.length?{type:`FrameLocator`,parts:It(Lt).parts}:{type:`FrameLocator`,parts:td(t,It(sd(e,0,ld)).parts)}}function Hu(e,t){return od(e,0,[]),{type:`FrameLocator`,parts:t.parts}}function Uu(e,t){return od(e,0,[]),{type:`Locator`,parts:t.parts}}function Wu(e,t){return(n,r)=>{if(od(n,e,[]),nd(r))throw Error(`Selecting the nth frame is not allowed on frameLocator()`);return{type:r.type,parts:[...r.parts,id(`nth`,t(n))]}}}function Gu(e,t){return od(e,0,[]),{type:`Locator`,parts:[...t.parts,id(`visible`,`true`)]}}function Ku(e,t){return od(e,1,[]),{type:`Locator`,parts:[...t.parts,id(`internal:describe`,JSON.stringify(sd(e,0,ld)))]}}function Y(e){return(t,n,r)=>({type:`Locator`,parts:td(n,It(e(t,r)).parts)})}function qu(e){return t=>(od(t,1,[`exact`]),e(sd(t,0,ud),{exact:cd(t,`exact`,fd)}))}function Ju(e){return od(e,1,Iu),_a(sd(e,0,ld),{checked:cd(e,`checked`,pd),disabled:cd(e,`disabled`,fd),selected:cd(e,`selected`,fd),expanded:cd(e,`expanded`,fd),includeHidden:cd(e,`includeHidden`,fd),level:cd(e,`level`,dd),name:cd(e,`name`,ud),description:cd(e,`description`,ud),pressed:cd(e,`pressed`,pd),exact:cd(e,`exact`,fd)})}function Yu(e,t){return od(e,1,[]),da(t,sd(e,0,ud))}function Xu(e){return od(e,1,[]),{type:`Locator`,parts:[id(`aria-ref`,sd(e,0,ld))]}}var Zu={locator:J([`Page`,`Locator`,`FrameLocator`],Lu),filter:J([`Locator`],Ru),within:J([`Locator`],zu),and:J([`Locator`],Bu(`internal:and`)),or:J([`Locator`],Bu(`internal:or`)),frameLocator:J([`Page`,`Locator`,`FrameLocator`],Vu),contentFrame:J([`Locator`],Hu),owner:J([`FrameLocator`],Uu),first:J([`Locator`,`FrameLocator`],Wu(0,()=>`0`)),last:J([`Locator`,`FrameLocator`],Wu(0,()=>`-1`)),nth:J([`Locator`,`FrameLocator`],Wu(1,e=>String(sd(e,0,dd)))),visible:J([`Locator`],Gu),describe:J([`Locator`],Ku),getByRole:J([`Page`,`Locator`,`FrameLocator`],Y(Ju)),getByText:J([`Page`,`Locator`,`FrameLocator`],Y(qu(ga))),getByLabel:J([`Page`,`Locator`,`FrameLocator`],Y(qu(fa))),getByTestId:J([`Page`,`Locator`,`FrameLocator`],Y(Yu)),getByRef:J([`Page`],Xu),getByAltText:J([`Page`,`Locator`,`FrameLocator`],Y(qu(pa))),getByPlaceholder:J([`Page`,`Locator`,`FrameLocator`],Y(qu(ha))),getByTitle:J([`Page`,`Locator`,`FrameLocator`],Y(qu(ma)))},Qu=new Map(Object.entries(Zu)),$u=new Map(Object.entries(Zu).map(([e,t])=>[e===`and`||e===`or`?e+`_`:n(e),t])),ed=new Map(Object.entries(Zu).map(([e,t])=>[r(e),t]));function td(e,t){return e.type!==`FrameLocator`||nd(e)?[...e.parts,...t]:[...e.parts,id(`internal:control`,`enter-frame`),...t]}function nd(e){return e.type===`FrameLocator`&&zt({parts:e.parts})===`internal:control=any-frame`}function rd(e){let t=[],n=cd(e,`hasText`,ud);n!==void 0&&t.push(id(`internal:has-text`,i(n,!1)));let r=cd(e,`hasNotText`,ud);r!==void 0&&t.push(id(`internal:has-not-text`,i(r,!1)));let a=cd(e,`has`,md);a&&t.push(ad(`internal:has`,a));let o=cd(e,`hasNot`,md);o&&t.push(ad(`internal:has-not`,o));let s=cd(e,`visible`,fd);return s!==void 0&&t.push(id(`visible`,String(s))),t}function id(e,t){return{name:e,body:t,source:t}}function ad(e,t){return{name:e,body:{parsed:t},source:JSON.stringify(zt(t))}}function od(e,t,n){if(e.args.length>t)throw Error(`Too many arguments for ${e.method}`);for(let t of e.options.keys())if(!n.includes(t))throw Error(`Unsupported option ${t} for ${e.method}`)}function sd(e,t,n){let r=e.args[t];if(r===void 0||!n(r))throw Error(`Unexpected argument #${t} for ${e.method}`);return r}function cd(e,t,n){let r=e.options.get(t);if(r!==void 0&&!n(r))throw Error(`Unexpected ${t} option for ${e.method}`);return r}function ld(e){return typeof e==`string`}function ud(e){return typeof e==`string`||e instanceof RegExp}function dd(e){return typeof e==`number`}function fd(e){return typeof e==`boolean`}function pd(e){return fd(e)||e===`mixed`}function md(e){return typeof e==`object`&&!(e instanceof RegExp)}function hd(e){return ld(e)||md(e)}function gd(e){return e.charAt(0).toLowerCase()+e.substring(1)}function _d(e,t,n=`data-testid`){try{return vd(e,t,n)}catch{return``}}function vd(e,t,n=`data-testid`){try{return It(t),t}catch{}let r=ju[e];return r?zt(new r(t,n).parse()):``}var yd=({url:e})=>(0,M.jsxs)(`div`,{className:`browser-frame-header`,children:[(0,M.jsxs)(`div`,{className:`browser-traffic-lights`,children:[(0,M.jsx)(`span`,{className:`browser-frame-dot`,style:{backgroundColor:`rgb(242, 95, 88)`}}),(0,M.jsx)(`span`,{className:`browser-frame-dot`,style:{backgroundColor:`rgb(251, 190, 60)`}}),(0,M.jsx)(`span`,{className:`browser-frame-dot`,style:{backgroundColor:`rgb(88, 203, 66)`}})]}),(0,M.jsxs)(`div`,{className:`browser-frame-address-bar`,title:e||`about:blank`,children:[(0,M.jsx)(`span`,{className:`browser-frame-address`,children:e||`about:blank`}),e&&(0,M.jsx)(Vn,{value:e})]}),(0,M.jsx)(`div`,{style:{marginLeft:`auto`},children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{className:`browser-frame-menu-bar`}),(0,M.jsx)(`span`,{className:`browser-frame-menu-bar`}),(0,M.jsx)(`span`,{className:`browser-frame-menu-bar`})]})})]}),bd=Symbol.for(`yaml.alias`),xd=Symbol.for(`yaml.document`),X=Symbol.for(`yaml.map`),Sd=Symbol.for(`yaml.pair`),Cd=Symbol.for(`yaml.scalar`),wd=Symbol.for(`yaml.seq`),Td=Symbol.for(`yaml.node.type`),Ed=e=>!!e&&typeof e==`object`&&e[Td]===bd,Dd=e=>!!e&&typeof e==`object`&&e[Td]===xd,Od=e=>!!e&&typeof e==`object`&&e[Td]===X,kd=e=>!!e&&typeof e==`object`&&e[Td]===Sd,Z=e=>!!e&&typeof e==`object`&&e[Td]===Cd,Ad=e=>!!e&&typeof e==`object`&&e[Td]===wd;function jd(e){if(e&&typeof e==`object`)switch(e[Td]){case X:case wd:return!0}return!1}function Md(e){if(e&&typeof e==`object`)switch(e[Td]){case bd:case X:case Cd:case wd:return!0}return!1}var Nd=e=>(Z(e)||jd(e))&&!!e.anchor,Q=Symbol(`break visit`),Pd=Symbol(`skip children`),Fd=Symbol(`remove node`);function Id(e,t){let n=Bd(t);Dd(e)?Ld(null,e.contents,n,Object.freeze([e]))===Fd&&(e.contents=null):Ld(null,e,n,Object.freeze([]))}Id.BREAK=Q,Id.SKIP=Pd,Id.REMOVE=Fd;function Ld(e,t,n,r){let i=Vd(e,t,n,r);if(Md(i)||kd(i))return Hd(e,r,i),Ld(e,i,n,r);if(typeof i!=`symbol`){if(jd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Ld(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Q)return Q;else i===Fd&&(t.items.splice(e,1),--e)}}else if(kd(t)){r=Object.freeze(r.concat(t));let e=Ld(`key`,t.key,n,r);if(e===Q)return Q;e===Fd&&(t.key=null);let i=Ld(`value`,t.value,n,r);if(i===Q)return Q;i===Fd&&(t.value=null)}}return i}async function Rd(e,t){let n=Bd(t);Dd(e)?await zd(null,e.contents,n,Object.freeze([e]))===Fd&&(e.contents=null):await zd(null,e,n,Object.freeze([]))}Rd.BREAK=Q,Rd.SKIP=Pd,Rd.REMOVE=Fd;async function zd(e,t,n,r){let i=await Vd(e,t,n,r);if(Md(i)||kd(i))return Hd(e,r,i),zd(e,i,n,r);if(typeof i!=`symbol`){if(jd(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await zd(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Q)return Q;else i===Fd&&(t.items.splice(e,1),--e)}}else if(kd(t)){r=Object.freeze(r.concat(t));let e=await zd(`key`,t.key,n,r);if(e===Q)return Q;e===Fd&&(t.key=null);let i=await zd(`value`,t.value,n,r);if(i===Q)return Q;i===Fd&&(t.value=null)}}return i}function Bd(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Vd(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Od(t))return n.Map?.(e,t,r);if(Ad(t))return n.Seq?.(e,t,r);if(kd(t))return n.Pair?.(e,t,r);if(Z(t))return n.Scalar?.(e,t,r);if(Ed(t))return n.Alias?.(e,t,r)}function Hd(e,t,n){let r=t[t.length-1];if(jd(r))r.items[e]=n;else if(kd(r))e===`key`?r.key=n:r.value=n;else if(Dd(r))r.contents=n;else{let e=Ed(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var Ud={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Wd=e=>e.replace(/[!,[\]{}]/g,e=>Ud[e]),Gd=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Wd(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Md(e.contents)){let t={};Id(e.contents,(e,n)=>{Md(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
`)}};Gd.defaultYaml={explicit:!1,version:`1.2`},Gd.defaultTags={"!!":`tag:yaml.org,2002:`};function Kd(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function qd(e){let t=new Set;return Id(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Jd(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Yd(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=qd(e);let a=Jd(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(Z(t.node)||jd(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function Xd(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Xd(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Xd(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Xd(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Xd(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function Zd(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Zd(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Nd(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Qd=class{constructor(e){Object.defineProperty(this,Td,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Dd(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=Zd(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Xd(i,{"":o},``,o):o}},$d=class extends Qd{constructor(e){super(bd),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Id(e,{Node:(e,t)=>{(Ed(t)||Nd(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(Zd(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=ef(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Kd(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function ef(e,t,n){if(Ed(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(jd(t)){let r=0;for(let i of t.items){let t=ef(e,i,n);t>r&&(r=t)}return r}else if(kd(t)){let r=ef(e,t.key,n),i=ef(e,t.value,n);return Math.max(r,i)}return 1}var tf=e=>!e||typeof e!=`function`&&typeof e!=`object`,$=class extends Qd{constructor(e){super(Cd),this.value=e}toJSON(e,t){return t?.keep?this.value:Zd(this.value,e,t)}toString(){return String(this.value)}};$.BLOCK_FOLDED=`BLOCK_FOLDED`,$.BLOCK_LITERAL=`BLOCK_LITERAL`,$.PLAIN=`PLAIN`,$.QUOTE_DOUBLE=`QUOTE_DOUBLE`,$.QUOTE_SINGLE=`QUOTE_SINGLE`;var nf=`tag:yaml.org,2002:`;function rf(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function af(e,t,n){if(Dd(e)&&(e=e.contents),Md(e))return e;if(kd(e)){let t=n.schema[X].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??=i(e),new $d(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=nf+t.slice(2));let l=rf(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new $(e);return c&&(c.node=t),t}l=e instanceof Map?o[X]:Symbol.iterator in Object(e)?o[wd]:o[X]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new $(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function of(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return af(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var sf=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,cf=class extends Qd{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Md(t)||kd(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(sf(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(jd(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,of(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(jd(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Z(i)?i.value:i:jd(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!kd(t))return!1;let n=t.value;return n==null||e&&Z(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return jd(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(jd(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,of(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},lf=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function uf(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var df=(e,t,n)=>e.endsWith(`
`)?uf(n,t):n.includes(`
`)?`
`+uf(n,t):(e.endsWith(` `)?``:` `)+n,ff=`flow`,pf=`block`,mf=`quoted`;function hf(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=gf(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
`)n===`block`&&(h=gf(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
`&&p!==`	`){let t=e[h+1];t&&t!==` `&&t!==`
`&&t!==`	`&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===`	`;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function gf(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===`	`;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
`);r=t,i=t+1,a=e[i]}return r}var _f=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),vf=e=>/^(%|---|\.\.\.)/m.test(e);function yf(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function bf(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(vf(e)?`  `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`

`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:hf(o,a,mf,_f(t,!1))}function xf(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
`)||/[ \t]\n|\n[ \t]/.test(e))return bf(e,t);let n=t.indent||(vf(e)?`  `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:hf(r,n,ff,_f(t,!1))}function Sf(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=bf;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?xf:i&&!t?bf:n?xf:bf}return r(e,t)}var Cf;try{Cf=RegExp(`(^|(?<!
))
+(?!
|$)`,`g`)}catch{Cf=/\n+(?!\n|$)/g}function wf({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return Sf(n,r);let l=r.indent||(r.forceBlockIndent||vf(n)?`  `:``),u=o===`literal`?!0:o===`folded`||t===$.BLOCK_FOLDED?!1:t===$.BLOCK_LITERAL?!0:!yf(n,c,l.length);if(!n)return u?`|
`:`>
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
`&&e!==`	`&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
`&&(p=p.slice(0,-1)),p.replace(Cf,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=_f(r,!0);o!==`folded`&&t!==$.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=hf(`${v}${e}${p}`,l,pf,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function Tf(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
`)||u&&/[[\]{},]/.test(a))return Sf(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
`)?Sf(a,t):wf(e,t,n,r);if(!s&&!u&&i!==$.PLAIN&&a.includes(`
`))return wf(e,t,n,r);if(vf(a)){if(c===``)return t.forceBlockIndent=!0,wf(e,t,n,r);if(s&&c===l)return Sf(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return Sf(a,t)}return s?d:hf(d,c,ff,_f(t,!1))}function Ef(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==$.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=$.QUOTE_DOUBLE);let c=e=>{switch(e){case $.BLOCK_FOLDED:case $.BLOCK_LITERAL:return i||a?Sf(o.value,t):wf(o,t,n,r);case $.QUOTE_DOUBLE:return bf(o.value,t);case $.QUOTE_SINGLE:return xf(o.value,t);case $.PLAIN:return Tf(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function Df(e,t){let n=Object.assign({blockQuote:!0,commentString:lf,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):`  `,inFlow:r,options:n}}function Of(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(Z(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function kf(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(Z(e)||jd(e))&&e.anchor;a&&Kd(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Af(e,t,n,r){if(kd(e))return e.toString(t,n,r);if(Ed(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=Md(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Of(t.doc.schema.tags,a);let o=kf(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):Z(a)?Ef(a,t,n,r):a.toString(t,n,r);return o?Z(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function jf({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=Md(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(jd(e)||!Md(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||jd(e)||(Z(e)?e.type===$.BLOCK_FOLDED||e.type===$.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Af(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=df(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=df(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=df(g,n.indent,l(f))));let _,v,y;Md(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&Z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&Ad(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Af(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
`:``,v){let e=l(v);S+=`\n${uf(e,n.indent)}`}x===``&&!n.inFlow?S===`
`&&y&&(S=`

`):S+=`\n${n.indent}`}else if(!p&&jd(t)){let e=x[0],r=x.indexOf(`
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=df(g,n.indent,l(y)):h&&i&&i(),g}function Mf(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var Nf=`<<`,Pf={identify:e=>e===Nf||typeof e==`symbol`&&e.description===Nf,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new $(Symbol(Nf)),{addToJSMap:If}),stringify:()=>Nf},Ff=(e,t)=>(Pf.identify(t)||Z(t)&&(!t.type||t.type===$.PLAIN)&&Pf.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Pf.tag&&e.default);function If(e,t,n){let r=Rf(e,n);if(Ad(r))for(let n of r.items)Lf(e,t,n);else if(Array.isArray(r))for(let n of r)Lf(e,t,n);else Lf(e,t,r)}function Lf(e,t,n){let r=Rf(e,n);if(!Od(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Rf(e,t){return e&&Ed(t)?t.resolve(e.doc,e):t}function zf(e,t,{key:n,value:r}){if(Md(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Ff(e,n))If(e,t,r);else{let i=Zd(n,``,e);if(t instanceof Map)t.set(i,Zd(r,i,e));else if(t instanceof Set)t.add(i);else{let a=Bf(n,i,e),o=Zd(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function Bf(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(Md(e)&&n?.doc){let t=Df(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Mf(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function Vf(e,t,n){return new Hf(af(e,void 0,n),af(t,void 0,n))}var Hf=class e{constructor(e,t=null){Object.defineProperty(this,Td,{value:Sd}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return Md(n)&&(n=n.clone(t)),Md(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return zf(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?jf(this,e,t,n):JSON.stringify(this)}};function Uf(e,t,n){return(t.inFlow??e.flow?Gf:Wf)(e,t,n)}function Wf({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(Md(i))!d&&i.spaceBefore&&f.push(``),Kf(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(kd(i)){let e=Md(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),Kf(n,f,e.commentBefore,d))}d=!1;let s=Af(i,u,()=>o=null,()=>d=!0);o&&(s+=df(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
`}}return e?(p+=`
`+uf(l(e),c),s&&s()):d&&o&&o(),p}function Gf({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(Md(i))i.spaceBefore&&d.push(``),Kf(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(kd(i)){let e=Md(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),Kf(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=Md(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=Af(i,c,()=>a=null);l||=d.length>u||o.includes(`
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=df(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
`;return`${e}\n${i}${p}`}else return`${f}${o}${d.join(` `)}${o}${p}`}function Kf({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=uf(t(r),e);n.push(i.trimStart())}}function qf(e,t){let n=Z(t)?t.value:t;for(let r of e)if(kd(r)&&(r.key===t||r.key===n||Z(r.key)&&r.key.value===n))return r}var Jf=class extends cf{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(X,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(Vf(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=kd(e)?e:!e||typeof e!=`object`||!(`key`in e)?new Hf(e,e?.value):new Hf(e.key,e.value);let r=qf(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);Z(r.value)&&tf(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=qf(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=qf(this.items,e)?.value;return(!t&&Z(n)?n.value:n)??void 0}has(e){return!!qf(this.items,e)}set(e,t){this.add(new Hf(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)zf(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!kd(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Uf(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},Yf={collection:`map`,default:!0,nodeClass:Jf,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Od(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Jf.from(e,t,n)},Xf=class extends cf{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(wd,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Zf(e);return typeof t==`number`?this.items.splice(t,1).length>0:!1}get(e,t){let n=Zf(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&Z(r)?r.value:r}has(e){let t=Zf(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=Zf(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Z(r)&&tf(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(Zd(e,String(r++),t));return n}toString(e,t,n){return e?Uf(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+`  `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(af(a,void 0,n))}}return i}};function Zf(e){let t=Z(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var Qf={collection:`seq`,default:!0,nodeClass:Xf,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Ad(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>Xf.from(e,t,n)},$f={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Ef(e,t,n,r)}},ep={identify:e=>e==null,createNode:()=>new $(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new $(null),stringify:({source:e},t)=>typeof e==`string`&&ep.test.test(e)?e:t.options.nullStr},tp={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new $(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&tp.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function np({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var rp={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:np},ip={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():np(e)}},ap={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new $(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:np},op=e=>typeof e==`bigint`||Number.isInteger(e),sp=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function cp(e,t,n){let{value:r}=e;return op(r)&&r>=0?n+r.toString(t):np(e)}var lp={identify:e=>op(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>sp(e,2,8,n),stringify:e=>cp(e,8,`0o`)},up={identify:op,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>sp(e,0,10,n),stringify:np},dp={identify:e=>op(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>sp(e,2,16,n),stringify:e=>cp(e,16,`0x`)},fp=[Yf,Qf,$f,ep,tp,lp,up,dp,rp,ip,ap];function pp(e){return typeof e==`bigint`||Number.isInteger(e)}var mp=({value:e})=>JSON.stringify(e),hp=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:mp},{identify:e=>e==null,createNode:()=>new $(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:mp},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:mp},{identify:pp,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>pp(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:mp}],gp=[Yf,Qf].concat(hp,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),_p={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}else return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=$.BLOCK_LITERAL,t!==$.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===$.BLOCK_LITERAL?`
`:` `)}return Ef({comment:e,type:t,value:s},r,i,a)}};function vp(e,t){if(Ad(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!kd(r)){if(Od(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new Hf(new $(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=kd(r)?r:new Hf(r)}}else t(`Expected a sequence for this tag`);return e}function yp(e,t,n){let{replacer:r}=n,i=new Xf(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(Vf(o,s,n))}return i}var bp={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:vp,createNode:yp},xp=class e extends Xf{constructor(){super(),this.add=Jf.prototype.add.bind(this),this.delete=Jf.prototype.delete.bind(this),this.get=Jf.prototype.get.bind(this),this.has=Jf.prototype.has.bind(this),this.set=Jf.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(kd(e)?(r=Zd(e.key,``,t),i=Zd(e.value,r,t)):r=Zd(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=yp(e,t,n),i=new this;return i.items=r.items,i}};xp.tag=`tag:yaml.org,2002:omap`;var Sp={collection:`seq`,identify:e=>e instanceof Map,nodeClass:xp,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=vp(e,t),r=[];for(let{key:e}of n.items)Z(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new xp,n)},createNode:(e,t,n)=>xp.from(e,t,n)};function Cp({value:e,source:t},n){return t&&(e?wp:Tp).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var wp={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new $(!0),stringify:Cp},Tp={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new $(!1),stringify:Cp},Ep={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:np},Dp={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():np(e)}},Op={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new $(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:np},kp=e=>typeof e==`bigint`||Number.isInteger(e);function Ap(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function jp(e,t,n){let{value:r}=e;if(kp(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return np(e)}var Mp={identify:kp,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Ap(e,2,2,n),stringify:e=>jp(e,2,`0b`)},Np={identify:kp,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Ap(e,1,8,n),stringify:e=>jp(e,8,`0`)},Pp={identify:kp,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Ap(e,0,10,n),stringify:np},Fp={identify:kp,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Ap(e,2,16,n),stringify:e=>jp(e,16,`0x`)},Ip=class e extends Jf{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=kd(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new Hf(e.key,null):new Hf(e,null),qf(this.items,t.key)||this.items.push(t)}get(e,t){let n=qf(this.items,e);return!t&&kd(n)?Z(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=qf(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Hf(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(Vf(e,null,n));return i}};Ip.tag=`tag:yaml.org,2002:set`;var Lp={collection:`map`,identify:e=>e instanceof Set,nodeClass:Ip,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Ip.from(e,t,n),resolve(e,t){if(Od(e)){if(e.hasAllNullValues(!0))return Object.assign(new Ip,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function Rp(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function zp(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return np(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var Bp={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Rp(e,n),stringify:zp},Vp={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Rp(e,!1),stringify:zp},Hp={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(Hp.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=Rp(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},Up=[Yf,Qf,$f,ep,wp,Tp,Mp,Np,Pp,Fp,Ep,Dp,Op,_p,Pf,Sp,bp,Lp,Bp,Vp,Hp],Wp=new Map([[`core`,fp],[`failsafe`,[Yf,Qf,$f]],[`json`,gp],[`yaml11`,Up],[`yaml-1.1`,Up]]),Gp={binary:_p,bool:tp,float:ap,floatExp:ip,floatNaN:rp,floatTime:Vp,int:up,intHex:dp,intOct:lp,intTime:Bp,map:Yf,merge:Pf,null:ep,omap:Sp,pairs:bp,seq:Qf,set:Lp,timestamp:Hp},Kp={"tag:yaml.org,2002:binary":_p,"tag:yaml.org,2002:merge":Pf,"tag:yaml.org,2002:omap":Sp,"tag:yaml.org,2002:pairs":bp,"tag:yaml.org,2002:set":Lp,"tag:yaml.org,2002:timestamp":Hp};function qp(e,t,n){let r=Wp.get(t);if(r&&!e)return n&&!r.includes(Pf)?r.concat(Pf):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(Wp.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(Pf)),i.reduce((e,t)=>{let n=typeof t==`string`?Gp[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Gp).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var Jp=(e,t)=>e.key<t.key?-1:+(e.key>t.key),Yp=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?qp(e,`compat`):e?qp(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?Kp:{},this.tags=qp(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,X,{value:Yf}),Object.defineProperty(this,Cd,{value:$f}),Object.defineProperty(this,wd,{value:Qf}),this.sortMapEntries=typeof a==`function`?a:a===!0?Jp:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Xp(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=Df(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(uf(t,``))}let o=!1,s=null;if(e.contents){if(Md(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(uf(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=Af(e.contents,i,()=>s=null,t);s&&(c+=df(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Af(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=a(e.comment);t.includes(`
`)?(n.push(`...`),n.push(uf(t,``))):n.push(`... ${t}`)}else n.push(`...`);else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(uf(a(t),``)))}return n.join(`
`)+`
`}var Zp=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Td,{value:xd});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Gd({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Td]:{value:xd}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Md(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){Qp(this.contents)&&this.contents.add(e)}addIn(e,t){Qp(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=qd(this);e.anchor=!t||n.has(t)?Jd(t||`a`,n):t}return new $d(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=Yd(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=af(e,l,p);return o&&jd(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new Hf(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return Qp(this.contents)?this.contents.delete(e):!1}deleteIn(e){return sf(e)?this.contents==null?!1:(this.contents=null,!0):Qp(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return jd(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return sf(e)?!t&&Z(this.contents)?this.contents.value:this.contents:jd(this.contents)?this.contents.getIn(e,t):void 0}has(e){return jd(this.contents)?this.contents.has(e):!1}hasIn(e){return sf(e)?this.contents!==void 0:jd(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=of(this.schema,[e],t):Qp(this.contents)&&this.contents.set(e,t)}setIn(e,t){sf(e)?this.contents=t:this.contents==null?this.contents=of(this.schema,Array.from(e),t):Qp(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new Gd({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new Gd({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Yp(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=Zd(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?Xd(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Xp(this,e)}};function Qp(e){if(jd(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var $p=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},em=class extends $p{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},tm=class extends $p{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},nm=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function rm(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(`	`)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function im(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(im(t.key)||im(t.value))return!0}return!1;default:return!0}}function am(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&im(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function om(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||Z(e)&&Z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var sm=`All mapping items must start at the same column`;function cm({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Jf)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=rm(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,sm)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||im(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,sm);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&am(r.indent,u,i),n.atKey=!1,om(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=rm(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&am(r.indent,f,i),s=c.range[2];let l=new Hf(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
`+_.comment:g.comment=_.comment);let e=new Hf(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function lm({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Xf)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=rm(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&am(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function um(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var dm=`Block collections are not allowed within flow collections`,fm=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function pm({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?Jf:Xf))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=rm(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&im(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];kd(t)&&(t=t.value??t.key),t.comment?t.comment+=`
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],fm(m)&&i(r.range,`BLOCK_IN_FLOW`,dm)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);fm(f)&&i(g.range,`BLOCK_IN_FLOW`,dm),n.atKey=!1;let _=rm(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?fm(m)&&i(v.range,`BLOCK_IN_FLOW`,dm):_.comment&&(g.comment?g.comment+=`
`+_.comment:g.comment=_.comment);let y=new Hf(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;om(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new Jf(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=um(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function mm(e,t,n,r,i,a){let o=n.type===`block-map`?cm(e,t,n,r,a):n.type===`block-seq`?lm(e,t,n,r,a):pm(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function hm(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===Jf.tagName&&s===`map`||o===Xf.tagName&&s===`seq`)return mm(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),mm(e,t,n,i,o)}let l=mm(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=Md(u)?u:new $(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function gm(e,t,n){let r=t.offset,i=_m(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?$.BLOCK_FOLDED:$.BLOCK_LITERAL,o=t.source?vm(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===$.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
`):t.length>c||r[0]===`	`?(f===` `?f=`
`:!p&&f===`
`&&(f=`

`),d+=f+t.slice(c)+r,f=`
`,p=!0):r===``?f===`
`?d+=`
`:f=`
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
`+o[e][0].slice(c);d[d.length-1]!==`
`&&(d+=`
`);break;default:d+=`
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function _m({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function vm(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function ym(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=$.PLAIN,c=bm(a,l);break;case`single-quoted-scalar`:s=$.QUOTE_SINGLE,c=xm(a,l);break;case`double-quoted-scalar`:s=$.QUOTE_DOUBLE,c=Cm(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=um(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function bm(e,t){let n=``;switch(e[0]){case`	`:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`;break}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),Sm(e)}function xm(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),Sm(e.slice(1,-1)).replace(/''/g,`'`)}function Sm(e){let t,n;try{t=RegExp(`(.*?)(?<![ 	])[ 	]*\r?
`,`sy`),n=RegExp(`[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
`?i+=a:a=`
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function Cm(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i===`\r`&&e[r+1]===`
`))if(i===`
`){let{fold:t,offset:i}=wm(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=Tm[i];if(a)n+=a;else if(i===`
`)for(i=e[r+1];i===` `||i===`	`;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
`)for(i=e[++r+1];i===` `||i===`	`;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=Em(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===`	`){let t=r,a=e[r+1];for(;a===` `||a===`	`;)a=e[++r+1];a!==`
`&&!(a===`\r`&&e[r+2]===`
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function wm(e,t){let n=``,r=e[t+1];for(;(r===` `||r===`	`||r===`
`||r===`\r`)&&!(r===`\r`&&e[t+2]!==`
`);)r===`
`&&(n+=`
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var Tm={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
`,r:`\r`,t:`	`,v:`\v`,N:`Â…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`,"	":`	`};function Em(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function Dm(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?gm(e,t,r):ym(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[Cd]:c?Om(e.schema,i,c,n,r):t.type===`scalar`?km(e,i,t,r):e.schema[Cd];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=Z(a)?a:new $(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new $(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function Om(e,t,n,r,i){if(n===`!`)return e[Cd];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)a.push(t);else return t;for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[Cd])}function km({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[Cd];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Cd];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function Am(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var jm={composeNode:Mm,composeEmptyNode:Nm};function Mm(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=Pm(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=Dm(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=hm(jm,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=Nm(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!Z(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function Nm(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=Dm(e,{type:`scalar`,offset:Am(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function Pm({options:e},{offset:t,source:n,end:r},i){let a=new $d(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=um(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function Fm(e,t,{offset:n,start:r,value:i,end:a},o){let s=new Zp(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=rm(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?Mm(c,i,l,o):Nm(c,l.end,r,null,l,o);let u=s.contents.range[2],d=um(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function Im(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function Lm(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`

`:`
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var Rm=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Im(e);r?this.warnings.push(new tm(i,t,n)):this.errors.push(new em(i,t,n))},this.directives=new Gd({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=Lm(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(jd(i)&&!i.flow&&i.items.length>0){let e=i.items[0];kd(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Lm(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=Im(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=Fm(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new em(Im(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new em(Im(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=um(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new em(Im(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new Zp(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}};function zm(e,t=!0,n){if(e){let r=(e,t,r)=>{let i=typeof e==`number`?e:Array.isArray(e)?e[0]:e.offset;if(n)n(i,t,r);else throw new em([i,i+1],t,r)};switch(e.type){case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return ym(e,t,r);case`block-scalar`:return gm({options:{strict:t}},e,r)}}return null}function Bm(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:a=-1,type:o=`PLAIN`}=t,s=Ef({type:o,value:e},{implicitKey:n,indent:r>0?` `.repeat(r):``,inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:`newline`,offset:-1,indent:r,source:`
`}];switch(s[0]){case`|`:case`>`:{let e=s.indexOf(`
`),t=s.substring(0,e),n=s.substring(e+1)+`
`,i=[{type:`block-scalar-header`,offset:a,indent:r,source:t}];return Um(i,c)||i.push({type:`newline`,offset:-1,indent:r,source:`
`}),{type:`block-scalar`,offset:a,indent:r,props:i,source:n}}case`"`:return{type:`double-quoted-scalar`,offset:a,indent:r,source:s,end:c};case`'`:return{type:`single-quoted-scalar`,offset:a,indent:r,source:s,end:c};default:return{type:`scalar`,offset:a,indent:r,source:s,end:c}}}function Vm(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:a=!1,type:o}=n,s=`indent`in e?e.indent:null;if(r&&typeof s==`number`&&(s+=2),!o)switch(e.type){case`single-quoted-scalar`:o=`QUOTE_SINGLE`;break;case`double-quoted-scalar`:o=`QUOTE_DOUBLE`;break;case`block-scalar`:{let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);o=t.source[0]===`>`?`BLOCK_FOLDED`:`BLOCK_LITERAL`;break}default:o=`PLAIN`}let c=Ef({type:o,value:t},{implicitKey:i||s===null,indent:s!==null&&s>0?` `.repeat(s):``,inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case`|`:case`>`:Hm(e,c);break;case`"`:Wm(e,c,`double-quoted-scalar`);break;case`'`:Wm(e,c,`single-quoted-scalar`);break;default:Wm(e,c,`scalar`)}}function Hm(e,t){let n=t.indexOf(`
`),r=t.substring(0,n),i=t.substring(n+1)+`
`;if(e.type===`block-scalar`){let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);t.source=r,e.source=i}else{let{offset:t}=e,n=`indent`in e?e.indent:-1,a=[{type:`block-scalar-header`,offset:t,indent:n,source:r}];Um(a,`end`in e?e.end:void 0)||a.push({type:`newline`,offset:-1,indent:n,source:`
`});for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:`block-scalar`,indent:n,props:a,source:i})}}function Um(e,t){if(t)for(let n of t)switch(n.type){case`space`:case`comment`:e.push(n);break;case`newline`:return e.push(n),!0}return!1}function Wm(e,t,n){switch(e.type){case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:e.type=n,e.source=t;break;case`block-scalar`:{let r=e.props.slice(1),i=t.length;e.props[0].type===`block-scalar-header`&&(i-=e.props[0].source.length);for(let e of r)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case`block-map`:case`block-seq`:{let r={type:`newline`,offset:e.offset+t.length,indent:e.indent,source:`
`};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let r=`indent`in e?e.indent:-1,i=`end`in e&&Array.isArray(e.end)?e.end.filter(e=>e.type===`space`||e.type===`comment`||e.type===`newline`):[];for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}var Gm=e=>`type`in e?Km(e):qm(e);function Km(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=Km(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=qm(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=qm(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=qm(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if(`end`in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function qm({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=Km(t)),n)for(let e of n)i+=e.source;return r&&(i+=Km(r)),i}var Jm=Symbol(`break visit`),Ym=Symbol(`skip children`),Xm=Symbol(`remove item`);function Zm(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Qm(Object.freeze([]),e,t)}Zm.BREAK=Jm,Zm.SKIP=Ym,Zm.REMOVE=Xm,Zm.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},Zm.parentCollection=(e,t)=>{let n=Zm.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function Qm(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=Qm(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===Jm)return Jm;else r===Xm&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}var $m=x({BOM:()=>``,DOCUMENT:()=>``,FLOW_END:()=>``,SCALAR:()=>``,createScalarToken:()=>Bm,isCollection:()=>eh,isScalar:()=>th,prettyToken:()=>nh,resolveAsScalar:()=>zm,setScalarValue:()=>Vm,stringify:()=>Gm,tokenType:()=>rh,visit:()=>Zm}),eh=e=>!!e&&`items`in e,th=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function nh(e){switch(e){case``:return`<BOM>`;case``:return`<DOC>`;case``:return`<FLOW_END>`;case``:return`<SCALAR>`;default:return JSON.stringify(e)}}function rh(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
`:case`\r
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case`	`:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function ih(e){switch(e){case void 0:case` `:case`
`:case`\r`:case`	`:return!0;default:return!1}}var ah=new Set(`0123456789ABCDEFabcdef`),oh=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),sh=new Set(`,[]{}`),ch=new Set(` ,[]{}
\r	`),lh=e=>!e||ch.has(e),uh=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===`	`;)t=this.buffer[++e];return!t||t===`#`||t===`
`?!0:t===`\r`?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
`||!t&&!this.atEnd)return e+n+1}return t===`
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&ih(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===`	`){t=n-1;break}else n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===`	`)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&ih(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ih(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&ih(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(lh),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&ih(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]===`]`||r[0]===`}`)))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(lh),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||ih(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>ih(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===`	`){for(;n===`	`||n===` `||n===`\r`||n===`
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(ih(r)||e&&sh.has(r))break;t=n}else if(ih(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
`?(n+=1,r=`
`,i=this.buffer[n+1]):t=n),i===`#`||e&&sh.has(i))break;if(r===`
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&sh.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(lh),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(ih(n)||t&&sh.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!ih(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(oh.has(t))t=this.buffer[++e];else if(t===`%`&&ah.has(this.buffer[e+1])&&ah.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===`	`);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},dh=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function fh(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function ph(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function mh(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function hh(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function gh(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function _h(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function vh(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!fh(t.start,`explicit-key-ind`)&&!fh(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,mh(t.value)?t.value.end?_h(t.value.end,t.sep):t.value.end=t.sep:_h(t.start,t.sep),delete t.sep)}var yh=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new uh,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=rh(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&vh(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&ph(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:ph(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=gh(hh(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){_h(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(fh(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=gh(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(fh(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(mh(t.key)&&!fh(t.sep,`newline`)){let e=gh(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):fh(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!fh(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){_h(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||fh(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=gh(hh(t));vh(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=gh(hh(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=gh(hh(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function bh(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new dh||null,prettyErrors:t}}function xh(e,t={}){let{lineCounter:n,prettyErrors:r}=bh(t),i=new yh(n?.addNewLine),a=new Rm(t),o=Array.from(a.compose(i.parse(e)));if(r&&n)for(let t of o)t.errors.forEach(nm(e,n)),t.warnings.forEach(nm(e,n));return o.length>0?o:Object.assign([],{empty:!0},a.streamInfo())}function Sh(e,t={}){let{lineCounter:n,prettyErrors:r}=bh(t),i=new yh(n?.addNewLine),a=new Rm(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new em(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(nm(e,n)),o.warnings.forEach(nm(e,n))),o}function Ch(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=Sh(e,n);if(!i)return null;if(i.warnings.forEach(e=>Mf(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function wh(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return Dd(e)&&!r?e.toString(n):new Zp(e,r,n).toString(n)}var Th=x({Alias:()=>$d,CST:()=>$m,Composer:()=>Rm,Document:()=>Zp,Lexer:()=>uh,LineCounter:()=>dh,Pair:()=>Hf,Parser:()=>yh,Scalar:()=>$,Schema:()=>Yp,YAMLError:()=>$p,YAMLMap:()=>Jf,YAMLParseError:()=>em,YAMLSeq:()=>Xf,YAMLWarning:()=>tm,isAlias:()=>Ed,isCollection:()=>jd,isDocument:()=>Dd,isMap:()=>Od,isNode:()=>Md,isPair:()=>kd,isScalar:()=>Z,isSeq:()=>Ad,parse:()=>Ch,parseAllDocuments:()=>xh,parseDocument:()=>Sh,stringify:()=>wh,visit:()=>Id,visitAsync:()=>Rd}),Eh=[.5,1,2];function Dh(e,t,n,r,i){let[a,o]=T.useState(!1),[s,c]=T.useState(1),[l,u]=T.useState(!1),[d,f]=T.useState(void 0),p=Eh[s],m=t?e.indexOf(t):-1,h=i.minimum,g=i.maximum,_=g-h||1,v=r?r.maximum:g,y=T.useMemo(()=>r?e.filter(e=>e.startTime>=r.minimum&&e.startTime<=r.maximum):e,[e,r]),b=y.length?e.indexOf(y[0]):0,x=y.length?e.indexOf(y[y.length-1]):e.length-1,S=T.useRef(e);S.current=e;let C=T.useRef(n);C.current=n;let w=T.useRef(null),ee=T.useCallback(e=>Math.max(b,Math.min(x,e)),[b,x]),te=T.useCallback(t=>{let n=0,r=e.length-1;for(;n<r;){let i=n+r+1>>1;e[i].startTime<=t?n=i:r=i-1}return n},[e]),E=t?t.startTime:h,ne=d??E,re=Math.max(0,Math.min(100,(ne-h)/_*100)),ie=T.useRef(v);ie.current=v,T.useEffect(()=>{if(!a)return;let e,t,n=ne,r=ee(te(n)),i=a=>{if(t!==void 0){let e=(a-t)*p;n=Math.min(n+e,ie.current)}t=a,f(n);let s=ee(te(n));if(s!==r&&(r=s,C.current(S.current[s])),n>=ie.current){o(!1),f(void 0);return}e=requestAnimationFrame(i)};return e=requestAnimationFrame(i),()=>cancelAnimationFrame(e)},[a,p]);let ae=T.useCallback(()=>{if(e.length){if(a){o(!1),f(void 0);return}(m>=x||m<b)&&n(e[b]),o(!0)}},[a,e,m,n,b,x]),oe=T.useCallback(e=>{o(!1),f(void 0),C.current(e)},[]),D=T.useCallback(()=>{o(!1),f(void 0)},[]),O=T.useCallback(()=>{o(!1),f(void 0),e.length&&n(e[b])},[e,n,b]),se=m>b,ce=m<x,le=T.useCallback(()=>{se&&oe(e[m-1])},[e,se,m,oe]),k=T.useCallback(()=>{ce&&oe(e[m+1])},[e,ce,m,oe]),ue=T.useCallback(()=>{c(e=>(e+1)%Eh.length)},[]);T.useEffect(()=>{o(!1),f(void 0)},[e]);let A=T.useCallback((t,n)=>{let r=w.current.getBoundingClientRect(),i=h+Math.max(0,Math.min(1,(t.clientX-r.left)/r.width))*_;f(n?void 0:i);let a=te(i),o=e[a+1];o&&o.startTime-i<i-e[a].startTime&&++a,C.current(e[ee(a)])},[e,h,_,ee,te]),de=T.useRef(null);T.useEffect(()=>()=>de.current?.(),[]);let fe=T.useCallback(t=>{if(!e.length||t.button!==0)return;t.preventDefault(),t.stopPropagation(),w.current?.focus(),u(!0),o(!1),A(t,!1);let n=e=>{A(e,!1)},r=e=>{document.removeEventListener(`mousemove`,n),document.removeEventListener(`mouseup`,r),de.current=null,A(e,!0),u(!1)};document.addEventListener(`mousemove`,n),document.addEventListener(`mouseup`,r),de.current=()=>{document.removeEventListener(`mousemove`,n),document.removeEventListener(`mouseup`,r)}},[e,A]),pe=!a&&!l,me=e.length>0&&e.length<=200?e.map(e=>(e.startTime-h)/_*100):void 0,he=a||m>b;return{playing:a,speed:p,currentIndex:m,percent:re,animating:pe,screencastTime:d,togglePlay:ae,stop:O,prev:le,next:k,cycleSpeed:ue,selectAction:oe,showSelectedAction:D,onScrubberMouseDown:fe,scrubberRef:w,actionsLength:e.length,canPrev:se,canNext:ce,canStop:he,ticks:me}}var Oh=({playback:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(N,{icon:`chevron-left`,title:`Previous action`,onClick:e.prev,disabled:!e.canPrev}),(0,M.jsx)(N,{icon:e.playing?`debug-pause`:`play`,disabled:!e.actionsLength,title:e.playing?`Pause`:`Play`,onClick:e.togglePlay}),(0,M.jsx)(N,{icon:`debug-stop`,title:`Stop`,onClick:e.stop,disabled:!e.canStop}),(0,M.jsx)(N,{icon:`chevron-right`,title:`Next action`,onClick:e.next,disabled:!e.canNext}),(0,M.jsxs)(`button`,{className:`playback-speed`,onClick:e.cycleSpeed,title:`Playback speed`,children:[e.speed,`x`]})]}),kh=({playback:e})=>{let t=T.useCallback(t=>{t.key===`ArrowLeft`?(t.preventDefault(),e.prev()):t.key===`ArrowRight`&&(t.preventDefault(),e.next())},[e]);return(0,M.jsxs)(`div`,{className:`playback-scrubber`,ref:e.scrubberRef,onMouseDown:e.onScrubberMouseDown,onKeyDown:t,tabIndex:0,role:`slider`,"aria-label":`Playback position`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.percent),children:[(0,M.jsx)(`div`,{className:`playback-track`}),(0,M.jsx)(`div`,{className:`playback-track-filled`+(e.animating?` animated`:``),style:{width:`${e.percent}%`}}),e.ticks?.map((e,t)=>(0,M.jsx)(`div`,{className:`playback-tick`,style:{left:`${e}%`}},t)),(0,M.jsx)(`div`,{className:`playback-thumb`+(e.animating?` animated`:``),style:{left:`${e.percent}%`}})]})};function Ah(e){return!!e?.hasDomSnapshots&&!!e?.hasAriaSnapshots}function jh(e,t){return Ah(e)?t:!!e?.hasAriaSnapshots}function Mh(e,t){if(!t)return{};let n=(t,n)=>!!e.screenshotForCall(t,n)||!!e.ariaSnapshotForCall(t,n),r=n(t.callId,`before`)?{callId:t.callId,phase:`before`}:void 0;if(!r){for(let e=gn(t);e;e=gn(e))if(e.endTime<=t.startTime&&n(e.callId,`after`)){r={callId:e.callId,phase:`after`};break}}let i=n(t.callId,`after`)?{callId:t.callId,phase:`after`}:void 0;if(!i){let e;for(let r=_n(t);r&&r.startTime<=t.endTime;r=_n(r))r.endTime>t.endTime||!n(r.callId,`after`)||e&&e.endTime>r.endTime||(e=r);i=e?{callId:e.callId,phase:`after`}:r}return{action:n(t.callId,`action`)?{callId:t.callId,phase:`action`}:i,before:r,after:i}}function Nh(e){let t=new Map,n=(e,r)=>{if(typeof e==`string`)return;e.box&&t.set(e,{...e.box,x:e.box.x+r.x,y:e.box.y+r.y});let i=e.role===`iframe`&&e.box?{x:r.x+e.box.x,y:r.y+e.box.y}:r;for(let t of e.children||[])n(t,i);delete e.box};for(let t of e)n(t,{x:0,y:0});let r=new Map;return ia(e,{lineToNode:r}).split(`
`).map((e,n)=>{let i=r.get(n);return{text:e,box:i?t.get(i):void 0}})}var Ph=/("(?:[^"\\]|\\.)*")|(\/(?:[^/\\]|\\.)*\/)|(\[[^\]]*\])/g;function Fh(e){let t=[],n=e.match(/^(\s*- )([\w-]+)/),r=0;n&&(t.push(n[1]),t.push((0,M.jsx)(`span`,{className:`aria-mode-role`,children:n[2]},`role`)),r=n[0].length);let i=e.substring(r),a=0,o=0;for(let e of i.matchAll(Ph))e.index>a&&t.push(i.substring(a,e.index)),t.push((0,M.jsx)(`span`,{className:e[3]?`aria-mode-attribute`:`aria-mode-string`,children:e[0]},++o)),a=e.index+e[0].length;return a<i.length&&t.push(i.substring(a)),t}var Ih=({model:e,target:t,point:n,box:r,screencastFrame:i})=>{let a=e&&t?e.screenshotForCall(t.callId,t.phase):void 0,o=e&&t?e.ariaSnapshotForCall(t.callId,t.phase):void 0,[s,c]=T.useState([]),[l,u]=T.useState();return T.useEffect(()=>{if(u(void 0),!e||!o){c([]);return}let t=!1;return fetch(e.createRelativeUrl(`file/${o.file}`)).then(e=>e.json()).then(e=>{t||c(Nh(e))}).catch(()=>{t||c([])}),()=>{t=!0}},[e,o]),!a&&!o&&!i?(0,M.jsx)(Un,{text:`No aria snapshot`}):(0,M.jsxs)(`div`,{className:`aria-mode-view hbox`,children:[(0,M.jsx)(Lh,{imageUrl:e&&a?e.createRelativeUrl(`file/${a.file}`):void 0,screencastFrame:i,highlightedBox:i?void 0:l,point:i?void 0:n,box:i?void 0:r}),(0,M.jsxs)(`div`,{className:`aria-mode-snapshot vbox`,children:[o&&(0,M.jsx)(`div`,{className:`aria-mode-lines`,onMouseLeave:()=>u(void 0),children:s.map((e,t)=>(0,M.jsx)(`div`,{className:k(`aria-mode-line`,e.box&&`aria-mode-line-hoverable`),onMouseEnter:()=>u(e.box),children:Fh(e.text)},t))}),!o&&(0,M.jsx)(Un,{text:`No aria snapshot`})]})]})},Lh=({imageUrl:e,screencastFrame:t,highlightedBox:n,point:r,box:i})=>{let[a,o]=E(),[s,c]=T.useState(),l;if(e&&s&&a.width){let e=a.width-20,t=a.height-20,o=Math.min(e/s.width,t/s.height,1),c=10+(e-s.width*o)/2,u=10+(t-s.height*o)/2,d=e=>({left:c+e.x*o+`px`,top:u+e.y*o+`px`,width:e.width*o+`px`,height:e.height*o+`px`});l=(0,M.jsxs)(M.Fragment,{children:[i&&(0,M.jsx)(`div`,{className:`aria-mode-action-highlight`,style:d(i)}),r&&(0,M.jsx)(`div`,{className:`aria-mode-action-point`,style:(e=>({left:c+e.x*o+`px`,top:u+e.y*o+`px`,width:20*o+`px`,height:20*o+`px`}))(r)}),n&&(0,M.jsx)(`div`,{className:`aria-mode-highlight`,style:d(n)})]})}return(0,M.jsxs)(`div`,{ref:o,className:`aria-mode-screenshot`,children:[t,!t&&e&&(0,M.jsx)(`img`,{src:e,alt:`Screenshot`,onLoad:e=>c({width:e.currentTarget.naturalWidth,height:e.currentTarget.naturalHeight})}),!t&&!e&&(0,M.jsx)(Un,{text:`No screenshot`}),l]})},Rh=new Map,zh=120,Bh=2;function Vh(e){let[,t]=T.useState(0),n=e.map(({video:e,url:t})=>Hh(e,t)),r=e.map(({url:e})=>e).join(`
`);return T.useEffect(()=>{let e=()=>t(e=>e+1),n=r?r.split(`
`).map(e=>Rh.get(e)):[];for(let t of n)t.listeners.add(e);return()=>{for(let t of n)t.listeners.delete(e)}},[r]),n}function Hh(e,t){let n=Rh.get(t);return n||(n={url:void 0,thumbnails:[],listeners:new Set,started:!1},Rh.set(t,n)),n.started||(n.started=!0,Uh(n,e,t).catch(()=>{})),n}async function Uh(e,t,n){let r=await(await fetch(n)).blob(),i=URL.createObjectURL(r);e.url=i;for(let t of e.listeners)t();let a=document.createElement(`video`);a.muted=!0,a.preload=`auto`,a.src=i;try{await new Promise((e,t)=>{a.addEventListener(`loadedmetadata`,()=>e(),{once:!0}),a.addEventListener(`error`,()=>t(Error(`video failed to load`)),{once:!0})});let n=a.duration;if((!isFinite(n)||n<=0)&&(a.currentTime=2**53-1,await new Promise(e=>a.addEventListener(`seeked`,()=>e(),{once:!0})),n=a.duration,!isFinite(n)||n<=0))return;let r=a.videoWidth||t.width,i=a.videoHeight||t.height,o=document.createElement(`canvas`);o.width=r,o.height=i;let s=o.getContext(`2d`);if(!s)return;let c=Math.max(1,Math.min(zh,Math.ceil(n*Bh))),l=n/c;for(let u=0;u<=c;++u){let c=Math.min(u*l,Math.max(0,n-.001));await Wh(a,c),s.drawImage(a,0,0,r,i);let d=await new Promise(e=>o.toBlob(e,`image/jpeg`,.8));if(d){e.thumbnails.push({timestamp:t.timestamp+c*1e3,url:URL.createObjectURL(d),width:r,height:i});for(let t of e.listeners)t()}}}finally{a.removeAttribute(`src`),a.load()}}async function Wh(e,t){Math.abs(e.currentTime-t)<.001&&e.readyState>=2||await new Promise(n=>{e.addEventListener(`seeked`,()=>n(),{once:!0}),e.currentTime=t})}var Gh=.25;function Kh(e,t){let n=-1;return e.forEach((r,i)=>{r.timestamp<=t&&(n===-1||r.timestamp>e[n].timestamp)&&(n=i)}),n}var qh=({url:e,startTime:t,time:n,playing:r,speed:i,className:a,width:o,height:s})=>{let c=T.useRef(null),l=Math.max(0,(n-t)/1e3),u=T.useRef(l);return u.current=l,T.useEffect(()=>{let e=c.current;if(e){if(!r){e.pause(),Math.abs(e.currentTime-l)>.001&&(e.currentTime=l);return}e.playbackRate=i??1,Math.abs(e.currentTime-l)>Gh&&(e.currentTime=l),e.paused&&e.play().catch(()=>{})}},[e,l,r,i]),(0,M.jsx)(`video`,{ref:c,className:a,src:e,width:o,height:s,muted:!0,playsInline:!0,preload:`auto`,onLoadedMetadata:e=>e.currentTarget.currentTime=u.current})},Jh=({action:e,model:t,sdkLanguage:n,testIdAttributeName:r,isInspecting:i,setIsInspecting:a,highlightedElement:o,setHighlightedElement:s,screencastTime:c,playback:l})=>{let[u,d]=T.useState(`action`),[f]=ae(`shouldPopulateCanvasFromScreenshot`,!1),[p]=ae(`displayAriaMode`,!1),m=jh(t,p),h=og(t,c,l.playing,l.speed),g=T.useMemo(()=>tg(t,e),[t,e]),_=T.useMemo(()=>t&&m?Mh(t,e):{},[t,e,m]);T.useEffect(()=>{m&&i&&a(!1)},[m,i,a]);let{snapshotInfoUrl:v,snapshotUrl:y,popoutUrl:b}=T.useMemo(()=>{let e=g[u];return t&&e?rg(t.traceUri,e,f):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[g,u,f,t]),x=T.useMemo(()=>v===void 0?void 0:{snapshotInfoUrl:v,snapshotUrl:y,popoutUrl:b},[v,y,b]);return(0,M.jsxs)(`div`,{className:`snapshot-tab vbox`,children:[(0,M.jsxs)(Kr,{children:[(0,M.jsx)(N,{className:`pick-locator`,title:`Pick locator`,icon:`target`,disabled:m,toggled:i,onClick:()=>a(!i)}),(0,M.jsx)(`div`,{className:`hbox`,style:{height:`100%`},role:`tablist`,children:[`action`,`before`,`after`].map(e=>(0,M.jsx)(Jr,{id:e,title:Zh(e),selected:u===e,onSelect:()=>d(e)},e))}),(0,M.jsx)(`div`,{style:{flex:`auto`}}),(0,M.jsx)(Oh,{playback:l}),(0,M.jsx)(N,{icon:`link-external`,title:`Open snapshot in a new tab`,disabled:m||!x?.popoutUrl,onClick:()=>{let e=window.open(x?.popoutUrl||``,`_blank`);e?.addEventListener(`DOMContentLoaded`,()=>{new Wl(e,{isUnderTest:ng,frameSeq:0,sdkLanguage:n,testIdAttributeName:r,stableRafCount:1,browserName:`chromium`,customEngines:[]}).consoleApi.install()})}})]}),m&&(0,M.jsx)(Ih,{model:t,target:_[u],point:u===`action`?e?.point:void 0,box:u===`action`?e?.box:void 0,screencastFrame:h}),!m&&(0,M.jsx)(Yh,{snapshotUrls:x,sdkLanguage:n,testIdAttributeName:r,isInspecting:i,setIsInspecting:a,highlightedElement:o,setHighlightedElement:s,screencastFrame:h})]})},Yh=({snapshotUrls:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedElement:a,setHighlightedElement:o,screencastFrame:s})=>{let c=T.useRef(null),l=T.useRef(null),[u,d]=T.useState({viewport:ag,url:``}),f=T.useRef({iteration:0,visibleIframe:0});return T.useEffect(()=>{(async()=>{let t=f.current.iteration+1,n=1-f.current.visibleIframe;f.current.iteration=t;let r=await ig(e?.snapshotInfoUrl);if(f.current.iteration!==t)return;let i=s?void 0:[c,l][n].current;if(i){let t=()=>{},n=new Promise(e=>t=e);try{i.addEventListener(`load`,t),i.addEventListener(`error`,t);let r=e?.snapshotUrl||vu;i.contentWindow?i.contentWindow.location.replace(r):i.src=r,await n}catch{}finally{i.removeEventListener(`load`,t),i.removeEventListener(`error`,t)}}f.current.iteration===t&&(i&&(f.current.visibleIframe=n),d(r))})()},[e,s]),(0,M.jsxs)(`div`,{className:`vbox`,tabIndex:0,onKeyDown:e=>{e.key===`Escape`&&r&&i(!1)},children:[(0,M.jsx)(Qh,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedElement:a,setHighlightedElement:o,iframe:c.current,iteration:f.current.iteration}),(0,M.jsx)(Qh,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedElement:a,setHighlightedElement:o,iframe:l.current,iteration:f.current.iteration}),(0,M.jsx)(Xh,{snapshotInfo:u,children:(0,M.jsxs)(`div`,{className:`snapshot-switcher`,children:[(0,M.jsx)(`iframe`,{ref:c,name:`snapshot`,title:`DOM Snapshot`,sandbox:`allow-same-origin allow-scripts`,className:k(f.current.visibleIframe===0&&`snapshot-visible`)}),(0,M.jsx)(`iframe`,{ref:l,name:`snapshot`,title:`DOM Snapshot`,sandbox:`allow-same-origin allow-scripts`,className:k(f.current.visibleIframe===1&&`snapshot-visible`)}),s]})})]})},Xh=({snapshotInfo:e,children:t})=>{let[n,r]=E(),i={width:e.viewport.width,height:e.viewport.height},a={width:Math.max(i.width,320),height:Math.max(i.height+40,320)},o=n.width-20,s=n.height-20,c=Math.min(o/a.width,s/a.height,1),l={x:(n.width-a.width)/2-10,y:(n.height-a.height)/2-10};return(0,M.jsx)(`div`,{ref:r,className:`snapshot-wrapper`,children:(0,M.jsxs)(`div`,{className:`snapshot-container`,style:{width:a.width+`px`,height:a.height+`px`,transform:`translate(${l.x}px, ${l.y}px) scale(${c})`},children:[(0,M.jsx)(yd,{url:e.url}),(0,M.jsx)(`div`,{className:`snapshot-browser-body`,children:(0,M.jsx)(`div`,{style:{width:i.width+`px`,height:i.height+`px`},children:t})})]})})};function Zh(e){return e===`before`?`Before`:e===`after`?`After`:e===`action`?`Action`:e}var Qh=({iframe:e,isInspecting:t,sdkLanguage:n,testIdAttributeName:r,highlightedElement:i,setHighlightedElement:a,iteration:o})=>(T.useEffect(()=>{let o=i.lastEdited===`ariaSnapshot`?i.ariaSnapshot:void 0,s=i.lastEdited===`locator`?i.locator:void 0,c=!!o||!!s||t,l=[],u=new URLSearchParams(window.location.search).get(`isUnderTest`)===`true`;try{$h(l,c,n,r,u,``,e?.contentWindow)}catch{}let d=o?Ji(Th,o):void 0,f=s?_d(n,s,r):void 0;for(let{recorder:e,frameSelector:i}of l){let o=f?.startsWith(i)?f.substring(i.length).trim():void 0,s=d?.errors.length===0?d.fragment:void 0;try{let t=o||(s?`aria-template=`+JSON.stringify(s):void 0);t?e.injectedScript.setHighlights([{selector:e.injectedScript.parseSelector(t)}]):e.injectedScript.setHighlights([])}catch{e.injectedScript.setHighlights([])}e.setUIState({mode:t?`inspecting`:`none`,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(e){a({locator:Gt(n,i+e.selector),ariaSnapshot:e.ariaSnapshot,lastEdited:`none`})},highlightUpdated(){for(let t of l)t.recorder!==e&&t.recorder.clearHighlight()}})}},[e,t,i,a,n,r,o]),(0,M.jsx)(M.Fragment,{}));function $h(e,t,n,r,i,a,o){if(!o)return;let s=o;if(!s._recorder&&t){let e=new Wl(o,{isUnderTest:i,frameSeq:0,sdkLanguage:n,testIdAttributeName:r,stableRafCount:1,browserName:`chromium`,customEngines:[]}),t=new iu(e);s._injectedScript=e,s._recorder={recorder:t,frameSelector:a},i&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(t)))}s._recorder&&e.push(s._recorder);for(let c=0;c<o.frames.length;++c){let l=o.frames[c];$h(e,t,n,r,i,a+(l.frameElement?s._injectedScript.generateSelectorSimple(l.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+` >> internal:control=enter-frame >> `:``),l)}}var eg=(e,t,n)=>{if(!(!t||!e.hasDomSnapshotForCall(t.callId,n)))return{action:t,phase:n,point:t.point}};function tg(e,t){if(!e||!t)return{};let n=(t,n)=>e.hasDomSnapshotForCall(t,n),r=eg(e,t,`before`);if(!r){for(let i=gn(t);i;i=gn(i))if(i.endTime<=t.startTime&&n(i.callId,`after`)){r=eg(e,i,`after`);break}}let i=eg(e,t,`after`);if(!i){let a;for(let e=_n(t);e&&e.startTime<=t.endTime;e=_n(e))e.endTime>t.endTime||!n(e.callId,`after`)||a&&a.endTime>e.endTime||(a=e);i=a?eg(e,a,`after`):r}let a=eg(e,t,`action`)??i;return a&&(a.point=t.point),{action:a,before:r,after:i}}var ng=new URLSearchParams(window.location.search).has(`isUnderTest`);function rg(e,t,n){let r=new URLSearchParams;r.set(`trace`,e),ng&&r.set(`isUnderTest`,`true`),t.point&&(r.set(`pointX`,String(t.point.x)),r.set(`pointY`,String(t.point.y))),n&&r.set(`shouldPopulateCanvasFromScreenshot`,`1`),r.set(`phase`,t.phase);let i=encodeURIComponent(t.action.callId),a=new URL(`snapshot/${i}?${r.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${i}?${r.toString()}`,window.location.href).toString(),s=new URLSearchParams;return s.set(`r`,a),s.set(`trace`,e),{snapshotInfoUrl:o,snapshotUrl:a,popoutUrl:new URL(`snapshot.html?${s.toString()}`,window.location.href).toString()}}async function ig(e){let t={url:``,viewport:ag,timestamp:void 0,wallTime:void 0};if(e){let n=await(await fetch(e)).json();n.error||(t.url=n.url,t.viewport=n.viewport,t.timestamp=n.timestamp,t.wallTime=n.wallTime)}return t}var ag={width:1280,height:720};function og(e,t,n,r){let i=e&&t!==void 0?e.videos.map(t=>({video:t,url:e.createRelativeUrl(`file/${t.file}`)})):[],a=Vh(i);if(!e||t===void 0)return;let o;for(let n of e.pages){let e=n.screencastFrames[re(n.screencastFrames,t,(e,t)=>e-t.timestamp)-1];e&&(!o||e.timestamp>o.timestamp)&&(o=e)}if(o)return(0,M.jsx)(`img`,{className:`screencast-frame`,src:e.createRelativeUrl(`file/${o.file}`),alt:`Screencast frame`});let s=Kh(i.map(({video:e})=>e),t),c=a[s]?.url;if(c)return(0,M.jsx)(qh,{className:`screencast-frame`,url:c,startTime:i[s].video.timestamp,time:t,playing:n,speed:r})}var sg=Xn,cg=({stack:e,setSelectedFrame:t,selectedFrame:n})=>{let r=e||[];return(0,M.jsx)(sg,{name:`stack-trace`,ariaLabel:`Stack trace`,items:r,selectedItem:r[n],render:e=>{let t=e.file[1]===`:`?`\\`:`/`;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`stack-trace-frame-function`,children:e.function||`(anonymous)`}),(0,M.jsx)(`span`,{className:`stack-trace-frame-location`,children:e.file.split(t).pop()}),(0,M.jsx)(`span`,{className:`stack-trace-frame-line`,children:`:`+e.line})]})},onSelected:e=>t(r.indexOf(e))})};function lg(e){let t=e.substring(Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`))+1),n=t.lastIndexOf(`.`);return n<=0?``:t.substring(n)}function ug(e,t,n,r,i){let a=Mn();return te(async()=>{let o=e?.[t],s=o?.file?o:i;if(!s)return{source:{file:``,errors:[],content:void 0},targetLine:0,highlight:[]};let c=s.file,l=n.get(c);l||(l={errors:i?.source?.errors||[],content:i?.source?.content},n.set(c,l));let u=s?.line||l.errors[0]?.line||0,d=r&&c.startsWith(r)?c.substring(r.length+1):c,f=l.errors.map(e=>({type:`error`,line:e.line,message:e.message}));if(f.push({line:u,type:`running`}),i?.source?.content!==void 0)l.content=i.source.content;else if(l.content===void 0||s===i){let e=await fg(c);try{let t=a?await fetch(a.createRelativeUrl(`file/src/${e}${lg(c)}`)):void 0;(!t||t.status===404)&&(t=a?await fetch(a.createRelativeUrl(`file/resources/src@${e}.txt`)):void 0),(!t||t.status===404)&&(t=await fetch(`file?path=${encodeURIComponent(c)}`)),t.status>=400?l.content=``:l.content=await t.text()}catch{l.content=`<Unable to read "${c}">`}}return{model:a,source:l,highlight:f,targetLine:u,fileName:d,location:s}},[e,t,r,i],{source:{errors:[],content:`Loading…`},highlight:[]})}var dg=({stack:e,sources:t,rootDir:n,fallbackLocation:r,stackFrameLocation:i,onOpenExternally:a})=>{let[o,s]=T.useState(),[c,l]=T.useState(0);T.useEffect(()=>{o!==e&&(s(e),l(0))},[e,o,s,l]);let{source:u,highlight:d,targetLine:f,fileName:p,location:m}=ug(e,c,t,n,r),h=T.useCallback(()=>{m&&(a?a(m):window.location.href=`vscode://file//${m.file}:${m.line}`)},[a,m]),g=(e?.length??0)>1,_=pg(p),v=_.endsWith(`.md`)?`markdown`:`javascript`;return(0,M.jsx)(Cn,{sidebarSize:200,orientation:i===`bottom`?`vertical`:`horizontal`,sidebarHidden:!g,main:(0,M.jsxs)(`div`,{className:`vbox`,"data-testid":`source-code`,children:[p&&(0,M.jsxs)(Kr,{children:[(0,M.jsx)(`div`,{className:`source-tab-file-name`,title:p,children:(0,M.jsx)(`div`,{children:_})}),(0,M.jsx)(Vn,{description:`Copy filename`,value:_}),m&&(0,M.jsx)(N,{icon:`link-external`,title:`Open in VS Code`,onClick:h})]}),(0,M.jsx)(_r,{text:u.content||``,highlighter:v,highlight:d,revealLine:f,readOnly:!0,lineNumbers:!0,dataTestId:`source-code-mirror`})]}),sidebar:(0,M.jsx)(cg,{stack:e,selectedFrame:c,setSelectedFrame:l})})};async function fg(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-1`,t),r=[],i=new DataView(n);for(let e=0;e<i.byteLength;e+=1){let t=i.getUint8(e).toString(16).padStart(2,`0`);r.push(t)}return r.join(``)}function pg(e){if(!e)return``;let t=e?.includes(`/`)?`/`:`\\`;return e?.split(t).pop()??``}var mg={width:200,height:45},hg=2.5,gg=mg.height+hg*2,_g=({boundaries:e,previewPoint:t})=>{let n=Mn(),[r,i]=E(),a=T.useRef(null),o=(n?.videos??[]).map(e=>({video:e,url:n.createRelativeUrl(`file/${e.file}`)})),s=Vh(o),c=0;if(a.current&&t){let e=a.current.getBoundingClientRect();c=(t.clientY-e.top+a.current.scrollTop)/gg|0}let l=(n?.pages??[]).filter(e=>e.screencastFrames.length),u=vg(o.map(({video:e})=>e),s),d,f;if(n&&t!==void 0){let i=e.minimum+(e.maximum-e.minimum)*t.x/r.width,a={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)},o=l[c]?.screencastFrames,s=o?.[re(o,i,xg)-1],p=u[c-l.length],m=p?Kh(p.videos,i):-1,h=m===-1?void 0:p.sources[m].url;if(s)f=Sg(s,a),d=(0,M.jsx)(`img`,{src:n.createRelativeUrl(`file/${s.file}`),width:f.width,height:f.height});else if(h){let e=p.videos[m];f=Sg(e,a),d=(0,M.jsx)(qh,{url:h,startTime:e.timestamp,time:i,width:f.width,height:f.height})}}return(0,M.jsxs)(`div`,{className:`film-strip`,ref:i,children:[(0,M.jsxs)(`div`,{className:`film-strip-lanes`,ref:a,children:[l.map((t,n)=>(0,M.jsx)(bg,{boundaries:e,page:t,width:r.width},n)),u.map((t,n)=>(0,M.jsx)(yg,{boundaries:e,thumbnails:t.thumbnails,width:r.width},`video-`+n))]}),t&&d&&f&&(0,M.jsx)(`div`,{className:`film-strip-hover`,style:{top:r.bottom+5,left:Math.min(t.x,r.width-f.width-10),width:f.width,height:f.height},children:d})]})};function vg(e,t){let n=new Map;return e.forEach((e,r)=>{let i=n.get(e.pageId);i||(i={videos:[],sources:[],thumbnails:[]},n.set(e.pageId,i)),i.videos.push(e),i.sources.push(t[r]),i.thumbnails.push(...t[r].thumbnails)}),[...n.values()].filter(e=>e.thumbnails.length).map(e=>(e.thumbnails.sort((e,t)=>e.timestamp-t.timestamp),e))}var yg=({boundaries:e,thumbnails:t,width:n})=>{let r={width:0,height:0};for(let e of t)r.width=Math.max(r.width,e.width),r.height=Math.max(r.height,e.height);let i=Sg(r,mg),a=t[0].timestamp,o=t[t.length-1].timestamp,s=e.maximum-e.minimum,c=(a-e.minimum)/s*n,l=(e.maximum-o)/s*n,u=(o-a)/s*n/(i.width+2*hg)|0,d=(o-a)/u,f=[];for(let e=0;a&&d&&e<u;++e){let n=re(t,a+d*e,xg)-1;f.push((0,M.jsx)(`div`,{className:`film-strip-frame`,style:{width:i.width,height:i.height,backgroundImage:`url(${t[n].url})`,backgroundSize:`${i.width}px ${i.height}px`,margin:hg,marginRight:hg}},e))}return f.push((0,M.jsx)(`div`,{className:`film-strip-frame`,style:{width:i.width,height:i.height,backgroundImage:`url(${t[t.length-1].url})`,backgroundSize:`${i.width}px ${i.height}px`,margin:hg,marginRight:hg}},f.length)),(0,M.jsx)(`div`,{className:`film-strip-lane`,style:{marginLeft:c+`px`,marginRight:l+`px`},children:f})},bg=({boundaries:e,page:t,width:n})=>{let r=Mn(),i={width:0,height:0},a=t.screencastFrames;for(let e of a)i.width=Math.max(i.width,e.width),i.height=Math.max(i.height,e.height);let o=Sg(i,mg),s=a[0].timestamp,c=a[a.length-1].timestamp,l=e.maximum-e.minimum,u=(s-e.minimum)/l*n,d=(e.maximum-c)/l*n,f=(c-s)/l*n/(o.width+2*hg)|0,p=(c-s)/f,m=[];for(let e=0;s&&p&&e<f;++e){let t=re(a,s+p*e,xg)-1;m.push((0,M.jsx)(`div`,{className:`film-strip-frame`,style:{width:o.width,height:o.height,backgroundImage:`url(${r?.createRelativeUrl(`file/`+a[t].file)})`,backgroundSize:`${o.width}px ${o.height}px`,margin:hg,marginRight:hg}},e))}return m.push((0,M.jsx)(`div`,{className:`film-strip-frame`,style:{width:o.width,height:o.height,backgroundImage:`url(${r?.createRelativeUrl(`file/`+a[a.length-1].file)})`,backgroundSize:`${o.width}px ${o.height}px`,margin:hg,marginRight:hg}},m.length)),(0,M.jsx)(`div`,{className:`film-strip-lane`,style:{marginLeft:u+`px`,marginRight:d+`px`},children:m})};function xg(e,t){return e-t.timestamp}function Sg(e,t){let n=Math.max(e.width/t.width,e.height/t.height);return{width:e.width/n|0,height:e.height/n|0}}var Cg=({model:e,boundaries:t,onSelected:n,selectedTime:r,setSelectedTime:i,highlightedTime:a,scrubber:o})=>{let[s,c]=E(),[l,u]=T.useState(),[d,f]=T.useState(),[p]=ae(`actionsFilter`,[]),{offsets:m,curtainLeft:h,curtainRight:g}=T.useMemo(()=>{let e=r||t;if(l&&l.startX!==l.endX){let n=Eg(s.width,t,l.startX),r=Eg(s.width,t,l.endX);e={minimum:Math.min(n,r),maximum:Math.max(n,r)}}let n=Tg(s.width,t,e.minimum),i=Tg(s.width,t,t.maximum)-Tg(s.width,t,e.maximum);return{offsets:wg(s.width,t),curtainLeft:n,curtainRight:i}},[r,t,l,s]),_=T.useMemo(()=>e?.filteredActions(p),[e,p]),v=T.useMemo(()=>{if(!a)return;let e=Tg(s.width,t,a.minimum),n=Tg(s.width,t,a.maximum);return{left:e,width:Math.max(2,n-e)}},[a,t,s]),y=T.useCallback(e=>{if(f(void 0),!c.current)return;let n=e.clientX-c.current.getBoundingClientRect().left,i=Eg(s.width,t,n),a=r?Tg(s.width,t,r.minimum):0,o=r?Tg(s.width,t,r.maximum):0;r&&Math.abs(n-a)<10?u({startX:o,endX:n,type:`resize`}):r&&Math.abs(n-o)<10?u({startX:a,endX:n,type:`resize`}):r&&i>r.minimum&&i<r.maximum&&e.clientY-c.current.getBoundingClientRect().top<20?u({startX:a,endX:o,pivot:n,type:`move`}):u({startX:n,endX:n,type:`resize`})},[t,s,c,r]),b=T.useCallback(e=>{if(!c.current)return;let r=e.clientX-c.current.getBoundingClientRect().left,a=Eg(s.width,t,r),o=_?.findLast(e=>e.startTime<=a);if(!e.buttons){u(void 0);return}if(o&&n(o),!l)return;let d=l;if(l.type===`resize`)d={...l,endX:r};else{let e=r-l.pivot,t=l.startX+e,n=l.endX+e;t<0&&(t=0,n=t+(l.endX-l.startX)),n>s.width&&(n=s.width,t=n-(l.endX-l.startX)),d={...l,startX:t,endX:n,pivot:r}}u(d);let f=Eg(s.width,t,d.startX),p=Eg(s.width,t,d.endX);f!==p&&i({minimum:Math.min(f,p),maximum:Math.max(f,p)})},[t,l,s,_,n,c,i]),x=T.useCallback(()=>{if(f(void 0),l){if(l.startX!==l.endX){let e=Eg(s.width,t,l.startX),n=Eg(s.width,t,l.endX);i({minimum:Math.min(e,n),maximum:Math.max(e,n)})}else{let e=Eg(s.width,t,l.startX),r=_?.findLast(t=>t.startTime<=e);r&&n(r),i(void 0)}u(void 0)}},[t,l,s,_,i,n]),S=T.useCallback(e=>{c.current&&f({x:e.clientX-c.current.getBoundingClientRect().left,clientY:e.clientY})},[c]),C=T.useCallback(()=>{f(void 0)},[]),w=T.useCallback(()=>{i(void 0)},[i]);return(0,M.jsxs)(`div`,{className:`timeline-view-container`,children:[!!l&&(0,M.jsx)(ar,{cursor:l?.type===`resize`?`ew-resize`:`grab`,onPaneMouseUp:x,onPaneMouseMove:b,onPaneDoubleClick:w}),(0,M.jsxs)(`div`,{ref:c,className:`timeline-view`,onMouseDown:y,onMouseMove:S,onMouseLeave:C,children:[(0,M.jsx)(`div`,{className:`timeline-grid`,children:m.map((e,n)=>(0,M.jsx)(`div`,{className:`timeline-divider`,style:{left:e.position+`px`},children:(0,M.jsx)(`div`,{className:`timeline-time`,children:wn(e.time-t.minimum)})},n))}),(0,M.jsx)(_g,{boundaries:t,previewPoint:d}),o,v&&(0,M.jsx)(`div`,{className:`timeline-highlight`,style:{left:v.left,width:v.width}}),r&&(0,M.jsxs)(`div`,{className:`timeline-window`,children:[(0,M.jsx)(`div`,{className:`timeline-window-curtain left`,style:{width:h}}),(0,M.jsx)(`div`,{className:`timeline-window-resizer`,style:{left:-5}}),(0,M.jsx)(`div`,{className:`timeline-window-center`,children:(0,M.jsx)(`div`,{className:`timeline-window-drag`})}),(0,M.jsx)(`div`,{className:`timeline-window-resizer`,style:{left:5}}),(0,M.jsx)(`div`,{className:`timeline-window-curtain right`,style:{width:g}})]})]})]})};function wg(e,t){let n=e/64,r=t.maximum-t.minimum,i=e/r,a=r/n;a=10**Math.ceil(Math.log(a)/Math.LN10),a*i>=320&&(a/=5),a*i>=128&&(a/=2);let o=t.minimum,s=t.maximum;s+=64/i,n=Math.ceil((s-o)/a),a||(n=0);let c=[];for(let r=0;r<n;++r){let n=o+a*r;c.push({position:Tg(e,t,n),time:n})}return c}function Tg(e,t,n){return(n-t.minimum)/(t.maximum-t.minimum)*e}function Eg(e,t,n){return n/e*(t.maximum-t.minimum)+t.minimum}var Dg=({model:e})=>{if(!e)return(0,M.jsx)(M.Fragment,{});let t=e.wallTime===void 0?void 0:new Date(e.wallTime).toLocaleString(void 0,{timeZoneName:`short`});return(0,M.jsxs)(`div`,{style:{flex:`auto`,display:`block`,overflow:`hidden auto`},children:[(0,M.jsx)(`div`,{className:`call-section`,style:{paddingTop:2},children:`Time`}),!!t&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`start time:`,(0,M.jsx)(`span`,{className:`call-value datetime`,title:t,children:t})]}),(0,M.jsxs)(`div`,{className:`call-line`,children:[`duration:`,(0,M.jsx)(`span`,{className:`call-value number`,title:wn(e.endTime-e.startTime),children:wn(e.endTime-e.startTime)})]}),e.testTimeout!==void 0&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`test timeout:`,(0,M.jsx)(`span`,{className:`call-value number`,title:wn(e.testTimeout),children:wn(e.testTimeout)})]}),(0,M.jsx)(`div`,{className:`call-section`,children:`Browser`}),(0,M.jsxs)(`div`,{className:`call-line`,children:[`engine:`,(0,M.jsx)(`span`,{className:`call-value string`,title:e.browserName,children:e.browserName})]}),e.channel&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`channel:`,(0,M.jsx)(`span`,{className:`call-value string`,title:e.channel,children:e.channel})]}),e.platform&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`platform:`,(0,M.jsx)(`span`,{className:`call-value string`,title:e.platform,children:e.platform})]}),e.playwrightVersion&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`playwright version:`,(0,M.jsx)(`span`,{className:`call-value string`,title:e.playwrightVersion,children:e.playwrightVersion})]}),e.options.userAgent&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`user agent:`,(0,M.jsx)(`span`,{className:`call-value datetime`,title:e.options.userAgent,children:e.options.userAgent})]}),e.options.baseURL&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`call-section`,style:{paddingTop:2},children:`Config`}),(0,M.jsxs)(`div`,{className:`call-line`,children:[`baseURL:`,f(e.options.baseURL)?(0,M.jsx)(`a`,{className:`call-value string`,href:e.options.baseURL,title:e.options.baseURL,target:`_blank`,rel:`noopener noreferrer`,children:e.options.baseURL}):(0,M.jsx)(`span`,{className:`call-value string`,title:e.options.baseURL,children:e.options.baseURL})]})]}),(0,M.jsx)(`div`,{className:`call-section`,children:`Viewport`}),e.options.viewport&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`width:`,(0,M.jsx)(`span`,{className:`call-value number`,title:String(!!e.options.viewport?.width),children:e.options.viewport.width})]}),e.options.viewport&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`height:`,(0,M.jsx)(`span`,{className:`call-value number`,title:String(!!e.options.viewport?.height),children:e.options.viewport.height})]}),(0,M.jsxs)(`div`,{className:`call-line`,children:[`is mobile:`,(0,M.jsx)(`span`,{className:`call-value boolean`,title:String(!!e.options.isMobile),children:String(!!e.options.isMobile)})]}),e.options.deviceScaleFactor&&(0,M.jsxs)(`div`,{className:`call-line`,children:[`device scale:`,(0,M.jsx)(`span`,{className:`call-value number`,title:String(e.options.deviceScaleFactor),children:String(e.options.deviceScaleFactor)})]}),(0,M.jsx)(`div`,{className:`call-section`,children:`Counts`}),(0,M.jsxs)(`div`,{className:`call-line`,children:[`pages:`,(0,M.jsx)(`span`,{className:`call-value number`,children:e.pages.length})]}),(0,M.jsxs)(`div`,{className:`call-line`,children:[`actions:`,(0,M.jsx)(`span`,{className:`call-value number`,children:e.actions.length})]}),(0,M.jsxs)(`div`,{className:`call-line`,children:[`events:`,(0,M.jsx)(`span`,{className:`call-value number`,children:e.events.length})]})]})},Og=({annotations:e})=>e.length?(0,M.jsx)(`div`,{className:`annotations-tab`,children:e.map((e,t)=>(0,M.jsxs)(`div`,{className:`annotation-item`,children:[(0,M.jsx)(`span`,{style:{fontWeight:`bold`},children:e.type}),e.description&&(0,M.jsxs)(`span`,{children:[`: `,Dr(e.description)]})]},`annotation-${t}`))}):(0,M.jsx)(Un,{text:`No annotations`}),kg=({sdkLanguage:e,isInspecting:t,setIsInspecting:n,highlightedElement:r,setHighlightedElement:i})=>{let[a,o]=T.useState(),s=T.useCallback(e=>{let{errors:t}=Ji(Th,e,{prettyErrors:!1});o(t.map(e=>({message:e.message,line:e.range[1].line,column:e.range[1].col,type:`subtle-error`}))),i({...r,ariaSnapshot:e,lastEdited:`ariaSnapshot`}),n(!1)},[r,i,n]);return(0,M.jsxs)(`div`,{style:{flex:`auto`,backgroundColor:`var(--vscode-sideBar-background)`,padding:`0 10px 10px 10px`,overflow:`auto`},children:[(0,M.jsxs)(`div`,{className:`hbox`,style:{lineHeight:`28px`,color:`var(--vscode-editorCodeLens-foreground)`},children:[(0,M.jsx)(`div`,{children:`Locator`}),(0,M.jsx)(N,{style:{margin:`0 4px`},title:`Pick locator`,icon:`target`,toggled:t,onClick:()=>n(!t)}),(0,M.jsx)(`div`,{style:{flex:`auto`}}),(0,M.jsx)(N,{icon:`files`,title:`Copy locator`,onClick:()=>{ie(r.locator||``)}})]}),(0,M.jsx)(`div`,{style:{height:50},children:(0,M.jsx)(_r,{text:r.locator||``,highlighter:e,isFocused:!0,wrapLines:!0,onChange:e=>{i({...r,locator:e,lastEdited:`locator`}),n(!1)}})}),(0,M.jsxs)(`div`,{className:`hbox`,style:{lineHeight:`28px`,color:`var(--vscode-editorCodeLens-foreground)`},children:[(0,M.jsx)(`div`,{style:{flex:`auto`},children:`Aria snapshot`}),(0,M.jsx)(N,{icon:`files`,title:`Copy snapshot`,onClick:()=>{ie(r.ariaSnapshot||``)}})]}),(0,M.jsx)(`div`,{style:{height:150},children:(0,M.jsx)(_r,{text:r.ariaSnapshot||``,highlighter:`yaml`,wrapLines:!1,highlight:a,onChange:s})})]})},Ag=({className:e,style:t,open:n,isModal:r,minWidth:i,verticalOffset:a,requestClose:o,anchor:s,dataTestId:c,children:l})=>{let u=T.useRef(null),[d,f]=T.useState(0),[p]=ne(u),[m,h]=ne(s),g=s?jg(p,m,a):void 0;return T.useEffect(()=>{let e=e=>{!u.current||!(e.target instanceof Node)||u.current.contains(e.target)||o?.()},t=e=>{e.key===`Escape`&&o?.()};return n?(document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}):()=>{}},[n,o]),T.useLayoutEffect(()=>h(),[n,h]),T.useEffect(()=>{let e=()=>f(e=>e+1);return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),T.useLayoutEffect(()=>{u.current&&(n?r?u.current.showModal():u.current.show():u.current.close())},[n,r]),(0,M.jsx)(`dialog`,{ref:u,style:{position:`fixed`,margin:g?0:void 0,zIndex:110,top:g?.top,left:g?.left,minWidth:i||0,...t},className:e,"data-testid":c,children:l})};function jg(e,t,n=4,r=4){let i=Math.max(r,t.left);i+e.width>window.innerWidth-r&&(i=window.innerWidth-e.width-r);let a=Math.max(0,t.bottom)+n;return a+e.height>window.innerHeight-n&&(a=Math.max(0,t.top)>e.height+n?Math.max(0,t.top)-e.height-n:window.innerHeight-n-e.height),{left:i,top:a}}var Mg=({title:e,icon:t,buttonChildren:n,anchorRef:r,dialogDataTestId:i,children:a})=>{let o=T.useRef(null),s=r??o,[c,l]=T.useState(!1);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(N,{ref:o,icon:t,title:e,onClick:()=>l(e=>!e),children:n}),(0,M.jsx)(Ag,{style:{backgroundColor:`var(--vscode-sideBar-background)`,padding:`4px 8px`},open:c,verticalOffset:8,requestClose:()=>l(!1),anchor:s,dataTestId:i,children:a})]})},Ng=({settings:e})=>(0,M.jsx)(`div`,{className:`vbox settings-view`,children:e.map(e=>{let t=`setting-${e.name.replaceAll(/\s+/g,`-`)}`;return(0,M.jsx)(`div`,{className:k(`setting`,`setting-${e.type}`,e.disabled&&`setting-disabled`),title:e.title,children:Pg(e,t)},e.name)})}),Pg=(e,t)=>{switch(e.type){case`check`:return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`input`,{type:`checkbox`,id:t,checked:e.value,disabled:e.disabled,onChange:()=>e.set(!e.value)}),(0,M.jsxs)(`label`,{htmlFor:t,children:[e.name,!!e.count&&(0,M.jsx)(`span`,{className:`setting-counter`,children:e.count})]})]});case`select`:return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`label`,{htmlFor:t,children:[e.name,`:`,!!e.count&&(0,M.jsx)(`span`,{className:`setting-counter`,children:e.count})]}),(0,M.jsx)(`select`,{id:t,value:e.value,disabled:e.disabled,onChange:t=>e.set(t.target.value),children:e.options.map(e=>(0,M.jsx)(`option`,{value:e.value,children:e.label},e.value))})]});default:return null}},Fg=e=>{let t=Rg(e.model?.traceUri);return(0,M.jsx)(jn.Provider,{value:e.model,children:(0,M.jsx)(Ig,{partition:t,...e})})},Ig=e=>{let{partition:t,model:n,showSourcesFirst:r,rootDir:i,fallbackLocation:a,isLive:o,hideTimeline:s,status:c,inert:l,onOpenExternally:u,revealSource:d,testRunMetadata:f}=e,p=n?.annotations??e.defaultAnnotations,[m,h]=ae(`navigatorTab`,`actions`),[g,_]=ae(`propertiesTab`,r?`source`:`call`),[v,y]=ae(`propertiesSidebarLocation`,`bottom`),[b]=ae(`actionsFilter`,[]),[x,S]=se(`selectedCallId`),[C,w]=se(`selectedTime`),[ee,te]=se(`highlightedCallId`),[E,ne]=se(`revealedErrorKey`),[re,ie]=se(`revealedAttachmentCallId`),[oe,D]=se(`treeState`,{expandedItems:new Map}),[O,le]=T.useState(``);ce(t);let[ue,A]=T.useState({lastEdited:`none`}),[de,fe]=T.useState(!1),[pe,me]=T.useState(void 0),he=T.useCallback(e=>{S(e?.callId),ne(void 0)},[S,ne]),ge=T.useMemo(()=>n?.filteredActions(b),[n,b]),_e=(n?.actions.length??0)-(ge?.length??0),ve=T.useMemo(()=>ge?.find(e=>e.callId===ee),[ge,ee]),ye=T.useCallback(e=>{te(e?.callId)},[te]),be=T.useMemo(()=>n?.sources||new Map,[n]);T.useEffect(()=>{w(void 0),ne(void 0)},[n,w,ne]);let xe=T.useMemo(()=>{if(x){let e=ge?.find(e=>e.callId===x);if(e)return e}let e=n?.failedAction();if(e)return e;if(ge?.length){let e=ge.length-1;for(let t=0;t<ge.length;++t)if(ge[t].title===`After Hooks`&&t){e=t-1;break}return ge[e]}},[n,ge,x]),Se=T.useMemo(()=>ve||xe,[xe,ve]),Ce=T.useCallback(e=>{he(e),ye(void 0)},[he,ye]),{boundaries:we}=T.useMemo(()=>{let e={minimum:n?.startTime||0,maximum:n?.endTime||3e4};return e.minimum>e.maximum&&(e.minimum=0,e.maximum=3e4),e.maximum+=(e.maximum-e.minimum)/20,{boundaries:e}},[n]),Te=Dh(ge||[],xe,Ce,C,we),{showSelectedAction:Ee}=Te,De=T.useCallback(e=>{_(e),e!==`inspector`&&fe(!1)},[_]),Oe=T.useCallback(e=>{!de&&e&&De(`inspector`),e&&Ee(),fe(e)},[fe,De,de,Ee]),ke=T.useCallback(e=>{A(e),De(`inspector`)},[De]),Ae=T.useCallback(e=>{De(`attachments`),ie({callId:e})},[De,ie]);T.useEffect(()=>{d&&De(`source`)},[d,De]);let je=Br(n,C),Me=Pi(n,C),j=Fr(n),Ne=T.useMemo(()=>E===void 0?Se?.stack:j.errors.get(E)?.stack,[Se,E,j]),Pe=n?.sdkLanguage||`javascript`,Fe={id:`inspector`,title:`Locator`,render:()=>(0,M.jsx)(kg,{sdkLanguage:Pe,isInspecting:de,setIsInspecting:Oe,highlightedElement:ue,setHighlightedElement:A})},Ie={id:`call`,title:`Call`,render:()=>(0,M.jsx)(Wn,{action:Se,startTimeOffset:n?.startTime??0,sdkLanguage:Pe})},Le={id:`log`,title:`Log`,render:()=>(0,M.jsx)(Qn,{action:Se,isLive:o})},Re={id:`errors`,title:`Errors`,errorCount:j.errors.size,render:()=>(0,M.jsx)(Lr,{errorsModel:j,testRunMetadata:f,sdkLanguage:Pe,revealInSource:e=>{e.action?Te.selectAction(e.action):ne(e.message),De(`source`)},wallTime:n?.wallTime??0})},ze;!xe&&a&&(ze=a.source?.errors.length);let Be={id:`source`,title:`Source`,errorCount:ze,render:()=>(0,M.jsx)(dg,{stack:Ne,sources:be,rootDir:i,stackFrameLocation:v===`bottom`?`right`:`bottom`,fallbackLocation:a,onOpenExternally:u})},Ve=[Fe,Ie,Le,Re,{id:`console`,title:`Console`,count:je.entries.length,render:()=>(0,M.jsx)(Vr,{consoleModel:je,boundaries:we,selectedTime:C,onEntryHovered:me,onAccepted:e=>w({minimum:e.timestamp,maximum:e.timestamp})})},{id:`network`,title:`Network`,count:Me.resources.length,render:()=>(0,M.jsx)(Fi,{boundaries:we,networkModel:Me,onResourceHovered:me,sdkLanguage:n?.sdkLanguage??`javascript`})},Be,{id:`attachments`,title:`Attachments`,count:n?.visibleAttachments.length,render:()=>(0,M.jsx)(Ar,{revealedAttachmentCallId:re})}];if(p!==void 0){let e={id:`annotations`,title:`Annotations`,count:p.length,render:()=>(0,M.jsx)(Og,{annotations:p})};Ve.push(e)}if(r){let e=Ve.indexOf(Be);Ve.splice(e,1),Ve.splice(1,0,Be)}let He=0;!o&&n&&n.endTime>=0?He=n.endTime-n.startTime:n&&n.wallTime&&(He=Date.now()-n.wallTime);let Ue={id:`actions`,title:`Actions`,component:(0,M.jsxs)(`div`,{className:`vbox`,children:[c&&(0,M.jsxs)(`div`,{className:`workbench-run-status`,"data-testid":`workbench-run-status`,children:[(0,M.jsx)(`span`,{className:k(`codicon`,Pn(c))}),(0,M.jsx)(`div`,{children:Fn(c)}),(0,M.jsx)(`div`,{className:`spacer`}),(0,M.jsx)(`div`,{className:`workbench-run-duration`,children:He?wn(He):``})]}),(0,M.jsx)(`div`,{className:`workbench-action-filter`,children:(0,M.jsx)(`input`,{type:`search`,placeholder:`Filter actions`,"aria-label":`Filter actions`,spellCheck:!1,value:O,onChange:e=>le(e.target.value)})}),(0,M.jsx)(Ln,{sdkLanguage:Pe,actions:ge||[],selectedAction:n?xe:void 0,selectedTime:C,setSelectedTime:w,treeState:oe,setTreeState:D,onSelected:Te.selectAction,onHighlighted:ye,revealActionAttachment:Ae,revealConsole:()=>De(`console`),isLive:o,actionFilterText:O})]})},We={id:`metadata`,title:`Metadata`,component:(0,M.jsx)(Dg,{model:n})},Ge=m===`actions`&&(0,M.jsx)(Lg,{counters:n?.actionCounters,hiddenActionsCount:_e});return(0,M.jsxs)(`div`,{className:`vbox workbench`,...l?{inert:!0}:{},children:[!s&&(0,M.jsx)(Cg,{model:n,boundaries:we,onSelected:Te.selectAction,selectedTime:C,setSelectedTime:w,highlightedTime:pe,scrubber:(0,M.jsx)(kh,{playback:Te})}),(0,M.jsx)(Cn,{sidebarSize:250,orientation:v===`bottom`?`vertical`:`horizontal`,settingName:`propertiesSidebar`,main:(0,M.jsx)(Cn,{sidebarSize:250,orientation:`horizontal`,sidebarIsFirst:!0,settingName:`actionListSidebar`,main:(0,M.jsx)(Jh,{action:Se,model:n,sdkLanguage:Pe,testIdAttributeName:n?.testIdAttributeName||`data-testid`,isInspecting:de,setIsInspecting:Oe,highlightedElement:ue,setHighlightedElement:ke,screencastTime:ve?void 0:Te.screencastTime,playback:Te}),sidebar:(0,M.jsx)(qr,{tabs:[Ue,We],rightToolbar:[Ge],selectedTab:m,setSelectedTab:h})}),sidebar:(0,M.jsx)(qr,{tabs:Ve,selectedTab:g,setSelectedTab:De,rightToolbar:[v===`bottom`?(0,M.jsx)(N,{title:`Dock to right`,icon:`layout-sidebar-right-off`,onClick:()=>{y(`right`)}}):(0,M.jsx)(N,{title:`Dock to bottom`,icon:`layout-panel-off`,onClick:()=>{y(`bottom`)}})],mode:v===`bottom`?`default`:`select`})})]})},Lg=({counters:e,hiddenActionsCount:t})=>{let[n,r]=ae(`actionsFilter`,[]),i=T.useRef(null);return(0,M.jsx)(Mg,{title:`Filter actions`,dialogDataTestId:`actions-filter-dialog`,buttonChildren:(0,M.jsxs)(M.Fragment,{children:[t>0&&(0,M.jsxs)(`span`,{className:`workbench-actions-hidden-count`,title:t+` actions hidden by filters`,children:[t,` hidden`]}),(0,M.jsx)(`span`,{ref:i,className:`codicon codicon-filter`})]}),anchorRef:i,children:(0,M.jsx)(Ng,{settings:[{type:`check`,value:n.includes(`getter`),set:e=>r(e?[...n,`getter`]:n.filter(e=>e!==`getter`)),name:`Getters`,count:e?.get(`getter`)},{type:`check`,value:n.includes(`route`),set:e=>r(e?[...n,`route`]:n.filter(e=>e!==`route`)),name:`Network routes`,count:e?.get(`route`)},{type:`check`,value:n.includes(`configuration`),set:e=>r(e?[...n,`configuration`]:n.filter(e=>e!==`configuration`)),name:`Configuration`,count:e?.get(`configuration`)}]})})};function Rg(e){if(!e)return`default`;let t=new URL(e,`http://localhost`);return t.searchParams.delete(`timestamp`),t.toString()}var zg;(function(e){function t(e){for(let t of e.splice(0))t.dispose()}e.disposeAll=t})(zg||={});var Bg=class{constructor(){this._listeners=new Set,this.event=(e,t)=>{this._listeners.add(e);let n=!1,r=this,i={dispose(){n||(n=!0,r._listeners.delete(e))}};return t&&t.push(i),i}}fire(e){let t=!this._deliveryQueue;this._deliveryQueue||=[];for(let t of this._listeners)this._deliveryQueue.push({listener:t,event:e});if(t){for(let e=0;e<this._deliveryQueue.length;e++){let{listener:t,event:n}=this._deliveryQueue[e];t.call(null,n)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&=[]}},Vg=class extends Error{},Hg=class{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener(`message`,t=>e(t.data.toString()))}onopen(e){this._ws.addEventListener(`open`,e)}onerror(e){this._ws.addEventListener(`error`,e)}onclose(e){this._ws.addEventListener(`close`,e)}send(e){this._ws.send(e)}close(){this._ws.close()}},Ug=class{constructor(e){this._onCloseEmitter=new Bg,this._onReportEmitter=new Bg,this._onStdioEmitter=new Bg,this._onTestFilesChangedEmitter=new Bg,this._onLoadTraceRequestedEmitter=new Bg,this._onTestPausedEmitter=new Bg,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this.onTestPaused=this._onTestPausedEmitter.event,this._transport=e,this._transport.onmessage(e=>{let{id:t,result:n,error:r,method:i,params:a}=JSON.parse(e);if(t){let e=this._callbacks.get(t);if(!e)return;this._callbacks.delete(t),r?e.reject(Error(r)):e.resolve(n)}else this._dispatchEvent(i,a)});let t=setInterval(()=>this._sendMessage(`ping`).catch(()=>{}),3e4);this._connectedPromise=new Promise((e,t)=>{this._transport.onopen(e),this._transport.onerror(t)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(t);for(let e of this._callbacks.values())e.reject(e.error);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,t){let n=globalThis.__logForTest;n?.({method:e,params:t}),await this._connectedPromise;let r=++this._lastId,i={id:r,method:e,params:t},a=new Vg(`${e}: test server connection closed`);return this._transport.send(JSON.stringify(i)),new Promise((e,t)=>{this._callbacks.set(r,{resolve:e,reject:t,error:a})})}_sendMessageNoReply(e,t){this._sendMessage(e,t).catch(()=>{})}_dispatchEvent(e,t){e===`report`?this._onReportEmitter.fire(t):e===`stdio`?this._onStdioEmitter.fire(t):e===`testFilesChanged`?this._onTestFilesChangedEmitter.fire(t):e===`loadTraceRequested`?this._onLoadTraceRequestedEmitter.fire(t):e===`testPaused`&&this._onTestPausedEmitter.fire(t)}async initialize(e){await this._sendMessage(`initialize`,e)}async ping(e){await this._sendMessage(`ping`,e)}async pingNoReply(e){this._sendMessageNoReply(`ping`,e)}async watch(e){await this._sendMessage(`watch`,e)}watchNoReply(e){this._sendMessageNoReply(`watch`,e)}async open(e){await this._sendMessage(`open`,e)}openNoReply(e){this._sendMessageNoReply(`open`,e)}async resizeTerminal(e){await this._sendMessage(`resizeTerminal`,e)}resizeTerminalNoReply(e){this._sendMessageNoReply(`resizeTerminal`,e)}async checkBrowsers(e){return await this._sendMessage(`checkBrowsers`,e)}async installBrowsers(e){await this._sendMessage(`installBrowsers`,e)}async runGlobalSetup(e){return await this._sendMessage(`runGlobalSetup`,e)}async runGlobalTeardown(e){return await this._sendMessage(`runGlobalTeardown`,e)}async clearCache(e){return await this._sendMessage(`clearCache`,e)}async listFiles(e){return await this._sendMessage(`listFiles`,e)}async listTests(e){return await this._sendMessage(`listTests`,e)}async runTests(e){return await this._sendMessage(`runTests`,e)}async findRelatedTestFiles(e){return await this._sendMessage(`findRelatedTestFiles`,e)}async stopTests(e){await this._sendMessage(`stopTests`,e)}stopTestsNoReply(e){this._sendMessageNoReply(`stopTests`,e)}async closeGracefully(e){await this._sendMessage(`closeGracefully`,e)}close(){try{this._transport.close()}catch{}}},Wg=({location:e,model:t})=>{let[n,r]=ae(`shouldPopulateCanvasFromScreenshot`,!1),[i,a]=ae(`displayAriaMode`,!1),[o,s]=Ce(),[c,l]=ae(`mergeFiles`,!1),u=Ah(t);return(0,M.jsx)(Ng,{settings:[{type:`select`,value:o,set:s,name:`Theme`,options:me},...e===`ui-mode`?[{type:`check`,value:c,set:l,name:`Merge files`}]:[],{type:`check`,value:n,set:r,name:`Display canvas content`,title:`Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate.`},{type:`check`,value:jh(t,i),set:a,name:`Display Aria`,disabled:!u,title:u?`Display the action screenshot and aria snapshot instead of the DOM snapshot.`:`The trace does not have both DOM and aria snapshots, so there is nothing to switch between.`}]})};export{k as C,ee as D,ae as E,b as O,be as S,E as T,dn as _,Ng as a,ge as b,Kr as c,Pn as d,N as f,xn as g,Cn as h,Fg as i,C as k,Er as l,wn as m,Ug as n,Mg as o,Dn as p,Hg as r,Ag as s,Wg as t,gr as u,ke as v,le as w,Se as x,ye as y};