playwright-core 1.56.0-alpha-2025-09-17 → 1.56.0-alpha-1758292576000
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browsers.json +5 -5
- package/lib/client/browserContext.js +1 -1
- package/lib/client/consoleMessage.js +2 -3
- package/lib/client/electron.js +1 -1
- package/lib/client/page.js +9 -0
- package/lib/client/worker.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/protocol/validator.js +17 -0
- package/lib/server/bidi/bidiExecutionContext.js +4 -4
- package/lib/server/bidi/bidiFirefox.js +2 -0
- package/lib/server/bidi/bidiPage.js +1 -1
- package/lib/server/chromium/crPage.js +2 -2
- package/lib/server/dispatchers/browserContextDispatcher.js +1 -12
- package/lib/server/dispatchers/pageDispatcher.js +19 -0
- package/lib/server/firefox/ffPage.js +1 -2
- package/lib/server/page.js +26 -13
- package/lib/server/registry/browserFetcher.js +3 -3
- package/lib/server/webkit/wkPage.js +1 -2
- package/lib/utils/isomorphic/protocolMetainfo.js +2 -0
- package/lib/vite/htmlReport/index.html +36 -27
- package/lib/vite/recorder/assets/{codeMirrorModule-Cd2xO0gi.js → codeMirrorModule-Ba8ryMC6.js} +1 -1
- package/lib/vite/recorder/assets/index-DkR8nwDU.js +193 -0
- package/lib/vite/recorder/index.html +1 -1
- package/lib/vite/traceViewer/assets/{codeMirrorModule-DhpE2H4B.js → codeMirrorModule-CH3lnpjO.js} +1 -1
- package/lib/vite/traceViewer/assets/defaultSettingsView-DgM9VrMC.js +265 -0
- package/lib/vite/traceViewer/{index.Crh0qFFe.js → index.Cttd86pV.js} +1 -1
- package/lib/vite/traceViewer/index.html +2 -2
- package/lib/vite/traceViewer/{uiMode.FHTK_3hI.js → uiMode.D_Oj-H2U.js} +1 -1
- package/lib/vite/traceViewer/uiMode.html +2 -2
- package/package.json +1 -1
- package/types/types.d.ts +12 -0
- package/lib/vite/recorder/assets/index-7GrUNblV.js +0 -184
- package/lib/vite/traceViewer/assets/defaultSettingsView-DS7Ulphs.js +0 -256
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-CH3lnpjO.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var ww=Object.defineProperty;var xw=(n,e,i)=>e in n?ww(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Me=(n,e,i)=>xw(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const o of l)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(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function _w(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zf={exports:{}},ba={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var cy;function Tw(){if(cy)return ba;cy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:n,type:s,key:u,ref:l!==void 0?l:null,props:o}}return ba.Fragment=e,ba.jsx=i,ba.jsxs=i,ba}var uy;function Ew(){return uy||(uy=1,zf.exports=Tw()),zf.exports}var v=Ew(),qf={exports:{}},he={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var fy;function Aw(){if(fy)return he;fy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=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 w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function T(N,X,Z){this.props=N,this.context=X,this.refs=x,this.updater=Z||w}T.prototype.isReactComponent={},T.prototype.setState=function(N,X){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,X,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function M(){}M.prototype=T.prototype;function C(N,X,Z){this.props=N,this.context=X,this.refs=x,this.updater=Z||w}var V=C.prototype=new M;V.constructor=C,E(V,T.prototype),V.isPureReactComponent=!0;var $=Array.isArray,B={H:null,A:null,T:null,S:null,V:null},Y=Object.prototype.hasOwnProperty;function J(N,X,Z,W,se,Se){return Z=Se.ref,{$$typeof:n,type:N,key:X,ref:Z!==void 0?Z:null,props:Se}}function I(N,X){return J(N.type,X,void 0,void 0,void 0,N.props)}function R(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function te(N){var X={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(Z){return X[Z]})}var re=/\/+/g;function L(N,X){return typeof N=="object"&&N!==null&&N.key!=null?te(""+N.key):X.toString(36)}function F(){}function ge(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(X){N.status==="pending"&&(N.status="fulfilled",N.value=X)},function(X){N.status==="pending"&&(N.status="rejected",N.reason=X)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function me(N,X,Z,W,se){var Se=typeof N;(Se==="undefined"||Se==="boolean")&&(N=null);var ce=!1;if(N===null)ce=!0;else switch(Se){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(N.$$typeof){case n:case e:ce=!0;break;case m:return ce=N._init,me(ce(N._payload),X,Z,W,se)}}if(ce)return se=se(N),ce=W===""?"."+L(N,0):W,$(se)?(Z="",ce!=null&&(Z=ce.replace(re,"$&/")+"/"),me(se,X,Z,"",function(cn){return cn})):se!=null&&(R(se)&&(se=I(se,Z+(se.key==null||N&&N.key===se.key?"":(""+se.key).replace(re,"$&/")+"/")+ce)),X.push(se)),1;ce=0;var Ve=W===""?".":W+":";if($(N))for(var Le=0;Le<N.length;Le++)W=N[Le],Se=Ve+L(W,Le),ce+=me(W,X,Z,Se,se);else if(Le=b(N),typeof Le=="function")for(N=Le.call(N),Le=0;!(W=N.next()).done;)W=W.value,Se=Ve+L(W,Le++),ce+=me(W,X,Z,Se,se);else if(Se==="object"){if(typeof N.then=="function")return me(ge(N),X,Z,W,se);throw X=String(N),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ce}function z(N,X,Z){if(N==null)return N;var W=[],se=0;return me(N,W,"","",function(Se){return X.call(Z,Se,se++)}),W}function Q(N){if(N._status===-1){var X=N._result;X=X(),X.then(function(Z){(N._status===0||N._status===-1)&&(N._status=1,N._result=Z)},function(Z){(N._status===0||N._status===-1)&&(N._status=2,N._result=Z)}),N._status===-1&&(N._status=0,N._result=X)}if(N._status===1)return N._result.default;throw N._result}var ne=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=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(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function ve(){}return he.Children={map:z,forEach:function(N,X,Z){z(N,function(){X.apply(this,arguments)},Z)},count:function(N){var X=0;return z(N,function(){X++}),X},toArray:function(N){return z(N,function(X){return X})||[]},only:function(N){if(!R(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},he.Component=T,he.Fragment=i,he.Profiler=l,he.PureComponent=C,he.StrictMode=s,he.Suspense=d,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,he.__COMPILER_RUNTIME={__proto__:null,c:function(N){return B.H.useMemoCache(N)}},he.cache=function(N){return function(){return N.apply(null,arguments)}},he.cloneElement=function(N,X,Z){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var W=E({},N.props),se=N.key,Se=void 0;if(X!=null)for(ce in X.ref!==void 0&&(Se=void 0),X.key!==void 0&&(se=""+X.key),X)!Y.call(X,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&X.ref===void 0||(W[ce]=X[ce]);var ce=arguments.length-2;if(ce===1)W.children=Z;else if(1<ce){for(var Ve=Array(ce),Le=0;Le<ce;Le++)Ve[Le]=arguments[Le+2];W.children=Ve}return J(N.type,se,void 0,void 0,Se,W)},he.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},he.createElement=function(N,X,Z){var W,se={},Se=null;if(X!=null)for(W in X.key!==void 0&&(Se=""+X.key),X)Y.call(X,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(se[W]=X[W]);var ce=arguments.length-2;if(ce===1)se.children=Z;else if(1<ce){for(var Ve=Array(ce),Le=0;Le<ce;Le++)Ve[Le]=arguments[Le+2];se.children=Ve}if(N&&N.defaultProps)for(W in ce=N.defaultProps,ce)se[W]===void 0&&(se[W]=ce[W]);return J(N,Se,void 0,void 0,null,se)},he.createRef=function(){return{current:null}},he.forwardRef=function(N){return{$$typeof:f,render:N}},he.isValidElement=R,he.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Q}},he.memo=function(N,X){return{$$typeof:p,type:N,compare:X===void 0?null:X}},he.startTransition=function(N){var X=B.T,Z={};B.T=Z;try{var W=N(),se=B.S;se!==null&&se(Z,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(ve,ne)}catch(Se){ne(Se)}finally{B.T=X}},he.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},he.use=function(N){return B.H.use(N)},he.useActionState=function(N,X,Z){return B.H.useActionState(N,X,Z)},he.useCallback=function(N,X){return B.H.useCallback(N,X)},he.useContext=function(N){return B.H.useContext(N)},he.useDebugValue=function(){},he.useDeferredValue=function(N,X){return B.H.useDeferredValue(N,X)},he.useEffect=function(N,X,Z){var W=B.H;if(typeof Z=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return W.useEffect(N,X)},he.useId=function(){return B.H.useId()},he.useImperativeHandle=function(N,X,Z){return B.H.useImperativeHandle(N,X,Z)},he.useInsertionEffect=function(N,X){return B.H.useInsertionEffect(N,X)},he.useLayoutEffect=function(N,X){return B.H.useLayoutEffect(N,X)},he.useMemo=function(N,X){return B.H.useMemo(N,X)},he.useOptimistic=function(N,X){return B.H.useOptimistic(N,X)},he.useReducer=function(N,X,Z){return B.H.useReducer(N,X,Z)},he.useRef=function(N){return B.H.useRef(N)},he.useState=function(N){return B.H.useState(N)},he.useSyncExternalStore=function(N,X,Z){return B.H.useSyncExternalStore(N,X,Z)},he.useTransition=function(){return B.H.useTransition()},he.version="19.1.1",he}var hy;function Nh(){return hy||(hy=1,qf.exports=Aw()),qf.exports}var q=Nh();const Kt=_w(q);function zo(n,e,i,s){const[l,o]=Kt.useState(i);return Kt.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),l}function es(){const n=Kt.useRef(null),[e,i]=Kt.useState(new DOMRect(0,0,10,10));return Kt.useLayoutEffect(()=>{const s=n.current;if(!s)return;const l=s.getBoundingClientRect();i(new DOMRect(0,0,l.width,l.height));const o=new ResizeObserver(u=>{const f=u[u.length-1];f&&f.contentRect&&i(f.contentRect)});return o.observe(s),()=>o.disconnect()},[n]),[e,n]}function Tt(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 Nw(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 S0(n,e,i,s,l){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 dy(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 Kn(n,e){n&&(e=Ki.getObject(n,e));const[i,s]=Kt.useState(e),l=Kt.useCallback(o=>{n?Ki.setObject(n,o):s(o)},[n,s]);return Kt.useEffect(()=>{if(n){const o=()=>s(Ki.getObject(n,e));return Ki.onChangeEmitter.addEventListener(n,o),()=>Ki.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,l]}class Cw{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 Ki=new Cw;function Ye(...n){return n.filter(Boolean).join(" ")}function w0(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const py="\\u0000-\\u0020\\u007f-\\u009f",x0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+py+'"]{2,}[^\\s'+py+`"')}\\],:;.!?]`,"ug");function kw(){const[n,e]=Kt.useState(!1),i=Kt.useCallback(()=>{const s=[];return e(l=>(s.push(setTimeout(()=>e(!1),1e3)),l?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,i]}function qN(){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";Ki.getString("theme",e)==="dark-mode"&&document.body.classList.add("dark-mode")}const Ch=new Set;function Mw(){const n=ch(),e=n==="dark-mode"?"light-mode":"dark-mode";document.body.classList.remove(n),document.body.classList.add(e),Ki.setString("theme",e);for(const i of Ch)i(e)}function $N(n){Ch.add(n)}function IN(n){Ch.delete(n)}function ch(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function Ow(){const[n,e]=Kt.useState(ch()==="dark-mode");return[n,i=>{ch()==="dark-mode"!==i&&Mw(),e(i)}]}var $f={exports:{}},va={},If={exports:{}},Vf={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var gy;function Lw(){return gy||(gy=1,(function(n){function e(z,Q){var ne=z.length;z.push(Q);e:for(;0<ne;){var ve=ne-1>>>1,N=z[ve];if(0<l(N,Q))z[ve]=Q,z[ne]=N,ne=ve;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],ne=z.pop();if(ne!==Q){z[0]=ne;e:for(var ve=0,N=z.length,X=N>>>1;ve<X;){var Z=2*(ve+1)-1,W=z[Z],se=Z+1,Se=z[se];if(0>l(W,ne))se<N&&0>l(Se,W)?(z[ve]=Se,z[se]=ne,ve=se):(z[ve]=W,z[Z]=ne,ve=Z);else if(se<N&&0>l(Se,ne))z[ve]=Se,z[se]=ne,ve=se;else break e}}return Q}function l(z,Q){var ne=z.sortIndex-Q.sortIndex;return ne!==0?ne: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,w=!1,E=!1,x=!1,T=!1,M=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function $(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 B(z){if(x=!1,$(z),!E)if(i(d)!==null)E=!0,Y||(Y=!0,L());else{var Q=i(p);Q!==null&&me(B,Q.startTime-z)}}var Y=!1,J=-1,I=5,R=-1;function te(){return T?!0:!(n.unstable_now()-R<I)}function re(){if(T=!1,Y){var z=n.unstable_now();R=z;var Q=!0;try{e:{E=!1,x&&(x=!1,C(J),J=-1),w=!0;var ne=b;try{t:{for($(z),y=i(d);y!==null&&!(y.expirationTime>z&&te());){var ve=y.callback;if(typeof ve=="function"){y.callback=null,b=y.priorityLevel;var N=ve(y.expirationTime<=z);if(z=n.unstable_now(),typeof N=="function"){y.callback=N,$(z),Q=!0;break t}y===i(d)&&s(d),$(z)}else s(d);y=i(d)}if(y!==null)Q=!0;else{var X=i(p);X!==null&&me(B,X.startTime-z),Q=!1}}break e}finally{y=null,b=ne,w=!1}Q=void 0}}finally{Q?L():Y=!1}}}var L;if(typeof V=="function")L=function(){V(re)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ge=F.port2;F.port1.onmessage=re,L=function(){ge.postMessage(null)}}else L=function(){M(re,0)};function me(z,Q){J=M(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"):I=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 ne=b;b=Q;try{return z()}finally{b=ne}},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 ne=b;b=z;try{return Q()}finally{b=ne}},n.unstable_scheduleCallback=function(z,Q,ne){var ve=n.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ve+ne:ve):ne=ve,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=ne+N,z={id:m++,callback:Q,priorityLevel:z,startTime:ne,expirationTime:N,sortIndex:-1},ne>ve?(z.sortIndex=ne,e(p,z),i(d)===null&&z===i(p)&&(x?(C(J),J=-1):x=!0,me(B,ne-ve))):(z.sortIndex=N,e(d,z),E||w||(E=!0,Y||(Y=!0,L()))),z},n.unstable_shouldYield=te,n.unstable_wrapCallback=function(z){var Q=b;return function(){var ne=b;b=Q;try{return z.apply(this,arguments)}finally{b=ne}}}})(Vf)),Vf}var my;function Rw(){return my||(my=1,If.exports=Lw()),If.exports}var Gf={exports:{}},yt={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var yy;function jw(){if(yy)return yt;yy=1;var n=Nh();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},l=Symbol.for("react.portal");function o(d,p,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,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 yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,yt.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)},yt.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()}},yt.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))},yt.prefetchDNS=function(d){typeof d=="string"&&s.d.D(d)},yt.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,w=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:w}):m==="script"&&s.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},yt.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)},yt.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})}},yt.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)},yt.requestFormReset=function(d){s.d.r(d)},yt.unstable_batchedUpdates=function(d,p){return d(p)},yt.useFormState=function(d,p,m){return u.H.useFormState(d,p,m)},yt.useFormStatus=function(){return u.H.useHostTransitionStatus()},yt.version="19.1.1",yt}var by;function Dw(){if(by)return Gf.exports;by=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(),Gf.exports=jw(),Gf.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var vy;function Bw(){if(vy)return va;vy=1;var n=Rw(),e=Nh(),i=Dw();function s(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}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 l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a: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 a=t,c=r;;){var h=a.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===a)return f(h),t;if(g===c)return f(h),r;g=g.sibling}throw Error(s(188))}if(a.return!==c.return)a=h,c=g;else{for(var S=!1,_=h.child;_;){if(_===a){S=!0,a=h,c=g;break}if(_===c){S=!0,c=h,a=g;break}_=_.sibling}if(!S){for(_=g.child;_;){if(_===a){S=!0,a=g,c=h;break}if(_===c){S=!0,c=g,a=h;break}_=_.sibling}if(!S)throw Error(s(189))}}if(a.alternate!==c)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?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"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),V=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function L(t){return t===null||typeof t!="object"?null:(t=re&&t[re]||t["@@iterator"],typeof t=="function"?t:null)}var F=Symbol.for("react.client.reference");function ge(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 B:return"Suspense";case Y:return"SuspenseList";case R:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case V:return(t.displayName||"Context")+".Provider";case C:return(t._context.displayName||"Context")+".Consumer";case $:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case J:return r=t.displayName||null,r!==null?r:ge(t.type)||"Memo";case I:r=t._payload,t=t._init;try{return ge(t(r))}catch{}}return null}var me=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,ne={pending:!1,data:null,method:null,action:null},ve=[],N=-1;function X(t){return{current:t}}function Z(t){0>N||(t.current=ve[N],ve[N]=null,N--)}function W(t,r){N++,ve[N]=t.current,t.current=r}var se=X(null),Se=X(null),ce=X(null),Ve=X(null);function Le(t,r){switch(W(ce,r),W(Se,t),W(se,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Um(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Um(r),t=Hm(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Z(se),W(se,t)}function cn(){Z(se),Z(Se),Z(ce)}function St(t){t.memoizedState!==null&&W(Ve,t);var r=se.current,a=Hm(r,t.type);r!==a&&(W(Se,t),W(se,a))}function xi(t){Se.current===t&&(Z(se),Z(Se)),Ve.current===t&&(Z(Ve),da._currentValue=ne)}var Sr=Object.prototype.hasOwnProperty,wr=n.unstable_scheduleCallback,_i=n.unstable_cancelCallback,Wa=n.unstable_shouldYield,el=n.unstable_requestPaint,lt=n.unstable_now,xc=n.unstable_getCurrentPriorityLevel,tl=n.unstable_ImmediatePriority,nl=n.unstable_UserBlockingPriority,ss=n.unstable_NormalPriority,il=n.unstable_LowPriority,rs=n.unstable_IdlePriority,_c=n.log,Tc=n.unstable_setDisableYieldValue,Ti=null,Ze=null;function Xt(t){if(typeof _c=="function"&&Tc(t),Ze&&typeof Ze.setStrictMode=="function")try{Ze.setStrictMode(Ti,t)}catch{}}var tt=Math.clz32?Math.clz32:sl,Ec=Math.log,Ac=Math.LN2;function sl(t){return t>>>=0,t===0?32:31-(Ec(t)/Ac|0)|0}var le=256,Bt=4194304;function ot(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 rl(t,r,a){var c=t.pendingLanes;if(c===0)return 0;var h=0,g=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var _=c&134217727;return _!==0?(c=_&~g,c!==0?h=ot(c):(S&=_,S!==0?h=ot(S):a||(a=_&~t,a!==0&&(h=ot(a))))):(_=c&~g,_!==0?h=ot(_):S!==0?h=ot(S):a||(a=c&~t,a!==0&&(h=ot(a)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,a=r&-r,g>=a||g===32&&(a&4194048)!==0)?r:h}function xr(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function oS(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 Sd(){var t=le;return le<<=1,(le&4194048)===0&&(le=256),t}function wd(){var t=Bt;return Bt<<=1,(Bt&62914560)===0&&(Bt=4194304),t}function Nc(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function _r(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function cS(t,r,a,c,h,g){var S=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(a=S&~a;0<a;){var G=31-tt(a),P=1<<G;_[G]=0,A[G]=-1;var U=D[G];if(U!==null)for(D[G]=null,G=0;G<U.length;G++){var H=U[G];H!==null&&(H.lane&=-536870913)}a&=~P}c!==0&&xd(t,c,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(S&~r))}function xd(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-tt(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|a&4194090}function _d(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var c=31-tt(a),h=1<<c;h&r|t[c]&r&&(t[c]|=r),a&=~h}}function Cc(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 kc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Td(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:iy(t.type))}function uS(t,r){var a=Q.p;try{return Q.p=t,r()}finally{Q.p=a}}var Xn=Math.random().toString(36).slice(2),gt="__reactFiber$"+Xn,At="__reactProps$"+Xn,as="__reactContainer$"+Xn,Mc="__reactEvents$"+Xn,fS="__reactListeners$"+Xn,hS="__reactHandles$"+Xn,Ed="__reactResources$"+Xn,Tr="__reactMarker$"+Xn;function Oc(t){delete t[gt],delete t[At],delete t[Mc],delete t[fS],delete t[hS]}function ls(t){var r=t[gt];if(r)return r;for(var a=t.parentNode;a;){if(r=a[as]||a[gt]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=Im(t);t!==null;){if(a=t[gt])return a;t=Im(t)}return r}t=a,a=t.parentNode}return null}function os(t){if(t=t[gt]||t[as]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function Er(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(s(33))}function cs(t){var r=t[Ed];return r||(r=t[Ed]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function nt(t){t[Tr]=!0}var Ad=new Set,Nd={};function Ei(t,r){us(t,r),us(t+"Capture",r)}function us(t,r){for(Nd[t]=r,t=0;t<r.length;t++)Ad.add(r[t])}var dS=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]*$"),Cd={},kd={};function pS(t){return Sr.call(kd,t)?!0:Sr.call(Cd,t)?!1:dS.test(t)?kd[t]=!0:(Cd[t]=!0,!1)}function al(t,r,a){if(pS(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){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,""+a)}}function ll(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Tn(t,r,a,c){if(c===null)t.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+c)}}var Lc,Md;function fs(t){if(Lc===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Lc=r&&r[1]||"",Md=-1<a.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Lc+t+Md}var Rc=!1;function jc(t,r){if(!t||Rc)return"";Rc=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(H){var U=H}Reflect.construct(t,[],P)}else{try{P.call()}catch(H){U=H}t.call(P.prototype)}}else{try{throw Error()}catch(H){U=H}(P=t())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(H){if(H&&U&&typeof H.stack=="string")return[H.stack,U.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(),S=g[0],_=g[1];if(S&&_){var A=S.split(`
|
|
45
|
+
`),D=_.split(`
|
|
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 G=`
|
|
47
|
+
`+A[c].replace(" at new "," at ");return t.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",t.displayName)),G}while(1<=c&&0<=h);break}}}finally{Rc=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?fs(a):""}function gS(t){switch(t.tag){case 26:case 27:case 5:return fs(t.type);case 16:return fs("Lazy");case 13:return fs("Suspense");case 19:return fs("SuspenseList");case 0:case 15:return jc(t.type,!1);case 11:return jc(t.type.render,!1);case 1:return jc(t.type,!0);case 31:return fs("Activity");default:return""}}function Od(t){try{var r="";do r+=gS(t),t=t.return;while(t);return r}catch(a){return`
|
|
48
|
+
Error generating stack: `+a.message+`
|
|
49
|
+
`+a.stack}}function Pt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ld(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function mS(t){var r=Ld(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(S){c=""+S,g.call(this,S)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(S){c=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function ol(t){t._valueTracker||(t._valueTracker=mS(t))}function Rd(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return t&&(c=Ld(t)?t.checked?"true":"false":t.value),t=c,t!==a?(r.setValue(t),!0):!1}function cl(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 yS=/[\n"\\]/g;function Ft(t){return t.replace(yS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Dc(t,r,a,c,h,g,S,_){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),r!=null?S==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Pt(r)):t.value!==""+Pt(r)&&(t.value=""+Pt(r)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),r!=null?Bc(t,S,Pt(r)):a!=null?Bc(t,S,Pt(a)):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=""+Pt(_):t.removeAttribute("name")}function jd(t,r,a,c,h,g,S,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;a=a!=null?""+Pt(a):"",r=r!=null?""+Pt(r):a,_||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,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S)}function Bc(t,r,a){r==="number"&&cl(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function hs(t,r,a,c){if(t=t.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=r.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&c&&(t[a].defaultSelected=!0)}else{for(a=""+Pt(a),r=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Dd(t,r,a){if(r!=null&&(r=""+Pt(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+Pt(a):""}function Bd(t,r,a,c){if(r==null){if(c!=null){if(a!=null)throw Error(s(92));if(me(c)){if(1<c.length)throw Error(s(93));c=c[0]}a=c}a==null&&(a=""),r=a}a=Pt(r),t.defaultValue=a,c=t.textContent,c===a&&c!==""&&c!==null&&(t.value=c)}function ds(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var bS=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 Ud(t,r,a){var c=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,a):typeof a!="number"||a===0||bS.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function Hd(t,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(t=t.style,a!=null){for(var c in a)!a.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)&&a[h]!==c&&Ud(t,h,c)}else for(var g in r)r.hasOwnProperty(g)&&Ud(t,g,r[g])}function Uc(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 vS=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"]]),SS=/^[\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 ul(t){return SS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Hc=null;function zc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ps=null,gs=null;function zd(t){var r=os(t);if(r&&(t=r.stateNode)){var a=t[At]||null;e:switch(t=r.stateNode,r.type){case"input":if(Dc(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ft(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==t&&c.form===t.form){var h=c[At]||null;if(!h)throw Error(s(90));Dc(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<a.length;r++)c=a[r],c.form===t.form&&Rd(c)}break e;case"textarea":Dd(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&hs(t,!!a.multiple,r,!1)}}}var qc=!1;function qd(t,r,a){if(qc)return t(r,a);qc=!0;try{var c=t(r);return c}finally{if(qc=!1,(ps!==null||gs!==null)&&(Fl(),ps&&(r=ps,t=gs,gs=ps=null,zd(r),t)))for(r=0;r<t.length;r++)zd(t[r])}}function Ar(t,r){var a=t.stateNode;if(a===null)return null;var c=a[At]||null;if(c===null)return null;a=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(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var En=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$c=!1;if(En)try{var Nr={};Object.defineProperty(Nr,"passive",{get:function(){$c=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{$c=!1}var Pn=null,Ic=null,fl=null;function $d(){if(fl)return fl;var t,r=Ic,a=r.length,c,h="value"in Pn?Pn.value:Pn.textContent,g=h.length;for(t=0;t<a&&r[t]===h[t];t++);var S=a-t;for(c=1;c<=S&&r[a-c]===h[g-c];c++);return fl=h.slice(t,1<c?1-c:void 0)}function hl(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 dl(){return!0}function Id(){return!1}function Nt(t){function r(a,c,h,g,S){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?dl:Id,this.isPropagationStopped=Id,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=dl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=dl)},persist:function(){},isPersistent:dl}),r}var Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pl=Nt(Ai),Cr=m({},Ai,{view:0,detail:0}),wS=Nt(Cr),Vc,Gc,kr,gl=m({},Cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yc,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!==kr&&(kr&&t.type==="mousemove"?(Vc=t.screenX-kr.screenX,Gc=t.screenY-kr.screenY):Gc=Vc=0,kr=t),Vc)},movementY:function(t){return"movementY"in t?t.movementY:Gc}}),Vd=Nt(gl),xS=m({},gl,{dataTransfer:0}),_S=Nt(xS),TS=m({},Cr,{relatedTarget:0}),Kc=Nt(TS),ES=m({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),AS=Nt(ES),NS=m({},Ai,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),CS=Nt(NS),kS=m({},Ai,{data:0}),Gd=Nt(kS),MS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},OS={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"},LS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=LS[t])?!!r[t]:!1}function Yc(){return RS}var jS=m({},Cr,{key:function(t){if(t.key){var r=MS[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=hl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?OS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yc,charCode:function(t){return t.type==="keypress"?hl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?hl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),DS=Nt(jS),BS=m({},gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kd=Nt(BS),US=m({},Cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yc}),HS=Nt(US),zS=m({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),qS=Nt(zS),$S=m({},gl,{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}),IS=Nt($S),VS=m({},Ai,{newState:0,oldState:0}),GS=Nt(VS),KS=[9,13,27,32],Xc=En&&"CompositionEvent"in window,Mr=null;En&&"documentMode"in document&&(Mr=document.documentMode);var YS=En&&"TextEvent"in window&&!Mr,Yd=En&&(!Xc||Mr&&8<Mr&&11>=Mr),Xd=" ",Pd=!1;function Fd(t,r){switch(t){case"keyup":return KS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ms=!1;function XS(t,r){switch(t){case"compositionend":return Qd(r);case"keypress":return r.which!==32?null:(Pd=!0,Xd);case"textInput":return t=r.data,t===Xd&&Pd?null:t;default:return null}}function PS(t,r){if(ms)return t==="compositionend"||!Xc&&Fd(t,r)?(t=$d(),fl=Ic=Pn=null,ms=!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 Yd&&r.locale!=="ko"?null:r.data;default:return null}}var FS={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 Zd(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!FS[t.type]:r==="textarea"}function Jd(t,r,a,c){ps?gs?gs.push(c):gs=[c]:ps=c,r=to(r,"onChange"),0<r.length&&(a=new pl("onChange","change",null,a,c),t.push({event:a,listeners:r}))}var Or=null,Lr=null;function QS(t){Lm(t,0)}function ml(t){var r=Er(t);if(Rd(r))return t}function Wd(t,r){if(t==="change")return r}var ep=!1;if(En){var Pc;if(En){var Fc="oninput"in document;if(!Fc){var tp=document.createElement("div");tp.setAttribute("oninput","return;"),Fc=typeof tp.oninput=="function"}Pc=Fc}else Pc=!1;ep=Pc&&(!document.documentMode||9<document.documentMode)}function np(){Or&&(Or.detachEvent("onpropertychange",ip),Lr=Or=null)}function ip(t){if(t.propertyName==="value"&&ml(Lr)){var r=[];Jd(r,Lr,t,zc(t)),qd(QS,r)}}function ZS(t,r,a){t==="focusin"?(np(),Or=r,Lr=a,Or.attachEvent("onpropertychange",ip)):t==="focusout"&&np()}function JS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ml(Lr)}function WS(t,r){if(t==="click")return ml(r)}function e1(t,r){if(t==="input"||t==="change")return ml(r)}function t1(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Ut=typeof Object.is=="function"?Object.is:t1;function Rr(t,r){if(Ut(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!Sr.call(r,h)||!Ut(t[h],r[h]))return!1}return!0}function sp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function rp(t,r){var a=sp(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=r&&c>=r)return{node:a,offset:r-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=sp(a)}}function ap(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?ap(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function lp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=cl(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=cl(t.document)}return r}function Qc(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 n1=En&&"documentMode"in document&&11>=document.documentMode,ys=null,Zc=null,jr=null,Jc=!1;function op(t,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Jc||ys==null||ys!==cl(c)||(c=ys,"selectionStart"in c&&Qc(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}),jr&&Rr(jr,c)||(jr=c,c=to(Zc,"onSelect"),0<c.length&&(r=new pl("onSelect","select",null,r,a),t.push({event:r,listeners:c}),r.target=ys)))}function Ni(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var bs={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},Wc={},cp={};En&&(cp=document.createElement("div").style,"AnimationEvent"in window||(delete bs.animationend.animation,delete bs.animationiteration.animation,delete bs.animationstart.animation),"TransitionEvent"in window||delete bs.transitionend.transition);function Ci(t){if(Wc[t])return Wc[t];if(!bs[t])return t;var r=bs[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in cp)return Wc[t]=r[a];return t}var up=Ci("animationend"),fp=Ci("animationiteration"),hp=Ci("animationstart"),i1=Ci("transitionrun"),s1=Ci("transitionstart"),r1=Ci("transitioncancel"),dp=Ci("transitionend"),pp=new Map,eu="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(" ");eu.push("scrollEnd");function un(t,r){pp.set(t,r),Ei(r,[t])}var gp=new WeakMap;function Qt(t,r){if(typeof t=="object"&&t!==null){var a=gp.get(t);return a!==void 0?a:(r={value:t,source:r,stack:Od(r)},gp.set(t,r),r)}return{value:t,source:r,stack:Od(r)}}var Zt=[],vs=0,tu=0;function yl(){for(var t=vs,r=tu=vs=0;r<t;){var a=Zt[r];Zt[r++]=null;var c=Zt[r];Zt[r++]=null;var h=Zt[r];Zt[r++]=null;var g=Zt[r];if(Zt[r++]=null,c!==null&&h!==null){var S=c.pending;S===null?h.next=h:(h.next=S.next,S.next=h),c.pending=h}g!==0&&mp(a,h,g)}}function bl(t,r,a,c){Zt[vs++]=t,Zt[vs++]=r,Zt[vs++]=a,Zt[vs++]=c,tu|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function nu(t,r,a,c){return bl(t,r,a,c),vl(t)}function Ss(t,r){return bl(t,null,null,r),vl(t)}function mp(t,r,a){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a);for(var h=!1,g=t.return;g!==null;)g.childLanes|=a,c=g.alternate,c!==null&&(c.childLanes|=a),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-tt(a),t=g.hiddenUpdates,c=t[h],c===null?t[h]=[r]:c.push(r),r.lane=a|536870912),g):null}function vl(t){if(50<ra)throw ra=0,cf=null,Error(s(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var ws={};function a1(t,r,a,c){this.tag=t,this.key=a,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 Ht(t,r,a,c){return new a1(t,r,a,c)}function iu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function An(t,r){var a=t.alternate;return a===null?(a=Ht(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function yp(t,r){t.flags&=65011714;var a=t.alternate;return a===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=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Sl(t,r,a,c,h,g){var S=0;if(c=t,typeof t=="function")iu(t)&&(S=1);else if(typeof t=="string")S=ow(t,a,se.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case R:return t=Ht(31,a,r,h),t.elementType=R,t.lanes=g,t;case E:return ki(a.children,h,g,r);case x:S=8,h|=24;break;case T:return t=Ht(12,a,r,h|2),t.elementType=T,t.lanes=g,t;case B:return t=Ht(13,a,r,h),t.elementType=B,t.lanes=g,t;case Y:return t=Ht(19,a,r,h),t.elementType=Y,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case M:case V:S=10;break e;case C:S=9;break e;case $:S=11;break e;case J:S=14;break e;case I:S=16,c=null;break e}S=29,a=Error(s(130,t===null?"null":typeof t,"")),c=null}return r=Ht(S,a,r,h),r.elementType=t,r.type=c,r.lanes=g,r}function ki(t,r,a,c){return t=Ht(7,t,c,r),t.lanes=a,t}function su(t,r,a){return t=Ht(6,t,null,r),t.lanes=a,t}function ru(t,r,a){return r=Ht(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var xs=[],_s=0,wl=null,xl=0,Jt=[],Wt=0,Mi=null,Nn=1,Cn="";function Oi(t,r){xs[_s++]=xl,xs[_s++]=wl,wl=t,xl=r}function bp(t,r,a){Jt[Wt++]=Nn,Jt[Wt++]=Cn,Jt[Wt++]=Mi,Mi=t;var c=Nn;t=Cn;var h=32-tt(c)-1;c&=~(1<<h),a+=1;var g=32-tt(r)+h;if(30<g){var S=h-h%5;g=(c&(1<<S)-1).toString(32),c>>=S,h-=S,Nn=1<<32-tt(r)+h|a<<h|c,Cn=g+t}else Nn=1<<g|a<<h|c,Cn=t}function au(t){t.return!==null&&(Oi(t,1),bp(t,1,0))}function lu(t){for(;t===wl;)wl=xs[--_s],xs[_s]=null,xl=xs[--_s],xs[_s]=null;for(;t===Mi;)Mi=Jt[--Wt],Jt[Wt]=null,Cn=Jt[--Wt],Jt[Wt]=null,Nn=Jt[--Wt],Jt[Wt]=null}var wt=null,$e=null,_e=!1,Li=null,mn=!1,ou=Error(s(519));function Ri(t){var r=Error(s(418,""));throw Ur(Qt(r,t)),ou}function vp(t){var r=t.stateNode,a=t.type,c=t.memoizedProps;switch(r[gt]=t,r[At]=c,a){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(a=0;a<la.length;a++)be(la[a],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":be("invalid",r),jd(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),ol(r);break;case"select":be("invalid",r);break;case"textarea":be("invalid",r),Bd(r,c.value,c.defaultValue,c.children),ol(r)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||c.suppressHydrationWarning===!0||Bm(r.textContent,a)?(c.popover!=null&&(be("beforetoggle",r),be("toggle",r)),c.onScroll!=null&&be("scroll",r),c.onScrollEnd!=null&&be("scrollend",r),c.onClick!=null&&(r.onclick=no),r=!0):r=!1,r||Ri(t)}function Sp(t){for(wt=t.return;wt;)switch(wt.tag){case 5:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:wt=wt.return}}function Dr(t){if(t!==wt)return!1;if(!_e)return Sp(t),_e=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Ef(t.type,t.memoizedProps)),a=!a),a&&$e&&Ri(t),Sp(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(a=t.data,a==="/$"){if(r===0){$e=hn(t.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++;t=t.nextSibling}$e=null}}else r===27?(r=$e,ui(t.type)?(t=kf,kf=null,$e=t):$e=r):$e=wt?hn(t.stateNode.nextSibling):null;return!0}function Br(){$e=wt=null,_e=!1}function wp(){var t=Li;return t!==null&&(Mt===null?Mt=t:Mt.push.apply(Mt,t),Li=null),t}function Ur(t){Li===null?Li=[t]:Li.push(t)}var cu=X(null),ji=null,kn=null;function Fn(t,r,a){W(cu,r._currentValue),r._currentValue=a}function Mn(t){t._currentValue=cu.current,Z(cu)}function uu(t,r,a){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===a)break;t=t.return}}function fu(t,r,a,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var S=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|=a,_=g.alternate,_!==null&&(_.lanes|=a),uu(g.return,a,t),c||(S=null);break e}g=_.next}}else if(h.tag===18){if(S=h.return,S===null)throw Error(s(341));S.lanes|=a,g=S.alternate,g!==null&&(g.lanes|=a),uu(S,a,t),S=null}else S=h.child;if(S!==null)S.return=h;else for(S=h;S!==null;){if(S===t){S=null;break}if(h=S.sibling,h!==null){h.return=S.return,S=h;break}S=S.return}h=S}}function Hr(t,r,a,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 S=h.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var _=h.type;Ut(h.pendingProps.value,S.value)||(t!==null?t.push(_):t=[_])}}else if(h===Ve.current){if(S=h.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(da):t=[da])}h=h.return}t!==null&&fu(r,t,a,c),r.flags|=262144}function _l(t){for(t=t.firstContext;t!==null;){if(!Ut(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Di(t){ji=t,kn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function mt(t){return xp(ji,t)}function Tl(t,r){return ji===null&&Di(t),xp(t,r)}function xp(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},kn===null){if(t===null)throw Error(s(308));kn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else kn=kn.next=r;return a}var l1=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},o1=n.unstable_scheduleCallback,c1=n.unstable_NormalPriority,Je={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hu(){return{controller:new l1,data:new Map,refCount:0}}function zr(t){t.refCount--,t.refCount===0&&o1(c1,function(){t.controller.abort()})}var qr=null,du=0,Ts=0,Es=null;function u1(t,r){if(qr===null){var a=qr=[];du=0,Ts=mf(),Es={status:"pending",value:void 0,then:function(c){a.push(c)}}}return du++,r.then(_p,_p),r}function _p(){if(--du===0&&qr!==null){Es!==null&&(Es.status="fulfilled");var t=qr;qr=null,Ts=0,Es=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function f1(t,r){var a=[],c={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var h=0;h<a.length;h++)(0,a[h])(r)},function(h){for(c.status="rejected",c.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),c}var Tp=z.S;z.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&u1(t,r),Tp!==null&&Tp(t,r)};var Bi=X(null);function pu(){var t=Bi.current;return t!==null?t:Re.pooledCache}function El(t,r){r===null?W(Bi,Bi.current):W(Bi,r.pool)}function Ep(){var t=pu();return t===null?null:{parent:Je._currentValue,pool:t}}var $r=Error(s(460)),Ap=Error(s(474)),Al=Error(s(542)),gu={then:function(){}};function Np(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Nl(){}function Cp(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(Nl,Nl),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Mp(t),t;default:if(typeof r.status=="string")r.then(Nl,Nl);else{if(t=Re,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,Mp(t),t}throw Ir=r,$r}}var Ir=null;function kp(){if(Ir===null)throw Error(s(459));var t=Ir;return Ir=null,t}function Mp(t){if(t===$r||t===Al)throw Error(s(483))}var Qn=!1;function mu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yu(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 Zn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(t,r,a){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=vl(t),mp(t,null,a),r}return bl(t,c,r,a),vl(t)}function Vr(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,_d(t,a)}}function bu(t,r){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?h=g=S:g=g.next=S,a=a.next}while(a!==null);g===null?h=g=r:g=g.next=r}else h=g=r;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var vu=!1;function Gr(){if(vu){var t=Es;if(t!==null)throw t}}function Kr(t,r,a,c){vu=!1;var h=t.updateQueue;Qn=!1;var g=h.firstBaseUpdate,S=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var A=_,D=A.next;A.next=null,S===null?g=D:S.next=D,S=A;var G=t.alternate;G!==null&&(G=G.updateQueue,_=G.lastBaseUpdate,_!==S&&(_===null?G.firstBaseUpdate=D:_.next=D,G.lastBaseUpdate=A))}if(g!==null){var P=h.baseState;S=0,G=D=A=null,_=g;do{var U=_.lane&-536870913,H=U!==_.lane;if(H?(we&U)===U:(c&U)===U){U!==0&&U===Ts&&(vu=!0),G!==null&&(G=G.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ue=t,ae=_;U=r;var Ce=a;switch(ae.tag){case 1:if(ue=ae.payload,typeof ue=="function"){P=ue.call(Ce,P,U);break e}P=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ae.payload,U=typeof ue=="function"?ue.call(Ce,P,U):ue,U==null)break e;P=m({},P,U);break e;case 2:Qn=!0}}U=_.callback,U!==null&&(t.flags|=64,H&&(t.flags|=8192),H=h.callbacks,H===null?h.callbacks=[U]:H.push(U))}else H={lane:U,tag:_.tag,payload:_.payload,callback:_.callback,next:null},G===null?(D=G=H,A=P):G=G.next=H,S|=U;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;H=_,_=H.next,H.next=null,h.lastBaseUpdate=H,h.shared.pending=null}}while(!0);G===null&&(A=P),h.baseState=A,h.firstBaseUpdate=D,h.lastBaseUpdate=G,g===null&&(h.shared.lanes=0),ai|=S,t.lanes=S,t.memoizedState=P}}function Op(t,r){if(typeof t!="function")throw Error(s(191,t));t.call(r)}function Lp(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Op(a[t],r)}var As=X(null),Cl=X(0);function Rp(t,r){t=Un,W(Cl,t),W(As,r),Un=t|r.baseLanes}function Su(){W(Cl,Un),W(As,As.current)}function wu(){Un=Cl.current,Z(As),Z(Cl)}var Wn=0,de=null,Ae=null,Pe=null,kl=!1,Ns=!1,Ui=!1,Ml=0,Yr=0,Cs=null,h1=0;function Ge(){throw Error(s(321))}function xu(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!Ut(t[a],r[a]))return!1;return!0}function _u(t,r,a,c,h,g){return Wn=g,de=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=t===null||t.memoizedState===null?mg:yg,Ui=!1,g=a(c,h),Ui=!1,Ns&&(g=Dp(r,a,c,h)),jp(t),g}function jp(t){z.H=Bl;var r=Ae!==null&&Ae.next!==null;if(Wn=0,Pe=Ae=de=null,kl=!1,Yr=0,Cs=null,r)throw Error(s(300));t===null||it||(t=t.dependencies,t!==null&&_l(t)&&(it=!0))}function Dp(t,r,a,c){de=t;var h=0;do{if(Ns&&(Cs=null),Yr=0,Ns=!1,25<=h)throw Error(s(301));if(h+=1,Pe=Ae=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=v1,g=r(a,c)}while(Ns);return g}function d1(){var t=z.H,r=t.useState()[0];return r=typeof r.then=="function"?Xr(r):r,t=t.useState()[0],(Ae!==null?Ae.memoizedState:null)!==t&&(de.flags|=1024),r}function Tu(){var t=Ml!==0;return Ml=0,t}function Eu(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function Au(t){if(kl){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}kl=!1}Wn=0,Pe=Ae=de=null,Ns=!1,Yr=Ml=0,Cs=null}function Ct(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?de.memoizedState=Pe=t:Pe=Pe.next=t,Pe}function Fe(){if(Ae===null){var t=de.alternate;t=t!==null?t.memoizedState:null}else t=Ae.next;var r=Pe===null?de.memoizedState:Pe.next;if(r!==null)Pe=r,Ae=t;else{if(t===null)throw de.alternate===null?Error(s(467)):Error(s(310));Ae=t,t={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Pe===null?de.memoizedState=Pe=t:Pe=Pe.next=t}return Pe}function Nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xr(t){var r=Yr;return Yr+=1,Cs===null&&(Cs=[]),t=Cp(Cs,t,r),r=de,(Pe===null?r.memoizedState:Pe.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?mg:yg),t}function Ol(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xr(t);if(t.$$typeof===V)return mt(t)}throw Error(s(438,String(t)))}function Cu(t){var r=null,a=de.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var c=de.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}),a===null&&(a=Nu(),de.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),c=0;c<t;c++)a[c]=te;return r.index++,a}function On(t,r){return typeof r=="function"?r(t):r}function Ll(t){var r=Fe();return ku(r,Ae,t)}function ku(t,r,a){var c=t.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=a;var h=t.baseQueue,g=c.pending;if(g!==null){if(h!==null){var S=h.next;h.next=g.next,g.next=S}r.baseQueue=h=g,c.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{r=h.next;var _=S=null,A=null,D=r,G=!1;do{var P=D.lane&-536870913;if(P!==D.lane?(we&P)===P:(Wn&P)===P){var U=D.revertLane;if(U===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),P===Ts&&(G=!0);else if((Wn&U)===U){D=D.next,U===Ts&&(G=!0);continue}else P={lane:0,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=P,S=g):A=A.next=P,de.lanes|=U,ai|=U;P=D.action,Ui&&a(g,P),g=D.hasEagerState?D.eagerState:a(g,P)}else U={lane:P,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=U,S=g):A=A.next=U,de.lanes|=P,ai|=P;D=D.next}while(D!==null&&D!==r);if(A===null?S=g:A.next=_,!Ut(g,t.memoizedState)&&(it=!0,G&&(a=Es,a!==null)))throw a;t.memoizedState=g,t.baseState=S,t.baseQueue=A,c.lastRenderedState=g}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Mu(t){var r=Fe(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=t;var c=a.dispatch,h=a.pending,g=r.memoizedState;if(h!==null){a.pending=null;var S=h=h.next;do g=t(g,S.action),S=S.next;while(S!==h);Ut(g,r.memoizedState)||(it=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,c]}function Bp(t,r,a){var c=de,h=Fe(),g=_e;if(g){if(a===void 0)throw Error(s(407));a=a()}else a=r();var S=!Ut((Ae||h).memoizedState,a);S&&(h.memoizedState=a,it=!0),h=h.queue;var _=zp.bind(null,c,h,t);if(Pr(2048,8,_,[t]),h.getSnapshot!==r||S||Pe!==null&&Pe.memoizedState.tag&1){if(c.flags|=2048,ks(9,Rl(),Hp.bind(null,c,h,a,r),null),Re===null)throw Error(s(349));g||(Wn&124)!==0||Up(c,r,a)}return a}function Up(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=de.updateQueue,r===null?(r=Nu(),de.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function Hp(t,r,a,c){r.value=a,r.getSnapshot=c,qp(r)&&$p(t)}function zp(t,r,a){return a(function(){qp(r)&&$p(t)})}function qp(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!Ut(t,a)}catch{return!0}}function $p(t){var r=Ss(t,2);r!==null&&Vt(r,t,2)}function Ou(t){var r=Ct();if(typeof t=="function"){var a=t;if(t=a(),Ui){Xt(!0);try{a()}finally{Xt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:t},r}function Ip(t,r,a,c){return t.baseState=a,ku(t,Ae,typeof c=="function"?c:On)}function p1(t,r,a,c,h){if(Dl(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(S){g.listeners.push(S)}};z.T!==null?a(!0):g.isTransition=!1,c(g),a=r.pending,a===null?(g.next=r.pending=g,Vp(r,g)):(g.next=a.next,r.pending=a.next=g)}}function Vp(t,r){var a=r.action,c=r.payload,h=t.state;if(r.isTransition){var g=z.T,S={};z.T=S;try{var _=a(h,c),A=z.S;A!==null&&A(S,_),Gp(t,r,_)}catch(D){Lu(t,r,D)}finally{z.T=g}}else try{g=a(h,c),Gp(t,r,g)}catch(D){Lu(t,r,D)}}function Gp(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){Kp(t,r,c)},function(c){return Lu(t,r,c)}):Kp(t,r,a)}function Kp(t,r,a){r.status="fulfilled",r.value=a,Yp(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,Vp(t,a)))}function Lu(t,r,a){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=a,Yp(r),r=r.next;while(r!==c)}t.action=null}function Yp(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Xp(t,r){return r}function Pp(t,r){if(_e){var a=Re.formState;if(a!==null){e:{var c=de;if(_e){if($e){t:{for(var h=$e,g=mn;h.nodeType!==8;){if(!g){h=null;break t}if(h=hn(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){$e=hn(h.nextSibling),c=h.data==="F!";break e}}Ri(c)}c=!1}c&&(r=a[0])}}return a=Ct(),a.memoizedState=a.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xp,lastRenderedState:r},a.queue=c,a=dg.bind(null,de,c),c.dispatch=a,c=Ou(!1),g=Uu.bind(null,de,!1,c.queue),c=Ct(),h={state:r,dispatch:null,action:t,pending:null},c.queue=h,a=p1.bind(null,de,h,g,a),h.dispatch=a,c.memoizedState=t,[r,a,!1]}function Fp(t){var r=Fe();return Qp(r,Ae,t)}function Qp(t,r,a){if(r=ku(t,r,Xp)[0],t=Ll(On)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=Xr(r)}catch(S){throw S===$r?Al:S}else c=r;r=Fe();var h=r.queue,g=h.dispatch;return a!==r.memoizedState&&(de.flags|=2048,ks(9,Rl(),g1.bind(null,h,a),null)),[c,g,t]}function g1(t,r){t.action=r}function Zp(t){var r=Fe(),a=Ae;if(a!==null)return Qp(r,a,t);Fe(),r=r.memoizedState,a=Fe();var c=a.queue.dispatch;return a.memoizedState=t,[r,c,!1]}function ks(t,r,a,c){return t={tag:t,create:a,deps:c,inst:r,next:null},r=de.updateQueue,r===null&&(r=Nu(),de.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,r.lastEffect=t),t}function Rl(){return{destroy:void 0,resource:void 0}}function Jp(){return Fe().memoizedState}function jl(t,r,a,c){var h=Ct();c=c===void 0?null:c,de.flags|=t,h.memoizedState=ks(1|r,Rl(),a,c)}function Pr(t,r,a,c){var h=Fe();c=c===void 0?null:c;var g=h.memoizedState.inst;Ae!==null&&c!==null&&xu(c,Ae.memoizedState.deps)?h.memoizedState=ks(r,g,a,c):(de.flags|=t,h.memoizedState=ks(1|r,g,a,c))}function Wp(t,r){jl(8390656,8,t,r)}function eg(t,r){Pr(2048,8,t,r)}function tg(t,r){return Pr(4,2,t,r)}function ng(t,r){return Pr(4,4,t,r)}function ig(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function sg(t,r,a){a=a!=null?a.concat([t]):null,Pr(4,4,ig.bind(null,r,t),a)}function Ru(){}function rg(t,r){var a=Fe();r=r===void 0?null:r;var c=a.memoizedState;return r!==null&&xu(r,c[1])?c[0]:(a.memoizedState=[t,r],t)}function ag(t,r){var a=Fe();r=r===void 0?null:r;var c=a.memoizedState;if(r!==null&&xu(r,c[1]))return c[0];if(c=t(),Ui){Xt(!0);try{t()}finally{Xt(!1)}}return a.memoizedState=[c,r],c}function ju(t,r,a){return a===void 0||(Wn&1073741824)!==0?t.memoizedState=r:(t.memoizedState=a,t=cm(),de.lanes|=t,ai|=t,a)}function lg(t,r,a,c){return Ut(a,r)?a:As.current!==null?(t=ju(t,a,c),Ut(t,r)||(it=!0),t):(Wn&42)===0?(it=!0,t.memoizedState=a):(t=cm(),de.lanes|=t,ai|=t,r)}function og(t,r,a,c,h){var g=Q.p;Q.p=g!==0&&8>g?g:8;var S=z.T,_={};z.T=_,Uu(t,!1,r,a);try{var A=h(),D=z.S;if(D!==null&&D(_,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var G=f1(A,c);Fr(t,r,G,It(t))}else Fr(t,r,c,It(t))}catch(P){Fr(t,r,{then:function(){},status:"rejected",reason:P},It())}finally{Q.p=g,z.T=S}}function m1(){}function Du(t,r,a,c){if(t.tag!==5)throw Error(s(476));var h=cg(t).queue;og(t,h,r,ne,a===null?m1:function(){return ug(t),a(c)})}function cg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:ne},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function ug(t){var r=cg(t).next.queue;Fr(t,r,{},It())}function Bu(){return mt(da)}function fg(){return Fe().memoizedState}function hg(){return Fe().memoizedState}function y1(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=It();t=Zn(a);var c=Jn(r,t,a);c!==null&&(Vt(c,r,a),Vr(c,r,a)),r={cache:hu()},t.payload=r;return}r=r.return}}function b1(t,r,a){var c=It();a={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Dl(t)?pg(r,a):(a=nu(t,r,a,c),a!==null&&(Vt(a,t,c),gg(a,r,c)))}function dg(t,r,a){var c=It();Fr(t,r,a,c)}function Fr(t,r,a,c){var h={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Dl(t))pg(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var S=r.lastRenderedState,_=g(S,a);if(h.hasEagerState=!0,h.eagerState=_,Ut(_,S))return bl(t,r,h,0),Re===null&&yl(),!1}catch{}finally{}if(a=nu(t,r,h,c),a!==null)return Vt(a,t,c),gg(a,r,c),!0}return!1}function Uu(t,r,a,c){if(c={lane:2,revertLane:mf(),action:c,hasEagerState:!1,eagerState:null,next:null},Dl(t)){if(r)throw Error(s(479))}else r=nu(t,a,c,2),r!==null&&Vt(r,t,2)}function Dl(t){var r=t.alternate;return t===de||r!==null&&r===de}function pg(t,r){Ns=kl=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function gg(t,r,a){if((a&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,_d(t,a)}}var Bl={readContext:mt,use:Ol,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge},mg={readContext:mt,use:Ol,useCallback:function(t,r){return Ct().memoizedState=[t,r===void 0?null:r],t},useContext:mt,useEffect:Wp,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,jl(4194308,4,ig.bind(null,r,t),a)},useLayoutEffect:function(t,r){return jl(4194308,4,t,r)},useInsertionEffect:function(t,r){jl(4,2,t,r)},useMemo:function(t,r){var a=Ct();r=r===void 0?null:r;var c=t();if(Ui){Xt(!0);try{t()}finally{Xt(!1)}}return a.memoizedState=[c,r],c},useReducer:function(t,r,a){var c=Ct();if(a!==void 0){var h=a(r);if(Ui){Xt(!0);try{a(r)}finally{Xt(!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=b1.bind(null,de,t),[c.memoizedState,t]},useRef:function(t){var r=Ct();return t={current:t},r.memoizedState=t},useState:function(t){t=Ou(t);var r=t.queue,a=dg.bind(null,de,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:Ru,useDeferredValue:function(t,r){var a=Ct();return ju(a,t,r)},useTransition:function(){var t=Ou(!1);return t=og.bind(null,de,t.queue,!0,!1),Ct().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var c=de,h=Ct();if(_e){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),Re===null)throw Error(s(349));(we&124)!==0||Up(c,r,a)}h.memoizedState=a;var g={value:a,getSnapshot:r};return h.queue=g,Wp(zp.bind(null,c,g,t),[t]),c.flags|=2048,ks(9,Rl(),Hp.bind(null,c,g,a,r),null),a},useId:function(){var t=Ct(),r=Re.identifierPrefix;if(_e){var a=Cn,c=Nn;a=(c&~(1<<32-tt(c)-1)).toString(32)+a,r="«"+r+"R"+a,a=Ml++,0<a&&(r+="H"+a.toString(32)),r+="»"}else a=h1++,r="«"+r+"r"+a.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:Bu,useFormState:Pp,useActionState:Pp,useOptimistic:function(t){var r=Ct();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Uu.bind(null,de,!0,a),a.dispatch=r,[t,r]},useMemoCache:Cu,useCacheRefresh:function(){return Ct().memoizedState=y1.bind(null,de)}},yg={readContext:mt,use:Ol,useCallback:rg,useContext:mt,useEffect:eg,useImperativeHandle:sg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:Ll,useRef:Jp,useState:function(){return Ll(On)},useDebugValue:Ru,useDeferredValue:function(t,r){var a=Fe();return lg(a,Ae.memoizedState,t,r)},useTransition:function(){var t=Ll(On)[0],r=Fe().memoizedState;return[typeof t=="boolean"?t:Xr(t),r]},useSyncExternalStore:Bp,useId:fg,useHostTransitionStatus:Bu,useFormState:Fp,useActionState:Fp,useOptimistic:function(t,r){var a=Fe();return Ip(a,Ae,t,r)},useMemoCache:Cu,useCacheRefresh:hg},v1={readContext:mt,use:Ol,useCallback:rg,useContext:mt,useEffect:eg,useImperativeHandle:sg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:Mu,useRef:Jp,useState:function(){return Mu(On)},useDebugValue:Ru,useDeferredValue:function(t,r){var a=Fe();return Ae===null?ju(a,t,r):lg(a,Ae.memoizedState,t,r)},useTransition:function(){var t=Mu(On)[0],r=Fe().memoizedState;return[typeof t=="boolean"?t:Xr(t),r]},useSyncExternalStore:Bp,useId:fg,useHostTransitionStatus:Bu,useFormState:Zp,useActionState:Zp,useOptimistic:function(t,r){var a=Fe();return Ae!==null?Ip(a,Ae,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Cu,useCacheRefresh:hg},Ms=null,Qr=0;function Ul(t){var r=Qr;return Qr+=1,Ms===null&&(Ms=[]),Cp(Ms,t,r)}function Zr(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Hl(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 bg(t){var r=t._init;return r(t._payload)}function vg(t){function r(O,k){if(t){var j=O.deletions;j===null?(O.deletions=[k],O.flags|=16):j.push(k)}}function a(O,k){if(!t)return null;for(;k!==null;)r(O,k),k=k.sibling;return null}function c(O){for(var k=new Map;O!==null;)O.key!==null?k.set(O.key,O):k.set(O.index,O),O=O.sibling;return k}function h(O,k){return O=An(O,k),O.index=0,O.sibling=null,O}function g(O,k,j){return O.index=j,t?(j=O.alternate,j!==null?(j=j.index,j<k?(O.flags|=67108866,k):j):(O.flags|=67108866,k)):(O.flags|=1048576,k)}function S(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function _(O,k,j,K){return k===null||k.tag!==6?(k=su(j,O.mode,K),k.return=O,k):(k=h(k,j),k.return=O,k)}function A(O,k,j,K){var ee=j.type;return ee===E?G(O,k,j.props.children,K,j.key):k!==null&&(k.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&bg(ee)===k.type)?(k=h(k,j.props),Zr(k,j),k.return=O,k):(k=Sl(j.type,j.key,j.props,null,O.mode,K),Zr(k,j),k.return=O,k)}function D(O,k,j,K){return k===null||k.tag!==4||k.stateNode.containerInfo!==j.containerInfo||k.stateNode.implementation!==j.implementation?(k=ru(j,O.mode,K),k.return=O,k):(k=h(k,j.children||[]),k.return=O,k)}function G(O,k,j,K,ee){return k===null||k.tag!==7?(k=ki(j,O.mode,K,ee),k.return=O,k):(k=h(k,j),k.return=O,k)}function P(O,k,j){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=su(""+k,O.mode,j),k.return=O,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case b:return j=Sl(k.type,k.key,k.props,null,O.mode,j),Zr(j,k),j.return=O,j;case w:return k=ru(k,O.mode,j),k.return=O,k;case I:var K=k._init;return k=K(k._payload),P(O,k,j)}if(me(k)||L(k))return k=ki(k,O.mode,j,null),k.return=O,k;if(typeof k.then=="function")return P(O,Ul(k),j);if(k.$$typeof===V)return P(O,Tl(O,k),j);Hl(O,k)}return null}function U(O,k,j,K){var ee=k!==null?k.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ee!==null?null:_(O,k,""+j,K);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return j.key===ee?A(O,k,j,K):null;case w:return j.key===ee?D(O,k,j,K):null;case I:return ee=j._init,j=ee(j._payload),U(O,k,j,K)}if(me(j)||L(j))return ee!==null?null:G(O,k,j,K,null);if(typeof j.then=="function")return U(O,k,Ul(j),K);if(j.$$typeof===V)return U(O,k,Tl(O,j),K);Hl(O,j)}return null}function H(O,k,j,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return O=O.get(j)||null,_(k,O,""+K,ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return O=O.get(K.key===null?j:K.key)||null,A(k,O,K,ee);case w:return O=O.get(K.key===null?j:K.key)||null,D(k,O,K,ee);case I:var pe=K._init;return K=pe(K._payload),H(O,k,j,K,ee)}if(me(K)||L(K))return O=O.get(j)||null,G(k,O,K,ee,null);if(typeof K.then=="function")return H(O,k,j,Ul(K),ee);if(K.$$typeof===V)return H(O,k,j,Tl(k,K),ee);Hl(k,K)}return null}function ue(O,k,j,K){for(var ee=null,pe=null,ie=k,oe=k=0,rt=null;ie!==null&&oe<j.length;oe++){ie.index>oe?(rt=ie,ie=null):rt=ie.sibling;var xe=U(O,ie,j[oe],K);if(xe===null){ie===null&&(ie=rt);break}t&&ie&&xe.alternate===null&&r(O,ie),k=g(xe,k,oe),pe===null?ee=xe:pe.sibling=xe,pe=xe,ie=rt}if(oe===j.length)return a(O,ie),_e&&Oi(O,oe),ee;if(ie===null){for(;oe<j.length;oe++)ie=P(O,j[oe],K),ie!==null&&(k=g(ie,k,oe),pe===null?ee=ie:pe.sibling=ie,pe=ie);return _e&&Oi(O,oe),ee}for(ie=c(ie);oe<j.length;oe++)rt=H(ie,O,oe,j[oe],K),rt!==null&&(t&&rt.alternate!==null&&ie.delete(rt.key===null?oe:rt.key),k=g(rt,k,oe),pe===null?ee=rt:pe.sibling=rt,pe=rt);return t&&ie.forEach(function(gi){return r(O,gi)}),_e&&Oi(O,oe),ee}function ae(O,k,j,K){if(j==null)throw Error(s(151));for(var ee=null,pe=null,ie=k,oe=k=0,rt=null,xe=j.next();ie!==null&&!xe.done;oe++,xe=j.next()){ie.index>oe?(rt=ie,ie=null):rt=ie.sibling;var gi=U(O,ie,xe.value,K);if(gi===null){ie===null&&(ie=rt);break}t&&ie&&gi.alternate===null&&r(O,ie),k=g(gi,k,oe),pe===null?ee=gi:pe.sibling=gi,pe=gi,ie=rt}if(xe.done)return a(O,ie),_e&&Oi(O,oe),ee;if(ie===null){for(;!xe.done;oe++,xe=j.next())xe=P(O,xe.value,K),xe!==null&&(k=g(xe,k,oe),pe===null?ee=xe:pe.sibling=xe,pe=xe);return _e&&Oi(O,oe),ee}for(ie=c(ie);!xe.done;oe++,xe=j.next())xe=H(ie,O,oe,xe.value,K),xe!==null&&(t&&xe.alternate!==null&&ie.delete(xe.key===null?oe:xe.key),k=g(xe,k,oe),pe===null?ee=xe:pe.sibling=xe,pe=xe);return t&&ie.forEach(function(Sw){return r(O,Sw)}),_e&&Oi(O,oe),ee}function Ce(O,k,j,K){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 ee=j.key;k!==null;){if(k.key===ee){if(ee=j.type,ee===E){if(k.tag===7){a(O,k.sibling),K=h(k,j.props.children),K.return=O,O=K;break e}}else if(k.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&bg(ee)===k.type){a(O,k.sibling),K=h(k,j.props),Zr(K,j),K.return=O,O=K;break e}a(O,k);break}else r(O,k);k=k.sibling}j.type===E?(K=ki(j.props.children,O.mode,K,j.key),K.return=O,O=K):(K=Sl(j.type,j.key,j.props,null,O.mode,K),Zr(K,j),K.return=O,O=K)}return S(O);case w:e:{for(ee=j.key;k!==null;){if(k.key===ee)if(k.tag===4&&k.stateNode.containerInfo===j.containerInfo&&k.stateNode.implementation===j.implementation){a(O,k.sibling),K=h(k,j.children||[]),K.return=O,O=K;break e}else{a(O,k);break}else r(O,k);k=k.sibling}K=ru(j,O.mode,K),K.return=O,O=K}return S(O);case I:return ee=j._init,j=ee(j._payload),Ce(O,k,j,K)}if(me(j))return ue(O,k,j,K);if(L(j)){if(ee=L(j),typeof ee!="function")throw Error(s(150));return j=ee.call(j),ae(O,k,j,K)}if(typeof j.then=="function")return Ce(O,k,Ul(j),K);if(j.$$typeof===V)return Ce(O,k,Tl(O,j),K);Hl(O,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,k!==null&&k.tag===6?(a(O,k.sibling),K=h(k,j),K.return=O,O=K):(a(O,k),K=su(j,O.mode,K),K.return=O,O=K),S(O)):a(O,k)}return function(O,k,j,K){try{Qr=0;var ee=Ce(O,k,j,K);return Ms=null,ee}catch(ie){if(ie===$r||ie===Al)throw ie;var pe=Ht(29,ie,null,O.mode);return pe.lanes=K,pe.return=O,pe}finally{}}}var Os=vg(!0),Sg=vg(!1),en=X(null),yn=null;function ei(t){var r=t.alternate;W(We,We.current&1),W(en,t),yn===null&&(r===null||As.current!==null||r.memoizedState!==null)&&(yn=t)}function wg(t){if(t.tag===22){if(W(We,We.current),W(en,t),yn===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(yn=t)}}else ti()}function ti(){W(We,We.current),W(en,en.current)}function Ln(t){Z(en),yn===t&&(yn=null),Z(We)}var We=X(0);function zl(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Cf(a)))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 Hu(t,r,a,c){r=t.memoizedState,a=a(c,r),a=a==null?r:m({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var zu={enqueueSetState:function(t,r,a){t=t._reactInternals;var c=It(),h=Zn(c);h.payload=r,a!=null&&(h.callback=a),r=Jn(t,h,c),r!==null&&(Vt(r,t,c),Vr(r,t,c))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var c=It(),h=Zn(c);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=Jn(t,h,c),r!==null&&(Vt(r,t,c),Vr(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=It(),c=Zn(a);c.tag=2,r!=null&&(c.callback=r),r=Jn(t,c,a),r!==null&&(Vt(r,t,a),Vr(r,t,a))}};function xg(t,r,a,c,h,g,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,S):r.prototype&&r.prototype.isPureReactComponent?!Rr(a,c)||!Rr(h,g):!0}function _g(t,r,a,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==t&&zu.enqueueReplaceState(r,r.state,null)}function Hi(t,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(t=t.defaultProps){a===r&&(a=m({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}var ql=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 Tg(t){ql(t)}function Eg(t){console.error(t)}function Ag(t){ql(t)}function $l(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function Ng(t,r,a){try{var c=t.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function qu(t,r,a){return a=Zn(a),a.tag=3,a.payload={element:null},a.callback=function(){$l(t,r)},a}function Cg(t){return t=Zn(t),t.tag=3,t}function kg(t,r,a,c){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;t.payload=function(){return h(g)},t.callback=function(){Ng(r,a,c)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){Ng(r,a,c),typeof h!="function"&&(li===null?li=new Set([this]):li.add(this));var _=c.stack;this.componentDidCatch(c.value,{componentStack:_!==null?_:""})})}function S1(t,r,a,c,h){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&Hr(r,a,h,!0),a=en.current,a!==null){switch(a.tag){case 13:return yn===null?ff():a.alternate===null&&Ie===0&&(Ie=3),a.flags&=-257,a.flags|=65536,a.lanes=h,c===gu?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),df(t,c,h)),!1;case 22:return a.flags|=65536,c===gu?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),df(t,c,h)),!1}throw Error(s(435,a.tag))}return df(t,c,h),ff(),!1}if(_e)return r=en.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==ou&&(t=Error(s(422),{cause:c}),Ur(Qt(t,a)))):(c!==ou&&(r=Error(s(423),{cause:c}),Ur(Qt(r,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Qt(c,a),h=qu(t.stateNode,c,h),bu(t,h),Ie!==4&&(Ie=2)),!1;var g=Error(s(520),{cause:c});if(g=Qt(g,a),sa===null?sa=[g]:sa.push(g),Ie!==4&&(Ie=2),r===null)return!0;c=Qt(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=qu(a.stateNode,c,t),bu(a,t),!1;case 1:if(r=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(li===null||!li.has(g))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Cg(h),kg(h,t,a,c),bu(a,h),!1}a=a.return}while(a!==null);return!1}var Mg=Error(s(461)),it=!1;function ct(t,r,a,c){r.child=t===null?Sg(r,null,a,c):Os(r,t.child,a,c)}function Og(t,r,a,c,h){a=a.render;var g=r.ref;if("ref"in c){var S={};for(var _ in c)_!=="ref"&&(S[_]=c[_])}else S=c;return Di(r),c=_u(t,r,a,S,g,h),_=Tu(),t!==null&&!it?(Eu(t,r,h),Rn(t,r,h)):(_e&&_&&au(r),r.flags|=1,ct(t,r,c,h),r.child)}function Lg(t,r,a,c,h){if(t===null){var g=a.type;return typeof g=="function"&&!iu(g)&&g.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=g,Rg(t,r,g,c,h)):(t=Sl(a.type,null,c,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!Pu(t,h)){var S=g.memoizedProps;if(a=a.compare,a=a!==null?a:Rr,a(S,c)&&t.ref===r.ref)return Rn(t,r,h)}return r.flags|=1,t=An(g,c),t.ref=r.ref,t.return=r,r.child=t}function Rg(t,r,a,c,h){if(t!==null){var g=t.memoizedProps;if(Rr(g,c)&&t.ref===r.ref)if(it=!1,r.pendingProps=c=g,Pu(t,h))(t.flags&131072)!==0&&(it=!0);else return r.lanes=t.lanes,Rn(t,r,h)}return $u(t,r,a,c,h)}function jg(t,r,a){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|a:a,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 Dg(t,r,c,a)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&El(r,g!==null?g.cachePool:null),g!==null?Rp(r,g):Su(),wg(r);else return r.lanes=r.childLanes=536870912,Dg(t,r,g!==null?g.baseLanes|a:a,a)}else g!==null?(El(r,g.cachePool),Rp(r,g),ti(),r.memoizedState=null):(t!==null&&El(r,null),Su(),ti());return ct(t,r,h,a),r.child}function Dg(t,r,a,c){var h=pu();return h=h===null?null:{parent:Je._currentValue,pool:h},r.memoizedState={baseLanes:a,cachePool:h},t!==null&&El(r,null),Su(),wg(r),t!==null&&Hr(t,r,c,!0),null}function Il(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function $u(t,r,a,c,h){return Di(r),a=_u(t,r,a,c,void 0,h),c=Tu(),t!==null&&!it?(Eu(t,r,h),Rn(t,r,h)):(_e&&c&&au(r),r.flags|=1,ct(t,r,a,h),r.child)}function Bg(t,r,a,c,h,g){return Di(r),r.updateQueue=null,a=Dp(r,c,a,h),jp(t),c=Tu(),t!==null&&!it?(Eu(t,r,g),Rn(t,r,g)):(_e&&c&&au(r),r.flags|=1,ct(t,r,a,g),r.child)}function Ug(t,r,a,c,h){if(Di(r),r.stateNode===null){var g=ws,S=a.contextType;typeof S=="object"&&S!==null&&(g=mt(S)),g=new a(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=zu,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},mu(r),S=a.contextType,g.context=typeof S=="object"&&S!==null?mt(S):ws,g.state=r.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(Hu(r,a,S,c),g.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&zu.enqueueReplaceState(g,g.state,null),Kr(r,c,g,h),Gr(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){g=r.stateNode;var _=r.memoizedProps,A=Hi(a,_);g.props=A;var D=g.context,G=a.contextType;S=ws,typeof G=="object"&&G!==null&&(S=mt(G));var P=a.getDerivedStateFromProps;G=typeof P=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,G||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||D!==S)&&_g(r,g,c,S),Qn=!1;var U=r.memoizedState;g.state=U,Kr(r,c,g,h),Gr(),D=r.memoizedState,_||U!==D||Qn?(typeof P=="function"&&(Hu(r,a,P,c),D=r.memoizedState),(A=Qn||xg(r,a,A,c,U,D,S))?(G||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=S,c=A):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,yu(t,r),S=r.memoizedProps,G=Hi(a,S),g.props=G,P=r.pendingProps,U=g.context,D=a.contextType,A=ws,typeof D=="object"&&D!==null&&(A=mt(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==P||U!==A)&&_g(r,g,c,A),Qn=!1,U=r.memoizedState,g.state=U,Kr(r,c,g,h),Gr();var H=r.memoizedState;S!==P||U!==H||Qn||t!==null&&t.dependencies!==null&&_l(t.dependencies)?(typeof _=="function"&&(Hu(r,a,_,c),H=r.memoizedState),(G=Qn||xg(r,a,G,c,U,H,A)||t!==null&&t.dependencies!==null&&_l(t.dependencies))?(D||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,H,A),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,H,A)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=H),g.props=c,g.state=H,g.context=A,c=G):(typeof g.componentDidUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),c=!1)}return g=c,Il(t,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&c?(r.child=Os(r,t.child,null,h),r.child=Os(r,null,a,h)):ct(t,r,a,h),r.memoizedState=g.state,t=r.child):t=Rn(t,r,h),t}function Hg(t,r,a,c){return Br(),r.flags|=256,ct(t,r,a,c),r.child}var Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vu(t){return{baseLanes:t,cachePool:Ep()}}function Gu(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=tn),t}function zg(t,r,a){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,S;if((S=g)||(S=t!==null&&t.memoizedState===null?!1:(We.current&2)!==0),S&&(h=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,t===null){if(_e){if(h?ei(r):ti(),_e){var _=$e,A;if(A=_){e:{for(A=_,_=mn;A.nodeType!==8;){if(!_){_=null;break e}if(A=hn(A.nextSibling),A===null){_=null;break e}}_=A}_!==null?(r.memoizedState={dehydrated:_,treeContext:Mi!==null?{id:Nn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},A=Ht(18,null,null,0),A.stateNode=_,A.return=r,r.child=A,wt=r,$e=null,A=!0):A=!1}A||Ri(r)}if(_=r.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Cf(_)?r.lanes=32:r.lanes=536870912,null;Ln(r)}return _=c.children,c=c.fallback,h?(ti(),h=r.mode,_=Vl({mode:"hidden",children:_},h),c=ki(c,h,a,null),_.return=r,c.return=r,_.sibling=c,r.child=_,h=r.child,h.memoizedState=Vu(a),h.childLanes=Gu(t,S,a),r.memoizedState=Iu,c):(ei(r),Ku(r,_))}if(A=t.memoizedState,A!==null&&(_=A.dehydrated,_!==null)){if(g)r.flags&256?(ei(r),r.flags&=-257,r=Yu(t,r,a)):r.memoizedState!==null?(ti(),r.child=t.child,r.flags|=128,r=null):(ti(),h=c.fallback,_=r.mode,c=Vl({mode:"visible",children:c.children},_),h=ki(h,_,a,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,Os(r,t.child,null,a),c=r.child,c.memoizedState=Vu(a),c.childLanes=Gu(t,S,a),r.memoizedState=Iu,r=h);else if(ei(r),Cf(_)){if(S=_.nextSibling&&_.nextSibling.dataset,S)var D=S.dgst;S=D,c=Error(s(419)),c.stack="",c.digest=S,Ur({value:c,source:null,stack:null}),r=Yu(t,r,a)}else if(it||Hr(t,r,a,!1),S=(a&t.childLanes)!==0,it||S){if(S=Re,S!==null&&(c=a&-a,c=(c&42)!==0?1:Cc(c),c=(c&(S.suspendedLanes|a))!==0?0:c,c!==0&&c!==A.retryLane))throw A.retryLane=c,Ss(t,c),Vt(S,t,c),Mg;_.data==="$?"||ff(),r=Yu(t,r,a)}else _.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=A.treeContext,$e=hn(_.nextSibling),wt=r,_e=!0,Li=null,mn=!1,t!==null&&(Jt[Wt++]=Nn,Jt[Wt++]=Cn,Jt[Wt++]=Mi,Nn=t.id,Cn=t.overflow,Mi=r),r=Ku(r,c.children),r.flags|=4096);return r}return h?(ti(),h=c.fallback,_=r.mode,A=t.child,D=A.sibling,c=An(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,D!==null?h=An(D,h):(h=ki(h,_,a,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?_=Vu(a):(A=_.cachePool,A!==null?(D=Je._currentValue,A=A.parent!==D?{parent:D,pool:D}:A):A=Ep(),_={baseLanes:_.baseLanes|a,cachePool:A}),h.memoizedState=_,h.childLanes=Gu(t,S,a),r.memoizedState=Iu,c):(ei(r),a=t.child,t=a.sibling,a=An(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,t!==null&&(S=r.deletions,S===null?(r.deletions=[t],r.flags|=16):S.push(t)),r.child=a,r.memoizedState=null,a)}function Ku(t,r){return r=Vl({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Vl(t,r){return t=Ht(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Yu(t,r,a){return Os(r,t.child,null,a),t=Ku(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function qg(t,r,a){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),uu(t.return,r,a)}function Xu(t,r,a,c,h){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=h)}function $g(t,r,a){var c=r.pendingProps,h=c.revealOrder,g=c.tail;if(ct(t,r,c.children,a),c=We.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&&qg(t,a,r);else if(t.tag===19)qg(t,a,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(W(We,c),h){case"forwards":for(a=r.child,h=null;a!==null;)t=a.alternate,t!==null&&zl(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),Xu(r,!1,h,a,g);break;case"backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&zl(t)===null){r.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}Xu(r,!0,a,null,g);break;case"together":Xu(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Rn(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),ai|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(Hr(t,r,a,!1),(a&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,a=An(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=An(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function Pu(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&_l(t)))}function w1(t,r,a){switch(r.tag){case 3:Le(r,r.stateNode.containerInfo),Fn(r,Je,t.memoizedState.cache),Br();break;case 27:case 5:St(r);break;case 4:Le(r,r.stateNode.containerInfo);break;case 10:Fn(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(ei(r),r.flags|=128,null):(a&r.child.childLanes)!==0?zg(t,r,a):(ei(r),t=Rn(t,r,a),t!==null?t.sibling:null);ei(r);break;case 19:var h=(t.flags&128)!==0;if(c=(a&r.childLanes)!==0,c||(Hr(t,r,a,!1),c=(a&r.childLanes)!==0),h){if(c)return $g(t,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),W(We,We.current),c)break;return null;case 22:case 23:return r.lanes=0,jg(t,r,a);case 24:Fn(r,Je,t.memoizedState.cache)}return Rn(t,r,a)}function Ig(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)it=!0;else{if(!Pu(t,a)&&(r.flags&128)===0)return it=!1,w1(t,r,a);it=(t.flags&131072)!==0}else it=!1,_e&&(r.flags&1048576)!==0&&bp(r,xl,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")iu(c)?(t=Hi(c,t),r.tag=1,r=Ug(null,r,c,t,a)):(r.tag=0,r=$u(null,r,c,t,a));else{if(c!=null){if(h=c.$$typeof,h===$){r.tag=11,r=Og(null,r,c,t,a);break e}else if(h===J){r.tag=14,r=Lg(null,r,c,t,a);break e}}throw r=ge(c)||c,Error(s(306,r,""))}}return r;case 0:return $u(t,r,r.type,r.pendingProps,a);case 1:return c=r.type,h=Hi(c,r.pendingProps),Ug(t,r,c,h,a);case 3:e:{if(Le(r,r.stateNode.containerInfo),t===null)throw Error(s(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,yu(t,r),Kr(r,c,null,a);var S=r.memoizedState;if(c=S.cache,Fn(r,Je,c),c!==g.cache&&fu(r,[Je],a,!0),Gr(),c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Hg(t,r,c,a);break e}else if(c!==h){h=Qt(Error(s(424)),r),Ur(h),r=Hg(t,r,c,a);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=hn(t.firstChild),wt=r,_e=!0,Li=null,mn=!0,a=Sg(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Br(),c===h){r=Rn(t,r,a);break e}ct(t,r,c,a)}r=r.child}return r;case 26:return Il(t,r),t===null?(a=Ym(r.type,null,r.pendingProps,null))?r.memoizedState=a:_e||(a=r.type,t=r.pendingProps,c=io(ce.current).createElement(a),c[gt]=r,c[At]=t,ft(c,a,t),nt(c),r.stateNode=c):r.memoizedState=Ym(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return St(r),t===null&&_e&&(c=r.stateNode=Vm(r.type,r.pendingProps,ce.current),wt=r,mn=!0,h=$e,ui(r.type)?(kf=h,$e=hn(c.firstChild)):$e=h),ct(t,r,r.pendingProps.children,a),Il(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&_e&&((h=c=$e)&&(c=F1(c,r.type,r.pendingProps,mn),c!==null?(r.stateNode=c,wt=r,$e=hn(c.firstChild),mn=!1,h=!0):h=!1),h||Ri(r)),St(r),h=r.type,g=r.pendingProps,S=t!==null?t.memoizedProps:null,c=g.children,Ef(h,g)?c=null:S!==null&&Ef(h,S)&&(r.flags|=32),r.memoizedState!==null&&(h=_u(t,r,d1,null,null,a),da._currentValue=h),Il(t,r),ct(t,r,c,a),r.child;case 6:return t===null&&_e&&((t=a=$e)&&(a=Q1(a,r.pendingProps,mn),a!==null?(r.stateNode=a,wt=r,$e=null,t=!0):t=!1),t||Ri(r)),null;case 13:return zg(t,r,a);case 4:return Le(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=Os(r,null,c,a):ct(t,r,c,a),r.child;case 11:return Og(t,r,r.type,r.pendingProps,a);case 7:return ct(t,r,r.pendingProps,a),r.child;case 8:return ct(t,r,r.pendingProps.children,a),r.child;case 12:return ct(t,r,r.pendingProps.children,a),r.child;case 10:return c=r.pendingProps,Fn(r,r.type,c.value),ct(t,r,c.children,a),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,Di(r),h=mt(h),c=c(h),r.flags|=1,ct(t,r,c,a),r.child;case 14:return Lg(t,r,r.type,r.pendingProps,a);case 15:return Rg(t,r,r.type,r.pendingProps,a);case 19:return $g(t,r,a);case 31:return c=r.pendingProps,a=r.mode,c={mode:c.mode,children:c.children},t===null?(a=Vl(c,a),a.ref=r.ref,r.child=a,a.return=r,r=a):(a=An(t.child,c),a.ref=r.ref,r.child=a,a.return=r,r=a),r;case 22:return jg(t,r,a);case 24:return Di(r),c=mt(Je),t===null?(h=pu(),h===null&&(h=Re,g=hu(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=a),h=g),r.memoizedState={parent:c,cache:h},mu(r),Fn(r,Je,h)):((t.lanes&a)!==0&&(yu(t,r),Kr(r,null,null,a),Gr()),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),Fn(r,Je,c)):(c=g.cache,Fn(r,Je,c),c!==h.cache&&fu(r,[Je],a,!0))),ct(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function jn(t){t.flags|=4}function Vg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Zm(r)){if(r=en.current,r!==null&&((we&4194048)===we?yn!==null:(we&62914560)!==we&&(we&536870912)===0||r!==yn))throw Ir=gu,Ap;t.flags|=8192}}function Gl(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?wd():536870912,t.lanes|=r,Ds|=r)}function Jr(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.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,a=0,c=0;if(r)for(var h=t.child;h!==null;)a|=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;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=a,r}function x1(t,r,a){var c=r.pendingProps;switch(lu(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 a=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Mn(Je),cn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Dr(r)?jn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,wp())),Ue(r),null;case 26:return a=r.memoizedState,t===null?(jn(r),a!==null?(Ue(r),Vg(r,a)):(Ue(r),r.flags&=-16777217)):a?a!==t.memoizedState?(jn(r),Ue(r),Vg(r,a)):(Ue(r),r.flags&=-16777217):(t.memoizedProps!==c&&jn(r),Ue(r),r.flags&=-16777217),null;case 27:xi(r),a=ce.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&jn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}t=se.current,Dr(r)?vp(r):(t=Vm(h,c,a),r.stateNode=t,jn(r))}return Ue(r),null;case 5:if(xi(r),a=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&jn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}if(t=se.current,Dr(r))vp(r);else{switch(h=io(ce.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);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(a,{is:c.is}):h.createElement(a)}}t[gt]=r,t[At]=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(ft(t,a,c),a){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&jn(r)}}return Ue(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&jn(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(t=ce.current,Dr(r)){if(t=r.stateNode,a=r.memoizedProps,c=null,h=wt,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[gt]=r,t=!!(t.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Bm(t.nodeValue,a)),t||Ri(r)}else t=io(t).createTextNode(c),t[gt]=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=Dr(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[gt]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ue(r),h=!1}else h=wp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Ln(r),r):(Ln(r),null)}if(Ln(r),(r.flags&128)!==0)return r.lanes=a,r;if(a=c!==null,t=t!==null&&t.memoizedState!==null,a){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 a!==t&&a&&(r.child.flags|=8192),Gl(r,r.updateQueue),Ue(r),null;case 4:return cn(),t===null&&Sf(r.stateNode.containerInfo),Ue(r),null;case 10:return Mn(r.type),Ue(r),null;case 19:if(Z(We),h=r.memoizedState,h===null)return Ue(r),null;if(c=(r.flags&128)!==0,g=h.rendering,g===null)if(c)Jr(h,!1);else{if(Ie!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(g=zl(t),g!==null){for(r.flags|=128,Jr(h,!1),t=g.updateQueue,r.updateQueue=t,Gl(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)yp(a,t),a=a.sibling;return W(We,We.current&1|2),r.child}t=t.sibling}h.tail!==null&<()>Xl&&(r.flags|=128,c=!0,Jr(h,!1),r.lanes=4194304)}else{if(!c)if(t=zl(g),t!==null){if(r.flags|=128,c=!0,t=t.updateQueue,r.updateQueue=t,Gl(r,t),Jr(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!_e)return Ue(r),null}else 2*lt()-h.renderingStartTime>Xl&&a!==536870912&&(r.flags|=128,c=!0,Jr(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=lt(),r.sibling=null,t=We.current,W(We,c?t&1|2:t&1),r):(Ue(r),null);case 22:case 23:return Ln(r),wu(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(a&536870912)!==0&&(r.flags&128)===0&&(Ue(r),r.subtreeFlags&6&&(r.flags|=8192)):Ue(r),a=r.updateQueue,a!==null&&Gl(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==a&&(r.flags|=2048),t!==null&&Z(Bi),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Mn(Je),Ue(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function _1(t,r){switch(lu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Mn(Je),cn(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return xi(r),null;case 13:if(Ln(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Br()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Z(We),null;case 4:return cn(),null;case 10:return Mn(r.type),null;case 22:case 23:return Ln(r),wu(),t!==null&&Z(Bi),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Mn(Je),null;case 25:return null;default:return null}}function Gg(t,r){switch(lu(r),r.tag){case 3:Mn(Je),cn();break;case 26:case 27:case 5:xi(r);break;case 4:cn();break;case 13:Ln(r);break;case 19:Z(We);break;case 10:Mn(r.type);break;case 22:case 23:Ln(r),wu(),t!==null&&Z(Bi);break;case 24:Mn(Je)}}function Wr(t,r){try{var a=r.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var h=c.next;a=h;do{if((a.tag&t)===t){c=void 0;var g=a.create,S=a.inst;c=g(),S.destroy=c}a=a.next}while(a!==h)}}catch(_){ke(r,r.return,_)}}function ni(t,r,a){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 S=c.inst,_=S.destroy;if(_!==void 0){S.destroy=void 0,h=r;var A=a,D=_;try{D()}catch(G){ke(h,A,G)}}}c=c.next}while(c!==g)}}catch(G){ke(r,r.return,G)}}function Kg(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{Lp(r,a)}catch(c){ke(t,t.return,c)}}}function Yg(t,r,a){a.props=Hi(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(c){ke(t,r,c)}}function ea(t,r){try{var a=t.ref;if(a!==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 a=="function"?t.refCleanup=a(c):a.current=c}}catch(h){ke(t,r,h)}}function bn(t,r){var a=t.ref,c=t.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(h){ke(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){ke(t,r,h)}else a.current=null}function Xg(t){var r=t.type,a=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(h){ke(t,t.return,h)}}function Fu(t,r,a){try{var c=t.stateNode;G1(c,t.type,a,r),c[At]=r}catch(h){ke(t,t.return,h)}}function Pg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ui(t.type)||t.tag===4}function Qu(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Pg(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&&ui(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 Zu(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=no));else if(c!==4&&(c===27&&ui(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(Zu(t,r,a),t=t.sibling;t!==null;)Zu(t,r,a),t=t.sibling}function Kl(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(c!==4&&(c===27&&ui(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Kl(t,r,a),t=t.sibling;t!==null;)Kl(t,r,a),t=t.sibling}function Fg(t){var r=t.stateNode,a=t.memoizedProps;try{for(var c=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);ft(r,c,a),r[gt]=t,r[At]=a}catch(g){ke(t,t.return,g)}}var Dn=!1,Ke=!1,Ju=!1,Qg=typeof WeakSet=="function"?WeakSet:Set,st=null;function T1(t,r){if(t=t.containerInfo,_f=co,t=lp(t),Qc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var S=0,_=-1,A=-1,D=0,G=0,P=t,U=null;t:for(;;){for(var H;P!==a||h!==0&&P.nodeType!==3||(_=S+h),P!==g||c!==0&&P.nodeType!==3||(A=S+c),P.nodeType===3&&(S+=P.nodeValue.length),(H=P.firstChild)!==null;)U=P,P=H;for(;;){if(P===t)break t;if(U===a&&++D===h&&(_=S),U===g&&++G===c&&(A=S),(H=P.nextSibling)!==null)break;P=U,U=P.parentNode}P=H}a=_===-1||A===-1?null:{start:_,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Tf={focusedElem:t,selectionRange:a},co=!1,st=r;st!==null;)if(r=st,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,st=t;else for(;st!==null;){switch(r=st,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,a=r,h=g.memoizedProps,g=g.memoizedState,c=a.stateNode;try{var ue=Hi(a.type,h,a.elementType===a.type);t=c.getSnapshotBeforeUpdate(ue,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(ae){ke(a,a.return,ae)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)Nf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Nf(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,st=t;break}st=r.return}}function Zg(t,r,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:ii(t,a),c&4&&Wr(5,a);break;case 1:if(ii(t,a),c&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(S){ke(a,a.return,S)}else{var h=Hi(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(S){ke(a,a.return,S)}}c&64&&Kg(a),c&512&&ea(a,a.return);break;case 3:if(ii(t,a),c&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{Lp(t,r)}catch(S){ke(a,a.return,S)}}break;case 27:r===null&&c&4&&Fg(a);case 26:case 5:ii(t,a),r===null&&c&4&&Xg(a),c&512&&ea(a,a.return);break;case 12:ii(t,a);break;case 13:ii(t,a),c&4&&em(t,a),c&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=R1.bind(null,a),Z1(t,a))));break;case 22:if(c=a.memoizedState!==null||Dn,!c){r=r!==null&&r.memoizedState!==null||Ke,h=Dn;var g=Ke;Dn=c,(Ke=r)&&!g?si(t,a,(a.subtreeFlags&8772)!==0):ii(t,a),Dn=h,Ke=g}break;case 30:break;default:ii(t,a)}}function Jg(t){var r=t.alternate;r!==null&&(t.alternate=null,Jg(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Oc(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,kt=!1;function Bn(t,r,a){for(a=a.child;a!==null;)Wg(t,r,a),a=a.sibling}function Wg(t,r,a){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(Ti,a)}catch{}switch(a.tag){case 26:Ke||bn(a,r),Bn(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ke||bn(a,r);var c=je,h=kt;ui(a.type)&&(je=a.stateNode,kt=!1),Bn(t,r,a),ca(a.stateNode),je=c,kt=h;break;case 5:Ke||bn(a,r);case 6:if(c=je,h=kt,je=null,Bn(t,r,a),je=c,kt=h,je!==null)if(kt)try{(je.nodeType===9?je.body:je.nodeName==="HTML"?je.ownerDocument.body:je).removeChild(a.stateNode)}catch(g){ke(a,r,g)}else try{je.removeChild(a.stateNode)}catch(g){ke(a,r,g)}break;case 18:je!==null&&(kt?(t=je,$m(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),ya(t)):$m(je,a.stateNode));break;case 4:c=je,h=kt,je=a.stateNode.containerInfo,kt=!0,Bn(t,r,a),je=c,kt=h;break;case 0:case 11:case 14:case 15:Ke||ni(2,a,r),Ke||ni(4,a,r),Bn(t,r,a);break;case 1:Ke||(bn(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"&&Yg(a,r,c)),Bn(t,r,a);break;case 21:Bn(t,r,a);break;case 22:Ke=(c=Ke)||a.memoizedState!==null,Bn(t,r,a),Ke=c;break;default:Bn(t,r,a)}}function em(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ya(t)}catch(a){ke(r,r.return,a)}}function E1(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Qg),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Qg),r;default:throw Error(s(435,t.tag))}}function Wu(t,r){var a=E1(t);r.forEach(function(c){var h=j1.bind(null,t,c);a.has(c)||(a.add(c),c.then(h,h))})}function zt(t,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c],g=t,S=r,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(ui(_.type)){je=_.stateNode,kt=!1;break e}break;case 5:je=_.stateNode,kt=!1;break e;case 3:case 4:je=_.stateNode.containerInfo,kt=!0;break e}_=_.return}if(je===null)throw Error(s(160));Wg(g,S,h),je=null,kt=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)tm(r,t),r=r.sibling}var fn=null;function tm(t,r){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:zt(r,t),qt(t),c&4&&(ni(3,t,t.return),Wr(3,t),ni(5,t,t.return));break;case 1:zt(r,t),qt(t),c&512&&(Ke||a===null||bn(a,a.return)),c&64&&Dn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?c:a.concat(c))));break;case 26:var h=fn;if(zt(r,t),qt(t),c&512&&(Ke||a===null||bn(a,a.return)),c&4){var g=a!==null?a.memoizedState:null;if(c=t.memoizedState,a===null)if(c===null)if(t.stateNode===null){e:{c=t.type,a=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[Tr]||g[gt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),ft(g,c,a),g[gt]=t,nt(g),c=g;break e;case"link":var S=Fm("link","href",h).get(c+(a.href||""));if(S){for(var _=0;_<S.length;_++)if(g=S[_],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(_,1);break t}}g=h.createElement(c),ft(g,c,a),h.head.appendChild(g);break;case"meta":if(S=Fm("meta","content",h).get(c+(a.content||""))){for(_=0;_<S.length;_++)if(g=S[_],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(_,1);break t}}g=h.createElement(c),ft(g,c,a),h.head.appendChild(g);break;default:throw Error(s(468,c))}g[gt]=t,nt(g),c=g}t.stateNode=c}else Qm(h,t.type,t.stateNode);else t.stateNode=Pm(h,c,t.memoizedProps);else g!==c?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,c===null?Qm(h,t.type,t.stateNode):Pm(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&Fu(t,t.memoizedProps,a.memoizedProps)}break;case 27:zt(r,t),qt(t),c&512&&(Ke||a===null||bn(a,a.return)),a!==null&&c&4&&Fu(t,t.memoizedProps,a.memoizedProps);break;case 5:if(zt(r,t),qt(t),c&512&&(Ke||a===null||bn(a,a.return)),t.flags&32){h=t.stateNode;try{ds(h,"")}catch(H){ke(t,t.return,H)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,Fu(t,h,a!==null?a.memoizedProps:h)),c&1024&&(Ju=!0);break;case 6:if(zt(r,t),qt(t),c&4){if(t.stateNode===null)throw Error(s(162));c=t.memoizedProps,a=t.stateNode;try{a.nodeValue=c}catch(H){ke(t,t.return,H)}}break;case 3:if(ao=null,h=fn,fn=so(r.containerInfo),zt(r,t),fn=h,qt(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{ya(r.containerInfo)}catch(H){ke(t,t.return,H)}Ju&&(Ju=!1,nm(t));break;case 4:c=fn,fn=so(t.stateNode.containerInfo),zt(r,t),qt(t),fn=c;break;case 12:zt(r,t),qt(t);break;case 13:zt(r,t),qt(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(af=lt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Wu(t,c)));break;case 22:h=t.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,D=Dn,G=Ke;if(Dn=D||h,Ke=G||A,zt(r,t),Ke=G,Dn=D,qt(t),c&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(a===null||A||Dn||Ke||zi(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){A=a=r;try{if(g=A.stateNode,h)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{_=A.stateNode;var P=A.memoizedProps.style,U=P!=null&&P.hasOwnProperty("display")?P.display:null;_.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(H){ke(A,A.return,H)}}}else if(r.tag===6){if(a===null){A=r;try{A.stateNode.nodeValue=h?"":A.memoizedProps}catch(H){ke(A,A.return,H)}}}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;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,Wu(t,a))));break;case 19:zt(r,t),qt(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Wu(t,c)));break;case 30:break;case 21:break;default:zt(r,t),qt(t)}}function qt(t){var r=t.flags;if(r&2){try{for(var a,c=t.return;c!==null;){if(Pg(c)){a=c;break}c=c.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var h=a.stateNode,g=Qu(t);Kl(t,g,h);break;case 5:var S=a.stateNode;a.flags&32&&(ds(S,""),a.flags&=-33);var _=Qu(t);Kl(t,_,S);break;case 3:case 4:var A=a.stateNode.containerInfo,D=Qu(t);Zu(t,D,A);break;default:throw Error(s(161))}}catch(G){ke(t,t.return,G)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function nm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;nm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function ii(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Zg(t,r.alternate,r),r=r.sibling}function zi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:ni(4,r,r.return),zi(r);break;case 1:bn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&Yg(r,r.return,a),zi(r);break;case 27:ca(r.stateNode);case 26:case 5:bn(r,r.return),zi(r);break;case 22:r.memoizedState===null&&zi(r);break;case 30:zi(r);break;default:zi(r)}t=t.sibling}}function si(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,h=t,g=r,S=g.flags;switch(g.tag){case 0:case 11:case 15:si(h,g,a),Wr(4,g);break;case 1:if(si(h,g,a),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){ke(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++)Op(A[h],_)}catch(D){ke(c,c.return,D)}}a&&S&64&&Kg(g),ea(g,g.return);break;case 27:Fg(g);case 26:case 5:si(h,g,a),a&&c===null&&S&4&&Xg(g),ea(g,g.return);break;case 12:si(h,g,a);break;case 13:si(h,g,a),a&&S&4&&em(h,g);break;case 22:g.memoizedState===null&&si(h,g,a),ea(g,g.return);break;case 30:break;default:si(h,g,a)}r=r.sibling}}function ef(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&zr(a))}function tf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&zr(t))}function vn(t,r,a,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)im(t,r,a,c),r=r.sibling}function im(t,r,a,c){var h=r.flags;switch(r.tag){case 0:case 11:case 15:vn(t,r,a,c),h&2048&&Wr(9,r);break;case 1:vn(t,r,a,c);break;case 3:vn(t,r,a,c),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&zr(t)));break;case 12:if(h&2048){vn(t,r,a,c),t=r.stateNode;try{var g=r.memoizedProps,S=g.id,_=g.onPostCommit;typeof _=="function"&&_(S,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){ke(r,r.return,A)}}else vn(t,r,a,c);break;case 13:vn(t,r,a,c);break;case 23:break;case 22:g=r.stateNode,S=r.alternate,r.memoizedState!==null?g._visibility&2?vn(t,r,a,c):ta(t,r):g._visibility&2?vn(t,r,a,c):(g._visibility|=2,Ls(t,r,a,c,(r.subtreeFlags&10256)!==0)),h&2048&&ef(S,r);break;case 24:vn(t,r,a,c),h&2048&&tf(r.alternate,r);break;default:vn(t,r,a,c)}}function Ls(t,r,a,c,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var g=t,S=r,_=a,A=c,D=S.flags;switch(S.tag){case 0:case 11:case 15:Ls(g,S,_,A,h),Wr(8,S);break;case 23:break;case 22:var G=S.stateNode;S.memoizedState!==null?G._visibility&2?Ls(g,S,_,A,h):ta(g,S):(G._visibility|=2,Ls(g,S,_,A,h)),h&&D&2048&&ef(S.alternate,S);break;case 24:Ls(g,S,_,A,h),h&&D&2048&&tf(S.alternate,S);break;default:Ls(g,S,_,A,h)}r=r.sibling}}function ta(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,c=r,h=c.flags;switch(c.tag){case 22:ta(a,c),h&2048&&ef(c.alternate,c);break;case 24:ta(a,c),h&2048&&tf(c.alternate,c);break;default:ta(a,c)}r=r.sibling}}var na=8192;function Rs(t){if(t.subtreeFlags&na)for(t=t.child;t!==null;)sm(t),t=t.sibling}function sm(t){switch(t.tag){case 26:Rs(t),t.flags&na&&t.memoizedState!==null&&uw(fn,t.memoizedState,t.memoizedProps);break;case 5:Rs(t);break;case 3:case 4:var r=fn;fn=so(t.stateNode.containerInfo),Rs(t),fn=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=na,na=16777216,Rs(t),na=r):Rs(t));break;default:Rs(t)}}function rm(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 ia(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];st=c,lm(c,t)}rm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)am(t),t=t.sibling}function am(t){switch(t.tag){case 0:case 11:case 15:ia(t),t.flags&2048&&ni(9,t,t.return);break;case 3:ia(t);break;case 12:ia(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Yl(t)):ia(t);break;default:ia(t)}}function Yl(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];st=c,lm(c,t)}rm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ni(8,r,r.return),Yl(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,Yl(r));break;default:Yl(r)}t=t.sibling}}function lm(t,r){for(;st!==null;){var a=st;switch(a.tag){case 0:case 11:case 15:ni(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:zr(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,st=c;else e:for(a=t;st!==null;){c=st;var h=c.sibling,g=c.return;if(Jg(c),c===a){st=null;break e}if(h!==null){h.return=g,st=h;break e}st=g}}}var A1={getCacheForType:function(t){var r=mt(Je),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a}},N1=typeof WeakMap=="function"?WeakMap:Map,Te=0,Re=null,ye=null,we=0,Ee=0,$t=null,ri=!1,js=!1,nf=!1,Un=0,Ie=0,ai=0,qi=0,sf=0,tn=0,Ds=0,sa=null,Mt=null,rf=!1,af=0,Xl=1/0,Pl=null,li=null,ut=0,oi=null,Bs=null,Us=0,lf=0,of=null,om=null,ra=0,cf=null;function It(){if((Te&2)!==0&&we!==0)return we&-we;if(z.T!==null){var t=Ts;return t!==0?t:mf()}return Td()}function cm(){tn===0&&(tn=(we&536870912)===0||_e?Sd():536870912);var t=en.current;return t!==null&&(t.flags|=32),tn}function Vt(t,r,a){(t===Re&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)&&(Hs(t,0),ci(t,we,tn,!1)),_r(t,a),((Te&2)===0||t!==Re)&&(t===Re&&((Te&2)===0&&(qi|=a),Ie===4&&ci(t,we,tn,!1)),Sn(t))}function um(t,r,a){if((Te&6)!==0)throw Error(s(327));var c=!a&&(r&124)===0&&(r&t.expiredLanes)===0||xr(t,r),h=c?M1(t,r):hf(t,r,!0),g=c;do{if(h===0){js&&!c&&ci(t,r,0,!1);break}else{if(a=t.current.alternate,g&&!C1(a)){h=hf(t,r,!1),g=!1;continue}if(h===2){if(g=r,t.errorRecoveryDisabledLanes&g)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var _=t;h=sa;var A=_.current.memoizedState.isDehydrated;if(A&&(Hs(_,S).flags|=256),S=hf(_,S,!1),S!==2){if(nf&&!A){_.errorRecoveryDisabledLanes|=g,qi|=g,h=4;break e}g=Mt,Mt=h,g!==null&&(Mt===null?Mt=g:Mt.push.apply(Mt,g))}h=S}if(g=!1,h!==2)continue}}if(h===1){Hs(t,0),ci(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:ci(c,r,tn,!ri);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=af+300-lt(),10<h)){if(ci(c,r,tn,!ri),rl(c,0,!0)!==0)break e;c.timeoutHandle=zm(fm.bind(null,c,a,Mt,Pl,rf,r,tn,qi,Ds,ri,g,2,-0,0),h);break e}fm(c,a,Mt,Pl,rf,r,tn,qi,Ds,ri,g,0,-0,0)}}break}while(!0);Sn(t)}function fm(t,r,a,c,h,g,S,_,A,D,G,P,U,H){if(t.timeoutHandle=-1,P=r.subtreeFlags,(P&8192||(P&16785408)===16785408)&&(ha={stylesheets:null,count:0,unsuspend:cw},sm(r),P=fw(),P!==null)){t.cancelPendingCommit=P(bm.bind(null,t,r,g,a,c,h,S,_,A,G,1,U,H)),ci(t,g,S,!D);return}bm(t,r,g,a,c,h,S,_,A)}function C1(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var h=a[c],g=h.getSnapshot;h=h.value;try{if(!Ut(g(),h))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;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 ci(t,r,a,c){r&=~sf,r&=~qi,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var h=r;0<h;){var g=31-tt(h),S=1<<g;c[g]=-1,h&=~S}a!==0&&xd(t,a,r)}function Fl(){return(Te&6)===0?(aa(0),!1):!0}function uf(){if(ye!==null){if(Ee===0)var t=ye.return;else t=ye,kn=ji=null,Au(t),Ms=null,Qr=0,t=ye;for(;t!==null;)Gg(t.alternate,t),t=t.return;ye=null}}function Hs(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Y1(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),uf(),Re=t,ye=a=An(t.current,null),we=r,Ee=0,$t=null,ri=!1,js=xr(t,r),nf=!1,Ds=tn=sf=qi=ai=Ie=0,Mt=sa=null,rf=!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-tt(c),g=1<<h;r|=t[h],c&=~g}return Un=r,yl(),a}function hm(t,r){de=null,z.H=Bl,r===$r||r===Al?(r=kp(),Ee=3):r===Ap?(r=kp(),Ee=4):Ee=r===Mg?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,$t=r,ye===null&&(Ie=1,$l(t,Qt(r,t.current)))}function dm(){var t=z.H;return z.H=Bl,t===null?Bl:t}function pm(){var t=z.A;return z.A=A1,t}function ff(){Ie=4,ri||(we&4194048)!==we&&en.current!==null||(js=!0),(ai&134217727)===0&&(qi&134217727)===0||Re===null||ci(Re,we,tn,!1)}function hf(t,r,a){var c=Te;Te|=2;var h=dm(),g=pm();(Re!==t||we!==r)&&(Pl=null,Hs(t,r)),r=!1;var S=Ie;e:do try{if(Ee!==0&&ye!==null){var _=ye,A=$t;switch(Ee){case 8:uf(),S=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(r=!0);var D=Ee;if(Ee=0,$t=null,zs(t,_,A,D),a&&js){S=0;break e}break;default:D=Ee,Ee=0,$t=null,zs(t,_,A,D)}}k1(),S=Ie;break}catch(G){hm(t,G)}while(!0);return r&&t.shellSuspendCounter++,kn=ji=null,Te=c,z.H=h,z.A=g,ye===null&&(Re=null,we=0,yl()),S}function k1(){for(;ye!==null;)gm(ye)}function M1(t,r){var a=Te;Te|=2;var c=dm(),h=pm();Re!==t||we!==r?(Pl=null,Xl=lt()+500,Hs(t,r)):js=xr(t,r);e:do try{if(Ee!==0&&ye!==null){r=ye;var g=$t;t:switch(Ee){case 1:Ee=0,$t=null,zs(t,r,g,1);break;case 2:case 9:if(Np(g)){Ee=0,$t=null,mm(r);break}r=function(){Ee!==2&&Ee!==9||Re!==t||(Ee=7),Sn(t)},g.then(r,r);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Np(g)?(Ee=0,$t=null,mm(r)):(Ee=0,$t=null,zs(t,r,g,7));break;case 5:var S=null;switch(ye.tag){case 26:S=ye.memoizedState;case 5:case 27:var _=ye;if(!S||Zm(S)){Ee=0,$t=null;var A=_.sibling;if(A!==null)ye=A;else{var D=_.return;D!==null?(ye=D,Ql(D)):ye=null}break t}}Ee=0,$t=null,zs(t,r,g,5);break;case 6:Ee=0,$t=null,zs(t,r,g,6);break;case 8:uf(),Ie=6;break e;default:throw Error(s(462))}}O1();break}catch(G){hm(t,G)}while(!0);return kn=ji=null,z.H=c,z.A=h,Te=a,ye!==null?0:(Re=null,we=0,yl(),Ie)}function O1(){for(;ye!==null&&!Wa();)gm(ye)}function gm(t){var r=Ig(t.alternate,t,Un);t.memoizedProps=t.pendingProps,r===null?Ql(t):ye=r}function mm(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=Bg(a,r,r.pendingProps,r.type,void 0,we);break;case 11:r=Bg(a,r,r.pendingProps,r.type.render,r.ref,we);break;case 5:Au(r);default:Gg(a,r),r=ye=yp(r,Un),r=Ig(a,r,Un)}t.memoizedProps=t.pendingProps,r===null?Ql(t):ye=r}function zs(t,r,a,c){kn=ji=null,Au(r),Ms=null,Qr=0;var h=r.return;try{if(S1(t,h,r,a,we)){Ie=1,$l(t,Qt(a,t.current)),ye=null;return}}catch(g){if(h!==null)throw ye=h,g;Ie=1,$l(t,Qt(a,t.current)),ye=null;return}r.flags&32768?(_e||c===1?t=!0:js||(we&536870912)!==0?t=!1:(ri=t=!0,(c===2||c===9||c===3||c===6)&&(c=en.current,c!==null&&c.tag===13&&(c.flags|=16384))),ym(r,t)):Ql(r)}function Ql(t){var r=t;do{if((r.flags&32768)!==0){ym(r,ri);return}t=r.return;var a=x1(r.alternate,r,Un);if(a!==null){ye=a;return}if(r=r.sibling,r!==null){ye=r;return}ye=r=t}while(r!==null);Ie===0&&(Ie=5)}function ym(t,r){do{var a=_1(t.alternate,t);if(a!==null){a.flags&=32767,ye=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){ye=t;return}ye=t=a}while(t!==null);Ie=6,ye=null}function bm(t,r,a,c,h,g,S,_,A){t.cancelPendingCommit=null;do Zl();while(ut!==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|=tu,cS(t,a,g,S,_,A),t===Re&&(ye=Re=null,we=0),Bs=r,oi=t,Us=a,lf=g,of=h,om=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,D1(ss,function(){return _m(),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,S=Te,Te|=4;try{T1(t,r,a)}finally{Te=S,Q.p=h,z.T=c}}ut=1,vm(),Sm(),wm()}}function vm(){if(ut===1){ut=0;var t=oi,r=Bs,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{tm(r,t);var g=Tf,S=lp(t.containerInfo),_=g.focusedElem,A=g.selectionRange;if(S!==_&&_&&_.ownerDocument&&ap(_.ownerDocument.documentElement,_)){if(A!==null&&Qc(_)){var D=A.start,G=A.end;if(G===void 0&&(G=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(G,_.value.length);else{var P=_.ownerDocument||document,U=P&&P.defaultView||window;if(U.getSelection){var H=U.getSelection(),ue=_.textContent.length,ae=Math.min(A.start,ue),Ce=A.end===void 0?ae:Math.min(A.end,ue);!H.extend&&ae>Ce&&(S=Ce,Ce=ae,ae=S);var O=rp(_,ae),k=rp(_,Ce);if(O&&k&&(H.rangeCount!==1||H.anchorNode!==O.node||H.anchorOffset!==O.offset||H.focusNode!==k.node||H.focusOffset!==k.offset)){var j=P.createRange();j.setStart(O.node,O.offset),H.removeAllRanges(),ae>Ce?(H.addRange(j),H.extend(k.node,k.offset)):(j.setEnd(k.node,k.offset),H.addRange(j))}}}}for(P=[],H=_;H=H.parentNode;)H.nodeType===1&&P.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<P.length;_++){var K=P[_];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}co=!!_f,Tf=_f=null}finally{Te=h,Q.p=c,z.T=a}}t.current=r,ut=2}}function Sm(){if(ut===2){ut=0;var t=oi,r=Bs,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{Zg(t,r.alternate,r)}finally{Te=h,Q.p=c,z.T=a}}ut=3}}function wm(){if(ut===4||ut===3){ut=0,el();var t=oi,r=Bs,a=Us,c=om;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?ut=5:(ut=0,Bs=oi=null,xm(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(li=null),kc(a),r=r.stateNode,Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(Ti,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,S=0;S<c.length;S++){var _=c[S];g(_.value,{componentStack:_.stack})}}finally{z.T=r,Q.p=h}}(Us&3)!==0&&Zl(),Sn(t),h=t.pendingLanes,(a&4194090)!==0&&(h&42)!==0?t===cf?ra++:(ra=0,cf=t):ra=0,aa(0)}}function xm(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,zr(r)))}function Zl(t){return vm(),Sm(),wm(),_m()}function _m(){if(ut!==5)return!1;var t=oi,r=lf;lf=0;var a=kc(Us),c=z.T,h=Q.p;try{Q.p=32>a?32:a,z.T=null,a=of,of=null;var g=oi,S=Us;if(ut=0,Bs=oi=null,Us=0,(Te&6)!==0)throw Error(s(331));var _=Te;if(Te|=4,am(g.current),im(g,g.current,S,a),Te=_,aa(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(Ti,g)}catch{}return!0}finally{Q.p=h,z.T=c,xm(t,r)}}function Tm(t,r,a){r=Qt(a,r),r=qu(t.stateNode,r,2),t=Jn(t,r,2),t!==null&&(_r(t,2),Sn(t))}function ke(t,r,a){if(t.tag===3)Tm(t,t,a);else for(;r!==null;){if(r.tag===3){Tm(r,t,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(li===null||!li.has(c))){t=Qt(a,t),a=Cg(2),c=Jn(r,a,2),c!==null&&(kg(a,c,r,t),_r(c,2),Sn(c));break}}r=r.return}}function df(t,r,a){var c=t.pingCache;if(c===null){c=t.pingCache=new N1;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(a)||(nf=!0,h.add(a),t=L1.bind(null,t,r,a),r.then(t,t))}function L1(t,r,a){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Re===t&&(we&a)===a&&(Ie===4||Ie===3&&(we&62914560)===we&&300>lt()-af?(Te&2)===0&&Hs(t,0):sf|=a,Ds===we&&(Ds=0)),Sn(t)}function Em(t,r){r===0&&(r=wd()),t=Ss(t,r),t!==null&&(_r(t,r),Sn(t))}function R1(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Em(t,a)}function j1(t,r){var a=0;switch(t.tag){case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(a=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),Em(t,a)}function D1(t,r){return wr(t,r)}var Jl=null,qs=null,pf=!1,Wl=!1,gf=!1,$i=0;function Sn(t){t!==qs&&t.next===null&&(qs===null?Jl=qs=t:qs=qs.next=t),Wl=!0,pf||(pf=!0,U1())}function aa(t,r){if(!gf&&Wl){gf=!0;do for(var a=!1,c=Jl;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var S=c.suspendedLanes,_=c.pingedLanes;g=(1<<31-tt(42|t)+1)-1,g&=h&~(S&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,km(c,g))}else g=we,g=rl(c,c===Re?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||xr(c,g)||(a=!0,km(c,g));c=c.next}while(a);gf=!1}}function B1(){Am()}function Am(){Wl=pf=!1;var t=0;$i!==0&&(K1()&&(t=$i),$i=0);for(var r=lt(),a=null,c=Jl;c!==null;){var h=c.next,g=Nm(c,r);g===0?(c.next=null,a===null?Jl=h:a.next=h,h===null&&(qs=a)):(a=c,(t!==0||(g&3)!==0)&&(Wl=!0)),c=h}aa(t)}function Nm(t,r){for(var a=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var S=31-tt(g),_=1<<S,A=h[S];A===-1?((_&a)===0||(_&c)!==0)&&(h[S]=oS(_,r)):A<=r&&(t.expiredLanes|=_),g&=~_}if(r=Re,a=we,a=rl(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,a===0||t===r&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&_i(c),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||xr(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(c!==null&&_i(c),kc(a)){case 2:case 8:a=nl;break;case 32:a=ss;break;case 268435456:a=rs;break;default:a=ss}return c=Cm.bind(null,t),a=wr(a,c),t.callbackPriority=r,t.callbackNode=a,r}return c!==null&&c!==null&&_i(c),t.callbackPriority=2,t.callbackNode=null,2}function Cm(t,r){if(ut!==0&&ut!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Zl()&&t.callbackNode!==a)return null;var c=we;return c=rl(t,t===Re?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(um(t,c,r),Nm(t,lt()),t.callbackNode!=null&&t.callbackNode===a?Cm.bind(null,t):null)}function km(t,r){if(Zl())return null;um(t,r,!0)}function U1(){X1(function(){(Te&6)!==0?wr(tl,B1):Am()})}function mf(){return $i===0&&($i=Sd()),$i}function Mm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ul(""+t)}function Om(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function H1(t,r,a,c,h){if(r==="submit"&&a&&a.stateNode===h){var g=Mm((h[At]||null).action),S=c.submitter;S&&(r=(r=S[At]||null)?Mm(r.formAction):S.getAttribute("formAction"),r!==null&&(g=r,S=null));var _=new pl("action","action",null,c,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if($i!==0){var A=S?Om(h,S):new FormData(h);Du(a,{pending:!0,data:A,method:h.method,action:g},null,A)}}else typeof g=="function"&&(_.preventDefault(),A=S?Om(h,S):new FormData(h),Du(a,{pending:!0,data:A,method:h.method,action:g},g,A))},currentTarget:h}]})}}for(var yf=0;yf<eu.length;yf++){var bf=eu[yf],z1=bf.toLowerCase(),q1=bf[0].toUpperCase()+bf.slice(1);un(z1,"on"+q1)}un(up,"onAnimationEnd"),un(fp,"onAnimationIteration"),un(hp,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(i1,"onTransitionRun"),un(s1,"onTransitionStart"),un(r1,"onTransitionCancel"),un(dp,"onTransitionEnd"),us("onMouseEnter",["mouseout","mouseover"]),us("onMouseLeave",["mouseout","mouseover"]),us("onPointerEnter",["pointerout","pointerover"]),us("onPointerLeave",["pointerout","pointerover"]),Ei("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ei("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ei("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ei("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var la="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(" "),$1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(la));function Lm(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],h=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var S=c.length-1;0<=S;S--){var _=c[S],A=_.instance,D=_.currentTarget;if(_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(G){ql(G)}h.currentTarget=null,g=A}else for(S=0;S<c.length;S++){if(_=c[S],A=_.instance,D=_.currentTarget,_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(G){ql(G)}h.currentTarget=null,g=A}}}}function be(t,r){var a=r[Mc];a===void 0&&(a=r[Mc]=new Set);var c=t+"__bubble";a.has(c)||(Rm(r,t,2,!1),a.add(c))}function vf(t,r,a){var c=0;r&&(c|=4),Rm(a,t,c,r)}var eo="_reactListening"+Math.random().toString(36).slice(2);function Sf(t){if(!t[eo]){t[eo]=!0,Ad.forEach(function(a){a!=="selectionchange"&&($1.has(a)||vf(a,!1,t),vf(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[eo]||(r[eo]=!0,vf("selectionchange",!1,r))}}function Rm(t,r,a,c){switch(iy(r)){case 2:var h=pw;break;case 8:h=gw;break;default:h=jf}a=h.bind(null,r,a,t),h=void 0,!$c||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(r,a,{capture:!0,passive:h}):t.addEventListener(r,a,!0):h!==void 0?t.addEventListener(r,a,{passive:h}):t.addEventListener(r,a,!1)}function wf(t,r,a,c,h){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var _=c.stateNode.containerInfo;if(_===h)break;if(S===4)for(S=c.return;S!==null;){var A=S.tag;if((A===3||A===4)&&S.stateNode.containerInfo===h)return;S=S.return}for(;_!==null;){if(S=ls(_),S===null)return;if(A=S.tag,A===5||A===6||A===26||A===27){c=g=S;continue e}_=_.parentNode}}c=c.return}qd(function(){var D=g,G=zc(a),P=[];e:{var U=pp.get(t);if(U!==void 0){var H=pl,ue=t;switch(t){case"keypress":if(hl(a)===0)break e;case"keydown":case"keyup":H=DS;break;case"focusin":ue="focus",H=Kc;break;case"focusout":ue="blur",H=Kc;break;case"beforeblur":case"afterblur":H=Kc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=_S;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=HS;break;case up:case fp:case hp:H=AS;break;case dp:H=qS;break;case"scroll":case"scrollend":H=wS;break;case"wheel":H=IS;break;case"copy":case"cut":case"paste":H=CS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Kd;break;case"toggle":case"beforetoggle":H=GS}var ae=(r&4)!==0,Ce=!ae&&(t==="scroll"||t==="scrollend"),O=ae?U!==null?U+"Capture":null:U;ae=[];for(var k=D,j;k!==null;){var K=k;if(j=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||j===null||O===null||(K=Ar(k,O),K!=null&&ae.push(oa(k,K,j))),Ce)break;k=k.return}0<ae.length&&(U=new H(U,ue,null,a,G),P.push({event:U,listeners:ae}))}}if((r&7)===0){e:{if(U=t==="mouseover"||t==="pointerover",H=t==="mouseout"||t==="pointerout",U&&a!==Hc&&(ue=a.relatedTarget||a.fromElement)&&(ls(ue)||ue[as]))break e;if((H||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,H?(ue=a.relatedTarget||a.toElement,H=D,ue=ue?ls(ue):null,ue!==null&&(Ce=o(ue),ae=ue.tag,ue!==Ce||ae!==5&&ae!==27&&ae!==6)&&(ue=null)):(H=null,ue=D),H!==ue)){if(ae=Vd,K="onMouseLeave",O="onMouseEnter",k="mouse",(t==="pointerout"||t==="pointerover")&&(ae=Kd,K="onPointerLeave",O="onPointerEnter",k="pointer"),Ce=H==null?U:Er(H),j=ue==null?U:Er(ue),U=new ae(K,k+"leave",H,a,G),U.target=Ce,U.relatedTarget=j,K=null,ls(G)===D&&(ae=new ae(O,k+"enter",ue,a,G),ae.target=j,ae.relatedTarget=Ce,K=ae),Ce=K,H&&ue)t:{for(ae=H,O=ue,k=0,j=ae;j;j=$s(j))k++;for(j=0,K=O;K;K=$s(K))j++;for(;0<k-j;)ae=$s(ae),k--;for(;0<j-k;)O=$s(O),j--;for(;k--;){if(ae===O||O!==null&&ae===O.alternate)break t;ae=$s(ae),O=$s(O)}ae=null}else ae=null;H!==null&&jm(P,U,H,ae,!1),ue!==null&&Ce!==null&&jm(P,Ce,ue,ae,!0)}}e:{if(U=D?Er(D):window,H=U.nodeName&&U.nodeName.toLowerCase(),H==="select"||H==="input"&&U.type==="file")var ee=Wd;else if(Zd(U))if(ep)ee=e1;else{ee=JS;var pe=ZS}else H=U.nodeName,!H||H.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&Uc(D.elementType)&&(ee=Wd):ee=WS;if(ee&&(ee=ee(t,D))){Jd(P,ee,a,G);break e}pe&&pe(t,U,D),t==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&Bc(U,"number",U.value)}switch(pe=D?Er(D):window,t){case"focusin":(Zd(pe)||pe.contentEditable==="true")&&(ys=pe,Zc=D,jr=null);break;case"focusout":jr=Zc=ys=null;break;case"mousedown":Jc=!0;break;case"contextmenu":case"mouseup":case"dragend":Jc=!1,op(P,a,G);break;case"selectionchange":if(n1)break;case"keydown":case"keyup":op(P,a,G)}var ie;if(Xc)e:{switch(t){case"compositionstart":var oe="onCompositionStart";break e;case"compositionend":oe="onCompositionEnd";break e;case"compositionupdate":oe="onCompositionUpdate";break e}oe=void 0}else ms?Fd(t,a)&&(oe="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(oe="onCompositionStart");oe&&(Yd&&a.locale!=="ko"&&(ms||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&ms&&(ie=$d()):(Pn=G,Ic="value"in Pn?Pn.value:Pn.textContent,ms=!0)),pe=to(D,oe),0<pe.length&&(oe=new Gd(oe,t,null,a,G),P.push({event:oe,listeners:pe}),ie?oe.data=ie:(ie=Qd(a),ie!==null&&(oe.data=ie)))),(ie=YS?XS(t,a):PS(t,a))&&(oe=to(D,"onBeforeInput"),0<oe.length&&(pe=new Gd("onBeforeInput","beforeinput",null,a,G),P.push({event:pe,listeners:oe}),pe.data=ie)),H1(P,t,D,a,G)}Lm(P,r)})}function oa(t,r,a){return{instance:t,listener:r,currentTarget:a}}function to(t,r){for(var a=r+"Capture",c=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Ar(t,a),h!=null&&c.unshift(oa(t,h,g)),h=Ar(t,r),h!=null&&c.push(oa(t,h,g))),t.tag===3)return c;t=t.return}return[]}function $s(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function jm(t,r,a,c,h){for(var g=r._reactName,S=[];a!==null&&a!==c;){var _=a,A=_.alternate,D=_.stateNode;if(_=_.tag,A!==null&&A===c)break;_!==5&&_!==26&&_!==27||D===null||(A=D,h?(D=Ar(a,g),D!=null&&S.unshift(oa(a,D,A))):h||(D=Ar(a,g),D!=null&&S.push(oa(a,D,A)))),a=a.return}S.length!==0&&t.push({event:r,listeners:S})}var I1=/\r\n?/g,V1=/\u0000|\uFFFD/g;function Dm(t){return(typeof t=="string"?t:""+t).replace(I1,`
|
|
50
|
+
`).replace(V1,"")}function Bm(t,r){return r=Dm(r),Dm(t)===r}function no(){}function Ne(t,r,a,c,h,g){switch(a){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||ds(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&ds(t,""+c);break;case"className":ll(t,"class",c);break;case"tabIndex":ll(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ll(t,a,c);break;case"style":Hd(t,c,g);break;case"data":if(r!=="object"){ll(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=ul(""+c),t.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(a,"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"&&(a==="formAction"?(r!=="input"&&Ne(t,r,"name",h.name,h,null),Ne(t,r,"formEncType",h.formEncType,h,null),Ne(t,r,"formMethod",h.formMethod,h,null),Ne(t,r,"formTarget",h.formTarget,h,null)):(Ne(t,r,"encType",h.encType,h,null),Ne(t,r,"method",h.method,h,null),Ne(t,r,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=ul(""+c),t.setAttribute(a,c);break;case"onClick":c!=null&&(t.onclick=no);break;case"onScroll":c!=null&&be("scroll",t);break;case"onScrollEnd":c!=null&&be("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}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}a=ul(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);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(a,""+c):t.removeAttribute(a);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(a,""):t.removeAttribute(a);break;case"capture":case"download":c===!0?t.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,c):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(a,c):t.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(a):t.setAttribute(a,c);break;case"popover":be("beforetoggle",t),be("toggle",t),al(t,"popover",c);break;case"xlinkActuate":Tn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Tn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Tn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Tn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Tn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Tn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Tn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Tn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Tn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":al(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=vS.get(a)||a,al(t,a,c))}}function xf(t,r,a,c,h,g){switch(a){case"style":Hd(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}break;case"children":typeof c=="string"?ds(t,c):(typeof c=="number"||typeof c=="bigint")&&ds(t,""+c);break;case"onScroll":c!=null&&be("scroll",t);break;case"onScrollEnd":c!=null&&be("scrollend",t);break;case"onClick":c!=null&&(t.onclick=no);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),r=a.slice(2,h?a.length-7:void 0),g=t[At]||null,g=g!=null?g[a]:null,typeof g=="function"&&t.removeEventListener(r,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,c,h);break e}a in t?t[a]=c:c===!0?t.setAttribute(a,""):al(t,a,c)}}}function ft(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",t),be("load",t);var c=!1,h=!1,g;for(g in a)if(a.hasOwnProperty(g)){var S=a[g];if(S!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ne(t,r,g,S,a,null)}}h&&Ne(t,r,"srcSet",a.srcSet,a,null),c&&Ne(t,r,"src",a.src,a,null);return;case"input":be("invalid",t);var _=g=S=h=null,A=null,D=null;for(c in a)if(a.hasOwnProperty(c)){var G=a[c];if(G!=null)switch(c){case"name":h=G;break;case"type":S=G;break;case"checked":A=G;break;case"defaultChecked":D=G;break;case"value":g=G;break;case"defaultValue":_=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,r));break;default:Ne(t,r,c,G,a,null)}}jd(t,g,_,A,D,S,h,!1),ol(t);return;case"select":be("invalid",t),c=S=g=null;for(h in a)if(a.hasOwnProperty(h)&&(_=a[h],_!=null))switch(h){case"value":g=_;break;case"defaultValue":S=_;break;case"multiple":c=_;default:Ne(t,r,h,_,a,null)}r=g,a=S,t.multiple=!!c,r!=null?hs(t,!!c,r,!1):a!=null&&hs(t,!!c,a,!0);return;case"textarea":be("invalid",t),g=h=c=null;for(S in a)if(a.hasOwnProperty(S)&&(_=a[S],_!=null))switch(S){case"value":c=_;break;case"defaultValue":h=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(91));break;default:Ne(t,r,S,_,a,null)}Bd(t,c,h,g),ol(t);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(c=a[A],c!=null))switch(A){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Ne(t,r,A,c,a,null)}return;case"dialog":be("beforetoggle",t),be("toggle",t),be("cancel",t),be("close",t);break;case"iframe":case"object":be("load",t);break;case"video":case"audio":for(c=0;c<la.length;c++)be(la[c],t);break;case"image":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"embed":case"source":case"link":be("error",t),be("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 a)if(a.hasOwnProperty(D)&&(c=a[D],c!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ne(t,r,D,c,a,null)}return;default:if(Uc(r)){for(G in a)a.hasOwnProperty(G)&&(c=a[G],c!==void 0&&xf(t,r,G,c,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(c=a[_],c!=null&&Ne(t,r,_,c,a,null))}function G1(t,r,a,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,S=null,_=null,A=null,D=null,G=null;for(H in a){var P=a[H];if(a.hasOwnProperty(H)&&P!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":A=P;default:c.hasOwnProperty(H)||Ne(t,r,H,null,c,P)}}for(var U in c){var H=c[U];if(P=a[U],c.hasOwnProperty(U)&&(H!=null||P!=null))switch(U){case"type":g=H;break;case"name":h=H;break;case"checked":D=H;break;case"defaultChecked":G=H;break;case"value":S=H;break;case"defaultValue":_=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,r));break;default:H!==P&&Ne(t,r,U,H,c,P)}}Dc(t,S,_,A,D,G,g,h);return;case"select":H=S=_=U=null;for(g in a)if(A=a[g],a.hasOwnProperty(g)&&A!=null)switch(g){case"value":break;case"multiple":H=A;default:c.hasOwnProperty(g)||Ne(t,r,g,null,c,A)}for(h in c)if(g=c[h],A=a[h],c.hasOwnProperty(h)&&(g!=null||A!=null))switch(h){case"value":U=g;break;case"defaultValue":_=g;break;case"multiple":S=g;default:g!==A&&Ne(t,r,h,g,c,A)}r=_,a=S,c=H,U!=null?hs(t,!!a,U,!1):!!c!=!!a&&(r!=null?hs(t,!!a,r,!0):hs(t,!!a,a?[]:"",!1));return;case"textarea":H=U=null;for(_ in a)if(h=a[_],a.hasOwnProperty(_)&&h!=null&&!c.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Ne(t,r,_,null,c,h)}for(S in c)if(h=c[S],g=a[S],c.hasOwnProperty(S)&&(h!=null||g!=null))switch(S){case"value":U=h;break;case"defaultValue":H=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&Ne(t,r,S,h,c,g)}Dd(t,U,H);return;case"option":for(var ue in a)if(U=a[ue],a.hasOwnProperty(ue)&&U!=null&&!c.hasOwnProperty(ue))switch(ue){case"selected":t.selected=!1;break;default:Ne(t,r,ue,null,c,U)}for(A in c)if(U=c[A],H=a[A],c.hasOwnProperty(A)&&U!==H&&(U!=null||H!=null))switch(A){case"selected":t.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ne(t,r,A,U,c,H)}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 ae in a)U=a[ae],a.hasOwnProperty(ae)&&U!=null&&!c.hasOwnProperty(ae)&&Ne(t,r,ae,null,c,U);for(D in c)if(U=c[D],H=a[D],c.hasOwnProperty(D)&&U!==H&&(U!=null||H!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:Ne(t,r,D,U,c,H)}return;default:if(Uc(r)){for(var Ce in a)U=a[Ce],a.hasOwnProperty(Ce)&&U!==void 0&&!c.hasOwnProperty(Ce)&&xf(t,r,Ce,void 0,c,U);for(G in c)U=c[G],H=a[G],!c.hasOwnProperty(G)||U===H||U===void 0&&H===void 0||xf(t,r,G,U,c,H);return}}for(var O in a)U=a[O],a.hasOwnProperty(O)&&U!=null&&!c.hasOwnProperty(O)&&Ne(t,r,O,null,c,U);for(P in c)U=c[P],H=a[P],!c.hasOwnProperty(P)||U===H||U==null&&H==null||Ne(t,r,P,U,c,H)}var _f=null,Tf=null;function io(t){return t.nodeType===9?t:t.ownerDocument}function Um(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 Hm(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 Ef(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 Af=null;function K1(){var t=window.event;return t&&t.type==="popstate"?t===Af?!1:(Af=t,!0):(Af=null,!1)}var zm=typeof setTimeout=="function"?setTimeout:void 0,Y1=typeof clearTimeout=="function"?clearTimeout:void 0,qm=typeof Promise=="function"?Promise:void 0,X1=typeof queueMicrotask=="function"?queueMicrotask:typeof qm<"u"?function(t){return qm.resolve(null).then(t).catch(P1)}:zm;function P1(t){setTimeout(function(){throw t})}function ui(t){return t==="head"}function $m(t,r){var a=r,c=0,h=0;do{var g=a.nextSibling;if(t.removeChild(a),g&&g.nodeType===8)if(a=g.data,a==="/$"){if(0<c&&8>c){a=c;var S=t.ownerDocument;if(a&1&&ca(S.documentElement),a&2&&ca(S.body),a&4)for(a=S.head,ca(a),S=a.firstChild;S;){var _=S.nextSibling,A=S.nodeName;S[Tr]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&S.rel.toLowerCase()==="stylesheet"||a.removeChild(S),S=_}}if(h===0){t.removeChild(g),ya(r);return}h--}else a==="$"||a==="$?"||a==="$!"?h++:c=a.charCodeAt(0)-48;else c=0;a=g}while(a);ya(r)}function Nf(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Nf(a),Oc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function F1(t,r,a,c){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Tr])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=hn(t.nextSibling),t===null)break}return null}function Q1(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=hn(t.nextSibling),t===null))return null;return t}function Cf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function Z1(t,r){var a=t.ownerDocument;if(t.data!=="$?"||a.readyState==="complete")r();else{var c=function(){r(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function hn(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 kf=null;function Im(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return t;r--}else a==="/$"&&r++}t=t.previousSibling}return null}function Vm(t,r,a){switch(r=io(a),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 ca(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Oc(t)}var nn=new Map,Gm=new Set;function so(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Hn=Q.d;Q.d={f:J1,r:W1,D:ew,C:tw,L:nw,m:iw,X:rw,S:sw,M:aw};function J1(){var t=Hn.f(),r=Fl();return t||r}function W1(t){var r=os(t);r!==null&&r.tag===5&&r.type==="form"?ug(r):Hn.r(t)}var Is=typeof document>"u"?null:document;function Km(t,r,a){var c=Is;if(c&&typeof r=="string"&&r){var h=Ft(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),Gm.has(h)||(Gm.add(h),t={rel:t,crossOrigin:a,href:r},c.querySelector(h)===null&&(r=c.createElement("link"),ft(r,"link",t),nt(r),c.head.appendChild(r)))}}function ew(t){Hn.D(t),Km("dns-prefetch",t,null)}function tw(t,r){Hn.C(t,r),Km("preconnect",t,r)}function nw(t,r,a){Hn.L(t,r,a);var c=Is;if(c&&t&&r){var h='link[rel="preload"][as="'+Ft(r)+'"]';r==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Ft(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Ft(a.imageSizes)+'"]')):h+='[href="'+Ft(t)+'"]';var g=h;switch(r){case"style":g=Vs(t);break;case"script":g=Gs(t)}nn.has(g)||(t=m({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),nn.set(g,t),c.querySelector(h)!==null||r==="style"&&c.querySelector(ua(g))||r==="script"&&c.querySelector(fa(g))||(r=c.createElement("link"),ft(r,"link",t),nt(r),c.head.appendChild(r)))}}function iw(t,r){Hn.m(t,r);var a=Is;if(a&&t){var c=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Ft(c)+'"][href="'+Ft(t)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Gs(t)}if(!nn.has(g)&&(t=m({rel:"modulepreload",href:t},r),nn.set(g,t),a.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(fa(g)))return}c=a.createElement("link"),ft(c,"link",t),nt(c),a.head.appendChild(c)}}}function sw(t,r,a){Hn.S(t,r,a);var c=Is;if(c&&t){var h=cs(c).hoistableStyles,g=Vs(t);r=r||"default";var S=h.get(g);if(!S){var _={loading:0,preload:null};if(S=c.querySelector(ua(g)))_.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},a),(a=nn.get(g))&&Mf(t,a);var A=S=c.createElement("link");nt(A),ft(A,"link",t),A._p=new Promise(function(D,G){A.onload=D,A.onerror=G}),A.addEventListener("load",function(){_.loading|=1}),A.addEventListener("error",function(){_.loading|=2}),_.loading|=4,ro(S,r,c)}S={type:"stylesheet",instance:S,count:1,state:_},h.set(g,S)}}}function rw(t,r){Hn.X(t,r);var a=Is;if(a&&t){var c=cs(a).hoistableScripts,h=Gs(t),g=c.get(h);g||(g=a.querySelector(fa(h)),g||(t=m({src:t,async:!0},r),(r=nn.get(h))&&Of(t,r),g=a.createElement("script"),nt(g),ft(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function aw(t,r){Hn.M(t,r);var a=Is;if(a&&t){var c=cs(a).hoistableScripts,h=Gs(t),g=c.get(h);g||(g=a.querySelector(fa(h)),g||(t=m({src:t,async:!0,type:"module"},r),(r=nn.get(h))&&Of(t,r),g=a.createElement("script"),nt(g),ft(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function Ym(t,r,a,c){var h=(h=ce.current)?so(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Vs(a.href),a=cs(h).hoistableStyles,c=a.get(r),c||(c={type:"style",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Vs(a.href);var g=cs(h).hoistableStyles,S=g.get(t);if(S||(h=h.ownerDocument||h,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,S),(g=h.querySelector(ua(t)))&&!g._p&&(S.instance=g,S.state.loading=5),nn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},nn.set(t,a),g||lw(h,t,a,S.state))),r&&c===null)throw Error(s(528,""));return S}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Gs(a),a=cs(h).hoistableScripts,c=a.get(r),c||(c={type:"script",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Vs(t){return'href="'+Ft(t)+'"'}function ua(t){return'link[rel="stylesheet"]['+t+"]"}function Xm(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function lw(t,r,a,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}),ft(r,"link",a),nt(r),t.head.appendChild(r))}function Gs(t){return'[src="'+Ft(t)+'"]'}function fa(t){return"script[async]"+t}function Pm(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+Ft(a.href)+'"]');if(c)return r.instance=c,nt(c),c;var h=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),nt(c),ft(c,"style",h),ro(c,a.precedence,t),r.instance=c;case"stylesheet":h=Vs(a.href);var g=t.querySelector(ua(h));if(g)return r.state.loading|=4,r.instance=g,nt(g),g;c=Xm(a),(h=nn.get(h))&&Mf(c,h),g=(t.ownerDocument||t).createElement("link"),nt(g);var S=g;return S._p=new Promise(function(_,A){S.onload=_,S.onerror=A}),ft(g,"link",c),r.state.loading|=4,ro(g,a.precedence,t),r.instance=g;case"script":return g=Gs(a.src),(h=t.querySelector(fa(g)))?(r.instance=h,nt(h),h):(c=a,(h=nn.get(g))&&(c=m({},a),Of(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),nt(h),ft(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,ro(c,a.precedence,t));return r.instance}function ro(t,r,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,S=0;S<c.length;S++){var _=c[S];if(_.dataset.precedence===r)g=_;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function Mf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Of(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var ao=null;function Fm(t,r,a){if(ao===null){var c=new Map,h=ao=new Map;h.set(a,c)}else h=ao,c=h.get(a),c||(c=new Map,h.set(a,c));if(c.has(t))return c;for(c.set(t,null),a=a.getElementsByTagName(t),h=0;h<a.length;h++){var g=a[h];if(!(g[Tr]||g[gt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(r)||"";S=t+S;var _=c.get(S);_?_.push(g):c.set(S,[g])}}return c}function Qm(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function ow(t,r,a){if(a===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 Zm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var ha=null;function cw(){}function uw(t,r,a){if(ha===null)throw Error(s(475));var c=ha;if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=Vs(a.href),g=t.querySelector(ua(h));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=lo.bind(c),t.then(c,c)),r.state.loading|=4,r.instance=g,nt(g);return}g=t.ownerDocument||t,a=Xm(a),(h=nn.get(h))&&Mf(a,h),g=g.createElement("link"),nt(g);var S=g;S._p=new Promise(function(_,A){S.onload=_,S.onerror=A}),ft(g,"link",a),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=lo.bind(c),t.addEventListener("load",r),t.addEventListener("error",r))}}function fw(){if(ha===null)throw Error(s(475));var t=ha;return t.stylesheets&&t.count===0&&Lf(t,t.stylesheets),0<t.count?function(r){var a=setTimeout(function(){if(t.stylesheets&&Lf(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(a)}}:null}function lo(){if(this.count--,this.count===0){if(this.stylesheets)Lf(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var oo=null;function Lf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,oo=new Map,r.forEach(hw,t),oo=null,lo.call(t))}function hw(t,r){if(!(r.state.loading&4)){var a=oo.get(t);if(a)var c=a.get(null);else{a=new Map,oo.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var S=h[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),c=S)}c&&a.set(null,c)}h=r.instance,S=h.getAttribute("data-precedence"),g=a.get(S)||c,g===c&&a.set(null,h),a.set(S,h),this.count++,c=lo.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 da={$$typeof:V,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function dw(t,r,a,c,h,g,S,_){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=Nc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nc(0),this.hiddenUpdates=Nc(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Jm(t,r,a,c,h,g,S,_,A,D,G,P){return t=new dw(t,r,a,S,_,A,D,P),r=1,g===!0&&(r|=24),g=Ht(3,null,null,r),t.current=g,g.stateNode=t,r=hu(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:a,cache:r},mu(g),t}function Wm(t){return t?(t=ws,t):ws}function ey(t,r,a,c,h,g){h=Wm(h),c.context===null?c.context=h:c.pendingContext=h,c=Zn(r),c.payload={element:a},g=g===void 0?null:g,g!==null&&(c.callback=g),a=Jn(t,c,r),a!==null&&(Vt(a,t,r),Vr(a,t,r))}function ty(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function Rf(t,r){ty(t,r),(t=t.alternate)&&ty(t,r)}function ny(t){if(t.tag===13){var r=Ss(t,67108864);r!==null&&Vt(r,t,67108864),Rf(t,67108864)}}var co=!0;function pw(t,r,a,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=2,jf(t,r,a,c)}finally{Q.p=g,z.T=h}}function gw(t,r,a,c){var h=z.T;z.T=null;var g=Q.p;try{Q.p=8,jf(t,r,a,c)}finally{Q.p=g,z.T=h}}function jf(t,r,a,c){if(co){var h=Df(c);if(h===null)wf(t,r,c,uo,a),sy(t,c);else if(yw(h,t,r,a,c))c.stopPropagation();else if(sy(t,c),r&4&&-1<mw.indexOf(t)){for(;h!==null;){var g=os(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=ot(g.pendingLanes);if(S!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;S;){var A=1<<31-tt(S);_.entanglements[1]|=A,S&=~A}Sn(g),(Te&6)===0&&(Xl=lt()+500,aa(0))}}break;case 13:_=Ss(g,2),_!==null&&Vt(_,g,2),Fl(),Rf(g,2)}if(g=Df(c),g===null&&wf(t,r,c,uo,a),g===h)break;h=g}h!==null&&c.stopPropagation()}else wf(t,r,c,null,a)}}function Df(t){return t=zc(t),Bf(t)}var uo=null;function Bf(t){if(uo=null,t=ls(t),t!==null){var r=o(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=u(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return uo=t,null}function iy(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(xc()){case tl:return 2;case nl:return 8;case ss:case il:return 32;case rs:return 268435456;default:return 32}default:return 32}}var Uf=!1,fi=null,hi=null,di=null,pa=new Map,ga=new Map,pi=[],mw="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 sy(t,r){switch(t){case"focusin":case"focusout":fi=null;break;case"dragenter":case"dragleave":hi=null;break;case"mouseover":case"mouseout":di=null;break;case"pointerover":case"pointerout":pa.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ga.delete(r.pointerId)}}function ma(t,r,a,c,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},r!==null&&(r=os(r),r!==null&&ny(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function yw(t,r,a,c,h){switch(r){case"focusin":return fi=ma(fi,t,r,a,c,h),!0;case"dragenter":return hi=ma(hi,t,r,a,c,h),!0;case"mouseover":return di=ma(di,t,r,a,c,h),!0;case"pointerover":var g=h.pointerId;return pa.set(g,ma(pa.get(g)||null,t,r,a,c,h)),!0;case"gotpointercapture":return g=h.pointerId,ga.set(g,ma(ga.get(g)||null,t,r,a,c,h)),!0}return!1}function ry(t){var r=ls(t.target);if(r!==null){var a=o(r);if(a!==null){if(r=a.tag,r===13){if(r=u(a),r!==null){t.blockedOn=r,uS(t.priority,function(){if(a.tag===13){var c=It();c=Cc(c);var h=Ss(a,c);h!==null&&Vt(h,a,c),Rf(a,c)}});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function fo(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Df(t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Hc=c,a.target.dispatchEvent(c),Hc=null}else return r=os(a),r!==null&&ny(r),t.blockedOn=a,!1;r.shift()}return!0}function ay(t,r,a){fo(t)&&a.delete(r)}function bw(){Uf=!1,fi!==null&&fo(fi)&&(fi=null),hi!==null&&fo(hi)&&(hi=null),di!==null&&fo(di)&&(di=null),pa.forEach(ay),ga.forEach(ay)}function ho(t,r){t.blockedOn===r&&(t.blockedOn=null,Uf||(Uf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,bw)))}var po=null;function ly(t){po!==t&&(po=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){po===t&&(po=null);for(var r=0;r<t.length;r+=3){var a=t[r],c=t[r+1],h=t[r+2];if(typeof c!="function"){if(Bf(c||a)===null)continue;break}var g=os(a);g!==null&&(t.splice(r,3),r-=3,Du(g,{pending:!0,data:h,method:a.method,action:c},c,h))}}))}function ya(t){function r(A){return ho(A,t)}fi!==null&&ho(fi,t),hi!==null&&ho(hi,t),di!==null&&ho(di,t),pa.forEach(r),ga.forEach(r);for(var a=0;a<pi.length;a++){var c=pi[a];c.blockedOn===t&&(c.blockedOn=null)}for(;0<pi.length&&(a=pi[0],a.blockedOn===null);)ry(a),a.blockedOn===null&&pi.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var h=a[c],g=a[c+1],S=h[At]||null;if(typeof g=="function")S||ly(a);else if(S){var _=null;if(g&&g.hasAttribute("formAction")){if(h=g,S=g[At]||null)_=S.formAction;else if(Bf(h)!==null)continue}else _=S.action;typeof _=="function"?a[c+1]=_:(a.splice(c,3),c-=3),ly(a)}}}function Hf(t){this._internalRoot=t}go.prototype.render=Hf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,c=It();ey(a,c,t,r,null,null)},go.prototype.unmount=Hf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;ey(t.current,2,null,t,null,null),Fl(),r[as]=null}};function go(t){this._internalRoot=t}go.prototype.unstable_scheduleHydration=function(t){if(t){var r=Td();t={blockedOn:null,target:t,priority:r};for(var a=0;a<pi.length&&r!==0&&r<pi[a].priority;a++);pi.splice(a,0,t),a===0&&ry(t)}};var oy=e.version;if(oy!=="19.1.1")throw Error(s(527,oy,"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 vw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mo.isDisabled&&mo.supportsFiber)try{Ti=mo.inject(vw),Ze=mo}catch{}}return va.createRoot=function(t,r){if(!l(t))throw Error(s(299));var a=!1,c="",h=Tg,g=Eg,S=Ag,_=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!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&&(S=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(_=r.unstable_transitionCallbacks)),r=Jm(t,1,!1,null,null,a,c,h,g,S,_,null),t[as]=r.current,Sf(t),new Hf(r)},va.hydrateRoot=function(t,r,a){if(!l(t))throw Error(s(299));var c=!1,h="",g=Tg,S=Eg,_=Ag,A=null,D=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(A=a.unstable_transitionCallbacks),a.formState!==void 0&&(D=a.formState)),r=Jm(t,1,!0,r,a??null,c,h,g,S,_,A,D),r.context=Wm(null),a=r.current,c=It(),c=Cc(c),h=Zn(c),h.callback=null,Jn(a,h,c),a=c,r.current.lanes=a,_r(r,a),Sn(r),t[as]=r.current,Sf(t),new go(r)},va.version="19.1.1",va}var Sy;function Uw(){if(Sy)return $f.exports;Sy=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(),$f.exports=Bw(),$f.exports}var VN=Uw();const _0=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.closeBrowser",{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.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"}],["Worker.updateSubscription",{internal:!0}],["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 Hw(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const l=new URL(n[i]);return l.protocol==="data:"?l.protocol:l.protocol==="about:"?n[i]:l.pathname+l.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=zw(n,i);if(s!==void 0)return s}}function zw(n,e){const i=e.split(".");let s=n;for(const l of i){if(typeof s!="object"||s===null)return;s=s[l]}if(s!==void 0)return String(s)}function qw(n){var e;return(e=_0.get(n.type+"."+n.method))==null?void 0:e.group}const Ca=Symbol("context"),T0=Symbol("nextInContext"),E0=Symbol("prevByEndTime"),A0=Symbol("nextByStartTime"),wy=Symbol("events");class GN{constructor(e){Me(this,"startTime");Me(this,"endTime");Me(this,"browserName");Me(this,"channel");Me(this,"platform");Me(this,"wallTime");Me(this,"title");Me(this,"options");Me(this,"pages");Me(this,"actions");Me(this,"attachments");Me(this,"visibleAttachments");Me(this,"events");Me(this,"stdio");Me(this,"errors");Me(this,"errorDescriptors");Me(this,"hasSource");Me(this,"hasStepData");Me(this,"sdkLanguage");Me(this,"testIdAttributeName");Me(this,"sources");Me(this,"resources");e.forEach(s=>$w(s));const i=e.find(s=>s.origin==="library");this.browserName=(i==null?void 0:i.browserName)||"",this.sdkLanguage=i==null?void 0:i.sdkLanguage,this.channel=i==null?void 0:i.channel,this.testIdAttributeName=i==null?void 0:i.testIdAttributeName,this.platform=(i==null?void 0:i.platform)||"",this.title=(i==null?void 0:i.title)||"",this.options=(i==null?void 0:i.options)||{},this.actions=Iw(e),this.pages=[].concat(...e.map(s=>s.pages)),this.wallTime=e.map(s=>s.wallTime).reduce((s,l)=>Math.min(s||Number.MAX_VALUE,l),Number.MAX_VALUE),this.startTime=e.map(s=>s.startTime).reduce((s,l)=>Math.min(s,l),Number.MAX_VALUE),this.endTime=e.map(s=>s.endTime).reduce((s,l)=>Math.max(s,l),Number.MIN_VALUE),this.events=[].concat(...e.map(s=>s.events)),this.stdio=[].concat(...e.map(s=>s.stdio)),this.errors=[].concat(...e.map(s=>s.errors)),this.hasSource=e.some(s=>s.hasSource),this.hasStepData=e.some(s=>s.origin==="testRunner"),this.resources=[...e.map(s=>s.resources)].flat(),this.attachments=this.actions.flatMap(s=>{var l;return((l=s.attachments)==null?void 0:l.map(o=>({...o,traceUrl:s.context.traceUrl})))??[]}),this.visibleAttachments=this.attachments.filter(s=>!s.name.startsWith("_")),this.events.sort((s,l)=>s.time-l.time),this.resources.sort((s,l)=>s._monotonicTime-l._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Zw(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(s=>{const l=s.group??qw({type:s.class,method:s.method});return!l||i.has(l)})}_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 $w(n){for(const i of n.pages)i[Ca]=n;for(let i=0;i<n.actions.length;++i){const s=n.actions[i];s[Ca]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const s=n.actions[i];s[T0]=e,s.class!=="Route"&&(e=s)}for(const i of n.events)i[Ca]=n;for(const i of n.resources)i[Ca]=n}function Iw(n){const e=new Map;for(const l of n){const o=l.traceUrl;let u=e.get(o);u||(u=[],e.set(o,u)),u.push(l)}const i=[];let s=0;for(const[,l]of e){e.size>1&&Vw(l,++s);const o=Gw(l);i.push(...o)}i.sort((l,o)=>o.parentId===l.callId?1:l.parentId===o.callId?-1:l.endTime-o.endTime);for(let l=1;l<i.length;++l)i[l][E0]=i[l-1];i.sort((l,o)=>o.parentId===l.callId?-1:l.parentId===o.callId?1:l.startTime-o.startTime);for(let l=0;l+1<i.length;++l)i[l][A0]=i[l+1];return i}function Vw(n,e){for(const i of n)for(const s of i.actions)s.callId&&(s.callId=`${e}:${s.callId}`),s.parentId&&(s.parentId=`${e}:${s.parentId}`)}let xy=0;function Gw(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@${++xy}`,{...f,context:u});const l=Yw(s,e);l&&Kw(i,l);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@${++xy}`,{...f,context:u})}return[...e.values()]}function Kw(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 l of s.screencastFrames)l.timestamp+=e;for(const s of i.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function Yw(n,e){for(const i of n)for(const s of i.actions){if(!s.startTime)continue;const l=s.stepId?e.get(s.stepId):void 0;if(l)return s.startTime-l.startTime}return 0}function Xw(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 l=s.action.parentId&&e.get(s.action.parentId)||i;l.children.push(s),s.parent=l}return{rootItem:i,itemMap:e}}function qo(n){return n[Ca]}function Pw(n){return n[T0]}function _y(n){return n[E0]}function Ty(n){return n[A0]}function Fw(n){let e=0,i=0;for(const s of Qw(n)){if(s.type==="console"){const l=s.messageType;l==="warning"?++i:l==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:i}}function Qw(n){let e=n[wy];if(e)return e;const i=Pw(n);return e=qo(n).events.filter(s=>s.time>=n.startTime&&(!i||s.time<i.startTime)),n[wy]=e,e}function Zw(n,e){var s;const i=new Map;for(const l of n)for(const o of l.stack||[]){let u=i.get(o.file);u||(u={errors:[],content:void 0},i.set(o.file,u))}for(const l of e){const{action:o,stack:u,message:f}=l;!o||!u||(s=i.get(u[0].file))==null||s.errors.push({line:u[0].line||0,message:f})}return i}const Jw=50,$o=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:s="vertical",minSidebarSize:l=Jw,settingName:o,sidebar:u,main:f})=>{const d=Math.max(l,n)*window.devicePixelRatio,[p,m]=Kn(o?o+"."+s+":size":void 0,d),[y,b]=Kn(o?o+"."+s+":size":void 0,d),[w,E]=q.useState(null),[x,T]=es();let M;s==="vertical"?(M=y/window.devicePixelRatio,x&&x.height<M&&(M=x.height-10)):(M=p/window.devicePixelRatio,x&&x.width<M&&(M=x.width-10)),document.body.style.userSelect=w?"none":"inherit";let C={};return s==="vertical"?i?C={top:w?0:M-4,bottom:w?0:void 0,height:w?"initial":8}:C={bottom:w?0:M-4,top:w?0:void 0,height:w?"initial":8}:i?C={left:w?0:M-4,right:w?0:void 0,width:w?"initial":8}:C={right:w?0:M-4,left:w?0:void 0,width:w?"initial":8},v.jsxs("div",{className:Ye("split-view",s,i&&"sidebar-first"),ref:T,children:[v.jsx("div",{className:"split-view-main",children:f}),!e&&v.jsx("div",{style:{flexBasis:M},className:"split-view-sidebar",children:u}),!e&&v.jsx("div",{style:C,className:"split-view-resizer",onMouseDown:V=>E({offset:s==="vertical"?V.clientY:V.clientX,size:M}),onMouseUp:()=>E(null),onMouseMove:V=>{if(!V.buttons)E(null);else if(w){const B=(s==="vertical"?V.clientY:V.clientX)-w.offset,Y=i?w.size+B:w.size-B,I=V.target.parentElement.getBoundingClientRect(),R=Math.min(Math.max(l,Y),(s==="vertical"?I.height:I.width)-l);s==="vertical"?b(R*window.devicePixelRatio):m(R*window.devicePixelRatio)}}})]})},Qe=function(n,e,i){return n>=e&&n<=i};function Ot(n){return Qe(n,48,57)}function Ey(n){return Ot(n)||Qe(n,65,70)||Qe(n,97,102)}function Ww(n){return Qe(n,65,90)}function ex(n){return Qe(n,97,122)}function tx(n){return Ww(n)||ex(n)}function nx(n){return n>=128}function Ao(n){return tx(n)||nx(n)||n===95}function Ay(n){return Ao(n)||Ot(n)||n===45}function ix(n){return Qe(n,0,8)||n===11||Qe(n,14,31)||n===127}function No(n){return n===10}function zn(n){return No(n)||n===9||n===32}const sx=1114111;class kh extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function rx(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),Qe(s,55296,56319)&&Qe(n.charCodeAt(i+1),56320,57343)){const l=s-55296,o=n.charCodeAt(i+1)-56320;s=Math.pow(2,16)+l*Math.pow(2,10)+o,i++}e.push(s)}return e}function et(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 N0(n){const e=rx(n);let i=-1;const s=[];let l;const o=function(L){return L>=e.length?-1:e[L]},u=function(L){if(L===void 0&&(L=1),L>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+L)},f=function(L){return L===void 0&&(L=1),i+=L,l=o(i),!0},d=function(){return i-=1,!0},p=function(L){return L===void 0&&(L=l),L===-1},m=function(){if(y(),f(),zn(l)){for(;zn(u());)f();return new Io}else{if(l===34)return E();if(l===35)if(Ay(u())||M(u(1),u(2))){const L=new q0("");return V(u(1),u(2),u(3))&&(L.type="id"),L.value=J(),L}else return new ht(l);else return l===36?u()===61?(f(),new cx):new ht(l):l===39?E():l===40?new U0:l===41?new Mh:l===42?u()===61?(f(),new ux):new ht(l):l===43?Y()?(d(),b()):new ht(l):l===44?new R0:l===45?Y()?(d(),b()):u(1)===45&&u(2)===62?(f(2),new M0):$()?(d(),w()):new ht(l):l===46?Y()?(d(),b()):new ht(l):l===58?new O0:l===59?new L0:l===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new k0):new ht(l):l===64?V(u(1),u(2),u(3))?new z0(J()):new ht(l):l===91?new B0:l===92?C()?(d(),w()):new ht(l):l===93?new uh:l===94?u()===61?(f(),new ox):new ht(l):l===123?new j0:l===124?u()===61?(f(),new lx):u()===124?(f(),new H0):new ht(l):l===125?new D0:l===126?u()===61?(f(),new ax):new ht(l):Ot(l)?(d(),b()):Ao(l)?(d(),w()):p()?new ko:new ht(l)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),l===42&&u()===47){f();break}else if(p())return},b=function(){const L=I();if(V(u(1),u(2),u(3))){const F=new fx;return F.value=L.value,F.repr=L.repr,F.type=L.type,F.unit=J(),F}else if(u()===37){f();const F=new V0;return F.value=L.value,F.repr=L.repr,F}else{const F=new I0;return F.value=L.value,F.repr=L.repr,F.type=L.type,F}},w=function(){const L=J();if(L.toLowerCase()==="url"&&u()===40){for(f();zn(u(1))&&zn(u(2));)f();return u()===34||u()===39?new ja(L):zn(u())&&(u(2)===34||u(2)===39)?new ja(L):x()}else return u()===40?(f(),new ja(L)):new Oh(L)},E=function(L){L===void 0&&(L=l);let F="";for(;f();){if(l===L||p())return new Lh(F);if(No(l))return d(),new C0;l===92?p(u())||(No(u())?f():F+=et(T())):F+=et(l)}throw new Error("Internal error")},x=function(){const L=new $0("");for(;zn(u());)f();if(p(u()))return L;for(;f();){if(l===41||p())return L;if(zn(l)){for(;zn(u());)f();return u()===41||p(u())?(f(),L):(te(),new Co)}else{if(l===34||l===39||l===40||ix(l))return te(),new Co;if(l===92)if(C())L.value+=et(T());else return te(),new Co;else L.value+=et(l)}}throw new Error("Internal error")},T=function(){if(f(),Ey(l)){const L=[l];for(let ge=0;ge<5&&Ey(u());ge++)f(),L.push(l);zn(u())&&f();let F=parseInt(L.map(function(ge){return String.fromCharCode(ge)}).join(""),16);return F>sx&&(F=65533),F}else return p()?65533:l},M=function(L,F){return!(L!==92||No(F))},C=function(){return M(l,u())},V=function(L,F,ge){return L===45?Ao(F)||F===45||M(F,ge):Ao(L)?!0:L===92?M(L,F):!1},$=function(){return V(l,u(1),u(2))},B=function(L,F,ge){return L===43||L===45?!!(Ot(F)||F===46&&Ot(ge)):L===46?!!Ot(F):!!Ot(L)},Y=function(){return B(l,u(1),u(2))},J=function(){let L="";for(;f();)if(Ay(l))L+=et(l);else if(C())L+=et(T());else return d(),L;throw new Error("Internal parse error")},I=function(){let L="",F="integer";for((u()===43||u()===45)&&(f(),L+=et(l));Ot(u());)f(),L+=et(l);if(u(1)===46&&Ot(u(2)))for(f(),L+=et(l),f(),L+=et(l),F="number";Ot(u());)f(),L+=et(l);const ge=u(1),me=u(2),z=u(3);if((ge===69||ge===101)&&Ot(me))for(f(),L+=et(l),f(),L+=et(l),F="number";Ot(u());)f(),L+=et(l);else if((ge===69||ge===101)&&(me===43||me===45)&&Ot(z))for(f(),L+=et(l),f(),L+=et(l),f(),L+=et(l),F="number";Ot(u());)f(),L+=et(l);const Q=R(L);return{type:F,value:Q,repr:L}},R=function(L){return+L},te=function(){for(;f();){if(l===41||p())return;C()&&T()}};let re=0;for(;!p(u());)if(s.push(m()),re++,re>e.length*2)throw new Error("I'm infinite-looping!");return s}class Xe{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class C0 extends Xe{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Co extends Xe{constructor(){super(...arguments),this.tokenType="BADURL"}}class Io extends Xe{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class k0 extends Xe{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class M0 extends Xe{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class O0 extends Xe{constructor(){super(...arguments),this.tokenType=":"}}class L0 extends Xe{constructor(){super(...arguments),this.tokenType=";"}}class R0 extends Xe{constructor(){super(...arguments),this.tokenType=","}}class ur extends Xe{constructor(){super(...arguments),this.value="",this.mirror=""}}class j0 extends ur{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class D0 extends ur{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class B0 extends ur{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class uh extends ur{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class U0 extends ur{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Mh extends ur{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class ax extends Xe{constructor(){super(...arguments),this.tokenType="~="}}class lx extends Xe{constructor(){super(...arguments),this.tokenType="|="}}class ox extends Xe{constructor(){super(...arguments),this.tokenType="^="}}class cx extends Xe{constructor(){super(...arguments),this.tokenType="$="}}class ux extends Xe{constructor(){super(...arguments),this.tokenType="*="}}class H0 extends Xe{constructor(){super(...arguments),this.tokenType="||"}}class ko extends Xe{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ht extends Xe{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=et(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==="\\"?`\\
|
|
51
|
+
`:this.value}}class fr extends Xe{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 Oh extends fr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Pa(this.value)}}class ja extends fr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Pa(this.value)+"("}}class z0 extends fr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Pa(this.value)}}class q0 extends fr{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"?"#"+Pa(this.value):"#"+hx(this.value)}}class Lh extends fr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+G0(this.value)+'"'}}class $0 extends fr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+G0(this.value)+'")'}}class I0 extends Xe{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 V0 extends Xe{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 fx extends Xe{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=Pa(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||Qe(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function Pa(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let s=0;s<n.length;s++){const l=n.charCodeAt(s);if(l===0)throw new kh("Invalid character: the input contains U+0000.");Qe(l,1,31)||l===127||s===0&&Qe(l,48,57)||s===1&&Qe(l,48,57)&&i===45?e+="\\"+l.toString(16)+" ":l>=128||l===45||l===95||Qe(l,48,57)||Qe(l,65,90)||Qe(l,97,122)?e+=n[s]:e+="\\"+n[s]}return e}function hx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new kh("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||Qe(s,48,57)||Qe(s,65,90)||Qe(s,97,122)?e+=n[i]:e+="\\"+s.toString(16)+" "}return e}function G0(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new kh("Invalid character: the input contains U+0000.");Qe(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+n[i]:e+=n[i]}return e}class Lt extends Error{}function dx(n,e){let i;try{i=N0(n),i[i.length-1]instanceof ko||i.push(new ko)}catch(R){const te=R.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,re=(R.stack||"").indexOf(R.message);throw re!==-1&&(R.stack=R.stack.substring(0,re)+te+R.stack.substring(re+R.message.length)),R.message=te,R}const s=i.find(R=>R instanceof z0||R instanceof C0||R instanceof Co||R instanceof H0||R instanceof k0||R instanceof M0||R instanceof L0||R instanceof j0||R instanceof D0||R instanceof $0||R instanceof V0);if(s)throw new Lt(`Unsupported token "${s.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let l=0;const o=new Set;function u(){return new Lt(`Unexpected token "${i[l].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[l]instanceof Io;)l++}function d(R=l){return i[R]instanceof Oh}function p(R=l){return i[R]instanceof Lh}function m(R=l){return i[R]instanceof I0}function y(R=l){return i[R]instanceof R0}function b(R=l){return i[R]instanceof U0}function w(R=l){return i[R]instanceof Mh}function E(R=l){return i[R]instanceof ja}function x(R=l){return i[R]instanceof ht&&i[R].value==="*"}function T(R=l){return i[R]instanceof ko}function M(R=l){return i[R]instanceof ht&&[">","+","~"].includes(i[R].value)}function C(R=l){return y(R)||w(R)||T(R)||M(R)||i[R]instanceof Io}function V(){const R=[$()];for(;f(),!!y();)l++,R.push($());return R}function $(){return f(),m()||p()?i[l++].value:B()}function B(){const R={simples:[]};for(f(),M()?R.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):R.simples.push({selector:Y(),combinator:""});;){if(f(),M())R.simples[R.simples.length-1].combinator=i[l++].value,f();else if(C())break;R.simples.push({combinator:"",selector:Y()})}return R}function Y(){let R="";const te=[];for(;!C();)if(d()||x())R+=i[l++].toSource();else if(i[l]instanceof q0)R+=i[l++].toSource();else if(i[l]instanceof ht&&i[l].value===".")if(l++,d())R+="."+i[l++].toSource();else throw u();else if(i[l]instanceof O0)if(l++,d())if(!e.has(i[l].value.toLowerCase()))R+=":"+i[l++].toSource();else{const re=i[l++].value.toLowerCase();te.push({name:re,args:[]}),o.add(re)}else if(E()){const re=i[l++].value.toLowerCase();if(e.has(re)?(te.push({name:re,args:V()}),o.add(re)):R+=`:${re}(${J()})`,f(),!w())throw u();l++}else throw u();else if(i[l]instanceof B0){for(R+="[",l++;!(i[l]instanceof uh)&&!T();)R+=i[l++].toSource();if(!(i[l]instanceof uh))throw u();R+="]",l++}else throw u();if(!R&&!te.length)throw u();return{css:R||void 0,functions:te}}function J(){let R="",te=1;for(;!T()&&((b()||E())&&te++,w()&&te--,!!te);)R+=i[l++].toSource();return R}const I=V();if(!T())throw u();if(I.some(R=>typeof R!="object"||!("simples"in R)))throw new Lt(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:I,names:Array.from(o)}}const fh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),px=new Set(["left-of","right-of","above","below","near"]),K0=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 Fa(n){const e=yx(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 l=dx(s.body,K0);i.push({name:"css",body:l.selector,source:s.body});continue}if(fh.has(s.name)){let l,o;try{const p=JSON.parse("["+s.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Lt(`Malformed selector: ${s.name}=`+s.body);if(l=p[0],p.length===2){if(typeof p[1]!="number"||!px.has(s.name))throw new Lt(`Malformed selector: ${s.name}=`+s.body);o=p[1]}}catch{throw new Lt(`Malformed selector: ${s.name}=`+s.body)}const u={name:s.name,source:s.body,body:{parsed:Fa(l),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&&gx(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(fh.has(i[0].name))throw new Lt(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function gx(n,e){return Vn({parts:n})===Vn({parts:e})}function Vn(n,e){return typeof n=="string"?n:n.parts.map((i,s)=>{let l=!0;!e&&s!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(l=!1);const o=l?i.name+"=":"";return`${s===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function mx(n,e){const i=(s,l)=>{for(const o of s.parts)e(o,l),fh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function yx(n){let e=0,i,s=0;const l={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)),l.parts.push({name:p,body:m}),y){if(l.capture!==void 0)throw new Lt("Only one of the selectors can capture using * modifier");l.capture=l.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),l;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(),l}function Zi(n,e){let i=0,s=n.length===0;const l=()=>n[i]||"",o=()=>{const T=l();return++i,s=i>=n.length,T},u=T=>{throw s?new Lt(`Unexpected end of selector while parsing selector \`${n}\``):new Lt(`Error while parsing selector \`${n}\` - unexpected symbol "${l()}" at position ${i}`+(T?" during "+T:""))};function f(){for(;!s&&/\s/.test(l());)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(l());)T+=o();return T}function m(T){let M=o();for(M!==T&&u("parsing quoted string");!s&&l()!==T;)l()==="\\"&&o(),M+=o();return l()!==T&&u("parsing quoted string"),M+=o(),M}function y(){o()!=="/"&&u("parsing regular expression");let T="",M=!1;for(;!s;){if(l()==="\\")T+=o(),s&&u("parsing regular expression");else if(M&&l()==="]")M=!1;else if(!M&&l()==="[")M=!0;else if(!M&&l()==="/")break;T+=o()}o()!=="/"&&u("parsing regular expression");let C="";for(;!s&&l().match(/[dgimsuy]/);)C+=o();try{return new RegExp(T,C)}catch(V){throw new Lt(`Error while parsing selector \`${n}\`: ${V.message}`)}}function b(){let T="";return f(),l()==="'"||l()==='"'?T=m(l()).slice(1,-1):T=p(),T||u("parsing property path"),T}function w(){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();l()===".";)o(),T.push(b()),f();if(l()==="]")return o(),{name:T.join("."),jsonPath:T,op:"<truthy>",value:null,caseSensitive:!1};const M=w();let C,V=!0;if(f(),l()==="/"){if(M!=="=")throw new Lt(`Error while parsing selector \`${n}\` - cannot use ${M} in attribute with regular expression`);C=y()}else if(l()==="'"||l()==='"')C=m(l()).slice(1,-1),f(),l()==="i"||l()==="I"?(V=!1,o()):(l()==="s"||l()==="S")&&(V=!0,o());else{for(C="";!s&&(d(l())||l()==="+"||l()===".");)C+=o();C==="true"?C=!0:C==="false"?C=!1:e||(C=+C,Number.isNaN(C)&&u("parsing attribute value"))}if(f(),l()!=="]"&&u("parsing attribute value"),o(),M!=="="&&typeof C!="string")throw new Lt(`Error while parsing selector \`${n}\` - cannot use ${M} in attribute with non-string matching value - ${C}`);return{name:T.join("."),jsonPath:T,op:M,value:C,caseSensitive:V}}const x={name:"",attributes:[]};for(x.name=p(),f();l()==="[";)x.attributes.push(E()),f();if(s||u(void 0),!x.name&&!x.attributes.length)throw new Lt(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function tc(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 Vo(n){return n.charAt(0).toUpperCase()+n.substring(1)}function Y0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Qs(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let Ii;function bx(){Ii=new Map}function Et(n){let e=Ii==null?void 0:Ii.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Ii==null||Ii.set(n,e)),e}function nc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function X0(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"?X0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function _t(n,e){return typeof n!="string"?X0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function vx(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 Ny(n,e){return vx(n,e,"…")}function Go(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Sx(n,e){const i=n.length,s=e.length;let l=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]>l&&(l=u[f][d],o=f));return n.slice(o-l,o)}function wx(n,e){try{const i=Fa(e),s=i.parts[i.parts.length-1];if((s==null?void 0:s.name)==="internal:describe"){const l=JSON.parse(s.body);if(typeof l=="string")return l}return Yi(new F0[n],i,!1,1)[0]}catch{return e}}function Ji(n,e,i=!1){return P0(n,e,i,1)[0]}function P0(n,e,i=!1,s=20,l){try{return Yi(new F0[n](l),Fa(e),i,s)}catch{return[e]}}function Yi(n,e,i=!1,s=20){const l=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<l.length;f++){const d=l[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}=Sa(d.body);o.push([n.generateLocator(p,"text",x,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:x}=Sa(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}=Sa(d.body);if(!E){o.push([n.generateLocator(p,"has-not-text",x,{exact:E})]);continue}}if(d.name==="internal:has"){const E=Yi(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=Yi(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"hasNot",x)));continue}if(d.name==="internal:and"){const E=Yi(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"and",x)));continue}if(d.name==="internal:or"){const E=Yi(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"or",x)));continue}if(d.name==="internal:chain"){const E=Yi(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}=Sa(d.body);o.push([n.generateLocator(p,"label",x,{exact:E})]);continue}if(d.name==="internal:role"){const E=Zi(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=Zi(d.body,!0),{value:x}=E.attributes[0];o.push([n.generateLocator(p,"test-id",x)]);continue}if(d.name==="internal:attr"){const E=Zi(d.body,!0),{name:x,value:T,caseSensitive:M}=E.attributes[0],C=T,V=!!M;if(x==="placeholder"){o.push([n.generateLocator(p,"placeholder",C,{exact:V})]);continue}if(x==="alt"){o.push([n.generateLocator(p,"alt",C,{exact:V})]);continue}if(x==="title"){o.push([n.generateLocator(p,"title",C,{exact:V})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=o[o.length-1],x=l[f-1],T=E.map(M=>n.chainLocators([M,n.generateLocator(p,"frame","")]));["xpath","css"].includes(x.name)&&T.push(n.generateLocator(p,"frame-locator",Vn({parts:[x]})),n.generateLocator(p,"frame-locator",Vn({parts:[x]},!0))),E.splice(0,E.length,...T),u="frame-locator";continue}const m=l[f+1],y=Vn({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}=Sa(m.body);if(!E){const T=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),M={};m.name==="internal:has-text"?M.hasText=x:M.hasNotText=x;const C=n.generateLocator(p,"default",y,M);o.push([n.chainLocators([b,T]),C]),f++;continue}}let w;if(["xpath","css"].includes(d.name)){const E=Vn({parts:[d]},!0);w=n.generateLocator(p,"default",E)}o.push([b,w].filter(Boolean))}return xx(n,o,s)}function xx(n,e,i){const s=e.map(()=>""),l=[],o=u=>{if(u===e.length)return l.push(n.chainLocators(s)),l.length<i;for(const f of e[u])if(s[u]=f,!o(u+1))return!1;return!0};return o(0),l}function Sa(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 _x{constructor(e){this.preferredQuote=e}generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(l.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=[];dt(l.name)?o.push(`name: ${this.regexToSourceString(l.name)}`):typeof l.name=="string"&&(o.push(`name: ${this.quote(l.name)}`),l.exact&&o.push("exact: true"));for(const{name:f,value:d}of l.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,!!l.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact("getByLabel",s,!!l.exact);case"title":return this.toCallWithExact("getByTitle",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return nc(String(e))}toCallWithExact(e,i,s){return dt(i)?`${e}(${this.regexToSourceString(i)})`:s?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return dt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return dt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return tc(e,this.preferredQuote??"'")}}class Tx{generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(l.hasText)})`:l.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(l.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=[];dt(l.name)?o.push(`name=${this.regexToString(l.name)}`):typeof l.name=="string"&&(o.push(`name=${this.quote(l.name)}`),l.exact&&o.push("exact=True"));for(const{name:f,value:d}of l.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),o.push(`${Y0(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,!!l.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!l.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!l.exact);case"label":return this.toCallWithExact("get_by_label",s,!!l.exact);case"title":return this.toCallWithExact("get_by_title",s,!!l.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"${nc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,s){return dt(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return dt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return dt(e)?this.regexToString(e):this.quote(e)}quote(e){return tc(e,'"')}}class Ex{generateLocator(e,i,s,l={}){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 l.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(l.hasText)}))`:l.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(l.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=[];dt(l.name)?u.push(`.setName(${this.regexToString(l.name)})`):typeof l.name=="string"&&(u.push(`.setName(${this.quote(l.name)})`),l.exact&&u.push(".setExact(true)"));for(const{name:d,value:p}of l.attrs)u.push(`.set${Vo(d)}(${typeof p=="string"?this.quote(p):p})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${Y0(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,!!l.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!l.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!l.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(nc(e.source))}${i})`}toCallWithExact(e,i,s,l){return dt(s)?`${i}(${this.regexToString(s)})`:l?`${i}(${this.quote(s)}, new ${e}.${Vo(i)}Options().setExact(true))`:`${i}(${this.quote(s)})`}toHasText(e){return dt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return dt(e)?this.regexToString(e):this.quote(e)}quote(e){return tc(e,'"')}}class Ax{generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(l.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=[];dt(l.name)?o.push(`NameRegex = ${this.regexToString(l.name)}`):typeof l.name=="string"&&(o.push(`Name = ${this.quote(l.name)}`),l.exact&&o.push("Exact = true"));for(const{name:f,value:d}of l.attrs)o.push(`${Vo(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${Vo(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,!!l.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!l.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!l.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(nc(e.source))}${i})`}toCallWithExact(e,i,s){return dt(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return dt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return dt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return dt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return tc(e,'"')}}class Nx{generateLocator(e,i,s,l={}){return JSON.stringify({kind:i,body:s,options:l})}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 F0={javascript:_x,python:Tx,java:Ex,csharp:Ax,jsonl:Nx};function dt(n){return n instanceof RegExp}const Cy=new Map;function Cx({name:n,rootItem:e,render:i,title:s,icon:l,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:b,noItemsMessage:w,dataTestId:E,autoExpandDepth:x}){const T=q.useMemo(()=>kx(e,f,y.expandedItems,x||0,u),[e,f,y,x,u]),M=q.useRef(null),[C,V]=q.useState(),[$,B]=q.useState(!1);q.useEffect(()=>{m==null||m(C)},[m,C]),q.useEffect(()=>{const I=M.current;if(!I)return;const R=()=>{Cy.set(n,I.scrollTop)};return I.addEventListener("scroll",R,{passive:!0}),()=>I.removeEventListener("scroll",R)},[n]),q.useEffect(()=>{M.current&&(M.current.scrollTop=Cy.get(n)||0)},[n]);const Y=q.useCallback(I=>{const{expanded:R}=T.get(I);if(R){for(let te=f;te;te=te.parent)if(te===I){p==null||p(I);break}y.expandedItems.set(I.id,!1)}else y.expandedItems.set(I.id,!0);b({...y})},[T,f,p,y,b]),J=q.useCallback(I=>{const{expanded:R}=T.get(I),te=[I];for(;te.length;){const re=te.pop();te.push(...re.children),y.expandedItems.set(re.id,!R)}b({...y})},[T,y,b]);return v.jsx("div",{className:Ye("tree-view vbox",n+"-tree-view"),role:"tree","data-testid":E||n+"-tree",children:v.jsxs("div",{className:Ye("tree-view-content"),tabIndex:0,onKeyDown:I=>{if(f&&I.key==="Enter"){d==null||d(f);return}if(I.key!=="ArrowDown"&&I.key!=="ArrowUp"&&I.key!=="ArrowLeft"&&I.key!=="ArrowRight")return;if(I.stopPropagation(),I.preventDefault(),f&&I.key==="ArrowLeft"){const{expanded:te,parent:re}=T.get(f);te?(y.expandedItems.set(f.id,!1),b({...y})):re&&(p==null||p(re));return}if(f&&I.key==="ArrowRight"){f.children.length&&(y.expandedItems.set(f.id,!0),b({...y}));return}let R=f;if(I.key==="ArrowDown"&&(f?R=T.get(f).next:T.size&&(R=[...T.keys()][0])),I.key==="ArrowUp"){if(f)R=T.get(f).prev;else if(T.size){const te=[...T.keys()];R=te[te.length-1]}}m==null||m(void 0),R&&(B(!0),p==null||p(R)),V(void 0)},ref:M,children:[w&&T.size===0&&v.jsx("div",{className:"tree-view-empty",children:w}),e.children.map(I=>T.get(I)&&v.jsx(Q0,{item:I,treeItems:T,selectedItem:f,onSelected:p,onAccepted:d,isError:o,toggleExpanded:Y,toggleSubtree:J,highlightedItem:C,setHighlightedItem:V,render:i,icon:l,title:s,isKeyboardNavigation:$,setIsKeyboardNavigation:B},I.id))]})})}function Q0({item:n,treeItems:e,selectedItem:i,onSelected:s,highlightedItem:l,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:b,isKeyboardNavigation:w,setIsKeyboardNavigation:E}){const x=q.useId(),T=q.useRef(null);q.useEffect(()=>{i===n&&w&&T.current&&(w0(T.current),E(!1))},[n,i,w,E]);const M=e.get(n),C=M.depth,V=M.expanded;let $="codicon-blank";typeof V=="boolean"&&($=V?"codicon-chevron-down":"codicon-chevron-right");const B=m(n),Y=V&&n.children.length?n.children:[],J=y==null?void 0:y(n),I=(b==null?void 0:b(n))||"codicon-blank";return v.jsxs("div",{ref:T,role:"treeitem","aria-selected":n===i,"aria-expanded":V,"aria-controls":x,title:J,className:"vbox",style:{flex:"none"},children:[v.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:Ye("tree-view-entry",i===n&&"selected",l===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>s==null?void 0:s(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[C?new Array(C).fill(0).map((R,te)=>v.jsx("div",{className:"tree-view-indent"},"indent-"+te)):void 0,v.jsx("div",{"aria-hidden":"true",className:"codicon "+$,style:{minWidth:16,marginRight:4},onDoubleClick:R=>{R.preventDefault(),R.stopPropagation()},onClick:R=>{R.stopPropagation(),R.preventDefault(),R.altKey?p(n):d(n)}}),b&&v.jsx("div",{className:"codicon "+I,style:{minWidth:16,marginRight:4},"aria-label":"["+I.replace("codicon","icon")+"]"}),typeof B=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:B}):B]}),!!Y.length&&v.jsx("div",{id:x,role:"group",children:Y.map(R=>e.get(R)&&v.jsx(Q0,{item:R,treeItems:e,selectedItem:i,onSelected:s,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:p,highlightedItem:l,setHighlightedItem:o,render:m,title:y,icon:b,isKeyboardNavigation:w,setIsKeyboardNavigation:E},R.id))})]})}function kx(n,e,i,s,l=()=>!0){if(!l(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(!l(y))continue;const b=u.has(y.id)||i.get(y.id),w=s>m&&o.size<25&&b!==!1,E=y.children.length?b??w: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 Yt=q.forwardRef(function({children:e,title:i="",icon:s,disabled:l=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:p,ariaLabel:m},y){return v.jsxs("button",{ref:y,className:Ye(p,"toolbar-button",s,o&&"toggled"),onMouseDown:ky,onClick:u,onDoubleClick:ky,title:i,disabled:!!l,style:f,"data-testid":d,"aria-label":m||i,children:[s&&v.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),ky=n=>{n.stopPropagation(),n.preventDefault()};function Z0(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 Mx(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const Ox=Cx,Lx=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:s,sdkLanguage:l,onSelected:o,onHighlighted:u,revealConsole:f,revealAttachment:d,isLive:p})=>{const[m,y]=q.useState({expandedItems:new Map}),{rootItem:b,itemMap:w}=q.useMemo(()=>Xw(n),[n]),{selectedItem:E}=q.useMemo(()=>({selectedItem:e?w.get(e.callId):void 0}),[w,e]),x=q.useCallback(B=>{var Y,J;return!!((J=(Y=B.action)==null?void 0:Y.error)!=null&&J.message)},[]),T=q.useCallback(B=>s({minimum:B.action.startTime,maximum:B.action.endTime}),[s]),M=q.useCallback(B=>Rh(B.action,{sdkLanguage:l,revealConsole:f,revealAttachment:d,isLive:p,showDuration:!0,showBadges:!0}),[p,f,d,l]),C=q.useCallback(B=>!i||!B.action||B.action.startTime<=i.maximum&&B.action.endTime>=i.minimum,[i]),V=q.useCallback(B=>{o==null||o(B.action)},[o]),$=q.useCallback(B=>{u==null||u(B==null?void 0:B.action)},[u]);return v.jsxs("div",{className:"vbox",children:[i&&v.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[v.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),v.jsx(Ox,{name:"actions",rootItem:b,treeState:m,setTreeState:y,selectedItem:E,onSelected:V,onHighlighted:$,onAccepted:T,isError:x,isVisible:C,render:M})]})},Rh=(n,e)=>{var T,M;const{sdkLanguage:i,revealConsole:s,revealAttachment:l,isLive:o,showDuration:u,showBadges:f}=e,{errors:d,warnings:p}=Fw(n),m=!!((T=n.attachments)!=null&&T.length)&&!!l,y=n.params.selector?wx(i||"javascript",n.params.selector):void 0,b=n.class==="Test"&&n.method==="test.step"&&((M=n.annotations)==null?void 0:M.some(C=>C.type==="skip"));let w="";n.endTime?w=Tt(n.endTime-n.startTime):n.error?w="Timed out":o||(w="-");const{elements:E,title:x}=Rx(n);return v.jsxs("div",{className:"action-title vbox",children:[v.jsxs("div",{className:"hbox",children:[v.jsx("span",{className:"action-title-method",title:x,children:E}),(u||f||m||b)&&v.jsx("div",{className:"spacer"}),m&&v.jsx(Yt,{icon:"attach",title:"Open Attachment",onClick:()=>l(n.attachments[0])}),u&&!b&&v.jsx("div",{className:"action-duration",children:w||v.jsx("span",{className:"codicon codicon-loading"})}),b&&v.jsx("span",{className:Ye("action-skipped","codicon",Z0("skipped")),title:"skipped"}),f&&v.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!d&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-error"}),v.jsx("span",{className:"action-icon-value",children:d})]}),!!p&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-warning"}),v.jsx("span",{className:"action-icon-value",children:p})]})]})]}),y&&v.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function Rx(n){var f;const e=n.title??((f=_0.get(n.class+"."+n.method))==null?void 0:f.title)??n.method,i=[],s=[];let l=0;const o=/\{([^}]+)\}/g;let u;for(;(u=o.exec(e))!==null;){const[d,p]=u,m=e.slice(l,u.index);i.push(m),s.push(m);const y=Hw(n.params,p);y===void 0?(i.push(d),s.push(d)):u.index===0?(i.push(y),s.push(y)):(i.push(v.jsx("span",{className:"action-title-param",children:y})),s.push(y)),l=u.index+d.length}if(l<e.length){const d=e.slice(l);i.push(d),s.push(d)}return{elements:i,title:s.join("")}}const jh=({value:n,description:e})=>{const[i,s]=q.useState("copy"),l=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 v.jsx(Yt,{title:e||"Copy",icon:i,onClick:l})},Mo=({value:n,description:e,copiedDescription:i=e,style:s})=>{const[l,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 v.jsx(Yt,{style:s,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:l?i:e})},ts=({text:n})=>v.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),jx=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const s=q.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(u=>u!=="info"),[n]);if(!n)return v.jsx(ts,{text:"No action selected"});const l=n.startTime-e,o=Tt(l);return v.jsxs("div",{className:"call-tab",children:[v.jsx("div",{className:"call-line",children:n.title}),v.jsx("div",{className:"call-section",children:"Time"}),v.jsx(My,{name:"start:",value:o}),v.jsx(My,{name:"duration:",value:Dx(n)}),!!s.length&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Parameters"}),s.map(u=>Oy(Ly(n,u,n.params[u],i)))]}),!!n.result&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(u=>Oy(Ly(n,u,n.result[u],i)))]})]})},My=({name:n,value:e})=>v.jsxs("div",{className:"call-line",children:[n,v.jsx("span",{className:"call-value datetime",title:e,children:e})]});function Dx(n){return n.endTime?Tt(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Oy(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),v.jsxs("div",{className:"call-line",children:[n.name,":",v.jsx("span",{className:Ye("call-value",n.type),title:n.text,children:e}),["string","number","object","locator"].includes(n.type)&&v.jsx(jh,{value:n.text})]},n.name)}function Ly(n,e,i,s){const l=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&l)&&(i=Ko(i.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&l||e==="received"&&n.method==="expect")&&(i=Ko(i,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Ji(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 Ko(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=>Ko(i,e));if(n.o!==void 0){const i={};for(const{k:s,v:l}of n.o)i[s]=Ko(l,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const Ry=new Map;function ic({name:n,items:e=[],id:i,render:s,icon:l,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:b,noItemsMessage:w,dataTestId:E,notSelectable:x,ariaLabel:T}){const M=q.useRef(null),[C,V]=q.useState();return q.useEffect(()=>{y==null||y(C)},[y,C]),q.useEffect(()=>{const $=M.current;if(!$)return;const B=()=>{Ry.set(n,$.scrollTop)};return $.addEventListener("scroll",B,{passive:!0}),()=>$.removeEventListener("scroll",B)},[n]),q.useEffect(()=>{M.current&&(M.current.scrollTop=Ry.get(n)||0)},[n]),v.jsx("div",{className:Ye("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":T,children:v.jsxs("div",{className:Ye("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:$=>{var I;if(d&&$.key==="Enter"){p==null||p(d,e.indexOf(d));return}if($.key!=="ArrowDown"&&$.key!=="ArrowUp")return;$.stopPropagation(),$.preventDefault();const B=d?e.indexOf(d):-1;let Y=B;$.key==="ArrowDown"&&(B===-1?Y=0:Y=Math.min(B+1,e.length-1)),$.key==="ArrowUp"&&(B===-1?Y=e.length-1:Y=Math.max(B-1,0));const J=(I=M.current)==null?void 0:I.children.item(Y);w0(J||void 0),y==null||y(void 0),m==null||m(e[Y],Y),V(void 0)},ref:M,children:[w&&e.length===0&&v.jsx("div",{className:"list-view-empty",children:w}),e.map(($,B)=>{const Y=s($,B);return v.jsxs("div",{onDoubleClick:()=>p==null?void 0:p($,B),role:"listitem",className:Ye("list-view-entry",d===$&&"selected",!x&&C===$&&"highlighted",(o==null?void 0:o($,B))&&"error",(u==null?void 0:u($,B))&&"warning",(f==null?void 0:f($,B))&&"info"),"aria-selected":d===$,onClick:()=>m==null?void 0:m($,B),onMouseEnter:()=>V($),onMouseLeave:()=>V(void 0),children:[l&&v.jsx("div",{className:"codicon "+(l($,B)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:J=>{J.preventDefault(),J.stopPropagation()},onClick:J=>{J.stopPropagation(),J.preventDefault(),b==null||b($,B)}}),typeof Y=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:Y}):Y]},(i==null?void 0:i($,B))||B)})]})})}const Bx=ic,Ux=({action:n,isLive:e})=>{const i=q.useMemo(()=>{var u;if(!n||!n.log.length)return[];const s=n.log,l=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=Tt(s[f+1].time-p):n.endTime>0?d=Tt(n.endTime-p):e?d=Tt(Date.now()-l-p):d="-"}o.push({message:s[f].message,time:d})}return o},[n,e]);return i.length?v.jsx(Bx,{name:"log",ariaLabel:"Log entries",items:i,render:s=>v.jsxs("div",{className:"log-list-item",children:[v.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):v.jsx(ts,{text:"No log entries"})};function Ia(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let l,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(l=i.exec(n))!==null;){const[,,p,,m]=l;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=jy[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=jy[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=Dy[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=Dy[y-100];break}}else if(m){const y={...o},b=u?d:f;b!==void 0&&(y.color=b);const w=u?f:d;w!==void 0&&(y["background-color"]=w),s.push(`<span style="${zx(y)}">${Hx(m)}</span>`)}}return s.join("")}const jy={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)"},Dy={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 Hx(n){return n.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function zx(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const qx=({error:n})=>{const e=q.useMemo(()=>Ia(n),[n]);return v.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},J0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:s})=>(Kt.useEffect(()=>{const l=document.createElement("div");return l.style.position="fixed",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.left="0",l.style.zIndex="9999",l.style.cursor=n,document.body.appendChild(l),e&&l.addEventListener("mousemove",e),i&&l.addEventListener("mouseup",i),s&&document.body.addEventListener("dblclick",s),()=>{e&&l.removeEventListener("mousemove",e),i&&l.removeEventListener("mouseup",i),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(l)}},[n,e,i,s]),v.jsx(v.Fragment,{})),$x={position:"absolute",top:0,right:0,bottom:0,left:0},W0=({orientation:n,offsets:e,setOffsets:i,resizerColor:s,resizerWidth:l,minColumnWidth:o})=>{const u=o||0,[f,d]=Kt.useState(null),[p,m]=es(),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-l)/2,borderRightWidth:n==="horizontal"?(7-l)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-l)/2,borderLeftWidth:n==="horizontal"?(7-l)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return v.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-l)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&v.jsx(J0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:b=>{if(!b.buttons)d(null);else if(f){const w=n==="horizontal"?b.clientX-f.clientX:b.clientY-f.clientY,E=f.offset+w,x=f.index>0?e[f.index-1]:0,T=n==="horizontal"?p.width:p.height,M=Math.min(Math.max(x+u,E),T-u)-e[f.index];for(let C=f.index;C<e.length;++C)e[C]=e[C]+M;i([...e])}}}),e.map((b,w)=>v.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:w}),children:v.jsx("div",{style:{...$x,background:s}})},w))]})};async function Kf(n){const e=new Image;return n&&(e.src=n,await new Promise((i,s)=>{e.onload=i,e.onerror=i})),e}const hh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
|
|
52
|
+
linear-gradient(-45deg, #80808020 25%, transparent 25%),
|
|
53
|
+
linear-gradient(45deg, transparent 75%, #80808020 75%),
|
|
54
|
+
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,
|
|
55
|
+
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
|
|
56
|
+
rgb(0 0 0 / 10%) 0px -2px 4px,
|
|
57
|
+
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
|
58
|
+
rgb(0 0 0 / 25%) 0px 6px 12px`},Ix=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[s,l]=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),[w,E]=q.useState(null),[x,T]=es();q.useEffect(()=>{(async()=>{var R,te,re,L;d(await Kf((R=n.expected)==null?void 0:R.attachment.path)),m(((te=n.expected)==null?void 0:te.title)||"Expected"),b(await Kf((re=n.actual)==null?void 0:re.attachment.path)),E(await Kf((L=n.diff)==null?void 0:L.attachment.path))})()},[n]);const M=f&&y&&w,C=M?Math.max(f.naturalWidth,y.naturalWidth,200):500,V=M?Math.max(f.naturalHeight,y.naturalHeight,200):500,$=Math.min(1,(x.width-30)/C),B=Math.min(1,(x.width-50)/C/2),Y=C*$,J=V*$,I={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return v.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:T,children:M&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&v.jsx("div",{style:{...I,fontWeight:s==="diff"?600:"initial"},onClick:()=>l("diff"),children:"Diff"}),v.jsx("div",{style:{...I,fontWeight:s==="actual"?600:"initial"},onClick:()=>l("actual"),children:"Actual"}),v.jsx("div",{style:{...I,fontWeight:s==="expected"?600:"initial"},onClick:()=>l("expected"),children:p}),v.jsx("div",{style:{...I,fontWeight:s==="sxs"?600:"initial"},onClick:()=>l("sxs"),children:"Side by side"}),v.jsx("div",{style:{...I,fontWeight:s==="slider"?600:"initial"},onClick:()=>l("slider"),children:"Slider"})]}),v.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:J+60},children:[n.diff&&s==="diff"&&v.jsx(qn,{image:w,alt:"Diff",hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),n.diff&&s==="actual"&&v.jsx(qn,{image:y,alt:"Actual",hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),n.diff&&s==="expected"&&v.jsx(qn,{image:f,alt:p,hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),n.diff&&s==="slider"&&v.jsx(Vx,{expectedImage:f,actualImage:y,hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$,expectedTitle:p}),n.diff&&s==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx(qn,{image:f,title:p,hideSize:i,canvasWidth:B*C,canvasHeight:B*V,scale:B}),v.jsx(qn,{image:o?w:y,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:B*C,canvasHeight:B*V,scale:B})]}),!n.diff&&s==="actual"&&v.jsx(qn,{image:y,title:"Actual",hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),!n.diff&&s==="expected"&&v.jsx(qn,{image:f,title:p,hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),!n.diff&&s==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx(qn,{image:f,title:p,canvasWidth:B*C,canvasHeight:B*V,scale:B}),v.jsx(qn,{image:y,title:"Actual",canvasWidth:B*C,canvasHeight:B*V,scale:B})]})]}),!i&&v.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[v.jsx("div",{children:n.diff&&v.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),v.jsx("div",{children:v.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),v.jsx("div",{children:v.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},Vx=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:s,scale:l,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 v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&v.jsxs("div",{style:{margin:5},children:[!m&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),v.jsx("span",{children:n.naturalWidth}),v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),v.jsx("span",{children:n.naturalHeight}),!m&&v.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&v.jsx("span",{children:e.naturalWidth}),!m&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&v.jsx("span",{children:e.naturalHeight})]}),v.jsxs("div",{style:{position:"relative",width:i,height:s,margin:15,...hh},children:[v.jsx(W0,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),v.jsx("img",{alt:o,style:{width:n.naturalWidth*l,height:n.naturalHeight*l},draggable:"false",src:n.src}),v.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...hh},children:v.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*l,height:e.naturalHeight*l},draggable:"false",src:e.src})})]})]})},qn=({image:n,title:e,alt:i,hideSize:s,canvasWidth:l,canvasHeight:o,scale:u,onClick:f})=>v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&v.jsxs("div",{style:{margin:5},children:[e&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),v.jsx("span",{children:n.naturalWidth}),v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),v.jsx("span",{children:n.naturalHeight})]}),v.jsx("div",{style:{display:"flex",flex:"none",width:l,height:o,margin:15,...hh},children:v.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})})]}),Gx="modulepreload",Kx=function(n,e){return new URL(n,e).href},By={},Yx=function(e,i,s){let l=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"));l=u(i.map(m=>{if(m=Kx(m,s),m in By)return;By[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":Gx,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 l.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},Xx=20,lr=({text:n,highlighter:e,mimeType:i,linkify:s,readOnly:l,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:b,placeholder:w})=>{const[E,x]=es(),[T]=q.useState(Yx(()=>import("./codeMirrorModule-CH3lnpjO.js"),__vite__mapDeps([0,1]),import.meta.url).then($=>$.default)),M=q.useRef(null),[C,V]=q.useState();return q.useEffect(()=>{(async()=>{var I,R;const $=await T;Fx($);const B=x.current;if(!B)return;const Y=Zx(e)||Qx(i)||(s?"text/linkified":"");if(M.current&&Y===M.current.cm.getOption("mode")&&!!l===M.current.cm.getOption("readOnly")&&f===M.current.cm.getOption("lineNumbers")&&m===M.current.cm.getOption("lineWrapping")&&w===M.current.cm.getOption("placeholder"))return;(R=(I=M.current)==null?void 0:I.cm)==null||R.getWrapperElement().remove();const J=$(B,{value:"",mode:Y,readOnly:!!l,lineNumbers:f,lineWrapping:m,placeholder:w});return M.current={cm:J},d&&J.focus(),V(J),J})()},[T,C,x,e,i,s,f,m,l,d,w]),q.useEffect(()=>{M.current&&M.current.cm.setSize(E.width,E.height)},[E]),q.useLayoutEffect(()=>{var Y;if(!C)return;let $=!1;if(C.getValue()!==n&&(C.setValue(n),$=!0,p&&(C.execCommand("selectAll"),C.focus())),$||JSON.stringify(o)!==JSON.stringify(M.current.highlight)){for(const R of M.current.highlight||[])C.removeLineClass(R.line-1,"wrap");for(const R of o||[])C.addLineClass(R.line-1,"wrap",`source-line-${R.type}`);for(const R of M.current.widgets||[])C.removeLineWidget(R);for(const R of M.current.markers||[])R.clear();const J=[],I=[];for(const R of o||[]){if(R.type!=="subtle-error"&&R.type!=="error")continue;const te=(Y=M.current)==null?void 0:Y.cm.getLine(R.line-1);if(te){const re={};re.title=R.message||"",I.push(C.markText({line:R.line-1,ch:0},{line:R.line-1,ch:R.column||te.length},{className:"source-line-error-underline",attributes:re}))}if(R.type==="error"){const re=document.createElement("div");re.innerHTML=Ia(R.message||""),re.className="source-line-error-widget",J.push(C.addLineWidget(R.line,re,{above:!0,coverGutter:!1}))}}M.current.highlight=o,M.current.widgets=J,M.current.markers=I}typeof u=="number"&&M.current.cm.lineCount()>=u&&C.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let B;return y&&(B=()=>y(C.getValue()),C.on("change",B)),()=>{B&&C.off("change",B)}},[C,n,o,u,p,y]),v.jsx("div",{"data-testid":b,className:"cm-wrapper",ref:x,onClick:Px})};function Px(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 Uy=!1;function Fx(n){Uy||(Uy=!0,n.defineSimpleMode("text/linkified",{start:[{regex:x0,token:"linkified"}]}))}function Qx(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 Zx(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 Jx(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 Wx=({title:n,children:e,setExpanded:i,expanded:s,expandOnTitleClick:l})=>{const o=q.useId();return v.jsxs("div",{className:Ye("expandable",s&&"expanded"),children:[v.jsxs("div",{role:"button","aria-expanded":s,"aria-controls":o,className:"expandable-title",onClick:()=>l&&i(!s),children:[v.jsx("div",{className:Ye("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!l&&i(!s)}),n]}),s&&v.jsx("div",{id:o,role:"region",style:{marginLeft:25},children:e})]})};function eb(n){const e=[];let i=0,s;for(;(s=x0.exec(n))!==null;){const o=n.substring(i,s.index);o&&e.push(o);const u=s[0];e.push(e_(u)),i=s.index+u.length}const l=n.substring(i);return l&&e.push(l),e}function e_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),v.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const t_=({attachment:n,reveal:e})=>{const[i,s]=q.useState(!1),[l,o]=q.useState(null),[u,f]=q.useState(null),[d,p]=kw(),m=q.useRef(null),y=Jx(n.contentType),b=!!n.sha1||!!n.path;q.useEffect(()=>{var x;if(e)return(x=m.current)==null||x.scrollIntoView({behavior:"smooth"}),p()},[e,p]),q.useEffect(()=>{i&&l===null&&u===null&&(f("Loading ..."),fetch(sc(n)).then(x=>x.text()).then(x=>{o(x),f(null)}).catch(x=>{f("Failed to load: "+x.message)}))},[i,l,u,n]);const w=q.useMemo(()=>{const x=l?l.split(`
|
|
59
|
+
`).length:0;return Math.min(Math.max(5,x),20)*Xx},[l]),E=v.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":n.name,children:[v.jsx("span",{children:eb(n.name)}),b&&v.jsx("a",{style:{marginLeft:5},href:Oo(n),children:"download"})]});return!y||!b?v.jsx("div",{style:{marginLeft:20},children:E}):v.jsxs("div",{className:Ye(d&&"yellow-flash"),children:[v.jsx(Wx,{title:E,expanded:i,setExpanded:s,expandOnTitleClick:!0,children:u&&v.jsx("i",{children:u})}),i&&l!==null&&v.jsx("div",{className:"vbox",style:{height:w},children:v.jsx(lr,{text:l,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},n_=({model:n,revealedAttachment:e})=>{const{diffMap:i,screenshots:s,attachments:l}=q.useMemo(()=>{const o=new Set((n==null?void 0:n.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}},[n]);return!i.size&&!s.size&&!l.size?v.jsx(ts,{text:"No attachments"}):v.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>v.jsxs(v.Fragment,{children:[o&&u&&v.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&v.jsx(Ix,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Oo(o)},title:"Expected"},actual:{attachment:{...u,path:Oo(u)}},diff:f?{attachment:{...f,path:Oo(f)}}:void 0}})]})),s.size?v.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,u)=>{const f=sc(o);return v.jsxs("div",{className:"attachment-item",children:[v.jsx("div",{children:v.jsx("img",{draggable:"false",src:f})}),v.jsx("div",{children:v.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),l.size?v.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...l.values()].map((o,u)=>v.jsx("div",{className:"attachment-item",children:v.jsx(t_,{attachment:o,reveal:e&&i_(o,e[0])?e:void 0})},s_(o,u)))]})};function i_(n,e){return n.name===e.name&&n.path===e.path&&n.sha1===e.sha1}function sc(n,e={}){const i=new URLSearchParams(e);return n.sha1?(i.set("trace",n.traceUrl),"sha1/"+n.sha1+"?"+i.toString()):(i.set("path",n.path),"file?"+i.toString())}function Oo(n){const e={dn:n.name};return n.contentType&&(e.dct=n.contentType),sc(n,e)}function s_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const r_=`
|
|
60
|
+
# Instructions
|
|
61
|
+
|
|
62
|
+
- Following Playwright test failed.
|
|
63
|
+
- Explain why, be concise, respect Playwright best practices.
|
|
64
|
+
- Provide a snippet of code with the fix, if possible.
|
|
65
|
+
`.trimStart();async function a_({testInfo:n,metadata:e,errorContext:i,errors:s,buildCodeFrame:l,stdout:o,stderr:u}){var y;const f=new Set(s.filter(b=>b.message&&!b.message.includes(`
|
|
66
|
+
`)).map(b=>b.message));for(const b of s)for(const w of f.keys())(y=b.message)!=null&&y.includes(w)&&f.delete(w);const d=s.filter(b=>!(!b.message||!b.message.includes(`
|
|
67
|
+
`)&&!f.has(b.message)));if(!d.length)return;const p=[r_,"# Test info","",n];o&&p.push("","# Stdout","","```",Lo(o),"```"),u&&p.push("","# Stderr","","```",Lo(u),"```"),p.push("","# Error details");for(const b of d)p.push("","```",Lo(b.message||""),"```");i&&p.push(i);const m=await l(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(`
|
|
68
|
+
`)}const l_=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 Lo(n){return n.replace(l_,"")}const o_=ic,c_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const s=n||[];return v.jsx(o_,{name:"stack-trace",ariaLabel:"Stack trace",items:s,selectedItem:s[i],render:l=>{const o=l.file[1]===":"?"\\":"/";return v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"stack-trace-frame-function",children:l.function||"(anonymous)"}),v.jsx("span",{className:"stack-trace-frame-location",children:l.file.split(o).pop()}),v.jsx("span",{className:"stack-trace-frame-line",children:":"+l.line})]})},onSelected:l=>e(s.indexOf(l))})},Dh=({noShadow:n,children:e,noMinHeight:i,className:s,sidebarBackground:l,onClick:o})=>v.jsx("div",{className:Ye("toolbar",n&&"no-shadow",i&&"no-min-height",s,l&&"toolbar-sidebar-background"),onClick:o,children:e});function u_(n,e,i,s,l){return zo(async()=>{var b,w,E,x;const o=n==null?void 0:n[e],u=o!=null&&o.file?o:l;if(!u)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const f=u.file;let d=i.get(f);d||(d={errors:((b=l==null?void 0:l.source)==null?void 0:b.errors)||[],content:(w=l==null?void 0:l.source)==null?void 0:w.content},i.set(f,d));const p=(u==null?void 0:u.line)||((E=d.errors[0])==null?void 0:E.line)||0,m=s&&f.startsWith(s)?f.substring(s.length+1):f,y=d.errors.map(T=>({type:"error",line:T.line,message:T.message}));if(y.push({line:p,type:"running"}),((x=l==null?void 0:l.source)==null?void 0:x.content)!==void 0)d.content=l.source.content;else if(d.content===void 0||u===l){const T=await tb(f);try{let M=await fetch(`sha1/src@${T}.txt`);M.status===404&&(M=await fetch(`file?path=${encodeURIComponent(f)}`)),M.status>=400?d.content=`<Unable to read "${f}">`:d.content=await M.text()}catch{d.content=`<Unable to read "${f}">`}}return{source:d,highlight:y,targetLine:p,fileName:m,location:u}},[n,e,s,l],{source:{errors:[],content:"Loading…"},highlight:[]})}const f_=({stack:n,sources:e,rootDir:i,fallbackLocation:s,stackFrameLocation:l,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:w,location:E}=u_(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,M=h_(w);return v.jsx($o,{sidebarSize:200,orientation:l==="bottom"?"vertical":"horizontal",sidebarHidden:!T,main:v.jsxs("div",{className:"vbox","data-testid":"source-code",children:[w&&v.jsxs(Dh,{children:[v.jsx("div",{className:"source-tab-file-name",title:w,children:v.jsx("div",{children:M})}),v.jsx(jh,{description:"Copy filename",value:M}),E&&v.jsx(Yt,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),v.jsx(lr,{text:m.content||"",highlighter:"javascript",highlight:y,revealLine:b,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:v.jsx(c_,{stack:n,selectedFrame:d,setSelectedFrame:p})})};async function tb(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),s=[],l=new DataView(i);for(let o=0;o<l.byteLength;o+=1){const u=l.getUint8(o).toString(16).padStart(2,"0");s.push(u)}return s.join("")}function h_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const d_=({prompt:n})=>v.jsx(Mo,{value:n,description:"Copy prompt",copiedDescription:v.jsxs(v.Fragment,{children:["Copied ",v.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function p_(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 g_({message:n,error:e,sdkLanguage:i,revealInSource:s}){var f;let l,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(l=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),v.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[v.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Rh(e.action,{sdkLanguage:i}),l&&v.jsxs("div",{className:"action-location",children:["@ ",v.jsx("span",{title:o,onClick:()=>s(e),children:l})]})]}),v.jsx(qx,{error:n})]})}const m_=({errorsModel:n,model:e,sdkLanguage:i,revealInSource:s,wallTime:l,testRunMetadata:o})=>{const u=zo(async()=>{const p=e==null?void 0:e.attachments.find(m=>m.name==="error-context");if(p)return await fetch(sc(p)).then(m=>m.text())},[e],void 0),f=q.useCallback(async p=>{var w;const m=(w=p.stack)==null?void 0:w[0];if(!m)return;let y=await fetch(`sha1/src@${await tb(m.file)}.txt`);if(y.status===404&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const b=await y.text();return y_({source:b,message:Lo(p.message).split(`
|
|
69
|
+
`)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[]),d=zo(()=>a_({testInfo:(e==null?void 0:e.title)??"",metadata:o,errorContext:u,errors:(e==null?void 0:e.errorDescriptors)??[],buildCodeFrame:f}),[u,o,e,f],void 0);return n.errors.size?v.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[v.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&v.jsx(d_,{prompt:d})}),[...n.errors.entries()].map(([p,m])=>{const y=`error-${l}-${p}`;return v.jsx(g_,{message:p,error:m,revealInSource:s,sdkLanguage:i},y)})]}):v.jsx(ts,{text:"No errors"})};function y_({source:n,message:e,location:i,linesAbove:s,linesBelow:l}){const o=n.split(`
|
|
70
|
+
`).slice(),u=Math.max(0,i.line-s-1),f=Math.min(o.length,i.line+l),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(`
|
|
71
|
+
`)}const b_=ic;function v_(n,e){const{entries:i}=q.useMemo(()=>{if(!n)return{entries:[]};const l=[];function o(f){var m,y,b,w,E,x;const d=l[l.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)===((w=d.browserMessage)==null?void 0:w.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++:l.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?w_(f.args):nb(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=Ia(f.text.trim())||""),f.base64&&(d=Ia(atob(f.base64).trim())||""),o({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:l}},[n]);return{entries:q.useMemo(()=>e?i.filter(l=>l.timestamp>=e.minimum&&l.timestamp<=e.maximum):i,[i,e])}}const S_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:s})=>n.entries.length?v.jsx("div",{className:"console-tab",children:v.jsx(b_,{name:"console",onAccepted:s,onHighlighted:i,items:n.entries,isError:l=>l.isError,isWarning:l=>l.isWarning,render:l=>{const o=Tt(l.timestamp-e.minimum),u=v.jsx("span",{className:"console-time",children:o}),f=l.isError?"status-error":l.isWarning?"status-warning":"status-none",d=l.browserMessage||l.browserError?v.jsx("span",{className:Ye("codicon","codicon-browser",f),title:"Browser message"}):v.jsx("span",{className:Ye("codicon","codicon-file",f),title:"Runner message"});let p,m,y,b;const{browserMessage:w,browserError:E,nodeMessage:x}=l;if(w&&(p=w.location,m=w.body),E){const{error:T,value:M}=E;T?(m=T.message,b=T.stack):m=String(M)}return x&&(y=x.html),v.jsxs("div",{className:"console-line",children:[u,d,p&&v.jsx("span",{className:"console-location",children:p}),l.repeat>1&&v.jsx("span",{className:"console-repeat",children:l.repeat}),m&&v.jsx("span",{className:"console-line-message",children:m}),y&&v.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),b&&v.jsx("div",{className:"console-stack",children:b})]})}})}):v.jsx(ts,{text:"No console entries"});function w_(n){if(n.length===1)return nb(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 l=0;const o=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(v.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(v.jsx("span",{children:m},d.length+1)),p=u.index+2;const y=u[0][1];if(y==="%")d.push(v.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const b=s[l++],w={};typeof(b==null?void 0:b.value)!="string"&&(w.color="var(--vscode-debugTokenExpression-number)"),d.push(v.jsx("span",{style:w,children:(b==null?void 0:b.preview)||""},d.length+1))}else if(y==="c"){d=[];const b=s[l++],w=b?x_(b.preview):{};f.push(v.jsx("span",{style:w,children:d},f.length+1))}}for(p<i.length&&d.push(v.jsx("span",{children:i.substring(p)},d.length+1));l<s.length;l++){const m=s[l],y={};d.length&&d.push(v.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(v.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return f}function nb(n){return[v.jsx("span",{dangerouslySetInnerHTML:{__html:Ia(n.trim())}})]}function x_(n){try{const e={},i=n.split(";");for(const s of i){const l=s.trim();if(!l)continue;let[o,u]=l.split(":");if(o=o.trim(),u=u.trim(),!__(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function __(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const dh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:s,rightToolbar:l,dataTestId:o,mode:u})=>{const f=q.useId();return e||(e=n[0].id),u||(u="default"),v.jsx("div",{className:"tabbed-pane","data-testid":o,children:v.jsxs("div",{className:"vbox",children:[v.jsxs(Dh,{children:[s&&v.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),u==="default"&&v.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>v.jsx(ib,{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"&&v.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:v.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})`),v.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,p]},d.id)})})}),l&&v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...l]})]}),n.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return v.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 v.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},ib=({id:n,title:e,count:i,errorCount:s,selected:l,onSelect:o,ariaControls:u})=>v.jsxs("div",{className:Ye("tabbed-pane-tab",l&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,children:[v.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&v.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!s&&v.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function T_(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 l(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
|
+
|
|
73
|
+
`)+'^"'}function o(y){function b(w){let x=w.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"?l:o;i.push(u(n.request.url).replace(/[[{}\]]/g,"\\$&"));let f="GET";const d=[],p=await sb(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],w=b.name.replace(/^:/,"");s.has(w.toLowerCase())||(b.value.trim()?i.push("-H "+u(w+": "+b.value)):i.push("-H "+u(w+";")))}return i=i.concat(d),"curl "+i.join(i.length>=3?e==="win"?` ^
|
|
74
|
+
`:` \\
|
|
75
|
+
`:" ")}async function E_(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"]),l=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 sb(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 w=JSON.stringify(b,null,2);return`fetch(${l}, ${w});`}async function sb(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 A_{generatePlaywrightRequestCall(e,i){let s=e.method.toLowerCase();const l=new URL(e.url),o=`${l.origin}${l.pathname}`,u={};["delete","get","head","post","put","patch"].includes(s)||(u.method=s,s="fetch"),l.searchParams.size&&(u.params=Object.fromEntries(l.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
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
|
77
|
+
`)}
|
|
78
|
+
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
|
|
79
|
+
${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(`,
|
|
80
|
+
`)}
|
|
81
|
+
${l}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
|
82
|
+
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class N_{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
|
+
${o.map(d=>this.indent(d,2)).join(`,
|
|
84
|
+
`)}
|
|
85
|
+
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
|
|
86
|
+
`).map(s=>" ".repeat(i)+s).join(`
|
|
87
|
+
`)}prettyPrintObject(e,i=2,s=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`[
|
|
88
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
|
89
|
+
`)}
|
|
90
|
+
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
|
|
91
|
+
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1);return`${o}${this.stringLiteral(f)}: ${p}`}).join(`,
|
|
92
|
+
`)}
|
|
93
|
+
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class C_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),l=`${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=[`"${l}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
|
|
94
|
+
`)}${u.length?`
|
|
95
|
+
`:""}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[] {
|
|
96
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
|
97
|
+
`)}
|
|
98
|
+
${f}}`}if(Object.keys(e).length===0)return"new {}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`new() {
|
|
99
|
+
${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(`,
|
|
100
|
+
`)}
|
|
101
|
+
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class k_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),l=[`"${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&&l.push(`RequestOptions.create()
|
|
102
|
+
.${o.join(`
|
|
103
|
+
.`)}
|
|
104
|
+
`),`request.${u}(${l.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function M_(n){if(n==="javascript")return new A_;if(n==="python")return new N_;if(n==="csharp")return new C_;if(n==="java")return new k_;throw new Error("Unsupported language: "+n)}const O_=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:s})=>{const[l,o]=q.useState("request"),u=zo(async()=>{if(n.request.postData){const f=n.request.headers.find(p=>p.name.toLowerCase()==="content-type"),d=f?f.value:"";if(n.request.postData._sha1){const p=await fetch(`sha1/${n.request.postData._sha1}`);return{text:ph(await p.text(),d),mimeType:d}}else return{text:ph(n.request.postData.text,d),mimeType:d}}else return null},[n],null);return v.jsx(dh,{dataTestId:"network-request-details",leftToolbar:[v.jsx(Yt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[v.jsx(L_,{requestBody:u,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>v.jsx(R_,{resource:n,startTimeOffset:i,requestBody:u})},{id:"response",title:"Response",render:()=>v.jsx(j_,{resource:n})},{id:"body",title:"Body",render:()=>v.jsx(D_,{resource:n})}],selectedTab:l,setSelectedTab:o})},L_=({resource:n,sdkLanguage:e,requestBody:i})=>{const s=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),l=async()=>M_(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return v.jsxs("div",{className:"copy-request-dropdown",children:[v.jsxs(Yt,{className:"copy-request-dropdown-toggle",children:[v.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",v.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),v.jsxs("div",{className:"copy-request-dropdown-menu",children:[v.jsx(Mo,{description:"Copy as cURL",copiedDescription:s,value:()=>T_(n)}),v.jsx(Mo,{description:"Copy as Fetch",copiedDescription:s,value:()=>E_(n)}),v.jsx(Mo,{description:"Copy as Playwright",copiedDescription:s,value:l})]})]})},R_=({resource:n,startTimeOffset:e,requestBody:i})=>v.jsxs("div",{className:"network-request-details-tab",children:[v.jsx("div",{className:"network-request-details-header",children:"General"}),v.jsx("div",{className:"network-request-details-url",children:`URL: ${n.request.url}`}),v.jsx("div",{className:"network-request-details-general",children:`Method: ${n.request.method}`}),n.response.status!==-1&&v.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",v.jsx("span",{className:U_(n.response.status),style:{display:"inline-flex"},children:`${n.response.status} ${n.response.statusText}`})]}),n.request.queryString.length?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),v.jsx("div",{className:"network-request-details-headers",children:n.request.queryString.map(s=>`${s.name}: ${s.value}`).join(`
|
|
105
|
+
`)})]}):null,v.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),v.jsx("div",{className:"network-request-details-headers",children:n.request.headers.map(s=>`${s.name}: ${s.value}`).join(`
|
|
106
|
+
`)}),v.jsx("div",{className:"network-request-details-header",children:"Time"}),v.jsx("div",{className:"network-request-details-general",children:`Start: ${Tt(e)}`}),v.jsx("div",{className:"network-request-details-general",children:`Duration: ${Tt(n.time)}`}),i&&v.jsx("div",{className:"network-request-details-header",children:"Request Body"}),i&&v.jsx(lr,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]}),j_=({resource:n})=>v.jsxs("div",{className:"network-request-details-tab",children:[v.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),v.jsx("div",{className:"network-request-details-headers",children:n.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
|
|
107
|
+
`)})]}),D_=({resource:n})=>{const[e,i]=q.useState(null);return q.useEffect(()=>{(async()=>{if(n.response.content._sha1){const l=n.response.content.mimeType.includes("image"),o=n.response.content.mimeType.includes("font"),u=await fetch(`sha1/${n.response.content._sha1}`);if(l){const f=await u.blob(),d=new FileReader,p=new Promise(m=>d.onload=m);d.readAsDataURL(f),i({dataUrl:(await p).target.result})}else if(o){const f=await u.arrayBuffer();i({font:f})}else{const f=ph(await u.text(),n.response.content.mimeType);i({text:f,mimeType:n.response.content.mimeType})}}else i(null)})()},[n]),v.jsxs("div",{className:"network-request-details-tab",children:[!n.response.content._sha1&&v.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&v.jsx(B_,{font:e.font}),e&&e.dataUrl&&v.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&v.jsx(lr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},B_=({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?v.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):v.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",v.jsx("br",{}),"NOPQRSTUVWXYZ",v.jsx("br",{}),"abcdefghijklm",v.jsx("br",{}),"nopqrstuvwxyz",v.jsx("br",{}),"1234567890"]})};function U_(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function ph(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 H_(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 l=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 v.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[v.jsx(W0,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),v.jsxs("div",{className:"vbox",children:[v.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>v.jsxs("div",{className:"grid-view-header-cell "+z_(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&l(o),children:[v.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),v.jsx("span",{className:"codicon codicon-triangle-up"}),v.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),v.jsx(ic,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>v.jsx(v.Fragment,{children:n.columns.map((f,d)=>{const{body:p,title:m}=n.render(o,f,u);return v.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 z_(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const q_=["All","Fetch","HTML","JS","CSS","Font","Image"],$_={searchValue:"",resourceType:"All"},I_=({filterState:n,onFilterStateChange:e})=>v.jsxs("div",{className:"network-filters",children:[v.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),v.jsx("div",{className:"network-filters-resource-types",children:q_.map(i=>v.jsx("div",{title:i,onClick:()=>e({...n,resourceType:i}),className:`network-filters-resource-type ${n.resourceType===i?"selected":""}`,children:i},i))})]}),V_=H_;function G_(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 Q_(n),[n]);return{resources:i,contextIdMap:s}}const K_=({boundaries:n,networkModel:e,onEntryHovered:i,sdkLanguage:s})=>{const[l,o]=q.useState(void 0),[u,f]=q.useState(void 0),[d,p]=q.useState($_),{renderedEntries:m,renderedEntryMap:y}=q.useMemo(()=>{const C=e.resources.map($=>Z_($,n,e.contextIdMap)).filter(nT(d));l&&W_(C,l);const V=new Map(C.map(($,B)=>[`${$.frameref}:${B}`,$]));return{renderedEntries:C,renderedEntryMap:V}},[e.resources,e.contextIdMap,d,l,n]),b=u?y.get(u):void 0,[w,E]=q.useState(()=>new Map(rb().map(C=>[C,X_(C)]))),x=q.useCallback(C=>{const V=m.indexOf(C);f(V!==-1?`${C.frameref}:${V}`:void 0)},[m]),T=q.useCallback(C=>{p(C),f(void 0)},[]);if(!e.resources.length)return v.jsx(ts,{text:"No network calls"});const M=v.jsx(V_,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:b,onSelected:x,onHighlighted:C=>i==null?void 0:i(C==null?void 0:C.resource),columns:P_(!!b,m),columnTitle:Y_,columnWidths:w,setColumnWidths:E,isError:C=>C.status.code>=400||C.status.code===-1,isInfo:C=>!!C.route,render:(C,V)=>F_(C,V),sorting:l,setSorting:o});return v.jsxs(v.Fragment,{children:[v.jsx(I_,{filterState:d,onFilterStateChange:T}),!b&&M,b&&v.jsx($o,{sidebarSize:w.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:v.jsx(O_,{resource:b.resource,sdkLanguage:s,startTimeOffset:b.start,onClose:()=>f(void 0)}),sidebar:M})]})},Y_=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":"",X_=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function P_(n,e){if(n){const s=["name"];return Hy(e)&&s.unshift("contextId"),s}let i=rb();return Hy(e)||(i=i.filter(s=>s!=="contextId")),i}function rb(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const F_=(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:Tt(n.duration)}:e==="size"?{body:Nw(n.size)}:e==="start"?{body:Tt(n.start)}:e==="route"?{body:n.route}:{body:""};class Q_{constructor(e){Me(this,"_pagerefToShortId",new Map);Me(this,"_contextToId",new Map);Me(this,"_lastPageId",0);Me(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=qo(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 Hy(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const Z_=(n,e,i)=>{const s=J_(n);let l;try{const f=new URL(n.request.url);l=f.pathname.substring(f.pathname.lastIndexOf("/")+1),l||(l=f.host),f.search&&(l+=f.search)}catch{l=n.request.url}let o=n.response.content.mimeType;const u=o.match(/^(.*);\s*charset=.*$/);return u&&(o=u[1]),{name:{name:l,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:o,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:s,resource:n,contextId:i.contextId(n),frameref:n._frameref}};function J_(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function W_(n,e){const i=eT(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function eT(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,l=i.method;return s.localeCompare(l)};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 tT={All:()=>!0,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 nT({searchValue:n,resourceType:e}){return i=>{const s=tT[e];return s(i.contentType)&&i.name.url.toLowerCase().includes(n.toLowerCase())}}function Bh(n,e,i={}){var b;const s=new n.LineCounter,l={keepSourceTokens:!0,lineCounter:s,...i},o=n.parseDocument(e,l),u=[],f=w=>[s.linePos(w[0]),s.linePos(w[1])],d=w=>{u.push({message:w.message,range:[s.linePos(w.pos[0]),s.linePos(w.pos[1])]})},p=(w,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const C=Yo.parse(x,l,u);C&&(w.children=w.children||[],w.children.push(C));continue}if(x instanceof n.YAMLMap){m(w,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},m=(w,E)=>{for(const x of E.items){if(w.children=w.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 M=x.key,C=x.value;if(M.value==="text"){if(!(C instanceof n.Scalar&&typeof C.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||E.range)});continue}w.children.push({kind:"text",text:Yf(C.value)});continue}if(M.value==="/children"){if(!(C instanceof n.Scalar&&typeof C.value=="string")||C.value!=="contain"&&C.value!=="equal"&&C.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||E.range)});continue}w.containerMode=C.value;continue}if(M.value.startsWith("/")){if(!(C instanceof n.Scalar&&typeof C.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||E.range)});continue}w.props=w.props??{},w.props[M.value.slice(1)]=Yf(C.value);continue}const V=Yo.parse(M,l,u);if(!V)continue;if(C instanceof n.Scalar){const Y=typeof C.value;if(Y!=="string"&&Y!=="number"&&Y!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}w.children.push({...V,children:[{kind:"text",text:Yf(String(C.value))}]});continue}if(C instanceof n.YAMLSeq){w.children.push(V),p(V,C);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:iT}:((b=y.children)==null?void 0:b.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const iT={kind:"role",role:"fragment"};function ab(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Yf(n){return{raw:n,normalized:ab(n)}}class Yo{static parse(e,i,s){try{return new Yo(e.value)._parse()}catch(l){if(l instanceof zy){const o=i.prettyErrors===!1?l.message:l.message+`:
|
|
108
|
+
|
|
109
|
+
`+e.value+`
|
|
110
|
+
`+" ".repeat(l.pos)+`^
|
|
111
|
+
`;return s.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+l.pos)]}),null}throw l}}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 zy(e,i||this._pos)}_readRegex(){let e="",i=!1,s=!1;for(;!this._eof();){const l=this._next();if(i)e+=l,i=!1;else if(l==="\\")i=!0,e+=l;else{if(l==="/"&&!s)return{pattern:e};l==="["?(s=!0,e+=l):l==="]"&&s?(e+=l,s=!1):e+=l}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),ab(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 l="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)l+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,l||"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,l){if(i==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',l),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',l),e.disabled=s==="true";return}if(i==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',l),e.expanded=s==="true";return}if(i==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',l),e.active=s==="true";return}if(i==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',l),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"',l),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',l),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,l)}_assert(e,i,s){e||this._throwError(i||"Assertion error",s)}}class zy extends Error{constructor(e,i){super(e),this.pos=i}}let lb={};function sT(n){lb=n}function Va(n,e){for(;e;){if(n.contains(e))return!0;e=cb(e)}return!1}function bt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function ob(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function cb(n){for(;n.parentElement;)n=n.parentElement;return bt(n)}function ka(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=cb(n)}}function wi(n,e){const i=e==="::before"?Hh:e==="::after"?zh:Uh;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 ub(n,e){if(e=e??wi(n),!e)return!0;if(Element.prototype.checkVisibility&&lb.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 Xo(n){const e=wi(n);if(!e)return{visible:!0,inline:!1};if(e.display==="contents"){for(let s=n.firstChild;s;s=s.nextSibling){if(s.nodeType===1&&yi(s))return{visible:!0,inline:!1,style:e};if(s.nodeType===3&&fb(s))return{visible:!0,inline:!0,style:e}}return{visible:!1,inline:!1,style:e}}if(!ub(n,e))return{style:e,visible:!1,inline:!1};const i=n.getBoundingClientRect();return{rect:i,style:e,visible:i.width>0&&i.height>0,inline:e.display==="inline"}}function yi(n){return Xo(n).visible}function fb(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function at(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let Uh,Hh,zh,hb=0;function qh(){++hb,Uh??(Uh=new Map),Hh??(Hh=new Map),zh??(zh=new Map)}function $h(){--hb||(Uh=void 0,Hh=void 0,zh=void 0)}function qy(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const $y="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]",rT=[["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 db(n,e){return rT.some(([i,s])=>!(s!=null&&s.includes(e||""))&&n.hasAttribute(i))}function pb(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function aT(n){return!Ab(n)&&(lT(n)||pb(n))}function lT(n){const e=at(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const Xf={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=>ka(n,$y)?null:"contentinfo",FORM:n=>qy(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>ka(n,$y)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!db(n)&&!pb(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=hr(n,n.getAttribute("list"))[0];return i&&at(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":_T[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=>qy(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=ka(n,"table"),i=e?Po(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=ka(n,"table"),i=e?Po(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},oT={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 Iy(n){var s;const e=((s=Xf[at(n)])==null?void 0:s.call(Xf,n))||"";if(!e)return null;let i=n;for(;i;){const l=bt(i),o=oT[at(i)];if(!o||!l||!o.includes(at(l)))break;const u=Po(l);if((u==="none"||u==="presentation")&&!gb(l,u))return u;i=l}return e}const cT=["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 Po(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>cT.includes(i))||null}function gb(n,e){return db(n,e)||aT(n)}function pt(n){const e=Po(n);if(!e)return Iy(n);if(e==="none"||e==="presentation"){const i=Iy(n);if(gb(n,i))return i}return e}function mb(n){return n===null?void 0:n.toLowerCase()==="true"}function yb(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(at(n))}function rn(n){if(yb(n))return!0;const e=wi(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let l=n.firstChild;l;l=l.nextSibling)if(l.nodeType===1&&!rn(l)||l.nodeType===3&&fb(l))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!ub(n,e)?!0:bb(n)}function bb(n){let e=mi==null?void 0:mi.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=wi(n);e=!i||i.display==="none"||mb(n.getAttribute("aria-hidden"))===!0}if(!e){const i=bt(n);i&&(e=bb(i))}mi==null||mi.set(n,e)}return e}function hr(n,e){if(!e)return[];const i=ob(n);if(!i)return[];try{const s=e.split(" ").filter(o=>!!o),l=[];for(const o of s){const u=i.querySelector("#"+CSS.escape(o));u&&!l.includes(u)&&l.push(u)}return l}catch{return[]}}function $n(n){return n.trim()}function Da(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
|
|
112
|
+
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function Vy(n,e){const i=[...n.querySelectorAll(e)];for(const s of hr(n,n.getAttribute("aria-owns")))s.matches(e)&&i.push(s),i.push(...s.querySelectorAll(e));return i}function Ba(n,e){const i=e==="::before"?Wh:e==="::after"?ed:Jh;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const s=wi(n,e);let l;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(l=uT(n,o,!!e))}return e&&l!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(l=" "+l+" "),i&&i.set(n,l),l}function uT(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let s=N0(e).filter(f=>!(f instanceof Io));const l=s.findIndex(f=>f instanceof ht&&f.value==="/");if(l!==-1)s=s.slice(l+1);else if(!i)return;const o=[];let u=0;for(;u<s.length;)if(s[u]instanceof Lh)o.push(s[u].value),u++;else if(u+2<s.length&&s[u]instanceof ja&&s[u].value==="attr"&&s[u+1]instanceof Oh&&s[u+2]instanceof Mh){const f=s[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function vb(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=hr(n,e);return i.length?i:null}function fT(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 Ga(n,e){const i=e?Fh:Ph;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(pt(n)||"")||(s=Da(pn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,s)),s}function Gy(n,e){const i=e?Zh:Qh;let s=i==null?void 0:i.get(n);if(s===void 0){if(s="",n.hasAttribute("aria-describedby")){const l=hr(n,n.getAttribute("aria-describedby"));s=Da(l.map(o=>pn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:rn(o)}})).join(" "))}else n.hasAttribute("aria-description")?s=Da(n.getAttribute("aria-description")||""):s=Da(n.getAttribute("title")||"");i==null||i.set(n,s)}return s}function hT(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function dT(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function pT(n){const e=Js;let i=Js==null?void 0:Js.get(n);if(i===void 0){i="";const s=hT(n)!=="false",l=dT(n);if(s||l){const o=n.getAttribute("aria-errormessage");i=hr(n,o).map(d=>Da(pn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:rn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function pn(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(yb(n)||!b&&rn(n))return e.visitedElements.add(n),""}const s=vb(n);if(!e.embeddedInLabelledBy){const b=(s||[]).map(w=>pn(w,{...e,embeddedInLabelledBy:{element:w,hidden:rn(w)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(b)return b}const l=pt(n)||"",o=at(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const b=[...n.labels||[]].includes(n),w=(s||[]).includes(n);if(!b&&!w){if(l==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(l)){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=l==="combobox"?Vy(n,"*").find(T=>pt(T)==="listbox"):n;E=x?Vy(x,'[aria-selected="true"]').filter(T=>pt(T)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>pn(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(l))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(l))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if($n(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(l)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const b=n.value||"";return $n(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?wa(b,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const b=n.labels||[];if(b.length&&!e.embeddedInLabelledBy)return wa(b,e);const w=n.getAttribute("alt")||"";if($n(w))return w;const E=n.getAttribute("title")||"";return $n(E)?E:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(n);const b=n.labels||[];if(b.length)return wa(b,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(n);const b=n.labels||[];return b.length?wa(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 wa(b,e);const w=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",E=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!w||x?x:E}if(!s&&o==="FIELDSET"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(at(w)==="LEGEND")return pn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:rn(w)}});return n.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(at(w)==="FIGCAPTION")return pn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:rn(w)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return $n(b)?b:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(at(w)==="CAPTION")return pn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:rn(w)}});const b=n.getAttribute("summary")||"";if(b)return b}if(o==="AREA"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return $n(b)?b:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let b=n.firstElementChild;b;b=b.nextElementSibling)if(at(b)==="TITLE"&&b.ownerSVGElement)return pn(b,{...i,embeddedInLabelledBy:{element:b,hidden:rn(b)}})}if(n.ownerSVGElement&&o==="A"){const b=n.getAttribute("xlink:title")||"";if($n(b))return e.visitedElements.add(n),b}}const f=o==="SUMMARY"&&!["presentation","none"].includes(l);if(fT(l,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const b=gT(n,i);if(e.embeddedInTargetElement==="self"?$n(b):b)return b}if(!["presentation","none"].includes(l)||o==="IFRAME"){e.visitedElements.add(n);const b=n.getAttribute("title")||"";if($n(b))return b}return e.visitedElements.add(n),""}function gT(n,e){const i=[],s=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=wi(o))==null?void 0:f.display)||"inline";let p=pn(o,e);(d!=="inline"||o.nodeName==="BR")&&(p=" "+p+" "),i.push(p)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Ba(n,"::before")||"");const l=Ba(n);if(l!==void 0)i.push(l);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 hr(n,n.getAttribute("aria-owns")))s(u,!0)}}return i.push(Ba(n,"::after")||""),i.join("")}const Ih=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Sb(n){return at(n)==="OPTION"?n.selected:Ih.includes(pt(n)||"")?mb(n.getAttribute("aria-selected"))===!0:!1}const Vh=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function wb(n){const e=Gh(n,!0);return e==="error"?!1:e}function mT(n){return Gh(n,!0)}function yT(n){return Gh(n,!1)}function Gh(n,e){const i=at(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(Vh.includes(pt(n)||"")){const s=n.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const bT=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function vT(n){const e=at(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):bT.includes(pt(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const Kh=["button"];function xb(n){if(Kh.includes(pt(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Yh=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function _b(n){if(at(n)==="DETAILS")return n.open;if(Yh.includes(pt(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Xh=["heading","listitem","row","treeitem"];function Tb(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[at(n)];if(e)return e;if(Xh.includes(pt(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 Eb=["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 Fo(n){return Ab(n)||Nb(n)}function Ab(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(at(n))&&(n.hasAttribute("disabled")||ST(n)||wT(n))}function ST(n){return at(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function wT(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 Nb(n,e=!1){if(!n)return!1;if(e||Eb.includes(pt(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:Nb(bt(n),!0)}return!1}function wa(n,e){return[...n].map(i=>pn(i,{...e,embeddedInLabel:{element:i,hidden:rn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function xT(n){const e=td;let i=n,s;const l=[];for(;i;i=bt(i)){const o=e.get(i);if(o!==void 0){s=o;break}l.push(i);const u=wi(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 l)e.set(o,s);return s}let Ph,Fh,Qh,Zh,Js,mi,Jh,Wh,ed,td,Cb=0;function rc(){qh(),++Cb,Ph??(Ph=new Map),Fh??(Fh=new Map),Qh??(Qh=new Map),Zh??(Zh=new Map),Js??(Js=new Map),mi??(mi=new Map),Jh??(Jh=new Map),Wh??(Wh=new Map),ed??(ed=new Map),td??(td=new Map)}function ac(){--Cb||(Ph=void 0,Fh=void 0,Qh=void 0,Zh=void 0,Js=void 0,mi=void 0,Jh=void 0,Wh=void 0,ed=void 0,td=void 0),$h()}const _T={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function TT(n){return kb(n)?"'"+n.replace(/'/g,"''")+"'":n}function Pf(n){return kb(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
|
|
113
|
+
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function kb(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()))}let ET=0;function Mb(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 Ua(n,e){const i=Mb(e),s=new Set,l={root:{role:"fragment",name:"",children:[],element:n,props:{},box:Xo(n),receivesPointerEvents:!0},elements:new Map,refs:new Map},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=!rn(m);let b=y;if(i.visibility==="ariaOrVisible"&&(b=y||yi(m)),i.visibility==="ariaAndVisible"&&(b=y&&yi(m)),i.visibility==="aria"&&!b)return;const w=[];if(m.hasAttribute("aria-owns")){const x=m.getAttribute("aria-owns").split(/\s+/);for(const T of x){const M=n.ownerDocument.getElementById(T);M&&w.push(M)}}const E=b?AT(m,i):null;E&&(E.ref&&(l.elements.set(E.ref,m),l.refs.set(m,E.ref)),f.children.push(E)),u(E||f,m,w,b)};function u(f,d,p,m){var E;const b=(((E=wi(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";b&&f.children.push(b),f.children.push(Ba(d,"::before")||"");const w=d.nodeName==="SLOT"?d.assignedNodes():[];if(w.length)for(const x of w)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(Ba(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}}rc();try{o(l.root,n,!0)}finally{ac()}return CT(l.root),NT(l.root),l}function Ky(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"+ ++ET},n.element._ariaRef=i),n.ref=i.ref}function AT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},element:n,box:Xo(n),receivesPointerEvents:!0,active:i};return Ky(p,e),p}const s=e.includeGenericRole?"generic":null,l=pt(n)??s;if(!l||l==="presentation"||l==="none")return null;const o=Et(Ga(n,!1)||""),u=xT(n),f=Xo(n);if(l==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:l,name:o,children:[],props:{},element:n,box:f,receivesPointerEvents:u,active:i};return Ky(d,e),Vh.includes(l)&&(d.checked=wb(n)),Eb.includes(l)&&(d.disabled=Fo(n)),Yh.includes(l)&&(d.expanded=_b(n)),Xh.includes(l)&&(d.level=Tb(n)),Kh.includes(l)&&(d.pressed=xb(n)),Ih.includes(l)&&(d.selected=Sb(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function NT(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"&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(i.children=s,[i])};e(n)}function CT(n){const e=(s,l)=>{if(!s.length)return;const o=Et(s.join(""));o&&l.push(o),s.length=0},i=s=>{const l=[],o=[];for(const u of s.children||[])typeof u=="string"?o.push(u):(e(o,l),i(u),l.push(u));e(o,l),s.children=l.length?l:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};i(n)}function kT(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function Yy(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=MT(e);return i?!!n.match(i):!1}const Ff=Symbol("cachedRegex");function MT(n){if(n[Ff]!==void 0)return n[Ff];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[Ff]=s,s}function OT(n,e){const i=Ua(n,{mode:"expect"});return{matches:Ob(i.root,e,!1,!1),received:{raw:Qo(i,{mode:"expect"}),regex:Qo(i,{mode:"codegen"})}}}function LT(n,e){const i=Ua(n,{mode:"expect"}).root;return Ob(i,e,!0,!1).map(l=>l.element)}function nd(n,e,i){var s;return typeof n=="string"&&e.kind==="text"?Yy(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||!kT(n.name,e.name)||!Yy(n.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?Py(n.children||[],e.children||[]):e.containerMode==="equal"?Xy(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?Xy(n.children||[],e.children||[],!0):Py(n.children||[],e.children||[])}function Xy(n,e,i){if(e.length!==n.length)return!1;for(let s=0;s<e.length;++s)if(!nd(n[s],e[s],i))return!1;return!0}function Py(n,e){if(e.length>n.length)return!1;const i=n.slice(),s=e.slice();for(const l of s){let o=i.shift();for(;o&&!nd(o,l,!1);)o=i.shift();if(!o)return!1}return!0}function Ob(n,e,i,s){const l=[],o=(u,f)=>{if(nd(u,e,s)){const d=typeof u=="string"?f:u;return d&&l.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),l}function Qo(n,e){const i=Mb(e),s=[],l=i.renderStringsAsRegex?jT:()=>!0,o=i.renderStringsAsRegex?RT:d=>d,u=(d,p,m,y)=>{if(typeof d=="string"){if(p&&!l(p,d))return;const T=Pf(o(d));T&&s.push(m+"- text: "+T);return}let b=d.role;if(d.name&&d.name.length<=900){const T=o(d.name);if(T){const M=T.startsWith("/")&&T.endsWith("/")?T:JSON.stringify(T);b+=" "+M}}d.checked==="mixed"&&(b+=" [checked=mixed]"),d.checked===!0&&(b+=" [checked]"),d.disabled&&(b+=" [disabled]"),d.expanded&&(b+=" [expanded]"),d.active&&i.renderActive&&(b+=" [active]"),d.level&&(b+=` [level=${d.level}]`),d.pressed==="mixed"&&(b+=" [pressed=mixed]"),d.pressed===!0&&(b+=" [pressed]"),d.selected===!0&&(b+=" [selected]");let w=!1;d.ref&&(b+=` [ref=${d.ref}]`,y&&DT(d)&&(w=!0,b+=" [cursor=pointer]"));const E=m+"- "+TT(b),x=!!Object.keys(d.props).length;if(!d.children.length&&!x)s.push(E);else if(d.children.length===1&&typeof d.children[0]=="string"&&!x){const T=l(d,d.children[0])?o(d.children[0]):null;T?s.push(E+": "+Pf(T)):s.push(E)}else{s.push(E+":");for(const[T,M]of Object.entries(d.props))s.push(m+" - /"+T+": "+Pf(M));for(const T of d.children||[])u(T,d,m+" ",y&&!w)}},f=n.root;if(f.role==="fragment")for(const d of f.children||[])u(d,f,"",!!i.renderCursorPointer);else u(f,null,"",!!i.renderCursorPointer);return s.join(`
|
|
114
|
+
`)}function RT(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 l=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(l,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=Go(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+=Go(n.slice(s)),String(new RegExp(i))):n}function jT(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?Sx(e,n.name):"";let s=e;for(;i&&s.includes(i);)s=s.replace(i,"");return s.trim().length/e.length>.1}function DT(n){var e;return((e=n.box.style)==null?void 0:e.cursor)==="pointer"}const Fy=":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 Qf{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(Fy),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=Fy,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=Ji(this._language,Vn(e)),l=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:l,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 l;if(i.tooltipText){l=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(l),l.style.top="0",l.style.left="0",l.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,l.appendChild(o)}this._renderedEntries.push({targetElement:i.element,color:i.color,tooltipElement:l,highlightElement:s})}for(const i of this._renderedEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:s,anchorTop:l}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=l,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,l=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+l>u-5&&(Math.max(0,e.top)>l+5?d=Math.max(0,e.top)-l-5:d=u-5-l),{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 l=e[i].element.getBoundingClientRect();if(l.top!==s.top||l.right!==s.right||l.bottom!==s.bottom||l.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 BT(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 UT(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 HT(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 qT(n,e,i){const s=i===void 0?50:i;let l=0;return n.left-e.right>=0&&(l+=n.left-e.right),e.left-n.right>=0&&(l+=e.left-n.right),e.top-n.bottom>=0&&(l+=e.top-n.bottom),n.top-e.bottom>=0&&(l+=n.top-e.bottom),l>s?void 0:l}const $T=["left-of","right-of","above","below","near"];function Lb(n,e,i,s){const l=e.getBoundingClientRect(),o={"left-of":UT,"right-of":BT,above:HT,below:zT,near:qT}[n];let u;for(const f of i){if(f===e)continue;const d=o(l,f.getBoundingClientRect(),s);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function Rb(n,e){for(const i of e.jsonPath)n!=null&&(n=n[i]);return jb(n,e)}function jb(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 id(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Dt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!id(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:Et(e.value),immediate:[e.value]};else{for(let l=e.firstChild;l;l=l.nextSibling)if(l.nodeType===Node.TEXT_NODE)i.full+=l.nodeValue||"",s+=l.nodeValue||"";else{if(l.nodeType===Node.COMMENT_NODE)continue;s&&i.immediate.push(s),s="",l.nodeType===Node.ELEMENT_NODE&&(i.full+=Dt(n,l).full)}s&&i.immediate.push(s),e.shadowRoot&&(i.full+=Dt(n,e.shadowRoot).full),i.full&&(i.normalized=Et(i.full))}}n.set(e,i)}return i}function lc(n,e,i){if(id(e)||!i(Dt(n,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&i(Dt(n,s)))return"selfAndChildren";return e.shadowRoot&&i(Dt(n,e.shadowRoot))?"selfAndChildren":"self"}function Db(n,e){const i=vb(e);if(i)return i.map(o=>Dt(n,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:Et(s),immediate:[s]}];const l=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||l){const o=e.labels;if(o)return[...o].map(u=>Dt(n,u))}return[]}function Qy(n){return n.displayName||n.name||"Anonymous"}function IT(n){if(n.type)switch(typeof n.type){case"function":return Qy(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?Qy(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 VT(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function GT(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 l;const s=(l=i._currentElement)==null?void 0:l.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 KT(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 Bb(n){var s;const e={key:VT(n),name:IT(n),children:GT(n).map(Bb),rootElements:[],props:KT(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 l of e.children)e.rootElements.push(...l.rootElements);return e}function Ub(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)Ub(s,e,i);return i}function Hb(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const l=s.currentNode,o=l,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(l instanceof Element&&l.hasAttribute("data-reactroot"))for(const d of Object.keys(l))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(l[d]);const f=l instanceof Element?l.shadowRoot:null;f&&Hb(f,e)}while(s.nextNode());return e}const YT=()=>({queryAll(n,e){const{name:i,attributes:s}=Zi(e,!1),u=Hb(n.ownerDocument||n).map(d=>Bb(d)).map(d=>Ub(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),i&&p.name!==i||p.rootElements.some(y=>!Va(n,y)))return!1;for(const y of s)if(!Rb(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]}}),zb=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];zb.sort();function xa(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 Ks(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 Ys(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function XT(n,e){const i={role:e};for(const s of n)switch(s.name){case"checked":{xa(s.name,Vh,e),Ks(s,[!0,!1,"mixed"]),Ys(s,["<truthy>","="]),i.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{xa(s.name,Kh,e),Ks(s,[!0,!1,"mixed"]),Ys(s,["<truthy>","="]),i.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{xa(s.name,Ih,e),Ks(s,[!0,!1]),Ys(s,["<truthy>","="]),i.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{xa(s.name,Yh,e),Ks(s,[!0,!1]),Ys(s,["<truthy>","="]),i.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(xa(s.name,Xh,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":{Ks(s,[!0,!1]),Ys(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":{Ks(s,[!0,!1]),Ys(s,["<truthy>","="]),i.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${zb.map(l=>`"${l}"`).join(", ")}.`)}return i}function PT(n,e,i){const s=[],l=u=>{if(pt(u)===e.role&&!(e.selected!==void 0&&Sb(u)!==e.selected)&&!(e.checked!==void 0&&wb(u)!==e.checked)&&!(e.pressed!==void 0&&xb(u)!==e.pressed)&&!(e.expanded!==void 0&&_b(u)!==e.expanded)&&!(e.level!==void 0&&Tb(u)!==e.level)&&!(e.disabled!==void 0&&Fo(u)!==e.disabled)&&!(!e.includeHidden&&rn(u))){if(e.name!==void 0){const f=Et(Ga(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Et(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!jb(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("*"))l(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),s}function Zy(n){return{queryAll:(e,i)=>{const s=Zi(i,!0),l=s.name.toLowerCase();if(!l)throw new Error("Role must not be empty");const o=XT(s.attributes,l);rc();try{return PT(e,o,n)}finally{ac()}}}}class FT{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",JT),this._engines.set("is",Ma),this._engines.set("where",Ma),this._engines.set("has",QT),this._engines.set("scope",ZT),this._engines.set("light",WT),this._engines.set("visible",eE),this._engines.set("text",tE),this._engines.set("text-is",nE),this._engines.set("text-matches",iE),this._engines.set("has-text",sE),this._engines.set("right-of",_a("right-of")),this._engines.set("left-of",_a("left-of")),this._engines.set("above",_a("above")),this._engines.set("below",_a("below")),this._engines.set("near",_a("near")),this._engines.set("nth-match",rE);const e=[...this._engines.keys()];e.sort();const i=[...K0];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,l){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=l();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 l=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[l,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(l)?this._matchesEngine(Ma,e,l,s):(this._hasScopeClause(l)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,l.simples[l.simples.length-1].selector,s)?this._matchesParents(e,l,l.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(Ma,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const l=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=l,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=bt(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 l of i.functions)if(!this._matchesEngine(this._getEngine(l.name),e,l.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 l=i.functions;s==="*"&&l.length&&(s=void 0);let o,u=-1;s!==void 0?o=this._queryCSS(e,s):(u=l.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(l[u].name),e,l[u].args));for(let f=0;f<l.length;f++){if(f===u)continue;const d=this._getEngine(l[f].name);d.matches!==void 0&&(o=o.filter(p=>this._matchesEngine(d,p,l[f].args,e)))}for(let f=0;f<l.length;f++){if(f===u)continue;const d=this._getEngine(l[f].name);d.matches===void 0&&(o=o.filter(p=>this._matchesEngine(d,p,l[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,s,l){return s<0?!0:this._cached(this._cacheMatchesParents,e,[i,s,l.scope,l.pierceShadow,l.originalScope],()=>{const{selector:o,combinator:u}=i.simples[s];if(u===">"){const f=yo(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,s-1,l)}if(u==="+"){const f=Zf(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,s-1,l)}if(u===""){let f=yo(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="")break}f=yo(f,l)}return!1}if(u==="~"){let f=Zf(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="~")break}f=Zf(f,l)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="")break}f=yo(f,l)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,s,l){if(e.matches)return this._callMatches(e,i,s,l);if(e.query)return this._callQuery(e,s,l).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(l=>this._callMatches(e,l,s,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,s,l){return this._cached(this._cacheCallMatches,i,[e,l.scope,l.pierceShadow,l.originalScope,...s],()=>e.matches(i,s,l,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 l(o){if(s=s.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&l(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&l(u.shadowRoot)}}return l(e.scope),s})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const Ma={matches(n,e,i,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(l=>s.matches(n,l,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const l of e)s=s.concat(i.query(n,l));return e.length===1?s:qb(s)}},QT={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}},ZT={matches(n,e,i,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const l=i.originalScope||i.scope;return l.nodeType===9?n===l.documentElement:n===l},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 l=s.documentElement;return l?[l]:[]}return s.nodeType===1?[s]:[]}},JT={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)}},WT={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,s){return s.matches(n,e,{...i,pierceShadow:!1})}},eE={matches(n,e,i,s){if(e.length)throw new Error('"visible" engine expects no arguments');return yi(n)}},tE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const l=Et(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(l);return lc(s._cacheText,n,o)==="self"}},nE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const l=Et(e[0]),o=u=>!l&&!u.immediate.length?!0:u.immediate.some(f=>Et(f)===l);return lc(s._cacheText,n,o)!=="none"}},iE={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 l=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>l.test(u.full);return lc(s._cacheText,n,o)==="self"}},sE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(id(n))return!1;const l=Et(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(l))(Dt(s._cacheText,n))}};function _a(n){return{matches(e,i,s,l){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=l.query(s,u),d=Lb(n,e,f,o);return d===void 0?!1:(l._markScore(e,d),!0)}}}const rE={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 l=Ma.query(n,e.slice(0,e.length-1),i);return s--,s<l.length?[l[s]]:[]}};function yo(n,e){if(n!==e.scope)return e.pierceShadow?bt(n):n.parentElement||void 0}function Zf(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function qb(n){const e=new Map,i=[],s=[];function l(u){let f=e.get(u);if(f)return f;const d=bt(u);return d?l(d).children.push(u):i.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)l(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 $b=10,dr=$b/2,Jy=1,aE=2,lE=10,oE=50,Ib=100,Vb=120,Gb=140,Kb=160,Ro=180,Yb=200,Wy=250,cE=Vb+dr,uE=Gb+dr,fE=Ib+dr,hE=Kb+dr,dE=Ro+dr,pE=Yb+dr,gE=300,mE=500,Xb=510,Jf=520,Pb=530,gh=1e4,yE=1e7,bE=1e3;function e0(n,e,i){n._evaluator.begin();const s={allowText:new Map,disallowText:new Map};rc(),qh();try{let l=[];if(i.forTextExpect){let f=Oa(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=bt(d)){const p=Vi(s,n,d,{...i,noText:!0});if(!p)continue;if(Gi(p)<=bE){f=p;break}}l=[jo(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=ka(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&yi(f)&&(e=f)}if(i.multiple){const f=Vi(s,n,e,i),d=Vi(s,n,e,{...i,noText:!0});let p=[f,d];if(s.allowText.clear(),s.disallowText.clear(),f&&Wf(f)&&p.push(Vi(s,n,e,{...i,noCSSId:!0})),d&&Wf(d)&&p.push(Vi(s,n,e,{...i,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=Oa(n,e,i);p.push(m),Wf(m)&&p.push(Oa(n,e,{...i,noCSSId:!0}))}l=[...new Set(p.map(m=>jo(m)))]}else{const f=Vi(s,n,e,i)||Oa(n,e,i);l=[jo(f)]}}const o=l[0],u=n.parseSelector(o);return{selector:o,selectors:l,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{$h(),ac(),n._evaluator.end()}}function Vi(n,e,i,s){if(s.root&&!Va(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 l=null;const o=f=>{(!l||Gi(f)<Gi(l))&&(l=f)},u=[];if(!s.noText)for(const f of SE(e,i,!s.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of vE(e,i,s))s.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>Gi(f.candidate)-Gi(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const p=e.querySelectorAll(e.parseSelector(jo(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:gh}]),!s.isRecursive))for(let y=bt(i);y&&y!==s.root;y=bt(y)){const b=p.filter(V=>Va(y,V)&&V!==y),w=b.indexOf(i);if(b.length>5||w===-1||w===m&&b.length>1)continue;const E=b.length===1?f:[...f,{engine:"nth",selector:String(w),score:gh}];if(l&&Gi([{engine:"",selector:"",score:1},...E])>=Gi(l))continue;const T=!!s.noText||d,M=T?n.disallowText:n.allowText;let C=M.get(y);C===void 0&&(C=Vi(n,e,y,{...s,isRecursive:!0,noText:T})||Oa(e,y,s),M.set(y,C)),C&&o([...C,...E])}}return l}function vE(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}=${Qs(e.getAttribute(u))}]`,score:aE});if(!i.noCSSId){const u=e.getAttribute("id");u&&!wE(u)&&s.push({engine:"css",selector:Fb(u),score:mE})}s.push({engine:"css",selector:In(e),score:Pb})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&s.push({engine:"css",selector:`${In(e)}[${u}=${Qs(e.getAttribute(u))}]`,score:lE});return e.getAttribute(i.testIdAttributeName)&&s.push({engine:"css",selector:`[${i.testIdAttributeName}=${Qs(e.getAttribute(i.testIdAttributeName))}]`,score:Jy}),mh([s]),s}if(e.getAttribute(i.testIdAttributeName)&&s.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${_t(e.getAttribute(i.testIdAttributeName),!0)}]`,score:Jy}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${_t(u.placeholder,!0)}]`,score:cE});for(const f of Ws(u.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${_t(f.text,!1)}]`,score:Vb-f.scoreBonus})}}const l=Db(n._evaluator._cacheText,e);for(const u of l){const f=u.normalized;s.push({engine:"internal:label",selector:Rt(f,!0),score:uE});for(const d of Ws(f))s.push({engine:"internal:label",selector:Rt(d.text,!1),score:Gb-d.scoreBonus})}const o=pt(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:Xb}),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:`${In(e)}[name=${Qs(e.getAttribute("name"))}]`,score:Jf}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${In(e)}[type=${Qs(e.getAttribute("type"))}]`,score:Jf}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:In(e),score:Jf+1}),mh([s]),s}function SE(n,e,i){if(e.nodeName==="SELECT")return[];const s=[],l=e.getAttribute("title");if(l){s.push([{engine:"internal:attr",selector:`[title=${_t(l,!0)}]`,score:pE}]);for(const p of Ws(l))s.push([{engine:"internal:attr",selector:`[title=${_t(p.text,!1)}]`,score:Yb-p.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${_t(o,!0)}]`,score:hE}]);for(const p of Ws(o))s.push([{engine:"internal:attr",selector:`[alt=${_t(p.text,!1)}]`,score:Kb-p.scoreBonus}])}const u=Dt(n._evaluator._cacheText,e).normalized,f=u?Ws(u):[];if(u){if(i){u.length<=80&&s.push([{engine:"internal:text",selector:Rt(u,!0),score:dE}]);for(const m of f)s.push([{engine:"internal:text",selector:Rt(m.text,!1),score:Ro-m.scoreBonus}])}const p={engine:"css",selector:In(e),score:Pb};for(const m of f)s.push([p,{engine:"internal:has-text",selector:Rt(m.text,!1),score:Ro-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+Go(u)+"$");s.push([p,{engine:"internal:has-text",selector:Rt(m,!1),score:Wy}])}}const d=pt(e);if(d&&!["none","presentation"].includes(d)){const p=Ga(e,!1);if(p){const m={engine:"internal:role",selector:`${d}[name=${_t(p,!0)}]`,score:fE};s.push([m]);for(const y of Ws(p))s.push([{engine:"internal:role",selector:`${d}[name=${_t(y.text,!1)}]`,score:Ib-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:Xb};for(const y of f)s.push([m,{engine:"internal:has-text",selector:Rt(y.text,!1),score:Ro-y.scoreBonus}]);if(i&&u.length<=80){const y=new RegExp("^"+Go(u)+"$");s.push([m,{engine:"internal:has-text",selector:Rt(y,!1),score:Wy}])}}}return mh(s),s}function Fb(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${Qs(n)}]`}function Wf(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Oa(n,e,i){const s=i.root??e.ownerDocument,l=[];function o(f){const d=l.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:yE},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:gh};return[d,y]}for(let f=e;f&&f!==s;f=bt(f)){let d="";if(f.id&&!i.noCSSId){const y=Fb(f.id),b=o(y);if(b)return u(b);d=y}const p=f.parentNode,m=[...f.classList].map(xE);for(let y=0;y<m.length;++y){const b="."+m.slice(0,y+1).join("."),w=o(b);if(w)return u(w);!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?In(f):`${In(f)}:nth-child(${1+y.indexOf(f)})`,x=o(E);if(x)return u(x);d||(d=E)}else d||(d=In(f));l.unshift(d)}return u(o())}function mh(n){for(const e of n)for(const i of e)i.score>oE&&i.score<gE&&(i.score+=Math.min($b,i.selector.length/10|0))}function jo(n){const e=[];let i="";for(const{engine:s,selector:l}of n)e.length&&(i!=="css"||s!=="css"||l.startsWith(":nth-match("))&&e.push(">>"),i=s,s==="css"?e.push(l):e.push(`${s}=${l}`);return e.join(" ")}function Gi(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function wE(n){let e,i=0;for(let s=0;s<n.length;++s){const l=n[s];let o;if(!(l==="-"||l==="_")){if(l>="a"&&l<="z"?o="lower":l>="A"&&l<="Z"?o="upper":l>="0"&&l<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function bo(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function Ws(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),s=i?i[1].length:0;if(s){const l=bo(n.substring(s).trimStart(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),s=i?i[1].length:0;if(s){const l=bo(n.substring(0,n.length-s).trimEnd(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:bo(n,80),scoreBonus:0}),e.push({text:bo(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function In(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function xE(n){let e="";for(let i=0;i<n.length;i++)e+=_E(n,i);return e}function _E(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 Qb(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 TE(n,e){return e?e.toUpperCase():""}const EE=/(?:^|[-_/])(\w)/g,Zb=n=>n&&n.replace(EE,TE);function AE(n){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const b=m.__file;if(b)return Zb(Qb(b,".vue"))}function i(m,y){return m.type.__playwright_guessedName=y,y}function s(m){var b,w,E,x;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const T in(w=(b=m.parent)==null?void 0:b.type)==null?void 0:w.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 l(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 w;return!l(b)&&!((w=b.type.devtools)!=null&&w.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,w=m.children.length;b<w;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 NE(n){function e(o){const u=o.displayName||o.name||o._componentTag;if(u)return u;const f=o.__file;if(f)return Zb(Qb(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 l(o){return{name:i(o),children:s(o).map(l),rootElements:[o.$el],props:o._props}}return l(n)}function Jb(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)Jb(s,e,i);return i}function Wb(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),l=new Set;do{const o=s.currentNode;o.__vue__&&l.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&&Wb(u,e)}while(s.nextNode());for(const o of l)e.push({version:2,root:o});return e}const CE=()=>({queryAll(n,e){const i=n.ownerDocument||n,{name:s,attributes:l}=Zi(e,!1),f=Wb(i).map(p=>p.version===3?AE(p.root):NE(p.root)).map(p=>Jb(p,m=>{if(s&&m.name!==s||m.rootElements.some(y=>!Va(n,y)))return!1;for(const y of l)if(!Rb(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]}}),t0={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],s=n.ownerDocument||n;if(!s)return i;const l=s.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=l.iterateNext();o;o=l.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}};function sd(n,e,i){return`internal:attr=[${n}=${_t(e,(i==null?void 0:i.exact)||!1)}]`}function kE(n,e){return`internal:testid=[${n}=${_t(e,!0)}]`}function ME(n,e){return"internal:label="+Rt(n,!!(e!=null&&e.exact))}function OE(n,e){return sd("alt",n,e)}function LE(n,e){return sd("title",n,e)}function RE(n,e){return sd("placeholder",n,e)}function jE(n,e){return"internal:text="+Rt(n,!!(e!=null&&e.exact))}function DE(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",_t(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([s,l])=>`[${s}=${l}]`).join("")}`}const Ta=Symbol("selector"),BE=class La{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[Ta])),s!=null&&s.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(s.hasNot[Ta])),(s==null?void 0:s.visible)!==void 0&&(i+=` >> visible=${s.visible?"true":"false"}`),this[Ta]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const l=i,o=this;o.locator=(u,f)=>new La(e,l?l+" >> "+u:u,f),o.getByTestId=u=>o.locator(kE(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(OE(u,f)),o.getByLabel=(u,f)=>o.locator(ME(u,f)),o.getByPlaceholder=(u,f)=>o.locator(RE(u,f)),o.getByText=(u,f)=>o.locator(jE(u,f)),o.getByTitle=(u,f)=>o.locator(LE(u,f)),o.getByRole=(u,f={})=>o.locator(DE(u,f)),o.filter=u=>new La(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 La(e,l+" >> internal:and="+JSON.stringify(u[Ta])),o.or=u=>new La(e,l+" >> internal:or="+JSON.stringify(u[Ta]))}};let UE=BE;class HE{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 UE(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 Ji(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 qE(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function $E(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function IE(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function VE(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}const ev={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function GE(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 KE(n,e){const i=atob(n),s=new Uint8Array(i.length);for(let l=0;l<i.length;l++)s[l]=i.charCodeAt(l);return new e(s.buffer)}function yh(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 l of n.a)s.push(yh(l,e,i));return s}if("o"in n){const s={};i.set(n.id,s);for(const{k:l,v:o}of n.o)l!=="__proto__"&&(s[l]=yh(o,e,i));return s}if("h"in n)return e[n.h];if("ta"in n)return KE(n.ta.b,ev[n.ta.k])}return n}}function YE(n,e){return bh(n,e,{visited:new Map,lastId:0})}function bh(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 tv(n,e,i)}function tv(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(IE(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
|
|
115
|
+
${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(qE(n))return{d:n.toJSON()};if($E(n))return{u:n.toJSON()};if(zE(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(ev))if(VE(n,f))return{ta:{b:GE(n),k:u}};const l=i.visited.get(n);if(l)return{ref:l};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d<n.length;++d)u.push(bh(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:bh(m,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?tv(d.value,e,i):{o:u,id:f}}}class XE{constructor(e,i){var s,l,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:(l=e.clearTimeout)==null?void 0:l.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,l,...o){const u=o.slice(0,l),f=o.slice(l),d=[];for(let m=0;m<u.length;m++)d[m]=yh(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 YE(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 nv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Ji,cacheNormalizedWhitespaces:bx,elementText:Dt,getAriaRole:pt,getElementAccessibleDescription:Gy,getElementAccessibleName:Ga,isElementVisible:yi,isInsideScope:Va,normalizeWhiteSpace:Et,parseAriaSnapshot:Bh,generateAriaTree:Ua,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new XE(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new FT,this.consoleApi=new HE(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",t0),this._engines.set("xpath:light",t0),this._engines.set("_react",YT()),this._engines.set("_vue",CE()),this._engines.set("role",Zy(!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",Zy(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:l}of i.customEngines)this._engines.set(s,this.eval(l));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,sT({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=Fa(e);return mx(i,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return e0(this,e,i)}generateSelectorSimple(e,i){return e0(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,s){const l=this.querySelectorAll(e,i);if(s&&l.length>1)throw this.strictModeViolationError(e,l);return l[0]}_queryNth(e,i){const s=[...e];let l=+i.body;return l===-1&&(l=s.length-1),new Set(s.slice(l,l+1))}_queryLayoutSelector(e,i,s){const l=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,s);for(const d of e){const p=Lb(l,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){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");return this._lastAriaSnapshot=Ua(e,i),Qo(this._lastAriaSnapshot,i)}ariaSnapshotForRecorder(){const e=Ua(this.document.body,{mode:"ai"});return{ariaSnapshot:Qo(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return LT(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(l=>l.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 l={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:l},source:Vn(l)};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 l of e.parts)if(l.name==="nth")s=this._queryNth(s,l);else if(l.name==="internal:and"){const o=this.querySelectorAll(l.body.parsed,i);s=new Set(o.filter(u=>s.has(u)))}else if(l.name==="internal:or"){const o=this.querySelectorAll(l.body.parsed,i);s=new Set(qb(new Set([...s,...o])))}else if($T.includes(l.name))s=this._queryLayoutSelector(s,l,i);else{const o=new Set;for(const u of s){const f=this._queryEngineAll(l,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 l of s)if(!("nodeName"in l))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(l)}`);return s}_createAttributeEngine(e,i){const s=l=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(l)}]`,functions:[]},combinator:""}]}];return{queryAll:(l,o)=>this._evaluator.query({scope:l,pierceShadow:i},s(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(l,o)=>{const{matcher:u,kind:f}=So(o,i),d=[];let p=null;const m=b=>{if(f==="lax"&&p&&p.contains(b))return!1;const w=lc(this._evaluator._cacheText,b,u);w==="none"&&(p=b),(w==="self"||w==="selfAndChildren"&&f==="strict"&&!i)&&d.push(b)};l.nodeType===Node.ELEMENT_NODE&&m(l);const y=this._evaluator._queryCSS({scope:l,pierceShadow:e},"*");for(const b of y)m(b);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,l=Dt(this._evaluator._cacheText,s),{matcher:o}=So(i,!0);return o(l)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,l=Dt(this._evaluator._cacheText,s),{matcher:o}=So(i,!0);return o(l)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:s}=So(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>Db(this._evaluator._cacheText,o).some(u=>s(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,s)=>{const l=Zi(s,!0);if(l.name||l.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:u,caseSensitive:f}=l.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 l=s==="true";return yi(i)===l?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,s)=>this.querySelectorAll(s.parsed,i)}}extend(e,i){const s=this.window.eval(`
|
|
116
|
+
(() => {
|
|
117
|
+
const module = {};
|
|
118
|
+
${e}
|
|
119
|
+
return module.exports.default();
|
|
120
|
+
})()`);return new s(this,i)}async viewportRatio(e){return await new Promise(i=>{const s=new IntersectionObserver(l=>{i(l[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 l=e;l;l=bt(l))if(i.getComputedStyle(l).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 l=s.closest("label");l&&l.control&&(s=l.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 l=this.elementState(e,s);if(l.received==="error:notconnected")return"error:notconnected";if(!l.matches)return{missingState:s}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let s,l=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 w=y.getBoundingClientRect(),E={x:w.top,y:w.left,width:w.width,height:w.height};if(s){if(!(E.x===s.x&&E.y===s.y&&E.width===s.width&&E.height===s.height))return!1;if(++l>=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 l=(u=(o=this._lastAriaSnapshot)==null?void 0:o.elements)==null?void 0:u.get(s);return l&&l.isConnected?[l]:[]}}}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 l=yi(s);return{matches:i==="visible"?l:!l,received:l?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const l=Fo(s);return{matches:i==="disabled"?l:!l,received:l?"disabled":"enabled"}}if(i==="editable"){const l=Fo(s),o=vT(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:!l&&!o,received:l?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const l=i==="checked",o=yT(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=s.nodeName==="INPUT"&&s.type==="radio";return{matches:l===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const l=mT(s);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:l==="mixed",received:l===!0?"checked":l===!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 l=s,o=[...l.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),l.multiple)f=f.filter(y=>!m(y));else{f=[];break}}}return f.length?"error:optionsnotfound":(l.value=void 0,u.forEach(d=>d.selected=!0),l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.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 l=s,o=l.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(),l.focus(),l.value=i,l.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 l=i.ownerDocument.defaultView.getSelection();return l&&(l.removeAllRanges(),l.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:l}=this._activelyFocused(e);if(e.isContentEditable&&!l&&s&&s.blur&&s.blur(),e.focus(),e.focus(),i&&!l&&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 l=s;if((l.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);l.files=f.files,l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const s=[];let l=i;for(;l;){const m=ob(l);if(!m||(s.push(m),m.nodeType===9))break;l=m.host}let o;for(let m=s.length-1;m>=0;m--){const y=s[m],b=y.elementsFromPoint(e.x,e.y),w=y.elementFromPoint(e.x,e.y);if(w&&b[0]&&bt(w)===b[0]){const x=this.window.getComputedStyle(w);(x==null?void 0:x.display)==="contents"&&b.unshift(w)}b[0]&&b[0].shadowRoot===y&&b[1]===w&&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=bt(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=bt(p)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,s,l){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)),(l||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 l;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(i)){case"mouse":l=new MouseEvent(i,o);break;case"keyboard":l=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 w=y.pageY;return w===void 0&&y.clientY!==void 0&&(w=y.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,b,w,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),l=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})),l=new TouchEvent(i,o);break}case"pointer":l=new PointerEvent(i,o);break;case"focus":l=new FocusEvent(i,o);break;case"drag":l=new DragEvent(i,o);break;case"wheel":l=new WheelEvent(i,o);break;case"deviceorientation":try{l=new DeviceOrientationEvent(i,o)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:b,gamma:w,absolute:E}=o;l=this.document.createEvent("DeviceOrientationEvent"),l.initDeviceOrientationEvent(i,p,m,y,b,w,E)}break;case"devicemotion":try{l=new DeviceMotionEvent(i,o)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:b,rotationRate:w,interval:E}=o;l=this.document.createEvent("DeviceMotionEvent"),l.initDeviceMotionEvent(i,p,m,y,b,w,E)}break;default:l=new Event(i,o);break}e.dispatchEvent(l)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return vo(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return vo(`<${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 l=Ny(s.join(""),500);if(this._autoClosingTags.has(i.nodeName))return vo(`<${i.nodeName.toLowerCase()}${l}/>`);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 vo(`<${i.nodeName.toLowerCase()}${l}>${Ny(f,50)}</${i.nodeName.toLowerCase()}>`)}strictModeViolationError(e,i){this._evaluator.begin(),rc(),qh();try{const s=this._isUtilityWorld&&this._browserName==="firefox"?2:10,l=i.slice(0,s).map(u=>({preview:this.previewNode(u),selector:this.generateSelectorSimple(u)})),o=l.map((u,f)=>`
|
|
121
|
+
${f+1}) ${u.preview} aka ${Ji(this._sdkLanguage,u.selector)}`);return l.length<i.length&&o.push(`
|
|
122
|
+
...`),this.createStacklessError(`strict mode violation: ${Ji(this._sdkLanguage,Vn(e))} resolved to ${i.length} elements:${o.join("")}
|
|
123
|
+
`)}finally{$h(),ac(),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 Qf(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new Qf(this),this._highlight.install();const s=[];for(const l of e)s.push(this.querySelectorAll(l,this.document.documentElement));this._highlight.maskElements(s.flat(),i)}highlight(e){this._highlight||(this._highlight=new Qf(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,l=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of s)e.has(d)||d.dispatchEvent(l);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(l=>{if(l.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 l;return(l=this._hitTargetInterceptor)==null?void 0:l.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 Xs(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 Xs(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 l;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=(l=e.textContent)==null?void 0:l.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=vh(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 Xs(i.expectedText[f]).matches(u)).every(Boolean)}}if(s==="to.match.aria"){const o=OT(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 Xs(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:Dt(new Map,e).full;else if(s==="to.have.accessible.name")o=Ga(e,!1);else if(s==="to.have.accessible.description")o=Gy(e,!1);else if(s==="to.have.accessible.error.message")o=pT(e);else if(s==="to.have.role")o=pt(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 Xs(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 l=e.map(d=>i.useInnerText?d.innerText:Dt(new Map,d).full),o=s!=="to.contain.text.array";if(!(l.length===i.expectedText.length||!o))return{received:l,matches:!1};const f=this._matchSequentially(i.expectedText,l,(d,p)=>d.matches(p));return{received:l,matches:f}}_matchSequentially(e,i,s){const l=e.map(f=>new Xs(f));let o=0,u=0;for(;o<l.length&&u<i.length;)s(l[o],i[u])&&++o,++u;return o===l.length}}function vo(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function PE(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 So(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const l=n.lastIndexOf("/"),o=new RegExp(n.substring(1,l),n.substring(l+1));return{matcher:u=>o.test(u.full),kind:"regex"}}const i=e?JSON.parse.bind(JSON):PE;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=Et(n),s?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>Et(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:l=>l.normalized.toLowerCase().includes(n)})}class Xs{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(l=>i.contains(l))}return this.matches(i.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Et(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function vh(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(!vh(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(!vh(n[s],e[s]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const FE={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"}}]}]}]},an={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class n0{}class eh{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;He(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){He(e)}onPointerUp(e){He(e)}onMouseDown(e){He(e)}onMouseUp(e){He(e)}onMouseMove(e){var l;He(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?an.assert:an.single}}((l=this._hoveredModel)==null?void 0:l.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){He(e)}onMouseLeave(e){He(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){He(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){He(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 QE{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 iv(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 l of s.removedNodes)(l===this._hoveredElement||l.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"&&He(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=za(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:Ha(e),signals:[],button:Sh(e),modifiers:sr(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:Ha(e),signals:[],button:Sh(e),modifiers:sr(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()){He(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(l=>l.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=za(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:sr(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){He(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){He(i);const s=Ha(i),l=[{title:"Click",action:{name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:0}},{title:"Right click",action:{name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:0}},{title:"Double click",action:{name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2}},{title:"Hover",action:{name:"hover",selector:e.selector,position:s,signals:[]}}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const p of l){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(),this._performAction(p.action)}),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=eA(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:an.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 l of this._performingActions)if(i&&l.name==="press"&&e.key===l.key||s&&(l.name==="click"||l.name==="hover"||l.name==="check"||l.name==="uncheck"))return!0;return He(e),!1}_consumedDueToNoModel(e,i){return i?!1:(He(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(He(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||He(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?!!za(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:an.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class ZE{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=za(i),{ariaSnapshot:l,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:l});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:l,position:Ha(e),signals:[],button:Sh(e),modifiers:sr(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:l,ref:o,ariaSnapshot:s,position:Ha(e),signals:[],button:"right",modifiers:sr(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);if(qa(i)){this._recorder.recordAction({name:"fill",selector:l,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:l,ariaSnapshot:s,signals:[],text:i.isContentEditable?i.innerText:i.value});return}if(i.nodeName==="SELECT"){const u=i;this._recorder.recordAction({name:"select",selector:l,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:l,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=za(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:l,ref:o,ariaSnapshot:s,signals:[]});return}}this._recorder.recordAction({name:"press",selector:l,ref:o,ariaSnapshot:s,signals:[],key:e.key,modifiers:sr(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(),l=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:l}}}class th{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new iv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){He(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:an.assert}:null;else if(this._elementHasValue(i)){const l=this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:l.selector,elements:l.elements,color:an.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),He(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:an.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:an.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,l;(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"),(l=this._recorder.overlay)==null||l.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 JE{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(){sv(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}),He(e),!0}return!1}onMouseUp(e){return this._dragState?(He(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,He(e),!0):!1}onDblClick(e){return!1}}class WE{constructor(e,i){var s,l;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 n0,standby:new n0,inspecting:new eh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new ZE(this):new QE(this),"recording-inspecting":new eh(this,!1),assertingText:new th(this,"text"),assertingVisibility:new eh(this,!0),assertingValue:new th(this,"value"),assertingSnapshot:new th(this,"snapshot")},this._currentTool=this._tools.none,(l=(s=this._currentTool).install)==null||l.call(s),e.window.top===e.window&&(this.overlay=new JE(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
|
|
124
|
+
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|
125
|
+
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|
126
|
+
`),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var s,l,o;sv(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(rv(this.document,FE)),(s=this.overlay)==null||s.install(),(o=(l=this._currentTool)==null?void 0:l.install)==null||o.call(l),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var s,l,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(l=(s=this._currentTool).uninstall)==null||l.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?tA(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 l=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==l){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?an.multiple:an.single;s=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=l}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,l;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onClick)==null||l.call(s,e))}_onDblClick(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onDblClick)==null||l.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,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onMouseUp)==null||l.call(s,e))}_onMouseMove(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onMouseMove)==null||l.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 l,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=(l=this._delegate).highlightUpdated)==null||o.call(l))}_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,l;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!nA(e)&&this._lastActionAutoexpectSnapshot){const o=iA(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((l=(s=this._delegate).performAction)==null?void 0:l.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 l,o;const s=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"expect"});(o=(l=this._delegate).elementPicked)==null||o.call(l,{selector:e,ariaSnapshot:s})}}let iv=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 l=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,l.appendChild(o),l.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&l.appendChild(i),l.appendChild(s),this._dialogElement.appendChild(l);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 eA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function sr(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function Sh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Ha(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function He(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function za(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 sv(n){for(const e of n)e();n.splice(0,n.length)}function tA(n,e,i,s){try{const l=n.parseSelector(i),o=n.querySelectorAll(l,s),u=o.length>1?an.multiple:an.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 rv(n,{tagName:e,attrs:i,children:s}){const l=n.createElementNS("http://www.w3.org/2000/svg",e);if(i)for(const[o,u]of Object.entries(i))l.setAttribute(o,u);if(s)for(const o of s)l.appendChild(rv(n,o));return l}function nA(n){return n.name.startsWith("assert")}function iA(n,e){var u,f;function i(d,p,m){let y=1,b=m+y;for(const w of d.children||[])typeof w=="string"?(y++,b++):(y+=i(w,p,b),b+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let w=p.get(d.role);w||(w=new Map,p.set(d.role,w));const E=w.get(d.name),x=y*100-m;(!E||E.sizeAndPosition<x)&&w.set(d.name,{node:d,sizeAndPosition:x})}return y}const s=new Map;n&&i(n.root,s,0);const l=new Map;i(e.root,l,0);const o=[];for(const[d,p]of l)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 sA(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+=`
|
|
127
|
+
`: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 l=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:av(s,i,e),preferredQuote:l}}function i0(n){return[...n.matchAll(/\$\d+/g)].length}function s0(n,e){return n.replace(/\$(\d+)/g,(i,s)=>`$${s-e}`)}function av(n,e,i){for(;;){const l=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!l)break;const o=l.index+l[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(l[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=i0(n.substring(0,o)),y=s0(n.substring(o,f),m),b=i0(y),w=e.slice(m,m+b),E=JSON.stringify(av(y,w,i));n=d.replace(/=$/,"2=")+`$${m+1}`+s0(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,(l,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 l=0;l<s.length-1;l++)if(s[l]==="internal:control=enter-frame"&&s[l+1].startsWith("nth=")){const[o]=s.splice(l,1);s.splice(l+1,0,o)}return s.map(l=>!l.startsWith("internal:")||l==="internal:control"?l.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(l=l.includes("[")?l.replace(/\]/,"")+"]":l,l=l.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const d=e[+u-1];return l.startsWith("internal:attr")||l.startsWith("internal:testid")||l.startsWith("internal:role")?_t(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 l.startsWith("internal:has=")||l.startsWith("internal:has-not=")?d.text:l.startsWith("internal:testid")?_t(d.text,!0):l.startsWith("internal:attr")||l.startsWith("internal:role")?_t(d.text,f==="s"):Rt(d.text,f==="s")}),l)).join(" >> ")}function rA(n,e,i){try{return aA(n,e,i)}catch{return""}}function aA(n,e,i){try{return Fa(e),e}catch{}const{selector:s,preferredQuote:l}=sA(e,i),o=P0(n,s,void 0,void 0,l),u=r0(n,e);return o.some(f=>r0(n,f)===u)?s:""}function r0(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const lA=({url:n})=>v.jsxs("div",{className:"browser-frame-header",children:[v.jsxs("div",{className:"browser-traffic-lights",children:[v.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),v.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),v.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),v.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[n||"about:blank",n&&v.jsx(jh,{value:n})]}),v.jsx("div",{style:{marginLeft:"auto"},children:v.jsxs("div",{children:[v.jsx("span",{className:"browser-frame-menu-bar"}),v.jsx("span",{className:"browser-frame-menu-bar"}),v.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),rd=Symbol.for("yaml.alias"),wh=Symbol.for("yaml.document"),bi=Symbol.for("yaml.map"),lv=Symbol.for("yaml.pair"),_n=Symbol.for("yaml.scalar"),pr=Symbol.for("yaml.seq"),on=Symbol.for("yaml.node.type"),ns=n=>!!n&&typeof n=="object"&&n[on]===rd,is=n=>!!n&&typeof n=="object"&&n[on]===wh,gr=n=>!!n&&typeof n=="object"&&n[on]===bi,Be=n=>!!n&&typeof n=="object"&&n[on]===lv,Oe=n=>!!n&&typeof n=="object"&&n[on]===_n,mr=n=>!!n&&typeof n=="object"&&n[on]===pr;function ze(n){if(n&&typeof n=="object")switch(n[on]){case bi:case pr:return!0}return!1}function qe(n){if(n&&typeof n=="object")switch(n[on]){case rd:case bi:case _n:case pr:return!0}return!1}const oA=n=>(Oe(n)||ze(n))&&!!n.anchor,jt=Symbol("break visit"),ov=Symbol("skip children"),xn=Symbol("remove node");function vi(n,e){const i=cv(e);is(n)?er(null,n.contents,i,Object.freeze([n]))===xn&&(n.contents=null):er(null,n,i,Object.freeze([]))}vi.BREAK=jt;vi.SKIP=ov;vi.REMOVE=xn;function er(n,e,i,s){const l=uv(n,e,i,s);if(qe(l)||Be(l))return fv(n,s,l),er(n,l,i,s);if(typeof l!="symbol"){if(ze(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=er(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===jt)return jt;u===xn&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=er("key",e.key,i,s);if(o===jt)return jt;o===xn&&(e.key=null);const u=er("value",e.value,i,s);if(u===jt)return jt;u===xn&&(e.value=null)}}return l}async function oc(n,e){const i=cv(e);is(n)?await tr(null,n.contents,i,Object.freeze([n]))===xn&&(n.contents=null):await tr(null,n,i,Object.freeze([]))}oc.BREAK=jt;oc.SKIP=ov;oc.REMOVE=xn;async function tr(n,e,i,s){const l=await uv(n,e,i,s);if(qe(l)||Be(l))return fv(n,s,l),tr(n,l,i,s);if(typeof l!="symbol"){if(ze(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=await tr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===jt)return jt;u===xn&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=await tr("key",e.key,i,s);if(o===jt)return jt;o===xn&&(e.key=null);const u=await tr("value",e.value,i,s);if(u===jt)return jt;u===xn&&(e.value=null)}}return l}function cv(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 uv(n,e,i,s){var l,o,u,f,d;if(typeof i=="function")return i(n,e,s);if(gr(e))return(l=i.Map)==null?void 0:l.call(i,n,e,s);if(mr(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(Oe(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,s);if(ns(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,s)}function fv(n,e,i){const s=e[e.length-1];if(ze(s))s.items[n]=i;else if(Be(s))n==="key"?s.key=i:s.value=i;else if(is(s))s.contents=i;else{const l=ns(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const cA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},uA=n=>n.replace(/[!,[\]{}]/g,e=>cA[e]);class xt{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},xt.defaultYaml,e),this.tags=Object.assign({},xt.defaultTags,i)}clone(){const e=new xt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new xt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:xt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},xt.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:xt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},xt.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),l=s.shift();switch(l){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 ${l}`,!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,l]=e.match(/^(.*!)([^!]*)$/s);l||i(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(l)}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+uA(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 l;if(e&&s.length>0&&qe(e.contents)){const o={};vi(e.contents,(u,f)=>{qe(f)&&f.tag&&(o[f.tag]=!0)}),l=Object.keys(o)}else l=[];for(const[o,u]of s)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||l.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
|
|
128
|
+
`)}}xt.defaultYaml={explicit:!1,version:"1.2"};xt.defaultTags={"!!":"tag:yaml.org,2002:"};function hv(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 dv(n){const e=new Set;return vi(n,{Value(i,s){s.anchor&&e.add(s.anchor)}}),e}function pv(n,e){for(let i=1;;++i){const s=`${n}${i}`;if(!e.has(s))return s}}function fA(n,e){const i=[],s=new Map;let l=null;return{onAnchor:o=>{i.push(o),l||(l=dv(n));const u=pv(e,l);return l.add(u),u},setAnchors:()=>{for(const o of i){const u=s.get(o);if(typeof u=="object"&&u.anchor&&(Oe(u.node)||ze(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 nr(n,e,i,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let l=0,o=s.length;l<o;++l){const u=s[l],f=nr(n,s,String(l),u);f===void 0?delete s[l]:f!==u&&(s[l]=f)}else if(s instanceof Map)for(const l of Array.from(s.keys())){const o=s.get(l),u=nr(n,s,l,o);u===void 0?s.delete(l):u!==o&&s.set(l,u)}else if(s instanceof Set)for(const l of Array.from(s)){const o=nr(n,s,l,l);o===void 0?s.delete(l):o!==l&&(s.delete(l),s.add(o))}else for(const[l,o]of Object.entries(s)){const u=nr(n,s,l,o);u===void 0?delete s[l]:u!==o&&(s[l]=u)}return n.call(e,i,s)}function ln(n,e,i){if(Array.isArray(n))return n.map((s,l)=>ln(s,String(l),i));if(n&&typeof n.toJSON=="function"){if(!i||!oA(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 l=n.toJSON(e,i);return i.onCreate&&i.onCreate(l),l}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class ad{constructor(e){Object.defineProperty(this,on,{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:l,reviver:o}={}){if(!is(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=ln(this,"",u);if(typeof l=="function")for(const{count:d,res:p}of u.anchors.values())l(p,d);return typeof o=="function"?nr(o,{"":f},"",f):f}}class cc extends ad{constructor(e){super(rd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return vi(e,{Node:(s,l)=>{if(l===this)return vi.BREAK;l.anchor===this.source&&(i=l)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:s,doc:l,maxAliasCount:o}=i,u=this.resolve(l);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||(ln(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=Do(l,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 l=`*${this.source}`;if(e){if(hv(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`${l} `}return l}}function Do(n,e,i){if(ns(e)){const s=e.resolve(n),l=i&&s&&i.get(s);return l?l.count*l.aliasCount:0}else if(ze(e)){let s=0;for(const l of e.items){const o=Do(n,l,i);o>s&&(s=o)}return s}else if(Be(e)){const s=Do(n,e.key,i),l=Do(n,e.value,i);return Math.max(s,l)}return 1}const gv=n=>!n||typeof n!="function"&&typeof n!="object";class fe extends ad{constructor(e){super(_n),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:ln(this.value,e,i)}toString(){return String(this.value)}}fe.BLOCK_FOLDED="BLOCK_FOLDED";fe.BLOCK_LITERAL="BLOCK_LITERAL";fe.PLAIN="PLAIN";fe.QUOTE_DOUBLE="QUOTE_DOUBLE";fe.QUOTE_SINGLE="QUOTE_SINGLE";const hA="tag:yaml.org,2002:";function dA(n,e,i){if(e){const s=i.filter(o=>o.tag===e),l=s.find(o=>!o.format)??s[0];if(!l)throw new Error(`Tag ${e} not found`);return l}return i.find(s=>{var l;return((l=s.identify)==null?void 0:l.call(s,n))&&!s.format})}function Ka(n,e,i){var y,b,w;if(is(n)&&(n=n.contents),qe(n))return n;if(Be(n)){const E=(b=(y=i.schema[bi]).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:l,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=l(n)),new cc(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=hA+e.slice(2));let p=dA(n,e,u.tags);if(!p){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new fe(n);return d&&(d.node=E),E}p=n instanceof Map?u[bi]:Symbol.iterator in Object(n)?u[pr]:u[bi]}o&&(o(p),delete i.onTagObj);const m=p!=null&&p.createNode?p.createNode(i.schema,n,i):typeof((w=p==null?void 0:p.nodeClass)==null?void 0:w.from)=="function"?p.nodeClass.from(i.schema,n,i):new fe(n);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function Zo(n,e,i){let s=i;for(let l=e.length-1;l>=0;--l){const o=e[l];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const u=[];u[o]=s,s=u}else s=new Map([[o,s]])}return Ka(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 Ra=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class mv extends ad{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(Ra(e))this.add(i);else{const[s,...l]=e,o=this.get(s,!0);if(ze(o))o.addIn(l,i);else if(o===void 0&&this.schema)this.set(s,Zo(this.schema,l,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${l}`)}}deleteIn(e){const[i,...s]=e;if(s.length===0)return this.delete(i);const l=this.get(i,!0);if(ze(l))return l.deleteIn(s);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}getIn(e,i){const[s,...l]=e,o=this.get(s,!0);return l.length===0?!i&&Oe(o)?o.value:o:ze(o)?o.getIn(l,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Be(i))return!1;const s=i.value;return s==null||e&&Oe(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 l=this.get(i,!0);return ze(l)?l.hasIn(s):!1}setIn(e,i){const[s,...l]=e;if(l.length===0)this.set(s,i);else{const o=this.get(s,!0);if(ze(o))o.setIn(l,i);else if(o===void 0&&this.schema)this.set(s,Zo(this.schema,l,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${l}`)}}}const pA=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function Gn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const Pi=(n,e,i)=>n.endsWith(`
|
|
129
|
+
`)?Gn(i,e):i.includes(`
|
|
130
|
+
`)?`
|
|
131
|
+
`+Gn(i,e):(n.endsWith(" ")?"":" ")+i,yv="flow",xh="block",Bo="quoted";function uc(n,e,i="flow",{indentAtStart:s,lineWidth:l=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!l||l<0)return n;l<o&&(o=0);const d=Math.max(1+o,1+l-e.length);if(n.length<=d)return n;const p=[],m={};let y=l-e.length;typeof s=="number"&&(s>l-Math.max(2,o)?p.push(0):y=l-s);let b,w,E=!1,x=-1,T=-1,M=-1;i===xh&&(x=a0(n,x,e.length),x!==-1&&(y=x+d));for(let V;V=n[x+=1];){if(i===Bo&&V==="\\"){switch(T=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}M=x}if(V===`
|
|
132
|
+
`)i===xh&&(x=a0(n,x,e.length)),y=x+e.length+d,b=void 0;else{if(V===" "&&w&&w!==" "&&w!==`
|
|
133
|
+
`&&w!==" "){const $=n[x+1];$&&$!==" "&&$!==`
|
|
134
|
+
`&&$!==" "&&(b=x)}if(x>=y)if(b)p.push(b),y=b+d,b=void 0;else if(i===Bo){for(;w===" "||w===" ";)w=V,V=n[x+=1],E=!0;const $=x>M+1?x-2:T-1;if(m[$])return n;p.push($),m[$]=!0,y=$+d,b=void 0}else E=!0}w=V}if(E&&f&&f(),p.length===0)return n;u&&u();let C=n.slice(0,p[0]);for(let V=0;V<p.length;++V){const $=p[V],B=p[V+1]||n.length;$===0?C=`
|
|
135
|
+
${e}${n.slice(0,B)}`:(i===Bo&&m[$]&&(C+=`${n[$]}\\`),C+=`
|
|
136
|
+
${e}${n.slice($+1,B)}`)}return C}function a0(n,e,i){let s=e,l=e+1,o=n[l];for(;o===" "||o===" ";)if(e<l+i)o=n[++e];else{do o=n[++e];while(o&&o!==`
|
|
137
|
+
`);s=e,l=e+1,o=n[l]}return s}const fc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),hc=n=>/^(%|---|\.\.\.)/m.test(n);function gA(n,e,i){if(!e||e<0)return!1;const s=e-i,l=n.length;if(l<=s)return!1;for(let o=0,u=0;o<l;++o)if(n[o]===`
|
|
138
|
+
`){if(o-u>s)return!0;if(u=o+1,l-u<=s)return!1}return!0}function $a(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=e,l=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(hc(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<l)d+=1;else{for(u+=i.slice(f,d)+`
|
|
139
|
+
|
|
140
|
+
`;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)u+=`
|
|
141
|
+
`,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:uc(u,o,Bo,fc(e,!1))}function _h(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
|
|
142
|
+
`)||/[ \t]\n|\n[ \t]/.test(n))return $a(n,e);const i=e.indent||(hc(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
143
|
+
${i}`)+"'";return e.implicitKey?s:uc(s,i,yv,fc(e,!1))}function ir(n,e){const{singleQuote:i}=e.options;let s;if(i===!1)s=$a;else{const l=n.includes('"'),o=n.includes("'");l&&!o?s=_h:o&&!l?s=$a:s=i?_h:$a}return s(n,e)}let Th;try{Th=new RegExp(`(^|(?<!
|
|
144
|
+
))
|
|
145
|
+
+(?!
|
|
146
|
+
|$)`,"g")}catch{Th=/\n+(?!\n|$)/g}function Uo({comment:n,type:e,value:i},s,l,o){const{blockQuote:u,commentString:f,lineWidth:d}=s.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return ir(i,s);const p=s.indent||(s.forceBlockIndent||hc(i)?" ":""),m=u==="literal"?!0:u==="folded"||e===fe.BLOCK_FOLDED?!1:e===fe.BLOCK_LITERAL?!0:!gA(i,d,p.length);if(!i)return m?`|
|
|
147
|
+
`:`>
|
|
148
|
+
`;let y,b;for(b=i.length;b>0;--b){const Y=i[b-1];if(Y!==`
|
|
149
|
+
`&&Y!==" "&&Y!==" ")break}let w=i.substring(b);const E=w.indexOf(`
|
|
150
|
+
`);E===-1?y="-":i===w||E!==w.length-1?(y="+",o&&o()):y="",w&&(i=i.slice(0,-w.length),w[w.length-1]===`
|
|
151
|
+
`&&(w=w.slice(0,-1)),w=w.replace(Th,`$&${p}`));let x=!1,T,M=-1;for(T=0;T<i.length;++T){const Y=i[T];if(Y===" ")x=!0;else if(Y===`
|
|
152
|
+
`)M=T;else break}let C=i.substring(0,M<T?M+1:T);C&&(i=i.substring(C.length),C=C.replace(/\n+/g,`$&${p}`));let $=(m?"|":">")+(x?p?"2":"1":"")+y;if(n&&($+=" "+f(n.replace(/ ?[\r\n]+/g," ")),l&&l()),m)return i=i.replace(/\n+/g,`$&${p}`),`${$}
|
|
153
|
+
${p}${C}${i}${w}`;i=i.replace(/\n+/g,`
|
|
154
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const B=uc(`${C}${i}${w}`,p,xh,fc(s,!0));return`${$}
|
|
155
|
+
${p}${B}`}function mA(n,e,i,s){const{type:l,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:p,inFlow:m}=e;if(f&&o.includes(`
|
|
156
|
+
`)||m&&/[[\]{},]/.test(o))return ir(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||m||!o.includes(`
|
|
157
|
+
`)?ir(o,e):Uo(n,e,i,s);if(!f&&!m&&l!==fe.PLAIN&&o.includes(`
|
|
158
|
+
`))return Uo(n,e,i,s);if(hc(o)){if(d==="")return e.forceBlockIndent=!0,Uo(n,e,i,s);if(f&&d===p)return ir(o,e)}const y=o.replace(/\n+/g,`$&
|
|
159
|
+
${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:w,tags:E}=e.doc.schema;if(E.some(b)||w!=null&&w.some(b))return ir(o,e)}return f?y:uc(y,d,yv,fc(e,!1))}function Qa(n,e,i,s){const{implicitKey:l,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==fe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=fe.QUOTE_DOUBLE);const d=m=>{switch(m){case fe.BLOCK_FOLDED:case fe.BLOCK_LITERAL:return l||o?ir(u.value,e):Uo(u,e,i,s);case fe.QUOTE_DOUBLE:return $a(u.value,e);case fe.QUOTE_SINGLE:return _h(u.value,e);case fe.PLAIN:return mA(u,e,i,s);default:return null}};let p=d(f);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,b=l&&m||y;if(p=d(b),p===null)throw new Error(`Unsupported default string type ${b}`)}return p}function bv(n,e){const i=Object.assign({blockQuote:!0,commentString:pA,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 yA(n,e){var l;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(Oe(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=((l=s==null?void 0:s.constructor)==null?void 0:l.name)??typeof s;throw new Error(`Tag not resolved for ${o} value`)}return i}function bA(n,e,{anchors:i,doc:s}){if(!s.directives)return"";const l=[],o=(Oe(n)||ze(n))&&n.anchor;o&&hv(o)&&(i.add(o),l.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&l.push(s.directives.tagString(u)),l.join(" ")}function or(n,e,i,s){var d;if(Be(n))return n.toString(e,i,s);if(ns(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 l;const o=qe(n)?n:e.doc.createNode(n,{onTagObj:p=>l=p});l||(l=yA(e.doc.schema.tags,o));const u=bA(o,l,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof l.stringify=="function"?l.stringify(o,e,i,s):Oe(o)?Qa(o,e,i,s):o.toString(e,i,s);return u?Oe(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
|
|
160
|
+
${e.indent}${f}`:f}function vA({key:n,value:e},i,s,l){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(ze(n)||!qe(n)&&typeof n=="object"){const J="With simple keys, collection cannot be used as a key value";throw new Error(J)}}let w=!y&&(!n||b&&e==null&&!i.inFlow||ze(n)||(Oe(n)?n.type===fe.BLOCK_FOLDED||n.type===fe.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!w&&(y||!o),indent:f+d});let E=!1,x=!1,T=or(n,i,()=>E=!0,()=>x=!0);if(!w&&!i.inFlow&&T.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");w=!0}if(i.inFlow){if(o||e==null)return E&&s&&s(),T===""?"?":w?`? ${T}`:T}else if(o&&!y||e==null&&w)return T=`? ${T}`,b&&!E?T+=Pi(T,i.indent,p(b)):x&&l&&l(),T;E&&(b=null),w?(b&&(T+=Pi(T,i.indent,p(b))),T=`? ${T}
|
|
161
|
+
${f}:`):(T=`${T}:`,b&&(T+=Pi(T,i.indent,p(b))));let M,C,V;qe(e)?(M=!!e.spaceBefore,C=e.commentBefore,V=e.comment):(M=!1,C=null,V=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!w&&!b&&Oe(e)&&(i.indentAtStart=T.length+1),x=!1,!m&&d.length>=2&&!i.inFlow&&!w&&mr(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let $=!1;const B=or(e,i,()=>$=!0,()=>x=!0);let Y=" ";if(b||M||C){if(Y=M?`
|
|
162
|
+
`:"",C){const J=p(C);Y+=`
|
|
163
|
+
${Gn(J,i.indent)}`}B===""&&!i.inFlow?Y===`
|
|
164
|
+
`&&(Y=`
|
|
165
|
+
|
|
166
|
+
`):Y+=`
|
|
167
|
+
${i.indent}`}else if(!w&&ze(e)){const J=B[0],I=B.indexOf(`
|
|
168
|
+
`),R=I!==-1,te=i.inFlow??e.flow??e.items.length===0;if(R||!te){let re=!1;if(R&&(J==="&"||J==="!")){let L=B.indexOf(" ");J==="&"&&L!==-1&&L<I&&B[L+1]==="!"&&(L=B.indexOf(" ",L+1)),(L===-1||I<L)&&(re=!0)}re||(Y=`
|
|
169
|
+
${i.indent}`)}}else(B===""||B[0]===`
|
|
170
|
+
`)&&(Y="");return T+=Y+B,i.inFlow?$&&s&&s():V&&!$?T+=Pi(T,i.indent,p(V)):x&&l&&l(),T}function vv(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const wo="<<",Yn={identify:n=>n===wo||typeof n=="symbol"&&n.description===wo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new fe(Symbol(wo)),{addToJSMap:Sv}),stringify:()=>wo},SA=(n,e)=>(Yn.identify(e)||Oe(e)&&(!e.type||e.type===fe.PLAIN)&&Yn.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===Yn.tag&&i.default));function Sv(n,e,i){if(i=n&&ns(i)?i.resolve(n.doc):i,mr(i))for(const s of i.items)nh(n,e,s);else if(Array.isArray(i))for(const s of i)nh(n,e,s);else nh(n,e,i)}function nh(n,e,i){const s=n&&ns(i)?i.resolve(n.doc):i;if(!gr(s))throw new Error("Merge sources must be maps or map aliases");const l=s.toJSON(null,n,Map);for(const[o,u]of l)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 wv(n,e,{key:i,value:s}){if(qe(i)&&i.addToJSMap)i.addToJSMap(n,e,s);else if(SA(n,i))Sv(n,e,s);else{const l=ln(i,"",n);if(e instanceof Map)e.set(l,ln(s,l,n));else if(e instanceof Set)e.add(l);else{const o=wA(i,l,n),u=ln(s,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function wA(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(qe(n)&&(i!=null&&i.doc)){const s=bv(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 l=n.toString(s);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),vv(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 l}return JSON.stringify(e)}function ld(n,e,i){const s=Ka(n,void 0,i),l=Ka(e,void 0,i);return new vt(s,l)}class vt{constructor(e,i=null){Object.defineProperty(this,on,{value:lv}),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 vt(i,s)}toJSON(e,i){const s=i!=null&&i.mapAsMap?new Map:{};return wv(i,s,this)}toString(e,i,s){return e!=null&&e.doc?vA(this,e,i,s):JSON.stringify(this)}}function xv(n,e,i){return(e.inFlow??n.flow?_A:xA)(n,e,i)}function xA({comment:n,items:e},i,{blockItemPrefix:s,flowChars:l,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(""),Jo(i,b,x.commentBefore,y),x.comment&&(T=x.comment);else if(Be(x)){const C=qe(x.key)?x.key:null;C&&(!y&&C.spaceBefore&&b.push(""),Jo(i,b,C.commentBefore,y))}y=!1;let M=or(x,m,()=>T=null,()=>y=!0);T&&(M+=Pi(M,o,p(T))),y&&T&&(y=!1),b.push(s+M)}let w;if(b.length===0)w=l.start+l.end;else{w=b[0];for(let E=1;E<b.length;++E){const x=b[E];w+=x?`
|
|
171
|
+
${d}${x}`:`
|
|
172
|
+
`}}return n?(w+=`
|
|
173
|
+
`+Gn(p(n),d),f&&f()):y&&u&&u(),w}function _A({items:n},e,{flowChars:i,itemIndent:s}){const{indent:l,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(""),Jo(e,y,x.commentBefore,!1),x.comment&&(T=x.comment);else if(Be(x)){const C=qe(x.key)?x.key:null;C&&(C.spaceBefore&&y.push(""),Jo(e,y,C.commentBefore,!1),C.comment&&(p=!0));const V=qe(x.value)?x.value:null;V?(V.comment&&(T=V.comment),V.commentBefore&&(p=!0)):x.value==null&&(C!=null&&C.comment)&&(T=C.comment)}T&&(p=!0);let M=or(x,d,()=>T=null);E<n.length-1&&(M+=","),T&&(M+=Pi(M,s,f(T))),!p&&(y.length>m||M.includes(`
|
|
174
|
+
`))&&(p=!0),y.push(M),m=y.length}const{start:b,end:w}=i;if(y.length===0)return b+w;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?`
|
|
175
|
+
${o}${l}${x}`:`
|
|
176
|
+
`;return`${E}
|
|
177
|
+
${l}${w}`}else return`${b}${u}${y.join(" ")}${u}${w}`}function Jo({indent:n,options:{commentString:e}},i,s,l){if(s&&l&&(s=s.replace(/^\n+/,"")),s){const o=Gn(e(s),n);i.push(o.trimStart())}}function Fi(n,e){const i=Oe(e)?e.value:e;for(const s of n)if(Be(s)&&(s.key===e||s.key===i||Oe(s.key)&&s.key.value===i))return s}class Gt extends mv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(bi,e),this.items=[]}static from(e,i,s){const{keepUndefined:l,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||l)&&u.items.push(ld(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 vt(e,e==null?void 0:e.value):s=new vt(e.key,e.value);const l=Fi(this.items,s.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(l){if(!i)throw new Error(`Key ${s.key} already set`);Oe(l.value)&&gv(s.value)?l.value.value=s.value:l.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=Fi(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const s=Fi(this.items,e),l=s==null?void 0:s.value;return(!i&&Oe(l)?l.value:l)??void 0}has(e){return!!Fi(this.items,e)}set(e,i){this.add(new vt(e,i),!0)}toJSON(e,i,s){const l=s?new s:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)wv(i,l,o);return l}toString(e,i,s){if(!e)return JSON.stringify(this);for(const l of this.items)if(!Be(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),xv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:i})}}const yr={collection:"map",default:!0,nodeClass:Gt,tag:"tag:yaml.org,2002:map",resolve(n,e){return gr(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Gt.from(n,e,i)};class Si extends mv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(pr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=xo(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const s=xo(e);if(typeof s!="number")return;const l=this.items[s];return!i&&Oe(l)?l.value:l}has(e){const i=xo(e);return typeof i=="number"&&i<this.items.length}set(e,i){const s=xo(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const l=this.items[s];Oe(l)&&gv(i)?l.value=i:this.items[s]=i}toJSON(e,i){const s=[];i!=null&&i.onCreate&&i.onCreate(s);let l=0;for(const o of this.items)s.push(ln(o,String(l++),i));return s}toString(e,i,s){return e?xv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:i}):JSON.stringify(this)}static from(e,i,s){const{replacer:l}=s,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof l=="function"){const d=i instanceof Set?f:String(u++);f=l.call(i,d,f)}o.items.push(Ka(f,void 0,s))}}return o}}function xo(n){let e=Oe(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const br={collection:"seq",default:!0,nodeClass:Si,tag:"tag:yaml.org,2002:seq",resolve(n,e){return mr(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Si.from(n,e,i)},dc={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),Qa(n,e,i,s)}},pc={identify:n=>n==null,createNode:()=>new fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new fe(null),stringify:({source:n},e)=>typeof n=="string"&&pc.test.test(n)?n:e.options.nullStr},od={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new fe(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&od.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 l=typeof s=="number"?s:Number(s);if(!isFinite(l))return isNaN(l)?".nan":l<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 _v={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},Tv={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)}},Ev={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 fe(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:gn},gc=n=>typeof n=="bigint"||Number.isInteger(n),cd=(n,e,i,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),i);function Av(n,e,i){const{value:s}=n;return gc(s)&&s>=0?i+s.toString(e):gn(n)}const Nv={identify:n=>gc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>cd(n,2,8,i),stringify:n=>Av(n,8,"0o")},Cv={identify:gc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>cd(n,0,10,i),stringify:gn},kv={identify:n=>gc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>cd(n,2,16,i),stringify:n=>Av(n,16,"0x")},TA=[yr,br,dc,pc,od,Nv,Cv,kv,_v,Tv,Ev];function l0(n){return typeof n=="bigint"||Number.isInteger(n)}const _o=({value:n})=>JSON.stringify(n),EA=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:_o},{identify:n=>n==null,createNode:()=>new fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:_o},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:_o},{identify:l0,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})=>l0(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:_o}],AA={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},NA=[yr,br].concat(EA,AA),ud={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 l=0;l<i.length;++l)s[l]=i.charCodeAt(l);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,l,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=fe.BLOCK_LITERAL),e!==fe.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===fe.BLOCK_LITERAL?`
|
|
178
|
+
`:" ")}return Qa({comment:n,type:e,value:f},s,l,o)}};function Mv(n,e){if(mr(n))for(let i=0;i<n.items.length;++i){let s=n.items[i];if(!Be(s)){if(gr(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const l=s.items[0]||new vt(new fe(null));if(s.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${s.commentBefore}
|
|
179
|
+
${l.key.commentBefore}`:s.commentBefore),s.comment){const o=l.value??l.key;o.comment=o.comment?`${s.comment}
|
|
180
|
+
${o.comment}`:s.comment}s=l}n.items[i]=Be(s)?s:new vt(s)}}else e("Expected a sequence for this tag");return n}function Ov(n,e,i){const{replacer:s}=i,l=new Si(n);l.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;l.items.push(ld(f,d,i))}return l}const fd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Mv,createNode:Ov};class rr extends Si{constructor(){super(),this.add=Gt.prototype.add.bind(this),this.delete=Gt.prototype.delete.bind(this),this.get=Gt.prototype.get.bind(this),this.has=Gt.prototype.has.bind(this),this.set=Gt.prototype.set.bind(this),this.tag=rr.tag}toJSON(e,i){if(!i)return super.toJSON(e);const s=new Map;i!=null&&i.onCreate&&i.onCreate(s);for(const l of this.items){let o,u;if(Be(l)?(o=ln(l.key,"",i),u=ln(l.value,o,i)):o=ln(l,"",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 l=Ov(e,i,s),o=new this;return o.items=l.items,o}}rr.tag="tag:yaml.org,2002:omap";const hd={collection:"seq",identify:n=>n instanceof Map,nodeClass:rr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=Mv(n,e),s=[];for(const{key:l}of i.items)Oe(l)&&(s.includes(l.value)?e(`Ordered maps must not include duplicate keys: ${l.value}`):s.push(l.value));return Object.assign(new rr,i)},createNode:(n,e,i)=>rr.from(n,e,i)};function Lv({value:n,source:e},i){return e&&(n?Rv:jv).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const Rv={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 fe(!0),stringify:Lv},jv={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 fe(!1),stringify:Lv},CA={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},kA={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)}},MA={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 fe(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},Za=n=>typeof n=="bigint"||Number.isInteger(n);function mc(n,e,i,{intAsBigInt:s}){const l=n[0];if((l==="-"||l==="+")&&(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 l==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return l==="-"?-1*o:o}function dd(n,e,i){const{value:s}=n;if(Za(s)){const l=s.toString(e);return s<0?"-"+i+l.substr(1):i+l}return gn(n)}const OA={identify:Za,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>mc(n,2,2,i),stringify:n=>dd(n,2,"0b")},LA={identify:Za,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>mc(n,1,8,i),stringify:n=>dd(n,8,"0")},RA={identify:Za,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>mc(n,0,10,i),stringify:gn},jA={identify:Za,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>mc(n,2,16,i),stringify:n=>dd(n,16,"0x")};class ar extends Gt{constructor(e){super(e),this.tag=ar.tag}add(e){let i;Be(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new vt(e.key,null):i=new vt(e,null),Fi(this.items,i.key)||this.items.push(i)}get(e,i){const s=Fi(this.items,e);return!i&&Be(s)?Oe(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=Fi(this.items,e);s&&!i?this.items.splice(this.items.indexOf(s),1):!s&&i&&this.items.push(new vt(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:l}=s,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let u of i)typeof l=="function"&&(u=l.call(i,u,u)),o.items.push(ld(u,null,s));return o}}ar.tag="tag:yaml.org,2002:set";const pd={collection:"map",identify:n=>n instanceof Set,nodeClass:ar,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>ar.from(n,e,i),resolve(n,e){if(gr(n)){if(n.hasAllNullValues(!0))return Object.assign(new ar,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function gd(n,e){const i=n[0],s=i==="-"||i==="+"?n.substring(1):n,l=u=>e?BigInt(u):Number(u),o=s.replace(/_/g,"").split(":").reduce((u,f)=>u*l(60)+l(f),l(0));return i==="-"?l(-1)*o:o}function Dv(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 l=i(60),o=[e%l];return e<60?o.unshift(0):(e=(e-o[0])/l,o.unshift(e%l),e>=60&&(e=(e-o[0])/l,o.unshift(e))),s+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Bv={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})=>gd(n,i),stringify:Dv},Uv={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=>gd(n,!1),stringify:Dv},yc={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(yc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,s,l,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(i,s-1,l,o||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=gd(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$/,"")},o0=[yr,br,dc,pc,Rv,jv,OA,LA,RA,jA,CA,kA,MA,ud,Yn,hd,fd,pd,Bv,Uv,yc],c0=new Map([["core",TA],["failsafe",[yr,br,dc]],["json",NA],["yaml11",o0],["yaml-1.1",o0]]),u0={binary:ud,bool:od,float:Ev,floatExp:Tv,floatNaN:_v,floatTime:Uv,int:Cv,intHex:kv,intOct:Nv,intTime:Bv,map:yr,merge:Yn,null:pc,omap:hd,pairs:fd,seq:br,set:pd,timestamp:yc},DA={"tag:yaml.org,2002:binary":ud,"tag:yaml.org,2002:merge":Yn,"tag:yaml.org,2002:omap":hd,"tag:yaml.org,2002:pairs":fd,"tag:yaml.org,2002:set":pd,"tag:yaml.org,2002:timestamp":yc};function ih(n,e,i){const s=c0.get(e);if(s&&!n)return i&&!s.includes(Yn)?s.concat(Yn):s.slice();let l=s;if(!l)if(Array.isArray(n))l=[];else{const o=Array.from(c0.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)l=l.concat(o);else typeof n=="function"&&(l=n(l.slice()));return i&&(l=l.concat(Yn)),l.reduce((o,u)=>{const f=typeof u=="string"?u0[u]:u;if(!f){const d=JSON.stringify(u),p=Object.keys(u0).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 BA=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class bc{constructor({compat:e,customTags:i,merge:s,resolveKnownTags:l,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?ih(e,"compat"):e?ih(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=l?DA:{},this.tags=ih(i,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,bi,{value:yr}),Object.defineProperty(this,_n,{value:dc}),Object.defineProperty(this,pr,{value:br}),this.sortMapEntries=typeof u=="function"?u:u===!0?BA:null}clone(){const e=Object.create(bc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function UA(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 l=bv(n,e),{commentString:o}=l.options;if(n.commentBefore){i.length!==1&&i.unshift("");const p=o(n.commentBefore);i.unshift(Gn(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(Gn(y,""))}l.forceBlockIndent=!!n.comment,f=n.contents.comment}const p=f?void 0:()=>u=!0;let m=or(n.contents,l,()=>f=null,p);f&&(m+=Pi(m,"",o(f))),(m[0]==="|"||m[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${m}`:i.push(m)}else i.push(or(n.contents,l));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const p=o(n.comment);p.includes(`
|
|
181
|
+
`)?(i.push("..."),i.push(Gn(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(Gn(o(p),"")))}return i.join(`
|
|
182
|
+
`)+`
|
|
183
|
+
`}class vr{constructor(e,i,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,on,{value:wh});let l=null;typeof i=="function"||Array.isArray(i)?l=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 xt({version:u}),this.setSchema(u,s),this.contents=e===void 0?null:this.createNode(e,l,s)}clone(){const e=Object.create(vr.prototype,{[on]:{value:wh}});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){Ps(this.contents)&&this.contents.add(e)}addIn(e,i){Ps(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const s=dv(this);e.anchor=!i||s.has(i)?pv(i||"a",s):i}return new cc(e.anchor)}createNode(e,i,s){let l;if(typeof i=="function")e=i.call({"":e},"",e),l=i;else if(Array.isArray(i)){const T=C=>typeof C=="number"||C instanceof String||C instanceof Number,M=i.filter(T).map(String);M.length>0&&(i=i.concat(M)),l=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:w}=fA(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:l,schema:this.schema,sourceObjects:w},x=Ka(e,m,E);return f&&ze(x)&&(x.flow=!0),b(),x}createPair(e,i,s={}){const l=this.createNode(e,null,s),o=this.createNode(i,null,s);return new vt(l,o)}delete(e){return Ps(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ra(e)?this.contents==null?!1:(this.contents=null,!0):Ps(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return ze(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ra(e)?!i&&Oe(this.contents)?this.contents.value:this.contents:ze(this.contents)?this.contents.getIn(e,i):void 0}has(e){return ze(this.contents)?this.contents.has(e):!1}hasIn(e){return Ra(e)?this.contents!==void 0:ze(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=Zo(this.schema,[e],i):Ps(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ra(e)?this.contents=i:this.contents==null?this.contents=Zo(this.schema,Array.from(e),i):Ps(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 xt({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 xt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const l=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(s)this.schema=new bc(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:l,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},d=ln(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"?nr(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 UA(this,e)}}function Ps(n){if(ze(n))return!0;throw new Error("Expected a YAML collection as document contents")}class md extends Error{constructor(e,i,s,l){super(),this.name=e,this.code=s,this.message=l,this.pos=i}}class Qi extends md{constructor(e,i,s){super("YAMLParseError",e,i,s)}}class Hv extends md{constructor(e,i,s){super("YAMLWarning",e,i,s)}}const Wo=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:s,col:l}=i.linePos[0];i.message+=` at line ${s}, column ${l}`;let o=l-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
|
+
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=i.linePos[1];d&&d.line===s&&d.col>l&&(f=Math.max(1,Math.min(d.col-l,80-o)));const p=" ".repeat(o)+"^".repeat(f);i.message+=`:
|
|
185
|
+
|
|
186
|
+
${u}
|
|
187
|
+
${p}
|
|
188
|
+
`}};function cr(n,{flow:e,indicator:i,next:s,offset:l,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,p=f,m=f,y="",b="",w=!1,E=!1,x=null,T=null,M=null,C=null,V=null,$=null,B=null;for(const I of n)switch(E&&(I.type!=="space"&&I.type!=="newline"&&I.type!=="comma"&&o(I.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(p&&I.type!=="comment"&&I.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),I.type){case"space":!e&&(i!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&I.source.includes(" ")&&(x=I),m=!0;break;case"comment":{m||o(I,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const R=I.source.substring(1)||" ";y?y+=b+R:y=R,b="",p=!1;break}case"newline":p?y?y+=I.source:d=!0:b+=I.source,p=!0,w=!0,(T||M)&&(C=I),m=!0;break;case"anchor":T&&o(I,"MULTIPLE_ANCHORS","A node can have at most one anchor"),I.source.endsWith(":")&&o(I.offset+I.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),T=I,B===null&&(B=I.offset),p=!1,m=!1,E=!0;break;case"tag":{M&&o(I,"MULTIPLE_TAGS","A node can have at most one tag"),M=I,B===null&&(B=I.offset),p=!1,m=!1,E=!0;break}case i:(T||M)&&o(I,"BAD_PROP_ORDER",`Anchors and tags must be after the ${I.source} indicator`),$&&o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.source} in ${e??"collection"}`),$=I,p=i==="seq-item-ind"||i==="explicit-key-ind",m=!1;break;case"comma":if(e){V&&o(I,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),V=I,p=!1,m=!1;break}default:o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.type} token`),p=!1,m=!1}const Y=n[n.length-1],J=Y?Y.offset+Y.source.length:l;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:V,found:$,spaceBefore:d,comment:y,hasNewline:w,anchor:T,tag:M,newlineAfterProp:C,end:J,start:B??J}}function Ya(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
|
|
189
|
+
`))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(Ya(e.key)||Ya(e.value))return!0}return!1;default:return!0}}function Eh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&Ya(e)&&i(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function zv(n,e,i){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const l=typeof s=="function"?s:(o,u)=>o===u||Oe(o)&&Oe(u)&&o.value===u.value;return e.some(o=>l(o.key,i))}const f0="All mapping items must start at the same column";function HA({composeNode:n,composeEmptyNode:e},i,s,l,o){var m;const u=(o==null?void 0:o.nodeClass)??Gt,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:w,sep:E,value:x}=y,T=cr(b,{indicator:"explicit-key-ind",next:w??(E==null?void 0:E[0]),offset:d,onError:l,parentIndent:s.indent,startOnNewline:!0}),M=!T.found;if(M){if(w&&(w.type==="block-seq"?l(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in w&&w.indent!==s.indent&&l(d,"BAD_INDENT",f0)),!T.anchor&&!T.tag&&!E){p=T.end,T.comment&&(f.comment?f.comment+=`
|
|
190
|
+
`+T.comment:f.comment=T.comment);continue}(T.newlineAfterProp||Ya(w))&&l(w??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&&l(d,"BAD_INDENT",f0);i.atKey=!0;const C=T.end,V=w?n(i,w,T,l):e(i,C,b,null,T,l);i.schema.compat&&Eh(s.indent,w,l),i.atKey=!1,zv(i,f.items,V)&&l(C,"DUPLICATE_KEY","Map keys must be unique");const $=cr(E??[],{indicator:"map-value-ind",next:x,offset:V.range[2],onError:l,parentIndent:s.indent,startOnNewline:!w||w.type==="block-scalar"});if(d=$.end,$.found){M&&((x==null?void 0:x.type)==="block-map"&&!$.hasNewline&&l(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&T.start<$.found.offset-1024&&l(V.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const B=x?n(i,x,$,l):e(i,d,E,null,$,l);i.schema.compat&&Eh(s.indent,x,l),d=B.range[2];const Y=new vt(V,B);i.options.keepSourceTokens&&(Y.srcToken=y),f.items.push(Y)}else{M&&l(V.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),$.comment&&(V.comment?V.comment+=`
|
|
191
|
+
`+$.comment:V.comment=$.comment);const B=new vt(V);i.options.keepSourceTokens&&(B.srcToken=y),f.items.push(B)}}return p&&p<d&&l(p,"IMPOSSIBLE","Map comment with trailing content"),f.range=[s.offset,d,p??d],f}function zA({composeNode:n,composeEmptyNode:e},i,s,l,o){const u=(o==null?void 0:o.nodeClass)??Si,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=cr(m,{indicator:"seq-item-ind",next:y,offset:d,onError:l,parentIndent:s.indent,startOnNewline:!0});if(!b.found)if(b.anchor||b.tag||y)y&&y.type==="block-seq"?l(b.end,"BAD_INDENT","All sequence items must start at the same column"):l(d,"MISSING_CHAR","Sequence item without - indicator");else{p=b.end,b.comment&&(f.comment=b.comment);continue}const w=y?n(i,y,b,l):e(i,b.end,m,null,b,l);i.schema.compat&&Eh(s.indent,y,l),d=w.range[2],f.items.push(w)}return f.range=[s.offset,d,p??d],f}function Ja(n,e,i,s){let l="";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)||" ";l?l+=u+m:l=m,u="";break}case"newline":l&&(u+=d),o=!0;break;default:s(f,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:l,offset:e}}const sh="Block collections are not allowed within flow collections",rh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function qA({composeNode:n,composeEmptyNode:e},i,s,l,o){const u=s.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?Gt:Si),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 M=s.items[T],{start:C,key:V,sep:$,value:B}=M,Y=cr(C,{flow:f,indicator:"explicit-key-ind",next:V??($==null?void 0:$[0]),offset:y,onError:l,parentIndent:s.indent,startOnNewline:!1});if(!Y.found){if(!Y.anchor&&!Y.tag&&!$&&!B){T===0&&Y.comma?l(Y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):T<s.items.length-1&&l(Y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),Y.comment&&(p.comment?p.comment+=`
|
|
192
|
+
`+Y.comment:p.comment=Y.comment),y=Y.end;continue}!u&&i.options.strict&&Ya(V)&&l(V,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(T===0)Y.comma&&l(Y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(Y.comma||l(Y.start,"MISSING_CHAR",`Missing , between ${f} items`),Y.comment){let J="";e:for(const I of C)switch(I.type){case"comma":case"space":break;case"comment":J=I.source.substring(1);break e;default:break e}if(J){let I=p.items[p.items.length-1];Be(I)&&(I=I.value??I.key),I.comment?I.comment+=`
|
|
193
|
+
`+J:I.comment=J,Y.comment=Y.comment.substring(J.length+1)}}if(!u&&!$&&!Y.found){const J=B?n(i,B,Y,l):e(i,Y.end,$,null,Y,l);p.items.push(J),y=J.range[2],rh(B)&&l(J.range,"BLOCK_IN_FLOW",sh)}else{i.atKey=!0;const J=Y.end,I=V?n(i,V,Y,l):e(i,J,C,null,Y,l);rh(V)&&l(I.range,"BLOCK_IN_FLOW",sh),i.atKey=!1;const R=cr($??[],{flow:f,indicator:"map-value-ind",next:B,offset:I.range[2],onError:l,parentIndent:s.indent,startOnNewline:!1});if(R.found){if(!u&&!Y.found&&i.options.strict){if($)for(const L of $){if(L===R.found)break;if(L.type==="newline"){l(L,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}Y.start<R.found.offset-1024&&l(R.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else B&&("source"in B&&B.source&&B.source[0]===":"?l(B,"MISSING_CHAR",`Missing space after : in ${f}`):l(R.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const te=B?n(i,B,R,l):R.found?e(i,R.end,$,null,R,l):null;te?rh(B)&&l(te.range,"BLOCK_IN_FLOW",sh):R.comment&&(I.comment?I.comment+=`
|
|
194
|
+
`+R.comment:I.comment=R.comment);const re=new vt(I,te);if(i.options.keepSourceTokens&&(re.srcToken=M),u){const L=p;zv(i,L.items,I)&&l(J,"DUPLICATE_KEY","Map keys must be unique"),L.items.push(re)}else{const L=new Gt(i.schema);L.flow=!0,L.items.push(re);const F=(te??I).range;L.range=[I.range[0],F[1],F[2]],p.items.push(L)}y=te?te.range[2]:R.end}}const b=u?"}":"]",[w,...E]=s.end;let x=y;if(w&&w.source===b)x=w.offset+w.source.length;else{const T=f[0].toUpperCase()+f.substring(1),M=m?`${T} must end with a ${b}`:`${T} in block collection must be sufficiently indented and end with a ${b}`;l(y,m?"MISSING_CHAR":"BAD_INDENT",M),w&&w.source.length!==1&&E.unshift(w)}if(E.length>0){const T=Ja(E,x,i.options.strict,l);T.comment&&(p.comment?p.comment+=`
|
|
195
|
+
`+T.comment:p.comment=T.comment),p.range=[s.offset,x,T.offset]}else p.range=[s.offset,x,x];return p}function ah(n,e,i,s,l,o){const u=i.type==="block-map"?HA(n,e,i,s,o):i.type==="block-seq"?zA(n,e,i,s,o):qA(n,e,i,s,o),f=u.constructor;return l==="!"||l===f.tagName?(u.tag=f.tagName,u):(l&&(u.tag=l),u)}function $A(n,e,i,s,l){var b;const o=s.tag,u=o?e.directives.tagName(o.source,w=>l(o,"TAG_RESOLVE_FAILED",w)):null;if(i.type==="block-seq"){const{anchor:w,newlineAfterProp:E}=s,x=w&&o?w.offset>o.offset?w:o:w??o;x&&(!E||E.offset<x.offset)&&l(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===Gt.tagName&&f==="map"||u===Si.tagName&&f==="seq")return ah(n,e,i,l,u);let d=e.schema.tags.find(w=>w.tag===u&&w.collection===f);if(!d){const w=e.schema.knownTags[u];if(w&&w.collection===f)e.schema.tags.push(Object.assign({},w,{default:!1})),d=w;else return w!=null&&w.collection?l(o,"BAD_COLLECTION_TYPE",`${w.tag} used for ${f} collection, but expects ${w.collection}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),ah(n,e,i,l,u)}const p=ah(n,e,i,l,u,d),m=((b=d.resolve)==null?void 0:b.call(d,p,w=>l(o,"TAG_RESOLVE_FAILED",w),e.options))??p,y=qe(m)?m:new fe(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,l=IA(e,n.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[s,s,s]};const o=l.mode===">"?fe.BLOCK_FOLDED:fe.BLOCK_LITERAL,u=e.source?VA(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=l.chomp==="+"&&u.length>0?`
|
|
196
|
+
`.repeat(Math.max(1,u.length-1)):"";let T=s+l.length;return e.source&&(T+=e.source.length),{value:x,type:o,comment:l.comment,range:[s,T,T]}}let d=e.indent+l.indent,p=e.offset+l.length,m=0;for(let x=0;x<f;++x){const[T,M]=u[x];if(M===""||M==="\r")l.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"),l.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+M.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>d&&(f=x+1);let y="",b="",w=!1;for(let x=0;x<m;++x)y+=u[x][0].slice(d)+`
|
|
197
|
+
`;for(let x=m;x<f;++x){let[T,M]=u[x];p+=T.length+M.length+1;const C=M[M.length-1]==="\r";if(C&&(M=M.slice(0,-1)),M&&T.length<d){const $=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(p-M.length-(C?2:1),"BAD_INDENT",$),T=""}o===fe.BLOCK_LITERAL?(y+=b+T.slice(d)+M,b=`
|
|
198
|
+
`):T.length>d||M[0]===" "?(b===" "?b=`
|
|
199
|
+
`:!w&&b===`
|
|
200
|
+
`&&(b=`
|
|
201
|
+
|
|
202
|
+
`),y+=b+T.slice(d)+M,b=`
|
|
203
|
+
`,w=!0):M===""?b===`
|
|
204
|
+
`?y+=`
|
|
205
|
+
`:b=`
|
|
206
|
+
`:(y+=b+M,b=" ",w=!1)}switch(l.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)y+=`
|
|
207
|
+
`+u[x][0].slice(d);y[y.length-1]!==`
|
|
208
|
+
`&&(y+=`
|
|
209
|
+
`);break;default:y+=`
|
|
210
|
+
`}const E=s+l.length+e.source.length;return{value:y,type:o,comment:l.comment,range:[s,E,E]}}function IA({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:l}=e[0],o=l[0];let u=0,f="",d=-1;for(let b=1;b<l.length;++b){const w=l[b];if(!f&&(w==="-"||w==="+"))f=w;else{const E=Number(w);!u&&E?u=E:d===-1&&(d=n+b)}}d!==-1&&s(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let p=!1,m="",y=l.length;for(let b=1;b<e.length;++b){const w=e[b];switch(w.type){case"space":p=!0;case"newline":y+=w.source.length;break;case"comment":i&&!p&&s(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=w.source.length,m=w.source.substring(1);break;case"error":s(w,"UNEXPECTED_TOKEN",w.message),y+=w.source.length;break;default:{const E=`Unexpected token in block scalar header: ${w.type}`;s(w,"UNEXPECTED_TOKEN",E);const x=w.source;x&&typeof x=="string"&&(y+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:m,length:y}}function VA(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 $v(n,e,i){const{offset:s,type:l,source:o,end:u}=n;let f,d;const p=(b,w,E)=>i(s+b,w,E);switch(l){case"scalar":f=fe.PLAIN,d=GA(o,p);break;case"single-quoted-scalar":f=fe.QUOTE_SINGLE,d=KA(o,p);break;case"double-quoted-scalar":f=fe.QUOTE_DOUBLE,d=YA(o,p);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const m=s+o.length,y=Ja(u,m,e,i);return{value:d,type:f,comment:y.comment,range:[s,m,y.offset]}}function GA(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}`),Iv(n)}function KA(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),Iv(n.slice(1,-1)).replace(/''/g,"'")}function Iv(n){let e,i;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
211
|
+
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
212
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let l=s[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;s=i.exec(n);)s[1]===""?o===`
|
|
213
|
+
`?l+=o:o=`
|
|
214
|
+
`:(l+=o+s[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,s=f.exec(n),l+o+((s==null?void 0:s[1])??"")}function YA(n,e){let i="";for(let s=1;s<n.length-1;++s){const l=n[s];if(!(l==="\r"&&n[s+1]===`
|
|
215
|
+
`))if(l===`
|
|
216
|
+
`){const{fold:o,offset:u}=XA(n,s);i+=o,s=u}else if(l==="\\"){let o=n[++s];const u=PA[o];if(u)i+=u;else if(o===`
|
|
217
|
+
`)for(o=n[s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="\r"&&n[s+1]===`
|
|
218
|
+
`)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+=FA(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(l===" "||l===" "){const o=s;let u=n[s+1];for(;u===" "||u===" ";)u=n[++s+1];u!==`
|
|
219
|
+
`&&!(u==="\r"&&n[s+2]===`
|
|
220
|
+
`)&&(i+=s>o?n.slice(o,s+1):l)}else i+=l}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function XA(n,e){let i="",s=n[e+1];for(;(s===" "||s===" "||s===`
|
|
221
|
+
`||s==="\r")&&!(s==="\r"&&n[e+2]!==`
|
|
222
|
+
`);)s===`
|
|
223
|
+
`&&(i+=`
|
|
224
|
+
`),e+=1,s=n[e+1];return i||(i=" "),{fold:i,offset:e}}const PA={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
225
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function FA(n,e,i,s){const l=n.substr(e,i),u=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,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 Vv(n,e,i,s){const{value:l,type:o,comment:u,range:f}=e.type==="block-scalar"?qv(n,e,s):$v(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[_n]:d?p=QA(n.schema,l,d,i,s):e.type==="scalar"?p=ZA(n,l,e,s):p=n.schema[_n];let m;try{const y=p.resolve(l,b=>s(i??e,"TAG_RESOLVE_FAILED",b),n.options);m=Oe(y)?y:new fe(y)}catch(y){const b=y instanceof Error?y.message:String(y);s(i??e,"TAG_RESOLVE_FAILED",b),m=new fe(l)}return m.range=f,m.source=l,o&&(m.type=o),d&&(m.tag=d),p.format&&(m.format=p.format),u&&(m.comment=u),m}function QA(n,e,i,s,l){var f;if(i==="!")return n[_n];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):(l(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[_n])}function ZA({atKey:n,directives:e,schema:i},s,l,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[_n];if(i.compat){const f=i.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(s))})??i[_n];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(l,"TAG_RESOLVE_FAILED",m,!0)}}return u}function JA(n,e,i){if(e){i===null&&(i=e.length);for(let s=i-1;s>=0;--s){let l=e[s];switch(l.type){case"space":case"comment":case"newline":n-=l.source.length;continue}for(l=e[++s];(l==null?void 0:l.type)==="space";)n+=l.source.length,l=e[++s];break}}return n}const WA={composeNode:Gv,composeEmptyNode:yd};function Gv(n,e,i,s){const l=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let p,m=!0;switch(e.type){case"alias":p=eN(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=Vv(n,e,d,s),f&&(p.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=$A(WA,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=yd(n,e.offset,void 0,null,i,s),m=!1}}return f&&p.anchor===""&&s(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&n.options.stringKeys&&(!Oe(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 yd(n,e,i,s,{spaceBefore:l,comment:o,anchor:u,tag:f,end:d},p){const m={type:"scalar",offset:JA(e,i,s),indent:-1,source:""},y=Vv(n,m,f,p);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(y.spaceBefore=!0),o&&(y.comment=o,y.range[2]=d),y}function eN({options:n},{offset:e,source:i,end:s},l){const o=new cc(i.substring(1));o.source===""&&l(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&l(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=Ja(s,u,n.strict,l);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function tN(n,e,{offset:i,start:s,value:l,end:o},u){const f=Object.assign({_directives:e},n),d=new vr(void 0,f),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=cr(s,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=l?Gv(p,l,m,u):yd(p,m.end,s,null,m,u);const y=d.contents.range[2],b=Ja(o,y,!1,u);return b.comment&&(d.comment=b.comment),d.range=[i,y,b.offset],d}function Ea(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 h0(n){var l;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?`
|
|
226
|
+
|
|
227
|
+
`:`
|
|
228
|
+
`)+(u.substring(1)||" "),i=!0,s=!1;break;case"%":((l=n[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(s=!0),i=!1}}return{comment:e,afterEmptyLine:s}}class bd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,s,l,o)=>{const u=Ea(i);o?this.warnings.push(new Hv(u,s,l)):this.errors.push(new Qi(u,s,l))},this.directives=new xt({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:s,afterEmptyLine:l}=h0(this.prelude);if(s){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
|
|
229
|
+
${s}`:s;else if(l||e.directives.docStart||!o)e.commentBefore=s;else if(ze(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}
|
|
230
|
+
${f}`:s}else{const u=o.commentBefore;o.commentBefore=u?`${s}
|
|
231
|
+
${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:h0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,s=-1){for(const l of e)yield*this.next(l);yield*this.end(i,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,s,l)=>{const o=Ea(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",s,l)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=tN(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 Qi(Ea(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 Qi(Ea(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const i=Ja(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}
|
|
232
|
+
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Qi(Ea(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),l=new vr(void 0,s);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function nN(n,e=!0,i){if(n){const s=(l,o,u)=>{const f=typeof l=="number"?l:Array.isArray(l)?l[0]:l.offset;if(i)i(f,o,u);else throw new Qi([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return $v(n,e,s);case"block-scalar":return qv({options:{strict:e}},n,s)}}return null}function iN(n,e){const{implicitKey:i=!1,indent:s,inFlow:l=!1,offset:o=-1,type:u="PLAIN"}=e,f=Qa({type:u,value:n},{implicitKey:i,indent:s>0?" ".repeat(s):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:s,source:`
|
|
233
|
+
`}];switch(f[0]){case"|":case">":{const p=f.indexOf(`
|
|
234
|
+
`),m=f.substring(0,p),y=f.substring(p+1)+`
|
|
235
|
+
`,b=[{type:"block-scalar-header",offset:o,indent:s,source:m}];return Kv(b,d)||b.push({type:"newline",offset:-1,indent:s,source:`
|
|
236
|
+
`}),{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 sN(n,e,i={}){let{afterKey:s=!1,implicitKey:l=!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=Qa({type:u,value:e},{implicitKey:l||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":rN(n,d);break;case'"':lh(n,d,"double-quoted-scalar");break;case"'":lh(n,d,"single-quoted-scalar");break;default:lh(n,d,"scalar")}}function rN(n,e){const i=e.indexOf(`
|
|
237
|
+
`),s=e.substring(0,i),l=e.substring(i+1)+`
|
|
238
|
+
`;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=l}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:s}];Kv(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
|
|
239
|
+
`});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:l})}}function Kv(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 lh(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 l=e.length;n.props[0].type==="block-scalar-header"&&(l-=n.props[0].source.length);for(const o of s)o.offset+=l;delete n.props,Object.assign(n,{type:i,source:e,end:s});break}case"block-map":case"block-seq":{const l={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
|
|
240
|
+
`};delete n.items,Object.assign(n,{type:i,source:e,end:[l]});break}default:{const s="indent"in n?n.indent:-1,l="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:l})}}}const aN=n=>"type"in n?ec(n):Ho(n);function ec(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=ec(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=Ho(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=Ho(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=Ho(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 Ho({start:n,key:e,sep:i,value:s}){let l="";for(const o of n)l+=o.source;if(e&&(l+=ec(e)),i)for(const o of i)l+=o.source;return s&&(l+=ec(s)),l}const Ah=Symbol("break visit"),lN=Symbol("skip children"),Yv=Symbol("remove item");function Wi(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),Xv(Object.freeze([]),n,e)}Wi.BREAK=Ah;Wi.SKIP=lN;Wi.REMOVE=Yv;Wi.itemAtPath=(n,e)=>{let i=n;for(const[s,l]of e){const o=i==null?void 0:i[s];if(o&&"items"in o)i=o.items[l];else return}return i};Wi.parentCollection=(n,e)=>{const i=Wi.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],l=i==null?void 0:i[s];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function Xv(n,e,i){let s=i(e,n);if(typeof s=="symbol")return s;for(const l of["key","value"]){const o=e[l];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=Xv(Object.freeze(n.concat([[l,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Ah)return Ah;f===Yv&&(o.items.splice(u,1),u-=1)}}typeof s=="function"&&l==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}const vc="\uFEFF",Sc="",wc="",Xa="",oN=n=>!!n&&"items"in n,cN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function uN(n){switch(n){case vc:return"<BOM>";case Sc:return"<DOC>";case wc:return"<FLOW_END>";case Xa:return"<SCALAR>";default:return JSON.stringify(n)}}function Pv(n){switch(n){case vc:return"byte-order-mark";case Sc:return"doc-mode";case wc:return"flow-error-end";case Xa:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
241
|
+
`:case`\r
|
|
242
|
+
`: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 fN=Object.freeze(Object.defineProperty({__proto__:null,BOM:vc,DOCUMENT:Sc,FLOW_END:wc,SCALAR:Xa,createScalarToken:iN,isCollection:oN,isScalar:cN,prettyToken:uN,resolveAsScalar:nN,setScalarValue:sN,stringify:aN,tokenType:Pv,visit:Wi},Symbol.toStringTag,{value:"Module"}));function dn(n){switch(n){case void 0:case" ":case`
|
|
243
|
+
`:case"\r":case" ":return!0;default:return!1}}const d0=new Set("0123456789ABCDEFabcdef"),hN=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),To=new Set(",[]{}"),dN=new Set(` ,[]{}
|
|
244
|
+
\r `),oh=n=>!n||dN.has(n);class Fv{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===`
|
|
245
|
+
`?!0:i==="\r"?this.buffer[e+1]===`
|
|
246
|
+
`:!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 l=this.buffer[s+e+1];if(l===`
|
|
247
|
+
`||!l&&!this.atEnd)return e+s+1}return i===`
|
|
248
|
+
`||s>=this.indentNext||!i&&!this.atEnd?e+s:-1}if(i==="-"||i==="."){const s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&dn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
249
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===vc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,s=e.indexOf("#");for(;s!==-1;){const o=e[s-1];if(o===" "||o===" "){i=s-1;break}else s=e.indexOf("#",s+1)}for(;;){const o=e[i-1];if(o===" "||o===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-l),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield Sc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const i=this.peek(3);if((i==="---"||i==="...")&&dn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!dn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&dn(i)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(oh),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,s=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=s=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&l[0]!=="#"||s===0&&(l.startsWith("---")||l.startsWith("..."))&&dn(l[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield wc,yield*this.parseLineStart();let o=0;for(;l[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),l[o]){case void 0:return"flow";case"#":return yield*this.pushCount(l.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(oh),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||dn(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let i=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const s=this.buffer.substring(0,i);let l=s.indexOf(`
|
|
250
|
+
`,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=s.indexOf(`
|
|
251
|
+
`,o)}l!==-1&&(i=l-(s[l-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>dn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,s;e:for(let o=this.pos;s=this.buffer[o];++o)switch(s){case" ":i+=1;break;case`
|
|
252
|
+
`:e=o,i=0;break;case"\r":{const u=this.buffer[o+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
|
|
253
|
+
`)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(`
|
|
254
|
+
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let l=e+1;for(s=this.buffer[l];s===" ";)s=this.buffer[++l];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
|
|
255
|
+
`;)s=this.buffer[++l];e=l-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===`
|
|
256
|
+
`&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield Xa,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,s=this.pos-1,l;for(;l=this.buffer[++s];)if(l===":"){const o=this.buffer[s+1];if(dn(o)||e&&To.has(o))break;i=s}else if(dn(l)){let o=this.buffer[s+1];if(l==="\r"&&(o===`
|
|
257
|
+
`?(s+=1,l=`
|
|
258
|
+
`,o=this.buffer[s+1]):i=s),o==="#"||e&&To.has(o))break;if(l===`
|
|
259
|
+
`){const u=this.continueScalar(s+1);if(u===-1)break;s=Math.max(s,u-2)}}else{if(e&&To.has(l))break;i=s}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield Xa,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(oh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(dn(i)||e&&To.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(;!dn(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(hN.has(i))i=this.buffer[++e];else if(i==="%"&&d0.has(this.buffer[e+1])&&d0.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===`
|
|
260
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
261
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,s;do s=this.buffer[++i];while(s===" "||e&&s===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(e){let i=this.pos,s=this.buffer[i];for(;!e(s);)s=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class Qv{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 l=this.lineStarts[i-1];return{line:i,col:e-l+1}}}}function Xi(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function p0(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 Zv(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 Eo(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 Fs(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 g0(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!Xi(e.start,"explicit-key-ind")&&!Xi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Zv(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 vd{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 Fv,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=Pv(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"&&g0(i),s.type){case"document":s.value=i;break;case"block-scalar":s.props.push(i);break;case"block-map":{const l=s.items[s.items.length-1];if(l.value){s.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=s.items[s.items.length-1];l.value?s.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=s.items[s.items.length-1];!l||l.value?s.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{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 l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&p0(l.start)===-1&&(i.indent===0||l.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(s.type==="document"?s.end=l.start:s.items.push({start:l.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":{p0(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=Eo(this.peek(2)),s=Fs(i);let l;e.end?(l=e.end,l.push(this.sourceToken),delete e.end):l=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:l}]};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
|
+
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|
263
|
+
`,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 l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.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 l=e.items[e.items.length-2],o=(s=l==null?void 0:l.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 l=!this.onKeyLine&&this.indent===e.indent,o=l&&(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(Xi(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(Zv(i.key)&&!Xi(i.sep,"newline")){const f=Fs(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(Xi(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=Fs(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]}):Xi(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){l&&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 l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.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 l=e.items[e.items.length-2],o=(s=l==null?void 0:l.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||Xi(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const l=this.startBlockValue(e);if(l){this.stack.push(l);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 l=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:l,sep:[]}):i.sep?this.stack.push(l):Object.assign(i,{key:l,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 l=Eo(s),o=Fs(l);g0(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
|
+
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|
265
|
+
`,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=Eo(e),s=Fs(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=Eo(e),s=Fs(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 Jv(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new Qv||null,prettyErrors:e}}function pN(n,e={}){const{lineCounter:i,prettyErrors:s}=Jv(e),l=new vd(i==null?void 0:i.addNewLine),o=new bd(e),u=Array.from(o.compose(l.parse(n)));if(s&&i)for(const f of u)f.errors.forEach(Wo(n,i)),f.warnings.forEach(Wo(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function Wv(n,e={}){const{lineCounter:i,prettyErrors:s}=Jv(e),l=new vd(i==null?void 0:i.addNewLine),o=new bd(e);let u=null;for(const f of o.compose(l.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new Qi(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&i&&(u.errors.forEach(Wo(n,i)),u.warnings.forEach(Wo(n,i))),u}function gN(n,e,i){let s;typeof e=="function"?s=e:i===void 0&&e&&typeof e=="object"&&(i=e);const l=Wv(n,i);if(!l)return null;if(l.warnings.forEach(o=>vv(l.options.logLevel,o)),l.errors.length>0){if(l.options.logLevel!=="silent")throw l.errors[0];l.errors=[]}return l.toJS(Object.assign({reviver:s},i))}function mN(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 l=Math.round(i);i=l<1?void 0:l>8?{indent:8}:{indent:l}}if(n===void 0){const{keepUndefined:l}=i??e??{};if(!l)return}return is(n)&&!s?n.toString(i):new vr(n,s,i).toString(i)}const eS=Object.freeze(Object.defineProperty({__proto__:null,Alias:cc,CST:fN,Composer:bd,Document:vr,Lexer:Fv,LineCounter:Qv,Pair:vt,Parser:vd,Scalar:fe,Schema:bc,YAMLError:md,YAMLMap:Gt,YAMLParseError:Qi,YAMLSeq:Si,YAMLWarning:Hv,isAlias:ns,isCollection:ze,isDocument:is,isMap:gr,isNode:qe,isPair:Be,isScalar:Oe,isSeq:mr,parse:gN,parseAllDocuments:pN,parseDocument:Wv,stringify:mN,visit:vi,visitAsync:oc},Symbol.toStringTag,{value:"Module"})),yN=({action:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:l,highlightedElement:o,setHighlightedElement:u})=>{const[f,d]=q.useState("action"),[p]=Kn("shouldPopulateCanvasFromScreenshot",!1),m=q.useMemo(()=>wN(n),[n]),{snapshotInfoUrl:y,snapshotUrl:b,popoutUrl:w}=q.useMemo(()=>{const x=m[f];return x?xN(x,p):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,f,p]),E=q.useMemo(()=>y!==void 0?{snapshotInfoUrl:y,snapshotUrl:b,popoutUrl:w}:void 0,[y,b,w]);return v.jsxs("div",{className:"snapshot-tab vbox",children:[v.jsxs(Dh,{children:[v.jsx(Yt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:s,onClick:()=>l(!s)}),["action","before","after"].map(x=>v.jsx(ib,{id:x,title:SN(x),selected:f===x,onSelect:()=>d(x)},x)),v.jsx("div",{style:{flex:"auto"}}),v.jsx(Yt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(E!=null&&E.popoutUrl),onClick:()=>{const x=window.open((E==null?void 0:E.popoutUrl)||"","_blank");x==null||x.addEventListener("DOMContentLoaded",()=>{new nv(x,{isUnderTest:nS,sdkLanguage:e,testIdAttributeName:i,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),v.jsx(bN,{snapshotUrls:E,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:l,highlightedElement:o,setHighlightedElement:u})]})},bN=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:l,highlightedElement:o,setHighlightedElement:u})=>{const f=q.useRef(null),d=q.useRef(null),[p,m]=q.useState({viewport:iS,url:""}),y=q.useRef({iteration:0,visibleIframe:0});return q.useEffect(()=>{(async()=>{const b=y.current.iteration+1,w=1-y.current.visibleIframe;y.current.iteration=b;const E=await _N(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==b)return;const x=[f,d][w].current;if(x){let T=()=>{};const M=new Promise(C=>T=C);try{x.addEventListener("load",T),x.addEventListener("error",T);const C=(n==null?void 0:n.snapshotUrl)||TN;x.contentWindow?x.contentWindow.location.replace(C):x.src=C,await M}catch{}finally{x.removeEventListener("load",T),x.removeEventListener("error",T)}}y.current.iteration===b&&(y.current.visibleIframe=w,m(E))})()},[n]),v.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:b=>{b.key==="Escape"&&s&&l(!1)},children:[v.jsx(m0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),v.jsx(m0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),v.jsx(vN,{snapshotInfo:p,children:v.jsxs("div",{className:"snapshot-switcher",children:[v.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Ye(y.current.visibleIframe===0&&"snapshot-visible")}),v.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ye(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},vN=({snapshotInfo:n,children:e})=>{const[i,s]=es(),o={width:n.viewport.width,height:n.viewport.height+40},u=Math.min(i.width/o.width,i.height/o.height,1),f={x:(i.width-o.width)/2,y:(i.height-o.height)/2};return v.jsx("div",{ref:s,className:"snapshot-wrapper",children:v.jsxs("div",{className:"snapshot-container",style:{width:o.width+"px",height:o.height+"px",transform:`translate(${f.x}px, ${f.y}px) scale(${u})`},children:[v.jsx(lA,{url:n.url}),e]})})};function SN(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const m0=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:s,highlightedElement:l,setHighlightedElement:o,iteration:u})=>(q.useEffect(()=>{const f=l.lastEdited==="ariaSnapshot"?l.ariaSnapshot:void 0,d=l.lastEdited==="locator"?l.locator:void 0,p=!!f||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{tS(m,p,i,s,y,"",n==null?void 0:n.contentWindow)}catch{}const b=f?Bh(eS,f):void 0,w=d?rA(i,d,s):void 0;for(const{recorder:E,frameSelector:x}of m){const T=w!=null&&w.startsWith(x)?w.substring(x.length).trim():void 0,M=(b==null?void 0:b.errors.length)===0?b.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:T,ariaTemplate:M,language:i,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(C){o({locator:Ji(i,x+C.selector),ariaSnapshot:C.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const C of m)C.recorder!==E&&C.recorder.clearHighlight()}})}},[n,e,l,o,i,s,u]),v.jsx(v.Fragment,{}));function tS(n,e,i,s,l,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new nv(u,{isUnderTest:l,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new WE(d);f._injectedScript=d,f._recorder={recorder:p,frameSelector:o},l&&(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 >> ":"";tS(n,e,i,s,l,o+m,p)}}const Aa=(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 wN(n){if(!n)return{};let e=Aa(n,"beforeSnapshot");if(!e){for(let l=_y(n);l;l=_y(l))if(l.endTime<=n.startTime&&l.afterSnapshot){e=Aa(l,"afterSnapshot");break}}let i=Aa(n,"afterSnapshot");if(!i){let l;for(let o=Ty(n);o&&o.startTime<=n.endTime;o=Ty(o))o.endTime>n.endTime||!o.afterSnapshot||l&&l.endTime>o.endTime||(l=o);l?i=Aa(l,"afterSnapshot"):i=e}const s=Aa(n,"inputSnapshot",!0)??i;return s&&(s.point=n.point),{action:s,before:e,after:i}}const nS=new URLSearchParams(window.location.search).has("isUnderTest"),y0=new URLSearchParams(window.location.search).get("server");function xN(n,e){const i=new URLSearchParams;i.set("trace",qo(n.action).traceUrl),i.set("name",n.snapshotName),nS&&i.set("isUnderTest","true"),n.point&&(i.set("pointX",String(n.point.x)),i.set("pointY",String(n.point.y)),n.hasInputTarget&&i.set("hasInputTarget","1")),e&&i.set("shouldPopulateCanvasFromScreenshot","1");const s=new URL(`snapshot/${n.pageId}?${i.toString()}`,window.location.href).toString(),l=new URL(`snapshotInfo/${n.pageId}?${i.toString()}`,window.location.href).toString(),o=new URLSearchParams;o.set("r",s),y0&&o.set("server",y0),o.set("trace",qo(n.action).traceUrl),n.point&&(o.set("pointX",String(n.point.x)),o.set("pointY",String(n.point.y)),n.hasInputTarget&&i.set("hasInputTarget","1"));const u=new URL(`snapshot.html?${o.toString()}`,window.location.href).toString();return{snapshotInfoUrl:l,snapshotUrl:s,popoutUrl:u}}async function _N(n){const e={url:"",viewport:iS,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 iS={width:1280,height:720},TN='data:text/html,<body style="background: #ddd"></body>',sS={width:200,height:45},Zs=2.5,EN=sS.height+Zs*2,AN=({model:n,boundaries:e,previewPoint:i})=>{var m,y;const[s,l]=es(),o=q.useRef(null);let u=0;if(o.current&&i){const b=o.current.getBoundingClientRect();u=(i.clientY-b.top+o.current.scrollTop)/EN|0}const f=(y=(m=n==null?void 0:n.pages)==null?void 0:m[u])==null?void 0:y.screencastFrames;let d,p;if(i!==void 0&&f&&f.length){const b=e.minimum+(e.maximum-e.minimum)*i.x/s.width;d=f[S0(f,b,rS)-1];const w={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?aS({width:d.width,height:d.height},w):void 0}return v.jsxs("div",{className:"film-strip",ref:l,children:[v.jsx("div",{className:"film-strip-lanes",ref:o,children:n==null?void 0:n.pages.map((b,w)=>b.screencastFrames.length?v.jsx(NN,{boundaries:e,page:b,width:s.width},w):null)}),(i==null?void 0:i.x)!==void 0&&v.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(i.x,s.width-(p?p.width:0)-10)},children:[i.action&&v.jsx("div",{className:"film-strip-hover-title",children:Rh(i.action,i)}),d&&p&&v.jsx("div",{style:{width:p.width,height:p.height},children:v.jsx("img",{src:`sha1/${d.sha1}`,width:p.width,height:p.height})})]})]})},NN=({boundaries:n,page:e,width:i})=>{const s={width:0,height:0},l=e.screencastFrames;for(const x of l)s.width=Math.max(s.width,x.width),s.height=Math.max(s.height,x.height);const o=aS(s,sS),u=l[0].timestamp,f=l[l.length-1].timestamp,d=n.maximum-n.minimum,p=(u-n.minimum)/d*i,m=(n.maximum-f)/d*i,b=(f-u)/d*i/(o.width+2*Zs)|0,w=(f-u)/b,E=[];for(let x=0;u&&w&&x<b;++x){const T=u+w*x,M=S0(l,T,rS)-1;E.push(v.jsx("div",{className:"film-strip-frame",style:{width:o.width,height:o.height,backgroundImage:`url(sha1/${l[M].sha1})`,backgroundSize:`${o.width}px ${o.height}px`,margin:Zs,marginRight:Zs}},x))}return E.push(v.jsx("div",{className:"film-strip-frame",style:{width:o.width,height:o.height,backgroundImage:`url(sha1/${l[l.length-1].sha1})`,backgroundSize:`${o.width}px ${o.height}px`,margin:Zs,marginRight:Zs}},E.length)),v.jsx("div",{className:"film-strip-lane",style:{marginLeft:p+"px",marginRight:m+"px"},children:E})};function rS(n,e){return n-e.timestamp}function aS(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 CN=({model:n,boundaries:e,consoleEntries:i,onSelected:s,highlightedAction:l,highlightedEntry:o,highlightedConsoleEntry:u,selectedTime:f,setSelectedTime:d,sdkLanguage:p})=>{const[m,y]=es(),[b,w]=q.useState(),[E,x]=q.useState(),[T]=Kn("actionsFilter",[]),{offsets:M,curtainLeft:C,curtainRight:V}=q.useMemo(()=>{let L=f||e;if(b&&b.startX!==b.endX){const z=wn(m.width,e,b.startX),Q=wn(m.width,e,b.endX);L={minimum:Math.min(z,Q),maximum:Math.max(z,Q)}}const F=sn(m.width,e,L.minimum),me=sn(m.width,e,e.maximum)-sn(m.width,e,L.maximum);return{offsets:kN(m.width,e),curtainLeft:F,curtainRight:me}},[f,e,b,m]),$=q.useMemo(()=>n==null?void 0:n.filteredActions(T),[n,T]),B=q.useMemo(()=>{const L=[];for(const F of $||[])L.push({action:F,leftTime:F.startTime,rightTime:F.endTime||e.maximum,leftPosition:sn(m.width,e,F.startTime),rightPosition:sn(m.width,e,F.endTime||e.maximum),active:!1,error:!!F.error});for(const F of(n==null?void 0:n.resources)||[]){const ge=F._monotonicTime,me=F._monotonicTime+F.time;L.push({resource:F,leftTime:ge,rightTime:me,leftPosition:sn(m.width,e,ge),rightPosition:sn(m.width,e,me),active:!1,error:!1})}for(const F of i||[])L.push({consoleMessage:F,leftTime:F.timestamp,rightTime:F.timestamp,leftPosition:sn(m.width,e,F.timestamp),rightPosition:sn(m.width,e,F.timestamp),active:!1,error:F.isError});return L},[n,$,i,e,m]);q.useMemo(()=>{for(const L of B)l?L.active=L.action===l:o?L.active=L.resource===o:u?L.active=L.consoleMessage===u:L.active=!1},[B,l,o,u]);const Y=q.useCallback(L=>{if(x(void 0),!y.current)return;const F=L.clientX-y.current.getBoundingClientRect().left,ge=wn(m.width,e,F),me=f?sn(m.width,e,f.minimum):0,z=f?sn(m.width,e,f.maximum):0;f&&Math.abs(F-me)<10?w({startX:z,endX:F,type:"resize"}):f&&Math.abs(F-z)<10?w({startX:me,endX:F,type:"resize"}):f&&ge>f.minimum&&ge<f.maximum&&L.clientY-y.current.getBoundingClientRect().top<20?w({startX:me,endX:z,pivot:F,type:"move"}):w({startX:F,endX:F,type:"resize"})},[e,m,y,f]),J=q.useCallback(L=>{if(!y.current)return;const F=L.clientX-y.current.getBoundingClientRect().left,ge=wn(m.width,e,F),me=$==null?void 0:$.findLast(ve=>ve.startTime<=ge);if(!L.buttons){w(void 0);return}if(me&&s(me),!b)return;let z=b;if(b.type==="resize")z={...b,endX:F};else{const ve=F-b.pivot;let N=b.startX+ve,X=b.endX+ve;N<0&&(N=0,X=N+(b.endX-b.startX)),X>m.width&&(X=m.width,N=X-(b.endX-b.startX)),z={...b,startX:N,endX:X,pivot:F}}w(z);const Q=wn(m.width,e,z.startX),ne=wn(m.width,e,z.endX);Q!==ne&&d({minimum:Math.min(Q,ne),maximum:Math.max(Q,ne)})},[e,b,m,$,s,y,d]),I=q.useCallback(()=>{if(x(void 0),!!b){if(b.startX!==b.endX){const L=wn(m.width,e,b.startX),F=wn(m.width,e,b.endX);d({minimum:Math.min(L,F),maximum:Math.max(L,F)})}else{const L=wn(m.width,e,b.startX),F=$==null?void 0:$.findLast(ge=>ge.startTime<=L);F&&s(F),d(void 0)}w(void 0)}},[e,b,m,$,d,s]),R=q.useCallback(L=>{if(!y.current)return;const F=L.clientX-y.current.getBoundingClientRect().left,ge=wn(m.width,e,F),me=$==null?void 0:$.findLast(z=>z.startTime<=ge);x({x:F,clientY:L.clientY,action:me,sdkLanguage:p})},[e,m,$,y,p]),te=q.useCallback(()=>{x(void 0)},[]),re=q.useCallback(()=>{d(void 0)},[d]);return v.jsxs("div",{className:"timeline-view-container",children:[!!b&&v.jsx(J0,{cursor:(b==null?void 0:b.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:I,onPaneMouseMove:J,onPaneDoubleClick:re}),v.jsxs("div",{ref:y,className:"timeline-view",onMouseDown:Y,onMouseMove:R,onMouseLeave:te,children:[v.jsx("div",{className:"timeline-grid",children:M.map((L,F)=>v.jsx("div",{className:"timeline-divider",style:{left:L.position+"px"},children:v.jsx("div",{className:"timeline-time",children:Tt(L.time-e.minimum)})},F))}),v.jsx("div",{style:{height:8}}),v.jsx(AN,{model:n,boundaries:e,previewPoint:E}),v.jsx("div",{className:"timeline-bars",children:B.filter(L=>!L.action||L.action.class!=="Test").map((L,F)=>v.jsx("div",{className:Ye("timeline-bar",L.action&&"action",L.resource&&"network",L.consoleMessage&&"console-message",L.active&&"active",L.error&&"error"),style:{left:L.leftPosition,width:Math.max(5,L.rightPosition-L.leftPosition),top:MN(L),bottom:0}},F))}),v.jsx("div",{className:"timeline-marker",style:{display:E!==void 0?"block":"none",left:((E==null?void 0:E.x)||0)+"px"}}),f&&v.jsxs("div",{className:"timeline-window",children:[v.jsx("div",{className:"timeline-window-curtain left",style:{width:C}}),v.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),v.jsx("div",{className:"timeline-window-center",children:v.jsx("div",{className:"timeline-window-drag"})}),v.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),v.jsx("div",{className:"timeline-window-curtain right",style:{width:V}})]})]})]})};function kN(n,e){let s=n/64;const l=e.maximum-e.minimum,o=n/l;let u=l/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:sn(n,e,b),time:b})}return m}function sn(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function wn(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}function MN(n){return n.resource?25:20}const ON=({model:n})=>{var i,s;if(!n)return v.jsx(v.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return v.jsxs("div",{className:"vbox",style:{flexShrink:0},children:[v.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&v.jsxs("div",{className:"call-line",children:["start time:",v.jsx("span",{className:"call-value datetime",title:e,children:e})]}),v.jsxs("div",{className:"call-line",children:["duration:",v.jsx("span",{className:"call-value number",title:Tt(n.endTime-n.startTime),children:Tt(n.endTime-n.startTime)})]}),v.jsx("div",{className:"call-section",children:"Browser"}),v.jsxs("div",{className:"call-line",children:["engine:",v.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&v.jsxs("div",{className:"call-line",children:["channel:",v.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&v.jsxs("div",{className:"call-line",children:["platform:",v.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.options.userAgent&&v.jsxs("div",{className:"call-line",children:["user agent:",v.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),v.jsxs("div",{className:"call-line",children:["baseURL:",v.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL})]})]}),v.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&v.jsxs("div",{className:"call-line",children:["width:",v.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&v.jsxs("div",{className:"call-line",children:["height:",v.jsx("span",{className:"call-value number",title:String(!!((s=n.options.viewport)!=null&&s.height)),children:n.options.viewport.height})]}),v.jsxs("div",{className:"call-line",children:["is mobile:",v.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&v.jsxs("div",{className:"call-line",children:["device scale:",v.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),v.jsx("div",{className:"call-section",children:"Counts"}),v.jsxs("div",{className:"call-line",children:["pages:",v.jsx("span",{className:"call-value number",children:n.pages.length})]}),v.jsxs("div",{className:"call-line",children:["actions:",v.jsx("span",{className:"call-value number",children:n.actions.length})]}),v.jsxs("div",{className:"call-line",children:["events:",v.jsx("span",{className:"call-value number",children:n.events.length})]})]})},LN=({annotations:n})=>n.length?v.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>v.jsxs("div",{className:"annotation-item",children:[v.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&v.jsxs("span",{children:[": ",eb(e.description)]})]},`annotation-${i}`))}):v.jsx(ts,{text:"No annotations"}),RN=({sdkLanguage:n,setIsInspecting:e,highlightedElement:i,setHighlightedElement:s})=>{const[l,o]=q.useState(),u=q.useCallback(f=>{const{errors:d}=Bh(eS,f,{prettyErrors:!1}),p=d.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));o(p),s({...i,ariaSnapshot:f,lastEdited:"ariaSnapshot"}),e(!1)},[i,s,e]);return v.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[v.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[v.jsx("div",{style:{flex:"auto"},children:"Locator"}),v.jsx(Yt,{icon:"files",title:"Copy locator",onClick:()=>{dy(i.locator||"")}})]}),v.jsx("div",{style:{height:50},children:v.jsx(lr,{text:i.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:f=>{s({...i,locator:f,lastEdited:"locator"}),e(!1)}})}),v.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[v.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),v.jsx(Yt,{icon:"files",title:"Copy snapshot",onClick:()=>{dy(i.ariaSnapshot||"")}})]}),v.jsx("div",{style:{height:150},children:v.jsx(lr,{text:i.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:l,onChange:u})})]})},jN=({className:n,style:e,open:i,isModal:s,width:l,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:p})=>{const m=q.useRef(null),[y,b]=q.useState(0);let w=e;if(f!=null&&f.current){const E=f.current.getBoundingClientRect();w={position:"fixed",margin:0,top:E.bottom+(o??0),left:DN(E,l??0),width:l,zIndex:100,...e}}return q.useEffect(()=>{const E=T=>{!m.current||!(T.target instanceof Node)||m.current.contains(T.target)||u==null||u()},x=T=>{T.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",E),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",x)}):()=>{}},[i,u]),q.useEffect(()=>{const E=()=>b(x=>x+1);return window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}},[]),q.useLayoutEffect(()=>{m.current&&(i?s?m.current.showModal():m.current.show():m.current.close())},[i,s]),v.jsx("dialog",{ref:m,style:w,className:n,"data-testid":d,children:p})},DN=(n,e)=>{const i=b0(n,e,"left");if(i.inBounds)return i.value;const s=b0(n,e,"right");return s.inBounds?s.value:i.value},b0=(n,e,i)=>{const s=document.documentElement.clientWidth;if(i==="left"){const l=n.left;return{value:l,inBounds:l+e<=s}}else return{value:n.right-e,inBounds:n.right-e>=0}},BN=({title:n,icon:e,dialogDataTestId:i,children:s})=>{const l=q.useRef(null),[o,u]=q.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(Yt,{ref:l,icon:e,title:n,onClick:()=>u(f=>!f)}),v.jsx(jN,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:o,width:200,verticalOffset:8,requestClose:()=>u(!1),anchor:l,dataTestId:i,children:s})]})},lS=({settings:n})=>v.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return v.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:UN(e,i)},e.name)})}),UN=(n,e)=>{switch(n.type){case"check":return v.jsxs(v.Fragment,{children:[v.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),v.jsx("label",{htmlFor:e,children:n.name})]});case"select":return v.jsxs(v.Fragment,{children:[v.jsxs("label",{htmlFor:e,children:[n.name,":"]}),v.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>v.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},YN=({model:n,showSourcesFirst:e,rootDir:i,fallbackLocation:s,isLive:l,hideTimeline:o,status:u,annotations:f,inert:d,onOpenExternally:p,revealSource:m,testRunMetadata:y})=>{var sl;const[b,w]=q.useState(void 0),[E,x]=q.useState(void 0),[T,M]=q.useState(void 0),[C,V]=q.useState(),[$,B]=q.useState(),[Y,J]=q.useState(),[I,R]=q.useState("actions"),[te,re]=Kn("propertiesTab",e?"source":"call"),[L,F]=q.useState(!1),[ge,me]=q.useState({lastEdited:"none"}),[z,Q]=q.useState(),[ne,ve]=Kn("propertiesSidebarLocation","bottom"),[N]=Kn("actionsFilter",[]),X=q.useCallback(le=>{w(le==null?void 0:le.callId),x(void 0)},[]),Z=q.useMemo(()=>n==null?void 0:n.filteredActions(N),[n,N]),W=q.useMemo(()=>Z==null?void 0:Z.find(le=>le.callId===C),[Z,C]),se=q.useCallback(le=>{V(le==null?void 0:le.callId)},[]),Se=q.useMemo(()=>(n==null?void 0:n.sources)||new Map,[n]);q.useEffect(()=>{Q(void 0),x(void 0)},[n]);const ce=q.useMemo(()=>{if(b){const Bt=Z==null?void 0:Z.find(ot=>ot.callId===b);if(Bt)return Bt}const le=n==null?void 0:n.failedAction();if(le)return le;if(Z!=null&&Z.length){let Bt=Z.length-1;for(let ot=0;ot<Z.length;++ot)if(Z[ot].title==="After Hooks"&&ot){Bt=ot-1;break}return Z[Bt]}},[n,Z,b]),Ve=q.useMemo(()=>W||ce,[ce,W]),Le=q.useMemo(()=>E?E.stack:Ve==null?void 0:Ve.stack,[Ve,E]),cn=q.useCallback(le=>{X(le),se(void 0)},[X,se]),St=q.useCallback(le=>{re(le),le!=="inspector"&&F(!1)},[re]),xi=q.useCallback(le=>{!L&&le&&St("inspector"),F(le)},[F,St,L]),Sr=q.useCallback(le=>{me(le),St("inspector")},[St]),wr=q.useCallback(le=>{St("attachments"),M(Bt=>{if(!Bt)return[le,0];const ot=Bt[1];return[le,ot+1]})},[St]);q.useEffect(()=>{m&&St("source")},[m,St]);const _i=v_(n,z),Wa=G_(n,z),el=p_(n),lt=(n==null?void 0:n.sdkLanguage)||"javascript",xc={id:"inspector",title:"Locator",render:()=>v.jsx(RN,{sdkLanguage:lt,setIsInspecting:xi,highlightedElement:ge,setHighlightedElement:me})},tl={id:"call",title:"Call",render:()=>v.jsx(jx,{action:Ve,startTimeOffset:(n==null?void 0:n.startTime)??0,sdkLanguage:lt})},nl={id:"log",title:"Log",render:()=>v.jsx(Ux,{action:Ve,isLive:l})},ss={id:"errors",title:"Errors",errorCount:el.errors.size,render:()=>v.jsx(m_,{errorsModel:el,model:n,testRunMetadata:y,sdkLanguage:lt,revealInSource:le=>{le.action?X(le.action):x(le),St("source")},wallTime:(n==null?void 0:n.wallTime)??0})};let il;!ce&&s&&(il=(sl=s.source)==null?void 0:sl.errors.length);const rs={id:"source",title:"Source",errorCount:il,render:()=>v.jsx(f_,{stack:Le,sources:Se,rootDir:i,stackFrameLocation:ne==="bottom"?"right":"bottom",fallbackLocation:s,onOpenExternally:p})},_c={id:"console",title:"Console",count:_i.entries.length,render:()=>v.jsx(S_,{consoleModel:_i,boundaries:Xt,selectedTime:z,onAccepted:le=>Q({minimum:le.timestamp,maximum:le.timestamp}),onEntryHovered:J})},Tc={id:"network",title:"Network",count:Wa.resources.length,render:()=>v.jsx(K_,{boundaries:Xt,networkModel:Wa,onEntryHovered:B,sdkLanguage:(n==null?void 0:n.sdkLanguage)??"javascript"})},Ti={id:"attachments",title:"Attachments",count:n==null?void 0:n.visibleAttachments.length,render:()=>v.jsx(n_,{model:n,revealedAttachment:T})},Ze=[xc,tl,nl,ss,_c,Tc,rs,Ti];if(f!==void 0){const le={id:"annotations",title:"Annotations",count:f.length,render:()=>v.jsx(LN,{annotations:f})};Ze.push(le)}if(e){const le=Ze.indexOf(rs);Ze.splice(le,1),Ze.splice(1,0,rs)}const{boundaries:Xt}=q.useMemo(()=>{const le={minimum:(n==null?void 0:n.startTime)||0,maximum:(n==null?void 0:n.endTime)||3e4};return le.minimum>le.maximum&&(le.minimum=0,le.maximum=3e4),le.maximum+=(le.maximum-le.minimum)/20,{boundaries:le}},[n]);let tt=0;!l&&n&&n.endTime>=0?tt=n.endTime-n.startTime:n&&n.wallTime&&(tt=Date.now()-n.wallTime);const Ec={id:"actions",title:"Actions",component:v.jsxs("div",{className:"vbox",children:[u&&v.jsxs("div",{className:"workbench-run-status",children:[v.jsx("span",{className:Ye("codicon",Z0(u))}),v.jsx("div",{children:Mx(u)}),v.jsx("div",{className:"spacer"}),v.jsx("div",{className:"workbench-run-duration",children:tt?Tt(tt):""})]}),v.jsx(Lx,{sdkLanguage:lt,actions:Z||[],selectedAction:n?ce:void 0,selectedTime:z,setSelectedTime:Q,onSelected:cn,onHighlighted:se,revealAttachment:wr,revealConsole:()=>St("console"),isLive:l})]})},Ac={id:"metadata",title:"Metadata",component:v.jsx(ON,{model:n})};return v.jsxs("div",{className:"vbox workbench",...d?{inert:!0}:{},children:[!o&&v.jsx(CN,{model:n,consoleEntries:_i.entries,boundaries:Xt,highlightedAction:W,highlightedEntry:$,highlightedConsoleEntry:Y,onSelected:cn,sdkLanguage:lt,selectedTime:z,setSelectedTime:Q}),v.jsx($o,{sidebarSize:250,orientation:ne==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:v.jsx($o,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:v.jsx(yN,{action:Ve,model:n,sdkLanguage:lt,testIdAttributeName:(n==null?void 0:n.testIdAttributeName)||"data-testid",isInspecting:L,setIsInspecting:xi,highlightedElement:ge,setHighlightedElement:Sr}),sidebar:v.jsx(dh,{tabs:[Ec,Ac],selectedTab:I,setSelectedTab:R,rightToolbar:[v.jsx(HN,{},"filter")]})}),sidebar:v.jsx(dh,{tabs:Ze,selectedTab:te,setSelectedTab:St,rightToolbar:[ne==="bottom"?v.jsx(Yt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{ve("right")}}):v.jsx(Yt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{ve("bottom")}})],mode:ne==="bottom"?"default":"select"})})]})},HN=()=>{const[n,e]=Kn("actionsFilter",[]);return v.jsx(BN,{icon:"filter",title:"Filter actions",children:v.jsx(lS,{settings:[{type:"check",value:n.includes("getter"),set:i=>e(i?[...n,"getter"]:n.filter(s=>s!=="getter")),name:"Getters"},{type:"check",value:n.includes("route"),set:i=>e(i?[...n,"route"]:n.filter(s=>s!=="route")),name:"Network routes"},{type:"check",value:n.includes("configuration"),set:i=>e(i?[...n,"configuration"]:n.filter(s=>s!=="configuration")),name:"Configuration"}]})})};var v0;(n=>{function e(i){for(const s of i.splice(0))s.dispose()}n.disposeAll=e})(v0||(v0={}));class Na{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let s=!1;const l=this,o={dispose(){s||(s=!0,l._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:l,event:o}=this._deliveryQueue[s];l.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class XN{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 PN{constructor(e){this._onCloseEmitter=new Na,this._onReportEmitter=new Na,this._onStdioEmitter=new Na,this._onTestFilesChangedEmitter=new Na,this._onLoadTraceRequestedEmitter=new Na,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 l=JSON.parse(s),{id:o,result:u,error:f,method:d,params:p}=l;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,l)=>{this._transport.onopen(s),this._transport.onerror(l)}),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 l=++this._lastId,o={id:l,method:e,params:i};return this._transport.send(JSON.stringify(o)),new Promise((u,f)=>{this._callbacks.set(l,{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 FN=()=>{const[n,e]=Kn("shouldPopulateCanvasFromScreenshot",!1),[i,s]=Ow();return v.jsx(lS,{settings:[{type:"check",value:i,set:s,name:"Dark mode"},{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{BN as D,Wx as E,GN as M,Kt as R,$o as S,PN as T,XN as W,Yx as _,FN as a,YN as b,jN as c,qN as d,VN as e,ch as f,$N as g,IN as h,Ye as i,v as j,Cx as k,Dh as l,Tt as m,Yt as n,Kn as o,lS as p,_w as q,q as r,Ki as s,Z0 as t,es as u};
|