playwright-core 1.57.0-alpha-2025-10-30 → 1.57.0-alpha-1761929702000

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-DdzW2bmF.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
- var Cw=Object.defineProperty;var kw=(n,e,i)=>e in n?Cw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Ae=(n,e,i)=>kw(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();function Mw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},Ca={};/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-Ds29iGp5.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
+ var Mw=Object.defineProperty;var Ow=(n,e,i)=>e in n?Mw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Ae=(n,e,i)=>Ow(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();function Rw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},Ca={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
5
5
  *
@@ -7,7 +7,7 @@ var Cw=Object.defineProperty;var kw=(n,e,i)=>e in n?Cw(n,e,{enumerable:!0,config
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var my;function Ow(){if(my)return Ca;my=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,a,o){var u=null;if(o!==void 0&&(u=""+o),a.key!==void 0&&(u=""+a.key),"key"in a){o={};for(var f in a)f!=="key"&&(o[f]=a[f])}else o=a;return a=o.ref,{$$typeof:n,type:s,key:u,ref:a!==void 0?a:null,props:o}}return Ca.Fragment=e,Ca.jsx=i,Ca.jsxs=i,Ca}var yy;function Rw(){return yy||(yy=1,Yf.exports=Ow()),Yf.exports}var S=Rw(),Xf={exports:{}},de={};/**
10
+ */var my;function Lw(){if(my)return Ca;my=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,a,o){var u=null;if(o!==void 0&&(u=""+o),a.key!==void 0&&(u=""+a.key),"key"in a){o={};for(var f in a)f!=="key"&&(o[f]=a[f])}else o=a;return a=o.ref,{$$typeof:n,type:s,key:u,ref:a!==void 0?a:null,props:o}}return Ca.Fragment=e,Ca.jsx=i,Ca.jsxs=i,Ca}var yy;function jw(){return yy||(yy=1,Yf.exports=Lw()),Yf.exports}var S=jw(),Xf={exports:{}},de={};/**
11
11
  * @license React
12
12
  * react.production.js
13
13
  *
@@ -15,7 +15,7 @@ var Cw=Object.defineProperty;var kw=(n,e,i)=>e in n?Cw(n,e,{enumerable:!0,config
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var by;function Lw(){if(by)return de;by=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=y&&N[y]||N["@@iterator"],typeof N=="function"?N:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function T(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||v}T.prototype.isReactComponent={},T.prototype.setState=function(N,P){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,P,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=T.prototype;function k(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||v}var $=k.prototype=new C;$.constructor=k,E($,T.prototype),$.isPureReactComponent=!0;var V=Array.isArray,R={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function Z(N,P,W,J,ae,be){return W=be.ref,{$$typeof:n,type:N,key:P,ref:W!==void 0?W:null,props:be}}function H(N,P){return Z(N.type,P,void 0,void 0,void 0,N.props)}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ie(N){var P={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return P[W]})}var le=/\/+/g;function I(N,P){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):P.toString(36)}function F(){}function ee(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(P){N.status==="pending"&&(N.status="fulfilled",N.value=P)},function(P){N.status==="pending"&&(N.status="rejected",N.reason=P)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function ve(N,P,W,J,ae){var be=typeof N;(be==="undefined"||be==="boolean")&&(N=null);var te=!1;if(N===null)te=!0;else switch(be){case"bigint":case"string":case"number":te=!0;break;case"object":switch(N.$$typeof){case n:case e:te=!0;break;case m:return te=N._init,ve(te(N._payload),P,W,J,ae)}}if(te)return ae=ae(N),te=J===""?"."+I(N,0):J,V(ae)?(W="",te!=null&&(W=te.replace(le,"$&/")+"/"),ve(ae,P,W,"",function(Gt){return Gt})):ae!=null&&(L(ae)&&(ae=H(ae,W+(ae.key==null||N&&N.key===ae.key?"":(""+ae.key).replace(le,"$&/")+"/")+te)),P.push(ae)),1;te=0;var st=J===""?".":J+":";if(V(N))for(var Ne=0;Ne<N.length;Ne++)J=N[Ne],be=st+I(J,Ne),te+=ve(J,P,W,be,ae);else if(Ne=b(N),typeof Ne=="function")for(N=Ne.call(N),Ne=0;!(J=N.next()).done;)J=J.value,be=st+I(J,Ne++),te+=ve(J,P,W,be,ae);else if(be==="object"){if(typeof N.then=="function")return ve(ee(N),P,W,J,ae);throw P=String(N),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return te}function z(N,P,W){if(N==null)return N;var J=[],ae=0;return ve(N,J,"","",function(be){return P.call(W,be,ae++)}),J}function Q(N){if(N._status===-1){var P=N._result;P=P(),P.then(function(W){(N._status===0||N._status===-1)&&(N._status=1,N._result=W)},function(W){(N._status===0||N._status===-1)&&(N._status=2,N._result=W)}),N._status===-1&&(N._status=0,N._result=P)}if(N._status===1)return N._result.default;throw N._result}var se=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function we(){}return de.Children={map:z,forEach:function(N,P,W){z(N,function(){P.apply(this,arguments)},W)},count:function(N){var P=0;return z(N,function(){P++}),P},toArray:function(N){return z(N,function(P){return P})||[]},only:function(N){if(!L(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},de.Component=T,de.Fragment=i,de.Profiler=a,de.PureComponent=k,de.StrictMode=s,de.Suspense=d,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,de.__COMPILER_RUNTIME={__proto__:null,c:function(N){return R.H.useMemoCache(N)}},de.cache=function(N){return function(){return N.apply(null,arguments)}},de.cloneElement=function(N,P,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var J=E({},N.props),ae=N.key,be=void 0;if(P!=null)for(te in P.ref!==void 0&&(be=void 0),P.key!==void 0&&(ae=""+P.key),P)!G.call(P,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&P.ref===void 0||(J[te]=P[te]);var te=arguments.length-2;if(te===1)J.children=W;else if(1<te){for(var st=Array(te),Ne=0;Ne<te;Ne++)st[Ne]=arguments[Ne+2];J.children=st}return Z(N.type,ae,void 0,void 0,be,J)},de.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:o,_context:N},N},de.createElement=function(N,P,W){var J,ae={},be=null;if(P!=null)for(J in P.key!==void 0&&(be=""+P.key),P)G.call(P,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ae[J]=P[J]);var te=arguments.length-2;if(te===1)ae.children=W;else if(1<te){for(var st=Array(te),Ne=0;Ne<te;Ne++)st[Ne]=arguments[Ne+2];ae.children=st}if(N&&N.defaultProps)for(J in te=N.defaultProps,te)ae[J]===void 0&&(ae[J]=te[J]);return Z(N,be,void 0,void 0,null,ae)},de.createRef=function(){return{current:null}},de.forwardRef=function(N){return{$$typeof:f,render:N}},de.isValidElement=L,de.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Q}},de.memo=function(N,P){return{$$typeof:p,type:N,compare:P===void 0?null:P}},de.startTransition=function(N){var P=R.T,W={};R.T=W;try{var J=N(),ae=R.S;ae!==null&&ae(W,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(we,se)}catch(be){se(be)}finally{R.T=P}},de.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},de.use=function(N){return R.H.use(N)},de.useActionState=function(N,P,W){return R.H.useActionState(N,P,W)},de.useCallback=function(N,P){return R.H.useCallback(N,P)},de.useContext=function(N){return R.H.useContext(N)},de.useDebugValue=function(){},de.useDeferredValue=function(N,P){return R.H.useDeferredValue(N,P)},de.useEffect=function(N,P,W){var J=R.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return J.useEffect(N,P)},de.useId=function(){return R.H.useId()},de.useImperativeHandle=function(N,P,W){return R.H.useImperativeHandle(N,P,W)},de.useInsertionEffect=function(N,P){return R.H.useInsertionEffect(N,P)},de.useLayoutEffect=function(N,P){return R.H.useLayoutEffect(N,P)},de.useMemo=function(N,P){return R.H.useMemo(N,P)},de.useOptimistic=function(N,P){return R.H.useOptimistic(N,P)},de.useReducer=function(N,P,W){return R.H.useReducer(N,P,W)},de.useRef=function(N){return R.H.useRef(N)},de.useState=function(N){return R.H.useState(N)},de.useSyncExternalStore=function(N,P,W){return R.H.useSyncExternalStore(N,P,W)},de.useTransition=function(){return R.H.useTransition()},de.version="19.1.1",de}var vy;function Bh(){return vy||(vy=1,Xf.exports=Lw()),Xf.exports}var q=Bh();const mt=Mw(q);function Ko(n,e,i,s){const[a,o]=mt.useState(i);return mt.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),a}function cs(){const n=mt.useRef(null),[e]=mh(n);return[e,n]}function mh(n){const[e,i]=mt.useState(new DOMRect(0,0,10,10)),s=mt.useCallback(()=>{const a=n==null?void 0:n.current;a&&i(a.getBoundingClientRect())},[n]);return mt.useLayoutEffect(()=>{const a=n==null?void 0:n.current;if(!a)return;s();const o=new ResizeObserver(s);return o.observe(a),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,n]),[e,s]}function _t(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0)+"ms";const e=n/1e3;if(e<60)return e.toFixed(1)+"s";const i=e/60;if(i<60)return i.toFixed(1)+"m";const s=i/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function jw(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0);const e=n/1024;if(e<1e3)return e.toFixed(1)+"K";const i=e/1024;return i<1e3?i.toFixed(1)+"M":(i/1024).toFixed(1)+"G"}function _0(n,e,i,s,a){let o=0,u=n.length;for(;o<u;){const f=o+u>>1;i(e,n[f])>=0?o=f+1:u=f}return u}function Sy(n){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function pn(n,e){n&&(e=es.getObject(n,e));const[i,s]=mt.useState(e),a=mt.useCallback(o=>{n?es.setObject(n,o):s(o)},[n,s]);return mt.useEffect(()=>{if(n){const o=()=>s(es.getObject(n,e));return es.onChangeEmitter.addEventListener(n,o),()=>es.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,a]}const yh=new Map,T0=new Map;let Yo;function _i(n,e){const[i,s]=mt.useState();T0.set(n,{setter:s,defaultValue:e});const a=mt.useCallback(o=>{const u=yh.get(Yo||"default")||{};u[n]=o,yh.set(Yo||"default",u),s(o)},[n]);return[i,a]}function Dw(n){if(Yo===n)return;Yo=n;const e=yh.get(n)||{};for(const[i,s]of T0.entries())s.setter(e[i]||s.defaultValue)}class Bw{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var s;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var s;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const es=new Bw;function Ke(...n){return n.filter(Boolean).join(" ")}function E0(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const wy="\\u0000-\\u0020\\u007f-\\u009f",A0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+wy+'"]{2,}[^\\s'+wy+`"')}\\],:;.!?]`,"ug");function Uw(){const[n,e]=mt.useState(!1),i=mt.useCallback(()=>{const s=[];return e(a=>(s.push(setTimeout(()=>e(!1),1e3)),a?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,i]}function ZN(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",s=>{s.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",s=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";es.getString("theme",e)==="dark-mode"?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.add("light-mode")}const Uh=new Set;function zw(){const n=bh(),e=n==="dark-mode"?"light-mode":"dark-mode";document.documentElement.classList.remove(n),document.documentElement.classList.add(e),es.setString("theme",e);for(const i of Uh)i(e)}function JN(n){Uh.add(n)}function WN(n){Uh.delete(n)}function bh(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":"light-mode"}function Hw(){const[n,e]=mt.useState(bh()==="dark-mode");return[n,i=>{bh()==="dark-mode"!==i&&zw(),e(i)}]}var Pf={exports:{}},ka={},Ff={exports:{}},Qf={};/**
18
+ */var by;function Dw(){if(by)return de;by=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=y&&N[y]||N["@@iterator"],typeof N=="function"?N:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function T(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||v}T.prototype.isReactComponent={},T.prototype.setState=function(N,P){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,P,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=T.prototype;function k(N,P,W){this.props=N,this.context=P,this.refs=x,this.updater=W||v}var $=k.prototype=new C;$.constructor=k,E($,T.prototype),$.isPureReactComponent=!0;var V=Array.isArray,R={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function Z(N,P,W,J,ae,be){return W=be.ref,{$$typeof:n,type:N,key:P,ref:W!==void 0?W:null,props:be}}function H(N,P){return Z(N.type,P,void 0,void 0,void 0,N.props)}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ie(N){var P={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return P[W]})}var le=/\/+/g;function I(N,P){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):P.toString(36)}function F(){}function ee(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(P){N.status==="pending"&&(N.status="fulfilled",N.value=P)},function(P){N.status==="pending"&&(N.status="rejected",N.reason=P)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function ve(N,P,W,J,ae){var be=typeof N;(be==="undefined"||be==="boolean")&&(N=null);var te=!1;if(N===null)te=!0;else switch(be){case"bigint":case"string":case"number":te=!0;break;case"object":switch(N.$$typeof){case n:case e:te=!0;break;case m:return te=N._init,ve(te(N._payload),P,W,J,ae)}}if(te)return ae=ae(N),te=J===""?"."+I(N,0):J,V(ae)?(W="",te!=null&&(W=te.replace(le,"$&/")+"/"),ve(ae,P,W,"",function(Gt){return Gt})):ae!=null&&(L(ae)&&(ae=H(ae,W+(ae.key==null||N&&N.key===ae.key?"":(""+ae.key).replace(le,"$&/")+"/")+te)),P.push(ae)),1;te=0;var st=J===""?".":J+":";if(V(N))for(var Ne=0;Ne<N.length;Ne++)J=N[Ne],be=st+I(J,Ne),te+=ve(J,P,W,be,ae);else if(Ne=b(N),typeof Ne=="function")for(N=Ne.call(N),Ne=0;!(J=N.next()).done;)J=J.value,be=st+I(J,Ne++),te+=ve(J,P,W,be,ae);else if(be==="object"){if(typeof N.then=="function")return ve(ee(N),P,W,J,ae);throw P=String(N),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return te}function z(N,P,W){if(N==null)return N;var J=[],ae=0;return ve(N,J,"","",function(be){return P.call(W,be,ae++)}),J}function Q(N){if(N._status===-1){var P=N._result;P=P(),P.then(function(W){(N._status===0||N._status===-1)&&(N._status=1,N._result=W)},function(W){(N._status===0||N._status===-1)&&(N._status=2,N._result=W)}),N._status===-1&&(N._status=0,N._result=P)}if(N._status===1)return N._result.default;throw N._result}var se=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function we(){}return de.Children={map:z,forEach:function(N,P,W){z(N,function(){P.apply(this,arguments)},W)},count:function(N){var P=0;return z(N,function(){P++}),P},toArray:function(N){return z(N,function(P){return P})||[]},only:function(N){if(!L(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},de.Component=T,de.Fragment=i,de.Profiler=a,de.PureComponent=k,de.StrictMode=s,de.Suspense=d,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,de.__COMPILER_RUNTIME={__proto__:null,c:function(N){return R.H.useMemoCache(N)}},de.cache=function(N){return function(){return N.apply(null,arguments)}},de.cloneElement=function(N,P,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var J=E({},N.props),ae=N.key,be=void 0;if(P!=null)for(te in P.ref!==void 0&&(be=void 0),P.key!==void 0&&(ae=""+P.key),P)!G.call(P,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&P.ref===void 0||(J[te]=P[te]);var te=arguments.length-2;if(te===1)J.children=W;else if(1<te){for(var st=Array(te),Ne=0;Ne<te;Ne++)st[Ne]=arguments[Ne+2];J.children=st}return Z(N.type,ae,void 0,void 0,be,J)},de.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:o,_context:N},N},de.createElement=function(N,P,W){var J,ae={},be=null;if(P!=null)for(J in P.key!==void 0&&(be=""+P.key),P)G.call(P,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ae[J]=P[J]);var te=arguments.length-2;if(te===1)ae.children=W;else if(1<te){for(var st=Array(te),Ne=0;Ne<te;Ne++)st[Ne]=arguments[Ne+2];ae.children=st}if(N&&N.defaultProps)for(J in te=N.defaultProps,te)ae[J]===void 0&&(ae[J]=te[J]);return Z(N,be,void 0,void 0,null,ae)},de.createRef=function(){return{current:null}},de.forwardRef=function(N){return{$$typeof:f,render:N}},de.isValidElement=L,de.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Q}},de.memo=function(N,P){return{$$typeof:p,type:N,compare:P===void 0?null:P}},de.startTransition=function(N){var P=R.T,W={};R.T=W;try{var J=N(),ae=R.S;ae!==null&&ae(W,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(we,se)}catch(be){se(be)}finally{R.T=P}},de.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},de.use=function(N){return R.H.use(N)},de.useActionState=function(N,P,W){return R.H.useActionState(N,P,W)},de.useCallback=function(N,P){return R.H.useCallback(N,P)},de.useContext=function(N){return R.H.useContext(N)},de.useDebugValue=function(){},de.useDeferredValue=function(N,P){return R.H.useDeferredValue(N,P)},de.useEffect=function(N,P,W){var J=R.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return J.useEffect(N,P)},de.useId=function(){return R.H.useId()},de.useImperativeHandle=function(N,P,W){return R.H.useImperativeHandle(N,P,W)},de.useInsertionEffect=function(N,P){return R.H.useInsertionEffect(N,P)},de.useLayoutEffect=function(N,P){return R.H.useLayoutEffect(N,P)},de.useMemo=function(N,P){return R.H.useMemo(N,P)},de.useOptimistic=function(N,P){return R.H.useOptimistic(N,P)},de.useReducer=function(N,P,W){return R.H.useReducer(N,P,W)},de.useRef=function(N){return R.H.useRef(N)},de.useState=function(N){return R.H.useState(N)},de.useSyncExternalStore=function(N,P,W){return R.H.useSyncExternalStore(N,P,W)},de.useTransition=function(){return R.H.useTransition()},de.version="19.1.1",de}var vy;function Bh(){return vy||(vy=1,Xf.exports=Dw()),Xf.exports}var q=Bh();const mt=Rw(q);function Yo(n,e,i,s){const[a,o]=mt.useState(i);return mt.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),a}function cs(){const n=mt.useRef(null),[e]=mh(n);return[e,n]}function mh(n){const[e,i]=mt.useState(new DOMRect(0,0,10,10)),s=mt.useCallback(()=>{const a=n==null?void 0:n.current;a&&i(a.getBoundingClientRect())},[n]);return mt.useLayoutEffect(()=>{const a=n==null?void 0:n.current;if(!a)return;s();const o=new ResizeObserver(s);return o.observe(a),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,n]),[e,s]}function _t(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0)+"ms";const e=n/1e3;if(e<60)return e.toFixed(1)+"s";const i=e/60;if(i<60)return i.toFixed(1)+"m";const s=i/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function Bw(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0);const e=n/1024;if(e<1e3)return e.toFixed(1)+"K";const i=e/1024;return i<1e3?i.toFixed(1)+"M":(i/1024).toFixed(1)+"G"}function E0(n,e,i,s,a){let o=0,u=n.length;for(;o<u;){const f=o+u>>1;i(e,n[f])>=0?o=f+1:u=f}return u}function Sy(n){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function pn(n,e){n&&(e=es.getObject(n,e));const[i,s]=mt.useState(e),a=mt.useCallback(o=>{n?es.setObject(n,o):s(o)},[n,s]);return mt.useEffect(()=>{if(n){const o=()=>s(es.getObject(n,e));return es.onChangeEmitter.addEventListener(n,o),()=>es.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,a]}const yh=new Map,A0=new Map;let Xo;function _i(n,e){const[i,s]=mt.useState();A0.set(n,{setter:s,defaultValue:e});const a=mt.useCallback(o=>{const u=yh.get(Xo||"default")||{};u[n]=o,yh.set(Xo||"default",u),s(o)},[n]);return[i,a]}function Uw(n){if(Xo===n)return;Xo=n;const e=yh.get(n)||{};for(const[i,s]of A0.entries())s.setter(e[i]||s.defaultValue)}class zw{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var s;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var s;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const es=new zw;function Ke(...n){return n.filter(Boolean).join(" ")}function N0(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const wy="\\u0000-\\u0020\\u007f-\\u009f",C0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+wy+'"]{2,}[^\\s'+wy+`"')}\\],:;.!?]`,"ug");function Hw(){const[n,e]=mt.useState(!1),i=mt.useCallback(()=>{const s=[];return e(a=>(s.push(setTimeout(()=>e(!1),1e3)),a?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,i]}function e2(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",s=>{s.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",s=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";es.getString("theme",e)==="dark-mode"?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.add("light-mode")}const Uh=new Set;function qw(){const n=bh(),e=n==="dark-mode"?"light-mode":"dark-mode";document.documentElement.classList.remove(n),document.documentElement.classList.add(e),es.setString("theme",e);for(const i of Uh)i(e)}function t2(n){Uh.add(n)}function n2(n){Uh.delete(n)}function bh(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":"light-mode"}function $w(){const[n,e]=mt.useState(bh()==="dark-mode");return[n,i=>{bh()==="dark-mode"!==i&&qw(),e(i)}]}var Pf={exports:{}},ka={},Ff={exports:{}},Qf={};/**
19
19
  * @license React
20
20
  * scheduler.production.js
21
21
  *
@@ -23,7 +23,7 @@ var Cw=Object.defineProperty;var kw=(n,e,i)=>e in n?Cw(n,e,{enumerable:!0,config
23
23
  *
24
24
  * This source code is licensed under the MIT license found in the
25
25
  * LICENSE file in the root directory of this source tree.
26
- */var xy;function qw(){return xy||(xy=1,(function(n){function e(z,Q){var se=z.length;z.push(Q);e:for(;0<se;){var we=se-1>>>1,N=z[we];if(0<a(N,Q))z[we]=Q,z[se]=N,se=we;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var Q=z[0],se=z.pop();if(se!==Q){z[0]=se;e:for(var we=0,N=z.length,P=N>>>1;we<P;){var W=2*(we+1)-1,J=z[W],ae=W+1,be=z[ae];if(0>a(J,se))ae<N&&0>a(be,J)?(z[we]=be,z[ae]=se,we=ae):(z[we]=J,z[W]=se,we=W);else if(ae<N&&0>a(be,se))z[we]=be,z[ae]=se,we=ae;else break e}}return Q}function a(z,Q){var se=z.sortIndex-Q.sortIndex;return se!==0?se:z.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,b=3,v=!1,E=!1,x=!1,T=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function V(z){for(var Q=i(p);Q!==null;){if(Q.callback===null)s(p);else if(Q.startTime<=z)s(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=i(p)}}function R(z){if(x=!1,V(z),!E)if(i(d)!==null)E=!0,G||(G=!0,I());else{var Q=i(p);Q!==null&&ve(R,Q.startTime-z)}}var G=!1,Z=-1,H=5,L=-1;function ie(){return T?!0:!(n.unstable_now()-L<H)}function le(){if(T=!1,G){var z=n.unstable_now();L=z;var Q=!0;try{e:{E=!1,x&&(x=!1,k(Z),Z=-1),v=!0;var se=b;try{t:{for(V(z),y=i(d);y!==null&&!(y.expirationTime>z&&ie());){var we=y.callback;if(typeof we=="function"){y.callback=null,b=y.priorityLevel;var N=we(y.expirationTime<=z);if(z=n.unstable_now(),typeof N=="function"){y.callback=N,V(z),Q=!0;break t}y===i(d)&&s(d),V(z)}else s(d);y=i(d)}if(y!==null)Q=!0;else{var P=i(p);P!==null&&ve(R,P.startTime-z),Q=!1}}break e}finally{y=null,b=se,v=!1}Q=void 0}}finally{Q?I():G=!1}}}var I;if(typeof $=="function")I=function(){$(le)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ee=F.port2;F.port1.onmessage=le,I=function(){ee.postMessage(null)}}else I=function(){C(le,0)};function ve(z,Q){Z=C(function(){z(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(z){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var se=b;b=Q;try{return z()}finally{b=se}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(z,Q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var se=b;b=z;try{return Q()}finally{b=se}},n.unstable_scheduleCallback=function(z,Q,se){var we=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?we+se:we):se=we,z){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=se+N,z={id:m++,callback:Q,priorityLevel:z,startTime:se,expirationTime:N,sortIndex:-1},se>we?(z.sortIndex=se,e(p,z),i(d)===null&&z===i(p)&&(x?(k(Z),Z=-1):x=!0,ve(R,se-we))):(z.sortIndex=N,e(d,z),E||v||(E=!0,G||(G=!0,I()))),z},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(z){var Q=b;return function(){var se=b;b=Q;try{return z.apply(this,arguments)}finally{b=se}}}})(Qf)),Qf}var _y;function $w(){return _y||(_y=1,Ff.exports=qw()),Ff.exports}var Zf={exports:{}},pt={};/**
26
+ */var xy;function Iw(){return xy||(xy=1,(function(n){function e(z,Q){var se=z.length;z.push(Q);e:for(;0<se;){var we=se-1>>>1,N=z[we];if(0<a(N,Q))z[we]=Q,z[se]=N,se=we;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var Q=z[0],se=z.pop();if(se!==Q){z[0]=se;e:for(var we=0,N=z.length,P=N>>>1;we<P;){var W=2*(we+1)-1,J=z[W],ae=W+1,be=z[ae];if(0>a(J,se))ae<N&&0>a(be,J)?(z[we]=be,z[ae]=se,we=ae):(z[we]=J,z[W]=se,we=W);else if(ae<N&&0>a(be,se))z[we]=be,z[ae]=se,we=ae;else break e}}return Q}function a(z,Q){var se=z.sortIndex-Q.sortIndex;return se!==0?se:z.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,b=3,v=!1,E=!1,x=!1,T=!1,C=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function V(z){for(var Q=i(p);Q!==null;){if(Q.callback===null)s(p);else if(Q.startTime<=z)s(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=i(p)}}function R(z){if(x=!1,V(z),!E)if(i(d)!==null)E=!0,G||(G=!0,I());else{var Q=i(p);Q!==null&&ve(R,Q.startTime-z)}}var G=!1,Z=-1,H=5,L=-1;function ie(){return T?!0:!(n.unstable_now()-L<H)}function le(){if(T=!1,G){var z=n.unstable_now();L=z;var Q=!0;try{e:{E=!1,x&&(x=!1,k(Z),Z=-1),v=!0;var se=b;try{t:{for(V(z),y=i(d);y!==null&&!(y.expirationTime>z&&ie());){var we=y.callback;if(typeof we=="function"){y.callback=null,b=y.priorityLevel;var N=we(y.expirationTime<=z);if(z=n.unstable_now(),typeof N=="function"){y.callback=N,V(z),Q=!0;break t}y===i(d)&&s(d),V(z)}else s(d);y=i(d)}if(y!==null)Q=!0;else{var P=i(p);P!==null&&ve(R,P.startTime-z),Q=!1}}break e}finally{y=null,b=se,v=!1}Q=void 0}}finally{Q?I():G=!1}}}var I;if(typeof $=="function")I=function(){$(le)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ee=F.port2;F.port1.onmessage=le,I=function(){ee.postMessage(null)}}else I=function(){C(le,0)};function ve(z,Q){Z=C(function(){z(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(z){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var se=b;b=Q;try{return z()}finally{b=se}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(z,Q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var se=b;b=z;try{return Q()}finally{b=se}},n.unstable_scheduleCallback=function(z,Q,se){var we=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?we+se:we):se=we,z){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=se+N,z={id:m++,callback:Q,priorityLevel:z,startTime:se,expirationTime:N,sortIndex:-1},se>we?(z.sortIndex=se,e(p,z),i(d)===null&&z===i(p)&&(x?(k(Z),Z=-1):x=!0,ve(R,se-we))):(z.sortIndex=N,e(d,z),E||v||(E=!0,G||(G=!0,I()))),z},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(z){var Q=b;return function(){var se=b;b=Q;try{return z.apply(this,arguments)}finally{b=se}}}})(Qf)),Qf}var _y;function Vw(){return _y||(_y=1,Ff.exports=Iw()),Ff.exports}var Zf={exports:{}},pt={};/**
27
27
  * @license React
28
28
  * react-dom.production.js
29
29
  *
@@ -31,7 +31,7 @@ var Cw=Object.defineProperty;var kw=(n,e,i)=>e in n?Cw(n,e,{enumerable:!0,config
31
31
  *
32
32
  * This source code is licensed under the MIT license found in the
33
33
  * LICENSE file in the root directory of this source tree.
34
- */var Ty;function Iw(){if(Ty)return pt;Ty=1;var n=Bh();function e(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,p,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:p,implementation:m}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,pt.createPortal=function(d,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return o(d,p,null,m)},pt.flushSync=function(d){var p=u.T,m=s.p;try{if(u.T=null,s.p=2,d)return d()}finally{u.T=p,s.p=m,s.d.f()}},pt.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(d,p))},pt.prefetchDNS=function(d){typeof d=="string"&&s.d.D(d)},pt.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?s.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):m==="script"&&s.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},pt.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);s.d.M(d,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(d)},pt.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin);s.d.L(d,m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},pt.preloadModule=function(d,p){if(typeof d=="string")if(p){var m=f(p.as,p.crossOrigin);s.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(d)},pt.requestFormReset=function(d){s.d.r(d)},pt.unstable_batchedUpdates=function(d,p){return d(p)},pt.useFormState=function(d,p,m){return u.H.useFormState(d,p,m)},pt.useFormStatus=function(){return u.H.useHostTransitionStatus()},pt.version="19.1.1",pt}var Ey;function Vw(){if(Ey)return Zf.exports;Ey=1;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)}}return n(),Zf.exports=Iw(),Zf.exports}/**
34
+ */var Ty;function Gw(){if(Ty)return pt;Ty=1;var n=Bh();function e(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,p,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:p,implementation:m}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,pt.createPortal=function(d,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return o(d,p,null,m)},pt.flushSync=function(d){var p=u.T,m=s.p;try{if(u.T=null,s.p=2,d)return d()}finally{u.T=p,s.p=m,s.d.f()}},pt.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(d,p))},pt.prefetchDNS=function(d){typeof d=="string"&&s.d.D(d)},pt.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?s.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):m==="script"&&s.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},pt.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);s.d.M(d,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(d)},pt.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin);s.d.L(d,m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},pt.preloadModule=function(d,p){if(typeof d=="string")if(p){var m=f(p.as,p.crossOrigin);s.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(d)},pt.requestFormReset=function(d){s.d.r(d)},pt.unstable_batchedUpdates=function(d,p){return d(p)},pt.useFormState=function(d,p,m){return u.H.useFormState(d,p,m)},pt.useFormStatus=function(){return u.H.useHostTransitionStatus()},pt.version="19.1.1",pt}var Ey;function Kw(){if(Ey)return Zf.exports;Ey=1;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)}}return n(),Zf.exports=Gw(),Zf.exports}/**
35
35
  * @license React
36
36
  * react-dom-client.production.js
37
37
  *
@@ -39,48 +39,48 @@ var Cw=Object.defineProperty;var kw=(n,e,i)=>e in n?Cw(n,e,{enumerable:!0,config
39
39
  *
40
40
  * This source code is licensed under the MIT license found in the
41
41
  * LICENSE file in the root directory of this source tree.
42
- */var Ay;function Gw(){if(Ay)return ka;Ay=1;var n=$w(),e=Bh(),i=Vw();function s(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,l=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(l=r.return),t=r.return;while(t)}return r.tag===3?l:null}function u(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(s(188))}function d(t){var r=t.alternate;if(!r){if(r=o(t),r===null)throw Error(s(188));return r!==t?null:t}for(var l=t,c=r;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return f(h),t;if(g===c)return f(h),r;g=g.sibling}throw Error(s(188))}if(l.return!==c.return)l=h,c=g;else{for(var w=!1,_=h.child;_;){if(_===l){w=!0,l=h,c=g;break}if(_===c){w=!0,c=h,l=g;break}_=_.sibling}if(!w){for(_=g.child;_;){if(_===l){w=!0,l=g,c=h;break}if(_===c){w=!0,c=g,l=h;break}_=_.sibling}if(!w)throw Error(s(189))}}if(l.alternate!==c)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?t:r}function p(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=p(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),$=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function I(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var F=Symbol.for("react.client.reference");function ee(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===F?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case E:return"Fragment";case T:return"Profiler";case x:return"StrictMode";case R:return"Suspense";case G:return"SuspenseList";case L:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case v:return"Portal";case $:return(t.displayName||"Context")+".Provider";case k:return(t._context.displayName||"Context")+".Consumer";case V:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return r=t.displayName||null,r!==null?r:ee(t.type)||"Memo";case H:r=t._payload,t=t._init;try{return ee(t(r))}catch{}}return null}var ve=Array.isArray,z=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},we=[],N=-1;function P(t){return{current:t}}function W(t){0>N||(t.current=we[N],we[N]=null,N--)}function J(t,r){N++,we[N]=t.current,t.current=r}var ae=P(null),be=P(null),te=P(null),st=P(null);function Ne(t,r){switch(J(te,r),J(be,t),J(ae,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Gm(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Gm(r),t=Km(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(ae),J(ae,t)}function Gt(){W(ae),W(be),W(te)}function Or(t){t.memoizedState!==null&&J(st,t);var r=ae.current,l=Km(r,t.type);r!==l&&(J(be,t),J(ae,l))}function En(t){be.current===t&&(W(ae),W(be)),st.current===t&&(W(st),_a._currentValue=se)}var on=Object.prototype.hasOwnProperty,ds=n.unstable_scheduleCallback,bt=n.unstable_cancelCallback,cl=n.unstable_shouldYield,kc=n.unstable_requestPaint,Kt=n.unstable_now,Rr=n.unstable_getCurrentPriorityLevel,ps=n.unstable_ImmediatePriority,Oi=n.unstable_UserBlockingPriority,gs=n.unstable_NormalPriority,Qn=n.unstable_LowPriority,ul=n.unstable_IdlePriority,Mc=n.log,Oc=n.unstable_setDisableYieldValue,Ri=null,ft=null;function Yt(t){if(typeof Mc=="function"&&Oc(t),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(Ri,t)}catch{}}var vt=Math.clz32?Math.clz32:Li,Rc=Math.log,Lc=Math.LN2;function Li(t){return t>>>=0,t===0?32:31-(Rc(t)/Lc|0)|0}var Zn=256,An=4194304;function Nn(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ms(t,r,l){var c=t.pendingLanes;if(c===0)return 0;var h=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var _=c&134217727;return _!==0?(c=_&~g,c!==0?h=Nn(c):(w&=_,w!==0?h=Nn(w):l||(l=_&~t,l!==0&&(h=Nn(l))))):(_=c&~g,_!==0?h=Nn(_):w!==0?h=Nn(w):l||(l=c&~t,l!==0&&(h=Nn(l)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,l=r&-r,g>=l||g===32&&(l&4194048)!==0)?r:h}function Jn(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function ue(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Wn(){var t=Zn;return Zn<<=1,(Zn&4194048)===0&&(Zn=256),t}function mn(){var t=An;return An<<=1,(An&62914560)===0&&(An=4194304),t}function jc(t){for(var r=[],l=0;31>l;l++)r.push(t);return r}function Lr(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function mS(t,r,l,c,h,g){var w=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var _=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(l=w&~l;0<l;){var K=31-vt(l),X=1<<K;_[K]=0,A[K]=-1;var B=D[K];if(B!==null)for(D[K]=null,K=0;K<B.length;K++){var U=B[K];U!==null&&(U.lane&=-536870913)}l&=~X}c!==0&&kd(t,c,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~r))}function kd(t,r,l){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-vt(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|l&4194090}function Md(t,r){var l=t.entangledLanes|=r;for(t=t.entanglements;l;){var c=31-vt(l),h=1<<c;h&r|t[c]&r&&(t[c]|=r),l&=~h}}function Dc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Bc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Od(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:uy(t.type))}function yS(t,r){var l=Q.p;try{return Q.p=t,r()}finally{Q.p=l}}var ei=Math.random().toString(36).slice(2),ht="__reactFiber$"+ei,Et="__reactProps$"+ei,ys="__reactContainer$"+ei,Uc="__reactEvents$"+ei,bS="__reactListeners$"+ei,vS="__reactHandles$"+ei,Rd="__reactResources$"+ei,jr="__reactMarker$"+ei;function zc(t){delete t[ht],delete t[Et],delete t[Uc],delete t[bS],delete t[vS]}function bs(t){var r=t[ht];if(r)return r;for(var l=t.parentNode;l;){if(r=l[ys]||l[ht]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=Fm(t);t!==null;){if(l=t[ht])return l;t=Fm(t)}return r}t=l,l=t.parentNode}return null}function vs(t){if(t=t[ht]||t[ys]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function Dr(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(s(33))}function Ss(t){var r=t[Rd];return r||(r=t[Rd]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function We(t){t[jr]=!0}var Ld=new Set,jd={};function ji(t,r){ws(t,r),ws(t+"Capture",r)}function ws(t,r){for(jd[t]=r,t=0;t<r.length;t++)Ld.add(r[t])}var SS=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]*$"),Dd={},Bd={};function wS(t){return on.call(Bd,t)?!0:on.call(Dd,t)?!1:SS.test(t)?Bd[t]=!0:(Dd[t]=!0,!1)}function fl(t,r,l){if(wS(r))if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+l)}}function hl(t,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+l)}}function Cn(t,r,l,c){if(c===null)t.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(r,l,""+c)}}var Hc,Ud;function xs(t){if(Hc===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Hc=r&&r[1]||"",Ud=-1<l.stack.indexOf(`
42
+ */var Ay;function Yw(){if(Ay)return ka;Ay=1;var n=Vw(),e=Bh(),i=Kw();function s(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,l=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(l=r.return),t=r.return;while(t)}return r.tag===3?l:null}function u(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(s(188))}function d(t){var r=t.alternate;if(!r){if(r=o(t),r===null)throw Error(s(188));return r!==t?null:t}for(var l=t,c=r;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return f(h),t;if(g===c)return f(h),r;g=g.sibling}throw Error(s(188))}if(l.return!==c.return)l=h,c=g;else{for(var w=!1,_=h.child;_;){if(_===l){w=!0,l=h,c=g;break}if(_===c){w=!0,c=h,l=g;break}_=_.sibling}if(!w){for(_=g.child;_;){if(_===l){w=!0,l=g,c=h;break}if(_===c){w=!0,c=g,l=h;break}_=_.sibling}if(!w)throw Error(s(189))}}if(l.alternate!==c)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?t:r}function p(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=p(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),$=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function I(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var F=Symbol.for("react.client.reference");function ee(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===F?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case E:return"Fragment";case T:return"Profiler";case x:return"StrictMode";case R:return"Suspense";case G:return"SuspenseList";case L:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case v:return"Portal";case $:return(t.displayName||"Context")+".Provider";case k:return(t._context.displayName||"Context")+".Consumer";case V:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return r=t.displayName||null,r!==null?r:ee(t.type)||"Memo";case H:r=t._payload,t=t._init;try{return ee(t(r))}catch{}}return null}var ve=Array.isArray,z=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},we=[],N=-1;function P(t){return{current:t}}function W(t){0>N||(t.current=we[N],we[N]=null,N--)}function J(t,r){N++,we[N]=t.current,t.current=r}var ae=P(null),be=P(null),te=P(null),st=P(null);function Ne(t,r){switch(J(te,r),J(be,t),J(ae,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Gm(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Gm(r),t=Km(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(ae),J(ae,t)}function Gt(){W(ae),W(be),W(te)}function Or(t){t.memoizedState!==null&&J(st,t);var r=ae.current,l=Km(r,t.type);r!==l&&(J(be,t),J(ae,l))}function En(t){be.current===t&&(W(ae),W(be)),st.current===t&&(W(st),_a._currentValue=se)}var on=Object.prototype.hasOwnProperty,ds=n.unstable_scheduleCallback,bt=n.unstable_cancelCallback,ul=n.unstable_shouldYield,kc=n.unstable_requestPaint,Kt=n.unstable_now,Rr=n.unstable_getCurrentPriorityLevel,ps=n.unstable_ImmediatePriority,Oi=n.unstable_UserBlockingPriority,gs=n.unstable_NormalPriority,Qn=n.unstable_LowPriority,fl=n.unstable_IdlePriority,Mc=n.log,Oc=n.unstable_setDisableYieldValue,Ri=null,ft=null;function Yt(t){if(typeof Mc=="function"&&Oc(t),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(Ri,t)}catch{}}var vt=Math.clz32?Math.clz32:Li,Rc=Math.log,Lc=Math.LN2;function Li(t){return t>>>=0,t===0?32:31-(Rc(t)/Lc|0)|0}var Zn=256,An=4194304;function Nn(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ms(t,r,l){var c=t.pendingLanes;if(c===0)return 0;var h=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var _=c&134217727;return _!==0?(c=_&~g,c!==0?h=Nn(c):(w&=_,w!==0?h=Nn(w):l||(l=_&~t,l!==0&&(h=Nn(l))))):(_=c&~g,_!==0?h=Nn(_):w!==0?h=Nn(w):l||(l=c&~t,l!==0&&(h=Nn(l)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,l=r&-r,g>=l||g===32&&(l&4194048)!==0)?r:h}function Jn(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function ue(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Wn(){var t=Zn;return Zn<<=1,(Zn&4194048)===0&&(Zn=256),t}function mn(){var t=An;return An<<=1,(An&62914560)===0&&(An=4194304),t}function jc(t){for(var r=[],l=0;31>l;l++)r.push(t);return r}function Lr(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function bS(t,r,l,c,h,g){var w=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var _=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(l=w&~l;0<l;){var K=31-vt(l),X=1<<K;_[K]=0,A[K]=-1;var B=D[K];if(B!==null)for(D[K]=null,K=0;K<B.length;K++){var U=B[K];U!==null&&(U.lane&=-536870913)}l&=~X}c!==0&&kd(t,c,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~r))}function kd(t,r,l){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-vt(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|l&4194090}function Md(t,r){var l=t.entangledLanes|=r;for(t=t.entanglements;l;){var c=31-vt(l),h=1<<c;h&r|t[c]&r&&(t[c]|=r),l&=~h}}function Dc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Bc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Od(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:uy(t.type))}function vS(t,r){var l=Q.p;try{return Q.p=t,r()}finally{Q.p=l}}var ei=Math.random().toString(36).slice(2),ht="__reactFiber$"+ei,Et="__reactProps$"+ei,ys="__reactContainer$"+ei,Uc="__reactEvents$"+ei,SS="__reactListeners$"+ei,wS="__reactHandles$"+ei,Rd="__reactResources$"+ei,jr="__reactMarker$"+ei;function zc(t){delete t[ht],delete t[Et],delete t[Uc],delete t[SS],delete t[wS]}function bs(t){var r=t[ht];if(r)return r;for(var l=t.parentNode;l;){if(r=l[ys]||l[ht]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=Fm(t);t!==null;){if(l=t[ht])return l;t=Fm(t)}return r}t=l,l=t.parentNode}return null}function vs(t){if(t=t[ht]||t[ys]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function Dr(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(s(33))}function Ss(t){var r=t[Rd];return r||(r=t[Rd]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function We(t){t[jr]=!0}var Ld=new Set,jd={};function ji(t,r){ws(t,r),ws(t+"Capture",r)}function ws(t,r){for(jd[t]=r,t=0;t<r.length;t++)Ld.add(r[t])}var xS=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]*$"),Dd={},Bd={};function _S(t){return on.call(Bd,t)?!0:on.call(Dd,t)?!1:xS.test(t)?Bd[t]=!0:(Dd[t]=!0,!1)}function hl(t,r,l){if(_S(r))if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+l)}}function dl(t,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+l)}}function Cn(t,r,l,c){if(c===null)t.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(r,l,""+c)}}var Hc,Ud;function xs(t){if(Hc===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Hc=r&&r[1]||"",Ud=-1<l.stack.indexOf(`
43
43
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
44
44
  `+Hc+t+Ud}var qc=!1;function $c(t,r){if(!t||qc)return"";qc=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(U){var B=U}Reflect.construct(t,[],X)}else{try{X.call()}catch(U){B=U}t.call(X.prototype)}}else{try{throw Error()}catch(U){B=U}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(U){if(U&&B&&typeof U.stack=="string")return[U.stack,B.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),w=g[0],_=g[1];if(w&&_){var A=w.split(`
45
45
  `),D=_.split(`
46
46
  `);for(h=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;h<D.length&&!D[h].includes("DetermineComponentFrameRoot");)h++;if(c===A.length||h===D.length)for(c=A.length-1,h=D.length-1;1<=c&&0<=h&&A[c]!==D[h];)h--;for(;1<=c&&0<=h;c--,h--)if(A[c]!==D[h]){if(c!==1||h!==1)do if(c--,h--,0>h||A[c]!==D[h]){var K=`
47
- `+A[c].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),K}while(1<=c&&0<=h);break}}}finally{qc=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?xs(l):""}function xS(t){switch(t.tag){case 26:case 27:case 5:return xs(t.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 15:return $c(t.type,!1);case 11:return $c(t.type.render,!1);case 1:return $c(t.type,!0);case 31:return xs("Activity");default:return""}}function zd(t){try{var r="";do r+=xS(t),t=t.return;while(t);return r}catch(l){return`
47
+ `+A[c].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),K}while(1<=c&&0<=h);break}}}finally{qc=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?xs(l):""}function TS(t){switch(t.tag){case 26:case 27:case 5:return xs(t.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 15:return $c(t.type,!1);case 11:return $c(t.type.render,!1);case 1:return $c(t.type,!0);case 31:return xs("Activity");default:return""}}function zd(t){try{var r="";do r+=TS(t),t=t.return;while(t);return r}catch(l){return`
48
48
  Error generating stack: `+l.message+`
49
- `+l.stack}}function Xt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Hd(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function _S(t){var r=Hd(t)?"checked":"value",l=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,g=l.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(t,r,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function dl(t){t._valueTracker||(t._valueTracker=_S(t))}function qd(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),c="";return t&&(c=Hd(t)?t.checked?"true":"false":t.value),t=c,t!==l?(r.setValue(t),!0):!1}function pl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var TS=/[\n"\\]/g;function Pt(t){return t.replace(TS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ic(t,r,l,c,h,g,w,_){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),r!=null?w==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Xt(r)):t.value!==""+Xt(r)&&(t.value=""+Xt(r)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),r!=null?Vc(t,w,Xt(r)):l!=null?Vc(t,w,Xt(l)):c!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Xt(_):t.removeAttribute("name")}function $d(t,r,l,c,h,g,w,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;l=l!=null?""+Xt(l):"",r=r!=null?""+Xt(r):l,_||r===t.value||(t.value=r),t.defaultValue=r}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=_?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w)}function Vc(t,r,l){r==="number"&&pl(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function _s(t,r,l,c){if(t=t.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=r.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&c&&(t[l].defaultSelected=!0)}else{for(l=""+Xt(l),r=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Id(t,r,l){if(r!=null&&(r=""+Xt(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+Xt(l):""}function Vd(t,r,l,c){if(r==null){if(c!=null){if(l!=null)throw Error(s(92));if(ve(c)){if(1<c.length)throw Error(s(93));c=c[0]}l=c}l==null&&(l=""),r=l}l=Xt(r),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c)}function Ts(t,r){if(r){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=r;return}}t.textContent=r}var ES=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 Gd(t,r,l){var c=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,l):typeof l!="number"||l===0||ES.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function Kd(t,r,l){if(r!=null&&typeof r!="object")throw Error(s(62));if(t=t.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in r)c=r[h],r.hasOwnProperty(h)&&l[h]!==c&&Gd(t,h,c)}else for(var g in r)r.hasOwnProperty(g)&&Gd(t,g,r[g])}function Gc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 AS=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"]]),NS=/^[\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 gl(t){return NS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Kc=null;function Yc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Es=null,As=null;function Yd(t){var r=vs(t);if(r&&(t=r.stateNode)){var l=t[Et]||null;e:switch(t=r.stateNode,r.type){case"input":if(Ic(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Pt(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var c=l[r];if(c!==t&&c.form===t.form){var h=c[Et]||null;if(!h)throw Error(s(90));Ic(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)c=l[r],c.form===t.form&&qd(c)}break e;case"textarea":Id(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&_s(t,!!l.multiple,r,!1)}}}var Xc=!1;function Xd(t,r,l){if(Xc)return t(r,l);Xc=!0;try{var c=t(r);return c}finally{if(Xc=!1,(Es!==null||As!==null)&&(eo(),Es&&(r=Es,t=As,As=Es=null,Yd(r),t)))for(r=0;r<t.length;r++)Yd(t[r])}}function Br(t,r){var l=t.stateNode;if(l===null)return null;var c=l[Et]||null;if(c===null)return null;l=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(s(231,r,typeof l));return l}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pc=!1;if(kn)try{var Ur={};Object.defineProperty(Ur,"passive",{get:function(){Pc=!0}}),window.addEventListener("test",Ur,Ur),window.removeEventListener("test",Ur,Ur)}catch{Pc=!1}var ti=null,Fc=null,ml=null;function Pd(){if(ml)return ml;var t,r=Fc,l=r.length,c,h="value"in ti?ti.value:ti.textContent,g=h.length;for(t=0;t<l&&r[t]===h[t];t++);var w=l-t;for(c=1;c<=w&&r[l-c]===h[g-c];c++);return ml=h.slice(t,1<c?1-c:void 0)}function yl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function bl(){return!0}function Fd(){return!1}function At(t){function r(l,c,h,g,w){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(l=t[_],this[_]=l?l(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?bl:Fd,this.isPropagationStopped=Fd,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=bl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),r}var Di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vl=At(Di),zr=m({},Di,{view:0,detail:0}),CS=At(zr),Qc,Zc,Hr,Sl=m({},zr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Hr&&(Hr&&t.type==="mousemove"?(Qc=t.screenX-Hr.screenX,Zc=t.screenY-Hr.screenY):Zc=Qc=0,Hr=t),Qc)},movementY:function(t){return"movementY"in t?t.movementY:Zc}}),Qd=At(Sl),kS=m({},Sl,{dataTransfer:0}),MS=At(kS),OS=m({},zr,{relatedTarget:0}),Jc=At(OS),RS=m({},Di,{animationName:0,elapsedTime:0,pseudoElement:0}),LS=At(RS),jS=m({},Di,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),DS=At(jS),BS=m({},Di,{data:0}),Zd=At(BS),US={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zS={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"},HS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=HS[t])?!!r[t]:!1}function Wc(){return qS}var $S=m({},zr,{key:function(t){if(t.key){var r=US[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=yl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?zS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?yl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?yl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),IS=At($S),VS=m({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jd=At(VS),GS=m({},zr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),KS=At(GS),YS=m({},Di,{propertyName:0,elapsedTime:0,pseudoElement:0}),XS=At(YS),PS=m({},Sl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),FS=At(PS),QS=m({},Di,{newState:0,oldState:0}),ZS=At(QS),JS=[9,13,27,32],eu=kn&&"CompositionEvent"in window,qr=null;kn&&"documentMode"in document&&(qr=document.documentMode);var WS=kn&&"TextEvent"in window&&!qr,Wd=kn&&(!eu||qr&&8<qr&&11>=qr),ep=" ",tp=!1;function np(t,r){switch(t){case"keyup":return JS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ip(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ns=!1;function e1(t,r){switch(t){case"compositionend":return ip(r);case"keypress":return r.which!==32?null:(tp=!0,ep);case"textInput":return t=r.data,t===ep&&tp?null:t;default:return null}}function t1(t,r){if(Ns)return t==="compositionend"||!eu&&np(t,r)?(t=Pd(),ml=Fc=ti=null,Ns=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Wd&&r.locale!=="ko"?null:r.data;default:return null}}var n1={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 sp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!n1[t.type]:r==="textarea"}function rp(t,r,l,c){Es?As?As.push(c):As=[c]:Es=c,r=ao(r,"onChange"),0<r.length&&(l=new vl("onChange","change",null,l,c),t.push({event:l,listeners:r}))}var $r=null,Ir=null;function i1(t){Hm(t,0)}function wl(t){var r=Dr(t);if(qd(r))return t}function ap(t,r){if(t==="change")return r}var lp=!1;if(kn){var tu;if(kn){var nu="oninput"in document;if(!nu){var op=document.createElement("div");op.setAttribute("oninput","return;"),nu=typeof op.oninput=="function"}tu=nu}else tu=!1;lp=tu&&(!document.documentMode||9<document.documentMode)}function cp(){$r&&($r.detachEvent("onpropertychange",up),Ir=$r=null)}function up(t){if(t.propertyName==="value"&&wl(Ir)){var r=[];rp(r,Ir,t,Yc(t)),Xd(i1,r)}}function s1(t,r,l){t==="focusin"?(cp(),$r=r,Ir=l,$r.attachEvent("onpropertychange",up)):t==="focusout"&&cp()}function r1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return wl(Ir)}function a1(t,r){if(t==="click")return wl(r)}function l1(t,r){if(t==="input"||t==="change")return wl(r)}function o1(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Bt=typeof Object.is=="function"?Object.is:o1;function Vr(t,r){if(Bt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var l=Object.keys(t),c=Object.keys(r);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var h=l[c];if(!on.call(r,h)||!Bt(t[h],r[h]))return!1}return!0}function fp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hp(t,r){var l=fp(t);t=0;for(var c;l;){if(l.nodeType===3){if(c=t+l.textContent.length,t<=r&&c>=r)return{node:l,offset:r-t};t=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=fp(l)}}function dp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?dp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function pp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=pl(t.document);r instanceof t.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)t=r.contentWindow;else break;r=pl(t.document)}return r}function iu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var c1=kn&&"documentMode"in document&&11>=document.documentMode,Cs=null,su=null,Gr=null,ru=!1;function gp(t,r,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ru||Cs==null||Cs!==pl(c)||(c=Cs,"selectionStart"in c&&iu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Gr&&Vr(Gr,c)||(Gr=c,c=ao(su,"onSelect"),0<c.length&&(r=new vl("onSelect","select",null,r,l),t.push({event:r,listeners:c}),r.target=Cs)))}function Bi(t,r){var l={};return l[t.toLowerCase()]=r.toLowerCase(),l["Webkit"+t]="webkit"+r,l["Moz"+t]="moz"+r,l}var ks={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},au={},mp={};kn&&(mp=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function Ui(t){if(au[t])return au[t];if(!ks[t])return t;var r=ks[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in mp)return au[t]=r[l];return t}var yp=Ui("animationend"),bp=Ui("animationiteration"),vp=Ui("animationstart"),u1=Ui("transitionrun"),f1=Ui("transitionstart"),h1=Ui("transitioncancel"),Sp=Ui("transitionend"),wp=new Map,lu="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(" ");lu.push("scrollEnd");function cn(t,r){wp.set(t,r),ji(r,[t])}var xp=new WeakMap;function Ft(t,r){if(typeof t=="object"&&t!==null){var l=xp.get(t);return l!==void 0?l:(r={value:t,source:r,stack:zd(r)},xp.set(t,r),r)}return{value:t,source:r,stack:zd(r)}}var Qt=[],Ms=0,ou=0;function xl(){for(var t=Ms,r=ou=Ms=0;r<t;){var l=Qt[r];Qt[r++]=null;var c=Qt[r];Qt[r++]=null;var h=Qt[r];Qt[r++]=null;var g=Qt[r];if(Qt[r++]=null,c!==null&&h!==null){var w=c.pending;w===null?h.next=h:(h.next=w.next,w.next=h),c.pending=h}g!==0&&_p(l,h,g)}}function _l(t,r,l,c){Qt[Ms++]=t,Qt[Ms++]=r,Qt[Ms++]=l,Qt[Ms++]=c,ou|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function cu(t,r,l,c){return _l(t,r,l,c),Tl(t)}function Os(t,r){return _l(t,null,null,r),Tl(t)}function _p(t,r,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,c=g.alternate,c!==null&&(c.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&r!==null&&(h=31-vt(l),t=g.hiddenUpdates,c=t[h],c===null?t[h]=[r]:c.push(r),r.lane=l|536870912),g):null}function Tl(t){if(50<ga)throw ga=0,mf=null,Error(s(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Rs={};function d1(t,r,l,c){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(t,r,l,c){return new d1(t,r,l,c)}function uu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Mn(t,r){var l=t.alternate;return l===null?(l=Ut(t.tag,r,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=r,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,r=t.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Tp(t,r){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,r=l.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function El(t,r,l,c,h,g){var w=0;if(c=t,typeof t=="function")uu(t)&&(w=1);else if(typeof t=="string")w=gw(t,l,ae.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case L:return t=Ut(31,l,r,h),t.elementType=L,t.lanes=g,t;case E:return zi(l.children,h,g,r);case x:w=8,h|=24;break;case T:return t=Ut(12,l,r,h|2),t.elementType=T,t.lanes=g,t;case R:return t=Ut(13,l,r,h),t.elementType=R,t.lanes=g,t;case G:return t=Ut(19,l,r,h),t.elementType=G,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case C:case $:w=10;break e;case k:w=9;break e;case V:w=11;break e;case Z:w=14;break e;case H:w=16,c=null;break e}w=29,l=Error(s(130,t===null?"null":typeof t,"")),c=null}return r=Ut(w,l,r,h),r.elementType=t,r.type=c,r.lanes=g,r}function zi(t,r,l,c){return t=Ut(7,t,c,r),t.lanes=l,t}function fu(t,r,l){return t=Ut(6,t,null,r),t.lanes=l,t}function hu(t,r,l){return r=Ut(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Ls=[],js=0,Al=null,Nl=0,Zt=[],Jt=0,Hi=null,On=1,Rn="";function qi(t,r){Ls[js++]=Nl,Ls[js++]=Al,Al=t,Nl=r}function Ep(t,r,l){Zt[Jt++]=On,Zt[Jt++]=Rn,Zt[Jt++]=Hi,Hi=t;var c=On;t=Rn;var h=32-vt(c)-1;c&=~(1<<h),l+=1;var g=32-vt(r)+h;if(30<g){var w=h-h%5;g=(c&(1<<w)-1).toString(32),c>>=w,h-=w,On=1<<32-vt(r)+h|l<<h|c,Rn=g+t}else On=1<<g|l<<h|c,Rn=t}function du(t){t.return!==null&&(qi(t,1),Ep(t,1,0))}function pu(t){for(;t===Al;)Al=Ls[--js],Ls[js]=null,Nl=Ls[--js],Ls[js]=null;for(;t===Hi;)Hi=Zt[--Jt],Zt[Jt]=null,Rn=Zt[--Jt],Zt[Jt]=null,On=Zt[--Jt],Zt[Jt]=null}var St=null,$e=null,_e=!1,$i=null,yn=!1,gu=Error(s(519));function Ii(t){var r=Error(s(418,""));throw Xr(Ft(r,t)),gu}function Ap(t){var r=t.stateNode,l=t.type,c=t.memoizedProps;switch(r[ht]=t,r[Et]=c,l){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(l=0;l<ya.length;l++)ye(ya[l],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ye("invalid",r),$d(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),dl(r);break;case"select":ye("invalid",r);break;case"textarea":ye("invalid",r),Vd(r,c.value,c.defaultValue,c.children),dl(r)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||c.suppressHydrationWarning===!0||Vm(r.textContent,l)?(c.popover!=null&&(ye("beforetoggle",r),ye("toggle",r)),c.onScroll!=null&&ye("scroll",r),c.onScrollEnd!=null&&ye("scrollend",r),c.onClick!=null&&(r.onclick=lo),r=!0):r=!1,r||Ii(t)}function Np(t){for(St=t.return;St;)switch(St.tag){case 5:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:St=St.return}}function Kr(t){if(t!==St)return!1;if(!_e)return Np(t),_e=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Rf(t.type,t.memoizedProps)),l=!l),l&&$e&&Ii(t),Np(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(l=t.data,l==="/$"){if(r===0){$e=fn(t.nextSibling);break e}r--}else l!=="$"&&l!=="$!"&&l!=="$?"||r++;t=t.nextSibling}$e=null}}else r===27?(r=$e,yi(t.type)?(t=Bf,Bf=null,$e=t):$e=r):$e=St?fn(t.stateNode.nextSibling):null;return!0}function Yr(){$e=St=null,_e=!1}function Cp(){var t=$i;return t!==null&&(kt===null?kt=t:kt.push.apply(kt,t),$i=null),t}function Xr(t){$i===null?$i=[t]:$i.push(t)}var mu=P(null),Vi=null,Ln=null;function ni(t,r,l){J(mu,r._currentValue),r._currentValue=l}function jn(t){t._currentValue=mu.current,W(mu)}function yu(t,r,l){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===l)break;t=t.return}}function bu(t,r,l,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var w=h.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=h;for(var A=0;A<r.length;A++)if(_.context===r[A]){g.lanes|=l,_=g.alternate,_!==null&&(_.lanes|=l),yu(g.return,l,t),c||(w=null);break e}g=_.next}}else if(h.tag===18){if(w=h.return,w===null)throw Error(s(341));w.lanes|=l,g=w.alternate,g!==null&&(g.lanes|=l),yu(w,l,t),w=null}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===t){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}}function Pr(t,r,l,c){t=null;for(var h=r,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var w=h.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var _=h.type;Bt(h.pendingProps.value,w.value)||(t!==null?t.push(_):t=[_])}}else if(h===st.current){if(w=h.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(_a):t=[_a])}h=h.return}t!==null&&bu(r,t,l,c),r.flags|=262144}function Cl(t){for(t=t.firstContext;t!==null;){if(!Bt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Gi(t){Vi=t,Ln=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function dt(t){return kp(Vi,t)}function kl(t,r){return Vi===null&&Gi(t),kp(t,r)}function kp(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Ln===null){if(t===null)throw Error(s(308));Ln=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Ln=Ln.next=r;return l}var p1=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(l,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(l){return l()})}},g1=n.unstable_scheduleCallback,m1=n.unstable_NormalPriority,Qe={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vu(){return{controller:new p1,data:new Map,refCount:0}}function Fr(t){t.refCount--,t.refCount===0&&g1(m1,function(){t.controller.abort()})}var Qr=null,Su=0,Ds=0,Bs=null;function y1(t,r){if(Qr===null){var l=Qr=[];Su=0,Ds=_f(),Bs={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Su++,r.then(Mp,Mp),r}function Mp(){if(--Su===0&&Qr!==null){Bs!==null&&(Bs.status="fulfilled");var t=Qr;Qr=null,Ds=0,Bs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function b1(t,r){var l=[],c={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(c.status="rejected",c.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),c}var Op=z.S;z.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&y1(t,r),Op!==null&&Op(t,r)};var Ki=P(null);function wu(){var t=Ki.current;return t!==null?t:Le.pooledCache}function Ml(t,r){r===null?J(Ki,Ki.current):J(Ki,r.pool)}function Rp(){var t=wu();return t===null?null:{parent:Qe._currentValue,pool:t}}var Zr=Error(s(460)),Lp=Error(s(474)),Ol=Error(s(542)),xu={then:function(){}};function jp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Rl(){}function Dp(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(Rl,Rl),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Up(t),t;default:if(typeof r.status=="string")r.then(Rl,Rl);else{if(t=Le,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=r,t.status="pending",t.then(function(c){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=c}},function(c){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Up(t),t}throw Jr=r,Zr}}var Jr=null;function Bp(){if(Jr===null)throw Error(s(459));var t=Jr;return Jr=null,t}function Up(t){if(t===Zr||t===Ol)throw Error(s(483))}var ii=!1;function _u(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function si(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ri(t,r,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Te&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,r=Tl(t),_p(t,null,l),r}return _l(t,c,r,l),Tl(t)}function Wr(t,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,l|=c,r.lanes=l,Md(t,l)}}function Eu(t,r){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=w:g=g.next=w,l=l.next}while(l!==null);g===null?h=g=r:g=g.next=r}else h=g=r;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=r:t.next=r,l.lastBaseUpdate=r}var Au=!1;function ea(){if(Au){var t=Bs;if(t!==null)throw t}}function ta(t,r,l,c){Au=!1;var h=t.updateQueue;ii=!1;var g=h.firstBaseUpdate,w=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var A=_,D=A.next;A.next=null,w===null?g=D:w.next=D,w=A;var K=t.alternate;K!==null&&(K=K.updateQueue,_=K.lastBaseUpdate,_!==w&&(_===null?K.firstBaseUpdate=D:_.next=D,K.lastBaseUpdate=A))}if(g!==null){var X=h.baseState;w=0,K=D=A=null,_=g;do{var B=_.lane&-536870913,U=B!==_.lane;if(U?(Se&B)===B:(c&B)===B){B!==0&&B===Ds&&(Au=!0),K!==null&&(K=K.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var fe=t,oe=_;B=r;var Me=l;switch(oe.tag){case 1:if(fe=oe.payload,typeof fe=="function"){X=fe.call(Me,X,B);break e}X=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=oe.payload,B=typeof fe=="function"?fe.call(Me,X,B):fe,B==null)break e;X=m({},X,B);break e;case 2:ii=!0}}B=_.callback,B!==null&&(t.flags|=64,U&&(t.flags|=8192),U=h.callbacks,U===null?h.callbacks=[B]:U.push(B))}else U={lane:B,tag:_.tag,payload:_.payload,callback:_.callback,next:null},K===null?(D=K=U,A=X):K=K.next=U,w|=B;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;U=_,_=U.next,U.next=null,h.lastBaseUpdate=U,h.shared.pending=null}}while(!0);K===null&&(A=X),h.baseState=A,h.firstBaseUpdate=D,h.lastBaseUpdate=K,g===null&&(h.shared.lanes=0),di|=w,t.lanes=w,t.memoizedState=X}}function zp(t,r){if(typeof t!="function")throw Error(s(191,t));t.call(r)}function Hp(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)zp(l[t],r)}var Us=P(null),Ll=P(0);function qp(t,r){t=$n,J(Ll,t),J(Us,r),$n=t|r.baseLanes}function Nu(){J(Ll,$n),J(Us,Us.current)}function Cu(){$n=Ll.current,W(Us),W(Ll)}var ai=0,pe=null,Ce=null,Xe=null,jl=!1,zs=!1,Yi=!1,Dl=0,na=0,Hs=null,v1=0;function Ve(){throw Error(s(321))}function ku(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!Bt(t[l],r[l]))return!1;return!0}function Mu(t,r,l,c,h,g){return ai=g,pe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=t===null||t.memoizedState===null?_g:Tg,Yi=!1,g=l(c,h),Yi=!1,zs&&(g=Ip(r,l,c,h)),$p(t),g}function $p(t){z.H=$l;var r=Ce!==null&&Ce.next!==null;if(ai=0,Xe=Ce=pe=null,jl=!1,na=0,Hs=null,r)throw Error(s(300));t===null||et||(t=t.dependencies,t!==null&&Cl(t)&&(et=!0))}function Ip(t,r,l,c){pe=t;var h=0;do{if(zs&&(Hs=null),na=0,zs=!1,25<=h)throw Error(s(301));if(h+=1,Xe=Ce=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}z.H=A1,g=r(l,c)}while(zs);return g}function S1(){var t=z.H,r=t.useState()[0];return r=typeof r.then=="function"?ia(r):r,t=t.useState()[0],(Ce!==null?Ce.memoizedState:null)!==t&&(pe.flags|=1024),r}function Ou(){var t=Dl!==0;return Dl=0,t}function Ru(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function Lu(t){if(jl){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}jl=!1}ai=0,Xe=Ce=pe=null,zs=!1,na=Dl=0,Hs=null}function Nt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?pe.memoizedState=Xe=t:Xe=Xe.next=t,Xe}function Pe(){if(Ce===null){var t=pe.alternate;t=t!==null?t.memoizedState:null}else t=Ce.next;var r=Xe===null?pe.memoizedState:Xe.next;if(r!==null)Xe=r,Ce=t;else{if(t===null)throw pe.alternate===null?Error(s(467)):Error(s(310));Ce=t,t={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Xe===null?pe.memoizedState=Xe=t:Xe=Xe.next=t}return Xe}function ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ia(t){var r=na;return na+=1,Hs===null&&(Hs=[]),t=Dp(Hs,t,r),r=pe,(Xe===null?r.memoizedState:Xe.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?_g:Tg),t}function Bl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ia(t);if(t.$$typeof===$)return dt(t)}throw Error(s(438,String(t)))}function Du(t){var r=null,l=pe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var c=pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=ju(),pe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(t),c=0;c<t;c++)l[c]=ie;return r.index++,l}function Dn(t,r){return typeof r=="function"?r(t):r}function Ul(t){var r=Pe();return Bu(r,Ce,t)}function Bu(t,r,l){var c=t.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=l;var h=t.baseQueue,g=c.pending;if(g!==null){if(h!==null){var w=h.next;h.next=g.next,g.next=w}r.baseQueue=h=g,c.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{r=h.next;var _=w=null,A=null,D=r,K=!1;do{var X=D.lane&-536870913;if(X!==D.lane?(Se&X)===X:(ai&X)===X){var B=D.revertLane;if(B===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),X===Ds&&(K=!0);else if((ai&B)===B){D=D.next,B===Ds&&(K=!0);continue}else X={lane:0,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=X,w=g):A=A.next=X,pe.lanes|=B,di|=B;X=D.action,Yi&&l(g,X),g=D.hasEagerState?D.eagerState:l(g,X)}else B={lane:X,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=B,w=g):A=A.next=B,pe.lanes|=X,di|=X;D=D.next}while(D!==null&&D!==r);if(A===null?w=g:A.next=_,!Bt(g,t.memoizedState)&&(et=!0,K&&(l=Bs,l!==null)))throw l;t.memoizedState=g,t.baseState=w,t.baseQueue=A,c.lastRenderedState=g}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Uu(t){var r=Pe(),l=r.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=t;var c=l.dispatch,h=l.pending,g=r.memoizedState;if(h!==null){l.pending=null;var w=h=h.next;do g=t(g,w.action),w=w.next;while(w!==h);Bt(g,r.memoizedState)||(et=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),l.lastRenderedState=g}return[g,c]}function Vp(t,r,l){var c=pe,h=Pe(),g=_e;if(g){if(l===void 0)throw Error(s(407));l=l()}else l=r();var w=!Bt((Ce||h).memoizedState,l);w&&(h.memoizedState=l,et=!0),h=h.queue;var _=Yp.bind(null,c,h,t);if(sa(2048,8,_,[t]),h.getSnapshot!==r||w||Xe!==null&&Xe.memoizedState.tag&1){if(c.flags|=2048,qs(9,zl(),Kp.bind(null,c,h,l,r),null),Le===null)throw Error(s(349));g||(ai&124)!==0||Gp(c,r,l)}return l}function Gp(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=pe.updateQueue,r===null?(r=ju(),pe.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Kp(t,r,l,c){r.value=l,r.getSnapshot=c,Xp(r)&&Pp(t)}function Yp(t,r,l){return l(function(){Xp(r)&&Pp(t)})}function Xp(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!Bt(t,l)}catch{return!0}}function Pp(t){var r=Os(t,2);r!==null&&It(r,t,2)}function zu(t){var r=Nt();if(typeof t=="function"){var l=t;if(t=l(),Yi){Yt(!0);try{l()}finally{Yt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:t},r}function Fp(t,r,l,c){return t.baseState=l,Bu(t,Ce,typeof c=="function"?c:Dn)}function w1(t,r,l,c,h){if(ql(t))throw Error(s(485));if(t=r.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};z.T!==null?l(!0):g.isTransition=!1,c(g),l=r.pending,l===null?(g.next=r.pending=g,Qp(r,g)):(g.next=l.next,r.pending=l.next=g)}}function Qp(t,r){var l=r.action,c=r.payload,h=t.state;if(r.isTransition){var g=z.T,w={};z.T=w;try{var _=l(h,c),A=z.S;A!==null&&A(w,_),Zp(t,r,_)}catch(D){Hu(t,r,D)}finally{z.T=g}}else try{g=l(h,c),Zp(t,r,g)}catch(D){Hu(t,r,D)}}function Zp(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){Jp(t,r,c)},function(c){return Hu(t,r,c)}):Jp(t,r,l)}function Jp(t,r,l){r.status="fulfilled",r.value=l,Wp(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,Qp(t,l)))}function Hu(t,r,l){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=l,Wp(r),r=r.next;while(r!==c)}t.action=null}function Wp(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function eg(t,r){return r}function tg(t,r){if(_e){var l=Le.formState;if(l!==null){e:{var c=pe;if(_e){if($e){t:{for(var h=$e,g=yn;h.nodeType!==8;){if(!g){h=null;break t}if(h=fn(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){$e=fn(h.nextSibling),c=h.data==="F!";break e}}Ii(c)}c=!1}c&&(r=l[0])}}return l=Nt(),l.memoizedState=l.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:eg,lastRenderedState:r},l.queue=c,l=Sg.bind(null,pe,c),c.dispatch=l,c=zu(!1),g=Gu.bind(null,pe,!1,c.queue),c=Nt(),h={state:r,dispatch:null,action:t,pending:null},c.queue=h,l=w1.bind(null,pe,h,g,l),h.dispatch=l,c.memoizedState=t,[r,l,!1]}function ng(t){var r=Pe();return ig(r,Ce,t)}function ig(t,r,l){if(r=Bu(t,r,eg)[0],t=Ul(Dn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=ia(r)}catch(w){throw w===Zr?Ol:w}else c=r;r=Pe();var h=r.queue,g=h.dispatch;return l!==r.memoizedState&&(pe.flags|=2048,qs(9,zl(),x1.bind(null,h,l),null)),[c,g,t]}function x1(t,r){t.action=r}function sg(t){var r=Pe(),l=Ce;if(l!==null)return ig(r,l,t);Pe(),r=r.memoizedState,l=Pe();var c=l.queue.dispatch;return l.memoizedState=t,[r,c,!1]}function qs(t,r,l,c){return t={tag:t,create:l,deps:c,inst:r,next:null},r=pe.updateQueue,r===null&&(r=ju(),pe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=t.next=t:(c=l.next,l.next=t,t.next=c,r.lastEffect=t),t}function zl(){return{destroy:void 0,resource:void 0}}function rg(){return Pe().memoizedState}function Hl(t,r,l,c){var h=Nt();c=c===void 0?null:c,pe.flags|=t,h.memoizedState=qs(1|r,zl(),l,c)}function sa(t,r,l,c){var h=Pe();c=c===void 0?null:c;var g=h.memoizedState.inst;Ce!==null&&c!==null&&ku(c,Ce.memoizedState.deps)?h.memoizedState=qs(r,g,l,c):(pe.flags|=t,h.memoizedState=qs(1|r,g,l,c))}function ag(t,r){Hl(8390656,8,t,r)}function lg(t,r){sa(2048,8,t,r)}function og(t,r){return sa(4,2,t,r)}function cg(t,r){return sa(4,4,t,r)}function ug(t,r){if(typeof r=="function"){t=t();var l=r(t);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function fg(t,r,l){l=l!=null?l.concat([t]):null,sa(4,4,ug.bind(null,r,t),l)}function qu(){}function hg(t,r){var l=Pe();r=r===void 0?null:r;var c=l.memoizedState;return r!==null&&ku(r,c[1])?c[0]:(l.memoizedState=[t,r],t)}function dg(t,r){var l=Pe();r=r===void 0?null:r;var c=l.memoizedState;if(r!==null&&ku(r,c[1]))return c[0];if(c=t(),Yi){Yt(!0);try{t()}finally{Yt(!1)}}return l.memoizedState=[c,r],c}function $u(t,r,l){return l===void 0||(ai&1073741824)!==0?t.memoizedState=r:(t.memoizedState=l,t=mm(),pe.lanes|=t,di|=t,l)}function pg(t,r,l,c){return Bt(l,r)?l:Us.current!==null?(t=$u(t,l,c),Bt(t,r)||(et=!0),t):(ai&42)===0?(et=!0,t.memoizedState=l):(t=mm(),pe.lanes|=t,di|=t,r)}function gg(t,r,l,c,h){var g=Q.p;Q.p=g!==0&&8>g?g:8;var w=z.T,_={};z.T=_,Gu(t,!1,r,l);try{var A=h(),D=z.S;if(D!==null&&D(_,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var K=b1(A,c);ra(t,r,K,$t(t))}else ra(t,r,c,$t(t))}catch(X){ra(t,r,{then:function(){},status:"rejected",reason:X},$t())}finally{Q.p=g,z.T=w}}function _1(){}function Iu(t,r,l,c){if(t.tag!==5)throw Error(s(476));var h=mg(t).queue;gg(t,h,r,se,l===null?_1:function(){return yg(t),l(c)})}function mg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:se},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function yg(t){var r=mg(t).next.queue;ra(t,r,{},$t())}function Vu(){return dt(_a)}function bg(){return Pe().memoizedState}function vg(){return Pe().memoizedState}function T1(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=$t();t=si(l);var c=ri(r,t,l);c!==null&&(It(c,r,l),Wr(c,r,l)),r={cache:vu()},t.payload=r;return}r=r.return}}function E1(t,r,l){var c=$t();l={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},ql(t)?wg(r,l):(l=cu(t,r,l,c),l!==null&&(It(l,t,c),xg(l,r,c)))}function Sg(t,r,l){var c=$t();ra(t,r,l,c)}function ra(t,r,l,c){var h={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(ql(t))wg(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,_=g(w,l);if(h.hasEagerState=!0,h.eagerState=_,Bt(_,w))return _l(t,r,h,0),Le===null&&xl(),!1}catch{}finally{}if(l=cu(t,r,h,c),l!==null)return It(l,t,c),xg(l,r,c),!0}return!1}function Gu(t,r,l,c){if(c={lane:2,revertLane:_f(),action:c,hasEagerState:!1,eagerState:null,next:null},ql(t)){if(r)throw Error(s(479))}else r=cu(t,l,c,2),r!==null&&It(r,t,2)}function ql(t){var r=t.alternate;return t===pe||r!==null&&r===pe}function wg(t,r){zs=jl=!0;var l=t.pending;l===null?r.next=r:(r.next=l.next,l.next=r),t.pending=r}function xg(t,r,l){if((l&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,l|=c,r.lanes=l,Md(t,l)}}var $l={readContext:dt,use:Bl,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve},_g={readContext:dt,use:Bl,useCallback:function(t,r){return Nt().memoizedState=[t,r===void 0?null:r],t},useContext:dt,useEffect:ag,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,Hl(4194308,4,ug.bind(null,r,t),l)},useLayoutEffect:function(t,r){return Hl(4194308,4,t,r)},useInsertionEffect:function(t,r){Hl(4,2,t,r)},useMemo:function(t,r){var l=Nt();r=r===void 0?null:r;var c=t();if(Yi){Yt(!0);try{t()}finally{Yt(!1)}}return l.memoizedState=[c,r],c},useReducer:function(t,r,l){var c=Nt();if(l!==void 0){var h=l(r);if(Yi){Yt(!0);try{l(r)}finally{Yt(!1)}}}else h=r;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=E1.bind(null,pe,t),[c.memoizedState,t]},useRef:function(t){var r=Nt();return t={current:t},r.memoizedState=t},useState:function(t){t=zu(t);var r=t.queue,l=Sg.bind(null,pe,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:qu,useDeferredValue:function(t,r){var l=Nt();return $u(l,t,r)},useTransition:function(){var t=zu(!1);return t=gg.bind(null,pe,t.queue,!0,!1),Nt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var c=pe,h=Nt();if(_e){if(l===void 0)throw Error(s(407));l=l()}else{if(l=r(),Le===null)throw Error(s(349));(Se&124)!==0||Gp(c,r,l)}h.memoizedState=l;var g={value:l,getSnapshot:r};return h.queue=g,ag(Yp.bind(null,c,g,t),[t]),c.flags|=2048,qs(9,zl(),Kp.bind(null,c,g,l,r),null),l},useId:function(){var t=Nt(),r=Le.identifierPrefix;if(_e){var l=Rn,c=On;l=(c&~(1<<32-vt(c)-1)).toString(32)+l,r="«"+r+"R"+l,l=Dl++,0<l&&(r+="H"+l.toString(32)),r+="»"}else l=v1++,r="«"+r+"r"+l.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:Vu,useFormState:tg,useActionState:tg,useOptimistic:function(t){var r=Nt();r.memoizedState=r.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Gu.bind(null,pe,!0,l),l.dispatch=r,[t,r]},useMemoCache:Du,useCacheRefresh:function(){return Nt().memoizedState=T1.bind(null,pe)}},Tg={readContext:dt,use:Bl,useCallback:hg,useContext:dt,useEffect:lg,useImperativeHandle:fg,useInsertionEffect:og,useLayoutEffect:cg,useMemo:dg,useReducer:Ul,useRef:rg,useState:function(){return Ul(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var l=Pe();return pg(l,Ce.memoizedState,t,r)},useTransition:function(){var t=Ul(Dn)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:ia(t),r]},useSyncExternalStore:Vp,useId:bg,useHostTransitionStatus:Vu,useFormState:ng,useActionState:ng,useOptimistic:function(t,r){var l=Pe();return Fp(l,Ce,t,r)},useMemoCache:Du,useCacheRefresh:vg},A1={readContext:dt,use:Bl,useCallback:hg,useContext:dt,useEffect:lg,useImperativeHandle:fg,useInsertionEffect:og,useLayoutEffect:cg,useMemo:dg,useReducer:Uu,useRef:rg,useState:function(){return Uu(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var l=Pe();return Ce===null?$u(l,t,r):pg(l,Ce.memoizedState,t,r)},useTransition:function(){var t=Uu(Dn)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:ia(t),r]},useSyncExternalStore:Vp,useId:bg,useHostTransitionStatus:Vu,useFormState:sg,useActionState:sg,useOptimistic:function(t,r){var l=Pe();return Ce!==null?Fp(l,Ce,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Du,useCacheRefresh:vg},$s=null,aa=0;function Il(t){var r=aa;return aa+=1,$s===null&&($s=[]),Dp($s,t,r)}function la(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Vl(t,r){throw r.$$typeof===y?Error(s(525)):(t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Eg(t){var r=t._init;return r(t._payload)}function Ag(t){function r(O,M){if(t){var j=O.deletions;j===null?(O.deletions=[M],O.flags|=16):j.push(M)}}function l(O,M){if(!t)return null;for(;M!==null;)r(O,M),M=M.sibling;return null}function c(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function h(O,M){return O=Mn(O,M),O.index=0,O.sibling=null,O}function g(O,M,j){return O.index=j,t?(j=O.alternate,j!==null?(j=j.index,j<M?(O.flags|=67108866,M):j):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function w(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function _(O,M,j,Y){return M===null||M.tag!==6?(M=fu(j,O.mode,Y),M.return=O,M):(M=h(M,j),M.return=O,M)}function A(O,M,j,Y){var ne=j.type;return ne===E?K(O,M,j.props.children,Y,j.key):M!==null&&(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===H&&Eg(ne)===M.type)?(M=h(M,j.props),la(M,j),M.return=O,M):(M=El(j.type,j.key,j.props,null,O.mode,Y),la(M,j),M.return=O,M)}function D(O,M,j,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==j.containerInfo||M.stateNode.implementation!==j.implementation?(M=hu(j,O.mode,Y),M.return=O,M):(M=h(M,j.children||[]),M.return=O,M)}function K(O,M,j,Y,ne){return M===null||M.tag!==7?(M=zi(j,O.mode,Y,ne),M.return=O,M):(M=h(M,j),M.return=O,M)}function X(O,M,j){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=fu(""+M,O.mode,j),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return j=El(M.type,M.key,M.props,null,O.mode,j),la(j,M),j.return=O,j;case v:return M=hu(M,O.mode,j),M.return=O,M;case H:var Y=M._init;return M=Y(M._payload),X(O,M,j)}if(ve(M)||I(M))return M=zi(M,O.mode,j,null),M.return=O,M;if(typeof M.then=="function")return X(O,Il(M),j);if(M.$$typeof===$)return X(O,kl(O,M),j);Vl(O,M)}return null}function B(O,M,j,Y){var ne=M!==null?M.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ne!==null?null:_(O,M,""+j,Y);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return j.key===ne?A(O,M,j,Y):null;case v:return j.key===ne?D(O,M,j,Y):null;case H:return ne=j._init,j=ne(j._payload),B(O,M,j,Y)}if(ve(j)||I(j))return ne!==null?null:K(O,M,j,Y,null);if(typeof j.then=="function")return B(O,M,Il(j),Y);if(j.$$typeof===$)return B(O,M,kl(O,j),Y);Vl(O,j)}return null}function U(O,M,j,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(j)||null,_(M,O,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:return O=O.get(Y.key===null?j:Y.key)||null,A(M,O,Y,ne);case v:return O=O.get(Y.key===null?j:Y.key)||null,D(M,O,Y,ne);case H:var ge=Y._init;return Y=ge(Y._payload),U(O,M,j,Y,ne)}if(ve(Y)||I(Y))return O=O.get(j)||null,K(M,O,Y,ne,null);if(typeof Y.then=="function")return U(O,M,j,Il(Y),ne);if(Y.$$typeof===$)return U(O,M,j,kl(M,Y),ne);Vl(M,Y)}return null}function fe(O,M,j,Y){for(var ne=null,ge=null,re=M,ce=M=0,nt=null;re!==null&&ce<j.length;ce++){re.index>ce?(nt=re,re=null):nt=re.sibling;var xe=B(O,re,j[ce],Y);if(xe===null){re===null&&(re=nt);break}t&&re&&xe.alternate===null&&r(O,re),M=g(xe,M,ce),ge===null?ne=xe:ge.sibling=xe,ge=xe,re=nt}if(ce===j.length)return l(O,re),_e&&qi(O,ce),ne;if(re===null){for(;ce<j.length;ce++)re=X(O,j[ce],Y),re!==null&&(M=g(re,M,ce),ge===null?ne=re:ge.sibling=re,ge=re);return _e&&qi(O,ce),ne}for(re=c(re);ce<j.length;ce++)nt=U(re,O,ce,j[ce],Y),nt!==null&&(t&&nt.alternate!==null&&re.delete(nt.key===null?ce:nt.key),M=g(nt,M,ce),ge===null?ne=nt:ge.sibling=nt,ge=nt);return t&&re.forEach(function(xi){return r(O,xi)}),_e&&qi(O,ce),ne}function oe(O,M,j,Y){if(j==null)throw Error(s(151));for(var ne=null,ge=null,re=M,ce=M=0,nt=null,xe=j.next();re!==null&&!xe.done;ce++,xe=j.next()){re.index>ce?(nt=re,re=null):nt=re.sibling;var xi=B(O,re,xe.value,Y);if(xi===null){re===null&&(re=nt);break}t&&re&&xi.alternate===null&&r(O,re),M=g(xi,M,ce),ge===null?ne=xi:ge.sibling=xi,ge=xi,re=nt}if(xe.done)return l(O,re),_e&&qi(O,ce),ne;if(re===null){for(;!xe.done;ce++,xe=j.next())xe=X(O,xe.value,Y),xe!==null&&(M=g(xe,M,ce),ge===null?ne=xe:ge.sibling=xe,ge=xe);return _e&&qi(O,ce),ne}for(re=c(re);!xe.done;ce++,xe=j.next())xe=U(re,O,ce,xe.value,Y),xe!==null&&(t&&xe.alternate!==null&&re.delete(xe.key===null?ce:xe.key),M=g(xe,M,ce),ge===null?ne=xe:ge.sibling=xe,ge=xe);return t&&re.forEach(function(Nw){return r(O,Nw)}),_e&&qi(O,ce),ne}function Me(O,M,j,Y){if(typeof j=="object"&&j!==null&&j.type===E&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case b:e:{for(var ne=j.key;M!==null;){if(M.key===ne){if(ne=j.type,ne===E){if(M.tag===7){l(O,M.sibling),Y=h(M,j.props.children),Y.return=O,O=Y;break e}}else if(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===H&&Eg(ne)===M.type){l(O,M.sibling),Y=h(M,j.props),la(Y,j),Y.return=O,O=Y;break e}l(O,M);break}else r(O,M);M=M.sibling}j.type===E?(Y=zi(j.props.children,O.mode,Y,j.key),Y.return=O,O=Y):(Y=El(j.type,j.key,j.props,null,O.mode,Y),la(Y,j),Y.return=O,O=Y)}return w(O);case v:e:{for(ne=j.key;M!==null;){if(M.key===ne)if(M.tag===4&&M.stateNode.containerInfo===j.containerInfo&&M.stateNode.implementation===j.implementation){l(O,M.sibling),Y=h(M,j.children||[]),Y.return=O,O=Y;break e}else{l(O,M);break}else r(O,M);M=M.sibling}Y=hu(j,O.mode,Y),Y.return=O,O=Y}return w(O);case H:return ne=j._init,j=ne(j._payload),Me(O,M,j,Y)}if(ve(j))return fe(O,M,j,Y);if(I(j)){if(ne=I(j),typeof ne!="function")throw Error(s(150));return j=ne.call(j),oe(O,M,j,Y)}if(typeof j.then=="function")return Me(O,M,Il(j),Y);if(j.$$typeof===$)return Me(O,M,kl(O,j),Y);Vl(O,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,M!==null&&M.tag===6?(l(O,M.sibling),Y=h(M,j),Y.return=O,O=Y):(l(O,M),Y=fu(j,O.mode,Y),Y.return=O,O=Y),w(O)):l(O,M)}return function(O,M,j,Y){try{aa=0;var ne=Me(O,M,j,Y);return $s=null,ne}catch(re){if(re===Zr||re===Ol)throw re;var ge=Ut(29,re,null,O.mode);return ge.lanes=Y,ge.return=O,ge}finally{}}}var Is=Ag(!0),Ng=Ag(!1),Wt=P(null),bn=null;function li(t){var r=t.alternate;J(Ze,Ze.current&1),J(Wt,t),bn===null&&(r===null||Us.current!==null||r.memoizedState!==null)&&(bn=t)}function Cg(t){if(t.tag===22){if(J(Ze,Ze.current),J(Wt,t),bn===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(bn=t)}}else oi()}function oi(){J(Ze,Ze.current),J(Wt,Wt.current)}function Bn(t){W(Wt),bn===t&&(bn=null),W(Ze)}var Ze=P(0);function Gl(t){for(var r=t;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Df(l)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Ku(t,r,l,c){r=t.memoizedState,l=l(c,r),l=l==null?r:m({},r,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Yu={enqueueSetState:function(t,r,l){t=t._reactInternals;var c=$t(),h=si(c);h.payload=r,l!=null&&(h.callback=l),r=ri(t,h,c),r!==null&&(It(r,t,c),Wr(r,t,c))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var c=$t(),h=si(c);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=ri(t,h,c),r!==null&&(It(r,t,c),Wr(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=$t(),c=si(l);c.tag=2,r!=null&&(c.callback=r),r=ri(t,c,l),r!==null&&(It(r,t,l),Wr(r,t,l))}};function kg(t,r,l,c,h,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Vr(l,c)||!Vr(h,g):!0}function Mg(t,r,l,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,c),r.state!==t&&Yu.enqueueReplaceState(r,r.state,null)}function Xi(t,r){var l=r;if("ref"in r){l={};for(var c in r)c!=="ref"&&(l[c]=r[c])}if(t=t.defaultProps){l===r&&(l=m({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}var Kl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Og(t){Kl(t)}function Rg(t){console.error(t)}function Lg(t){Kl(t)}function Yl(t,r){try{var l=t.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function jg(t,r,l){try{var c=t.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Xu(t,r,l){return l=si(l),l.tag=3,l.payload={element:null},l.callback=function(){Yl(t,r)},l}function Dg(t){return t=si(t),t.tag=3,t}function Bg(t,r,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;t.payload=function(){return h(g)},t.callback=function(){jg(r,l,c)}}var w=l.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){jg(r,l,c),typeof h!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var _=c.stack;this.componentDidCatch(c.value,{componentStack:_!==null?_:""})})}function N1(t,r,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=l.alternate,r!==null&&Pr(r,l,h,!0),l=Wt.current,l!==null){switch(l.tag){case 13:return bn===null?bf():l.alternate===null&&Ie===0&&(Ie=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===xu?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([c]):r.add(c),Sf(t,c,h)),!1;case 22:return l.flags|=65536,c===xu?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([c]):l.add(c)),Sf(t,c,h)),!1}throw Error(s(435,l.tag))}return Sf(t,c,h),bf(),!1}if(_e)return r=Wt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==gu&&(t=Error(s(422),{cause:c}),Xr(Ft(t,l)))):(c!==gu&&(r=Error(s(423),{cause:c}),Xr(Ft(r,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Ft(c,l),h=Xu(t.stateNode,c,h),Eu(t,h),Ie!==4&&(Ie=2)),!1;var g=Error(s(520),{cause:c});if(g=Ft(g,l),pa===null?pa=[g]:pa.push(g),Ie!==4&&(Ie=2),r===null)return!0;c=Ft(c,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=Xu(l.stateNode,c,t),Eu(l,t),!1;case 1:if(r=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(pi===null||!pi.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Dg(h),Bg(h,t,l,c),Eu(l,h),!1}l=l.return}while(l!==null);return!1}var Ug=Error(s(461)),et=!1;function rt(t,r,l,c){r.child=t===null?Ng(r,null,l,c):Is(r,t.child,l,c)}function zg(t,r,l,c,h){l=l.render;var g=r.ref;if("ref"in c){var w={};for(var _ in c)_!=="ref"&&(w[_]=c[_])}else w=c;return Gi(r),c=Mu(t,r,l,w,g,h),_=Ou(),t!==null&&!et?(Ru(t,r,h),Un(t,r,h)):(_e&&_&&du(r),r.flags|=1,rt(t,r,c,h),r.child)}function Hg(t,r,l,c,h){if(t===null){var g=l.type;return typeof g=="function"&&!uu(g)&&g.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=g,qg(t,r,g,c,h)):(t=El(l.type,null,c,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!tf(t,h)){var w=g.memoizedProps;if(l=l.compare,l=l!==null?l:Vr,l(w,c)&&t.ref===r.ref)return Un(t,r,h)}return r.flags|=1,t=Mn(g,c),t.ref=r.ref,t.return=r,r.child=t}function qg(t,r,l,c,h){if(t!==null){var g=t.memoizedProps;if(Vr(g,c)&&t.ref===r.ref)if(et=!1,r.pendingProps=c=g,tf(t,h))(t.flags&131072)!==0&&(et=!0);else return r.lanes=t.lanes,Un(t,r,h)}return Pu(t,r,l,c,h)}function $g(t,r,l){var c=r.pendingProps,h=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((r.flags&128)!==0){if(c=g!==null?g.baseLanes|l:l,t!==null){for(h=r.child=t.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;r.childLanes=g&~c}else r.childLanes=0,r.child=null;return Ig(t,r,c,l)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ml(r,g!==null?g.cachePool:null),g!==null?qp(r,g):Nu(),Cg(r);else return r.lanes=r.childLanes=536870912,Ig(t,r,g!==null?g.baseLanes|l:l,l)}else g!==null?(Ml(r,g.cachePool),qp(r,g),oi(),r.memoizedState=null):(t!==null&&Ml(r,null),Nu(),oi());return rt(t,r,h,l),r.child}function Ig(t,r,l,c){var h=wu();return h=h===null?null:{parent:Qe._currentValue,pool:h},r.memoizedState={baseLanes:l,cachePool:h},t!==null&&Ml(r,null),Nu(),Cg(r),t!==null&&Pr(t,r,c,!0),null}function Xl(t,r){var l=r.ref;if(l===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(t===null||t.ref!==l)&&(r.flags|=4194816)}}function Pu(t,r,l,c,h){return Gi(r),l=Mu(t,r,l,c,void 0,h),c=Ou(),t!==null&&!et?(Ru(t,r,h),Un(t,r,h)):(_e&&c&&du(r),r.flags|=1,rt(t,r,l,h),r.child)}function Vg(t,r,l,c,h,g){return Gi(r),r.updateQueue=null,l=Ip(r,c,l,h),$p(t),c=Ou(),t!==null&&!et?(Ru(t,r,g),Un(t,r,g)):(_e&&c&&du(r),r.flags|=1,rt(t,r,l,g),r.child)}function Gg(t,r,l,c,h){if(Gi(r),r.stateNode===null){var g=Rs,w=l.contextType;typeof w=="object"&&w!==null&&(g=dt(w)),g=new l(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Yu,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},_u(r),w=l.contextType,g.context=typeof w=="object"&&w!==null?dt(w):Rs,g.state=r.memoizedState,w=l.getDerivedStateFromProps,typeof w=="function"&&(Ku(r,l,w,c),g.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&Yu.enqueueReplaceState(g,g.state,null),ta(r,c,g,h),ea(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){g=r.stateNode;var _=r.memoizedProps,A=Xi(l,_);g.props=A;var D=g.context,K=l.contextType;w=Rs,typeof K=="object"&&K!==null&&(w=dt(K));var X=l.getDerivedStateFromProps;K=typeof X=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,K||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||D!==w)&&Mg(r,g,c,w),ii=!1;var B=r.memoizedState;g.state=B,ta(r,c,g,h),ea(),D=r.memoizedState,_||B!==D||ii?(typeof X=="function"&&(Ku(r,l,X,c),D=r.memoizedState),(A=ii||kg(r,l,A,c,B,D,w))?(K||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=D),g.props=c,g.state=D,g.context=w,c=A):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,Tu(t,r),w=r.memoizedProps,K=Xi(l,w),g.props=K,X=r.pendingProps,B=g.context,D=l.contextType,A=Rs,typeof D=="object"&&D!==null&&(A=dt(D)),_=l.getDerivedStateFromProps,(D=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==X||B!==A)&&Mg(r,g,c,A),ii=!1,B=r.memoizedState,g.state=B,ta(r,c,g,h),ea();var U=r.memoizedState;w!==X||B!==U||ii||t!==null&&t.dependencies!==null&&Cl(t.dependencies)?(typeof _=="function"&&(Ku(r,l,_,c),U=r.memoizedState),(K=ii||kg(r,l,K,c,B,U,A)||t!==null&&t.dependencies!==null&&Cl(t.dependencies))?(D||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,U,A),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,U,A)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=U),g.props=c,g.state=U,g.context=A,c=K):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),c=!1)}return g=c,Xl(t,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&c?(r.child=Is(r,t.child,null,h),r.child=Is(r,null,l,h)):rt(t,r,l,h),r.memoizedState=g.state,t=r.child):t=Un(t,r,h),t}function Kg(t,r,l,c){return Yr(),r.flags|=256,rt(t,r,l,c),r.child}var Fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qu(t){return{baseLanes:t,cachePool:Rp()}}function Zu(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=en),t}function Yg(t,r,l){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,w;if((w=g)||(w=t!==null&&t.memoizedState===null?!1:(Ze.current&2)!==0),w&&(h=!0,r.flags&=-129),w=(r.flags&32)!==0,r.flags&=-33,t===null){if(_e){if(h?li(r):oi(),_e){var _=$e,A;if(A=_){e:{for(A=_,_=yn;A.nodeType!==8;){if(!_){_=null;break e}if(A=fn(A.nextSibling),A===null){_=null;break e}}_=A}_!==null?(r.memoizedState={dehydrated:_,treeContext:Hi!==null?{id:On,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},A=Ut(18,null,null,0),A.stateNode=_,A.return=r,r.child=A,St=r,$e=null,A=!0):A=!1}A||Ii(r)}if(_=r.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Df(_)?r.lanes=32:r.lanes=536870912,null;Bn(r)}return _=c.children,c=c.fallback,h?(oi(),h=r.mode,_=Pl({mode:"hidden",children:_},h),c=zi(c,h,l,null),_.return=r,c.return=r,_.sibling=c,r.child=_,h=r.child,h.memoizedState=Qu(l),h.childLanes=Zu(t,w,l),r.memoizedState=Fu,c):(li(r),Ju(r,_))}if(A=t.memoizedState,A!==null&&(_=A.dehydrated,_!==null)){if(g)r.flags&256?(li(r),r.flags&=-257,r=Wu(t,r,l)):r.memoizedState!==null?(oi(),r.child=t.child,r.flags|=128,r=null):(oi(),h=c.fallback,_=r.mode,c=Pl({mode:"visible",children:c.children},_),h=zi(h,_,l,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,Is(r,t.child,null,l),c=r.child,c.memoizedState=Qu(l),c.childLanes=Zu(t,w,l),r.memoizedState=Fu,r=h);else if(li(r),Df(_)){if(w=_.nextSibling&&_.nextSibling.dataset,w)var D=w.dgst;w=D,c=Error(s(419)),c.stack="",c.digest=w,Xr({value:c,source:null,stack:null}),r=Wu(t,r,l)}else if(et||Pr(t,r,l,!1),w=(l&t.childLanes)!==0,et||w){if(w=Le,w!==null&&(c=l&-l,c=(c&42)!==0?1:Dc(c),c=(c&(w.suspendedLanes|l))!==0?0:c,c!==0&&c!==A.retryLane))throw A.retryLane=c,Os(t,c),It(w,t,c),Ug;_.data==="$?"||bf(),r=Wu(t,r,l)}else _.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=A.treeContext,$e=fn(_.nextSibling),St=r,_e=!0,$i=null,yn=!1,t!==null&&(Zt[Jt++]=On,Zt[Jt++]=Rn,Zt[Jt++]=Hi,On=t.id,Rn=t.overflow,Hi=r),r=Ju(r,c.children),r.flags|=4096);return r}return h?(oi(),h=c.fallback,_=r.mode,A=t.child,D=A.sibling,c=Mn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,D!==null?h=Mn(D,h):(h=zi(h,_,l,null),h.flags|=2),h.return=r,c.return=r,c.sibling=h,r.child=c,c=h,h=r.child,_=t.child.memoizedState,_===null?_=Qu(l):(A=_.cachePool,A!==null?(D=Qe._currentValue,A=A.parent!==D?{parent:D,pool:D}:A):A=Rp(),_={baseLanes:_.baseLanes|l,cachePool:A}),h.memoizedState=_,h.childLanes=Zu(t,w,l),r.memoizedState=Fu,c):(li(r),l=t.child,t=l.sibling,l=Mn(l,{mode:"visible",children:c.children}),l.return=r,l.sibling=null,t!==null&&(w=r.deletions,w===null?(r.deletions=[t],r.flags|=16):w.push(t)),r.child=l,r.memoizedState=null,l)}function Ju(t,r){return r=Pl({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Pl(t,r){return t=Ut(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Wu(t,r,l){return Is(r,t.child,null,l),t=Ju(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Xg(t,r,l){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),yu(t.return,r,l)}function ef(t,r,l,c,h){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=l,g.tailMode=h)}function Pg(t,r,l){var c=r.pendingProps,h=c.revealOrder,g=c.tail;if(rt(t,r,c.children,l),c=Ze.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Xg(t,l,r);else if(t.tag===19)Xg(t,l,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}switch(J(Ze,c),h){case"forwards":for(l=r.child,h=null;l!==null;)t=l.alternate,t!==null&&Gl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),ef(r,!1,h,l,g);break;case"backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&Gl(t)===null){r.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}ef(r,!0,l,null,g);break;case"together":ef(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Un(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),di|=r.lanes,(l&r.childLanes)===0)if(t!==null){if(Pr(t,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,l=Mn(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Mn(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function tf(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Cl(t)))}function C1(t,r,l){switch(r.tag){case 3:Ne(r,r.stateNode.containerInfo),ni(r,Qe,t.memoizedState.cache),Yr();break;case 27:case 5:Or(r);break;case 4:Ne(r,r.stateNode.containerInfo);break;case 10:ni(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(li(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Yg(t,r,l):(li(r),t=Un(t,r,l),t!==null?t.sibling:null);li(r);break;case 19:var h=(t.flags&128)!==0;if(c=(l&r.childLanes)!==0,c||(Pr(t,r,l,!1),c=(l&r.childLanes)!==0),h){if(c)return Pg(t,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),J(Ze,Ze.current),c)break;return null;case 22:case 23:return r.lanes=0,$g(t,r,l);case 24:ni(r,Qe,t.memoizedState.cache)}return Un(t,r,l)}function Fg(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)et=!0;else{if(!tf(t,l)&&(r.flags&128)===0)return et=!1,C1(t,r,l);et=(t.flags&131072)!==0}else et=!1,_e&&(r.flags&1048576)!==0&&Ep(r,Nl,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var c=r.elementType,h=c._init;if(c=h(c._payload),r.type=c,typeof c=="function")uu(c)?(t=Xi(c,t),r.tag=1,r=Gg(null,r,c,t,l)):(r.tag=0,r=Pu(null,r,c,t,l));else{if(c!=null){if(h=c.$$typeof,h===V){r.tag=11,r=zg(null,r,c,t,l);break e}else if(h===Z){r.tag=14,r=Hg(null,r,c,t,l);break e}}throw r=ee(c)||c,Error(s(306,r,""))}}return r;case 0:return Pu(t,r,r.type,r.pendingProps,l);case 1:return c=r.type,h=Xi(c,r.pendingProps),Gg(t,r,c,h,l);case 3:e:{if(Ne(r,r.stateNode.containerInfo),t===null)throw Error(s(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,Tu(t,r),ta(r,c,null,l);var w=r.memoizedState;if(c=w.cache,ni(r,Qe,c),c!==g.cache&&bu(r,[Qe],l,!0),ea(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Kg(t,r,c,l);break e}else if(c!==h){h=Ft(Error(s(424)),r),Xr(h),r=Kg(t,r,c,l);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for($e=fn(t.firstChild),St=r,_e=!0,$i=null,yn=!0,l=Ng(r,null,c,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Yr(),c===h){r=Un(t,r,l);break e}rt(t,r,c,l)}r=r.child}return r;case 26:return Xl(t,r),t===null?(l=Wm(r.type,null,r.pendingProps,null))?r.memoizedState=l:_e||(l=r.type,t=r.pendingProps,c=oo(te.current).createElement(l),c[ht]=r,c[Et]=t,lt(c,l,t),We(c),r.stateNode=c):r.memoizedState=Wm(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Or(r),t===null&&_e&&(c=r.stateNode=Qm(r.type,r.pendingProps,te.current),St=r,yn=!0,h=$e,yi(r.type)?(Bf=h,$e=fn(c.firstChild)):$e=h),rt(t,r,r.pendingProps.children,l),Xl(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&_e&&((h=c=$e)&&(c=nw(c,r.type,r.pendingProps,yn),c!==null?(r.stateNode=c,St=r,$e=fn(c.firstChild),yn=!1,h=!0):h=!1),h||Ii(r)),Or(r),h=r.type,g=r.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,Rf(h,g)?c=null:w!==null&&Rf(h,w)&&(r.flags|=32),r.memoizedState!==null&&(h=Mu(t,r,S1,null,null,l),_a._currentValue=h),Xl(t,r),rt(t,r,c,l),r.child;case 6:return t===null&&_e&&((t=l=$e)&&(l=iw(l,r.pendingProps,yn),l!==null?(r.stateNode=l,St=r,$e=null,t=!0):t=!1),t||Ii(r)),null;case 13:return Yg(t,r,l);case 4:return Ne(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=Is(r,null,c,l):rt(t,r,c,l),r.child;case 11:return zg(t,r,r.type,r.pendingProps,l);case 7:return rt(t,r,r.pendingProps,l),r.child;case 8:return rt(t,r,r.pendingProps.children,l),r.child;case 12:return rt(t,r,r.pendingProps.children,l),r.child;case 10:return c=r.pendingProps,ni(r,r.type,c.value),rt(t,r,c.children,l),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,Gi(r),h=dt(h),c=c(h),r.flags|=1,rt(t,r,c,l),r.child;case 14:return Hg(t,r,r.type,r.pendingProps,l);case 15:return qg(t,r,r.type,r.pendingProps,l);case 19:return Pg(t,r,l);case 31:return c=r.pendingProps,l=r.mode,c={mode:c.mode,children:c.children},t===null?(l=Pl(c,l),l.ref=r.ref,r.child=l,l.return=r,r=l):(l=Mn(t.child,c),l.ref=r.ref,r.child=l,l.return=r,r=l),r;case 22:return $g(t,r,l);case 24:return Gi(r),c=dt(Qe),t===null?(h=wu(),h===null&&(h=Le,g=vu(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),r.memoizedState={parent:c,cache:h},_u(r),ni(r,Qe,h)):((t.lanes&l)!==0&&(Tu(t,r),ta(r,null,null,l),ea()),h=t.memoizedState,g=r.memoizedState,h.parent!==c?(h={parent:c,cache:c},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),ni(r,Qe,c)):(c=g.cache,ni(r,Qe,c),c!==h.cache&&bu(r,[Qe],l,!0))),rt(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function zn(t){t.flags|=4}function Qg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!sy(r)){if(r=Wt.current,r!==null&&((Se&4194048)===Se?bn!==null:(Se&62914560)!==Se&&(Se&536870912)===0||r!==bn))throw Jr=xu,Lp;t.flags|=8192}}function Fl(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?mn():536870912,t.lanes|=r,Ys|=r)}function oa(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Ue(t){var r=t.alternate!==null&&t.alternate.child===t.child,l=0,c=0;if(r)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=l,r}function k1(t,r,l){var c=r.pendingProps;switch(pu(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(r),null;case 1:return Ue(r),null;case 3:return l=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),jn(Qe),Gt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Kr(r)?zn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Cp())),Ue(r),null;case 26:return l=r.memoizedState,t===null?(zn(r),l!==null?(Ue(r),Qg(r,l)):(Ue(r),r.flags&=-16777217)):l?l!==t.memoizedState?(zn(r),Ue(r),Qg(r,l)):(Ue(r),r.flags&=-16777217):(t.memoizedProps!==c&&zn(r),Ue(r),r.flags&=-16777217),null;case 27:En(r),l=te.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}t=ae.current,Kr(r)?Ap(r):(t=Qm(h,c,l),r.stateNode=t,zn(r))}return Ue(r),null;case 5:if(En(r),l=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}if(t=ae.current,Kr(r))Ap(r);else{switch(h=oo(te.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof c.is=="string"?h.createElement("select",{is:c.is}):h.createElement("select"),c.multiple?t.multiple=!0:c.size&&(t.size=c.size);break;default:t=typeof c.is=="string"?h.createElement(l,{is:c.is}):h.createElement(l)}}t[ht]=r,t[Et]=c;e:for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break e;for(;h.sibling===null;){if(h.return===null||h.return===r)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}r.stateNode=t;e:switch(lt(t,l,c),l){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&zn(r)}}return Ue(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(t=te.current,Kr(r)){if(t=r.stateNode,l=r.memoizedProps,c=null,h=St,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[ht]=r,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||Vm(t.nodeValue,l)),t||Ii(r)}else t=oo(t).createTextNode(c),t[ht]=r,r.stateNode=t}return Ue(r),null;case 13:if(c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Kr(r),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[ht]=r}else Yr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ue(r),h=!1}else h=Cp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bn(r),r):(Bn(r),null)}if(Bn(r),(r.flags&128)!==0)return r.lanes=l,r;if(l=c!==null,t=t!==null&&t.memoizedState!==null,l){c=r.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool);var g=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==h&&(c.flags|=2048)}return l!==t&&l&&(r.child.flags|=8192),Fl(r,r.updateQueue),Ue(r),null;case 4:return Gt(),t===null&&Nf(r.stateNode.containerInfo),Ue(r),null;case 10:return jn(r.type),Ue(r),null;case 19:if(W(Ze),h=r.memoizedState,h===null)return Ue(r),null;if(c=(r.flags&128)!==0,g=h.rendering,g===null)if(c)oa(h,!1);else{if(Ie!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(g=Gl(t),g!==null){for(r.flags|=128,oa(h,!1),t=g.updateQueue,r.updateQueue=t,Fl(r,t),r.subtreeFlags=0,t=l,l=r.child;l!==null;)Tp(l,t),l=l.sibling;return J(Ze,Ze.current&1|2),r.child}t=t.sibling}h.tail!==null&&Kt()>Jl&&(r.flags|=128,c=!0,oa(h,!1),r.lanes=4194304)}else{if(!c)if(t=Gl(g),t!==null){if(r.flags|=128,c=!0,t=t.updateQueue,r.updateQueue=t,Fl(r,t),oa(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!_e)return Ue(r),null}else 2*Kt()-h.renderingStartTime>Jl&&l!==536870912&&(r.flags|=128,c=!0,oa(h,!1),r.lanes=4194304);h.isBackwards?(g.sibling=r.child,r.child=g):(t=h.last,t!==null?t.sibling=g:r.child=g,h.last=g)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Kt(),r.sibling=null,t=Ze.current,J(Ze,c?t&1|2:t&1),r):(Ue(r),null);case 22:case 23:return Bn(r),Cu(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(l&536870912)!==0&&(r.flags&128)===0&&(Ue(r),r.subtreeFlags&6&&(r.flags|=8192)):Ue(r),l=r.updateQueue,l!==null&&Fl(r,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==l&&(r.flags|=2048),t!==null&&W(Ki),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),jn(Qe),Ue(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function M1(t,r){switch(pu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return jn(Qe),Gt(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return En(r),null;case 13:if(Bn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Yr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return W(Ze),null;case 4:return Gt(),null;case 10:return jn(r.type),null;case 22:case 23:return Bn(r),Cu(),t!==null&&W(Ki),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return jn(Qe),null;case 25:return null;default:return null}}function Zg(t,r){switch(pu(r),r.tag){case 3:jn(Qe),Gt();break;case 26:case 27:case 5:En(r);break;case 4:Gt();break;case 13:Bn(r);break;case 19:W(Ze);break;case 10:jn(r.type);break;case 22:case 23:Bn(r),Cu(),t!==null&&W(Ki);break;case 24:jn(Qe)}}function ca(t,r){try{var l=r.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var h=c.next;l=h;do{if((l.tag&t)===t){c=void 0;var g=l.create,w=l.inst;c=g(),w.destroy=c}l=l.next}while(l!==h)}}catch(_){Oe(r,r.return,_)}}function ci(t,r,l){try{var c=r.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var g=h.next;c=g;do{if((c.tag&t)===t){var w=c.inst,_=w.destroy;if(_!==void 0){w.destroy=void 0,h=r;var A=l,D=_;try{D()}catch(K){Oe(h,A,K)}}}c=c.next}while(c!==g)}}catch(K){Oe(r,r.return,K)}}function Jg(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{Hp(r,l)}catch(c){Oe(t,t.return,c)}}}function Wg(t,r,l){l.props=Xi(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){Oe(t,r,c)}}function ua(t,r){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(h){Oe(t,r,h)}}function vn(t,r){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(h){Oe(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Oe(t,r,h)}else l.current=null}function em(t){var r=t.type,l=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(h){Oe(t,t.return,h)}}function nf(t,r,l){try{var c=t.stateNode;Z1(c,t.type,l,r),c[Et]=r}catch(h){Oe(t,t.return,h)}}function tm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&yi(t.type)||t.tag===4}function sf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||tm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&yi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rf(t,r,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(t),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=lo));else if(c!==4&&(c===27&&yi(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(rf(t,r,l),t=t.sibling;t!==null;)rf(t,r,l),t=t.sibling}function Ql(t,r,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?l.insertBefore(t,r):l.appendChild(t);else if(c!==4&&(c===27&&yi(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Ql(t,r,l),t=t.sibling;t!==null;)Ql(t,r,l),t=t.sibling}function nm(t){var r=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);lt(r,c,l),r[ht]=t,r[Et]=l}catch(g){Oe(t,t.return,g)}}var Hn=!1,Ge=!1,af=!1,im=typeof WeakSet=="function"?WeakSet:Set,tt=null;function O1(t,r){if(t=t.containerInfo,Mf=go,t=pp(t),iu(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var w=0,_=-1,A=-1,D=0,K=0,X=t,B=null;t:for(;;){for(var U;X!==l||h!==0&&X.nodeType!==3||(_=w+h),X!==g||c!==0&&X.nodeType!==3||(A=w+c),X.nodeType===3&&(w+=X.nodeValue.length),(U=X.firstChild)!==null;)B=X,X=U;for(;;){if(X===t)break t;if(B===l&&++D===h&&(_=w),B===g&&++K===c&&(A=w),(U=X.nextSibling)!==null)break;X=B,B=X.parentNode}X=U}l=_===-1||A===-1?null:{start:_,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Of={focusedElem:t,selectionRange:l},go=!1,tt=r;tt!==null;)if(r=tt,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,tt=t;else for(;tt!==null;){switch(r=tt,g=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,l=r,h=g.memoizedProps,g=g.memoizedState,c=l.stateNode;try{var fe=Xi(l.type,h,l.elementType===l.type);t=c.getSnapshotBeforeUpdate(fe,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(oe){Oe(l,l.return,oe)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)jf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":jf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=r.sibling,t!==null){t.return=r.return,tt=t;break}tt=r.return}}function sm(t,r,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:ui(t,l),c&4&&ca(5,l);break;case 1:if(ui(t,l),c&4)if(t=l.stateNode,r===null)try{t.componentDidMount()}catch(w){Oe(l,l.return,w)}else{var h=Xi(l.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Oe(l,l.return,w)}}c&64&&Jg(l),c&512&&ua(l,l.return);break;case 3:if(ui(t,l),c&64&&(t=l.updateQueue,t!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Hp(t,r)}catch(w){Oe(l,l.return,w)}}break;case 27:r===null&&c&4&&nm(l);case 26:case 5:ui(t,l),r===null&&c&4&&em(l),c&512&&ua(l,l.return);break;case 12:ui(t,l);break;case 13:ui(t,l),c&4&&lm(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=q1.bind(null,l),sw(t,l))));break;case 22:if(c=l.memoizedState!==null||Hn,!c){r=r!==null&&r.memoizedState!==null||Ge,h=Hn;var g=Ge;Hn=c,(Ge=r)&&!g?fi(t,l,(l.subtreeFlags&8772)!==0):ui(t,l),Hn=h,Ge=g}break;case 30:break;default:ui(t,l)}}function rm(t){var r=t.alternate;r!==null&&(t.alternate=null,rm(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&zc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var je=null,Ct=!1;function qn(t,r,l){for(l=l.child;l!==null;)am(t,r,l),l=l.sibling}function am(t,r,l){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Ri,l)}catch{}switch(l.tag){case 26:Ge||vn(l,r),qn(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ge||vn(l,r);var c=je,h=Ct;yi(l.type)&&(je=l.stateNode,Ct=!1),qn(t,r,l),va(l.stateNode),je=c,Ct=h;break;case 5:Ge||vn(l,r);case 6:if(c=je,h=Ct,je=null,qn(t,r,l),je=c,Ct=h,je!==null)if(Ct)try{(je.nodeType===9?je.body:je.nodeName==="HTML"?je.ownerDocument.body:je).removeChild(l.stateNode)}catch(g){Oe(l,r,g)}else try{je.removeChild(l.stateNode)}catch(g){Oe(l,r,g)}break;case 18:je!==null&&(Ct?(t=je,Pm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Na(t)):Pm(je,l.stateNode));break;case 4:c=je,h=Ct,je=l.stateNode.containerInfo,Ct=!0,qn(t,r,l),je=c,Ct=h;break;case 0:case 11:case 14:case 15:Ge||ci(2,l,r),Ge||ci(4,l,r),qn(t,r,l);break;case 1:Ge||(vn(l,r),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Wg(l,r,c)),qn(t,r,l);break;case 21:qn(t,r,l);break;case 22:Ge=(c=Ge)||l.memoizedState!==null,qn(t,r,l),Ge=c;break;default:qn(t,r,l)}}function lm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Na(t)}catch(l){Oe(r,r.return,l)}}function R1(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new im),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new im),r;default:throw Error(s(435,t.tag))}}function lf(t,r){var l=R1(t);r.forEach(function(c){var h=$1.bind(null,t,c);l.has(c)||(l.add(c),c.then(h,h))})}function zt(t,r){var l=r.deletions;if(l!==null)for(var c=0;c<l.length;c++){var h=l[c],g=t,w=r,_=w;e:for(;_!==null;){switch(_.tag){case 27:if(yi(_.type)){je=_.stateNode,Ct=!1;break e}break;case 5:je=_.stateNode,Ct=!1;break e;case 3:case 4:je=_.stateNode.containerInfo,Ct=!0;break e}_=_.return}if(je===null)throw Error(s(160));am(g,w,h),je=null,Ct=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)om(r,t),r=r.sibling}var un=null;function om(t,r){var l=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:zt(r,t),Ht(t),c&4&&(ci(3,t,t.return),ca(3,t),ci(5,t,t.return));break;case 1:zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),c&64&&Hn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var h=un;if(zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),c&4){var g=l!==null?l.memoizedState:null;if(c=t.memoizedState,l===null)if(c===null)if(t.stateNode===null){e:{c=t.type,l=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[jr]||g[ht]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),lt(g,c,l),g[ht]=t,We(g),c=g;break e;case"link":var w=ny("link","href",h).get(c+(l.href||""));if(w){for(var _=0;_<w.length;_++)if(g=w[_],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){w.splice(_,1);break t}}g=h.createElement(c),lt(g,c,l),h.head.appendChild(g);break;case"meta":if(w=ny("meta","content",h).get(c+(l.content||""))){for(_=0;_<w.length;_++)if(g=w[_],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){w.splice(_,1);break t}}g=h.createElement(c),lt(g,c,l),h.head.appendChild(g);break;default:throw Error(s(468,c))}g[ht]=t,We(g),c=g}t.stateNode=c}else iy(h,t.type,t.stateNode);else t.stateNode=ty(h,c,t.memoizedProps);else g!==c?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,c===null?iy(h,t.type,t.stateNode):ty(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&nf(t,t.memoizedProps,l.memoizedProps)}break;case 27:zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),l!==null&&c&4&&nf(t,t.memoizedProps,l.memoizedProps);break;case 5:if(zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),t.flags&32){h=t.stateNode;try{Ts(h,"")}catch(U){Oe(t,t.return,U)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,nf(t,h,l!==null?l.memoizedProps:h)),c&1024&&(af=!0);break;case 6:if(zt(r,t),Ht(t),c&4){if(t.stateNode===null)throw Error(s(162));c=t.memoizedProps,l=t.stateNode;try{l.nodeValue=c}catch(U){Oe(t,t.return,U)}}break;case 3:if(fo=null,h=un,un=co(r.containerInfo),zt(r,t),un=h,Ht(t),c&4&&l!==null&&l.memoizedState.isDehydrated)try{Na(r.containerInfo)}catch(U){Oe(t,t.return,U)}af&&(af=!1,cm(t));break;case 4:c=un,un=co(t.stateNode.containerInfo),zt(r,t),Ht(t),un=c;break;case 12:zt(r,t),Ht(t);break;case 13:zt(r,t),Ht(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(df=Kt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 22:h=t.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,D=Hn,K=Ge;if(Hn=D||h,Ge=K||A,zt(r,t),Ge=K,Hn=D,Ht(t),c&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||A||Hn||Ge||Pi(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){A=l=r;try{if(g=A.stateNode,h)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{_=A.stateNode;var X=A.memoizedProps.style,B=X!=null&&X.hasOwnProperty("display")?X.display:null;_.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(U){Oe(A,A.return,U)}}}else if(r.tag===6){if(l===null){A=r;try{A.stateNode.nodeValue=h?"":A.memoizedProps}catch(U){Oe(A,A.return,U)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,lf(t,l))));break;case 19:zt(r,t),Ht(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 30:break;case 21:break;default:zt(r,t),Ht(t)}}function Ht(t){var r=t.flags;if(r&2){try{for(var l,c=t.return;c!==null;){if(tm(c)){l=c;break}c=c.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var h=l.stateNode,g=sf(t);Ql(t,g,h);break;case 5:var w=l.stateNode;l.flags&32&&(Ts(w,""),l.flags&=-33);var _=sf(t);Ql(t,_,w);break;case 3:case 4:var A=l.stateNode.containerInfo,D=sf(t);rf(t,D,A);break;default:throw Error(s(161))}}catch(K){Oe(t,t.return,K)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function cm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;cm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function ui(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)sm(t,r.alternate,r),r=r.sibling}function Pi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:ci(4,r,r.return),Pi(r);break;case 1:vn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Wg(r,r.return,l),Pi(r);break;case 27:va(r.stateNode);case 26:case 5:vn(r,r.return),Pi(r);break;case 22:r.memoizedState===null&&Pi(r);break;case 30:Pi(r);break;default:Pi(r)}t=t.sibling}}function fi(t,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,h=t,g=r,w=g.flags;switch(g.tag){case 0:case 11:case 15:fi(h,g,l),ca(4,g);break;case 1:if(fi(h,g,l),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){Oe(c,c.return,D)}if(c=g,h=c.updateQueue,h!==null){var _=c.stateNode;try{var A=h.shared.hiddenCallbacks;if(A!==null)for(h.shared.hiddenCallbacks=null,h=0;h<A.length;h++)zp(A[h],_)}catch(D){Oe(c,c.return,D)}}l&&w&64&&Jg(g),ua(g,g.return);break;case 27:nm(g);case 26:case 5:fi(h,g,l),l&&c===null&&w&4&&em(g),ua(g,g.return);break;case 12:fi(h,g,l);break;case 13:fi(h,g,l),l&&w&4&&lm(h,g);break;case 22:g.memoizedState===null&&fi(h,g,l),ua(g,g.return);break;case 30:break;default:fi(h,g,l)}r=r.sibling}}function of(t,r){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Fr(l))}function cf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Fr(t))}function Sn(t,r,l,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)um(t,r,l,c),r=r.sibling}function um(t,r,l,c){var h=r.flags;switch(r.tag){case 0:case 11:case 15:Sn(t,r,l,c),h&2048&&ca(9,r);break;case 1:Sn(t,r,l,c);break;case 3:Sn(t,r,l,c),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Fr(t)));break;case 12:if(h&2048){Sn(t,r,l,c),t=r.stateNode;try{var g=r.memoizedProps,w=g.id,_=g.onPostCommit;typeof _=="function"&&_(w,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Oe(r,r.return,A)}}else Sn(t,r,l,c);break;case 13:Sn(t,r,l,c);break;case 23:break;case 22:g=r.stateNode,w=r.alternate,r.memoizedState!==null?g._visibility&2?Sn(t,r,l,c):fa(t,r):g._visibility&2?Sn(t,r,l,c):(g._visibility|=2,Vs(t,r,l,c,(r.subtreeFlags&10256)!==0)),h&2048&&of(w,r);break;case 24:Sn(t,r,l,c),h&2048&&cf(r.alternate,r);break;default:Sn(t,r,l,c)}}function Vs(t,r,l,c,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var g=t,w=r,_=l,A=c,D=w.flags;switch(w.tag){case 0:case 11:case 15:Vs(g,w,_,A,h),ca(8,w);break;case 23:break;case 22:var K=w.stateNode;w.memoizedState!==null?K._visibility&2?Vs(g,w,_,A,h):fa(g,w):(K._visibility|=2,Vs(g,w,_,A,h)),h&&D&2048&&of(w.alternate,w);break;case 24:Vs(g,w,_,A,h),h&&D&2048&&cf(w.alternate,w);break;default:Vs(g,w,_,A,h)}r=r.sibling}}function fa(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=t,c=r,h=c.flags;switch(c.tag){case 22:fa(l,c),h&2048&&of(c.alternate,c);break;case 24:fa(l,c),h&2048&&cf(c.alternate,c);break;default:fa(l,c)}r=r.sibling}}var ha=8192;function Gs(t){if(t.subtreeFlags&ha)for(t=t.child;t!==null;)fm(t),t=t.sibling}function fm(t){switch(t.tag){case 26:Gs(t),t.flags&ha&&t.memoizedState!==null&&yw(un,t.memoizedState,t.memoizedProps);break;case 5:Gs(t);break;case 3:case 4:var r=un;un=co(t.stateNode.containerInfo),Gs(t),un=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ha,ha=16777216,Gs(t),ha=r):Gs(t));break;default:Gs(t)}}function hm(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function da(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var c=r[l];tt=c,pm(c,t)}hm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)dm(t),t=t.sibling}function dm(t){switch(t.tag){case 0:case 11:case 15:da(t),t.flags&2048&&ci(9,t,t.return);break;case 3:da(t);break;case 12:da(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Zl(t)):da(t);break;default:da(t)}}function Zl(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var c=r[l];tt=c,pm(c,t)}hm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ci(8,r,r.return),Zl(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Zl(r));break;default:Zl(r)}t=t.sibling}}function pm(t,r){for(;tt!==null;){var l=tt;switch(l.tag){case 0:case 11:case 15:ci(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Fr(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,tt=c;else e:for(l=t;tt!==null;){c=tt;var h=c.sibling,g=c.return;if(rm(c),c===l){tt=null;break e}if(h!==null){h.return=g,tt=h;break e}tt=g}}}var L1={getCacheForType:function(t){var r=dt(Qe),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l}},j1=typeof WeakMap=="function"?WeakMap:Map,Te=0,Le=null,me=null,Se=0,Ee=0,qt=null,hi=!1,Ks=!1,uf=!1,$n=0,Ie=0,di=0,Fi=0,ff=0,en=0,Ys=0,pa=null,kt=null,hf=!1,df=0,Jl=1/0,Wl=null,pi=null,at=0,gi=null,Xs=null,Ps=0,pf=0,gf=null,gm=null,ga=0,mf=null;function $t(){if((Te&2)!==0&&Se!==0)return Se&-Se;if(z.T!==null){var t=Ds;return t!==0?t:_f()}return Od()}function mm(){en===0&&(en=(Se&536870912)===0||_e?Wn():536870912);var t=Wt.current;return t!==null&&(t.flags|=32),en}function It(t,r,l){(t===Le&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)&&(Fs(t,0),mi(t,Se,en,!1)),Lr(t,l),((Te&2)===0||t!==Le)&&(t===Le&&((Te&2)===0&&(Fi|=l),Ie===4&&mi(t,Se,en,!1)),wn(t))}function ym(t,r,l){if((Te&6)!==0)throw Error(s(327));var c=!l&&(r&124)===0&&(r&t.expiredLanes)===0||Jn(t,r),h=c?U1(t,r):vf(t,r,!0),g=c;do{if(h===0){Ks&&!c&&mi(t,r,0,!1);break}else{if(l=t.current.alternate,g&&!D1(l)){h=vf(t,r,!1),g=!1;continue}if(h===2){if(g=r,t.errorRecoveryDisabledLanes&g)var w=0;else w=t.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){r=w;e:{var _=t;h=pa;var A=_.current.memoizedState.isDehydrated;if(A&&(Fs(_,w).flags|=256),w=vf(_,w,!1),w!==2){if(uf&&!A){_.errorRecoveryDisabledLanes|=g,Fi|=g,h=4;break e}g=kt,kt=h,g!==null&&(kt===null?kt=g:kt.push.apply(kt,g))}h=w}if(g=!1,h!==2)continue}}if(h===1){Fs(t,0),mi(t,r,0,!0);break}e:{switch(c=t,g=h,g){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:mi(c,r,en,!hi);break e;case 2:kt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=df+300-Kt(),10<h)){if(mi(c,r,en,!hi),ms(c,0,!0)!==0)break e;c.timeoutHandle=Ym(bm.bind(null,c,l,kt,Wl,hf,r,en,Fi,Ys,hi,g,2,-0,0),h);break e}bm(c,l,kt,Wl,hf,r,en,Fi,Ys,hi,g,0,-0,0)}}break}while(!0);wn(t)}function bm(t,r,l,c,h,g,w,_,A,D,K,X,B,U){if(t.timeoutHandle=-1,X=r.subtreeFlags,(X&8192||(X&16785408)===16785408)&&(xa={stylesheets:null,count:0,unsuspend:mw},fm(r),X=bw(),X!==null)){t.cancelPendingCommit=X(Em.bind(null,t,r,g,l,c,h,w,_,A,K,1,B,U)),mi(t,g,w,!D);return}Em(t,r,g,l,c,h,w,_,A)}function D1(t){for(var r=t;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var h=l[c],g=h.getSnapshot;h=h.value;try{if(!Bt(g(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function mi(t,r,l,c){r&=~ff,r&=~Fi,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var h=r;0<h;){var g=31-vt(h),w=1<<g;c[g]=-1,h&=~w}l!==0&&kd(t,l,r)}function eo(){return(Te&6)===0?(ma(0),!1):!0}function yf(){if(me!==null){if(Ee===0)var t=me.return;else t=me,Ln=Vi=null,Lu(t),$s=null,aa=0,t=me;for(;t!==null;)Zg(t.alternate,t),t=t.return;me=null}}function Fs(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,W1(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),yf(),Le=t,me=l=Mn(t.current,null),Se=r,Ee=0,qt=null,hi=!1,Ks=Jn(t,r),uf=!1,Ys=en=ff=Fi=di=Ie=0,kt=pa=null,hf=!1,(r&8)!==0&&(r|=r&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=r;0<c;){var h=31-vt(c),g=1<<h;r|=t[h],c&=~g}return $n=r,xl(),l}function vm(t,r){pe=null,z.H=$l,r===Zr||r===Ol?(r=Bp(),Ee=3):r===Lp?(r=Bp(),Ee=4):Ee=r===Ug?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,qt=r,me===null&&(Ie=1,Yl(t,Ft(r,t.current)))}function Sm(){var t=z.H;return z.H=$l,t===null?$l:t}function wm(){var t=z.A;return z.A=L1,t}function bf(){Ie=4,hi||(Se&4194048)!==Se&&Wt.current!==null||(Ks=!0),(di&134217727)===0&&(Fi&134217727)===0||Le===null||mi(Le,Se,en,!1)}function vf(t,r,l){var c=Te;Te|=2;var h=Sm(),g=wm();(Le!==t||Se!==r)&&(Wl=null,Fs(t,r)),r=!1;var w=Ie;e:do try{if(Ee!==0&&me!==null){var _=me,A=qt;switch(Ee){case 8:yf(),w=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(r=!0);var D=Ee;if(Ee=0,qt=null,Qs(t,_,A,D),l&&Ks){w=0;break e}break;default:D=Ee,Ee=0,qt=null,Qs(t,_,A,D)}}B1(),w=Ie;break}catch(K){vm(t,K)}while(!0);return r&&t.shellSuspendCounter++,Ln=Vi=null,Te=c,z.H=h,z.A=g,me===null&&(Le=null,Se=0,xl()),w}function B1(){for(;me!==null;)xm(me)}function U1(t,r){var l=Te;Te|=2;var c=Sm(),h=wm();Le!==t||Se!==r?(Wl=null,Jl=Kt()+500,Fs(t,r)):Ks=Jn(t,r);e:do try{if(Ee!==0&&me!==null){r=me;var g=qt;t:switch(Ee){case 1:Ee=0,qt=null,Qs(t,r,g,1);break;case 2:case 9:if(jp(g)){Ee=0,qt=null,_m(r);break}r=function(){Ee!==2&&Ee!==9||Le!==t||(Ee=7),wn(t)},g.then(r,r);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:jp(g)?(Ee=0,qt=null,_m(r)):(Ee=0,qt=null,Qs(t,r,g,7));break;case 5:var w=null;switch(me.tag){case 26:w=me.memoizedState;case 5:case 27:var _=me;if(!w||sy(w)){Ee=0,qt=null;var A=_.sibling;if(A!==null)me=A;else{var D=_.return;D!==null?(me=D,to(D)):me=null}break t}}Ee=0,qt=null,Qs(t,r,g,5);break;case 6:Ee=0,qt=null,Qs(t,r,g,6);break;case 8:yf(),Ie=6;break e;default:throw Error(s(462))}}z1();break}catch(K){vm(t,K)}while(!0);return Ln=Vi=null,z.H=c,z.A=h,Te=l,me!==null?0:(Le=null,Se=0,xl(),Ie)}function z1(){for(;me!==null&&!cl();)xm(me)}function xm(t){var r=Fg(t.alternate,t,$n);t.memoizedProps=t.pendingProps,r===null?to(t):me=r}function _m(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=Vg(l,r,r.pendingProps,r.type,void 0,Se);break;case 11:r=Vg(l,r,r.pendingProps,r.type.render,r.ref,Se);break;case 5:Lu(r);default:Zg(l,r),r=me=Tp(r,$n),r=Fg(l,r,$n)}t.memoizedProps=t.pendingProps,r===null?to(t):me=r}function Qs(t,r,l,c){Ln=Vi=null,Lu(r),$s=null,aa=0;var h=r.return;try{if(N1(t,h,r,l,Se)){Ie=1,Yl(t,Ft(l,t.current)),me=null;return}}catch(g){if(h!==null)throw me=h,g;Ie=1,Yl(t,Ft(l,t.current)),me=null;return}r.flags&32768?(_e||c===1?t=!0:Ks||(Se&536870912)!==0?t=!1:(hi=t=!0,(c===2||c===9||c===3||c===6)&&(c=Wt.current,c!==null&&c.tag===13&&(c.flags|=16384))),Tm(r,t)):to(r)}function to(t){var r=t;do{if((r.flags&32768)!==0){Tm(r,hi);return}t=r.return;var l=k1(r.alternate,r,$n);if(l!==null){me=l;return}if(r=r.sibling,r!==null){me=r;return}me=r=t}while(r!==null);Ie===0&&(Ie=5)}function Tm(t,r){do{var l=M1(t.alternate,t);if(l!==null){l.flags&=32767,me=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){me=t;return}me=t=l}while(t!==null);Ie=6,me=null}function Em(t,r,l,c,h,g,w,_,A){t.cancelPendingCommit=null;do no();while(at!==0);if((Te&6)!==0)throw Error(s(327));if(r!==null){if(r===t.current)throw Error(s(177));if(g=r.lanes|r.childLanes,g|=ou,mS(t,l,g,w,_,A),t===Le&&(me=Le=null,Se=0),Xs=r,gi=t,Ps=l,pf=g,gf=h,gm=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,I1(gs,function(){return Mm(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=z.T,z.T=null,h=Q.p,Q.p=2,w=Te,Te|=4;try{O1(t,r,l)}finally{Te=w,Q.p=h,z.T=c}}at=1,Am(),Nm(),Cm()}}function Am(){if(at===1){at=0;var t=gi,r=Xs,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{om(r,t);var g=Of,w=pp(t.containerInfo),_=g.focusedElem,A=g.selectionRange;if(w!==_&&_&&_.ownerDocument&&dp(_.ownerDocument.documentElement,_)){if(A!==null&&iu(_)){var D=A.start,K=A.end;if(K===void 0&&(K=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(K,_.value.length);else{var X=_.ownerDocument||document,B=X&&X.defaultView||window;if(B.getSelection){var U=B.getSelection(),fe=_.textContent.length,oe=Math.min(A.start,fe),Me=A.end===void 0?oe:Math.min(A.end,fe);!U.extend&&oe>Me&&(w=Me,Me=oe,oe=w);var O=hp(_,oe),M=hp(_,Me);if(O&&M&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==M.node||U.focusOffset!==M.offset)){var j=X.createRange();j.setStart(O.node,O.offset),U.removeAllRanges(),oe>Me?(U.addRange(j),U.extend(M.node,M.offset)):(j.setEnd(M.node,M.offset),U.addRange(j))}}}}for(X=[],U=_;U=U.parentNode;)U.nodeType===1&&X.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<X.length;_++){var Y=X[_];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}go=!!Mf,Of=Mf=null}finally{Te=h,Q.p=c,z.T=l}}t.current=r,at=2}}function Nm(){if(at===2){at=0;var t=gi,r=Xs,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{sm(t,r.alternate,r)}finally{Te=h,Q.p=c,z.T=l}}at=3}}function Cm(){if(at===4||at===3){at=0,kc();var t=gi,r=Xs,l=Ps,c=gm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?at=5:(at=0,Xs=gi=null,km(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(pi=null),Bc(l),r=r.stateNode,ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Ri,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=z.T,h=Q.p,Q.p=2,z.T=null;try{for(var g=t.onRecoverableError,w=0;w<c.length;w++){var _=c[w];g(_.value,{componentStack:_.stack})}}finally{z.T=r,Q.p=h}}(Ps&3)!==0&&no(),wn(t),h=t.pendingLanes,(l&4194090)!==0&&(h&42)!==0?t===mf?ga++:(ga=0,mf=t):ga=0,ma(0)}}function km(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Fr(r)))}function no(t){return Am(),Nm(),Cm(),Mm()}function Mm(){if(at!==5)return!1;var t=gi,r=pf;pf=0;var l=Bc(Ps),c=z.T,h=Q.p;try{Q.p=32>l?32:l,z.T=null,l=gf,gf=null;var g=gi,w=Ps;if(at=0,Xs=gi=null,Ps=0,(Te&6)!==0)throw Error(s(331));var _=Te;if(Te|=4,dm(g.current),um(g,g.current,w,l),Te=_,ma(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Ri,g)}catch{}return!0}finally{Q.p=h,z.T=c,km(t,r)}}function Om(t,r,l){r=Ft(l,r),r=Xu(t.stateNode,r,2),t=ri(t,r,2),t!==null&&(Lr(t,2),wn(t))}function Oe(t,r,l){if(t.tag===3)Om(t,t,l);else for(;r!==null;){if(r.tag===3){Om(r,t,l);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(pi===null||!pi.has(c))){t=Ft(l,t),l=Dg(2),c=ri(r,l,2),c!==null&&(Bg(l,c,r,t),Lr(c,2),wn(c));break}}r=r.return}}function Sf(t,r,l){var c=t.pingCache;if(c===null){c=t.pingCache=new j1;var h=new Set;c.set(r,h)}else h=c.get(r),h===void 0&&(h=new Set,c.set(r,h));h.has(l)||(uf=!0,h.add(l),t=H1.bind(null,t,r,l),r.then(t,t))}function H1(t,r,l){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Le===t&&(Se&l)===l&&(Ie===4||Ie===3&&(Se&62914560)===Se&&300>Kt()-df?(Te&2)===0&&Fs(t,0):ff|=l,Ys===Se&&(Ys=0)),wn(t)}function Rm(t,r){r===0&&(r=mn()),t=Os(t,r),t!==null&&(Lr(t,r),wn(t))}function q1(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),Rm(t,l)}function $1(t,r){var l=0;switch(t.tag){case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),Rm(t,l)}function I1(t,r){return ds(t,r)}var io=null,Zs=null,wf=!1,so=!1,xf=!1,Qi=0;function wn(t){t!==Zs&&t.next===null&&(Zs===null?io=Zs=t:Zs=Zs.next=t),so=!0,wf||(wf=!0,G1())}function ma(t,r){if(!xf&&so){xf=!0;do for(var l=!1,c=io;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var w=c.suspendedLanes,_=c.pingedLanes;g=(1<<31-vt(42|t)+1)-1,g&=h&~(w&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,Bm(c,g))}else g=Se,g=ms(c,c===Le?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Jn(c,g)||(l=!0,Bm(c,g));c=c.next}while(l);xf=!1}}function V1(){Lm()}function Lm(){so=wf=!1;var t=0;Qi!==0&&(J1()&&(t=Qi),Qi=0);for(var r=Kt(),l=null,c=io;c!==null;){var h=c.next,g=jm(c,r);g===0?(c.next=null,l===null?io=h:l.next=h,h===null&&(Zs=l)):(l=c,(t!==0||(g&3)!==0)&&(so=!0)),c=h}ma(t)}function jm(t,r){for(var l=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var w=31-vt(g),_=1<<w,A=h[w];A===-1?((_&l)===0||(_&c)!==0)&&(h[w]=ue(_,r)):A<=r&&(t.expiredLanes|=_),g&=~_}if(r=Le,l=Se,l=ms(t,t===r?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===r&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&bt(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Jn(t,l)){if(r=l&-l,r===t.callbackPriority)return r;switch(c!==null&&bt(c),Bc(l)){case 2:case 8:l=Oi;break;case 32:l=gs;break;case 268435456:l=ul;break;default:l=gs}return c=Dm.bind(null,t),l=ds(l,c),t.callbackPriority=r,t.callbackNode=l,r}return c!==null&&c!==null&&bt(c),t.callbackPriority=2,t.callbackNode=null,2}function Dm(t,r){if(at!==0&&at!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(no()&&t.callbackNode!==l)return null;var c=Se;return c=ms(t,t===Le?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(ym(t,c,r),jm(t,Kt()),t.callbackNode!=null&&t.callbackNode===l?Dm.bind(null,t):null)}function Bm(t,r){if(no())return null;ym(t,r,!0)}function G1(){ew(function(){(Te&6)!==0?ds(ps,V1):Lm()})}function _f(){return Qi===0&&(Qi=Wn()),Qi}function Um(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:gl(""+t)}function zm(t,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,t.id&&l.setAttribute("form",t.id),r.parentNode.insertBefore(l,r),t=new FormData(t),l.parentNode.removeChild(l),t}function K1(t,r,l,c,h){if(r==="submit"&&l&&l.stateNode===h){var g=Um((h[Et]||null).action),w=c.submitter;w&&(r=(r=w[Et]||null)?Um(r.formAction):w.getAttribute("formAction"),r!==null&&(g=r,w=null));var _=new vl("action","action",null,c,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Qi!==0){var A=w?zm(h,w):new FormData(h);Iu(l,{pending:!0,data:A,method:h.method,action:g},null,A)}}else typeof g=="function"&&(_.preventDefault(),A=w?zm(h,w):new FormData(h),Iu(l,{pending:!0,data:A,method:h.method,action:g},g,A))},currentTarget:h}]})}}for(var Tf=0;Tf<lu.length;Tf++){var Ef=lu[Tf],Y1=Ef.toLowerCase(),X1=Ef[0].toUpperCase()+Ef.slice(1);cn(Y1,"on"+X1)}cn(yp,"onAnimationEnd"),cn(bp,"onAnimationIteration"),cn(vp,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(u1,"onTransitionRun"),cn(f1,"onTransitionStart"),cn(h1,"onTransitionCancel"),cn(Sp,"onTransitionEnd"),ws("onMouseEnter",["mouseout","mouseover"]),ws("onMouseLeave",["mouseout","mouseover"]),ws("onPointerEnter",["pointerout","pointerover"]),ws("onPointerLeave",["pointerout","pointerover"]),ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ya="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(" "),P1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ya));function Hm(t,r){r=(r&4)!==0;for(var l=0;l<t.length;l++){var c=t[l],h=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var w=c.length-1;0<=w;w--){var _=c[w],A=_.instance,D=_.currentTarget;if(_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(K){Kl(K)}h.currentTarget=null,g=A}else for(w=0;w<c.length;w++){if(_=c[w],A=_.instance,D=_.currentTarget,_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(K){Kl(K)}h.currentTarget=null,g=A}}}}function ye(t,r){var l=r[Uc];l===void 0&&(l=r[Uc]=new Set);var c=t+"__bubble";l.has(c)||(qm(r,t,2,!1),l.add(c))}function Af(t,r,l){var c=0;r&&(c|=4),qm(l,t,c,r)}var ro="_reactListening"+Math.random().toString(36).slice(2);function Nf(t){if(!t[ro]){t[ro]=!0,Ld.forEach(function(l){l!=="selectionchange"&&(P1.has(l)||Af(l,!1,t),Af(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[ro]||(r[ro]=!0,Af("selectionchange",!1,r))}}function qm(t,r,l,c){switch(uy(r)){case 2:var h=ww;break;case 8:h=xw;break;default:h=$f}l=h.bind(null,r,l,t),h=void 0,!Pc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(r,l,{capture:!0,passive:h}):t.addEventListener(r,l,!0):h!==void 0?t.addEventListener(r,l,{passive:h}):t.addEventListener(r,l,!1)}function Cf(t,r,l,c,h){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var _=c.stateNode.containerInfo;if(_===h)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&w.stateNode.containerInfo===h)return;w=w.return}for(;_!==null;){if(w=bs(_),w===null)return;if(A=w.tag,A===5||A===6||A===26||A===27){c=g=w;continue e}_=_.parentNode}}c=c.return}Xd(function(){var D=g,K=Yc(l),X=[];e:{var B=wp.get(t);if(B!==void 0){var U=vl,fe=t;switch(t){case"keypress":if(yl(l)===0)break e;case"keydown":case"keyup":U=IS;break;case"focusin":fe="focus",U=Jc;break;case"focusout":fe="blur",U=Jc;break;case"beforeblur":case"afterblur":U=Jc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=Qd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=MS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=KS;break;case yp:case bp:case vp:U=LS;break;case Sp:U=XS;break;case"scroll":case"scrollend":U=CS;break;case"wheel":U=FS;break;case"copy":case"cut":case"paste":U=DS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Jd;break;case"toggle":case"beforetoggle":U=ZS}var oe=(r&4)!==0,Me=!oe&&(t==="scroll"||t==="scrollend"),O=oe?B!==null?B+"Capture":null:B;oe=[];for(var M=D,j;M!==null;){var Y=M;if(j=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||j===null||O===null||(Y=Br(M,O),Y!=null&&oe.push(ba(M,Y,j))),Me)break;M=M.return}0<oe.length&&(B=new U(B,fe,null,l,K),X.push({event:B,listeners:oe}))}}if((r&7)===0){e:{if(B=t==="mouseover"||t==="pointerover",U=t==="mouseout"||t==="pointerout",B&&l!==Kc&&(fe=l.relatedTarget||l.fromElement)&&(bs(fe)||fe[ys]))break e;if((U||B)&&(B=K.window===K?K:(B=K.ownerDocument)?B.defaultView||B.parentWindow:window,U?(fe=l.relatedTarget||l.toElement,U=D,fe=fe?bs(fe):null,fe!==null&&(Me=o(fe),oe=fe.tag,fe!==Me||oe!==5&&oe!==27&&oe!==6)&&(fe=null)):(U=null,fe=D),U!==fe)){if(oe=Qd,Y="onMouseLeave",O="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(oe=Jd,Y="onPointerLeave",O="onPointerEnter",M="pointer"),Me=U==null?B:Dr(U),j=fe==null?B:Dr(fe),B=new oe(Y,M+"leave",U,l,K),B.target=Me,B.relatedTarget=j,Y=null,bs(K)===D&&(oe=new oe(O,M+"enter",fe,l,K),oe.target=j,oe.relatedTarget=Me,Y=oe),Me=Y,U&&fe)t:{for(oe=U,O=fe,M=0,j=oe;j;j=Js(j))M++;for(j=0,Y=O;Y;Y=Js(Y))j++;for(;0<M-j;)oe=Js(oe),M--;for(;0<j-M;)O=Js(O),j--;for(;M--;){if(oe===O||O!==null&&oe===O.alternate)break t;oe=Js(oe),O=Js(O)}oe=null}else oe=null;U!==null&&$m(X,B,U,oe,!1),fe!==null&&Me!==null&&$m(X,Me,fe,oe,!0)}}e:{if(B=D?Dr(D):window,U=B.nodeName&&B.nodeName.toLowerCase(),U==="select"||U==="input"&&B.type==="file")var ne=ap;else if(sp(B))if(lp)ne=l1;else{ne=r1;var ge=s1}else U=B.nodeName,!U||U.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?D&&Gc(D.elementType)&&(ne=ap):ne=a1;if(ne&&(ne=ne(t,D))){rp(X,ne,l,K);break e}ge&&ge(t,B,D),t==="focusout"&&D&&B.type==="number"&&D.memoizedProps.value!=null&&Vc(B,"number",B.value)}switch(ge=D?Dr(D):window,t){case"focusin":(sp(ge)||ge.contentEditable==="true")&&(Cs=ge,su=D,Gr=null);break;case"focusout":Gr=su=Cs=null;break;case"mousedown":ru=!0;break;case"contextmenu":case"mouseup":case"dragend":ru=!1,gp(X,l,K);break;case"selectionchange":if(c1)break;case"keydown":case"keyup":gp(X,l,K)}var re;if(eu)e:{switch(t){case"compositionstart":var ce="onCompositionStart";break e;case"compositionend":ce="onCompositionEnd";break e;case"compositionupdate":ce="onCompositionUpdate";break e}ce=void 0}else Ns?np(t,l)&&(ce="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(ce="onCompositionStart");ce&&(Wd&&l.locale!=="ko"&&(Ns||ce!=="onCompositionStart"?ce==="onCompositionEnd"&&Ns&&(re=Pd()):(ti=K,Fc="value"in ti?ti.value:ti.textContent,Ns=!0)),ge=ao(D,ce),0<ge.length&&(ce=new Zd(ce,t,null,l,K),X.push({event:ce,listeners:ge}),re?ce.data=re:(re=ip(l),re!==null&&(ce.data=re)))),(re=WS?e1(t,l):t1(t,l))&&(ce=ao(D,"onBeforeInput"),0<ce.length&&(ge=new Zd("onBeforeInput","beforeinput",null,l,K),X.push({event:ge,listeners:ce}),ge.data=re)),K1(X,t,D,l,K)}Hm(X,r)})}function ba(t,r,l){return{instance:t,listener:r,currentTarget:l}}function ao(t,r){for(var l=r+"Capture",c=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Br(t,l),h!=null&&c.unshift(ba(t,h,g)),h=Br(t,r),h!=null&&c.push(ba(t,h,g))),t.tag===3)return c;t=t.return}return[]}function Js(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function $m(t,r,l,c,h){for(var g=r._reactName,w=[];l!==null&&l!==c;){var _=l,A=_.alternate,D=_.stateNode;if(_=_.tag,A!==null&&A===c)break;_!==5&&_!==26&&_!==27||D===null||(A=D,h?(D=Br(l,g),D!=null&&w.unshift(ba(l,D,A))):h||(D=Br(l,g),D!=null&&w.push(ba(l,D,A)))),l=l.return}w.length!==0&&t.push({event:r,listeners:w})}var F1=/\r\n?/g,Q1=/\u0000|\uFFFD/g;function Im(t){return(typeof t=="string"?t:""+t).replace(F1,`
50
- `).replace(Q1,"")}function Vm(t,r){return r=Im(r),Im(t)===r}function lo(){}function ke(t,r,l,c,h,g){switch(l){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||Ts(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&Ts(t,""+c);break;case"className":hl(t,"class",c);break;case"tabIndex":hl(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":hl(t,l,c);break;case"style":Kd(t,c,g);break;case"data":if(r!=="object"){hl(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||l!=="href")){t.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=gl(""+c),t.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(l,"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 g=="function"&&(l==="formAction"?(r!=="input"&&ke(t,r,"name",h.name,h,null),ke(t,r,"formEncType",h.formEncType,h,null),ke(t,r,"formMethod",h.formMethod,h,null),ke(t,r,"formTarget",h.formTarget,h,null)):(ke(t,r,"encType",h.encType,h,null),ke(t,r,"method",h.method,h,null),ke(t,r,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=gl(""+c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=lo);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}l=gl(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""+c):t.removeAttribute(l);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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":c===!0?t.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(l,c):t.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(l):t.setAttribute(l,c);break;case"popover":ye("beforetoggle",t),ye("toggle",t),fl(t,"popover",c);break;case"xlinkActuate":Cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Cn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Cn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Cn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Cn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":fl(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=AS.get(l)||l,fl(t,l,c))}}function kf(t,r,l,c,h,g){switch(l){case"style":Kd(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"children":typeof c=="string"?Ts(t,c):(typeof c=="number"||typeof c=="bigint")&&Ts(t,""+c);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"onClick":c!=null&&(t.onclick=lo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),r=l.slice(2,h?l.length-7:void 0),g=t[Et]||null,g=g!=null?g[l]:null,typeof g=="function"&&t.removeEventListener(r,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(r,c,h);break e}l in t?t[l]=c:c===!0?t.setAttribute(l,""):fl(t,l,c)}}}function lt(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",t),ye("load",t);var c=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var w=l[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,g,w,l,null)}}h&&ke(t,r,"srcSet",l.srcSet,l,null),c&&ke(t,r,"src",l.src,l,null);return;case"input":ye("invalid",t);var _=g=w=h=null,A=null,D=null;for(c in l)if(l.hasOwnProperty(c)){var K=l[c];if(K!=null)switch(c){case"name":h=K;break;case"type":w=K;break;case"checked":A=K;break;case"defaultChecked":D=K;break;case"value":g=K;break;case"defaultValue":_=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(s(137,r));break;default:ke(t,r,c,K,l,null)}}$d(t,g,_,A,D,w,h,!1),dl(t);return;case"select":ye("invalid",t),c=w=g=null;for(h in l)if(l.hasOwnProperty(h)&&(_=l[h],_!=null))switch(h){case"value":g=_;break;case"defaultValue":w=_;break;case"multiple":c=_;default:ke(t,r,h,_,l,null)}r=g,l=w,t.multiple=!!c,r!=null?_s(t,!!c,r,!1):l!=null&&_s(t,!!c,l,!0);return;case"textarea":ye("invalid",t),g=h=c=null;for(w in l)if(l.hasOwnProperty(w)&&(_=l[w],_!=null))switch(w){case"value":c=_;break;case"defaultValue":h=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(91));break;default:ke(t,r,w,_,l,null)}Vd(t,c,h,g),dl(t);return;case"option":for(A in l)if(l.hasOwnProperty(A)&&(c=l[A],c!=null))switch(A){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:ke(t,r,A,c,l,null)}return;case"dialog":ye("beforetoggle",t),ye("toggle",t),ye("cancel",t),ye("close",t);break;case"iframe":case"object":ye("load",t);break;case"video":case"audio":for(c=0;c<ya.length;c++)ye(ya[c],t);break;case"image":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"embed":case"source":case"link":ye("error",t),ye("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in l)if(l.hasOwnProperty(D)&&(c=l[D],c!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,D,c,l,null)}return;default:if(Gc(r)){for(K in l)l.hasOwnProperty(K)&&(c=l[K],c!==void 0&&kf(t,r,K,c,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(c=l[_],c!=null&&ke(t,r,_,c,l,null))}function Z1(t,r,l,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,w=null,_=null,A=null,D=null,K=null;for(U in l){var X=l[U];if(l.hasOwnProperty(U)&&X!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":A=X;default:c.hasOwnProperty(U)||ke(t,r,U,null,c,X)}}for(var B in c){var U=c[B];if(X=l[B],c.hasOwnProperty(B)&&(U!=null||X!=null))switch(B){case"type":g=U;break;case"name":h=U;break;case"checked":D=U;break;case"defaultChecked":K=U;break;case"value":w=U;break;case"defaultValue":_=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:U!==X&&ke(t,r,B,U,c,X)}}Ic(t,w,_,A,D,K,g,h);return;case"select":U=w=_=B=null;for(g in l)if(A=l[g],l.hasOwnProperty(g)&&A!=null)switch(g){case"value":break;case"multiple":U=A;default:c.hasOwnProperty(g)||ke(t,r,g,null,c,A)}for(h in c)if(g=c[h],A=l[h],c.hasOwnProperty(h)&&(g!=null||A!=null))switch(h){case"value":B=g;break;case"defaultValue":_=g;break;case"multiple":w=g;default:g!==A&&ke(t,r,h,g,c,A)}r=_,l=w,c=U,B!=null?_s(t,!!l,B,!1):!!c!=!!l&&(r!=null?_s(t,!!l,r,!0):_s(t,!!l,l?[]:"",!1));return;case"textarea":U=B=null;for(_ in l)if(h=l[_],l.hasOwnProperty(_)&&h!=null&&!c.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ke(t,r,_,null,c,h)}for(w in c)if(h=c[w],g=l[w],c.hasOwnProperty(w)&&(h!=null||g!=null))switch(w){case"value":B=h;break;case"defaultValue":U=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&ke(t,r,w,h,c,g)}Id(t,B,U);return;case"option":for(var fe in l)if(B=l[fe],l.hasOwnProperty(fe)&&B!=null&&!c.hasOwnProperty(fe))switch(fe){case"selected":t.selected=!1;break;default:ke(t,r,fe,null,c,B)}for(A in c)if(B=c[A],U=l[A],c.hasOwnProperty(A)&&B!==U&&(B!=null||U!=null))switch(A){case"selected":t.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:ke(t,r,A,B,c,U)}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 oe in l)B=l[oe],l.hasOwnProperty(oe)&&B!=null&&!c.hasOwnProperty(oe)&&ke(t,r,oe,null,c,B);for(D in c)if(B=c[D],U=l[D],c.hasOwnProperty(D)&&B!==U&&(B!=null||U!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,r));break;default:ke(t,r,D,B,c,U)}return;default:if(Gc(r)){for(var Me in l)B=l[Me],l.hasOwnProperty(Me)&&B!==void 0&&!c.hasOwnProperty(Me)&&kf(t,r,Me,void 0,c,B);for(K in c)B=c[K],U=l[K],!c.hasOwnProperty(K)||B===U||B===void 0&&U===void 0||kf(t,r,K,B,c,U);return}}for(var O in l)B=l[O],l.hasOwnProperty(O)&&B!=null&&!c.hasOwnProperty(O)&&ke(t,r,O,null,c,B);for(X in c)B=c[X],U=l[X],!c.hasOwnProperty(X)||B===U||B==null&&U==null||ke(t,r,X,B,c,U)}var Mf=null,Of=null;function oo(t){return t.nodeType===9?t:t.ownerDocument}function Gm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Km(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function Rf(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Lf=null;function J1(){var t=window.event;return t&&t.type==="popstate"?t===Lf?!1:(Lf=t,!0):(Lf=null,!1)}var Ym=typeof setTimeout=="function"?setTimeout:void 0,W1=typeof clearTimeout=="function"?clearTimeout:void 0,Xm=typeof Promise=="function"?Promise:void 0,ew=typeof queueMicrotask=="function"?queueMicrotask:typeof Xm<"u"?function(t){return Xm.resolve(null).then(t).catch(tw)}:Ym;function tw(t){setTimeout(function(){throw t})}function yi(t){return t==="head"}function Pm(t,r){var l=r,c=0,h=0;do{var g=l.nextSibling;if(t.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(0<c&&8>c){l=c;var w=t.ownerDocument;if(l&1&&va(w.documentElement),l&2&&va(w.body),l&4)for(l=w.head,va(l),w=l.firstChild;w;){var _=w.nextSibling,A=w.nodeName;w[jr]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&w.rel.toLowerCase()==="stylesheet"||l.removeChild(w),w=_}}if(h===0){t.removeChild(g),Na(r);return}h--}else l==="$"||l==="$?"||l==="$!"?h++:c=l.charCodeAt(0)-48;else c=0;l=g}while(l);Na(r)}function jf(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":jf(l),zc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function nw(t,r,l,c){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[jr])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=fn(t.nextSibling),t===null)break}return null}function iw(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=fn(t.nextSibling),t===null))return null;return t}function Df(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function sw(t,r){var l=t.ownerDocument;if(t.data!=="$?"||l.readyState==="complete")r();else{var c=function(){r(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function fn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var Bf=null;function Fm(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"){if(r===0)return t;r--}else l==="/$"&&r++}t=t.previousSibling}return null}function Qm(t,r,l){switch(r=oo(l),t){case"html":if(t=r.documentElement,!t)throw Error(s(452));return t;case"head":if(t=r.head,!t)throw Error(s(453));return t;case"body":if(t=r.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function va(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);zc(t)}var tn=new Map,Zm=new Set;function co(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var In=Q.d;Q.d={f:rw,r:aw,D:lw,C:ow,L:cw,m:uw,X:hw,S:fw,M:dw};function rw(){var t=In.f(),r=eo();return t||r}function aw(t){var r=vs(t);r!==null&&r.tag===5&&r.type==="form"?yg(r):In.r(t)}var Ws=typeof document>"u"?null:document;function Jm(t,r,l){var c=Ws;if(c&&typeof r=="string"&&r){var h=Pt(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),Zm.has(h)||(Zm.add(h),t={rel:t,crossOrigin:l,href:r},c.querySelector(h)===null&&(r=c.createElement("link"),lt(r,"link",t),We(r),c.head.appendChild(r)))}}function lw(t){In.D(t),Jm("dns-prefetch",t,null)}function ow(t,r){In.C(t,r),Jm("preconnect",t,r)}function cw(t,r,l){In.L(t,r,l);var c=Ws;if(c&&t&&r){var h='link[rel="preload"][as="'+Pt(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Pt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Pt(l.imageSizes)+'"]')):h+='[href="'+Pt(t)+'"]';var g=h;switch(r){case"style":g=er(t);break;case"script":g=tr(t)}tn.has(g)||(t=m({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),tn.set(g,t),c.querySelector(h)!==null||r==="style"&&c.querySelector(Sa(g))||r==="script"&&c.querySelector(wa(g))||(r=c.createElement("link"),lt(r,"link",t),We(r),c.head.appendChild(r)))}}function uw(t,r){In.m(t,r);var l=Ws;if(l&&t){var c=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Pt(c)+'"][href="'+Pt(t)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=tr(t)}if(!tn.has(g)&&(t=m({rel:"modulepreload",href:t},r),tn.set(g,t),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wa(g)))return}c=l.createElement("link"),lt(c,"link",t),We(c),l.head.appendChild(c)}}}function fw(t,r,l){In.S(t,r,l);var c=Ws;if(c&&t){var h=Ss(c).hoistableStyles,g=er(t);r=r||"default";var w=h.get(g);if(!w){var _={loading:0,preload:null};if(w=c.querySelector(Sa(g)))_.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},l),(l=tn.get(g))&&Uf(t,l);var A=w=c.createElement("link");We(A),lt(A,"link",t),A._p=new Promise(function(D,K){A.onload=D,A.onerror=K}),A.addEventListener("load",function(){_.loading|=1}),A.addEventListener("error",function(){_.loading|=2}),_.loading|=4,uo(w,r,c)}w={type:"stylesheet",instance:w,count:1,state:_},h.set(g,w)}}}function hw(t,r){In.X(t,r);var l=Ws;if(l&&t){var c=Ss(l).hoistableScripts,h=tr(t),g=c.get(h);g||(g=l.querySelector(wa(h)),g||(t=m({src:t,async:!0},r),(r=tn.get(h))&&zf(t,r),g=l.createElement("script"),We(g),lt(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function dw(t,r){In.M(t,r);var l=Ws;if(l&&t){var c=Ss(l).hoistableScripts,h=tr(t),g=c.get(h);g||(g=l.querySelector(wa(h)),g||(t=m({src:t,async:!0,type:"module"},r),(r=tn.get(h))&&zf(t,r),g=l.createElement("script"),We(g),lt(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function Wm(t,r,l,c){var h=(h=te.current)?co(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=er(l.href),l=Ss(h).hoistableStyles,c=l.get(r),c||(c={type:"style",instance:null,count:0,state:null},l.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=er(l.href);var g=Ss(h).hoistableStyles,w=g.get(t);if(w||(h=h.ownerDocument||h,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,w),(g=h.querySelector(Sa(t)))&&!g._p&&(w.instance=g,w.state.loading=5),tn.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},tn.set(t,l),g||pw(h,t,l,w.state))),r&&c===null)throw Error(s(528,""));return w}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=tr(l),l=Ss(h).hoistableScripts,c=l.get(r),c||(c={type:"script",instance:null,count:0,state:null},l.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function er(t){return'href="'+Pt(t)+'"'}function Sa(t){return'link[rel="stylesheet"]['+t+"]"}function ey(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function pw(t,r,l,c){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=t.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),lt(r,"link",l),We(r),t.head.appendChild(r))}function tr(t){return'[src="'+Pt(t)+'"]'}function wa(t){return"script[async]"+t}function ty(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+Pt(l.href)+'"]');if(c)return r.instance=c,We(c),c;var h=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),We(c),lt(c,"style",h),uo(c,l.precedence,t),r.instance=c;case"stylesheet":h=er(l.href);var g=t.querySelector(Sa(h));if(g)return r.state.loading|=4,r.instance=g,We(g),g;c=ey(l),(h=tn.get(h))&&Uf(c,h),g=(t.ownerDocument||t).createElement("link"),We(g);var w=g;return w._p=new Promise(function(_,A){w.onload=_,w.onerror=A}),lt(g,"link",c),r.state.loading|=4,uo(g,l.precedence,t),r.instance=g;case"script":return g=tr(l.src),(h=t.querySelector(wa(g)))?(r.instance=h,We(h),h):(c=l,(h=tn.get(g))&&(c=m({},l),zf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),We(h),lt(h,"link",c),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,uo(c,l.precedence,t));return r.instance}function uo(t,r,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,w=0;w<c.length;w++){var _=c[w];if(_.dataset.precedence===r)g=_;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(t,r.firstChild))}function Uf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function zf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var fo=null;function ny(t,r,l){if(fo===null){var c=new Map,h=fo=new Map;h.set(l,c)}else h=fo,c=h.get(l),c||(c=new Map,h.set(l,c));if(c.has(t))return c;for(c.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[jr]||g[ht]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(r)||"";w=t+w;var _=c.get(w);_?_.push(g):c.set(w,[g])}}return c}function iy(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function gw(t,r,l){if(l===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function sy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var xa=null;function mw(){}function yw(t,r,l){if(xa===null)throw Error(s(475));var c=xa;if(r.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=er(l.href),g=t.querySelector(Sa(h));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=ho.bind(c),t.then(c,c)),r.state.loading|=4,r.instance=g,We(g);return}g=t.ownerDocument||t,l=ey(l),(h=tn.get(h))&&Uf(l,h),g=g.createElement("link"),We(g);var w=g;w._p=new Promise(function(_,A){w.onload=_,w.onerror=A}),lt(g,"link",l),r.instance=g}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(c.count++,r=ho.bind(c),t.addEventListener("load",r),t.addEventListener("error",r))}}function bw(){if(xa===null)throw Error(s(475));var t=xa;return t.stylesheets&&t.count===0&&Hf(t,t.stylesheets),0<t.count?function(r){var l=setTimeout(function(){if(t.stylesheets&&Hf(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(l)}}:null}function ho(){if(this.count--,this.count===0){if(this.stylesheets)Hf(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var po=null;function Hf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,po=new Map,r.forEach(vw,t),po=null,ho.call(t))}function vw(t,r){if(!(r.state.loading&4)){var l=po.get(t);if(l)var c=l.get(null);else{l=new Map,po.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var w=h[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(l.set(w.dataset.precedence,w),c=w)}c&&l.set(null,c)}h=r.instance,w=h.getAttribute("data-precedence"),g=l.get(w)||c,g===c&&l.set(null,h),l.set(w,h),this.count++,c=ho.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var _a={$$typeof:$,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Sw(t,r,l,c,h,g,w,_){this.tag=1,this.containerInfo=t,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=jc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jc(0),this.hiddenUpdates=jc(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function ry(t,r,l,c,h,g,w,_,A,D,K,X){return t=new Sw(t,r,l,w,_,A,D,X),r=1,g===!0&&(r|=24),g=Ut(3,null,null,r),t.current=g,g.stateNode=t,r=vu(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:l,cache:r},_u(g),t}function ay(t){return t?(t=Rs,t):Rs}function ly(t,r,l,c,h,g){h=ay(h),c.context===null?c.context=h:c.pendingContext=h,c=si(r),c.payload={element:l},g=g===void 0?null:g,g!==null&&(c.callback=g),l=ri(t,c,r),l!==null&&(It(l,t,r),Wr(l,t,r))}function oy(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function qf(t,r){oy(t,r),(t=t.alternate)&&oy(t,r)}function cy(t){if(t.tag===13){var r=Os(t,67108864);r!==null&&It(r,t,67108864),qf(t,67108864)}}var go=!0;function ww(t,r,l,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=2,$f(t,r,l,c)}finally{Q.p=g,z.T=h}}function xw(t,r,l,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=8,$f(t,r,l,c)}finally{Q.p=g,z.T=h}}function $f(t,r,l,c){if(go){var h=If(c);if(h===null)Cf(t,r,c,mo,l),fy(t,c);else if(Tw(h,t,r,l,c))c.stopPropagation();else if(fy(t,c),r&4&&-1<_w.indexOf(t)){for(;h!==null;){var g=vs(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Nn(g.pendingLanes);if(w!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;w;){var A=1<<31-vt(w);_.entanglements[1]|=A,w&=~A}wn(g),(Te&6)===0&&(Jl=Kt()+500,ma(0))}}break;case 13:_=Os(g,2),_!==null&&It(_,g,2),eo(),qf(g,2)}if(g=If(c),g===null&&Cf(t,r,c,mo,l),g===h)break;h=g}h!==null&&c.stopPropagation()}else Cf(t,r,c,null,l)}}function If(t){return t=Yc(t),Vf(t)}var mo=null;function Vf(t){if(mo=null,t=bs(t),t!==null){var r=o(t);if(r===null)t=null;else{var l=r.tag;if(l===13){if(t=u(r),t!==null)return t;t=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return mo=t,null}function uy(t){switch(t){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(Rr()){case ps:return 2;case Oi:return 8;case gs:case Qn:return 32;case ul:return 268435456;default:return 32}default:return 32}}var Gf=!1,bi=null,vi=null,Si=null,Ta=new Map,Ea=new Map,wi=[],_w="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 fy(t,r){switch(t){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Ta.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ea.delete(r.pointerId)}}function Aa(t,r,l,c,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:l,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},r!==null&&(r=vs(r),r!==null&&cy(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function Tw(t,r,l,c,h){switch(r){case"focusin":return bi=Aa(bi,t,r,l,c,h),!0;case"dragenter":return vi=Aa(vi,t,r,l,c,h),!0;case"mouseover":return Si=Aa(Si,t,r,l,c,h),!0;case"pointerover":var g=h.pointerId;return Ta.set(g,Aa(Ta.get(g)||null,t,r,l,c,h)),!0;case"gotpointercapture":return g=h.pointerId,Ea.set(g,Aa(Ea.get(g)||null,t,r,l,c,h)),!0}return!1}function hy(t){var r=bs(t.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=u(l),r!==null){t.blockedOn=r,yS(t.priority,function(){if(l.tag===13){var c=$t();c=Dc(c);var h=Os(l,c);h!==null&&It(h,l,c),qf(l,c)}});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function yo(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var l=If(t.nativeEvent);if(l===null){l=t.nativeEvent;var c=new l.constructor(l.type,l);Kc=c,l.target.dispatchEvent(c),Kc=null}else return r=vs(l),r!==null&&cy(r),t.blockedOn=l,!1;r.shift()}return!0}function dy(t,r,l){yo(t)&&l.delete(r)}function Ew(){Gf=!1,bi!==null&&yo(bi)&&(bi=null),vi!==null&&yo(vi)&&(vi=null),Si!==null&&yo(Si)&&(Si=null),Ta.forEach(dy),Ea.forEach(dy)}function bo(t,r){t.blockedOn===r&&(t.blockedOn=null,Gf||(Gf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Ew)))}var vo=null;function py(t){vo!==t&&(vo=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){vo===t&&(vo=null);for(var r=0;r<t.length;r+=3){var l=t[r],c=t[r+1],h=t[r+2];if(typeof c!="function"){if(Vf(c||l)===null)continue;break}var g=vs(l);g!==null&&(t.splice(r,3),r-=3,Iu(g,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function Na(t){function r(A){return bo(A,t)}bi!==null&&bo(bi,t),vi!==null&&bo(vi,t),Si!==null&&bo(Si,t),Ta.forEach(r),Ea.forEach(r);for(var l=0;l<wi.length;l++){var c=wi[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<wi.length&&(l=wi[0],l.blockedOn===null);)hy(l),l.blockedOn===null&&wi.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],g=l[c+1],w=h[Et]||null;if(typeof g=="function")w||py(l);else if(w){var _=null;if(g&&g.hasAttribute("formAction")){if(h=g,w=g[Et]||null)_=w.formAction;else if(Vf(h)!==null)continue}else _=w.action;typeof _=="function"?l[c+1]=_:(l.splice(c,3),c-=3),py(l)}}}function Kf(t){this._internalRoot=t}So.prototype.render=Kf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));var l=r.current,c=$t();ly(l,c,t,r,null,null)},So.prototype.unmount=Kf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;ly(t.current,2,null,t,null,null),eo(),r[ys]=null}};function So(t){this._internalRoot=t}So.prototype.unstable_scheduleHydration=function(t){if(t){var r=Od();t={blockedOn:null,target:t,priority:r};for(var l=0;l<wi.length&&r!==0&&r<wi[l].priority;l++);wi.splice(l,0,t),l===0&&hy(t)}};var gy=e.version;if(gy!=="19.1.1")throw Error(s(527,gy,"19.1.1"));Q.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=d(r),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var Aw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wo.isDisabled&&wo.supportsFiber)try{Ri=wo.inject(Aw),ft=wo}catch{}}return ka.createRoot=function(t,r){if(!a(t))throw Error(s(299));var l=!1,c="",h=Og,g=Rg,w=Lg,_=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(w=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(_=r.unstable_transitionCallbacks)),r=ry(t,1,!1,null,null,l,c,h,g,w,_,null),t[ys]=r.current,Nf(t),new Kf(r)},ka.hydrateRoot=function(t,r,l){if(!a(t))throw Error(s(299));var c=!1,h="",g=Og,w=Rg,_=Lg,A=null,D=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(w=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(A=l.unstable_transitionCallbacks),l.formState!==void 0&&(D=l.formState)),r=ry(t,1,!0,r,l??null,c,h,g,w,_,A,D),r.context=ay(null),l=r.current,c=$t(),c=Dc(c),h=si(c),h.callback=null,ri(l,h,c),l=c,r.current.lanes=l,Lr(r,l),wn(r),t[ys]=r.current,Nf(t),new So(r)},ka.version="19.1.1",ka}var Ny;function Kw(){if(Ny)return Pf.exports;Ny=1;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)}}return n(),Pf.exports=Gw(),Pf.exports}var e2=Kw();const N0=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser",pausesBeforeAction:!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"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!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"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pausesBeforeAction:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.accessibilitySnapshot",{title:"Accessibility snapshot",group:"getter"}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function Yw(n,e){var i;return(i=Xw(n,e))==null?void 0:i.replaceAll(`
51
- `,"\\n")}function Xw(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const a=new URL(n[i]);return a.protocol==="data:"?a.protocol:a.protocol==="about:"?n[i]:a.pathname+a.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const s=Pw(n,i);if(s!==void 0)return s}}function Pw(n,e){const i=e.split(".");let s=n;for(const a of i){if(typeof s!="object"||s===null)return;s=s[a]}if(s!==void 0)return String(s)}function Fw(n){var e;return(e=N0.get(n.type+"."+n.method))==null?void 0:e.group}const za=Symbol("context"),C0=Symbol("nextInContext"),k0=Symbol("prevByEndTime"),M0=Symbol("nextByStartTime"),Cy=Symbol("events");class t2{constructor(e,i){Ae(this,"startTime");Ae(this,"endTime");Ae(this,"browserName");Ae(this,"channel");Ae(this,"platform");Ae(this,"wallTime");Ae(this,"title");Ae(this,"options");Ae(this,"pages");Ae(this,"actions");Ae(this,"attachments");Ae(this,"visibleAttachments");Ae(this,"events");Ae(this,"stdio");Ae(this,"errors");Ae(this,"errorDescriptors");Ae(this,"hasSource");Ae(this,"hasStepData");Ae(this,"sdkLanguage");Ae(this,"testIdAttributeName");Ae(this,"sources");Ae(this,"resources");Ae(this,"actionCounters");Ae(this,"traceUrl");i.forEach(a=>Qw(a));const s=i.find(a=>a.origin==="library");this.traceUrl=e,this.browserName=(s==null?void 0:s.browserName)||"",this.sdkLanguage=s==null?void 0:s.sdkLanguage,this.channel=s==null?void 0:s.channel,this.testIdAttributeName=s==null?void 0:s.testIdAttributeName,this.platform=(s==null?void 0:s.platform)||"",this.title=(s==null?void 0:s.title)||"",this.options=(s==null?void 0:s.options)||{},this.actions=Zw(i),this.pages=[].concat(...i.map(a=>a.pages)),this.wallTime=i.map(a=>a.wallTime).reduce((a,o)=>Math.min(a||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=i.map(a=>a.startTime).reduce((a,o)=>Math.min(a,o),Number.MAX_VALUE),this.endTime=i.map(a=>a.endTime).reduce((a,o)=>Math.max(a,o),Number.MIN_VALUE),this.events=[].concat(...i.map(a=>a.events)),this.stdio=[].concat(...i.map(a=>a.stdio)),this.errors=[].concat(...i.map(a=>a.errors)),this.hasSource=i.some(a=>a.hasSource),this.hasStepData=i.some(a=>a.origin==="testRunner"),this.resources=[...i.map(a=>a.resources)].flat(),this.attachments=this.actions.flatMap(a=>{var o;return((o=a.attachments)==null?void 0:o.map(u=>({...u,callId:a.callId,traceUrl:e})))??[]}),this.visibleAttachments=this.attachments.filter(a=>!a.name.startsWith("_")),this.events.sort((a,o)=>a.time-o.time),this.resources.sort((a,o)=>a._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=rx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const a of this.actions)a.group=a.group??Fw({type:a.class,method:a.method}),a.group&&this.actionCounters.set(a.group,1+(this.actionCounters.get(a.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUrl),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(s=>!s.group||i.has(s.group))}_errorDescriptorsFromActions(){var i;const e=[];for(const s of this.actions||[])(i=s.error)!=null&&i.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function Qw(n){for(const i of n.pages)i[za]=n;for(let i=0;i<n.actions.length;++i){const s=n.actions[i];s[za]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const s=n.actions[i];s[C0]=e,s.class!=="Route"&&(e=s)}for(const i of n.events)i[za]=n;for(const i of n.resources)i[za]=n}function Zw(n){const e=[],i=Jw(n);e.push(...i),e.sort((s,a)=>a.parentId===s.callId?1:s.parentId===a.callId?-1:s.endTime-a.endTime);for(let s=1;s<e.length;++s)e[s][k0]=e[s-1];e.sort((s,a)=>a.parentId===s.callId?-1:s.parentId===a.callId?1:s.startTime-a.startTime);for(let s=0;s+1<e.length;++s)e[s][M0]=e[s+1];return e}let ky=0;function Jw(n){const e=new Map,i=n.filter(u=>u.origin==="library"),s=n.filter(u=>u.origin==="testRunner");if(!s.length||!i.length)return n.map(u=>u.actions.map(f=>({...f,context:u}))).flat();for(const u of i)for(const f of u.actions)e.set(f.stepId||`tmp-step@${++ky}`,{...f,context:u});const a=ex(s,e);a&&Ww(i,a);const o=new Map;for(const u of s)for(const f of u.actions){const d=f.stepId&&e.get(f.stepId);if(d){o.set(f.callId,d.callId),f.error&&(d.error=f.error),f.attachments&&(d.attachments=f.attachments),f.annotations&&(d.annotations=f.annotations),f.parentId&&(d.parentId=o.get(f.parentId)??f.parentId),f.group&&(d.group=f.group),d.startTime=f.startTime,d.endTime=f.endTime;continue}f.parentId&&(f.parentId=o.get(f.parentId)??f.parentId),e.set(f.stepId||`tmp-step@${++ky}`,{...f,context:u})}return[...e.values()]}function Ww(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const s of i.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of i.events)s.time+=e;for(const s of i.stdio)s.timestamp+=e;for(const s of i.pages)for(const a of s.screencastFrames)a.timestamp+=e;for(const s of i.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function ex(n,e){for(const i of n)for(const s of i.actions){if(!s.startTime)continue;const a=s.stepId?e.get(s.stepId):void 0;if(a)return s.startTime-a.startTime}return 0}function tx(n){const e=new Map;for(const s of n)e.set(s.callId,{id:s.callId,parent:void 0,children:[],action:s});const i={id:"",parent:void 0,children:[]};for(const s of e.values()){const a=s.action.parentId&&e.get(s.action.parentId)||i;a.children.push(s),s.parent=a}return{rootItem:i,itemMap:e}}function O0(n){return n[za]}function nx(n){return n[C0]}function My(n){return n[k0]}function Oy(n){return n[M0]}function ix(n){let e=0,i=0;for(const s of sx(n)){if(s.type==="console"){const a=s.messageType;a==="warning"?++i:a==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:i}}function sx(n){let e=n[Cy];if(e)return e;const i=nx(n);return e=O0(n).events.filter(s=>s.time>=n.startTime&&(!i||s.time<i.startTime)),n[Cy]=e,e}function rx(n,e){var s;const i=new Map;for(const a of n)for(const o of a.stack||[]){let u=i.get(o.file);u||(u={errors:[],content:void 0},i.set(o.file,u))}for(const a of e){const{action:o,stack:u,message:f}=a;!o||!u||(s=i.get(u[0].file))==null||s.errors.push({line:u[0].line||0,message:f})}return i}const ax=50,Xo=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:s="vertical",minSidebarSize:a=ax,settingName:o,sidebar:u,main:f})=>{const d=Math.max(a,n)*window.devicePixelRatio,[p,m]=pn(o?o+"."+s+":size":void 0,d),[y,b]=pn(o?o+"."+s+":size":void 0,d),[v,E]=q.useState(null),[x,T]=cs();let C;s==="vertical"?(C=y/window.devicePixelRatio,x&&x.height<C&&(C=x.height-10)):(C=p/window.devicePixelRatio,x&&x.width<C&&(C=x.width-10)),document.body.style.userSelect=v?"none":"inherit";let k={};return s==="vertical"?i?k={top:v?0:C-4,bottom:v?0:void 0,height:v?"initial":8}:k={bottom:v?0:C-4,top:v?0:void 0,height:v?"initial":8}:i?k={left:v?0:C-4,right:v?0:void 0,width:v?"initial":8}:k={right:v?0:C-4,left:v?0:void 0,width:v?"initial":8},S.jsxs("div",{className:Ke("split-view",s,i&&"sidebar-first"),ref:T,children:[S.jsx("div",{className:"split-view-main",children:f}),!e&&S.jsx("div",{style:{flexBasis:C},className:"split-view-sidebar",children:u}),!e&&S.jsx("div",{style:k,className:"split-view-resizer",onMouseDown:$=>E({offset:s==="vertical"?$.clientY:$.clientX,size:C}),onMouseUp:()=>E(null),onMouseMove:$=>{if(!$.buttons)E(null);else if(v){const R=(s==="vertical"?$.clientY:$.clientX)-v.offset,G=i?v.size+R:v.size-R,H=$.target.parentElement.getBoundingClientRect(),L=Math.min(Math.max(a,G),(s==="vertical"?H.height:H.width)-a);s==="vertical"?b(L*window.devicePixelRatio):m(L*window.devicePixelRatio)}}})]})},Fe=function(n,e,i){return n>=e&&n<=i};function Mt(n){return Fe(n,48,57)}function Ry(n){return Mt(n)||Fe(n,65,70)||Fe(n,97,102)}function lx(n){return Fe(n,65,90)}function ox(n){return Fe(n,97,122)}function cx(n){return lx(n)||ox(n)}function ux(n){return n>=128}function Ro(n){return cx(n)||ux(n)||n===95}function Ly(n){return Ro(n)||Mt(n)||n===45}function fx(n){return Fe(n,0,8)||n===11||Fe(n,14,31)||n===127}function Lo(n){return n===10}function Vn(n){return Lo(n)||n===9||n===32}const hx=1114111;class zh extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function dx(n){const e=[];for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===13&&n.charCodeAt(i+1)===10&&(s=10,i++),(s===13||s===12)&&(s=10),s===0&&(s=65533),Fe(s,55296,56319)&&Fe(n.charCodeAt(i+1),56320,57343)){const a=s-55296,o=n.charCodeAt(i+1)-56320;s=Math.pow(2,16)+a*Math.pow(2,10)+o,i++}e.push(s)}return e}function Je(n){if(n<=65535)return String.fromCharCode(n);n-=Math.pow(2,16);const e=Math.floor(n/Math.pow(2,10))+55296,i=n%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(i)}function R0(n){const e=dx(n);let i=-1;const s=[];let a;const o=function(I){return I>=e.length?-1:e[I]},u=function(I){if(I===void 0&&(I=1),I>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+I)},f=function(I){return I===void 0&&(I=1),i+=I,a=o(i),!0},d=function(){return i-=1,!0},p=function(I){return I===void 0&&(I=a),I===-1},m=function(){if(y(),f(),Vn(a)){for(;Vn(u());)f();return new Po}else{if(a===34)return E();if(a===35)if(Ly(u())||C(u(1),u(2))){const I=new K0("");return $(u(1),u(2),u(3))&&(I.type="id"),I.value=Z(),I}else return new ot(a);else return a===36?u()===61?(f(),new yx):new ot(a):a===39?E():a===40?new I0:a===41?new Hh:a===42?u()===61?(f(),new bx):new ot(a):a===43?G()?(d(),b()):new ot(a):a===44?new z0:a===45?G()?(d(),b()):u(1)===45&&u(2)===62?(f(2),new D0):V()?(d(),v()):new ot(a):a===46?G()?(d(),b()):new ot(a):a===58?new B0:a===59?new U0:a===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new j0):new ot(a):a===64?$(u(1),u(2),u(3))?new G0(Z()):new ot(a):a===91?new $0:a===92?k()?(d(),v()):new ot(a):a===93?new vh:a===94?u()===61?(f(),new mx):new ot(a):a===123?new H0:a===124?u()===61?(f(),new gx):u()===124?(f(),new V0):new ot(a):a===125?new q0:a===126?u()===61?(f(),new px):new ot(a):Mt(a)?(d(),b()):Ro(a)?(d(),v()):p()?new Do:new ot(a)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),a===42&&u()===47){f();break}else if(p())return},b=function(){const I=H();if($(u(1),u(2),u(3))){const F=new vx;return F.value=I.value,F.repr=I.repr,F.type=I.type,F.unit=Z(),F}else if(u()===37){f();const F=new P0;return F.value=I.value,F.repr=I.repr,F}else{const F=new X0;return F.value=I.value,F.repr=I.repr,F.type=I.type,F}},v=function(){const I=Z();if(I.toLowerCase()==="url"&&u()===40){for(f();Vn(u(1))&&Vn(u(2));)f();return u()===34||u()===39?new Ga(I):Vn(u())&&(u(2)===34||u(2)===39)?new Ga(I):x()}else return u()===40?(f(),new Ga(I)):new qh(I)},E=function(I){I===void 0&&(I=a);let F="";for(;f();){if(a===I||p())return new $h(F);if(Lo(a))return d(),new L0;a===92?p(u())||(Lo(u())?f():F+=Je(T())):F+=Je(a)}throw new Error("Internal error")},x=function(){const I=new Y0("");for(;Vn(u());)f();if(p(u()))return I;for(;f();){if(a===41||p())return I;if(Vn(a)){for(;Vn(u());)f();return u()===41||p(u())?(f(),I):(ie(),new jo)}else{if(a===34||a===39||a===40||fx(a))return ie(),new jo;if(a===92)if(k())I.value+=Je(T());else return ie(),new jo;else I.value+=Je(a)}}throw new Error("Internal error")},T=function(){if(f(),Ry(a)){const I=[a];for(let ee=0;ee<5&&Ry(u());ee++)f(),I.push(a);Vn(u())&&f();let F=parseInt(I.map(function(ee){return String.fromCharCode(ee)}).join(""),16);return F>hx&&(F=65533),F}else return p()?65533:a},C=function(I,F){return!(I!==92||Lo(F))},k=function(){return C(a,u())},$=function(I,F,ee){return I===45?Ro(F)||F===45||C(F,ee):Ro(I)?!0:I===92?C(I,F):!1},V=function(){return $(a,u(1),u(2))},R=function(I,F,ee){return I===43||I===45?!!(Mt(F)||F===46&&Mt(ee)):I===46?!!Mt(F):!!Mt(I)},G=function(){return R(a,u(1),u(2))},Z=function(){let I="";for(;f();)if(Ly(a))I+=Je(a);else if(k())I+=Je(T());else return d(),I;throw new Error("Internal parse error")},H=function(){let I="",F="integer";for((u()===43||u()===45)&&(f(),I+=Je(a));Mt(u());)f(),I+=Je(a);if(u(1)===46&&Mt(u(2)))for(f(),I+=Je(a),f(),I+=Je(a),F="number";Mt(u());)f(),I+=Je(a);const ee=u(1),ve=u(2),z=u(3);if((ee===69||ee===101)&&Mt(ve))for(f(),I+=Je(a),f(),I+=Je(a),F="number";Mt(u());)f(),I+=Je(a);else if((ee===69||ee===101)&&(ve===43||ve===45)&&Mt(z))for(f(),I+=Je(a),f(),I+=Je(a),f(),I+=Je(a),F="number";Mt(u());)f(),I+=Je(a);const Q=L(I);return{type:F,value:Q,repr:I}},L=function(I){return+I},ie=function(){for(;f();){if(a===41||p())return;k()&&T()}};let le=0;for(;!p(u());)if(s.push(m()),le++,le>e.length*2)throw new Error("I'm infinite-looping!");return s}class Ye{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class L0 extends Ye{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class jo extends Ye{constructor(){super(...arguments),this.tokenType="BADURL"}}class Po extends Ye{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class j0 extends Ye{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class D0 extends Ye{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class B0 extends Ye{constructor(){super(...arguments),this.tokenType=":"}}class U0 extends Ye{constructor(){super(...arguments),this.tokenType=";"}}class z0 extends Ye{constructor(){super(...arguments),this.tokenType=","}}class wr extends Ye{constructor(){super(...arguments),this.value="",this.mirror=""}}class H0 extends wr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class q0 extends wr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class $0 extends wr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class vh extends wr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class I0 extends wr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Hh extends wr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class px extends Ye{constructor(){super(...arguments),this.tokenType="~="}}class gx extends Ye{constructor(){super(...arguments),this.tokenType="|="}}class mx extends Ye{constructor(){super(...arguments),this.tokenType="^="}}class yx extends Ye{constructor(){super(...arguments),this.tokenType="$="}}class bx extends Ye{constructor(){super(...arguments),this.tokenType="*="}}class V0 extends Ye{constructor(){super(...arguments),this.tokenType="||"}}class Do extends Ye{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ot extends Ye{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Je(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
52
- `:this.value}}class xr extends Ye{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class qh extends xr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return sl(this.value)}}class Ga extends xr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return sl(this.value)+"("}}class G0 extends xr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+sl(this.value)}}class K0 extends xr{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+sl(this.value):"#"+Sx(this.value)}}class $h extends xr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+F0(this.value)+'"'}}class Y0 extends xr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+F0(this.value)+'")'}}class X0 extends Ye{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class P0 extends Ye{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class vx extends Ye{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let i=sl(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||Fe(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function sl(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let s=0;s<n.length;s++){const a=n.charCodeAt(s);if(a===0)throw new zh("Invalid character: the input contains U+0000.");Fe(a,1,31)||a===127||s===0&&Fe(a,48,57)||s===1&&Fe(a,48,57)&&i===45?e+="\\"+a.toString(16)+" ":a>=128||a===45||a===95||Fe(a,48,57)||Fe(a,65,90)||Fe(a,97,122)?e+=n[s]:e+="\\"+n[s]}return e}function Sx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new zh("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||Fe(s,48,57)||Fe(s,65,90)||Fe(s,97,122)?e+=n[i]:e+="\\"+s.toString(16)+" "}return e}function F0(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new zh("Invalid character: the input contains U+0000.");Fe(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+n[i]:e+=n[i]}return e}class Ot extends Error{}function wx(n,e){let i;try{i=R0(n),i[i.length-1]instanceof Do||i.push(new Do)}catch(L){const ie=L.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,le=(L.stack||"").indexOf(L.message);throw le!==-1&&(L.stack=L.stack.substring(0,le)+ie+L.stack.substring(le+L.message.length)),L.message=ie,L}const s=i.find(L=>L instanceof G0||L instanceof L0||L instanceof jo||L instanceof V0||L instanceof j0||L instanceof D0||L instanceof U0||L instanceof H0||L instanceof q0||L instanceof Y0||L instanceof P0);if(s)throw new Ot(`Unsupported token "${s.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let a=0;const o=new Set;function u(){return new Ot(`Unexpected token "${i[a].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[a]instanceof Po;)a++}function d(L=a){return i[L]instanceof qh}function p(L=a){return i[L]instanceof $h}function m(L=a){return i[L]instanceof X0}function y(L=a){return i[L]instanceof z0}function b(L=a){return i[L]instanceof I0}function v(L=a){return i[L]instanceof Hh}function E(L=a){return i[L]instanceof Ga}function x(L=a){return i[L]instanceof ot&&i[L].value==="*"}function T(L=a){return i[L]instanceof Do}function C(L=a){return i[L]instanceof ot&&[">","+","~"].includes(i[L].value)}function k(L=a){return y(L)||v(L)||T(L)||C(L)||i[L]instanceof Po}function $(){const L=[V()];for(;f(),!!y();)a++,L.push(V());return L}function V(){return f(),m()||p()?i[a++].value:R()}function R(){const L={simples:[]};for(f(),C()?L.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):L.simples.push({selector:G(),combinator:""});;){if(f(),C())L.simples[L.simples.length-1].combinator=i[a++].value,f();else if(k())break;L.simples.push({combinator:"",selector:G()})}return L}function G(){let L="";const ie=[];for(;!k();)if(d()||x())L+=i[a++].toSource();else if(i[a]instanceof K0)L+=i[a++].toSource();else if(i[a]instanceof ot&&i[a].value===".")if(a++,d())L+="."+i[a++].toSource();else throw u();else if(i[a]instanceof B0)if(a++,d())if(!e.has(i[a].value.toLowerCase()))L+=":"+i[a++].toSource();else{const le=i[a++].value.toLowerCase();ie.push({name:le,args:[]}),o.add(le)}else if(E()){const le=i[a++].value.toLowerCase();if(e.has(le)?(ie.push({name:le,args:$()}),o.add(le)):L+=`:${le}(${Z()})`,f(),!v())throw u();a++}else throw u();else if(i[a]instanceof $0){for(L+="[",a++;!(i[a]instanceof vh)&&!T();)L+=i[a++].toSource();if(!(i[a]instanceof vh))throw u();L+="]",a++}else throw u();if(!L&&!ie.length)throw u();return{css:L||void 0,functions:ie}}function Z(){let L="",ie=1;for(;!T()&&((b()||E())&&ie++,v()&&ie--,!!ie);)L+=i[a++].toSource();return L}const H=$();if(!T())throw u();if(H.some(L=>typeof L!="object"||!("simples"in L)))throw new Ot(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:H,names:Array.from(o)}}const Sh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),xx=new Set(["left-of","right-of","above","below","near"]),Q0=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 rl(n){const e=Ex(n),i=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const a=wx(s.body,Q0);i.push({name:"css",body:a.selector,source:s.body});continue}if(Sh.has(s.name)){let a,o;try{const p=JSON.parse("["+s.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Ot(`Malformed selector: ${s.name}=`+s.body);if(a=p[0],p.length===2){if(typeof p[1]!="number"||!xx.has(s.name))throw new Ot(`Malformed selector: ${s.name}=`+s.body);o=p[1]}}catch{throw new Ot(`Malformed selector: ${s.name}=`+s.body)}const u={name:s.name,source:s.body,body:{parsed:rl(a),distance:o}},f=[...u.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&_x(u.body.parsed.parts.slice(0,d+1),i.slice(0,d+1))&&u.body.parsed.parts.splice(0,d+1),i.push(u);continue}i.push({...s,source:s.body})}if(Sh.has(i[0].name))throw new Ot(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function _x(n,e){return Xn({parts:n})===Xn({parts:e})}function Xn(n,e){return typeof n=="string"?n:n.parts.map((i,s)=>{let a=!0;!e&&s!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(a=!1);const o=a?i.name+"=":"";return`${s===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function Tx(n,e){const i=(s,a)=>{for(const o of s.parts)e(o,a),Sh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function Ex(n){let e=0,i,s=0;const a={parts:[]},o=()=>{const f=n.substring(s,e).trim(),d=f.indexOf("=");let p,m;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=f.substring(0,d).trim(),m=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(p="text",m=f):/^\(*\/\//.test(f)||f.startsWith("..")?(p="xpath",m=f):(p="css",m=f);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),a.parts.push({name:p,body:m}),y){if(a.capture!==void 0)throw new Ot("Only one of the selectors can capture using * modifier");a.capture=a.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),a;const u=()=>{const d=n.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<n.length;){const f=n[e];f==="\\"&&e+1<n.length?e+=2:f===i?(i=void 0,e++):!i&&(f==='"'||f==="'"||f==="`")&&!u()?(i=f,e++):!i&&f===">"&&n[e+1]===">"?(o(),e+=2,s=e):e++}return o(),a}function as(n,e){let i=0,s=n.length===0;const a=()=>n[i]||"",o=()=>{const T=a();return++i,s=i>=n.length,T},u=T=>{throw s?new Ot(`Unexpected end of selector while parsing selector \`${n}\``):new Ot(`Error while parsing selector \`${n}\` - unexpected symbol "${a()}" at position ${i}`+(T?" during "+T:""))};function f(){for(;!s&&/\s/.test(a());)o()}function d(T){return T>="€"||T>="0"&&T<="9"||T>="A"&&T<="Z"||T>="a"&&T<="z"||T>="0"&&T<="9"||T==="_"||T==="-"}function p(){let T="";for(f();!s&&d(a());)T+=o();return T}function m(T){let C=o();for(C!==T&&u("parsing quoted string");!s&&a()!==T;)a()==="\\"&&o(),C+=o();return a()!==T&&u("parsing quoted string"),C+=o(),C}function y(){o()!=="/"&&u("parsing regular expression");let T="",C=!1;for(;!s;){if(a()==="\\")T+=o(),s&&u("parsing regular expression");else if(C&&a()==="]")C=!1;else if(!C&&a()==="[")C=!0;else if(!C&&a()==="/")break;T+=o()}o()!=="/"&&u("parsing regular expression");let k="";for(;!s&&a().match(/[dgimsuy]/);)k+=o();try{return new RegExp(T,k)}catch($){throw new Ot(`Error while parsing selector \`${n}\`: ${$.message}`)}}function b(){let T="";return f(),a()==="'"||a()==='"'?T=m(a()).slice(1,-1):T=p(),T||u("parsing property path"),T}function v(){f();let T="";return s||(T+=o()),!s&&T!=="="&&(T+=o()),["=","*=","^=","$=","|=","~="].includes(T)||u("parsing operator"),T}function E(){o();const T=[];for(T.push(b()),f();a()===".";)o(),T.push(b()),f();if(a()==="]")return o(),{name:T.join("."),jsonPath:T,op:"<truthy>",value:null,caseSensitive:!1};const C=v();let k,$=!0;if(f(),a()==="/"){if(C!=="=")throw new Ot(`Error while parsing selector \`${n}\` - cannot use ${C} in attribute with regular expression`);k=y()}else if(a()==="'"||a()==='"')k=m(a()).slice(1,-1),f(),a()==="i"||a()==="I"?($=!1,o()):(a()==="s"||a()==="S")&&($=!0,o());else{for(k="";!s&&(d(a())||a()==="+"||a()===".");)k+=o();k==="true"?k=!0:k==="false"?k=!1:e||(k=+k,Number.isNaN(k)&&u("parsing attribute value"))}if(f(),a()!=="]"&&u("parsing attribute value"),o(),C!=="="&&typeof k!="string")throw new Ot(`Error while parsing selector \`${n}\` - cannot use ${C} in attribute with non-string matching value - ${k}`);return{name:T.join("."),jsonPath:T,op:C,value:k,caseSensitive:$}}const x={name:"",attributes:[]};for(x.name=p(),f();a()==="[";)x.attributes.push(E()),f();if(s||u(void 0),!x.name&&!x.attributes.length)throw new Ot(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function oc(n,e="'"){const i=JSON.stringify(n),s=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function Fo(n){return n.charAt(0).toUpperCase()+n.substring(1)}function Z0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function lr(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let Zi;function Ax(){Zi=new Map}function Tt(n){let e=Zi==null?void 0:Zi.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Zi==null||Zi.set(n,e)),e}function cc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function J0(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Rt(n,e){return typeof n!="string"?J0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function xt(n,e){return typeof n!="string"?J0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function Nx(n,e,i=""){if(n.length<=e)return n;const s=[...n];return s.length>e?s.slice(0,e-i.length).join("")+i:s.join("")}function jy(n,e){return Nx(n,e,"…")}function Qo(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cx(n,e){const i=n.length,s=e.length;let a=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(s+1).fill(0));for(let f=1;f<=i;f++)for(let d=1;d<=s;d++)n[f-1]===e[d-1]&&(u[f][d]=u[f-1][d-1]+1,u[f][d]>a&&(a=u[f][d],o=f));return n.slice(o-a,o)}function kx(n,e){try{const i=rl(e),s=Mx(i);return s||ts(new eb[n],i,!1,1)[0]}catch{return e}}function Mx(n){const e=n.parts[n.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const i=JSON.parse(e.body);if(typeof i=="string")return i}}function ls(n,e,i=!1){return W0(n,e,i,1)[0]}function W0(n,e,i=!1,s=20,a){try{return ts(new eb[n](a),rl(e),i,s)}catch{return[e]}}function ts(n,e,i=!1,s=20){const a=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<a.length;f++){const d=a[f],p=u;if(u="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?o.push([n.generateLocator(p,"first",""),n.generateLocator(p,"nth","0")]):d.body==="-1"?o.push([n.generateLocator(p,"last",""),n.generateLocator(p,"nth","-1")]):o.push([n.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){o.push([n.generateLocator(p,"visible",d.body),n.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:x}=Ma(d.body);o.push([n.generateLocator(p,"text",x,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:x}=Ma(d.body);if(!E){o.push([n.generateLocator(p,"has-text",x,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:x}=Ma(d.body);if(!E){o.push([n.generateLocator(p,"has-not-text",x,{exact:E})]);continue}}if(d.name==="internal:has"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"has",x)));continue}if(d.name==="internal:has-not"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"hasNot",x)));continue}if(d.name==="internal:and"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"and",x)));continue}if(d.name==="internal:or"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"or",x)));continue}if(d.name==="internal:chain"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"chain",x)));continue}if(d.name==="internal:label"){const{exact:E,text:x}=Ma(d.body);o.push([n.generateLocator(p,"label",x,{exact:E})]);continue}if(d.name==="internal:role"){const E=as(d.body,!0),x={attrs:[]};for(const T of E.attributes)T.name==="name"?(x.exact=T.caseSensitive,x.name=T.value):(T.name==="level"&&typeof T.value=="string"&&(T.value=+T.value),x.attrs.push({name:T.name==="include-hidden"?"includeHidden":T.name,value:T.value}));o.push([n.generateLocator(p,"role",E.name,x)]);continue}if(d.name==="internal:testid"){const E=as(d.body,!0),{value:x}=E.attributes[0];o.push([n.generateLocator(p,"test-id",x)]);continue}if(d.name==="internal:attr"){const E=as(d.body,!0),{name:x,value:T,caseSensitive:C}=E.attributes[0],k=T,$=!!C;if(x==="placeholder"){o.push([n.generateLocator(p,"placeholder",k,{exact:$})]);continue}if(x==="alt"){o.push([n.generateLocator(p,"alt",k,{exact:$})]);continue}if(x==="title"){o.push([n.generateLocator(p,"title",k,{exact:$})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=o[o.length-1],x=a[f-1],T=E.map(C=>n.chainLocators([C,n.generateLocator(p,"frame","")]));["xpath","css"].includes(x.name)&&T.push(n.generateLocator(p,"frame-locator",Xn({parts:[x]})),n.generateLocator(p,"frame-locator",Xn({parts:[x]},!0))),E.splice(0,E.length,...T),u="frame-locator";continue}const m=a[f+1],y=Xn({parts:[d]}),b=n.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:E,text:x}=Ma(m.body);if(!E){const T=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),C={};m.name==="internal:has-text"?C.hasText=x:C.hasNotText=x;const k=n.generateLocator(p,"default",y,C);o.push([n.chainLocators([b,T]),k]),f++;continue}}let v;if(["xpath","css"].includes(d.name)){const E=Xn({parts:[d]},!0);v=n.generateLocator(p,"default",E)}o.push([b,v].filter(Boolean))}return Ox(n,o,s)}function Ox(n,e,i){const s=e.map(()=>""),a=[],o=u=>{if(u===e.length)return a.push(n.chainLocators(s)),a.length<i;for(const f of e[u])if(s[u]=f,!o(u+1))return!1;return!0};return o(0),a}function Ma(n){let e=!1;const i=n.match(/^\/(.*)\/([igm]*)$/);return i?{text:new RegExp(i[1],i[2])}:(n.endsWith('"')?(n=JSON.parse(n),e=!0):n.endsWith('"s')?(n=JSON.parse(n.substring(0,n.length-1)),e=!0):n.endsWith('"i')&&(n=JSON.parse(n.substring(0,n.length-1)),e=!1),{exact:e,text:n})}class Rx{constructor(e){this.preferredQuote=e}generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(a.hasNotText)} })`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${s==="true"?"true":"false"} })`;case"role":const o=[];ct(a.name)?o.push(`name: ${this.regexToSourceString(a.name)}`):typeof a.name=="string"&&(o.push(`name: ${this.quote(a.name)}`),a.exact&&o.push("exact: true"));for(const{name:f,value:d}of a.attrs)o.push(`${f}: ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(s)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(s)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(s)} })`;case"has":return`filter({ has: ${s} })`;case"hasNot":return`filter({ hasNot: ${s} })`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("getByText",s,!!a.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("getByLabel",s,!!a.exact);case"title":return this.toCallWithExact("getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return cc(String(e))}toCallWithExact(e,i,s){return ct(i)?`${e}(${this.regexToSourceString(i)})`:s?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return ct(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return ct(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return oc(e,this.preferredQuote??"'")}}class Lx{generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(a.hasText)})`:a.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(a.hasNotText)})`:`locator(${this.quote(s)})`;case"frame-locator":return`frame_locator(${this.quote(s)})`;case"frame":return"content_frame";case"nth":return`nth(${s})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${s==="true"?"True":"False"})`;case"role":const o=[];ct(a.name)?o.push(`name=${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`name=${this.quote(a.name)}`),a.exact&&o.push("exact=True"));for(const{name:f,value:d}of a.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),o.push(`${Z0(f)}=${p}`)}const u=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(s)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(s)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(s)})`;case"has":return`filter(has=${s})`;case"hasNot":return`filter(has_not=${s})`;case"and":return`and_(${s})`;case"or":return`or_(${s})`;case"chain":return`locator(${s})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("get_by_text",s,!!a.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!a.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!a.exact);case"label":return this.toCallWithExact("get_by_label",s,!!a.exact);case"title":return this.toCallWithExact("get_by_title",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${cc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,s){return ct(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return ct(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return ct(e)?this.regexToString(e):this.quote(e)}quote(e){return oc(e,'"')}}class jx{generateLocator(e,i,s,a={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(a.hasText)}))`:a.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(a.hasNotText)}))`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const u=[];ct(a.name)?u.push(`.setName(${this.regexToString(a.name)})`):typeof a.name=="string"&&(u.push(`.setName(${this.quote(a.name)})`),a.exact&&u.push(".setExact(true)"));for(const{name:d,value:p}of a.attrs)u.push(`.set${Fo(d)}(${typeof p=="string"?this.quote(p):p})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${Z0(s).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${s}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${s}))`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact(o,"getByText",s,!!a.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!a.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(cc(e.source))}${i})`}toCallWithExact(e,i,s,a){return ct(s)?`${i}(${this.regexToString(s)})`:a?`${i}(${this.quote(s)}, new ${e}.${Fo(i)}Options().setExact(true))`:`${i}(${this.quote(s)})`}toHasText(e){return ct(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return ct(e)?this.regexToString(e):this.quote(e)}quote(e){return oc(e,'"')}}class Dx{generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(a.hasNotText)} })`:`Locator(${this.quote(s)})`;case"frame-locator":return`FrameLocator(${this.quote(s)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${s})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${s==="true"?"true":"false"} })`;case"role":const o=[];ct(a.name)?o.push(`NameRegex = ${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`Name = ${this.quote(a.name)}`),a.exact&&o.push("Exact = true"));for(const{name:f,value:d}of a.attrs)o.push(`${Fo(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${Fo(s)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(s)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(s)} })`;case"has":return`Filter(new() { Has = ${s} })`;case"hasNot":return`Filter(new() { HasNot = ${s} })`;case"and":return`And(${s})`;case"or":return`Or(${s})`;case"chain":return`Locator(${s})`;case"test-id":return`GetByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("GetByText",s,!!a.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!a.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(cc(e.source))}${i})`}toCallWithExact(e,i,s){return ct(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return ct(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return ct(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return ct(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return oc(e,'"')}}class Bx{generateLocator(e,i,s,a={}){return JSON.stringify({kind:i,body:s,options:a})}chainLocators(e){const i=e.map(s=>JSON.parse(s));for(let s=0;s<i.length-1;++s)i[s].next=i[s+1];return JSON.stringify(i[0])}}const eb={javascript:Rx,python:Lx,java:jx,csharp:Dx,jsonl:Bx};function ct(n){return n instanceof RegExp}const Dy=new Map;function Ux({name:n,rootItem:e,render:i,title:s,icon:a,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:b,noItemsMessage:v,dataTestId:E,autoExpandDepth:x}){const T=q.useMemo(()=>zx(e,f,y.expandedItems,x||0,u),[e,f,y,x,u]),C=q.useRef(null),[k,$]=q.useState(),[V,R]=q.useState(!1);q.useEffect(()=>{m==null||m(k)},[m,k]),q.useEffect(()=>{const H=C.current;if(!H)return;const L=()=>{Dy.set(n,H.scrollTop)};return H.addEventListener("scroll",L,{passive:!0}),()=>H.removeEventListener("scroll",L)},[n]),q.useEffect(()=>{C.current&&(C.current.scrollTop=Dy.get(n)||0)},[n]);const G=q.useCallback(H=>{const{expanded:L}=T.get(H);if(L){for(let ie=f;ie;ie=ie.parent)if(ie===H){p==null||p(H);break}y.expandedItems.set(H.id,!1)}else y.expandedItems.set(H.id,!0);b({...y})},[T,f,p,y,b]),Z=q.useCallback(H=>{const{expanded:L}=T.get(H),ie=[H];for(;ie.length;){const le=ie.pop();ie.push(...le.children),y.expandedItems.set(le.id,!L)}b({...y})},[T,y,b]);return S.jsx("div",{className:Ke("tree-view vbox",n+"-tree-view"),"data-testid":E||n+"-tree",children:S.jsxs("div",{className:Ke("tree-view-content"),role:T.size>0?"tree":void 0,tabIndex:0,onKeyDown:H=>{if(f&&H.key==="Enter"){d==null||d(f);return}if(H.key!=="ArrowDown"&&H.key!=="ArrowUp"&&H.key!=="ArrowLeft"&&H.key!=="ArrowRight")return;if(H.stopPropagation(),H.preventDefault(),f&&H.key==="ArrowLeft"){const{expanded:ie,parent:le}=T.get(f);ie?(y.expandedItems.set(f.id,!1),b({...y})):le&&(p==null||p(le));return}if(f&&H.key==="ArrowRight"){f.children.length&&(y.expandedItems.set(f.id,!0),b({...y}));return}let L=f;if(H.key==="ArrowDown"&&(f?L=T.get(f).next:T.size&&(L=[...T.keys()][0])),H.key==="ArrowUp"){if(f)L=T.get(f).prev;else if(T.size){const ie=[...T.keys()];L=ie[ie.length-1]}}m==null||m(void 0),L&&(R(!0),p==null||p(L)),$(void 0)},ref:C,children:[v&&T.size===0&&S.jsx("div",{className:"tree-view-empty",children:v}),e.children.map(H=>T.get(H)&&S.jsx(tb,{item:H,treeItems:T,selectedItem:f,onSelected:p,onAccepted:d,isError:o,toggleExpanded:G,toggleSubtree:Z,highlightedItem:k,setHighlightedItem:$,render:i,icon:a,title:s,isKeyboardNavigation:V,setIsKeyboardNavigation:R},H.id))]})})}function tb({item:n,treeItems:e,selectedItem:i,onSelected:s,highlightedItem:a,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:b,isKeyboardNavigation:v,setIsKeyboardNavigation:E}){const x=q.useId(),T=q.useRef(null);q.useEffect(()=>{i===n&&v&&T.current&&(E0(T.current),E(!1))},[n,i,v,E]);const C=e.get(n),k=C.depth,$=C.expanded;let V="codicon-blank";typeof $=="boolean"&&(V=$?"codicon-chevron-down":"codicon-chevron-right");const R=m(n),G=$&&n.children.length?n.children:[],Z=y==null?void 0:y(n),H=(b==null?void 0:b(n))||"codicon-blank";return S.jsxs("div",{ref:T,role:"treeitem","aria-selected":n===i,"aria-expanded":$,"aria-controls":x,title:Z,className:"vbox",style:{flex:"none"},children:[S.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:Ke("tree-view-entry",i===n&&"selected",a===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>s==null?void 0:s(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[k?new Array(k).fill(0).map((L,ie)=>S.jsx("div",{className:"tree-view-indent"},"indent-"+ie)):void 0,S.jsx("div",{"aria-hidden":"true",className:"codicon "+V,style:{minWidth:16,marginRight:4},onDoubleClick:L=>{L.preventDefault(),L.stopPropagation()},onClick:L=>{L.stopPropagation(),L.preventDefault(),L.altKey?p(n):d(n)}}),b&&S.jsx("div",{className:"codicon "+H,style:{minWidth:16,marginRight:4},"aria-label":"["+H.replace("codicon","icon")+"]"}),typeof R=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:R}):R]}),!!G.length&&S.jsx("div",{id:x,role:"group",children:G.map(L=>e.get(L)&&S.jsx(tb,{item:L,treeItems:e,selectedItem:i,onSelected:s,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:p,highlightedItem:a,setHighlightedItem:o,render:m,title:y,icon:b,isKeyboardNavigation:v,setIsKeyboardNavigation:E},L.id))})]})}function zx(n,e,i,s,a=()=>!0){if(!a(n))return new Map;const o=new Map,u=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)u.add(p.id);let f=null;const d=(p,m)=>{for(const y of p.children){if(!a(y))continue;const b=u.has(y.id)||i.get(y.id),v=s>m&&o.size<25&&b!==!1,E=y.children.length?b??v:void 0,x={depth:m,expanded:E,parent:n===p?null:p,next:null,prev:f};f&&(o.get(f).next=y),f=y,o.set(y,x),E&&d(y,m+1)}};return d(n,0),o}const Dt=q.forwardRef(function({children:e,title:i="",icon:s,disabled:a=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:p,ariaLabel:m},y){return S.jsxs("button",{ref:y,className:Ke(p,"toolbar-button",s,o&&"toggled"),onMouseDown:By,onClick:u,onDoubleClick:By,title:i,disabled:!!a,style:f,"data-testid":d,"aria-label":m||i,children:[s&&S.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),By=n=>{n.stopPropagation(),n.preventDefault()};function nb(n){return n==="scheduled"?"codicon-clock":n==="running"?"codicon-loading":n==="failed"?"codicon-error":n==="passed"?"codicon-check":n==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function Hx(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const qx=Ux,$x=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:s,treeState:a,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:d,revealConsole:p,revealActionAttachment:m,isLive:y})=>{const{rootItem:b,itemMap:v}=q.useMemo(()=>tx(n),[n]),{selectedItem:E}=q.useMemo(()=>({selectedItem:e?v.get(e.callId):void 0}),[v,e]),x=q.useCallback(R=>{var G,Z;return!!((Z=(G=R.action)==null?void 0:G.error)!=null&&Z.message)},[]),T=q.useCallback(R=>s({minimum:R.action.startTime,maximum:R.action.endTime}),[s]),C=q.useCallback(R=>{var Z,H;const G=!!m&&!!((H=(Z=R.action)==null?void 0:Z.attachments)!=null&&H.length);return Ih(R.action,{sdkLanguage:u,revealConsole:p,revealActionAttachment:()=>m==null?void 0:m(R.action.callId),isLive:y,showDuration:!0,showBadges:!0,showAttachments:G})},[y,p,m,u]),k=q.useCallback(R=>!i||!R.action||R.action.startTime<=i.maximum&&R.action.endTime>=i.minimum,[i]),$=q.useCallback(R=>{f==null||f(R.action)},[f]),V=q.useCallback(R=>{d==null||d(R==null?void 0:R.action)},[d]);return S.jsxs("div",{className:"vbox",children:[i&&S.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[S.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),S.jsx(qx,{name:"actions",rootItem:b,treeState:a,setTreeState:o,selectedItem:E,onSelected:$,onHighlighted:V,onAccepted:T,isError:x,isVisible:k,render:C})]})},Ih=(n,e)=>{var T;const{sdkLanguage:i,revealConsole:s,revealActionAttachment:a,isLive:o,showDuration:u,showBadges:f,showAttachments:d}=e,{errors:p,warnings:m}=ix(n),y=n.params.selector?kx(i||"javascript",n.params.selector):void 0,b=n.class==="Test"&&n.method==="test.step"&&((T=n.annotations)==null?void 0:T.some(C=>C.type==="skip"));let v="";n.endTime?v=_t(n.endTime-n.startTime):n.error?v="Timed out":o||(v="-");const{elements:E,title:x}=ib(n);return S.jsxs("div",{className:"action-title vbox",children:[S.jsxs("div",{className:"hbox",children:[S.jsx("span",{className:"action-title-method",title:x,children:E}),(u||f||d||b)&&S.jsx("div",{className:"spacer"}),d&&S.jsx(Dt,{icon:"attach",title:"Open Attachment",onClick:()=>a==null?void 0:a()}),u&&!b&&S.jsx("div",{className:"action-duration",children:v||S.jsx("span",{className:"codicon codicon-loading"})}),b&&S.jsx("span",{className:Ke("action-skipped","codicon",nb("skipped")),title:"skipped"}),f&&S.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!p&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-error"}),S.jsx("span",{className:"action-icon-value",children:p})]}),!!m&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-warning"}),S.jsx("span",{className:"action-icon-value",children:m})]})]})]}),y&&S.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function ib(n){var f;const e=n.title??((f=N0.get(n.class+"."+n.method))==null?void 0:f.title)??n.method,i=[],s=[];let a=0;const o=/\{([^}]+)\}/g;let u;for(;(u=o.exec(e))!==null;){const[d,p]=u,m=e.slice(a,u.index);i.push(m),s.push(m);const y=Yw(n.params,p);y===void 0?(i.push(d),s.push(d)):u.index===0?(i.push(y),s.push(y)):(i.push(S.jsx("span",{className:"action-title-param",children:y},i.length)),s.push(y)),a=u.index+d.length}if(a<e.length){const d=e.slice(a);i.push(d),s.push(d)}return{elements:i,title:s.join("")}}const Vh=({value:n,description:e})=>{const[i,s]=q.useState("copy"),a=q.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[n]);return S.jsx(Dt,{title:e||"Copy",icon:i,onClick:a})},Bo=({value:n,description:e,copiedDescription:i=e,style:s})=>{const[a,o]=q.useState(!1),u=q.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return S.jsx(Dt,{style:s,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:a?i:e})},us=({text:n})=>S.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),Ix=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const s=q.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return S.jsx(us,{text:"No action selected"});const a=n.startTime-e,o=_t(a),{title:u}=ib(n);return S.jsxs("div",{className:"call-tab",children:[S.jsx("div",{className:"call-line",children:u}),S.jsx("div",{className:"call-section",children:"Time"}),xo({name:"start",type:"literal",text:o}),xo({name:"duration",type:"literal",text:Vx(n)}),!!s.length&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Parameters"}),s.map(f=>xo(Uy(n,f,n.params[f],i)))]}),!!n.result&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>xo(Uy(n,f,n.result[f],i)))]})]})};function Vx(n){return n.endTime?_t(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function xo(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),S.jsxs("div",{className:"call-line",children:[n.name,":",S.jsx("span",{className:Ke("call-value",n.type),title:n.text,children:e}),["literal","string","number","object","locator"].includes(n.type)&&S.jsx(Vh,{value:n.text})]},n.name)}function Uy(n,e,i,s){const a=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&a)&&(i=Zo(i.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&a||e==="received"&&n.method==="expect")&&(i=Zo(i,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:ls(s||"javascript",n.params.selector),type:"locator",name:"locator"};const o=typeof i;return o!=="object"||i===null?{text:String(i),type:o,name:e}:i.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(i).slice(0,1e3),type:"object",name:e}}function Zo(n,e){if(n.n!==void 0)return n.n;if(n.s!==void 0)return n.s;if(n.b!==void 0)return n.b;if(n.v!==void 0){if(n.v==="undefined")return;if(n.v==="null")return null;if(n.v==="NaN")return NaN;if(n.v==="Infinity")return 1/0;if(n.v==="-Infinity")return-1/0;if(n.v==="-0")return-0}if(n.d!==void 0)return new Date(n.d);if(n.r!==void 0)return new RegExp(n.r.p,n.r.f);if(n.a!==void 0)return n.a.map(i=>Zo(i,e));if(n.o!==void 0){const i={};for(const{k:s,v:a}of n.o)i[s]=Zo(a,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const zy=new Map;function uc({name:n,items:e=[],id:i,render:s,icon:a,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:b,noItemsMessage:v,dataTestId:E,notSelectable:x,ariaLabel:T}){const C=q.useRef(null),[k,$]=q.useState();return q.useEffect(()=>{y==null||y(k)},[y,k]),q.useEffect(()=>{const V=C.current;if(!V)return;const R=()=>{zy.set(n,V.scrollTop)};return V.addEventListener("scroll",R,{passive:!0}),()=>V.removeEventListener("scroll",R)},[n]),q.useEffect(()=>{C.current&&(C.current.scrollTop=zy.get(n)||0)},[n]),S.jsx("div",{className:Ke("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":T,children:S.jsxs("div",{className:Ke("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:V=>{var H;if(d&&V.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(V.key!=="ArrowDown"&&V.key!=="ArrowUp")return;V.stopPropagation(),V.preventDefault();const R=d?e.indexOf(d):-1;let G=R;V.key==="ArrowDown"&&(R===-1?G=0:G=Math.min(R+1,e.length-1)),V.key==="ArrowUp"&&(R===-1?G=e.length-1:G=Math.max(R-1,0));const Z=(H=C.current)==null?void 0:H.children.item(G);E0(Z||void 0),y==null||y(void 0),m==null||m(e[G],G),$(void 0)},ref:C,children:[v&&e.length===0&&S.jsx("div",{className:"list-view-empty",children:v}),e.map((V,R)=>{const G=s(V,R);return S.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(V,R),role:"listitem",className:Ke("list-view-entry",d===V&&"selected",!x&&k===V&&"highlighted",(o==null?void 0:o(V,R))&&"error",(u==null?void 0:u(V,R))&&"warning",(f==null?void 0:f(V,R))&&"info"),"aria-selected":d===V,onClick:()=>m==null?void 0:m(V,R),onMouseEnter:()=>$(V),onMouseLeave:()=>$(void 0),children:[a&&S.jsx("div",{className:"codicon "+(a(V,R)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:Z=>{Z.preventDefault(),Z.stopPropagation()},onClick:Z=>{Z.stopPropagation(),Z.preventDefault(),b==null||b(V,R)}}),typeof G=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:G}):G]},(i==null?void 0:i(V,R))||R)})]})})}const Gx=uc,Kx=({action:n,isLive:e})=>{const i=q.useMemo(()=>{var u;if(!n||!n.log.length)return[];const s=n.log,a=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<s.length;++f){let d="";if(s[f].time!==-1){const p=(u=s[f])==null?void 0:u.time;f+1<s.length?d=_t(s[f+1].time-p):n.endTime>0?d=_t(n.endTime-p):e?d=_t(Date.now()-a-p):d="-"}o.push({message:s[f].message,time:d})}return o},[n,e]);return i.length?S.jsx(Gx,{name:"log",ariaLabel:"Log entries",items:i,render:s=>S.jsxs("div",{className:"log-list-item",children:[S.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):S.jsx(us,{text:"No log entries"})};function Ja(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let a,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(a=i.exec(n))!==null;){const[,,p,,m]=a;if(p){const y=+p;switch(y){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:u=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["text-decoration"];break;case 27:u=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:f=Hy[y-30];break;case 39:f=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=Hy[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:f=qy[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=qy[y-100];break}}else if(m){const y={...o},b=u?d:f;b!==void 0&&(y.color=b);const v=u?f:d;v!==void 0&&(y["background-color"]=v),s.push(`<span style="${Xx(y)}">${Yx(m)}</span>`)}}return s.join("")}const Hy={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)"},qy={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 Yx(n){return n.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function Xx(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const Px=({error:n})=>{const e=q.useMemo(()=>Ja(n),[n]);return S.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},sb=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:s})=>(mt.useEffect(()=>{const a=document.createElement("div");return a.style.position="fixed",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.left="0",a.style.zIndex="9999",a.style.cursor=n,document.body.appendChild(a),e&&a.addEventListener("mousemove",e),i&&a.addEventListener("mouseup",i),s&&document.body.addEventListener("dblclick",s),()=>{e&&a.removeEventListener("mousemove",e),i&&a.removeEventListener("mouseup",i),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(a)}},[n,e,i,s]),S.jsx(S.Fragment,{})),Fx={position:"absolute",top:0,right:0,bottom:0,left:0},rb=({orientation:n,offsets:e,setOffsets:i,resizerColor:s,resizerWidth:a,minColumnWidth:o})=>{const u=o||0,[f,d]=mt.useState(null),[p,m]=cs(),y={position:"absolute",right:n==="horizontal"?void 0:0,bottom:n==="horizontal"?0:void 0,width:n==="horizontal"?7:void 0,height:n==="horizontal"?void 0:7,borderTopWidth:n==="horizontal"?void 0:(7-a)/2,borderRightWidth:n==="horizontal"?(7-a)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-a)/2,borderLeftWidth:n==="horizontal"?(7-a)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return S.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-a)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&S.jsx(sb,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:b=>{if(!b.buttons)d(null);else if(f){const v=n==="horizontal"?b.clientX-f.clientX:b.clientY-f.clientY,E=f.offset+v,x=f.index>0?e[f.index-1]:0,T=n==="horizontal"?p.width:p.height,C=Math.min(Math.max(x+u,E),T-u)-e[f.index];for(let k=f.index;k<e.length;++k)e[k]=e[k]+C;i([...e])}}}),e.map((b,v)=>S.jsx("div",{style:{...y,top:n==="horizontal"?0:b,left:n==="horizontal"?b:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:b,index:v}),children:S.jsx("div",{style:{...Fx,background:s}})},v))]})};async function Jf(n){const e=new Image;return n&&(e.src=n,await new Promise((i,s)=>{e.onload=i,e.onerror=i})),e}const wh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
49
+ `+l.stack}}function Xt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Hd(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function ES(t){var r=Hd(t)?"checked":"value",l=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,g=l.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(t,r,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function pl(t){t._valueTracker||(t._valueTracker=ES(t))}function qd(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),c="";return t&&(c=Hd(t)?t.checked?"true":"false":t.value),t=c,t!==l?(r.setValue(t),!0):!1}function gl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var AS=/[\n"\\]/g;function Pt(t){return t.replace(AS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ic(t,r,l,c,h,g,w,_){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),r!=null?w==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Xt(r)):t.value!==""+Xt(r)&&(t.value=""+Xt(r)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),r!=null?Vc(t,w,Xt(r)):l!=null?Vc(t,w,Xt(l)):c!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Xt(_):t.removeAttribute("name")}function $d(t,r,l,c,h,g,w,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;l=l!=null?""+Xt(l):"",r=r!=null?""+Xt(r):l,_||r===t.value||(t.value=r),t.defaultValue=r}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=_?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w)}function Vc(t,r,l){r==="number"&&gl(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function _s(t,r,l,c){if(t=t.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=r.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&c&&(t[l].defaultSelected=!0)}else{for(l=""+Xt(l),r=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Id(t,r,l){if(r!=null&&(r=""+Xt(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+Xt(l):""}function Vd(t,r,l,c){if(r==null){if(c!=null){if(l!=null)throw Error(s(92));if(ve(c)){if(1<c.length)throw Error(s(93));c=c[0]}l=c}l==null&&(l=""),r=l}l=Xt(r),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c)}function Ts(t,r){if(r){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=r;return}}t.textContent=r}var NS=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 Gd(t,r,l){var c=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,l):typeof l!="number"||l===0||NS.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function Kd(t,r,l){if(r!=null&&typeof r!="object")throw Error(s(62));if(t=t.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in r)c=r[h],r.hasOwnProperty(h)&&l[h]!==c&&Gd(t,h,c)}else for(var g in r)r.hasOwnProperty(g)&&Gd(t,g,r[g])}function Gc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 CS=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"]]),kS=/^[\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 ml(t){return kS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Kc=null;function Yc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Es=null,As=null;function Yd(t){var r=vs(t);if(r&&(t=r.stateNode)){var l=t[Et]||null;e:switch(t=r.stateNode,r.type){case"input":if(Ic(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Pt(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var c=l[r];if(c!==t&&c.form===t.form){var h=c[Et]||null;if(!h)throw Error(s(90));Ic(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)c=l[r],c.form===t.form&&qd(c)}break e;case"textarea":Id(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&_s(t,!!l.multiple,r,!1)}}}var Xc=!1;function Xd(t,r,l){if(Xc)return t(r,l);Xc=!0;try{var c=t(r);return c}finally{if(Xc=!1,(Es!==null||As!==null)&&(to(),Es&&(r=Es,t=As,As=Es=null,Yd(r),t)))for(r=0;r<t.length;r++)Yd(t[r])}}function Br(t,r){var l=t.stateNode;if(l===null)return null;var c=l[Et]||null;if(c===null)return null;l=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(s(231,r,typeof l));return l}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pc=!1;if(kn)try{var Ur={};Object.defineProperty(Ur,"passive",{get:function(){Pc=!0}}),window.addEventListener("test",Ur,Ur),window.removeEventListener("test",Ur,Ur)}catch{Pc=!1}var ti=null,Fc=null,yl=null;function Pd(){if(yl)return yl;var t,r=Fc,l=r.length,c,h="value"in ti?ti.value:ti.textContent,g=h.length;for(t=0;t<l&&r[t]===h[t];t++);var w=l-t;for(c=1;c<=w&&r[l-c]===h[g-c];c++);return yl=h.slice(t,1<c?1-c:void 0)}function bl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function vl(){return!0}function Fd(){return!1}function At(t){function r(l,c,h,g,w){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(l=t[_],this[_]=l?l(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?vl:Fd,this.isPropagationStopped=Fd,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vl)},persist:function(){},isPersistent:vl}),r}var Di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sl=At(Di),zr=m({},Di,{view:0,detail:0}),MS=At(zr),Qc,Zc,Hr,wl=m({},zr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Hr&&(Hr&&t.type==="mousemove"?(Qc=t.screenX-Hr.screenX,Zc=t.screenY-Hr.screenY):Zc=Qc=0,Hr=t),Qc)},movementY:function(t){return"movementY"in t?t.movementY:Zc}}),Qd=At(wl),OS=m({},wl,{dataTransfer:0}),RS=At(OS),LS=m({},zr,{relatedTarget:0}),Jc=At(LS),jS=m({},Di,{animationName:0,elapsedTime:0,pseudoElement:0}),DS=At(jS),BS=m({},Di,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),US=At(BS),zS=m({},Di,{data:0}),Zd=At(zS),HS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qS={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"},$S={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=$S[t])?!!r[t]:!1}function Wc(){return IS}var VS=m({},zr,{key:function(t){if(t.key){var r=HS[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=bl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?bl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?bl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),GS=At(VS),KS=m({},wl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jd=At(KS),YS=m({},zr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),XS=At(YS),PS=m({},Di,{propertyName:0,elapsedTime:0,pseudoElement:0}),FS=At(PS),QS=m({},wl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),ZS=At(QS),JS=m({},Di,{newState:0,oldState:0}),WS=At(JS),e1=[9,13,27,32],eu=kn&&"CompositionEvent"in window,qr=null;kn&&"documentMode"in document&&(qr=document.documentMode);var t1=kn&&"TextEvent"in window&&!qr,Wd=kn&&(!eu||qr&&8<qr&&11>=qr),ep=" ",tp=!1;function np(t,r){switch(t){case"keyup":return e1.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ip(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ns=!1;function n1(t,r){switch(t){case"compositionend":return ip(r);case"keypress":return r.which!==32?null:(tp=!0,ep);case"textInput":return t=r.data,t===ep&&tp?null:t;default:return null}}function i1(t,r){if(Ns)return t==="compositionend"||!eu&&np(t,r)?(t=Pd(),yl=Fc=ti=null,Ns=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Wd&&r.locale!=="ko"?null:r.data;default:return null}}var s1={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 sp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!s1[t.type]:r==="textarea"}function rp(t,r,l,c){Es?As?As.push(c):As=[c]:Es=c,r=lo(r,"onChange"),0<r.length&&(l=new Sl("onChange","change",null,l,c),t.push({event:l,listeners:r}))}var $r=null,Ir=null;function r1(t){Hm(t,0)}function xl(t){var r=Dr(t);if(qd(r))return t}function ap(t,r){if(t==="change")return r}var lp=!1;if(kn){var tu;if(kn){var nu="oninput"in document;if(!nu){var op=document.createElement("div");op.setAttribute("oninput","return;"),nu=typeof op.oninput=="function"}tu=nu}else tu=!1;lp=tu&&(!document.documentMode||9<document.documentMode)}function cp(){$r&&($r.detachEvent("onpropertychange",up),Ir=$r=null)}function up(t){if(t.propertyName==="value"&&xl(Ir)){var r=[];rp(r,Ir,t,Yc(t)),Xd(r1,r)}}function a1(t,r,l){t==="focusin"?(cp(),$r=r,Ir=l,$r.attachEvent("onpropertychange",up)):t==="focusout"&&cp()}function l1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return xl(Ir)}function o1(t,r){if(t==="click")return xl(r)}function c1(t,r){if(t==="input"||t==="change")return xl(r)}function u1(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Bt=typeof Object.is=="function"?Object.is:u1;function Vr(t,r){if(Bt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var l=Object.keys(t),c=Object.keys(r);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var h=l[c];if(!on.call(r,h)||!Bt(t[h],r[h]))return!1}return!0}function fp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hp(t,r){var l=fp(t);t=0;for(var c;l;){if(l.nodeType===3){if(c=t+l.textContent.length,t<=r&&c>=r)return{node:l,offset:r-t};t=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=fp(l)}}function dp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?dp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function pp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=gl(t.document);r instanceof t.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)t=r.contentWindow;else break;r=gl(t.document)}return r}function iu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var f1=kn&&"documentMode"in document&&11>=document.documentMode,Cs=null,su=null,Gr=null,ru=!1;function gp(t,r,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ru||Cs==null||Cs!==gl(c)||(c=Cs,"selectionStart"in c&&iu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Gr&&Vr(Gr,c)||(Gr=c,c=lo(su,"onSelect"),0<c.length&&(r=new Sl("onSelect","select",null,r,l),t.push({event:r,listeners:c}),r.target=Cs)))}function Bi(t,r){var l={};return l[t.toLowerCase()]=r.toLowerCase(),l["Webkit"+t]="webkit"+r,l["Moz"+t]="moz"+r,l}var ks={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},au={},mp={};kn&&(mp=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function Ui(t){if(au[t])return au[t];if(!ks[t])return t;var r=ks[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in mp)return au[t]=r[l];return t}var yp=Ui("animationend"),bp=Ui("animationiteration"),vp=Ui("animationstart"),h1=Ui("transitionrun"),d1=Ui("transitionstart"),p1=Ui("transitioncancel"),Sp=Ui("transitionend"),wp=new Map,lu="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(" ");lu.push("scrollEnd");function cn(t,r){wp.set(t,r),ji(r,[t])}var xp=new WeakMap;function Ft(t,r){if(typeof t=="object"&&t!==null){var l=xp.get(t);return l!==void 0?l:(r={value:t,source:r,stack:zd(r)},xp.set(t,r),r)}return{value:t,source:r,stack:zd(r)}}var Qt=[],Ms=0,ou=0;function _l(){for(var t=Ms,r=ou=Ms=0;r<t;){var l=Qt[r];Qt[r++]=null;var c=Qt[r];Qt[r++]=null;var h=Qt[r];Qt[r++]=null;var g=Qt[r];if(Qt[r++]=null,c!==null&&h!==null){var w=c.pending;w===null?h.next=h:(h.next=w.next,w.next=h),c.pending=h}g!==0&&_p(l,h,g)}}function Tl(t,r,l,c){Qt[Ms++]=t,Qt[Ms++]=r,Qt[Ms++]=l,Qt[Ms++]=c,ou|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function cu(t,r,l,c){return Tl(t,r,l,c),El(t)}function Os(t,r){return Tl(t,null,null,r),El(t)}function _p(t,r,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,c=g.alternate,c!==null&&(c.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&r!==null&&(h=31-vt(l),t=g.hiddenUpdates,c=t[h],c===null?t[h]=[r]:c.push(r),r.lane=l|536870912),g):null}function El(t){if(50<ga)throw ga=0,mf=null,Error(s(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Rs={};function g1(t,r,l,c){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(t,r,l,c){return new g1(t,r,l,c)}function uu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Mn(t,r){var l=t.alternate;return l===null?(l=Ut(t.tag,r,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=r,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,r=t.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Tp(t,r){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,r=l.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Al(t,r,l,c,h,g){var w=0;if(c=t,typeof t=="function")uu(t)&&(w=1);else if(typeof t=="string")w=yw(t,l,ae.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case L:return t=Ut(31,l,r,h),t.elementType=L,t.lanes=g,t;case E:return zi(l.children,h,g,r);case x:w=8,h|=24;break;case T:return t=Ut(12,l,r,h|2),t.elementType=T,t.lanes=g,t;case R:return t=Ut(13,l,r,h),t.elementType=R,t.lanes=g,t;case G:return t=Ut(19,l,r,h),t.elementType=G,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case C:case $:w=10;break e;case k:w=9;break e;case V:w=11;break e;case Z:w=14;break e;case H:w=16,c=null;break e}w=29,l=Error(s(130,t===null?"null":typeof t,"")),c=null}return r=Ut(w,l,r,h),r.elementType=t,r.type=c,r.lanes=g,r}function zi(t,r,l,c){return t=Ut(7,t,c,r),t.lanes=l,t}function fu(t,r,l){return t=Ut(6,t,null,r),t.lanes=l,t}function hu(t,r,l){return r=Ut(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Ls=[],js=0,Nl=null,Cl=0,Zt=[],Jt=0,Hi=null,On=1,Rn="";function qi(t,r){Ls[js++]=Cl,Ls[js++]=Nl,Nl=t,Cl=r}function Ep(t,r,l){Zt[Jt++]=On,Zt[Jt++]=Rn,Zt[Jt++]=Hi,Hi=t;var c=On;t=Rn;var h=32-vt(c)-1;c&=~(1<<h),l+=1;var g=32-vt(r)+h;if(30<g){var w=h-h%5;g=(c&(1<<w)-1).toString(32),c>>=w,h-=w,On=1<<32-vt(r)+h|l<<h|c,Rn=g+t}else On=1<<g|l<<h|c,Rn=t}function du(t){t.return!==null&&(qi(t,1),Ep(t,1,0))}function pu(t){for(;t===Nl;)Nl=Ls[--js],Ls[js]=null,Cl=Ls[--js],Ls[js]=null;for(;t===Hi;)Hi=Zt[--Jt],Zt[Jt]=null,Rn=Zt[--Jt],Zt[Jt]=null,On=Zt[--Jt],Zt[Jt]=null}var St=null,$e=null,_e=!1,$i=null,yn=!1,gu=Error(s(519));function Ii(t){var r=Error(s(418,""));throw Xr(Ft(r,t)),gu}function Ap(t){var r=t.stateNode,l=t.type,c=t.memoizedProps;switch(r[ht]=t,r[Et]=c,l){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(l=0;l<ya.length;l++)ye(ya[l],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ye("invalid",r),$d(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),pl(r);break;case"select":ye("invalid",r);break;case"textarea":ye("invalid",r),Vd(r,c.value,c.defaultValue,c.children),pl(r)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||c.suppressHydrationWarning===!0||Vm(r.textContent,l)?(c.popover!=null&&(ye("beforetoggle",r),ye("toggle",r)),c.onScroll!=null&&ye("scroll",r),c.onScrollEnd!=null&&ye("scrollend",r),c.onClick!=null&&(r.onclick=oo),r=!0):r=!1,r||Ii(t)}function Np(t){for(St=t.return;St;)switch(St.tag){case 5:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:St=St.return}}function Kr(t){if(t!==St)return!1;if(!_e)return Np(t),_e=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Rf(t.type,t.memoizedProps)),l=!l),l&&$e&&Ii(t),Np(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(l=t.data,l==="/$"){if(r===0){$e=fn(t.nextSibling);break e}r--}else l!=="$"&&l!=="$!"&&l!=="$?"||r++;t=t.nextSibling}$e=null}}else r===27?(r=$e,yi(t.type)?(t=Bf,Bf=null,$e=t):$e=r):$e=St?fn(t.stateNode.nextSibling):null;return!0}function Yr(){$e=St=null,_e=!1}function Cp(){var t=$i;return t!==null&&(kt===null?kt=t:kt.push.apply(kt,t),$i=null),t}function Xr(t){$i===null?$i=[t]:$i.push(t)}var mu=P(null),Vi=null,Ln=null;function ni(t,r,l){J(mu,r._currentValue),r._currentValue=l}function jn(t){t._currentValue=mu.current,W(mu)}function yu(t,r,l){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===l)break;t=t.return}}function bu(t,r,l,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var w=h.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=h;for(var A=0;A<r.length;A++)if(_.context===r[A]){g.lanes|=l,_=g.alternate,_!==null&&(_.lanes|=l),yu(g.return,l,t),c||(w=null);break e}g=_.next}}else if(h.tag===18){if(w=h.return,w===null)throw Error(s(341));w.lanes|=l,g=w.alternate,g!==null&&(g.lanes|=l),yu(w,l,t),w=null}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===t){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}}function Pr(t,r,l,c){t=null;for(var h=r,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var w=h.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var _=h.type;Bt(h.pendingProps.value,w.value)||(t!==null?t.push(_):t=[_])}}else if(h===st.current){if(w=h.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(_a):t=[_a])}h=h.return}t!==null&&bu(r,t,l,c),r.flags|=262144}function kl(t){for(t=t.firstContext;t!==null;){if(!Bt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Gi(t){Vi=t,Ln=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function dt(t){return kp(Vi,t)}function Ml(t,r){return Vi===null&&Gi(t),kp(t,r)}function kp(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Ln===null){if(t===null)throw Error(s(308));Ln=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Ln=Ln.next=r;return l}var m1=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(l,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(l){return l()})}},y1=n.unstable_scheduleCallback,b1=n.unstable_NormalPriority,Qe={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vu(){return{controller:new m1,data:new Map,refCount:0}}function Fr(t){t.refCount--,t.refCount===0&&y1(b1,function(){t.controller.abort()})}var Qr=null,Su=0,Ds=0,Bs=null;function v1(t,r){if(Qr===null){var l=Qr=[];Su=0,Ds=_f(),Bs={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Su++,r.then(Mp,Mp),r}function Mp(){if(--Su===0&&Qr!==null){Bs!==null&&(Bs.status="fulfilled");var t=Qr;Qr=null,Ds=0,Bs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function S1(t,r){var l=[],c={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(c.status="rejected",c.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),c}var Op=z.S;z.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&v1(t,r),Op!==null&&Op(t,r)};var Ki=P(null);function wu(){var t=Ki.current;return t!==null?t:Le.pooledCache}function Ol(t,r){r===null?J(Ki,Ki.current):J(Ki,r.pool)}function Rp(){var t=wu();return t===null?null:{parent:Qe._currentValue,pool:t}}var Zr=Error(s(460)),Lp=Error(s(474)),Rl=Error(s(542)),xu={then:function(){}};function jp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ll(){}function Dp(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(Ll,Ll),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Up(t),t;default:if(typeof r.status=="string")r.then(Ll,Ll);else{if(t=Le,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=r,t.status="pending",t.then(function(c){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=c}},function(c){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Up(t),t}throw Jr=r,Zr}}var Jr=null;function Bp(){if(Jr===null)throw Error(s(459));var t=Jr;return Jr=null,t}function Up(t){if(t===Zr||t===Rl)throw Error(s(483))}var ii=!1;function _u(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function si(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ri(t,r,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Te&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,r=El(t),_p(t,null,l),r}return Tl(t,c,r,l),El(t)}function Wr(t,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,l|=c,r.lanes=l,Md(t,l)}}function Eu(t,r){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=w:g=g.next=w,l=l.next}while(l!==null);g===null?h=g=r:g=g.next=r}else h=g=r;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=r:t.next=r,l.lastBaseUpdate=r}var Au=!1;function ea(){if(Au){var t=Bs;if(t!==null)throw t}}function ta(t,r,l,c){Au=!1;var h=t.updateQueue;ii=!1;var g=h.firstBaseUpdate,w=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var A=_,D=A.next;A.next=null,w===null?g=D:w.next=D,w=A;var K=t.alternate;K!==null&&(K=K.updateQueue,_=K.lastBaseUpdate,_!==w&&(_===null?K.firstBaseUpdate=D:_.next=D,K.lastBaseUpdate=A))}if(g!==null){var X=h.baseState;w=0,K=D=A=null,_=g;do{var B=_.lane&-536870913,U=B!==_.lane;if(U?(Se&B)===B:(c&B)===B){B!==0&&B===Ds&&(Au=!0),K!==null&&(K=K.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var fe=t,oe=_;B=r;var Me=l;switch(oe.tag){case 1:if(fe=oe.payload,typeof fe=="function"){X=fe.call(Me,X,B);break e}X=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=oe.payload,B=typeof fe=="function"?fe.call(Me,X,B):fe,B==null)break e;X=m({},X,B);break e;case 2:ii=!0}}B=_.callback,B!==null&&(t.flags|=64,U&&(t.flags|=8192),U=h.callbacks,U===null?h.callbacks=[B]:U.push(B))}else U={lane:B,tag:_.tag,payload:_.payload,callback:_.callback,next:null},K===null?(D=K=U,A=X):K=K.next=U,w|=B;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;U=_,_=U.next,U.next=null,h.lastBaseUpdate=U,h.shared.pending=null}}while(!0);K===null&&(A=X),h.baseState=A,h.firstBaseUpdate=D,h.lastBaseUpdate=K,g===null&&(h.shared.lanes=0),di|=w,t.lanes=w,t.memoizedState=X}}function zp(t,r){if(typeof t!="function")throw Error(s(191,t));t.call(r)}function Hp(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)zp(l[t],r)}var Us=P(null),jl=P(0);function qp(t,r){t=$n,J(jl,t),J(Us,r),$n=t|r.baseLanes}function Nu(){J(jl,$n),J(Us,Us.current)}function Cu(){$n=jl.current,W(Us),W(jl)}var ai=0,pe=null,Ce=null,Xe=null,Dl=!1,zs=!1,Yi=!1,Bl=0,na=0,Hs=null,w1=0;function Ve(){throw Error(s(321))}function ku(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!Bt(t[l],r[l]))return!1;return!0}function Mu(t,r,l,c,h,g){return ai=g,pe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=t===null||t.memoizedState===null?_g:Tg,Yi=!1,g=l(c,h),Yi=!1,zs&&(g=Ip(r,l,c,h)),$p(t),g}function $p(t){z.H=Il;var r=Ce!==null&&Ce.next!==null;if(ai=0,Xe=Ce=pe=null,Dl=!1,na=0,Hs=null,r)throw Error(s(300));t===null||et||(t=t.dependencies,t!==null&&kl(t)&&(et=!0))}function Ip(t,r,l,c){pe=t;var h=0;do{if(zs&&(Hs=null),na=0,zs=!1,25<=h)throw Error(s(301));if(h+=1,Xe=Ce=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}z.H=C1,g=r(l,c)}while(zs);return g}function x1(){var t=z.H,r=t.useState()[0];return r=typeof r.then=="function"?ia(r):r,t=t.useState()[0],(Ce!==null?Ce.memoizedState:null)!==t&&(pe.flags|=1024),r}function Ou(){var t=Bl!==0;return Bl=0,t}function Ru(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function Lu(t){if(Dl){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Dl=!1}ai=0,Xe=Ce=pe=null,zs=!1,na=Bl=0,Hs=null}function Nt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?pe.memoizedState=Xe=t:Xe=Xe.next=t,Xe}function Pe(){if(Ce===null){var t=pe.alternate;t=t!==null?t.memoizedState:null}else t=Ce.next;var r=Xe===null?pe.memoizedState:Xe.next;if(r!==null)Xe=r,Ce=t;else{if(t===null)throw pe.alternate===null?Error(s(467)):Error(s(310));Ce=t,t={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Xe===null?pe.memoizedState=Xe=t:Xe=Xe.next=t}return Xe}function ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ia(t){var r=na;return na+=1,Hs===null&&(Hs=[]),t=Dp(Hs,t,r),r=pe,(Xe===null?r.memoizedState:Xe.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?_g:Tg),t}function Ul(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ia(t);if(t.$$typeof===$)return dt(t)}throw Error(s(438,String(t)))}function Du(t){var r=null,l=pe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var c=pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=ju(),pe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(t),c=0;c<t;c++)l[c]=ie;return r.index++,l}function Dn(t,r){return typeof r=="function"?r(t):r}function zl(t){var r=Pe();return Bu(r,Ce,t)}function Bu(t,r,l){var c=t.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=l;var h=t.baseQueue,g=c.pending;if(g!==null){if(h!==null){var w=h.next;h.next=g.next,g.next=w}r.baseQueue=h=g,c.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{r=h.next;var _=w=null,A=null,D=r,K=!1;do{var X=D.lane&-536870913;if(X!==D.lane?(Se&X)===X:(ai&X)===X){var B=D.revertLane;if(B===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),X===Ds&&(K=!0);else if((ai&B)===B){D=D.next,B===Ds&&(K=!0);continue}else X={lane:0,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=X,w=g):A=A.next=X,pe.lanes|=B,di|=B;X=D.action,Yi&&l(g,X),g=D.hasEagerState?D.eagerState:l(g,X)}else B={lane:X,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=B,w=g):A=A.next=B,pe.lanes|=X,di|=X;D=D.next}while(D!==null&&D!==r);if(A===null?w=g:A.next=_,!Bt(g,t.memoizedState)&&(et=!0,K&&(l=Bs,l!==null)))throw l;t.memoizedState=g,t.baseState=w,t.baseQueue=A,c.lastRenderedState=g}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Uu(t){var r=Pe(),l=r.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=t;var c=l.dispatch,h=l.pending,g=r.memoizedState;if(h!==null){l.pending=null;var w=h=h.next;do g=t(g,w.action),w=w.next;while(w!==h);Bt(g,r.memoizedState)||(et=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),l.lastRenderedState=g}return[g,c]}function Vp(t,r,l){var c=pe,h=Pe(),g=_e;if(g){if(l===void 0)throw Error(s(407));l=l()}else l=r();var w=!Bt((Ce||h).memoizedState,l);w&&(h.memoizedState=l,et=!0),h=h.queue;var _=Yp.bind(null,c,h,t);if(sa(2048,8,_,[t]),h.getSnapshot!==r||w||Xe!==null&&Xe.memoizedState.tag&1){if(c.flags|=2048,qs(9,Hl(),Kp.bind(null,c,h,l,r),null),Le===null)throw Error(s(349));g||(ai&124)!==0||Gp(c,r,l)}return l}function Gp(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=pe.updateQueue,r===null?(r=ju(),pe.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Kp(t,r,l,c){r.value=l,r.getSnapshot=c,Xp(r)&&Pp(t)}function Yp(t,r,l){return l(function(){Xp(r)&&Pp(t)})}function Xp(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!Bt(t,l)}catch{return!0}}function Pp(t){var r=Os(t,2);r!==null&&It(r,t,2)}function zu(t){var r=Nt();if(typeof t=="function"){var l=t;if(t=l(),Yi){Yt(!0);try{l()}finally{Yt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:t},r}function Fp(t,r,l,c){return t.baseState=l,Bu(t,Ce,typeof c=="function"?c:Dn)}function _1(t,r,l,c,h){if($l(t))throw Error(s(485));if(t=r.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};z.T!==null?l(!0):g.isTransition=!1,c(g),l=r.pending,l===null?(g.next=r.pending=g,Qp(r,g)):(g.next=l.next,r.pending=l.next=g)}}function Qp(t,r){var l=r.action,c=r.payload,h=t.state;if(r.isTransition){var g=z.T,w={};z.T=w;try{var _=l(h,c),A=z.S;A!==null&&A(w,_),Zp(t,r,_)}catch(D){Hu(t,r,D)}finally{z.T=g}}else try{g=l(h,c),Zp(t,r,g)}catch(D){Hu(t,r,D)}}function Zp(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){Jp(t,r,c)},function(c){return Hu(t,r,c)}):Jp(t,r,l)}function Jp(t,r,l){r.status="fulfilled",r.value=l,Wp(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,Qp(t,l)))}function Hu(t,r,l){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=l,Wp(r),r=r.next;while(r!==c)}t.action=null}function Wp(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function eg(t,r){return r}function tg(t,r){if(_e){var l=Le.formState;if(l!==null){e:{var c=pe;if(_e){if($e){t:{for(var h=$e,g=yn;h.nodeType!==8;){if(!g){h=null;break t}if(h=fn(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){$e=fn(h.nextSibling),c=h.data==="F!";break e}}Ii(c)}c=!1}c&&(r=l[0])}}return l=Nt(),l.memoizedState=l.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:eg,lastRenderedState:r},l.queue=c,l=Sg.bind(null,pe,c),c.dispatch=l,c=zu(!1),g=Gu.bind(null,pe,!1,c.queue),c=Nt(),h={state:r,dispatch:null,action:t,pending:null},c.queue=h,l=_1.bind(null,pe,h,g,l),h.dispatch=l,c.memoizedState=t,[r,l,!1]}function ng(t){var r=Pe();return ig(r,Ce,t)}function ig(t,r,l){if(r=Bu(t,r,eg)[0],t=zl(Dn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=ia(r)}catch(w){throw w===Zr?Rl:w}else c=r;r=Pe();var h=r.queue,g=h.dispatch;return l!==r.memoizedState&&(pe.flags|=2048,qs(9,Hl(),T1.bind(null,h,l),null)),[c,g,t]}function T1(t,r){t.action=r}function sg(t){var r=Pe(),l=Ce;if(l!==null)return ig(r,l,t);Pe(),r=r.memoizedState,l=Pe();var c=l.queue.dispatch;return l.memoizedState=t,[r,c,!1]}function qs(t,r,l,c){return t={tag:t,create:l,deps:c,inst:r,next:null},r=pe.updateQueue,r===null&&(r=ju(),pe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=t.next=t:(c=l.next,l.next=t,t.next=c,r.lastEffect=t),t}function Hl(){return{destroy:void 0,resource:void 0}}function rg(){return Pe().memoizedState}function ql(t,r,l,c){var h=Nt();c=c===void 0?null:c,pe.flags|=t,h.memoizedState=qs(1|r,Hl(),l,c)}function sa(t,r,l,c){var h=Pe();c=c===void 0?null:c;var g=h.memoizedState.inst;Ce!==null&&c!==null&&ku(c,Ce.memoizedState.deps)?h.memoizedState=qs(r,g,l,c):(pe.flags|=t,h.memoizedState=qs(1|r,g,l,c))}function ag(t,r){ql(8390656,8,t,r)}function lg(t,r){sa(2048,8,t,r)}function og(t,r){return sa(4,2,t,r)}function cg(t,r){return sa(4,4,t,r)}function ug(t,r){if(typeof r=="function"){t=t();var l=r(t);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function fg(t,r,l){l=l!=null?l.concat([t]):null,sa(4,4,ug.bind(null,r,t),l)}function qu(){}function hg(t,r){var l=Pe();r=r===void 0?null:r;var c=l.memoizedState;return r!==null&&ku(r,c[1])?c[0]:(l.memoizedState=[t,r],t)}function dg(t,r){var l=Pe();r=r===void 0?null:r;var c=l.memoizedState;if(r!==null&&ku(r,c[1]))return c[0];if(c=t(),Yi){Yt(!0);try{t()}finally{Yt(!1)}}return l.memoizedState=[c,r],c}function $u(t,r,l){return l===void 0||(ai&1073741824)!==0?t.memoizedState=r:(t.memoizedState=l,t=mm(),pe.lanes|=t,di|=t,l)}function pg(t,r,l,c){return Bt(l,r)?l:Us.current!==null?(t=$u(t,l,c),Bt(t,r)||(et=!0),t):(ai&42)===0?(et=!0,t.memoizedState=l):(t=mm(),pe.lanes|=t,di|=t,r)}function gg(t,r,l,c,h){var g=Q.p;Q.p=g!==0&&8>g?g:8;var w=z.T,_={};z.T=_,Gu(t,!1,r,l);try{var A=h(),D=z.S;if(D!==null&&D(_,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var K=S1(A,c);ra(t,r,K,$t(t))}else ra(t,r,c,$t(t))}catch(X){ra(t,r,{then:function(){},status:"rejected",reason:X},$t())}finally{Q.p=g,z.T=w}}function E1(){}function Iu(t,r,l,c){if(t.tag!==5)throw Error(s(476));var h=mg(t).queue;gg(t,h,r,se,l===null?E1:function(){return yg(t),l(c)})}function mg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:se},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function yg(t){var r=mg(t).next.queue;ra(t,r,{},$t())}function Vu(){return dt(_a)}function bg(){return Pe().memoizedState}function vg(){return Pe().memoizedState}function A1(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=$t();t=si(l);var c=ri(r,t,l);c!==null&&(It(c,r,l),Wr(c,r,l)),r={cache:vu()},t.payload=r;return}r=r.return}}function N1(t,r,l){var c=$t();l={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},$l(t)?wg(r,l):(l=cu(t,r,l,c),l!==null&&(It(l,t,c),xg(l,r,c)))}function Sg(t,r,l){var c=$t();ra(t,r,l,c)}function ra(t,r,l,c){var h={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if($l(t))wg(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,_=g(w,l);if(h.hasEagerState=!0,h.eagerState=_,Bt(_,w))return Tl(t,r,h,0),Le===null&&_l(),!1}catch{}finally{}if(l=cu(t,r,h,c),l!==null)return It(l,t,c),xg(l,r,c),!0}return!1}function Gu(t,r,l,c){if(c={lane:2,revertLane:_f(),action:c,hasEagerState:!1,eagerState:null,next:null},$l(t)){if(r)throw Error(s(479))}else r=cu(t,l,c,2),r!==null&&It(r,t,2)}function $l(t){var r=t.alternate;return t===pe||r!==null&&r===pe}function wg(t,r){zs=Dl=!0;var l=t.pending;l===null?r.next=r:(r.next=l.next,l.next=r),t.pending=r}function xg(t,r,l){if((l&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,l|=c,r.lanes=l,Md(t,l)}}var Il={readContext:dt,use:Ul,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve},_g={readContext:dt,use:Ul,useCallback:function(t,r){return Nt().memoizedState=[t,r===void 0?null:r],t},useContext:dt,useEffect:ag,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,ql(4194308,4,ug.bind(null,r,t),l)},useLayoutEffect:function(t,r){return ql(4194308,4,t,r)},useInsertionEffect:function(t,r){ql(4,2,t,r)},useMemo:function(t,r){var l=Nt();r=r===void 0?null:r;var c=t();if(Yi){Yt(!0);try{t()}finally{Yt(!1)}}return l.memoizedState=[c,r],c},useReducer:function(t,r,l){var c=Nt();if(l!==void 0){var h=l(r);if(Yi){Yt(!0);try{l(r)}finally{Yt(!1)}}}else h=r;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=N1.bind(null,pe,t),[c.memoizedState,t]},useRef:function(t){var r=Nt();return t={current:t},r.memoizedState=t},useState:function(t){t=zu(t);var r=t.queue,l=Sg.bind(null,pe,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:qu,useDeferredValue:function(t,r){var l=Nt();return $u(l,t,r)},useTransition:function(){var t=zu(!1);return t=gg.bind(null,pe,t.queue,!0,!1),Nt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var c=pe,h=Nt();if(_e){if(l===void 0)throw Error(s(407));l=l()}else{if(l=r(),Le===null)throw Error(s(349));(Se&124)!==0||Gp(c,r,l)}h.memoizedState=l;var g={value:l,getSnapshot:r};return h.queue=g,ag(Yp.bind(null,c,g,t),[t]),c.flags|=2048,qs(9,Hl(),Kp.bind(null,c,g,l,r),null),l},useId:function(){var t=Nt(),r=Le.identifierPrefix;if(_e){var l=Rn,c=On;l=(c&~(1<<32-vt(c)-1)).toString(32)+l,r="«"+r+"R"+l,l=Bl++,0<l&&(r+="H"+l.toString(32)),r+="»"}else l=w1++,r="«"+r+"r"+l.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:Vu,useFormState:tg,useActionState:tg,useOptimistic:function(t){var r=Nt();r.memoizedState=r.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Gu.bind(null,pe,!0,l),l.dispatch=r,[t,r]},useMemoCache:Du,useCacheRefresh:function(){return Nt().memoizedState=A1.bind(null,pe)}},Tg={readContext:dt,use:Ul,useCallback:hg,useContext:dt,useEffect:lg,useImperativeHandle:fg,useInsertionEffect:og,useLayoutEffect:cg,useMemo:dg,useReducer:zl,useRef:rg,useState:function(){return zl(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var l=Pe();return pg(l,Ce.memoizedState,t,r)},useTransition:function(){var t=zl(Dn)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:ia(t),r]},useSyncExternalStore:Vp,useId:bg,useHostTransitionStatus:Vu,useFormState:ng,useActionState:ng,useOptimistic:function(t,r){var l=Pe();return Fp(l,Ce,t,r)},useMemoCache:Du,useCacheRefresh:vg},C1={readContext:dt,use:Ul,useCallback:hg,useContext:dt,useEffect:lg,useImperativeHandle:fg,useInsertionEffect:og,useLayoutEffect:cg,useMemo:dg,useReducer:Uu,useRef:rg,useState:function(){return Uu(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var l=Pe();return Ce===null?$u(l,t,r):pg(l,Ce.memoizedState,t,r)},useTransition:function(){var t=Uu(Dn)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:ia(t),r]},useSyncExternalStore:Vp,useId:bg,useHostTransitionStatus:Vu,useFormState:sg,useActionState:sg,useOptimistic:function(t,r){var l=Pe();return Ce!==null?Fp(l,Ce,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Du,useCacheRefresh:vg},$s=null,aa=0;function Vl(t){var r=aa;return aa+=1,$s===null&&($s=[]),Dp($s,t,r)}function la(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Gl(t,r){throw r.$$typeof===y?Error(s(525)):(t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Eg(t){var r=t._init;return r(t._payload)}function Ag(t){function r(O,M){if(t){var j=O.deletions;j===null?(O.deletions=[M],O.flags|=16):j.push(M)}}function l(O,M){if(!t)return null;for(;M!==null;)r(O,M),M=M.sibling;return null}function c(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function h(O,M){return O=Mn(O,M),O.index=0,O.sibling=null,O}function g(O,M,j){return O.index=j,t?(j=O.alternate,j!==null?(j=j.index,j<M?(O.flags|=67108866,M):j):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function w(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function _(O,M,j,Y){return M===null||M.tag!==6?(M=fu(j,O.mode,Y),M.return=O,M):(M=h(M,j),M.return=O,M)}function A(O,M,j,Y){var ne=j.type;return ne===E?K(O,M,j.props.children,Y,j.key):M!==null&&(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===H&&Eg(ne)===M.type)?(M=h(M,j.props),la(M,j),M.return=O,M):(M=Al(j.type,j.key,j.props,null,O.mode,Y),la(M,j),M.return=O,M)}function D(O,M,j,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==j.containerInfo||M.stateNode.implementation!==j.implementation?(M=hu(j,O.mode,Y),M.return=O,M):(M=h(M,j.children||[]),M.return=O,M)}function K(O,M,j,Y,ne){return M===null||M.tag!==7?(M=zi(j,O.mode,Y,ne),M.return=O,M):(M=h(M,j),M.return=O,M)}function X(O,M,j){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=fu(""+M,O.mode,j),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return j=Al(M.type,M.key,M.props,null,O.mode,j),la(j,M),j.return=O,j;case v:return M=hu(M,O.mode,j),M.return=O,M;case H:var Y=M._init;return M=Y(M._payload),X(O,M,j)}if(ve(M)||I(M))return M=zi(M,O.mode,j,null),M.return=O,M;if(typeof M.then=="function")return X(O,Vl(M),j);if(M.$$typeof===$)return X(O,Ml(O,M),j);Gl(O,M)}return null}function B(O,M,j,Y){var ne=M!==null?M.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ne!==null?null:_(O,M,""+j,Y);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return j.key===ne?A(O,M,j,Y):null;case v:return j.key===ne?D(O,M,j,Y):null;case H:return ne=j._init,j=ne(j._payload),B(O,M,j,Y)}if(ve(j)||I(j))return ne!==null?null:K(O,M,j,Y,null);if(typeof j.then=="function")return B(O,M,Vl(j),Y);if(j.$$typeof===$)return B(O,M,Ml(O,j),Y);Gl(O,j)}return null}function U(O,M,j,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(j)||null,_(M,O,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:return O=O.get(Y.key===null?j:Y.key)||null,A(M,O,Y,ne);case v:return O=O.get(Y.key===null?j:Y.key)||null,D(M,O,Y,ne);case H:var ge=Y._init;return Y=ge(Y._payload),U(O,M,j,Y,ne)}if(ve(Y)||I(Y))return O=O.get(j)||null,K(M,O,Y,ne,null);if(typeof Y.then=="function")return U(O,M,j,Vl(Y),ne);if(Y.$$typeof===$)return U(O,M,j,Ml(M,Y),ne);Gl(M,Y)}return null}function fe(O,M,j,Y){for(var ne=null,ge=null,re=M,ce=M=0,nt=null;re!==null&&ce<j.length;ce++){re.index>ce?(nt=re,re=null):nt=re.sibling;var xe=B(O,re,j[ce],Y);if(xe===null){re===null&&(re=nt);break}t&&re&&xe.alternate===null&&r(O,re),M=g(xe,M,ce),ge===null?ne=xe:ge.sibling=xe,ge=xe,re=nt}if(ce===j.length)return l(O,re),_e&&qi(O,ce),ne;if(re===null){for(;ce<j.length;ce++)re=X(O,j[ce],Y),re!==null&&(M=g(re,M,ce),ge===null?ne=re:ge.sibling=re,ge=re);return _e&&qi(O,ce),ne}for(re=c(re);ce<j.length;ce++)nt=U(re,O,ce,j[ce],Y),nt!==null&&(t&&nt.alternate!==null&&re.delete(nt.key===null?ce:nt.key),M=g(nt,M,ce),ge===null?ne=nt:ge.sibling=nt,ge=nt);return t&&re.forEach(function(xi){return r(O,xi)}),_e&&qi(O,ce),ne}function oe(O,M,j,Y){if(j==null)throw Error(s(151));for(var ne=null,ge=null,re=M,ce=M=0,nt=null,xe=j.next();re!==null&&!xe.done;ce++,xe=j.next()){re.index>ce?(nt=re,re=null):nt=re.sibling;var xi=B(O,re,xe.value,Y);if(xi===null){re===null&&(re=nt);break}t&&re&&xi.alternate===null&&r(O,re),M=g(xi,M,ce),ge===null?ne=xi:ge.sibling=xi,ge=xi,re=nt}if(xe.done)return l(O,re),_e&&qi(O,ce),ne;if(re===null){for(;!xe.done;ce++,xe=j.next())xe=X(O,xe.value,Y),xe!==null&&(M=g(xe,M,ce),ge===null?ne=xe:ge.sibling=xe,ge=xe);return _e&&qi(O,ce),ne}for(re=c(re);!xe.done;ce++,xe=j.next())xe=U(re,O,ce,xe.value,Y),xe!==null&&(t&&xe.alternate!==null&&re.delete(xe.key===null?ce:xe.key),M=g(xe,M,ce),ge===null?ne=xe:ge.sibling=xe,ge=xe);return t&&re.forEach(function(kw){return r(O,kw)}),_e&&qi(O,ce),ne}function Me(O,M,j,Y){if(typeof j=="object"&&j!==null&&j.type===E&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case b:e:{for(var ne=j.key;M!==null;){if(M.key===ne){if(ne=j.type,ne===E){if(M.tag===7){l(O,M.sibling),Y=h(M,j.props.children),Y.return=O,O=Y;break e}}else if(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===H&&Eg(ne)===M.type){l(O,M.sibling),Y=h(M,j.props),la(Y,j),Y.return=O,O=Y;break e}l(O,M);break}else r(O,M);M=M.sibling}j.type===E?(Y=zi(j.props.children,O.mode,Y,j.key),Y.return=O,O=Y):(Y=Al(j.type,j.key,j.props,null,O.mode,Y),la(Y,j),Y.return=O,O=Y)}return w(O);case v:e:{for(ne=j.key;M!==null;){if(M.key===ne)if(M.tag===4&&M.stateNode.containerInfo===j.containerInfo&&M.stateNode.implementation===j.implementation){l(O,M.sibling),Y=h(M,j.children||[]),Y.return=O,O=Y;break e}else{l(O,M);break}else r(O,M);M=M.sibling}Y=hu(j,O.mode,Y),Y.return=O,O=Y}return w(O);case H:return ne=j._init,j=ne(j._payload),Me(O,M,j,Y)}if(ve(j))return fe(O,M,j,Y);if(I(j)){if(ne=I(j),typeof ne!="function")throw Error(s(150));return j=ne.call(j),oe(O,M,j,Y)}if(typeof j.then=="function")return Me(O,M,Vl(j),Y);if(j.$$typeof===$)return Me(O,M,Ml(O,j),Y);Gl(O,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,M!==null&&M.tag===6?(l(O,M.sibling),Y=h(M,j),Y.return=O,O=Y):(l(O,M),Y=fu(j,O.mode,Y),Y.return=O,O=Y),w(O)):l(O,M)}return function(O,M,j,Y){try{aa=0;var ne=Me(O,M,j,Y);return $s=null,ne}catch(re){if(re===Zr||re===Rl)throw re;var ge=Ut(29,re,null,O.mode);return ge.lanes=Y,ge.return=O,ge}finally{}}}var Is=Ag(!0),Ng=Ag(!1),Wt=P(null),bn=null;function li(t){var r=t.alternate;J(Ze,Ze.current&1),J(Wt,t),bn===null&&(r===null||Us.current!==null||r.memoizedState!==null)&&(bn=t)}function Cg(t){if(t.tag===22){if(J(Ze,Ze.current),J(Wt,t),bn===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(bn=t)}}else oi()}function oi(){J(Ze,Ze.current),J(Wt,Wt.current)}function Bn(t){W(Wt),bn===t&&(bn=null),W(Ze)}var Ze=P(0);function Kl(t){for(var r=t;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Df(l)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Ku(t,r,l,c){r=t.memoizedState,l=l(c,r),l=l==null?r:m({},r,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Yu={enqueueSetState:function(t,r,l){t=t._reactInternals;var c=$t(),h=si(c);h.payload=r,l!=null&&(h.callback=l),r=ri(t,h,c),r!==null&&(It(r,t,c),Wr(r,t,c))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var c=$t(),h=si(c);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=ri(t,h,c),r!==null&&(It(r,t,c),Wr(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=$t(),c=si(l);c.tag=2,r!=null&&(c.callback=r),r=ri(t,c,l),r!==null&&(It(r,t,l),Wr(r,t,l))}};function kg(t,r,l,c,h,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Vr(l,c)||!Vr(h,g):!0}function Mg(t,r,l,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,c),r.state!==t&&Yu.enqueueReplaceState(r,r.state,null)}function Xi(t,r){var l=r;if("ref"in r){l={};for(var c in r)c!=="ref"&&(l[c]=r[c])}if(t=t.defaultProps){l===r&&(l=m({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}var Yl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Og(t){Yl(t)}function Rg(t){console.error(t)}function Lg(t){Yl(t)}function Xl(t,r){try{var l=t.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function jg(t,r,l){try{var c=t.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Xu(t,r,l){return l=si(l),l.tag=3,l.payload={element:null},l.callback=function(){Xl(t,r)},l}function Dg(t){return t=si(t),t.tag=3,t}function Bg(t,r,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;t.payload=function(){return h(g)},t.callback=function(){jg(r,l,c)}}var w=l.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){jg(r,l,c),typeof h!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var _=c.stack;this.componentDidCatch(c.value,{componentStack:_!==null?_:""})})}function k1(t,r,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=l.alternate,r!==null&&Pr(r,l,h,!0),l=Wt.current,l!==null){switch(l.tag){case 13:return bn===null?bf():l.alternate===null&&Ie===0&&(Ie=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===xu?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([c]):r.add(c),Sf(t,c,h)),!1;case 22:return l.flags|=65536,c===xu?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([c]):l.add(c)),Sf(t,c,h)),!1}throw Error(s(435,l.tag))}return Sf(t,c,h),bf(),!1}if(_e)return r=Wt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==gu&&(t=Error(s(422),{cause:c}),Xr(Ft(t,l)))):(c!==gu&&(r=Error(s(423),{cause:c}),Xr(Ft(r,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Ft(c,l),h=Xu(t.stateNode,c,h),Eu(t,h),Ie!==4&&(Ie=2)),!1;var g=Error(s(520),{cause:c});if(g=Ft(g,l),pa===null?pa=[g]:pa.push(g),Ie!==4&&(Ie=2),r===null)return!0;c=Ft(c,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=Xu(l.stateNode,c,t),Eu(l,t),!1;case 1:if(r=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(pi===null||!pi.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=Dg(h),Bg(h,t,l,c),Eu(l,h),!1}l=l.return}while(l!==null);return!1}var Ug=Error(s(461)),et=!1;function rt(t,r,l,c){r.child=t===null?Ng(r,null,l,c):Is(r,t.child,l,c)}function zg(t,r,l,c,h){l=l.render;var g=r.ref;if("ref"in c){var w={};for(var _ in c)_!=="ref"&&(w[_]=c[_])}else w=c;return Gi(r),c=Mu(t,r,l,w,g,h),_=Ou(),t!==null&&!et?(Ru(t,r,h),Un(t,r,h)):(_e&&_&&du(r),r.flags|=1,rt(t,r,c,h),r.child)}function Hg(t,r,l,c,h){if(t===null){var g=l.type;return typeof g=="function"&&!uu(g)&&g.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=g,qg(t,r,g,c,h)):(t=Al(l.type,null,c,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!tf(t,h)){var w=g.memoizedProps;if(l=l.compare,l=l!==null?l:Vr,l(w,c)&&t.ref===r.ref)return Un(t,r,h)}return r.flags|=1,t=Mn(g,c),t.ref=r.ref,t.return=r,r.child=t}function qg(t,r,l,c,h){if(t!==null){var g=t.memoizedProps;if(Vr(g,c)&&t.ref===r.ref)if(et=!1,r.pendingProps=c=g,tf(t,h))(t.flags&131072)!==0&&(et=!0);else return r.lanes=t.lanes,Un(t,r,h)}return Pu(t,r,l,c,h)}function $g(t,r,l){var c=r.pendingProps,h=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((r.flags&128)!==0){if(c=g!==null?g.baseLanes|l:l,t!==null){for(h=r.child=t.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;r.childLanes=g&~c}else r.childLanes=0,r.child=null;return Ig(t,r,c,l)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ol(r,g!==null?g.cachePool:null),g!==null?qp(r,g):Nu(),Cg(r);else return r.lanes=r.childLanes=536870912,Ig(t,r,g!==null?g.baseLanes|l:l,l)}else g!==null?(Ol(r,g.cachePool),qp(r,g),oi(),r.memoizedState=null):(t!==null&&Ol(r,null),Nu(),oi());return rt(t,r,h,l),r.child}function Ig(t,r,l,c){var h=wu();return h=h===null?null:{parent:Qe._currentValue,pool:h},r.memoizedState={baseLanes:l,cachePool:h},t!==null&&Ol(r,null),Nu(),Cg(r),t!==null&&Pr(t,r,c,!0),null}function Pl(t,r){var l=r.ref;if(l===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(t===null||t.ref!==l)&&(r.flags|=4194816)}}function Pu(t,r,l,c,h){return Gi(r),l=Mu(t,r,l,c,void 0,h),c=Ou(),t!==null&&!et?(Ru(t,r,h),Un(t,r,h)):(_e&&c&&du(r),r.flags|=1,rt(t,r,l,h),r.child)}function Vg(t,r,l,c,h,g){return Gi(r),r.updateQueue=null,l=Ip(r,c,l,h),$p(t),c=Ou(),t!==null&&!et?(Ru(t,r,g),Un(t,r,g)):(_e&&c&&du(r),r.flags|=1,rt(t,r,l,g),r.child)}function Gg(t,r,l,c,h){if(Gi(r),r.stateNode===null){var g=Rs,w=l.contextType;typeof w=="object"&&w!==null&&(g=dt(w)),g=new l(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Yu,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},_u(r),w=l.contextType,g.context=typeof w=="object"&&w!==null?dt(w):Rs,g.state=r.memoizedState,w=l.getDerivedStateFromProps,typeof w=="function"&&(Ku(r,l,w,c),g.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&Yu.enqueueReplaceState(g,g.state,null),ta(r,c,g,h),ea(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){g=r.stateNode;var _=r.memoizedProps,A=Xi(l,_);g.props=A;var D=g.context,K=l.contextType;w=Rs,typeof K=="object"&&K!==null&&(w=dt(K));var X=l.getDerivedStateFromProps;K=typeof X=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,K||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||D!==w)&&Mg(r,g,c,w),ii=!1;var B=r.memoizedState;g.state=B,ta(r,c,g,h),ea(),D=r.memoizedState,_||B!==D||ii?(typeof X=="function"&&(Ku(r,l,X,c),D=r.memoizedState),(A=ii||kg(r,l,A,c,B,D,w))?(K||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=D),g.props=c,g.state=D,g.context=w,c=A):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,Tu(t,r),w=r.memoizedProps,K=Xi(l,w),g.props=K,X=r.pendingProps,B=g.context,D=l.contextType,A=Rs,typeof D=="object"&&D!==null&&(A=dt(D)),_=l.getDerivedStateFromProps,(D=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==X||B!==A)&&Mg(r,g,c,A),ii=!1,B=r.memoizedState,g.state=B,ta(r,c,g,h),ea();var U=r.memoizedState;w!==X||B!==U||ii||t!==null&&t.dependencies!==null&&kl(t.dependencies)?(typeof _=="function"&&(Ku(r,l,_,c),U=r.memoizedState),(K=ii||kg(r,l,K,c,B,U,A)||t!==null&&t.dependencies!==null&&kl(t.dependencies))?(D||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,U,A),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,U,A)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=U),g.props=c,g.state=U,g.context=A,c=K):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),c=!1)}return g=c,Pl(t,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&c?(r.child=Is(r,t.child,null,h),r.child=Is(r,null,l,h)):rt(t,r,l,h),r.memoizedState=g.state,t=r.child):t=Un(t,r,h),t}function Kg(t,r,l,c){return Yr(),r.flags|=256,rt(t,r,l,c),r.child}var Fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qu(t){return{baseLanes:t,cachePool:Rp()}}function Zu(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=en),t}function Yg(t,r,l){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,w;if((w=g)||(w=t!==null&&t.memoizedState===null?!1:(Ze.current&2)!==0),w&&(h=!0,r.flags&=-129),w=(r.flags&32)!==0,r.flags&=-33,t===null){if(_e){if(h?li(r):oi(),_e){var _=$e,A;if(A=_){e:{for(A=_,_=yn;A.nodeType!==8;){if(!_){_=null;break e}if(A=fn(A.nextSibling),A===null){_=null;break e}}_=A}_!==null?(r.memoizedState={dehydrated:_,treeContext:Hi!==null?{id:On,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},A=Ut(18,null,null,0),A.stateNode=_,A.return=r,r.child=A,St=r,$e=null,A=!0):A=!1}A||Ii(r)}if(_=r.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Df(_)?r.lanes=32:r.lanes=536870912,null;Bn(r)}return _=c.children,c=c.fallback,h?(oi(),h=r.mode,_=Fl({mode:"hidden",children:_},h),c=zi(c,h,l,null),_.return=r,c.return=r,_.sibling=c,r.child=_,h=r.child,h.memoizedState=Qu(l),h.childLanes=Zu(t,w,l),r.memoizedState=Fu,c):(li(r),Ju(r,_))}if(A=t.memoizedState,A!==null&&(_=A.dehydrated,_!==null)){if(g)r.flags&256?(li(r),r.flags&=-257,r=Wu(t,r,l)):r.memoizedState!==null?(oi(),r.child=t.child,r.flags|=128,r=null):(oi(),h=c.fallback,_=r.mode,c=Fl({mode:"visible",children:c.children},_),h=zi(h,_,l,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,Is(r,t.child,null,l),c=r.child,c.memoizedState=Qu(l),c.childLanes=Zu(t,w,l),r.memoizedState=Fu,r=h);else if(li(r),Df(_)){if(w=_.nextSibling&&_.nextSibling.dataset,w)var D=w.dgst;w=D,c=Error(s(419)),c.stack="",c.digest=w,Xr({value:c,source:null,stack:null}),r=Wu(t,r,l)}else if(et||Pr(t,r,l,!1),w=(l&t.childLanes)!==0,et||w){if(w=Le,w!==null&&(c=l&-l,c=(c&42)!==0?1:Dc(c),c=(c&(w.suspendedLanes|l))!==0?0:c,c!==0&&c!==A.retryLane))throw A.retryLane=c,Os(t,c),It(w,t,c),Ug;_.data==="$?"||bf(),r=Wu(t,r,l)}else _.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=A.treeContext,$e=fn(_.nextSibling),St=r,_e=!0,$i=null,yn=!1,t!==null&&(Zt[Jt++]=On,Zt[Jt++]=Rn,Zt[Jt++]=Hi,On=t.id,Rn=t.overflow,Hi=r),r=Ju(r,c.children),r.flags|=4096);return r}return h?(oi(),h=c.fallback,_=r.mode,A=t.child,D=A.sibling,c=Mn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,D!==null?h=Mn(D,h):(h=zi(h,_,l,null),h.flags|=2),h.return=r,c.return=r,c.sibling=h,r.child=c,c=h,h=r.child,_=t.child.memoizedState,_===null?_=Qu(l):(A=_.cachePool,A!==null?(D=Qe._currentValue,A=A.parent!==D?{parent:D,pool:D}:A):A=Rp(),_={baseLanes:_.baseLanes|l,cachePool:A}),h.memoizedState=_,h.childLanes=Zu(t,w,l),r.memoizedState=Fu,c):(li(r),l=t.child,t=l.sibling,l=Mn(l,{mode:"visible",children:c.children}),l.return=r,l.sibling=null,t!==null&&(w=r.deletions,w===null?(r.deletions=[t],r.flags|=16):w.push(t)),r.child=l,r.memoizedState=null,l)}function Ju(t,r){return r=Fl({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Fl(t,r){return t=Ut(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Wu(t,r,l){return Is(r,t.child,null,l),t=Ju(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Xg(t,r,l){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),yu(t.return,r,l)}function ef(t,r,l,c,h){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=l,g.tailMode=h)}function Pg(t,r,l){var c=r.pendingProps,h=c.revealOrder,g=c.tail;if(rt(t,r,c.children,l),c=Ze.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Xg(t,l,r);else if(t.tag===19)Xg(t,l,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}switch(J(Ze,c),h){case"forwards":for(l=r.child,h=null;l!==null;)t=l.alternate,t!==null&&Kl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),ef(r,!1,h,l,g);break;case"backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&Kl(t)===null){r.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}ef(r,!0,l,null,g);break;case"together":ef(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Un(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),di|=r.lanes,(l&r.childLanes)===0)if(t!==null){if(Pr(t,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,l=Mn(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Mn(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function tf(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&kl(t)))}function M1(t,r,l){switch(r.tag){case 3:Ne(r,r.stateNode.containerInfo),ni(r,Qe,t.memoizedState.cache),Yr();break;case 27:case 5:Or(r);break;case 4:Ne(r,r.stateNode.containerInfo);break;case 10:ni(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(li(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Yg(t,r,l):(li(r),t=Un(t,r,l),t!==null?t.sibling:null);li(r);break;case 19:var h=(t.flags&128)!==0;if(c=(l&r.childLanes)!==0,c||(Pr(t,r,l,!1),c=(l&r.childLanes)!==0),h){if(c)return Pg(t,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),J(Ze,Ze.current),c)break;return null;case 22:case 23:return r.lanes=0,$g(t,r,l);case 24:ni(r,Qe,t.memoizedState.cache)}return Un(t,r,l)}function Fg(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)et=!0;else{if(!tf(t,l)&&(r.flags&128)===0)return et=!1,M1(t,r,l);et=(t.flags&131072)!==0}else et=!1,_e&&(r.flags&1048576)!==0&&Ep(r,Cl,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var c=r.elementType,h=c._init;if(c=h(c._payload),r.type=c,typeof c=="function")uu(c)?(t=Xi(c,t),r.tag=1,r=Gg(null,r,c,t,l)):(r.tag=0,r=Pu(null,r,c,t,l));else{if(c!=null){if(h=c.$$typeof,h===V){r.tag=11,r=zg(null,r,c,t,l);break e}else if(h===Z){r.tag=14,r=Hg(null,r,c,t,l);break e}}throw r=ee(c)||c,Error(s(306,r,""))}}return r;case 0:return Pu(t,r,r.type,r.pendingProps,l);case 1:return c=r.type,h=Xi(c,r.pendingProps),Gg(t,r,c,h,l);case 3:e:{if(Ne(r,r.stateNode.containerInfo),t===null)throw Error(s(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,Tu(t,r),ta(r,c,null,l);var w=r.memoizedState;if(c=w.cache,ni(r,Qe,c),c!==g.cache&&bu(r,[Qe],l,!0),ea(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Kg(t,r,c,l);break e}else if(c!==h){h=Ft(Error(s(424)),r),Xr(h),r=Kg(t,r,c,l);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for($e=fn(t.firstChild),St=r,_e=!0,$i=null,yn=!0,l=Ng(r,null,c,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Yr(),c===h){r=Un(t,r,l);break e}rt(t,r,c,l)}r=r.child}return r;case 26:return Pl(t,r),t===null?(l=Wm(r.type,null,r.pendingProps,null))?r.memoizedState=l:_e||(l=r.type,t=r.pendingProps,c=co(te.current).createElement(l),c[ht]=r,c[Et]=t,lt(c,l,t),We(c),r.stateNode=c):r.memoizedState=Wm(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Or(r),t===null&&_e&&(c=r.stateNode=Qm(r.type,r.pendingProps,te.current),St=r,yn=!0,h=$e,yi(r.type)?(Bf=h,$e=fn(c.firstChild)):$e=h),rt(t,r,r.pendingProps.children,l),Pl(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&_e&&((h=c=$e)&&(c=sw(c,r.type,r.pendingProps,yn),c!==null?(r.stateNode=c,St=r,$e=fn(c.firstChild),yn=!1,h=!0):h=!1),h||Ii(r)),Or(r),h=r.type,g=r.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,Rf(h,g)?c=null:w!==null&&Rf(h,w)&&(r.flags|=32),r.memoizedState!==null&&(h=Mu(t,r,x1,null,null,l),_a._currentValue=h),Pl(t,r),rt(t,r,c,l),r.child;case 6:return t===null&&_e&&((t=l=$e)&&(l=rw(l,r.pendingProps,yn),l!==null?(r.stateNode=l,St=r,$e=null,t=!0):t=!1),t||Ii(r)),null;case 13:return Yg(t,r,l);case 4:return Ne(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=Is(r,null,c,l):rt(t,r,c,l),r.child;case 11:return zg(t,r,r.type,r.pendingProps,l);case 7:return rt(t,r,r.pendingProps,l),r.child;case 8:return rt(t,r,r.pendingProps.children,l),r.child;case 12:return rt(t,r,r.pendingProps.children,l),r.child;case 10:return c=r.pendingProps,ni(r,r.type,c.value),rt(t,r,c.children,l),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,Gi(r),h=dt(h),c=c(h),r.flags|=1,rt(t,r,c,l),r.child;case 14:return Hg(t,r,r.type,r.pendingProps,l);case 15:return qg(t,r,r.type,r.pendingProps,l);case 19:return Pg(t,r,l);case 31:return c=r.pendingProps,l=r.mode,c={mode:c.mode,children:c.children},t===null?(l=Fl(c,l),l.ref=r.ref,r.child=l,l.return=r,r=l):(l=Mn(t.child,c),l.ref=r.ref,r.child=l,l.return=r,r=l),r;case 22:return $g(t,r,l);case 24:return Gi(r),c=dt(Qe),t===null?(h=wu(),h===null&&(h=Le,g=vu(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),r.memoizedState={parent:c,cache:h},_u(r),ni(r,Qe,h)):((t.lanes&l)!==0&&(Tu(t,r),ta(r,null,null,l),ea()),h=t.memoizedState,g=r.memoizedState,h.parent!==c?(h={parent:c,cache:c},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),ni(r,Qe,c)):(c=g.cache,ni(r,Qe,c),c!==h.cache&&bu(r,[Qe],l,!0))),rt(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function zn(t){t.flags|=4}function Qg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!sy(r)){if(r=Wt.current,r!==null&&((Se&4194048)===Se?bn!==null:(Se&62914560)!==Se&&(Se&536870912)===0||r!==bn))throw Jr=xu,Lp;t.flags|=8192}}function Ql(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?mn():536870912,t.lanes|=r,Ys|=r)}function oa(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Ue(t){var r=t.alternate!==null&&t.alternate.child===t.child,l=0,c=0;if(r)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=l,r}function O1(t,r,l){var c=r.pendingProps;switch(pu(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(r),null;case 1:return Ue(r),null;case 3:return l=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),jn(Qe),Gt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Kr(r)?zn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Cp())),Ue(r),null;case 26:return l=r.memoizedState,t===null?(zn(r),l!==null?(Ue(r),Qg(r,l)):(Ue(r),r.flags&=-16777217)):l?l!==t.memoizedState?(zn(r),Ue(r),Qg(r,l)):(Ue(r),r.flags&=-16777217):(t.memoizedProps!==c&&zn(r),Ue(r),r.flags&=-16777217),null;case 27:En(r),l=te.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}t=ae.current,Kr(r)?Ap(r):(t=Qm(h,c,l),r.stateNode=t,zn(r))}return Ue(r),null;case 5:if(En(r),l=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}if(t=ae.current,Kr(r))Ap(r);else{switch(h=co(te.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof c.is=="string"?h.createElement("select",{is:c.is}):h.createElement("select"),c.multiple?t.multiple=!0:c.size&&(t.size=c.size);break;default:t=typeof c.is=="string"?h.createElement(l,{is:c.is}):h.createElement(l)}}t[ht]=r,t[Et]=c;e:for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break e;for(;h.sibling===null;){if(h.return===null||h.return===r)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}r.stateNode=t;e:switch(lt(t,l,c),l){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&zn(r)}}return Ue(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(t=te.current,Kr(r)){if(t=r.stateNode,l=r.memoizedProps,c=null,h=St,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[ht]=r,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||Vm(t.nodeValue,l)),t||Ii(r)}else t=co(t).createTextNode(c),t[ht]=r,r.stateNode=t}return Ue(r),null;case 13:if(c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Kr(r),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[ht]=r}else Yr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ue(r),h=!1}else h=Cp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bn(r),r):(Bn(r),null)}if(Bn(r),(r.flags&128)!==0)return r.lanes=l,r;if(l=c!==null,t=t!==null&&t.memoizedState!==null,l){c=r.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool);var g=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==h&&(c.flags|=2048)}return l!==t&&l&&(r.child.flags|=8192),Ql(r,r.updateQueue),Ue(r),null;case 4:return Gt(),t===null&&Nf(r.stateNode.containerInfo),Ue(r),null;case 10:return jn(r.type),Ue(r),null;case 19:if(W(Ze),h=r.memoizedState,h===null)return Ue(r),null;if(c=(r.flags&128)!==0,g=h.rendering,g===null)if(c)oa(h,!1);else{if(Ie!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(g=Kl(t),g!==null){for(r.flags|=128,oa(h,!1),t=g.updateQueue,r.updateQueue=t,Ql(r,t),r.subtreeFlags=0,t=l,l=r.child;l!==null;)Tp(l,t),l=l.sibling;return J(Ze,Ze.current&1|2),r.child}t=t.sibling}h.tail!==null&&Kt()>Wl&&(r.flags|=128,c=!0,oa(h,!1),r.lanes=4194304)}else{if(!c)if(t=Kl(g),t!==null){if(r.flags|=128,c=!0,t=t.updateQueue,r.updateQueue=t,Ql(r,t),oa(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!_e)return Ue(r),null}else 2*Kt()-h.renderingStartTime>Wl&&l!==536870912&&(r.flags|=128,c=!0,oa(h,!1),r.lanes=4194304);h.isBackwards?(g.sibling=r.child,r.child=g):(t=h.last,t!==null?t.sibling=g:r.child=g,h.last=g)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Kt(),r.sibling=null,t=Ze.current,J(Ze,c?t&1|2:t&1),r):(Ue(r),null);case 22:case 23:return Bn(r),Cu(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(l&536870912)!==0&&(r.flags&128)===0&&(Ue(r),r.subtreeFlags&6&&(r.flags|=8192)):Ue(r),l=r.updateQueue,l!==null&&Ql(r,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==l&&(r.flags|=2048),t!==null&&W(Ki),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),jn(Qe),Ue(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function R1(t,r){switch(pu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return jn(Qe),Gt(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return En(r),null;case 13:if(Bn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Yr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return W(Ze),null;case 4:return Gt(),null;case 10:return jn(r.type),null;case 22:case 23:return Bn(r),Cu(),t!==null&&W(Ki),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return jn(Qe),null;case 25:return null;default:return null}}function Zg(t,r){switch(pu(r),r.tag){case 3:jn(Qe),Gt();break;case 26:case 27:case 5:En(r);break;case 4:Gt();break;case 13:Bn(r);break;case 19:W(Ze);break;case 10:jn(r.type);break;case 22:case 23:Bn(r),Cu(),t!==null&&W(Ki);break;case 24:jn(Qe)}}function ca(t,r){try{var l=r.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var h=c.next;l=h;do{if((l.tag&t)===t){c=void 0;var g=l.create,w=l.inst;c=g(),w.destroy=c}l=l.next}while(l!==h)}}catch(_){Oe(r,r.return,_)}}function ci(t,r,l){try{var c=r.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var g=h.next;c=g;do{if((c.tag&t)===t){var w=c.inst,_=w.destroy;if(_!==void 0){w.destroy=void 0,h=r;var A=l,D=_;try{D()}catch(K){Oe(h,A,K)}}}c=c.next}while(c!==g)}}catch(K){Oe(r,r.return,K)}}function Jg(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{Hp(r,l)}catch(c){Oe(t,t.return,c)}}}function Wg(t,r,l){l.props=Xi(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){Oe(t,r,c)}}function ua(t,r){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(h){Oe(t,r,h)}}function vn(t,r){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(h){Oe(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Oe(t,r,h)}else l.current=null}function em(t){var r=t.type,l=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(h){Oe(t,t.return,h)}}function nf(t,r,l){try{var c=t.stateNode;W1(c,t.type,l,r),c[Et]=r}catch(h){Oe(t,t.return,h)}}function tm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&yi(t.type)||t.tag===4}function sf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||tm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&yi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rf(t,r,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(t),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=oo));else if(c!==4&&(c===27&&yi(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(rf(t,r,l),t=t.sibling;t!==null;)rf(t,r,l),t=t.sibling}function Zl(t,r,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?l.insertBefore(t,r):l.appendChild(t);else if(c!==4&&(c===27&&yi(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Zl(t,r,l),t=t.sibling;t!==null;)Zl(t,r,l),t=t.sibling}function nm(t){var r=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);lt(r,c,l),r[ht]=t,r[Et]=l}catch(g){Oe(t,t.return,g)}}var Hn=!1,Ge=!1,af=!1,im=typeof WeakSet=="function"?WeakSet:Set,tt=null;function L1(t,r){if(t=t.containerInfo,Mf=mo,t=pp(t),iu(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var w=0,_=-1,A=-1,D=0,K=0,X=t,B=null;t:for(;;){for(var U;X!==l||h!==0&&X.nodeType!==3||(_=w+h),X!==g||c!==0&&X.nodeType!==3||(A=w+c),X.nodeType===3&&(w+=X.nodeValue.length),(U=X.firstChild)!==null;)B=X,X=U;for(;;){if(X===t)break t;if(B===l&&++D===h&&(_=w),B===g&&++K===c&&(A=w),(U=X.nextSibling)!==null)break;X=B,B=X.parentNode}X=U}l=_===-1||A===-1?null:{start:_,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Of={focusedElem:t,selectionRange:l},mo=!1,tt=r;tt!==null;)if(r=tt,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,tt=t;else for(;tt!==null;){switch(r=tt,g=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,l=r,h=g.memoizedProps,g=g.memoizedState,c=l.stateNode;try{var fe=Xi(l.type,h,l.elementType===l.type);t=c.getSnapshotBeforeUpdate(fe,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(oe){Oe(l,l.return,oe)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)jf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":jf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=r.sibling,t!==null){t.return=r.return,tt=t;break}tt=r.return}}function sm(t,r,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:ui(t,l),c&4&&ca(5,l);break;case 1:if(ui(t,l),c&4)if(t=l.stateNode,r===null)try{t.componentDidMount()}catch(w){Oe(l,l.return,w)}else{var h=Xi(l.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Oe(l,l.return,w)}}c&64&&Jg(l),c&512&&ua(l,l.return);break;case 3:if(ui(t,l),c&64&&(t=l.updateQueue,t!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Hp(t,r)}catch(w){Oe(l,l.return,w)}}break;case 27:r===null&&c&4&&nm(l);case 26:case 5:ui(t,l),r===null&&c&4&&em(l),c&512&&ua(l,l.return);break;case 12:ui(t,l);break;case 13:ui(t,l),c&4&&lm(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=I1.bind(null,l),aw(t,l))));break;case 22:if(c=l.memoizedState!==null||Hn,!c){r=r!==null&&r.memoizedState!==null||Ge,h=Hn;var g=Ge;Hn=c,(Ge=r)&&!g?fi(t,l,(l.subtreeFlags&8772)!==0):ui(t,l),Hn=h,Ge=g}break;case 30:break;default:ui(t,l)}}function rm(t){var r=t.alternate;r!==null&&(t.alternate=null,rm(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&zc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var je=null,Ct=!1;function qn(t,r,l){for(l=l.child;l!==null;)am(t,r,l),l=l.sibling}function am(t,r,l){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Ri,l)}catch{}switch(l.tag){case 26:Ge||vn(l,r),qn(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ge||vn(l,r);var c=je,h=Ct;yi(l.type)&&(je=l.stateNode,Ct=!1),qn(t,r,l),va(l.stateNode),je=c,Ct=h;break;case 5:Ge||vn(l,r);case 6:if(c=je,h=Ct,je=null,qn(t,r,l),je=c,Ct=h,je!==null)if(Ct)try{(je.nodeType===9?je.body:je.nodeName==="HTML"?je.ownerDocument.body:je).removeChild(l.stateNode)}catch(g){Oe(l,r,g)}else try{je.removeChild(l.stateNode)}catch(g){Oe(l,r,g)}break;case 18:je!==null&&(Ct?(t=je,Pm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Na(t)):Pm(je,l.stateNode));break;case 4:c=je,h=Ct,je=l.stateNode.containerInfo,Ct=!0,qn(t,r,l),je=c,Ct=h;break;case 0:case 11:case 14:case 15:Ge||ci(2,l,r),Ge||ci(4,l,r),qn(t,r,l);break;case 1:Ge||(vn(l,r),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Wg(l,r,c)),qn(t,r,l);break;case 21:qn(t,r,l);break;case 22:Ge=(c=Ge)||l.memoizedState!==null,qn(t,r,l),Ge=c;break;default:qn(t,r,l)}}function lm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Na(t)}catch(l){Oe(r,r.return,l)}}function j1(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new im),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new im),r;default:throw Error(s(435,t.tag))}}function lf(t,r){var l=j1(t);r.forEach(function(c){var h=V1.bind(null,t,c);l.has(c)||(l.add(c),c.then(h,h))})}function zt(t,r){var l=r.deletions;if(l!==null)for(var c=0;c<l.length;c++){var h=l[c],g=t,w=r,_=w;e:for(;_!==null;){switch(_.tag){case 27:if(yi(_.type)){je=_.stateNode,Ct=!1;break e}break;case 5:je=_.stateNode,Ct=!1;break e;case 3:case 4:je=_.stateNode.containerInfo,Ct=!0;break e}_=_.return}if(je===null)throw Error(s(160));am(g,w,h),je=null,Ct=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)om(r,t),r=r.sibling}var un=null;function om(t,r){var l=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:zt(r,t),Ht(t),c&4&&(ci(3,t,t.return),ca(3,t),ci(5,t,t.return));break;case 1:zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),c&64&&Hn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var h=un;if(zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),c&4){var g=l!==null?l.memoizedState:null;if(c=t.memoizedState,l===null)if(c===null)if(t.stateNode===null){e:{c=t.type,l=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[jr]||g[ht]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),lt(g,c,l),g[ht]=t,We(g),c=g;break e;case"link":var w=ny("link","href",h).get(c+(l.href||""));if(w){for(var _=0;_<w.length;_++)if(g=w[_],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){w.splice(_,1);break t}}g=h.createElement(c),lt(g,c,l),h.head.appendChild(g);break;case"meta":if(w=ny("meta","content",h).get(c+(l.content||""))){for(_=0;_<w.length;_++)if(g=w[_],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){w.splice(_,1);break t}}g=h.createElement(c),lt(g,c,l),h.head.appendChild(g);break;default:throw Error(s(468,c))}g[ht]=t,We(g),c=g}t.stateNode=c}else iy(h,t.type,t.stateNode);else t.stateNode=ty(h,c,t.memoizedProps);else g!==c?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,c===null?iy(h,t.type,t.stateNode):ty(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&nf(t,t.memoizedProps,l.memoizedProps)}break;case 27:zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),l!==null&&c&4&&nf(t,t.memoizedProps,l.memoizedProps);break;case 5:if(zt(r,t),Ht(t),c&512&&(Ge||l===null||vn(l,l.return)),t.flags&32){h=t.stateNode;try{Ts(h,"")}catch(U){Oe(t,t.return,U)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,nf(t,h,l!==null?l.memoizedProps:h)),c&1024&&(af=!0);break;case 6:if(zt(r,t),Ht(t),c&4){if(t.stateNode===null)throw Error(s(162));c=t.memoizedProps,l=t.stateNode;try{l.nodeValue=c}catch(U){Oe(t,t.return,U)}}break;case 3:if(ho=null,h=un,un=uo(r.containerInfo),zt(r,t),un=h,Ht(t),c&4&&l!==null&&l.memoizedState.isDehydrated)try{Na(r.containerInfo)}catch(U){Oe(t,t.return,U)}af&&(af=!1,cm(t));break;case 4:c=un,un=uo(t.stateNode.containerInfo),zt(r,t),Ht(t),un=c;break;case 12:zt(r,t),Ht(t);break;case 13:zt(r,t),Ht(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(df=Kt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 22:h=t.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,D=Hn,K=Ge;if(Hn=D||h,Ge=K||A,zt(r,t),Ge=K,Hn=D,Ht(t),c&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||A||Hn||Ge||Pi(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){A=l=r;try{if(g=A.stateNode,h)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{_=A.stateNode;var X=A.memoizedProps.style,B=X!=null&&X.hasOwnProperty("display")?X.display:null;_.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(U){Oe(A,A.return,U)}}}else if(r.tag===6){if(l===null){A=r;try{A.stateNode.nodeValue=h?"":A.memoizedProps}catch(U){Oe(A,A.return,U)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,lf(t,l))));break;case 19:zt(r,t),Ht(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 30:break;case 21:break;default:zt(r,t),Ht(t)}}function Ht(t){var r=t.flags;if(r&2){try{for(var l,c=t.return;c!==null;){if(tm(c)){l=c;break}c=c.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var h=l.stateNode,g=sf(t);Zl(t,g,h);break;case 5:var w=l.stateNode;l.flags&32&&(Ts(w,""),l.flags&=-33);var _=sf(t);Zl(t,_,w);break;case 3:case 4:var A=l.stateNode.containerInfo,D=sf(t);rf(t,D,A);break;default:throw Error(s(161))}}catch(K){Oe(t,t.return,K)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function cm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;cm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function ui(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)sm(t,r.alternate,r),r=r.sibling}function Pi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:ci(4,r,r.return),Pi(r);break;case 1:vn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Wg(r,r.return,l),Pi(r);break;case 27:va(r.stateNode);case 26:case 5:vn(r,r.return),Pi(r);break;case 22:r.memoizedState===null&&Pi(r);break;case 30:Pi(r);break;default:Pi(r)}t=t.sibling}}function fi(t,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,h=t,g=r,w=g.flags;switch(g.tag){case 0:case 11:case 15:fi(h,g,l),ca(4,g);break;case 1:if(fi(h,g,l),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){Oe(c,c.return,D)}if(c=g,h=c.updateQueue,h!==null){var _=c.stateNode;try{var A=h.shared.hiddenCallbacks;if(A!==null)for(h.shared.hiddenCallbacks=null,h=0;h<A.length;h++)zp(A[h],_)}catch(D){Oe(c,c.return,D)}}l&&w&64&&Jg(g),ua(g,g.return);break;case 27:nm(g);case 26:case 5:fi(h,g,l),l&&c===null&&w&4&&em(g),ua(g,g.return);break;case 12:fi(h,g,l);break;case 13:fi(h,g,l),l&&w&4&&lm(h,g);break;case 22:g.memoizedState===null&&fi(h,g,l),ua(g,g.return);break;case 30:break;default:fi(h,g,l)}r=r.sibling}}function of(t,r){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Fr(l))}function cf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Fr(t))}function Sn(t,r,l,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)um(t,r,l,c),r=r.sibling}function um(t,r,l,c){var h=r.flags;switch(r.tag){case 0:case 11:case 15:Sn(t,r,l,c),h&2048&&ca(9,r);break;case 1:Sn(t,r,l,c);break;case 3:Sn(t,r,l,c),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Fr(t)));break;case 12:if(h&2048){Sn(t,r,l,c),t=r.stateNode;try{var g=r.memoizedProps,w=g.id,_=g.onPostCommit;typeof _=="function"&&_(w,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Oe(r,r.return,A)}}else Sn(t,r,l,c);break;case 13:Sn(t,r,l,c);break;case 23:break;case 22:g=r.stateNode,w=r.alternate,r.memoizedState!==null?g._visibility&2?Sn(t,r,l,c):fa(t,r):g._visibility&2?Sn(t,r,l,c):(g._visibility|=2,Vs(t,r,l,c,(r.subtreeFlags&10256)!==0)),h&2048&&of(w,r);break;case 24:Sn(t,r,l,c),h&2048&&cf(r.alternate,r);break;default:Sn(t,r,l,c)}}function Vs(t,r,l,c,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var g=t,w=r,_=l,A=c,D=w.flags;switch(w.tag){case 0:case 11:case 15:Vs(g,w,_,A,h),ca(8,w);break;case 23:break;case 22:var K=w.stateNode;w.memoizedState!==null?K._visibility&2?Vs(g,w,_,A,h):fa(g,w):(K._visibility|=2,Vs(g,w,_,A,h)),h&&D&2048&&of(w.alternate,w);break;case 24:Vs(g,w,_,A,h),h&&D&2048&&cf(w.alternate,w);break;default:Vs(g,w,_,A,h)}r=r.sibling}}function fa(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=t,c=r,h=c.flags;switch(c.tag){case 22:fa(l,c),h&2048&&of(c.alternate,c);break;case 24:fa(l,c),h&2048&&cf(c.alternate,c);break;default:fa(l,c)}r=r.sibling}}var ha=8192;function Gs(t){if(t.subtreeFlags&ha)for(t=t.child;t!==null;)fm(t),t=t.sibling}function fm(t){switch(t.tag){case 26:Gs(t),t.flags&ha&&t.memoizedState!==null&&vw(un,t.memoizedState,t.memoizedProps);break;case 5:Gs(t);break;case 3:case 4:var r=un;un=uo(t.stateNode.containerInfo),Gs(t),un=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ha,ha=16777216,Gs(t),ha=r):Gs(t));break;default:Gs(t)}}function hm(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function da(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var c=r[l];tt=c,pm(c,t)}hm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)dm(t),t=t.sibling}function dm(t){switch(t.tag){case 0:case 11:case 15:da(t),t.flags&2048&&ci(9,t,t.return);break;case 3:da(t);break;case 12:da(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Jl(t)):da(t);break;default:da(t)}}function Jl(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var c=r[l];tt=c,pm(c,t)}hm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ci(8,r,r.return),Jl(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Jl(r));break;default:Jl(r)}t=t.sibling}}function pm(t,r){for(;tt!==null;){var l=tt;switch(l.tag){case 0:case 11:case 15:ci(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Fr(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,tt=c;else e:for(l=t;tt!==null;){c=tt;var h=c.sibling,g=c.return;if(rm(c),c===l){tt=null;break e}if(h!==null){h.return=g,tt=h;break e}tt=g}}}var D1={getCacheForType:function(t){var r=dt(Qe),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l}},B1=typeof WeakMap=="function"?WeakMap:Map,Te=0,Le=null,me=null,Se=0,Ee=0,qt=null,hi=!1,Ks=!1,uf=!1,$n=0,Ie=0,di=0,Fi=0,ff=0,en=0,Ys=0,pa=null,kt=null,hf=!1,df=0,Wl=1/0,eo=null,pi=null,at=0,gi=null,Xs=null,Ps=0,pf=0,gf=null,gm=null,ga=0,mf=null;function $t(){if((Te&2)!==0&&Se!==0)return Se&-Se;if(z.T!==null){var t=Ds;return t!==0?t:_f()}return Od()}function mm(){en===0&&(en=(Se&536870912)===0||_e?Wn():536870912);var t=Wt.current;return t!==null&&(t.flags|=32),en}function It(t,r,l){(t===Le&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)&&(Fs(t,0),mi(t,Se,en,!1)),Lr(t,l),((Te&2)===0||t!==Le)&&(t===Le&&((Te&2)===0&&(Fi|=l),Ie===4&&mi(t,Se,en,!1)),wn(t))}function ym(t,r,l){if((Te&6)!==0)throw Error(s(327));var c=!l&&(r&124)===0&&(r&t.expiredLanes)===0||Jn(t,r),h=c?H1(t,r):vf(t,r,!0),g=c;do{if(h===0){Ks&&!c&&mi(t,r,0,!1);break}else{if(l=t.current.alternate,g&&!U1(l)){h=vf(t,r,!1),g=!1;continue}if(h===2){if(g=r,t.errorRecoveryDisabledLanes&g)var w=0;else w=t.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){r=w;e:{var _=t;h=pa;var A=_.current.memoizedState.isDehydrated;if(A&&(Fs(_,w).flags|=256),w=vf(_,w,!1),w!==2){if(uf&&!A){_.errorRecoveryDisabledLanes|=g,Fi|=g,h=4;break e}g=kt,kt=h,g!==null&&(kt===null?kt=g:kt.push.apply(kt,g))}h=w}if(g=!1,h!==2)continue}}if(h===1){Fs(t,0),mi(t,r,0,!0);break}e:{switch(c=t,g=h,g){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:mi(c,r,en,!hi);break e;case 2:kt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=df+300-Kt(),10<h)){if(mi(c,r,en,!hi),ms(c,0,!0)!==0)break e;c.timeoutHandle=Ym(bm.bind(null,c,l,kt,eo,hf,r,en,Fi,Ys,hi,g,2,-0,0),h);break e}bm(c,l,kt,eo,hf,r,en,Fi,Ys,hi,g,0,-0,0)}}break}while(!0);wn(t)}function bm(t,r,l,c,h,g,w,_,A,D,K,X,B,U){if(t.timeoutHandle=-1,X=r.subtreeFlags,(X&8192||(X&16785408)===16785408)&&(xa={stylesheets:null,count:0,unsuspend:bw},fm(r),X=Sw(),X!==null)){t.cancelPendingCommit=X(Em.bind(null,t,r,g,l,c,h,w,_,A,K,1,B,U)),mi(t,g,w,!D);return}Em(t,r,g,l,c,h,w,_,A)}function U1(t){for(var r=t;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var h=l[c],g=h.getSnapshot;h=h.value;try{if(!Bt(g(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function mi(t,r,l,c){r&=~ff,r&=~Fi,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var h=r;0<h;){var g=31-vt(h),w=1<<g;c[g]=-1,h&=~w}l!==0&&kd(t,l,r)}function to(){return(Te&6)===0?(ma(0),!1):!0}function yf(){if(me!==null){if(Ee===0)var t=me.return;else t=me,Ln=Vi=null,Lu(t),$s=null,aa=0,t=me;for(;t!==null;)Zg(t.alternate,t),t=t.return;me=null}}function Fs(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,tw(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),yf(),Le=t,me=l=Mn(t.current,null),Se=r,Ee=0,qt=null,hi=!1,Ks=Jn(t,r),uf=!1,Ys=en=ff=Fi=di=Ie=0,kt=pa=null,hf=!1,(r&8)!==0&&(r|=r&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=r;0<c;){var h=31-vt(c),g=1<<h;r|=t[h],c&=~g}return $n=r,_l(),l}function vm(t,r){pe=null,z.H=Il,r===Zr||r===Rl?(r=Bp(),Ee=3):r===Lp?(r=Bp(),Ee=4):Ee=r===Ug?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,qt=r,me===null&&(Ie=1,Xl(t,Ft(r,t.current)))}function Sm(){var t=z.H;return z.H=Il,t===null?Il:t}function wm(){var t=z.A;return z.A=D1,t}function bf(){Ie=4,hi||(Se&4194048)!==Se&&Wt.current!==null||(Ks=!0),(di&134217727)===0&&(Fi&134217727)===0||Le===null||mi(Le,Se,en,!1)}function vf(t,r,l){var c=Te;Te|=2;var h=Sm(),g=wm();(Le!==t||Se!==r)&&(eo=null,Fs(t,r)),r=!1;var w=Ie;e:do try{if(Ee!==0&&me!==null){var _=me,A=qt;switch(Ee){case 8:yf(),w=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(r=!0);var D=Ee;if(Ee=0,qt=null,Qs(t,_,A,D),l&&Ks){w=0;break e}break;default:D=Ee,Ee=0,qt=null,Qs(t,_,A,D)}}z1(),w=Ie;break}catch(K){vm(t,K)}while(!0);return r&&t.shellSuspendCounter++,Ln=Vi=null,Te=c,z.H=h,z.A=g,me===null&&(Le=null,Se=0,_l()),w}function z1(){for(;me!==null;)xm(me)}function H1(t,r){var l=Te;Te|=2;var c=Sm(),h=wm();Le!==t||Se!==r?(eo=null,Wl=Kt()+500,Fs(t,r)):Ks=Jn(t,r);e:do try{if(Ee!==0&&me!==null){r=me;var g=qt;t:switch(Ee){case 1:Ee=0,qt=null,Qs(t,r,g,1);break;case 2:case 9:if(jp(g)){Ee=0,qt=null,_m(r);break}r=function(){Ee!==2&&Ee!==9||Le!==t||(Ee=7),wn(t)},g.then(r,r);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:jp(g)?(Ee=0,qt=null,_m(r)):(Ee=0,qt=null,Qs(t,r,g,7));break;case 5:var w=null;switch(me.tag){case 26:w=me.memoizedState;case 5:case 27:var _=me;if(!w||sy(w)){Ee=0,qt=null;var A=_.sibling;if(A!==null)me=A;else{var D=_.return;D!==null?(me=D,no(D)):me=null}break t}}Ee=0,qt=null,Qs(t,r,g,5);break;case 6:Ee=0,qt=null,Qs(t,r,g,6);break;case 8:yf(),Ie=6;break e;default:throw Error(s(462))}}q1();break}catch(K){vm(t,K)}while(!0);return Ln=Vi=null,z.H=c,z.A=h,Te=l,me!==null?0:(Le=null,Se=0,_l(),Ie)}function q1(){for(;me!==null&&!ul();)xm(me)}function xm(t){var r=Fg(t.alternate,t,$n);t.memoizedProps=t.pendingProps,r===null?no(t):me=r}function _m(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=Vg(l,r,r.pendingProps,r.type,void 0,Se);break;case 11:r=Vg(l,r,r.pendingProps,r.type.render,r.ref,Se);break;case 5:Lu(r);default:Zg(l,r),r=me=Tp(r,$n),r=Fg(l,r,$n)}t.memoizedProps=t.pendingProps,r===null?no(t):me=r}function Qs(t,r,l,c){Ln=Vi=null,Lu(r),$s=null,aa=0;var h=r.return;try{if(k1(t,h,r,l,Se)){Ie=1,Xl(t,Ft(l,t.current)),me=null;return}}catch(g){if(h!==null)throw me=h,g;Ie=1,Xl(t,Ft(l,t.current)),me=null;return}r.flags&32768?(_e||c===1?t=!0:Ks||(Se&536870912)!==0?t=!1:(hi=t=!0,(c===2||c===9||c===3||c===6)&&(c=Wt.current,c!==null&&c.tag===13&&(c.flags|=16384))),Tm(r,t)):no(r)}function no(t){var r=t;do{if((r.flags&32768)!==0){Tm(r,hi);return}t=r.return;var l=O1(r.alternate,r,$n);if(l!==null){me=l;return}if(r=r.sibling,r!==null){me=r;return}me=r=t}while(r!==null);Ie===0&&(Ie=5)}function Tm(t,r){do{var l=R1(t.alternate,t);if(l!==null){l.flags&=32767,me=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){me=t;return}me=t=l}while(t!==null);Ie=6,me=null}function Em(t,r,l,c,h,g,w,_,A){t.cancelPendingCommit=null;do io();while(at!==0);if((Te&6)!==0)throw Error(s(327));if(r!==null){if(r===t.current)throw Error(s(177));if(g=r.lanes|r.childLanes,g|=ou,bS(t,l,g,w,_,A),t===Le&&(me=Le=null,Se=0),Xs=r,gi=t,Ps=l,pf=g,gf=h,gm=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,G1(gs,function(){return Mm(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=z.T,z.T=null,h=Q.p,Q.p=2,w=Te,Te|=4;try{L1(t,r,l)}finally{Te=w,Q.p=h,z.T=c}}at=1,Am(),Nm(),Cm()}}function Am(){if(at===1){at=0;var t=gi,r=Xs,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{om(r,t);var g=Of,w=pp(t.containerInfo),_=g.focusedElem,A=g.selectionRange;if(w!==_&&_&&_.ownerDocument&&dp(_.ownerDocument.documentElement,_)){if(A!==null&&iu(_)){var D=A.start,K=A.end;if(K===void 0&&(K=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(K,_.value.length);else{var X=_.ownerDocument||document,B=X&&X.defaultView||window;if(B.getSelection){var U=B.getSelection(),fe=_.textContent.length,oe=Math.min(A.start,fe),Me=A.end===void 0?oe:Math.min(A.end,fe);!U.extend&&oe>Me&&(w=Me,Me=oe,oe=w);var O=hp(_,oe),M=hp(_,Me);if(O&&M&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==M.node||U.focusOffset!==M.offset)){var j=X.createRange();j.setStart(O.node,O.offset),U.removeAllRanges(),oe>Me?(U.addRange(j),U.extend(M.node,M.offset)):(j.setEnd(M.node,M.offset),U.addRange(j))}}}}for(X=[],U=_;U=U.parentNode;)U.nodeType===1&&X.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<X.length;_++){var Y=X[_];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}mo=!!Mf,Of=Mf=null}finally{Te=h,Q.p=c,z.T=l}}t.current=r,at=2}}function Nm(){if(at===2){at=0;var t=gi,r=Xs,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{sm(t,r.alternate,r)}finally{Te=h,Q.p=c,z.T=l}}at=3}}function Cm(){if(at===4||at===3){at=0,kc();var t=gi,r=Xs,l=Ps,c=gm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?at=5:(at=0,Xs=gi=null,km(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(pi=null),Bc(l),r=r.stateNode,ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Ri,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=z.T,h=Q.p,Q.p=2,z.T=null;try{for(var g=t.onRecoverableError,w=0;w<c.length;w++){var _=c[w];g(_.value,{componentStack:_.stack})}}finally{z.T=r,Q.p=h}}(Ps&3)!==0&&io(),wn(t),h=t.pendingLanes,(l&4194090)!==0&&(h&42)!==0?t===mf?ga++:(ga=0,mf=t):ga=0,ma(0)}}function km(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Fr(r)))}function io(t){return Am(),Nm(),Cm(),Mm()}function Mm(){if(at!==5)return!1;var t=gi,r=pf;pf=0;var l=Bc(Ps),c=z.T,h=Q.p;try{Q.p=32>l?32:l,z.T=null,l=gf,gf=null;var g=gi,w=Ps;if(at=0,Xs=gi=null,Ps=0,(Te&6)!==0)throw Error(s(331));var _=Te;if(Te|=4,dm(g.current),um(g,g.current,w,l),Te=_,ma(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Ri,g)}catch{}return!0}finally{Q.p=h,z.T=c,km(t,r)}}function Om(t,r,l){r=Ft(l,r),r=Xu(t.stateNode,r,2),t=ri(t,r,2),t!==null&&(Lr(t,2),wn(t))}function Oe(t,r,l){if(t.tag===3)Om(t,t,l);else for(;r!==null;){if(r.tag===3){Om(r,t,l);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(pi===null||!pi.has(c))){t=Ft(l,t),l=Dg(2),c=ri(r,l,2),c!==null&&(Bg(l,c,r,t),Lr(c,2),wn(c));break}}r=r.return}}function Sf(t,r,l){var c=t.pingCache;if(c===null){c=t.pingCache=new B1;var h=new Set;c.set(r,h)}else h=c.get(r),h===void 0&&(h=new Set,c.set(r,h));h.has(l)||(uf=!0,h.add(l),t=$1.bind(null,t,r,l),r.then(t,t))}function $1(t,r,l){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Le===t&&(Se&l)===l&&(Ie===4||Ie===3&&(Se&62914560)===Se&&300>Kt()-df?(Te&2)===0&&Fs(t,0):ff|=l,Ys===Se&&(Ys=0)),wn(t)}function Rm(t,r){r===0&&(r=mn()),t=Os(t,r),t!==null&&(Lr(t,r),wn(t))}function I1(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),Rm(t,l)}function V1(t,r){var l=0;switch(t.tag){case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),Rm(t,l)}function G1(t,r){return ds(t,r)}var so=null,Zs=null,wf=!1,ro=!1,xf=!1,Qi=0;function wn(t){t!==Zs&&t.next===null&&(Zs===null?so=Zs=t:Zs=Zs.next=t),ro=!0,wf||(wf=!0,Y1())}function ma(t,r){if(!xf&&ro){xf=!0;do for(var l=!1,c=so;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var w=c.suspendedLanes,_=c.pingedLanes;g=(1<<31-vt(42|t)+1)-1,g&=h&~(w&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,Bm(c,g))}else g=Se,g=ms(c,c===Le?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Jn(c,g)||(l=!0,Bm(c,g));c=c.next}while(l);xf=!1}}function K1(){Lm()}function Lm(){ro=wf=!1;var t=0;Qi!==0&&(ew()&&(t=Qi),Qi=0);for(var r=Kt(),l=null,c=so;c!==null;){var h=c.next,g=jm(c,r);g===0?(c.next=null,l===null?so=h:l.next=h,h===null&&(Zs=l)):(l=c,(t!==0||(g&3)!==0)&&(ro=!0)),c=h}ma(t)}function jm(t,r){for(var l=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var w=31-vt(g),_=1<<w,A=h[w];A===-1?((_&l)===0||(_&c)!==0)&&(h[w]=ue(_,r)):A<=r&&(t.expiredLanes|=_),g&=~_}if(r=Le,l=Se,l=ms(t,t===r?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===r&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&bt(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Jn(t,l)){if(r=l&-l,r===t.callbackPriority)return r;switch(c!==null&&bt(c),Bc(l)){case 2:case 8:l=Oi;break;case 32:l=gs;break;case 268435456:l=fl;break;default:l=gs}return c=Dm.bind(null,t),l=ds(l,c),t.callbackPriority=r,t.callbackNode=l,r}return c!==null&&c!==null&&bt(c),t.callbackPriority=2,t.callbackNode=null,2}function Dm(t,r){if(at!==0&&at!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(io()&&t.callbackNode!==l)return null;var c=Se;return c=ms(t,t===Le?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(ym(t,c,r),jm(t,Kt()),t.callbackNode!=null&&t.callbackNode===l?Dm.bind(null,t):null)}function Bm(t,r){if(io())return null;ym(t,r,!0)}function Y1(){nw(function(){(Te&6)!==0?ds(ps,K1):Lm()})}function _f(){return Qi===0&&(Qi=Wn()),Qi}function Um(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ml(""+t)}function zm(t,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,t.id&&l.setAttribute("form",t.id),r.parentNode.insertBefore(l,r),t=new FormData(t),l.parentNode.removeChild(l),t}function X1(t,r,l,c,h){if(r==="submit"&&l&&l.stateNode===h){var g=Um((h[Et]||null).action),w=c.submitter;w&&(r=(r=w[Et]||null)?Um(r.formAction):w.getAttribute("formAction"),r!==null&&(g=r,w=null));var _=new Sl("action","action",null,c,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Qi!==0){var A=w?zm(h,w):new FormData(h);Iu(l,{pending:!0,data:A,method:h.method,action:g},null,A)}}else typeof g=="function"&&(_.preventDefault(),A=w?zm(h,w):new FormData(h),Iu(l,{pending:!0,data:A,method:h.method,action:g},g,A))},currentTarget:h}]})}}for(var Tf=0;Tf<lu.length;Tf++){var Ef=lu[Tf],P1=Ef.toLowerCase(),F1=Ef[0].toUpperCase()+Ef.slice(1);cn(P1,"on"+F1)}cn(yp,"onAnimationEnd"),cn(bp,"onAnimationIteration"),cn(vp,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(h1,"onTransitionRun"),cn(d1,"onTransitionStart"),cn(p1,"onTransitionCancel"),cn(Sp,"onTransitionEnd"),ws("onMouseEnter",["mouseout","mouseover"]),ws("onMouseLeave",["mouseout","mouseover"]),ws("onPointerEnter",["pointerout","pointerover"]),ws("onPointerLeave",["pointerout","pointerover"]),ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ya="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(" "),Q1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ya));function Hm(t,r){r=(r&4)!==0;for(var l=0;l<t.length;l++){var c=t[l],h=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var w=c.length-1;0<=w;w--){var _=c[w],A=_.instance,D=_.currentTarget;if(_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(K){Yl(K)}h.currentTarget=null,g=A}else for(w=0;w<c.length;w++){if(_=c[w],A=_.instance,D=_.currentTarget,_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(K){Yl(K)}h.currentTarget=null,g=A}}}}function ye(t,r){var l=r[Uc];l===void 0&&(l=r[Uc]=new Set);var c=t+"__bubble";l.has(c)||(qm(r,t,2,!1),l.add(c))}function Af(t,r,l){var c=0;r&&(c|=4),qm(l,t,c,r)}var ao="_reactListening"+Math.random().toString(36).slice(2);function Nf(t){if(!t[ao]){t[ao]=!0,Ld.forEach(function(l){l!=="selectionchange"&&(Q1.has(l)||Af(l,!1,t),Af(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[ao]||(r[ao]=!0,Af("selectionchange",!1,r))}}function qm(t,r,l,c){switch(uy(r)){case 2:var h=_w;break;case 8:h=Tw;break;default:h=$f}l=h.bind(null,r,l,t),h=void 0,!Pc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(r,l,{capture:!0,passive:h}):t.addEventListener(r,l,!0):h!==void 0?t.addEventListener(r,l,{passive:h}):t.addEventListener(r,l,!1)}function Cf(t,r,l,c,h){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var _=c.stateNode.containerInfo;if(_===h)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&w.stateNode.containerInfo===h)return;w=w.return}for(;_!==null;){if(w=bs(_),w===null)return;if(A=w.tag,A===5||A===6||A===26||A===27){c=g=w;continue e}_=_.parentNode}}c=c.return}Xd(function(){var D=g,K=Yc(l),X=[];e:{var B=wp.get(t);if(B!==void 0){var U=Sl,fe=t;switch(t){case"keypress":if(bl(l)===0)break e;case"keydown":case"keyup":U=GS;break;case"focusin":fe="focus",U=Jc;break;case"focusout":fe="blur",U=Jc;break;case"beforeblur":case"afterblur":U=Jc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=Qd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=RS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=XS;break;case yp:case bp:case vp:U=DS;break;case Sp:U=FS;break;case"scroll":case"scrollend":U=MS;break;case"wheel":U=ZS;break;case"copy":case"cut":case"paste":U=US;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Jd;break;case"toggle":case"beforetoggle":U=WS}var oe=(r&4)!==0,Me=!oe&&(t==="scroll"||t==="scrollend"),O=oe?B!==null?B+"Capture":null:B;oe=[];for(var M=D,j;M!==null;){var Y=M;if(j=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||j===null||O===null||(Y=Br(M,O),Y!=null&&oe.push(ba(M,Y,j))),Me)break;M=M.return}0<oe.length&&(B=new U(B,fe,null,l,K),X.push({event:B,listeners:oe}))}}if((r&7)===0){e:{if(B=t==="mouseover"||t==="pointerover",U=t==="mouseout"||t==="pointerout",B&&l!==Kc&&(fe=l.relatedTarget||l.fromElement)&&(bs(fe)||fe[ys]))break e;if((U||B)&&(B=K.window===K?K:(B=K.ownerDocument)?B.defaultView||B.parentWindow:window,U?(fe=l.relatedTarget||l.toElement,U=D,fe=fe?bs(fe):null,fe!==null&&(Me=o(fe),oe=fe.tag,fe!==Me||oe!==5&&oe!==27&&oe!==6)&&(fe=null)):(U=null,fe=D),U!==fe)){if(oe=Qd,Y="onMouseLeave",O="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(oe=Jd,Y="onPointerLeave",O="onPointerEnter",M="pointer"),Me=U==null?B:Dr(U),j=fe==null?B:Dr(fe),B=new oe(Y,M+"leave",U,l,K),B.target=Me,B.relatedTarget=j,Y=null,bs(K)===D&&(oe=new oe(O,M+"enter",fe,l,K),oe.target=j,oe.relatedTarget=Me,Y=oe),Me=Y,U&&fe)t:{for(oe=U,O=fe,M=0,j=oe;j;j=Js(j))M++;for(j=0,Y=O;Y;Y=Js(Y))j++;for(;0<M-j;)oe=Js(oe),M--;for(;0<j-M;)O=Js(O),j--;for(;M--;){if(oe===O||O!==null&&oe===O.alternate)break t;oe=Js(oe),O=Js(O)}oe=null}else oe=null;U!==null&&$m(X,B,U,oe,!1),fe!==null&&Me!==null&&$m(X,Me,fe,oe,!0)}}e:{if(B=D?Dr(D):window,U=B.nodeName&&B.nodeName.toLowerCase(),U==="select"||U==="input"&&B.type==="file")var ne=ap;else if(sp(B))if(lp)ne=c1;else{ne=l1;var ge=a1}else U=B.nodeName,!U||U.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?D&&Gc(D.elementType)&&(ne=ap):ne=o1;if(ne&&(ne=ne(t,D))){rp(X,ne,l,K);break e}ge&&ge(t,B,D),t==="focusout"&&D&&B.type==="number"&&D.memoizedProps.value!=null&&Vc(B,"number",B.value)}switch(ge=D?Dr(D):window,t){case"focusin":(sp(ge)||ge.contentEditable==="true")&&(Cs=ge,su=D,Gr=null);break;case"focusout":Gr=su=Cs=null;break;case"mousedown":ru=!0;break;case"contextmenu":case"mouseup":case"dragend":ru=!1,gp(X,l,K);break;case"selectionchange":if(f1)break;case"keydown":case"keyup":gp(X,l,K)}var re;if(eu)e:{switch(t){case"compositionstart":var ce="onCompositionStart";break e;case"compositionend":ce="onCompositionEnd";break e;case"compositionupdate":ce="onCompositionUpdate";break e}ce=void 0}else Ns?np(t,l)&&(ce="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(ce="onCompositionStart");ce&&(Wd&&l.locale!=="ko"&&(Ns||ce!=="onCompositionStart"?ce==="onCompositionEnd"&&Ns&&(re=Pd()):(ti=K,Fc="value"in ti?ti.value:ti.textContent,Ns=!0)),ge=lo(D,ce),0<ge.length&&(ce=new Zd(ce,t,null,l,K),X.push({event:ce,listeners:ge}),re?ce.data=re:(re=ip(l),re!==null&&(ce.data=re)))),(re=t1?n1(t,l):i1(t,l))&&(ce=lo(D,"onBeforeInput"),0<ce.length&&(ge=new Zd("onBeforeInput","beforeinput",null,l,K),X.push({event:ge,listeners:ce}),ge.data=re)),X1(X,t,D,l,K)}Hm(X,r)})}function ba(t,r,l){return{instance:t,listener:r,currentTarget:l}}function lo(t,r){for(var l=r+"Capture",c=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Br(t,l),h!=null&&c.unshift(ba(t,h,g)),h=Br(t,r),h!=null&&c.push(ba(t,h,g))),t.tag===3)return c;t=t.return}return[]}function Js(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function $m(t,r,l,c,h){for(var g=r._reactName,w=[];l!==null&&l!==c;){var _=l,A=_.alternate,D=_.stateNode;if(_=_.tag,A!==null&&A===c)break;_!==5&&_!==26&&_!==27||D===null||(A=D,h?(D=Br(l,g),D!=null&&w.unshift(ba(l,D,A))):h||(D=Br(l,g),D!=null&&w.push(ba(l,D,A)))),l=l.return}w.length!==0&&t.push({event:r,listeners:w})}var Z1=/\r\n?/g,J1=/\u0000|\uFFFD/g;function Im(t){return(typeof t=="string"?t:""+t).replace(Z1,`
50
+ `).replace(J1,"")}function Vm(t,r){return r=Im(r),Im(t)===r}function oo(){}function ke(t,r,l,c,h,g){switch(l){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||Ts(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&Ts(t,""+c);break;case"className":dl(t,"class",c);break;case"tabIndex":dl(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":dl(t,l,c);break;case"style":Kd(t,c,g);break;case"data":if(r!=="object"){dl(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||l!=="href")){t.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=ml(""+c),t.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(l,"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 g=="function"&&(l==="formAction"?(r!=="input"&&ke(t,r,"name",h.name,h,null),ke(t,r,"formEncType",h.formEncType,h,null),ke(t,r,"formMethod",h.formMethod,h,null),ke(t,r,"formTarget",h.formTarget,h,null)):(ke(t,r,"encType",h.encType,h,null),ke(t,r,"method",h.method,h,null),ke(t,r,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=ml(""+c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=oo);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}l=ml(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""+c):t.removeAttribute(l);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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":c===!0?t.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(l,c):t.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(l):t.setAttribute(l,c);break;case"popover":ye("beforetoggle",t),ye("toggle",t),hl(t,"popover",c);break;case"xlinkActuate":Cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Cn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Cn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Cn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Cn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":hl(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=CS.get(l)||l,hl(t,l,c))}}function kf(t,r,l,c,h,g){switch(l){case"style":Kd(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"children":typeof c=="string"?Ts(t,c):(typeof c=="number"||typeof c=="bigint")&&Ts(t,""+c);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"onClick":c!=null&&(t.onclick=oo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),r=l.slice(2,h?l.length-7:void 0),g=t[Et]||null,g=g!=null?g[l]:null,typeof g=="function"&&t.removeEventListener(r,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(r,c,h);break e}l in t?t[l]=c:c===!0?t.setAttribute(l,""):hl(t,l,c)}}}function lt(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",t),ye("load",t);var c=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var w=l[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,g,w,l,null)}}h&&ke(t,r,"srcSet",l.srcSet,l,null),c&&ke(t,r,"src",l.src,l,null);return;case"input":ye("invalid",t);var _=g=w=h=null,A=null,D=null;for(c in l)if(l.hasOwnProperty(c)){var K=l[c];if(K!=null)switch(c){case"name":h=K;break;case"type":w=K;break;case"checked":A=K;break;case"defaultChecked":D=K;break;case"value":g=K;break;case"defaultValue":_=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(s(137,r));break;default:ke(t,r,c,K,l,null)}}$d(t,g,_,A,D,w,h,!1),pl(t);return;case"select":ye("invalid",t),c=w=g=null;for(h in l)if(l.hasOwnProperty(h)&&(_=l[h],_!=null))switch(h){case"value":g=_;break;case"defaultValue":w=_;break;case"multiple":c=_;default:ke(t,r,h,_,l,null)}r=g,l=w,t.multiple=!!c,r!=null?_s(t,!!c,r,!1):l!=null&&_s(t,!!c,l,!0);return;case"textarea":ye("invalid",t),g=h=c=null;for(w in l)if(l.hasOwnProperty(w)&&(_=l[w],_!=null))switch(w){case"value":c=_;break;case"defaultValue":h=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(91));break;default:ke(t,r,w,_,l,null)}Vd(t,c,h,g),pl(t);return;case"option":for(A in l)if(l.hasOwnProperty(A)&&(c=l[A],c!=null))switch(A){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:ke(t,r,A,c,l,null)}return;case"dialog":ye("beforetoggle",t),ye("toggle",t),ye("cancel",t),ye("close",t);break;case"iframe":case"object":ye("load",t);break;case"video":case"audio":for(c=0;c<ya.length;c++)ye(ya[c],t);break;case"image":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"embed":case"source":case"link":ye("error",t),ye("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in l)if(l.hasOwnProperty(D)&&(c=l[D],c!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,D,c,l,null)}return;default:if(Gc(r)){for(K in l)l.hasOwnProperty(K)&&(c=l[K],c!==void 0&&kf(t,r,K,c,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(c=l[_],c!=null&&ke(t,r,_,c,l,null))}function W1(t,r,l,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,w=null,_=null,A=null,D=null,K=null;for(U in l){var X=l[U];if(l.hasOwnProperty(U)&&X!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":A=X;default:c.hasOwnProperty(U)||ke(t,r,U,null,c,X)}}for(var B in c){var U=c[B];if(X=l[B],c.hasOwnProperty(B)&&(U!=null||X!=null))switch(B){case"type":g=U;break;case"name":h=U;break;case"checked":D=U;break;case"defaultChecked":K=U;break;case"value":w=U;break;case"defaultValue":_=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:U!==X&&ke(t,r,B,U,c,X)}}Ic(t,w,_,A,D,K,g,h);return;case"select":U=w=_=B=null;for(g in l)if(A=l[g],l.hasOwnProperty(g)&&A!=null)switch(g){case"value":break;case"multiple":U=A;default:c.hasOwnProperty(g)||ke(t,r,g,null,c,A)}for(h in c)if(g=c[h],A=l[h],c.hasOwnProperty(h)&&(g!=null||A!=null))switch(h){case"value":B=g;break;case"defaultValue":_=g;break;case"multiple":w=g;default:g!==A&&ke(t,r,h,g,c,A)}r=_,l=w,c=U,B!=null?_s(t,!!l,B,!1):!!c!=!!l&&(r!=null?_s(t,!!l,r,!0):_s(t,!!l,l?[]:"",!1));return;case"textarea":U=B=null;for(_ in l)if(h=l[_],l.hasOwnProperty(_)&&h!=null&&!c.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ke(t,r,_,null,c,h)}for(w in c)if(h=c[w],g=l[w],c.hasOwnProperty(w)&&(h!=null||g!=null))switch(w){case"value":B=h;break;case"defaultValue":U=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&ke(t,r,w,h,c,g)}Id(t,B,U);return;case"option":for(var fe in l)if(B=l[fe],l.hasOwnProperty(fe)&&B!=null&&!c.hasOwnProperty(fe))switch(fe){case"selected":t.selected=!1;break;default:ke(t,r,fe,null,c,B)}for(A in c)if(B=c[A],U=l[A],c.hasOwnProperty(A)&&B!==U&&(B!=null||U!=null))switch(A){case"selected":t.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:ke(t,r,A,B,c,U)}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 oe in l)B=l[oe],l.hasOwnProperty(oe)&&B!=null&&!c.hasOwnProperty(oe)&&ke(t,r,oe,null,c,B);for(D in c)if(B=c[D],U=l[D],c.hasOwnProperty(D)&&B!==U&&(B!=null||U!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,r));break;default:ke(t,r,D,B,c,U)}return;default:if(Gc(r)){for(var Me in l)B=l[Me],l.hasOwnProperty(Me)&&B!==void 0&&!c.hasOwnProperty(Me)&&kf(t,r,Me,void 0,c,B);for(K in c)B=c[K],U=l[K],!c.hasOwnProperty(K)||B===U||B===void 0&&U===void 0||kf(t,r,K,B,c,U);return}}for(var O in l)B=l[O],l.hasOwnProperty(O)&&B!=null&&!c.hasOwnProperty(O)&&ke(t,r,O,null,c,B);for(X in c)B=c[X],U=l[X],!c.hasOwnProperty(X)||B===U||B==null&&U==null||ke(t,r,X,B,c,U)}var Mf=null,Of=null;function co(t){return t.nodeType===9?t:t.ownerDocument}function Gm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Km(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function Rf(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Lf=null;function ew(){var t=window.event;return t&&t.type==="popstate"?t===Lf?!1:(Lf=t,!0):(Lf=null,!1)}var Ym=typeof setTimeout=="function"?setTimeout:void 0,tw=typeof clearTimeout=="function"?clearTimeout:void 0,Xm=typeof Promise=="function"?Promise:void 0,nw=typeof queueMicrotask=="function"?queueMicrotask:typeof Xm<"u"?function(t){return Xm.resolve(null).then(t).catch(iw)}:Ym;function iw(t){setTimeout(function(){throw t})}function yi(t){return t==="head"}function Pm(t,r){var l=r,c=0,h=0;do{var g=l.nextSibling;if(t.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(0<c&&8>c){l=c;var w=t.ownerDocument;if(l&1&&va(w.documentElement),l&2&&va(w.body),l&4)for(l=w.head,va(l),w=l.firstChild;w;){var _=w.nextSibling,A=w.nodeName;w[jr]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&w.rel.toLowerCase()==="stylesheet"||l.removeChild(w),w=_}}if(h===0){t.removeChild(g),Na(r);return}h--}else l==="$"||l==="$?"||l==="$!"?h++:c=l.charCodeAt(0)-48;else c=0;l=g}while(l);Na(r)}function jf(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":jf(l),zc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function sw(t,r,l,c){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[jr])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=fn(t.nextSibling),t===null)break}return null}function rw(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=fn(t.nextSibling),t===null))return null;return t}function Df(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function aw(t,r){var l=t.ownerDocument;if(t.data!=="$?"||l.readyState==="complete")r();else{var c=function(){r(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function fn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var Bf=null;function Fm(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"){if(r===0)return t;r--}else l==="/$"&&r++}t=t.previousSibling}return null}function Qm(t,r,l){switch(r=co(l),t){case"html":if(t=r.documentElement,!t)throw Error(s(452));return t;case"head":if(t=r.head,!t)throw Error(s(453));return t;case"body":if(t=r.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function va(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);zc(t)}var tn=new Map,Zm=new Set;function uo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var In=Q.d;Q.d={f:lw,r:ow,D:cw,C:uw,L:fw,m:hw,X:pw,S:dw,M:gw};function lw(){var t=In.f(),r=to();return t||r}function ow(t){var r=vs(t);r!==null&&r.tag===5&&r.type==="form"?yg(r):In.r(t)}var Ws=typeof document>"u"?null:document;function Jm(t,r,l){var c=Ws;if(c&&typeof r=="string"&&r){var h=Pt(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),Zm.has(h)||(Zm.add(h),t={rel:t,crossOrigin:l,href:r},c.querySelector(h)===null&&(r=c.createElement("link"),lt(r,"link",t),We(r),c.head.appendChild(r)))}}function cw(t){In.D(t),Jm("dns-prefetch",t,null)}function uw(t,r){In.C(t,r),Jm("preconnect",t,r)}function fw(t,r,l){In.L(t,r,l);var c=Ws;if(c&&t&&r){var h='link[rel="preload"][as="'+Pt(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Pt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Pt(l.imageSizes)+'"]')):h+='[href="'+Pt(t)+'"]';var g=h;switch(r){case"style":g=er(t);break;case"script":g=tr(t)}tn.has(g)||(t=m({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),tn.set(g,t),c.querySelector(h)!==null||r==="style"&&c.querySelector(Sa(g))||r==="script"&&c.querySelector(wa(g))||(r=c.createElement("link"),lt(r,"link",t),We(r),c.head.appendChild(r)))}}function hw(t,r){In.m(t,r);var l=Ws;if(l&&t){var c=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Pt(c)+'"][href="'+Pt(t)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=tr(t)}if(!tn.has(g)&&(t=m({rel:"modulepreload",href:t},r),tn.set(g,t),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wa(g)))return}c=l.createElement("link"),lt(c,"link",t),We(c),l.head.appendChild(c)}}}function dw(t,r,l){In.S(t,r,l);var c=Ws;if(c&&t){var h=Ss(c).hoistableStyles,g=er(t);r=r||"default";var w=h.get(g);if(!w){var _={loading:0,preload:null};if(w=c.querySelector(Sa(g)))_.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},l),(l=tn.get(g))&&Uf(t,l);var A=w=c.createElement("link");We(A),lt(A,"link",t),A._p=new Promise(function(D,K){A.onload=D,A.onerror=K}),A.addEventListener("load",function(){_.loading|=1}),A.addEventListener("error",function(){_.loading|=2}),_.loading|=4,fo(w,r,c)}w={type:"stylesheet",instance:w,count:1,state:_},h.set(g,w)}}}function pw(t,r){In.X(t,r);var l=Ws;if(l&&t){var c=Ss(l).hoistableScripts,h=tr(t),g=c.get(h);g||(g=l.querySelector(wa(h)),g||(t=m({src:t,async:!0},r),(r=tn.get(h))&&zf(t,r),g=l.createElement("script"),We(g),lt(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function gw(t,r){In.M(t,r);var l=Ws;if(l&&t){var c=Ss(l).hoistableScripts,h=tr(t),g=c.get(h);g||(g=l.querySelector(wa(h)),g||(t=m({src:t,async:!0,type:"module"},r),(r=tn.get(h))&&zf(t,r),g=l.createElement("script"),We(g),lt(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function Wm(t,r,l,c){var h=(h=te.current)?uo(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=er(l.href),l=Ss(h).hoistableStyles,c=l.get(r),c||(c={type:"style",instance:null,count:0,state:null},l.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=er(l.href);var g=Ss(h).hoistableStyles,w=g.get(t);if(w||(h=h.ownerDocument||h,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,w),(g=h.querySelector(Sa(t)))&&!g._p&&(w.instance=g,w.state.loading=5),tn.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},tn.set(t,l),g||mw(h,t,l,w.state))),r&&c===null)throw Error(s(528,""));return w}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=tr(l),l=Ss(h).hoistableScripts,c=l.get(r),c||(c={type:"script",instance:null,count:0,state:null},l.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function er(t){return'href="'+Pt(t)+'"'}function Sa(t){return'link[rel="stylesheet"]['+t+"]"}function ey(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function mw(t,r,l,c){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=t.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),lt(r,"link",l),We(r),t.head.appendChild(r))}function tr(t){return'[src="'+Pt(t)+'"]'}function wa(t){return"script[async]"+t}function ty(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+Pt(l.href)+'"]');if(c)return r.instance=c,We(c),c;var h=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),We(c),lt(c,"style",h),fo(c,l.precedence,t),r.instance=c;case"stylesheet":h=er(l.href);var g=t.querySelector(Sa(h));if(g)return r.state.loading|=4,r.instance=g,We(g),g;c=ey(l),(h=tn.get(h))&&Uf(c,h),g=(t.ownerDocument||t).createElement("link"),We(g);var w=g;return w._p=new Promise(function(_,A){w.onload=_,w.onerror=A}),lt(g,"link",c),r.state.loading|=4,fo(g,l.precedence,t),r.instance=g;case"script":return g=tr(l.src),(h=t.querySelector(wa(g)))?(r.instance=h,We(h),h):(c=l,(h=tn.get(g))&&(c=m({},l),zf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),We(h),lt(h,"link",c),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,fo(c,l.precedence,t));return r.instance}function fo(t,r,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,w=0;w<c.length;w++){var _=c[w];if(_.dataset.precedence===r)g=_;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(t,r.firstChild))}function Uf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function zf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var ho=null;function ny(t,r,l){if(ho===null){var c=new Map,h=ho=new Map;h.set(l,c)}else h=ho,c=h.get(l),c||(c=new Map,h.set(l,c));if(c.has(t))return c;for(c.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[jr]||g[ht]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(r)||"";w=t+w;var _=c.get(w);_?_.push(g):c.set(w,[g])}}return c}function iy(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function yw(t,r,l){if(l===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function sy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var xa=null;function bw(){}function vw(t,r,l){if(xa===null)throw Error(s(475));var c=xa;if(r.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=er(l.href),g=t.querySelector(Sa(h));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=po.bind(c),t.then(c,c)),r.state.loading|=4,r.instance=g,We(g);return}g=t.ownerDocument||t,l=ey(l),(h=tn.get(h))&&Uf(l,h),g=g.createElement("link"),We(g);var w=g;w._p=new Promise(function(_,A){w.onload=_,w.onerror=A}),lt(g,"link",l),r.instance=g}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(c.count++,r=po.bind(c),t.addEventListener("load",r),t.addEventListener("error",r))}}function Sw(){if(xa===null)throw Error(s(475));var t=xa;return t.stylesheets&&t.count===0&&Hf(t,t.stylesheets),0<t.count?function(r){var l=setTimeout(function(){if(t.stylesheets&&Hf(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(l)}}:null}function po(){if(this.count--,this.count===0){if(this.stylesheets)Hf(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var go=null;function Hf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,go=new Map,r.forEach(ww,t),go=null,po.call(t))}function ww(t,r){if(!(r.state.loading&4)){var l=go.get(t);if(l)var c=l.get(null);else{l=new Map,go.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var w=h[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(l.set(w.dataset.precedence,w),c=w)}c&&l.set(null,c)}h=r.instance,w=h.getAttribute("data-precedence"),g=l.get(w)||c,g===c&&l.set(null,h),l.set(w,h),this.count++,c=po.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var _a={$$typeof:$,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function xw(t,r,l,c,h,g,w,_){this.tag=1,this.containerInfo=t,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=jc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jc(0),this.hiddenUpdates=jc(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function ry(t,r,l,c,h,g,w,_,A,D,K,X){return t=new xw(t,r,l,w,_,A,D,X),r=1,g===!0&&(r|=24),g=Ut(3,null,null,r),t.current=g,g.stateNode=t,r=vu(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:l,cache:r},_u(g),t}function ay(t){return t?(t=Rs,t):Rs}function ly(t,r,l,c,h,g){h=ay(h),c.context===null?c.context=h:c.pendingContext=h,c=si(r),c.payload={element:l},g=g===void 0?null:g,g!==null&&(c.callback=g),l=ri(t,c,r),l!==null&&(It(l,t,r),Wr(l,t,r))}function oy(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function qf(t,r){oy(t,r),(t=t.alternate)&&oy(t,r)}function cy(t){if(t.tag===13){var r=Os(t,67108864);r!==null&&It(r,t,67108864),qf(t,67108864)}}var mo=!0;function _w(t,r,l,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=2,$f(t,r,l,c)}finally{Q.p=g,z.T=h}}function Tw(t,r,l,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=8,$f(t,r,l,c)}finally{Q.p=g,z.T=h}}function $f(t,r,l,c){if(mo){var h=If(c);if(h===null)Cf(t,r,c,yo,l),fy(t,c);else if(Aw(h,t,r,l,c))c.stopPropagation();else if(fy(t,c),r&4&&-1<Ew.indexOf(t)){for(;h!==null;){var g=vs(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Nn(g.pendingLanes);if(w!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;w;){var A=1<<31-vt(w);_.entanglements[1]|=A,w&=~A}wn(g),(Te&6)===0&&(Wl=Kt()+500,ma(0))}}break;case 13:_=Os(g,2),_!==null&&It(_,g,2),to(),qf(g,2)}if(g=If(c),g===null&&Cf(t,r,c,yo,l),g===h)break;h=g}h!==null&&c.stopPropagation()}else Cf(t,r,c,null,l)}}function If(t){return t=Yc(t),Vf(t)}var yo=null;function Vf(t){if(yo=null,t=bs(t),t!==null){var r=o(t);if(r===null)t=null;else{var l=r.tag;if(l===13){if(t=u(r),t!==null)return t;t=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return yo=t,null}function uy(t){switch(t){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(Rr()){case ps:return 2;case Oi:return 8;case gs:case Qn:return 32;case fl:return 268435456;default:return 32}default:return 32}}var Gf=!1,bi=null,vi=null,Si=null,Ta=new Map,Ea=new Map,wi=[],Ew="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 fy(t,r){switch(t){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":Ta.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ea.delete(r.pointerId)}}function Aa(t,r,l,c,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:l,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},r!==null&&(r=vs(r),r!==null&&cy(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function Aw(t,r,l,c,h){switch(r){case"focusin":return bi=Aa(bi,t,r,l,c,h),!0;case"dragenter":return vi=Aa(vi,t,r,l,c,h),!0;case"mouseover":return Si=Aa(Si,t,r,l,c,h),!0;case"pointerover":var g=h.pointerId;return Ta.set(g,Aa(Ta.get(g)||null,t,r,l,c,h)),!0;case"gotpointercapture":return g=h.pointerId,Ea.set(g,Aa(Ea.get(g)||null,t,r,l,c,h)),!0}return!1}function hy(t){var r=bs(t.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=u(l),r!==null){t.blockedOn=r,vS(t.priority,function(){if(l.tag===13){var c=$t();c=Dc(c);var h=Os(l,c);h!==null&&It(h,l,c),qf(l,c)}});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function bo(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var l=If(t.nativeEvent);if(l===null){l=t.nativeEvent;var c=new l.constructor(l.type,l);Kc=c,l.target.dispatchEvent(c),Kc=null}else return r=vs(l),r!==null&&cy(r),t.blockedOn=l,!1;r.shift()}return!0}function dy(t,r,l){bo(t)&&l.delete(r)}function Nw(){Gf=!1,bi!==null&&bo(bi)&&(bi=null),vi!==null&&bo(vi)&&(vi=null),Si!==null&&bo(Si)&&(Si=null),Ta.forEach(dy),Ea.forEach(dy)}function vo(t,r){t.blockedOn===r&&(t.blockedOn=null,Gf||(Gf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Nw)))}var So=null;function py(t){So!==t&&(So=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){So===t&&(So=null);for(var r=0;r<t.length;r+=3){var l=t[r],c=t[r+1],h=t[r+2];if(typeof c!="function"){if(Vf(c||l)===null)continue;break}var g=vs(l);g!==null&&(t.splice(r,3),r-=3,Iu(g,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function Na(t){function r(A){return vo(A,t)}bi!==null&&vo(bi,t),vi!==null&&vo(vi,t),Si!==null&&vo(Si,t),Ta.forEach(r),Ea.forEach(r);for(var l=0;l<wi.length;l++){var c=wi[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<wi.length&&(l=wi[0],l.blockedOn===null);)hy(l),l.blockedOn===null&&wi.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],g=l[c+1],w=h[Et]||null;if(typeof g=="function")w||py(l);else if(w){var _=null;if(g&&g.hasAttribute("formAction")){if(h=g,w=g[Et]||null)_=w.formAction;else if(Vf(h)!==null)continue}else _=w.action;typeof _=="function"?l[c+1]=_:(l.splice(c,3),c-=3),py(l)}}}function Kf(t){this._internalRoot=t}wo.prototype.render=Kf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));var l=r.current,c=$t();ly(l,c,t,r,null,null)},wo.prototype.unmount=Kf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;ly(t.current,2,null,t,null,null),to(),r[ys]=null}};function wo(t){this._internalRoot=t}wo.prototype.unstable_scheduleHydration=function(t){if(t){var r=Od();t={blockedOn:null,target:t,priority:r};for(var l=0;l<wi.length&&r!==0&&r<wi[l].priority;l++);wi.splice(l,0,t),l===0&&hy(t)}};var gy=e.version;if(gy!=="19.1.1")throw Error(s(527,gy,"19.1.1"));Q.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=d(r),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var Cw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xo.isDisabled&&xo.supportsFiber)try{Ri=xo.inject(Cw),ft=xo}catch{}}return ka.createRoot=function(t,r){if(!a(t))throw Error(s(299));var l=!1,c="",h=Og,g=Rg,w=Lg,_=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(w=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(_=r.unstable_transitionCallbacks)),r=ry(t,1,!1,null,null,l,c,h,g,w,_,null),t[ys]=r.current,Nf(t),new Kf(r)},ka.hydrateRoot=function(t,r,l){if(!a(t))throw Error(s(299));var c=!1,h="",g=Og,w=Rg,_=Lg,A=null,D=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(w=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(A=l.unstable_transitionCallbacks),l.formState!==void 0&&(D=l.formState)),r=ry(t,1,!0,r,l??null,c,h,g,w,_,A,D),r.context=ay(null),l=r.current,c=$t(),c=Dc(c),h=si(c),h.callback=null,ri(l,h,c),l=c,r.current.lanes=l,Lr(r,l),wn(r),t[ys]=r.current,Nf(t),new wo(r)},ka.version="19.1.1",ka}var Ny;function Xw(){if(Ny)return Pf.exports;Ny=1;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)}}return n(),Pf.exports=Yw(),Pf.exports}var i2=Xw();const k0=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser",pausesBeforeAction:!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"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!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"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pausesBeforeAction:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.accessibilitySnapshot",{title:"Accessibility snapshot",group:"getter"}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function Pw(n,e){var i;return(i=Fw(n,e))==null?void 0:i.replaceAll(`
51
+ `,"\\n")}function Fw(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const a=new URL(n[i]);return a.protocol==="data:"?a.protocol:a.protocol==="about:"?n[i]:a.pathname+a.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const s=Qw(n,i);if(s!==void 0)return s}}function Qw(n,e){const i=e.split(".");let s=n;for(const a of i){if(typeof s!="object"||s===null)return;s=s[a]}if(s!==void 0)return String(s)}function Zw(n){var e;return(e=k0.get(n.type+"."+n.method))==null?void 0:e.group}const za=Symbol("context"),M0=Symbol("nextInContext"),O0=Symbol("prevByEndTime"),R0=Symbol("nextByStartTime"),Cy=Symbol("events");class s2{constructor(e,i){Ae(this,"startTime");Ae(this,"endTime");Ae(this,"browserName");Ae(this,"channel");Ae(this,"platform");Ae(this,"wallTime");Ae(this,"title");Ae(this,"options");Ae(this,"pages");Ae(this,"actions");Ae(this,"attachments");Ae(this,"visibleAttachments");Ae(this,"events");Ae(this,"stdio");Ae(this,"errors");Ae(this,"errorDescriptors");Ae(this,"hasSource");Ae(this,"hasStepData");Ae(this,"sdkLanguage");Ae(this,"testIdAttributeName");Ae(this,"sources");Ae(this,"resources");Ae(this,"actionCounters");Ae(this,"traceUrl");i.forEach(a=>Jw(a));const s=i.find(a=>a.origin==="library");this.traceUrl=e,this.browserName=(s==null?void 0:s.browserName)||"",this.sdkLanguage=s==null?void 0:s.sdkLanguage,this.channel=s==null?void 0:s.channel,this.testIdAttributeName=s==null?void 0:s.testIdAttributeName,this.platform=(s==null?void 0:s.platform)||"",this.title=(s==null?void 0:s.title)||"",this.options=(s==null?void 0:s.options)||{},this.actions=Ww(i),this.pages=[].concat(...i.map(a=>a.pages)),this.wallTime=i.map(a=>a.wallTime).reduce((a,o)=>Math.min(a||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=i.map(a=>a.startTime).reduce((a,o)=>Math.min(a,o),Number.MAX_VALUE),this.endTime=i.map(a=>a.endTime).reduce((a,o)=>Math.max(a,o),Number.MIN_VALUE),this.events=[].concat(...i.map(a=>a.events)),this.stdio=[].concat(...i.map(a=>a.stdio)),this.errors=[].concat(...i.map(a=>a.errors)),this.hasSource=i.some(a=>a.hasSource),this.hasStepData=i.some(a=>a.origin==="testRunner"),this.resources=[...i.map(a=>a.resources)].flat(),this.attachments=this.actions.flatMap(a=>{var o;return((o=a.attachments)==null?void 0:o.map(u=>({...u,callId:a.callId,traceUrl:e})))??[]}),this.visibleAttachments=this.attachments.filter(a=>!a.name.startsWith("_")),this.events.sort((a,o)=>a.time-o.time),this.resources.sort((a,o)=>a._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=lx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const a of this.actions)a.group=a.group??Zw({type:a.class,method:a.method}),a.group&&this.actionCounters.set(a.group,1+(this.actionCounters.get(a.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUrl),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(s=>!s.group||i.has(s.group))}_errorDescriptorsFromActions(){var i;const e=[];for(const s of this.actions||[])(i=s.error)!=null&&i.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function Jw(n){for(const i of n.pages)i[za]=n;for(let i=0;i<n.actions.length;++i){const s=n.actions[i];s[za]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const s=n.actions[i];s[M0]=e,s.class!=="Route"&&(e=s)}for(const i of n.events)i[za]=n;for(const i of n.resources)i[za]=n}function Ww(n){const e=[],i=ex(n);e.push(...i),e.sort((s,a)=>a.parentId===s.callId?1:s.parentId===a.callId?-1:s.endTime-a.endTime);for(let s=1;s<e.length;++s)e[s][O0]=e[s-1];e.sort((s,a)=>a.parentId===s.callId?-1:s.parentId===a.callId?1:s.startTime-a.startTime);for(let s=0;s+1<e.length;++s)e[s][R0]=e[s+1];return e}let ky=0;function ex(n){const e=new Map,i=n.filter(u=>u.origin==="library"),s=n.filter(u=>u.origin==="testRunner");if(!s.length||!i.length)return n.map(u=>u.actions.map(f=>({...f,context:u}))).flat();for(const u of i)for(const f of u.actions)e.set(f.stepId||`tmp-step@${++ky}`,{...f,context:u});const a=nx(s,e);a&&tx(i,a);const o=new Map;for(const u of s)for(const f of u.actions){const d=f.stepId&&e.get(f.stepId);if(d){o.set(f.callId,d.callId),f.error&&(d.error=f.error),f.attachments&&(d.attachments=f.attachments),f.annotations&&(d.annotations=f.annotations),f.parentId&&(d.parentId=o.get(f.parentId)??f.parentId),f.group&&(d.group=f.group),d.startTime=f.startTime,d.endTime=f.endTime;continue}f.parentId&&(f.parentId=o.get(f.parentId)??f.parentId),e.set(f.stepId||`tmp-step@${++ky}`,{...f,context:u})}return[...e.values()]}function tx(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const s of i.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of i.events)s.time+=e;for(const s of i.stdio)s.timestamp+=e;for(const s of i.pages)for(const a of s.screencastFrames)a.timestamp+=e;for(const s of i.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function nx(n,e){for(const i of n)for(const s of i.actions){if(!s.startTime)continue;const a=s.stepId?e.get(s.stepId):void 0;if(a)return s.startTime-a.startTime}return 0}function ix(n){const e=new Map;for(const s of n)e.set(s.callId,{id:s.callId,parent:void 0,children:[],action:s});const i={id:"",parent:void 0,children:[]};for(const s of e.values()){const a=s.action.parentId&&e.get(s.action.parentId)||i;a.children.push(s),s.parent=a}return{rootItem:i,itemMap:e}}function L0(n){return n[za]}function sx(n){return n[M0]}function My(n){return n[O0]}function Oy(n){return n[R0]}function rx(n){let e=0,i=0;for(const s of ax(n)){if(s.type==="console"){const a=s.messageType;a==="warning"?++i:a==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:i}}function ax(n){let e=n[Cy];if(e)return e;const i=sx(n);return e=L0(n).events.filter(s=>s.time>=n.startTime&&(!i||s.time<i.startTime)),n[Cy]=e,e}function lx(n,e){var s;const i=new Map;for(const a of n)for(const o of a.stack||[]){let u=i.get(o.file);u||(u={errors:[],content:void 0},i.set(o.file,u))}for(const a of e){const{action:o,stack:u,message:f}=a;!o||!u||(s=i.get(u[0].file))==null||s.errors.push({line:u[0].line||0,message:f})}return i}const ox=50,Po=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:s="vertical",minSidebarSize:a=ox,settingName:o,sidebar:u,main:f})=>{const d=Math.max(a,n)*window.devicePixelRatio,[p,m]=pn(o?o+"."+s+":size":void 0,d),[y,b]=pn(o?o+"."+s+":size":void 0,d),[v,E]=q.useState(null),[x,T]=cs();let C;s==="vertical"?(C=y/window.devicePixelRatio,x&&x.height<C&&(C=x.height-10)):(C=p/window.devicePixelRatio,x&&x.width<C&&(C=x.width-10)),document.body.style.userSelect=v?"none":"inherit";let k={};return s==="vertical"?i?k={top:v?0:C-4,bottom:v?0:void 0,height:v?"initial":8}:k={bottom:v?0:C-4,top:v?0:void 0,height:v?"initial":8}:i?k={left:v?0:C-4,right:v?0:void 0,width:v?"initial":8}:k={right:v?0:C-4,left:v?0:void 0,width:v?"initial":8},S.jsxs("div",{className:Ke("split-view",s,i&&"sidebar-first"),ref:T,children:[S.jsx("div",{className:"split-view-main",children:f}),!e&&S.jsx("div",{style:{flexBasis:C},className:"split-view-sidebar",children:u}),!e&&S.jsx("div",{style:k,className:"split-view-resizer",onMouseDown:$=>E({offset:s==="vertical"?$.clientY:$.clientX,size:C}),onMouseUp:()=>E(null),onMouseMove:$=>{if(!$.buttons)E(null);else if(v){const R=(s==="vertical"?$.clientY:$.clientX)-v.offset,G=i?v.size+R:v.size-R,H=$.target.parentElement.getBoundingClientRect(),L=Math.min(Math.max(a,G),(s==="vertical"?H.height:H.width)-a);s==="vertical"?b(L*window.devicePixelRatio):m(L*window.devicePixelRatio)}}})]})},Fe=function(n,e,i){return n>=e&&n<=i};function Mt(n){return Fe(n,48,57)}function Ry(n){return Mt(n)||Fe(n,65,70)||Fe(n,97,102)}function cx(n){return Fe(n,65,90)}function ux(n){return Fe(n,97,122)}function fx(n){return cx(n)||ux(n)}function hx(n){return n>=128}function Lo(n){return fx(n)||hx(n)||n===95}function Ly(n){return Lo(n)||Mt(n)||n===45}function dx(n){return Fe(n,0,8)||n===11||Fe(n,14,31)||n===127}function jo(n){return n===10}function Vn(n){return jo(n)||n===9||n===32}const px=1114111;class zh extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function gx(n){const e=[];for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===13&&n.charCodeAt(i+1)===10&&(s=10,i++),(s===13||s===12)&&(s=10),s===0&&(s=65533),Fe(s,55296,56319)&&Fe(n.charCodeAt(i+1),56320,57343)){const a=s-55296,o=n.charCodeAt(i+1)-56320;s=Math.pow(2,16)+a*Math.pow(2,10)+o,i++}e.push(s)}return e}function Je(n){if(n<=65535)return String.fromCharCode(n);n-=Math.pow(2,16);const e=Math.floor(n/Math.pow(2,10))+55296,i=n%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(i)}function j0(n){const e=gx(n);let i=-1;const s=[];let a;const o=function(I){return I>=e.length?-1:e[I]},u=function(I){if(I===void 0&&(I=1),I>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+I)},f=function(I){return I===void 0&&(I=1),i+=I,a=o(i),!0},d=function(){return i-=1,!0},p=function(I){return I===void 0&&(I=a),I===-1},m=function(){if(y(),f(),Vn(a)){for(;Vn(u());)f();return new Fo}else{if(a===34)return E();if(a===35)if(Ly(u())||C(u(1),u(2))){const I=new X0("");return $(u(1),u(2),u(3))&&(I.type="id"),I.value=Z(),I}else return new ot(a);else return a===36?u()===61?(f(),new vx):new ot(a):a===39?E():a===40?new G0:a===41?new Hh:a===42?u()===61?(f(),new Sx):new ot(a):a===43?G()?(d(),b()):new ot(a):a===44?new q0:a===45?G()?(d(),b()):u(1)===45&&u(2)===62?(f(2),new U0):V()?(d(),v()):new ot(a):a===46?G()?(d(),b()):new ot(a):a===58?new z0:a===59?new H0:a===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new B0):new ot(a):a===64?$(u(1),u(2),u(3))?new Y0(Z()):new ot(a):a===91?new V0:a===92?k()?(d(),v()):new ot(a):a===93?new vh:a===94?u()===61?(f(),new bx):new ot(a):a===123?new $0:a===124?u()===61?(f(),new yx):u()===124?(f(),new K0):new ot(a):a===125?new I0:a===126?u()===61?(f(),new mx):new ot(a):Mt(a)?(d(),b()):Lo(a)?(d(),v()):p()?new Bo:new ot(a)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),a===42&&u()===47){f();break}else if(p())return},b=function(){const I=H();if($(u(1),u(2),u(3))){const F=new wx;return F.value=I.value,F.repr=I.repr,F.type=I.type,F.unit=Z(),F}else if(u()===37){f();const F=new Q0;return F.value=I.value,F.repr=I.repr,F}else{const F=new F0;return F.value=I.value,F.repr=I.repr,F.type=I.type,F}},v=function(){const I=Z();if(I.toLowerCase()==="url"&&u()===40){for(f();Vn(u(1))&&Vn(u(2));)f();return u()===34||u()===39?new Ga(I):Vn(u())&&(u(2)===34||u(2)===39)?new Ga(I):x()}else return u()===40?(f(),new Ga(I)):new qh(I)},E=function(I){I===void 0&&(I=a);let F="";for(;f();){if(a===I||p())return new $h(F);if(jo(a))return d(),new D0;a===92?p(u())||(jo(u())?f():F+=Je(T())):F+=Je(a)}throw new Error("Internal error")},x=function(){const I=new P0("");for(;Vn(u());)f();if(p(u()))return I;for(;f();){if(a===41||p())return I;if(Vn(a)){for(;Vn(u());)f();return u()===41||p(u())?(f(),I):(ie(),new Do)}else{if(a===34||a===39||a===40||dx(a))return ie(),new Do;if(a===92)if(k())I.value+=Je(T());else return ie(),new Do;else I.value+=Je(a)}}throw new Error("Internal error")},T=function(){if(f(),Ry(a)){const I=[a];for(let ee=0;ee<5&&Ry(u());ee++)f(),I.push(a);Vn(u())&&f();let F=parseInt(I.map(function(ee){return String.fromCharCode(ee)}).join(""),16);return F>px&&(F=65533),F}else return p()?65533:a},C=function(I,F){return!(I!==92||jo(F))},k=function(){return C(a,u())},$=function(I,F,ee){return I===45?Lo(F)||F===45||C(F,ee):Lo(I)?!0:I===92?C(I,F):!1},V=function(){return $(a,u(1),u(2))},R=function(I,F,ee){return I===43||I===45?!!(Mt(F)||F===46&&Mt(ee)):I===46?!!Mt(F):!!Mt(I)},G=function(){return R(a,u(1),u(2))},Z=function(){let I="";for(;f();)if(Ly(a))I+=Je(a);else if(k())I+=Je(T());else return d(),I;throw new Error("Internal parse error")},H=function(){let I="",F="integer";for((u()===43||u()===45)&&(f(),I+=Je(a));Mt(u());)f(),I+=Je(a);if(u(1)===46&&Mt(u(2)))for(f(),I+=Je(a),f(),I+=Je(a),F="number";Mt(u());)f(),I+=Je(a);const ee=u(1),ve=u(2),z=u(3);if((ee===69||ee===101)&&Mt(ve))for(f(),I+=Je(a),f(),I+=Je(a),F="number";Mt(u());)f(),I+=Je(a);else if((ee===69||ee===101)&&(ve===43||ve===45)&&Mt(z))for(f(),I+=Je(a),f(),I+=Je(a),f(),I+=Je(a),F="number";Mt(u());)f(),I+=Je(a);const Q=L(I);return{type:F,value:Q,repr:I}},L=function(I){return+I},ie=function(){for(;f();){if(a===41||p())return;k()&&T()}};let le=0;for(;!p(u());)if(s.push(m()),le++,le>e.length*2)throw new Error("I'm infinite-looping!");return s}class Ye{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class D0 extends Ye{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Do extends Ye{constructor(){super(...arguments),this.tokenType="BADURL"}}class Fo extends Ye{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class B0 extends Ye{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class U0 extends Ye{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class z0 extends Ye{constructor(){super(...arguments),this.tokenType=":"}}class H0 extends Ye{constructor(){super(...arguments),this.tokenType=";"}}class q0 extends Ye{constructor(){super(...arguments),this.tokenType=","}}class wr extends Ye{constructor(){super(...arguments),this.value="",this.mirror=""}}class $0 extends wr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class I0 extends wr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class V0 extends wr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class vh extends wr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class G0 extends wr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Hh extends wr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class mx extends Ye{constructor(){super(...arguments),this.tokenType="~="}}class yx extends Ye{constructor(){super(...arguments),this.tokenType="|="}}class bx extends Ye{constructor(){super(...arguments),this.tokenType="^="}}class vx extends Ye{constructor(){super(...arguments),this.tokenType="$="}}class Sx extends Ye{constructor(){super(...arguments),this.tokenType="*="}}class K0 extends Ye{constructor(){super(...arguments),this.tokenType="||"}}class Bo extends Ye{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ot extends Ye{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Je(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
52
+ `:this.value}}class xr extends Ye{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class qh extends xr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return rl(this.value)}}class Ga extends xr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return rl(this.value)+"("}}class Y0 extends xr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+rl(this.value)}}class X0 extends xr{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+rl(this.value):"#"+xx(this.value)}}class $h extends xr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+Z0(this.value)+'"'}}class P0 extends xr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Z0(this.value)+'")'}}class F0 extends Ye{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class Q0 extends Ye{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class wx extends Ye{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let i=rl(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||Fe(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function rl(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let s=0;s<n.length;s++){const a=n.charCodeAt(s);if(a===0)throw new zh("Invalid character: the input contains U+0000.");Fe(a,1,31)||a===127||s===0&&Fe(a,48,57)||s===1&&Fe(a,48,57)&&i===45?e+="\\"+a.toString(16)+" ":a>=128||a===45||a===95||Fe(a,48,57)||Fe(a,65,90)||Fe(a,97,122)?e+=n[s]:e+="\\"+n[s]}return e}function xx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new zh("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||Fe(s,48,57)||Fe(s,65,90)||Fe(s,97,122)?e+=n[i]:e+="\\"+s.toString(16)+" "}return e}function Z0(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new zh("Invalid character: the input contains U+0000.");Fe(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+n[i]:e+=n[i]}return e}class Ot extends Error{}function _x(n,e){let i;try{i=j0(n),i[i.length-1]instanceof Bo||i.push(new Bo)}catch(L){const ie=L.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,le=(L.stack||"").indexOf(L.message);throw le!==-1&&(L.stack=L.stack.substring(0,le)+ie+L.stack.substring(le+L.message.length)),L.message=ie,L}const s=i.find(L=>L instanceof Y0||L instanceof D0||L instanceof Do||L instanceof K0||L instanceof B0||L instanceof U0||L instanceof H0||L instanceof $0||L instanceof I0||L instanceof P0||L instanceof Q0);if(s)throw new Ot(`Unsupported token "${s.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let a=0;const o=new Set;function u(){return new Ot(`Unexpected token "${i[a].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[a]instanceof Fo;)a++}function d(L=a){return i[L]instanceof qh}function p(L=a){return i[L]instanceof $h}function m(L=a){return i[L]instanceof F0}function y(L=a){return i[L]instanceof q0}function b(L=a){return i[L]instanceof G0}function v(L=a){return i[L]instanceof Hh}function E(L=a){return i[L]instanceof Ga}function x(L=a){return i[L]instanceof ot&&i[L].value==="*"}function T(L=a){return i[L]instanceof Bo}function C(L=a){return i[L]instanceof ot&&[">","+","~"].includes(i[L].value)}function k(L=a){return y(L)||v(L)||T(L)||C(L)||i[L]instanceof Fo}function $(){const L=[V()];for(;f(),!!y();)a++,L.push(V());return L}function V(){return f(),m()||p()?i[a++].value:R()}function R(){const L={simples:[]};for(f(),C()?L.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):L.simples.push({selector:G(),combinator:""});;){if(f(),C())L.simples[L.simples.length-1].combinator=i[a++].value,f();else if(k())break;L.simples.push({combinator:"",selector:G()})}return L}function G(){let L="";const ie=[];for(;!k();)if(d()||x())L+=i[a++].toSource();else if(i[a]instanceof X0)L+=i[a++].toSource();else if(i[a]instanceof ot&&i[a].value===".")if(a++,d())L+="."+i[a++].toSource();else throw u();else if(i[a]instanceof z0)if(a++,d())if(!e.has(i[a].value.toLowerCase()))L+=":"+i[a++].toSource();else{const le=i[a++].value.toLowerCase();ie.push({name:le,args:[]}),o.add(le)}else if(E()){const le=i[a++].value.toLowerCase();if(e.has(le)?(ie.push({name:le,args:$()}),o.add(le)):L+=`:${le}(${Z()})`,f(),!v())throw u();a++}else throw u();else if(i[a]instanceof V0){for(L+="[",a++;!(i[a]instanceof vh)&&!T();)L+=i[a++].toSource();if(!(i[a]instanceof vh))throw u();L+="]",a++}else throw u();if(!L&&!ie.length)throw u();return{css:L||void 0,functions:ie}}function Z(){let L="",ie=1;for(;!T()&&((b()||E())&&ie++,v()&&ie--,!!ie);)L+=i[a++].toSource();return L}const H=$();if(!T())throw u();if(H.some(L=>typeof L!="object"||!("simples"in L)))throw new Ot(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:H,names:Array.from(o)}}const Sh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Tx=new Set(["left-of","right-of","above","below","near"]),J0=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 al(n){const e=Nx(n),i=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const a=_x(s.body,J0);i.push({name:"css",body:a.selector,source:s.body});continue}if(Sh.has(s.name)){let a,o;try{const p=JSON.parse("["+s.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Ot(`Malformed selector: ${s.name}=`+s.body);if(a=p[0],p.length===2){if(typeof p[1]!="number"||!Tx.has(s.name))throw new Ot(`Malformed selector: ${s.name}=`+s.body);o=p[1]}}catch{throw new Ot(`Malformed selector: ${s.name}=`+s.body)}const u={name:s.name,source:s.body,body:{parsed:al(a),distance:o}},f=[...u.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&Ex(u.body.parsed.parts.slice(0,d+1),i.slice(0,d+1))&&u.body.parsed.parts.splice(0,d+1),i.push(u);continue}i.push({...s,source:s.body})}if(Sh.has(i[0].name))throw new Ot(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function Ex(n,e){return Xn({parts:n})===Xn({parts:e})}function Xn(n,e){return typeof n=="string"?n:n.parts.map((i,s)=>{let a=!0;!e&&s!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(a=!1);const o=a?i.name+"=":"";return`${s===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function Ax(n,e){const i=(s,a)=>{for(const o of s.parts)e(o,a),Sh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function Nx(n){let e=0,i,s=0;const a={parts:[]},o=()=>{const f=n.substring(s,e).trim(),d=f.indexOf("=");let p,m;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=f.substring(0,d).trim(),m=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(p="text",m=f):/^\(*\/\//.test(f)||f.startsWith("..")?(p="xpath",m=f):(p="css",m=f);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),a.parts.push({name:p,body:m}),y){if(a.capture!==void 0)throw new Ot("Only one of the selectors can capture using * modifier");a.capture=a.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),a;const u=()=>{const d=n.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<n.length;){const f=n[e];f==="\\"&&e+1<n.length?e+=2:f===i?(i=void 0,e++):!i&&(f==='"'||f==="'"||f==="`")&&!u()?(i=f,e++):!i&&f===">"&&n[e+1]===">"?(o(),e+=2,s=e):e++}return o(),a}function as(n,e){let i=0,s=n.length===0;const a=()=>n[i]||"",o=()=>{const T=a();return++i,s=i>=n.length,T},u=T=>{throw s?new Ot(`Unexpected end of selector while parsing selector \`${n}\``):new Ot(`Error while parsing selector \`${n}\` - unexpected symbol "${a()}" at position ${i}`+(T?" during "+T:""))};function f(){for(;!s&&/\s/.test(a());)o()}function d(T){return T>="€"||T>="0"&&T<="9"||T>="A"&&T<="Z"||T>="a"&&T<="z"||T>="0"&&T<="9"||T==="_"||T==="-"}function p(){let T="";for(f();!s&&d(a());)T+=o();return T}function m(T){let C=o();for(C!==T&&u("parsing quoted string");!s&&a()!==T;)a()==="\\"&&o(),C+=o();return a()!==T&&u("parsing quoted string"),C+=o(),C}function y(){o()!=="/"&&u("parsing regular expression");let T="",C=!1;for(;!s;){if(a()==="\\")T+=o(),s&&u("parsing regular expression");else if(C&&a()==="]")C=!1;else if(!C&&a()==="[")C=!0;else if(!C&&a()==="/")break;T+=o()}o()!=="/"&&u("parsing regular expression");let k="";for(;!s&&a().match(/[dgimsuy]/);)k+=o();try{return new RegExp(T,k)}catch($){throw new Ot(`Error while parsing selector \`${n}\`: ${$.message}`)}}function b(){let T="";return f(),a()==="'"||a()==='"'?T=m(a()).slice(1,-1):T=p(),T||u("parsing property path"),T}function v(){f();let T="";return s||(T+=o()),!s&&T!=="="&&(T+=o()),["=","*=","^=","$=","|=","~="].includes(T)||u("parsing operator"),T}function E(){o();const T=[];for(T.push(b()),f();a()===".";)o(),T.push(b()),f();if(a()==="]")return o(),{name:T.join("."),jsonPath:T,op:"<truthy>",value:null,caseSensitive:!1};const C=v();let k,$=!0;if(f(),a()==="/"){if(C!=="=")throw new Ot(`Error while parsing selector \`${n}\` - cannot use ${C} in attribute with regular expression`);k=y()}else if(a()==="'"||a()==='"')k=m(a()).slice(1,-1),f(),a()==="i"||a()==="I"?($=!1,o()):(a()==="s"||a()==="S")&&($=!0,o());else{for(k="";!s&&(d(a())||a()==="+"||a()===".");)k+=o();k==="true"?k=!0:k==="false"?k=!1:e||(k=+k,Number.isNaN(k)&&u("parsing attribute value"))}if(f(),a()!=="]"&&u("parsing attribute value"),o(),C!=="="&&typeof k!="string")throw new Ot(`Error while parsing selector \`${n}\` - cannot use ${C} in attribute with non-string matching value - ${k}`);return{name:T.join("."),jsonPath:T,op:C,value:k,caseSensitive:$}}const x={name:"",attributes:[]};for(x.name=p(),f();a()==="[";)x.attributes.push(E()),f();if(s||u(void 0),!x.name&&!x.attributes.length)throw new Ot(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function oc(n,e="'"){const i=JSON.stringify(n),s=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function Qo(n){return n.charAt(0).toUpperCase()+n.substring(1)}function W0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function lr(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let Zi;function Cx(){Zi=new Map}function Tt(n){let e=Zi==null?void 0:Zi.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Zi==null||Zi.set(n,e)),e}function cc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function eb(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Rt(n,e){return typeof n!="string"?eb(n):`${JSON.stringify(n)}${e?"s":"i"}`}function xt(n,e){return typeof n!="string"?eb(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function kx(n,e,i=""){if(n.length<=e)return n;const s=[...n];return s.length>e?s.slice(0,e-i.length).join("")+i:s.join("")}function jy(n,e){return kx(n,e,"…")}function Zo(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mx(n,e){const i=n.length,s=e.length;let a=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(s+1).fill(0));for(let f=1;f<=i;f++)for(let d=1;d<=s;d++)n[f-1]===e[d-1]&&(u[f][d]=u[f-1][d-1]+1,u[f][d]>a&&(a=u[f][d],o=f));return n.slice(o-a,o)}function Ox(n,e){try{const i=al(e),s=Rx(i);return s||ts(new nb[n],i,!1,1)[0]}catch{return e}}function Rx(n){const e=n.parts[n.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const i=JSON.parse(e.body);if(typeof i=="string")return i}}function ls(n,e,i=!1){return tb(n,e,i,1)[0]}function tb(n,e,i=!1,s=20,a){try{return ts(new nb[n](a),al(e),i,s)}catch{return[e]}}function ts(n,e,i=!1,s=20){const a=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<a.length;f++){const d=a[f],p=u;if(u="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?o.push([n.generateLocator(p,"first",""),n.generateLocator(p,"nth","0")]):d.body==="-1"?o.push([n.generateLocator(p,"last",""),n.generateLocator(p,"nth","-1")]):o.push([n.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){o.push([n.generateLocator(p,"visible",d.body),n.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:x}=Ma(d.body);o.push([n.generateLocator(p,"text",x,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:x}=Ma(d.body);if(!E){o.push([n.generateLocator(p,"has-text",x,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:x}=Ma(d.body);if(!E){o.push([n.generateLocator(p,"has-not-text",x,{exact:E})]);continue}}if(d.name==="internal:has"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"has",x)));continue}if(d.name==="internal:has-not"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"hasNot",x)));continue}if(d.name==="internal:and"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"and",x)));continue}if(d.name==="internal:or"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"or",x)));continue}if(d.name==="internal:chain"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"chain",x)));continue}if(d.name==="internal:label"){const{exact:E,text:x}=Ma(d.body);o.push([n.generateLocator(p,"label",x,{exact:E})]);continue}if(d.name==="internal:role"){const E=as(d.body,!0),x={attrs:[]};for(const T of E.attributes)T.name==="name"?(x.exact=T.caseSensitive,x.name=T.value):(T.name==="level"&&typeof T.value=="string"&&(T.value=+T.value),x.attrs.push({name:T.name==="include-hidden"?"includeHidden":T.name,value:T.value}));o.push([n.generateLocator(p,"role",E.name,x)]);continue}if(d.name==="internal:testid"){const E=as(d.body,!0),{value:x}=E.attributes[0];o.push([n.generateLocator(p,"test-id",x)]);continue}if(d.name==="internal:attr"){const E=as(d.body,!0),{name:x,value:T,caseSensitive:C}=E.attributes[0],k=T,$=!!C;if(x==="placeholder"){o.push([n.generateLocator(p,"placeholder",k,{exact:$})]);continue}if(x==="alt"){o.push([n.generateLocator(p,"alt",k,{exact:$})]);continue}if(x==="title"){o.push([n.generateLocator(p,"title",k,{exact:$})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=o[o.length-1],x=a[f-1],T=E.map(C=>n.chainLocators([C,n.generateLocator(p,"frame","")]));["xpath","css"].includes(x.name)&&T.push(n.generateLocator(p,"frame-locator",Xn({parts:[x]})),n.generateLocator(p,"frame-locator",Xn({parts:[x]},!0))),E.splice(0,E.length,...T),u="frame-locator";continue}const m=a[f+1],y=Xn({parts:[d]}),b=n.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:E,text:x}=Ma(m.body);if(!E){const T=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),C={};m.name==="internal:has-text"?C.hasText=x:C.hasNotText=x;const k=n.generateLocator(p,"default",y,C);o.push([n.chainLocators([b,T]),k]),f++;continue}}let v;if(["xpath","css"].includes(d.name)){const E=Xn({parts:[d]},!0);v=n.generateLocator(p,"default",E)}o.push([b,v].filter(Boolean))}return Lx(n,o,s)}function Lx(n,e,i){const s=e.map(()=>""),a=[],o=u=>{if(u===e.length)return a.push(n.chainLocators(s)),a.length<i;for(const f of e[u])if(s[u]=f,!o(u+1))return!1;return!0};return o(0),a}function Ma(n){let e=!1;const i=n.match(/^\/(.*)\/([igm]*)$/);return i?{text:new RegExp(i[1],i[2])}:(n.endsWith('"')?(n=JSON.parse(n),e=!0):n.endsWith('"s')?(n=JSON.parse(n.substring(0,n.length-1)),e=!0):n.endsWith('"i')&&(n=JSON.parse(n.substring(0,n.length-1)),e=!1),{exact:e,text:n})}class jx{constructor(e){this.preferredQuote=e}generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(a.hasNotText)} })`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${s==="true"?"true":"false"} })`;case"role":const o=[];ct(a.name)?o.push(`name: ${this.regexToSourceString(a.name)}`):typeof a.name=="string"&&(o.push(`name: ${this.quote(a.name)}`),a.exact&&o.push("exact: true"));for(const{name:f,value:d}of a.attrs)o.push(`${f}: ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(s)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(s)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(s)} })`;case"has":return`filter({ has: ${s} })`;case"hasNot":return`filter({ hasNot: ${s} })`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("getByText",s,!!a.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("getByLabel",s,!!a.exact);case"title":return this.toCallWithExact("getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return cc(String(e))}toCallWithExact(e,i,s){return ct(i)?`${e}(${this.regexToSourceString(i)})`:s?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return ct(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return ct(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return oc(e,this.preferredQuote??"'")}}class Dx{generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(a.hasText)})`:a.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(a.hasNotText)})`:`locator(${this.quote(s)})`;case"frame-locator":return`frame_locator(${this.quote(s)})`;case"frame":return"content_frame";case"nth":return`nth(${s})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${s==="true"?"True":"False"})`;case"role":const o=[];ct(a.name)?o.push(`name=${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`name=${this.quote(a.name)}`),a.exact&&o.push("exact=True"));for(const{name:f,value:d}of a.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),o.push(`${W0(f)}=${p}`)}const u=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(s)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(s)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(s)})`;case"has":return`filter(has=${s})`;case"hasNot":return`filter(has_not=${s})`;case"and":return`and_(${s})`;case"or":return`or_(${s})`;case"chain":return`locator(${s})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("get_by_text",s,!!a.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!a.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!a.exact);case"label":return this.toCallWithExact("get_by_label",s,!!a.exact);case"title":return this.toCallWithExact("get_by_title",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${cc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,s){return ct(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return ct(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return ct(e)?this.regexToString(e):this.quote(e)}quote(e){return oc(e,'"')}}class Bx{generateLocator(e,i,s,a={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(a.hasText)}))`:a.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(a.hasNotText)}))`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const u=[];ct(a.name)?u.push(`.setName(${this.regexToString(a.name)})`):typeof a.name=="string"&&(u.push(`.setName(${this.quote(a.name)})`),a.exact&&u.push(".setExact(true)"));for(const{name:d,value:p}of a.attrs)u.push(`.set${Qo(d)}(${typeof p=="string"?this.quote(p):p})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${W0(s).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${s}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${s}))`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact(o,"getByText",s,!!a.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!a.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(cc(e.source))}${i})`}toCallWithExact(e,i,s,a){return ct(s)?`${i}(${this.regexToString(s)})`:a?`${i}(${this.quote(s)}, new ${e}.${Qo(i)}Options().setExact(true))`:`${i}(${this.quote(s)})`}toHasText(e){return ct(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return ct(e)?this.regexToString(e):this.quote(e)}quote(e){return oc(e,'"')}}class Ux{generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(a.hasNotText)} })`:`Locator(${this.quote(s)})`;case"frame-locator":return`FrameLocator(${this.quote(s)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${s})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${s==="true"?"true":"false"} })`;case"role":const o=[];ct(a.name)?o.push(`NameRegex = ${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`Name = ${this.quote(a.name)}`),a.exact&&o.push("Exact = true"));for(const{name:f,value:d}of a.attrs)o.push(`${Qo(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${Qo(s)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(s)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(s)} })`;case"has":return`Filter(new() { Has = ${s} })`;case"hasNot":return`Filter(new() { HasNot = ${s} })`;case"and":return`And(${s})`;case"or":return`Or(${s})`;case"chain":return`Locator(${s})`;case"test-id":return`GetByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("GetByText",s,!!a.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!a.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(cc(e.source))}${i})`}toCallWithExact(e,i,s){return ct(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return ct(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return ct(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return ct(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return oc(e,'"')}}class zx{generateLocator(e,i,s,a={}){return JSON.stringify({kind:i,body:s,options:a})}chainLocators(e){const i=e.map(s=>JSON.parse(s));for(let s=0;s<i.length-1;++s)i[s].next=i[s+1];return JSON.stringify(i[0])}}const nb={javascript:jx,python:Dx,java:Bx,csharp:Ux,jsonl:zx};function ct(n){return n instanceof RegExp}const Dy=new Map;function Hx({name:n,rootItem:e,render:i,title:s,icon:a,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:b,noItemsMessage:v,dataTestId:E,autoExpandDepth:x}){const T=q.useMemo(()=>qx(e,f,y.expandedItems,x||0,u),[e,f,y,x,u]),C=q.useRef(null),[k,$]=q.useState(),[V,R]=q.useState(!1);q.useEffect(()=>{m==null||m(k)},[m,k]),q.useEffect(()=>{const H=C.current;if(!H)return;const L=()=>{Dy.set(n,H.scrollTop)};return H.addEventListener("scroll",L,{passive:!0}),()=>H.removeEventListener("scroll",L)},[n]),q.useEffect(()=>{C.current&&(C.current.scrollTop=Dy.get(n)||0)},[n]);const G=q.useCallback(H=>{const{expanded:L}=T.get(H);if(L){for(let ie=f;ie;ie=ie.parent)if(ie===H){p==null||p(H);break}y.expandedItems.set(H.id,!1)}else y.expandedItems.set(H.id,!0);b({...y})},[T,f,p,y,b]),Z=q.useCallback(H=>{const{expanded:L}=T.get(H),ie=[H];for(;ie.length;){const le=ie.pop();ie.push(...le.children),y.expandedItems.set(le.id,!L)}b({...y})},[T,y,b]);return S.jsx("div",{className:Ke("tree-view vbox",n+"-tree-view"),"data-testid":E||n+"-tree",children:S.jsxs("div",{className:Ke("tree-view-content"),role:T.size>0?"tree":void 0,tabIndex:0,onKeyDown:H=>{if(f&&H.key==="Enter"){d==null||d(f);return}if(H.key!=="ArrowDown"&&H.key!=="ArrowUp"&&H.key!=="ArrowLeft"&&H.key!=="ArrowRight")return;if(H.stopPropagation(),H.preventDefault(),f&&H.key==="ArrowLeft"){const{expanded:ie,parent:le}=T.get(f);ie?(y.expandedItems.set(f.id,!1),b({...y})):le&&(p==null||p(le));return}if(f&&H.key==="ArrowRight"){f.children.length&&(y.expandedItems.set(f.id,!0),b({...y}));return}let L=f;if(H.key==="ArrowDown"&&(f?L=T.get(f).next:T.size&&(L=[...T.keys()][0])),H.key==="ArrowUp"){if(f)L=T.get(f).prev;else if(T.size){const ie=[...T.keys()];L=ie[ie.length-1]}}m==null||m(void 0),L&&(R(!0),p==null||p(L)),$(void 0)},ref:C,children:[v&&T.size===0&&S.jsx("div",{className:"tree-view-empty",children:v}),e.children.map(H=>T.get(H)&&S.jsx(ib,{item:H,treeItems:T,selectedItem:f,onSelected:p,onAccepted:d,isError:o,toggleExpanded:G,toggleSubtree:Z,highlightedItem:k,setHighlightedItem:$,render:i,icon:a,title:s,isKeyboardNavigation:V,setIsKeyboardNavigation:R},H.id))]})})}function ib({item:n,treeItems:e,selectedItem:i,onSelected:s,highlightedItem:a,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:b,isKeyboardNavigation:v,setIsKeyboardNavigation:E}){const x=q.useId(),T=q.useRef(null);q.useEffect(()=>{i===n&&v&&T.current&&(N0(T.current),E(!1))},[n,i,v,E]);const C=e.get(n),k=C.depth,$=C.expanded;let V="codicon-blank";typeof $=="boolean"&&(V=$?"codicon-chevron-down":"codicon-chevron-right");const R=m(n),G=$&&n.children.length?n.children:[],Z=y==null?void 0:y(n),H=(b==null?void 0:b(n))||"codicon-blank";return S.jsxs("div",{ref:T,role:"treeitem","aria-selected":n===i,"aria-expanded":$,"aria-controls":x,title:Z,className:"vbox",style:{flex:"none"},children:[S.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:Ke("tree-view-entry",i===n&&"selected",a===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>s==null?void 0:s(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[k?new Array(k).fill(0).map((L,ie)=>S.jsx("div",{className:"tree-view-indent"},"indent-"+ie)):void 0,S.jsx("div",{"aria-hidden":"true",className:"codicon "+V,style:{minWidth:16,marginRight:4},onDoubleClick:L=>{L.preventDefault(),L.stopPropagation()},onClick:L=>{L.stopPropagation(),L.preventDefault(),L.altKey?p(n):d(n)}}),b&&S.jsx("div",{className:"codicon "+H,style:{minWidth:16,marginRight:4},"aria-label":"["+H.replace("codicon","icon")+"]"}),typeof R=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:R}):R]}),!!G.length&&S.jsx("div",{id:x,role:"group",children:G.map(L=>e.get(L)&&S.jsx(ib,{item:L,treeItems:e,selectedItem:i,onSelected:s,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:p,highlightedItem:a,setHighlightedItem:o,render:m,title:y,icon:b,isKeyboardNavigation:v,setIsKeyboardNavigation:E},L.id))})]})}function qx(n,e,i,s,a=()=>!0){if(!a(n))return new Map;const o=new Map,u=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)u.add(p.id);let f=null;const d=(p,m)=>{for(const y of p.children){if(!a(y))continue;const b=u.has(y.id)||i.get(y.id),v=s>m&&o.size<25&&b!==!1,E=y.children.length?b??v:void 0,x={depth:m,expanded:E,parent:n===p?null:p,next:null,prev:f};f&&(o.get(f).next=y),f=y,o.set(y,x),E&&d(y,m+1)}};return d(n,0),o}const Dt=q.forwardRef(function({children:e,title:i="",icon:s,disabled:a=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:p,ariaLabel:m},y){return S.jsxs("button",{ref:y,className:Ke(p,"toolbar-button",s,o&&"toggled"),onMouseDown:By,onClick:u,onDoubleClick:By,title:i,disabled:!!a,style:f,"data-testid":d,"aria-label":m||i,children:[s&&S.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),By=n=>{n.stopPropagation(),n.preventDefault()};function sb(n){return n==="scheduled"?"codicon-clock":n==="running"?"codicon-loading":n==="failed"?"codicon-error":n==="passed"?"codicon-check":n==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function $x(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const Ix=Hx,Vx=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:s,treeState:a,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:d,revealConsole:p,revealActionAttachment:m,isLive:y})=>{const{rootItem:b,itemMap:v}=q.useMemo(()=>ix(n),[n]),{selectedItem:E}=q.useMemo(()=>({selectedItem:e?v.get(e.callId):void 0}),[v,e]),x=q.useCallback(R=>{var G,Z;return!!((Z=(G=R.action)==null?void 0:G.error)!=null&&Z.message)},[]),T=q.useCallback(R=>s({minimum:R.action.startTime,maximum:R.action.endTime}),[s]),C=q.useCallback(R=>{var Z,H;const G=!!m&&!!((H=(Z=R.action)==null?void 0:Z.attachments)!=null&&H.length);return Ih(R.action,{sdkLanguage:u,revealConsole:p,revealActionAttachment:()=>m==null?void 0:m(R.action.callId),isLive:y,showDuration:!0,showBadges:!0,showAttachments:G})},[y,p,m,u]),k=q.useCallback(R=>!i||!R.action||R.action.startTime<=i.maximum&&R.action.endTime>=i.minimum,[i]),$=q.useCallback(R=>{f==null||f(R.action)},[f]),V=q.useCallback(R=>{d==null||d(R==null?void 0:R.action)},[d]);return S.jsxs("div",{className:"vbox",children:[i&&S.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[S.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),S.jsx(Ix,{name:"actions",rootItem:b,treeState:a,setTreeState:o,selectedItem:E,onSelected:$,onHighlighted:V,onAccepted:T,isError:x,isVisible:k,render:C})]})},Ih=(n,e)=>{var T;const{sdkLanguage:i,revealConsole:s,revealActionAttachment:a,isLive:o,showDuration:u,showBadges:f,showAttachments:d}=e,{errors:p,warnings:m}=rx(n),y=n.params.selector?Ox(i||"javascript",n.params.selector):void 0,b=n.class==="Test"&&n.method==="test.step"&&((T=n.annotations)==null?void 0:T.some(C=>C.type==="skip"));let v="";n.endTime?v=_t(n.endTime-n.startTime):n.error?v="Timed out":o||(v="-");const{elements:E,title:x}=rb(n);return S.jsxs("div",{className:"action-title vbox",children:[S.jsxs("div",{className:"hbox",children:[S.jsx("span",{className:"action-title-method",title:x,children:E}),(u||f||d||b)&&S.jsx("div",{className:"spacer"}),d&&S.jsx(Dt,{icon:"attach",title:"Open Attachment",onClick:()=>a==null?void 0:a()}),u&&!b&&S.jsx("div",{className:"action-duration",children:v||S.jsx("span",{className:"codicon codicon-loading"})}),b&&S.jsx("span",{className:Ke("action-skipped","codicon",sb("skipped")),title:"skipped"}),f&&S.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!p&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-error"}),S.jsx("span",{className:"action-icon-value",children:p})]}),!!m&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-warning"}),S.jsx("span",{className:"action-icon-value",children:m})]})]})]}),y&&S.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function rb(n){var f;const e=n.title??((f=k0.get(n.class+"."+n.method))==null?void 0:f.title)??n.method,i=[],s=[];let a=0;const o=/\{([^}]+)\}/g;let u;for(;(u=o.exec(e))!==null;){const[d,p]=u,m=e.slice(a,u.index);i.push(m),s.push(m);const y=Pw(n.params,p);y===void 0?(i.push(d),s.push(d)):u.index===0?(i.push(y),s.push(y)):(i.push(S.jsx("span",{className:"action-title-param",children:y},i.length)),s.push(y)),a=u.index+d.length}if(a<e.length){const d=e.slice(a);i.push(d),s.push(d)}return{elements:i,title:s.join("")}}const Vh=({value:n,description:e})=>{const[i,s]=q.useState("copy"),a=q.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[n]);return S.jsx(Dt,{title:e||"Copy",icon:i,onClick:a})},Uo=({value:n,description:e,copiedDescription:i=e,style:s})=>{const[a,o]=q.useState(!1),u=q.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return S.jsx(Dt,{style:s,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:a?i:e})},us=({text:n})=>S.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),Gx=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const s=q.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return S.jsx(us,{text:"No action selected"});const a=n.startTime-e,o=_t(a),{title:u}=rb(n);return S.jsxs("div",{className:"call-tab",children:[S.jsx("div",{className:"call-line",children:u}),S.jsx("div",{className:"call-section",children:"Time"}),_o({name:"start",type:"literal",text:o}),_o({name:"duration",type:"literal",text:Kx(n)}),!!s.length&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Parameters"}),s.map(f=>_o(Uy(n,f,n.params[f],i)))]}),!!n.result&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>_o(Uy(n,f,n.result[f],i)))]})]})};function Kx(n){return n.endTime?_t(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function _o(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),S.jsxs("div",{className:"call-line",children:[n.name,":",S.jsx("span",{className:Ke("call-value",n.type),title:n.text,children:e}),["literal","string","number","object","locator"].includes(n.type)&&S.jsx(Vh,{value:n.text})]},n.name)}function Uy(n,e,i,s){const a=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&a)&&(i=Jo(i.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&a||e==="received"&&n.method==="expect")&&(i=Jo(i,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:ls(s||"javascript",n.params.selector),type:"locator",name:"locator"};const o=typeof i;return o!=="object"||i===null?{text:String(i),type:o,name:e}:i.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(i).slice(0,1e3),type:"object",name:e}}function Jo(n,e){if(n.n!==void 0)return n.n;if(n.s!==void 0)return n.s;if(n.b!==void 0)return n.b;if(n.v!==void 0){if(n.v==="undefined")return;if(n.v==="null")return null;if(n.v==="NaN")return NaN;if(n.v==="Infinity")return 1/0;if(n.v==="-Infinity")return-1/0;if(n.v==="-0")return-0}if(n.d!==void 0)return new Date(n.d);if(n.r!==void 0)return new RegExp(n.r.p,n.r.f);if(n.a!==void 0)return n.a.map(i=>Jo(i,e));if(n.o!==void 0){const i={};for(const{k:s,v:a}of n.o)i[s]=Jo(a,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const zy=new Map;function uc({name:n,items:e=[],id:i,render:s,icon:a,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:b,noItemsMessage:v,dataTestId:E,notSelectable:x,ariaLabel:T}){const C=q.useRef(null),[k,$]=q.useState();return q.useEffect(()=>{y==null||y(k)},[y,k]),q.useEffect(()=>{const V=C.current;if(!V)return;const R=()=>{zy.set(n,V.scrollTop)};return V.addEventListener("scroll",R,{passive:!0}),()=>V.removeEventListener("scroll",R)},[n]),q.useEffect(()=>{C.current&&(C.current.scrollTop=zy.get(n)||0)},[n]),S.jsx("div",{className:Ke("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":T,children:S.jsxs("div",{className:Ke("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:V=>{var H;if(d&&V.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(V.key!=="ArrowDown"&&V.key!=="ArrowUp")return;V.stopPropagation(),V.preventDefault();const R=d?e.indexOf(d):-1;let G=R;V.key==="ArrowDown"&&(R===-1?G=0:G=Math.min(R+1,e.length-1)),V.key==="ArrowUp"&&(R===-1?G=e.length-1:G=Math.max(R-1,0));const Z=(H=C.current)==null?void 0:H.children.item(G);N0(Z||void 0),y==null||y(void 0),m==null||m(e[G],G),$(void 0)},ref:C,children:[v&&e.length===0&&S.jsx("div",{className:"list-view-empty",children:v}),e.map((V,R)=>{const G=s(V,R);return S.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(V,R),role:"listitem",className:Ke("list-view-entry",d===V&&"selected",!x&&k===V&&"highlighted",(o==null?void 0:o(V,R))&&"error",(u==null?void 0:u(V,R))&&"warning",(f==null?void 0:f(V,R))&&"info"),"aria-selected":d===V,onClick:()=>m==null?void 0:m(V,R),onMouseEnter:()=>$(V),onMouseLeave:()=>$(void 0),children:[a&&S.jsx("div",{className:"codicon "+(a(V,R)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:Z=>{Z.preventDefault(),Z.stopPropagation()},onClick:Z=>{Z.stopPropagation(),Z.preventDefault(),b==null||b(V,R)}}),typeof G=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:G}):G]},(i==null?void 0:i(V,R))||R)})]})})}const Yx=uc,Xx=({action:n,isLive:e})=>{const i=q.useMemo(()=>{var u;if(!n||!n.log.length)return[];const s=n.log,a=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<s.length;++f){let d="";if(s[f].time!==-1){const p=(u=s[f])==null?void 0:u.time;f+1<s.length?d=_t(s[f+1].time-p):n.endTime>0?d=_t(n.endTime-p):e?d=_t(Date.now()-a-p):d="-"}o.push({message:s[f].message,time:d})}return o},[n,e]);return i.length?S.jsx(Yx,{name:"log",ariaLabel:"Log entries",items:i,render:s=>S.jsxs("div",{className:"log-list-item",children:[S.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):S.jsx(us,{text:"No log entries"})};function Wa(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let a,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(a=i.exec(n))!==null;){const[,,p,,m]=a;if(p){const y=+p;switch(y){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:u=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["text-decoration"];break;case 27:u=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:f=Hy[y-30];break;case 39:f=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=Hy[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:f=qy[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=qy[y-100];break}}else if(m){const y={...o},b=u?d:f;b!==void 0&&(y.color=b);const v=u?f:d;v!==void 0&&(y["background-color"]=v),s.push(`<span style="${Fx(y)}">${Px(m)}</span>`)}}return s.join("")}const Hy={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)"},qy={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 Px(n){return n.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function Fx(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const Qx=({error:n})=>{const e=q.useMemo(()=>Wa(n),[n]);return S.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},ab=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:s})=>(mt.useEffect(()=>{const a=document.createElement("div");return a.style.position="fixed",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.left="0",a.style.zIndex="9999",a.style.cursor=n,document.body.appendChild(a),e&&a.addEventListener("mousemove",e),i&&a.addEventListener("mouseup",i),s&&document.body.addEventListener("dblclick",s),()=>{e&&a.removeEventListener("mousemove",e),i&&a.removeEventListener("mouseup",i),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(a)}},[n,e,i,s]),S.jsx(S.Fragment,{})),Zx={position:"absolute",top:0,right:0,bottom:0,left:0},lb=({orientation:n,offsets:e,setOffsets:i,resizerColor:s,resizerWidth:a,minColumnWidth:o})=>{const u=o||0,[f,d]=mt.useState(null),[p,m]=cs(),y={position:"absolute",right:n==="horizontal"?void 0:0,bottom:n==="horizontal"?0:void 0,width:n==="horizontal"?7:void 0,height:n==="horizontal"?void 0:7,borderTopWidth:n==="horizontal"?void 0:(7-a)/2,borderRightWidth:n==="horizontal"?(7-a)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-a)/2,borderLeftWidth:n==="horizontal"?(7-a)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return S.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-a)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&S.jsx(ab,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:b=>{if(!b.buttons)d(null);else if(f){const v=n==="horizontal"?b.clientX-f.clientX:b.clientY-f.clientY,E=f.offset+v,x=f.index>0?e[f.index-1]:0,T=n==="horizontal"?p.width:p.height,C=Math.min(Math.max(x+u,E),T-u)-e[f.index];for(let k=f.index;k<e.length;++k)e[k]=e[k]+C;i([...e])}}}),e.map((b,v)=>S.jsx("div",{style:{...y,top:n==="horizontal"?0:b,left:n==="horizontal"?b:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:b,index:v}),children:S.jsx("div",{style:{...Zx,background:s}})},v))]})};async function Jf(n){const e=new Image;return n&&(e.src=n,await new Promise((i,s)=>{e.onload=i,e.onerror=i})),e}const wh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
53
53
  linear-gradient(-45deg, #80808020 25%, transparent 25%),
54
54
  linear-gradient(45deg, transparent 75%, #80808020 75%),
55
55
  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,
56
56
  rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
57
57
  rgb(0 0 0 / 10%) 0px -2px 4px,
58
58
  rgb(0 0 0 / 15%) 0px -6.1px 12px,
59
- rgb(0 0 0 / 25%) 0px 6px 12px`},Qx=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[s,a]=q.useState(n.diff?"diff":"actual"),[o,u]=q.useState(!1),[f,d]=q.useState(null),[p,m]=q.useState("Expected"),[y,b]=q.useState(null),[v,E]=q.useState(null),[x,T]=cs();q.useEffect(()=>{(async()=>{var L,ie,le,I;d(await Jf((L=n.expected)==null?void 0:L.attachment.path)),m(((ie=n.expected)==null?void 0:ie.title)||"Expected"),b(await Jf((le=n.actual)==null?void 0:le.attachment.path)),E(await Jf((I=n.diff)==null?void 0:I.attachment.path))})()},[n]);const C=f&&y&&v,k=C?Math.max(f.naturalWidth,y.naturalWidth,200):500,$=C?Math.max(f.naturalHeight,y.naturalHeight,200):500,V=Math.min(1,(x.width-30)/k),R=Math.min(1,(x.width-50)/k/2),G=k*V,Z=$*V,H={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return S.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:T,children:C&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&S.jsx("div",{style:{...H,fontWeight:s==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),S.jsx("div",{style:{...H,fontWeight:s==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),S.jsx("div",{style:{...H,fontWeight:s==="expected"?600:"initial"},onClick:()=>a("expected"),children:p}),S.jsx("div",{style:{...H,fontWeight:s==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),S.jsx("div",{style:{...H,fontWeight:s==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),S.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:Z+60},children:[n.diff&&s==="diff"&&S.jsx(Gn,{image:v,alt:"Diff",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="actual"&&S.jsx(Gn,{image:y,alt:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="expected"&&S.jsx(Gn,{image:f,alt:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="slider"&&S.jsx(Zx,{expectedImage:f,actualImage:y,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V,expectedTitle:p}),n.diff&&s==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:R*k,canvasHeight:R*$,scale:R}),S.jsx(Gn,{image:o?v:y,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:R*k,canvasHeight:R*$,scale:R})]}),!n.diff&&s==="actual"&&S.jsx(Gn,{image:y,title:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="expected"&&S.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Gn,{image:f,title:p,canvasWidth:R*k,canvasHeight:R*$,scale:R}),S.jsx(Gn,{image:y,title:"Actual",canvasWidth:R*k,canvasHeight:R*$,scale:R})]})]}),!i&&S.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[S.jsx("div",{children:n.diff&&S.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},Zx=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:s,scale:a,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,p]=q.useState(i/2),m=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&S.jsxs("div",{style:{margin:5},children:[!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight}),!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&S.jsx("span",{children:e.naturalWidth}),!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&S.jsx("span",{children:e.naturalHeight})]}),S.jsxs("div",{style:{position:"relative",width:i,height:s,margin:15,...wh},children:[S.jsx(rb,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),S.jsx("img",{alt:o,style:{width:n.naturalWidth*a,height:n.naturalHeight*a},draggable:"false",src:n.src}),S.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...wh},children:S.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},Gn=({image:n,title:e,alt:i,hideSize:s,canvasWidth:a,canvasHeight:o,scale:u,onClick:f})=>S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&S.jsxs("div",{style:{margin:5},children:[e&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight})]}),S.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...wh},children:S.jsx("img",{width:n.naturalWidth*u,height:n.naturalHeight*u,alt:e||i,style:{cursor:f?"pointer":"initial"},draggable:"false",src:n.src,onClick:f})})]}),Jx="modulepreload",Wx=function(n,e){return new URL(n,e).href},$y={},e_=function(e,i,s){let a=Promise.resolve();if(i&&i.length>0){let u=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=u(i.map(m=>{if(m=Wx(m,s),m in $y)return;$y[m]=!0;const y=m.endsWith(".css"),b=y?'[rel="stylesheet"]':"";if(!!s)for(let x=f.length-1;x>=0;x--){const T=f[x];if(T.href===m&&(!y||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${b}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":Jx,y||(E.as="script"),E.crossOrigin="",E.href=m,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((x,T)=>{E.addEventListener("load",x),E.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return a.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},t_=20,br=({text:n,highlighter:e,mimeType:i,linkify:s,readOnly:a,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:b,placeholder:v})=>{const[E,x]=cs(),[T]=q.useState(e_(()=>import("./codeMirrorModule-DdzW2bmF.js"),__vite__mapDeps([0,1]),import.meta.url).then(V=>V.default)),C=q.useRef(null),[k,$]=q.useState();return q.useEffect(()=>{(async()=>{var H,L;const V=await T;i_(V);const R=x.current;if(!R)return;const G=r_(e)||s_(i)||(s?"text/linkified":"");if(C.current&&G===C.current.cm.getOption("mode")&&!!a===C.current.cm.getOption("readOnly")&&f===C.current.cm.getOption("lineNumbers")&&m===C.current.cm.getOption("lineWrapping")&&v===C.current.cm.getOption("placeholder"))return;(L=(H=C.current)==null?void 0:H.cm)==null||L.getWrapperElement().remove();const Z=V(R,{value:"",mode:G,readOnly:!!a,lineNumbers:f,lineWrapping:m,placeholder:v,matchBrackets:!0,autoCloseBrackets:!0});return C.current={cm:Z},d&&Z.focus(),$(Z),Z})()},[T,k,x,e,i,s,f,m,a,d,v]),q.useEffect(()=>{C.current&&C.current.cm.setSize(E.width,E.height)},[E]),q.useLayoutEffect(()=>{var G;if(!k)return;let V=!1;if(k.getValue()!==n&&(k.setValue(n),V=!0,p&&(k.execCommand("selectAll"),k.focus())),V||JSON.stringify(o)!==JSON.stringify(C.current.highlight)){for(const L of C.current.highlight||[])k.removeLineClass(L.line-1,"wrap");for(const L of o||[])k.addLineClass(L.line-1,"wrap",`source-line-${L.type}`);for(const L of C.current.widgets||[])k.removeLineWidget(L);for(const L of C.current.markers||[])L.clear();const Z=[],H=[];for(const L of o||[]){if(L.type!=="subtle-error"&&L.type!=="error")continue;const ie=(G=C.current)==null?void 0:G.cm.getLine(L.line-1);if(ie){const le={};le.title=L.message||"",H.push(k.markText({line:L.line-1,ch:0},{line:L.line-1,ch:L.column||ie.length},{className:"source-line-error-underline",attributes:le}))}if(L.type==="error"){const le=document.createElement("div");le.innerHTML=Ja(L.message||""),le.className="source-line-error-widget",Z.push(k.addLineWidget(L.line,le,{above:!0,coverGutter:!1}))}}C.current.highlight=o,C.current.widgets=Z,C.current.markers=H}typeof u=="number"&&C.current.cm.lineCount()>=u&&k.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let R;return y&&(R=()=>y(k.getValue()),k.on("change",R)),()=>{R&&k.off("change",R)}},[k,n,o,u,p,y]),S.jsx("div",{"data-testid":b,className:"cm-wrapper",ref:x,onClick:n_})};function n_(n){var i;if(!(n.target instanceof HTMLElement))return;let e;n.target.classList.contains("cm-linkified")?e=n.target.textContent:n.target.classList.contains("cm-link")&&((i=n.target.nextElementSibling)!=null&&i.classList.contains("cm-url"))&&(e=n.target.nextElementSibling.textContent.slice(1,-1)),e&&(n.preventDefault(),n.stopPropagation(),window.open(e,"_blank"))}let Iy=!1;function i_(n){Iy||(Iy=!0,n.defineSimpleMode("text/linkified",{start:[{regex:A0,token:"linkified"}]}))}function s_(n){if(n){if(n.includes("javascript")||n.includes("json"))return"javascript";if(n.includes("python"))return"python";if(n.includes("csharp"))return"text/x-csharp";if(n.includes("java"))return"text/x-java";if(n.includes("markdown"))return"markdown";if(n.includes("html")||n.includes("svg"))return"htmlmixed";if(n.includes("css"))return"css"}}function r_(n){if(n)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[n]}function a_(n){return!!n.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const l_=({title:n,children:e,setExpanded:i,expanded:s,expandOnTitleClick:a})=>{const o=q.useId(),u=q.useCallback(()=>i(!s),[s,i]),f=S.jsx("div",{className:Ke("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:u});return S.jsxs("div",{className:Ke("expandable",s&&"expanded"),children:[a?S.jsxs("div",{role:"button","aria-expanded":s,"aria-controls":o,className:"expandable-title",onClick:u,children:[f,n]}):S.jsxs("div",{className:"expandable-title",children:[f,n]}),s&&S.jsx("div",{id:o,role:"region",style:{marginLeft:25},children:e})]})};function ab(n){const e=[];let i=0,s;for(;(s=A0.exec(n))!==null;){const o=n.substring(i,s.index);o&&e.push(o);const u=s[0];e.push(o_(u)),i=s.index+u.length}const a=n.substring(i);return a&&e.push(a),e}function o_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),S.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const lb=q.createContext(void 0),ki=()=>q.useContext(lb),c_=({attachment:n,reveal:e})=>{const i=ki(),[s,a]=q.useState(!1),[o,u]=q.useState(null),[f,d]=q.useState(null),[p,m]=Uw(),y=q.useRef(null),b=a_(n.contentType),v=!!n.sha1||!!n.path;q.useEffect(()=>{var T;if(e)return(T=y.current)==null||T.scrollIntoView({behavior:"smooth"}),m()},[e,m]),q.useEffect(()=>{s&&o===null&&f===null&&(d("Loading ..."),fetch(fc(i,n)).then(T=>T.text()).then(T=>{u(T),d(null)}).catch(T=>{d("Failed to load: "+T.message)}))},[i,s,o,f,n]);const E=q.useMemo(()=>{const T=o?o.split(`
60
- `).length:0;return Math.min(Math.max(5,T),20)*t_},[o]),x=S.jsxs("span",{style:{marginLeft:5},ref:y,"aria-label":n.name,children:[S.jsx("span",{children:ab(n.name)}),v&&S.jsx("a",{style:{marginLeft:5},href:Uo(i,n),children:"download"})]});return!b||!v?S.jsx("div",{style:{marginLeft:20},children:x}):S.jsxs("div",{className:Ke(p&&"yellow-flash"),children:[S.jsx(l_,{title:x,expanded:s,setExpanded:a,expandOnTitleClick:!0,children:f&&S.jsx("i",{children:f})}),s&&o!==null&&S.jsx("div",{className:"vbox",style:{height:E},children:S.jsx(br,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},u_=({revealedAttachmentCallId:n})=>{const e=ki(),{diffMap:i,screenshots:s,attachments:a}=q.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const d of o){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const m=p[1],y=p[2],b=f.get(m)||{expected:void 0,actual:void 0,diff:void 0};b[y]=d,f.set(m,b),o.delete(d)}else d.contentType.startsWith("image/")&&(u.add(d),o.delete(d))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!s.size&&!a.size?S.jsx(us,{text:"No attachments"}):S.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>S.jsxs(S.Fragment,{children:[o&&u&&S.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&S.jsx(Qx,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Uo(e,o)},title:"Expected"},actual:{attachment:{...u,path:Uo(e,u)}},diff:f?{attachment:{...f,path:Uo(e,f)}}:void 0}})]})),s.size?S.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,u)=>{const f=fc(e,o);return S.jsxs("div",{className:"attachment-item",children:[S.jsx("div",{children:S.jsx("img",{draggable:"false",src:f})}),S.jsx("div",{children:S.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),a.size?S.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...a.values()].map((o,u)=>S.jsx("div",{className:"attachment-item",children:S.jsx(c_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},f_(o,u)))]})};function fc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function Uo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),fc(n,e)+i}function f_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const h_=`
59
+ rgb(0 0 0 / 25%) 0px 6px 12px`},Jx=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[s,a]=q.useState(n.diff?"diff":"actual"),[o,u]=q.useState(!1),[f,d]=q.useState(null),[p,m]=q.useState("Expected"),[y,b]=q.useState(null),[v,E]=q.useState(null),[x,T]=cs();q.useEffect(()=>{(async()=>{var L,ie,le,I;d(await Jf((L=n.expected)==null?void 0:L.attachment.path)),m(((ie=n.expected)==null?void 0:ie.title)||"Expected"),b(await Jf((le=n.actual)==null?void 0:le.attachment.path)),E(await Jf((I=n.diff)==null?void 0:I.attachment.path))})()},[n]);const C=f&&y&&v,k=C?Math.max(f.naturalWidth,y.naturalWidth,200):500,$=C?Math.max(f.naturalHeight,y.naturalHeight,200):500,V=Math.min(1,(x.width-30)/k),R=Math.min(1,(x.width-50)/k/2),G=k*V,Z=$*V,H={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return S.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:T,children:C&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&S.jsx("div",{style:{...H,fontWeight:s==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),S.jsx("div",{style:{...H,fontWeight:s==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),S.jsx("div",{style:{...H,fontWeight:s==="expected"?600:"initial"},onClick:()=>a("expected"),children:p}),S.jsx("div",{style:{...H,fontWeight:s==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),S.jsx("div",{style:{...H,fontWeight:s==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),S.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:Z+60},children:[n.diff&&s==="diff"&&S.jsx(Gn,{image:v,alt:"Diff",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="actual"&&S.jsx(Gn,{image:y,alt:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="expected"&&S.jsx(Gn,{image:f,alt:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="slider"&&S.jsx(Wx,{expectedImage:f,actualImage:y,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V,expectedTitle:p}),n.diff&&s==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:R*k,canvasHeight:R*$,scale:R}),S.jsx(Gn,{image:o?v:y,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:R*k,canvasHeight:R*$,scale:R})]}),!n.diff&&s==="actual"&&S.jsx(Gn,{image:y,title:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="expected"&&S.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Gn,{image:f,title:p,canvasWidth:R*k,canvasHeight:R*$,scale:R}),S.jsx(Gn,{image:y,title:"Actual",canvasWidth:R*k,canvasHeight:R*$,scale:R})]})]}),!i&&S.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[S.jsx("div",{children:n.diff&&S.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},Wx=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:s,scale:a,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,p]=q.useState(i/2),m=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&S.jsxs("div",{style:{margin:5},children:[!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight}),!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&S.jsx("span",{children:e.naturalWidth}),!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&S.jsx("span",{children:e.naturalHeight})]}),S.jsxs("div",{style:{position:"relative",width:i,height:s,margin:15,...wh},children:[S.jsx(lb,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),S.jsx("img",{alt:o,style:{width:n.naturalWidth*a,height:n.naturalHeight*a},draggable:"false",src:n.src}),S.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...wh},children:S.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},Gn=({image:n,title:e,alt:i,hideSize:s,canvasWidth:a,canvasHeight:o,scale:u,onClick:f})=>S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&S.jsxs("div",{style:{margin:5},children:[e&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight})]}),S.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...wh},children:S.jsx("img",{width:n.naturalWidth*u,height:n.naturalHeight*u,alt:e||i,style:{cursor:f?"pointer":"initial"},draggable:"false",src:n.src,onClick:f})})]}),e_="modulepreload",t_=function(n,e){return new URL(n,e).href},$y={},n_=function(e,i,s){let a=Promise.resolve();if(i&&i.length>0){let u=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=u(i.map(m=>{if(m=t_(m,s),m in $y)return;$y[m]=!0;const y=m.endsWith(".css"),b=y?'[rel="stylesheet"]':"";if(!!s)for(let x=f.length-1;x>=0;x--){const T=f[x];if(T.href===m&&(!y||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${b}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":e_,y||(E.as="script"),E.crossOrigin="",E.href=m,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((x,T)=>{E.addEventListener("load",x),E.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return a.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},i_=20,br=({text:n,highlighter:e,mimeType:i,linkify:s,readOnly:a,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:b,placeholder:v})=>{const[E,x]=cs(),[T]=q.useState(n_(()=>import("./codeMirrorModule-Ds29iGp5.js"),__vite__mapDeps([0,1]),import.meta.url).then(V=>V.default)),C=q.useRef(null),[k,$]=q.useState();return q.useEffect(()=>{(async()=>{var H,L;const V=await T;r_(V);const R=x.current;if(!R)return;const G=l_(e)||a_(i)||(s?"text/linkified":"");if(C.current&&G===C.current.cm.getOption("mode")&&!!a===C.current.cm.getOption("readOnly")&&f===C.current.cm.getOption("lineNumbers")&&m===C.current.cm.getOption("lineWrapping")&&v===C.current.cm.getOption("placeholder"))return;(L=(H=C.current)==null?void 0:H.cm)==null||L.getWrapperElement().remove();const Z=V(R,{value:"",mode:G,readOnly:!!a,lineNumbers:f,lineWrapping:m,placeholder:v,matchBrackets:!0,autoCloseBrackets:!0});return C.current={cm:Z},d&&Z.focus(),$(Z),Z})()},[T,k,x,e,i,s,f,m,a,d,v]),q.useEffect(()=>{C.current&&C.current.cm.setSize(E.width,E.height)},[E]),q.useLayoutEffect(()=>{var G;if(!k)return;let V=!1;if(k.getValue()!==n&&(k.setValue(n),V=!0,p&&(k.execCommand("selectAll"),k.focus())),V||JSON.stringify(o)!==JSON.stringify(C.current.highlight)){for(const L of C.current.highlight||[])k.removeLineClass(L.line-1,"wrap");for(const L of o||[])k.addLineClass(L.line-1,"wrap",`source-line-${L.type}`);for(const L of C.current.widgets||[])k.removeLineWidget(L);for(const L of C.current.markers||[])L.clear();const Z=[],H=[];for(const L of o||[]){if(L.type!=="subtle-error"&&L.type!=="error")continue;const ie=(G=C.current)==null?void 0:G.cm.getLine(L.line-1);if(ie){const le={};le.title=L.message||"",H.push(k.markText({line:L.line-1,ch:0},{line:L.line-1,ch:L.column||ie.length},{className:"source-line-error-underline",attributes:le}))}if(L.type==="error"){const le=document.createElement("div");le.innerHTML=Wa(L.message||""),le.className="source-line-error-widget",Z.push(k.addLineWidget(L.line,le,{above:!0,coverGutter:!1}))}}C.current.highlight=o,C.current.widgets=Z,C.current.markers=H}typeof u=="number"&&C.current.cm.lineCount()>=u&&k.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let R;return y&&(R=()=>y(k.getValue()),k.on("change",R)),()=>{R&&k.off("change",R)}},[k,n,o,u,p,y]),S.jsx("div",{"data-testid":b,className:"cm-wrapper",ref:x,onClick:s_})};function s_(n){var i;if(!(n.target instanceof HTMLElement))return;let e;n.target.classList.contains("cm-linkified")?e=n.target.textContent:n.target.classList.contains("cm-link")&&((i=n.target.nextElementSibling)!=null&&i.classList.contains("cm-url"))&&(e=n.target.nextElementSibling.textContent.slice(1,-1)),e&&(n.preventDefault(),n.stopPropagation(),window.open(e,"_blank"))}let Iy=!1;function r_(n){Iy||(Iy=!0,n.defineSimpleMode("text/linkified",{start:[{regex:C0,token:"linkified"}]}))}function a_(n){if(n){if(n.includes("javascript")||n.includes("json"))return"javascript";if(n.includes("python"))return"python";if(n.includes("csharp"))return"text/x-csharp";if(n.includes("java"))return"text/x-java";if(n.includes("markdown"))return"markdown";if(n.includes("html")||n.includes("svg"))return"htmlmixed";if(n.includes("css"))return"css"}}function l_(n){if(n)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[n]}function o_(n){return!!n.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const c_=({title:n,children:e,setExpanded:i,expanded:s,expandOnTitleClick:a})=>{const o=q.useId(),u=q.useCallback(()=>i(!s),[s,i]),f=S.jsx("div",{className:Ke("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:u});return S.jsxs("div",{className:Ke("expandable",s&&"expanded"),children:[a?S.jsxs("div",{role:"button","aria-expanded":s,"aria-controls":o,className:"expandable-title",onClick:u,children:[f,n]}):S.jsxs("div",{className:"expandable-title",children:[f,n]}),s&&S.jsx("div",{id:o,role:"region",style:{marginLeft:25},children:e})]})};function ob(n){const e=[];let i=0,s;for(;(s=C0.exec(n))!==null;){const o=n.substring(i,s.index);o&&e.push(o);const u=s[0];e.push(u_(u)),i=s.index+u.length}const a=n.substring(i);return a&&e.push(a),e}function u_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),S.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const cb=q.createContext(void 0),ki=()=>q.useContext(cb),f_=({attachment:n,reveal:e})=>{const i=ki(),[s,a]=q.useState(!1),[o,u]=q.useState(null),[f,d]=q.useState(null),[p,m]=Hw(),y=q.useRef(null),b=o_(n.contentType),v=!!n.sha1||!!n.path;q.useEffect(()=>{var T;if(e)return(T=y.current)==null||T.scrollIntoView({behavior:"smooth"}),m()},[e,m]),q.useEffect(()=>{s&&o===null&&f===null&&(d("Loading ..."),fetch(fc(i,n)).then(T=>T.text()).then(T=>{u(T),d(null)}).catch(T=>{d("Failed to load: "+T.message)}))},[i,s,o,f,n]);const E=q.useMemo(()=>{const T=o?o.split(`
60
+ `).length:0;return Math.min(Math.max(5,T),20)*i_},[o]),x=S.jsxs("span",{style:{marginLeft:5},ref:y,"aria-label":n.name,children:[S.jsx("span",{children:ob(n.name)}),v&&S.jsx("a",{style:{marginLeft:5},href:zo(i,n),children:"download"})]});return!b||!v?S.jsx("div",{style:{marginLeft:20},children:x}):S.jsxs("div",{className:Ke(p&&"yellow-flash"),children:[S.jsx(c_,{title:x,expanded:s,setExpanded:a,expandOnTitleClick:!0,children:f&&S.jsx("i",{children:f})}),s&&o!==null&&S.jsx("div",{className:"vbox",style:{height:E},children:S.jsx(br,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},h_=({revealedAttachmentCallId:n})=>{const e=ki(),{diffMap:i,screenshots:s,attachments:a}=q.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const d of o){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const m=p[1],y=p[2],b=f.get(m)||{expected:void 0,actual:void 0,diff:void 0};b[y]=d,f.set(m,b),o.delete(d)}else d.contentType.startsWith("image/")&&(u.add(d),o.delete(d))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!s.size&&!a.size?S.jsx(us,{text:"No attachments"}):S.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>S.jsxs(S.Fragment,{children:[o&&u&&S.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&S.jsx(Jx,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:zo(e,o)},title:"Expected"},actual:{attachment:{...u,path:zo(e,u)}},diff:f?{attachment:{...f,path:zo(e,f)}}:void 0}})]})),s.size?S.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,u)=>{const f=fc(e,o);return S.jsxs("div",{className:"attachment-item",children:[S.jsx("div",{children:S.jsx("img",{draggable:"false",src:f})}),S.jsx("div",{children:S.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),a.size?S.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...a.values()].map((o,u)=>S.jsx("div",{className:"attachment-item",children:S.jsx(f_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},d_(o,u)))]})};function fc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function zo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),fc(n,e)+i}function d_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const p_=`
61
61
  # Instructions
62
62
 
63
63
  - Following Playwright test failed.
64
64
  - Explain why, be concise, respect Playwright best practices.
65
65
  - Provide a snippet of code with the fix, if possible.
66
- `.trimStart();async function d_({testInfo:n,metadata:e,errorContext:i,errors:s,buildCodeFrame:a,stdout:o,stderr:u}){var y;const f=new Set(s.filter(b=>b.message&&!b.message.includes(`
66
+ `.trimStart();async function g_({testInfo:n,metadata:e,errorContext:i,errors:s,buildCodeFrame:a,stdout:o,stderr:u}){var y;const f=new Set(s.filter(b=>b.message&&!b.message.includes(`
67
67
  `)).map(b=>b.message));for(const b of s)for(const v of f.keys())(y=b.message)!=null&&y.includes(v)&&f.delete(v);const d=s.filter(b=>!(!b.message||!b.message.includes(`
68
- `)&&!f.has(b.message)));if(!d.length)return;const p=[h_,"# Test info","",n];o&&p.push("","# Stdout","","```",zo(o),"```"),u&&p.push("","# Stderr","","```",zo(u),"```"),p.push("","# Error details");for(const b of d)p.push("","```",zo(b.message||""),"```");i&&p.push(i);const m=await a(d[d.length-1]);return m&&p.push("","# Test source","","```ts",m,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
69
- `)}const p_=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function zo(n){return n.replace(p_,"")}const g_=uc,m_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const s=n||[];return S.jsx(g_,{name:"stack-trace",ariaLabel:"Stack trace",items:s,selectedItem:s[i],render:a=>{const o=a.file[1]===":"?"\\":"/";return S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"stack-trace-frame-function",children:a.function||"(anonymous)"}),S.jsx("span",{className:"stack-trace-frame-location",children:a.file.split(o).pop()}),S.jsx("span",{className:"stack-trace-frame-line",children:":"+a.line})]})},onSelected:a=>e(s.indexOf(a))})},Gh=({noShadow:n,children:e,noMinHeight:i,className:s,sidebarBackground:a,onClick:o})=>S.jsx("div",{className:Ke("toolbar",n&&"no-shadow",i&&"no-min-height",s,a&&"toolbar-sidebar-background"),onClick:o,children:e});function y_(n,e,i,s,a){const o=ki();return Ko(async()=>{var v,E,x,T;const u=n==null?void 0:n[e],f=u!=null&&u.file?u:a;if(!f)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const d=f.file;let p=i.get(d);p||(p={errors:((v=a==null?void 0:a.source)==null?void 0:v.errors)||[],content:(E=a==null?void 0:a.source)==null?void 0:E.content},i.set(d,p));const m=(f==null?void 0:f.line)||((x=p.errors[0])==null?void 0:x.line)||0,y=s&&d.startsWith(s)?d.substring(s.length+1):d,b=p.errors.map(C=>({type:"error",line:C.line,message:C.message}));if(b.push({line:m,type:"running"}),((T=a==null?void 0:a.source)==null?void 0:T.content)!==void 0)p.content=a.source.content;else if(p.content===void 0||f===a){const C=await ob(d);try{let k=o?await fetch(o.createRelativeUrl(`sha1/src@${C}.txt`)):void 0;(!k||k.status===404)&&(k=await fetch(`file?path=${encodeURIComponent(d)}`)),k.status>=400?p.content=`<Unable to read "${d}">`:p.content=await k.text()}catch{p.content=`<Unable to read "${d}">`}}return{model:o,source:p,highlight:b,targetLine:m,fileName:y,location:f}},[n,e,s,a],{source:{errors:[],content:"Loading…"},highlight:[]})}const b_=({stack:n,sources:e,rootDir:i,fallbackLocation:s,stackFrameLocation:a,onOpenExternally:o})=>{const[u,f]=q.useState(),[d,p]=q.useState(0);q.useEffect(()=>{u!==n&&(f(n),p(0))},[n,u,f,p]);const{source:m,highlight:y,targetLine:b,fileName:v,location:E}=y_(n,d,e,i,s),x=q.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),T=((n==null?void 0:n.length)??0)>1,C=v_(v);return S.jsx(Xo,{sidebarSize:200,orientation:a==="bottom"?"vertical":"horizontal",sidebarHidden:!T,main:S.jsxs("div",{className:"vbox","data-testid":"source-code",children:[v&&S.jsxs(Gh,{children:[S.jsx("div",{className:"source-tab-file-name",title:v,children:S.jsx("div",{children:C})}),S.jsx(Vh,{description:"Copy filename",value:C}),E&&S.jsx(Dt,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),S.jsx(br,{text:m.content||"",highlighter:"javascript",highlight:y,revealLine:b,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:S.jsx(m_,{stack:n,selectedFrame:d,setSelectedFrame:p})})};async function ob(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),s=[],a=new DataView(i);for(let o=0;o<a.byteLength;o+=1){const u=a.getUint8(o).toString(16).padStart(2,"0");s.push(u)}return s.join("")}function v_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const S_=({prompt:n})=>S.jsx(Bo,{value:n,description:"Copy prompt",copiedDescription:S.jsxs(S.Fragment,{children:["Copied ",S.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function w_(n){return q.useMemo(()=>{if(!n)return{errors:new Map};const e=new Map;for(const i of n.errorDescriptors)e.set(i.message,i);return{errors:e}},[n])}function x_({message:n,error:e,sdkLanguage:i,revealInSource:s}){var f;let a,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(a=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),S.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[S.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Ih(e.action,{sdkLanguage:i}),a&&S.jsxs("div",{className:"action-location",children:["@ ",S.jsx("span",{title:o,onClick:()=>s(e),children:a})]})]}),S.jsx(Px,{error:n})]})}const __=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:s,testRunMetadata:a})=>{const o=ki(),u=Ko(async()=>{const p=o==null?void 0:o.attachments.find(m=>m.name==="error-context");if(p)return await fetch(fc(o,p)).then(m=>m.text())},[o],void 0),f=q.useCallback(async p=>{var v;const m=(v=p.stack)==null?void 0:v[0];if(!m)return;let y=o?await fetch(o.createRelativeUrl(`sha1/src@${await ob(m.file)}.txt`)):void 0;if((!y||y.status===404)&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const b=await y.text();return T_({source:b,message:zo(p.message).split(`
70
- `)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[o]),d=Ko(()=>d_({testInfo:(o==null?void 0:o.title)??"",metadata:a,errorContext:u,errors:(o==null?void 0:o.errorDescriptors)??[],buildCodeFrame:f}),[u,a,o,f],void 0);return n.errors.size?S.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[S.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&S.jsx(S_,{prompt:d})}),[...n.errors.entries()].map(([p,m])=>{const y=`error-${s}-${p}`;return S.jsx(x_,{message:p,error:m,revealInSource:i,sdkLanguage:e},y)})]}):S.jsx(us,{text:"No errors"})};function T_({source:n,message:e,location:i,linesAbove:s,linesBelow:a}){const o=n.split(`
68
+ `)&&!f.has(b.message)));if(!d.length)return;const p=[p_,"# Test info","",n];o&&p.push("","# Stdout","","```",Ho(o),"```"),u&&p.push("","# Stderr","","```",Ho(u),"```"),p.push("","# Error details");for(const b of d)p.push("","```",Ho(b.message||""),"```");i&&p.push(i);const m=await a(d[d.length-1]);return m&&p.push("","# Test source","","```ts",m,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
69
+ `)}const m_=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function Ho(n){return n.replace(m_,"")}const y_=uc,b_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const s=n||[];return S.jsx(y_,{name:"stack-trace",ariaLabel:"Stack trace",items:s,selectedItem:s[i],render:a=>{const o=a.file[1]===":"?"\\":"/";return S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"stack-trace-frame-function",children:a.function||"(anonymous)"}),S.jsx("span",{className:"stack-trace-frame-location",children:a.file.split(o).pop()}),S.jsx("span",{className:"stack-trace-frame-line",children:":"+a.line})]})},onSelected:a=>e(s.indexOf(a))})},Gh=({noShadow:n,children:e,noMinHeight:i,className:s,sidebarBackground:a,onClick:o})=>S.jsx("div",{className:Ke("toolbar",n&&"no-shadow",i&&"no-min-height",s,a&&"toolbar-sidebar-background"),onClick:o,children:e});function v_(n,e,i,s,a){const o=ki();return Yo(async()=>{var v,E,x,T;const u=n==null?void 0:n[e],f=u!=null&&u.file?u:a;if(!f)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const d=f.file;let p=i.get(d);p||(p={errors:((v=a==null?void 0:a.source)==null?void 0:v.errors)||[],content:(E=a==null?void 0:a.source)==null?void 0:E.content},i.set(d,p));const m=(f==null?void 0:f.line)||((x=p.errors[0])==null?void 0:x.line)||0,y=s&&d.startsWith(s)?d.substring(s.length+1):d,b=p.errors.map(C=>({type:"error",line:C.line,message:C.message}));if(b.push({line:m,type:"running"}),((T=a==null?void 0:a.source)==null?void 0:T.content)!==void 0)p.content=a.source.content;else if(p.content===void 0||f===a){const C=await ub(d);try{let k=o?await fetch(o.createRelativeUrl(`sha1/src@${C}.txt`)):void 0;(!k||k.status===404)&&(k=await fetch(`file?path=${encodeURIComponent(d)}`)),k.status>=400?p.content=`<Unable to read "${d}">`:p.content=await k.text()}catch{p.content=`<Unable to read "${d}">`}}return{model:o,source:p,highlight:b,targetLine:m,fileName:y,location:f}},[n,e,s,a],{source:{errors:[],content:"Loading…"},highlight:[]})}const S_=({stack:n,sources:e,rootDir:i,fallbackLocation:s,stackFrameLocation:a,onOpenExternally:o})=>{const[u,f]=q.useState(),[d,p]=q.useState(0);q.useEffect(()=>{u!==n&&(f(n),p(0))},[n,u,f,p]);const{source:m,highlight:y,targetLine:b,fileName:v,location:E}=v_(n,d,e,i,s),x=q.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),T=((n==null?void 0:n.length)??0)>1,C=w_(v);return S.jsx(Po,{sidebarSize:200,orientation:a==="bottom"?"vertical":"horizontal",sidebarHidden:!T,main:S.jsxs("div",{className:"vbox","data-testid":"source-code",children:[v&&S.jsxs(Gh,{children:[S.jsx("div",{className:"source-tab-file-name",title:v,children:S.jsx("div",{children:C})}),S.jsx(Vh,{description:"Copy filename",value:C}),E&&S.jsx(Dt,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),S.jsx(br,{text:m.content||"",highlighter:"javascript",highlight:y,revealLine:b,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:S.jsx(b_,{stack:n,selectedFrame:d,setSelectedFrame:p})})};async function ub(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),s=[],a=new DataView(i);for(let o=0;o<a.byteLength;o+=1){const u=a.getUint8(o).toString(16).padStart(2,"0");s.push(u)}return s.join("")}function w_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const x_=({prompt:n})=>S.jsx(Uo,{value:n,description:"Copy prompt",copiedDescription:S.jsxs(S.Fragment,{children:["Copied ",S.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function __(n){return q.useMemo(()=>{if(!n)return{errors:new Map};const e=new Map;for(const i of n.errorDescriptors)e.set(i.message,i);return{errors:e}},[n])}function T_({message:n,error:e,sdkLanguage:i,revealInSource:s}){var f;let a,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(a=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),S.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[S.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Ih(e.action,{sdkLanguage:i}),a&&S.jsxs("div",{className:"action-location",children:["@ ",S.jsx("span",{title:o,onClick:()=>s(e),children:a})]})]}),S.jsx(Qx,{error:n})]})}const E_=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:s,testRunMetadata:a})=>{const o=ki(),u=Yo(async()=>{const p=o==null?void 0:o.attachments.find(m=>m.name==="error-context");if(p)return await fetch(fc(o,p)).then(m=>m.text())},[o],void 0),f=q.useCallback(async p=>{var v;const m=(v=p.stack)==null?void 0:v[0];if(!m)return;let y=o?await fetch(o.createRelativeUrl(`sha1/src@${await ub(m.file)}.txt`)):void 0;if((!y||y.status===404)&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const b=await y.text();return A_({source:b,message:Ho(p.message).split(`
70
+ `)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[o]),d=Yo(()=>g_({testInfo:(o==null?void 0:o.title)??"",metadata:a,errorContext:u,errors:(o==null?void 0:o.errorDescriptors)??[],buildCodeFrame:f}),[u,a,o,f],void 0);return n.errors.size?S.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[S.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&S.jsx(x_,{prompt:d})}),[...n.errors.entries()].map(([p,m])=>{const y=`error-${s}-${p}`;return S.jsx(T_,{message:p,error:m,revealInSource:i,sdkLanguage:e},y)})]}):S.jsx(us,{text:"No errors"})};function A_({source:n,message:e,location:i,linesAbove:s,linesBelow:a}){const o=n.split(`
71
71
  `).slice(),u=Math.max(0,i.line-s-1),f=Math.min(o.length,i.line+a),d=o.slice(u,f),p=String(f).length,m=d.map((y,b)=>`${u+b+1===i.line?"> ":" "}${(u+b+1).toString().padEnd(p," ")} | ${y}`);return e&&m.splice(i.line-u,0,`${" ".repeat(p+2)} | ${" ".repeat(i.column-2)} ^ ${e}`),m.join(`
72
- `)}const E_=uc;function A_(n,e){const{entries:i}=q.useMemo(()=>{if(!n)return{entries:[]};const a=[];function o(f){var m,y,b,v,E,x;const d=a[a.length-1];d&&((m=f.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((b=f.browserMessage)==null?void 0:b.location)===((v=d.browserMessage)==null?void 0:v.location)&&f.browserError===d.browserError&&((E=f.nodeMessage)==null?void 0:E.html)===((x=d.nodeMessage)==null?void 0:x.html)&&f.isError===d.isError&&f.isWarning===d.isWarning&&f.timestamp-d.timestamp<1e3?d.repeat++:a.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,d)=>{const p="time"in f?f.time:f.timestamp,m="time"in d?d.time:d.timestamp;return p-m});for(const f of u){if(f.type==="console"){const d=f.args&&f.args.length?C_(f.args):cb(f.text),p=f.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;o({browserMessage:{body:d,bodyString:f.text,location:y},isError:f.messageType==="error",isWarning:f.messageType==="warning",timestamp:f.time})}if(f.type==="event"&&f.method==="pageError"&&o({browserError:f.params.error,isError:!0,isWarning:!1,timestamp:f.time}),f.type==="stderr"||f.type==="stdout"){let d="";f.text&&(d=Ja(f.text.trim())||""),f.base64&&(d=Ja(atob(f.base64).trim())||""),o({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:a}},[n]);return{entries:q.useMemo(()=>e?i.filter(a=>a.timestamp>=e.minimum&&a.timestamp<=e.maximum):i,[i,e])}}const N_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:s})=>n.entries.length?S.jsx("div",{className:"console-tab",children:S.jsx(E_,{name:"console",onAccepted:s,onHighlighted:a=>i==null?void 0:i(a?n.entries.indexOf(a):void 0),items:n.entries,isError:a=>a.isError,isWarning:a=>a.isWarning,render:a=>{const o=_t(a.timestamp-e.minimum),u=S.jsx("span",{className:"console-time",children:o}),f=a.isError?"status-error":a.isWarning?"status-warning":"status-none",d=a.browserMessage||a.browserError?S.jsx("span",{className:Ke("codicon","codicon-browser",f),title:"Browser message"}):S.jsx("span",{className:Ke("codicon","codicon-file",f),title:"Runner message"});let p,m,y,b;const{browserMessage:v,browserError:E,nodeMessage:x}=a;if(v&&(p=v.location,m=v.body),E){const{error:T,value:C}=E;T?(m=T.message,b=T.stack):m=String(C)}return x&&(y=x.html),S.jsxs("div",{className:"console-line",children:[u,d,p&&S.jsx("span",{className:"console-location",children:p}),a.repeat>1&&S.jsx("span",{className:"console-repeat",children:a.repeat}),m&&S.jsx("span",{className:"console-line-message",children:m}),y&&S.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),b&&S.jsx("div",{className:"console-stack",children:b})]})}})}):S.jsx(us,{text:"No console entries"});function C_(n){if(n.length===1)return cb(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",s=e?n.slice(1):n;let a=0;const o=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(S.jsx("span",{children:d},f.length+1));let p=0;for(;(u=o.exec(i))!==null;){const m=i.substring(p,u.index);d.push(S.jsx("span",{children:m},d.length+1)),p=u.index+2;const y=u[0][1];if(y==="%")d.push(S.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const b=s[a++],v={};typeof(b==null?void 0:b.value)!="string"&&(v.color="var(--vscode-debugTokenExpression-number)"),d.push(S.jsx("span",{style:v,children:(b==null?void 0:b.preview)||""},d.length+1))}else if(y==="c"){d=[];const b=s[a++],v=b?k_(b.preview):{};f.push(S.jsx("span",{style:v,children:d},f.length+1))}}for(p<i.length&&d.push(S.jsx("span",{children:i.substring(p)},d.length+1));a<s.length;a++){const m=s[a],y={};d.length&&d.push(S.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(S.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return f}function cb(n){return[S.jsx("span",{dangerouslySetInnerHTML:{__html:Ja(n.trim())}})]}function k_(n){try{const e={},i=n.split(";");for(const s of i){const a=s.trim();if(!a)continue;let[o,u]=a.split(":");if(o=o.trim(),u=u.trim(),!M_(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function M_(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const xh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:s,rightToolbar:a,dataTestId:o,mode:u})=>{const f=q.useId();return e||(e=n[0].id),u||(u="default"),S.jsx("div",{className:"tabbed-pane","data-testid":o,children:S.jsxs("div",{className:"vbox",children:[S.jsxs(Gh,{children:[s&&S.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),u==="default"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>S.jsx(ub,{id:d.id,ariaControls:`${f}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:i},d.id))]}),u==="select"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:S.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{i==null||i(n[d.currentTarget.selectedIndex].id)},children:n.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),S.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,p]},d.id)})})}),a&&S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...a]})]}),n.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return S.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return S.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},ub=({id:n,title:e,count:i,errorCount:s,selected:a,onSelect:o,ariaControls:u})=>S.jsxs("div",{className:Ke("tabbed-pane-tab",a&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,children:[S.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&S.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!s&&S.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function O_(n){const e=navigator.platform.includes("Win")?"win":"unix";let i=[];const s=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function a(y){return'^"'+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
72
+ `)}const N_=uc;function C_(n,e){const{entries:i}=q.useMemo(()=>{if(!n)return{entries:[]};const a=[];function o(f){var m,y,b,v,E,x;const d=a[a.length-1];d&&((m=f.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((b=f.browserMessage)==null?void 0:b.location)===((v=d.browserMessage)==null?void 0:v.location)&&f.browserError===d.browserError&&((E=f.nodeMessage)==null?void 0:E.html)===((x=d.nodeMessage)==null?void 0:x.html)&&f.isError===d.isError&&f.isWarning===d.isWarning&&f.timestamp-d.timestamp<1e3?d.repeat++:a.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,d)=>{const p="time"in f?f.time:f.timestamp,m="time"in d?d.time:d.timestamp;return p-m});for(const f of u){if(f.type==="console"){const d=f.args&&f.args.length?M_(f.args):fb(f.text),p=f.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;o({browserMessage:{body:d,bodyString:f.text,location:y},isError:f.messageType==="error",isWarning:f.messageType==="warning",timestamp:f.time})}if(f.type==="event"&&f.method==="pageError"&&o({browserError:f.params.error,isError:!0,isWarning:!1,timestamp:f.time}),f.type==="stderr"||f.type==="stdout"){let d="";f.text&&(d=Wa(f.text.trim())||""),f.base64&&(d=Wa(atob(f.base64).trim())||""),o({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:a}},[n]);return{entries:q.useMemo(()=>e?i.filter(a=>a.timestamp>=e.minimum&&a.timestamp<=e.maximum):i,[i,e])}}const k_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:s})=>n.entries.length?S.jsx("div",{className:"console-tab",children:S.jsx(N_,{name:"console",onAccepted:s,onHighlighted:a=>i==null?void 0:i(a?n.entries.indexOf(a):void 0),items:n.entries,isError:a=>a.isError,isWarning:a=>a.isWarning,render:a=>{const o=_t(a.timestamp-e.minimum),u=S.jsx("span",{className:"console-time",children:o}),f=a.isError?"status-error":a.isWarning?"status-warning":"status-none",d=a.browserMessage||a.browserError?S.jsx("span",{className:Ke("codicon","codicon-browser",f),title:"Browser message"}):S.jsx("span",{className:Ke("codicon","codicon-file",f),title:"Runner message"});let p,m,y,b;const{browserMessage:v,browserError:E,nodeMessage:x}=a;if(v&&(p=v.location,m=v.body),E){const{error:T,value:C}=E;T?(m=T.message,b=T.stack):m=String(C)}return x&&(y=x.html),S.jsxs("div",{className:"console-line",children:[u,d,p&&S.jsx("span",{className:"console-location",children:p}),a.repeat>1&&S.jsx("span",{className:"console-repeat",children:a.repeat}),m&&S.jsx("span",{className:"console-line-message",children:m}),y&&S.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),b&&S.jsx("div",{className:"console-stack",children:b})]})}})}):S.jsx(us,{text:"No console entries"});function M_(n){if(n.length===1)return fb(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",s=e?n.slice(1):n;let a=0;const o=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(S.jsx("span",{children:d},f.length+1));let p=0;for(;(u=o.exec(i))!==null;){const m=i.substring(p,u.index);d.push(S.jsx("span",{children:m},d.length+1)),p=u.index+2;const y=u[0][1];if(y==="%")d.push(S.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const b=s[a++],v={};typeof(b==null?void 0:b.value)!="string"&&(v.color="var(--vscode-debugTokenExpression-number)"),d.push(S.jsx("span",{style:v,children:(b==null?void 0:b.preview)||""},d.length+1))}else if(y==="c"){d=[];const b=s[a++],v=b?O_(b.preview):{};f.push(S.jsx("span",{style:v,children:d},f.length+1))}}for(p<i.length&&d.push(S.jsx("span",{children:i.substring(p)},d.length+1));a<s.length;a++){const m=s[a],y={};d.length&&d.push(S.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(S.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return f}function fb(n){return[S.jsx("span",{dangerouslySetInnerHTML:{__html:Wa(n.trim())}})]}function O_(n){try{const e={},i=n.split(";");for(const s of i){const a=s.trim();if(!a)continue;let[o,u]=a.split(":");if(o=o.trim(),u=u.trim(),!R_(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function R_(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const xh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:s,rightToolbar:a,dataTestId:o,mode:u})=>{const f=q.useId();return e||(e=n[0].id),u||(u="default"),S.jsx("div",{className:"tabbed-pane","data-testid":o,children:S.jsxs("div",{className:"vbox",children:[S.jsxs(Gh,{children:[s&&S.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),u==="default"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>S.jsx(hb,{id:d.id,ariaControls:`${f}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:i},d.id))]}),u==="select"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:S.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{i==null||i(n[d.currentTarget.selectedIndex].id)},children:n.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),S.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,p]},d.id)})})}),a&&S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...a]})]}),n.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return S.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return S.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},hb=({id:n,title:e,count:i,errorCount:s,selected:a,onSelect:o,ariaControls:u})=>S.jsxs("div",{className:Ke("tabbed-pane-tab",a&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,"aria-selected":a,children:[S.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&S.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!s&&S.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function L_(n){const e=navigator.platform.includes("Win")?"win":"unix";let i=[];const s=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function a(y){return'^"'+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
73
73
 
74
- `)+'^"'}function o(y){function b(v){let x=v.charCodeAt(0).toString(16);for(;x.length<4;)x="0"+x;return"\\u"+x}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,b)+"'":"'"+y+"'"}const u=e==="win"?a:o;i.push(u(n.request.url).replace(/[[{}\]]/g,"\\$&"));let f="GET";const d=[],p=await fb(n);p&&(d.push("--data-raw "+u(p)),s.add("content-length"),f="POST"),n.request.method!==f&&i.push("-X "+u(n.request.method));const m=n.request.headers;for(let y=0;y<m.length;y++){const b=m[y],v=b.name.replace(/^:/,"");s.has(v.toLowerCase())||(b.value.trim()?i.push("-H "+u(v+": "+b.value)):i.push("-H "+u(v+";")))}return i=i.concat(d),"curl "+i.join(i.length>=3?e==="win"?` ^
74
+ `)+'^"'}function o(y){function b(v){let x=v.charCodeAt(0).toString(16);for(;x.length<4;)x="0"+x;return"\\u"+x}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,b)+"'":"'"+y+"'"}const u=e==="win"?a:o;i.push(u(n.request.url).replace(/[[{}\]]/g,"\\$&"));let f="GET";const d=[],p=await db(n);p&&(d.push("--data-raw "+u(p)),s.add("content-length"),f="POST"),n.request.method!==f&&i.push("-X "+u(n.request.method));const m=n.request.headers;for(let y=0;y<m.length;y++){const b=m[y],v=b.name.replace(/^:/,"");s.has(v.toLowerCase())||(b.value.trim()?i.push("-H "+u(v+": "+b.value)):i.push("-H "+u(v+";")))}return i=i.concat(d),"curl "+i.join(i.length>=3?e==="win"?` ^
75
75
  `:` \\
76
- `:" ")}async function R_(n,e=0){const i=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"]),s=new Set(["cookie","authorization"]),a=JSON.stringify(n.request.url),o=n.request.headers,u=o.reduce((E,x)=>{const T=x.name;return!i.has(T.toLowerCase())&&!T.includes(":")&&E.append(T,x.value),E},new Headers),f={};for(const E of u)f[E[0]]=E[1];const d=n.request.cookies.length||o.some(({name:E})=>s.has(E.toLowerCase()))?"include":"omit",p=o.find(({name:E})=>E.toLowerCase()==="referer"),m=p?p.value:void 0,y=await fb(n),b={headers:Object.keys(f).length?f:void 0,referrer:m,body:y,method:n.request.method,mode:"cors"};if(e===1){const E=o.find(T=>T.name.toLowerCase()==="cookie"),x={};delete b.mode,E&&(x.cookie=E.value),m&&(delete b.referrer,x.Referer=m),Object.keys(x).length&&(b.headers={...f,...x})}else b.credentials=d;const v=JSON.stringify(b,null,2);return`fetch(${a}, ${v});`}async function fb(n){var e,i;return(e=n.request.postData)!=null&&e._sha1?await fetch(`sha1/${n.request.postData._sha1}`).then(s=>s.text()):(i=n.request.postData)==null?void 0:i.text}class L_{generatePlaywrightRequestCall(e,i){let s=e.method.toLowerCase();const a=new URL(e.url),o=`${a.origin}${a.pathname}`,u={};["delete","get","head","post","put","patch"].includes(s)||(u.method=s,s="fetch"),a.searchParams.size&&(u.params=Object.fromEntries(a.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${s}(${f.join(", ")});`}prettyPrintObject(e,i=2,s=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"[]";const f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`[
76
+ `:" ")}async function j_(n,e=0){const i=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"]),s=new Set(["cookie","authorization"]),a=JSON.stringify(n.request.url),o=n.request.headers,u=o.reduce((E,x)=>{const T=x.name;return!i.has(T.toLowerCase())&&!T.includes(":")&&E.append(T,x.value),E},new Headers),f={};for(const E of u)f[E[0]]=E[1];const d=n.request.cookies.length||o.some(({name:E})=>s.has(E.toLowerCase()))?"include":"omit",p=o.find(({name:E})=>E.toLowerCase()==="referer"),m=p?p.value:void 0,y=await db(n),b={headers:Object.keys(f).length?f:void 0,referrer:m,body:y,method:n.request.method,mode:"cors"};if(e===1){const E=o.find(T=>T.name.toLowerCase()==="cookie"),x={};delete b.mode,E&&(x.cookie=E.value),m&&(delete b.referrer,x.Referer=m),Object.keys(x).length&&(b.headers={...f,...x})}else b.credentials=d;const v=JSON.stringify(b,null,2);return`fetch(${a}, ${v});`}async function db(n){var e,i;return(e=n.request.postData)!=null&&e._sha1?await fetch(`sha1/${n.request.postData._sha1}`).then(s=>s.text()):(i=n.request.postData)==null?void 0:i.text}class D_{generatePlaywrightRequestCall(e,i){let s=e.method.toLowerCase();const a=new URL(e.url),o=`${a.origin}${a.pathname}`,u={};["delete","get","head","post","put","patch"].includes(s)||(u.method=s,s="fetch"),a.searchParams.size&&(u.params=Object.fromEntries(a.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${s}(${f.join(", ")});`}prettyPrintObject(e,i=2,s=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"[]";const f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`[
77
77
  ${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
78
78
  `)}
79
79
  ${f}]`}if(Object.keys(e).length===0)return"{}";const a=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
80
80
  ${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${m}: ${p}`}).join(`,
81
81
  `)}
82
82
  ${a}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
83
- `)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class j_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),o=[`"${`${s.origin}${s.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),s.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(s.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const f=o.length===1?o[0]:`
83
+ `)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class B_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),o=[`"${`${s.origin}${s.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),s.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(s.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const f=o.length===1?o[0]:`
84
84
  ${o.map(d=>this.indent(d,2)).join(`,
85
85
  `)}
86
86
  `;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
@@ -91,7 +91,7 @@ ${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
91
91
  ${f}]`}if(Object.keys(e).length===0)return"{}";const a=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
92
92
  ${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1);return`${o}${this.stringLiteral(f)}: ${p}`}).join(`,
93
93
  `)}
94
- ${a}}`}stringLiteral(e){return JSON.stringify(e)}}class D_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),a=`${s.origin}${s.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),s.searchParams.size&&(o.Params=Object.fromEntries(s.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${a}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
94
+ ${a}}`}stringLiteral(e){return JSON.stringify(e)}}class U_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),a=`${s.origin}${s.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),s.searchParams.size&&(o.Params=Object.fromEntries(s.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${a}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
95
95
  `)}${u.length?`
96
96
  `:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,s=0){if(e===null||e===void 0)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[] {}";const f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`new object[] {
97
97
  ${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
@@ -99,52 +99,52 @@ ${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
99
99
  ${f}}`}if(Object.keys(e).length===0)return"new {}";const a=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`new() {
100
100
  ${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=s===0?f:`[${this.stringLiteral(f)}]`;return`${o}${m} = ${p}`}).join(`,
101
101
  `)}
102
- ${a}}`}stringLiteral(e){return JSON.stringify(e)}}class B_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),a=[`"${s.origin}${s.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,d]of s.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(d)})`);i&&o.push(`setData(${this.stringLiteral(i)})`);for(const f of e.headers)o.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return o.length>0&&a.push(`RequestOptions.create()
102
+ ${a}}`}stringLiteral(e){return JSON.stringify(e)}}class z_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),a=[`"${s.origin}${s.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,d]of s.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(d)})`);i&&o.push(`setData(${this.stringLiteral(i)})`);for(const f of e.headers)o.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return o.length>0&&a.push(`RequestOptions.create()
103
103
  .${o.join(`
104
104
  .`)}
105
- `),`request.${u}(${a.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function U_(n){if(n==="javascript")return new L_;if(n==="python")return new j_;if(n==="csharp")return new D_;if(n==="java")return new B_;throw new Error("Unsupported language: "+n)}const z_=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:s})=>{const[a,o]=q.useState("request"),u=ki(),f=Ko(async()=>{if(u&&n.request.postData){const d=n.request.headers.find(m=>m.name.toLowerCase()==="content-type"),p=d?d.value:"";if(n.request.postData._sha1){const m=await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`));return{text:_h(await m.text(),p),mimeType:p}}else return{text:_h(n.request.postData.text,p),mimeType:p}}else return null},[n],null);return S.jsx(xh,{dataTestId:"network-request-details",leftToolbar:[S.jsx(Dt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[S.jsx(H_,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>S.jsx(q_,{resource:n,startTimeOffset:i,requestBody:f})},{id:"response",title:"Response",render:()=>S.jsx($_,{resource:n})},{id:"body",title:"Body",render:()=>S.jsx(I_,{resource:n})}],selectedTab:a,setSelectedTab:o})},H_=({resource:n,sdkLanguage:e,requestBody:i})=>{const s=S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),a=async()=>U_(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return S.jsxs("div",{className:"copy-request-dropdown",children:[S.jsxs(Dt,{className:"copy-request-dropdown-toggle",children:[S.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",S.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),S.jsxs("div",{className:"copy-request-dropdown-menu",children:[S.jsx(Bo,{description:"Copy as cURL",copiedDescription:s,value:()=>O_(n)}),S.jsx(Bo,{description:"Copy as Fetch",copiedDescription:s,value:()=>R_(n)}),S.jsx(Bo,{description:"Copy as Playwright",copiedDescription:s,value:a})]})]})},q_=({resource:n,startTimeOffset:e,requestBody:i})=>S.jsxs("div",{className:"vbox network-request-details-tab",children:[S.jsx("div",{className:"network-request-details-header",children:"General"}),S.jsx("div",{className:"network-request-details-url",children:`URL: ${n.request.url}`}),S.jsx("div",{className:"network-request-details-general",children:`Method: ${n.request.method}`}),n.response.status!==-1&&S.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",S.jsx("span",{className:G_(n.response.status),style:{display:"inline-flex"},children:`${n.response.status} ${n.response.statusText}`})]}),n.request.queryString.length?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),S.jsx("div",{className:"network-request-details-headers",children:n.request.queryString.map(s=>`${s.name}: ${s.value}`).join(`
105
+ `),`request.${u}(${a.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function H_(n){if(n==="javascript")return new D_;if(n==="python")return new B_;if(n==="csharp")return new U_;if(n==="java")return new z_;throw new Error("Unsupported language: "+n)}const q_=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:s})=>{const[a,o]=q.useState("request"),u=ki(),f=Yo(async()=>{if(u&&n.request.postData){const d=n.request.headers.find(m=>m.name.toLowerCase()==="content-type"),p=d?d.value:"";if(n.request.postData._sha1){const m=await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`));return{text:_h(await m.text(),p),mimeType:p}}else return{text:_h(n.request.postData.text,p),mimeType:p}}else return null},[n],null);return S.jsx(xh,{dataTestId:"network-request-details",leftToolbar:[S.jsx(Dt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[S.jsx($_,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>S.jsx(I_,{resource:n,startTimeOffset:i,requestBody:f})},{id:"response",title:"Response",render:()=>S.jsx(V_,{resource:n})},{id:"body",title:"Body",render:()=>S.jsx(G_,{resource:n})}],selectedTab:a,setSelectedTab:o})},$_=({resource:n,sdkLanguage:e,requestBody:i})=>{const s=S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),a=async()=>H_(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return S.jsxs("div",{className:"copy-request-dropdown",children:[S.jsxs(Dt,{className:"copy-request-dropdown-toggle",children:[S.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",S.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),S.jsxs("div",{className:"copy-request-dropdown-menu",children:[S.jsx(Uo,{description:"Copy as cURL",copiedDescription:s,value:()=>L_(n)}),S.jsx(Uo,{description:"Copy as Fetch",copiedDescription:s,value:()=>j_(n)}),S.jsx(Uo,{description:"Copy as Playwright",copiedDescription:s,value:a})]})]})},I_=({resource:n,startTimeOffset:e,requestBody:i})=>S.jsxs("div",{className:"vbox network-request-details-tab",children:[S.jsx("div",{className:"network-request-details-header",children:"General"}),S.jsx("div",{className:"network-request-details-url",children:`URL: ${n.request.url}`}),S.jsx("div",{className:"network-request-details-general",children:`Method: ${n.request.method}`}),n.response.status!==-1&&S.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",S.jsx("span",{className:Y_(n.response.status),style:{display:"inline-flex"},children:`${n.response.status} ${n.response.statusText}`})]}),n.request.queryString.length?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),S.jsx("div",{className:"network-request-details-headers",children:n.request.queryString.map(s=>`${s.name}: ${s.value}`).join(`
106
106
  `)})]}):null,S.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),S.jsx("div",{className:"network-request-details-headers",children:n.request.headers.map(s=>`${s.name}: ${s.value}`).join(`
107
- `)}),S.jsx("div",{className:"network-request-details-header",children:"Time"}),S.jsx("div",{className:"network-request-details-general",children:`Start: ${_t(e)}`}),S.jsx("div",{className:"network-request-details-general",children:`Duration: ${_t(n.time)}`}),i&&S.jsx("div",{className:"network-request-details-header",children:"Request Body"}),i&&S.jsx(br,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]}),$_=({resource:n})=>S.jsxs("div",{className:"vbox network-request-details-tab",children:[S.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),S.jsx("div",{className:"network-request-details-headers",children:n.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
108
- `)})]}),I_=({resource:n})=>{const e=ki(),[i,s]=q.useState(null);return q.useEffect(()=>{(async()=>{if(e&&n.response.content._sha1){const o=n.response.content.mimeType.includes("image"),u=n.response.content.mimeType.includes("font"),f=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));if(o){const d=await f.blob(),p=new FileReader,m=new Promise(y=>p.onload=y);p.readAsDataURL(d),s({dataUrl:(await m).target.result})}else if(u){const d=await f.arrayBuffer();s({font:d})}else{const d=_h(await f.text(),n.response.content.mimeType);s({text:d,mimeType:n.response.content.mimeType})}}else s(null)})()},[n,e]),S.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&S.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&S.jsx(V_,{font:i.font}),i&&i.dataUrl&&S.jsx("div",{children:S.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text&&S.jsx(br,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]})},V_=({font:n})=>{const[e,i]=q.useState(!1);return q.useEffect(()=>{let s;try{s=new FontFace("font-preview",n),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(s)}},[n]),e?S.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):S.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",S.jsx("br",{}),"NOPQRSTUVWXYZ",S.jsx("br",{}),"abcdefghijklm",S.jsx("br",{}),"nopqrstuvwxyz",S.jsx("br",{}),"1234567890"]})};function G_(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function _h(n,e){if(n===null)return"Loading...";const i=n;if(i==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(i):i}function K_(n){const[e,i]=q.useState([]);q.useEffect(()=>{const o=[];for(let u=0;u<n.columns.length-1;++u){const f=n.columns[u];o[u]=(o[u-1]||0)+n.columnWidths.get(f)}i(o)},[n.columns,n.columnWidths]);function s(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const d=o[f]-(o[f-1]||0),p=n.columns[f];u.set(p,d)}n.setColumnWidths(u)}const a=q.useCallback(o=>{var u,f;(f=n.setSorting)==null||f.call(n,{by:o,negate:((u=n.sorting)==null?void 0:u.by)===o?!n.sorting.negate:!1})},[n]);return S.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[S.jsx(rb,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),S.jsxs("div",{className:"vbox",children:[S.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>S.jsxs("div",{className:"grid-view-header-cell "+Y_(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&a(o),children:[S.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),S.jsx("span",{className:"codicon codicon-triangle-up"}),S.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),S.jsx(uc,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>S.jsx(S.Fragment,{children:n.columns.map((f,d)=>{const{body:p,title:m}=n.render(o,f,u);return S.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:m,style:{width:d<n.columns.length-1?n.columnWidths.get(f):void 0},children:p},n.columnTitle(f))})}),icon:n.icon,isError:n.isError,isWarning:n.isWarning,isInfo:n.isInfo,selectedItem:n.selectedItem,onAccepted:n.onAccepted,onSelected:n.onSelected,onHighlighted:n.onHighlighted,onIconClicked:n.onIconClicked,noItemsMessage:n.noItemsMessage,dataTestId:n.dataTestId,notSelectable:n.notSelectable})]})]})}function Y_(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const X_=["Fetch","HTML","JS","CSS","Font","Image"],P_={searchValue:"",resourceTypes:new Set},F_=({filterState:n,onFilterStateChange:e})=>S.jsxs("div",{className:"network-filters",children:[S.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),S.jsxs("div",{className:"network-filters-resource-types",children:[S.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),X_.map(i=>S.jsx("div",{title:i,onClick:s=>{let a;s.ctrlKey||s.metaKey?a=n.resourceTypes.symmetricDifference(new Set([i])):a=new Set([i]),e({...n,resourceTypes:a})},className:`network-filters-resource-type ${n.resourceTypes.has(i)?"selected":""}`,children:i},i))]})]}),Q_=K_;function Z_(n,e){const i=q.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),s=q.useMemo(()=>new iT(n),[n]);return{resources:i,contextIdMap:s}}const J_=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:s})=>{const[a,o]=q.useState(void 0),[u,f]=q.useState(void 0),[d,p]=q.useState(P_),{renderedEntries:m}=q.useMemo(()=>{const x=e.resources.map((T,C)=>sT(T,n,e.contextIdMap,C)).filter(cT(d));return a&&aT(x,a),{renderedEntries:x}},[e.resources,e.contextIdMap,d,a,n]),[y,b]=q.useState(()=>new Map(hb().map(x=>[x,eT(x)]))),v=q.useCallback(x=>{p(x),f(void 0)},[]);if(!e.resources.length)return S.jsx(us,{text:"No network calls"});const E=S.jsx(Q_,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:u,onSelected:x=>f(x),onHighlighted:x=>i==null?void 0:i(x==null?void 0:x.ordinal),columns:tT(!!u,m),columnTitle:W_,columnWidths:y,setColumnWidths:b,isError:x=>x.status.code>=400||x.status.code===-1,isInfo:x=>!!x.route,render:(x,T)=>nT(x,T),sorting:a,setSorting:o});return S.jsxs(S.Fragment,{children:[S.jsx(F_,{filterState:d,onFilterStateChange:v}),!u&&E,u&&S.jsx(Xo,{sidebarSize:y.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:S.jsx(z_,{resource:u.resource,sdkLanguage:s,startTimeOffset:u.start,onClose:()=>f(void 0)}),sidebar:E})]})},W_=n=>n==="contextId"?"Source":n==="name"?"Name":n==="method"?"Method":n==="status"?"Status":n==="contentType"?"Content Type":n==="duration"?"Duration":n==="size"?"Size":n==="start"?"Start":n==="route"?"Route":"",eT=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function tT(n,e){if(n){const s=["name"];return Vy(e)&&s.unshift("contextId"),s}let i=hb();return Vy(e)||(i=i.filter(s=>s!=="contextId")),i}function hb(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const nT=(n,e)=>e==="contextId"?{body:n.contextId,title:n.name.url}:e==="name"?{body:n.name.name,title:n.name.url}:e==="method"?{body:n.method}:e==="status"?{body:n.status.code>0?n.status.code:"",title:n.status.text}:e==="contentType"?{body:n.contentType}:e==="duration"?{body:_t(n.duration)}:e==="size"?{body:jw(n.size)}:e==="start"?{body:_t(n.start)}:e==="route"?{body:n.route}:{body:""};class iT{constructor(e){Ae(this,"_pagerefToShortId",new Map);Ae(this,"_contextToId",new Map);Ae(this,"_lastPageId",0);Ae(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let i=this._pagerefToShortId.get(e);return i||(++this._lastPageId,i="page#"+this._lastPageId,this._pagerefToShortId.set(e,i)),i}_apiRequestContextId(e){const i=O0(e);if(!i)return"";let s=this._contextToId.get(i);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(i,s)),s}}function Vy(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const sT=(n,e,i,s)=>{const a=rT(n);let o;try{const d=new URL(n.request.url);o=d.pathname.substring(d.pathname.lastIndexOf("/")+1),o||(o=d.host),d.search&&(o+=d.search)}catch{o=n.request.url}let u=n.response.content.mimeType;const f=u.match(/^(.*);\s*charset=.*$/);return f&&(u=f[1]),{ordinal:s,name:{name:o,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:u,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:a,resource:n,contextId:i.contextId(n)}};function rT(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function aT(n,e){const i=lT(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function lT(n){if(n==="start")return(e,i)=>e.start-i.start;if(n==="duration")return(e,i)=>e.duration-i.duration;if(n==="status")return(e,i)=>e.status.code-i.status.code;if(n==="method")return(e,i)=>{const s=e.method,a=i.method;return s.localeCompare(a)};if(n==="size")return(e,i)=>e.size-i.size;if(n==="contentType")return(e,i)=>e.contentType.localeCompare(i.contentType);if(n==="name")return(e,i)=>e.name.name.localeCompare(i.name.name);if(n==="route")return(e,i)=>e.route.localeCompare(i.route);if(n==="contextId")return(e,i)=>e.contextId.localeCompare(i.contextId)}const oT={Fetch:n=>n==="application/json",HTML:n=>n==="text/html",CSS:n=>n==="text/css",JS:n=>n.includes("javascript"),Font:n=>n.includes("font"),Image:n=>n.includes("image")};function cT({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(a=>oT[a](i.contentType)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function uT(n,e){return n.active===e.active&&n.checked===e.checked&&n.disabled===e.disabled&&n.expanded===e.expanded&&n.selected===e.selected&&n.level===e.level&&n.pressed===e.pressed}function Kh(n,e,i={}){var b;const s=new n.LineCounter,a={keepSourceTokens:!0,lineCounter:s,...i},o=n.parseDocument(e,a),u=[],f=v=>[s.linePos(v[0]),s.linePos(v[1])],d=v=>{u.push({message:v.message,range:[s.linePos(v.pos[0]),s.linePos(v.pos[1])]})},p=(v,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const k=Jo.parse(x,a,u);k&&(v.children=v.children||[],v.children.push(k));continue}if(x instanceof n.YAMLMap){m(v,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},m=(v,E)=>{for(const x of E.items){if(v.children=v.children||[],!(x.key instanceof n.Scalar&&typeof x.key.value=="string")){u.push({message:"Only string keys are supported",range:f(x.key.range||E.range)});continue}const C=x.key,k=x.value;if(C.value==="text"){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||E.range)});continue}v.children.push({kind:"text",text:Wf(k.value)});continue}if(C.value==="/children"){if(!(k instanceof n.Scalar&&typeof k.value=="string")||k.value!=="contain"&&k.value!=="equal"&&k.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||E.range)});continue}v.containerMode=k.value;continue}if(C.value.startsWith("/")){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||E.range)});continue}v.props=v.props??{},v.props[C.value.slice(1)]=Wf(k.value);continue}const $=Jo.parse(C,a,u);if(!$)continue;if(k instanceof n.Scalar){const G=typeof k.value;if(G!=="string"&&G!=="number"&&G!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}v.children.push({...$,children:[{kind:"text",text:Wf(String(k.value))}]});continue}if(k instanceof n.YAMLSeq){v.children.push($),p($,k);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||E.range)})}},y={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:y}:(o.contents instanceof n.YAMLSeq||u.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?f(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),u.length?{errors:u,fragment:y}:(p(y,o.contents),u.length?{errors:u,fragment:fT}:((b=y.children)==null?void 0:b.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const fT={kind:"role",role:"fragment"};function db(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Wf(n){return{raw:n,normalized:db(n)}}class Jo{static parse(e,i,s){try{return new Jo(e.value)._parse()}catch(a){if(a instanceof Gy){const o=i.prettyErrors===!1?a.message:a.message+`:
107
+ `)}),S.jsx("div",{className:"network-request-details-header",children:"Time"}),S.jsx("div",{className:"network-request-details-general",children:`Start: ${_t(e)}`}),S.jsx("div",{className:"network-request-details-general",children:`Duration: ${_t(n.time)}`}),i&&S.jsx("div",{className:"network-request-details-header",children:"Request Body"}),i&&S.jsx(br,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]}),V_=({resource:n})=>S.jsxs("div",{className:"vbox network-request-details-tab",children:[S.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),S.jsx("div",{className:"network-request-details-headers",children:n.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
108
+ `)})]}),G_=({resource:n})=>{const e=ki(),[i,s]=q.useState(null);return q.useEffect(()=>{(async()=>{if(e&&n.response.content._sha1){const o=n.response.content.mimeType.includes("image"),u=n.response.content.mimeType.includes("font"),f=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));if(o){const d=await f.blob(),p=new FileReader,m=new Promise(y=>p.onload=y);p.readAsDataURL(d),s({dataUrl:(await m).target.result})}else if(u){const d=await f.arrayBuffer();s({font:d})}else{const d=_h(await f.text(),n.response.content.mimeType);s({text:d,mimeType:n.response.content.mimeType})}}else s(null)})()},[n,e]),S.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&S.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&S.jsx(K_,{font:i.font}),i&&i.dataUrl&&S.jsx("div",{children:S.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text&&S.jsx(br,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]})},K_=({font:n})=>{const[e,i]=q.useState(!1);return q.useEffect(()=>{let s;try{s=new FontFace("font-preview",n),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(s)}},[n]),e?S.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):S.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",S.jsx("br",{}),"NOPQRSTUVWXYZ",S.jsx("br",{}),"abcdefghijklm",S.jsx("br",{}),"nopqrstuvwxyz",S.jsx("br",{}),"1234567890"]})};function Y_(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function _h(n,e){if(n===null)return"Loading...";const i=n;if(i==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(i):i}function X_(n){const[e,i]=q.useState([]);q.useEffect(()=>{const o=[];for(let u=0;u<n.columns.length-1;++u){const f=n.columns[u];o[u]=(o[u-1]||0)+n.columnWidths.get(f)}i(o)},[n.columns,n.columnWidths]);function s(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const d=o[f]-(o[f-1]||0),p=n.columns[f];u.set(p,d)}n.setColumnWidths(u)}const a=q.useCallback(o=>{var u,f;(f=n.setSorting)==null||f.call(n,{by:o,negate:((u=n.sorting)==null?void 0:u.by)===o?!n.sorting.negate:!1})},[n]);return S.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[S.jsx(lb,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),S.jsxs("div",{className:"vbox",children:[S.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>S.jsxs("div",{className:"grid-view-header-cell "+P_(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&a(o),children:[S.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),S.jsx("span",{className:"codicon codicon-triangle-up"}),S.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),S.jsx(uc,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>S.jsx(S.Fragment,{children:n.columns.map((f,d)=>{const{body:p,title:m}=n.render(o,f,u);return S.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:m,style:{width:d<n.columns.length-1?n.columnWidths.get(f):void 0},children:p},n.columnTitle(f))})}),icon:n.icon,isError:n.isError,isWarning:n.isWarning,isInfo:n.isInfo,selectedItem:n.selectedItem,onAccepted:n.onAccepted,onSelected:n.onSelected,onHighlighted:n.onHighlighted,onIconClicked:n.onIconClicked,noItemsMessage:n.noItemsMessage,dataTestId:n.dataTestId,notSelectable:n.notSelectable})]})]})}function P_(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const F_=["Fetch","HTML","JS","CSS","Font","Image"],Q_={searchValue:"",resourceTypes:new Set},Z_=({filterState:n,onFilterStateChange:e})=>S.jsxs("div",{className:"network-filters",children:[S.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),S.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[S.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),F_.map(i=>S.jsx("div",{title:i,onClick:s=>{let a;s.ctrlKey||s.metaKey?a=n.resourceTypes.symmetricDifference(new Set([i])):a=new Set([i]),e({...n,resourceTypes:a})},className:`network-filters-resource-type ${n.resourceTypes.has(i)?"selected":""}`,role:"tab","aria-selected":n.resourceTypes.has(i),children:i},i))]})]}),J_=X_;function W_(n,e){const i=q.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),s=q.useMemo(()=>new rT(n),[n]);return{resources:i,contextIdMap:s}}const eT=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:s})=>{const[a,o]=q.useState(void 0),[u,f]=q.useState(void 0),[d,p]=q.useState(Q_),{renderedEntries:m}=q.useMemo(()=>{const x=e.resources.map((T,C)=>aT(T,n,e.contextIdMap,C)).filter(fT(d));return a&&oT(x,a),{renderedEntries:x}},[e.resources,e.contextIdMap,d,a,n]),[y,b]=q.useState(()=>new Map(pb().map(x=>[x,nT(x)]))),v=q.useCallback(x=>{p(x),f(void 0)},[]);if(!e.resources.length)return S.jsx(us,{text:"No network calls"});const E=S.jsx(J_,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:u,onSelected:x=>f(x),onHighlighted:x=>i==null?void 0:i(x==null?void 0:x.ordinal),columns:iT(!!u,m),columnTitle:tT,columnWidths:y,setColumnWidths:b,isError:x=>x.status.code>=400||x.status.code===-1,isInfo:x=>!!x.route,render:(x,T)=>sT(x,T),sorting:a,setSorting:o});return S.jsxs(S.Fragment,{children:[S.jsx(Z_,{filterState:d,onFilterStateChange:v}),!u&&E,u&&S.jsx(Po,{sidebarSize:y.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:S.jsx(q_,{resource:u.resource,sdkLanguage:s,startTimeOffset:u.start,onClose:()=>f(void 0)}),sidebar:E})]})},tT=n=>n==="contextId"?"Source":n==="name"?"Name":n==="method"?"Method":n==="status"?"Status":n==="contentType"?"Content Type":n==="duration"?"Duration":n==="size"?"Size":n==="start"?"Start":n==="route"?"Route":"",nT=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function iT(n,e){if(n){const s=["name"];return Vy(e)&&s.unshift("contextId"),s}let i=pb();return Vy(e)||(i=i.filter(s=>s!=="contextId")),i}function pb(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const sT=(n,e)=>e==="contextId"?{body:n.contextId,title:n.name.url}:e==="name"?{body:n.name.name,title:n.name.url}:e==="method"?{body:n.method}:e==="status"?{body:n.status.code>0?n.status.code:"",title:n.status.text}:e==="contentType"?{body:n.contentType}:e==="duration"?{body:_t(n.duration)}:e==="size"?{body:Bw(n.size)}:e==="start"?{body:_t(n.start)}:e==="route"?{body:n.route}:{body:""};class rT{constructor(e){Ae(this,"_pagerefToShortId",new Map);Ae(this,"_contextToId",new Map);Ae(this,"_lastPageId",0);Ae(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let i=this._pagerefToShortId.get(e);return i||(++this._lastPageId,i="page#"+this._lastPageId,this._pagerefToShortId.set(e,i)),i}_apiRequestContextId(e){const i=L0(e);if(!i)return"";let s=this._contextToId.get(i);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(i,s)),s}}function Vy(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const aT=(n,e,i,s)=>{const a=lT(n);let o;try{const d=new URL(n.request.url);o=d.pathname.substring(d.pathname.lastIndexOf("/")+1),o||(o=d.host),d.search&&(o+=d.search)}catch{o=n.request.url}let u=n.response.content.mimeType;const f=u.match(/^(.*);\s*charset=.*$/);return f&&(u=f[1]),{ordinal:s,name:{name:o,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:u,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:a,resource:n,contextId:i.contextId(n)}};function lT(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function oT(n,e){const i=cT(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function cT(n){if(n==="start")return(e,i)=>e.start-i.start;if(n==="duration")return(e,i)=>e.duration-i.duration;if(n==="status")return(e,i)=>e.status.code-i.status.code;if(n==="method")return(e,i)=>{const s=e.method,a=i.method;return s.localeCompare(a)};if(n==="size")return(e,i)=>e.size-i.size;if(n==="contentType")return(e,i)=>e.contentType.localeCompare(i.contentType);if(n==="name")return(e,i)=>e.name.name.localeCompare(i.name.name);if(n==="route")return(e,i)=>e.route.localeCompare(i.route);if(n==="contextId")return(e,i)=>e.contextId.localeCompare(i.contextId)}const uT={Fetch:n=>n==="application/json",HTML:n=>n==="text/html",CSS:n=>n==="text/css",JS:n=>n.includes("javascript"),Font:n=>n.includes("font"),Image:n=>n.includes("image")};function fT({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(a=>uT[a](i.contentType)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function hT(n,e){return n.active===e.active&&n.checked===e.checked&&n.disabled===e.disabled&&n.expanded===e.expanded&&n.selected===e.selected&&n.level===e.level&&n.pressed===e.pressed}function Kh(n,e,i={}){var b;const s=new n.LineCounter,a={keepSourceTokens:!0,lineCounter:s,...i},o=n.parseDocument(e,a),u=[],f=v=>[s.linePos(v[0]),s.linePos(v[1])],d=v=>{u.push({message:v.message,range:[s.linePos(v.pos[0]),s.linePos(v.pos[1])]})},p=(v,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const k=Wo.parse(x,a,u);k&&(v.children=v.children||[],v.children.push(k));continue}if(x instanceof n.YAMLMap){m(v,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},m=(v,E)=>{for(const x of E.items){if(v.children=v.children||[],!(x.key instanceof n.Scalar&&typeof x.key.value=="string")){u.push({message:"Only string keys are supported",range:f(x.key.range||E.range)});continue}const C=x.key,k=x.value;if(C.value==="text"){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||E.range)});continue}v.children.push({kind:"text",text:Wf(k.value)});continue}if(C.value==="/children"){if(!(k instanceof n.Scalar&&typeof k.value=="string")||k.value!=="contain"&&k.value!=="equal"&&k.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||E.range)});continue}v.containerMode=k.value;continue}if(C.value.startsWith("/")){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||E.range)});continue}v.props=v.props??{},v.props[C.value.slice(1)]=Wf(k.value);continue}const $=Wo.parse(C,a,u);if(!$)continue;if(k instanceof n.Scalar){const G=typeof k.value;if(G!=="string"&&G!=="number"&&G!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}v.children.push({...$,children:[{kind:"text",text:Wf(String(k.value))}]});continue}if(k instanceof n.YAMLSeq){v.children.push($),p($,k);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||E.range)})}},y={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:y}:(o.contents instanceof n.YAMLSeq||u.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?f(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),u.length?{errors:u,fragment:y}:(p(y,o.contents),u.length?{errors:u,fragment:dT}:((b=y.children)==null?void 0:b.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const dT={kind:"role",role:"fragment"};function gb(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Wf(n){return{raw:n,normalized:gb(n)}}class Wo{static parse(e,i,s){try{return new Wo(e.value)._parse()}catch(a){if(a instanceof Gy){const o=i.prettyErrors===!1?a.message:a.message+`:
109
109
 
110
110
  `+e.value+`
111
111
  `+" ".repeat(a.pos)+`^
112
- `;return s.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+a.pos)]}),null}throw a}}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}`);const i=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(i,this._pos)}_readString(){let e="",i=!1;for(;!this._eof();){const s=this._next();if(i)e+=s,i=!1;else if(s==="\\")i=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new Gy(e,i||this._pos)}_readRegex(){let e="",i=!1,s=!1;for(;!this._eof();){const a=this._next();if(i)e+=a,i=!1;else if(a==="\\")i=!0,e+=a;else{if(a==="/"&&!s)return{pattern:e};a==="["?(s=!0,e+=a):a==="]"&&s?(e+=a,s=!1):e+=a}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),db(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let i=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),i=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let a="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)a+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,a||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",s={kind:"role",role:e,name:i};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,i,s,a){if(i==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',a),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',a),e.disabled=s==="true";return}if(i==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',a),e.expanded=s==="true";return}if(i==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',a),e.active=s==="true";return}if(i==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',a),e.level=Number(s);return}if(i==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',a),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',a),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,a)}_assert(e,i,s){e||this._throwError(i||"Assertion error",s)}}class Gy extends Error{constructor(e,i){super(e),this.pos=i}}let pb={};function hT(n){pb=n}function Wa(n,e){for(;e;){if(n.contains(e))return!0;e=mb(e)}return!1}function gt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function gb(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function mb(n){for(;n.parentElement;)n=n.parentElement;return gt(n)}function Ha(n,e,i){for(;n;){const s=n.closest(e);if(i&&s!==i&&(s!=null&&s.contains(i)))return;if(s)return s;n=mb(n)}}function Mi(n,e){const i=e==="::before"?Xh:e==="::after"?Ph:Yh;if(i&&i.has(n))return i.get(n);const s=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,s),s}function yb(n,e){if(e=e??Mi(n),!e)return!0;if(Element.prototype.checkVisibility&&pb.browserNameForWorkarounds!=="webkit"){if(!n.checkVisibility())return!1}else{const i=n.closest("details,summary");if(i!==n&&(i==null?void 0:i.nodeName)==="DETAILS"&&!i.open)return!1}return e.visibility==="visible"}function Wo(n){const e=Mi(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let a=n.firstChild;a;a=a.nextSibling){if(a.nodeType===1&&Ei(a))return{visible:!0,inline:!1,cursor:i};if(a.nodeType===3&&bb(a))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!yb(n,e))return{cursor:i,visible:!1,inline:!1};const s=n.getBoundingClientRect();return{rect:s,cursor:i,visible:s.width>0&&s.height>0,inline:e.display==="inline"}}function Ei(n){return Wo(n).visible}function bb(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function it(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let Yh,Xh,Ph,vb=0;function Fh(){++vb,Yh??(Yh=new Map),Xh??(Xh=new Map),Ph??(Ph=new Map)}function Qh(){--vb||(Yh=void 0,Xh=void 0,Ph=void 0)}function Ky(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const Yy="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]",dT=[["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 Sb(n,e){return dT.some(([i,s])=>!(s!=null&&s.includes(e||""))&&n.hasAttribute(i))}function wb(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function pT(n){return!Lb(n)&&(gT(n)||wb(n))}function gT(n){const e=it(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const eh={A:n=>n.hasAttribute("href")?"link":null,AREA:n=>n.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:n=>Ha(n,Yy)?null:"contentinfo",FORM:n=>Ky(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>Ha(n,Yy)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!Sb(n)&&!wb(n)?"presentation":"img",INPUT:n=>{const e=n.type.toLowerCase();if(e==="search")return n.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const i=_r(n,n.getAttribute("list"))[0];return i&&it(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":OT[e]||"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:n=>Ky(n)?"region":null,SELECT:n=>n.hasAttribute("multiple")||n.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:n=>{const e=Ha(n,"table"),i=e?ec(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:n=>{if(n.getAttribute("scope")==="col")return"columnheader";if(n.getAttribute("scope")==="row")return"rowheader";const e=Ha(n,"table"),i=e?ec(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},mT={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 Xy(n){var s;const e=((s=eh[it(n)])==null?void 0:s.call(eh,n))||"";if(!e)return null;let i=n;for(;i;){const a=gt(i),o=mT[it(i)];if(!o||!a||!o.includes(it(a)))break;const u=ec(a);if((u==="none"||u==="presentation")&&!xb(a,u))return u;i=a}return e}const yT=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function ec(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>yT.includes(i))||null}function xb(n,e){return Sb(n,e)||pT(n)}function ut(n){const e=ec(n);if(!e)return Xy(n);if(e==="none"||e==="presentation"){const i=Xy(n);if(xb(n,i))return i}return e}function _b(n){return n===null?void 0:n.toLowerCase()==="true"}function Tb(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(it(n))}function sn(n){if(Tb(n))return!0;const e=Mi(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let a=n.firstChild;a;a=a.nextSibling)if(a.nodeType===1&&!sn(a)||a.nodeType===3&&bb(a))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!yb(n,e)?!0:Eb(n)}function Eb(n){let e=Ti==null?void 0:Ti.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=Mi(n);e=!i||i.display==="none"||_b(n.getAttribute("aria-hidden"))===!0}if(!e){const i=gt(n);i&&(e=Eb(i))}Ti==null||Ti.set(n,e)}return e}function _r(n,e){if(!e)return[];const i=gb(n);if(!i)return[];try{const s=e.split(" ").filter(o=>!!o),a=[];for(const o of s){const u=i.querySelector("#"+CSS.escape(o));u&&!a.includes(u)&&a.push(u)}return a}catch{return[]}}function Kn(n){return n.trim()}function Ka(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
113
- `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function Py(n,e){const i=[...n.querySelectorAll(e)];for(const s of _r(n,n.getAttribute("aria-owns")))s.matches(e)&&i.push(s),i.push(...s.querySelectorAll(e));return i}function Ya(n,e){const i=e==="::before"?od:e==="::after"?cd:ld;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const s=Mi(n,e);let a;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(a=bT(n,o,!!e))}return e&&a!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(a=" "+a+" "),i&&i.set(n,a),a}function bT(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let s=R0(e).filter(f=>!(f instanceof Po));const a=s.findIndex(f=>f instanceof ot&&f.value==="/");if(a!==-1)s=s.slice(a+1);else if(!i)return;const o=[];let u=0;for(;u<s.length;)if(s[u]instanceof $h)o.push(s[u].value),u++;else if(u+2<s.length&&s[u]instanceof Ga&&s[u].value==="attr"&&s[u+1]instanceof qh&&s[u+2]instanceof Hh){const f=s[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function Ab(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=_r(n,e);return i.length?i:null}function vT(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),s=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(n);return i||s}function el(n,e){const i=e?sd:id;let s=i==null?void 0:i.get(n);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ut(n)||"")||(s=Ka(dn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,s)),s}function Fy(n,e){const i=e?ad:rd;let s=i==null?void 0:i.get(n);if(s===void 0){if(s="",n.hasAttribute("aria-describedby")){const a=_r(n,n.getAttribute("aria-describedby"));s=Ka(a.map(o=>dn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:sn(o)}})).join(" "))}else n.hasAttribute("aria-description")?s=Ka(n.getAttribute("aria-description")||""):s=Ka(n.getAttribute("title")||"");i==null||i.set(n,s)}return s}function ST(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function wT(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function xT(n){const e=cr;let i=cr==null?void 0:cr.get(n);if(i===void 0){i="";const s=ST(n)!=="false",a=wT(n);if(s||a){const o=n.getAttribute("aria-errormessage");i=_r(n,o).map(d=>Ka(dn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:sn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function dn(n,e){var d,p,m,y;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const b=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Tb(n)||!b&&sn(n))return e.visitedElements.add(n),""}const s=Ab(n);if(!e.embeddedInLabelledBy){const b=(s||[]).map(v=>dn(v,{...e,embeddedInLabelledBy:{element:v,hidden:sn(v)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(b)return b}const a=ut(n)||"",o=it(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const b=[...n.labels||[]].includes(n),v=(s||[]).includes(n);if(!b&&!v){if(a==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(a)){e.visitedElements.add(n);let E;if(o==="SELECT")E=[...n.selectedOptions],!E.length&&n.options.length&&E.push(n.options[0]);else{const x=a==="combobox"?Py(n,"*").find(T=>ut(T)==="listbox"):n;E=x?Py(x,'[aria-selected="true"]').filter(T=>ut(T)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>dn(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(a))return e.visitedElements.add(n),n.hasAttribute("aria-valuetext")?n.getAttribute("aria-valuetext")||"":n.hasAttribute("aria-valuenow")?n.getAttribute("aria-valuenow")||"":n.getAttribute("value")||"";if(["menu"].includes(a))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(Kn(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(a)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const b=n.value||"";return Kn(b)?b:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const b=n.labels||[];return b.length&&!e.embeddedInLabelledBy?Oa(b,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const b=n.labels||[];if(b.length&&!e.embeddedInLabelledBy)return Oa(b,e);const v=n.getAttribute("alt")||"";if(Kn(v))return v;const E=n.getAttribute("title")||"";return Kn(E)?E:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(n);const b=n.labels||[];if(b.length)return Oa(b,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(n);const b=n.labels||[];return b.length?Oa(b,e):n.getAttribute("title")||""}if(!s&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const b=n.labels||[];if(b.length)return Oa(b,e);const v=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",E=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!v||x?x:E}if(!s&&o==="FIELDSET"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(it(v)==="LEGEND")return dn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:sn(v)}});return n.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(it(v)==="FIGCAPTION")return dn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:sn(v)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return Kn(b)?b:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(it(v)==="CAPTION")return dn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:sn(v)}});const b=n.getAttribute("summary")||"";if(b)return b}if(o==="AREA"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return Kn(b)?b:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let b=n.firstElementChild;b;b=b.nextElementSibling)if(it(b)==="TITLE"&&b.ownerSVGElement)return dn(b,{...i,embeddedInLabelledBy:{element:b,hidden:sn(b)}})}if(n.ownerSVGElement&&o==="A"){const b=n.getAttribute("xlink:title")||"";if(Kn(b))return e.visitedElements.add(n),b}}const f=o==="SUMMARY"&&!["presentation","none"].includes(a);if(vT(a,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const b=_T(n,i);if(e.embeddedInTargetElement==="self"?Kn(b):b)return b}if(!["presentation","none"].includes(a)||o==="IFRAME"){e.visitedElements.add(n);const b=n.getAttribute("title")||"";if(Kn(b))return b}return e.visitedElements.add(n),""}function _T(n,e){const i=[],s=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=Mi(o))==null?void 0:f.display)||"inline";let p=dn(o,e);(d!=="inline"||o.nodeName==="BR")&&(p=" "+p+" "),i.push(p)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Ya(n,"::before")||"");const a=Ya(n);if(a!==void 0)i.push(a);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)s(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)s(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)s(u,!0);for(const u of _r(n,n.getAttribute("aria-owns")))s(u,!0)}}return i.push(Ya(n,"::after")||""),i.join("")}const Zh=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Nb(n){return it(n)==="OPTION"?n.selected:Zh.includes(ut(n)||"")?_b(n.getAttribute("aria-selected"))===!0:!1}const Jh=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Cb(n){const e=Wh(n,!0);return e==="error"?!1:e}function TT(n){return Wh(n,!0)}function ET(n){return Wh(n,!1)}function Wh(n,e){const i=it(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(Jh.includes(ut(n)||"")){const s=n.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const AT=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function NT(n){const e=it(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):AT.includes(ut(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const ed=["button"];function kb(n){if(ed.includes(ut(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const td=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Mb(n){if(it(n)==="DETAILS")return n.open;if(td.includes(ut(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const nd=["heading","listitem","row","treeitem"];function Ob(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[it(n)];if(e)return e;if(nd.includes(ut(n)||"")){const i=n.getAttribute("aria-level"),s=i===null?Number.NaN:Number(i);if(Number.isInteger(s)&&s>=1)return s}return 0}const Rb=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function tc(n){return Lb(n)||jb(n)}function Lb(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(it(n))&&(n.hasAttribute("disabled")||CT(n)||kT(n))}function CT(n){return it(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function kT(n){const e=n==null?void 0:n.closest("FIELDSET[DISABLED]");if(!e)return!1;const i=e.querySelector(":scope > LEGEND");return!i||!i.contains(n)}function jb(n,e=!1){if(!n)return!1;if(e||Rb.includes(ut(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:jb(gt(n),!0)}return!1}function Oa(n,e){return[...n].map(i=>dn(i,{...e,embeddedInLabel:{element:i,hidden:sn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function MT(n){const e=ud;let i=n,s;const a=[];for(;i;i=gt(i)){const o=e.get(i);if(o!==void 0){s=o;break}a.push(i);const u=Mi(i);if(!u){s=!0;break}const f=u.pointerEvents;if(f){s=f!=="none";break}}s===void 0&&(s=!0);for(const o of a)e.set(o,s);return s}let id,sd,rd,ad,cr,Ti,ld,od,cd,ud,Db=0;function hc(){Fh(),++Db,id??(id=new Map),sd??(sd=new Map),rd??(rd=new Map),ad??(ad=new Map),cr??(cr=new Map),Ti??(Ti=new Map),ld??(ld=new Map),od??(od=new Map),cd??(cd=new Map),ud??(ud=new Map)}function dc(){--Db||(id=void 0,sd=void 0,rd=void 0,ad=void 0,cr=void 0,Ti=void 0,ld=void 0,od=void 0,cd=void 0,ud=void 0),Qh()}const OT={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function RT(n){return Bb(n)?"'"+n.replace(/'/g,"''")+"'":n}function th(n){return Bb(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
114
- `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function Bb(n){return!!(n.length===0||/^\s|\s$/.test(n)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(n)||/^-/.test(n)||/[\n:](\s|$)/.test(n)||/\s#/.test(n)||/[\n\r]/.test(n)||/^[&*\],?!>|@"'#%]/.test(n)||/[{}`]/.test(n)||/^\[/.test(n)||!isNaN(Number(n))||["y","n","yes","no","true","false","on","off","null"].includes(n.toLowerCase()))}function LT(n,e){if(n.role!==e.role||n.name!==e.name||!uT(n,e)||ic(n)!==ic(e))return!1;const i=Object.keys(n.props),s=Object.keys(e.props);return i.length===s.length&&i.every(a=>n.props[a]===e.props[a])}let jT=0;function Ub(n){return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Xa(n,e){const i=Ub(e),s=new Set,a={root:{role:"fragment",name:"",children:[],element:n,props:{},box:Wo(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]},o=(f,d,p)=>{if(s.has(d))return;if(s.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!sn(m);let b=y;if(i.visibility==="ariaOrVisible"&&(b=y||Ei(m)),i.visibility==="ariaAndVisible"&&(b=y&&Ei(m)),i.visibility==="aria"&&!b)return;const v=[];if(m.hasAttribute("aria-owns")){const x=m.getAttribute("aria-owns").split(/\s+/);for(const T of x){const C=n.ownerDocument.getElementById(T);C&&v.push(C)}}const E=b?DT(m,i):null;E&&(E.ref&&(a.elements.set(E.ref,m),a.refs.set(m,E.ref),E.role==="iframe"&&a.iframeRefs.push(E.ref)),f.children.push(E)),u(E||f,m,v,b)};function u(f,d,p,m){var E;const b=(((E=Mi(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";b&&f.children.push(b),f.children.push(Ya(d,"::before")||"");const v=d.nodeName==="SLOT"?d.assignedNodes():[];if(v.length)for(const x of v)o(f,x,m);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,m);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,m)}for(const x of p)o(f,x,m);if(f.children.push(Ya(d,"::after")||""),b&&f.children.push(b),f.children.length===1&&f.name===f.children[0]&&(f.children=[]),f.role==="link"&&d.hasAttribute("href")){const x=d.getAttribute("href");f.props.url=x}if(f.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==f.name){const x=d.getAttribute("placeholder");f.props.placeholder=x}}hc();try{o(a.root,n,!0)}finally{dc()}return UT(a.root),BT(a.root),a}function Qy(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;let i;i=n.element._ariaRef,(!i||i.role!==n.role||i.name!==n.name)&&(i={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++jT},n.element._ariaRef=i),n.ref=i.ref}function DT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},element:n,box:Wo(n),receivesPointerEvents:!0,active:i};return Qy(p,e),p}const s=e.includeGenericRole?"generic":null,a=ut(n)??s;if(!a||a==="presentation"||a==="none")return null;const o=Tt(el(n,!1)||""),u=MT(n),f=Wo(n);if(a==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:a,name:o,children:[],props:{},element:n,box:f,receivesPointerEvents:u,active:i};return Qy(d,e),Jh.includes(a)&&(d.checked=Cb(n)),Rb.includes(a)&&(d.disabled=tc(n)),td.includes(a)&&(d.expanded=Mb(n)),nd.includes(a)&&(d.level=Ob(n)),ed.includes(a)&&(d.pressed=kb(n)),Zh.includes(a)&&(d.selected=Nb(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function BT(n){const e=i=>{const s=[];for(const o of i.children||[]){if(typeof o=="string"){s.push(o);continue}const u=e(o);s.push(...u)}return i.role==="generic"&&!i.name&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(i.children=s,[i])};e(n)}function UT(n){const e=(s,a)=>{if(!s.length)return;const o=Tt(s.join(""));o&&a.push(o),s.length=0},i=s=>{const a=[],o=[];for(const u of s.children||[])typeof u=="string"?o.push(u):(e(o,a),i(u),a.push(u));e(o,a),s.children=a.length?a:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};i(n)}function zT(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function Zy(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=HT(e);return i?!!n.match(i):!1}const nh=Symbol("cachedRegex");function HT(n){if(n[nh]!==void 0)return n[nh];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let s;try{s=i?new RegExp(e.slice(1,-1)):null}catch{s=null}return n[nh]=s,s}function qT(n,e){const i=Xa(n,{mode:"expect"});return{matches:zb(i.root,e,!1,!1),received:{raw:nc(i,{mode:"expect"}),regex:nc(i,{mode:"codegen"})}}}function $T(n,e){const i=Xa(n,{mode:"expect"}).root;return zb(i,e,!0,!1).map(a=>a.element)}function fd(n,e,i){var s;return typeof n=="string"&&e.kind==="text"?Zy(n,e.text):n===null||typeof n!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==n.role||e.checked!==void 0&&e.checked!==n.checked||e.disabled!==void 0&&e.disabled!==n.disabled||e.expanded!==void 0&&e.expanded!==n.expanded||e.level!==void 0&&e.level!==n.level||e.pressed!==void 0&&e.pressed!==n.pressed||e.selected!==void 0&&e.selected!==n.selected||!zT(n.name,e.name)||!Zy(n.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?Wy(n.children||[],e.children||[]):e.containerMode==="equal"?Jy(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?Jy(n.children||[],e.children||[],!0):Wy(n.children||[],e.children||[])}function Jy(n,e,i){if(e.length!==n.length)return!1;for(let s=0;s<e.length;++s)if(!fd(n[s],e[s],i))return!1;return!0}function Wy(n,e){if(e.length>n.length)return!1;const i=n.slice(),s=e.slice();for(const a of s){let o=i.shift();for(;o&&!fd(o,a,!1);)o=i.shift();if(!o)return!1}return!0}function zb(n,e,i,s){const a=[],o=(u,f)=>{if(fd(u,e,s)){const d=typeof u=="string"?f:u;return d&&a.push(d),!i}if(typeof u=="string")return!1;for(const d of u.children||[])if(o(d,u))return!0;return!1};return o(n,null),a}function Hb(n,e=new Map){n!=null&&n.ref&&e.set(n.ref,n);for(const i of(n==null?void 0:n.children)||[])typeof i!="string"&&Hb(i,e);return e}function IT(n,e){var o;const i=Hb(e==null?void 0:e.root),s=new Map,a=(u,f)=>{let d=u.children.length===(f==null?void 0:f.children.length)&&LT(u,f),p=d;for(let m=0;m<u.children.length;m++){const y=u.children[m],b=f==null?void 0:f.children[m];if(typeof y=="string")d&&(d=y===b),p&&(p=y===b);else{let v=typeof b!="string"?b:void 0;y.ref&&(v=i.get(y.ref));const E=a(y,v);(!v||!E&&!y.ref||v!==b)&&(p=!1),d&&(d=E&&v===b)}}return s.set(u,d?"same":p?"skip":"changed"),d};return a(n.root,i.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),s}function VT(n,e){const i=[],s=a=>{const o=e.get(a);if(o!=="same")if(o==="skip")for(const u of a.children)typeof u!="string"&&s(u);else i.push(a)};for(const a of n)typeof a=="string"?i.push(a):s(a);return i}function nc(n,e,i){const s=Ub(e),a=[],o=s.renderStringsAsRegex?KT:()=>!0,u=s.renderStringsAsRegex?GT:v=>v;let f=n.root.role==="fragment"?n.root.children:[n.root];const d=IT(n,i);i&&(f=VT(f,d));const p=(v,E)=>{const x=th(u(v));x&&a.push(E+"- text: "+x)},m=(v,E)=>{let x=v.role;if(v.name&&v.name.length<=900){const T=u(v.name);if(T){const C=T.startsWith("/")&&T.endsWith("/")?T:JSON.stringify(T);x+=" "+C}}return v.checked==="mixed"&&(x+=" [checked=mixed]"),v.checked===!0&&(x+=" [checked]"),v.disabled&&(x+=" [disabled]"),v.expanded&&(x+=" [expanded]"),v.active&&s.renderActive&&(x+=" [active]"),v.level&&(x+=` [level=${v.level}]`),v.pressed==="mixed"&&(x+=" [pressed=mixed]"),v.pressed===!0&&(x+=" [pressed]"),v.selected===!0&&(x+=" [selected]"),v.ref&&(x+=` [ref=${v.ref}]`,E&&ic(v)&&(x+=" [cursor=pointer]")),x},y=v=>(v==null?void 0:v.children.length)===1&&typeof v.children[0]=="string"&&!Object.keys(v.props).length?v.children[0]:void 0,b=(v,E,x)=>{if(d.get(v)==="same"&&v.ref){a.push(E+`- ref=${v.ref} [unchanged]`);return}const T=!!i&&!E,C=E+"- "+(T?"<changed> ":"")+RT(m(v,x)),k=y(v);if(!v.children.length&&!Object.keys(v.props).length)a.push(C);else if(k!==void 0)o(v,k)?a.push(C+": "+th(u(k))):a.push(C);else{a.push(C+":");for(const[R,G]of Object.entries(v.props))a.push(E+" - /"+R+": "+th(G));const $=E+" ",V=!!v.ref&&x&&ic(v);for(const R of v.children)typeof R=="string"?p(o(v,R)?R:"",$):b(R,$,x&&!V)}};for(const v of f)typeof v=="string"?p(v,""):b(v,"",!!s.renderCursorPointer);return a.join(`
115
- `)}function GT(n){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let i="",s=0;const a=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(a,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=Qo(n.slice(s,f));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];i+=m;break}return s=f+o.length,o}),i?(i+=Qo(n.slice(s)),String(new RegExp(i))):n}function KT(n,e){if(!e.length)return!1;if(!n.name)return!0;if(n.name.length>e.length)return!1;const i=e.length<=200&&n.name.length<=200?Cx(e,n.name):"";let s=e;for(;i&&s.includes(i);)s=s.replace(i,"");return s.trim().length/e.length>.1}function ic(n){return n.box.cursor==="pointer"}const e0=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;z-index:10;font-size:13px}x-pw-dialog:not(.autosize){width:400px;height:150px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}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{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}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{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}x-pw-action-list{flex:auto;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}x-pw-action-item{padding:6px 10px;cursor:pointer;overflow:hidden}x-pw-action-item:hover{background-color:#f2f2f2}x-pw-action-item:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}";class ih{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483647",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent",this._actionPointElement=i.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const s=new this._injectedScript.window.CSSStyleSheet;s.replaceSync(e0),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=e0,this._glassPaneShadow.appendChild(s)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const i=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),s=ls(this._language,Xn(e)),a=i.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(i.map((o,u)=>{const f=i.length>1?` [${u+1} of ${i.length}]`:"";return{element:o,color:a,tooltipText:s+f}})),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,i){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,i;for(const s of this._renderedEntries)(e=s.highlightElement)==null||e.remove(),(i=s.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(s=>({element:s,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const s=this._createHighlightElement();this._glassPaneShadow.appendChild(s);let a;if(i.tooltipText){a=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(a),a.style.top="0",a.style.left="0",a.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,a.appendChild(o)}this._renderedEntries.push({targetElement:i.element,color:i.color,tooltipElement:a,highlightElement:s})}for(const i of this._renderedEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:s,anchorTop:a}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=a,i.tooltipLeft=s}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const s=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=s.x+"px",i.highlightElement.style.top=s.y+"px",i.highlightElement.style.width=s.width+"px",i.highlightElement.style.height=s.height+"px",i.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}firstTooltipBox(){const 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,i){const s=i.offsetWidth,a=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+s>o-5&&(f=o-s-5);let d=Math.max(0,e.bottom)+5;return d+a>u-5&&(Math.max(0,e.top)>a+5?d=Math.max(0,e.top)-a-5:d=u-5-a),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let i=0;i<this._renderedEntries.length;++i){if(e[i].element!==this._renderedEntries[i].targetElement||e[i].color!==this._renderedEntries[i].color)return!1;const s=this._renderedEntries[i].box;if(!s)return!1;const a=e[i].element.getBoundingClientRect();if(a.top!==s.top||a.right!==s.right||a.bottom!==s.bottom||a.left!==s.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 YT(n,e,i){const s=n.left-e.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function XT(n,e,i){const s=e.left-n.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function PT(n,e,i){const s=e.top-n.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function FT(n,e,i){const s=n.top-e.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function QT(n,e,i){const s=i===void 0?50:i;let a=0;return n.left-e.right>=0&&(a+=n.left-e.right),e.left-n.right>=0&&(a+=e.left-n.right),e.top-n.bottom>=0&&(a+=e.top-n.bottom),n.top-e.bottom>=0&&(a+=n.top-e.bottom),a>s?void 0:a}const ZT=["left-of","right-of","above","below","near"];function qb(n,e,i,s){const a=e.getBoundingClientRect(),o={"left-of":XT,"right-of":YT,above:PT,below:FT,near:QT}[n];let u;for(const f of i){if(f===e)continue;const d=o(a,f.getBoundingClientRect(),s);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function $b(n,e){for(const i of e.jsonPath)n!=null&&(n=n[i]);return Ib(n,e)}function Ib(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?s instanceof RegExp?typeof i=="string"&&!!i.match(s):i===s:typeof i!="string"||typeof s!="string"?!1:e.op==="*="?i.includes(s):e.op==="^="?i.startsWith(s):e.op==="$="?i.endsWith(s):e.op==="|="?i===s||i.startsWith(s+"-"):e.op==="~="?i.split(" ").includes(s):!1}function hd(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function jt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!hd(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:Tt(e.value),immediate:[e.value]};else{for(let a=e.firstChild;a;a=a.nextSibling)if(a.nodeType===Node.TEXT_NODE)i.full+=a.nodeValue||"",s+=a.nodeValue||"";else{if(a.nodeType===Node.COMMENT_NODE)continue;s&&i.immediate.push(s),s="",a.nodeType===Node.ELEMENT_NODE&&(i.full+=jt(n,a).full)}s&&i.immediate.push(s),e.shadowRoot&&(i.full+=jt(n,e.shadowRoot).full),i.full&&(i.normalized=Tt(i.full))}}n.set(e,i)}return i}function pc(n,e,i){if(hd(e)||!i(jt(n,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&i(jt(n,s)))return"selfAndChildren";return e.shadowRoot&&i(jt(n,e.shadowRoot))?"selfAndChildren":"self"}function Vb(n,e){const i=Ab(e);if(i)return i.map(o=>jt(n,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:Tt(s),immediate:[s]}];const a=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||a){const o=e.labels;if(o)return[...o].map(u=>jt(n,u))}return[]}function t0(n){return n.displayName||n.name||"Anonymous"}function JT(n){if(n.type)switch(typeof n.type){case"function":return t0(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?t0(n.type.render):"")}if(n._currentElement){const e=n._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function WT(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function eE(n){if(n.child){const i=[];for(let s=n.child;s;s=s.sibling)i.push(s);return i}if(!n._currentElement)return[];const e=i=>{var a;const s=(a=i._currentElement)==null?void 0:a.type;return typeof s=="function"||typeof s=="string"};if(n._renderedComponent){const i=n._renderedComponent;return e(i)?[i]:[]}return n._renderedChildren?[...Object.values(n._renderedChildren)].filter(e):[]}function tE(n){var s;const e=n.memoizedProps||((s=n._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const i={...e};return delete i.children,i}function Gb(n){var s;const e={key:WT(n),name:JT(n),children:eE(n).map(Gb),rootElements:[],props:tE(n)},i=n.stateNode||n._hostNode||((s=n._renderedComponent)==null?void 0:s._hostNode);if(i instanceof Element)e.rootElements.push(i);else for(const a of e.children)e.rootElements.push(...a.rootElements);return e}function Kb(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)Kb(s,e,i);return i}function Yb(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const a=s.currentNode,o=a,u=Object.keys(o).find(d=>d.startsWith("__reactContainer")&&o[d]!==null);if(u)e.push(o[u].stateNode.current);else{const d="_reactRootContainer";o.hasOwnProperty(d)&&o[d]!==null&&e.push(o[d]._internalRoot.current)}if(a instanceof Element&&a.hasAttribute("data-reactroot"))for(const d of Object.keys(a))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(a[d]);const f=a instanceof Element?a.shadowRoot:null;f&&Yb(f,e)}while(s.nextNode());return e}const nE=()=>({queryAll(n,e){const{name:i,attributes:s}=as(e,!1),u=Yb(n.ownerDocument||n).map(d=>Gb(d)).map(d=>Kb(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),i&&p.name!==i||p.rootElements.some(y=>!Wa(n,y)))return!1;for(const y of s)if(!$b(m,y))return!1;return!0})).flat(),f=new Set;for(const d of u)for(const p of d.rootElements)f.add(p);return[...f]}}),Xb=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];Xb.sort();function Ra(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function nr(n,e){if(n.op!=="<truthy>"&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(i=>JSON.stringify(i)).join(", ")}`)}function ir(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function iE(n,e){const i={role:e};for(const s of n)switch(s.name){case"checked":{Ra(s.name,Jh,e),nr(s,[!0,!1,"mixed"]),ir(s,["<truthy>","="]),i.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{Ra(s.name,ed,e),nr(s,[!0,!1,"mixed"]),ir(s,["<truthy>","="]),i.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{Ra(s.name,Zh,e),nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{Ra(s.name,td,e),nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(Ra(s.name,nd,e),typeof s.value=="string"&&(s.value=+s.value),s.op!=="="||typeof s.value!="number"||Number.isNaN(s.value))throw new Error('"level" attribute must be compared to a number');i.level=s.value;break}case"disabled":{nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.disabled=s.op==="<truthy>"?!0:s.value;break}case"name":{if(s.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof s.value!="string"&&!(s.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');i.name=s.value,i.nameOp=s.op,i.exact=s.caseSensitive;break}case"include-hidden":{nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${Xb.map(a=>`"${a}"`).join(", ")}.`)}return i}function sE(n,e,i){const s=[],a=u=>{if(ut(u)===e.role&&!(e.selected!==void 0&&Nb(u)!==e.selected)&&!(e.checked!==void 0&&Cb(u)!==e.checked)&&!(e.pressed!==void 0&&kb(u)!==e.pressed)&&!(e.expanded!==void 0&&Mb(u)!==e.expanded)&&!(e.level!==void 0&&Ob(u)!==e.level)&&!(e.disabled!==void 0&&tc(u)!==e.disabled)&&!(!e.includeHidden&&sn(u))){if(e.name!==void 0){const f=Tt(el(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Tt(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!Ib(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))a(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),s}function n0(n){return{queryAll:(e,i)=>{const s=as(i,!0),a=s.name.toLowerCase();if(!a)throw new Error("Role must not be empty");const o=iE(s.attributes,a);hc();try{return sE(e,o,n)}finally{dc()}}}}class rE{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",oE),this._engines.set("is",qa),this._engines.set("where",qa),this._engines.set("has",aE),this._engines.set("scope",lE),this._engines.set("light",cE),this._engines.set("visible",uE),this._engines.set("text",fE),this._engines.set("text-is",hE),this._engines.set("text-matches",dE),this._engines.set("has-text",pE),this._engines.set("right-of",La("right-of")),this._engines.set("left-of",La("left-of")),this._engines.set("above",La("above")),this._engines.set("below",La("below")),this._engines.set("near",La("near")),this._engines.set("nth-match",gE);const e=[...this._engines.keys()];e.sort();const i=[...Q0];if(i.sort(),e.join("|")!==i.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${i.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,i,s,a){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>s.every((p,m)=>d.rest[m]===p));if(u)return u.result;const f=a();return o.push({rest:s,result:f}),f}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,i,s){const a=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[a,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(a)?this._matchesEngine(qa,e,a,s):(this._hasScopeClause(a)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,a.simples[a.simples.length-1].selector,s)?this._matchesParents(e,a,a.simples.length-2,s):!1))}finally{this.end()}}query(e,i){const s=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine(qa,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const a=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,s.simples[s.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,s,s.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const d=this._scoreMap.get(u),p=this._scoreMap.get(f);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=a,o})}finally{this.end()}}_markScore(e,i){this._scoreMap&&this._scoreMap.set(e,i)}_hasScopeClause(e){return e.simples.some(i=>i.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=gt(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,s){return this._cached(this._cacheMatchesSimple,e,[i,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||i.css&&!this._matchesCSS(e,i.css))return!1;for(const a of i.functions)if(!this._matchesEngine(this._getEngine(a.name),e,a.args,s))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=i.css;const a=i.functions;s==="*"&&a.length&&(s=void 0);let o,u=-1;s!==void 0?o=this._queryCSS(e,s):(u=a.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(a[u].name),e,a[u].args));for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches!==void 0&&(o=o.filter(p=>this._matchesEngine(d,p,a[f].args,e)))}for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches===void 0&&(o=o.filter(p=>this._matchesEngine(d,p,a[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,s,a){return s<0?!0:this._cached(this._cacheMatchesParents,e,[i,s,a.scope,a.pierceShadow,a.originalScope],()=>{const{selector:o,combinator:u}=i.simples[s];if(u===">"){const f=_o(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,s-1,a)}if(u==="+"){const f=sh(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,s-1,a)}if(u===""){let f=_o(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="")break}f=_o(f,a)}return!1}if(u==="~"){let f=sh(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="~")break}f=sh(f,a)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="")break}f=_o(f,a)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,s,a){if(e.matches)return this._callMatches(e,i,s,a);if(e.query)return this._callQuery(e,s,a).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,s){if(e.query)return this._callQuery(e,s,i);if(e.matches)return this._queryCSS(i,"*").filter(a=>this._callMatches(e,a,s,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,s,a){return this._cached(this._cacheCallMatches,i,[e,a.scope,a.pierceShadow,a.originalScope,...s],()=>e.matches(i,s,a,this))}_callQuery(e,i,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...i],()=>e.query(s,i,this))}_matchesCSS(e,i){return e.matches(i)}_queryCSS(e,i){return this._cached(this._cacheQueryCSS,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function a(o){if(s=s.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&a(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&a(u.shadowRoot)}}return a(e.scope),s})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const qa={matches(n,e,i,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(a=>s.matches(n,a,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const a of e)s=s.concat(i.query(n,a));return e.length===1?s:Pb(s)}},aE={matches(n,e,i,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...i,scope:n},e).length>0}},lE={matches(n,e,i,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const a=i.originalScope||i.scope;return a.nodeType===9?n===a.documentElement:n===a},query(n,e,i){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;if(s.nodeType===9){const a=s.documentElement;return a?[a]:[]}return s.nodeType===1?[s]:[]}},oE={matches(n,e,i,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(n,e,i)}},cE={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,s){return s.matches(n,e,{...i,pierceShadow:!1})}},uE={matches(n,e,i,s){if(e.length)throw new Error('"visible" engine expects no arguments');return Ei(n)}},fE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const a=Tt(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(a);return pc(s._cacheText,n,o)==="self"}},hE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const a=Tt(e[0]),o=u=>!a&&!u.immediate.length?!0:u.immediate.some(f=>Tt(f)===a);return pc(s._cacheText,n,o)!=="none"}},dE={matches(n,e,i,s){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const a=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>a.test(u.full);return pc(s._cacheText,n,o)==="self"}},pE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(hd(n))return!1;const a=Tt(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(a))(jt(s._cacheText,n))}};function La(n){return{matches(e,i,s,a){const o=i.length&&typeof i[i.length-1]=="number"?i[i.length-1]:void 0,u=o===void 0?i:i.slice(0,i.length-1);if(i.length<1+(o===void 0?0:1))throw new Error(`"${n}" engine expects a selector list and optional maximum distance in pixels`);const f=a.query(s,u),d=qb(n,e,f,o);return d===void 0?!1:(a._markScore(e,d),!0)}}}const gE={query(n,e,i){let s=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof s!="number"||s<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const a=qa.query(n,e.slice(0,e.length-1),i);return s--,s<a.length?[a[s]]:[]}};function _o(n,e){if(n!==e.scope)return e.pierceShadow?gt(n):n.parentElement||void 0}function sh(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function Pb(n){const e=new Map,i=[],s=[];function a(u){let f=e.get(u);if(f)return f;const d=gt(u);return d?a(d).children.push(u):i.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)a(u).taken=!0;function o(u){const f=e.get(u);if(f.taken&&s.push(u),f.children.length>1){const d=new Set(f.children);f.children=[];let p=u.firstElementChild;for(;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling;for(p=u.shadowRoot?u.shadowRoot.firstElementChild:null;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling}f.children.forEach(o)}return i.forEach(o),s}const Fb=10,Tr=Fb/2,i0=1,mE=2,yE=10,bE=50,Qb=100,Zb=120,Jb=140,Wb=160,Ho=180,ev=200,s0=250,vE=Zb+Tr,SE=Jb+Tr,wE=Qb+Tr,xE=Wb+Tr,_E=Ho+Tr,TE=ev+Tr,EE=300,AE=500,tv=510,rh=520,nv=530,Th=1e4,NE=1e7,CE=1e3;function r0(n,e,i){n._evaluator.begin();const s={allowText:new Map,disallowText:new Map};hc(),Fh();try{let a=[];if(i.forTextExpect){let f=$a(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=gt(d)){const p=Ji(s,n,d,{...i,noText:!0});if(!p)continue;if(Wi(p)<=CE){f=p;break}}a=[qo(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=Ha(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&Ei(f)&&(e=f)}if(i.multiple){const f=Ji(s,n,e,i),d=Ji(s,n,e,{...i,noText:!0});let p=[f,d];if(s.allowText.clear(),s.disallowText.clear(),f&&ah(f)&&p.push(Ji(s,n,e,{...i,noCSSId:!0})),d&&ah(d)&&p.push(Ji(s,n,e,{...i,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=$a(n,e,i);p.push(m),ah(m)&&p.push($a(n,e,{...i,noCSSId:!0}))}a=[...new Set(p.map(m=>qo(m)))]}else{const f=Ji(s,n,e,i)||$a(n,e,i);a=[qo(f)]}}const o=a[0],u=n.parseSelector(o);return{selector:o,selectors:a,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{Qh(),dc(),n._evaluator.end()}}function Ji(n,e,i,s){if(s.root&&!Wa(s.root,i))throw new Error("Target element must belong to the root's subtree");if(i===s.root)return[{engine:"css",selector:":scope",score:1}];if(i.ownerDocument.documentElement===i)return[{engine:"css",selector:"html",score:1}];let a=null;const o=f=>{(!a||Wi(f)<Wi(a))&&(a=f)},u=[];if(!s.noText)for(const f of ME(e,i,!s.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of kE(e,i,s))s.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>Wi(f.candidate)-Wi(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const p=e.querySelectorAll(e.parseSelector(qo(f)),s.root??i.ownerDocument);if(!p.includes(i))continue;if(p.length===1){o(f);break}const m=p.indexOf(i);if(!(m>5)&&(o([...f,{engine:"nth",selector:String(m),score:Th}]),!s.isRecursive))for(let y=gt(i);y&&y!==s.root;y=gt(y)){const b=p.filter($=>Wa(y,$)&&$!==y),v=b.indexOf(i);if(b.length>5||v===-1||v===m&&b.length>1)continue;const E=b.length===1?f:[...f,{engine:"nth",selector:String(v),score:Th}];if(a&&Wi([{engine:"",selector:"",score:1},...E])>=Wi(a))continue;const T=!!s.noText||d,C=T?n.disallowText:n.allowText;let k=C.get(y);k===void 0&&(k=Ji(n,e,y,{...s,isRecursive:!0,noText:T})||$a(e,y,s),C.set(y,k)),k&&o([...k,...E])}}return a}function kE(n,e,i){const s=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&s.push({engine:"css",selector:`[${u}=${lr(e.getAttribute(u))}]`,score:mE});if(!i.noCSSId){const u=e.getAttribute("id");u&&!OE(u)&&s.push({engine:"css",selector:iv(u),score:AE})}s.push({engine:"css",selector:Yn(e),score:nv})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&s.push({engine:"css",selector:`${Yn(e)}[${u}=${lr(e.getAttribute(u))}]`,score:yE});return e.getAttribute(i.testIdAttributeName)&&s.push({engine:"css",selector:`[${i.testIdAttributeName}=${lr(e.getAttribute(i.testIdAttributeName))}]`,score:i0}),Eh([s]),s}if(e.getAttribute(i.testIdAttributeName)&&s.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${xt(e.getAttribute(i.testIdAttributeName),!0)}]`,score:i0}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${xt(u.placeholder,!0)}]`,score:vE});for(const f of ur(u.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${xt(f.text,!1)}]`,score:Zb-f.scoreBonus})}}const a=Vb(n._evaluator._cacheText,e);for(const u of a){const f=u.normalized;s.push({engine:"internal:label",selector:Rt(f,!0),score:SE});for(const d of ur(f))s.push({engine:"internal:label",selector:Rt(d.text,!1),score:Jb-d.scoreBonus})}const o=ut(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:tv}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&s.push({engine:"css",selector:`${Yn(e)}[name=${lr(e.getAttribute("name"))}]`,score:rh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${Yn(e)}[type=${lr(e.getAttribute("type"))}]`,score:rh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:Yn(e),score:rh+1}),Eh([s]),s}function ME(n,e,i){if(e.nodeName==="SELECT")return[];const s=[],a=e.getAttribute("title");if(a){s.push([{engine:"internal:attr",selector:`[title=${xt(a,!0)}]`,score:TE}]);for(const p of ur(a))s.push([{engine:"internal:attr",selector:`[title=${xt(p.text,!1)}]`,score:ev-p.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${xt(o,!0)}]`,score:xE}]);for(const p of ur(o))s.push([{engine:"internal:attr",selector:`[alt=${xt(p.text,!1)}]`,score:Wb-p.scoreBonus}])}const u=jt(n._evaluator._cacheText,e).normalized,f=u?ur(u):[];if(u){if(i){u.length<=80&&s.push([{engine:"internal:text",selector:Rt(u,!0),score:_E}]);for(const m of f)s.push([{engine:"internal:text",selector:Rt(m.text,!1),score:Ho-m.scoreBonus}])}const p={engine:"css",selector:Yn(e),score:nv};for(const m of f)s.push([p,{engine:"internal:has-text",selector:Rt(m.text,!1),score:Ho-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+Qo(u)+"$");s.push([p,{engine:"internal:has-text",selector:Rt(m,!1),score:s0}])}}const d=ut(e);if(d&&!["none","presentation"].includes(d)){const p=el(e,!1);if(p){const m={engine:"internal:role",selector:`${d}[name=${xt(p,!0)}]`,score:wE};s.push([m]);for(const y of ur(p))s.push([{engine:"internal:role",selector:`${d}[name=${xt(y.text,!1)}]`,score:Qb-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:tv};for(const y of f)s.push([m,{engine:"internal:has-text",selector:Rt(y.text,!1),score:Ho-y.scoreBonus}]);if(i&&u.length<=80){const y=new RegExp("^"+Qo(u)+"$");s.push([m,{engine:"internal:has-text",selector:Rt(y,!1),score:s0}])}}}return Eh(s),s}function iv(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${lr(n)}]`}function ah(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function $a(n,e,i){const s=i.root??e.ownerDocument,a=[];function o(f){const d=a.slice();f&&d.unshift(f);const p=d.join(" > "),m=n.parseSelector(p);return n.querySelector(m,s,!1)===e?p:void 0}function u(f){const d={engine:"css",selector:f,score:NE},p=n.parseSelector(f),m=n.querySelectorAll(p,s);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:Th};return[d,y]}for(let f=e;f&&f!==s;f=gt(f)){let d="";if(f.id&&!i.noCSSId){const y=iv(f.id),b=o(y);if(b)return u(b);d=y}const p=f.parentNode,m=[...f.classList].map(RE);for(let y=0;y<m.length;++y){const b="."+m.slice(0,y+1).join("."),v=o(b);if(v)return u(v);!d&&p&&p.querySelectorAll(b).length===1&&(d=b)}if(p){const y=[...p.children],b=f.nodeName,E=y.filter(T=>T.nodeName===b).indexOf(f)===0?Yn(f):`${Yn(f)}:nth-child(${1+y.indexOf(f)})`,x=o(E);if(x)return u(x);d||(d=E)}else d||(d=Yn(f));a.unshift(d)}return u(o())}function Eh(n){for(const e of n)for(const i of e)i.score>bE&&i.score<EE&&(i.score+=Math.min(Fb,i.selector.length/10|0))}function qo(n){const e=[];let i="";for(const{engine:s,selector:a}of n)e.length&&(i!=="css"||s!=="css"||a.startsWith(":nth-match("))&&e.push(">>"),i=s,s==="css"?e.push(a):e.push(`${s}=${a}`);return e.join(" ")}function Wi(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function OE(n){let e,i=0;for(let s=0;s<n.length;++s){const a=n[s];let o;if(!(a==="-"||a==="_")){if(a>="a"&&a<="z"?o="lower":a>="A"&&a<="Z"?o="upper":a>="0"&&a<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function To(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function ur(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),s=i?i[1].length:0;if(s){const a=To(n.substring(s).trimStart(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),s=i?i[1].length:0;if(s){const a=To(n.substring(0,n.length-s).trimEnd(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:To(n,80),scoreBonus:0}),e.push({text:To(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function Yn(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function RE(n){let e="";for(let i=0;i<n.length;i++)e+=LE(n,i);return e}function LE(n,e){const i=n.charCodeAt(e);return i===0?"�":i>=1&&i<=31||i>=48&&i<=57&&(e===0||e===1&&n.charCodeAt(0)===45)?"\\"+i.toString(16)+" ":e===0&&i===45&&n.length===1?"\\"+n.charAt(e):i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n.charAt(e):"\\"+n.charAt(e)}function sv(n,e){const i=n.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=i.substring(i.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function jE(n,e){return e?e.toUpperCase():""}const DE=/(?:^|[-_/])(\w)/g,rv=n=>n&&n.replace(DE,jE);function BE(n){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const b=m.__file;if(b)return rv(sv(b,".vue"))}function i(m,y){return m.type.__playwright_guessedName=y,y}function s(m){var b,v,E,x;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const T in(v=(b=m.parent)==null?void 0:b.type)==null?void 0:v.components)if(((E=m.parent)==null?void 0:E.type.components[T])===m.type)return i(m,T);for(const T in(x=m.appContext)==null?void 0:x.components)if(m.appContext.components[T]===m.type)return i(m,T);return"Anonymous Component"}function a(m){return m._isBeingDestroyed||m.isUnmounted}function o(m){return m.subTree.type.toString()==="Symbol(Fragment)"}function u(m){const y=[];return m.component&&y.push(m.component),m.suspense&&y.push(...u(m.suspense.activeBranch)),Array.isArray(m.children)&&m.children.forEach(b=>{b.component?y.push(b.component):y.push(...u(b))}),y.filter(b=>{var v;return!a(b)&&!((v=b.type.devtools)!=null&&v.hide)})}function f(m){return o(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let b=0,v=m.children.length;b<v;b++){const E=m.children[b];E.component?y.push(...f(E.component)):E.el&&y.push(E.el)}return y}function p(m){return{name:s(m),children:u(m.subTree).map(p),rootElements:f(m),props:m.props}}return p(n)}function UE(n){function e(o){const u=o.displayName||o.name||o._componentTag;if(u)return u;const f=o.__file;if(f)return rv(sv(f,".vue"))}function i(o){const u=e(o.$options||o.fnOptions||{});return u||(o.$root===o?"Root":"Anonymous Component")}function s(o){return o.$children?o.$children:Array.isArray(o.subTree.children)?o.subTree.children.filter(u=>!!u.component).map(u=>u.component):[]}function a(o){return{name:i(o),children:s(o).map(a),rootElements:[o.$el],props:o._props}}return a(n)}function av(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)av(s,e,i);return i}function lv(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),a=new Set;do{const o=s.currentNode;o.__vue__&&a.add(o.__vue__.$root),o.__vue_app__&&o._vnode&&o._vnode.component&&e.push({root:o._vnode.component,version:3});const u=o instanceof Element?o.shadowRoot:null;u&&lv(u,e)}while(s.nextNode());for(const o of a)e.push({version:2,root:o});return e}const zE=()=>({queryAll(n,e){const i=n.ownerDocument||n,{name:s,attributes:a}=as(e,!1),f=lv(i).map(p=>p.version===3?BE(p.root):UE(p.root)).map(p=>av(p,m=>{if(s&&m.name!==s||m.rootElements.some(y=>!Wa(n,y)))return!1;for(const y of a)if(!$b(m.props,y))return!1;return!0})).flat(),d=new Set;for(const p of f)for(const m of p.rootElements)d.add(m);return[...d]}}),a0={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],s=n.ownerDocument||n;if(!s)return i;const a=s.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=a.iterateNext();o;o=a.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}};function dd(n,e,i){return`internal:attr=[${n}=${xt(e,(i==null?void 0:i.exact)||!1)}]`}function HE(n,e){return`internal:testid=[${n}=${xt(e,!0)}]`}function qE(n,e){return"internal:label="+Rt(n,!!(e!=null&&e.exact))}function $E(n,e){return dd("alt",n,e)}function IE(n,e){return dd("title",n,e)}function VE(n,e){return dd("placeholder",n,e)}function GE(n,e){return"internal:text="+Rt(n,!!(e!=null&&e.exact))}function KE(n,e={}){const i=[];return e.checked!==void 0&&i.push(["checked",String(e.checked)]),e.disabled!==void 0&&i.push(["disabled",String(e.disabled)]),e.selected!==void 0&&i.push(["selected",String(e.selected)]),e.expanded!==void 0&&i.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&i.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&i.push(["level",String(e.level)]),e.name!==void 0&&i.push(["name",xt(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([s,a])=>`[${s}=${a}]`).join("")}`}const ja=Symbol("selector"),YE=class Ia{constructor(e,i,s){if(s!=null&&s.hasText&&(i+=` >> internal:has-text=${Rt(s.hasText,!1)}`),s!=null&&s.hasNotText&&(i+=` >> internal:has-not-text=${Rt(s.hasNotText,!1)}`),s!=null&&s.has&&(i+=" >> internal:has="+JSON.stringify(s.has[ja])),s!=null&&s.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(s.hasNot[ja])),(s==null?void 0:s.visible)!==void 0&&(i+=` >> visible=${s.visible?"true":"false"}`),this[ja]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const a=i,o=this;o.locator=(u,f)=>new Ia(e,a?a+" >> "+u:u,f),o.getByTestId=u=>o.locator(HE(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator($E(u,f)),o.getByLabel=(u,f)=>o.locator(qE(u,f)),o.getByPlaceholder=(u,f)=>o.locator(VE(u,f)),o.getByText=(u,f)=>o.locator(GE(u,f)),o.getByTitle=(u,f)=>o.locator(IE(u,f)),o.getByRole=(u,f={})=>o.locator(KE(u,f)),o.filter=u=>new Ia(e,i,u),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=u=>o.locator(`nth=${u}`),o.and=u=>new Ia(e,a+" >> internal:and="+JSON.stringify(u[ja])),o.or=u=>new Ia(e,a+" >> internal:or="+JSON.stringify(u[ja]))}};let XE=YE;class PE{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,i)=>this._querySelector(e,!!i),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,i)=>this._generateLocator(e,i),ariaSnapshot:(e,i)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,i||{mode:"expect"}),resume:()=>this._resume(),...new XE(this._injectedScript,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(e,i){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const s=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(s,this._injectedScript.document,i)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const i=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(i,this._injectedScript.document)}_inspect(e){if(typeof e!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,i){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return ls(i||"javascript",s)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function FE(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function QE(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function ZE(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function JE(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function WE(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}const ov={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function eA(n){if("toBase64"in n)return n.toBase64();const e=Array.from(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(i=>String.fromCharCode(i)).join("");return btoa(e)}function tA(n,e){const i=atob(n),s=new Uint8Array(i.length);for(let a=0;a<i.length;a++)s[a]=i.charCodeAt(a);return new e(s.buffer)}function Ah(n,e=[],i=new Map){if(!Object.is(n,void 0)){if(typeof n=="object"&&n){if("ref"in n)return i.get(n.ref);if("v"in n)return n.v==="undefined"?void 0:n.v==="null"?null:n.v==="NaN"?NaN:n.v==="Infinity"?1/0:n.v==="-Infinity"?-1/0:n.v==="-0"?-0:void 0;if("d"in n)return new Date(n.d);if("u"in n)return new URL(n.u);if("bi"in n)return BigInt(n.bi);if("e"in n){const s=new Error(n.e.m);return s.name=n.e.n,s.stack=n.e.s,s}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const s=[];i.set(n.id,s);for(const a of n.a)s.push(Ah(a,e,i));return s}if("o"in n){const s={};i.set(n.id,s);for(const{k:a,v:o}of n.o)a!=="__proto__"&&(s[a]=Ah(o,e,i));return s}if("h"in n)return e[n.h];if("ta"in n)return tA(n.ta.b,ov[n.ta.k])}return n}}function nA(n,e){return Nh(n,e,{visited:new Map,lastId:0})}function Nh(n,e,i){if(n&&typeof n=="object"){if(typeof globalThis.Window=="function"&&n instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&n instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&n instanceof globalThis.Node)return"ref: <Node>"}return cv(n,e,i)}function cv(n,e,i){var o;const s=e(n);if("fallThrough"in s)n=s.fallThrough;else return s;if(typeof n=="symbol")return{v:"undefined"};if(Object.is(n,void 0))return{v:"undefined"};if(Object.is(n,null))return{v:"null"};if(Object.is(n,NaN))return{v:"NaN"};if(Object.is(n,1/0))return{v:"Infinity"};if(Object.is(n,-1/0))return{v:"-Infinity"};if(Object.is(n,-0))return{v:"-0"};if(typeof n=="boolean"||typeof n=="number"||typeof n=="string")return n;if(typeof n=="bigint")return{bi:n.toString()};if(JE(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
116
- ${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(QE(n))return{d:n.toJSON()};if(ZE(n))return{u:n.toJSON()};if(FE(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(ov))if(WE(n,f))return{ta:{b:eA(n),k:u}};const a=i.visited.get(n);if(a)return{ref:a};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d<n.length;++d)u.push(Nh(n[d],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const p of Object.keys(n)){let m;try{m=n[p]}catch{continue}p==="toJSON"&&typeof m=="function"?u.push({k:p,v:{o:[],id:0}}):u.push({k:p,v:Nh(m,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?cv(d.value,e,i):{o:u,id:f}}}class iA{constructor(e,i){var s,a,o,u,f,d,p,m;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(s=e.setTimeout)==null?void 0:s.bind(e),clearTimeout:(a=e.clearTimeout)==null?void 0:a.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(u=e.clearInterval)==null?void 0:u.bind(e),requestAnimationFrame:(f=e.requestAnimationFrame)==null?void 0:f.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,s,a,...o){const u=o.slice(0,a),f=o.slice(a),d=[];for(let m=0;m<u.length;m++)d[m]=Ah(u[m],f);let p=this.global.eval(s);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),i?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,i){if(i!==void 0)return nA(i,s=>({fallThrough:s}))}_promiseAwareJsonValueNoThrow(e){const i=s=>{try{return this.jsonValue(!0,s)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const s=await e;return i(s)})():i(e)}}class uv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:ls,cacheNormalizedWhitespaces:Ax,elementText:jt,getAriaRole:ut,getElementAccessibleDescription:Fy,getElementAccessibleName:el,isElementVisible:Ei,isInsideScope:Wa,normalizeWhiteSpace:Tt,parseAriaSnapshot:Kh,generateAriaTree:Xa,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new iA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new rE,this.consoleApi=new PE(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",a0),this._engines.set("xpath:light",a0),this._engines.set("_react",nE()),this._engines.set("_vue",zE()),this._engines.set("role",n0(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",n0(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:a}of i.customEngines)this._engines.set(s,this.eval(a));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,hT({browserNameForWorkarounds:i.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const i=rl(e);return Tx(i,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return r0(this,e,i)}generateSelectorSimple(e,i){return r0(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,s){const a=this.querySelectorAll(e,i);if(s&&a.length>1)throw this.strictModeViolationError(e,a);return a[0]}_queryNth(e,i){const s=[...e];let a=+i.body;return a===-1&&(a=s.length-1),new Set(s.slice(a,a+1))}_queryLayoutSelector(e,i,s){const a=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,s);for(const d of e){const p=qb(a,d,f,o.distance);p!==void 0&&u.push({element:d,score:p})}return u.sort((d,p)=>d.score-p.score),new Set(u.map(d=>d.element))}ariaSnapshot(e,i){return this.incrementalAriaSnapshot(e,i).snapshot}incrementalAriaSnapshot(e,i){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const s=Xa(e,i);let a;i.incremental&&(a=i.track?this._lastAriaSnapshotForTrack.get(i.track):void 0);const o=nc(s,i,a);return i.track&&this._lastAriaSnapshotForTrack.set(i.track,s),this._lastAriaSnapshotForQuery=s,{snapshot:o,iframeRefs:s.iframeRefs,isIncremental:!!a}}ariaSnapshotForRecorder(){const e=Xa(this.document.body,{mode:"ai"});return{ariaSnapshot:nc(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return $T(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(a=>a.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const s={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const a={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:a},source:Xn(a)};s.parts.push(o)}return this.querySelectorAll(s,i)}if(!i.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(i.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[i];this._evaluator.begin();try{let s=new Set([i]);for(const a of e.parts)if(a.name==="nth")s=this._queryNth(s,a);else if(a.name==="internal:and"){const o=this.querySelectorAll(a.body.parsed,i);s=new Set(o.filter(u=>s.has(u)))}else if(a.name==="internal:or"){const o=this.querySelectorAll(a.body.parsed,i);s=new Set(Pb(new Set([...s,...o])))}else if(ZT.includes(a.name))s=this._queryLayoutSelector(s,a,i);else{const o=new Set;for(const u of s){const f=this._queryEngineAll(a,u);for(const d of f)o.add(d)}s=o}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const s=this._engines.get(e.name).queryAll(i,e.body);for(const a of s)if(!("nodeName"in a))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(a)}`);return s}_createAttributeEngine(e,i){const s=a=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(a)}]`,functions:[]},combinator:""}]}];return{queryAll:(a,o)=>this._evaluator.query({scope:a,pierceShadow:i},s(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(a,o)=>{const{matcher:u,kind:f}=Ao(o,i),d=[];let p=null;const m=b=>{if(f==="lax"&&p&&p.contains(b))return!1;const v=pc(this._evaluator._cacheText,b,u);v==="none"&&(p=b),(v==="self"||v==="selfAndChildren"&&f==="strict"&&!i)&&d.push(b)};a.nodeType===Node.ELEMENT_NODE&&m(a);const y=this._evaluator._queryCSS({scope:a,pierceShadow:e},"*");for(const b of y)m(b);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,a=jt(this._evaluator._cacheText,s),{matcher:o}=Ao(i,!0);return o(a)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,a=jt(this._evaluator._cacheText,s),{matcher:o}=Ao(i,!0);return o(a)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:s}=Ao(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>Vb(this._evaluator._cacheText,o).some(u=>s(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,s)=>{const a=as(s,!0);if(a.name||a.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:u,caseSensitive:f}=a.attributes[0],d=f?null:u.toLowerCase();let p;return u instanceof RegExp?p=y=>!!y.match(u):f?p=y=>y===u:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(y=>p(y.getAttribute(o)))}}}_createDescribeEngine(){return{queryAll:i=>i.nodeType!==1?[]:[i]}}_createControlEngine(){return{queryAll(e,i){if(i==="enter-frame")return[];if(i==="return-empty")return[];if(i==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${i}`)}}}_createHasEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,s)=>{if(i.nodeType!==1)return[];const a=s==="true";return Ei(i)===a?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,s)=>this.querySelectorAll(s.parsed,i)}}extend(e,i){const s=this.window.eval(`
112
+ `;return s.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+a.pos)]}),null}throw a}}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}`);const i=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(i,this._pos)}_readString(){let e="",i=!1;for(;!this._eof();){const s=this._next();if(i)e+=s,i=!1;else if(s==="\\")i=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new Gy(e,i||this._pos)}_readRegex(){let e="",i=!1,s=!1;for(;!this._eof();){const a=this._next();if(i)e+=a,i=!1;else if(a==="\\")i=!0,e+=a;else{if(a==="/"&&!s)return{pattern:e};a==="["?(s=!0,e+=a):a==="]"&&s?(e+=a,s=!1):e+=a}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),gb(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let i=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),i=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let a="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)a+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,a||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",s={kind:"role",role:e,name:i};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,i,s,a){if(i==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',a),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',a),e.disabled=s==="true";return}if(i==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',a),e.expanded=s==="true";return}if(i==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',a),e.active=s==="true";return}if(i==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',a),e.level=Number(s);return}if(i==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',a),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',a),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,a)}_assert(e,i,s){e||this._throwError(i||"Assertion error",s)}}class Gy extends Error{constructor(e,i){super(e),this.pos=i}}let mb={};function pT(n){mb=n}function el(n,e){for(;e;){if(n.contains(e))return!0;e=bb(e)}return!1}function gt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function yb(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function bb(n){for(;n.parentElement;)n=n.parentElement;return gt(n)}function Ha(n,e,i){for(;n;){const s=n.closest(e);if(i&&s!==i&&(s!=null&&s.contains(i)))return;if(s)return s;n=bb(n)}}function Mi(n,e){const i=e==="::before"?Xh:e==="::after"?Ph:Yh;if(i&&i.has(n))return i.get(n);const s=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,s),s}function vb(n,e){if(e=e??Mi(n),!e)return!0;if(Element.prototype.checkVisibility&&mb.browserNameForWorkarounds!=="webkit"){if(!n.checkVisibility())return!1}else{const i=n.closest("details,summary");if(i!==n&&(i==null?void 0:i.nodeName)==="DETAILS"&&!i.open)return!1}return e.visibility==="visible"}function ec(n){const e=Mi(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let a=n.firstChild;a;a=a.nextSibling){if(a.nodeType===1&&Ei(a))return{visible:!0,inline:!1,cursor:i};if(a.nodeType===3&&Sb(a))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!vb(n,e))return{cursor:i,visible:!1,inline:!1};const s=n.getBoundingClientRect();return{rect:s,cursor:i,visible:s.width>0&&s.height>0,inline:e.display==="inline"}}function Ei(n){return ec(n).visible}function Sb(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function it(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let Yh,Xh,Ph,wb=0;function Fh(){++wb,Yh??(Yh=new Map),Xh??(Xh=new Map),Ph??(Ph=new Map)}function Qh(){--wb||(Yh=void 0,Xh=void 0,Ph=void 0)}function Ky(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const Yy="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]",gT=[["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 xb(n,e){return gT.some(([i,s])=>!(s!=null&&s.includes(e||""))&&n.hasAttribute(i))}function _b(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function mT(n){return!Db(n)&&(yT(n)||_b(n))}function yT(n){const e=it(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const eh={A:n=>n.hasAttribute("href")?"link":null,AREA:n=>n.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:n=>Ha(n,Yy)?null:"contentinfo",FORM:n=>Ky(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>Ha(n,Yy)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!xb(n)&&!_b(n)?"presentation":"img",INPUT:n=>{const e=n.type.toLowerCase();if(e==="search")return n.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const i=_r(n,n.getAttribute("list"))[0];return i&&it(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":LT[e]||"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:n=>Ky(n)?"region":null,SELECT:n=>n.hasAttribute("multiple")||n.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:n=>{const e=Ha(n,"table"),i=e?tc(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:n=>{if(n.getAttribute("scope")==="col")return"columnheader";if(n.getAttribute("scope")==="row")return"rowheader";const e=Ha(n,"table"),i=e?tc(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},bT={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 Xy(n){var s;const e=((s=eh[it(n)])==null?void 0:s.call(eh,n))||"";if(!e)return null;let i=n;for(;i;){const a=gt(i),o=bT[it(i)];if(!o||!a||!o.includes(it(a)))break;const u=tc(a);if((u==="none"||u==="presentation")&&!Tb(a,u))return u;i=a}return e}const vT=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function tc(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>vT.includes(i))||null}function Tb(n,e){return xb(n,e)||mT(n)}function ut(n){const e=tc(n);if(!e)return Xy(n);if(e==="none"||e==="presentation"){const i=Xy(n);if(Tb(n,i))return i}return e}function Eb(n){return n===null?void 0:n.toLowerCase()==="true"}function Ab(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(it(n))}function sn(n){if(Ab(n))return!0;const e=Mi(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let a=n.firstChild;a;a=a.nextSibling)if(a.nodeType===1&&!sn(a)||a.nodeType===3&&Sb(a))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!vb(n,e)?!0:Nb(n)}function Nb(n){let e=Ti==null?void 0:Ti.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=Mi(n);e=!i||i.display==="none"||Eb(n.getAttribute("aria-hidden"))===!0}if(!e){const i=gt(n);i&&(e=Nb(i))}Ti==null||Ti.set(n,e)}return e}function _r(n,e){if(!e)return[];const i=yb(n);if(!i)return[];try{const s=e.split(" ").filter(o=>!!o),a=[];for(const o of s){const u=i.querySelector("#"+CSS.escape(o));u&&!a.includes(u)&&a.push(u)}return a}catch{return[]}}function Kn(n){return n.trim()}function Ka(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
113
+ `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function Py(n,e){const i=[...n.querySelectorAll(e)];for(const s of _r(n,n.getAttribute("aria-owns")))s.matches(e)&&i.push(s),i.push(...s.querySelectorAll(e));return i}function Ya(n,e){const i=e==="::before"?od:e==="::after"?cd:ld;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const s=Mi(n,e);let a;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(a=ST(n,o,!!e))}return e&&a!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(a=" "+a+" "),i&&i.set(n,a),a}function ST(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let s=j0(e).filter(f=>!(f instanceof Fo));const a=s.findIndex(f=>f instanceof ot&&f.value==="/");if(a!==-1)s=s.slice(a+1);else if(!i)return;const o=[];let u=0;for(;u<s.length;)if(s[u]instanceof $h)o.push(s[u].value),u++;else if(u+2<s.length&&s[u]instanceof Ga&&s[u].value==="attr"&&s[u+1]instanceof qh&&s[u+2]instanceof Hh){const f=s[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function Cb(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=_r(n,e);return i.length?i:null}function wT(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),s=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(n);return i||s}function tl(n,e){const i=e?sd:id;let s=i==null?void 0:i.get(n);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ut(n)||"")||(s=Ka(dn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,s)),s}function Fy(n,e){const i=e?ad:rd;let s=i==null?void 0:i.get(n);if(s===void 0){if(s="",n.hasAttribute("aria-describedby")){const a=_r(n,n.getAttribute("aria-describedby"));s=Ka(a.map(o=>dn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:sn(o)}})).join(" "))}else n.hasAttribute("aria-description")?s=Ka(n.getAttribute("aria-description")||""):s=Ka(n.getAttribute("title")||"");i==null||i.set(n,s)}return s}function xT(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function _T(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function TT(n){const e=cr;let i=cr==null?void 0:cr.get(n);if(i===void 0){i="";const s=xT(n)!=="false",a=_T(n);if(s||a){const o=n.getAttribute("aria-errormessage");i=_r(n,o).map(d=>Ka(dn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:sn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function dn(n,e){var d,p,m,y;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const b=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Ab(n)||!b&&sn(n))return e.visitedElements.add(n),""}const s=Cb(n);if(!e.embeddedInLabelledBy){const b=(s||[]).map(v=>dn(v,{...e,embeddedInLabelledBy:{element:v,hidden:sn(v)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(b)return b}const a=ut(n)||"",o=it(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const b=[...n.labels||[]].includes(n),v=(s||[]).includes(n);if(!b&&!v){if(a==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(a)){e.visitedElements.add(n);let E;if(o==="SELECT")E=[...n.selectedOptions],!E.length&&n.options.length&&E.push(n.options[0]);else{const x=a==="combobox"?Py(n,"*").find(T=>ut(T)==="listbox"):n;E=x?Py(x,'[aria-selected="true"]').filter(T=>ut(T)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>dn(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(a))return e.visitedElements.add(n),n.hasAttribute("aria-valuetext")?n.getAttribute("aria-valuetext")||"":n.hasAttribute("aria-valuenow")?n.getAttribute("aria-valuenow")||"":n.getAttribute("value")||"";if(["menu"].includes(a))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(Kn(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(a)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const b=n.value||"";return Kn(b)?b:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const b=n.labels||[];return b.length&&!e.embeddedInLabelledBy?Oa(b,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const b=n.labels||[];if(b.length&&!e.embeddedInLabelledBy)return Oa(b,e);const v=n.getAttribute("alt")||"";if(Kn(v))return v;const E=n.getAttribute("title")||"";return Kn(E)?E:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(n);const b=n.labels||[];if(b.length)return Oa(b,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(n);const b=n.labels||[];return b.length?Oa(b,e):n.getAttribute("title")||""}if(!s&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const b=n.labels||[];if(b.length)return Oa(b,e);const v=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",E=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!v||x?x:E}if(!s&&o==="FIELDSET"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(it(v)==="LEGEND")return dn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:sn(v)}});return n.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(it(v)==="FIGCAPTION")return dn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:sn(v)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return Kn(b)?b:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(it(v)==="CAPTION")return dn(v,{...i,embeddedInNativeTextAlternative:{element:v,hidden:sn(v)}});const b=n.getAttribute("summary")||"";if(b)return b}if(o==="AREA"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return Kn(b)?b:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let b=n.firstElementChild;b;b=b.nextElementSibling)if(it(b)==="TITLE"&&b.ownerSVGElement)return dn(b,{...i,embeddedInLabelledBy:{element:b,hidden:sn(b)}})}if(n.ownerSVGElement&&o==="A"){const b=n.getAttribute("xlink:title")||"";if(Kn(b))return e.visitedElements.add(n),b}}const f=o==="SUMMARY"&&!["presentation","none"].includes(a);if(wT(a,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const b=ET(n,i);if(e.embeddedInTargetElement==="self"?Kn(b):b)return b}if(!["presentation","none"].includes(a)||o==="IFRAME"){e.visitedElements.add(n);const b=n.getAttribute("title")||"";if(Kn(b))return b}return e.visitedElements.add(n),""}function ET(n,e){const i=[],s=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=Mi(o))==null?void 0:f.display)||"inline";let p=dn(o,e);(d!=="inline"||o.nodeName==="BR")&&(p=" "+p+" "),i.push(p)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Ya(n,"::before")||"");const a=Ya(n);if(a!==void 0)i.push(a);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)s(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)s(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)s(u,!0);for(const u of _r(n,n.getAttribute("aria-owns")))s(u,!0)}}return i.push(Ya(n,"::after")||""),i.join("")}const Zh=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function kb(n){return it(n)==="OPTION"?n.selected:Zh.includes(ut(n)||"")?Eb(n.getAttribute("aria-selected"))===!0:!1}const Jh=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Mb(n){const e=Wh(n,!0);return e==="error"?!1:e}function AT(n){return Wh(n,!0)}function NT(n){return Wh(n,!1)}function Wh(n,e){const i=it(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(Jh.includes(ut(n)||"")){const s=n.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const CT=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function kT(n){const e=it(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):CT.includes(ut(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const ed=["button"];function Ob(n){if(ed.includes(ut(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const td=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Rb(n){if(it(n)==="DETAILS")return n.open;if(td.includes(ut(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const nd=["heading","listitem","row","treeitem"];function Lb(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[it(n)];if(e)return e;if(nd.includes(ut(n)||"")){const i=n.getAttribute("aria-level"),s=i===null?Number.NaN:Number(i);if(Number.isInteger(s)&&s>=1)return s}return 0}const jb=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function nc(n){return Db(n)||Bb(n)}function Db(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(it(n))&&(n.hasAttribute("disabled")||MT(n)||OT(n))}function MT(n){return it(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function OT(n){const e=n==null?void 0:n.closest("FIELDSET[DISABLED]");if(!e)return!1;const i=e.querySelector(":scope > LEGEND");return!i||!i.contains(n)}function Bb(n,e=!1){if(!n)return!1;if(e||jb.includes(ut(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:Bb(gt(n),!0)}return!1}function Oa(n,e){return[...n].map(i=>dn(i,{...e,embeddedInLabel:{element:i,hidden:sn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function RT(n){const e=ud;let i=n,s;const a=[];for(;i;i=gt(i)){const o=e.get(i);if(o!==void 0){s=o;break}a.push(i);const u=Mi(i);if(!u){s=!0;break}const f=u.pointerEvents;if(f){s=f!=="none";break}}s===void 0&&(s=!0);for(const o of a)e.set(o,s);return s}let id,sd,rd,ad,cr,Ti,ld,od,cd,ud,Ub=0;function hc(){Fh(),++Ub,id??(id=new Map),sd??(sd=new Map),rd??(rd=new Map),ad??(ad=new Map),cr??(cr=new Map),Ti??(Ti=new Map),ld??(ld=new Map),od??(od=new Map),cd??(cd=new Map),ud??(ud=new Map)}function dc(){--Ub||(id=void 0,sd=void 0,rd=void 0,ad=void 0,cr=void 0,Ti=void 0,ld=void 0,od=void 0,cd=void 0,ud=void 0),Qh()}const LT={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function jT(n){return zb(n)?"'"+n.replace(/'/g,"''")+"'":n}function th(n){return zb(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
114
+ `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function zb(n){return!!(n.length===0||/^\s|\s$/.test(n)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(n)||/^-/.test(n)||/[\n:](\s|$)/.test(n)||/\s#/.test(n)||/[\n\r]/.test(n)||/^[&*\],?!>|@"'#%]/.test(n)||/[{}`]/.test(n)||/^\[/.test(n)||!isNaN(Number(n))||["y","n","yes","no","true","false","on","off","null"].includes(n.toLowerCase()))}function DT(n,e){if(n.role!==e.role||n.name!==e.name||!hT(n,e)||ic(n)!==ic(e))return!1;const i=Object.keys(n.props),s=Object.keys(e.props);return i.length===s.length&&i.every(a=>n.props[a]===e.props[a])}let BT=0;function Hb(n){return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Xa(n,e){const i=Hb(e),s=new Set,a={root:{role:"fragment",name:"",children:[],element:n,props:{},box:ec(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]},o=(f,d,p)=>{if(s.has(d))return;if(s.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!sn(m);let b=y;if(i.visibility==="ariaOrVisible"&&(b=y||Ei(m)),i.visibility==="ariaAndVisible"&&(b=y&&Ei(m)),i.visibility==="aria"&&!b)return;const v=[];if(m.hasAttribute("aria-owns")){const x=m.getAttribute("aria-owns").split(/\s+/);for(const T of x){const C=n.ownerDocument.getElementById(T);C&&v.push(C)}}const E=b?UT(m,i):null;E&&(E.ref&&(a.elements.set(E.ref,m),a.refs.set(m,E.ref),E.role==="iframe"&&a.iframeRefs.push(E.ref)),f.children.push(E)),u(E||f,m,v,b)};function u(f,d,p,m){var E;const b=(((E=Mi(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";b&&f.children.push(b),f.children.push(Ya(d,"::before")||"");const v=d.nodeName==="SLOT"?d.assignedNodes():[];if(v.length)for(const x of v)o(f,x,m);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,m);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,m)}for(const x of p)o(f,x,m);if(f.children.push(Ya(d,"::after")||""),b&&f.children.push(b),f.children.length===1&&f.name===f.children[0]&&(f.children=[]),f.role==="link"&&d.hasAttribute("href")){const x=d.getAttribute("href");f.props.url=x}if(f.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==f.name){const x=d.getAttribute("placeholder");f.props.placeholder=x}}hc();try{o(a.root,n,!0)}finally{dc()}return HT(a.root),zT(a.root),a}function Qy(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;let i;i=n.element._ariaRef,(!i||i.role!==n.role||i.name!==n.name)&&(i={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++BT},n.element._ariaRef=i),n.ref=i.ref}function UT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},element:n,box:ec(n),receivesPointerEvents:!0,active:i};return Qy(p,e),p}const s=e.includeGenericRole?"generic":null,a=ut(n)??s;if(!a||a==="presentation"||a==="none")return null;const o=Tt(tl(n,!1)||""),u=RT(n),f=ec(n);if(a==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:a,name:o,children:[],props:{},element:n,box:f,receivesPointerEvents:u,active:i};return Qy(d,e),Jh.includes(a)&&(d.checked=Mb(n)),jb.includes(a)&&(d.disabled=nc(n)),td.includes(a)&&(d.expanded=Rb(n)),nd.includes(a)&&(d.level=Lb(n)),ed.includes(a)&&(d.pressed=Ob(n)),Zh.includes(a)&&(d.selected=kb(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function zT(n){const e=i=>{const s=[];for(const o of i.children||[]){if(typeof o=="string"){s.push(o);continue}const u=e(o);s.push(...u)}return i.role==="generic"&&!i.name&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(i.children=s,[i])};e(n)}function HT(n){const e=(s,a)=>{if(!s.length)return;const o=Tt(s.join(""));o&&a.push(o),s.length=0},i=s=>{const a=[],o=[];for(const u of s.children||[])typeof u=="string"?o.push(u):(e(o,a),i(u),a.push(u));e(o,a),s.children=a.length?a:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};i(n)}function qT(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function Zy(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=$T(e);return i?!!n.match(i):!1}const nh=Symbol("cachedRegex");function $T(n){if(n[nh]!==void 0)return n[nh];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let s;try{s=i?new RegExp(e.slice(1,-1)):null}catch{s=null}return n[nh]=s,s}function IT(n,e){const i=Xa(n,{mode:"expect"});return{matches:qb(i.root,e,!1,!1),received:{raw:Pa(i,{mode:"expect"}),regex:Pa(i,{mode:"codegen"})}}}function VT(n,e){const i=Xa(n,{mode:"expect"}).root;return qb(i,e,!0,!1).map(a=>a.element)}function fd(n,e,i){var s;return typeof n=="string"&&e.kind==="text"?Zy(n,e.text):n===null||typeof n!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==n.role||e.checked!==void 0&&e.checked!==n.checked||e.disabled!==void 0&&e.disabled!==n.disabled||e.expanded!==void 0&&e.expanded!==n.expanded||e.level!==void 0&&e.level!==n.level||e.pressed!==void 0&&e.pressed!==n.pressed||e.selected!==void 0&&e.selected!==n.selected||!qT(n.name,e.name)||!Zy(n.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?Wy(n.children||[],e.children||[]):e.containerMode==="equal"?Jy(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?Jy(n.children||[],e.children||[],!0):Wy(n.children||[],e.children||[])}function Jy(n,e,i){if(e.length!==n.length)return!1;for(let s=0;s<e.length;++s)if(!fd(n[s],e[s],i))return!1;return!0}function Wy(n,e){if(e.length>n.length)return!1;const i=n.slice(),s=e.slice();for(const a of s){let o=i.shift();for(;o&&!fd(o,a,!1);)o=i.shift();if(!o)return!1}return!0}function qb(n,e,i,s){const a=[],o=(u,f)=>{if(fd(u,e,s)){const d=typeof u=="string"?f:u;return d&&a.push(d),!i}if(typeof u=="string")return!1;for(const d of u.children||[])if(o(d,u))return!0;return!1};return o(n,null),a}function $b(n,e=new Map){n!=null&&n.ref&&e.set(n.ref,n);for(const i of(n==null?void 0:n.children)||[])typeof i!="string"&&$b(i,e);return e}function GT(n,e){var o;const i=$b(e==null?void 0:e.root),s=new Map,a=(u,f)=>{let d=u.children.length===(f==null?void 0:f.children.length)&&DT(u,f),p=d;for(let m=0;m<u.children.length;m++){const y=u.children[m],b=f==null?void 0:f.children[m];if(typeof y=="string")d&&(d=y===b),p&&(p=y===b);else{let v=typeof b!="string"?b:void 0;y.ref&&(v=i.get(y.ref));const E=a(y,v);(!v||!E&&!y.ref||v!==b)&&(p=!1),d&&(d=E&&v===b)}}return s.set(u,d?"same":p?"skip":"changed"),d};return a(n.root,i.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),s}function KT(n,e){const i=[],s=a=>{const o=e.get(a);if(o!=="same")if(o==="skip")for(const u of a.children)typeof u!="string"&&s(u);else i.push(a)};for(const a of n)typeof a=="string"?i.push(a):s(a);return i}function Pa(n,e,i){const s=Hb(e),a=[],o=s.renderStringsAsRegex?XT:()=>!0,u=s.renderStringsAsRegex?YT:v=>v;let f=n.root.role==="fragment"?n.root.children:[n.root];const d=GT(n,i);i&&(f=KT(f,d));const p=(v,E)=>{const x=th(u(v));x&&a.push(E+"- text: "+x)},m=(v,E)=>{let x=v.role;if(v.name&&v.name.length<=900){const T=u(v.name);if(T){const C=T.startsWith("/")&&T.endsWith("/")?T:JSON.stringify(T);x+=" "+C}}return v.checked==="mixed"&&(x+=" [checked=mixed]"),v.checked===!0&&(x+=" [checked]"),v.disabled&&(x+=" [disabled]"),v.expanded&&(x+=" [expanded]"),v.active&&s.renderActive&&(x+=" [active]"),v.level&&(x+=` [level=${v.level}]`),v.pressed==="mixed"&&(x+=" [pressed=mixed]"),v.pressed===!0&&(x+=" [pressed]"),v.selected===!0&&(x+=" [selected]"),v.ref&&(x+=` [ref=${v.ref}]`,E&&ic(v)&&(x+=" [cursor=pointer]")),x},y=v=>(v==null?void 0:v.children.length)===1&&typeof v.children[0]=="string"&&!Object.keys(v.props).length?v.children[0]:void 0,b=(v,E,x)=>{if(d.get(v)==="same"&&v.ref){a.push(E+`- ref=${v.ref} [unchanged]`);return}const T=!!i&&!E,C=E+"- "+(T?"<changed> ":"")+jT(m(v,x)),k=y(v);if(!v.children.length&&!Object.keys(v.props).length)a.push(C);else if(k!==void 0)o(v,k)?a.push(C+": "+th(u(k))):a.push(C);else{a.push(C+":");for(const[R,G]of Object.entries(v.props))a.push(E+" - /"+R+": "+th(G));const $=E+" ",V=!!v.ref&&x&&ic(v);for(const R of v.children)typeof R=="string"?p(o(v,R)?R:"",$):b(R,$,x&&!V)}};for(const v of f)typeof v=="string"?p(v,""):b(v,"",!!s.renderCursorPointer);return a.join(`
115
+ `)}function YT(n){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let i="",s=0;const a=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(a,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=Zo(n.slice(s,f));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];i+=m;break}return s=f+o.length,o}),i?(i+=Zo(n.slice(s)),String(new RegExp(i))):n}function XT(n,e){if(!e.length)return!1;if(!n.name)return!0;if(n.name.length>e.length)return!1;const i=e.length<=200&&n.name.length<=200?Mx(e,n.name):"";let s=e;for(;i&&s.includes(i);)s=s.replace(i,"");return s.trim().length/e.length>.1}function ic(n){return n.box.cursor==="pointer"}const e0=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;z-index:10;font-size:13px}x-pw-dialog:not(.autosize){width:400px;height:150px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}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{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}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{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}x-pw-action-list{flex:auto;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}x-pw-action-item{padding:6px 10px;cursor:pointer;overflow:hidden}x-pw-action-item:hover{background-color:#f2f2f2}x-pw-action-item:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}";class ih{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483647",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent",this._actionPointElement=i.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const s=new this._injectedScript.window.CSSStyleSheet;s.replaceSync(e0),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=e0,this._glassPaneShadow.appendChild(s)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const i=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),s=ls(this._language,Xn(e)),a=i.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(i.map((o,u)=>{const f=i.length>1?` [${u+1} of ${i.length}]`:"";return{element:o,color:a,tooltipText:s+f}})),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,i){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,i;for(const s of this._renderedEntries)(e=s.highlightElement)==null||e.remove(),(i=s.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(s=>({element:s,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const s=this._createHighlightElement();this._glassPaneShadow.appendChild(s);let a;if(i.tooltipText){a=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(a),a.style.top="0",a.style.left="0",a.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,a.appendChild(o)}this._renderedEntries.push({targetElement:i.element,color:i.color,tooltipElement:a,highlightElement:s})}for(const i of this._renderedEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:s,anchorTop:a}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=a,i.tooltipLeft=s}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const s=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=s.x+"px",i.highlightElement.style.top=s.y+"px",i.highlightElement.style.width=s.width+"px",i.highlightElement.style.height=s.height+"px",i.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}firstTooltipBox(){const 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,i){const s=i.offsetWidth,a=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+s>o-5&&(f=o-s-5);let d=Math.max(0,e.bottom)+5;return d+a>u-5&&(Math.max(0,e.top)>a+5?d=Math.max(0,e.top)-a-5:d=u-5-a),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let i=0;i<this._renderedEntries.length;++i){if(e[i].element!==this._renderedEntries[i].targetElement||e[i].color!==this._renderedEntries[i].color)return!1;const s=this._renderedEntries[i].box;if(!s)return!1;const a=e[i].element.getBoundingClientRect();if(a.top!==s.top||a.right!==s.right||a.bottom!==s.bottom||a.left!==s.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 PT(n,e,i){const s=n.left-e.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function FT(n,e,i){const s=e.left-n.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function QT(n,e,i){const s=e.top-n.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function ZT(n,e,i){const s=n.top-e.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function JT(n,e,i){const s=i===void 0?50:i;let a=0;return n.left-e.right>=0&&(a+=n.left-e.right),e.left-n.right>=0&&(a+=e.left-n.right),e.top-n.bottom>=0&&(a+=e.top-n.bottom),n.top-e.bottom>=0&&(a+=n.top-e.bottom),a>s?void 0:a}const WT=["left-of","right-of","above","below","near"];function Ib(n,e,i,s){const a=e.getBoundingClientRect(),o={"left-of":FT,"right-of":PT,above:QT,below:ZT,near:JT}[n];let u;for(const f of i){if(f===e)continue;const d=o(a,f.getBoundingClientRect(),s);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function Vb(n,e){for(const i of e.jsonPath)n!=null&&(n=n[i]);return Gb(n,e)}function Gb(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?s instanceof RegExp?typeof i=="string"&&!!i.match(s):i===s:typeof i!="string"||typeof s!="string"?!1:e.op==="*="?i.includes(s):e.op==="^="?i.startsWith(s):e.op==="$="?i.endsWith(s):e.op==="|="?i===s||i.startsWith(s+"-"):e.op==="~="?i.split(" ").includes(s):!1}function hd(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function jt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!hd(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:Tt(e.value),immediate:[e.value]};else{for(let a=e.firstChild;a;a=a.nextSibling)if(a.nodeType===Node.TEXT_NODE)i.full+=a.nodeValue||"",s+=a.nodeValue||"";else{if(a.nodeType===Node.COMMENT_NODE)continue;s&&i.immediate.push(s),s="",a.nodeType===Node.ELEMENT_NODE&&(i.full+=jt(n,a).full)}s&&i.immediate.push(s),e.shadowRoot&&(i.full+=jt(n,e.shadowRoot).full),i.full&&(i.normalized=Tt(i.full))}}n.set(e,i)}return i}function pc(n,e,i){if(hd(e)||!i(jt(n,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&i(jt(n,s)))return"selfAndChildren";return e.shadowRoot&&i(jt(n,e.shadowRoot))?"selfAndChildren":"self"}function Kb(n,e){const i=Cb(e);if(i)return i.map(o=>jt(n,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:Tt(s),immediate:[s]}];const a=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||a){const o=e.labels;if(o)return[...o].map(u=>jt(n,u))}return[]}function t0(n){return n.displayName||n.name||"Anonymous"}function eE(n){if(n.type)switch(typeof n.type){case"function":return t0(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?t0(n.type.render):"")}if(n._currentElement){const e=n._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function tE(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function nE(n){if(n.child){const i=[];for(let s=n.child;s;s=s.sibling)i.push(s);return i}if(!n._currentElement)return[];const e=i=>{var a;const s=(a=i._currentElement)==null?void 0:a.type;return typeof s=="function"||typeof s=="string"};if(n._renderedComponent){const i=n._renderedComponent;return e(i)?[i]:[]}return n._renderedChildren?[...Object.values(n._renderedChildren)].filter(e):[]}function iE(n){var s;const e=n.memoizedProps||((s=n._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const i={...e};return delete i.children,i}function Yb(n){var s;const e={key:tE(n),name:eE(n),children:nE(n).map(Yb),rootElements:[],props:iE(n)},i=n.stateNode||n._hostNode||((s=n._renderedComponent)==null?void 0:s._hostNode);if(i instanceof Element)e.rootElements.push(i);else for(const a of e.children)e.rootElements.push(...a.rootElements);return e}function Xb(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)Xb(s,e,i);return i}function Pb(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const a=s.currentNode,o=a,u=Object.keys(o).find(d=>d.startsWith("__reactContainer")&&o[d]!==null);if(u)e.push(o[u].stateNode.current);else{const d="_reactRootContainer";o.hasOwnProperty(d)&&o[d]!==null&&e.push(o[d]._internalRoot.current)}if(a instanceof Element&&a.hasAttribute("data-reactroot"))for(const d of Object.keys(a))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(a[d]);const f=a instanceof Element?a.shadowRoot:null;f&&Pb(f,e)}while(s.nextNode());return e}const sE=()=>({queryAll(n,e){const{name:i,attributes:s}=as(e,!1),u=Pb(n.ownerDocument||n).map(d=>Yb(d)).map(d=>Xb(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),i&&p.name!==i||p.rootElements.some(y=>!el(n,y)))return!1;for(const y of s)if(!Vb(m,y))return!1;return!0})).flat(),f=new Set;for(const d of u)for(const p of d.rootElements)f.add(p);return[...f]}}),Fb=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];Fb.sort();function Ra(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function nr(n,e){if(n.op!=="<truthy>"&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(i=>JSON.stringify(i)).join(", ")}`)}function ir(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function rE(n,e){const i={role:e};for(const s of n)switch(s.name){case"checked":{Ra(s.name,Jh,e),nr(s,[!0,!1,"mixed"]),ir(s,["<truthy>","="]),i.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{Ra(s.name,ed,e),nr(s,[!0,!1,"mixed"]),ir(s,["<truthy>","="]),i.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{Ra(s.name,Zh,e),nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{Ra(s.name,td,e),nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(Ra(s.name,nd,e),typeof s.value=="string"&&(s.value=+s.value),s.op!=="="||typeof s.value!="number"||Number.isNaN(s.value))throw new Error('"level" attribute must be compared to a number');i.level=s.value;break}case"disabled":{nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.disabled=s.op==="<truthy>"?!0:s.value;break}case"name":{if(s.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof s.value!="string"&&!(s.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');i.name=s.value,i.nameOp=s.op,i.exact=s.caseSensitive;break}case"include-hidden":{nr(s,[!0,!1]),ir(s,["<truthy>","="]),i.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${Fb.map(a=>`"${a}"`).join(", ")}.`)}return i}function aE(n,e,i){const s=[],a=u=>{if(ut(u)===e.role&&!(e.selected!==void 0&&kb(u)!==e.selected)&&!(e.checked!==void 0&&Mb(u)!==e.checked)&&!(e.pressed!==void 0&&Ob(u)!==e.pressed)&&!(e.expanded!==void 0&&Rb(u)!==e.expanded)&&!(e.level!==void 0&&Lb(u)!==e.level)&&!(e.disabled!==void 0&&nc(u)!==e.disabled)&&!(!e.includeHidden&&sn(u))){if(e.name!==void 0){const f=Tt(tl(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Tt(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!Gb(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))a(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),s}function n0(n){return{queryAll:(e,i)=>{const s=as(i,!0),a=s.name.toLowerCase();if(!a)throw new Error("Role must not be empty");const o=rE(s.attributes,a);hc();try{return aE(e,o,n)}finally{dc()}}}}class lE{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",uE),this._engines.set("is",qa),this._engines.set("where",qa),this._engines.set("has",oE),this._engines.set("scope",cE),this._engines.set("light",fE),this._engines.set("visible",hE),this._engines.set("text",dE),this._engines.set("text-is",pE),this._engines.set("text-matches",gE),this._engines.set("has-text",mE),this._engines.set("right-of",La("right-of")),this._engines.set("left-of",La("left-of")),this._engines.set("above",La("above")),this._engines.set("below",La("below")),this._engines.set("near",La("near")),this._engines.set("nth-match",yE);const e=[...this._engines.keys()];e.sort();const i=[...J0];if(i.sort(),e.join("|")!==i.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${i.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,i,s,a){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>s.every((p,m)=>d.rest[m]===p));if(u)return u.result;const f=a();return o.push({rest:s,result:f}),f}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,i,s){const a=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[a,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(a)?this._matchesEngine(qa,e,a,s):(this._hasScopeClause(a)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,a.simples[a.simples.length-1].selector,s)?this._matchesParents(e,a,a.simples.length-2,s):!1))}finally{this.end()}}query(e,i){const s=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine(qa,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const a=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,s.simples[s.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,s,s.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const d=this._scoreMap.get(u),p=this._scoreMap.get(f);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=a,o})}finally{this.end()}}_markScore(e,i){this._scoreMap&&this._scoreMap.set(e,i)}_hasScopeClause(e){return e.simples.some(i=>i.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=gt(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,s){return this._cached(this._cacheMatchesSimple,e,[i,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||i.css&&!this._matchesCSS(e,i.css))return!1;for(const a of i.functions)if(!this._matchesEngine(this._getEngine(a.name),e,a.args,s))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=i.css;const a=i.functions;s==="*"&&a.length&&(s=void 0);let o,u=-1;s!==void 0?o=this._queryCSS(e,s):(u=a.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(a[u].name),e,a[u].args));for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches!==void 0&&(o=o.filter(p=>this._matchesEngine(d,p,a[f].args,e)))}for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches===void 0&&(o=o.filter(p=>this._matchesEngine(d,p,a[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,s,a){return s<0?!0:this._cached(this._cacheMatchesParents,e,[i,s,a.scope,a.pierceShadow,a.originalScope],()=>{const{selector:o,combinator:u}=i.simples[s];if(u===">"){const f=To(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,s-1,a)}if(u==="+"){const f=sh(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,s-1,a)}if(u===""){let f=To(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="")break}f=To(f,a)}return!1}if(u==="~"){let f=sh(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="~")break}f=sh(f,a)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="")break}f=To(f,a)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,s,a){if(e.matches)return this._callMatches(e,i,s,a);if(e.query)return this._callQuery(e,s,a).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,s){if(e.query)return this._callQuery(e,s,i);if(e.matches)return this._queryCSS(i,"*").filter(a=>this._callMatches(e,a,s,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,s,a){return this._cached(this._cacheCallMatches,i,[e,a.scope,a.pierceShadow,a.originalScope,...s],()=>e.matches(i,s,a,this))}_callQuery(e,i,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...i],()=>e.query(s,i,this))}_matchesCSS(e,i){return e.matches(i)}_queryCSS(e,i){return this._cached(this._cacheQueryCSS,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function a(o){if(s=s.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&a(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&a(u.shadowRoot)}}return a(e.scope),s})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const qa={matches(n,e,i,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(a=>s.matches(n,a,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const a of e)s=s.concat(i.query(n,a));return e.length===1?s:Qb(s)}},oE={matches(n,e,i,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...i,scope:n},e).length>0}},cE={matches(n,e,i,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const a=i.originalScope||i.scope;return a.nodeType===9?n===a.documentElement:n===a},query(n,e,i){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;if(s.nodeType===9){const a=s.documentElement;return a?[a]:[]}return s.nodeType===1?[s]:[]}},uE={matches(n,e,i,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(n,e,i)}},fE={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,s){return s.matches(n,e,{...i,pierceShadow:!1})}},hE={matches(n,e,i,s){if(e.length)throw new Error('"visible" engine expects no arguments');return Ei(n)}},dE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const a=Tt(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(a);return pc(s._cacheText,n,o)==="self"}},pE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const a=Tt(e[0]),o=u=>!a&&!u.immediate.length?!0:u.immediate.some(f=>Tt(f)===a);return pc(s._cacheText,n,o)!=="none"}},gE={matches(n,e,i,s){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const a=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>a.test(u.full);return pc(s._cacheText,n,o)==="self"}},mE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(hd(n))return!1;const a=Tt(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(a))(jt(s._cacheText,n))}};function La(n){return{matches(e,i,s,a){const o=i.length&&typeof i[i.length-1]=="number"?i[i.length-1]:void 0,u=o===void 0?i:i.slice(0,i.length-1);if(i.length<1+(o===void 0?0:1))throw new Error(`"${n}" engine expects a selector list and optional maximum distance in pixels`);const f=a.query(s,u),d=Ib(n,e,f,o);return d===void 0?!1:(a._markScore(e,d),!0)}}}const yE={query(n,e,i){let s=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof s!="number"||s<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const a=qa.query(n,e.slice(0,e.length-1),i);return s--,s<a.length?[a[s]]:[]}};function To(n,e){if(n!==e.scope)return e.pierceShadow?gt(n):n.parentElement||void 0}function sh(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function Qb(n){const e=new Map,i=[],s=[];function a(u){let f=e.get(u);if(f)return f;const d=gt(u);return d?a(d).children.push(u):i.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)a(u).taken=!0;function o(u){const f=e.get(u);if(f.taken&&s.push(u),f.children.length>1){const d=new Set(f.children);f.children=[];let p=u.firstElementChild;for(;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling;for(p=u.shadowRoot?u.shadowRoot.firstElementChild:null;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling}f.children.forEach(o)}return i.forEach(o),s}const Zb=10,Tr=Zb/2,i0=1,bE=2,vE=10,SE=50,Jb=100,Wb=120,ev=140,tv=160,qo=180,nv=200,s0=250,wE=Wb+Tr,xE=ev+Tr,_E=Jb+Tr,TE=tv+Tr,EE=qo+Tr,AE=nv+Tr,NE=300,CE=500,iv=510,rh=520,sv=530,Th=1e4,kE=1e7,ME=1e3;function r0(n,e,i){n._evaluator.begin();const s={allowText:new Map,disallowText:new Map};hc(),Fh();try{let a=[];if(i.forTextExpect){let f=$a(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=gt(d)){const p=Ji(s,n,d,{...i,noText:!0});if(!p)continue;if(Wi(p)<=ME){f=p;break}}a=[$o(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=Ha(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&Ei(f)&&(e=f)}if(i.multiple){const f=Ji(s,n,e,i),d=Ji(s,n,e,{...i,noText:!0});let p=[f,d];if(s.allowText.clear(),s.disallowText.clear(),f&&ah(f)&&p.push(Ji(s,n,e,{...i,noCSSId:!0})),d&&ah(d)&&p.push(Ji(s,n,e,{...i,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=$a(n,e,i);p.push(m),ah(m)&&p.push($a(n,e,{...i,noCSSId:!0}))}a=[...new Set(p.map(m=>$o(m)))]}else{const f=Ji(s,n,e,i)||$a(n,e,i);a=[$o(f)]}}const o=a[0],u=n.parseSelector(o);return{selector:o,selectors:a,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{Qh(),dc(),n._evaluator.end()}}function Ji(n,e,i,s){if(s.root&&!el(s.root,i))throw new Error("Target element must belong to the root's subtree");if(i===s.root)return[{engine:"css",selector:":scope",score:1}];if(i.ownerDocument.documentElement===i)return[{engine:"css",selector:"html",score:1}];let a=null;const o=f=>{(!a||Wi(f)<Wi(a))&&(a=f)},u=[];if(!s.noText)for(const f of RE(e,i,!s.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of OE(e,i,s))s.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>Wi(f.candidate)-Wi(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const p=e.querySelectorAll(e.parseSelector($o(f)),s.root??i.ownerDocument);if(!p.includes(i))continue;if(p.length===1){o(f);break}const m=p.indexOf(i);if(!(m>5)&&(o([...f,{engine:"nth",selector:String(m),score:Th}]),!s.isRecursive))for(let y=gt(i);y&&y!==s.root;y=gt(y)){const b=p.filter($=>el(y,$)&&$!==y),v=b.indexOf(i);if(b.length>5||v===-1||v===m&&b.length>1)continue;const E=b.length===1?f:[...f,{engine:"nth",selector:String(v),score:Th}];if(a&&Wi([{engine:"",selector:"",score:1},...E])>=Wi(a))continue;const T=!!s.noText||d,C=T?n.disallowText:n.allowText;let k=C.get(y);k===void 0&&(k=Ji(n,e,y,{...s,isRecursive:!0,noText:T})||$a(e,y,s),C.set(y,k)),k&&o([...k,...E])}}return a}function OE(n,e,i){const s=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&s.push({engine:"css",selector:`[${u}=${lr(e.getAttribute(u))}]`,score:bE});if(!i.noCSSId){const u=e.getAttribute("id");u&&!LE(u)&&s.push({engine:"css",selector:rv(u),score:CE})}s.push({engine:"css",selector:Yn(e),score:sv})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&s.push({engine:"css",selector:`${Yn(e)}[${u}=${lr(e.getAttribute(u))}]`,score:vE});return e.getAttribute(i.testIdAttributeName)&&s.push({engine:"css",selector:`[${i.testIdAttributeName}=${lr(e.getAttribute(i.testIdAttributeName))}]`,score:i0}),Eh([s]),s}if(e.getAttribute(i.testIdAttributeName)&&s.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${xt(e.getAttribute(i.testIdAttributeName),!0)}]`,score:i0}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${xt(u.placeholder,!0)}]`,score:wE});for(const f of ur(u.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${xt(f.text,!1)}]`,score:Wb-f.scoreBonus})}}const a=Kb(n._evaluator._cacheText,e);for(const u of a){const f=u.normalized;s.push({engine:"internal:label",selector:Rt(f,!0),score:xE});for(const d of ur(f))s.push({engine:"internal:label",selector:Rt(d.text,!1),score:ev-d.scoreBonus})}const o=ut(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:iv}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&s.push({engine:"css",selector:`${Yn(e)}[name=${lr(e.getAttribute("name"))}]`,score:rh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${Yn(e)}[type=${lr(e.getAttribute("type"))}]`,score:rh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:Yn(e),score:rh+1}),Eh([s]),s}function RE(n,e,i){if(e.nodeName==="SELECT")return[];const s=[],a=e.getAttribute("title");if(a){s.push([{engine:"internal:attr",selector:`[title=${xt(a,!0)}]`,score:AE}]);for(const p of ur(a))s.push([{engine:"internal:attr",selector:`[title=${xt(p.text,!1)}]`,score:nv-p.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${xt(o,!0)}]`,score:TE}]);for(const p of ur(o))s.push([{engine:"internal:attr",selector:`[alt=${xt(p.text,!1)}]`,score:tv-p.scoreBonus}])}const u=jt(n._evaluator._cacheText,e).normalized,f=u?ur(u):[];if(u){if(i){u.length<=80&&s.push([{engine:"internal:text",selector:Rt(u,!0),score:EE}]);for(const m of f)s.push([{engine:"internal:text",selector:Rt(m.text,!1),score:qo-m.scoreBonus}])}const p={engine:"css",selector:Yn(e),score:sv};for(const m of f)s.push([p,{engine:"internal:has-text",selector:Rt(m.text,!1),score:qo-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+Zo(u)+"$");s.push([p,{engine:"internal:has-text",selector:Rt(m,!1),score:s0}])}}const d=ut(e);if(d&&!["none","presentation"].includes(d)){const p=tl(e,!1);if(p){const m={engine:"internal:role",selector:`${d}[name=${xt(p,!0)}]`,score:_E};s.push([m]);for(const y of ur(p))s.push([{engine:"internal:role",selector:`${d}[name=${xt(y.text,!1)}]`,score:Jb-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:iv};for(const y of f)s.push([m,{engine:"internal:has-text",selector:Rt(y.text,!1),score:qo-y.scoreBonus}]);if(i&&u.length<=80){const y=new RegExp("^"+Zo(u)+"$");s.push([m,{engine:"internal:has-text",selector:Rt(y,!1),score:s0}])}}}return Eh(s),s}function rv(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${lr(n)}]`}function ah(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function $a(n,e,i){const s=i.root??e.ownerDocument,a=[];function o(f){const d=a.slice();f&&d.unshift(f);const p=d.join(" > "),m=n.parseSelector(p);return n.querySelector(m,s,!1)===e?p:void 0}function u(f){const d={engine:"css",selector:f,score:kE},p=n.parseSelector(f),m=n.querySelectorAll(p,s);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:Th};return[d,y]}for(let f=e;f&&f!==s;f=gt(f)){let d="";if(f.id&&!i.noCSSId){const y=rv(f.id),b=o(y);if(b)return u(b);d=y}const p=f.parentNode,m=[...f.classList].map(jE);for(let y=0;y<m.length;++y){const b="."+m.slice(0,y+1).join("."),v=o(b);if(v)return u(v);!d&&p&&p.querySelectorAll(b).length===1&&(d=b)}if(p){const y=[...p.children],b=f.nodeName,E=y.filter(T=>T.nodeName===b).indexOf(f)===0?Yn(f):`${Yn(f)}:nth-child(${1+y.indexOf(f)})`,x=o(E);if(x)return u(x);d||(d=E)}else d||(d=Yn(f));a.unshift(d)}return u(o())}function Eh(n){for(const e of n)for(const i of e)i.score>SE&&i.score<NE&&(i.score+=Math.min(Zb,i.selector.length/10|0))}function $o(n){const e=[];let i="";for(const{engine:s,selector:a}of n)e.length&&(i!=="css"||s!=="css"||a.startsWith(":nth-match("))&&e.push(">>"),i=s,s==="css"?e.push(a):e.push(`${s}=${a}`);return e.join(" ")}function Wi(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function LE(n){let e,i=0;for(let s=0;s<n.length;++s){const a=n[s];let o;if(!(a==="-"||a==="_")){if(a>="a"&&a<="z"?o="lower":a>="A"&&a<="Z"?o="upper":a>="0"&&a<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function Eo(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function ur(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),s=i?i[1].length:0;if(s){const a=Eo(n.substring(s).trimStart(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),s=i?i[1].length:0;if(s){const a=Eo(n.substring(0,n.length-s).trimEnd(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:Eo(n,80),scoreBonus:0}),e.push({text:Eo(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function Yn(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function jE(n){let e="";for(let i=0;i<n.length;i++)e+=DE(n,i);return e}function DE(n,e){const i=n.charCodeAt(e);return i===0?"�":i>=1&&i<=31||i>=48&&i<=57&&(e===0||e===1&&n.charCodeAt(0)===45)?"\\"+i.toString(16)+" ":e===0&&i===45&&n.length===1?"\\"+n.charAt(e):i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n.charAt(e):"\\"+n.charAt(e)}function av(n,e){const i=n.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=i.substring(i.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function BE(n,e){return e?e.toUpperCase():""}const UE=/(?:^|[-_/])(\w)/g,lv=n=>n&&n.replace(UE,BE);function zE(n){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const b=m.__file;if(b)return lv(av(b,".vue"))}function i(m,y){return m.type.__playwright_guessedName=y,y}function s(m){var b,v,E,x;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const T in(v=(b=m.parent)==null?void 0:b.type)==null?void 0:v.components)if(((E=m.parent)==null?void 0:E.type.components[T])===m.type)return i(m,T);for(const T in(x=m.appContext)==null?void 0:x.components)if(m.appContext.components[T]===m.type)return i(m,T);return"Anonymous Component"}function a(m){return m._isBeingDestroyed||m.isUnmounted}function o(m){return m.subTree.type.toString()==="Symbol(Fragment)"}function u(m){const y=[];return m.component&&y.push(m.component),m.suspense&&y.push(...u(m.suspense.activeBranch)),Array.isArray(m.children)&&m.children.forEach(b=>{b.component?y.push(b.component):y.push(...u(b))}),y.filter(b=>{var v;return!a(b)&&!((v=b.type.devtools)!=null&&v.hide)})}function f(m){return o(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let b=0,v=m.children.length;b<v;b++){const E=m.children[b];E.component?y.push(...f(E.component)):E.el&&y.push(E.el)}return y}function p(m){return{name:s(m),children:u(m.subTree).map(p),rootElements:f(m),props:m.props}}return p(n)}function HE(n){function e(o){const u=o.displayName||o.name||o._componentTag;if(u)return u;const f=o.__file;if(f)return lv(av(f,".vue"))}function i(o){const u=e(o.$options||o.fnOptions||{});return u||(o.$root===o?"Root":"Anonymous Component")}function s(o){return o.$children?o.$children:Array.isArray(o.subTree.children)?o.subTree.children.filter(u=>!!u.component).map(u=>u.component):[]}function a(o){return{name:i(o),children:s(o).map(a),rootElements:[o.$el],props:o._props}}return a(n)}function ov(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)ov(s,e,i);return i}function cv(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),a=new Set;do{const o=s.currentNode;o.__vue__&&a.add(o.__vue__.$root),o.__vue_app__&&o._vnode&&o._vnode.component&&e.push({root:o._vnode.component,version:3});const u=o instanceof Element?o.shadowRoot:null;u&&cv(u,e)}while(s.nextNode());for(const o of a)e.push({version:2,root:o});return e}const qE=()=>({queryAll(n,e){const i=n.ownerDocument||n,{name:s,attributes:a}=as(e,!1),f=cv(i).map(p=>p.version===3?zE(p.root):HE(p.root)).map(p=>ov(p,m=>{if(s&&m.name!==s||m.rootElements.some(y=>!el(n,y)))return!1;for(const y of a)if(!Vb(m.props,y))return!1;return!0})).flat(),d=new Set;for(const p of f)for(const m of p.rootElements)d.add(m);return[...d]}}),a0={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],s=n.ownerDocument||n;if(!s)return i;const a=s.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=a.iterateNext();o;o=a.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}};function dd(n,e,i){return`internal:attr=[${n}=${xt(e,(i==null?void 0:i.exact)||!1)}]`}function $E(n,e){return`internal:testid=[${n}=${xt(e,!0)}]`}function IE(n,e){return"internal:label="+Rt(n,!!(e!=null&&e.exact))}function VE(n,e){return dd("alt",n,e)}function GE(n,e){return dd("title",n,e)}function KE(n,e){return dd("placeholder",n,e)}function YE(n,e){return"internal:text="+Rt(n,!!(e!=null&&e.exact))}function XE(n,e={}){const i=[];return e.checked!==void 0&&i.push(["checked",String(e.checked)]),e.disabled!==void 0&&i.push(["disabled",String(e.disabled)]),e.selected!==void 0&&i.push(["selected",String(e.selected)]),e.expanded!==void 0&&i.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&i.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&i.push(["level",String(e.level)]),e.name!==void 0&&i.push(["name",xt(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([s,a])=>`[${s}=${a}]`).join("")}`}const ja=Symbol("selector"),PE=class Ia{constructor(e,i,s){if(s!=null&&s.hasText&&(i+=` >> internal:has-text=${Rt(s.hasText,!1)}`),s!=null&&s.hasNotText&&(i+=` >> internal:has-not-text=${Rt(s.hasNotText,!1)}`),s!=null&&s.has&&(i+=" >> internal:has="+JSON.stringify(s.has[ja])),s!=null&&s.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(s.hasNot[ja])),(s==null?void 0:s.visible)!==void 0&&(i+=` >> visible=${s.visible?"true":"false"}`),this[ja]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const a=i,o=this;o.locator=(u,f)=>new Ia(e,a?a+" >> "+u:u,f),o.getByTestId=u=>o.locator($E(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(VE(u,f)),o.getByLabel=(u,f)=>o.locator(IE(u,f)),o.getByPlaceholder=(u,f)=>o.locator(KE(u,f)),o.getByText=(u,f)=>o.locator(YE(u,f)),o.getByTitle=(u,f)=>o.locator(GE(u,f)),o.getByRole=(u,f={})=>o.locator(XE(u,f)),o.filter=u=>new Ia(e,i,u),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=u=>o.locator(`nth=${u}`),o.and=u=>new Ia(e,a+" >> internal:and="+JSON.stringify(u[ja])),o.or=u=>new Ia(e,a+" >> internal:or="+JSON.stringify(u[ja]))}};let FE=PE;class QE{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,i)=>this._querySelector(e,!!i),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,i)=>this._generateLocator(e,i),ariaSnapshot:(e,i)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,i||{mode:"expect"}),resume:()=>this._resume(),...new FE(this._injectedScript,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(e,i){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const s=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(s,this._injectedScript.document,i)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const i=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(i,this._injectedScript.document)}_inspect(e){if(typeof e!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,i){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return ls(i||"javascript",s)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function ZE(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function JE(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function WE(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function eA(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function tA(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}const uv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function nA(n){if("toBase64"in n)return n.toBase64();const e=Array.from(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(i=>String.fromCharCode(i)).join("");return btoa(e)}function iA(n,e){const i=atob(n),s=new Uint8Array(i.length);for(let a=0;a<i.length;a++)s[a]=i.charCodeAt(a);return new e(s.buffer)}function Ah(n,e=[],i=new Map){if(!Object.is(n,void 0)){if(typeof n=="object"&&n){if("ref"in n)return i.get(n.ref);if("v"in n)return n.v==="undefined"?void 0:n.v==="null"?null:n.v==="NaN"?NaN:n.v==="Infinity"?1/0:n.v==="-Infinity"?-1/0:n.v==="-0"?-0:void 0;if("d"in n)return new Date(n.d);if("u"in n)return new URL(n.u);if("bi"in n)return BigInt(n.bi);if("e"in n){const s=new Error(n.e.m);return s.name=n.e.n,s.stack=n.e.s,s}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const s=[];i.set(n.id,s);for(const a of n.a)s.push(Ah(a,e,i));return s}if("o"in n){const s={};i.set(n.id,s);for(const{k:a,v:o}of n.o)a!=="__proto__"&&(s[a]=Ah(o,e,i));return s}if("h"in n)return e[n.h];if("ta"in n)return iA(n.ta.b,uv[n.ta.k])}return n}}function sA(n,e){return Nh(n,e,{visited:new Map,lastId:0})}function Nh(n,e,i){if(n&&typeof n=="object"){if(typeof globalThis.Window=="function"&&n instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&n instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&n instanceof globalThis.Node)return"ref: <Node>"}return fv(n,e,i)}function fv(n,e,i){var o;const s=e(n);if("fallThrough"in s)n=s.fallThrough;else return s;if(typeof n=="symbol")return{v:"undefined"};if(Object.is(n,void 0))return{v:"undefined"};if(Object.is(n,null))return{v:"null"};if(Object.is(n,NaN))return{v:"NaN"};if(Object.is(n,1/0))return{v:"Infinity"};if(Object.is(n,-1/0))return{v:"-Infinity"};if(Object.is(n,-0))return{v:"-0"};if(typeof n=="boolean"||typeof n=="number"||typeof n=="string")return n;if(typeof n=="bigint")return{bi:n.toString()};if(eA(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
116
+ ${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(JE(n))return{d:n.toJSON()};if(WE(n))return{u:n.toJSON()};if(ZE(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(uv))if(tA(n,f))return{ta:{b:nA(n),k:u}};const a=i.visited.get(n);if(a)return{ref:a};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d<n.length;++d)u.push(Nh(n[d],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const p of Object.keys(n)){let m;try{m=n[p]}catch{continue}p==="toJSON"&&typeof m=="function"?u.push({k:p,v:{o:[],id:0}}):u.push({k:p,v:Nh(m,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?fv(d.value,e,i):{o:u,id:f}}}class rA{constructor(e,i){var s,a,o,u,f,d,p,m;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(s=e.setTimeout)==null?void 0:s.bind(e),clearTimeout:(a=e.clearTimeout)==null?void 0:a.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(u=e.clearInterval)==null?void 0:u.bind(e),requestAnimationFrame:(f=e.requestAnimationFrame)==null?void 0:f.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,s,a,...o){const u=o.slice(0,a),f=o.slice(a),d=[];for(let m=0;m<u.length;m++)d[m]=Ah(u[m],f);let p=this.global.eval(s);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),i?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,i){if(i!==void 0)return sA(i,s=>({fallThrough:s}))}_promiseAwareJsonValueNoThrow(e){const i=s=>{try{return this.jsonValue(!0,s)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const s=await e;return i(s)})():i(e)}}class hv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:ls,cacheNormalizedWhitespaces:Cx,elementText:jt,getAriaRole:ut,getElementAccessibleDescription:Fy,getElementAccessibleName:tl,isElementVisible:Ei,isInsideScope:el,normalizeWhiteSpace:Tt,parseAriaSnapshot:Kh,generateAriaTree:Xa,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new rA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new lE,this.consoleApi=new QE(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",a0),this._engines.set("xpath:light",a0),this._engines.set("_react",sE()),this._engines.set("_vue",qE()),this._engines.set("role",n0(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",n0(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:a}of i.customEngines)this._engines.set(s,this.eval(a));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,pT({browserNameForWorkarounds:i.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const i=al(e);return Ax(i,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return r0(this,e,i)}generateSelectorSimple(e,i){return r0(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,s){const a=this.querySelectorAll(e,i);if(s&&a.length>1)throw this.strictModeViolationError(e,a);return a[0]}_queryNth(e,i){const s=[...e];let a=+i.body;return a===-1&&(a=s.length-1),new Set(s.slice(a,a+1))}_queryLayoutSelector(e,i,s){const a=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,s);for(const d of e){const p=Ib(a,d,f,o.distance);p!==void 0&&u.push({element:d,score:p})}return u.sort((d,p)=>d.score-p.score),new Set(u.map(d=>d.element))}ariaSnapshot(e,i){return this.incrementalAriaSnapshot(e,i).full}incrementalAriaSnapshot(e,i){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const s=Xa(e,i),a=Pa(s,i);let o;if(i.track){const u=this._lastAriaSnapshotForTrack.get(i.track);u&&(o=Pa(s,i,u)),this._lastAriaSnapshotForTrack.set(i.track,s)}return this._lastAriaSnapshotForQuery=s,{full:a,incremental:o,iframeRefs:s.iframeRefs}}ariaSnapshotForRecorder(){const e=Xa(this.document.body,{mode:"ai"});return{ariaSnapshot:Pa(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return VT(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(a=>a.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const s={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const a={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:a},source:Xn(a)};s.parts.push(o)}return this.querySelectorAll(s,i)}if(!i.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(i.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[i];this._evaluator.begin();try{let s=new Set([i]);for(const a of e.parts)if(a.name==="nth")s=this._queryNth(s,a);else if(a.name==="internal:and"){const o=this.querySelectorAll(a.body.parsed,i);s=new Set(o.filter(u=>s.has(u)))}else if(a.name==="internal:or"){const o=this.querySelectorAll(a.body.parsed,i);s=new Set(Qb(new Set([...s,...o])))}else if(WT.includes(a.name))s=this._queryLayoutSelector(s,a,i);else{const o=new Set;for(const u of s){const f=this._queryEngineAll(a,u);for(const d of f)o.add(d)}s=o}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const s=this._engines.get(e.name).queryAll(i,e.body);for(const a of s)if(!("nodeName"in a))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(a)}`);return s}_createAttributeEngine(e,i){const s=a=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(a)}]`,functions:[]},combinator:""}]}];return{queryAll:(a,o)=>this._evaluator.query({scope:a,pierceShadow:i},s(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(a,o)=>{const{matcher:u,kind:f}=No(o,i),d=[];let p=null;const m=b=>{if(f==="lax"&&p&&p.contains(b))return!1;const v=pc(this._evaluator._cacheText,b,u);v==="none"&&(p=b),(v==="self"||v==="selfAndChildren"&&f==="strict"&&!i)&&d.push(b)};a.nodeType===Node.ELEMENT_NODE&&m(a);const y=this._evaluator._queryCSS({scope:a,pierceShadow:e},"*");for(const b of y)m(b);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,a=jt(this._evaluator._cacheText,s),{matcher:o}=No(i,!0);return o(a)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,a=jt(this._evaluator._cacheText,s),{matcher:o}=No(i,!0);return o(a)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:s}=No(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>Kb(this._evaluator._cacheText,o).some(u=>s(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,s)=>{const a=as(s,!0);if(a.name||a.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:u,caseSensitive:f}=a.attributes[0],d=f?null:u.toLowerCase();let p;return u instanceof RegExp?p=y=>!!y.match(u):f?p=y=>y===u:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(y=>p(y.getAttribute(o)))}}}_createDescribeEngine(){return{queryAll:i=>i.nodeType!==1?[]:[i]}}_createControlEngine(){return{queryAll(e,i){if(i==="enter-frame")return[];if(i==="return-empty")return[];if(i==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${i}`)}}}_createHasEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,s)=>{if(i.nodeType!==1)return[];const a=s==="true";return Ei(i)===a?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,s)=>this.querySelectorAll(s.parsed,i)}}extend(e,i){const s=this.window.eval(`
117
117
  (() => {
118
118
  const module = {};
119
119
  ${e}
120
120
  return module.exports.default();
121
- })()`);return new s(this,i)}async viewportRatio(e){return await new Promise(i=>{const s=new IntersectionObserver(a=>{i(a[0].intersectionRatio),s.disconnect()});s.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const i=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(i.borderLeftWidth||"",10),top:parseInt(i.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const i=e.ownerDocument.defaultView;for(let a=e;a;a=gt(a))if(i.getComputedStyle(a).transform!=="none")return"transformed";const s=i.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,i){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(i==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(i==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),i==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const a=s.closest("label");a&&a.control&&(s=a.control)}return s}async checkElementStates(e,i){if(i.includes("stable")){const s=await this._checkElementIsStable(e);if(s===!1)return{missingState:"stable"};if(s==="error:notconnected")return"error:notconnected"}for(const s of i)if(s!=="stable"){const a=this.elementState(e,s);if(a.received==="error:notconnected")return"error:notconnected";if(!a.matches)return{missingState:s}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let s,a=0,o=0;const u=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const b=this.utils.builtins.performance.now();if(this._stableRafCount>1&&b-o<15)return i;o=b;const v=y.getBoundingClientRect(),E={x:v.top,y:v.left,width:v.width,height:v.height};if(s){if(!(E.x===s.x&&E.y===s.y&&E.width===s.width&&E.height===s.height))return!1;if(++a>=this._stableRafCount)return!0}return s=E,i};let f,d;const p=new Promise((y,b)=>{f=y,d=b}),m=()=>{try{const y=u();y!==i?f(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),p}_createAriaRefEngine(){return{queryAll:(i,s)=>{var o,u;const a=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(s);return a&&a.isConnected?[a]:[]}}}elementState(e,i){const s=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!s||!s.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const a=Ei(s);return{matches:i==="visible"?a:!a,received:a?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const a=tc(s);return{matches:i==="disabled"?a:!a,received:a?"disabled":"enabled"}}if(i==="editable"){const a=tc(s),o=NT(s);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!a&&!o,received:a?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const a=i==="checked",o=ET(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=s.nodeName==="INPUT"&&s.type==="radio";return{matches:a===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const a=TT(s);if(a==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:a==="mixed",received:a===!0?"checked":a===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${i}"`)}selectOptions(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const a=s,o=[...a.options],u=[];let f=i.slice();for(let d=0;d<o.length;d++){const p=o[d],m=y=>{if(y instanceof Node)return p===y;let b=!0;return y.valueOrLabel!==void 0&&(b=b&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(b=b&&y.value===p.value),y.label!==void 0&&(b=b&&y.label===p.label),y.index!==void 0&&(b=b&&y.index===d),b};if(f.some(m)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(u.push(p),a.multiple)f=f.filter(y=>!m(y));else{f=[];break}}}return f.length?"error:optionsnotfound":(a.value=void 0,u.forEach(d=>d.selected=!0),a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})),u.map(d=>d.value))}fill(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const a=s,o=a.type.toLowerCase(),u=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!u.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(i=i.trim(),isNaN(Number(i))))throw this.createStacklessError("Cannot type text into input[type=number]");if(u.has(o)){if(i=i.trim(),a.focus(),a.value=i,a.value!==i)throw this.createStacklessError("Malformed value");return s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(s.nodeName.toLowerCase()!=="textarea"){if(!s.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(s),"needsinput"}selectText(e){const i=this.retarget(e,"follow-label");if(!i)return"error:notconnected";if(i.nodeName.toLowerCase()==="input"){const o=i;return o.select(),o.focus(),"done"}if(i.nodeName.toLowerCase()==="textarea"){const o=i;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}const s=i.ownerDocument.createRange();s.selectNodeContents(i);const a=i.ownerDocument.defaultView.getSelection();return a&&(a.removeAllRanges(),a.addRange(s)),i.focus(),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,s=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:s}}focusNode(e,i){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:a}=this._activelyFocused(e);if(e.isContentEditable&&!a&&s&&s.blur&&s.blur(),e.focus(),e.focus(),i&&!a&&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,i){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const s=e;if(s.nodeName!=="INPUT")return"Not an <input> element";const a=s;if((a.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.map(d=>{const p=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),f=new DataTransfer;for(const d of u)f.items.add(d);a.files=f.files,a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const s=[];let a=i;for(;a;){const m=gb(a);if(!m||(s.push(m),m.nodeType===9))break;a=m.host}let o;for(let m=s.length-1;m>=0;m--){const y=s[m],b=y.elementsFromPoint(e.x,e.y),v=y.elementFromPoint(e.x,e.y);if(v&&b[0]&&gt(v)===b[0]){const x=this.window.getComputedStyle(v);(x==null?void 0:x.display)==="contents"&&b.unshift(v)}b[0]&&b[0].shadowRoot===y&&b[1]===v&&b.shift();const E=b[0];if(!E||(o=E,m&&E!==s[m-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=o.assignedSlot??gt(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,p=i;for(;p;){const m=u.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(u[m-1]));break}p=gt(p)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,s,a){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(s){const m=this.expectHitTarget(s,o);if(m!=="done")return m.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];let f;const d=m=>{if(!u.has(m.type)||!m.isTrusted)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;f===void 0&&y&&(f=this.expectHitTarget({x:y.clientX,y:y.clientY},o)),(a||f!=="done"&&f!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,i,s){var u,f,d;let a;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(i)){case"mouse":a=new MouseEvent(i,o);break;case"keyboard":a=new KeyboardEvent(i,o);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var E,x;if(y instanceof Touch)return y;let b=y.pageX;b===void 0&&y.clientX!==void 0&&(b=y.clientX+(((E=this.document.scrollingElement)==null?void 0:E.scrollLeft)||0));let v=y.pageY;return v===void 0&&y.clientY!==void 0&&(v=y.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,b,v,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));o.target??(o.target=e),o.touches=m(o.touches),o.targetTouches=m(o.targetTouches),o.changedTouches=m(o.changedTouches),a=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.changedTouches=(d=o.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),a=new TouchEvent(i,o);break}case"pointer":a=new PointerEvent(i,o);break;case"focus":a=new FocusEvent(i,o);break;case"drag":a=new DragEvent(i,o);break;case"wheel":a=new WheelEvent(i,o);break;case"deviceorientation":try{a=new DeviceOrientationEvent(i,o)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:b,gamma:v,absolute:E}=o;a=this.document.createEvent("DeviceOrientationEvent"),a.initDeviceOrientationEvent(i,p,m,y,b,v,E)}break;case"devicemotion":try{a=new DeviceMotionEvent(i,o)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:b,rotationRate:v,interval:E}=o;a=this.document.createEvent("DeviceMotionEvent"),a.initDeviceMotionEvent(i,p,m,y,b,v,E)}break;default:a=new Event(i,o);break}e.dispatchEvent(a)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Eo(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Eo(`<${e.nodeName.toLowerCase()} />`);const i=e,s=[];for(let d=0;d<i.attributes.length;d++){const{name:p,value:m}=i.attributes[d];p!=="style"&&(!m&&this._booleanAttributes.has(p)?s.push(` ${p}`):s.push(` ${p}="${m}"`))}s.sort((d,p)=>d.length-p.length);const a=jy(s.join(""),500);if(this._autoClosingTags.has(i.nodeName))return Eo(`<${i.nodeName.toLowerCase()}${a}/>`);const o=i.childNodes;let u=!1;if(o.length<=5){u=!0;for(let d=0;d<o.length;d++)u=u&&o[d].nodeType===Node.TEXT_NODE}const f=u?i.textContent||"":o.length?"…":"";return Eo(`<${i.nodeName.toLowerCase()}${a}>${jy(f,50)}</${i.nodeName.toLowerCase()}>`)}strictModeViolationError(e,i){this._evaluator.begin(),hc(),Fh();try{const s=this._isUtilityWorld&&this._browserName==="firefox"?2:10,a=i.slice(0,s).map(u=>({preview:this.previewNode(u),selector:this.generateSelectorSimple(u)})),o=a.map((u,f)=>`
121
+ })()`);return new s(this,i)}async viewportRatio(e){return await new Promise(i=>{const s=new IntersectionObserver(a=>{i(a[0].intersectionRatio),s.disconnect()});s.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const i=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(i.borderLeftWidth||"",10),top:parseInt(i.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const i=e.ownerDocument.defaultView;for(let a=e;a;a=gt(a))if(i.getComputedStyle(a).transform!=="none")return"transformed";const s=i.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,i){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(i==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(i==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),i==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const a=s.closest("label");a&&a.control&&(s=a.control)}return s}async checkElementStates(e,i){if(i.includes("stable")){const s=await this._checkElementIsStable(e);if(s===!1)return{missingState:"stable"};if(s==="error:notconnected")return"error:notconnected"}for(const s of i)if(s!=="stable"){const a=this.elementState(e,s);if(a.received==="error:notconnected")return"error:notconnected";if(!a.matches)return{missingState:s}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let s,a=0,o=0;const u=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const b=this.utils.builtins.performance.now();if(this._stableRafCount>1&&b-o<15)return i;o=b;const v=y.getBoundingClientRect(),E={x:v.top,y:v.left,width:v.width,height:v.height};if(s){if(!(E.x===s.x&&E.y===s.y&&E.width===s.width&&E.height===s.height))return!1;if(++a>=this._stableRafCount)return!0}return s=E,i};let f,d;const p=new Promise((y,b)=>{f=y,d=b}),m=()=>{try{const y=u();y!==i?f(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),p}_createAriaRefEngine(){return{queryAll:(i,s)=>{var o,u;const a=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(s);return a&&a.isConnected?[a]:[]}}}elementState(e,i){const s=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!s||!s.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const a=Ei(s);return{matches:i==="visible"?a:!a,received:a?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const a=nc(s);return{matches:i==="disabled"?a:!a,received:a?"disabled":"enabled"}}if(i==="editable"){const a=nc(s),o=kT(s);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!a&&!o,received:a?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const a=i==="checked",o=NT(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=s.nodeName==="INPUT"&&s.type==="radio";return{matches:a===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const a=AT(s);if(a==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:a==="mixed",received:a===!0?"checked":a===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${i}"`)}selectOptions(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const a=s,o=[...a.options],u=[];let f=i.slice();for(let d=0;d<o.length;d++){const p=o[d],m=y=>{if(y instanceof Node)return p===y;let b=!0;return y.valueOrLabel!==void 0&&(b=b&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(b=b&&y.value===p.value),y.label!==void 0&&(b=b&&y.label===p.label),y.index!==void 0&&(b=b&&y.index===d),b};if(f.some(m)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(u.push(p),a.multiple)f=f.filter(y=>!m(y));else{f=[];break}}}return f.length?"error:optionsnotfound":(a.value=void 0,u.forEach(d=>d.selected=!0),a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})),u.map(d=>d.value))}fill(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const a=s,o=a.type.toLowerCase(),u=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!u.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(i=i.trim(),isNaN(Number(i))))throw this.createStacklessError("Cannot type text into input[type=number]");if(u.has(o)){if(i=i.trim(),a.focus(),a.value=i,a.value!==i)throw this.createStacklessError("Malformed value");return s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(s.nodeName.toLowerCase()!=="textarea"){if(!s.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(s),"needsinput"}selectText(e){const i=this.retarget(e,"follow-label");if(!i)return"error:notconnected";if(i.nodeName.toLowerCase()==="input"){const o=i;return o.select(),o.focus(),"done"}if(i.nodeName.toLowerCase()==="textarea"){const o=i;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}const s=i.ownerDocument.createRange();s.selectNodeContents(i);const a=i.ownerDocument.defaultView.getSelection();return a&&(a.removeAllRanges(),a.addRange(s)),i.focus(),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,s=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:s}}focusNode(e,i){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:a}=this._activelyFocused(e);if(e.isContentEditable&&!a&&s&&s.blur&&s.blur(),e.focus(),e.focus(),i&&!a&&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,i){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const s=e;if(s.nodeName!=="INPUT")return"Not an <input> element";const a=s;if((a.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.map(d=>{const p=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),f=new DataTransfer;for(const d of u)f.items.add(d);a.files=f.files,a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const s=[];let a=i;for(;a;){const m=yb(a);if(!m||(s.push(m),m.nodeType===9))break;a=m.host}let o;for(let m=s.length-1;m>=0;m--){const y=s[m],b=y.elementsFromPoint(e.x,e.y),v=y.elementFromPoint(e.x,e.y);if(v&&b[0]&&gt(v)===b[0]){const x=this.window.getComputedStyle(v);(x==null?void 0:x.display)==="contents"&&b.unshift(v)}b[0]&&b[0].shadowRoot===y&&b[1]===v&&b.shift();const E=b[0];if(!E||(o=E,m&&E!==s[m-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=o.assignedSlot??gt(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,p=i;for(;p;){const m=u.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(u[m-1]));break}p=gt(p)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,s,a){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(s){const m=this.expectHitTarget(s,o);if(m!=="done")return m.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];let f;const d=m=>{if(!u.has(m.type)||!m.isTrusted)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;f===void 0&&y&&(f=this.expectHitTarget({x:y.clientX,y:y.clientY},o)),(a||f!=="done"&&f!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,i,s){var u,f,d;let a;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(i)){case"mouse":a=new MouseEvent(i,o);break;case"keyboard":a=new KeyboardEvent(i,o);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var E,x;if(y instanceof Touch)return y;let b=y.pageX;b===void 0&&y.clientX!==void 0&&(b=y.clientX+(((E=this.document.scrollingElement)==null?void 0:E.scrollLeft)||0));let v=y.pageY;return v===void 0&&y.clientY!==void 0&&(v=y.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,b,v,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));o.target??(o.target=e),o.touches=m(o.touches),o.targetTouches=m(o.targetTouches),o.changedTouches=m(o.changedTouches),a=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.changedTouches=(d=o.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),a=new TouchEvent(i,o);break}case"pointer":a=new PointerEvent(i,o);break;case"focus":a=new FocusEvent(i,o);break;case"drag":a=new DragEvent(i,o);break;case"wheel":a=new WheelEvent(i,o);break;case"deviceorientation":try{a=new DeviceOrientationEvent(i,o)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:b,gamma:v,absolute:E}=o;a=this.document.createEvent("DeviceOrientationEvent"),a.initDeviceOrientationEvent(i,p,m,y,b,v,E)}break;case"devicemotion":try{a=new DeviceMotionEvent(i,o)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:b,rotationRate:v,interval:E}=o;a=this.document.createEvent("DeviceMotionEvent"),a.initDeviceMotionEvent(i,p,m,y,b,v,E)}break;default:a=new Event(i,o);break}e.dispatchEvent(a)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Ao(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Ao(`<${e.nodeName.toLowerCase()} />`);const i=e,s=[];for(let d=0;d<i.attributes.length;d++){const{name:p,value:m}=i.attributes[d];p!=="style"&&(!m&&this._booleanAttributes.has(p)?s.push(` ${p}`):s.push(` ${p}="${m}"`))}s.sort((d,p)=>d.length-p.length);const a=jy(s.join(""),500);if(this._autoClosingTags.has(i.nodeName))return Ao(`<${i.nodeName.toLowerCase()}${a}/>`);const o=i.childNodes;let u=!1;if(o.length<=5){u=!0;for(let d=0;d<o.length;d++)u=u&&o[d].nodeType===Node.TEXT_NODE}const f=u?i.textContent||"":o.length?"…":"";return Ao(`<${i.nodeName.toLowerCase()}${a}>${jy(f,50)}</${i.nodeName.toLowerCase()}>`)}strictModeViolationError(e,i){this._evaluator.begin(),hc(),Fh();try{const s=this._isUtilityWorld&&this._browserName==="firefox"?2:10,a=i.slice(0,s).map(u=>({preview:this.previewNode(u),selector:this.generateSelectorSimple(u)})),o=a.map((u,f)=>`
122
122
  ${f+1}) ${u.preview} aka ${ls(this._sdkLanguage,u.selector)}`);return a.length<i.length&&o.push(`
123
123
  ...`),this.createStacklessError(`strict mode violation: ${ls(this._sdkLanguage,Xn(e))} resolved to ${i.length} elements:${o.join("")}
124
- `)}finally{Qh(),dc(),this._evaluator.end()}}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const i=new Error(e);return delete i.stack,i}createHighlight(){return new ih(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new ih(this),this._highlight.install();const s=[];for(const a of e)s.push(this.querySelectorAll(a,this.document.documentElement));this._highlight.maskElements(s.flat(),i)}highlight(e){this._highlight||(this._highlight=new ih(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,i){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==i&&(this._markedElements=void 0);const s=((f=this._markedElements)==null?void 0:f.elements)||new Set,a=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of s)e.has(d)||d.dispatchEvent(a);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of e)s.has(d)||d.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const s=()=>i=!0;this.window.addEventListener(e,s),new MutationObserver(a=>{if(a.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(i=!1,this.window.dispatchEvent(new CustomEvent(e)),!i)){this.window.addEventListener(e,s);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var a;return(a=this._hitTargetInterceptor)==null?void 0:a.call(this,s)},i=()=>{for(const s of this._allHitTargetInterceptorEvents)this.window.addEventListener(s,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,s){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(s,i);if(!e){if(!i.isNot&&i.expression==="to.be.hidden")return{matches:!0};if(i.isNot&&i.expression==="to.be.visible")return{matches:!1};if(!i.isNot&&i.expression==="to.be.detached")return{matches:!0};if(i.isNot&&i.expression==="to.be.attached")return{matches:!1};if(i.isNot&&i.expression==="to.be.in.viewport")return{matches:!1};if(i.expression==="to.have.title"&&((o=i==null?void 0:i.expectedText)!=null&&o[0])){const f=new sr(i.expectedText[0]),d=this.document.title;return{received:d,matches:f.matches(d)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new sr(i.expectedText[0]),d=this.document.location.href;return{received:d,matches:f.matches(d)}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var a;const s=i.expression;{let o;if(s==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:u,indeterminate:f}=i.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,u===!1?"unchecked":"checked")}else if(s==="to.be.disabled")o=this.elementState(e,"disabled");else if(s==="to.be.editable")o=this.elementState(e,"editable");else if(s==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;o={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(a=e.textContent)==null?void 0:a.trim();o={matches:!u,received:u?"notEmpty":"empty"}}else if(s==="to.be.enabled")o=this.elementState(e,"enabled");else if(s==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else s==="to.be.hidden"?o=this.elementState(e,"hidden"):s==="to.be.visible"?o=this.elementState(e,"visible"):s==="to.be.attached"?o={matches:!0,received:"attached"}:s==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(s==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let p=0;p<u.length-1;p++){if(typeof o!="object"||!(u[p]in o))return{received:void 0,matches:!1};o=o[u[p]]}const f=o[u[u.length-1]],d=Ch(f,i.expectedValue);return{received:f,matches:d}}if(s==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(i.expectedNumber??0)-1e-9}}if(s==="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");const o=[...e.selectedOptions].map(u=>u.value);return o.length!==i.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((u,f)=>new sr(i.expectedText[f]).matches(u)).every(Boolean)}}if(s==="to.match.aria"){const o=qT(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(s==="to.have.attribute.value"){const u=e.getAttribute(i.expressionArg);if(u===null)return{received:null,matches:!1};o=u}else if(["to.have.class","to.contain.class"].includes(s)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);return{received:e.classList.toString(),matches:new sr(i.expectedText[0]).matchesClassList(this,e.classList,s==="to.contain.class")}}else if(s==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(i.expressionArg);else if(s==="to.have.id")o=e.id;else if(s==="to.have.text")o=i.useInnerText?e.innerText:jt(new Map,e).full;else if(s==="to.have.accessible.name")o=el(e,!1);else if(s==="to.have.accessible.description")o=Fy(e,!1);else if(s==="to.have.accessible.error.message")o=xT(e);else if(s==="to.have.role")o=ut(e)||"";else if(s==="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");o=e.value}if(o!==void 0&&i.expectedText){const u=new sr(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,i){const s=i.expression;if(s==="to.have.count"){const d=e.length,p=d===i.expectedNumber;return{received:d,matches:p}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);if(["to.have.class.array","to.contain.class.array"].includes(s)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==i.expectedText.length)return{received:p,matches:!1};const m=this._matchSequentially(i.expectedText,d,(y,b)=>y.matchesClassList(this,b,s==="to.contain.class.array"));return{received:p,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(s))throw this.createStacklessError("Unknown expect matcher: "+s);const a=e.map(d=>i.useInnerText?d.innerText:jt(new Map,d).full),o=s!=="to.contain.text.array";if(!(a.length===i.expectedText.length||!o))return{received:a,matches:!1};const f=this._matchSequentially(i.expectedText,a,(d,p)=>d.matches(p));return{received:a,matches:f}}_matchSequentially(e,i,s){const a=e.map(f=>new sr(f));let o=0,u=0;for(;o<a.length&&u<i.length;)s(a[o],i[u])&&++o,++u;return o===a.length}}function Eo(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function sA(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let i=0;for(;i<n.length;)n[i]==="\\"&&i+1<n.length&&i++,e.push(n[i++]);return e.join("")}function Ao(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const a=n.lastIndexOf("/"),o=new RegExp(n.substring(1,a),n.substring(a+1));return{matcher:u=>o.test(u.full),kind:"regex"}}const i=e?JSON.parse.bind(JSON):sA;let s=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),s=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),s=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),s=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),s=!0),n=Tt(n),s?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>Tt(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:a=>a.normalized.toLowerCase().includes(n)})}class sr{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){const i=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&i.delete("i"),e.ignoreCase===!0&&i.add("i"),this._regex=new RegExp(e.regexSource,[...i].join(""))}}matches(e){return this._regex||(e=this.normalize(e)),this._string!==void 0?e===this._string:this._substring!==void 0?e.includes(this._substring):this._regex?!!this._regex.test(e):!1}matchesClassList(e,i,s){if(s){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(a=>i.contains(a))}return this.matches(i.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Tt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Ch(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(let s=0;s<n.length;++s)if(!Ch(n[s],e[s]))return!1;return!0}if(n instanceof RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();const i=Object.keys(n);if(i.length!==Object.keys(e).length)return!1;for(let s=0;s<i.length;++s)if(!e.hasOwnProperty(i[s]))return!1;for(const s of i)if(!Ch(n[s],e[s]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const rA={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"}}]}]}]},rn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class l0{}class lh{constructor(e,i){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=i}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var i;ze(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){ze(e)}onPointerUp(e){ze(e)}onMouseDown(e){ze(e)}onMouseUp(e){ze(e)}onMouseMove(e){var a;ze(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let s=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});s={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?rn.assert:rn.single}}((a=this._hoveredModel)==null?void 0:a.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){ze(e)}onMouseLeave(e){ze(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){ze(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){ze(e)}onScroll(e){this._reset(!1)}_commit(e,i){var s;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class aA{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._observer=null,this._recorder=e,this._performingActions=new Set,this._dialog=new fv(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(i=>{if(this._hoveredElement)for(const s of i)for(const a of s.removedNodes)(a===this._hoveredElement||a.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;(e=this._observer)==null||e.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._dialog.close()}onClick(e){if(this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&ze(e);return}if(Qa(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const i=Fa(this._recorder.deepEventTarget(e));if(i&&e.detail===1){this._performAction({name:i.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Pa(e),signals:[],button:kh(e),modifiers:gr(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||Qa(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Pa(e),signals:[],button:kh(e),modifiers:gr(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){ze(e);return}this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._showActionListDialog(this._hoveredModel,e)}onPointerDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onPointerUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||(this._consumeWhenAboutToPerform(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseMove(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);this._hoveredElement!==i&&(this._hoveredElement=i,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const i=this._recorder.injectedScript.window;i.top!==i&&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;const i=this._recorder.deepEventTarget(e);if(i.nodeName==="INPUT"&&i.type.toLowerCase()==="file"){this._recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...i.files||[]].map(s=>s.name)});return}if(Qa(i)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:i.isContentEditable?i.innerText:i.value})}if(i.nodeName==="SELECT"){const s=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...s.selectedOptions].map(a=>a.value),signals:[]})}}onKeyDown(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const i=Fa(this._recorder.deepEventTarget(e));if(i&&e.detail===0){this._performAction({name:i.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:gr(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){ze(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){ze(i);const s=Pa(i),a=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:s,signals:[]})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const p of a){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=p.title,m.setAttribute("aria-label",p.title),m.addEventListener("click",()=>{this._dialog.close(),p.cb()}),o.appendChild(m)}const u=this._dialog.show({label:"Choose action",body:o,autosize:!0}),f=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(f,u);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const i=uA(this._recorder.document);if(e&&i===this._recorder.document.body)return;const s=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=s&&s.selector?{...s,color:rn.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_actionInProgress(e){const i=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const a of this._performingActions)if(i&&a.name==="press"&&e.key===a.key||s&&(a.name==="click"||a.name==="hover"||a.name==="check"||a.name==="uncheck"))return!0;return ze(e),!1}_consumedDueToNoModel(e,i){return i?!1:(ze(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(ze(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||ze(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const i=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&i.then(()=>{console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))})}_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;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!!Fa(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}const{selector:e,elements:i}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:i,color:rn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class lA{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(Qa(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const s=Fa(i),{ariaSnapshot:a,selector:o,ref:u}=this._ariaSnapshot(i);if(s&&e.detail===1){this._recorder.recordAction({name:s.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:a});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:a,position:Pa(e),signals:[],button:kh(e),modifiers:gr(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:a,ref:o,ariaSnapshot:s,position:Pa(e),signals:[],button:"right",modifiers:gr(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);if(Qa(i)){this._recorder.recordAction({name:"fill",selector:a,ref:o,ariaSnapshot:s,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:a,ariaSnapshot:s,signals:[],text:i.isContentEditable?i.innerText:i.value});return}if(i.nodeName==="SELECT"){const u=i;this._recorder.recordAction({name:"select",selector:a,ref:o,ariaSnapshot:s,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=Fa(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:a,ref:o,ariaSnapshot:s,signals:[]});return}}this._recorder.recordAction({name:"press",selector:a,ref:o,ariaSnapshot:s,signals:[],key:e.key,modifiers:gr(e)})}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_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;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:i,refs:s}=this._recorder.injectedScript.ariaSnapshotForRecorder(),a=e?s.get(e):void 0,o=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:i,selector:o==null?void 0:o.selector,ref:a}}}class oh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new fv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){ze(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const i=this._recorder.deepEventTarget(e);this._elementHasValue(i)&&e.preventDefault()}onPointerUp(e){var s;const i=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((s=this._hoverHighlight)==null?void 0:s.elements[0])!==i){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,i).full?{elements:[i],selector:"",color:rn.assert}:null;else if(this._elementHasValue(i)){const a=this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:rn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),ze(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(){var i;this._textCache.clear();const e=(i=this._hoverHighlight)==null?void 0:i.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:s}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:s,signals:[],checked:!e.checked}:{name:"assertValue",selector:s,signals:[],value:e.value}}else if(this._kind==="snapshot"){const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:rn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:rn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertText",selector:this._hoverHighlight.selector,signals:[],text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0}}}_renderValue(e){return(e==null?void 0:e.name)==="assertText"?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):(e==null?void 0:e.name)==="assertChecked"?String(e.checked):(e==null?void 0:e.name)==="assertValue"?e.value:(e==null?void 0:e.name)==="assertSnapshot"?e.ariaSnapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,i,s,a;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((i=this._action)==null?void 0:i.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const i=this._recorder.document.createElement("textarea");i.setAttribute("spellcheck","false"),i.value=this._renderValue(e),i.classList.add("text-editor");const s=()=>{var y;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=f;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=f&&p.includes(f);i.classList.toggle("does-not-match",!m)};i.addEventListener("input",s);const o=this._dialog.show({label:"Assert that element contains text",body:i,onCommit:()=>this._commit()}),u=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(u.anchorTop,u.anchorLeft),i.focus()}_commitAssertValue(){var i;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(i=this._recorder.overlay)==null||i.flashToolSucceeded("assertingValue"))}}class oA{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const i=this._recorder.document;this._overlayElement=i.createElement("x-pw-overlay");const s=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.createElement("x-div")),s.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")),s.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")),s.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")),s.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")),s.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")),s.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")),s.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){hv(this._listeners),this._listeners=[De(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),De(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")}),De(this._pickLocatorToggle,"click",()=>{if(this._pickLocatorToggle.classList.contains("disabled"))return;const e={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.setMode(e[this._recorder.state.mode])}),De(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),De(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),De(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),De(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){const i=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting";this._recordToggle.classList.toggle("toggled",i),this._recordToggle.title=i?"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 i;e==="assertingVisibility"?i=this._assertVisibilityToggle:e==="assertingSnapshot"?i=this._assertSnapshotToggle:i=this._assertValuesToggle,i.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>i.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;const i=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-i,Math.min(i,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),ze(e),!0}return!1}onMouseUp(e){return this._dragState?(ze(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,ze(e),!0):!1}onDblClick(e){return!1}}class cA{constructor(e,i){var s,a;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",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 l0,standby:new l0,inspecting:new lh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new lA(this):new aA(this),"recording-inspecting":new lh(this,!1),assertingText:new oh(this,"text"),assertingVisibility:new lh(this,!0),assertingValue:new oh(this,"value"),assertingSnapshot:new oh(this,"snapshot")},this._currentTool=this._tools.none,(a=(s=this._currentTool).install)==null||a.call(s),e.window.top===e.window&&(this.overlay=new oA(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
124
+ `)}finally{Qh(),dc(),this._evaluator.end()}}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const i=new Error(e);return delete i.stack,i}createHighlight(){return new ih(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new ih(this),this._highlight.install();const s=[];for(const a of e)s.push(this.querySelectorAll(a,this.document.documentElement));this._highlight.maskElements(s.flat(),i)}highlight(e){this._highlight||(this._highlight=new ih(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,i){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==i&&(this._markedElements=void 0);const s=((f=this._markedElements)==null?void 0:f.elements)||new Set,a=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of s)e.has(d)||d.dispatchEvent(a);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of e)s.has(d)||d.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const s=()=>i=!0;this.window.addEventListener(e,s),new MutationObserver(a=>{if(a.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(i=!1,this.window.dispatchEvent(new CustomEvent(e)),!i)){this.window.addEventListener(e,s);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var a;return(a=this._hitTargetInterceptor)==null?void 0:a.call(this,s)},i=()=>{for(const s of this._allHitTargetInterceptorEvents)this.window.addEventListener(s,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,s){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(s,i);if(!e){if(!i.isNot&&i.expression==="to.be.hidden")return{matches:!0};if(i.isNot&&i.expression==="to.be.visible")return{matches:!1};if(!i.isNot&&i.expression==="to.be.detached")return{matches:!0};if(i.isNot&&i.expression==="to.be.attached")return{matches:!1};if(i.isNot&&i.expression==="to.be.in.viewport")return{matches:!1};if(i.expression==="to.have.title"&&((o=i==null?void 0:i.expectedText)!=null&&o[0])){const f=new sr(i.expectedText[0]),d=this.document.title;return{received:d,matches:f.matches(d)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new sr(i.expectedText[0]),d=this.document.location.href;return{received:d,matches:f.matches(d)}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var a;const s=i.expression;{let o;if(s==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:u,indeterminate:f}=i.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,u===!1?"unchecked":"checked")}else if(s==="to.be.disabled")o=this.elementState(e,"disabled");else if(s==="to.be.editable")o=this.elementState(e,"editable");else if(s==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;o={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(a=e.textContent)==null?void 0:a.trim();o={matches:!u,received:u?"notEmpty":"empty"}}else if(s==="to.be.enabled")o=this.elementState(e,"enabled");else if(s==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else s==="to.be.hidden"?o=this.elementState(e,"hidden"):s==="to.be.visible"?o=this.elementState(e,"visible"):s==="to.be.attached"?o={matches:!0,received:"attached"}:s==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(s==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let p=0;p<u.length-1;p++){if(typeof o!="object"||!(u[p]in o))return{received:void 0,matches:!1};o=o[u[p]]}const f=o[u[u.length-1]],d=Ch(f,i.expectedValue);return{received:f,matches:d}}if(s==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(i.expectedNumber??0)-1e-9}}if(s==="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");const o=[...e.selectedOptions].map(u=>u.value);return o.length!==i.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((u,f)=>new sr(i.expectedText[f]).matches(u)).every(Boolean)}}if(s==="to.match.aria"){const o=IT(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(s==="to.have.attribute.value"){const u=e.getAttribute(i.expressionArg);if(u===null)return{received:null,matches:!1};o=u}else if(["to.have.class","to.contain.class"].includes(s)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);return{received:e.classList.toString(),matches:new sr(i.expectedText[0]).matchesClassList(this,e.classList,s==="to.contain.class")}}else if(s==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(i.expressionArg);else if(s==="to.have.id")o=e.id;else if(s==="to.have.text")o=i.useInnerText?e.innerText:jt(new Map,e).full;else if(s==="to.have.accessible.name")o=tl(e,!1);else if(s==="to.have.accessible.description")o=Fy(e,!1);else if(s==="to.have.accessible.error.message")o=TT(e);else if(s==="to.have.role")o=ut(e)||"";else if(s==="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");o=e.value}if(o!==void 0&&i.expectedText){const u=new sr(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,i){const s=i.expression;if(s==="to.have.count"){const d=e.length,p=d===i.expectedNumber;return{received:d,matches:p}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);if(["to.have.class.array","to.contain.class.array"].includes(s)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==i.expectedText.length)return{received:p,matches:!1};const m=this._matchSequentially(i.expectedText,d,(y,b)=>y.matchesClassList(this,b,s==="to.contain.class.array"));return{received:p,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(s))throw this.createStacklessError("Unknown expect matcher: "+s);const a=e.map(d=>i.useInnerText?d.innerText:jt(new Map,d).full),o=s!=="to.contain.text.array";if(!(a.length===i.expectedText.length||!o))return{received:a,matches:!1};const f=this._matchSequentially(i.expectedText,a,(d,p)=>d.matches(p));return{received:a,matches:f}}_matchSequentially(e,i,s){const a=e.map(f=>new sr(f));let o=0,u=0;for(;o<a.length&&u<i.length;)s(a[o],i[u])&&++o,++u;return o===a.length}}function Ao(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function aA(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let i=0;for(;i<n.length;)n[i]==="\\"&&i+1<n.length&&i++,e.push(n[i++]);return e.join("")}function No(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const a=n.lastIndexOf("/"),o=new RegExp(n.substring(1,a),n.substring(a+1));return{matcher:u=>o.test(u.full),kind:"regex"}}const i=e?JSON.parse.bind(JSON):aA;let s=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),s=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),s=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),s=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),s=!0),n=Tt(n),s?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>Tt(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:a=>a.normalized.toLowerCase().includes(n)})}class sr{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){const i=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&i.delete("i"),e.ignoreCase===!0&&i.add("i"),this._regex=new RegExp(e.regexSource,[...i].join(""))}}matches(e){return this._regex||(e=this.normalize(e)),this._string!==void 0?e===this._string:this._substring!==void 0?e.includes(this._substring):this._regex?!!this._regex.test(e):!1}matchesClassList(e,i,s){if(s){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(a=>i.contains(a))}return this.matches(i.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Tt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Ch(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(let s=0;s<n.length;++s)if(!Ch(n[s],e[s]))return!1;return!0}if(n instanceof RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();const i=Object.keys(n);if(i.length!==Object.keys(e).length)return!1;for(let s=0;s<i.length;++s)if(!e.hasOwnProperty(i[s]))return!1;for(const s of i)if(!Ch(n[s],e[s]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const lA={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"}}]}]}]},rn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class l0{}class lh{constructor(e,i){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=i}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var i;ze(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){ze(e)}onPointerUp(e){ze(e)}onMouseDown(e){ze(e)}onMouseUp(e){ze(e)}onMouseMove(e){var a;ze(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let s=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});s={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?rn.assert:rn.single}}((a=this._hoveredModel)==null?void 0:a.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){ze(e)}onMouseLeave(e){ze(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){ze(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){ze(e)}onScroll(e){this._reset(!1)}_commit(e,i){var s;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class oA{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._observer=null,this._recorder=e,this._performingActions=new Set,this._dialog=new dv(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(i=>{if(this._hoveredElement)for(const s of i)for(const a of s.removedNodes)(a===this._hoveredElement||a.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;(e=this._observer)==null||e.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._dialog.close()}onClick(e){if(this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&ze(e);return}if(Za(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const i=Qa(this._recorder.deepEventTarget(e));if(i&&e.detail===1){this._performAction({name:i.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Fa(e),signals:[],button:kh(e),modifiers:gr(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||Za(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Fa(e),signals:[],button:kh(e),modifiers:gr(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){ze(e);return}this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._showActionListDialog(this._hoveredModel,e)}onPointerDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onPointerUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||(this._consumeWhenAboutToPerform(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseMove(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);this._hoveredElement!==i&&(this._hoveredElement=i,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const i=this._recorder.injectedScript.window;i.top!==i&&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;const i=this._recorder.deepEventTarget(e);if(i.nodeName==="INPUT"&&i.type.toLowerCase()==="file"){this._recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...i.files||[]].map(s=>s.name)});return}if(Za(i)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:i.isContentEditable?i.innerText:i.value})}if(i.nodeName==="SELECT"){const s=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...s.selectedOptions].map(a=>a.value),signals:[]})}}onKeyDown(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const i=Qa(this._recorder.deepEventTarget(e));if(i&&e.detail===0){this._performAction({name:i.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:gr(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){ze(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){ze(i);const s=Fa(i),a=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:s,signals:[]})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const p of a){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=p.title,m.setAttribute("aria-label",p.title),m.addEventListener("click",()=>{this._dialog.close(),p.cb()}),o.appendChild(m)}const u=this._dialog.show({label:"Choose action",body:o,autosize:!0}),f=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(f,u);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const i=hA(this._recorder.document);if(e&&i===this._recorder.document.body)return;const s=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=s&&s.selector?{...s,color:rn.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_actionInProgress(e){const i=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const a of this._performingActions)if(i&&a.name==="press"&&e.key===a.key||s&&(a.name==="click"||a.name==="hover"||a.name==="check"||a.name==="uncheck"))return!0;return ze(e),!1}_consumedDueToNoModel(e,i){return i?!1:(ze(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(ze(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||ze(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const i=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&i.then(()=>{console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))})}_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;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!!Qa(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}const{selector:e,elements:i}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:i,color:rn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class cA{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(Za(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const s=Qa(i),{ariaSnapshot:a,selector:o,ref:u}=this._ariaSnapshot(i);if(s&&e.detail===1){this._recorder.recordAction({name:s.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:a});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:a,position:Fa(e),signals:[],button:kh(e),modifiers:gr(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:a,ref:o,ariaSnapshot:s,position:Fa(e),signals:[],button:"right",modifiers:gr(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);if(Za(i)){this._recorder.recordAction({name:"fill",selector:a,ref:o,ariaSnapshot:s,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:a,ariaSnapshot:s,signals:[],text:i.isContentEditable?i.innerText:i.value});return}if(i.nodeName==="SELECT"){const u=i;this._recorder.recordAction({name:"select",selector:a,ref:o,ariaSnapshot:s,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=Qa(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:a,ref:o,ariaSnapshot:s,signals:[]});return}}this._recorder.recordAction({name:"press",selector:a,ref:o,ariaSnapshot:s,signals:[],key:e.key,modifiers:gr(e)})}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_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;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:i,refs:s}=this._recorder.injectedScript.ariaSnapshotForRecorder(),a=e?s.get(e):void 0,o=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:i,selector:o==null?void 0:o.selector,ref:a}}}class oh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new dv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){ze(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const i=this._recorder.deepEventTarget(e);this._elementHasValue(i)&&e.preventDefault()}onPointerUp(e){var s;const i=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((s=this._hoverHighlight)==null?void 0:s.elements[0])!==i){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,i).full?{elements:[i],selector:"",color:rn.assert}:null;else if(this._elementHasValue(i)){const a=this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:rn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),ze(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(){var i;this._textCache.clear();const e=(i=this._hoverHighlight)==null?void 0:i.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:s}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:s,signals:[],checked:!e.checked}:{name:"assertValue",selector:s,signals:[],value:e.value}}else if(this._kind==="snapshot"){const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:rn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:rn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertText",selector:this._hoverHighlight.selector,signals:[],text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0}}}_renderValue(e){return(e==null?void 0:e.name)==="assertText"?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):(e==null?void 0:e.name)==="assertChecked"?String(e.checked):(e==null?void 0:e.name)==="assertValue"?e.value:(e==null?void 0:e.name)==="assertSnapshot"?e.ariaSnapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,i,s,a;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((i=this._action)==null?void 0:i.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const i=this._recorder.document.createElement("textarea");i.setAttribute("spellcheck","false"),i.value=this._renderValue(e),i.classList.add("text-editor");const s=()=>{var y;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=f;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=f&&p.includes(f);i.classList.toggle("does-not-match",!m)};i.addEventListener("input",s);const o=this._dialog.show({label:"Assert that element contains text",body:i,onCommit:()=>this._commit()}),u=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(u.anchorTop,u.anchorLeft),i.focus()}_commitAssertValue(){var i;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(i=this._recorder.overlay)==null||i.flashToolSucceeded("assertingValue"))}}class uA{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const i=this._recorder.document;this._overlayElement=i.createElement("x-pw-overlay");const s=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.createElement("x-div")),s.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")),s.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")),s.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")),s.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")),s.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")),s.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")),s.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){pv(this._listeners),this._listeners=[De(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),De(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")}),De(this._pickLocatorToggle,"click",()=>{if(this._pickLocatorToggle.classList.contains("disabled"))return;const e={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.setMode(e[this._recorder.state.mode])}),De(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),De(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),De(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),De(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){const i=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting";this._recordToggle.classList.toggle("toggled",i),this._recordToggle.title=i?"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 i;e==="assertingVisibility"?i=this._assertVisibilityToggle:e==="assertingSnapshot"?i=this._assertSnapshotToggle:i=this._assertValuesToggle,i.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>i.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;const i=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-i,Math.min(i,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),ze(e),!0}return!1}onMouseUp(e){return this._dragState?(ze(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,ze(e),!0):!1}onDblClick(e){return!1}}class fA{constructor(e,i){var s,a;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",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 l0,standby:new l0,inspecting:new lh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new cA(this):new oA(this),"recording-inspecting":new lh(this,!1),assertingText:new oh(this,"text"),assertingVisibility:new lh(this,!0),assertingValue:new oh(this,"value"),assertingSnapshot:new oh(this,"snapshot")},this._currentTool=this._tools.none,(a=(s=this._currentTool).install)==null||a.call(s),e.window.top===e.window&&(this.overlay=new uA(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
125
125
  body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
126
126
  body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
127
- `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var s,a,o;hv(this._listeners),this._listeners=[De(this.document,"click",u=>this._onClick(u),!0),De(this.document,"auxclick",u=>this._onClick(u),!0),De(this.document,"dblclick",u=>this._onDblClick(u),!0),De(this.document,"contextmenu",u=>this._onContextMenu(u),!0),De(this.document,"dragstart",u=>this._onDragStart(u),!0),De(this.document,"input",u=>this._onInput(u),!0),De(this.document,"keydown",u=>this._onKeyDown(u),!0),De(this.document,"keyup",u=>this._onKeyUp(u),!0),De(this.document,"pointerdown",u=>this._onPointerDown(u),!0),De(this.document,"pointerup",u=>this._onPointerUp(u),!0),De(this.document,"mousedown",u=>this._onMouseDown(u),!0),De(this.document,"mouseup",u=>this._onMouseUp(u),!0),De(this.document,"mousemove",u=>this._onMouseMove(u),!0),De(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),De(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),De(this.document,"focus",u=>this._onFocus(u),!0),De(this.document,"scroll",u=>this._onScroll(u),!0)],this.highlight.install();let e;const i=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(i,500)};e=this.injectedScript.utils.builtins.setTimeout(i,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(dv(this.document,rA)),(s=this.overlay)==null||s.install(),(o=(a=this._currentTool)==null?void 0:a.install)==null||o.call(a),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var s,a,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(a=(s=this._currentTool).uninstall)==null||a.call(s),this.clearHighlight(),this._currentTool=e,(u=(o=this._currentTool).install)==null||u.call(o);const i=(f=e.cursor)==null?void 0:f.call(e);i&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",i))}setUIState(e,i){var o;this._delegate=i,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(),(o=this.overlay)==null||o.setUIState(e);let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?fA(this.injectedScript,e.language,e.actionSelector,this.document):null;s=u!=null&&u.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.length?e.actionSelector:void 0}const a=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==a){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?rn.multiple:rn.single;s=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=a}else this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}s==="clear"?this.highlight.clearHighlight():s!=="noop"&&this.highlight.updateHighlight(s)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onClick)==null||a.call(s,e))}_onDblClick(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onDblClick)==null||a.call(s,e))}_onContextMenu(e){var i,s;e.isTrusted&&((s=(i=this._currentTool).onContextMenu)==null||s.call(i,e))}_onDragStart(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onDragStart)==null||s.call(i,e))}_onPointerDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerDown)==null||s.call(i,e))}_onPointerUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerUp)==null||s.call(i,e))}_onMouseDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseDown)==null||s.call(i,e))}_onMouseUp(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseUp)==null||a.call(s,e))}_onMouseMove(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseMove)==null||a.call(s,e))}_onMouseEnter(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseEnter)==null||s.call(i,e))}_onMouseLeave(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseLeave)==null||s.call(i,e))}_onFocus(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onFocus)==null||s.call(i,e))}_onScroll(e){var i,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(i=this._currentTool).onScroll)==null||s.call(i,e))}_onInput(e){var i,s;this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onInput)==null||s.call(i,e)}_onKeyDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyDown)==null||s.call(i,e))}_onKeyUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyUp)==null||s.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var a,o;let s=e==null?void 0:e.tooltipText;s===void 0&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:s}))):this.highlight.clearHighlight(),i&&((o=(a=this._delegate).highlightUpdated)==null||o.call(a))}_ignoreOverlayEvent(e){return e.composedPath().some(i=>(i.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var i;for(const s of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(s)))return s;return e.composedPath()[0]}setMode(e){var i,s;(s=(i=this._delegate).setMode)==null||s.call(i,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var s,a;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!hA(e)&&this._lastActionAutoexpectSnapshot){const o=dA(i,this._lastActionAutoexpectSnapshot);e.preconditionSelector=o?this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((a=(s=this._delegate).performAction)==null?void 0:a.call(s,e).catch(()=>{}))}recordAction(e){var i,s;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(s=(i=this._delegate).recordAction)==null||s.call(i,e)}setOverlayState(e){var i,s;(s=(i=this._delegate).setOverlayState)==null||s.call(i,e)}elementPicked(e,i){var a,o;const s=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"expect"});(o=(a=this._delegate).elementPicked)==null||o.call(a,{selector:e,ariaSnapshot:s})}}let fv=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const i=this._recorder.document.createElement("x-pw-tool-item");i.title="Accept",i.classList.add("accept"),i.appendChild(this._recorder.document.createElement("x-div")),i.addEventListener("click",()=>{var f;return(f=e.onCommit)==null?void 0:f.call(e)});const s=this._recorder.document.createElement("x-pw-tool-item");s.title="Close",s.classList.add("cancel"),s.appendChild(this._recorder.document.createElement("x-div")),s.addEventListener("click",()=>{var f;this.close(),(f=e.onCancel)==null||f.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)};const a=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,a.appendChild(o),a.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&a.appendChild(i),a.appendChild(s),this._dialogElement.appendChild(a);const u=this._recorder.document.createElement("x-pw-dialog-body");return u.appendChild(e.body),this._dialogElement.appendChild(u),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,i){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=i+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function uA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function gr(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function kh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Pa(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function ze(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function Fa(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function Qa(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function De(n,e,i,s){return n.addEventListener(e,i,s),()=>{n.removeEventListener(e,i,s)}}function hv(n){for(const e of n)e();n.splice(0,n.length)}function fA(n,e,i,s){try{const a=n.parseSelector(i),o=n.querySelectorAll(a,s),u=o.length>1?rn.multiple:rn.single,f=n.utils.asLocator(e,i);return o.map((d,p)=>{const m=o.length>1?` [${p+1} of ${o.length}]`:"";return{element:d,color:u,tooltipText:f+m}})}catch{return[]}}function dv(n,{tagName:e,attrs:i,children:s}){const a=n.createElementNS("http://www.w3.org/2000/svg",e);if(i)for(const[o,u]of Object.entries(i))a.setAttribute(o,u);if(s)for(const o of s)a.appendChild(dv(n,o));return a}function hA(n){return n.name.startsWith("assert")}function dA(n,e){var u,f;function i(d,p,m){let y=1,b=m+y;for(const v of d.children||[])typeof v=="string"?(y++,b++):(y+=i(v,p,b),b+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let v=p.get(d.role);v||(v=new Map,p.set(d.role,v));const E=v.get(d.name),x=y*100-m;(!E||E.sizeAndPosition<x)&&v.set(d.name,{node:d,sizeAndPosition:x})}return y}const s=new Map;n&&i(n.root,s,0);const a=new Map;i(e.root,a,0);const o=[];for(const[d,p]of a)for(const[m,y]of p)((u=s.get(d))==null?void 0:u.get(m))||o.push(y);return o.sort((d,p)=>p.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node.element}function pA(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,u,f)=>`${u}(${f.toLowerCase()}`);const i=[];let s="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){s+=u;continue}const f=n[o-1]==="r"||n[o]==="/";++o;let d="";for(;o<n.length;){if(n[o]==="\\"){f?(n[o+1]!==u&&(d+=n[o]),++o,d+=n[o]):(++o,n[o]==="n"?d+=`
128
- `:n[o]==="r"?d+="\r":n[o]==="t"?d+=" ":d+=n[o]),++o;continue}if(n[o]!==u){d+=n[o++];continue}break}i.push({quote:u,text:d}),s+=(u==="/"?"r":"")+"$"+i.length}s=s.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const a=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:pv(s,i,e),preferredQuote:a}}function o0(n){return[...n.matchAll(/\$\d+/g)].length}function c0(n,e){return n.replace(/\$(\d+)/g,(i,s)=>`$${s-e}`)}function pv(n,e,i){for(;;){const a=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!a)break;const o=a.index+a[0].length;let u=0,f=o;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let d=n.substring(0,o),p=0;["sethas(","sethasnot("].includes(a[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=o0(n.substring(0,o)),y=c0(n.substring(o,f),m),b=o0(y),v=e.slice(m,m+b),E=JSON.stringify(pv(y,v,i));n=d.replace(/=$/,"2=")+`$${m+1}`+c0(n.substring(f+p),b-1);const x=e.slice(0,m),T=e.slice(m+b);e=x.concat([{quote:'"',text:E}]).concat(T)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(a,o,u)=>","+o.toLowerCase()+"="+u.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${i}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const s=n.split(".");for(let a=0;a<s.length-1;a++)if(s[a]==="internal:control=enter-frame"&&s[a+1].startsWith("nth=")){const[o]=s.splice(a,1);s.splice(a+1,0,o)}return s.map(a=>!a.startsWith("internal:")||a==="internal:control"?a.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(a=a.includes("[")?a.replace(/\]/,"")+"]":a,a=a.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:attr")||a.startsWith("internal:testid")||a.startsWith("internal:role")?xt(new RegExp(d.text),!1)+(f||""):Rt(new RegExp(d.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:has=")||a.startsWith("internal:has-not=")?d.text:a.startsWith("internal:testid")?xt(d.text,!0):a.startsWith("internal:attr")||a.startsWith("internal:role")?xt(d.text,f==="s"):Rt(d.text,f==="s")}),a)).join(" >> ")}function gA(n,e,i){try{return mA(n,e,i)}catch{return""}}function mA(n,e,i){try{return rl(e),e}catch{}const{selector:s,preferredQuote:a}=pA(e,i),o=W0(n,s,void 0,void 0,a),u=u0(n,e);return o.some(f=>u0(n,f)===u)?s:""}function u0(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const yA=({url:n})=>S.jsxs("div",{className:"browser-frame-header",children:[S.jsxs("div",{className:"browser-traffic-lights",children:[S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),S.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[S.jsx("span",{className:"browser-frame-address",children:n||"about:blank"}),n&&S.jsx(Vh,{value:n})]}),S.jsx("div",{style:{marginLeft:"auto"},children:S.jsxs("div",{children:[S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),pd=Symbol.for("yaml.alias"),Mh=Symbol.for("yaml.document"),Ai=Symbol.for("yaml.map"),gv=Symbol.for("yaml.pair"),Tn=Symbol.for("yaml.scalar"),Er=Symbol.for("yaml.seq"),ln=Symbol.for("yaml.node.type"),fs=n=>!!n&&typeof n=="object"&&n[ln]===pd,hs=n=>!!n&&typeof n=="object"&&n[ln]===Mh,Ar=n=>!!n&&typeof n=="object"&&n[ln]===Ai,Be=n=>!!n&&typeof n=="object"&&n[ln]===gv,Re=n=>!!n&&typeof n=="object"&&n[ln]===Tn,Nr=n=>!!n&&typeof n=="object"&&n[ln]===Er;function He(n){if(n&&typeof n=="object")switch(n[ln]){case Ai:case Er:return!0}return!1}function qe(n){if(n&&typeof n=="object")switch(n[ln]){case pd:case Ai:case Tn:case Er:return!0}return!1}const bA=n=>(Re(n)||He(n))&&!!n.anchor,Lt=Symbol("break visit"),mv=Symbol("skip children"),_n=Symbol("remove node");function Ni(n,e){const i=yv(e);hs(n)?fr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):fr(null,n,i,Object.freeze([]))}Ni.BREAK=Lt;Ni.SKIP=mv;Ni.REMOVE=_n;function fr(n,e,i,s){const a=bv(n,e,i,s);if(qe(a)||Be(a))return vv(n,s,a),fr(n,a,i,s);if(typeof a!="symbol"){if(He(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=fr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Lt)return Lt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=fr("key",e.key,i,s);if(o===Lt)return Lt;o===_n&&(e.key=null);const u=fr("value",e.value,i,s);if(u===Lt)return Lt;u===_n&&(e.value=null)}}return a}async function gc(n,e){const i=yv(e);hs(n)?await hr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):await hr(null,n,i,Object.freeze([]))}gc.BREAK=Lt;gc.SKIP=mv;gc.REMOVE=_n;async function hr(n,e,i,s){const a=await bv(n,e,i,s);if(qe(a)||Be(a))return vv(n,s,a),hr(n,a,i,s);if(typeof a!="symbol"){if(He(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=await hr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Lt)return Lt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=await hr("key",e.key,i,s);if(o===Lt)return Lt;o===_n&&(e.key=null);const u=await hr("value",e.value,i,s);if(u===Lt)return Lt;u===_n&&(e.value=null)}}return a}function yv(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function bv(n,e,i,s){var a,o,u,f,d;if(typeof i=="function")return i(n,e,s);if(Ar(e))return(a=i.Map)==null?void 0:a.call(i,n,e,s);if(Nr(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,s);if(Be(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,s);if(Re(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,s);if(fs(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,s)}function vv(n,e,i){const s=e[e.length-1];if(He(s))s.items[n]=i;else if(Be(s))n==="key"?s.key=i:s.value=i;else if(hs(s))s.contents=i;else{const a=fs(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const vA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},SA=n=>n.replace(/[!,[\]{}]/g,e=>vA[e]);class wt{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wt.defaultYaml,e),this.tags=Object.assign({},wt.defaultTags,i)}clone(){const e=new wt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new wt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wt.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:wt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wt.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),a=s.shift();switch(a){case"%TAG":{if(s.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,u]=s;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const u=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,u),!1}}default:return i(0,`Unknown directive ${a}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const u=e.slice(2,-1);return u==="!"||u==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),u)}const[,s,a]=e.match(/^(.*!)([^!]*)$/s);a||i(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(a)}catch(u){return i(String(u)),null}return s==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,s]of Object.entries(this.tags))if(e.startsWith(s))return i+SA(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let a;if(e&&s.length>0&&qe(e.contents)){const o={};Ni(e.contents,(u,f)=>{qe(f)&&f.tag&&(o[f.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,u]of s)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||a.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
129
- `)}}wt.defaultYaml={explicit:!1,version:"1.2"};wt.defaultTags={"!!":"tag:yaml.org,2002:"};function Sv(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(i)}return!0}function wv(n){const e=new Set;return Ni(n,{Value(i,s){s.anchor&&e.add(s.anchor)}}),e}function xv(n,e){for(let i=1;;++i){const s=`${n}${i}`;if(!e.has(s))return s}}function wA(n,e){const i=[],s=new Map;let a=null;return{onAnchor:o=>{i.push(o),a||(a=wv(n));const u=xv(e,a);return a.add(u),u},setAnchors:()=>{for(const o of i){const u=s.get(o);if(typeof u=="object"&&u.anchor&&(Re(u.node)||He(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:s}}function dr(n,e,i,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let a=0,o=s.length;a<o;++a){const u=s[a],f=dr(n,s,String(a),u);f===void 0?delete s[a]:f!==u&&(s[a]=f)}else if(s instanceof Map)for(const a of Array.from(s.keys())){const o=s.get(a),u=dr(n,s,a,o);u===void 0?s.delete(a):u!==o&&s.set(a,u)}else if(s instanceof Set)for(const a of Array.from(s)){const o=dr(n,s,a,a);o===void 0?s.delete(a):o!==a&&(s.delete(a),s.add(o))}else for(const[a,o]of Object.entries(s)){const u=dr(n,s,a,o);u===void 0?delete s[a]:u!==o&&(s[a]=u)}return n.call(e,i,s)}function an(n,e,i){if(Array.isArray(n))return n.map((s,a)=>an(s,String(a),i));if(n&&typeof n.toJSON=="function"){if(!i||!bA(n))return n.toJSON(e,i);const s={aliasCount:0,count:1,res:void 0};i.anchors.set(n,s),i.onCreate=o=>{s.res=o,delete i.onCreate};const a=n.toJSON(e,i);return i.onCreate&&i.onCreate(a),a}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class gd{constructor(e){Object.defineProperty(this,ln,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:s,onAnchor:a,reviver:o}={}){if(!hs(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=an(this,"",u);if(typeof a=="function")for(const{count:d,res:p}of u.anchors.values())a(p,d);return typeof o=="function"?dr(o,{"":f},"",f):f}}class mc extends gd{constructor(e){super(pd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return Ni(e,{Node:(s,a)=>{if(a===this)return Ni.BREAK;a.anchor===this.source&&(i=a)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:s,doc:a,maxAliasCount:o}=i,u=this.resolve(a);if(!u){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=s.get(u);if(f||(an(u,null,i),f=s.get(u)),!f||f.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=$o(a,u,s)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(e,i,s){const a=`*${this.source}`;if(e){if(Sv(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${a} `}return a}}function $o(n,e,i){if(fs(e)){const s=e.resolve(n),a=i&&s&&i.get(s);return a?a.count*a.aliasCount:0}else if(He(e)){let s=0;for(const a of e.items){const o=$o(n,a,i);o>s&&(s=o)}return s}else if(Be(e)){const s=$o(n,e.key,i),a=$o(n,e.value,i);return Math.max(s,a)}return 1}const _v=n=>!n||typeof n!="function"&&typeof n!="object";class he extends gd{constructor(e){super(Tn),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:an(this.value,e,i)}toString(){return String(this.value)}}he.BLOCK_FOLDED="BLOCK_FOLDED";he.BLOCK_LITERAL="BLOCK_LITERAL";he.PLAIN="PLAIN";he.QUOTE_DOUBLE="QUOTE_DOUBLE";he.QUOTE_SINGLE="QUOTE_SINGLE";const xA="tag:yaml.org,2002:";function _A(n,e,i){if(e){const s=i.filter(o=>o.tag===e),a=s.find(o=>!o.format)??s[0];if(!a)throw new Error(`Tag ${e} not found`);return a}return i.find(s=>{var a;return((a=s.identify)==null?void 0:a.call(s,n))&&!s.format})}function tl(n,e,i){var y,b,v;if(hs(n)&&(n=n.contents),qe(n))return n;if(Be(n)){const E=(b=(y=i.schema[Ai]).createNode)==null?void 0:b.call(y,i.schema,null,i);return E.items.push(n),E}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:a,onTagObj:o,schema:u,sourceObjects:f}=i;let d;if(s&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor||(d.anchor=a(n)),new mc(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=xA+e.slice(2));let p=_A(n,e,u.tags);if(!p){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new he(n);return d&&(d.node=E),E}p=n instanceof Map?u[Ai]:Symbol.iterator in Object(n)?u[Er]:u[Ai]}o&&(o(p),delete i.onTagObj);const m=p!=null&&p.createNode?p.createNode(i.schema,n,i):typeof((v=p==null?void 0:p.nodeClass)==null?void 0:v.from)=="function"?p.nodeClass.from(i.schema,n,i):new he(n);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function sc(n,e,i){let s=i;for(let a=e.length-1;a>=0;--a){const o=e[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const u=[];u[o]=s,s=u}else s=new Map([[o,s]])}return tl(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Va=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class Tv extends gd{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(s=>qe(s)||Be(s)?s.clone(e):s),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Va(e))this.add(i);else{const[s,...a]=e,o=this.get(s,!0);if(He(o))o.addIn(a,i);else if(o===void 0&&this.schema)this.set(s,sc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}deleteIn(e){const[i,...s]=e;if(s.length===0)return this.delete(i);const a=this.get(i,!0);if(He(a))return a.deleteIn(s);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}getIn(e,i){const[s,...a]=e,o=this.get(s,!0);return a.length===0?!i&&Re(o)?o.value:o:He(o)?o.getIn(a,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Be(i))return!1;const s=i.value;return s==null||e&&Re(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[i,...s]=e;if(s.length===0)return this.has(i);const a=this.get(i,!0);return He(a)?a.hasIn(s):!1}setIn(e,i){const[s,...a]=e;if(a.length===0)this.set(s,i);else{const o=this.get(s,!0);if(He(o))o.setIn(a,i);else if(o===void 0&&this.schema)this.set(s,sc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}}const TA=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function Pn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const is=(n,e,i)=>n.endsWith(`
127
+ `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var s,a,o;pv(this._listeners),this._listeners=[De(this.document,"click",u=>this._onClick(u),!0),De(this.document,"auxclick",u=>this._onClick(u),!0),De(this.document,"dblclick",u=>this._onDblClick(u),!0),De(this.document,"contextmenu",u=>this._onContextMenu(u),!0),De(this.document,"dragstart",u=>this._onDragStart(u),!0),De(this.document,"input",u=>this._onInput(u),!0),De(this.document,"keydown",u=>this._onKeyDown(u),!0),De(this.document,"keyup",u=>this._onKeyUp(u),!0),De(this.document,"pointerdown",u=>this._onPointerDown(u),!0),De(this.document,"pointerup",u=>this._onPointerUp(u),!0),De(this.document,"mousedown",u=>this._onMouseDown(u),!0),De(this.document,"mouseup",u=>this._onMouseUp(u),!0),De(this.document,"mousemove",u=>this._onMouseMove(u),!0),De(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),De(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),De(this.document,"focus",u=>this._onFocus(u),!0),De(this.document,"scroll",u=>this._onScroll(u),!0)],this.highlight.install();let e;const i=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(i,500)};e=this.injectedScript.utils.builtins.setTimeout(i,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(gv(this.document,lA)),(s=this.overlay)==null||s.install(),(o=(a=this._currentTool)==null?void 0:a.install)==null||o.call(a),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var s,a,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(a=(s=this._currentTool).uninstall)==null||a.call(s),this.clearHighlight(),this._currentTool=e,(u=(o=this._currentTool).install)==null||u.call(o);const i=(f=e.cursor)==null?void 0:f.call(e);i&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",i))}setUIState(e,i){var o;this._delegate=i,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(),(o=this.overlay)==null||o.setUIState(e);let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?dA(this.injectedScript,e.language,e.actionSelector,this.document):null;s=u!=null&&u.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.length?e.actionSelector:void 0}const a=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==a){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?rn.multiple:rn.single;s=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=a}else this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}s==="clear"?this.highlight.clearHighlight():s!=="noop"&&this.highlight.updateHighlight(s)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onClick)==null||a.call(s,e))}_onDblClick(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onDblClick)==null||a.call(s,e))}_onContextMenu(e){var i,s;e.isTrusted&&((s=(i=this._currentTool).onContextMenu)==null||s.call(i,e))}_onDragStart(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onDragStart)==null||s.call(i,e))}_onPointerDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerDown)==null||s.call(i,e))}_onPointerUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerUp)==null||s.call(i,e))}_onMouseDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseDown)==null||s.call(i,e))}_onMouseUp(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseUp)==null||a.call(s,e))}_onMouseMove(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseMove)==null||a.call(s,e))}_onMouseEnter(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseEnter)==null||s.call(i,e))}_onMouseLeave(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseLeave)==null||s.call(i,e))}_onFocus(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onFocus)==null||s.call(i,e))}_onScroll(e){var i,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(i=this._currentTool).onScroll)==null||s.call(i,e))}_onInput(e){var i,s;this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onInput)==null||s.call(i,e)}_onKeyDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyDown)==null||s.call(i,e))}_onKeyUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyUp)==null||s.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var a,o;let s=e==null?void 0:e.tooltipText;s===void 0&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:s}))):this.highlight.clearHighlight(),i&&((o=(a=this._delegate).highlightUpdated)==null||o.call(a))}_ignoreOverlayEvent(e){return e.composedPath().some(i=>(i.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var i;for(const s of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(s)))return s;return e.composedPath()[0]}setMode(e){var i,s;(s=(i=this._delegate).setMode)==null||s.call(i,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var s,a;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!pA(e)&&this._lastActionAutoexpectSnapshot){const o=gA(i,this._lastActionAutoexpectSnapshot);e.preconditionSelector=o?this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((a=(s=this._delegate).performAction)==null?void 0:a.call(s,e).catch(()=>{}))}recordAction(e){var i,s;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(s=(i=this._delegate).recordAction)==null||s.call(i,e)}setOverlayState(e){var i,s;(s=(i=this._delegate).setOverlayState)==null||s.call(i,e)}elementPicked(e,i){var a,o;const s=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"expect"});(o=(a=this._delegate).elementPicked)==null||o.call(a,{selector:e,ariaSnapshot:s})}}let dv=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const i=this._recorder.document.createElement("x-pw-tool-item");i.title="Accept",i.classList.add("accept"),i.appendChild(this._recorder.document.createElement("x-div")),i.addEventListener("click",()=>{var f;return(f=e.onCommit)==null?void 0:f.call(e)});const s=this._recorder.document.createElement("x-pw-tool-item");s.title="Close",s.classList.add("cancel"),s.appendChild(this._recorder.document.createElement("x-div")),s.addEventListener("click",()=>{var f;this.close(),(f=e.onCancel)==null||f.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)},this._dialogElement.addEventListener("click",f=>f.stopPropagation());const a=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,a.appendChild(o),a.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&a.appendChild(i),a.appendChild(s),this._dialogElement.appendChild(a);const u=this._recorder.document.createElement("x-pw-dialog-body");return u.appendChild(e.body),this._dialogElement.appendChild(u),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,i){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=i+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function hA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function gr(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function kh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Fa(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function ze(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function Qa(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function Za(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function De(n,e,i,s){return n.addEventListener(e,i,s),()=>{n.removeEventListener(e,i,s)}}function pv(n){for(const e of n)e();n.splice(0,n.length)}function dA(n,e,i,s){try{const a=n.parseSelector(i),o=n.querySelectorAll(a,s),u=o.length>1?rn.multiple:rn.single,f=n.utils.asLocator(e,i);return o.map((d,p)=>{const m=o.length>1?` [${p+1} of ${o.length}]`:"";return{element:d,color:u,tooltipText:f+m}})}catch{return[]}}function gv(n,{tagName:e,attrs:i,children:s}){const a=n.createElementNS("http://www.w3.org/2000/svg",e);if(i)for(const[o,u]of Object.entries(i))a.setAttribute(o,u);if(s)for(const o of s)a.appendChild(gv(n,o));return a}function pA(n){return n.name.startsWith("assert")}function gA(n,e){var u,f;function i(d,p,m){let y=1,b=m+y;for(const v of d.children||[])typeof v=="string"?(y++,b++):(y+=i(v,p,b),b+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let v=p.get(d.role);v||(v=new Map,p.set(d.role,v));const E=v.get(d.name),x=y*100-m;(!E||E.sizeAndPosition<x)&&v.set(d.name,{node:d,sizeAndPosition:x})}return y}const s=new Map;n&&i(n.root,s,0);const a=new Map;i(e.root,a,0);const o=[];for(const[d,p]of a)for(const[m,y]of p)((u=s.get(d))==null?void 0:u.get(m))||o.push(y);return o.sort((d,p)=>p.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node.element}function mA(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,u,f)=>`${u}(${f.toLowerCase()}`);const i=[];let s="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){s+=u;continue}const f=n[o-1]==="r"||n[o]==="/";++o;let d="";for(;o<n.length;){if(n[o]==="\\"){f?(n[o+1]!==u&&(d+=n[o]),++o,d+=n[o]):(++o,n[o]==="n"?d+=`
128
+ `:n[o]==="r"?d+="\r":n[o]==="t"?d+=" ":d+=n[o]),++o;continue}if(n[o]!==u){d+=n[o++];continue}break}i.push({quote:u,text:d}),s+=(u==="/"?"r":"")+"$"+i.length}s=s.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const a=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:mv(s,i,e),preferredQuote:a}}function o0(n){return[...n.matchAll(/\$\d+/g)].length}function c0(n,e){return n.replace(/\$(\d+)/g,(i,s)=>`$${s-e}`)}function mv(n,e,i){for(;;){const a=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!a)break;const o=a.index+a[0].length;let u=0,f=o;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let d=n.substring(0,o),p=0;["sethas(","sethasnot("].includes(a[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=o0(n.substring(0,o)),y=c0(n.substring(o,f),m),b=o0(y),v=e.slice(m,m+b),E=JSON.stringify(mv(y,v,i));n=d.replace(/=$/,"2=")+`$${m+1}`+c0(n.substring(f+p),b-1);const x=e.slice(0,m),T=e.slice(m+b);e=x.concat([{quote:'"',text:E}]).concat(T)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(a,o,u)=>","+o.toLowerCase()+"="+u.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${i}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const s=n.split(".");for(let a=0;a<s.length-1;a++)if(s[a]==="internal:control=enter-frame"&&s[a+1].startsWith("nth=")){const[o]=s.splice(a,1);s.splice(a+1,0,o)}return s.map(a=>!a.startsWith("internal:")||a==="internal:control"?a.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(a=a.includes("[")?a.replace(/\]/,"")+"]":a,a=a.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:attr")||a.startsWith("internal:testid")||a.startsWith("internal:role")?xt(new RegExp(d.text),!1)+(f||""):Rt(new RegExp(d.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:has=")||a.startsWith("internal:has-not=")?d.text:a.startsWith("internal:testid")?xt(d.text,!0):a.startsWith("internal:attr")||a.startsWith("internal:role")?xt(d.text,f==="s"):Rt(d.text,f==="s")}),a)).join(" >> ")}function yA(n,e,i){try{return bA(n,e,i)}catch{return""}}function bA(n,e,i){try{return al(e),e}catch{}const{selector:s,preferredQuote:a}=mA(e,i),o=tb(n,s,void 0,void 0,a),u=u0(n,e);return o.some(f=>u0(n,f)===u)?s:""}function u0(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const vA=({url:n})=>S.jsxs("div",{className:"browser-frame-header",children:[S.jsxs("div",{className:"browser-traffic-lights",children:[S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),S.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[S.jsx("span",{className:"browser-frame-address",children:n||"about:blank"}),n&&S.jsx(Vh,{value:n})]}),S.jsx("div",{style:{marginLeft:"auto"},children:S.jsxs("div",{children:[S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),pd=Symbol.for("yaml.alias"),Mh=Symbol.for("yaml.document"),Ai=Symbol.for("yaml.map"),yv=Symbol.for("yaml.pair"),Tn=Symbol.for("yaml.scalar"),Er=Symbol.for("yaml.seq"),ln=Symbol.for("yaml.node.type"),fs=n=>!!n&&typeof n=="object"&&n[ln]===pd,hs=n=>!!n&&typeof n=="object"&&n[ln]===Mh,Ar=n=>!!n&&typeof n=="object"&&n[ln]===Ai,Be=n=>!!n&&typeof n=="object"&&n[ln]===yv,Re=n=>!!n&&typeof n=="object"&&n[ln]===Tn,Nr=n=>!!n&&typeof n=="object"&&n[ln]===Er;function He(n){if(n&&typeof n=="object")switch(n[ln]){case Ai:case Er:return!0}return!1}function qe(n){if(n&&typeof n=="object")switch(n[ln]){case pd:case Ai:case Tn:case Er:return!0}return!1}const SA=n=>(Re(n)||He(n))&&!!n.anchor,Lt=Symbol("break visit"),bv=Symbol("skip children"),_n=Symbol("remove node");function Ni(n,e){const i=vv(e);hs(n)?fr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):fr(null,n,i,Object.freeze([]))}Ni.BREAK=Lt;Ni.SKIP=bv;Ni.REMOVE=_n;function fr(n,e,i,s){const a=Sv(n,e,i,s);if(qe(a)||Be(a))return wv(n,s,a),fr(n,a,i,s);if(typeof a!="symbol"){if(He(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=fr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Lt)return Lt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=fr("key",e.key,i,s);if(o===Lt)return Lt;o===_n&&(e.key=null);const u=fr("value",e.value,i,s);if(u===Lt)return Lt;u===_n&&(e.value=null)}}return a}async function gc(n,e){const i=vv(e);hs(n)?await hr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):await hr(null,n,i,Object.freeze([]))}gc.BREAK=Lt;gc.SKIP=bv;gc.REMOVE=_n;async function hr(n,e,i,s){const a=await Sv(n,e,i,s);if(qe(a)||Be(a))return wv(n,s,a),hr(n,a,i,s);if(typeof a!="symbol"){if(He(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=await hr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Lt)return Lt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=await hr("key",e.key,i,s);if(o===Lt)return Lt;o===_n&&(e.key=null);const u=await hr("value",e.value,i,s);if(u===Lt)return Lt;u===_n&&(e.value=null)}}return a}function vv(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Sv(n,e,i,s){var a,o,u,f,d;if(typeof i=="function")return i(n,e,s);if(Ar(e))return(a=i.Map)==null?void 0:a.call(i,n,e,s);if(Nr(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,s);if(Be(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,s);if(Re(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,s);if(fs(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,s)}function wv(n,e,i){const s=e[e.length-1];if(He(s))s.items[n]=i;else if(Be(s))n==="key"?s.key=i:s.value=i;else if(hs(s))s.contents=i;else{const a=fs(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const wA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},xA=n=>n.replace(/[!,[\]{}]/g,e=>wA[e]);class wt{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wt.defaultYaml,e),this.tags=Object.assign({},wt.defaultTags,i)}clone(){const e=new wt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new wt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wt.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:wt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wt.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),a=s.shift();switch(a){case"%TAG":{if(s.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,u]=s;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const u=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,u),!1}}default:return i(0,`Unknown directive ${a}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const u=e.slice(2,-1);return u==="!"||u==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),u)}const[,s,a]=e.match(/^(.*!)([^!]*)$/s);a||i(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(a)}catch(u){return i(String(u)),null}return s==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,s]of Object.entries(this.tags))if(e.startsWith(s))return i+xA(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let a;if(e&&s.length>0&&qe(e.contents)){const o={};Ni(e.contents,(u,f)=>{qe(f)&&f.tag&&(o[f.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,u]of s)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||a.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
129
+ `)}}wt.defaultYaml={explicit:!1,version:"1.2"};wt.defaultTags={"!!":"tag:yaml.org,2002:"};function xv(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(i)}return!0}function _v(n){const e=new Set;return Ni(n,{Value(i,s){s.anchor&&e.add(s.anchor)}}),e}function Tv(n,e){for(let i=1;;++i){const s=`${n}${i}`;if(!e.has(s))return s}}function _A(n,e){const i=[],s=new Map;let a=null;return{onAnchor:o=>{i.push(o),a||(a=_v(n));const u=Tv(e,a);return a.add(u),u},setAnchors:()=>{for(const o of i){const u=s.get(o);if(typeof u=="object"&&u.anchor&&(Re(u.node)||He(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:s}}function dr(n,e,i,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let a=0,o=s.length;a<o;++a){const u=s[a],f=dr(n,s,String(a),u);f===void 0?delete s[a]:f!==u&&(s[a]=f)}else if(s instanceof Map)for(const a of Array.from(s.keys())){const o=s.get(a),u=dr(n,s,a,o);u===void 0?s.delete(a):u!==o&&s.set(a,u)}else if(s instanceof Set)for(const a of Array.from(s)){const o=dr(n,s,a,a);o===void 0?s.delete(a):o!==a&&(s.delete(a),s.add(o))}else for(const[a,o]of Object.entries(s)){const u=dr(n,s,a,o);u===void 0?delete s[a]:u!==o&&(s[a]=u)}return n.call(e,i,s)}function an(n,e,i){if(Array.isArray(n))return n.map((s,a)=>an(s,String(a),i));if(n&&typeof n.toJSON=="function"){if(!i||!SA(n))return n.toJSON(e,i);const s={aliasCount:0,count:1,res:void 0};i.anchors.set(n,s),i.onCreate=o=>{s.res=o,delete i.onCreate};const a=n.toJSON(e,i);return i.onCreate&&i.onCreate(a),a}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class gd{constructor(e){Object.defineProperty(this,ln,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:s,onAnchor:a,reviver:o}={}){if(!hs(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=an(this,"",u);if(typeof a=="function")for(const{count:d,res:p}of u.anchors.values())a(p,d);return typeof o=="function"?dr(o,{"":f},"",f):f}}class mc extends gd{constructor(e){super(pd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return Ni(e,{Node:(s,a)=>{if(a===this)return Ni.BREAK;a.anchor===this.source&&(i=a)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:s,doc:a,maxAliasCount:o}=i,u=this.resolve(a);if(!u){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=s.get(u);if(f||(an(u,null,i),f=s.get(u)),!f||f.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=Io(a,u,s)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(e,i,s){const a=`*${this.source}`;if(e){if(xv(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${a} `}return a}}function Io(n,e,i){if(fs(e)){const s=e.resolve(n),a=i&&s&&i.get(s);return a?a.count*a.aliasCount:0}else if(He(e)){let s=0;for(const a of e.items){const o=Io(n,a,i);o>s&&(s=o)}return s}else if(Be(e)){const s=Io(n,e.key,i),a=Io(n,e.value,i);return Math.max(s,a)}return 1}const Ev=n=>!n||typeof n!="function"&&typeof n!="object";class he extends gd{constructor(e){super(Tn),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:an(this.value,e,i)}toString(){return String(this.value)}}he.BLOCK_FOLDED="BLOCK_FOLDED";he.BLOCK_LITERAL="BLOCK_LITERAL";he.PLAIN="PLAIN";he.QUOTE_DOUBLE="QUOTE_DOUBLE";he.QUOTE_SINGLE="QUOTE_SINGLE";const TA="tag:yaml.org,2002:";function EA(n,e,i){if(e){const s=i.filter(o=>o.tag===e),a=s.find(o=>!o.format)??s[0];if(!a)throw new Error(`Tag ${e} not found`);return a}return i.find(s=>{var a;return((a=s.identify)==null?void 0:a.call(s,n))&&!s.format})}function nl(n,e,i){var y,b,v;if(hs(n)&&(n=n.contents),qe(n))return n;if(Be(n)){const E=(b=(y=i.schema[Ai]).createNode)==null?void 0:b.call(y,i.schema,null,i);return E.items.push(n),E}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:a,onTagObj:o,schema:u,sourceObjects:f}=i;let d;if(s&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor||(d.anchor=a(n)),new mc(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=TA+e.slice(2));let p=EA(n,e,u.tags);if(!p){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new he(n);return d&&(d.node=E),E}p=n instanceof Map?u[Ai]:Symbol.iterator in Object(n)?u[Er]:u[Ai]}o&&(o(p),delete i.onTagObj);const m=p!=null&&p.createNode?p.createNode(i.schema,n,i):typeof((v=p==null?void 0:p.nodeClass)==null?void 0:v.from)=="function"?p.nodeClass.from(i.schema,n,i):new he(n);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function sc(n,e,i){let s=i;for(let a=e.length-1;a>=0;--a){const o=e[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const u=[];u[o]=s,s=u}else s=new Map([[o,s]])}return nl(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Va=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class Av extends gd{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(s=>qe(s)||Be(s)?s.clone(e):s),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Va(e))this.add(i);else{const[s,...a]=e,o=this.get(s,!0);if(He(o))o.addIn(a,i);else if(o===void 0&&this.schema)this.set(s,sc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}deleteIn(e){const[i,...s]=e;if(s.length===0)return this.delete(i);const a=this.get(i,!0);if(He(a))return a.deleteIn(s);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}getIn(e,i){const[s,...a]=e,o=this.get(s,!0);return a.length===0?!i&&Re(o)?o.value:o:He(o)?o.getIn(a,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Be(i))return!1;const s=i.value;return s==null||e&&Re(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[i,...s]=e;if(s.length===0)return this.has(i);const a=this.get(i,!0);return He(a)?a.hasIn(s):!1}setIn(e,i){const[s,...a]=e;if(a.length===0)this.set(s,i);else{const o=this.get(s,!0);if(He(o))o.setIn(a,i);else if(o===void 0&&this.schema)this.set(s,sc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}}const AA=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function Pn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const is=(n,e,i)=>n.endsWith(`
130
130
  `)?Pn(i,e):i.includes(`
131
131
  `)?`
132
- `+Pn(i,e):(n.endsWith(" ")?"":" ")+i,Ev="flow",Oh="block",Io="quoted";function yc(n,e,i="flow",{indentAtStart:s,lineWidth:a=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!a||a<0)return n;a<o&&(o=0);const d=Math.max(1+o,1+a-e.length);if(n.length<=d)return n;const p=[],m={};let y=a-e.length;typeof s=="number"&&(s>a-Math.max(2,o)?p.push(0):y=a-s);let b,v,E=!1,x=-1,T=-1,C=-1;i===Oh&&(x=f0(n,x,e.length),x!==-1&&(y=x+d));for(let $;$=n[x+=1];){if(i===Io&&$==="\\"){switch(T=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}C=x}if($===`
132
+ `+Pn(i,e):(n.endsWith(" ")?"":" ")+i,Nv="flow",Oh="block",Vo="quoted";function yc(n,e,i="flow",{indentAtStart:s,lineWidth:a=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!a||a<0)return n;a<o&&(o=0);const d=Math.max(1+o,1+a-e.length);if(n.length<=d)return n;const p=[],m={};let y=a-e.length;typeof s=="number"&&(s>a-Math.max(2,o)?p.push(0):y=a-s);let b,v,E=!1,x=-1,T=-1,C=-1;i===Oh&&(x=f0(n,x,e.length),x!==-1&&(y=x+d));for(let $;$=n[x+=1];){if(i===Vo&&$==="\\"){switch(T=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}C=x}if($===`
133
133
  `)i===Oh&&(x=f0(n,x,e.length)),y=x+e.length+d,b=void 0;else{if($===" "&&v&&v!==" "&&v!==`
134
134
  `&&v!==" "){const V=n[x+1];V&&V!==" "&&V!==`
135
- `&&V!==" "&&(b=x)}if(x>=y)if(b)p.push(b),y=b+d,b=void 0;else if(i===Io){for(;v===" "||v===" ";)v=$,$=n[x+=1],E=!0;const V=x>C+1?x-2:T-1;if(m[V])return n;p.push(V),m[V]=!0,y=V+d,b=void 0}else E=!0}v=$}if(E&&f&&f(),p.length===0)return n;u&&u();let k=n.slice(0,p[0]);for(let $=0;$<p.length;++$){const V=p[$],R=p[$+1]||n.length;V===0?k=`
136
- ${e}${n.slice(0,R)}`:(i===Io&&m[V]&&(k+=`${n[V]}\\`),k+=`
135
+ `&&V!==" "&&(b=x)}if(x>=y)if(b)p.push(b),y=b+d,b=void 0;else if(i===Vo){for(;v===" "||v===" ";)v=$,$=n[x+=1],E=!0;const V=x>C+1?x-2:T-1;if(m[V])return n;p.push(V),m[V]=!0,y=V+d,b=void 0}else E=!0}v=$}if(E&&f&&f(),p.length===0)return n;u&&u();let k=n.slice(0,p[0]);for(let $=0;$<p.length;++$){const V=p[$],R=p[$+1]||n.length;V===0?k=`
136
+ ${e}${n.slice(0,R)}`:(i===Vo&&m[V]&&(k+=`${n[V]}\\`),k+=`
137
137
  ${e}${n.slice(V+1,R)}`)}return k}function f0(n,e,i){let s=e,a=e+1,o=n[a];for(;o===" "||o===" ";)if(e<a+i)o=n[++e];else{do o=n[++e];while(o&&o!==`
138
- `);s=e,a=e+1,o=n[a]}return s}const bc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),vc=n=>/^(%|---|\.\.\.)/m.test(n);function EA(n,e,i){if(!e||e<0)return!1;const s=e-i,a=n.length;if(a<=s)return!1;for(let o=0,u=0;o<a;++o)if(n[o]===`
139
- `){if(o-u>s)return!0;if(u=o+1,a-u<=s)return!1}return!0}function Za(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=e,a=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(vc(n)?" ":"");let u="",f=0;for(let d=0,p=i[d];p;p=i[++d])if(p===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(u+=i.slice(f,d)+"\\ ",d+=1,f=d,p="\\"),p==="\\")switch(i[d+1]){case"u":{u+=i.slice(f,d);const m=i.substr(d+2,4);switch(m){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:m.substr(0,2)==="00"?u+="\\x"+m.substr(2):u+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(s||i[d+2]==='"'||i.length<a)d+=1;else{for(u+=i.slice(f,d)+`
138
+ `);s=e,a=e+1,o=n[a]}return s}const bc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),vc=n=>/^(%|---|\.\.\.)/m.test(n);function NA(n,e,i){if(!e||e<0)return!1;const s=e-i,a=n.length;if(a<=s)return!1;for(let o=0,u=0;o<a;++o)if(n[o]===`
139
+ `){if(o-u>s)return!0;if(u=o+1,a-u<=s)return!1}return!0}function Ja(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=e,a=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(vc(n)?" ":"");let u="",f=0;for(let d=0,p=i[d];p;p=i[++d])if(p===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(u+=i.slice(f,d)+"\\ ",d+=1,f=d,p="\\"),p==="\\")switch(i[d+1]){case"u":{u+=i.slice(f,d);const m=i.substr(d+2,4);switch(m){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:m.substr(0,2)==="00"?u+="\\x"+m.substr(2):u+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(s||i[d+2]==='"'||i.length<a)d+=1;else{for(u+=i.slice(f,d)+`
140
140
 
141
141
  `;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)u+=`
142
- `,d+=2;u+=o,i[d+2]===" "&&(u+="\\"),d+=1,f=d+1}break;default:d+=1}return u=f?u+i.slice(f):i,s?u:yc(u,o,Io,bc(e,!1))}function Rh(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
143
- `)||/[ \t]\n|\n[ \t]/.test(n))return Za(n,e);const i=e.indent||(vc(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
144
- ${i}`)+"'";return e.implicitKey?s:yc(s,i,Ev,bc(e,!1))}function pr(n,e){const{singleQuote:i}=e.options;let s;if(i===!1)s=Za;else{const a=n.includes('"'),o=n.includes("'");a&&!o?s=Rh:o&&!a?s=Za:s=i?Rh:Za}return s(n,e)}let Lh;try{Lh=new RegExp(`(^|(?<!
142
+ `,d+=2;u+=o,i[d+2]===" "&&(u+="\\"),d+=1,f=d+1}break;default:d+=1}return u=f?u+i.slice(f):i,s?u:yc(u,o,Vo,bc(e,!1))}function Rh(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
143
+ `)||/[ \t]\n|\n[ \t]/.test(n))return Ja(n,e);const i=e.indent||(vc(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
144
+ ${i}`)+"'";return e.implicitKey?s:yc(s,i,Nv,bc(e,!1))}function pr(n,e){const{singleQuote:i}=e.options;let s;if(i===!1)s=Ja;else{const a=n.includes('"'),o=n.includes("'");a&&!o?s=Rh:o&&!a?s=Ja:s=i?Rh:Ja}return s(n,e)}let Lh;try{Lh=new RegExp(`(^|(?<!
145
145
  ))
146
146
  +(?!
147
- |$)`,"g")}catch{Lh=/\n+(?!\n|$)/g}function Vo({comment:n,type:e,value:i},s,a,o){const{blockQuote:u,commentString:f,lineWidth:d}=s.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return pr(i,s);const p=s.indent||(s.forceBlockIndent||vc(i)?" ":""),m=u==="literal"?!0:u==="folded"||e===he.BLOCK_FOLDED?!1:e===he.BLOCK_LITERAL?!0:!EA(i,d,p.length);if(!i)return m?`|
147
+ |$)`,"g")}catch{Lh=/\n+(?!\n|$)/g}function Go({comment:n,type:e,value:i},s,a,o){const{blockQuote:u,commentString:f,lineWidth:d}=s.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return pr(i,s);const p=s.indent||(s.forceBlockIndent||vc(i)?" ":""),m=u==="literal"?!0:u==="folded"||e===he.BLOCK_FOLDED?!1:e===he.BLOCK_LITERAL?!0:!NA(i,d,p.length);if(!i)return m?`|
148
148
  `:`>
149
149
  `;let y,b;for(b=i.length;b>0;--b){const G=i[b-1];if(G!==`
150
150
  `&&G!==" "&&G!==" ")break}let v=i.substring(b);const E=v.indexOf(`
@@ -153,12 +153,12 @@ ${i}`)+"'";return e.implicitKey?s:yc(s,i,Ev,bc(e,!1))}function pr(n,e){const{sin
153
153
  `)C=T;else break}let k=i.substring(0,C<T?C+1:T);k&&(i=i.substring(k.length),k=k.replace(/\n+/g,`$&${p}`));let V=(m?"|":">")+(x?p?"2":"1":"")+y;if(n&&(V+=" "+f(n.replace(/ ?[\r\n]+/g," ")),a&&a()),m)return i=i.replace(/\n+/g,`$&${p}`),`${V}
154
154
  ${p}${k}${i}${v}`;i=i.replace(/\n+/g,`
155
155
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const R=yc(`${k}${i}${v}`,p,Oh,bc(s,!0));return`${V}
156
- ${p}${R}`}function AA(n,e,i,s){const{type:a,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:p,inFlow:m}=e;if(f&&o.includes(`
156
+ ${p}${R}`}function CA(n,e,i,s){const{type:a,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:p,inFlow:m}=e;if(f&&o.includes(`
157
157
  `)||m&&/[[\]{},]/.test(o))return pr(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||m||!o.includes(`
158
- `)?pr(o,e):Vo(n,e,i,s);if(!f&&!m&&a!==he.PLAIN&&o.includes(`
159
- `))return Vo(n,e,i,s);if(vc(o)){if(d==="")return e.forceBlockIndent=!0,Vo(n,e,i,s);if(f&&d===p)return pr(o,e)}const y=o.replace(/\n+/g,`$&
160
- ${d}`);if(u){const b=x=>{var T;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((T=x.test)==null?void 0:T.test(y))},{compat:v,tags:E}=e.doc.schema;if(E.some(b)||v!=null&&v.some(b))return pr(o,e)}return f?y:yc(y,d,Ev,bc(e,!1))}function al(n,e,i,s){const{implicitKey:a,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==he.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=he.QUOTE_DOUBLE);const d=m=>{switch(m){case he.BLOCK_FOLDED:case he.BLOCK_LITERAL:return a||o?pr(u.value,e):Vo(u,e,i,s);case he.QUOTE_DOUBLE:return Za(u.value,e);case he.QUOTE_SINGLE:return Rh(u.value,e);case he.PLAIN:return AA(u,e,i,s);default:return null}};let p=d(f);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,b=a&&m||y;if(p=d(b),p===null)throw new Error(`Unsupported default string type ${b}`)}return p}function Av(n,e){const i=Object.assign({blockQuote:!0,commentString:TA,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,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let s;switch(i.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:s,options:i}}function NA(n,e){var a;if(e.tag){const o=n.filter(u=>u.tag===e.tag);if(o.length>0)return o.find(u=>u.format===e.format)??o[0]}let i,s;if(Re(e)){s=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,s)});if(o.length>1){const u=o.filter(f=>f.test);u.length>0&&(o=u)}i=o.find(u=>u.format===e.format)??o.find(u=>!u.format)}else s=e,i=n.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!i){const o=((a=s==null?void 0:s.constructor)==null?void 0:a.name)??typeof s;throw new Error(`Tag not resolved for ${o} value`)}return i}function CA(n,e,{anchors:i,doc:s}){if(!s.directives)return"";const a=[],o=(Re(n)||He(n))&&n.anchor;o&&Sv(o)&&(i.add(o),a.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&a.push(s.directives.tagString(u)),a.join(" ")}function vr(n,e,i,s){var d;if(Be(n))return n.toString(e,i,s);if(fs(n)){if(e.doc.directives)return n.toString(e);if((d=e.resolvedAliases)!=null&&d.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let a;const o=qe(n)?n:e.doc.createNode(n,{onTagObj:p=>a=p});a||(a=NA(e.doc.schema.tags,o));const u=CA(o,a,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof a.stringify=="function"?a.stringify(o,e,i,s):Re(o)?al(o,e,i,s):o.toString(e,i,s);return u?Re(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
161
- ${e.indent}${f}`:f}function kA({key:n,value:e},i,s,a){const{allNullValues:o,doc:u,indent:f,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=i;let b=qe(n)&&n.comment||null;if(y){if(b)throw new Error("With simple keys, key nodes cannot have comments");if(He(n)||!qe(n)&&typeof n=="object"){const Z="With simple keys, collection cannot be used as a key value";throw new Error(Z)}}let v=!y&&(!n||b&&e==null&&!i.inFlow||He(n)||(Re(n)?n.type===he.BLOCK_FOLDED||n.type===he.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!v&&(y||!o),indent:f+d});let E=!1,x=!1,T=vr(n,i,()=>E=!0,()=>x=!0);if(!v&&!i.inFlow&&T.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(i.inFlow){if(o||e==null)return E&&s&&s(),T===""?"?":v?`? ${T}`:T}else if(o&&!y||e==null&&v)return T=`? ${T}`,b&&!E?T+=is(T,i.indent,p(b)):x&&a&&a(),T;E&&(b=null),v?(b&&(T+=is(T,i.indent,p(b))),T=`? ${T}
158
+ `)?pr(o,e):Go(n,e,i,s);if(!f&&!m&&a!==he.PLAIN&&o.includes(`
159
+ `))return Go(n,e,i,s);if(vc(o)){if(d==="")return e.forceBlockIndent=!0,Go(n,e,i,s);if(f&&d===p)return pr(o,e)}const y=o.replace(/\n+/g,`$&
160
+ ${d}`);if(u){const b=x=>{var T;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((T=x.test)==null?void 0:T.test(y))},{compat:v,tags:E}=e.doc.schema;if(E.some(b)||v!=null&&v.some(b))return pr(o,e)}return f?y:yc(y,d,Nv,bc(e,!1))}function ll(n,e,i,s){const{implicitKey:a,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==he.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=he.QUOTE_DOUBLE);const d=m=>{switch(m){case he.BLOCK_FOLDED:case he.BLOCK_LITERAL:return a||o?pr(u.value,e):Go(u,e,i,s);case he.QUOTE_DOUBLE:return Ja(u.value,e);case he.QUOTE_SINGLE:return Rh(u.value,e);case he.PLAIN:return CA(u,e,i,s);default:return null}};let p=d(f);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,b=a&&m||y;if(p=d(b),p===null)throw new Error(`Unsupported default string type ${b}`)}return p}function Cv(n,e){const i=Object.assign({blockQuote:!0,commentString:AA,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,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let s;switch(i.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:s,options:i}}function kA(n,e){var a;if(e.tag){const o=n.filter(u=>u.tag===e.tag);if(o.length>0)return o.find(u=>u.format===e.format)??o[0]}let i,s;if(Re(e)){s=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,s)});if(o.length>1){const u=o.filter(f=>f.test);u.length>0&&(o=u)}i=o.find(u=>u.format===e.format)??o.find(u=>!u.format)}else s=e,i=n.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!i){const o=((a=s==null?void 0:s.constructor)==null?void 0:a.name)??typeof s;throw new Error(`Tag not resolved for ${o} value`)}return i}function MA(n,e,{anchors:i,doc:s}){if(!s.directives)return"";const a=[],o=(Re(n)||He(n))&&n.anchor;o&&xv(o)&&(i.add(o),a.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&a.push(s.directives.tagString(u)),a.join(" ")}function vr(n,e,i,s){var d;if(Be(n))return n.toString(e,i,s);if(fs(n)){if(e.doc.directives)return n.toString(e);if((d=e.resolvedAliases)!=null&&d.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let a;const o=qe(n)?n:e.doc.createNode(n,{onTagObj:p=>a=p});a||(a=kA(e.doc.schema.tags,o));const u=MA(o,a,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof a.stringify=="function"?a.stringify(o,e,i,s):Re(o)?ll(o,e,i,s):o.toString(e,i,s);return u?Re(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
161
+ ${e.indent}${f}`:f}function OA({key:n,value:e},i,s,a){const{allNullValues:o,doc:u,indent:f,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=i;let b=qe(n)&&n.comment||null;if(y){if(b)throw new Error("With simple keys, key nodes cannot have comments");if(He(n)||!qe(n)&&typeof n=="object"){const Z="With simple keys, collection cannot be used as a key value";throw new Error(Z)}}let v=!y&&(!n||b&&e==null&&!i.inFlow||He(n)||(Re(n)?n.type===he.BLOCK_FOLDED||n.type===he.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!v&&(y||!o),indent:f+d});let E=!1,x=!1,T=vr(n,i,()=>E=!0,()=>x=!0);if(!v&&!i.inFlow&&T.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(i.inFlow){if(o||e==null)return E&&s&&s(),T===""?"?":v?`? ${T}`:T}else if(o&&!y||e==null&&v)return T=`? ${T}`,b&&!E?T+=is(T,i.indent,p(b)):x&&a&&a(),T;E&&(b=null),v?(b&&(T+=is(T,i.indent,p(b))),T=`? ${T}
162
162
  ${f}:`):(T=`${T}:`,b&&(T+=is(T,i.indent,p(b))));let C,k,$;qe(e)?(C=!!e.spaceBefore,k=e.commentBefore,$=e.comment):(C=!1,k=null,$=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!v&&!b&&Re(e)&&(i.indentAtStart=T.length+1),x=!1,!m&&d.length>=2&&!i.inFlow&&!v&&Nr(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let V=!1;const R=vr(e,i,()=>V=!0,()=>x=!0);let G=" ";if(b||C||k){if(G=C?`
163
163
  `:"",k){const Z=p(k);G+=`
164
164
  ${Pn(Z,i.indent)}`}R===""&&!i.inFlow?G===`
@@ -168,32 +168,32 @@ ${Pn(Z,i.indent)}`}R===""&&!i.inFlow?G===`
168
168
  ${i.indent}`}else if(!v&&He(e)){const Z=R[0],H=R.indexOf(`
169
169
  `),L=H!==-1,ie=i.inFlow??e.flow??e.items.length===0;if(L||!ie){let le=!1;if(L&&(Z==="&"||Z==="!")){let I=R.indexOf(" ");Z==="&"&&I!==-1&&I<H&&R[I+1]==="!"&&(I=R.indexOf(" ",I+1)),(I===-1||H<I)&&(le=!0)}le||(G=`
170
170
  ${i.indent}`)}}else(R===""||R[0]===`
171
- `)&&(G="");return T+=G+R,i.inFlow?V&&s&&s():$&&!V?T+=is(T,i.indent,p($)):x&&a&&a(),T}function Nv(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const No="<<",Fn={identify:n=>n===No||typeof n=="symbol"&&n.description===No,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new he(Symbol(No)),{addToJSMap:Cv}),stringify:()=>No},MA=(n,e)=>(Fn.identify(e)||Re(e)&&(!e.type||e.type===he.PLAIN)&&Fn.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===Fn.tag&&i.default));function Cv(n,e,i){if(i=n&&fs(i)?i.resolve(n.doc):i,Nr(i))for(const s of i.items)ch(n,e,s);else if(Array.isArray(i))for(const s of i)ch(n,e,s);else ch(n,e,i)}function ch(n,e,i){const s=n&&fs(i)?i.resolve(n.doc):i;if(!Ar(s))throw new Error("Merge sources must be maps or map aliases");const a=s.toJSON(null,n,Map);for(const[o,u]of a)e instanceof Map?e.has(o)||e.set(o,u):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function kv(n,e,{key:i,value:s}){if(qe(i)&&i.addToJSMap)i.addToJSMap(n,e,s);else if(MA(n,i))Cv(n,e,s);else{const a=an(i,"",n);if(e instanceof Map)e.set(a,an(s,a,n));else if(e instanceof Set)e.add(a);else{const o=OA(i,a,n),u=an(s,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function OA(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(qe(n)&&(i!=null&&i.doc)){const s=Av(i.doc,{});s.anchors=new Set;for(const o of i.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const a=n.toString(s);if(!i.mapKeyWarned){let o=JSON.stringify(a);o.length>40&&(o=o.substring(0,36)+'..."'),Nv(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return a}return JSON.stringify(e)}function md(n,e,i){const s=tl(n,void 0,i),a=tl(e,void 0,i);return new yt(s,a)}class yt{constructor(e,i=null){Object.defineProperty(this,ln,{value:gv}),this.key=e,this.value=i}clone(e){let{key:i,value:s}=this;return qe(i)&&(i=i.clone(e)),qe(s)&&(s=s.clone(e)),new yt(i,s)}toJSON(e,i){const s=i!=null&&i.mapAsMap?new Map:{};return kv(i,s,this)}toString(e,i,s){return e!=null&&e.doc?kA(this,e,i,s):JSON.stringify(this)}}function Mv(n,e,i){return(e.inFlow??n.flow?LA:RA)(n,e,i)}function RA({comment:n,items:e},i,{blockItemPrefix:s,flowChars:a,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:p}}=i,m=Object.assign({},i,{indent:o,type:null});let y=!1;const b=[];for(let E=0;E<e.length;++E){const x=e[E];let T=null;if(qe(x))!y&&x.spaceBefore&&b.push(""),rc(i,b,x.commentBefore,y),x.comment&&(T=x.comment);else if(Be(x)){const k=qe(x.key)?x.key:null;k&&(!y&&k.spaceBefore&&b.push(""),rc(i,b,k.commentBefore,y))}y=!1;let C=vr(x,m,()=>T=null,()=>y=!0);T&&(C+=is(C,o,p(T))),y&&T&&(y=!1),b.push(s+C)}let v;if(b.length===0)v=a.start+a.end;else{v=b[0];for(let E=1;E<b.length;++E){const x=b[E];v+=x?`
171
+ `)&&(G="");return T+=G+R,i.inFlow?V&&s&&s():$&&!V?T+=is(T,i.indent,p($)):x&&a&&a(),T}function kv(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Co="<<",Fn={identify:n=>n===Co||typeof n=="symbol"&&n.description===Co,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new he(Symbol(Co)),{addToJSMap:Mv}),stringify:()=>Co},RA=(n,e)=>(Fn.identify(e)||Re(e)&&(!e.type||e.type===he.PLAIN)&&Fn.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===Fn.tag&&i.default));function Mv(n,e,i){if(i=n&&fs(i)?i.resolve(n.doc):i,Nr(i))for(const s of i.items)ch(n,e,s);else if(Array.isArray(i))for(const s of i)ch(n,e,s);else ch(n,e,i)}function ch(n,e,i){const s=n&&fs(i)?i.resolve(n.doc):i;if(!Ar(s))throw new Error("Merge sources must be maps or map aliases");const a=s.toJSON(null,n,Map);for(const[o,u]of a)e instanceof Map?e.has(o)||e.set(o,u):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function Ov(n,e,{key:i,value:s}){if(qe(i)&&i.addToJSMap)i.addToJSMap(n,e,s);else if(RA(n,i))Mv(n,e,s);else{const a=an(i,"",n);if(e instanceof Map)e.set(a,an(s,a,n));else if(e instanceof Set)e.add(a);else{const o=LA(i,a,n),u=an(s,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function LA(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(qe(n)&&(i!=null&&i.doc)){const s=Cv(i.doc,{});s.anchors=new Set;for(const o of i.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const a=n.toString(s);if(!i.mapKeyWarned){let o=JSON.stringify(a);o.length>40&&(o=o.substring(0,36)+'..."'),kv(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return a}return JSON.stringify(e)}function md(n,e,i){const s=nl(n,void 0,i),a=nl(e,void 0,i);return new yt(s,a)}class yt{constructor(e,i=null){Object.defineProperty(this,ln,{value:yv}),this.key=e,this.value=i}clone(e){let{key:i,value:s}=this;return qe(i)&&(i=i.clone(e)),qe(s)&&(s=s.clone(e)),new yt(i,s)}toJSON(e,i){const s=i!=null&&i.mapAsMap?new Map:{};return Ov(i,s,this)}toString(e,i,s){return e!=null&&e.doc?OA(this,e,i,s):JSON.stringify(this)}}function Rv(n,e,i){return(e.inFlow??n.flow?DA:jA)(n,e,i)}function jA({comment:n,items:e},i,{blockItemPrefix:s,flowChars:a,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:p}}=i,m=Object.assign({},i,{indent:o,type:null});let y=!1;const b=[];for(let E=0;E<e.length;++E){const x=e[E];let T=null;if(qe(x))!y&&x.spaceBefore&&b.push(""),rc(i,b,x.commentBefore,y),x.comment&&(T=x.comment);else if(Be(x)){const k=qe(x.key)?x.key:null;k&&(!y&&k.spaceBefore&&b.push(""),rc(i,b,k.commentBefore,y))}y=!1;let C=vr(x,m,()=>T=null,()=>y=!0);T&&(C+=is(C,o,p(T))),y&&T&&(y=!1),b.push(s+C)}let v;if(b.length===0)v=a.start+a.end;else{v=b[0];for(let E=1;E<b.length;++E){const x=b[E];v+=x?`
172
172
  ${d}${x}`:`
173
173
  `}}return n?(v+=`
174
- `+Pn(p(n),d),f&&f()):y&&u&&u(),v}function LA({items:n},e,{flowChars:i,itemIndent:s}){const{indent:a,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;s+=o;const d=Object.assign({},e,{indent:s,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let E=0;E<n.length;++E){const x=n[E];let T=null;if(qe(x))x.spaceBefore&&y.push(""),rc(e,y,x.commentBefore,!1),x.comment&&(T=x.comment);else if(Be(x)){const k=qe(x.key)?x.key:null;k&&(k.spaceBefore&&y.push(""),rc(e,y,k.commentBefore,!1),k.comment&&(p=!0));const $=qe(x.value)?x.value:null;$?($.comment&&(T=$.comment),$.commentBefore&&(p=!0)):x.value==null&&(k!=null&&k.comment)&&(T=k.comment)}T&&(p=!0);let C=vr(x,d,()=>T=null);E<n.length-1&&(C+=","),T&&(C+=is(C,s,f(T))),!p&&(y.length>m||C.includes(`
174
+ `+Pn(p(n),d),f&&f()):y&&u&&u(),v}function DA({items:n},e,{flowChars:i,itemIndent:s}){const{indent:a,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;s+=o;const d=Object.assign({},e,{indent:s,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let E=0;E<n.length;++E){const x=n[E];let T=null;if(qe(x))x.spaceBefore&&y.push(""),rc(e,y,x.commentBefore,!1),x.comment&&(T=x.comment);else if(Be(x)){const k=qe(x.key)?x.key:null;k&&(k.spaceBefore&&y.push(""),rc(e,y,k.commentBefore,!1),k.comment&&(p=!0));const $=qe(x.value)?x.value:null;$?($.comment&&(T=$.comment),$.commentBefore&&(p=!0)):x.value==null&&(k!=null&&k.comment)&&(T=k.comment)}T&&(p=!0);let C=vr(x,d,()=>T=null);E<n.length-1&&(C+=","),T&&(C+=is(C,s,f(T))),!p&&(y.length>m||C.includes(`
175
175
  `))&&(p=!0),y.push(C),m=y.length}const{start:b,end:v}=i;if(y.length===0)return b+v;if(!p){const E=y.reduce((x,T)=>x+T.length+2,2);p=e.options.lineWidth>0&&E>e.options.lineWidth}if(p){let E=b;for(const x of y)E+=x?`
176
176
  ${o}${a}${x}`:`
177
177
  `;return`${E}
178
- ${a}${v}`}else return`${b}${u}${y.join(" ")}${u}${v}`}function rc({indent:n,options:{commentString:e}},i,s,a){if(s&&a&&(s=s.replace(/^\n+/,"")),s){const o=Pn(e(s),n);i.push(o.trimStart())}}function ss(n,e){const i=Re(e)?e.value:e;for(const s of n)if(Be(s)&&(s.key===e||s.key===i||Re(s.key)&&s.key.value===i))return s}class Vt extends Tv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ai,e),this.items=[]}static from(e,i,s){const{keepUndefined:a,replacer:o}=s,u=new this(e),f=(d,p)=>{if(typeof o=="function")p=o.call(i,d,p);else if(Array.isArray(o)&&!o.includes(d))return;(p!==void 0||a)&&u.items.push(md(d,p,s))};if(i instanceof Map)for(const[d,p]of i)f(d,p);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let s;Be(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new yt(e,e==null?void 0:e.value):s=new yt(e.key,e.value);const a=ss(this.items,s.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(a){if(!i)throw new Error(`Key ${s.key} already set`);Re(a.value)&&_v(s.value)?a.value.value=s.value:a.value=s.value}else if(o){const f=this.items.findIndex(d=>o(s,d)<0);f===-1?this.items.push(s):this.items.splice(f,0,s)}else this.items.push(s)}delete(e){const i=ss(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const s=ss(this.items,e),a=s==null?void 0:s.value;return(!i&&Re(a)?a.value:a)??void 0}has(e){return!!ss(this.items,e)}set(e,i){this.add(new yt(e,i),!0)}toJSON(e,i,s){const a=s?new s:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(a);for(const o of this.items)kv(i,a,o);return a}toString(e,i,s){if(!e)return JSON.stringify(this);for(const a of this.items)if(!Be(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Mv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:i})}}const Cr={collection:"map",default:!0,nodeClass:Vt,tag:"tag:yaml.org,2002:map",resolve(n,e){return Ar(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Vt.from(n,e,i)};class Ci extends Tv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Er,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=Co(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const s=Co(e);if(typeof s!="number")return;const a=this.items[s];return!i&&Re(a)?a.value:a}has(e){const i=Co(e);return typeof i=="number"&&i<this.items.length}set(e,i){const s=Co(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const a=this.items[s];Re(a)&&_v(i)?a.value=i:this.items[s]=i}toJSON(e,i){const s=[];i!=null&&i.onCreate&&i.onCreate(s);let a=0;for(const o of this.items)s.push(an(o,String(a++),i));return s}toString(e,i,s){return e?Mv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:i}):JSON.stringify(this)}static from(e,i,s){const{replacer:a}=s,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof a=="function"){const d=i instanceof Set?f:String(u++);f=a.call(i,d,f)}o.items.push(tl(f,void 0,s))}}return o}}function Co(n){let e=Re(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const kr={collection:"seq",default:!0,nodeClass:Ci,tag:"tag:yaml.org,2002:seq",resolve(n,e){return Nr(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Ci.from(n,e,i)},Sc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,s){return e=Object.assign({actualString:!0},e),al(n,e,i,s)}},wc={identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new he(null),stringify:({source:n},e)=>typeof n=="string"&&wc.test.test(n)?n:e.options.nullStr},yd={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new he(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&yd.test.test(n)){const s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?i.options.trueStr:i.options.falseStr}};function gn({format:n,minFractionDigits:e,tag:i,value:s}){if(typeof s=="bigint")return String(s);const a=typeof s=="number"?s:Number(s);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=JSON.stringify(s);if(!n&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let u=o.indexOf(".");u<0&&(u=o.length,o+=".");let f=e-(o.length-u-1);for(;f-- >0;)o+="0"}return o}const Ov={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},Rv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():gn(n)}},Lv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new he(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:gn},xc=n=>typeof n=="bigint"||Number.isInteger(n),bd=(n,e,i,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),i);function jv(n,e,i){const{value:s}=n;return xc(s)&&s>=0?i+s.toString(e):gn(n)}const Dv={identify:n=>xc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>bd(n,2,8,i),stringify:n=>jv(n,8,"0o")},Bv={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>bd(n,0,10,i),stringify:gn},Uv={identify:n=>xc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>bd(n,2,16,i),stringify:n=>jv(n,16,"0x")},jA=[Cr,kr,Sc,wc,yd,Dv,Bv,Uv,Ov,Rv,Lv];function h0(n){return typeof n=="bigint"||Number.isInteger(n)}const ko=({value:n})=>JSON.stringify(n),DA=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:ko},{identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ko},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:ko},{identify:h0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:i})=>i?BigInt(n):parseInt(n,10),stringify:({value:n})=>h0(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:ko}],BA={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},UA=[Cr,kr].concat(DA,BA),vd={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){const i=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(i.length);for(let a=0;a<i.length;++a)s[a]=i.charCodeAt(a);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:i},s,a,o){const u=i;let f;if(typeof Buffer=="function")f=u instanceof Buffer?u.toString("base64"):Buffer.from(u.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<u.length;++p)d+=String.fromCharCode(u[p]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=he.BLOCK_LITERAL),e!==he.QUOTE_DOUBLE){const d=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),p=Math.ceil(f.length/d),m=new Array(p);for(let y=0,b=0;y<p;++y,b+=d)m[y]=f.substr(b,d);f=m.join(e===he.BLOCK_LITERAL?`
179
- `:" ")}return al({comment:n,type:e,value:f},s,a,o)}};function zv(n,e){if(Nr(n))for(let i=0;i<n.items.length;++i){let s=n.items[i];if(!Be(s)){if(Ar(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const a=s.items[0]||new yt(new he(null));if(s.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${s.commentBefore}
178
+ ${a}${v}`}else return`${b}${u}${y.join(" ")}${u}${v}`}function rc({indent:n,options:{commentString:e}},i,s,a){if(s&&a&&(s=s.replace(/^\n+/,"")),s){const o=Pn(e(s),n);i.push(o.trimStart())}}function ss(n,e){const i=Re(e)?e.value:e;for(const s of n)if(Be(s)&&(s.key===e||s.key===i||Re(s.key)&&s.key.value===i))return s}class Vt extends Av{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ai,e),this.items=[]}static from(e,i,s){const{keepUndefined:a,replacer:o}=s,u=new this(e),f=(d,p)=>{if(typeof o=="function")p=o.call(i,d,p);else if(Array.isArray(o)&&!o.includes(d))return;(p!==void 0||a)&&u.items.push(md(d,p,s))};if(i instanceof Map)for(const[d,p]of i)f(d,p);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let s;Be(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new yt(e,e==null?void 0:e.value):s=new yt(e.key,e.value);const a=ss(this.items,s.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(a){if(!i)throw new Error(`Key ${s.key} already set`);Re(a.value)&&Ev(s.value)?a.value.value=s.value:a.value=s.value}else if(o){const f=this.items.findIndex(d=>o(s,d)<0);f===-1?this.items.push(s):this.items.splice(f,0,s)}else this.items.push(s)}delete(e){const i=ss(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const s=ss(this.items,e),a=s==null?void 0:s.value;return(!i&&Re(a)?a.value:a)??void 0}has(e){return!!ss(this.items,e)}set(e,i){this.add(new yt(e,i),!0)}toJSON(e,i,s){const a=s?new s:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(a);for(const o of this.items)Ov(i,a,o);return a}toString(e,i,s){if(!e)return JSON.stringify(this);for(const a of this.items)if(!Be(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Rv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:i})}}const Cr={collection:"map",default:!0,nodeClass:Vt,tag:"tag:yaml.org,2002:map",resolve(n,e){return Ar(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Vt.from(n,e,i)};class Ci extends Av{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Er,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=ko(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const s=ko(e);if(typeof s!="number")return;const a=this.items[s];return!i&&Re(a)?a.value:a}has(e){const i=ko(e);return typeof i=="number"&&i<this.items.length}set(e,i){const s=ko(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const a=this.items[s];Re(a)&&Ev(i)?a.value=i:this.items[s]=i}toJSON(e,i){const s=[];i!=null&&i.onCreate&&i.onCreate(s);let a=0;for(const o of this.items)s.push(an(o,String(a++),i));return s}toString(e,i,s){return e?Rv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:i}):JSON.stringify(this)}static from(e,i,s){const{replacer:a}=s,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof a=="function"){const d=i instanceof Set?f:String(u++);f=a.call(i,d,f)}o.items.push(nl(f,void 0,s))}}return o}}function ko(n){let e=Re(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const kr={collection:"seq",default:!0,nodeClass:Ci,tag:"tag:yaml.org,2002:seq",resolve(n,e){return Nr(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Ci.from(n,e,i)},Sc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,s){return e=Object.assign({actualString:!0},e),ll(n,e,i,s)}},wc={identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new he(null),stringify:({source:n},e)=>typeof n=="string"&&wc.test.test(n)?n:e.options.nullStr},yd={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new he(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&yd.test.test(n)){const s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?i.options.trueStr:i.options.falseStr}};function gn({format:n,minFractionDigits:e,tag:i,value:s}){if(typeof s=="bigint")return String(s);const a=typeof s=="number"?s:Number(s);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=JSON.stringify(s);if(!n&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let u=o.indexOf(".");u<0&&(u=o.length,o+=".");let f=e-(o.length-u-1);for(;f-- >0;)o+="0"}return o}const Lv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},jv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():gn(n)}},Dv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new he(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:gn},xc=n=>typeof n=="bigint"||Number.isInteger(n),bd=(n,e,i,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),i);function Bv(n,e,i){const{value:s}=n;return xc(s)&&s>=0?i+s.toString(e):gn(n)}const Uv={identify:n=>xc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>bd(n,2,8,i),stringify:n=>Bv(n,8,"0o")},zv={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>bd(n,0,10,i),stringify:gn},Hv={identify:n=>xc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>bd(n,2,16,i),stringify:n=>Bv(n,16,"0x")},BA=[Cr,kr,Sc,wc,yd,Uv,zv,Hv,Lv,jv,Dv];function h0(n){return typeof n=="bigint"||Number.isInteger(n)}const Mo=({value:n})=>JSON.stringify(n),UA=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Mo},{identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Mo},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:Mo},{identify:h0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:i})=>i?BigInt(n):parseInt(n,10),stringify:({value:n})=>h0(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Mo}],zA={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},HA=[Cr,kr].concat(UA,zA),vd={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){const i=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(i.length);for(let a=0;a<i.length;++a)s[a]=i.charCodeAt(a);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:i},s,a,o){const u=i;let f;if(typeof Buffer=="function")f=u instanceof Buffer?u.toString("base64"):Buffer.from(u.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<u.length;++p)d+=String.fromCharCode(u[p]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=he.BLOCK_LITERAL),e!==he.QUOTE_DOUBLE){const d=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),p=Math.ceil(f.length/d),m=new Array(p);for(let y=0,b=0;y<p;++y,b+=d)m[y]=f.substr(b,d);f=m.join(e===he.BLOCK_LITERAL?`
179
+ `:" ")}return ll({comment:n,type:e,value:f},s,a,o)}};function qv(n,e){if(Nr(n))for(let i=0;i<n.items.length;++i){let s=n.items[i];if(!Be(s)){if(Ar(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const a=s.items[0]||new yt(new he(null));if(s.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${s.commentBefore}
180
180
  ${a.key.commentBefore}`:s.commentBefore),s.comment){const o=a.value??a.key;o.comment=o.comment?`${s.comment}
181
- ${o.comment}`:s.comment}s=a}n.items[i]=Be(s)?s:new yt(s)}}else e("Expected a sequence for this tag");return n}function Hv(n,e,i){const{replacer:s}=i,a=new Ci(n);a.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof s=="function"&&(u=s.call(e,String(o++),u));let f,d;if(Array.isArray(u))if(u.length===2)f=u[0],d=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const p=Object.keys(u);if(p.length===1)f=p[0],d=u[f];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else f=u;a.items.push(md(f,d,i))}return a}const Sd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:zv,createNode:Hv};class mr extends Ci{constructor(){super(),this.add=Vt.prototype.add.bind(this),this.delete=Vt.prototype.delete.bind(this),this.get=Vt.prototype.get.bind(this),this.has=Vt.prototype.has.bind(this),this.set=Vt.prototype.set.bind(this),this.tag=mr.tag}toJSON(e,i){if(!i)return super.toJSON(e);const s=new Map;i!=null&&i.onCreate&&i.onCreate(s);for(const a of this.items){let o,u;if(Be(a)?(o=an(a.key,"",i),u=an(a.value,o,i)):o=an(a,"",i),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,u)}return s}static from(e,i,s){const a=Hv(e,i,s),o=new this;return o.items=a.items,o}}mr.tag="tag:yaml.org,2002:omap";const wd={collection:"seq",identify:n=>n instanceof Map,nodeClass:mr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=zv(n,e),s=[];for(const{key:a}of i.items)Re(a)&&(s.includes(a.value)?e(`Ordered maps must not include duplicate keys: ${a.value}`):s.push(a.value));return Object.assign(new mr,i)},createNode:(n,e,i)=>mr.from(n,e,i)};function qv({value:n,source:e},i){return e&&(n?$v:Iv).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const $v={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new he(!0),stringify:qv},Iv={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new he(!1),stringify:qv},zA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},HA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():gn(n)}},qA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new he(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const s=n.substring(i+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:gn},ll=n=>typeof n=="bigint"||Number.isInteger(n);function _c(n,e,i,{intAsBigInt:s}){const a=n[0];if((a==="-"||a==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(i){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return a==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return a==="-"?-1*o:o}function xd(n,e,i){const{value:s}=n;if(ll(s)){const a=s.toString(e);return s<0?"-"+i+a.substr(1):i+a}return gn(n)}const $A={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>_c(n,2,2,i),stringify:n=>xd(n,2,"0b")},IA={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>_c(n,1,8,i),stringify:n=>xd(n,8,"0")},VA={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>_c(n,0,10,i),stringify:gn},GA={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>_c(n,2,16,i),stringify:n=>xd(n,16,"0x")};class yr extends Vt{constructor(e){super(e),this.tag=yr.tag}add(e){let i;Be(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new yt(e.key,null):i=new yt(e,null),ss(this.items,i.key)||this.items.push(i)}get(e,i){const s=ss(this.items,e);return!i&&Be(s)?Re(s.key)?s.key.value:s.key:s}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const s=ss(this.items,e);s&&!i?this.items.splice(this.items.indexOf(s),1):!s&&i&&this.items.push(new yt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,s);throw new Error("Set items must all have null values")}static from(e,i,s){const{replacer:a}=s,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let u of i)typeof a=="function"&&(u=a.call(i,u,u)),o.items.push(md(u,null,s));return o}}yr.tag="tag:yaml.org,2002:set";const _d={collection:"map",identify:n=>n instanceof Set,nodeClass:yr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>yr.from(n,e,i),resolve(n,e){if(Ar(n)){if(n.hasAllNullValues(!0))return Object.assign(new yr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Td(n,e){const i=n[0],s=i==="-"||i==="+"?n.substring(1):n,a=u=>e?BigInt(u):Number(u),o=s.replace(/_/g,"").split(":").reduce((u,f)=>u*a(60)+a(f),a(0));return i==="-"?a(-1)*o:o}function Vv(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return gn(n);let s="";e<0&&(s="-",e*=i(-1));const a=i(60),o=[e%a];return e<60?o.unshift(0):(e=(e-o[0])/a,o.unshift(e%a),e>=60&&(e=(e-o[0])/a,o.unshift(e))),s+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Gv={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:i})=>Td(n,i),stringify:Vv},Kv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Td(n,!1),stringify:Vv},Tc={identify:n=>n 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(n){const e=n.match(Tc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,s,a,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(i,s-1,a,o||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=Td(m,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:n})=>n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},d0=[Cr,kr,Sc,wc,$v,Iv,$A,IA,VA,GA,zA,HA,qA,vd,Fn,wd,Sd,_d,Gv,Kv,Tc],p0=new Map([["core",jA],["failsafe",[Cr,kr,Sc]],["json",UA],["yaml11",d0],["yaml-1.1",d0]]),g0={binary:vd,bool:yd,float:Lv,floatExp:Rv,floatNaN:Ov,floatTime:Kv,int:Bv,intHex:Uv,intOct:Dv,intTime:Gv,map:Cr,merge:Fn,null:wc,omap:wd,pairs:Sd,seq:kr,set:_d,timestamp:Tc},KA={"tag:yaml.org,2002:binary":vd,"tag:yaml.org,2002:merge":Fn,"tag:yaml.org,2002:omap":wd,"tag:yaml.org,2002:pairs":Sd,"tag:yaml.org,2002:set":_d,"tag:yaml.org,2002:timestamp":Tc};function uh(n,e,i){const s=p0.get(e);if(s&&!n)return i&&!s.includes(Fn)?s.concat(Fn):s.slice();let a=s;if(!a)if(Array.isArray(n))a=[];else{const o=Array.from(p0.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(n))for(const o of n)a=a.concat(o);else typeof n=="function"&&(a=n(a.slice()));return i&&(a=a.concat(Fn)),a.reduce((o,u)=>{const f=typeof u=="string"?g0[u]:u;if(!f){const d=JSON.stringify(u),p=Object.keys(g0).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return o.includes(f)||o.push(f),o},[])}const YA=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class Ec{constructor({compat:e,customTags:i,merge:s,resolveKnownTags:a,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?uh(e,"compat"):e?uh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=a?KA:{},this.tags=uh(i,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,Ai,{value:Cr}),Object.defineProperty(this,Tn,{value:Sc}),Object.defineProperty(this,Er,{value:kr}),this.sortMapEntries=typeof u=="function"?u:u===!0?YA:null}clone(){const e=Object.create(Ec.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function XA(n,e){var d;const i=[];let s=e.directives===!0;if(e.directives!==!1&&n.directives){const p=n.directives.toString(n);p?(i.push(p),s=!0):n.directives.docStart&&(s=!0)}s&&i.push("---");const a=Av(n,e),{commentString:o}=a.options;if(n.commentBefore){i.length!==1&&i.unshift("");const p=o(n.commentBefore);i.unshift(Pn(p,""))}let u=!1,f=null;if(n.contents){if(qe(n.contents)){if(n.contents.spaceBefore&&s&&i.push(""),n.contents.commentBefore){const y=o(n.contents.commentBefore);i.push(Pn(y,""))}a.forceBlockIndent=!!n.comment,f=n.contents.comment}const p=f?void 0:()=>u=!0;let m=vr(n.contents,a,()=>f=null,p);f&&(m+=is(m,"",o(f))),(m[0]==="|"||m[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${m}`:i.push(m)}else i.push(vr(n.contents,a));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const p=o(n.comment);p.includes(`
181
+ ${o.comment}`:s.comment}s=a}n.items[i]=Be(s)?s:new yt(s)}}else e("Expected a sequence for this tag");return n}function $v(n,e,i){const{replacer:s}=i,a=new Ci(n);a.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof s=="function"&&(u=s.call(e,String(o++),u));let f,d;if(Array.isArray(u))if(u.length===2)f=u[0],d=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const p=Object.keys(u);if(p.length===1)f=p[0],d=u[f];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else f=u;a.items.push(md(f,d,i))}return a}const Sd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:qv,createNode:$v};class mr extends Ci{constructor(){super(),this.add=Vt.prototype.add.bind(this),this.delete=Vt.prototype.delete.bind(this),this.get=Vt.prototype.get.bind(this),this.has=Vt.prototype.has.bind(this),this.set=Vt.prototype.set.bind(this),this.tag=mr.tag}toJSON(e,i){if(!i)return super.toJSON(e);const s=new Map;i!=null&&i.onCreate&&i.onCreate(s);for(const a of this.items){let o,u;if(Be(a)?(o=an(a.key,"",i),u=an(a.value,o,i)):o=an(a,"",i),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,u)}return s}static from(e,i,s){const a=$v(e,i,s),o=new this;return o.items=a.items,o}}mr.tag="tag:yaml.org,2002:omap";const wd={collection:"seq",identify:n=>n instanceof Map,nodeClass:mr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=qv(n,e),s=[];for(const{key:a}of i.items)Re(a)&&(s.includes(a.value)?e(`Ordered maps must not include duplicate keys: ${a.value}`):s.push(a.value));return Object.assign(new mr,i)},createNode:(n,e,i)=>mr.from(n,e,i)};function Iv({value:n,source:e},i){return e&&(n?Vv:Gv).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const Vv={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new he(!0),stringify:Iv},Gv={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new he(!1),stringify:Iv},qA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},$A={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():gn(n)}},IA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new he(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const s=n.substring(i+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:gn},ol=n=>typeof n=="bigint"||Number.isInteger(n);function _c(n,e,i,{intAsBigInt:s}){const a=n[0];if((a==="-"||a==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(i){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return a==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return a==="-"?-1*o:o}function xd(n,e,i){const{value:s}=n;if(ol(s)){const a=s.toString(e);return s<0?"-"+i+a.substr(1):i+a}return gn(n)}const VA={identify:ol,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>_c(n,2,2,i),stringify:n=>xd(n,2,"0b")},GA={identify:ol,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>_c(n,1,8,i),stringify:n=>xd(n,8,"0")},KA={identify:ol,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>_c(n,0,10,i),stringify:gn},YA={identify:ol,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>_c(n,2,16,i),stringify:n=>xd(n,16,"0x")};class yr extends Vt{constructor(e){super(e),this.tag=yr.tag}add(e){let i;Be(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new yt(e.key,null):i=new yt(e,null),ss(this.items,i.key)||this.items.push(i)}get(e,i){const s=ss(this.items,e);return!i&&Be(s)?Re(s.key)?s.key.value:s.key:s}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const s=ss(this.items,e);s&&!i?this.items.splice(this.items.indexOf(s),1):!s&&i&&this.items.push(new yt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,s);throw new Error("Set items must all have null values")}static from(e,i,s){const{replacer:a}=s,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let u of i)typeof a=="function"&&(u=a.call(i,u,u)),o.items.push(md(u,null,s));return o}}yr.tag="tag:yaml.org,2002:set";const _d={collection:"map",identify:n=>n instanceof Set,nodeClass:yr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>yr.from(n,e,i),resolve(n,e){if(Ar(n)){if(n.hasAllNullValues(!0))return Object.assign(new yr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Td(n,e){const i=n[0],s=i==="-"||i==="+"?n.substring(1):n,a=u=>e?BigInt(u):Number(u),o=s.replace(/_/g,"").split(":").reduce((u,f)=>u*a(60)+a(f),a(0));return i==="-"?a(-1)*o:o}function Kv(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return gn(n);let s="";e<0&&(s="-",e*=i(-1));const a=i(60),o=[e%a];return e<60?o.unshift(0):(e=(e-o[0])/a,o.unshift(e%a),e>=60&&(e=(e-o[0])/a,o.unshift(e))),s+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Yv={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:i})=>Td(n,i),stringify:Kv},Xv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Td(n,!1),stringify:Kv},Tc={identify:n=>n 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(n){const e=n.match(Tc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,s,a,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(i,s-1,a,o||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=Td(m,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:n})=>n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},d0=[Cr,kr,Sc,wc,Vv,Gv,VA,GA,KA,YA,qA,$A,IA,vd,Fn,wd,Sd,_d,Yv,Xv,Tc],p0=new Map([["core",BA],["failsafe",[Cr,kr,Sc]],["json",HA],["yaml11",d0],["yaml-1.1",d0]]),g0={binary:vd,bool:yd,float:Dv,floatExp:jv,floatNaN:Lv,floatTime:Xv,int:zv,intHex:Hv,intOct:Uv,intTime:Yv,map:Cr,merge:Fn,null:wc,omap:wd,pairs:Sd,seq:kr,set:_d,timestamp:Tc},XA={"tag:yaml.org,2002:binary":vd,"tag:yaml.org,2002:merge":Fn,"tag:yaml.org,2002:omap":wd,"tag:yaml.org,2002:pairs":Sd,"tag:yaml.org,2002:set":_d,"tag:yaml.org,2002:timestamp":Tc};function uh(n,e,i){const s=p0.get(e);if(s&&!n)return i&&!s.includes(Fn)?s.concat(Fn):s.slice();let a=s;if(!a)if(Array.isArray(n))a=[];else{const o=Array.from(p0.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(n))for(const o of n)a=a.concat(o);else typeof n=="function"&&(a=n(a.slice()));return i&&(a=a.concat(Fn)),a.reduce((o,u)=>{const f=typeof u=="string"?g0[u]:u;if(!f){const d=JSON.stringify(u),p=Object.keys(g0).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return o.includes(f)||o.push(f),o},[])}const PA=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class Ec{constructor({compat:e,customTags:i,merge:s,resolveKnownTags:a,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?uh(e,"compat"):e?uh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=a?XA:{},this.tags=uh(i,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,Ai,{value:Cr}),Object.defineProperty(this,Tn,{value:Sc}),Object.defineProperty(this,Er,{value:kr}),this.sortMapEntries=typeof u=="function"?u:u===!0?PA:null}clone(){const e=Object.create(Ec.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function FA(n,e){var d;const i=[];let s=e.directives===!0;if(e.directives!==!1&&n.directives){const p=n.directives.toString(n);p?(i.push(p),s=!0):n.directives.docStart&&(s=!0)}s&&i.push("---");const a=Cv(n,e),{commentString:o}=a.options;if(n.commentBefore){i.length!==1&&i.unshift("");const p=o(n.commentBefore);i.unshift(Pn(p,""))}let u=!1,f=null;if(n.contents){if(qe(n.contents)){if(n.contents.spaceBefore&&s&&i.push(""),n.contents.commentBefore){const y=o(n.contents.commentBefore);i.push(Pn(y,""))}a.forceBlockIndent=!!n.comment,f=n.contents.comment}const p=f?void 0:()=>u=!0;let m=vr(n.contents,a,()=>f=null,p);f&&(m+=is(m,"",o(f))),(m[0]==="|"||m[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${m}`:i.push(m)}else i.push(vr(n.contents,a));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const p=o(n.comment);p.includes(`
182
182
  `)?(i.push("..."),i.push(Pn(p,""))):i.push(`... ${p}`)}else i.push("...");else{let p=n.comment;p&&u&&(p=p.replace(/^\n+/,"")),p&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(Pn(o(p),"")))}return i.join(`
183
183
  `)+`
184
- `}class Mr{constructor(e,i,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ln,{value:Mh});let a=null;typeof i=="function"||Array.isArray(i)?a=i:s===void 0&&i&&(s=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:u}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new wt({version:u}),this.setSchema(u,s),this.contents=e===void 0?null:this.createNode(e,a,s)}clone(){const e=Object.create(Mr.prototype,{[ln]:{value:Mh}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=qe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){rr(this.contents)&&this.contents.add(e)}addIn(e,i){rr(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const s=wv(this);e.anchor=!i||s.has(i)?xv(i||"a",s):i}return new mc(e.anchor)}createNode(e,i,s){let a;if(typeof i=="function")e=i.call({"":e},"",e),a=i;else if(Array.isArray(i)){const T=k=>typeof k=="number"||k instanceof String||k instanceof Number,C=i.filter(T).map(String);C.length>0&&(i=i.concat(C)),a=i}else s===void 0&&i&&(s=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:p,tag:m}=s??{},{onAnchor:y,setAnchors:b,sourceObjects:v}=wA(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:a,schema:this.schema,sourceObjects:v},x=tl(e,m,E);return f&&He(x)&&(x.flow=!0),b(),x}createPair(e,i,s={}){const a=this.createNode(e,null,s),o=this.createNode(i,null,s);return new yt(a,o)}delete(e){return rr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Va(e)?this.contents==null?!1:(this.contents=null,!0):rr(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return He(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Va(e)?!i&&Re(this.contents)?this.contents.value:this.contents:He(this.contents)?this.contents.getIn(e,i):void 0}has(e){return He(this.contents)?this.contents.has(e):!1}hasIn(e){return Va(e)?this.contents!==void 0:He(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=sc(this.schema,[e],i):rr(this.contents)&&this.contents.set(e,i)}setIn(e,i){Va(e)?this.contents=i:this.contents==null?this.contents=sc(this.schema,Array.from(e),i):rr(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wt({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new wt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const a=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(s)this.schema=new Ec(Object.assign(s,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:s,maxAliasCount:a,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},d=an(this.contents,i??"",f);if(typeof o=="function")for(const{count:p,res:m}of f.anchors.values())o(m,p);return typeof u=="function"?dr(u,{"":d},"",d):d}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return XA(this,e)}}function rr(n){if(He(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Ed extends Error{constructor(e,i,s,a){super(),this.name=e,this.code=s,this.message=a,this.pos=i}}class rs extends Ed{constructor(e,i,s){super("YAMLParseError",e,i,s)}}class Yv extends Ed{constructor(e,i,s){super("YAMLWarning",e,i,s)}}const ac=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:s,col:a}=i.linePos[0];i.message+=` at line ${s}, column ${a}`;let o=a-1,u=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&u.length>80){const f=Math.min(o-39,u.length-79);u="…"+u.substring(f),o-=f-1}if(u.length>80&&(u=u.substring(0,79)+"…"),s>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);f.length>80&&(f=f.substring(0,79)+`…
184
+ `}class Mr{constructor(e,i,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ln,{value:Mh});let a=null;typeof i=="function"||Array.isArray(i)?a=i:s===void 0&&i&&(s=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:u}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new wt({version:u}),this.setSchema(u,s),this.contents=e===void 0?null:this.createNode(e,a,s)}clone(){const e=Object.create(Mr.prototype,{[ln]:{value:Mh}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=qe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){rr(this.contents)&&this.contents.add(e)}addIn(e,i){rr(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const s=_v(this);e.anchor=!i||s.has(i)?Tv(i||"a",s):i}return new mc(e.anchor)}createNode(e,i,s){let a;if(typeof i=="function")e=i.call({"":e},"",e),a=i;else if(Array.isArray(i)){const T=k=>typeof k=="number"||k instanceof String||k instanceof Number,C=i.filter(T).map(String);C.length>0&&(i=i.concat(C)),a=i}else s===void 0&&i&&(s=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:p,tag:m}=s??{},{onAnchor:y,setAnchors:b,sourceObjects:v}=_A(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:a,schema:this.schema,sourceObjects:v},x=nl(e,m,E);return f&&He(x)&&(x.flow=!0),b(),x}createPair(e,i,s={}){const a=this.createNode(e,null,s),o=this.createNode(i,null,s);return new yt(a,o)}delete(e){return rr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Va(e)?this.contents==null?!1:(this.contents=null,!0):rr(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return He(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Va(e)?!i&&Re(this.contents)?this.contents.value:this.contents:He(this.contents)?this.contents.getIn(e,i):void 0}has(e){return He(this.contents)?this.contents.has(e):!1}hasIn(e){return Va(e)?this.contents!==void 0:He(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=sc(this.schema,[e],i):rr(this.contents)&&this.contents.set(e,i)}setIn(e,i){Va(e)?this.contents=i:this.contents==null?this.contents=sc(this.schema,Array.from(e),i):rr(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wt({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new wt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const a=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(s)this.schema=new Ec(Object.assign(s,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:s,maxAliasCount:a,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},d=an(this.contents,i??"",f);if(typeof o=="function")for(const{count:p,res:m}of f.anchors.values())o(m,p);return typeof u=="function"?dr(u,{"":d},"",d):d}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return FA(this,e)}}function rr(n){if(He(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Ed extends Error{constructor(e,i,s,a){super(),this.name=e,this.code=s,this.message=a,this.pos=i}}class rs extends Ed{constructor(e,i,s){super("YAMLParseError",e,i,s)}}class Pv extends Ed{constructor(e,i,s){super("YAMLWarning",e,i,s)}}const ac=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:s,col:a}=i.linePos[0];i.message+=` at line ${s}, column ${a}`;let o=a-1,u=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&u.length>80){const f=Math.min(o-39,u.length-79);u="…"+u.substring(f),o-=f-1}if(u.length>80&&(u=u.substring(0,79)+"…"),s>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);f.length>80&&(f=f.substring(0,79)+`…
185
185
  `),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=i.linePos[1];d&&d.line===s&&d.col>a&&(f=Math.max(1,Math.min(d.col-a,80-o)));const p=" ".repeat(o)+"^".repeat(f);i.message+=`:
186
186
 
187
187
  ${u}
188
188
  ${p}
189
- `}};function Sr(n,{flow:e,indicator:i,next:s,offset:a,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,p=f,m=f,y="",b="",v=!1,E=!1,x=null,T=null,C=null,k=null,$=null,V=null,R=null;for(const H of n)switch(E&&(H.type!=="space"&&H.type!=="newline"&&H.type!=="comma"&&o(H.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(p&&H.type!=="comment"&&H.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),H.type){case"space":!e&&(i!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&H.source.includes(" ")&&(x=H),m=!0;break;case"comment":{m||o(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const L=H.source.substring(1)||" ";y?y+=b+L:y=L,b="",p=!1;break}case"newline":p?y?y+=H.source:d=!0:b+=H.source,p=!0,v=!0,(T||C)&&(k=H),m=!0;break;case"anchor":T&&o(H,"MULTIPLE_ANCHORS","A node can have at most one anchor"),H.source.endsWith(":")&&o(H.offset+H.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),T=H,R===null&&(R=H.offset),p=!1,m=!1,E=!0;break;case"tag":{C&&o(H,"MULTIPLE_TAGS","A node can have at most one tag"),C=H,R===null&&(R=H.offset),p=!1,m=!1,E=!0;break}case i:(T||C)&&o(H,"BAD_PROP_ORDER",`Anchors and tags must be after the ${H.source} indicator`),V&&o(H,"UNEXPECTED_TOKEN",`Unexpected ${H.source} in ${e??"collection"}`),V=H,p=i==="seq-item-ind"||i==="explicit-key-ind",m=!1;break;case"comma":if(e){$&&o(H,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),$=H,p=!1,m=!1;break}default:o(H,"UNEXPECTED_TOKEN",`Unexpected ${H.type} token`),p=!1,m=!1}const G=n[n.length-1],Z=G?G.offset+G.source.length:a;return E&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(p&&x.indent<=u||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:$,found:V,spaceBefore:d,comment:y,hasNewline:v,anchor:T,tag:C,newlineAfterProp:k,end:Z,start:R??Z}}function nl(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
190
- `))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(nl(e.key)||nl(e.value))return!0}return!1;default:return!0}}function jh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&nl(e)&&i(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Xv(n,e,i){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const a=typeof s=="function"?s:(o,u)=>o===u||Re(o)&&Re(u)&&o.value===u.value;return e.some(o=>a(o.key,i))}const m0="All mapping items must start at the same column";function PA({composeNode:n,composeEmptyNode:e},i,s,a,o){var m;const u=(o==null?void 0:o.nodeClass)??Vt,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let d=s.offset,p=null;for(const y of s.items){const{start:b,key:v,sep:E,value:x}=y,T=Sr(b,{indicator:"explicit-key-ind",next:v??(E==null?void 0:E[0]),offset:d,onError:a,parentIndent:s.indent,startOnNewline:!0}),C=!T.found;if(C){if(v&&(v.type==="block-seq"?a(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==s.indent&&a(d,"BAD_INDENT",m0)),!T.anchor&&!T.tag&&!E){p=T.end,T.comment&&(f.comment?f.comment+=`
191
- `+T.comment:f.comment=T.comment);continue}(T.newlineAfterProp||nl(v))&&a(v??b[b.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=T.found)==null?void 0:m.indent)!==s.indent&&a(d,"BAD_INDENT",m0);i.atKey=!0;const k=T.end,$=v?n(i,v,T,a):e(i,k,b,null,T,a);i.schema.compat&&jh(s.indent,v,a),i.atKey=!1,Xv(i,f.items,$)&&a(k,"DUPLICATE_KEY","Map keys must be unique");const V=Sr(E??[],{indicator:"map-value-ind",next:x,offset:$.range[2],onError:a,parentIndent:s.indent,startOnNewline:!v||v.type==="block-scalar"});if(d=V.end,V.found){C&&((x==null?void 0:x.type)==="block-map"&&!V.hasNewline&&a(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&T.start<V.found.offset-1024&&a($.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const R=x?n(i,x,V,a):e(i,d,E,null,V,a);i.schema.compat&&jh(s.indent,x,a),d=R.range[2];const G=new yt($,R);i.options.keepSourceTokens&&(G.srcToken=y),f.items.push(G)}else{C&&a($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),V.comment&&($.comment?$.comment+=`
192
- `+V.comment:$.comment=V.comment);const R=new yt($);i.options.keepSourceTokens&&(R.srcToken=y),f.items.push(R)}}return p&&p<d&&a(p,"IMPOSSIBLE","Map comment with trailing content"),f.range=[s.offset,d,p??d],f}function FA({composeNode:n,composeEmptyNode:e},i,s,a,o){const u=(o==null?void 0:o.nodeClass)??Ci,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=s.offset,p=null;for(const{start:m,value:y}of s.items){const b=Sr(m,{indicator:"seq-item-ind",next:y,offset:d,onError:a,parentIndent:s.indent,startOnNewline:!0});if(!b.found)if(b.anchor||b.tag||y)y&&y.type==="block-seq"?a(b.end,"BAD_INDENT","All sequence items must start at the same column"):a(d,"MISSING_CHAR","Sequence item without - indicator");else{p=b.end,b.comment&&(f.comment=b.comment);continue}const v=y?n(i,y,b,a):e(i,b.end,m,null,b,a);i.schema.compat&&jh(s.indent,y,a),d=v.range[2],f.items.push(v)}return f.range=[s.offset,d,p??d],f}function ol(n,e,i,s){let a="";if(n){let o=!1,u="";for(const f of n){const{source:d,type:p}=f;switch(p){case"space":o=!0;break;case"comment":{i&&!o&&s(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";a?a+=u+m:a=m,u="";break}case"newline":a&&(u+=d),o=!0;break;default:s(f,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:a,offset:e}}const fh="Block collections are not allowed within flow collections",hh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function QA({composeNode:n,composeEmptyNode:e},i,s,a,o){const u=s.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?Vt:Ci),p=new d(i.schema);p.flow=!0;const m=i.atRoot;m&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let y=s.offset+s.start.source.length;for(let T=0;T<s.items.length;++T){const C=s.items[T],{start:k,key:$,sep:V,value:R}=C,G=Sr(k,{flow:f,indicator:"explicit-key-ind",next:$??(V==null?void 0:V[0]),offset:y,onError:a,parentIndent:s.indent,startOnNewline:!1});if(!G.found){if(!G.anchor&&!G.tag&&!V&&!R){T===0&&G.comma?a(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):T<s.items.length-1&&a(G.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),G.comment&&(p.comment?p.comment+=`
193
- `+G.comment:p.comment=G.comment),y=G.end;continue}!u&&i.options.strict&&nl($)&&a($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(T===0)G.comma&&a(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(G.comma||a(G.start,"MISSING_CHAR",`Missing , between ${f} items`),G.comment){let Z="";e:for(const H of k)switch(H.type){case"comma":case"space":break;case"comment":Z=H.source.substring(1);break e;default:break e}if(Z){let H=p.items[p.items.length-1];Be(H)&&(H=H.value??H.key),H.comment?H.comment+=`
189
+ `}};function Sr(n,{flow:e,indicator:i,next:s,offset:a,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,p=f,m=f,y="",b="",v=!1,E=!1,x=null,T=null,C=null,k=null,$=null,V=null,R=null;for(const H of n)switch(E&&(H.type!=="space"&&H.type!=="newline"&&H.type!=="comma"&&o(H.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(p&&H.type!=="comment"&&H.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),H.type){case"space":!e&&(i!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&H.source.includes(" ")&&(x=H),m=!0;break;case"comment":{m||o(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const L=H.source.substring(1)||" ";y?y+=b+L:y=L,b="",p=!1;break}case"newline":p?y?y+=H.source:d=!0:b+=H.source,p=!0,v=!0,(T||C)&&(k=H),m=!0;break;case"anchor":T&&o(H,"MULTIPLE_ANCHORS","A node can have at most one anchor"),H.source.endsWith(":")&&o(H.offset+H.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),T=H,R===null&&(R=H.offset),p=!1,m=!1,E=!0;break;case"tag":{C&&o(H,"MULTIPLE_TAGS","A node can have at most one tag"),C=H,R===null&&(R=H.offset),p=!1,m=!1,E=!0;break}case i:(T||C)&&o(H,"BAD_PROP_ORDER",`Anchors and tags must be after the ${H.source} indicator`),V&&o(H,"UNEXPECTED_TOKEN",`Unexpected ${H.source} in ${e??"collection"}`),V=H,p=i==="seq-item-ind"||i==="explicit-key-ind",m=!1;break;case"comma":if(e){$&&o(H,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),$=H,p=!1,m=!1;break}default:o(H,"UNEXPECTED_TOKEN",`Unexpected ${H.type} token`),p=!1,m=!1}const G=n[n.length-1],Z=G?G.offset+G.source.length:a;return E&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(p&&x.indent<=u||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:$,found:V,spaceBefore:d,comment:y,hasNewline:v,anchor:T,tag:C,newlineAfterProp:k,end:Z,start:R??Z}}function il(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
190
+ `))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(il(e.key)||il(e.value))return!0}return!1;default:return!0}}function jh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&il(e)&&i(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Fv(n,e,i){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const a=typeof s=="function"?s:(o,u)=>o===u||Re(o)&&Re(u)&&o.value===u.value;return e.some(o=>a(o.key,i))}const m0="All mapping items must start at the same column";function QA({composeNode:n,composeEmptyNode:e},i,s,a,o){var m;const u=(o==null?void 0:o.nodeClass)??Vt,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let d=s.offset,p=null;for(const y of s.items){const{start:b,key:v,sep:E,value:x}=y,T=Sr(b,{indicator:"explicit-key-ind",next:v??(E==null?void 0:E[0]),offset:d,onError:a,parentIndent:s.indent,startOnNewline:!0}),C=!T.found;if(C){if(v&&(v.type==="block-seq"?a(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==s.indent&&a(d,"BAD_INDENT",m0)),!T.anchor&&!T.tag&&!E){p=T.end,T.comment&&(f.comment?f.comment+=`
191
+ `+T.comment:f.comment=T.comment);continue}(T.newlineAfterProp||il(v))&&a(v??b[b.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=T.found)==null?void 0:m.indent)!==s.indent&&a(d,"BAD_INDENT",m0);i.atKey=!0;const k=T.end,$=v?n(i,v,T,a):e(i,k,b,null,T,a);i.schema.compat&&jh(s.indent,v,a),i.atKey=!1,Fv(i,f.items,$)&&a(k,"DUPLICATE_KEY","Map keys must be unique");const V=Sr(E??[],{indicator:"map-value-ind",next:x,offset:$.range[2],onError:a,parentIndent:s.indent,startOnNewline:!v||v.type==="block-scalar"});if(d=V.end,V.found){C&&((x==null?void 0:x.type)==="block-map"&&!V.hasNewline&&a(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&T.start<V.found.offset-1024&&a($.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const R=x?n(i,x,V,a):e(i,d,E,null,V,a);i.schema.compat&&jh(s.indent,x,a),d=R.range[2];const G=new yt($,R);i.options.keepSourceTokens&&(G.srcToken=y),f.items.push(G)}else{C&&a($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),V.comment&&($.comment?$.comment+=`
192
+ `+V.comment:$.comment=V.comment);const R=new yt($);i.options.keepSourceTokens&&(R.srcToken=y),f.items.push(R)}}return p&&p<d&&a(p,"IMPOSSIBLE","Map comment with trailing content"),f.range=[s.offset,d,p??d],f}function ZA({composeNode:n,composeEmptyNode:e},i,s,a,o){const u=(o==null?void 0:o.nodeClass)??Ci,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=s.offset,p=null;for(const{start:m,value:y}of s.items){const b=Sr(m,{indicator:"seq-item-ind",next:y,offset:d,onError:a,parentIndent:s.indent,startOnNewline:!0});if(!b.found)if(b.anchor||b.tag||y)y&&y.type==="block-seq"?a(b.end,"BAD_INDENT","All sequence items must start at the same column"):a(d,"MISSING_CHAR","Sequence item without - indicator");else{p=b.end,b.comment&&(f.comment=b.comment);continue}const v=y?n(i,y,b,a):e(i,b.end,m,null,b,a);i.schema.compat&&jh(s.indent,y,a),d=v.range[2],f.items.push(v)}return f.range=[s.offset,d,p??d],f}function cl(n,e,i,s){let a="";if(n){let o=!1,u="";for(const f of n){const{source:d,type:p}=f;switch(p){case"space":o=!0;break;case"comment":{i&&!o&&s(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";a?a+=u+m:a=m,u="";break}case"newline":a&&(u+=d),o=!0;break;default:s(f,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:a,offset:e}}const fh="Block collections are not allowed within flow collections",hh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function JA({composeNode:n,composeEmptyNode:e},i,s,a,o){const u=s.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?Vt:Ci),p=new d(i.schema);p.flow=!0;const m=i.atRoot;m&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let y=s.offset+s.start.source.length;for(let T=0;T<s.items.length;++T){const C=s.items[T],{start:k,key:$,sep:V,value:R}=C,G=Sr(k,{flow:f,indicator:"explicit-key-ind",next:$??(V==null?void 0:V[0]),offset:y,onError:a,parentIndent:s.indent,startOnNewline:!1});if(!G.found){if(!G.anchor&&!G.tag&&!V&&!R){T===0&&G.comma?a(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):T<s.items.length-1&&a(G.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),G.comment&&(p.comment?p.comment+=`
193
+ `+G.comment:p.comment=G.comment),y=G.end;continue}!u&&i.options.strict&&il($)&&a($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(T===0)G.comma&&a(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(G.comma||a(G.start,"MISSING_CHAR",`Missing , between ${f} items`),G.comment){let Z="";e:for(const H of k)switch(H.type){case"comma":case"space":break;case"comment":Z=H.source.substring(1);break e;default:break e}if(Z){let H=p.items[p.items.length-1];Be(H)&&(H=H.value??H.key),H.comment?H.comment+=`
194
194
  `+Z:H.comment=Z,G.comment=G.comment.substring(Z.length+1)}}if(!u&&!V&&!G.found){const Z=R?n(i,R,G,a):e(i,G.end,V,null,G,a);p.items.push(Z),y=Z.range[2],hh(R)&&a(Z.range,"BLOCK_IN_FLOW",fh)}else{i.atKey=!0;const Z=G.end,H=$?n(i,$,G,a):e(i,Z,k,null,G,a);hh($)&&a(H.range,"BLOCK_IN_FLOW",fh),i.atKey=!1;const L=Sr(V??[],{flow:f,indicator:"map-value-ind",next:R,offset:H.range[2],onError:a,parentIndent:s.indent,startOnNewline:!1});if(L.found){if(!u&&!G.found&&i.options.strict){if(V)for(const I of V){if(I===L.found)break;if(I.type==="newline"){a(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}G.start<L.found.offset-1024&&a(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else R&&("source"in R&&R.source&&R.source[0]===":"?a(R,"MISSING_CHAR",`Missing space after : in ${f}`):a(L.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const ie=R?n(i,R,L,a):L.found?e(i,L.end,V,null,L,a):null;ie?hh(R)&&a(ie.range,"BLOCK_IN_FLOW",fh):L.comment&&(H.comment?H.comment+=`
195
- `+L.comment:H.comment=L.comment);const le=new yt(H,ie);if(i.options.keepSourceTokens&&(le.srcToken=C),u){const I=p;Xv(i,I.items,H)&&a(Z,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(le)}else{const I=new Vt(i.schema);I.flow=!0,I.items.push(le);const F=(ie??H).range;I.range=[H.range[0],F[1],F[2]],p.items.push(I)}y=ie?ie.range[2]:L.end}}const b=u?"}":"]",[v,...E]=s.end;let x=y;if(v&&v.source===b)x=v.offset+v.source.length;else{const T=f[0].toUpperCase()+f.substring(1),C=m?`${T} must end with a ${b}`:`${T} in block collection must be sufficiently indented and end with a ${b}`;a(y,m?"MISSING_CHAR":"BAD_INDENT",C),v&&v.source.length!==1&&E.unshift(v)}if(E.length>0){const T=ol(E,x,i.options.strict,a);T.comment&&(p.comment?p.comment+=`
196
- `+T.comment:p.comment=T.comment),p.range=[s.offset,x,T.offset]}else p.range=[s.offset,x,x];return p}function dh(n,e,i,s,a,o){const u=i.type==="block-map"?PA(n,e,i,s,o):i.type==="block-seq"?FA(n,e,i,s,o):QA(n,e,i,s,o),f=u.constructor;return a==="!"||a===f.tagName?(u.tag=f.tagName,u):(a&&(u.tag=a),u)}function ZA(n,e,i,s,a){var b;const o=s.tag,u=o?e.directives.tagName(o.source,v=>a(o,"TAG_RESOLVE_FAILED",v)):null;if(i.type==="block-seq"){const{anchor:v,newlineAfterProp:E}=s,x=v&&o?v.offset>o.offset?v:o:v??o;x&&(!E||E.offset<x.offset)&&a(x,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!u||u==="!"||u===Vt.tagName&&f==="map"||u===Ci.tagName&&f==="seq")return dh(n,e,i,a,u);let d=e.schema.tags.find(v=>v.tag===u&&v.collection===f);if(!d){const v=e.schema.knownTags[u];if(v&&v.collection===f)e.schema.tags.push(Object.assign({},v,{default:!1})),d=v;else return v!=null&&v.collection?a(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection}`,!0):a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),dh(n,e,i,a,u)}const p=dh(n,e,i,a,u,d),m=((b=d.resolve)==null?void 0:b.call(d,p,v=>a(o,"TAG_RESOLVE_FAILED",v),e.options))??p,y=qe(m)?m:new he(m);return y.range=p.range,y.tag=u,d!=null&&d.format&&(y.format=d.format),y}function Pv(n,e,i){const s=e.offset,a=JA(e,n.options.strict,i);if(!a)return{value:"",type:null,comment:"",range:[s,s,s]};const o=a.mode===">"?he.BLOCK_FOLDED:he.BLOCK_LITERAL,u=e.source?WA(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const T=u[x][1];if(T===""||T==="\r")f=x;else break}if(f===0){const x=a.chomp==="+"&&u.length>0?`
195
+ `+L.comment:H.comment=L.comment);const le=new yt(H,ie);if(i.options.keepSourceTokens&&(le.srcToken=C),u){const I=p;Fv(i,I.items,H)&&a(Z,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(le)}else{const I=new Vt(i.schema);I.flow=!0,I.items.push(le);const F=(ie??H).range;I.range=[H.range[0],F[1],F[2]],p.items.push(I)}y=ie?ie.range[2]:L.end}}const b=u?"}":"]",[v,...E]=s.end;let x=y;if(v&&v.source===b)x=v.offset+v.source.length;else{const T=f[0].toUpperCase()+f.substring(1),C=m?`${T} must end with a ${b}`:`${T} in block collection must be sufficiently indented and end with a ${b}`;a(y,m?"MISSING_CHAR":"BAD_INDENT",C),v&&v.source.length!==1&&E.unshift(v)}if(E.length>0){const T=cl(E,x,i.options.strict,a);T.comment&&(p.comment?p.comment+=`
196
+ `+T.comment:p.comment=T.comment),p.range=[s.offset,x,T.offset]}else p.range=[s.offset,x,x];return p}function dh(n,e,i,s,a,o){const u=i.type==="block-map"?QA(n,e,i,s,o):i.type==="block-seq"?ZA(n,e,i,s,o):JA(n,e,i,s,o),f=u.constructor;return a==="!"||a===f.tagName?(u.tag=f.tagName,u):(a&&(u.tag=a),u)}function WA(n,e,i,s,a){var b;const o=s.tag,u=o?e.directives.tagName(o.source,v=>a(o,"TAG_RESOLVE_FAILED",v)):null;if(i.type==="block-seq"){const{anchor:v,newlineAfterProp:E}=s,x=v&&o?v.offset>o.offset?v:o:v??o;x&&(!E||E.offset<x.offset)&&a(x,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!u||u==="!"||u===Vt.tagName&&f==="map"||u===Ci.tagName&&f==="seq")return dh(n,e,i,a,u);let d=e.schema.tags.find(v=>v.tag===u&&v.collection===f);if(!d){const v=e.schema.knownTags[u];if(v&&v.collection===f)e.schema.tags.push(Object.assign({},v,{default:!1})),d=v;else return v!=null&&v.collection?a(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection}`,!0):a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),dh(n,e,i,a,u)}const p=dh(n,e,i,a,u,d),m=((b=d.resolve)==null?void 0:b.call(d,p,v=>a(o,"TAG_RESOLVE_FAILED",v),e.options))??p,y=qe(m)?m:new he(m);return y.range=p.range,y.tag=u,d!=null&&d.format&&(y.format=d.format),y}function Qv(n,e,i){const s=e.offset,a=eN(e,n.options.strict,i);if(!a)return{value:"",type:null,comment:"",range:[s,s,s]};const o=a.mode===">"?he.BLOCK_FOLDED:he.BLOCK_LITERAL,u=e.source?tN(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const T=u[x][1];if(T===""||T==="\r")f=x;else break}if(f===0){const x=a.chomp==="+"&&u.length>0?`
197
197
  `.repeat(Math.max(1,u.length-1)):"";let T=s+a.length;return e.source&&(T+=e.source.length),{value:x,type:o,comment:a.comment,range:[s,T,T]}}let d=e.indent+a.indent,p=e.offset+a.length,m=0;for(let x=0;x<f;++x){const[T,C]=u[x];if(C===""||C==="\r")a.indent===0&&T.length>d&&(d=T.length);else{T.length<d&&i(p+T.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(d=T.length),m=x,d===0&&!n.atRoot&&i(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=T.length+C.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>d&&(f=x+1);let y="",b="",v=!1;for(let x=0;x<m;++x)y+=u[x][0].slice(d)+`
198
198
  `;for(let x=m;x<f;++x){let[T,C]=u[x];p+=T.length+C.length+1;const k=C[C.length-1]==="\r";if(k&&(C=C.slice(0,-1)),C&&T.length<d){const V=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;i(p-C.length-(k?2:1),"BAD_INDENT",V),T=""}o===he.BLOCK_LITERAL?(y+=b+T.slice(d)+C,b=`
199
199
  `):T.length>d||C[0]===" "?(b===" "?b=`
@@ -208,41 +208,41 @@ ${p}
208
208
  `+u[x][0].slice(d);y[y.length-1]!==`
209
209
  `&&(y+=`
210
210
  `);break;default:y+=`
211
- `}const E=s+a.length+e.source.length;return{value:y,type:o,comment:a.comment,range:[s,E,E]}}function JA({offset:n,props:e},i,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=e[0],o=a[0];let u=0,f="",d=-1;for(let b=1;b<a.length;++b){const v=a[b];if(!f&&(v==="-"||v==="+"))f=v;else{const E=Number(v);!u&&E?u=E:d===-1&&(d=n+b)}}d!==-1&&s(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let p=!1,m="",y=a.length;for(let b=1;b<e.length;++b){const v=e[b];switch(v.type){case"space":p=!0;case"newline":y+=v.source.length;break;case"comment":i&&!p&&s(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=v.source.length,m=v.source.substring(1);break;case"error":s(v,"UNEXPECTED_TOKEN",v.message),y+=v.source.length;break;default:{const E=`Unexpected token in block scalar header: ${v.type}`;s(v,"UNEXPECTED_TOKEN",E);const x=v.source;x&&typeof x=="string"&&(y+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:m,length:y}}function WA(n){const e=n.split(/\n( *)/),i=e[0],s=i.match(/^( *)/),o=[s!=null&&s[1]?[s[1],i.slice(s[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function Fv(n,e,i){const{offset:s,type:a,source:o,end:u}=n;let f,d;const p=(b,v,E)=>i(s+b,v,E);switch(a){case"scalar":f=he.PLAIN,d=eN(o,p);break;case"single-quoted-scalar":f=he.QUOTE_SINGLE,d=tN(o,p);break;case"double-quoted-scalar":f=he.QUOTE_DOUBLE,d=nN(o,p);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const m=s+o.length,y=ol(u,m,e,i);return{value:d,type:f,comment:y.comment,range:[s,m,y.offset]}}function eN(n,e){let i="";switch(n[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${n[0]}`;break}case"@":case"`":{i=`reserved character ${n[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),Qv(n)}function tN(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),Qv(n.slice(1,-1)).replace(/''/g,"'")}function Qv(n){let e,i;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
211
+ `}const E=s+a.length+e.source.length;return{value:y,type:o,comment:a.comment,range:[s,E,E]}}function eN({offset:n,props:e},i,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=e[0],o=a[0];let u=0,f="",d=-1;for(let b=1;b<a.length;++b){const v=a[b];if(!f&&(v==="-"||v==="+"))f=v;else{const E=Number(v);!u&&E?u=E:d===-1&&(d=n+b)}}d!==-1&&s(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let p=!1,m="",y=a.length;for(let b=1;b<e.length;++b){const v=e[b];switch(v.type){case"space":p=!0;case"newline":y+=v.source.length;break;case"comment":i&&!p&&s(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=v.source.length,m=v.source.substring(1);break;case"error":s(v,"UNEXPECTED_TOKEN",v.message),y+=v.source.length;break;default:{const E=`Unexpected token in block scalar header: ${v.type}`;s(v,"UNEXPECTED_TOKEN",E);const x=v.source;x&&typeof x=="string"&&(y+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:m,length:y}}function tN(n){const e=n.split(/\n( *)/),i=e[0],s=i.match(/^( *)/),o=[s!=null&&s[1]?[s[1],i.slice(s[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function Zv(n,e,i){const{offset:s,type:a,source:o,end:u}=n;let f,d;const p=(b,v,E)=>i(s+b,v,E);switch(a){case"scalar":f=he.PLAIN,d=nN(o,p);break;case"single-quoted-scalar":f=he.QUOTE_SINGLE,d=iN(o,p);break;case"double-quoted-scalar":f=he.QUOTE_DOUBLE,d=sN(o,p);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const m=s+o.length,y=cl(u,m,e,i);return{value:d,type:f,comment:y.comment,range:[s,m,y.offset]}}function nN(n,e){let i="";switch(n[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${n[0]}`;break}case"@":case"`":{i=`reserved character ${n[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),Jv(n)}function iN(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),Jv(n.slice(1,-1)).replace(/''/g,"'")}function Jv(n){let e,i;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
212
212
  `,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
213
213
  `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let a=s[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;s=i.exec(n);)s[1]===""?o===`
214
214
  `?a+=o:o=`
215
- `:(a+=o+s[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,s=f.exec(n),a+o+((s==null?void 0:s[1])??"")}function nN(n,e){let i="";for(let s=1;s<n.length-1;++s){const a=n[s];if(!(a==="\r"&&n[s+1]===`
215
+ `:(a+=o+s[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,s=f.exec(n),a+o+((s==null?void 0:s[1])??"")}function sN(n,e){let i="";for(let s=1;s<n.length-1;++s){const a=n[s];if(!(a==="\r"&&n[s+1]===`
216
216
  `))if(a===`
217
- `){const{fold:o,offset:u}=iN(n,s);i+=o,s=u}else if(a==="\\"){let o=n[++s];const u=sN[o];if(u)i+=u;else if(o===`
217
+ `){const{fold:o,offset:u}=rN(n,s);i+=o,s=u}else if(a==="\\"){let o=n[++s];const u=aN[o];if(u)i+=u;else if(o===`
218
218
  `)for(o=n[s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="\r"&&n[s+1]===`
219
- `)for(o=n[++s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=rN(n,s+1,f,e),s+=f}else{const f=n.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(a===" "||a===" "){const o=s;let u=n[s+1];for(;u===" "||u===" ";)u=n[++s+1];u!==`
219
+ `)for(o=n[++s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=lN(n,s+1,f,e),s+=f}else{const f=n.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(a===" "||a===" "){const o=s;let u=n[s+1];for(;u===" "||u===" ";)u=n[++s+1];u!==`
220
220
  `&&!(u==="\r"&&n[s+2]===`
221
- `)&&(i+=s>o?n.slice(o,s+1):a)}else i+=a}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function iN(n,e){let i="",s=n[e+1];for(;(s===" "||s===" "||s===`
221
+ `)&&(i+=s>o?n.slice(o,s+1):a)}else i+=a}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function rN(n,e){let i="",s=n[e+1];for(;(s===" "||s===" "||s===`
222
222
  `||s==="\r")&&!(s==="\r"&&n[e+2]!==`
223
223
  `);)s===`
224
224
  `&&(i+=`
225
- `),e+=1,s=n[e+1];return i||(i=" "),{fold:i,offset:e}}const sN={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
226
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function rN(n,e,i,s){const a=n.substr(e,i),u=a.length===i&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(u)){const f=n.substr(e-2,i+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function Zv(n,e,i,s){const{value:a,type:o,comment:u,range:f}=e.type==="block-scalar"?Pv(n,e,s):Fv(e,n.options.strict,s),d=i?n.directives.tagName(i.source,y=>s(i,"TAG_RESOLVE_FAILED",y)):null;let p;n.options.stringKeys&&n.atKey?p=n.schema[Tn]:d?p=aN(n.schema,a,d,i,s):e.type==="scalar"?p=lN(n,a,e,s):p=n.schema[Tn];let m;try{const y=p.resolve(a,b=>s(i??e,"TAG_RESOLVE_FAILED",b),n.options);m=Re(y)?y:new he(y)}catch(y){const b=y instanceof Error?y.message:String(y);s(i??e,"TAG_RESOLVE_FAILED",b),m=new he(a)}return m.range=f,m.source=a,o&&(m.type=o),d&&(m.tag=d),p.format&&(m.format=p.format),u&&(m.comment=u),m}function aN(n,e,i,s,a){var f;if(i==="!")return n[Tn];const o=[];for(const d of n.tags)if(!d.collection&&d.tag===i)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(e))return d;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(a(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[Tn])}function lN({atKey:n,directives:e,schema:i},s,a,o){const u=i.tags.find(f=>{var d;return(f.default===!0||n&&f.default==="key")&&((d=f.test)==null?void 0:d.test(s))})||i[Tn];if(i.compat){const f=i.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(s))})??i[Tn];if(u.tag!==f.tag){const d=e.tagString(u.tag),p=e.tagString(f.tag),m=`Value may be parsed as either ${d} or ${p}`;o(a,"TAG_RESOLVE_FAILED",m,!0)}}return u}function oN(n,e,i){if(e){i===null&&(i=e.length);for(let s=i-1;s>=0;--s){let a=e[s];switch(a.type){case"space":case"comment":case"newline":n-=a.source.length;continue}for(a=e[++s];(a==null?void 0:a.type)==="space";)n+=a.source.length,a=e[++s];break}}return n}const cN={composeNode:Jv,composeEmptyNode:Ad};function Jv(n,e,i,s){const a=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let p,m=!0;switch(e.type){case"alias":p=uN(n,e,s),(f||d)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=Zv(n,e,d,s),f&&(p.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=ZA(cN,n,e,i,s),f&&(p.anchor=f.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",y),p=Ad(n,e.offset,void 0,null,i,s),m=!1}}return f&&p.anchor===""&&s(f,"BAD_ALIAS","Anchor cannot be an empty string"),a&&n.options.stringKeys&&(!Re(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&s(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(p.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?p.comment=u:p.commentBefore=u),n.options.keepSourceTokens&&m&&(p.srcToken=e),p}function Ad(n,e,i,s,{spaceBefore:a,comment:o,anchor:u,tag:f,end:d},p){const m={type:"scalar",offset:oN(e,i,s),indent:-1,source:""},y=Zv(n,m,f,p);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(y.spaceBefore=!0),o&&(y.comment=o,y.range[2]=d),y}function uN({options:n},{offset:e,source:i,end:s},a){const o=new mc(i.substring(1));o.source===""&&a(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&a(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=ol(s,u,n.strict,a);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function fN(n,e,{offset:i,start:s,value:a,end:o},u){const f=Object.assign({_directives:e},n),d=new Mr(void 0,f),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=Sr(s,{indicator:"doc-start",next:a??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=a?Jv(p,a,m,u):Ad(p,m.end,s,null,m,u);const y=d.contents.range[2],b=ol(o,y,!1,u);return b.comment&&(d.comment=b.comment),d.range=[i,y,b.offset],d}function Da(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:i}=n;return[e,e+(typeof i=="string"?i.length:1)]}function y0(n){var a;let e="",i=!1,s=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":s?`
225
+ `),e+=1,s=n[e+1];return i||(i=" "),{fold:i,offset:e}}const aN={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
226
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function lN(n,e,i,s){const a=n.substr(e,i),u=a.length===i&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(u)){const f=n.substr(e-2,i+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function Wv(n,e,i,s){const{value:a,type:o,comment:u,range:f}=e.type==="block-scalar"?Qv(n,e,s):Zv(e,n.options.strict,s),d=i?n.directives.tagName(i.source,y=>s(i,"TAG_RESOLVE_FAILED",y)):null;let p;n.options.stringKeys&&n.atKey?p=n.schema[Tn]:d?p=oN(n.schema,a,d,i,s):e.type==="scalar"?p=cN(n,a,e,s):p=n.schema[Tn];let m;try{const y=p.resolve(a,b=>s(i??e,"TAG_RESOLVE_FAILED",b),n.options);m=Re(y)?y:new he(y)}catch(y){const b=y instanceof Error?y.message:String(y);s(i??e,"TAG_RESOLVE_FAILED",b),m=new he(a)}return m.range=f,m.source=a,o&&(m.type=o),d&&(m.tag=d),p.format&&(m.format=p.format),u&&(m.comment=u),m}function oN(n,e,i,s,a){var f;if(i==="!")return n[Tn];const o=[];for(const d of n.tags)if(!d.collection&&d.tag===i)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(e))return d;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(a(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[Tn])}function cN({atKey:n,directives:e,schema:i},s,a,o){const u=i.tags.find(f=>{var d;return(f.default===!0||n&&f.default==="key")&&((d=f.test)==null?void 0:d.test(s))})||i[Tn];if(i.compat){const f=i.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(s))})??i[Tn];if(u.tag!==f.tag){const d=e.tagString(u.tag),p=e.tagString(f.tag),m=`Value may be parsed as either ${d} or ${p}`;o(a,"TAG_RESOLVE_FAILED",m,!0)}}return u}function uN(n,e,i){if(e){i===null&&(i=e.length);for(let s=i-1;s>=0;--s){let a=e[s];switch(a.type){case"space":case"comment":case"newline":n-=a.source.length;continue}for(a=e[++s];(a==null?void 0:a.type)==="space";)n+=a.source.length,a=e[++s];break}}return n}const fN={composeNode:eS,composeEmptyNode:Ad};function eS(n,e,i,s){const a=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let p,m=!0;switch(e.type){case"alias":p=hN(n,e,s),(f||d)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=Wv(n,e,d,s),f&&(p.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=WA(fN,n,e,i,s),f&&(p.anchor=f.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",y),p=Ad(n,e.offset,void 0,null,i,s),m=!1}}return f&&p.anchor===""&&s(f,"BAD_ALIAS","Anchor cannot be an empty string"),a&&n.options.stringKeys&&(!Re(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&s(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(p.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?p.comment=u:p.commentBefore=u),n.options.keepSourceTokens&&m&&(p.srcToken=e),p}function Ad(n,e,i,s,{spaceBefore:a,comment:o,anchor:u,tag:f,end:d},p){const m={type:"scalar",offset:uN(e,i,s),indent:-1,source:""},y=Wv(n,m,f,p);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(y.spaceBefore=!0),o&&(y.comment=o,y.range[2]=d),y}function hN({options:n},{offset:e,source:i,end:s},a){const o=new mc(i.substring(1));o.source===""&&a(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&a(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=cl(s,u,n.strict,a);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function dN(n,e,{offset:i,start:s,value:a,end:o},u){const f=Object.assign({_directives:e},n),d=new Mr(void 0,f),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=Sr(s,{indicator:"doc-start",next:a??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=a?eS(p,a,m,u):Ad(p,m.end,s,null,m,u);const y=d.contents.range[2],b=cl(o,y,!1,u);return b.comment&&(d.comment=b.comment),d.range=[i,y,b.offset],d}function Da(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:i}=n;return[e,e+(typeof i=="string"?i.length:1)]}function y0(n){var a;let e="",i=!1,s=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":s?`
227
227
 
228
228
  `:`
229
- `)+(u.substring(1)||" "),i=!0,s=!1;break;case"%":((a=n[o+1])==null?void 0:a[0])!=="#"&&(o+=1),i=!1;break;default:i||(s=!0),i=!1}}return{comment:e,afterEmptyLine:s}}class Nd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,s,a,o)=>{const u=Da(i);o?this.warnings.push(new Yv(u,s,a)):this.errors.push(new rs(u,s,a))},this.directives=new wt({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:s,afterEmptyLine:a}=y0(this.prelude);if(s){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
229
+ `)+(u.substring(1)||" "),i=!0,s=!1;break;case"%":((a=n[o+1])==null?void 0:a[0])!=="#"&&(o+=1),i=!1;break;default:i||(s=!0),i=!1}}return{comment:e,afterEmptyLine:s}}class Nd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,s,a,o)=>{const u=Da(i);o?this.warnings.push(new Pv(u,s,a)):this.errors.push(new rs(u,s,a))},this.directives=new wt({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:s,afterEmptyLine:a}=y0(this.prelude);if(s){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
230
230
  ${s}`:s;else if(a||e.directives.docStart||!o)e.commentBefore=s;else if(He(o)&&!o.flow&&o.items.length>0){let u=o.items[0];Be(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${s}
231
231
  ${f}`:s}else{const u=o.commentBefore;o.commentBefore=u?`${s}
232
- ${u}`:s}}i?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:y0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,s=-1){for(const a of e)yield*this.next(a);yield*this.end(i,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,s,a)=>{const o=Da(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",s,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=fN(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new rs(Da(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new rs(Da(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const i=ol(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
233
- ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new rs(Da(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),a=new Mr(void 0,s);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,i,i],this.decorate(a,!1),yield a}}}function hN(n,e=!0,i){if(n){const s=(a,o,u)=>{const f=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(i)i(f,o,u);else throw new rs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Fv(n,e,s);case"block-scalar":return Pv({options:{strict:e}},n,s)}}return null}function dN(n,e){const{implicitKey:i=!1,indent:s,inFlow:a=!1,offset:o=-1,type:u="PLAIN"}=e,f=al({type:u,value:n},{implicitKey:i,indent:s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:s,source:`
232
+ ${u}`:s}}i?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:y0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,s=-1){for(const a of e)yield*this.next(a);yield*this.end(i,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,s,a)=>{const o=Da(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",s,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=dN(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new rs(Da(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new rs(Da(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const i=cl(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
233
+ ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new rs(Da(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),a=new Mr(void 0,s);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,i,i],this.decorate(a,!1),yield a}}}function pN(n,e=!0,i){if(n){const s=(a,o,u)=>{const f=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(i)i(f,o,u);else throw new rs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Zv(n,e,s);case"block-scalar":return Qv({options:{strict:e}},n,s)}}return null}function gN(n,e){const{implicitKey:i=!1,indent:s,inFlow:a=!1,offset:o=-1,type:u="PLAIN"}=e,f=ll({type:u,value:n},{implicitKey:i,indent:s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:s,source:`
234
234
  `}];switch(f[0]){case"|":case">":{const p=f.indexOf(`
235
235
  `),m=f.substring(0,p),y=f.substring(p+1)+`
236
- `,b=[{type:"block-scalar-header",offset:o,indent:s,source:m}];return Wv(b,d)||b.push({type:"newline",offset:-1,indent:s,source:`
237
- `}),{type:"block-scalar",offset:o,indent:s,props:b,source:y}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:f,end:d};default:return{type:"scalar",offset:o,indent:s,source:f,end:d}}}function pN(n,e,i={}){let{afterKey:s=!1,implicitKey:a=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(s&&typeof f=="number"&&(f+=2),!u)switch(n.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const p=n.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const d=al({type:u,value:e},{implicitKey:a||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":gN(n,d);break;case'"':ph(n,d,"double-quoted-scalar");break;case"'":ph(n,d,"single-quoted-scalar");break;default:ph(n,d,"scalar")}}function gN(n,e){const i=e.indexOf(`
236
+ `,b=[{type:"block-scalar-header",offset:o,indent:s,source:m}];return tS(b,d)||b.push({type:"newline",offset:-1,indent:s,source:`
237
+ `}),{type:"block-scalar",offset:o,indent:s,props:b,source:y}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:f,end:d};default:return{type:"scalar",offset:o,indent:s,source:f,end:d}}}function mN(n,e,i={}){let{afterKey:s=!1,implicitKey:a=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(s&&typeof f=="number"&&(f+=2),!u)switch(n.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const p=n.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const d=ll({type:u,value:e},{implicitKey:a||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":yN(n,d);break;case'"':ph(n,d,"double-quoted-scalar");break;case"'":ph(n,d,"single-quoted-scalar");break;default:ph(n,d,"scalar")}}function yN(n,e){const i=e.indexOf(`
238
238
  `),s=e.substring(0,i),a=e.substring(i+1)+`
239
- `;if(n.type==="block-scalar"){const o=n.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=s,n.source=a}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:s}];Wv(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
240
- `});for(const d of Object.keys(n))d!=="type"&&d!=="offset"&&delete n[d];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:a})}}function Wv(n,e){if(e)for(const i of e)switch(i.type){case"space":case"comment":n.push(i);break;case"newline":return n.push(i),!0}return!1}function ph(n,e,i){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=i,n.source=e;break;case"block-scalar":{const s=n.props.slice(1);let a=e.length;n.props[0].type==="block-scalar-header"&&(a-=n.props[0].source.length);for(const o of s)o.offset+=a;delete n.props,Object.assign(n,{type:i,source:e,end:s});break}case"block-map":case"block-seq":{const a={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
241
- `};delete n.items,Object.assign(n,{type:i,source:e,end:[a]});break}default:{const s="indent"in n?n.indent:-1,a="end"in n&&Array.isArray(n.end)?n.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(n))o!=="type"&&o!=="offset"&&delete n[o];Object.assign(n,{type:i,indent:s,source:e,end:a})}}}const mN=n=>"type"in n?lc(n):Go(n);function lc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=lc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=Go(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=Go(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=Go(n);if(n.end)for(const i of n.end)e+=i.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const i of n.end)e+=i.source;return e}}}function Go({start:n,key:e,sep:i,value:s}){let a="";for(const o of n)a+=o.source;if(e&&(a+=lc(e)),i)for(const o of i)a+=o.source;return s&&(a+=lc(s)),a}const Dh=Symbol("break visit"),yN=Symbol("skip children"),eS=Symbol("remove item");function os(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),tS(Object.freeze([]),n,e)}os.BREAK=Dh;os.SKIP=yN;os.REMOVE=eS;os.itemAtPath=(n,e)=>{let i=n;for(const[s,a]of e){const o=i==null?void 0:i[s];if(o&&"items"in o)i=o.items[a];else return}return i};os.parentCollection=(n,e)=>{const i=os.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],a=i==null?void 0:i[s];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};function tS(n,e,i){let s=i(e,n);if(typeof s=="symbol")return s;for(const a of["key","value"]){const o=e[a];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=tS(Object.freeze(n.concat([[a,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Dh)return Dh;f===eS&&(o.items.splice(u,1),u-=1)}}typeof s=="function"&&a==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}const Ac="\uFEFF",Nc="",Cc="",il="",bN=n=>!!n&&"items"in n,vN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function SN(n){switch(n){case Ac:return"<BOM>";case Nc:return"<DOC>";case Cc:return"<FLOW_END>";case il:return"<SCALAR>";default:return JSON.stringify(n)}}function nS(n){switch(n){case Ac:return"byte-order-mark";case Nc:return"doc-mode";case Cc:return"flow-error-end";case il:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
239
+ `;if(n.type==="block-scalar"){const o=n.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=s,n.source=a}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:s}];tS(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
240
+ `});for(const d of Object.keys(n))d!=="type"&&d!=="offset"&&delete n[d];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:a})}}function tS(n,e){if(e)for(const i of e)switch(i.type){case"space":case"comment":n.push(i);break;case"newline":return n.push(i),!0}return!1}function ph(n,e,i){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=i,n.source=e;break;case"block-scalar":{const s=n.props.slice(1);let a=e.length;n.props[0].type==="block-scalar-header"&&(a-=n.props[0].source.length);for(const o of s)o.offset+=a;delete n.props,Object.assign(n,{type:i,source:e,end:s});break}case"block-map":case"block-seq":{const a={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
241
+ `};delete n.items,Object.assign(n,{type:i,source:e,end:[a]});break}default:{const s="indent"in n?n.indent:-1,a="end"in n&&Array.isArray(n.end)?n.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(n))o!=="type"&&o!=="offset"&&delete n[o];Object.assign(n,{type:i,indent:s,source:e,end:a})}}}const bN=n=>"type"in n?lc(n):Ko(n);function lc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=lc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=Ko(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=Ko(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=Ko(n);if(n.end)for(const i of n.end)e+=i.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const i of n.end)e+=i.source;return e}}}function Ko({start:n,key:e,sep:i,value:s}){let a="";for(const o of n)a+=o.source;if(e&&(a+=lc(e)),i)for(const o of i)a+=o.source;return s&&(a+=lc(s)),a}const Dh=Symbol("break visit"),vN=Symbol("skip children"),nS=Symbol("remove item");function os(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),iS(Object.freeze([]),n,e)}os.BREAK=Dh;os.SKIP=vN;os.REMOVE=nS;os.itemAtPath=(n,e)=>{let i=n;for(const[s,a]of e){const o=i==null?void 0:i[s];if(o&&"items"in o)i=o.items[a];else return}return i};os.parentCollection=(n,e)=>{const i=os.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],a=i==null?void 0:i[s];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};function iS(n,e,i){let s=i(e,n);if(typeof s=="symbol")return s;for(const a of["key","value"]){const o=e[a];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=iS(Object.freeze(n.concat([[a,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Dh)return Dh;f===nS&&(o.items.splice(u,1),u-=1)}}typeof s=="function"&&a==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}const Ac="\uFEFF",Nc="",Cc="",sl="",SN=n=>!!n&&"items"in n,wN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function xN(n){switch(n){case Ac:return"<BOM>";case Nc:return"<DOC>";case Cc:return"<FLOW_END>";case sl:return"<SCALAR>";default:return JSON.stringify(n)}}function sS(n){switch(n){case Ac:return"byte-order-mark";case Nc:return"doc-mode";case Cc:return"flow-error-end";case sl:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
242
242
  `:case`\r
243
- `: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(n[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}const wN=Object.freeze(Object.defineProperty({__proto__:null,BOM:Ac,DOCUMENT:Nc,FLOW_END:Cc,SCALAR:il,createScalarToken:dN,isCollection:bN,isScalar:vN,prettyToken:SN,resolveAsScalar:hN,setScalarValue:pN,stringify:mN,tokenType:nS,visit:os},Symbol.toStringTag,{value:"Module"}));function hn(n){switch(n){case void 0:case" ":case`
244
- `:case"\r":case" ":return!0;default:return!1}}const b0=new Set("0123456789ABCDEFabcdef"),xN=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Mo=new Set(",[]{}"),_N=new Set(` ,[]{}
245
- \r `),gh=n=>!n||_N.has(n);class iS{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,i=!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=!i;let s=this.next??"stream";for(;s&&(i||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===`
243
+ `: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(n[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}const _N=Object.freeze(Object.defineProperty({__proto__:null,BOM:Ac,DOCUMENT:Nc,FLOW_END:Cc,SCALAR:sl,createScalarToken:gN,isCollection:SN,isScalar:wN,prettyToken:xN,resolveAsScalar:pN,setScalarValue:mN,stringify:bN,tokenType:sS,visit:os},Symbol.toStringTag,{value:"Module"}));function hn(n){switch(n){case void 0:case" ":case`
244
+ `:case"\r":case" ":return!0;default:return!1}}const b0=new Set("0123456789ABCDEFabcdef"),TN=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Oo=new Set(",[]{}"),EN=new Set(` ,[]{}
245
+ \r `),gh=n=>!n||EN.has(n);class rS{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,i=!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=!i;let s=this.next??"stream";for(;s&&(i||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===`
246
246
  `?!0:i==="\r"?this.buffer[e+1]===`
247
247
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let s=0;for(;i===" ";)i=this.buffer[++s+e];if(i==="\r"){const a=this.buffer[s+e+1];if(a===`
248
248
  `||!a&&!this.atEnd)return e+s+1}return i===`
@@ -254,13 +254,13 @@ ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.pus
254
254
  `)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
255
255
  `,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let a=e+1;for(s=this.buffer[a];s===" ";)s=this.buffer[++a];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
256
256
  `;)s=this.buffer[++a];e=a-1}else if(!this.blockScalarKeep)do{let o=e-1,u=this.buffer[o];u==="\r"&&(u=this.buffer[--o]);const f=o;for(;u===" ";)u=this.buffer[--o];if(u===`
257
- `&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield il,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,s=this.pos-1,a;for(;a=this.buffer[++s];)if(a===":"){const o=this.buffer[s+1];if(hn(o)||e&&Mo.has(o))break;i=s}else if(hn(a)){let o=this.buffer[s+1];if(a==="\r"&&(o===`
257
+ `&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield sl,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,s=this.pos-1,a;for(;a=this.buffer[++s];)if(a===":"){const o=this.buffer[s+1];if(hn(o)||e&&Oo.has(o))break;i=s}else if(hn(a)){let o=this.buffer[s+1];if(a==="\r"&&(o===`
258
258
  `?(s+=1,a=`
259
- `,o=this.buffer[s+1]):i=s),o==="#"||e&&Mo.has(o))break;if(a===`
260
- `){const u=this.continueScalar(s+1);if(u===-1)break;s=Math.max(s,u-2)}}else{if(e&&Mo.has(a))break;i=s}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield il,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(gh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(hn(i)||e&&Mo.has(i))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,i=this.buffer[e];for(;!hn(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(xN.has(i))i=this.buffer[++e];else if(i==="%"&&b0.has(this.buffer[e+1])&&b0.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
259
+ `,o=this.buffer[s+1]):i=s),o==="#"||e&&Oo.has(o))break;if(a===`
260
+ `){const u=this.continueScalar(s+1);if(u===-1)break;s=Math.max(s,u-2)}}else{if(e&&Oo.has(a))break;i=s}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield sl,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(gh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(hn(i)||e&&Oo.has(i))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,i=this.buffer[e];for(;!hn(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(TN.has(i))i=this.buffer[++e];else if(i==="%"&&b0.has(this.buffer[e+1])&&b0.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
261
261
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
262
- `?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,s;do s=this.buffer[++i];while(s===" "||e&&s===" ");const a=i-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=i),a}*pushUntil(e){let i=this.pos,s=this.buffer[i];for(;!e(s);)s=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class sS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,s=this.lineStarts.length;for(;i<s;){const o=i+s>>1;this.lineStarts[o]<e?i=o+1:s=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const a=this.lineStarts[i-1];return{line:i,col:e-a+1}}}}function ns(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function v0(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function rS(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Oo(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function ar(n){var i;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=n[++e])==null?void 0:i.type)==="space";);return n.splice(e,n.length)}function S0(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!ns(e.start,"explicit-key-ind")&&!ns(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,rS(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Cd{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 iS,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,i))yield*this.next(s);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=nS(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){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}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),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(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||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){const i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const s=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in s?s.indent:0:i.type==="flow-collection"&&s.type==="document"&&(i.indent=0),i.type==="flow-collection"&&S0(i),s.type){case"document":s.value=i;break;case"block-scalar":s.props.push(i);break;case"block-map":{const a=s.items[s.items.length-1];if(a.value){s.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=i;else{Object.assign(a,{key:i,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=s.items[s.items.length-1];a.value?s.items.push({start:[],value:i}):a.value=i;break}case"flow-collection":{const a=s.items[s.items.length-1];!a||a.value?s.items.push({start:[],key:i,sep:[]}):a.sep?a.value=i:Object.assign(a,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const a=i.items[i.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&v0(a.start)===-1&&(i.indent===0||a.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(s.type==="document"?s.end=a.start:s.items.push({start:a.start}),i.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":{const 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":{v0(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const i=this.startBlockValue(e);i?this.stack.push(i):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"){const i=Oo(this.peek(2)),s=ar(i);let a;e.end?(a=e.end,a.push(this.sourceToken),delete e.end):a=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}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 i=this.source.indexOf(`
262
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,s;do s=this.buffer[++i];while(s===" "||e&&s===" ");const a=i-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=i),a}*pushUntil(e){let i=this.pos,s=this.buffer[i];for(;!e(s);)s=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class aS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,s=this.lineStarts.length;for(;i<s;){const o=i+s>>1;this.lineStarts[o]<e?i=o+1:s=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const a=this.lineStarts[i-1];return{line:i,col:e-a+1}}}}function ns(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function v0(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function lS(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ro(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function ar(n){var i;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=n[++e])==null?void 0:i.type)==="space";);return n.splice(e,n.length)}function S0(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!ns(e.start,"explicit-key-ind")&&!ns(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,lS(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Cd{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 rS,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,i))yield*this.next(s);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=sS(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){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}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),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(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||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){const i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const s=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in s?s.indent:0:i.type==="flow-collection"&&s.type==="document"&&(i.indent=0),i.type==="flow-collection"&&S0(i),s.type){case"document":s.value=i;break;case"block-scalar":s.props.push(i);break;case"block-map":{const a=s.items[s.items.length-1];if(a.value){s.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=i;else{Object.assign(a,{key:i,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=s.items[s.items.length-1];a.value?s.items.push({start:[],value:i}):a.value=i;break}case"flow-collection":{const a=s.items[s.items.length-1];!a||a.value?s.items.push({start:[],key:i,sep:[]}):a.sep?a.value=i:Object.assign(a,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const a=i.items[i.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&v0(a.start)===-1&&(i.indent===0||a.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(s.type==="document"?s.end=a.start:s.items.push({start:a.start}),i.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":{const 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":{v0(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const i=this.startBlockValue(e);i?this.stack.push(i):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"){const i=Ro(this.peek(2)),s=ar(i);let a;e.end?(a=e.end,a.push(this.sourceToken),delete e.end):a=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}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 i=this.source.indexOf(`
263
263
  `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
264
- `,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const a=!this.onKeyLine&&this.indent===e.indent,o=a&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const p=i.sep[d];switch(p.type){case"newline":f.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(u=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(u.push(this.sourceToken),e.items.push({start:u,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(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ns(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(rS(i.key)&&!ns(i.sep,"newline")){const f=ar(i.start),d=i.key,p=i.sep;p.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:p}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(ns(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=ar(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:u,key:null,sep:[this.sourceToken]}):ns(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||i.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){a&&f.type!=="block-seq"&&e.items.push({start:u}),this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;i.value||ns(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const a=this.startBlockValue(e);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?e.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:a,sep:[]}):i.sep?this.stack.push(a):Object.assign(i,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const a=Oo(s),o=ar(a);S0(e);const u=e.end.splice(1,e.end.length);u.push(this.sourceToken);const f={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(`
264
+ `,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const a=!this.onKeyLine&&this.indent===e.indent,o=a&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const p=i.sep[d];switch(p.type){case"newline":f.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(u=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(u.push(this.sourceToken),e.items.push({start:u,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(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ns(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(lS(i.key)&&!ns(i.sep,"newline")){const f=ar(i.start),d=i.key,p=i.sep;p.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:p}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(ns(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=ar(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:u,key:null,sep:[this.sourceToken]}):ns(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||i.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){a&&f.type!=="block-seq"&&e.items.push({start:u}),this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;i.value||ns(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const a=this.startBlockValue(e);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?e.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:a,sep:[]}):i.sep?this.stack.push(a):Object.assign(i,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const a=Ro(s),o=ar(a);S0(e);const u=e.end.splice(1,e.end.length);u.push(this.sourceToken);const f={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(`
265
265
  `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
266
- `,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=Oo(e),s=ar(i);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Oo(e),s=ar(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function aS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new sS||null,prettyErrors:e}}function TN(n,e={}){const{lineCounter:i,prettyErrors:s}=aS(e),a=new Cd(i==null?void 0:i.addNewLine),o=new Nd(e),u=Array.from(o.compose(a.parse(n)));if(s&&i)for(const f of u)f.errors.forEach(ac(n,i)),f.warnings.forEach(ac(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function lS(n,e={}){const{lineCounter:i,prettyErrors:s}=aS(e),a=new Cd(i==null?void 0:i.addNewLine),o=new Nd(e);let u=null;for(const f of o.compose(a.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new rs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&i&&(u.errors.forEach(ac(n,i)),u.warnings.forEach(ac(n,i))),u}function EN(n,e,i){let s;typeof e=="function"?s=e:i===void 0&&e&&typeof e=="object"&&(i=e);const a=lS(n,i);if(!a)return null;if(a.warnings.forEach(o=>Nv(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:s},i))}function AN(n,e,i){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const a=Math.round(i);i=a<1?void 0:a>8?{indent:8}:{indent:a}}if(n===void 0){const{keepUndefined:a}=i??e??{};if(!a)return}return hs(n)&&!s?n.toString(i):new Mr(n,s,i).toString(i)}const oS=Object.freeze(Object.defineProperty({__proto__:null,Alias:mc,CST:wN,Composer:Nd,Document:Mr,Lexer:iS,LineCounter:sS,Pair:yt,Parser:Cd,Scalar:he,Schema:Ec,YAMLError:Ed,YAMLMap:Vt,YAMLParseError:rs,YAMLSeq:Ci,YAMLWarning:Yv,isAlias:fs,isCollection:He,isDocument:hs,isMap:Ar,isNode:qe,isPair:Be,isScalar:Re,isSeq:Nr,parse:EN,parseAllDocuments:TN,parseDocument:lS,stringify:AN,visit:Ni,visitAsync:gc},Symbol.toStringTag,{value:"Module"})),NN=({action:n,model:e,sdkLanguage:i,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[d,p]=q.useState("action"),[m]=pn("shouldPopulateCanvasFromScreenshot",!1),y=q.useMemo(()=>ON(n),[n]),{snapshotInfoUrl:b,snapshotUrl:v,popoutUrl:E}=q.useMemo(()=>{const T=y[d];return e&&T?RN(e.traceUrl,T,m):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[y,d,m,e]),x=q.useMemo(()=>b!==void 0?{snapshotInfoUrl:b,snapshotUrl:v,popoutUrl:E}:void 0,[b,v,E]);return S.jsxs("div",{className:"snapshot-tab vbox",children:[S.jsxs(Gh,{children:[S.jsx(Dt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:a,onClick:()=>o(!a)}),["action","before","after"].map(T=>S.jsx(ub,{id:T,title:MN(T),selected:d===T,onSelect:()=>p(T)},T)),S.jsx("div",{style:{flex:"auto"}}),S.jsx(Dt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(x!=null&&x.popoutUrl),onClick:()=>{const T=window.open((x==null?void 0:x.popoutUrl)||"","_blank");T==null||T.addEventListener("DOMContentLoaded",()=>{new uv(T,{isUnderTest:uS,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),S.jsx(CN,{snapshotUrls:x,sdkLanguage:i,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},CN=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:a,highlightedElement:o,setHighlightedElement:u})=>{const f=q.useRef(null),d=q.useRef(null),[p,m]=q.useState({viewport:fS,url:""}),y=q.useRef({iteration:0,visibleIframe:0});return q.useEffect(()=>{(async()=>{const b=y.current.iteration+1,v=1-y.current.visibleIframe;y.current.iteration=b;const E=await LN(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==b)return;const x=[f,d][v].current;if(x){let T=()=>{};const C=new Promise(k=>T=k);try{x.addEventListener("load",T),x.addEventListener("error",T);const k=(n==null?void 0:n.snapshotUrl)||jN;x.contentWindow?x.contentWindow.location.replace(k):x.src=k,await C}catch{}finally{x.removeEventListener("load",T),x.removeEventListener("error",T)}}y.current.iteration===b&&(y.current.visibleIframe=v,m(E))})()},[n]),S.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:b=>{b.key==="Escape"&&s&&a(!1)},children:[S.jsx(w0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),S.jsx(w0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),S.jsx(kN,{snapshotInfo:p,children:S.jsxs("div",{className:"snapshot-switcher",children:[S.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===0&&"snapshot-visible")}),S.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},kN=({snapshotInfo:n,children:e})=>{const[i,s]=cs(),a=40,o={width:n.viewport.width,height:n.viewport.height},u={width:Math.max(o.width,480),height:Math.max(o.height+a,320)},f=Math.min(i.width/u.width,i.height/u.height,1),d={x:(i.width-u.width)/2,y:(i.height-u.height)/2};return S.jsx("div",{ref:s,className:"snapshot-wrapper",children:S.jsxs("div",{className:"snapshot-container",style:{width:u.width+"px",height:u.height+"px",transform:`translate(${d.x}px, ${d.y}px) scale(${f})`},children:[S.jsx(yA,{url:n.url}),S.jsx("div",{className:"snapshot-browser-body",children:S.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function MN(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const w0=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:s,highlightedElement:a,setHighlightedElement:o,iteration:u})=>(q.useEffect(()=>{const f=a.lastEdited==="ariaSnapshot"?a.ariaSnapshot:void 0,d=a.lastEdited==="locator"?a.locator:void 0,p=!!f||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{cS(m,p,i,s,y,"",n==null?void 0:n.contentWindow)}catch{}const b=f?Kh(oS,f):void 0,v=d?gA(i,d,s):void 0;for(const{recorder:E,frameSelector:x}of m){const T=v!=null&&v.startsWith(x)?v.substring(x.length).trim():void 0,C=(b==null?void 0:b.errors.length)===0?b.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:T,ariaTemplate:C,language:i,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(k){o({locator:ls(i,x+k.selector),ariaSnapshot:k.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const k of m)k.recorder!==E&&k.recorder.clearHighlight()}})}},[n,e,a,o,i,s,u]),S.jsx(S.Fragment,{}));function cS(n,e,i,s,a,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new uv(u,{isUnderTest:a,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new cA(d);f._injectedScript=d,f._recorder={recorder:p,frameSelector:o},a&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}f._recorder&&n.push(f._recorder);for(let d=0;d<u.frames.length;++d){const p=u.frames[d],m=p.frameElement?f._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:s})+" >> internal:control=enter-frame >> ":"";cS(n,e,i,s,a,o+m,p)}}const Ba=(n,e,i=!1)=>{if(!n)return;const s=n[e];if(s){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:s,pageId:n.pageId,point:n.point,hasInputTarget:i}}};function ON(n){if(!n)return{};let e=Ba(n,"beforeSnapshot");if(!e){for(let a=My(n);a;a=My(a))if(a.endTime<=n.startTime&&a.afterSnapshot){e=Ba(a,"afterSnapshot");break}}let i=Ba(n,"afterSnapshot");if(!i){let a;for(let o=Oy(n);o&&o.startTime<=n.endTime;o=Oy(o))o.endTime>n.endTime||!o.afterSnapshot||a&&a.endTime>o.endTime||(a=o);a?i=Ba(a,"afterSnapshot"):i=e}const s=Ba(n,"inputSnapshot",!0)??i;return s&&(s.point=n.point),{action:s,before:e,after:i}}const uS=new URLSearchParams(window.location.search).has("isUnderTest");function RN(n,e,i){const s=new URLSearchParams;s.set("trace",n),s.set("name",e.snapshotName),uS&&s.set("isUnderTest","true"),e.point&&(s.set("pointX",String(e.point.x)),s.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1")),i&&s.set("shouldPopulateCanvasFromScreenshot","1");const a=new URL(`snapshot/${e.pageId}?${s.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${s.toString()}`,window.location.href).toString(),u=new URLSearchParams;u.set("r",a),u.set("trace",n);const f=new URL(`snapshot.html?${u.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:a,popoutUrl:f}}async function LN(n){const e={url:"",viewport:fS,timestamp:void 0,wallTime:void 0};if(n){const s=await(await fetch(n)).json();s.error||(e.url=s.url,e.viewport=s.viewport,e.timestamp=s.timestamp,e.wallTime=s.wallTime)}return e}const fS={width:1280,height:720},jN='data:text/html,<body style="background: #ddd"></body>',hS={width:200,height:45},or=2.5,DN=hS.height+or*2,BN=({boundaries:n,previewPoint:e})=>{var m,y;const i=ki(),[s,a]=cs(),o=q.useRef(null);let u=0;if(o.current&&e){const b=o.current.getBoundingClientRect();u=(e.clientY-b.top+o.current.scrollTop)/DN|0}const f=(y=(m=i==null?void 0:i.pages)==null?void 0:m[u])==null?void 0:y.screencastFrames;let d,p;if(e!==void 0&&f&&f.length){const b=n.minimum+(n.maximum-n.minimum)*e.x/s.width;d=f[_0(f,b,dS)-1];const v={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?pS({width:d.width,height:d.height},v):void 0}return S.jsxs("div",{className:"film-strip",ref:a,children:[S.jsx("div",{className:"film-strip-lanes",ref:o,children:i==null?void 0:i.pages.map((b,v)=>b.screencastFrames.length?S.jsx(UN,{boundaries:n,page:b,width:s.width},v):null)}),i&&(e==null?void 0:e.x)!==void 0&&S.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(e.x,s.width-(p?p.width:0)-10)},children:[e.action&&S.jsx("div",{className:"film-strip-hover-title",children:Ih(e.action,e)}),d&&p&&S.jsx("div",{style:{width:p.width,height:p.height},children:S.jsx("img",{src:i.createRelativeUrl(`sha1/${d.sha1}`),width:p.width,height:p.height})})]})]})},UN=({boundaries:n,page:e,width:i})=>{const s=ki(),a={width:0,height:0},o=e.screencastFrames;for(const T of o)a.width=Math.max(a.width,T.width),a.height=Math.max(a.height,T.height);const u=pS(a,hS),f=o[0].timestamp,d=o[o.length-1].timestamp,p=n.maximum-n.minimum,m=(f-n.minimum)/p*i,y=(n.maximum-d)/p*i,v=(d-f)/p*i/(u.width+2*or)|0,E=(d-f)/v,x=[];for(let T=0;f&&E&&T<v;++T){const C=f+E*T,k=_0(o,C,dS)-1;x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[k].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:or,marginRight:or}},T))}return x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:or,marginRight:or}},x.length)),S.jsx("div",{className:"film-strip-lane",style:{marginLeft:m+"px",marginRight:y+"px"},children:x})};function dS(n,e){return n-e.timestamp}function pS(n,e){const i=Math.max(n.width/e.width,n.height/e.height);return{width:n.width/i|0,height:n.height/i|0}}const zN=({model:n,boundaries:e,consoleEntries:i,networkResources:s,onSelected:a,highlightedAction:o,highlightedResourceOrdinal:u,highlightedConsoleEntryOrdinal:f,selectedTime:d,setSelectedTime:p,sdkLanguage:m})=>{const[y,b]=cs(),[v,E]=q.useState(),[x,T]=q.useState(),[C]=pn("actionsFilter",[]),{offsets:k,curtainLeft:$,curtainRight:V}=q.useMemo(()=>{let F=d||e;if(v&&v.startX!==v.endX){const Q=xn(y.width,e,v.startX),se=xn(y.width,e,v.endX);F={minimum:Math.min(Q,se),maximum:Math.max(Q,se)}}const ee=nn(y.width,e,F.minimum),z=nn(y.width,e,e.maximum)-nn(y.width,e,F.maximum);return{offsets:HN(y.width,e),curtainLeft:ee,curtainRight:z}},[d,e,v,y]),R=q.useMemo(()=>n==null?void 0:n.filteredActions(C),[n,C]),G=q.useMemo(()=>{const F=[];for(const ee of R||[])F.push({action:ee,leftTime:ee.startTime,rightTime:ee.endTime||e.maximum,leftPosition:nn(y.width,e,ee.startTime),rightPosition:nn(y.width,e,ee.endTime||e.maximum),active:!1,error:!!ee.error});for(const ee of(n==null?void 0:n.resources)||[]){const ve=ee._monotonicTime,z=ee._monotonicTime+ee.time;F.push({resource:ee,leftTime:ve,rightTime:z,leftPosition:nn(y.width,e,ve),rightPosition:nn(y.width,e,z),active:!1,error:!1})}for(const ee of i||[])F.push({consoleMessage:ee,leftTime:ee.timestamp,rightTime:ee.timestamp,leftPosition:nn(y.width,e,ee.timestamp),rightPosition:nn(y.width,e,ee.timestamp),active:!1,error:ee.isError});return F},[n,R,i,e,y]);q.useMemo(()=>{for(const F of G)o?F.active=F.action===o:u!==void 0?F.active=F.resource===(s==null?void 0:s[u]):f!==void 0?F.active=F.consoleMessage===(i==null?void 0:i[f]):F.active=!1},[G,o,u,f,i,s]);const Z=q.useCallback(F=>{if(T(void 0),!b.current)return;const ee=F.clientX-b.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=d?nn(y.width,e,d.minimum):0,Q=d?nn(y.width,e,d.maximum):0;d&&Math.abs(ee-z)<10?E({startX:Q,endX:ee,type:"resize"}):d&&Math.abs(ee-Q)<10?E({startX:z,endX:ee,type:"resize"}):d&&ve>d.minimum&&ve<d.maximum&&F.clientY-b.current.getBoundingClientRect().top<20?E({startX:z,endX:Q,pivot:ee,type:"move"}):E({startX:ee,endX:ee,type:"resize"})},[e,y,b,d]),H=q.useCallback(F=>{if(!b.current)return;const ee=F.clientX-b.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=R==null?void 0:R.findLast(N=>N.startTime<=ve);if(!F.buttons){E(void 0);return}if(z&&a(z),!v)return;let Q=v;if(v.type==="resize")Q={...v,endX:ee};else{const N=ee-v.pivot;let P=v.startX+N,W=v.endX+N;P<0&&(P=0,W=P+(v.endX-v.startX)),W>y.width&&(W=y.width,P=W-(v.endX-v.startX)),Q={...v,startX:P,endX:W,pivot:ee}}E(Q);const se=xn(y.width,e,Q.startX),we=xn(y.width,e,Q.endX);se!==we&&p({minimum:Math.min(se,we),maximum:Math.max(se,we)})},[e,v,y,R,a,b,p]),L=q.useCallback(()=>{if(T(void 0),!!v){if(v.startX!==v.endX){const F=xn(y.width,e,v.startX),ee=xn(y.width,e,v.endX);p({minimum:Math.min(F,ee),maximum:Math.max(F,ee)})}else{const F=xn(y.width,e,v.startX),ee=R==null?void 0:R.findLast(ve=>ve.startTime<=F);ee&&a(ee),p(void 0)}E(void 0)}},[e,v,y,R,p,a]),ie=q.useCallback(F=>{if(!b.current)return;const ee=F.clientX-b.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=R==null?void 0:R.findLast(Q=>Q.startTime<=ve);T({x:ee,clientY:F.clientY,action:z,sdkLanguage:m})},[e,y,R,b,m]),le=q.useCallback(()=>{T(void 0)},[]),I=q.useCallback(()=>{p(void 0)},[p]);return S.jsxs("div",{className:"timeline-view-container",children:[!!v&&S.jsx(sb,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:L,onPaneMouseMove:H,onPaneDoubleClick:I}),S.jsxs("div",{ref:b,className:"timeline-view",onMouseDown:Z,onMouseMove:ie,onMouseLeave:le,children:[S.jsx("div",{className:"timeline-grid",children:k.map((F,ee)=>S.jsx("div",{className:"timeline-divider",style:{left:F.position+"px"},children:S.jsx("div",{className:"timeline-time",children:_t(F.time-e.minimum)})},ee))}),S.jsx("div",{style:{height:8}}),S.jsx(BN,{boundaries:e,previewPoint:x}),S.jsx("div",{className:"timeline-bars",children:G.filter(F=>!F.action||F.action.class!=="Test").map((F,ee)=>S.jsx("div",{className:Ke("timeline-bar",F.action&&"action",F.resource&&"network",F.consoleMessage&&"console-message",F.active&&"active",F.error&&"error"),style:{left:F.leftPosition,width:Math.max(5,F.rightPosition-F.leftPosition),top:qN(F),bottom:0}},ee))}),S.jsx("div",{className:"timeline-marker",style:{display:x!==void 0?"block":"none",left:((x==null?void 0:x.x)||0)+"px"}}),d&&S.jsxs("div",{className:"timeline-window",children:[S.jsx("div",{className:"timeline-window-curtain left",style:{width:$}}),S.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),S.jsx("div",{className:"timeline-window-center",children:S.jsx("div",{className:"timeline-window-drag"})}),S.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),S.jsx("div",{className:"timeline-window-curtain right",style:{width:V}})]})]})]})};function HN(n,e){let s=n/64;const a=e.maximum-e.minimum,o=n/a;let u=a/s;const f=Math.ceil(Math.log(u)/Math.LN10);u=Math.pow(10,f),u*o>=320&&(u=u/5),u*o>=128&&(u=u/2);const d=e.minimum;let p=e.maximum;p+=64/o,s=Math.ceil((p-d)/u),u||(s=0);const m=[];for(let y=0;y<s;++y){const b=d+u*y;m.push({position:nn(n,e,b),time:b})}return m}function nn(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function xn(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}function qN(n){return n.resource?25:20}const $N=({model:n})=>{var i,s;if(!n)return S.jsx(S.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return S.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&S.jsxs("div",{className:"call-line",children:["start time:",S.jsx("span",{className:"call-value datetime",title:e,children:e})]}),S.jsxs("div",{className:"call-line",children:["duration:",S.jsx("span",{className:"call-value number",title:_t(n.endTime-n.startTime),children:_t(n.endTime-n.startTime)})]}),S.jsx("div",{className:"call-section",children:"Browser"}),S.jsxs("div",{className:"call-line",children:["engine:",S.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&S.jsxs("div",{className:"call-line",children:["channel:",S.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&S.jsxs("div",{className:"call-line",children:["platform:",S.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.options.userAgent&&S.jsxs("div",{className:"call-line",children:["user agent:",S.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),S.jsxs("div",{className:"call-line",children:["baseURL:",S.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL})]})]}),S.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["width:",S.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["height:",S.jsx("span",{className:"call-value number",title:String(!!((s=n.options.viewport)!=null&&s.height)),children:n.options.viewport.height})]}),S.jsxs("div",{className:"call-line",children:["is mobile:",S.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&S.jsxs("div",{className:"call-line",children:["device scale:",S.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),S.jsx("div",{className:"call-section",children:"Counts"}),S.jsxs("div",{className:"call-line",children:["pages:",S.jsx("span",{className:"call-value number",children:n.pages.length})]}),S.jsxs("div",{className:"call-line",children:["actions:",S.jsx("span",{className:"call-value number",children:n.actions.length})]}),S.jsxs("div",{className:"call-line",children:["events:",S.jsx("span",{className:"call-value number",children:n.events.length})]})]})},IN=({annotations:n})=>n.length?S.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>S.jsxs("div",{className:"annotation-item",children:[S.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&S.jsxs("span",{children:[": ",ab(e.description)]})]},`annotation-${i}`))}):S.jsx(us,{text:"No annotations"}),VN=({sdkLanguage:n,isInspecting:e,setIsInspecting:i,highlightedElement:s,setHighlightedElement:a})=>{const[o,u]=q.useState(),f=q.useCallback(d=>{const{errors:p}=Kh(oS,d,{prettyErrors:!1}),m=p.map(y=>({message:y.message,line:y.range[1].line,column:y.range[1].col,type:"subtle-error"}));u(m),a({...s,ariaSnapshot:d,lastEdited:"ariaSnapshot"}),i(!1)},[s,a,i]);return S.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{children:"Locator"}),S.jsx(Dt,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>i(!e)}),S.jsx("div",{style:{flex:"auto"}}),S.jsx(Dt,{icon:"files",title:"Copy locator",onClick:()=>{Sy(s.locator||"")}})]}),S.jsx("div",{style:{height:50},children:S.jsx(br,{text:s.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:d=>{a({...s,locator:d,lastEdited:"locator"}),i(!1)}})}),S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),S.jsx(Dt,{icon:"files",title:"Copy snapshot",onClick:()=>{Sy(s.ariaSnapshot||"")}})]}),S.jsx("div",{style:{height:150},children:S.jsx(br,{text:s.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:f})})]})},GN=({className:n,style:e,open:i,isModal:s,minWidth:a,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:p})=>{const m=q.useRef(null),[y,b]=q.useState(0),[v]=mh(m),[E,x]=mh(f),T=KN(v,E,o);return q.useEffect(()=>{const C=$=>{!m.current||!($.target instanceof Node)||m.current.contains($.target)||u==null||u()},k=$=>{$.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",C),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",k)}):()=>{}},[i,u]),q.useLayoutEffect(()=>x(),[i,x]),q.useEffect(()=>{const C=()=>b(k=>k+1);return window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]),q.useLayoutEffect(()=>{m.current&&(i?s?m.current.showModal():m.current.show():m.current.close())},[i,s]),S.jsx("dialog",{ref:m,style:{position:"fixed",margin:0,zIndex:110,top:T.top,left:T.left,minWidth:a||0,...e},className:n,"data-testid":d,children:p})};function KN(n,e,i=4,s=4){let a=Math.max(s,e.left);a+n.width>window.innerWidth-s&&(a=window.innerWidth-n.width-s);let o=Math.max(0,e.bottom)+i;return o+n.height>window.innerHeight-i&&(Math.max(0,e.top)>n.height+i?o=Math.max(0,e.top)-n.height-i:o=window.innerHeight-i-n.height),{left:a,top:o}}const YN=({title:n,icon:e,dialogDataTestId:i,children:s})=>{const a=q.useRef(null),[o,u]=q.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsx(Dt,{ref:a,icon:e,title:n,onClick:()=>u(f=>!f)}),S.jsx(GN,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:o,verticalOffset:8,requestClose:()=>u(!1),anchor:a,dataTestId:i,children:s})]})},gS=({settings:n})=>S.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return S.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:XN(e,i)},e.name)})}),XN=(n,e)=>{switch(n.type){case"check":return S.jsxs(S.Fragment,{children:[S.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),S.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return S.jsxs(S.Fragment,{children:[S.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]}),S.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},i2=n=>{var i;const e=((i=n.model)==null?void 0:i.traceUrl)??"default";return S.jsxs(lb.Provider,{value:n.model,children:[S.jsx(PN,{partition:e,...n}),";"]})},PN=n=>{var Jn;const{partition:e,model:i,showSourcesFirst:s,rootDir:a,fallbackLocation:o,isLive:u,hideTimeline:f,status:d,annotations:p,inert:m,onOpenExternally:y,revealSource:b,testRunMetadata:v}=n,[E,x]=pn("navigatorTab","actions"),[T,C]=pn("propertiesTab",s?"source":"call"),[k,$]=pn("propertiesSidebarLocation","bottom"),[V]=pn("actionsFilter",[]),[R,G]=_i("selectedCallId"),[Z,H]=_i("selectedTime"),[L,ie]=_i("highlightedCallId"),[le,I]=_i("revealedErrorKey"),[F,ee]=_i("highlightedConsoleMessageOrdinal"),[ve,z]=_i("revealedAttachmentCallId"),[Q,se]=_i("highlightedResourceOrdinal"),[we,N]=_i("treeState",{expandedItems:new Map});Dw(e);const[P,W]=q.useState({lastEdited:"none"}),[J,ae]=q.useState(!1),be=q.useCallback(ue=>{G(ue==null?void 0:ue.callId),I(void 0)},[G,I]),te=q.useMemo(()=>i==null?void 0:i.filteredActions(V),[i,V]),st=((i==null?void 0:i.actions.length)??0)-((te==null?void 0:te.length)??0),Ne=q.useMemo(()=>te==null?void 0:te.find(ue=>ue.callId===L),[te,L]),Gt=q.useCallback(ue=>{ie(ue==null?void 0:ue.callId)},[ie]),Or=q.useMemo(()=>(i==null?void 0:i.sources)||new Map,[i]);q.useEffect(()=>{H(void 0),I(void 0)},[i,H,I]);const En=q.useMemo(()=>{if(R){const Wn=te==null?void 0:te.find(mn=>mn.callId===R);if(Wn)return Wn}const ue=i==null?void 0:i.failedAction();if(ue)return ue;if(te!=null&&te.length){let Wn=te.length-1;for(let mn=0;mn<te.length;++mn)if(te[mn].title==="After Hooks"&&mn){Wn=mn-1;break}return te[Wn]}},[i,te,R]),on=q.useMemo(()=>Ne||En,[En,Ne]),ds=q.useCallback(ue=>{be(ue),Gt(void 0)},[be,Gt]),bt=q.useCallback(ue=>{C(ue),ue!=="inspector"&&ae(!1)},[C]),cl=q.useCallback(ue=>{!J&&ue&&bt("inspector"),ae(ue)},[ae,bt,J]),kc=q.useCallback(ue=>{W(ue),bt("inspector")},[bt]),Kt=q.useCallback(ue=>{bt("attachments"),z({callId:ue})},[bt,z]);q.useEffect(()=>{b&&bt("source")},[b,bt]);const Rr=A_(i,Z),ps=Z_(i,Z),Oi=w_(i),gs=q.useMemo(()=>{var ue;return le!==void 0?(ue=Oi.errors.get(le))==null?void 0:ue.stack:on==null?void 0:on.stack},[on,le,Oi]),Qn=(i==null?void 0:i.sdkLanguage)||"javascript",ul={id:"inspector",title:"Locator",render:()=>S.jsx(VN,{sdkLanguage:Qn,isInspecting:J,setIsInspecting:cl,highlightedElement:P,setHighlightedElement:W})},Mc={id:"call",title:"Call",render:()=>S.jsx(Ix,{action:on,startTimeOffset:(i==null?void 0:i.startTime)??0,sdkLanguage:Qn})},Oc={id:"log",title:"Log",render:()=>S.jsx(Kx,{action:on,isLive:u})},Ri={id:"errors",title:"Errors",errorCount:Oi.errors.size,render:()=>S.jsx(__,{errorsModel:Oi,testRunMetadata:v,sdkLanguage:Qn,revealInSource:ue=>{ue.action?be(ue.action):I(ue.message),bt("source")},wallTime:(i==null?void 0:i.wallTime)??0})};let ft;!En&&o&&(ft=(Jn=o.source)==null?void 0:Jn.errors.length);const Yt={id:"source",title:"Source",errorCount:ft,render:()=>S.jsx(b_,{stack:gs,sources:Or,rootDir:a,stackFrameLocation:k==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:y})},vt={id:"console",title:"Console",count:Rr.entries.length,render:()=>S.jsx(N_,{consoleModel:Rr,boundaries:Zn,selectedTime:Z,onAccepted:ue=>H({minimum:ue.timestamp,maximum:ue.timestamp}),onEntryHovered:ee})},Rc={id:"network",title:"Network",count:ps.resources.length,render:()=>S.jsx(J_,{boundaries:Zn,networkModel:ps,onResourceHovered:se,sdkLanguage:(i==null?void 0:i.sdkLanguage)??"javascript"})},Lc={id:"attachments",title:"Attachments",count:i==null?void 0:i.visibleAttachments.length,render:()=>S.jsx(u_,{revealedAttachmentCallId:ve})},Li=[ul,Mc,Oc,Ri,vt,Rc,Yt,Lc];if(p!==void 0){const ue={id:"annotations",title:"Annotations",count:p.length,render:()=>S.jsx(IN,{annotations:p})};Li.push(ue)}if(s){const ue=Li.indexOf(Yt);Li.splice(ue,1),Li.splice(1,0,Yt)}const{boundaries:Zn}=q.useMemo(()=>{const ue={minimum:(i==null?void 0:i.startTime)||0,maximum:(i==null?void 0:i.endTime)||3e4};return ue.minimum>ue.maximum&&(ue.minimum=0,ue.maximum=3e4),ue.maximum+=(ue.maximum-ue.minimum)/20,{boundaries:ue}},[i]);let An=0;!u&&i&&i.endTime>=0?An=i.endTime-i.startTime:i&&i.wallTime&&(An=Date.now()-i.wallTime);const Nn={id:"actions",title:"Actions",component:S.jsxs("div",{className:"vbox",children:[d&&S.jsxs("div",{className:"workbench-run-status",children:[S.jsx("span",{className:Ke("codicon",nb(d))}),S.jsx("div",{children:Hx(d)}),S.jsx("div",{className:"spacer"}),S.jsx("div",{className:"workbench-run-duration",children:An?_t(An):""})]}),S.jsx($x,{sdkLanguage:Qn,actions:te||[],selectedAction:i?En:void 0,selectedTime:Z,setSelectedTime:H,treeState:we,setTreeState:N,onSelected:ds,onHighlighted:Gt,revealActionAttachment:Kt,revealConsole:()=>bt("console"),isLive:u}),S.jsxs("div",{className:"workbench-actions-status-bar",children:[!!st&&S.jsxs("span",{className:"workbench-actions-hidden-count",title:st+" actions hidden by filters",children:[st," hidden"]}),S.jsx(FN,{counters:i==null?void 0:i.actionCounters})]})]})},ms={id:"metadata",title:"Metadata",component:S.jsx($N,{model:i})};return S.jsxs("div",{className:"vbox workbench",...m?{inert:!0}:{},children:[!f&&S.jsx(zN,{model:i,consoleEntries:Rr.entries,networkResources:ps.resources,boundaries:Zn,highlightedAction:Ne,highlightedResourceOrdinal:Q,highlightedConsoleEntryOrdinal:F,onSelected:ds,sdkLanguage:Qn,selectedTime:Z,setSelectedTime:H}),S.jsx(Xo,{sidebarSize:250,orientation:k==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:S.jsx(Xo,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:S.jsx(NN,{action:on,model:i,sdkLanguage:Qn,testIdAttributeName:(i==null?void 0:i.testIdAttributeName)||"data-testid",isInspecting:J,setIsInspecting:cl,highlightedElement:P,setHighlightedElement:kc}),sidebar:S.jsx(xh,{tabs:[Nn,ms],selectedTab:E,setSelectedTab:x})}),sidebar:S.jsx(xh,{tabs:Li,selectedTab:T,setSelectedTab:bt,rightToolbar:[k==="bottom"?S.jsx(Dt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{$("right")}}):S.jsx(Dt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{$("bottom")}})],mode:k==="bottom"?"default":"select"})})]})},FN=({counters:n})=>{const[e,i]=pn("actionsFilter",[]);return S.jsx(YN,{icon:"filter",title:"Filter actions",dialogDataTestId:"actions-filter-dialog",children:S.jsx(gS,{settings:[{type:"check",value:e.includes("getter"),set:s=>i(s?[...e,"getter"]:e.filter(a=>a!=="getter")),name:"Getters",count:n==null?void 0:n.get("getter")},{type:"check",value:e.includes("route"),set:s=>i(s?[...e,"route"]:e.filter(a=>a!=="route")),name:"Network routes",count:n==null?void 0:n.get("route")},{type:"check",value:e.includes("configuration"),set:s=>i(s?[...e,"configuration"]:e.filter(a=>a!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};var x0;(n=>{function e(i){for(const s of i.splice(0))s.dispose()}n.disposeAll=e})(x0||(x0={}));class Ua{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let s=!1;const a=this,o={dispose(){s||(s=!0,a._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const s of this._listeners)this._deliveryQueue.push({listener:s,event:e});if(i){for(let s=0;s<this._deliveryQueue.length;s++){const{listener:a,event:o}=this._deliveryQueue[s];a.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class s2{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",i=>e(i.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class r2{constructor(e){this._onCloseEmitter=new Ua,this._onReportEmitter=new Ua,this._onStdioEmitter=new Ua,this._onTestFilesChangedEmitter=new Ua,this._onLoadTraceRequestedEmitter=new Ua,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this._transport=e,this._transport.onmessage(s=>{const a=JSON.parse(s),{id:o,result:u,error:f,method:d,params:p}=a;if(o){const m=this._callbacks.get(o);if(!m)return;this._callbacks.delete(o),f?m.reject(new Error(f)):m.resolve(u)}else this._dispatchEvent(d,p)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((s,a)=>{this._transport.onopen(s),this._transport.onerror(a)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i)})}isClosed(){return this._isClosed}async _sendMessage(e,i){const s=globalThis.__logForTest;s==null||s({method:e,params:i}),await this._connectedPromise;const a=++this._lastId,o={id:a,method:e,params:i};return this._transport.send(JSON.stringify(o)),new Promise((u,f)=>{this._callbacks.set(a,{resolve:u,reject:f})})}_sendMessageNoReply(e,i){this._sendMessage(e,i).catch(()=>{})}_dispatchEvent(e,i){e==="report"?this._onReportEmitter.fire(i):e==="stdio"?this._onStdioEmitter.fire(i):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(i):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(i)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const a2=()=>{const[n,e]=pn("shouldPopulateCanvasFromScreenshot",!1),[i,s]=Hw(),[a,o]=pn("mergeFiles",!1);return S.jsx(gS,{settings:[{type:"check",value:i,set:s,name:"Dark mode"},{type:"check",value:a,set:o,name:"Merge files"},{type:"check",value:n,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{YN as D,l_ as E,t2 as M,mt as R,Xo as S,r2 as T,s2 as W,e_ as _,a2 as a,i2 as b,GN as c,ZN as d,e2 as e,bh as f,JN as g,WN as h,Ke as i,S as j,Ux as k,Gh as l,_t as m,Dt as n,pn as o,gS as p,Mw as q,q as r,es as s,nb as t,cs as u};
266
+ `,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=Ro(e),s=ar(i);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Ro(e),s=ar(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function oS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new aS||null,prettyErrors:e}}function AN(n,e={}){const{lineCounter:i,prettyErrors:s}=oS(e),a=new Cd(i==null?void 0:i.addNewLine),o=new Nd(e),u=Array.from(o.compose(a.parse(n)));if(s&&i)for(const f of u)f.errors.forEach(ac(n,i)),f.warnings.forEach(ac(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function cS(n,e={}){const{lineCounter:i,prettyErrors:s}=oS(e),a=new Cd(i==null?void 0:i.addNewLine),o=new Nd(e);let u=null;for(const f of o.compose(a.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new rs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&i&&(u.errors.forEach(ac(n,i)),u.warnings.forEach(ac(n,i))),u}function NN(n,e,i){let s;typeof e=="function"?s=e:i===void 0&&e&&typeof e=="object"&&(i=e);const a=cS(n,i);if(!a)return null;if(a.warnings.forEach(o=>kv(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:s},i))}function CN(n,e,i){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const a=Math.round(i);i=a<1?void 0:a>8?{indent:8}:{indent:a}}if(n===void 0){const{keepUndefined:a}=i??e??{};if(!a)return}return hs(n)&&!s?n.toString(i):new Mr(n,s,i).toString(i)}const uS=Object.freeze(Object.defineProperty({__proto__:null,Alias:mc,CST:_N,Composer:Nd,Document:Mr,Lexer:rS,LineCounter:aS,Pair:yt,Parser:Cd,Scalar:he,Schema:Ec,YAMLError:Ed,YAMLMap:Vt,YAMLParseError:rs,YAMLSeq:Ci,YAMLWarning:Pv,isAlias:fs,isCollection:He,isDocument:hs,isMap:Ar,isNode:qe,isPair:Be,isScalar:Re,isSeq:Nr,parse:NN,parseAllDocuments:AN,parseDocument:cS,stringify:CN,visit:Ni,visitAsync:gc},Symbol.toStringTag,{value:"Module"})),kN=({action:n,model:e,sdkLanguage:i,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[d,p]=q.useState("action"),[m]=pn("shouldPopulateCanvasFromScreenshot",!1),y=q.useMemo(()=>jN(n),[n]),{snapshotInfoUrl:b,snapshotUrl:v,popoutUrl:E}=q.useMemo(()=>{const T=y[d];return e&&T?DN(e.traceUrl,T,m):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[y,d,m,e]),x=q.useMemo(()=>b!==void 0?{snapshotInfoUrl:b,snapshotUrl:v,popoutUrl:E}:void 0,[b,v,E]);return S.jsxs("div",{className:"snapshot-tab vbox",children:[S.jsxs(Gh,{children:[S.jsx(Dt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:a,onClick:()=>o(!a)}),S.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(T=>S.jsx(hb,{id:T,title:LN(T),selected:d===T,onSelect:()=>p(T)},T))}),S.jsx("div",{style:{flex:"auto"}}),S.jsx(Dt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(x!=null&&x.popoutUrl),onClick:()=>{const T=window.open((x==null?void 0:x.popoutUrl)||"","_blank");T==null||T.addEventListener("DOMContentLoaded",()=>{new hv(T,{isUnderTest:hS,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),S.jsx(MN,{snapshotUrls:x,sdkLanguage:i,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},MN=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:a,highlightedElement:o,setHighlightedElement:u})=>{const f=q.useRef(null),d=q.useRef(null),[p,m]=q.useState({viewport:dS,url:""}),y=q.useRef({iteration:0,visibleIframe:0});return q.useEffect(()=>{(async()=>{const b=y.current.iteration+1,v=1-y.current.visibleIframe;y.current.iteration=b;const E=await BN(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==b)return;const x=[f,d][v].current;if(x){let T=()=>{};const C=new Promise(k=>T=k);try{x.addEventListener("load",T),x.addEventListener("error",T);const k=(n==null?void 0:n.snapshotUrl)||UN;x.contentWindow?x.contentWindow.location.replace(k):x.src=k,await C}catch{}finally{x.removeEventListener("load",T),x.removeEventListener("error",T)}}y.current.iteration===b&&(y.current.visibleIframe=v,m(E))})()},[n]),S.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:b=>{b.key==="Escape"&&s&&a(!1)},children:[S.jsx(_0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),S.jsx(_0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),S.jsx(RN,{snapshotInfo:p,children:S.jsxs("div",{className:"snapshot-switcher",children:[S.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===0&&"snapshot-visible")}),S.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},ON=40,w0=100,x0=60,RN=({snapshotInfo:n,children:e})=>{const[i,s]=cs(),a={width:n.viewport.width,height:n.viewport.height},o={width:Math.max(a.width,480),height:Math.max(a.height+ON,320)},u=Math.min(i.width/o.width,i.height/o.height,1),f=Math.max(u*o.width,w0),d=Math.max(u*o.height,x0),p=Math.min(f/o.width,d/o.height),m={x:(Math.max(i.width,w0)-o.width)/2,y:(Math.max(i.height,x0)-o.height)/2};return S.jsx("div",{className:"snapshot-wrapper",children:S.jsx("div",{ref:s,className:"snapshot-content-measure",children:S.jsxs("div",{className:"snapshot-container",style:{width:o.width+"px",height:o.height+"px",transform:`translate(${m.x}px, ${m.y}px) scale(${p})`},children:[S.jsx(vA,{url:n.url}),S.jsx("div",{className:"snapshot-browser-body",children:S.jsx("div",{style:{width:a.width+"px",height:a.height+"px"},children:e})})]})})})};function LN(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const _0=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:s,highlightedElement:a,setHighlightedElement:o,iteration:u})=>(q.useEffect(()=>{const f=a.lastEdited==="ariaSnapshot"?a.ariaSnapshot:void 0,d=a.lastEdited==="locator"?a.locator:void 0,p=!!f||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{fS(m,p,i,s,y,"",n==null?void 0:n.contentWindow)}catch{}const b=f?Kh(uS,f):void 0,v=d?yA(i,d,s):void 0;for(const{recorder:E,frameSelector:x}of m){const T=v!=null&&v.startsWith(x)?v.substring(x.length).trim():void 0,C=(b==null?void 0:b.errors.length)===0?b.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:T,ariaTemplate:C,language:i,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(k){o({locator:ls(i,x+k.selector),ariaSnapshot:k.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const k of m)k.recorder!==E&&k.recorder.clearHighlight()}})}},[n,e,a,o,i,s,u]),S.jsx(S.Fragment,{}));function fS(n,e,i,s,a,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new hv(u,{isUnderTest:a,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new fA(d);f._injectedScript=d,f._recorder={recorder:p,frameSelector:o},a&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}f._recorder&&n.push(f._recorder);for(let d=0;d<u.frames.length;++d){const p=u.frames[d],m=p.frameElement?f._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:s})+" >> internal:control=enter-frame >> ":"";fS(n,e,i,s,a,o+m,p)}}const Ba=(n,e,i=!1)=>{if(!n)return;const s=n[e];if(s){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:s,pageId:n.pageId,point:n.point,hasInputTarget:i}}};function jN(n){if(!n)return{};let e=Ba(n,"beforeSnapshot");if(!e){for(let a=My(n);a;a=My(a))if(a.endTime<=n.startTime&&a.afterSnapshot){e=Ba(a,"afterSnapshot");break}}let i=Ba(n,"afterSnapshot");if(!i){let a;for(let o=Oy(n);o&&o.startTime<=n.endTime;o=Oy(o))o.endTime>n.endTime||!o.afterSnapshot||a&&a.endTime>o.endTime||(a=o);a?i=Ba(a,"afterSnapshot"):i=e}const s=Ba(n,"inputSnapshot",!0)??i;return s&&(s.point=n.point),{action:s,before:e,after:i}}const hS=new URLSearchParams(window.location.search).has("isUnderTest");function DN(n,e,i){const s=new URLSearchParams;s.set("trace",n),s.set("name",e.snapshotName),hS&&s.set("isUnderTest","true"),e.point&&(s.set("pointX",String(e.point.x)),s.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1")),i&&s.set("shouldPopulateCanvasFromScreenshot","1");const a=new URL(`snapshot/${e.pageId}?${s.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${s.toString()}`,window.location.href).toString(),u=new URLSearchParams;u.set("r",a),u.set("trace",n);const f=new URL(`snapshot.html?${u.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:a,popoutUrl:f}}async function BN(n){const e={url:"",viewport:dS,timestamp:void 0,wallTime:void 0};if(n){const s=await(await fetch(n)).json();s.error||(e.url=s.url,e.viewport=s.viewport,e.timestamp=s.timestamp,e.wallTime=s.wallTime)}return e}const dS={width:1280,height:720},UN='data:text/html,<body style="background: #ddd"></body>',pS={width:200,height:45},or=2.5,zN=pS.height+or*2,HN=({boundaries:n,previewPoint:e})=>{var m,y;const i=ki(),[s,a]=cs(),o=q.useRef(null);let u=0;if(o.current&&e){const b=o.current.getBoundingClientRect();u=(e.clientY-b.top+o.current.scrollTop)/zN|0}const f=(y=(m=i==null?void 0:i.pages)==null?void 0:m[u])==null?void 0:y.screencastFrames;let d,p;if(e!==void 0&&f&&f.length){const b=n.minimum+(n.maximum-n.minimum)*e.x/s.width;d=f[E0(f,b,gS)-1];const v={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?mS({width:d.width,height:d.height},v):void 0}return S.jsxs("div",{className:"film-strip",ref:a,children:[S.jsx("div",{className:"film-strip-lanes",ref:o,children:i==null?void 0:i.pages.map((b,v)=>b.screencastFrames.length?S.jsx(qN,{boundaries:n,page:b,width:s.width},v):null)}),i&&(e==null?void 0:e.x)!==void 0&&S.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(e.x,s.width-(p?p.width:0)-10)},children:[e.action&&S.jsx("div",{className:"film-strip-hover-title",children:Ih(e.action,e)}),d&&p&&S.jsx("div",{style:{width:p.width,height:p.height},children:S.jsx("img",{src:i.createRelativeUrl(`sha1/${d.sha1}`),width:p.width,height:p.height})})]})]})},qN=({boundaries:n,page:e,width:i})=>{const s=ki(),a={width:0,height:0},o=e.screencastFrames;for(const T of o)a.width=Math.max(a.width,T.width),a.height=Math.max(a.height,T.height);const u=mS(a,pS),f=o[0].timestamp,d=o[o.length-1].timestamp,p=n.maximum-n.minimum,m=(f-n.minimum)/p*i,y=(n.maximum-d)/p*i,v=(d-f)/p*i/(u.width+2*or)|0,E=(d-f)/v,x=[];for(let T=0;f&&E&&T<v;++T){const C=f+E*T,k=E0(o,C,gS)-1;x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[k].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:or,marginRight:or}},T))}return x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:or,marginRight:or}},x.length)),S.jsx("div",{className:"film-strip-lane",style:{marginLeft:m+"px",marginRight:y+"px"},children:x})};function gS(n,e){return n-e.timestamp}function mS(n,e){const i=Math.max(n.width/e.width,n.height/e.height);return{width:n.width/i|0,height:n.height/i|0}}const $N=({model:n,boundaries:e,consoleEntries:i,networkResources:s,onSelected:a,highlightedAction:o,highlightedResourceOrdinal:u,highlightedConsoleEntryOrdinal:f,selectedTime:d,setSelectedTime:p,sdkLanguage:m})=>{const[y,b]=cs(),[v,E]=q.useState(),[x,T]=q.useState(),[C]=pn("actionsFilter",[]),{offsets:k,curtainLeft:$,curtainRight:V}=q.useMemo(()=>{let F=d||e;if(v&&v.startX!==v.endX){const Q=xn(y.width,e,v.startX),se=xn(y.width,e,v.endX);F={minimum:Math.min(Q,se),maximum:Math.max(Q,se)}}const ee=nn(y.width,e,F.minimum),z=nn(y.width,e,e.maximum)-nn(y.width,e,F.maximum);return{offsets:IN(y.width,e),curtainLeft:ee,curtainRight:z}},[d,e,v,y]),R=q.useMemo(()=>n==null?void 0:n.filteredActions(C),[n,C]),G=q.useMemo(()=>{const F=[];for(const ee of R||[])F.push({action:ee,leftTime:ee.startTime,rightTime:ee.endTime||e.maximum,leftPosition:nn(y.width,e,ee.startTime),rightPosition:nn(y.width,e,ee.endTime||e.maximum),active:!1,error:!!ee.error});for(const ee of(n==null?void 0:n.resources)||[]){const ve=ee._monotonicTime,z=ee._monotonicTime+ee.time;F.push({resource:ee,leftTime:ve,rightTime:z,leftPosition:nn(y.width,e,ve),rightPosition:nn(y.width,e,z),active:!1,error:!1})}for(const ee of i||[])F.push({consoleMessage:ee,leftTime:ee.timestamp,rightTime:ee.timestamp,leftPosition:nn(y.width,e,ee.timestamp),rightPosition:nn(y.width,e,ee.timestamp),active:!1,error:ee.isError});return F},[n,R,i,e,y]);q.useMemo(()=>{for(const F of G)o?F.active=F.action===o:u!==void 0?F.active=F.resource===(s==null?void 0:s[u]):f!==void 0?F.active=F.consoleMessage===(i==null?void 0:i[f]):F.active=!1},[G,o,u,f,i,s]);const Z=q.useCallback(F=>{if(T(void 0),!b.current)return;const ee=F.clientX-b.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=d?nn(y.width,e,d.minimum):0,Q=d?nn(y.width,e,d.maximum):0;d&&Math.abs(ee-z)<10?E({startX:Q,endX:ee,type:"resize"}):d&&Math.abs(ee-Q)<10?E({startX:z,endX:ee,type:"resize"}):d&&ve>d.minimum&&ve<d.maximum&&F.clientY-b.current.getBoundingClientRect().top<20?E({startX:z,endX:Q,pivot:ee,type:"move"}):E({startX:ee,endX:ee,type:"resize"})},[e,y,b,d]),H=q.useCallback(F=>{if(!b.current)return;const ee=F.clientX-b.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=R==null?void 0:R.findLast(N=>N.startTime<=ve);if(!F.buttons){E(void 0);return}if(z&&a(z),!v)return;let Q=v;if(v.type==="resize")Q={...v,endX:ee};else{const N=ee-v.pivot;let P=v.startX+N,W=v.endX+N;P<0&&(P=0,W=P+(v.endX-v.startX)),W>y.width&&(W=y.width,P=W-(v.endX-v.startX)),Q={...v,startX:P,endX:W,pivot:ee}}E(Q);const se=xn(y.width,e,Q.startX),we=xn(y.width,e,Q.endX);se!==we&&p({minimum:Math.min(se,we),maximum:Math.max(se,we)})},[e,v,y,R,a,b,p]),L=q.useCallback(()=>{if(T(void 0),!!v){if(v.startX!==v.endX){const F=xn(y.width,e,v.startX),ee=xn(y.width,e,v.endX);p({minimum:Math.min(F,ee),maximum:Math.max(F,ee)})}else{const F=xn(y.width,e,v.startX),ee=R==null?void 0:R.findLast(ve=>ve.startTime<=F);ee&&a(ee),p(void 0)}E(void 0)}},[e,v,y,R,p,a]),ie=q.useCallback(F=>{if(!b.current)return;const ee=F.clientX-b.current.getBoundingClientRect().left,ve=xn(y.width,e,ee),z=R==null?void 0:R.findLast(Q=>Q.startTime<=ve);T({x:ee,clientY:F.clientY,action:z,sdkLanguage:m})},[e,y,R,b,m]),le=q.useCallback(()=>{T(void 0)},[]),I=q.useCallback(()=>{p(void 0)},[p]);return S.jsxs("div",{className:"timeline-view-container",children:[!!v&&S.jsx(ab,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:L,onPaneMouseMove:H,onPaneDoubleClick:I}),S.jsxs("div",{ref:b,className:"timeline-view",onMouseDown:Z,onMouseMove:ie,onMouseLeave:le,children:[S.jsx("div",{className:"timeline-grid",children:k.map((F,ee)=>S.jsx("div",{className:"timeline-divider",style:{left:F.position+"px"},children:S.jsx("div",{className:"timeline-time",children:_t(F.time-e.minimum)})},ee))}),S.jsx("div",{style:{height:8}}),S.jsx(HN,{boundaries:e,previewPoint:x}),S.jsx("div",{className:"timeline-bars",children:G.filter(F=>!F.action||F.action.class!=="Test").map((F,ee)=>S.jsx("div",{className:Ke("timeline-bar",F.action&&"action",F.resource&&"network",F.consoleMessage&&"console-message",F.active&&"active",F.error&&"error"),style:{left:F.leftPosition,width:Math.max(5,F.rightPosition-F.leftPosition),top:VN(F),bottom:0}},ee))}),S.jsx("div",{className:"timeline-marker",style:{display:x!==void 0?"block":"none",left:((x==null?void 0:x.x)||0)+"px"}}),d&&S.jsxs("div",{className:"timeline-window",children:[S.jsx("div",{className:"timeline-window-curtain left",style:{width:$}}),S.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),S.jsx("div",{className:"timeline-window-center",children:S.jsx("div",{className:"timeline-window-drag"})}),S.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),S.jsx("div",{className:"timeline-window-curtain right",style:{width:V}})]})]})]})};function IN(n,e){let s=n/64;const a=e.maximum-e.minimum,o=n/a;let u=a/s;const f=Math.ceil(Math.log(u)/Math.LN10);u=Math.pow(10,f),u*o>=320&&(u=u/5),u*o>=128&&(u=u/2);const d=e.minimum;let p=e.maximum;p+=64/o,s=Math.ceil((p-d)/u),u||(s=0);const m=[];for(let y=0;y<s;++y){const b=d+u*y;m.push({position:nn(n,e,b),time:b})}return m}function nn(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function xn(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}function VN(n){return n.resource?25:20}const GN=({model:n})=>{var i,s;if(!n)return S.jsx(S.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return S.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&S.jsxs("div",{className:"call-line",children:["start time:",S.jsx("span",{className:"call-value datetime",title:e,children:e})]}),S.jsxs("div",{className:"call-line",children:["duration:",S.jsx("span",{className:"call-value number",title:_t(n.endTime-n.startTime),children:_t(n.endTime-n.startTime)})]}),S.jsx("div",{className:"call-section",children:"Browser"}),S.jsxs("div",{className:"call-line",children:["engine:",S.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&S.jsxs("div",{className:"call-line",children:["channel:",S.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&S.jsxs("div",{className:"call-line",children:["platform:",S.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.options.userAgent&&S.jsxs("div",{className:"call-line",children:["user agent:",S.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),S.jsxs("div",{className:"call-line",children:["baseURL:",S.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL})]})]}),S.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["width:",S.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["height:",S.jsx("span",{className:"call-value number",title:String(!!((s=n.options.viewport)!=null&&s.height)),children:n.options.viewport.height})]}),S.jsxs("div",{className:"call-line",children:["is mobile:",S.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&S.jsxs("div",{className:"call-line",children:["device scale:",S.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),S.jsx("div",{className:"call-section",children:"Counts"}),S.jsxs("div",{className:"call-line",children:["pages:",S.jsx("span",{className:"call-value number",children:n.pages.length})]}),S.jsxs("div",{className:"call-line",children:["actions:",S.jsx("span",{className:"call-value number",children:n.actions.length})]}),S.jsxs("div",{className:"call-line",children:["events:",S.jsx("span",{className:"call-value number",children:n.events.length})]})]})},KN=({annotations:n})=>n.length?S.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>S.jsxs("div",{className:"annotation-item",children:[S.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&S.jsxs("span",{children:[": ",ob(e.description)]})]},`annotation-${i}`))}):S.jsx(us,{text:"No annotations"}),YN=({sdkLanguage:n,isInspecting:e,setIsInspecting:i,highlightedElement:s,setHighlightedElement:a})=>{const[o,u]=q.useState(),f=q.useCallback(d=>{const{errors:p}=Kh(uS,d,{prettyErrors:!1}),m=p.map(y=>({message:y.message,line:y.range[1].line,column:y.range[1].col,type:"subtle-error"}));u(m),a({...s,ariaSnapshot:d,lastEdited:"ariaSnapshot"}),i(!1)},[s,a,i]);return S.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{children:"Locator"}),S.jsx(Dt,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>i(!e)}),S.jsx("div",{style:{flex:"auto"}}),S.jsx(Dt,{icon:"files",title:"Copy locator",onClick:()=>{Sy(s.locator||"")}})]}),S.jsx("div",{style:{height:50},children:S.jsx(br,{text:s.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:d=>{a({...s,locator:d,lastEdited:"locator"}),i(!1)}})}),S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),S.jsx(Dt,{icon:"files",title:"Copy snapshot",onClick:()=>{Sy(s.ariaSnapshot||"")}})]}),S.jsx("div",{style:{height:150},children:S.jsx(br,{text:s.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:f})})]})},XN=({className:n,style:e,open:i,isModal:s,minWidth:a,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:p})=>{const m=q.useRef(null),[y,b]=q.useState(0),[v]=mh(m),[E,x]=mh(f),T=PN(v,E,o);return q.useEffect(()=>{const C=$=>{!m.current||!($.target instanceof Node)||m.current.contains($.target)||u==null||u()},k=$=>{$.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",C),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",k)}):()=>{}},[i,u]),q.useLayoutEffect(()=>x(),[i,x]),q.useEffect(()=>{const C=()=>b(k=>k+1);return window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]),q.useLayoutEffect(()=>{m.current&&(i?s?m.current.showModal():m.current.show():m.current.close())},[i,s]),S.jsx("dialog",{ref:m,style:{position:"fixed",margin:0,zIndex:110,top:T.top,left:T.left,minWidth:a||0,...e},className:n,"data-testid":d,children:p})};function PN(n,e,i=4,s=4){let a=Math.max(s,e.left);a+n.width>window.innerWidth-s&&(a=window.innerWidth-n.width-s);let o=Math.max(0,e.bottom)+i;return o+n.height>window.innerHeight-i&&(Math.max(0,e.top)>n.height+i?o=Math.max(0,e.top)-n.height-i:o=window.innerHeight-i-n.height),{left:a,top:o}}const FN=({title:n,icon:e,dialogDataTestId:i,children:s})=>{const a=q.useRef(null),[o,u]=q.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsx(Dt,{ref:a,icon:e,title:n,onClick:()=>u(f=>!f)}),S.jsx(XN,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:o,verticalOffset:8,requestClose:()=>u(!1),anchor:a,dataTestId:i,children:s})]})},yS=({settings:n})=>S.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return S.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:QN(e,i)},e.name)})}),QN=(n,e)=>{switch(n.type){case"check":return S.jsxs(S.Fragment,{children:[S.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),S.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return S.jsxs(S.Fragment,{children:[S.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]}),S.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},a2=n=>{var i;const e=((i=n.model)==null?void 0:i.traceUrl)??"default";return S.jsx(cb.Provider,{value:n.model,children:S.jsx(ZN,{partition:e,...n})})},ZN=n=>{var Jn;const{partition:e,model:i,showSourcesFirst:s,rootDir:a,fallbackLocation:o,isLive:u,hideTimeline:f,status:d,annotations:p,inert:m,onOpenExternally:y,revealSource:b,testRunMetadata:v}=n,[E,x]=pn("navigatorTab","actions"),[T,C]=pn("propertiesTab",s?"source":"call"),[k,$]=pn("propertiesSidebarLocation","bottom"),[V]=pn("actionsFilter",[]),[R,G]=_i("selectedCallId"),[Z,H]=_i("selectedTime"),[L,ie]=_i("highlightedCallId"),[le,I]=_i("revealedErrorKey"),[F,ee]=_i("highlightedConsoleMessageOrdinal"),[ve,z]=_i("revealedAttachmentCallId"),[Q,se]=_i("highlightedResourceOrdinal"),[we,N]=_i("treeState",{expandedItems:new Map});Uw(e);const[P,W]=q.useState({lastEdited:"none"}),[J,ae]=q.useState(!1),be=q.useCallback(ue=>{G(ue==null?void 0:ue.callId),I(void 0)},[G,I]),te=q.useMemo(()=>i==null?void 0:i.filteredActions(V),[i,V]),st=((i==null?void 0:i.actions.length)??0)-((te==null?void 0:te.length)??0),Ne=q.useMemo(()=>te==null?void 0:te.find(ue=>ue.callId===L),[te,L]),Gt=q.useCallback(ue=>{ie(ue==null?void 0:ue.callId)},[ie]),Or=q.useMemo(()=>(i==null?void 0:i.sources)||new Map,[i]);q.useEffect(()=>{H(void 0),I(void 0)},[i,H,I]);const En=q.useMemo(()=>{if(R){const Wn=te==null?void 0:te.find(mn=>mn.callId===R);if(Wn)return Wn}const ue=i==null?void 0:i.failedAction();if(ue)return ue;if(te!=null&&te.length){let Wn=te.length-1;for(let mn=0;mn<te.length;++mn)if(te[mn].title==="After Hooks"&&mn){Wn=mn-1;break}return te[Wn]}},[i,te,R]),on=q.useMemo(()=>Ne||En,[En,Ne]),ds=q.useCallback(ue=>{be(ue),Gt(void 0)},[be,Gt]),bt=q.useCallback(ue=>{C(ue),ue!=="inspector"&&ae(!1)},[C]),ul=q.useCallback(ue=>{!J&&ue&&bt("inspector"),ae(ue)},[ae,bt,J]),kc=q.useCallback(ue=>{W(ue),bt("inspector")},[bt]),Kt=q.useCallback(ue=>{bt("attachments"),z({callId:ue})},[bt,z]);q.useEffect(()=>{b&&bt("source")},[b,bt]);const Rr=C_(i,Z),ps=W_(i,Z),Oi=__(i),gs=q.useMemo(()=>{var ue;return le!==void 0?(ue=Oi.errors.get(le))==null?void 0:ue.stack:on==null?void 0:on.stack},[on,le,Oi]),Qn=(i==null?void 0:i.sdkLanguage)||"javascript",fl={id:"inspector",title:"Locator",render:()=>S.jsx(YN,{sdkLanguage:Qn,isInspecting:J,setIsInspecting:ul,highlightedElement:P,setHighlightedElement:W})},Mc={id:"call",title:"Call",render:()=>S.jsx(Gx,{action:on,startTimeOffset:(i==null?void 0:i.startTime)??0,sdkLanguage:Qn})},Oc={id:"log",title:"Log",render:()=>S.jsx(Xx,{action:on,isLive:u})},Ri={id:"errors",title:"Errors",errorCount:Oi.errors.size,render:()=>S.jsx(E_,{errorsModel:Oi,testRunMetadata:v,sdkLanguage:Qn,revealInSource:ue=>{ue.action?be(ue.action):I(ue.message),bt("source")},wallTime:(i==null?void 0:i.wallTime)??0})};let ft;!En&&o&&(ft=(Jn=o.source)==null?void 0:Jn.errors.length);const Yt={id:"source",title:"Source",errorCount:ft,render:()=>S.jsx(S_,{stack:gs,sources:Or,rootDir:a,stackFrameLocation:k==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:y})},vt={id:"console",title:"Console",count:Rr.entries.length,render:()=>S.jsx(k_,{consoleModel:Rr,boundaries:Zn,selectedTime:Z,onAccepted:ue=>H({minimum:ue.timestamp,maximum:ue.timestamp}),onEntryHovered:ee})},Rc={id:"network",title:"Network",count:ps.resources.length,render:()=>S.jsx(eT,{boundaries:Zn,networkModel:ps,onResourceHovered:se,sdkLanguage:(i==null?void 0:i.sdkLanguage)??"javascript"})},Lc={id:"attachments",title:"Attachments",count:i==null?void 0:i.visibleAttachments.length,render:()=>S.jsx(h_,{revealedAttachmentCallId:ve})},Li=[fl,Mc,Oc,Ri,vt,Rc,Yt,Lc];if(p!==void 0){const ue={id:"annotations",title:"Annotations",count:p.length,render:()=>S.jsx(KN,{annotations:p})};Li.push(ue)}if(s){const ue=Li.indexOf(Yt);Li.splice(ue,1),Li.splice(1,0,Yt)}const{boundaries:Zn}=q.useMemo(()=>{const ue={minimum:(i==null?void 0:i.startTime)||0,maximum:(i==null?void 0:i.endTime)||3e4};return ue.minimum>ue.maximum&&(ue.minimum=0,ue.maximum=3e4),ue.maximum+=(ue.maximum-ue.minimum)/20,{boundaries:ue}},[i]);let An=0;!u&&i&&i.endTime>=0?An=i.endTime-i.startTime:i&&i.wallTime&&(An=Date.now()-i.wallTime);const Nn={id:"actions",title:"Actions",component:S.jsxs("div",{className:"vbox",children:[d&&S.jsxs("div",{className:"workbench-run-status",children:[S.jsx("span",{className:Ke("codicon",sb(d))}),S.jsx("div",{children:$x(d)}),S.jsx("div",{className:"spacer"}),S.jsx("div",{className:"workbench-run-duration",children:An?_t(An):""})]}),S.jsx(Vx,{sdkLanguage:Qn,actions:te||[],selectedAction:i?En:void 0,selectedTime:Z,setSelectedTime:H,treeState:we,setTreeState:N,onSelected:ds,onHighlighted:Gt,revealActionAttachment:Kt,revealConsole:()=>bt("console"),isLive:u}),S.jsxs("div",{className:"workbench-actions-status-bar",children:[!!st&&S.jsxs("span",{className:"workbench-actions-hidden-count",title:st+" actions hidden by filters",children:[st," hidden"]}),S.jsx(JN,{counters:i==null?void 0:i.actionCounters})]})]})},ms={id:"metadata",title:"Metadata",component:S.jsx(GN,{model:i})};return S.jsxs("div",{className:"vbox workbench",...m?{inert:!0}:{},children:[!f&&S.jsx($N,{model:i,consoleEntries:Rr.entries,networkResources:ps.resources,boundaries:Zn,highlightedAction:Ne,highlightedResourceOrdinal:Q,highlightedConsoleEntryOrdinal:F,onSelected:ds,sdkLanguage:Qn,selectedTime:Z,setSelectedTime:H}),S.jsx(Po,{sidebarSize:250,orientation:k==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:S.jsx(Po,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:S.jsx(kN,{action:on,model:i,sdkLanguage:Qn,testIdAttributeName:(i==null?void 0:i.testIdAttributeName)||"data-testid",isInspecting:J,setIsInspecting:ul,highlightedElement:P,setHighlightedElement:kc}),sidebar:S.jsx(xh,{tabs:[Nn,ms],selectedTab:E,setSelectedTab:x})}),sidebar:S.jsx(xh,{tabs:Li,selectedTab:T,setSelectedTab:bt,rightToolbar:[k==="bottom"?S.jsx(Dt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{$("right")}}):S.jsx(Dt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{$("bottom")}})],mode:k==="bottom"?"default":"select"})})]})},JN=({counters:n})=>{const[e,i]=pn("actionsFilter",[]);return S.jsx(FN,{icon:"filter",title:"Filter actions",dialogDataTestId:"actions-filter-dialog",children:S.jsx(yS,{settings:[{type:"check",value:e.includes("getter"),set:s=>i(s?[...e,"getter"]:e.filter(a=>a!=="getter")),name:"Getters",count:n==null?void 0:n.get("getter")},{type:"check",value:e.includes("route"),set:s=>i(s?[...e,"route"]:e.filter(a=>a!=="route")),name:"Network routes",count:n==null?void 0:n.get("route")},{type:"check",value:e.includes("configuration"),set:s=>i(s?[...e,"configuration"]:e.filter(a=>a!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};var T0;(n=>{function e(i){for(const s of i.splice(0))s.dispose()}n.disposeAll=e})(T0||(T0={}));class Ua{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let s=!1;const a=this,o={dispose(){s||(s=!0,a._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const s of this._listeners)this._deliveryQueue.push({listener:s,event:e});if(i){for(let s=0;s<this._deliveryQueue.length;s++){const{listener:a,event:o}=this._deliveryQueue[s];a.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class l2{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",i=>e(i.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class o2{constructor(e){this._onCloseEmitter=new Ua,this._onReportEmitter=new Ua,this._onStdioEmitter=new Ua,this._onTestFilesChangedEmitter=new Ua,this._onLoadTraceRequestedEmitter=new Ua,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this._transport=e,this._transport.onmessage(s=>{const a=JSON.parse(s),{id:o,result:u,error:f,method:d,params:p}=a;if(o){const m=this._callbacks.get(o);if(!m)return;this._callbacks.delete(o),f?m.reject(new Error(f)):m.resolve(u)}else this._dispatchEvent(d,p)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((s,a)=>{this._transport.onopen(s),this._transport.onerror(a)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i)})}isClosed(){return this._isClosed}async _sendMessage(e,i){const s=globalThis.__logForTest;s==null||s({method:e,params:i}),await this._connectedPromise;const a=++this._lastId,o={id:a,method:e,params:i};return this._transport.send(JSON.stringify(o)),new Promise((u,f)=>{this._callbacks.set(a,{resolve:u,reject:f})})}_sendMessageNoReply(e,i){this._sendMessage(e,i).catch(()=>{})}_dispatchEvent(e,i){e==="report"?this._onReportEmitter.fire(i):e==="stdio"?this._onStdioEmitter.fire(i):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(i):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(i)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const c2=({location:n})=>{const[e,i]=pn("shouldPopulateCanvasFromScreenshot",!1),[s,a]=$w(),[o,u]=pn("mergeFiles",!1);return S.jsx(yS,{settings:[{type:"check",value:s,set:a,name:"Dark mode"},...n==="ui-mode"?[{type:"check",value:o,set:u,name:"Merge files"}]:[],{type:"check",value:e,set:i,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{FN as D,c_ as E,s2 as M,mt as R,Po as S,o2 as T,l2 as W,n_ as _,c2 as a,a2 as b,XN as c,e2 as d,i2 as e,bh as f,t2 as g,n2 as h,Ke as i,S as j,Hx as k,Gh as l,_t as m,Dt as n,pn as o,yS as p,Rw as q,q as r,es as s,sb as t,cs as u};